@mx-cartographer/experiences 7.2.9-alpha-ram1 → 7.2.9-alpha.san3
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/common/types/Widgets.d.ts +2 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +2 -0
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +3 -1
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +4 -1
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +4 -1
- package/dist/finstrong/index.es.js +934 -912
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, Fragment as z, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import A from "@mui/material/Box";
|
|
3
|
-
import
|
|
4
|
-
import { useTheme as
|
|
3
|
+
import _ from "@mui/material/Stack";
|
|
4
|
+
import { useTheme as G, alpha as ue } from "@mui/material/styles";
|
|
5
5
|
import { PieChart as Vt, BarPlot as Yt } from "@mui/x-charts";
|
|
6
6
|
import { TrendingUp as st, ArrowRightAlt as Xt, TrendingDown as Ut, AccountBalance as ct, ChevronRight as Z, MultilineChart as lt, CreditCard as $e, CheckCircle as qt, Cancel as Zt, Savings as Qt, ContentCopy as Jt, Add as dt, Cardiology as en, Payments as tn, CalendarMonth as nn, ExpandMore as on } from "@mxenabled/mx-icons";
|
|
7
|
-
import { P as k, H3 as
|
|
8
|
-
import { g as sn, a as cn, r as Ue, b as ln, c as We, d as ut, C as
|
|
7
|
+
import { P as k, H3 as X, Text as T, InstitutionLogo as pt, H2 as De, MerchantLogo as rn, Icon as an } from "@mxenabled/mxui";
|
|
8
|
+
import { g as sn, a as cn, r as Ue, b as ln, c as We, d as ut, C as ye, e as be, f as dn, h as pn, i as un, j as _t, k as qe, l as _n, m as Ze, n as hn, o as ht, p as mn, q as mt, s as we, t as gn, u as yn, v as bn, w as fn, A as J, x as xn, P as Sn } from "../FinstrongStore-C74yHCOj.mjs";
|
|
9
9
|
import { y as hi, F as mi } from "../FinstrongStore-C74yHCOj.mjs";
|
|
10
10
|
import * as Qe from "d3";
|
|
11
|
-
import { observer as
|
|
12
|
-
import { u as
|
|
11
|
+
import { observer as x } from "mobx-react-lite";
|
|
12
|
+
import { u as w, b as U, p as Q, z as P, q as Cn, a as gt, d as xe, m as Ee, g as vn, f as wn, j as kn, h as An, i as yt } from "../hooks-C41HAxM5.mjs";
|
|
13
13
|
import { L as te } from "../Loader-DUaFpDGv.mjs";
|
|
14
14
|
import h from "react";
|
|
15
|
-
import
|
|
15
|
+
import W from "@mui/material/Button";
|
|
16
16
|
import K from "@mui/material/Card";
|
|
17
17
|
import { L as ze } from "../LineChart-Ct9DNmhS.mjs";
|
|
18
18
|
import { C as bt } from "../ConnectionsDrawer-Cd_rztVC.mjs";
|
|
19
19
|
import { l as ne, g as ft, A as Be } from "../ConnectDrawer-FyY0AWYQ.mjs";
|
|
20
20
|
import re from "@mui/material/Tab";
|
|
21
21
|
import Ge from "@mui/material/Tabs";
|
|
22
|
-
import
|
|
22
|
+
import ke from "@mui/material/TextField";
|
|
23
23
|
import { u as He } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
24
24
|
import { D as Dn, f as Mn, a as In } from "../Dialog-BPTr3qHE.mjs";
|
|
25
25
|
import { u as xt } from "../useDimensions-27p2evRx.mjs";
|
|
@@ -33,7 +33,7 @@ import { g as wt } from "../AccountFields-CLbLAhLf.mjs";
|
|
|
33
33
|
import kt from "@mui/material/List";
|
|
34
34
|
import On from "@mui/material/ListItemButton";
|
|
35
35
|
import Fn from "@mui/material/ListSubheader";
|
|
36
|
-
import { f as
|
|
36
|
+
import { f as L } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
37
37
|
import { S as Je, F as Pn } from "../RecurringTransactions-CngsRZ3K.mjs";
|
|
38
38
|
import { Button as Rn } from "@mui/material";
|
|
39
39
|
import { S as Bn } from "../StatusBar-BK_uYHAB.mjs";
|
|
@@ -42,8 +42,8 @@ import { useVirtualizer as Ln } from "@tanstack/react-virtual";
|
|
|
42
42
|
import { u as $n, s as Le, h as At, S as Dt, b as Mt, Z as Wn } from "../TransactionDetails-CJvE4LNC.mjs";
|
|
43
43
|
import { A as En, W as zn } from "../WidgetContainer-GoNq8wwm.mjs";
|
|
44
44
|
import { T as ae } from "../TabContentContainer-j01JYR_7.mjs";
|
|
45
|
-
import { b as
|
|
46
|
-
import { E as
|
|
45
|
+
import { b as Y } from "../Localization-2MODESHW.mjs";
|
|
46
|
+
import { E as Ae } from "../EmptyState-DA_lfRBv.mjs";
|
|
47
47
|
import Gn from "@mui/material/useMediaQuery";
|
|
48
48
|
import { ChartsXAxis as Hn } from "@mui/x-charts/ChartsXAxis";
|
|
49
49
|
import { ChartsYAxis as Nn } from "@mui/x-charts/ChartsYAxis";
|
|
@@ -75,53 +75,53 @@ const yo = ({
|
|
|
75
75
|
dataIndex: r,
|
|
76
76
|
arcColor: n,
|
|
77
77
|
arcStartAngle: o,
|
|
78
|
-
totalAngularSpan:
|
|
79
|
-
centerX:
|
|
78
|
+
totalAngularSpan: c,
|
|
79
|
+
centerX: i,
|
|
80
80
|
centerY: a,
|
|
81
81
|
arcRadius: d,
|
|
82
|
-
innerArcRadius:
|
|
82
|
+
innerArcRadius: l,
|
|
83
83
|
outterArcRadius: p,
|
|
84
|
-
progressEndAngle:
|
|
84
|
+
progressEndAngle: u,
|
|
85
85
|
unitsPerSegment: m,
|
|
86
86
|
isFinacialStrengthGraph: g
|
|
87
87
|
}) => {
|
|
88
|
-
const
|
|
89
|
-
{ offset: "13.62%", color:
|
|
90
|
-
{ offset: "36.67%", color:
|
|
91
|
-
{ offset: "59.72%", color:
|
|
92
|
-
{ offset: "83.46%", color:
|
|
93
|
-
], [
|
|
88
|
+
const S = G(), C = [
|
|
89
|
+
{ offset: "13.62%", color: S.palette.chartMono.chartMono2 },
|
|
90
|
+
{ offset: "36.67%", color: S.palette.chartMono.chartMono3 },
|
|
91
|
+
{ offset: "59.72%", color: S.palette.chartMono.chartMono4 },
|
|
92
|
+
{ offset: "83.46%", color: S.palette.chartMono.chartMono5 }
|
|
93
|
+
], [b, v] = sn(
|
|
94
94
|
t,
|
|
95
|
-
|
|
95
|
+
c,
|
|
96
96
|
o,
|
|
97
97
|
r
|
|
98
|
-
), [y,
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
), [y, f] = cn(
|
|
99
|
+
b,
|
|
100
|
+
v,
|
|
101
101
|
r,
|
|
102
102
|
m,
|
|
103
|
-
|
|
104
|
-
), D = Qe.arc().innerRadius(
|
|
105
|
-
return /* @__PURE__ */
|
|
103
|
+
u
|
|
104
|
+
), D = Qe.arc().innerRadius(l).outerRadius(p).startAngle(b).endAngle(v).padAngle(0.02).cornerRadius(8), F = Qe.arc().innerRadius(l).outerRadius(p).startAngle(y).endAngle(f).padAngle(0.02).cornerRadius(8);
|
|
105
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
106
106
|
/* @__PURE__ */ e(
|
|
107
107
|
"path",
|
|
108
108
|
{
|
|
109
109
|
d: D({}),
|
|
110
|
-
fill: g ?
|
|
110
|
+
fill: g ? S.palette.divider : n
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
|
-
g && /* @__PURE__ */ e("path", { d:
|
|
113
|
+
g && /* @__PURE__ */ e("path", { d: F({}), fill: "url(#arcGradient)" }),
|
|
114
114
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
|
115
115
|
"linearGradient",
|
|
116
116
|
{
|
|
117
|
-
gradientTransform: `rotate(5, ${
|
|
117
|
+
gradientTransform: `rotate(5, ${i}, ${a})`,
|
|
118
118
|
gradientUnits: "userSpaceOnUse",
|
|
119
119
|
id: "arcGradient",
|
|
120
|
-
x1:
|
|
121
|
-
x2:
|
|
120
|
+
x1: i + d * 0.8 * Math.cos(Math.PI / 1.35),
|
|
121
|
+
x2: i - d * 0.8 * Math.cos(Math.PI / 1.35),
|
|
122
122
|
y1: a + d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
123
123
|
y2: a - d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
124
|
-
children:
|
|
124
|
+
children: C.map((H, O) => /* @__PURE__ */ e("stop", { offset: H.offset, stopColor: H.color }, O))
|
|
125
125
|
}
|
|
126
126
|
) })
|
|
127
127
|
] });
|
|
@@ -130,26 +130,26 @@ const yo = ({
|
|
|
130
130
|
healthScore: r,
|
|
131
131
|
size: n = "L",
|
|
132
132
|
dialScoreData: o,
|
|
133
|
-
minValue:
|
|
134
|
-
maxValue:
|
|
133
|
+
minValue: c = 0,
|
|
134
|
+
maxValue: i = 100,
|
|
135
135
|
markerColor: a,
|
|
136
136
|
healthScoreStatus: d,
|
|
137
|
-
footerCenterContent:
|
|
137
|
+
footerCenterContent: l,
|
|
138
138
|
footerLeftContent: p,
|
|
139
|
-
footerRightContent:
|
|
139
|
+
footerRightContent: u,
|
|
140
140
|
isFinacialStrengthGraph: m = !1
|
|
141
141
|
}) => {
|
|
142
|
-
const g =
|
|
142
|
+
const g = G(), S = -Math.PI / 1.35, C = Math.PI / 1.35, b = C - S, v = b / (i - c), y = (r - c) * v, f = S + y + 0.02, D = n !== "SM" ? 0.1 : 0.12, F = t, H = t * (1 - D), O = F * 2.5, N = O / 2, E = O / 2, ce = (H + F) / 2, j = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [oe, le] = ln(ce, f, j), de = r / 25, V = {
|
|
143
143
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
|
144
144
|
M: { markerSize: 10, healthScoreFontSize: 48 },
|
|
145
145
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
|
146
|
-
},
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
|
|
146
|
+
}, me = l === 0 ? Xt : Ut;
|
|
147
|
+
return /* @__PURE__ */ s(
|
|
148
|
+
_,
|
|
149
149
|
{
|
|
150
150
|
sx: {
|
|
151
|
-
width:
|
|
152
|
-
height:
|
|
151
|
+
width: O,
|
|
152
|
+
height: O,
|
|
153
153
|
position: "relative",
|
|
154
154
|
alignSelf: "center"
|
|
155
155
|
},
|
|
@@ -157,16 +157,16 @@ const yo = ({
|
|
|
157
157
|
/* @__PURE__ */ e(
|
|
158
158
|
Vt,
|
|
159
159
|
{
|
|
160
|
-
height:
|
|
160
|
+
height: O,
|
|
161
161
|
margin: { top: 0, right: 0, bottom: 0, left: 0 },
|
|
162
162
|
series: [
|
|
163
163
|
{
|
|
164
164
|
data: o,
|
|
165
|
-
innerRadius:
|
|
166
|
-
outerRadius:
|
|
167
|
-
startAngle: Math.round(Ue(
|
|
165
|
+
innerRadius: H,
|
|
166
|
+
outerRadius: F,
|
|
167
|
+
startAngle: Math.round(Ue(S)),
|
|
168
168
|
// Use Math.degrees to convert
|
|
169
|
-
endAngle: Math.round(Ue(
|
|
169
|
+
endAngle: Math.round(Ue(C))
|
|
170
170
|
// Use Math.degrees to convert
|
|
171
171
|
}
|
|
172
172
|
],
|
|
@@ -175,22 +175,22 @@ const yo = ({
|
|
|
175
175
|
legend: { hidden: !0 }
|
|
176
176
|
},
|
|
177
177
|
slots: {
|
|
178
|
-
pieArc: (
|
|
178
|
+
pieArc: (Se) => /* @__PURE__ */ e(
|
|
179
179
|
yo,
|
|
180
180
|
{
|
|
181
|
-
arcColor:
|
|
181
|
+
arcColor: Se.color,
|
|
182
182
|
arcRadius: t,
|
|
183
|
-
arcStartAngle:
|
|
184
|
-
centerX:
|
|
185
|
-
centerY:
|
|
186
|
-
dataIndex:
|
|
183
|
+
arcStartAngle: S,
|
|
184
|
+
centerX: N,
|
|
185
|
+
centerY: E,
|
|
186
|
+
dataIndex: Se.dataIndex,
|
|
187
187
|
dialScoreData: o,
|
|
188
|
-
innerArcRadius:
|
|
188
|
+
innerArcRadius: H,
|
|
189
189
|
isFinacialStrengthGraph: m,
|
|
190
|
-
outterArcRadius:
|
|
191
|
-
progressEndAngle:
|
|
192
|
-
totalAngularSpan:
|
|
193
|
-
unitsPerSegment:
|
|
190
|
+
outterArcRadius: F,
|
|
191
|
+
progressEndAngle: f,
|
|
192
|
+
totalAngularSpan: b,
|
|
193
|
+
unitsPerSegment: de
|
|
194
194
|
}
|
|
195
195
|
)
|
|
196
196
|
},
|
|
@@ -199,14 +199,14 @@ const yo = ({
|
|
|
199
199
|
stroke: "none"
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
width:
|
|
203
|
-
children: r >=
|
|
202
|
+
width: O,
|
|
203
|
+
children: r >= c && r <= i && /* @__PURE__ */ e(
|
|
204
204
|
"circle",
|
|
205
205
|
{
|
|
206
|
-
cx:
|
|
207
|
-
cy:
|
|
206
|
+
cx: N + oe,
|
|
207
|
+
cy: E + le,
|
|
208
208
|
fill: g.palette.common.white,
|
|
209
|
-
r:
|
|
209
|
+
r: V[n].markerSize,
|
|
210
210
|
stroke: m ? "url(#arcGradient)" : a,
|
|
211
211
|
strokeWidth: n !== "SM" ? 3 : 1
|
|
212
212
|
}
|
|
@@ -218,13 +218,13 @@ const yo = ({
|
|
|
218
218
|
{
|
|
219
219
|
sx: {
|
|
220
220
|
position: "absolute",
|
|
221
|
-
top: `${
|
|
222
|
-
left: `${
|
|
221
|
+
top: `${E}px`,
|
|
222
|
+
left: `${N}px`,
|
|
223
223
|
transform: "translate(-50%, -50%)",
|
|
224
224
|
textAlign: "center"
|
|
225
225
|
},
|
|
226
|
-
children: /* @__PURE__ */
|
|
227
|
-
|
|
226
|
+
children: /* @__PURE__ */ s(
|
|
227
|
+
_,
|
|
228
228
|
{
|
|
229
229
|
spacing: 1,
|
|
230
230
|
sx: { alignItems: "center", justifyContent: "center", gap: n !== "M" ? 10 : 3 },
|
|
@@ -233,7 +233,7 @@ const yo = ({
|
|
|
233
233
|
k,
|
|
234
234
|
{
|
|
235
235
|
sx: {
|
|
236
|
-
fontSize:
|
|
236
|
+
fontSize: V[n].healthScoreFontSize,
|
|
237
237
|
lineHeight: n !== "SM" ? "48px" : "100%"
|
|
238
238
|
},
|
|
239
239
|
variant: "H1",
|
|
@@ -246,30 +246,30 @@ const yo = ({
|
|
|
246
246
|
)
|
|
247
247
|
}
|
|
248
248
|
),
|
|
249
|
-
|
|
249
|
+
l !== void 0 && /* @__PURE__ */ e(
|
|
250
250
|
A,
|
|
251
251
|
{
|
|
252
252
|
sx: {
|
|
253
253
|
position: "absolute",
|
|
254
|
-
top: `${
|
|
255
|
-
left: `${
|
|
254
|
+
top: `${E * 2 * 0.83}px`,
|
|
255
|
+
left: `${N}px`,
|
|
256
256
|
transform: "translate(-50%, -50%)",
|
|
257
257
|
textAlign: "center"
|
|
258
258
|
},
|
|
259
|
-
children: typeof
|
|
260
|
-
|
|
259
|
+
children: typeof l == "number" ? /* @__PURE__ */ s(_, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
260
|
+
l > 0 ? /* @__PURE__ */ e(st, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(me, { size: 16, sx: { color: "text.secondary" } }),
|
|
261
261
|
/* @__PURE__ */ e(
|
|
262
262
|
k,
|
|
263
263
|
{
|
|
264
264
|
sx: {
|
|
265
265
|
fontWeight: 600,
|
|
266
|
-
color:
|
|
266
|
+
color: l > 0 ? "success.main" : "text.secondary"
|
|
267
267
|
},
|
|
268
268
|
variant: "body1",
|
|
269
|
-
children:
|
|
269
|
+
children: l
|
|
270
270
|
}
|
|
271
271
|
)
|
|
272
|
-
] }) : /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle2", children:
|
|
272
|
+
] }) : /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle2", children: l })
|
|
273
273
|
}
|
|
274
274
|
),
|
|
275
275
|
p !== void 0 && /* @__PURE__ */ e(
|
|
@@ -277,8 +277,8 @@ const yo = ({
|
|
|
277
277
|
{
|
|
278
278
|
sx: {
|
|
279
279
|
position: "absolute",
|
|
280
|
-
top: `${
|
|
281
|
-
left: `${
|
|
280
|
+
top: `${E * 2 * 0.83}px`,
|
|
281
|
+
left: `${N - N / 2}px`,
|
|
282
282
|
// shift left from center
|
|
283
283
|
transform: "translate(-50%, -50%)",
|
|
284
284
|
textAlign: "left"
|
|
@@ -286,36 +286,36 @@ const yo = ({
|
|
|
286
286
|
children: /* @__PURE__ */ e(k, { variant: "body1", children: p })
|
|
287
287
|
}
|
|
288
288
|
),
|
|
289
|
-
|
|
289
|
+
u !== void 0 && /* @__PURE__ */ e(
|
|
290
290
|
A,
|
|
291
291
|
{
|
|
292
292
|
sx: {
|
|
293
293
|
position: "absolute",
|
|
294
|
-
top: `${
|
|
295
|
-
left: `${
|
|
294
|
+
top: `${E * 2 * 0.83}px`,
|
|
295
|
+
left: `${N + N / 2}px`,
|
|
296
296
|
transform: "translate(-50%, -50%)",
|
|
297
297
|
textAlign: "right"
|
|
298
298
|
},
|
|
299
|
-
children: /* @__PURE__ */ e(k, { variant: "body1", children:
|
|
299
|
+
children: /* @__PURE__ */ e(k, { variant: "body1", children: u })
|
|
300
300
|
}
|
|
301
301
|
)
|
|
302
302
|
]
|
|
303
303
|
}
|
|
304
304
|
);
|
|
305
|
-
}, Pt =
|
|
305
|
+
}, Pt = x(
|
|
306
306
|
({ arcRadius: t, size: r = "L", healthScore: n, footerCenterContent: o }) => {
|
|
307
|
-
const
|
|
307
|
+
const c = [
|
|
308
308
|
{ id: 1, label: "Group A", value: 25 },
|
|
309
309
|
{ id: 2, label: "Group B", value: 25 },
|
|
310
310
|
{ id: 3, label: "Group C", value: 25 },
|
|
311
311
|
{ id: 4, label: "Group D", value: 25 }
|
|
312
|
-
], { finstrong:
|
|
312
|
+
], { finstrong: i } = w(), a = We(n, i);
|
|
313
313
|
return /* @__PURE__ */ e(
|
|
314
314
|
Ft,
|
|
315
315
|
{
|
|
316
316
|
arcRadius: t,
|
|
317
|
-
dialScoreData:
|
|
318
|
-
footerCenterContent: r === "L" ?
|
|
317
|
+
dialScoreData: c,
|
|
318
|
+
footerCenterContent: r === "L" ? i.footer_center_content_updated_just_now : o,
|
|
319
319
|
healthScore: n,
|
|
320
320
|
healthScoreStatus: a.status,
|
|
321
321
|
isFinacialStrengthGraph: !0,
|
|
@@ -323,48 +323,48 @@ const yo = ({
|
|
|
323
323
|
}
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
), bo =
|
|
326
|
+
), bo = x(
|
|
327
327
|
({
|
|
328
328
|
arcRadius: t,
|
|
329
329
|
size: r = "L",
|
|
330
330
|
healthScore: n,
|
|
331
331
|
maxValue: o = 850,
|
|
332
|
-
minValue:
|
|
333
|
-
footerCenterContent:
|
|
332
|
+
minValue: c = 300,
|
|
333
|
+
footerCenterContent: i
|
|
334
334
|
}) => {
|
|
335
|
-
const d =
|
|
335
|
+
const d = G().palette.mode === "dark", l = [
|
|
336
336
|
{
|
|
337
337
|
id: 1,
|
|
338
338
|
label: "Poor",
|
|
339
339
|
value: 29,
|
|
340
|
-
color: d ?
|
|
340
|
+
color: d ? ye.POOR : be.POOR
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
id: 2,
|
|
344
344
|
label: "Fair",
|
|
345
345
|
value: 25,
|
|
346
|
-
color: d ?
|
|
346
|
+
color: d ? ye.FAIR : be.FAIR
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
349
|
id: 3,
|
|
350
350
|
label: "Good",
|
|
351
351
|
value: 17,
|
|
352
|
-
color: d ?
|
|
352
|
+
color: d ? ye.GOOD : be.GOOD
|
|
353
353
|
},
|
|
354
354
|
{
|
|
355
355
|
id: 4,
|
|
356
356
|
label: "Very Good",
|
|
357
357
|
value: 17,
|
|
358
|
-
color: d ?
|
|
358
|
+
color: d ? ye.VERY_GOOD : be.VERY_GOOD
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
id: 5,
|
|
362
362
|
label: "Exceptional",
|
|
363
363
|
value: 12,
|
|
364
|
-
color: d ?
|
|
364
|
+
color: d ? ye.EXCEPTIONAL : be.EXCEPTIONAL
|
|
365
365
|
}
|
|
366
|
-
], { finstrong: p } =
|
|
367
|
-
if (!
|
|
366
|
+
], { finstrong: p } = w(), { isCopyLoaded: u } = U();
|
|
367
|
+
if (!u) return /* @__PURE__ */ e(te, {});
|
|
368
368
|
const { status: m, color: g = "none" } = ut(
|
|
369
369
|
n,
|
|
370
370
|
d,
|
|
@@ -374,31 +374,31 @@ const yo = ({
|
|
|
374
374
|
Ft,
|
|
375
375
|
{
|
|
376
376
|
arcRadius: t,
|
|
377
|
-
dialScoreData:
|
|
378
|
-
footerCenterContent:
|
|
379
|
-
footerLeftContent:
|
|
377
|
+
dialScoreData: l,
|
|
378
|
+
footerCenterContent: i,
|
|
379
|
+
footerLeftContent: c,
|
|
380
380
|
footerRightContent: o,
|
|
381
381
|
healthScore: n,
|
|
382
382
|
healthScoreStatus: m,
|
|
383
383
|
markerColor: g,
|
|
384
384
|
maxValue: o,
|
|
385
|
-
minValue:
|
|
385
|
+
minValue: c,
|
|
386
386
|
size: r
|
|
387
387
|
}
|
|
388
388
|
);
|
|
389
389
|
}
|
|
390
|
-
),
|
|
390
|
+
), Me = ({
|
|
391
391
|
drawerType: t,
|
|
392
392
|
isDashboard: r = !1,
|
|
393
393
|
hasIcon: n = !0,
|
|
394
394
|
buttonText: o,
|
|
395
|
-
title:
|
|
396
|
-
titleDrawer:
|
|
395
|
+
title: c,
|
|
396
|
+
titleDrawer: i,
|
|
397
397
|
description: a,
|
|
398
398
|
sx: d
|
|
399
399
|
}) => {
|
|
400
|
-
const [
|
|
401
|
-
return t ? /* @__PURE__ */
|
|
400
|
+
const [l, p] = h.useState(!1), { connect: u, finstrong: m } = w();
|
|
401
|
+
return t ? /* @__PURE__ */ s(
|
|
402
402
|
K,
|
|
403
403
|
{
|
|
404
404
|
sx: {
|
|
@@ -409,8 +409,8 @@ const yo = ({
|
|
|
409
409
|
...d
|
|
410
410
|
},
|
|
411
411
|
children: [
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
|
|
412
|
+
/* @__PURE__ */ s(
|
|
413
|
+
_,
|
|
414
414
|
{
|
|
415
415
|
sx: {
|
|
416
416
|
gap: 8,
|
|
@@ -418,7 +418,7 @@ const yo = ({
|
|
|
418
418
|
},
|
|
419
419
|
children: [
|
|
420
420
|
n && /* @__PURE__ */ e(ct, { sx: { height: 20, width: 20 } }),
|
|
421
|
-
/* @__PURE__ */ e(
|
|
421
|
+
/* @__PURE__ */ e(X, { className: "connect-more-accounts-title", sx: { ...r && { fontSize: 15 } }, children: c || m.connect_more_accounts_title })
|
|
422
422
|
]
|
|
423
423
|
}
|
|
424
424
|
),
|
|
@@ -432,29 +432,29 @@ const yo = ({
|
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
434
|
/* @__PURE__ */ e(
|
|
435
|
-
|
|
435
|
+
W,
|
|
436
436
|
{
|
|
437
437
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
438
438
|
onClick: () => p(!0),
|
|
439
439
|
size: "small",
|
|
440
440
|
sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
|
|
441
|
-
children: /* @__PURE__ */ e(
|
|
441
|
+
children: /* @__PURE__ */ e(T, { sx: { fontWeight: 600 }, variant: "body2", children: o || m.connect_more_accounts_button })
|
|
442
442
|
}
|
|
443
443
|
),
|
|
444
444
|
t === "connectDrawer" && /* @__PURE__ */ e(
|
|
445
445
|
ne,
|
|
446
446
|
{
|
|
447
447
|
onClose: () => p(!1),
|
|
448
|
-
showConnectWidget:
|
|
449
|
-
title:
|
|
448
|
+
showConnectWidget: l,
|
|
449
|
+
title: i || u.mini_title
|
|
450
450
|
}
|
|
451
451
|
),
|
|
452
452
|
t === "connectionsDrawer" && /* @__PURE__ */ e(
|
|
453
453
|
bt,
|
|
454
454
|
{
|
|
455
455
|
onClose: () => p(!1),
|
|
456
|
-
showConnectionsWidget:
|
|
457
|
-
title:
|
|
456
|
+
showConnectionsWidget: l,
|
|
457
|
+
title: i || u.mini_title
|
|
458
458
|
}
|
|
459
459
|
)
|
|
460
460
|
]
|
|
@@ -463,10 +463,10 @@ const yo = ({
|
|
|
463
463
|
};
|
|
464
464
|
var se = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(se || {});
|
|
465
465
|
const fo = ({ isOpen: t, onClose: r }) => {
|
|
466
|
-
const { common: n, finstrong: o } =
|
|
467
|
-
r(), setTimeout(() =>
|
|
466
|
+
const { common: n, finstrong: o } = w(), { isMobile: c } = He(), { updateUser: i, user: a } = Q(), [d, l] = h.useState(a.credit_score || 0), p = !isNaN(d), u = () => {
|
|
467
|
+
r(), setTimeout(() => l(a.credit_score || 0), 300);
|
|
468
468
|
}, m = () => {
|
|
469
|
-
!d || d === a.credit_score ||
|
|
469
|
+
!d || d === a.credit_score || i({ ...a, credit_score: d });
|
|
470
470
|
};
|
|
471
471
|
return /* @__PURE__ */ e(
|
|
472
472
|
Dn,
|
|
@@ -475,23 +475,23 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
475
475
|
disablePrimaryButton: !d || !p,
|
|
476
476
|
isOpen: t,
|
|
477
477
|
maxWidth: "xs",
|
|
478
|
-
onClose:
|
|
478
|
+
onClose: u,
|
|
479
479
|
onPrimaryAction: m,
|
|
480
480
|
primaryColor: "primary",
|
|
481
481
|
primaryText: n.save_button,
|
|
482
482
|
sx: {
|
|
483
483
|
"& .MuiDialog-paper": {
|
|
484
|
-
minWidth:
|
|
484
|
+
minWidth: c ? "100%" : 400
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
children: /* @__PURE__ */ e(
|
|
488
488
|
"form",
|
|
489
489
|
{
|
|
490
490
|
onSubmit: (g) => {
|
|
491
|
-
g.preventDefault(), m(),
|
|
491
|
+
g.preventDefault(), m(), u();
|
|
492
492
|
},
|
|
493
493
|
children: /* @__PURE__ */ e(
|
|
494
|
-
|
|
494
|
+
ke,
|
|
495
495
|
{
|
|
496
496
|
error: !p,
|
|
497
497
|
fullWidth: !0,
|
|
@@ -500,7 +500,7 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
500
500
|
noValidate: !0,
|
|
501
501
|
pattern: "[0-9]*"
|
|
502
502
|
},
|
|
503
|
-
onChange: (g) =>
|
|
503
|
+
onChange: (g) => l(Number(g.target.value)),
|
|
504
504
|
value: p ? d : ""
|
|
505
505
|
}
|
|
506
506
|
)
|
|
@@ -508,15 +508,15 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
508
508
|
)
|
|
509
509
|
}
|
|
510
510
|
);
|
|
511
|
-
}, Rt =
|
|
511
|
+
}, Rt = x(fo), Fe = {
|
|
512
512
|
credit_over_time_title: "Your Credit Over Time",
|
|
513
513
|
credit_over_time_zero_state_desc: "Add your credit score to start building a full picture of your credit health."
|
|
514
514
|
}, xo = ({ chartFor: t }) => {
|
|
515
|
-
const r =
|
|
515
|
+
const r = G(), n = r.palette.mode === "dark", { monthlySummaries: o } = P(), { user: c } = Q(), { finstrong: i } = w(), [a, { width: d }] = xt(), l = {
|
|
516
516
|
savingsOverTime: {
|
|
517
517
|
icon: /* @__PURE__ */ e(st, { size: 48, sx: { marginBottom: 8 } }),
|
|
518
|
-
title:
|
|
519
|
-
description:
|
|
518
|
+
title: i.key_indicators_save.zero_state_title,
|
|
519
|
+
description: i.key_indicators_save.zero_state_description
|
|
520
520
|
},
|
|
521
521
|
debtOverTime: {
|
|
522
522
|
icon: /* @__PURE__ */ e(lt, { size: 48, sx: { marginBottom: 8 } }),
|
|
@@ -528,35 +528,35 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
528
528
|
title: Fe.credit_over_time_title,
|
|
529
529
|
description: Fe.credit_over_time_zero_state_desc
|
|
530
530
|
}
|
|
531
|
-
}[t],
|
|
531
|
+
}[t], u = {
|
|
532
532
|
savingsOverTime: {
|
|
533
|
-
title:
|
|
533
|
+
title: i.key_indicators_save.savings_over_time,
|
|
534
534
|
valueKey: "available_cash"
|
|
535
535
|
},
|
|
536
536
|
debtOverTime: {
|
|
537
|
-
title:
|
|
537
|
+
title: i.key_indicators_borrow.have_manageable_debt_drawer.debt_over_time,
|
|
538
538
|
valueKey: "debt_balance"
|
|
539
539
|
},
|
|
540
540
|
creditOverTime: {
|
|
541
541
|
title: Fe.credit_over_time_title,
|
|
542
542
|
valueKey: "credit_score"
|
|
543
543
|
}
|
|
544
|
-
}[t], m = dn(o,
|
|
545
|
-
let
|
|
544
|
+
}[t], m = dn(o, u.valueKey), g = Math.max(...o.map((D) => D[u.valueKey])), S = () => g >= 1e6 ? { formatter: "0.000a", leftMargin: 55 } : g >= 1e3 ? { formatter: "0a", leftMargin: 35 } : { formatter: "0a", leftMargin: 30 }, { formatter: C, leftMargin: b } = S(), v = u.title, y = t === "creditOverTime";
|
|
545
|
+
let f;
|
|
546
546
|
if (y) {
|
|
547
547
|
const { color: D } = ut(
|
|
548
|
-
|
|
548
|
+
c?.credit_score ?? 0,
|
|
549
549
|
n,
|
|
550
|
-
|
|
550
|
+
i.credit_score_status
|
|
551
551
|
);
|
|
552
|
-
|
|
552
|
+
f = D;
|
|
553
553
|
}
|
|
554
|
-
return /* @__PURE__ */ e(K, { ref: a, sx: { backgroundColor: "background.paper" }, children: m.length >= 1 ? /* @__PURE__ */
|
|
555
|
-
/* @__PURE__ */ e(k, { sx: { pb: 8, pt: 16 }, variant: "h3", children:
|
|
554
|
+
return /* @__PURE__ */ e(K, { ref: a, sx: { backgroundColor: "background.paper" }, children: m.length >= 1 ? /* @__PURE__ */ s(_, { gap: 8, sx: { pl: 18 }, children: [
|
|
555
|
+
/* @__PURE__ */ e(k, { sx: { pb: 8, pt: 16 }, variant: "h3", children: v }),
|
|
556
556
|
/* @__PURE__ */ e(
|
|
557
557
|
ze,
|
|
558
558
|
{
|
|
559
|
-
areaColor:
|
|
559
|
+
areaColor: f,
|
|
560
560
|
axisColor: r.palette.divider,
|
|
561
561
|
baseline: "min",
|
|
562
562
|
chartFor: t,
|
|
@@ -566,8 +566,8 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
566
566
|
height: 244,
|
|
567
567
|
labelFontColor: y ? "text.primary" : "",
|
|
568
568
|
labelFontSize: y ? 13 : void 0,
|
|
569
|
-
labels: [
|
|
570
|
-
margin: { left:
|
|
569
|
+
labels: [i.key_indicators_label],
|
|
570
|
+
margin: { left: b, top: y ? 25 : 15, right: 20 },
|
|
571
571
|
markStyles: (D) => y ? {
|
|
572
572
|
markLabelStyles: {
|
|
573
573
|
marginLeft: 16,
|
|
@@ -585,20 +585,20 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
585
585
|
showYAxis: y,
|
|
586
586
|
showYAxisTicks: y,
|
|
587
587
|
useCustomMark: !0,
|
|
588
|
-
valueFormatterString: y ? void 0 :
|
|
588
|
+
valueFormatterString: y ? void 0 : C,
|
|
589
589
|
width: d < 342 ? d - 48 : 342
|
|
590
590
|
}
|
|
591
591
|
)
|
|
592
|
-
] }) : /* @__PURE__ */
|
|
593
|
-
|
|
594
|
-
/* @__PURE__ */ e(k, { fontWeight: 600, variant: "body1", children:
|
|
595
|
-
/* @__PURE__ */ e(k, { align: "center", variant: "subtitle1", children:
|
|
592
|
+
] }) : /* @__PURE__ */ s(_, { gap: 8, sx: { alignItems: "center", p: 24, pb: 48 }, children: [
|
|
593
|
+
l.icon,
|
|
594
|
+
/* @__PURE__ */ e(k, { fontWeight: 600, variant: "body1", children: l.title }),
|
|
595
|
+
/* @__PURE__ */ e(k, { align: "center", variant: "subtitle1", children: l.description })
|
|
596
596
|
] }) });
|
|
597
|
-
}, Ke =
|
|
597
|
+
}, Ke = x(xo), So = {
|
|
598
598
|
updated_score: "Updated Score"
|
|
599
599
|
}, Co = () => {
|
|
600
|
-
const { healthScoreChange: t } =
|
|
601
|
-
return /* @__PURE__ */
|
|
600
|
+
const { healthScoreChange: t } = P(), { user: r } = Q(), { availableWidth: n } = Cn(), { isSmallMobile: o } = He(n), [c, i] = h.useState(!1);
|
|
601
|
+
return /* @__PURE__ */ s(_, { sx: { gap: 28 }, children: [
|
|
602
602
|
/* @__PURE__ */ e(
|
|
603
603
|
bo,
|
|
604
604
|
{
|
|
@@ -608,12 +608,12 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
608
608
|
size: o ? "M" : "L"
|
|
609
609
|
}
|
|
610
610
|
),
|
|
611
|
-
/* @__PURE__ */ e(
|
|
612
|
-
/* @__PURE__ */ e(Rt, { isOpen:
|
|
611
|
+
/* @__PURE__ */ e(W, { onClick: () => i(!0), variant: "contained", children: So.updated_score }),
|
|
612
|
+
/* @__PURE__ */ e(Rt, { isOpen: c, onClose: () => i(!1) }),
|
|
613
613
|
/* @__PURE__ */ e(Ke, { chartFor: "creditOverTime" })
|
|
614
614
|
] });
|
|
615
|
-
}, vo =
|
|
616
|
-
const { finstrong: r } =
|
|
615
|
+
}, vo = x(Co), Ie = ({ status: t }) => {
|
|
616
|
+
const { finstrong: r } = w(), n = pn(un[t]), o = {
|
|
617
617
|
GOOD: r.key_indicators_good,
|
|
618
618
|
FAIR: r.key_indicators_fair,
|
|
619
619
|
OFF_TRACK: r.key_indicators_off_track,
|
|
@@ -644,28 +644,28 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
644
644
|
keep_strong_credit_score: "Keep a Strong Credit Score"
|
|
645
645
|
}, ko = () => {
|
|
646
646
|
const { user: t } = Q(), r = _t(t.credit_score ?? null);
|
|
647
|
-
return /* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */ e(
|
|
649
|
-
/* @__PURE__ */ e(
|
|
647
|
+
return /* @__PURE__ */ s(_, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
648
|
+
/* @__PURE__ */ e(X, { children: wo.keep_strong_credit_score }),
|
|
649
|
+
/* @__PURE__ */ e(Ie, { status: r })
|
|
650
650
|
] });
|
|
651
|
-
}, Ao =
|
|
651
|
+
}, Ao = x(ko), Do = ({
|
|
652
652
|
additionalContent: t,
|
|
653
653
|
connectTitle: r,
|
|
654
654
|
connectDescription: n,
|
|
655
655
|
children: o,
|
|
656
|
-
description:
|
|
657
|
-
drawerTitle:
|
|
656
|
+
description: c,
|
|
657
|
+
drawerTitle: i,
|
|
658
658
|
isOpen: a,
|
|
659
659
|
loadConnectAccountsCard: d = !0,
|
|
660
|
-
onClose:
|
|
660
|
+
onClose: l,
|
|
661
661
|
stickyComponent: p,
|
|
662
|
-
title:
|
|
662
|
+
title: u,
|
|
663
663
|
drawerType: m
|
|
664
664
|
}) => {
|
|
665
|
-
const { finstrong: g } =
|
|
666
|
-
return
|
|
667
|
-
(
|
|
668
|
-
|
|
665
|
+
const { finstrong: g } = w(), { isCopyLoaded: S } = U();
|
|
666
|
+
return S ? /* @__PURE__ */ s(ie, { isOpen: a, onClose: l, title: i || g.key_indicators, children: [
|
|
667
|
+
(u || c) && /* @__PURE__ */ s(
|
|
668
|
+
_,
|
|
669
669
|
{
|
|
670
670
|
sx: {
|
|
671
671
|
backgroundColor: "background.paper",
|
|
@@ -673,8 +673,8 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
673
673
|
p: 24
|
|
674
674
|
},
|
|
675
675
|
children: [
|
|
676
|
-
|
|
677
|
-
|
|
676
|
+
u && typeof u == "string" ? /* @__PURE__ */ e(X, { children: u }) : u,
|
|
677
|
+
c && /* @__PURE__ */ e(k, { children: c })
|
|
678
678
|
]
|
|
679
679
|
}
|
|
680
680
|
),
|
|
@@ -690,10 +690,10 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
690
690
|
}
|
|
691
691
|
),
|
|
692
692
|
t && /* @__PURE__ */ e(A, { children: t }),
|
|
693
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ s(_, { sx: { p: 24, gap: 24 }, children: [
|
|
694
694
|
o,
|
|
695
695
|
d && /* @__PURE__ */ e(
|
|
696
|
-
|
|
696
|
+
Me,
|
|
697
697
|
{
|
|
698
698
|
description: n,
|
|
699
699
|
drawerType: m,
|
|
@@ -704,128 +704,128 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
704
704
|
)
|
|
705
705
|
] })
|
|
706
706
|
] }) : /* @__PURE__ */ e(te, {});
|
|
707
|
-
}, Bt =
|
|
707
|
+
}, Bt = x(Do), Mo = ({
|
|
708
708
|
onClick: t,
|
|
709
709
|
shouldShowBalance: r = !0,
|
|
710
710
|
loadAccounts: n
|
|
711
711
|
}) => {
|
|
712
|
-
const { config: o } = gt(), { accounts:
|
|
713
|
-
(
|
|
714
|
-
t?.(
|
|
712
|
+
const { config: o } = gt(), { accounts: c } = w(), { selectedAccounts: i } = U(), a = h.useCallback(
|
|
713
|
+
(l) => {
|
|
714
|
+
t?.(l);
|
|
715
715
|
},
|
|
716
716
|
[t]
|
|
717
717
|
), d = h.useMemo(
|
|
718
|
-
() => Array.from(new Set(
|
|
719
|
-
(
|
|
718
|
+
() => Array.from(new Set(i.map((l) => l.account_type))).filter(
|
|
719
|
+
(l) => n ? n.includes(l) : !0
|
|
720
720
|
),
|
|
721
|
-
[
|
|
721
|
+
[i, n]
|
|
722
722
|
);
|
|
723
|
-
return
|
|
724
|
-
const { accountsForType: p, totalBalanceForType:
|
|
725
|
-
(m, g) => (g.account_type ===
|
|
723
|
+
return i.length ? /* @__PURE__ */ e(h.Fragment, { children: d.map((l) => {
|
|
724
|
+
const { accountsForType: p, totalBalanceForType: u } = i.reduce(
|
|
725
|
+
(m, g) => (g.account_type === l && (m.accountsForType.push(g), m.totalBalanceForType += g.balance || 0), m),
|
|
726
726
|
{ accountsForType: [], totalBalanceForType: 0 }
|
|
727
727
|
);
|
|
728
|
-
return /* @__PURE__ */
|
|
728
|
+
return /* @__PURE__ */ s(
|
|
729
729
|
kt,
|
|
730
730
|
{
|
|
731
|
-
subheader: /* @__PURE__ */ e(Fn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */ e(
|
|
733
|
-
r && /* @__PURE__ */ e(
|
|
731
|
+
subheader: /* @__PURE__ */ e(Fn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ s(_, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
732
|
+
/* @__PURE__ */ e(T, { bold: !0, variant: "caption", children: c.account_types[l] }),
|
|
733
|
+
r && /* @__PURE__ */ e(T, { bold: !0, variant: "caption", children: L(u, "0,0.00") })
|
|
734
734
|
] }) }),
|
|
735
735
|
sx: { bgcolor: "background.paper" },
|
|
736
736
|
children: [
|
|
737
737
|
p.map((m, g) => {
|
|
738
|
-
const { firstValue:
|
|
738
|
+
const { firstValue: S } = wt(m, c), C = ft(m, {
|
|
739
739
|
allowNickname: o?.show_account_nicknames_in_master
|
|
740
|
-
}),
|
|
740
|
+
}), b = /* @__PURE__ */ s(z, { children: [
|
|
741
741
|
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(pt, { alt: "MX", institutionGuid: m.institution_guid ?? "" }) }),
|
|
742
742
|
/* @__PURE__ */ e(
|
|
743
743
|
vt,
|
|
744
744
|
{
|
|
745
|
-
primary: `${
|
|
745
|
+
primary: `${C}${m.account_number ? ` *${m.account_number}` : ""}`,
|
|
746
746
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
747
747
|
}
|
|
748
748
|
),
|
|
749
|
-
r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children:
|
|
749
|
+
r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: L(S ?? 0, "0,0.00") })
|
|
750
750
|
] });
|
|
751
|
-
return /* @__PURE__ */
|
|
752
|
-
/* @__PURE__ */ e(St, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(On, { onClick: () => a(m), children:
|
|
751
|
+
return /* @__PURE__ */ s(h.Fragment, { children: [
|
|
752
|
+
/* @__PURE__ */ e(St, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(On, { onClick: () => a(m), children: b }) : b }),
|
|
753
753
|
g !== p.length - 1 && /* @__PURE__ */ e(ee, { variant: "inset" })
|
|
754
754
|
] }, m.guid);
|
|
755
755
|
}),
|
|
756
756
|
/* @__PURE__ */ e(ee, {})
|
|
757
757
|
]
|
|
758
758
|
},
|
|
759
|
-
|
|
759
|
+
l
|
|
760
760
|
);
|
|
761
761
|
}) }) : null;
|
|
762
|
-
}, Lt =
|
|
763
|
-
const n =
|
|
762
|
+
}, Lt = x(Mo), Io = ({ loadAccounts: t, loadMoreLabel: r }) => {
|
|
763
|
+
const n = G(), { config: o } = gt(), { connect: c, finstrong: i } = w(), { accounts: a } = w(), { selectedAccounts: d } = U(), [l, p] = h.useState(!1), [u, m] = h.useState(!1), g = h.useMemo(
|
|
764
764
|
() => d.filter(
|
|
765
|
-
(
|
|
765
|
+
(b) => t ? t.includes(b.account_type) : !0
|
|
766
766
|
),
|
|
767
767
|
[d, t]
|
|
768
|
-
),
|
|
769
|
-
const { firstValue:
|
|
770
|
-
return
|
|
768
|
+
), S = h.useMemo(() => g.slice(0, 3), [g]), C = (b) => {
|
|
769
|
+
const { firstValue: v } = wt(b, a);
|
|
770
|
+
return v;
|
|
771
771
|
};
|
|
772
|
-
return g.length >= 1 ? /* @__PURE__ */
|
|
773
|
-
/* @__PURE__ */ e(A, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children:
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(pt, { alt: "MX", institutionGuid:
|
|
772
|
+
return g.length >= 1 ? /* @__PURE__ */ s(z, { children: [
|
|
773
|
+
/* @__PURE__ */ e(A, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: S.map((b, v) => /* @__PURE__ */ s(h.Fragment, { children: [
|
|
774
|
+
/* @__PURE__ */ s(St, { sx: { px: 24 }, children: [
|
|
775
|
+
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(pt, { alt: "MX", institutionGuid: b.institution_guid ?? "" }) }),
|
|
776
776
|
/* @__PURE__ */ e(
|
|
777
777
|
vt,
|
|
778
778
|
{
|
|
779
|
-
primary: `${ft(
|
|
779
|
+
primary: `${ft(b, {
|
|
780
780
|
allowNickname: o?.show_account_nicknames_in_master
|
|
781
781
|
})}
|
|
782
|
-
${
|
|
782
|
+
${b.account_number ? ` *${b.account_number}` : ""}`,
|
|
783
783
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
784
784
|
}
|
|
785
785
|
),
|
|
786
|
-
/* @__PURE__ */ e(k, { bold: !0, variant: "body2", children:
|
|
786
|
+
/* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: L(C(b), "0,0.00") })
|
|
787
787
|
] }),
|
|
788
|
-
|
|
789
|
-
] },
|
|
790
|
-
g.length > 3 && /* @__PURE__ */
|
|
788
|
+
v < S.length - 1 && /* @__PURE__ */ e(ee, { variant: "inset" })
|
|
789
|
+
] }, b.guid)) }),
|
|
790
|
+
g.length > 3 && /* @__PURE__ */ s(z, { children: [
|
|
791
791
|
/* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
792
|
-
|
|
792
|
+
W,
|
|
793
793
|
{
|
|
794
794
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
795
795
|
onClick: () => p(!0),
|
|
796
796
|
size: "small",
|
|
797
797
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
798
|
-
children: /* @__PURE__ */
|
|
798
|
+
children: /* @__PURE__ */ s(T, { bold: !0, variant: "body1", children: [
|
|
799
799
|
g.length - 3,
|
|
800
800
|
" ",
|
|
801
801
|
r
|
|
802
802
|
] })
|
|
803
803
|
}
|
|
804
804
|
) }),
|
|
805
|
-
/* @__PURE__ */ e(ie, { isOpen:
|
|
805
|
+
/* @__PURE__ */ e(ie, { isOpen: l, onClose: () => p(!1), title: i.accounts, children: /* @__PURE__ */ e(Lt, { loadAccounts: t }) })
|
|
806
806
|
] })
|
|
807
|
-
] }) : /* @__PURE__ */
|
|
807
|
+
] }) : /* @__PURE__ */ s(z, { children: [
|
|
808
808
|
/* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
809
|
-
|
|
809
|
+
W,
|
|
810
810
|
{
|
|
811
811
|
onClick: () => m(!0),
|
|
812
812
|
size: "small",
|
|
813
813
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
814
814
|
variant: "contained",
|
|
815
|
-
children: /* @__PURE__ */ e(
|
|
815
|
+
children: /* @__PURE__ */ e(T, { bold: !0, variant: "body1", children: i.connect_more_accounts_button })
|
|
816
816
|
}
|
|
817
817
|
) }),
|
|
818
818
|
/* @__PURE__ */ e(
|
|
819
819
|
ne,
|
|
820
820
|
{
|
|
821
821
|
onClose: () => m(!1),
|
|
822
|
-
showConnectWidget:
|
|
823
|
-
title:
|
|
822
|
+
showConnectWidget: u,
|
|
823
|
+
title: c.mini_title
|
|
824
824
|
}
|
|
825
825
|
)
|
|
826
826
|
] });
|
|
827
|
-
}, $t =
|
|
828
|
-
|
|
827
|
+
}, $t = x(Io), he = ({ balance: t, title: r, sx: n }) => /* @__PURE__ */ s(
|
|
828
|
+
_,
|
|
829
829
|
{
|
|
830
830
|
sx: {
|
|
831
831
|
alignItems: "center",
|
|
@@ -837,13 +837,13 @@ const fo = ({ isOpen: t, onClose: r }) => {
|
|
|
837
837
|
...n
|
|
838
838
|
},
|
|
839
839
|
children: [
|
|
840
|
-
typeof t == "number" ? /* @__PURE__ */ e(k, { variant: "h2", children:
|
|
840
|
+
typeof t == "number" ? /* @__PURE__ */ e(k, { variant: "h2", children: L(t, "0,0.00") }) : t,
|
|
841
841
|
/* @__PURE__ */ e(k, { color: "text.secondary", fontWeight: "400", variant: "subtitle2", children: r })
|
|
842
842
|
]
|
|
843
843
|
}
|
|
844
844
|
);
|
|
845
|
-
var
|
|
846
|
-
const
|
|
845
|
+
var I = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(I || {}), fe = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(fe || {}), q = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(q || {});
|
|
846
|
+
const B = {
|
|
847
847
|
bi_weekly: "Bi-Weekly",
|
|
848
848
|
calculate: "Calculate",
|
|
849
849
|
daily: "Daily",
|
|
@@ -863,97 +863,97 @@ const R = {
|
|
|
863
863
|
weekly: "Weekly",
|
|
864
864
|
years: "Years"
|
|
865
865
|
}, To = [
|
|
866
|
-
{ id: q.Monthly, label:
|
|
867
|
-
{ id: q.BiWeekly, label:
|
|
868
|
-
{ id: q.Weekly, label:
|
|
869
|
-
{ id: q.Daily, label:
|
|
866
|
+
{ id: q.Monthly, label: B.monthly },
|
|
867
|
+
{ id: q.BiWeekly, label: B.bi_weekly },
|
|
868
|
+
{ id: q.Weekly, label: B.weekly },
|
|
869
|
+
{ id: q.Daily, label: B.daily }
|
|
870
870
|
], Oo = {
|
|
871
|
-
[q.Monthly]:
|
|
872
|
-
[q.BiWeekly]:
|
|
873
|
-
[q.Weekly]:
|
|
874
|
-
[q.Daily]:
|
|
871
|
+
[q.Monthly]: B.estimated_period_monthly,
|
|
872
|
+
[q.BiWeekly]: B.estimated_period_bi_weekly,
|
|
873
|
+
[q.Weekly]: B.estimated_period_weekly,
|
|
874
|
+
[q.Daily]: B.estimated_period_daily
|
|
875
875
|
}, Fo = [
|
|
876
|
-
{ id:
|
|
877
|
-
{ id:
|
|
878
|
-
{ id:
|
|
876
|
+
{ id: fe.Months, label: B.months },
|
|
877
|
+
{ id: fe.Years, label: B.years },
|
|
878
|
+
{ id: fe.Days, label: B.days }
|
|
879
879
|
], Po = ({ total: t }) => {
|
|
880
|
-
const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = h.useState(0), [
|
|
880
|
+
const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = h.useState(0), [c, i] = h.useState(qe(t)), [a, d] = h.useState(
|
|
881
881
|
qe(t)
|
|
882
|
-
), [
|
|
882
|
+
), [l, p] = h.useState(r), [u, m] = h.useState(_n(t)), [g, S] = h.useState(fe.Months);
|
|
883
883
|
h.useEffect(() => {
|
|
884
884
|
o(
|
|
885
885
|
Ze({
|
|
886
886
|
contribution: a,
|
|
887
|
-
goalAmount:
|
|
888
|
-
goalPeriod:
|
|
887
|
+
goalAmount: l,
|
|
888
|
+
goalPeriod: u,
|
|
889
889
|
targetPeriod: g,
|
|
890
890
|
totalSaved: t
|
|
891
891
|
})
|
|
892
|
-
),
|
|
892
|
+
), i(a);
|
|
893
893
|
}, []);
|
|
894
|
-
const
|
|
895
|
-
|
|
894
|
+
const C = (b) => {
|
|
895
|
+
b.preventDefault(), o(
|
|
896
896
|
Ze({
|
|
897
897
|
contribution: a,
|
|
898
|
-
goalAmount:
|
|
899
|
-
goalPeriod:
|
|
898
|
+
goalAmount: l,
|
|
899
|
+
goalPeriod: u,
|
|
900
900
|
targetPeriod: g,
|
|
901
901
|
totalSaved: t
|
|
902
902
|
})
|
|
903
|
-
),
|
|
903
|
+
), i(a);
|
|
904
904
|
};
|
|
905
|
-
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("form", { onSubmit:
|
|
905
|
+
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("form", { onSubmit: C, children: /* @__PURE__ */ s(_, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
|
|
906
906
|
/* @__PURE__ */ e(
|
|
907
|
-
|
|
907
|
+
he,
|
|
908
908
|
{
|
|
909
|
-
balance: /* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */ e(
|
|
911
|
-
/* @__PURE__ */
|
|
909
|
+
balance: /* @__PURE__ */ s(_, { sx: { flexDirection: "row", height: 32 }, children: [
|
|
910
|
+
/* @__PURE__ */ e(T, { variant: "h2", children: L(n, "0,0") }),
|
|
911
|
+
/* @__PURE__ */ s(T, { sx: { alignSelf: "end", height: 24 }, variant: "subtitle2", children: [
|
|
912
912
|
"/",
|
|
913
|
-
Oo[
|
|
913
|
+
Oo[c]
|
|
914
914
|
] })
|
|
915
915
|
] }),
|
|
916
|
-
title:
|
|
916
|
+
title: B.estimated_contribution
|
|
917
917
|
}
|
|
918
918
|
),
|
|
919
919
|
/* @__PURE__ */ e(
|
|
920
|
-
|
|
920
|
+
ke,
|
|
921
921
|
{
|
|
922
|
-
"aria-label":
|
|
923
|
-
helperText:
|
|
922
|
+
"aria-label": B.savings_goal,
|
|
923
|
+
helperText: B.suggested_goal,
|
|
924
924
|
inputProps: {
|
|
925
925
|
noValidate: !0,
|
|
926
926
|
pattern: "[0-9]*"
|
|
927
927
|
},
|
|
928
|
-
label:
|
|
929
|
-
onChange: (
|
|
930
|
-
|
|
928
|
+
label: B.savings_goal,
|
|
929
|
+
onChange: (b) => {
|
|
930
|
+
b.target.value && p(Number(b.target.value.replace(/[^0-9]/g, "")));
|
|
931
931
|
},
|
|
932
|
-
value:
|
|
932
|
+
value: l ? L(l, "0,0") : ""
|
|
933
933
|
}
|
|
934
934
|
),
|
|
935
935
|
/* @__PURE__ */ e(
|
|
936
936
|
Je,
|
|
937
937
|
{
|
|
938
|
-
label:
|
|
938
|
+
label: B.how_often_contribute,
|
|
939
939
|
onChange: d,
|
|
940
940
|
options: To,
|
|
941
941
|
required: !0,
|
|
942
942
|
value: a
|
|
943
943
|
}
|
|
944
944
|
),
|
|
945
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ s(_, { sx: { flexDirection: "row" }, children: [
|
|
946
946
|
/* @__PURE__ */ e(
|
|
947
|
-
|
|
947
|
+
ke,
|
|
948
948
|
{
|
|
949
|
-
"aria-label":
|
|
949
|
+
"aria-label": B.meet_your_goal_within,
|
|
950
950
|
fullWidth: !0,
|
|
951
951
|
inputProps: {
|
|
952
952
|
noValidate: !0,
|
|
953
953
|
pattern: "[0-9]*"
|
|
954
954
|
},
|
|
955
|
-
label:
|
|
956
|
-
onChange: (
|
|
955
|
+
label: B.meet_your_goal_within,
|
|
956
|
+
onChange: (b) => m(Number(b.target.value)),
|
|
957
957
|
sx: {
|
|
958
958
|
"& .MuiInputBase-root": {
|
|
959
959
|
borderBottomRightRadius: 0,
|
|
@@ -963,7 +963,7 @@ const R = {
|
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
},
|
|
966
|
-
value:
|
|
966
|
+
value: u
|
|
967
967
|
}
|
|
968
968
|
),
|
|
969
969
|
/* @__PURE__ */ e(
|
|
@@ -978,25 +978,25 @@ const R = {
|
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
980
|
},
|
|
981
|
-
children: /* @__PURE__ */ e(Je, { label: "", onChange:
|
|
981
|
+
children: /* @__PURE__ */ e(Je, { label: "", onChange: S, options: Fo, value: g })
|
|
982
982
|
}
|
|
983
983
|
)
|
|
984
984
|
] }),
|
|
985
|
-
/* @__PURE__ */ e(
|
|
985
|
+
/* @__PURE__ */ e(W, { fullWidth: !0, onClick: C, type: "submit", variant: "contained", children: B.calculate })
|
|
986
986
|
] }) }) });
|
|
987
|
-
}, Ro =
|
|
987
|
+
}, Ro = x(Po), ve = {
|
|
988
988
|
connect_accounts: "Connect Accounts",
|
|
989
989
|
more_accounts: "More Accounts",
|
|
990
990
|
your_savings: "Your Savings"
|
|
991
991
|
}, Bo = () => {
|
|
992
|
-
const { savingsAccounts: t } =
|
|
993
|
-
() => t.reduce((
|
|
992
|
+
const { savingsAccounts: t } = xe(), [r, n] = h.useState(!1), o = h.useMemo(
|
|
993
|
+
() => t.reduce((c, i) => c + (i.balance ?? 0), 0),
|
|
994
994
|
[t]
|
|
995
995
|
);
|
|
996
|
-
return /* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */ e(K, { sx: { bgcolor: "background.paper", p: 16 }, children: /* @__PURE__ */
|
|
998
|
-
/* @__PURE__ */ e(
|
|
999
|
-
t.length ? /* @__PURE__ */ e($t, { loadAccounts: [Be.SAVINGS], loadMoreLabel:
|
|
996
|
+
return /* @__PURE__ */ s(_, { sx: { gap: 24 }, children: [
|
|
997
|
+
/* @__PURE__ */ e(K, { sx: { bgcolor: "background.paper", p: 16 }, children: /* @__PURE__ */ s(_, { sx: { gap: 16 }, children: [
|
|
998
|
+
/* @__PURE__ */ e(he, { balance: o, title: ve.your_savings }),
|
|
999
|
+
t.length ? /* @__PURE__ */ e($t, { loadAccounts: [Be.SAVINGS], loadMoreLabel: ve.connect_accounts }) : /* @__PURE__ */ e(Rn, { onClick: () => n(!0), variant: "contained", children: ve.connect_accounts })
|
|
1000
1000
|
] }) }),
|
|
1001
1001
|
/* @__PURE__ */ e(Ro, { total: o }),
|
|
1002
1002
|
/* @__PURE__ */ e(
|
|
@@ -1004,46 +1004,46 @@ const R = {
|
|
|
1004
1004
|
{
|
|
1005
1005
|
onClose: () => n(!1),
|
|
1006
1006
|
showConnectWidget: r,
|
|
1007
|
-
title:
|
|
1007
|
+
title: ve.connect_accounts
|
|
1008
1008
|
}
|
|
1009
1009
|
)
|
|
1010
1010
|
] });
|
|
1011
|
-
}, Lo =
|
|
1012
|
-
({ label: t, value: r, status: n, bottomComponent: o, statusBarData:
|
|
1013
|
-
const { finstrong:
|
|
1011
|
+
}, Lo = x(Bo), Te = x(
|
|
1012
|
+
({ label: t, value: r, status: n, bottomComponent: o, statusBarData: c = [] }) => {
|
|
1013
|
+
const { finstrong: i } = w(), a = {
|
|
1014
1014
|
GOOD: {
|
|
1015
1015
|
backgroundColor: "success.lighter",
|
|
1016
1016
|
color: "success.main",
|
|
1017
1017
|
progressBarColor: "primary.main",
|
|
1018
|
-
label:
|
|
1018
|
+
label: i?.key_indicators_good
|
|
1019
1019
|
},
|
|
1020
1020
|
FAIR: {
|
|
1021
1021
|
backgroundColor: "warning.lighter",
|
|
1022
1022
|
color: "warning.main",
|
|
1023
1023
|
progressBarColor: "warning.main",
|
|
1024
|
-
label:
|
|
1024
|
+
label: i?.key_indicators_fair
|
|
1025
1025
|
},
|
|
1026
1026
|
OFF_TRACK: {
|
|
1027
1027
|
backgroundColor: "error.lighter",
|
|
1028
1028
|
color: "error.main",
|
|
1029
1029
|
progressBarColor: "error.main",
|
|
1030
|
-
label:
|
|
1030
|
+
label: i?.key_indicators_off_track
|
|
1031
1031
|
},
|
|
1032
1032
|
MISSING: {
|
|
1033
1033
|
backgroundColor: "divider",
|
|
1034
1034
|
color: "text.secondary",
|
|
1035
1035
|
progressBarColor: "text.secondary",
|
|
1036
|
-
label:
|
|
1036
|
+
label: i?.key_indicators_missing
|
|
1037
1037
|
}
|
|
1038
|
-
}[n], d =
|
|
1039
|
-
color: p === 0 ? "primary.main" :
|
|
1040
|
-
percentage:
|
|
1038
|
+
}[n], d = c.map((l, p) => c.length === 2 ? {
|
|
1039
|
+
color: p === 0 ? "primary.main" : l.color || a?.progressBarColor,
|
|
1040
|
+
percentage: l.percentage
|
|
1041
1041
|
} : {
|
|
1042
|
-
color:
|
|
1043
|
-
percentage:
|
|
1042
|
+
color: l.color || a?.progressBarColor,
|
|
1043
|
+
percentage: l.percentage
|
|
1044
1044
|
});
|
|
1045
|
-
return /* @__PURE__ */
|
|
1046
|
-
|
|
1045
|
+
return /* @__PURE__ */ s(
|
|
1046
|
+
_,
|
|
1047
1047
|
{
|
|
1048
1048
|
sx: {
|
|
1049
1049
|
backgroundColor: "background.paper",
|
|
@@ -1054,10 +1054,10 @@ const R = {
|
|
|
1054
1054
|
borderColor: "divider"
|
|
1055
1055
|
},
|
|
1056
1056
|
children: [
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */ e(
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
|
|
1057
|
+
/* @__PURE__ */ s(_, { sx: { gap: 2 }, children: [
|
|
1058
|
+
/* @__PURE__ */ e(T, { variant: "body2", children: t }),
|
|
1059
|
+
/* @__PURE__ */ s(
|
|
1060
|
+
_,
|
|
1061
1061
|
{
|
|
1062
1062
|
sx: {
|
|
1063
1063
|
alignItems: "center",
|
|
@@ -1066,13 +1066,13 @@ const R = {
|
|
|
1066
1066
|
justifyContent: "space-between"
|
|
1067
1067
|
},
|
|
1068
1068
|
children: [
|
|
1069
|
-
/* @__PURE__ */ e(
|
|
1070
|
-
/* @__PURE__ */ e(
|
|
1069
|
+
/* @__PURE__ */ e(De, { children: r }),
|
|
1070
|
+
/* @__PURE__ */ e(Ie, { status: n })
|
|
1071
1071
|
]
|
|
1072
1072
|
}
|
|
1073
1073
|
)
|
|
1074
1074
|
] }),
|
|
1075
|
-
/* @__PURE__ */
|
|
1075
|
+
/* @__PURE__ */ s(_, { children: [
|
|
1076
1076
|
/* @__PURE__ */ e(Bn, { data: d, height: 16 }),
|
|
1077
1077
|
o
|
|
1078
1078
|
] })
|
|
@@ -1083,11 +1083,11 @@ const R = {
|
|
|
1083
1083
|
), $o = {
|
|
1084
1084
|
sticky_label: "You have saved"
|
|
1085
1085
|
}, Wo = ["$0", "$250", "$500", "$750", "$1k"], Eo = () => {
|
|
1086
|
-
const { healthScore: t } =
|
|
1086
|
+
const { healthScore: t } = P(), r = Math.round(t.emergency_savings_on_hand ?? NaN) || null, n = hn(r), o = ht(r);
|
|
1087
1087
|
return /* @__PURE__ */ e(
|
|
1088
|
-
|
|
1088
|
+
Te,
|
|
1089
1089
|
{
|
|
1090
|
-
bottomComponent: /* @__PURE__ */ e(
|
|
1090
|
+
bottomComponent: /* @__PURE__ */ e(_, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: Wo.map((c) => /* @__PURE__ */ s(_, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
|
|
1091
1091
|
/* @__PURE__ */ e(
|
|
1092
1092
|
ee,
|
|
1093
1093
|
{
|
|
@@ -1099,8 +1099,8 @@ const R = {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
1102
|
-
/* @__PURE__ */ e(
|
|
1103
|
-
] },
|
|
1102
|
+
/* @__PURE__ */ e(T, { variant: "caption", children: c })
|
|
1103
|
+
] }, c)) }),
|
|
1104
1104
|
label: $o.sticky_label,
|
|
1105
1105
|
status: o,
|
|
1106
1106
|
statusBarData: [
|
|
@@ -1108,37 +1108,37 @@ const R = {
|
|
|
1108
1108
|
percentage: n
|
|
1109
1109
|
}
|
|
1110
1110
|
],
|
|
1111
|
-
value:
|
|
1111
|
+
value: L(r ?? 0, "0,0.00")
|
|
1112
1112
|
}
|
|
1113
1113
|
);
|
|
1114
|
-
}, zo =
|
|
1114
|
+
}, zo = x(Eo), ot = 65, rt = 34, Go = ({
|
|
1115
1115
|
transactions: t,
|
|
1116
1116
|
bgcolor: r,
|
|
1117
1117
|
height: n = "calc(100dvh - 36px)",
|
|
1118
1118
|
loader: o = /* @__PURE__ */ e(te, { label: "Loading", size: 40 }),
|
|
1119
|
-
onClick:
|
|
1120
|
-
showInsights:
|
|
1119
|
+
onClick: c,
|
|
1120
|
+
showInsights: i = !1,
|
|
1121
1121
|
showLoader: a = !1,
|
|
1122
1122
|
width: d = "100%",
|
|
1123
|
-
zeroState:
|
|
1123
|
+
zeroState: l = /* @__PURE__ */ e(Wn, {})
|
|
1124
1124
|
}) => {
|
|
1125
|
-
const { getCategoryName: p } = Ee(), { onEvent:
|
|
1126
|
-
const D = t.find((
|
|
1125
|
+
const { getCategoryName: p } = Ee(), { onEvent: u } = vn(), { categories: m } = w(), { clearExpandedSplits: g, setShowInsights: S, toggleSplit: C } = $n(), b = (f) => {
|
|
1126
|
+
const D = t.find((F) => F.guid === f);
|
|
1127
1127
|
if (D?.has_been_split) {
|
|
1128
|
-
|
|
1128
|
+
C(D.guid);
|
|
1129
1129
|
return;
|
|
1130
1130
|
}
|
|
1131
|
-
|
|
1131
|
+
u(En.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
1132
1132
|
account_guid: D?.account_guid,
|
|
1133
|
-
transaction_guid:
|
|
1134
|
-
}),
|
|
1135
|
-
},
|
|
1133
|
+
transaction_guid: f
|
|
1134
|
+
}), c?.(f);
|
|
1135
|
+
}, v = h.useRef(null), y = Ln({
|
|
1136
1136
|
count: t.length,
|
|
1137
|
-
getScrollElement: () =>
|
|
1138
|
-
estimateSize: (
|
|
1137
|
+
getScrollElement: () => v.current,
|
|
1138
|
+
estimateSize: (f) => ot + (Le(f, t) ? rt : 0),
|
|
1139
1139
|
overscan: 5
|
|
1140
1140
|
});
|
|
1141
|
-
return h.useEffect(() => y.measure(), [t]), h.useEffect(() =>
|
|
1141
|
+
return h.useEffect(() => y.measure(), [t]), h.useEffect(() => S(i), [i]), h.useEffect(() => () => g(), []), /* @__PURE__ */ e(kt, { sx: { width: d }, children: /* @__PURE__ */ e(A, { height: n, overflow: "auto", ref: v, width: d, children: /* @__PURE__ */ s(
|
|
1142
1142
|
A,
|
|
1143
1143
|
{
|
|
1144
1144
|
height: (
|
|
@@ -1149,24 +1149,24 @@ const R = {
|
|
|
1149
1149
|
width: "100%",
|
|
1150
1150
|
children: [
|
|
1151
1151
|
a && o,
|
|
1152
|
-
!a && y.getVirtualItems().length === 0 &&
|
|
1153
|
-
!a && y.getVirtualItems().length > 0 && y.getVirtualItems().map((
|
|
1154
|
-
const D = t[
|
|
1155
|
-
return /* @__PURE__ */
|
|
1152
|
+
!a && y.getVirtualItems().length === 0 && l,
|
|
1153
|
+
!a && y.getVirtualItems().length > 0 && y.getVirtualItems().map((f) => {
|
|
1154
|
+
const D = t[f.index], F = Le(f.index, t), H = At(f.index, t), O = ot + (F ? rt : 0);
|
|
1155
|
+
return /* @__PURE__ */ s(
|
|
1156
1156
|
A,
|
|
1157
1157
|
{
|
|
1158
1158
|
sx: {
|
|
1159
|
-
height:
|
|
1159
|
+
height: O,
|
|
1160
1160
|
position: "absolute",
|
|
1161
|
-
transform: `translateY(${
|
|
1161
|
+
transform: `translateY(${f.start}px)`,
|
|
1162
1162
|
width: "100%"
|
|
1163
1163
|
},
|
|
1164
1164
|
children: [
|
|
1165
|
-
|
|
1165
|
+
F && /* @__PURE__ */ e(Dt, { bgcolor: r, children: Ne(D.date) }),
|
|
1166
1166
|
/* @__PURE__ */ e(
|
|
1167
1167
|
Mt,
|
|
1168
1168
|
{
|
|
1169
|
-
...
|
|
1169
|
+
...c && { onClick: b },
|
|
1170
1170
|
transaction: {
|
|
1171
1171
|
...D,
|
|
1172
1172
|
category: m.default_categories[D.top_level_category_guid]?.replace(
|
|
@@ -1176,7 +1176,7 @@ const R = {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
1178
|
),
|
|
1179
|
-
/* @__PURE__ */ e(ee, { sx: { ml:
|
|
1179
|
+
/* @__PURE__ */ e(ee, { sx: { ml: H ? 24 : 0 } })
|
|
1180
1180
|
]
|
|
1181
1181
|
},
|
|
1182
1182
|
D.guid
|
|
@@ -1185,36 +1185,36 @@ const R = {
|
|
|
1185
1185
|
]
|
|
1186
1186
|
}
|
|
1187
1187
|
) }) });
|
|
1188
|
-
}, Ho =
|
|
1188
|
+
}, Ho = x(Go), Oe = ({
|
|
1189
1189
|
transactions: t = [],
|
|
1190
1190
|
amountColor: r = "success.main",
|
|
1191
1191
|
amountPosition: n = "center",
|
|
1192
1192
|
formatDate: o = Ne,
|
|
1193
|
-
secondaryIcon:
|
|
1193
|
+
secondaryIcon: c
|
|
1194
1194
|
}) => {
|
|
1195
|
-
const
|
|
1196
|
-
return !t || t.length === 0 ? /* @__PURE__ */
|
|
1195
|
+
const i = G(), { connect: a, finstrong: d } = w(), [l, p] = h.useState(!1), [u, m] = h.useState(!1), g = 3, S = t.length > g, C = t.length - g;
|
|
1196
|
+
return !t || t.length === 0 ? /* @__PURE__ */ s(z, { children: [
|
|
1197
1197
|
/* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
1198
|
-
|
|
1198
|
+
W,
|
|
1199
1199
|
{
|
|
1200
1200
|
onClick: () => m(!0),
|
|
1201
1201
|
size: "small",
|
|
1202
1202
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1203
1203
|
variant: "contained",
|
|
1204
|
-
children: /* @__PURE__ */ e(
|
|
1204
|
+
children: /* @__PURE__ */ e(T, { bold: !0, variant: "body1", children: d.connect_more_accounts_button })
|
|
1205
1205
|
}
|
|
1206
1206
|
) }),
|
|
1207
1207
|
/* @__PURE__ */ e(
|
|
1208
1208
|
ne,
|
|
1209
1209
|
{
|
|
1210
1210
|
onClose: () => m(!1),
|
|
1211
|
-
showConnectWidget:
|
|
1211
|
+
showConnectWidget: u,
|
|
1212
1212
|
title: a.mini_title
|
|
1213
1213
|
}
|
|
1214
1214
|
)
|
|
1215
|
-
] }) : /* @__PURE__ */
|
|
1216
|
-
/* @__PURE__ */ e(A, { sx: { border: `1px solid ${
|
|
1217
|
-
|
|
1215
|
+
] }) : /* @__PURE__ */ s(_, { sx: { gap: 16 }, children: [
|
|
1216
|
+
/* @__PURE__ */ e(A, { sx: { border: `1px solid ${i.palette.divider}`, borderRadius: 2 }, children: t.slice(0, g).map((b, v) => /* @__PURE__ */ s(
|
|
1217
|
+
_,
|
|
1218
1218
|
{
|
|
1219
1219
|
sx: {
|
|
1220
1220
|
alignItems: "center",
|
|
@@ -1224,56 +1224,56 @@ const R = {
|
|
|
1224
1224
|
pt: 14
|
|
1225
1225
|
},
|
|
1226
1226
|
children: [
|
|
1227
|
-
/* @__PURE__ */ e(
|
|
1227
|
+
/* @__PURE__ */ e(_, { sx: { pb: 14 }, children: /* @__PURE__ */ e(
|
|
1228
1228
|
rn,
|
|
1229
1229
|
{
|
|
1230
|
-
categoryGuid:
|
|
1231
|
-
merchantGuid:
|
|
1230
|
+
categoryGuid: b.top_level_category_guid || "",
|
|
1231
|
+
merchantGuid: b.merchant_guid || "",
|
|
1232
1232
|
size: 32
|
|
1233
1233
|
}
|
|
1234
1234
|
) }),
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
|
|
1235
|
+
/* @__PURE__ */ s(
|
|
1236
|
+
_,
|
|
1237
1237
|
{
|
|
1238
1238
|
sx: {
|
|
1239
1239
|
alignItems: n,
|
|
1240
1240
|
flexDirection: "row",
|
|
1241
1241
|
gap: 12,
|
|
1242
1242
|
justifyContent: "space-between",
|
|
1243
|
-
...
|
|
1244
|
-
borderBottom: `1px solid ${
|
|
1243
|
+
...v < Math.min(t.length, g) - 1 && {
|
|
1244
|
+
borderBottom: `1px solid ${i.palette.divider}`
|
|
1245
1245
|
},
|
|
1246
1246
|
pb: 14,
|
|
1247
1247
|
pr: 24,
|
|
1248
1248
|
width: "100%"
|
|
1249
1249
|
},
|
|
1250
1250
|
children: [
|
|
1251
|
-
/* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */ e(k, { bold: !0, variant: "body1", children:
|
|
1253
|
-
/* @__PURE__ */
|
|
1254
|
-
!!
|
|
1255
|
-
/* @__PURE__ */ e(
|
|
1251
|
+
/* @__PURE__ */ s(_, { sx: { gap: 4 }, children: [
|
|
1252
|
+
/* @__PURE__ */ e(k, { bold: !0, variant: "body1", children: b.description }),
|
|
1253
|
+
/* @__PURE__ */ s(_, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
1254
|
+
!!c && c,
|
|
1255
|
+
/* @__PURE__ */ e(T, { variant: "caption", children: o(b.date) })
|
|
1256
1256
|
] })
|
|
1257
1257
|
] }),
|
|
1258
|
-
/* @__PURE__ */ e(k, { bold: !0, sx: { color: r, flexShrink: 0 }, variant: "body1", children:
|
|
1258
|
+
/* @__PURE__ */ e(k, { bold: !0, sx: { color: r, flexShrink: 0 }, variant: "body1", children: L(b.amount, "0,0.00") })
|
|
1259
1259
|
]
|
|
1260
1260
|
},
|
|
1261
|
-
|
|
1261
|
+
b.guid || v
|
|
1262
1262
|
)
|
|
1263
1263
|
]
|
|
1264
1264
|
},
|
|
1265
|
-
|
|
1265
|
+
v
|
|
1266
1266
|
)) }),
|
|
1267
|
-
|
|
1267
|
+
S && /* @__PURE__ */ s(z, { children: [
|
|
1268
1268
|
/* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
1269
|
-
|
|
1269
|
+
W,
|
|
1270
1270
|
{
|
|
1271
1271
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
1272
1272
|
onClick: () => p(!0),
|
|
1273
1273
|
size: "small",
|
|
1274
1274
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1276
|
-
|
|
1275
|
+
children: /* @__PURE__ */ s(T, { bold: !0, variant: "body1", children: [
|
|
1276
|
+
C,
|
|
1277
1277
|
" ",
|
|
1278
1278
|
d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_more_transactions
|
|
1279
1279
|
] })
|
|
@@ -1282,7 +1282,7 @@ const R = {
|
|
|
1282
1282
|
/* @__PURE__ */ e(
|
|
1283
1283
|
ie,
|
|
1284
1284
|
{
|
|
1285
|
-
isOpen:
|
|
1285
|
+
isOpen: l,
|
|
1286
1286
|
onClose: () => p(!1),
|
|
1287
1287
|
title: d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
|
|
1288
1288
|
children: /* @__PURE__ */ e(Ho, { transactions: t })
|
|
@@ -1295,10 +1295,10 @@ const R = {
|
|
|
1295
1295
|
finstrong: {
|
|
1296
1296
|
key_indicators_spend: { pay_bills_on_time_drawer: t }
|
|
1297
1297
|
}
|
|
1298
|
-
} =
|
|
1298
|
+
} = w(), { getSpendingFeeTransactions: r, allTransactions: n } = P();
|
|
1299
1299
|
return h.useEffect(() => {
|
|
1300
1300
|
r().finally();
|
|
1301
|
-
}, []), /* @__PURE__ */ e(
|
|
1301
|
+
}, []), /* @__PURE__ */ e(z, { children: n.spendingFee.length === 0 ? /* @__PURE__ */ s(
|
|
1302
1302
|
K,
|
|
1303
1303
|
{
|
|
1304
1304
|
sx: {
|
|
@@ -1311,13 +1311,13 @@ const R = {
|
|
|
1311
1311
|
},
|
|
1312
1312
|
children: [
|
|
1313
1313
|
/* @__PURE__ */ e(qt, { filled: !0, size: 48, sx: { color: "success.main" } }),
|
|
1314
|
-
/* @__PURE__ */
|
|
1315
|
-
/* @__PURE__ */ e(
|
|
1314
|
+
/* @__PURE__ */ s(_, { sx: { alignItems: "center", gap: 4, pt: 24 }, children: [
|
|
1315
|
+
/* @__PURE__ */ e(X, { children: t.pay_bills_on_time_zero_fees_title }),
|
|
1316
1316
|
/* @__PURE__ */ e(k, { variant: "subtitle1", children: t.pay_bills_on_time_zero_fees_description })
|
|
1317
1317
|
] })
|
|
1318
1318
|
]
|
|
1319
1319
|
}
|
|
1320
|
-
) : /* @__PURE__ */
|
|
1320
|
+
) : /* @__PURE__ */ s(
|
|
1321
1321
|
K,
|
|
1322
1322
|
{
|
|
1323
1323
|
sx: {
|
|
@@ -1326,9 +1326,9 @@ const R = {
|
|
|
1326
1326
|
backgroundColor: "background.paper"
|
|
1327
1327
|
},
|
|
1328
1328
|
children: [
|
|
1329
|
-
/* @__PURE__ */ e(
|
|
1329
|
+
/* @__PURE__ */ e(X, { sx: { textAlign: "left", pb: 8 }, children: t.pay_bills_on_time_sticky_fee_count }),
|
|
1330
1330
|
/* @__PURE__ */ e(
|
|
1331
|
-
|
|
1331
|
+
Oe,
|
|
1332
1332
|
{
|
|
1333
1333
|
amountColor: "text.primary",
|
|
1334
1334
|
amountPosition: "flex-start",
|
|
@@ -1340,10 +1340,10 @@ const R = {
|
|
|
1340
1340
|
]
|
|
1341
1341
|
}
|
|
1342
1342
|
) });
|
|
1343
|
-
}, Ko =
|
|
1344
|
-
const { healthScore: t } =
|
|
1345
|
-
return /* @__PURE__ */
|
|
1346
|
-
|
|
1343
|
+
}, Ko = x(No), jo = () => {
|
|
1344
|
+
const { healthScore: t } = P(), { finstrong: r } = w(), { key_indicators_spend: n } = r, { pay_bills_on_time_drawer: o } = n, c = mn(t.spending_fee_transaction_count);
|
|
1345
|
+
return /* @__PURE__ */ s(
|
|
1346
|
+
_,
|
|
1347
1347
|
{
|
|
1348
1348
|
sx: {
|
|
1349
1349
|
p: 24,
|
|
@@ -1353,22 +1353,22 @@ const R = {
|
|
|
1353
1353
|
},
|
|
1354
1354
|
children: [
|
|
1355
1355
|
/* @__PURE__ */ e(k, { variant: "body2", children: o.pay_bills_on_time_sticky_description }),
|
|
1356
|
-
/* @__PURE__ */
|
|
1357
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ s(_, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
|
1357
|
+
/* @__PURE__ */ s(De, { children: [
|
|
1358
1358
|
t.spending_fee_transaction_count,
|
|
1359
1359
|
" ",
|
|
1360
1360
|
o.pay_bills_on_time_sticky_fee_count
|
|
1361
1361
|
] }),
|
|
1362
|
-
/* @__PURE__ */ e(
|
|
1362
|
+
/* @__PURE__ */ e(Ie, { status: c })
|
|
1363
1363
|
] })
|
|
1364
1364
|
]
|
|
1365
1365
|
}
|
|
1366
1366
|
);
|
|
1367
|
-
}, Vo =
|
|
1368
|
-
const { savingsAndCheckingAccountsBalance: t } =
|
|
1369
|
-
return /* @__PURE__ */
|
|
1367
|
+
}, Vo = x(jo), Yo = () => {
|
|
1368
|
+
const { savingsAndCheckingAccountsBalance: t } = xe(), { finstrong: r } = w();
|
|
1369
|
+
return /* @__PURE__ */ s(_, { gap: 16, sx: { p: 16 }, children: [
|
|
1370
1370
|
/* @__PURE__ */ e(
|
|
1371
|
-
|
|
1371
|
+
he,
|
|
1372
1372
|
{
|
|
1373
1373
|
balance: t,
|
|
1374
1374
|
title: r.key_indicators_save.drawer_available_balance
|
|
@@ -1382,35 +1382,35 @@ const R = {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
)
|
|
1384
1384
|
] });
|
|
1385
|
-
}, Xo =
|
|
1386
|
-
const { finstrong: t } =
|
|
1385
|
+
}, Xo = x(Yo), Uo = () => {
|
|
1386
|
+
const { finstrong: t } = w(), { healthScore: r, allTransactions: n, loadSpendTransactions: o, loadDebtSpend: c } = P(), { isInitialized: i } = U();
|
|
1387
1387
|
h.useEffect(() => {
|
|
1388
|
-
|
|
1389
|
-
}, [
|
|
1388
|
+
i && (o().finally(), c().finally());
|
|
1389
|
+
}, [i]);
|
|
1390
1390
|
const a = h.useMemo(() => {
|
|
1391
|
-
const d = n.spend.map((p) => p.transaction),
|
|
1392
|
-
return [...d, ...
|
|
1391
|
+
const d = n.spend.map((p) => p.transaction), l = n.debtSpend.map((p) => p.transaction);
|
|
1392
|
+
return [...d, ...l];
|
|
1393
1393
|
}, [n.spend, n.debtSpend]);
|
|
1394
|
-
return
|
|
1394
|
+
return i ? /* @__PURE__ */ s(_, { gap: 16, sx: { p: 16 }, children: [
|
|
1395
1395
|
/* @__PURE__ */ e(
|
|
1396
|
-
|
|
1396
|
+
he,
|
|
1397
1397
|
{
|
|
1398
1398
|
balance: r.ninety_day_spend / 90,
|
|
1399
1399
|
title: t.key_indicators_save.drawer_daily_spend
|
|
1400
1400
|
}
|
|
1401
1401
|
),
|
|
1402
|
-
/* @__PURE__ */ e(
|
|
1402
|
+
/* @__PURE__ */ e(Oe, { amountColor: "text.primary", transactions: a })
|
|
1403
1403
|
] }) : /* @__PURE__ */ e(te, {});
|
|
1404
|
-
}, qo =
|
|
1405
|
-
const [t, r] = h.useState(0), { finstrong: n } =
|
|
1406
|
-
return /* @__PURE__ */
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
/* @__PURE__ */
|
|
1404
|
+
}, qo = x(Uo), Zo = () => {
|
|
1405
|
+
const [t, r] = h.useState(0), { finstrong: n } = w();
|
|
1406
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
1407
|
+
/* @__PURE__ */ s(K, { children: [
|
|
1408
|
+
/* @__PURE__ */ s(
|
|
1409
1409
|
Ge,
|
|
1410
1410
|
{
|
|
1411
1411
|
"aria-label": n.key_indicators_save.drawer_title,
|
|
1412
1412
|
centered: !0,
|
|
1413
|
-
onChange: (o,
|
|
1413
|
+
onChange: (o, c) => r(c),
|
|
1414
1414
|
sx: { mb: 0 },
|
|
1415
1415
|
value: t,
|
|
1416
1416
|
variant: "fullWidth",
|
|
@@ -1439,13 +1439,13 @@ const R = {
|
|
|
1439
1439
|
] }),
|
|
1440
1440
|
/* @__PURE__ */ e(Ke, { chartFor: "savingsOverTime" })
|
|
1441
1441
|
] });
|
|
1442
|
-
}, Qo =
|
|
1443
|
-
const { finstrong: t } =
|
|
1442
|
+
}, Qo = x(Zo), Jo = () => {
|
|
1443
|
+
const { finstrong: t } = w(), { healthScore: r } = P(), n = r.months_of_cash_on_hand, o = mt(n ? n * 30 : null), c = 183 / 6, i = Math.floor(n), a = Math.round((n - i) * c), d = n / 6 * 100;
|
|
1444
1444
|
return /* @__PURE__ */ e(
|
|
1445
|
-
|
|
1445
|
+
Te,
|
|
1446
1446
|
{
|
|
1447
1447
|
bottomComponent: /* @__PURE__ */ e(
|
|
1448
|
-
|
|
1448
|
+
_,
|
|
1449
1449
|
{
|
|
1450
1450
|
sx: {
|
|
1451
1451
|
flexDirection: "row",
|
|
@@ -1454,8 +1454,8 @@ const R = {
|
|
|
1454
1454
|
mt: 2,
|
|
1455
1455
|
px: 1
|
|
1456
1456
|
},
|
|
1457
|
-
children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((p) => /* @__PURE__ */
|
|
1458
|
-
|
|
1457
|
+
children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((p) => /* @__PURE__ */ s(
|
|
1458
|
+
_,
|
|
1459
1459
|
{
|
|
1460
1460
|
sx: {
|
|
1461
1461
|
alignItems: "center",
|
|
@@ -1472,7 +1472,7 @@ const R = {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
1474
|
),
|
|
1475
|
-
/* @__PURE__ */ e(
|
|
1475
|
+
/* @__PURE__ */ e(T, { variant: "XSmall", children: p })
|
|
1476
1476
|
]
|
|
1477
1477
|
},
|
|
1478
1478
|
p
|
|
@@ -1486,16 +1486,16 @@ const R = {
|
|
|
1486
1486
|
percentage: `${d}%`
|
|
1487
1487
|
}
|
|
1488
1488
|
],
|
|
1489
|
-
value:
|
|
1489
|
+
value: Y(t.key_indicators_save.drawer_progress_bar_value, i, a)
|
|
1490
1490
|
}
|
|
1491
1491
|
);
|
|
1492
|
-
}, er =
|
|
1493
|
-
const { healthScore: t } =
|
|
1492
|
+
}, er = x(Jo), tr = () => {
|
|
1493
|
+
const { healthScore: t } = P(), { finstrong: r } = w(), n = we(t.debt_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, i = ((a) => o ? "MISSING" : a <= 30 ? "GOOD" : a >= 31 && a <= 39 ? "FAIR" : a >= 40 ? "OFF_TRACK" : "MISSING")(n);
|
|
1494
1494
|
return /* @__PURE__ */ e(
|
|
1495
|
-
|
|
1495
|
+
Te,
|
|
1496
1496
|
{
|
|
1497
|
-
bottomComponent: /* @__PURE__ */
|
|
1498
|
-
|
|
1497
|
+
bottomComponent: /* @__PURE__ */ s(
|
|
1498
|
+
_,
|
|
1499
1499
|
{
|
|
1500
1500
|
sx: {
|
|
1501
1501
|
alignItems: "flex-end",
|
|
@@ -1514,8 +1514,8 @@ const R = {
|
|
|
1514
1514
|
position: "absolute",
|
|
1515
1515
|
transform: "translateX(-50%)"
|
|
1516
1516
|
},
|
|
1517
|
-
children: /* @__PURE__ */
|
|
1518
|
-
|
|
1517
|
+
children: /* @__PURE__ */ s(
|
|
1518
|
+
_,
|
|
1519
1519
|
{
|
|
1520
1520
|
sx: {
|
|
1521
1521
|
alignItems: "center",
|
|
@@ -1534,7 +1534,7 @@ const R = {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
),
|
|
1537
|
-
/* @__PURE__ */ e(
|
|
1537
|
+
/* @__PURE__ */ e(T, { sx: { color: "text.primary" }, variant: "XSmall", children: "30%" })
|
|
1538
1538
|
]
|
|
1539
1539
|
}
|
|
1540
1540
|
)
|
|
@@ -1550,7 +1550,7 @@ const R = {
|
|
|
1550
1550
|
justifyContent: "center",
|
|
1551
1551
|
marginLeft: "auto"
|
|
1552
1552
|
},
|
|
1553
|
-
children: /* @__PURE__ */ e(
|
|
1553
|
+
children: /* @__PURE__ */ e(T, { variant: "Small", children: Y(
|
|
1554
1554
|
r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_sticky_description,
|
|
1555
1555
|
n
|
|
1556
1556
|
) })
|
|
@@ -1560,20 +1560,20 @@ const R = {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
),
|
|
1562
1562
|
label: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_sticky_title,
|
|
1563
|
-
status:
|
|
1563
|
+
status: i,
|
|
1564
1564
|
statusBarData: [
|
|
1565
1565
|
{
|
|
1566
1566
|
percentage: `${n}%`
|
|
1567
1567
|
}
|
|
1568
1568
|
],
|
|
1569
|
-
value:
|
|
1569
|
+
value: L(t.ninety_day_debt_spend, "0,0.00")
|
|
1570
1570
|
}
|
|
1571
1571
|
);
|
|
1572
|
-
}, nr =
|
|
1573
|
-
const { healthScore: t, allTransactions: r } =
|
|
1574
|
-
return /* @__PURE__ */
|
|
1572
|
+
}, nr = x(tr), or = () => {
|
|
1573
|
+
const { healthScore: t, allTransactions: r } = P(), { connect: n, finstrong: o } = w(), [c, i] = h.useState(!1);
|
|
1574
|
+
return /* @__PURE__ */ s(_, { gap: 16, sx: { p: 16 }, children: [
|
|
1575
1575
|
/* @__PURE__ */ e(
|
|
1576
|
-
|
|
1576
|
+
he,
|
|
1577
1577
|
{
|
|
1578
1578
|
balance: t.ninety_day_income,
|
|
1579
1579
|
sx: { flexDirection: "column-reverse" },
|
|
@@ -1582,12 +1582,12 @@ const R = {
|
|
|
1582
1582
|
),
|
|
1583
1583
|
r.income.length ? (
|
|
1584
1584
|
// TODO: Need to add More Transactions functionality
|
|
1585
|
-
/* @__PURE__ */ e(
|
|
1585
|
+
/* @__PURE__ */ e(Oe, { transactions: r.income.map((a) => a.transaction) })
|
|
1586
1586
|
) : /* @__PURE__ */ e(
|
|
1587
|
-
|
|
1587
|
+
W,
|
|
1588
1588
|
{
|
|
1589
1589
|
onClick: () => {
|
|
1590
|
-
|
|
1590
|
+
i(!0);
|
|
1591
1591
|
},
|
|
1592
1592
|
variant: "contained",
|
|
1593
1593
|
children: o.connect_more_accounts_button
|
|
@@ -1596,17 +1596,17 @@ const R = {
|
|
|
1596
1596
|
/* @__PURE__ */ e(
|
|
1597
1597
|
ne,
|
|
1598
1598
|
{
|
|
1599
|
-
onClose: () =>
|
|
1600
|
-
showConnectWidget:
|
|
1599
|
+
onClose: () => i(!1),
|
|
1600
|
+
showConnectWidget: c,
|
|
1601
1601
|
title: n.mini_title
|
|
1602
1602
|
}
|
|
1603
1603
|
)
|
|
1604
1604
|
] });
|
|
1605
|
-
}, rr =
|
|
1606
|
-
const { allTransactions: t, healthScore: r } =
|
|
1607
|
-
return /* @__PURE__ */
|
|
1605
|
+
}, rr = x(or), ar = () => {
|
|
1606
|
+
const { allTransactions: t, healthScore: r } = P(), { connect: n, finstrong: o } = w(), [c, i] = h.useState(!1);
|
|
1607
|
+
return /* @__PURE__ */ s(_, { gap: 16, sx: { p: 16 }, children: [
|
|
1608
1608
|
/* @__PURE__ */ e(
|
|
1609
|
-
|
|
1609
|
+
he,
|
|
1610
1610
|
{
|
|
1611
1611
|
balance: r.ninety_day_debt_spend,
|
|
1612
1612
|
sx: { flexDirection: "column-reverse" },
|
|
@@ -1616,17 +1616,17 @@ const R = {
|
|
|
1616
1616
|
t.debtSpend.length ? (
|
|
1617
1617
|
//TODO: Need to add More Transactions functionality
|
|
1618
1618
|
/* @__PURE__ */ e(
|
|
1619
|
-
|
|
1619
|
+
Oe,
|
|
1620
1620
|
{
|
|
1621
1621
|
amountColor: "text.primary",
|
|
1622
1622
|
transactions: t.debtSpend.map((a) => a.transaction)
|
|
1623
1623
|
}
|
|
1624
1624
|
)
|
|
1625
1625
|
) : /* @__PURE__ */ e(
|
|
1626
|
-
|
|
1626
|
+
W,
|
|
1627
1627
|
{
|
|
1628
1628
|
onClick: () => {
|
|
1629
|
-
|
|
1629
|
+
i(!0);
|
|
1630
1630
|
},
|
|
1631
1631
|
variant: "contained",
|
|
1632
1632
|
children: o.connect_more_accounts_button
|
|
@@ -1635,28 +1635,28 @@ const R = {
|
|
|
1635
1635
|
/* @__PURE__ */ e(
|
|
1636
1636
|
ne,
|
|
1637
1637
|
{
|
|
1638
|
-
onClose: () =>
|
|
1639
|
-
showConnectWidget:
|
|
1638
|
+
onClose: () => i(!1),
|
|
1639
|
+
showConnectWidget: c,
|
|
1640
1640
|
title: n.mini_title
|
|
1641
1641
|
}
|
|
1642
1642
|
)
|
|
1643
1643
|
] });
|
|
1644
|
-
}, ir =
|
|
1644
|
+
}, ir = x(ar), sr = ({
|
|
1645
1645
|
color: t,
|
|
1646
1646
|
data: r,
|
|
1647
1647
|
series: n,
|
|
1648
1648
|
style: o,
|
|
1649
|
-
...
|
|
1649
|
+
...c
|
|
1650
1650
|
}) => {
|
|
1651
|
-
const
|
|
1651
|
+
const i = G(), a = h.useRef(null), { width: d } = jn({
|
|
1652
1652
|
width: o.width
|
|
1653
1653
|
});
|
|
1654
1654
|
h.useLayoutEffect(() => {
|
|
1655
1655
|
const m = new ResizeObserver(() => {
|
|
1656
1656
|
window.requestAnimationFrame(() => {
|
|
1657
1657
|
if (a.current) {
|
|
1658
|
-
const { width: g } = a.current.getBoundingClientRect(),
|
|
1659
|
-
|
|
1658
|
+
const { width: g } = a.current.getBoundingClientRect(), S = g / 2, C = a.current.querySelector("text");
|
|
1659
|
+
C && C.setAttribute("transform", `translate(${S}, -8)`);
|
|
1660
1660
|
}
|
|
1661
1661
|
});
|
|
1662
1662
|
});
|
|
@@ -1664,20 +1664,20 @@ const R = {
|
|
|
1664
1664
|
a.current && m.unobserve(a.current);
|
|
1665
1665
|
};
|
|
1666
1666
|
}, []);
|
|
1667
|
-
const { formattedComparison:
|
|
1668
|
-
return /* @__PURE__ */
|
|
1669
|
-
/* @__PURE__ */ e(et.rect, { ...
|
|
1667
|
+
const { formattedComparison: l, formattedMain: p } = r[n.index], u = n.type === 0 ? p : l;
|
|
1668
|
+
return /* @__PURE__ */ s("g", { children: [
|
|
1669
|
+
/* @__PURE__ */ e(et.rect, { ...c, fill: t, ref: a, rx: 2, style: o }),
|
|
1670
1670
|
/* @__PURE__ */ e(
|
|
1671
1671
|
et.text,
|
|
1672
1672
|
{
|
|
1673
|
-
fill:
|
|
1673
|
+
fill: i.palette.text.secondary,
|
|
1674
1674
|
fontSize: 9,
|
|
1675
1675
|
fontWeight: 400,
|
|
1676
1676
|
textAnchor: "middle",
|
|
1677
1677
|
transform: d.to((m) => `translate(${m / 2}, -5)`),
|
|
1678
1678
|
x: o.x,
|
|
1679
1679
|
y: o.y,
|
|
1680
|
-
children:
|
|
1680
|
+
children: u
|
|
1681
1681
|
}
|
|
1682
1682
|
)
|
|
1683
1683
|
] });
|
|
@@ -1686,30 +1686,30 @@ const R = {
|
|
|
1686
1686
|
data: r,
|
|
1687
1687
|
title: n,
|
|
1688
1688
|
buttonLabel: o,
|
|
1689
|
-
onClick:
|
|
1690
|
-
legendLabelMain:
|
|
1689
|
+
onClick: c,
|
|
1690
|
+
legendLabelMain: i,
|
|
1691
1691
|
legendLabelComparison: a,
|
|
1692
1692
|
totalComparison: d,
|
|
1693
|
-
totalMain:
|
|
1693
|
+
totalMain: l
|
|
1694
1694
|
}) => {
|
|
1695
|
-
const p =
|
|
1696
|
-
() => r.sort((y,
|
|
1697
|
-
const
|
|
1695
|
+
const p = G(), u = Gn(p.breakpoints.down("xs")), m = h.useMemo(
|
|
1696
|
+
() => r.sort((y, f) => y.month - f.month).map((y) => {
|
|
1697
|
+
const f = gn(y.month), D = {
|
|
1698
1698
|
spending_vs_income: {
|
|
1699
1699
|
main: y.standard_spend,
|
|
1700
1700
|
comparison: y.income,
|
|
1701
|
-
formattedMain:
|
|
1702
|
-
formattedComparison:
|
|
1701
|
+
formattedMain: L(y.standard_spend, "0.0a"),
|
|
1702
|
+
formattedComparison: L(y.income, "0.0a")
|
|
1703
1703
|
},
|
|
1704
1704
|
debt_payment_vs_income: {
|
|
1705
1705
|
main: y.income,
|
|
1706
1706
|
comparison: y.debt_spend,
|
|
1707
|
-
formattedMain:
|
|
1708
|
-
formattedComparison:
|
|
1707
|
+
formattedMain: L(y.income, "0.0a"),
|
|
1708
|
+
formattedComparison: L(y.debt_spend, "0.0a")
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
1711
|
return {
|
|
1712
|
-
label:
|
|
1712
|
+
label: f,
|
|
1713
1713
|
...D[t]
|
|
1714
1714
|
};
|
|
1715
1715
|
}),
|
|
@@ -1717,15 +1717,15 @@ const R = {
|
|
|
1717
1717
|
), g = {
|
|
1718
1718
|
dataKey: "label",
|
|
1719
1719
|
scaleType: "band"
|
|
1720
|
-
},
|
|
1720
|
+
}, S = Math.max(...m.map((y) => Math.max(y.main, y.comparison))), C = Math.ceil(S * 1.2 / 1e3) * 1e3, b = C / 3, v = {
|
|
1721
1721
|
scaleType: "linear",
|
|
1722
1722
|
min: 0,
|
|
1723
|
-
max:
|
|
1723
|
+
max: C,
|
|
1724
1724
|
tickNumber: 4,
|
|
1725
|
-
tickMinStep:
|
|
1725
|
+
tickMinStep: b,
|
|
1726
1726
|
valueFormatter: (y) => y === 0 ? "$0" : `$${(y / 1e3).toFixed(0)}K`
|
|
1727
1727
|
};
|
|
1728
|
-
return /* @__PURE__ */
|
|
1728
|
+
return /* @__PURE__ */ s(
|
|
1729
1729
|
K,
|
|
1730
1730
|
{
|
|
1731
1731
|
sx: {
|
|
@@ -1733,8 +1733,8 @@ const R = {
|
|
|
1733
1733
|
py: 24
|
|
1734
1734
|
},
|
|
1735
1735
|
children: [
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
|
|
1736
|
+
/* @__PURE__ */ s(
|
|
1737
|
+
_,
|
|
1738
1738
|
{
|
|
1739
1739
|
sx: {
|
|
1740
1740
|
alignItems: "center",
|
|
@@ -1744,12 +1744,12 @@ const R = {
|
|
|
1744
1744
|
pb: 8
|
|
1745
1745
|
},
|
|
1746
1746
|
children: [
|
|
1747
|
-
/* @__PURE__ */ e(
|
|
1747
|
+
/* @__PURE__ */ e(X, { children: n }),
|
|
1748
1748
|
o && /* @__PURE__ */ e(
|
|
1749
|
-
|
|
1749
|
+
W,
|
|
1750
1750
|
{
|
|
1751
1751
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
1752
|
-
onClick:
|
|
1752
|
+
onClick: c,
|
|
1753
1753
|
size: "small",
|
|
1754
1754
|
sx: {
|
|
1755
1755
|
pl: 8,
|
|
@@ -1762,8 +1762,8 @@ const R = {
|
|
|
1762
1762
|
]
|
|
1763
1763
|
}
|
|
1764
1764
|
),
|
|
1765
|
-
/* @__PURE__ */
|
|
1766
|
-
/* @__PURE__ */
|
|
1765
|
+
/* @__PURE__ */ s(_, { sx: { alignItems: "center", flexDirection: "row", gap: 24, py: 4 }, children: [
|
|
1766
|
+
/* @__PURE__ */ s(_, { sx: { gap: 8, alignItems: "center", flexDirection: "row" }, children: [
|
|
1767
1767
|
/* @__PURE__ */ e(
|
|
1768
1768
|
A,
|
|
1769
1769
|
{
|
|
@@ -1775,15 +1775,15 @@ const R = {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
1777
|
),
|
|
1778
|
-
/* @__PURE__ */
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
|
|
1778
|
+
/* @__PURE__ */ s(_, { sx: { alignItems: "center", flexDirection: "row" }, children: [
|
|
1779
|
+
/* @__PURE__ */ s(T, { variant: "subtitle2", children: [
|
|
1780
|
+
i,
|
|
1781
1781
|
" "
|
|
1782
1782
|
] }),
|
|
1783
|
-
!
|
|
1783
|
+
!u && l && /* @__PURE__ */ e(T, { bold: !0, variant: "subtitle2", children: l })
|
|
1784
1784
|
] })
|
|
1785
1785
|
] }),
|
|
1786
|
-
/* @__PURE__ */
|
|
1786
|
+
/* @__PURE__ */ s(_, { alignItems: "center", direction: "row", spacing: 8, children: [
|
|
1787
1787
|
/* @__PURE__ */ e(
|
|
1788
1788
|
A,
|
|
1789
1789
|
{
|
|
@@ -1795,16 +1795,16 @@ const R = {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
1797
|
),
|
|
1798
|
-
/* @__PURE__ */
|
|
1799
|
-
/* @__PURE__ */
|
|
1798
|
+
/* @__PURE__ */ s(_, { sx: { alignItems: "center", flexDirection: "row" }, children: [
|
|
1799
|
+
/* @__PURE__ */ s(T, { variant: "subtitle2", children: [
|
|
1800
1800
|
a,
|
|
1801
1801
|
" "
|
|
1802
1802
|
] }),
|
|
1803
|
-
!
|
|
1803
|
+
!u && d && /* @__PURE__ */ e(T, { bold: !0, variant: "subtitle2", children: d })
|
|
1804
1804
|
] })
|
|
1805
1805
|
] })
|
|
1806
1806
|
] }),
|
|
1807
|
-
/* @__PURE__ */
|
|
1807
|
+
/* @__PURE__ */ s(
|
|
1808
1808
|
Kn,
|
|
1809
1809
|
{
|
|
1810
1810
|
colors: [`${p.palette.chart.chart3}`, `${p.palette.chart.chart5}`],
|
|
@@ -1816,23 +1816,23 @@ const R = {
|
|
|
1816
1816
|
{ dataKey: "comparison", type: "bar" }
|
|
1817
1817
|
],
|
|
1818
1818
|
xAxis: [g],
|
|
1819
|
-
yAxis: [
|
|
1819
|
+
yAxis: [v],
|
|
1820
1820
|
children: [
|
|
1821
1821
|
/* @__PURE__ */ e(
|
|
1822
1822
|
Yt,
|
|
1823
1823
|
{
|
|
1824
1824
|
slots: {
|
|
1825
1825
|
bar: (y) => {
|
|
1826
|
-
const { ownerState:
|
|
1826
|
+
const { ownerState: f, style: D, ...F } = y;
|
|
1827
1827
|
return /* @__PURE__ */ e(
|
|
1828
1828
|
sr,
|
|
1829
1829
|
{
|
|
1830
|
-
...
|
|
1831
|
-
color:
|
|
1830
|
+
...F,
|
|
1831
|
+
color: f.color,
|
|
1832
1832
|
data: m,
|
|
1833
1833
|
series: {
|
|
1834
|
-
index:
|
|
1835
|
-
type: Number(
|
|
1834
|
+
index: f.dataIndex,
|
|
1835
|
+
type: Number(f.id.toString().split("-").pop())
|
|
1836
1836
|
},
|
|
1837
1837
|
style: D
|
|
1838
1838
|
}
|
|
@@ -1888,19 +1888,19 @@ const R = {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
);
|
|
1890
1890
|
}, cr = () => {
|
|
1891
|
-
const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } =
|
|
1891
|
+
const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = P(), { isInitialized: o } = U(), [c, i] = h.useState(0), { finstrong: a } = w();
|
|
1892
1892
|
return h.useEffect(() => {
|
|
1893
1893
|
o && (t().finally(), r().finally());
|
|
1894
|
-
}, [o]), /* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
1894
|
+
}, [o]), /* @__PURE__ */ s(z, { children: [
|
|
1895
|
+
/* @__PURE__ */ s(K, { children: [
|
|
1896
|
+
/* @__PURE__ */ s(
|
|
1897
1897
|
Ge,
|
|
1898
1898
|
{
|
|
1899
1899
|
"aria-label": a.key_indicators_save.drawer_title,
|
|
1900
1900
|
centered: !0,
|
|
1901
|
-
onChange: (d,
|
|
1901
|
+
onChange: (d, l) => i(l),
|
|
1902
1902
|
sx: { mb: 0 },
|
|
1903
|
-
value:
|
|
1903
|
+
value: c,
|
|
1904
1904
|
variant: "fullWidth",
|
|
1905
1905
|
children: [
|
|
1906
1906
|
/* @__PURE__ */ e(
|
|
@@ -1930,7 +1930,7 @@ const R = {
|
|
|
1930
1930
|
"aria-labelledby": "income-details-tab-0",
|
|
1931
1931
|
index: 0,
|
|
1932
1932
|
name: "income-details",
|
|
1933
|
-
value:
|
|
1933
|
+
value: c,
|
|
1934
1934
|
children: /* @__PURE__ */ e(rr, {})
|
|
1935
1935
|
}
|
|
1936
1936
|
),
|
|
@@ -1940,12 +1940,12 @@ const R = {
|
|
|
1940
1940
|
"aria-labelledby": "debt-payment-details-tab-1",
|
|
1941
1941
|
index: 1,
|
|
1942
1942
|
name: "debt-payment-details",
|
|
1943
|
-
value:
|
|
1943
|
+
value: c,
|
|
1944
1944
|
children: /* @__PURE__ */ e(ir, {})
|
|
1945
1945
|
}
|
|
1946
1946
|
)
|
|
1947
1947
|
] }),
|
|
1948
|
-
n.length ? /* @__PURE__ */
|
|
1948
|
+
n.length ? /* @__PURE__ */ s(z, { children: [
|
|
1949
1949
|
/* @__PURE__ */ e(
|
|
1950
1950
|
Wt,
|
|
1951
1951
|
{
|
|
@@ -1957,9 +1957,9 @@ const R = {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
),
|
|
1959
1959
|
/* @__PURE__ */ e(Ke, { chartFor: "debtOverTime" })
|
|
1960
|
-
] }) : /* @__PURE__ */
|
|
1960
|
+
] }) : /* @__PURE__ */ s(z, { children: [
|
|
1961
1961
|
/* @__PURE__ */ e(
|
|
1962
|
-
|
|
1962
|
+
Ae,
|
|
1963
1963
|
{
|
|
1964
1964
|
header: a.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_double_bar_chart_empty_state_header,
|
|
1965
1965
|
icon: "multiline_chart",
|
|
@@ -1975,7 +1975,7 @@ const R = {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
),
|
|
1977
1977
|
/* @__PURE__ */ e(
|
|
1978
|
-
|
|
1978
|
+
Ae,
|
|
1979
1979
|
{
|
|
1980
1980
|
header: a.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_line_chart_empty_state_header,
|
|
1981
1981
|
icon: "multiline_chart",
|
|
@@ -1992,18 +1992,18 @@ const R = {
|
|
|
1992
1992
|
)
|
|
1993
1993
|
] })
|
|
1994
1994
|
] });
|
|
1995
|
-
}, lr =
|
|
1996
|
-
const { healthScore: t } =
|
|
1995
|
+
}, lr = x(cr), dr = () => {
|
|
1996
|
+
const { healthScore: t } = P(), { finstrong: r } = w(), n = we(t.spend_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, i = ((d) => o ? "MISSING" : d < 100 ? "GOOD" : d >= 100 && d <= 109 ? "FAIR" : d >= 110 ? "OFF_TRACK" : "MISSING")(n), a = {
|
|
1997
1997
|
GOOD: [{ percentage: `${n}%` }],
|
|
1998
1998
|
FAIR: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
1999
1999
|
OFF_TRACK: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
2000
2000
|
MISSING: [{ percentage: "0%" }]
|
|
2001
|
-
}[
|
|
2001
|
+
}[i];
|
|
2002
2002
|
return /* @__PURE__ */ e(
|
|
2003
|
-
|
|
2003
|
+
Te,
|
|
2004
2004
|
{
|
|
2005
|
-
bottomComponent: /* @__PURE__ */
|
|
2006
|
-
|
|
2005
|
+
bottomComponent: /* @__PURE__ */ s(
|
|
2006
|
+
_,
|
|
2007
2007
|
{
|
|
2008
2008
|
sx: {
|
|
2009
2009
|
flexDirection: "row",
|
|
@@ -2012,12 +2012,12 @@ const R = {
|
|
|
2012
2012
|
mt: 8
|
|
2013
2013
|
},
|
|
2014
2014
|
children: [
|
|
2015
|
-
/* @__PURE__ */
|
|
2016
|
-
o ? "-" :
|
|
2015
|
+
/* @__PURE__ */ s(T, { variant: "body2", children: [
|
|
2016
|
+
o ? "-" : L(t.ninety_day_income, "0,0.00"),
|
|
2017
2017
|
" ",
|
|
2018
2018
|
r?.key_indicators_spend.spend_less_than_you_make_drawer.income
|
|
2019
2019
|
] }),
|
|
2020
|
-
/* @__PURE__ */
|
|
2020
|
+
/* @__PURE__ */ s(T, { variant: "body2", children: [
|
|
2021
2021
|
o ? "-%" : `${n}%`,
|
|
2022
2022
|
r?.key_indicators_spend.spend_less_than_you_make_drawer.spent
|
|
2023
2023
|
] })
|
|
@@ -2025,53 +2025,54 @@ const R = {
|
|
|
2025
2025
|
}
|
|
2026
2026
|
),
|
|
2027
2027
|
label: r?.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_sticky_description,
|
|
2028
|
-
status:
|
|
2028
|
+
status: i,
|
|
2029
2029
|
statusBarData: a,
|
|
2030
|
-
value: o ? "$0" :
|
|
2030
|
+
value: o ? "$0" : L(t.ninety_day_spend, "0,0.00")
|
|
2031
2031
|
}
|
|
2032
2032
|
);
|
|
2033
|
-
}, pr =
|
|
2034
|
-
const
|
|
2033
|
+
}, pr = x(dr), ur = ({ onTrendClick: t, onSpendingClick: r }) => {
|
|
2034
|
+
const n = G(), { monthlySummaries: o } = P(), { finstrong: c, goals: i, spending: a } = w(), { selectedAccounts: d } = U(), { categories: l, dateRangeCategoryTotals: p, loadDateRangeCategoryTotals: u } = Ee(), { appDataStore: m } = wn(), [g, S] = h.useState("");
|
|
2035
2035
|
h.useEffect(() => {
|
|
2036
|
-
|
|
2037
|
-
|
|
2036
|
+
u(
|
|
2037
|
+
d,
|
|
2038
2038
|
It(/* @__PURE__ */ new Date()),
|
|
2039
2039
|
Tt(/* @__PURE__ */ new Date())
|
|
2040
2040
|
).finally();
|
|
2041
|
-
}, [
|
|
2042
|
-
const
|
|
2043
|
-
() => Vn(
|
|
2044
|
-
[
|
|
2045
|
-
), b = (
|
|
2046
|
-
|
|
2047
|
-
}, { totalSpending: v, totalIncome:
|
|
2048
|
-
(
|
|
2049
|
-
totalSpending:
|
|
2050
|
-
totalIncome:
|
|
2041
|
+
}, [d]);
|
|
2042
|
+
const C = h.useMemo(
|
|
2043
|
+
() => Vn(l, i, n, p),
|
|
2044
|
+
[l, p]
|
|
2045
|
+
), b = (f) => {
|
|
2046
|
+
S(g === f ? "" : f);
|
|
2047
|
+
}, { totalSpending: v, totalIncome: y } = h.useMemo(() => o?.reduce(
|
|
2048
|
+
(f, { standard_spend: D = 0, income: F = 0 }) => ({
|
|
2049
|
+
totalSpending: f.totalSpending + D,
|
|
2050
|
+
totalIncome: f.totalIncome + F
|
|
2051
2051
|
}),
|
|
2052
2052
|
{ totalSpending: 0, totalIncome: 0 }
|
|
2053
|
-
), [
|
|
2054
|
-
return /* @__PURE__ */
|
|
2055
|
-
|
|
2053
|
+
), [o]);
|
|
2054
|
+
return /* @__PURE__ */ s(_, { sx: { gap: 24 }, children: [
|
|
2055
|
+
o.length ? /* @__PURE__ */ e(
|
|
2056
2056
|
Wt,
|
|
2057
2057
|
{
|
|
2058
|
-
...
|
|
2059
|
-
buttonLabel:
|
|
2058
|
+
...m.appData.client_profile?.allow_trends_widget && {
|
|
2059
|
+
buttonLabel: c.key_indicators_spend.spend_less_than_you_make_drawer.view_more
|
|
2060
2060
|
},
|
|
2061
2061
|
chartFor: "spending_vs_income",
|
|
2062
|
-
data:
|
|
2063
|
-
legendLabelComparison:
|
|
2064
|
-
legendLabelMain:
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2062
|
+
data: o,
|
|
2063
|
+
legendLabelComparison: c.key_indicators_spend.spend_less_than_you_make_drawer.income,
|
|
2064
|
+
legendLabelMain: c.key_indicators_spend.spend_less_than_you_make_drawer.spending,
|
|
2065
|
+
onClick: t,
|
|
2066
|
+
title: c.key_indicators_spend.spend_less_than_you_make_drawer.trends,
|
|
2067
|
+
totalComparison: L(y, "0,0.00"),
|
|
2068
|
+
totalMain: L(v, "0,0.00")
|
|
2068
2069
|
}
|
|
2069
2070
|
) : /* @__PURE__ */ e(
|
|
2070
|
-
|
|
2071
|
+
Ae,
|
|
2071
2072
|
{
|
|
2072
|
-
header:
|
|
2073
|
+
header: c.key_indicators_spend.spend_less_than_you_make_drawer.trends_zero_state_title,
|
|
2073
2074
|
icon: "multiline_chart",
|
|
2074
|
-
subText:
|
|
2075
|
+
subText: c.key_indicators_spend.spend_less_than_you_make_drawer.trends_zero_state_description,
|
|
2075
2076
|
sx: {
|
|
2076
2077
|
backgroundColor: "background.paper",
|
|
2077
2078
|
borderRadius: "8px",
|
|
@@ -2082,7 +2083,7 @@ const R = {
|
|
|
2082
2083
|
variant: "no-buttons"
|
|
2083
2084
|
}
|
|
2084
2085
|
),
|
|
2085
|
-
|
|
2086
|
+
C ? /* @__PURE__ */ s(
|
|
2086
2087
|
K,
|
|
2087
2088
|
{
|
|
2088
2089
|
sx: {
|
|
@@ -2090,8 +2091,8 @@ const R = {
|
|
|
2090
2091
|
py: 24
|
|
2091
2092
|
},
|
|
2092
2093
|
children: [
|
|
2093
|
-
/* @__PURE__ */
|
|
2094
|
-
|
|
2094
|
+
/* @__PURE__ */ s(
|
|
2095
|
+
_,
|
|
2095
2096
|
{
|
|
2096
2097
|
sx: {
|
|
2097
2098
|
alignItems: "center",
|
|
@@ -2101,50 +2102,51 @@ const R = {
|
|
|
2101
2102
|
pb: 8
|
|
2102
2103
|
},
|
|
2103
2104
|
children: [
|
|
2104
|
-
/* @__PURE__ */ e(
|
|
2105
|
-
|
|
2106
|
-
|
|
2105
|
+
/* @__PURE__ */ e(X, { children: c.key_indicators_spend.spend_less_than_you_make_drawer.spending }),
|
|
2106
|
+
m.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
|
|
2107
|
+
W,
|
|
2107
2108
|
{
|
|
2108
2109
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
2110
|
+
onClick: r,
|
|
2109
2111
|
size: "small",
|
|
2110
2112
|
sx: {
|
|
2111
2113
|
pl: 8,
|
|
2112
2114
|
height: 24
|
|
2113
2115
|
},
|
|
2114
2116
|
variant: "text",
|
|
2115
|
-
children:
|
|
2117
|
+
children: c.key_indicators_spend.spend_less_than_you_make_drawer.view_more
|
|
2116
2118
|
}
|
|
2117
2119
|
)
|
|
2118
2120
|
]
|
|
2119
2121
|
}
|
|
2120
2122
|
),
|
|
2121
|
-
/* @__PURE__ */
|
|
2123
|
+
/* @__PURE__ */ s(_, { sx: { gap: 12, py: 16, flexDirection: "row", justifyContent: "center" }, children: [
|
|
2122
2124
|
/* @__PURE__ */ e(
|
|
2123
2125
|
Yn,
|
|
2124
2126
|
{
|
|
2125
|
-
data:
|
|
2127
|
+
data: C,
|
|
2126
2128
|
onSelected: b,
|
|
2127
|
-
selectedId:
|
|
2128
|
-
totalLabel:
|
|
2129
|
+
selectedId: g,
|
|
2130
|
+
totalLabel: a.total_spending
|
|
2129
2131
|
}
|
|
2130
2132
|
),
|
|
2131
2133
|
/* @__PURE__ */ e(
|
|
2132
2134
|
Xn,
|
|
2133
2135
|
{
|
|
2134
|
-
data:
|
|
2136
|
+
data: C,
|
|
2135
2137
|
onSelected: b,
|
|
2136
|
-
selectedId:
|
|
2138
|
+
selectedId: g
|
|
2137
2139
|
}
|
|
2138
2140
|
)
|
|
2139
2141
|
] })
|
|
2140
2142
|
]
|
|
2141
2143
|
}
|
|
2142
2144
|
) : /* @__PURE__ */ e(
|
|
2143
|
-
|
|
2145
|
+
Ae,
|
|
2144
2146
|
{
|
|
2145
|
-
header:
|
|
2147
|
+
header: c.key_indicators_spend.spend_less_than_you_make_drawer.spending_zero_state_title,
|
|
2146
2148
|
icon: "donut_small",
|
|
2147
|
-
subText:
|
|
2149
|
+
subText: c.key_indicators_spend.spend_less_than_you_make_drawer.spending_zero_state_description,
|
|
2148
2150
|
sx: {
|
|
2149
2151
|
backgroundColor: "background.paper",
|
|
2150
2152
|
borderRadius: "8px",
|
|
@@ -2156,33 +2158,41 @@ const R = {
|
|
|
2156
2158
|
}
|
|
2157
2159
|
)
|
|
2158
2160
|
] });
|
|
2159
|
-
}, _r =
|
|
2161
|
+
}, _r = x(ur), Pe = {
|
|
2160
2162
|
credit_score_description: "Credit scores usually go from 300 to 850. Think of 700+ as good, 800+ as awesome, and below 600 as needing work. You can often check yours for free with your bank or credit card company.",
|
|
2161
2163
|
maintain_emergency_savings_description: "With at least $1,000 saved, you're ready for surprises, freeing you to save for major goals.",
|
|
2162
2164
|
maintain_emergency_savings_title: "Maintain Emergency Savings"
|
|
2163
2165
|
}, hr = ({
|
|
2164
2166
|
drawerFor: t,
|
|
2165
2167
|
isOpen: r,
|
|
2166
|
-
onClose: n
|
|
2168
|
+
onClose: n,
|
|
2169
|
+
onTrendClick: o,
|
|
2170
|
+
onSpendingClick: c
|
|
2167
2171
|
}) => {
|
|
2168
|
-
const { finstrong:
|
|
2172
|
+
const { finstrong: i } = w(), d = {
|
|
2169
2173
|
spendLessThanYouMake: {
|
|
2170
|
-
title:
|
|
2171
|
-
description:
|
|
2174
|
+
title: i.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_title,
|
|
2175
|
+
description: i.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_description,
|
|
2172
2176
|
stickyComponent: /* @__PURE__ */ e(pr, {}),
|
|
2173
|
-
content: /* @__PURE__ */ e(
|
|
2177
|
+
content: /* @__PURE__ */ e(
|
|
2178
|
+
_r,
|
|
2179
|
+
{
|
|
2180
|
+
onSpendingClick: c,
|
|
2181
|
+
onTrendClick: o
|
|
2182
|
+
}
|
|
2183
|
+
),
|
|
2174
2184
|
drawerType: "connectDrawer",
|
|
2175
|
-
connectTitle:
|
|
2176
|
-
connectDescription:
|
|
2185
|
+
connectTitle: i.connect_your_accounts,
|
|
2186
|
+
connectDescription: i.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
2177
2187
|
},
|
|
2178
2188
|
payBillsOnTime: {
|
|
2179
|
-
title:
|
|
2180
|
-
description:
|
|
2189
|
+
title: i.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_title,
|
|
2190
|
+
description: i.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_description,
|
|
2181
2191
|
stickyComponent: /* @__PURE__ */ e(Vo, {}),
|
|
2182
2192
|
content: /* @__PURE__ */ e(Ko, {}),
|
|
2183
2193
|
drawerType: "connectDrawer",
|
|
2184
|
-
connectTitle:
|
|
2185
|
-
connectDescription:
|
|
2194
|
+
connectTitle: i.connect_your_accounts,
|
|
2195
|
+
connectDescription: i.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
2186
2196
|
},
|
|
2187
2197
|
maintainEmergencySavings: {
|
|
2188
2198
|
content: /* @__PURE__ */ e(Lo, {}),
|
|
@@ -2190,17 +2200,17 @@ const R = {
|
|
|
2190
2200
|
stickyComponent: /* @__PURE__ */ e(zo, {}),
|
|
2191
2201
|
title: Pe.maintain_emergency_savings_title,
|
|
2192
2202
|
drawerType: "connectDrawer",
|
|
2193
|
-
connectTitle:
|
|
2194
|
-
connectDescription:
|
|
2203
|
+
connectTitle: i.connect_your_accounts,
|
|
2204
|
+
connectDescription: i.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
2195
2205
|
},
|
|
2196
2206
|
haveManageableDebt: {
|
|
2197
|
-
title:
|
|
2198
|
-
description:
|
|
2207
|
+
title: i.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_title,
|
|
2208
|
+
description: i.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_description,
|
|
2199
2209
|
stickyComponent: /* @__PURE__ */ e(nr, {}),
|
|
2200
2210
|
content: /* @__PURE__ */ e(lr, {}),
|
|
2201
2211
|
drawerType: "connectDrawer",
|
|
2202
|
-
connectTitle:
|
|
2203
|
-
connectDescription:
|
|
2212
|
+
connectTitle: i.dont_see_all_your_accounts,
|
|
2213
|
+
connectDescription: i.connect_more_accounts_to_view_more_accurate_financial_picture
|
|
2204
2214
|
},
|
|
2205
2215
|
haveAGoodCreditScore: {
|
|
2206
2216
|
title: /* @__PURE__ */ e(Ao, {}),
|
|
@@ -2209,43 +2219,45 @@ const R = {
|
|
|
2209
2219
|
content: /* @__PURE__ */ e(vo, {})
|
|
2210
2220
|
},
|
|
2211
2221
|
saveEnoughToLiveOn: {
|
|
2212
|
-
title:
|
|
2213
|
-
description:
|
|
2222
|
+
title: i.key_indicators_save.drawer_title,
|
|
2223
|
+
description: i.key_indicators_save.drawer_description,
|
|
2214
2224
|
stickyComponent: /* @__PURE__ */ e(er, {}),
|
|
2215
2225
|
content: /* @__PURE__ */ e(Qo, {}),
|
|
2216
2226
|
drawerType: "connectDrawer",
|
|
2217
|
-
connectTitle:
|
|
2218
|
-
connectDescription:
|
|
2227
|
+
connectTitle: i.dont_see_all_your_accounts,
|
|
2228
|
+
connectDescription: i.connect_more_accounts_to_view_more_accurate_financial_picture
|
|
2219
2229
|
}
|
|
2220
2230
|
}[t];
|
|
2221
2231
|
return /* @__PURE__ */ e(
|
|
2222
2232
|
Bt,
|
|
2223
2233
|
{
|
|
2224
|
-
connectDescription:
|
|
2225
|
-
connectTitle:
|
|
2226
|
-
description:
|
|
2227
|
-
drawerTitle:
|
|
2228
|
-
drawerType:
|
|
2234
|
+
connectDescription: d?.connectDescription,
|
|
2235
|
+
connectTitle: d?.connectTitle,
|
|
2236
|
+
description: d?.description,
|
|
2237
|
+
drawerTitle: i.key_indicators,
|
|
2238
|
+
drawerType: d.drawerType,
|
|
2229
2239
|
isOpen: r,
|
|
2230
2240
|
loadConnectAccountsCard: !0,
|
|
2231
2241
|
onClose: n,
|
|
2232
|
-
stickyComponent:
|
|
2233
|
-
title:
|
|
2234
|
-
children: /* @__PURE__ */ e(
|
|
2242
|
+
stickyComponent: d.stickyComponent,
|
|
2243
|
+
title: d.title,
|
|
2244
|
+
children: /* @__PURE__ */ e(_, { sx: { gap: 16 }, children: d.content })
|
|
2235
2245
|
}
|
|
2236
2246
|
);
|
|
2237
|
-
}, mr =
|
|
2247
|
+
}, mr = x(hr), _e = ({
|
|
2238
2248
|
drawerFor: t,
|
|
2239
2249
|
title: r,
|
|
2240
2250
|
description: n,
|
|
2241
|
-
cardState: o = "MISSING"
|
|
2251
|
+
cardState: o = "MISSING",
|
|
2252
|
+
onTrendClick: c,
|
|
2253
|
+
onSpendingClick: i
|
|
2242
2254
|
}) => {
|
|
2243
|
-
const [
|
|
2244
|
-
return /* @__PURE__ */
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
|
|
2255
|
+
const [a, d] = h.useState(!1);
|
|
2256
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
2257
|
+
/* @__PURE__ */ s(
|
|
2258
|
+
_,
|
|
2247
2259
|
{
|
|
2248
|
-
onClick: () =>
|
|
2260
|
+
onClick: () => d(!0),
|
|
2249
2261
|
sx: {
|
|
2250
2262
|
alignItems: "center",
|
|
2251
2263
|
flexDirection: "row",
|
|
@@ -2258,10 +2270,10 @@ const R = {
|
|
|
2258
2270
|
cursor: "pointer"
|
|
2259
2271
|
},
|
|
2260
2272
|
children: [
|
|
2261
|
-
/* @__PURE__ */
|
|
2262
|
-
/* @__PURE__ */
|
|
2273
|
+
/* @__PURE__ */ s(_, { sx: { gap: 4 }, children: [
|
|
2274
|
+
/* @__PURE__ */ s(_, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
2263
2275
|
/* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: "body1", children: r }),
|
|
2264
|
-
/* @__PURE__ */ e(
|
|
2276
|
+
/* @__PURE__ */ e(Ie, { status: o })
|
|
2265
2277
|
] }),
|
|
2266
2278
|
/* @__PURE__ */ e(k, { color: "secondary", variant: "subtitle2", children: n })
|
|
2267
2279
|
] }),
|
|
@@ -2273,106 +2285,110 @@ const R = {
|
|
|
2273
2285
|
mr,
|
|
2274
2286
|
{
|
|
2275
2287
|
drawerFor: t,
|
|
2276
|
-
isOpen:
|
|
2277
|
-
onClose: () =>
|
|
2288
|
+
isOpen: a,
|
|
2289
|
+
onClose: () => d(!1),
|
|
2290
|
+
onSpendingClick: i,
|
|
2291
|
+
onTrendClick: c
|
|
2278
2292
|
}
|
|
2279
2293
|
)
|
|
2280
2294
|
] });
|
|
2281
|
-
}, gr = () => {
|
|
2282
|
-
const { finstrong:
|
|
2283
|
-
const
|
|
2284
|
-
GOOD:
|
|
2285
|
-
FAIR:
|
|
2286
|
-
OFF_TRACK:
|
|
2287
|
-
MISSING:
|
|
2288
|
-
},
|
|
2295
|
+
}, gr = ({ onTrendsClick: t, onSpendingClick: r }) => {
|
|
2296
|
+
const { finstrong: n } = w(), { key_indicators_spend: o } = n, { healthScore: c } = P(), i = (l) => {
|
|
2297
|
+
const p = bn(l), u = {
|
|
2298
|
+
GOOD: o.ratio_good_description,
|
|
2299
|
+
FAIR: o.ratio_fair_description,
|
|
2300
|
+
OFF_TRACK: o.ratio_off_track_description,
|
|
2301
|
+
MISSING: o.ratio_missing_description
|
|
2302
|
+
}, m = p === "MISSING" ? u[p] : Y(u[p], l);
|
|
2289
2303
|
return {
|
|
2290
|
-
cardState:
|
|
2291
|
-
description:
|
|
2292
|
-
title:
|
|
2304
|
+
cardState: p,
|
|
2305
|
+
description: m,
|
|
2306
|
+
title: o.ratio_card_title
|
|
2293
2307
|
};
|
|
2294
|
-
}, { spendToIncomeRatio:
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2297
|
-
|
|
2308
|
+
}, { spendToIncomeRatio: a, spendFeeCount: d } = h.useMemo(() => {
|
|
2309
|
+
const l = c.spend_to_income_ratio !== null ? Math.round(c.spend_to_income_ratio * 100) : null, p = i(l), u = yn(
|
|
2310
|
+
c.spending_fee_transaction_count,
|
|
2311
|
+
o
|
|
2298
2312
|
);
|
|
2299
|
-
return { spendToIncomeRatio:
|
|
2313
|
+
return { spendToIncomeRatio: p, spendFeeCount: u };
|
|
2300
2314
|
}, [
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2315
|
+
c.spend_to_income_ratio,
|
|
2316
|
+
c.spending_fee_transaction_count,
|
|
2317
|
+
o,
|
|
2318
|
+
n
|
|
2305
2319
|
]);
|
|
2306
|
-
return /* @__PURE__ */
|
|
2320
|
+
return /* @__PURE__ */ s(_, { sx: { gap: 24, p: 8, pt: 24 }, children: [
|
|
2307
2321
|
/* @__PURE__ */ e(
|
|
2308
|
-
|
|
2322
|
+
_e,
|
|
2309
2323
|
{
|
|
2310
|
-
cardState:
|
|
2311
|
-
description:
|
|
2324
|
+
cardState: a.cardState,
|
|
2325
|
+
description: a.description,
|
|
2312
2326
|
drawerFor: se.SpendLessThanYouMake,
|
|
2313
|
-
|
|
2327
|
+
onSpendingClick: r,
|
|
2328
|
+
onTrendClick: t,
|
|
2329
|
+
title: a.title
|
|
2314
2330
|
}
|
|
2315
2331
|
),
|
|
2316
2332
|
/* @__PURE__ */ e(
|
|
2317
|
-
|
|
2333
|
+
_e,
|
|
2318
2334
|
{
|
|
2319
|
-
cardState:
|
|
2320
|
-
description:
|
|
2335
|
+
cardState: d.cardState,
|
|
2336
|
+
description: d.description,
|
|
2321
2337
|
drawerFor: se.PayBillsOnTime,
|
|
2322
|
-
title:
|
|
2338
|
+
title: d.title
|
|
2323
2339
|
}
|
|
2324
2340
|
)
|
|
2325
2341
|
] });
|
|
2326
|
-
}, yr =
|
|
2327
|
-
const { healthScore: t } =
|
|
2328
|
-
const
|
|
2342
|
+
}, yr = x(gr), br = () => {
|
|
2343
|
+
const { healthScore: t } = P(), { finstrong: r } = w(), { key_indicators_save: n } = r, o = (d) => {
|
|
2344
|
+
const l = mt(d), p = {
|
|
2329
2345
|
GOOD: n.days_of_cash_good_description,
|
|
2330
2346
|
FAIR: n.days_of_cash_fair_description,
|
|
2331
2347
|
OFF_TRACK: n.days_of_cash_off_track_description,
|
|
2332
2348
|
MISSING: n.days_of_cash_missing_description
|
|
2333
|
-
},
|
|
2349
|
+
}, u = l === "MISSING" ? p[l] : Y(p[l], d);
|
|
2334
2350
|
return {
|
|
2335
|
-
cardState:
|
|
2336
|
-
description:
|
|
2351
|
+
cardState: l,
|
|
2352
|
+
description: u,
|
|
2337
2353
|
title: n.days_of_cash_title
|
|
2338
2354
|
};
|
|
2339
|
-
},
|
|
2340
|
-
const
|
|
2355
|
+
}, c = (d) => {
|
|
2356
|
+
const l = ht(d), p = {
|
|
2341
2357
|
GOOD: n.emergency_savings_good_description,
|
|
2342
2358
|
FAIR: n.emergency_savings_fair_description,
|
|
2343
2359
|
OFF_TRACK: n.emergency_savings_off_track_description,
|
|
2344
2360
|
MISSING: n.emergency_savings_missing_description
|
|
2345
2361
|
};
|
|
2346
|
-
let
|
|
2347
|
-
return
|
|
2348
|
-
p[
|
|
2349
|
-
|
|
2350
|
-
) :
|
|
2351
|
-
cardState:
|
|
2352
|
-
description:
|
|
2362
|
+
let u;
|
|
2363
|
+
return l === "FAIR" && d !== null ? u = Y(
|
|
2364
|
+
p[l],
|
|
2365
|
+
L(d, "0,0.00")
|
|
2366
|
+
) : u = p[l], {
|
|
2367
|
+
cardState: l,
|
|
2368
|
+
description: u,
|
|
2353
2369
|
title: n.emergency_savings_title
|
|
2354
2370
|
};
|
|
2355
|
-
}, { daysOfCashOnHand:
|
|
2356
|
-
const d = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null,
|
|
2357
|
-
return { daysOfCashOnHand:
|
|
2371
|
+
}, { daysOfCashOnHand: i, emergencySavings: a } = h.useMemo(() => {
|
|
2372
|
+
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, u = c(p);
|
|
2373
|
+
return { daysOfCashOnHand: l, emergencySavings: u };
|
|
2358
2374
|
}, [
|
|
2359
2375
|
t.months_of_cash_on_hand,
|
|
2360
2376
|
t.emergency_savings_on_hand,
|
|
2361
2377
|
n,
|
|
2362
2378
|
r
|
|
2363
2379
|
]);
|
|
2364
|
-
return /* @__PURE__ */
|
|
2380
|
+
return /* @__PURE__ */ s(_, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
2365
2381
|
/* @__PURE__ */ e(
|
|
2366
|
-
|
|
2382
|
+
_e,
|
|
2367
2383
|
{
|
|
2368
|
-
cardState:
|
|
2369
|
-
description:
|
|
2384
|
+
cardState: i.cardState,
|
|
2385
|
+
description: i.description,
|
|
2370
2386
|
drawerFor: se.SaveEnoughToLiveOn,
|
|
2371
|
-
title:
|
|
2387
|
+
title: i.title
|
|
2372
2388
|
}
|
|
2373
2389
|
),
|
|
2374
2390
|
/* @__PURE__ */ e(
|
|
2375
|
-
|
|
2391
|
+
_e,
|
|
2376
2392
|
{
|
|
2377
2393
|
cardState: a.cardState,
|
|
2378
2394
|
description: a.description,
|
|
@@ -2381,41 +2397,41 @@ const R = {
|
|
|
2381
2397
|
}
|
|
2382
2398
|
)
|
|
2383
2399
|
] });
|
|
2384
|
-
}, fr =
|
|
2385
|
-
const { healthScore: t } =
|
|
2386
|
-
const p = fn(
|
|
2400
|
+
}, fr = x(br), xr = () => {
|
|
2401
|
+
const { healthScore: t } = P(), { finstrong: r } = w(), { key_indicators_borrow: n } = r, { user: o } = Q(), c = (l) => {
|
|
2402
|
+
const p = fn(l), u = {
|
|
2387
2403
|
GOOD: n.manage_debit_good_description,
|
|
2388
2404
|
FAIR: n.manage_debit_fair_description,
|
|
2389
2405
|
OFF_TRACK: n.manage_debit_off_track_description,
|
|
2390
2406
|
MISSING: n.manage_debit_missing_description
|
|
2391
|
-
}, m = p === "FAIR" || p === "OFF_TRACK" ?
|
|
2407
|
+
}, m = p === "FAIR" || p === "OFF_TRACK" ? Y(u[p], l) : u[p];
|
|
2392
2408
|
return {
|
|
2393
2409
|
cardState: p,
|
|
2394
2410
|
description: m,
|
|
2395
2411
|
title: n.manage_debit_title
|
|
2396
2412
|
};
|
|
2397
|
-
},
|
|
2398
|
-
const p = _t(
|
|
2413
|
+
}, i = (l) => {
|
|
2414
|
+
const p = _t(l), u = {
|
|
2399
2415
|
GOOD: n.credit_score_good_description,
|
|
2400
2416
|
FAIR: n.credit_score_fair_description,
|
|
2401
2417
|
OFF_TRACK: n.credit_score_off_track_description,
|
|
2402
2418
|
MISSING: n.credit_score_missing_description
|
|
2403
|
-
}, m = p === "MISSING" ?
|
|
2419
|
+
}, m = p === "MISSING" ? u[p] : Y(u[p], l);
|
|
2404
2420
|
return {
|
|
2405
2421
|
cardState: p,
|
|
2406
2422
|
description: m,
|
|
2407
2423
|
title: n.credit_score_title
|
|
2408
2424
|
};
|
|
2409
2425
|
}, { manageDebtStatus: a, creditScoreStatus: d } = h.useMemo(() => {
|
|
2410
|
-
const
|
|
2426
|
+
const l = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, p = c(l), u = i(o.credit_score || null);
|
|
2411
2427
|
return {
|
|
2412
2428
|
manageDebtStatus: p,
|
|
2413
|
-
creditScoreStatus:
|
|
2429
|
+
creditScoreStatus: u
|
|
2414
2430
|
};
|
|
2415
2431
|
}, [t.debt_to_income_ratio, o.credit_score, n, r]);
|
|
2416
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ s(_, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
2417
2433
|
/* @__PURE__ */ e(
|
|
2418
|
-
|
|
2434
|
+
_e,
|
|
2419
2435
|
{
|
|
2420
2436
|
cardState: a.cardState,
|
|
2421
2437
|
description: a.description,
|
|
@@ -2424,7 +2440,7 @@ const R = {
|
|
|
2424
2440
|
}
|
|
2425
2441
|
),
|
|
2426
2442
|
/* @__PURE__ */ e(
|
|
2427
|
-
|
|
2443
|
+
_e,
|
|
2428
2444
|
{
|
|
2429
2445
|
cardState: d.cardState,
|
|
2430
2446
|
description: d.description,
|
|
@@ -2433,15 +2449,15 @@ const R = {
|
|
|
2433
2449
|
}
|
|
2434
2450
|
)
|
|
2435
2451
|
] });
|
|
2436
|
-
}, Sr =
|
|
2437
|
-
const [
|
|
2438
|
-
return /* @__PURE__ */
|
|
2439
|
-
/* @__PURE__ */
|
|
2452
|
+
}, Sr = x(xr), Cr = ({ onTrendsClick: t, onSpendingClick: r }) => {
|
|
2453
|
+
const [n, o] = h.useState(0), { finstrong: c } = w();
|
|
2454
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
2455
|
+
/* @__PURE__ */ s(
|
|
2440
2456
|
Ge,
|
|
2441
2457
|
{
|
|
2442
2458
|
"aria-label": "Key Indicators",
|
|
2443
2459
|
centered: !0,
|
|
2444
|
-
onChange: (
|
|
2460
|
+
onChange: (i, a) => o(a),
|
|
2445
2461
|
sx: {
|
|
2446
2462
|
mb: 0,
|
|
2447
2463
|
"& .MuiTab-root": {
|
|
@@ -2449,7 +2465,7 @@ const R = {
|
|
|
2449
2465
|
}
|
|
2450
2466
|
},
|
|
2451
2467
|
textColor: "primary",
|
|
2452
|
-
value:
|
|
2468
|
+
value: n,
|
|
2453
2469
|
variant: "fullWidth",
|
|
2454
2470
|
children: [
|
|
2455
2471
|
/* @__PURE__ */ e(
|
|
@@ -2459,7 +2475,7 @@ const R = {
|
|
|
2459
2475
|
icon: /* @__PURE__ */ e($e, { sx: { mr: 8 } }),
|
|
2460
2476
|
iconPosition: "start",
|
|
2461
2477
|
id: "spend-details-tab-0",
|
|
2462
|
-
label:
|
|
2478
|
+
label: c.key_indicators_spend.title,
|
|
2463
2479
|
sx: { minHeight: 44 }
|
|
2464
2480
|
}
|
|
2465
2481
|
),
|
|
@@ -2470,7 +2486,7 @@ const R = {
|
|
|
2470
2486
|
icon: /* @__PURE__ */ e(Qt, { sx: { mr: 8 } }),
|
|
2471
2487
|
iconPosition: "start",
|
|
2472
2488
|
id: "save-details-tab-1",
|
|
2473
|
-
label:
|
|
2489
|
+
label: c.key_indicators_save.title,
|
|
2474
2490
|
sx: { minHeight: 44 }
|
|
2475
2491
|
}
|
|
2476
2492
|
),
|
|
@@ -2481,27 +2497,27 @@ const R = {
|
|
|
2481
2497
|
icon: /* @__PURE__ */ e(Jt, { sx: { mr: 8 } }),
|
|
2482
2498
|
iconPosition: "start",
|
|
2483
2499
|
id: "borrow-details-tab-2",
|
|
2484
|
-
label:
|
|
2500
|
+
label: c.key_indicators_borrow.title,
|
|
2485
2501
|
sx: { minHeight: 44 }
|
|
2486
2502
|
}
|
|
2487
2503
|
)
|
|
2488
2504
|
]
|
|
2489
2505
|
}
|
|
2490
2506
|
),
|
|
2491
|
-
/* @__PURE__ */ e(ae, { index: 0, name: "spend-details", value:
|
|
2492
|
-
/* @__PURE__ */ e(ae, { index: 1, name: "save-details", value:
|
|
2493
|
-
/* @__PURE__ */ e(ae, { index: 2, name: "borrow-details", value:
|
|
2507
|
+
/* @__PURE__ */ e(ae, { index: 0, name: "spend-details", value: n, children: /* @__PURE__ */ e(yr, { onSpendingClick: r, onTrendsClick: t }) }),
|
|
2508
|
+
/* @__PURE__ */ e(ae, { index: 1, name: "save-details", value: n, children: /* @__PURE__ */ e(fr, {}) }),
|
|
2509
|
+
/* @__PURE__ */ e(ae, { index: 2, name: "borrow-details", value: n, children: /* @__PURE__ */ e(Sr, {}) })
|
|
2494
2510
|
] });
|
|
2495
|
-
}, vr =
|
|
2496
|
-
const { finstrong: r } =
|
|
2497
|
-
return n ? /* @__PURE__ */
|
|
2511
|
+
}, vr = x(Cr), wr = ({ onClick: t }) => {
|
|
2512
|
+
const { finstrong: r } = w(), { isCopyLoaded: n } = U();
|
|
2513
|
+
return n ? /* @__PURE__ */ s(_, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
|
2498
2514
|
/* @__PURE__ */ e(lt, { size: 48 }),
|
|
2499
|
-
/* @__PURE__ */
|
|
2500
|
-
/* @__PURE__ */ e(
|
|
2515
|
+
/* @__PURE__ */ s(_, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
|
2516
|
+
/* @__PURE__ */ e(X, { children: r.missing_data_title }),
|
|
2501
2517
|
/* @__PURE__ */ e(k, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: r.missing_data_description })
|
|
2502
2518
|
] }),
|
|
2503
2519
|
/* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
2504
|
-
|
|
2520
|
+
W,
|
|
2505
2521
|
{
|
|
2506
2522
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
2507
2523
|
onClick: t,
|
|
@@ -2517,23 +2533,23 @@ const R = {
|
|
|
2517
2533
|
}
|
|
2518
2534
|
) })
|
|
2519
2535
|
] }) : /* @__PURE__ */ e(te, {});
|
|
2520
|
-
}, kr =
|
|
2536
|
+
}, kr = x(wr), Ar = {
|
|
2521
2537
|
add_more_income: "Add More Income"
|
|
2522
2538
|
}, Dr = ({
|
|
2523
2539
|
incomeTransactions: t,
|
|
2524
2540
|
setCurrentStep: r,
|
|
2525
2541
|
transaction: n
|
|
2526
|
-
}) => /* @__PURE__ */
|
|
2527
|
-
/* @__PURE__ */
|
|
2528
|
-
!!t.length && /* @__PURE__ */ e(A, { sx: { pb: 24 }, children: t.reduce((o,
|
|
2529
|
-
if (
|
|
2530
|
-
const a = Le(
|
|
2542
|
+
}) => /* @__PURE__ */ s(h.Fragment, { children: [
|
|
2543
|
+
/* @__PURE__ */ s(_, { children: [
|
|
2544
|
+
!!t.length && /* @__PURE__ */ e(A, { sx: { pb: 24 }, children: t.reduce((o, c, i) => {
|
|
2545
|
+
if (c.guid === n.guid) return o;
|
|
2546
|
+
const a = Le(i, t), d = At(i, t);
|
|
2531
2547
|
return o.push(
|
|
2532
|
-
/* @__PURE__ */
|
|
2533
|
-
a && /* @__PURE__ */ e(Dt, { children: Ne(
|
|
2534
|
-
/* @__PURE__ */ e(Mt, { transaction:
|
|
2548
|
+
/* @__PURE__ */ s(h.Fragment, { children: [
|
|
2549
|
+
a && /* @__PURE__ */ e(Dt, { children: Ne(c.date) }),
|
|
2550
|
+
/* @__PURE__ */ e(Mt, { transaction: c }),
|
|
2535
2551
|
/* @__PURE__ */ e(ee, { sx: { ml: d ? 44 : 0 } })
|
|
2536
|
-
] },
|
|
2552
|
+
] }, c.guid)
|
|
2537
2553
|
), o;
|
|
2538
2554
|
}, []) }),
|
|
2539
2555
|
/* @__PURE__ */ e(
|
|
@@ -2553,19 +2569,19 @@ const R = {
|
|
|
2553
2569
|
)
|
|
2554
2570
|
] }),
|
|
2555
2571
|
/* @__PURE__ */ e(A, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
2556
|
-
|
|
2572
|
+
W,
|
|
2557
2573
|
{
|
|
2558
2574
|
fullWidth: !0,
|
|
2559
|
-
onClick: () => r({ step:
|
|
2575
|
+
onClick: () => r({ step: I.MonthlyIncome, type: "main" }),
|
|
2560
2576
|
startIcon: /* @__PURE__ */ e(dt, {}),
|
|
2561
2577
|
children: Ar.add_more_income
|
|
2562
2578
|
}
|
|
2563
2579
|
) })
|
|
2564
|
-
] }), Mr =
|
|
2580
|
+
] }), Mr = x(Dr), Ir = {
|
|
2565
2581
|
select_date: "Select Date"
|
|
2566
2582
|
}, Tr = ({ selectedDate: t, setSelectedDate: r }) => {
|
|
2567
|
-
const n =
|
|
2568
|
-
r(Math.floor(new Date(
|
|
2583
|
+
const n = G(), o = (c) => {
|
|
2584
|
+
r(Math.floor(new Date(c).getTime() / 1e3));
|
|
2569
2585
|
};
|
|
2570
2586
|
return /* @__PURE__ */ e(A, { sx: { p: 24 }, children: /* @__PURE__ */ e(Jn, { dateAdapter: Ot, children: /* @__PURE__ */ e(
|
|
2571
2587
|
eo,
|
|
@@ -2577,13 +2593,13 @@ const R = {
|
|
|
2577
2593
|
nextIconButton: {
|
|
2578
2594
|
sx: {
|
|
2579
2595
|
color: "primary.main",
|
|
2580
|
-
"&:hover": { bgcolor:
|
|
2596
|
+
"&:hover": { bgcolor: ue(n.palette.primary.light, 0.1) }
|
|
2581
2597
|
}
|
|
2582
2598
|
},
|
|
2583
2599
|
previousIconButton: {
|
|
2584
2600
|
sx: {
|
|
2585
2601
|
color: "primary.main",
|
|
2586
|
-
"&:hover": { bgcolor:
|
|
2602
|
+
"&:hover": { bgcolor: ue(n.palette.primary.light, 0.1) }
|
|
2587
2603
|
}
|
|
2588
2604
|
}
|
|
2589
2605
|
},
|
|
@@ -2591,18 +2607,18 @@ const R = {
|
|
|
2591
2607
|
width: "100%",
|
|
2592
2608
|
"& .MuiIconButton-edgeEnd": {
|
|
2593
2609
|
color: "primary.main",
|
|
2594
|
-
"&:hover": { bgcolor:
|
|
2610
|
+
"&:hover": { bgcolor: ue(n.palette.primary.light, 0.1) }
|
|
2595
2611
|
}
|
|
2596
2612
|
},
|
|
2597
2613
|
value: t ? new Date(t * 1e3) : null
|
|
2598
2614
|
}
|
|
2599
2615
|
) }) });
|
|
2600
|
-
}, Or =
|
|
2616
|
+
}, Or = x(Tr), Fr = {
|
|
2601
2617
|
credit_score: "Credit Score"
|
|
2602
2618
|
}, Pr = ({ creditScore: t, setCreditScore: r }) => {
|
|
2603
2619
|
const n = !isNaN(t);
|
|
2604
2620
|
return /* @__PURE__ */ e(A, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2605
|
-
|
|
2621
|
+
ke,
|
|
2606
2622
|
{
|
|
2607
2623
|
error: !n,
|
|
2608
2624
|
fullWidth: !0,
|
|
@@ -2616,8 +2632,8 @@ const R = {
|
|
|
2616
2632
|
value: n ? t : ""
|
|
2617
2633
|
}
|
|
2618
2634
|
) });
|
|
2619
|
-
}, Rr =
|
|
2620
|
-
/* @__PURE__ */ e(
|
|
2635
|
+
}, Rr = x(Pr), Et = ({ value: t, completeCopy: r }) => /* @__PURE__ */ s(_, { sx: { gap: 8 }, children: [
|
|
2636
|
+
/* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: Array.from({ length: 4 }).map((n, o) => /* @__PURE__ */ e(
|
|
2621
2637
|
A,
|
|
2622
2638
|
{
|
|
2623
2639
|
sx: {
|
|
@@ -2629,7 +2645,7 @@ const R = {
|
|
|
2629
2645
|
},
|
|
2630
2646
|
o
|
|
2631
2647
|
)) }),
|
|
2632
|
-
/* @__PURE__ */
|
|
2648
|
+
/* @__PURE__ */ s(T, { sx: { color: "text.secondary" }, variant: "body2", children: [
|
|
2633
2649
|
t / 4 * 100,
|
|
2634
2650
|
"% ",
|
|
2635
2651
|
r
|
|
@@ -2639,16 +2655,16 @@ const R = {
|
|
|
2639
2655
|
primaryText: r,
|
|
2640
2656
|
secondaryText: n,
|
|
2641
2657
|
value: o
|
|
2642
|
-
}) => /* @__PURE__ */
|
|
2643
|
-
/* @__PURE__ */
|
|
2644
|
-
/* @__PURE__ */ e(
|
|
2658
|
+
}) => /* @__PURE__ */ s(_, { sx: { gap: 20, p: 24 }, children: [
|
|
2659
|
+
/* @__PURE__ */ s(_, { sx: { gap: 8 }, children: [
|
|
2660
|
+
/* @__PURE__ */ e(X, { children: r }),
|
|
2645
2661
|
/* @__PURE__ */ e(k, { variant: "subtitle1", children: n })
|
|
2646
2662
|
] }),
|
|
2647
2663
|
/* @__PURE__ */ e(Et, { completeCopy: t, value: o })
|
|
2648
2664
|
] }), at = {
|
|
2649
|
-
step:
|
|
2665
|
+
step: I.ConnectAccounts,
|
|
2650
2666
|
type: "main"
|
|
2651
|
-
},
|
|
2667
|
+
}, R = {
|
|
2652
2668
|
add_accounts: "Add Accounts",
|
|
2653
2669
|
add_income_primary: "What is your monthly income?",
|
|
2654
2670
|
add_income_secondary: "Add your income so that we can accurately measure your financial strength.",
|
|
@@ -2667,167 +2683,167 @@ const R = {
|
|
|
2667
2683
|
do_it_later: "Do It Later",
|
|
2668
2684
|
next: "Next"
|
|
2669
2685
|
}, Lr = ({ isOpen: t, onClose: r }) => {
|
|
2670
|
-
const { visibleAccounts: n } =
|
|
2686
|
+
const { visibleAccounts: n } = xe(), { calculateHealthScore: o } = P(), { finstrong: c } = w(), { setSelectedAccounts: i } = U(), { setDateRange: a } = kn(), { filter: d, setFilter: l, transactions: p } = An(), { user: u, userProfile: m, updateUser: g, updateUserProfile: S } = Q(), [C, b] = h.useState(u.credit_score || 0), [v, y] = h.useState(
|
|
2671
2687
|
at
|
|
2672
|
-
), [
|
|
2688
|
+
), [f, D] = h.useState([]), [F, H] = h.useState(!1), [O, N] = h.useState(!1), [E, ce] = h.useState(u.birthday), [j, oe] = h.useState("");
|
|
2673
2689
|
h.useEffect(() => {
|
|
2674
2690
|
a({ start: It(tt()), end: Tt(tt()) });
|
|
2675
2691
|
}, []), h.useEffect(() => {
|
|
2676
|
-
|
|
2677
|
-
accounts: n.map((
|
|
2692
|
+
l({
|
|
2693
|
+
accounts: n.map((M) => M.guid),
|
|
2678
2694
|
dateRange: {
|
|
2679
2695
|
start: Un(/* @__PURE__ */ new Date(), 90),
|
|
2680
2696
|
end: /* @__PURE__ */ new Date()
|
|
2681
2697
|
},
|
|
2682
2698
|
custom: nt
|
|
2683
|
-
}),
|
|
2699
|
+
}), i(n);
|
|
2684
2700
|
}, [n]);
|
|
2685
2701
|
const le = h.useMemo(
|
|
2686
|
-
() => p.find((
|
|
2702
|
+
() => p.find((M) => M.guid === j),
|
|
2687
2703
|
[j, p]
|
|
2688
|
-
),
|
|
2689
|
-
[
|
|
2690
|
-
[
|
|
2691
|
-
[
|
|
2692
|
-
[
|
|
2693
|
-
})[
|
|
2694
|
-
const { step:
|
|
2695
|
-
let
|
|
2696
|
-
return
|
|
2697
|
-
}, [
|
|
2698
|
-
|
|
2704
|
+
), de = h.useMemo(() => ({
|
|
2705
|
+
[I.ConnectAccounts]: !0,
|
|
2706
|
+
[I.MonthlyIncome]: !!j,
|
|
2707
|
+
[I.Birthday]: !!u.birthday || !!E,
|
|
2708
|
+
[I.CreditScore]: !!u.credit_score || !!C
|
|
2709
|
+
})[v.step], [C, v, E, j, u]), V = n.length > 0, me = h.useMemo(() => {
|
|
2710
|
+
const { step: M } = v;
|
|
2711
|
+
let $ = 0;
|
|
2712
|
+
return M >= I.MonthlyIncome && V && $++, M >= I.Birthday && f.length && $++, M >= I.CreditScore && (u.birthday || u.credit_score) && $++, $;
|
|
2713
|
+
}, [v.step, V, f.length, u.birthday, u.credit_score]), Se = (M) => {
|
|
2714
|
+
l({
|
|
2699
2715
|
...d,
|
|
2700
|
-
custom: (
|
|
2716
|
+
custom: ($) => M ? Qn($, M) : nt($)
|
|
2701
2717
|
});
|
|
2702
2718
|
}, zt = {
|
|
2703
|
-
[
|
|
2704
|
-
main:
|
|
2705
|
-
mainActionContent:
|
|
2706
|
-
primaryText:
|
|
2707
|
-
secondaryText:
|
|
2719
|
+
[I.ConnectAccounts]: {
|
|
2720
|
+
main: V ? /* @__PURE__ */ e(Lt, { shouldShowBalance: !1 }) : null,
|
|
2721
|
+
mainActionContent: V ? R.next : R.add_accounts,
|
|
2722
|
+
primaryText: R.connect_your_accounts_primary,
|
|
2723
|
+
secondaryText: R.connect_your_accounts_secondary
|
|
2708
2724
|
},
|
|
2709
|
-
[
|
|
2725
|
+
[I.MonthlyIncome]: {
|
|
2710
2726
|
detail: /* @__PURE__ */ e(
|
|
2711
2727
|
Mr,
|
|
2712
2728
|
{
|
|
2713
|
-
incomeTransactions:
|
|
2714
|
-
setCurrentStep: (
|
|
2715
|
-
y(
|
|
2716
|
-
if (
|
|
2717
|
-
const Xe = p.find((
|
|
2718
|
-
return Xe ? [
|
|
2729
|
+
incomeTransactions: f,
|
|
2730
|
+
setCurrentStep: (M) => {
|
|
2731
|
+
y(M), D(($) => {
|
|
2732
|
+
if ($.some((ge) => ge.guid === j)) return $.filter((ge) => ge.guid !== j);
|
|
2733
|
+
const Xe = p.find((ge) => ge.guid === j);
|
|
2734
|
+
return Xe ? [...$, Xe] : $;
|
|
2719
2735
|
});
|
|
2720
2736
|
},
|
|
2721
2737
|
transaction: le
|
|
2722
2738
|
}
|
|
2723
2739
|
),
|
|
2724
|
-
detailActionContent:
|
|
2740
|
+
detailActionContent: R.confirm_income,
|
|
2725
2741
|
main: /* @__PURE__ */ e(
|
|
2726
2742
|
Zn,
|
|
2727
2743
|
{
|
|
2728
|
-
onSearch:
|
|
2729
|
-
onSelected: (
|
|
2730
|
-
y({ step:
|
|
2744
|
+
onSearch: Se,
|
|
2745
|
+
onSelected: (M) => {
|
|
2746
|
+
y({ step: I.MonthlyIncome, type: "detail" }), oe(M);
|
|
2731
2747
|
}
|
|
2732
2748
|
}
|
|
2733
2749
|
),
|
|
2734
|
-
mainActionContent:
|
|
2735
|
-
primaryText:
|
|
2736
|
-
secondaryText:
|
|
2750
|
+
mainActionContent: R.confirm_income,
|
|
2751
|
+
primaryText: R.add_income_primary,
|
|
2752
|
+
secondaryText: R.add_income_secondary
|
|
2737
2753
|
},
|
|
2738
|
-
[
|
|
2739
|
-
main: /* @__PURE__ */ e(Or, { selectedDate:
|
|
2740
|
-
mainActionContent:
|
|
2741
|
-
primaryText:
|
|
2742
|
-
secondaryText:
|
|
2754
|
+
[I.Birthday]: {
|
|
2755
|
+
main: /* @__PURE__ */ e(Or, { selectedDate: E, setSelectedDate: ce }),
|
|
2756
|
+
mainActionContent: R.next,
|
|
2757
|
+
primaryText: R.birthday_primary,
|
|
2758
|
+
secondaryText: R.birthday_secondary
|
|
2743
2759
|
},
|
|
2744
|
-
[
|
|
2745
|
-
main: /* @__PURE__ */ e(Rr, { creditScore:
|
|
2746
|
-
mainActionContent:
|
|
2747
|
-
primaryText:
|
|
2748
|
-
secondaryText:
|
|
2760
|
+
[I.CreditScore]: {
|
|
2761
|
+
main: /* @__PURE__ */ e(Rr, { creditScore: C, setCreditScore: b }),
|
|
2762
|
+
mainActionContent: R.next,
|
|
2763
|
+
primaryText: R.credit_score_primary,
|
|
2764
|
+
secondaryText: R.credit_score_secondary
|
|
2749
2765
|
}
|
|
2750
2766
|
}, je = () => {
|
|
2751
|
-
y(at),
|
|
2767
|
+
y(at), H(!1), oe(""), r();
|
|
2752
2768
|
}, Ve = async () => {
|
|
2753
|
-
|
|
2769
|
+
H(!0), await o(), await S({ ...m, has_completed_finstrong_onboarding: !0 }), je();
|
|
2754
2770
|
}, Gt = () => {
|
|
2755
|
-
if (
|
|
2771
|
+
if (v.step === I.CreditScore) {
|
|
2756
2772
|
Ve();
|
|
2757
2773
|
return;
|
|
2758
2774
|
}
|
|
2759
|
-
y({ step:
|
|
2775
|
+
y({ step: v.step + 1, type: "main" });
|
|
2760
2776
|
}, Ht = () => {
|
|
2761
|
-
const { step:
|
|
2762
|
-
switch (
|
|
2763
|
-
case
|
|
2764
|
-
|
|
2777
|
+
const { step: M } = v, $ = M + 1;
|
|
2778
|
+
switch (M) {
|
|
2779
|
+
case I.Birthday:
|
|
2780
|
+
E && E !== u.birthday && g({ ...u, birthday: E });
|
|
2765
2781
|
break;
|
|
2766
|
-
case
|
|
2767
|
-
|
|
2782
|
+
case I.CreditScore:
|
|
2783
|
+
C && C !== u.credit_score && g({ ...u, credit_score: C }), Ve();
|
|
2768
2784
|
return;
|
|
2769
|
-
case
|
|
2770
|
-
j &&
|
|
2785
|
+
case I.MonthlyIncome:
|
|
2786
|
+
j && f.length === 0 && D((Ye) => [...Ye, le]);
|
|
2771
2787
|
break;
|
|
2772
|
-
case
|
|
2773
|
-
if (!
|
|
2774
|
-
|
|
2788
|
+
case I.ConnectAccounts:
|
|
2789
|
+
if (!V) {
|
|
2790
|
+
N(!0);
|
|
2775
2791
|
return;
|
|
2776
2792
|
}
|
|
2777
2793
|
break;
|
|
2778
2794
|
}
|
|
2779
|
-
|
|
2795
|
+
$ in I && y({ step: $, type: "main" });
|
|
2780
2796
|
}, Nt = () => {
|
|
2781
|
-
const { step:
|
|
2782
|
-
if (
|
|
2783
|
-
y({ step:
|
|
2797
|
+
const { step: M, type: $ } = v;
|
|
2798
|
+
if ($ === "detail") {
|
|
2799
|
+
y({ step: M, type: "main" });
|
|
2784
2800
|
return;
|
|
2785
2801
|
}
|
|
2786
|
-
if (
|
|
2787
|
-
y({ step:
|
|
2802
|
+
if (M === I.Birthday && f.length) {
|
|
2803
|
+
y({ step: M - 1, type: "detail" });
|
|
2788
2804
|
return;
|
|
2789
2805
|
}
|
|
2790
|
-
|
|
2791
|
-
},
|
|
2806
|
+
M > I.ConnectAccounts && y({ step: M - 1, type: "main" });
|
|
2807
|
+
}, pe = zt[v.step], Ce = v.step === I.ConnectAccounts, Kt = {
|
|
2792
2808
|
fullWidth: !0,
|
|
2793
|
-
...
|
|
2794
|
-
}, jt = !
|
|
2795
|
-
return /* @__PURE__ */
|
|
2796
|
-
/* @__PURE__ */
|
|
2809
|
+
...Ce && !V && { startIcon: /* @__PURE__ */ e(dt, {}) }
|
|
2810
|
+
}, jt = !Ce || Ce && !V;
|
|
2811
|
+
return /* @__PURE__ */ s(h.Fragment, { children: [
|
|
2812
|
+
/* @__PURE__ */ s(
|
|
2797
2813
|
ie,
|
|
2798
2814
|
{
|
|
2799
2815
|
footerStyles: { px: 24, py: 16 },
|
|
2800
|
-
hasSecondaryAction: !
|
|
2816
|
+
hasSecondaryAction: !Ce,
|
|
2801
2817
|
isOpen: t,
|
|
2802
|
-
isPrimaryDisabled: !
|
|
2818
|
+
isPrimaryDisabled: !de,
|
|
2803
2819
|
onClose: je,
|
|
2804
2820
|
onSecondaryAction: Nt,
|
|
2805
2821
|
primaryButtonProps: Kt,
|
|
2806
|
-
primaryText:
|
|
2822
|
+
primaryText: pe?.mainActionContent,
|
|
2807
2823
|
secondaryColor: "primary",
|
|
2808
|
-
secondaryText:
|
|
2809
|
-
title:
|
|
2810
|
-
...!
|
|
2824
|
+
secondaryText: R.back,
|
|
2825
|
+
title: c.title,
|
|
2826
|
+
...!F && { onPrimaryAction: Ht },
|
|
2811
2827
|
children: [
|
|
2812
|
-
|
|
2813
|
-
/* @__PURE__ */ e(
|
|
2814
|
-
/* @__PURE__ */ e(k, { sx: { textAlign: "center" }, variant: "subtitle1", children:
|
|
2828
|
+
F && /* @__PURE__ */ s(_, { sx: { alignItems: "center", gap: 24, position: "relative", px: 16, top: 126 }, children: [
|
|
2829
|
+
/* @__PURE__ */ e(De, { children: R.calculate_primary }),
|
|
2830
|
+
/* @__PURE__ */ e(k, { sx: { textAlign: "center" }, variant: "subtitle1", children: R.calculate_secondary })
|
|
2815
2831
|
] }),
|
|
2816
|
-
|
|
2832
|
+
pe && !F && /* @__PURE__ */ s(h.Fragment, { children: [
|
|
2817
2833
|
/* @__PURE__ */ e(
|
|
2818
2834
|
Br,
|
|
2819
2835
|
{
|
|
2820
|
-
completeCopy:
|
|
2821
|
-
primaryText:
|
|
2822
|
-
secondaryText:
|
|
2823
|
-
value:
|
|
2836
|
+
completeCopy: c.complete,
|
|
2837
|
+
primaryText: pe.primaryText,
|
|
2838
|
+
secondaryText: pe.secondaryText,
|
|
2839
|
+
value: me
|
|
2824
2840
|
}
|
|
2825
2841
|
),
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
jt && /* @__PURE__ */ e(
|
|
2842
|
+
v.type === "main" && /* @__PURE__ */ s(A, { children: [
|
|
2843
|
+
pe.main,
|
|
2844
|
+
jt && /* @__PURE__ */ e(_, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e(W, { fullWidth: !0, onClick: Gt, children: R.do_it_later }) })
|
|
2829
2845
|
] }),
|
|
2830
|
-
|
|
2846
|
+
v.type === "detail" && pe.detail
|
|
2831
2847
|
] })
|
|
2832
2848
|
]
|
|
2833
2849
|
}
|
|
@@ -2835,21 +2851,21 @@ const R = {
|
|
|
2835
2851
|
/* @__PURE__ */ e(
|
|
2836
2852
|
ne,
|
|
2837
2853
|
{
|
|
2838
|
-
onClose: () =>
|
|
2839
|
-
showConnectWidget:
|
|
2840
|
-
title:
|
|
2854
|
+
onClose: () => N(!1),
|
|
2855
|
+
showConnectWidget: O,
|
|
2856
|
+
title: R.connect_accounts
|
|
2841
2857
|
}
|
|
2842
2858
|
)
|
|
2843
2859
|
] });
|
|
2844
|
-
}, $r =
|
|
2860
|
+
}, $r = x(Lr), Re = {
|
|
2845
2861
|
onboarding_title: "Financial Strength Starts Here",
|
|
2846
2862
|
onboarding_subtitle: "By analyzing your spending and saving, FinStrong provides a score and guidance to help you improve your financial habits.",
|
|
2847
2863
|
get_started: "Get Started"
|
|
2848
2864
|
}, Wr = () => {
|
|
2849
2865
|
const [t, r] = h.useState(!1);
|
|
2850
|
-
return /* @__PURE__ */
|
|
2851
|
-
/* @__PURE__ */
|
|
2852
|
-
|
|
2866
|
+
return /* @__PURE__ */ s(h.Fragment, { children: [
|
|
2867
|
+
/* @__PURE__ */ s(
|
|
2868
|
+
_,
|
|
2853
2869
|
{
|
|
2854
2870
|
sx: {
|
|
2855
2871
|
alignItems: "center",
|
|
@@ -2859,22 +2875,22 @@ const R = {
|
|
|
2859
2875
|
px: 16
|
|
2860
2876
|
},
|
|
2861
2877
|
children: [
|
|
2862
|
-
/* @__PURE__ */
|
|
2878
|
+
/* @__PURE__ */ s(_, { sx: { alignItems: { sm: "center" }, gap: 24, width: "100%" }, children: [
|
|
2863
2879
|
/* @__PURE__ */ e(A, { sx: { textAlign: "center" }, children: /* @__PURE__ */ e(en, { size: 72 }) }),
|
|
2864
|
-
/* @__PURE__ */
|
|
2865
|
-
/* @__PURE__ */ e(
|
|
2880
|
+
/* @__PURE__ */ s(_, { sx: { gap: 4, textAlign: "center", width: { sm: 400 } }, children: [
|
|
2881
|
+
/* @__PURE__ */ e(De, { children: Re.onboarding_title }),
|
|
2866
2882
|
/* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle1", children: Re.onboarding_subtitle })
|
|
2867
2883
|
] })
|
|
2868
2884
|
] }),
|
|
2869
|
-
/* @__PURE__ */ e(
|
|
2885
|
+
/* @__PURE__ */ e(W, { onClick: () => r(!0), variant: "contained", children: Re.get_started })
|
|
2870
2886
|
]
|
|
2871
2887
|
}
|
|
2872
2888
|
),
|
|
2873
2889
|
/* @__PURE__ */ e($r, { isOpen: t, onClose: () => r(!1) })
|
|
2874
2890
|
] });
|
|
2875
2891
|
}, Er = ({ isOpen: t, onClose: r }) => {
|
|
2876
|
-
const { finstrong: n } =
|
|
2877
|
-
d(Math.floor(new Date(
|
|
2892
|
+
const { finstrong: n } = w(), o = G(), { updateUser: c, user: i } = Q(), [a, d] = h.useState(i.birthday), l = (u) => {
|
|
2893
|
+
d(Math.floor(new Date(u).getTime() / 1e3));
|
|
2878
2894
|
};
|
|
2879
2895
|
return /* @__PURE__ */ e(
|
|
2880
2896
|
ie,
|
|
@@ -2882,7 +2898,7 @@ const R = {
|
|
|
2882
2898
|
isOpen: t,
|
|
2883
2899
|
onClose: r,
|
|
2884
2900
|
onPrimaryAction: () => {
|
|
2885
|
-
!a || a ===
|
|
2901
|
+
!a || a === i.birthday || (c({ ...i, birthday: a }), r());
|
|
2886
2902
|
},
|
|
2887
2903
|
onSecondaryAction: r,
|
|
2888
2904
|
title: n.date_of_birth,
|
|
@@ -2890,18 +2906,18 @@ const R = {
|
|
|
2890
2906
|
to,
|
|
2891
2907
|
{
|
|
2892
2908
|
disableFuture: !0,
|
|
2893
|
-
onChange:
|
|
2909
|
+
onChange: l,
|
|
2894
2910
|
slotProps: {
|
|
2895
2911
|
nextIconButton: {
|
|
2896
2912
|
sx: {
|
|
2897
2913
|
color: "primary.main",
|
|
2898
|
-
"&:hover": { bgcolor:
|
|
2914
|
+
"&:hover": { bgcolor: ue(o.palette.primary.light, 0.1) }
|
|
2899
2915
|
}
|
|
2900
2916
|
},
|
|
2901
2917
|
previousIconButton: {
|
|
2902
2918
|
sx: {
|
|
2903
2919
|
color: "primary.main",
|
|
2904
|
-
"&:hover": { bgcolor:
|
|
2920
|
+
"&:hover": { bgcolor: ue(o.palette.primary.light, 0.1) }
|
|
2905
2921
|
}
|
|
2906
2922
|
}
|
|
2907
2923
|
},
|
|
@@ -2913,7 +2929,7 @@ const R = {
|
|
|
2913
2929
|
width: "100%",
|
|
2914
2930
|
"& .MuiIconButton-edgeEnd": {
|
|
2915
2931
|
color: "primary.main",
|
|
2916
|
-
"&:hover": { bgcolor:
|
|
2932
|
+
"&:hover": { bgcolor: ue(o.palette.primary.light, 0.1) }
|
|
2917
2933
|
}
|
|
2918
2934
|
},
|
|
2919
2935
|
value: a ? new Date(a * 1e3) : /* @__PURE__ */ new Date()
|
|
@@ -2921,12 +2937,12 @@ const R = {
|
|
|
2921
2937
|
) })
|
|
2922
2938
|
}
|
|
2923
2939
|
);
|
|
2924
|
-
}, zr =
|
|
2925
|
-
const { visibleFinstrongAccounts: n } =
|
|
2926
|
-
accounts:
|
|
2927
|
-
common:
|
|
2940
|
+
}, zr = x(Er), Gr = ({ isOpen: t, onClose: r }) => {
|
|
2941
|
+
const { visibleFinstrongAccounts: n } = xe(), { incomeBudget: o } = yt(), {
|
|
2942
|
+
accounts: c,
|
|
2943
|
+
common: i,
|
|
2928
2944
|
finstrong: a
|
|
2929
|
-
} =
|
|
2945
|
+
} = w(), { user: d } = Q(), [l, p] = h.useState(null), m = [
|
|
2930
2946
|
{
|
|
2931
2947
|
dynamicCopy: a.add_profile_item,
|
|
2932
2948
|
fallbackLabel: a.monthly_income,
|
|
@@ -2956,81 +2972,81 @@ const R = {
|
|
|
2956
2972
|
icon: /* @__PURE__ */ e(ct, {}),
|
|
2957
2973
|
key: J.Connections,
|
|
2958
2974
|
label: a.connections,
|
|
2959
|
-
value: n.length > 0 ?
|
|
2975
|
+
value: n.length > 0 ? Y(
|
|
2960
2976
|
a.connected_account,
|
|
2961
2977
|
String(n.length),
|
|
2962
2978
|
n.length > 1 ? a.accounts : a.account
|
|
2963
2979
|
) : void 0
|
|
2964
2980
|
}
|
|
2965
2981
|
].map((g) => xn(g));
|
|
2966
|
-
return /* @__PURE__ */
|
|
2967
|
-
/* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */ e(
|
|
2982
|
+
return /* @__PURE__ */ s(ie, { isOpen: t, onClose: r, title: a.financial_profile, children: [
|
|
2983
|
+
/* @__PURE__ */ s(_, { sx: { gap: 20, p: 24 }, children: [
|
|
2984
|
+
/* @__PURE__ */ s(_, { sx: { gap: 8 }, children: [
|
|
2985
|
+
/* @__PURE__ */ e(X, { children: a.your_financial_profile }),
|
|
2970
2986
|
/* @__PURE__ */ e(k, { children: a.financial_profile_description })
|
|
2971
2987
|
] }),
|
|
2972
2988
|
/* @__PURE__ */ e(
|
|
2973
2989
|
Et,
|
|
2974
2990
|
{
|
|
2975
2991
|
completeCopy: a.complete,
|
|
2976
|
-
value: m.reduce((g,
|
|
2992
|
+
value: m.reduce((g, S) => g + (S.isComplete ? 1 : 0), 0)
|
|
2977
2993
|
}
|
|
2978
2994
|
)
|
|
2979
2995
|
] }),
|
|
2980
2996
|
/* @__PURE__ */ e(Sn, { list: m, onClickItem: p }),
|
|
2981
2997
|
/* @__PURE__ */ e(A, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2982
|
-
|
|
2998
|
+
Me,
|
|
2983
2999
|
{
|
|
2984
3000
|
description: a.connect_more_accounts_to_view_more_accurate_financial_picture,
|
|
2985
3001
|
drawerType: "connectDrawer",
|
|
2986
3002
|
isDashboard: !0,
|
|
2987
3003
|
title: a.dont_see_all_your_accounts,
|
|
2988
|
-
titleDrawer:
|
|
3004
|
+
titleDrawer: i.add_accounts
|
|
2989
3005
|
}
|
|
2990
3006
|
) }),
|
|
2991
3007
|
/* @__PURE__ */ e(
|
|
2992
3008
|
ie,
|
|
2993
3009
|
{
|
|
2994
|
-
isOpen:
|
|
3010
|
+
isOpen: l === J.MonthlyIncome,
|
|
2995
3011
|
onClose: () => p(null),
|
|
2996
|
-
title:
|
|
3012
|
+
title: i.settings,
|
|
2997
3013
|
children: /* @__PURE__ */ e(no, {})
|
|
2998
3014
|
}
|
|
2999
3015
|
),
|
|
3000
|
-
/* @__PURE__ */ e(zr, { isOpen:
|
|
3001
|
-
/* @__PURE__ */ e(Rt, { isOpen:
|
|
3016
|
+
/* @__PURE__ */ e(zr, { isOpen: l === J.DateOfBirth, onClose: () => p(null) }),
|
|
3017
|
+
/* @__PURE__ */ e(Rt, { isOpen: l === J.CreditScore, onClose: () => p(null) }),
|
|
3002
3018
|
/* @__PURE__ */ e(
|
|
3003
3019
|
bt,
|
|
3004
3020
|
{
|
|
3005
3021
|
onClose: () => p(null),
|
|
3006
|
-
showConnectionsWidget:
|
|
3007
|
-
title:
|
|
3022
|
+
showConnectionsWidget: l === J.Connections,
|
|
3023
|
+
title: c.manage_connections
|
|
3008
3024
|
}
|
|
3009
3025
|
)
|
|
3010
3026
|
] });
|
|
3011
|
-
}, Hr =
|
|
3027
|
+
}, Hr = x(Gr), it = ({
|
|
3012
3028
|
content: t,
|
|
3013
3029
|
islast: r = !1
|
|
3014
|
-
}) => /* @__PURE__ */
|
|
3015
|
-
/* @__PURE__ */
|
|
3030
|
+
}) => /* @__PURE__ */ s(io, { sx: { minHeight: 0 }, children: [
|
|
3031
|
+
/* @__PURE__ */ s(uo, { children: [
|
|
3016
3032
|
/* @__PURE__ */ e(po, { sx: { bgcolor: "divider", borderWidth: 1, p: 3 } }),
|
|
3017
3033
|
!r && /* @__PURE__ */ e(co, { sx: { bgcolor: "divider", width: 0.1 } })
|
|
3018
3034
|
] }),
|
|
3019
3035
|
/* @__PURE__ */ e(lo, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(k, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: t }) })
|
|
3020
3036
|
] }), Nr = ({ report: t }) => {
|
|
3021
|
-
const { finstrong: r } =
|
|
3037
|
+
const { finstrong: r } = w(), { score_history_drawer_timeline: n } = r, {
|
|
3022
3038
|
health_score_point_difference: o,
|
|
3023
|
-
newer_credit_score:
|
|
3024
|
-
older_credit_score:
|
|
3039
|
+
newer_credit_score: c,
|
|
3040
|
+
older_credit_score: i,
|
|
3025
3041
|
older_spend_to_income_ratio: a,
|
|
3026
3042
|
newer_spend_to_income_ratio: d,
|
|
3027
|
-
older_health_score:
|
|
3043
|
+
older_health_score: l,
|
|
3028
3044
|
newer_health_score: p,
|
|
3029
|
-
newer_score_calculated_at:
|
|
3030
|
-
} = t, m = ro(new Date(
|
|
3045
|
+
newer_score_calculated_at: u
|
|
3046
|
+
} = t, m = ro(new Date(u), "MMM d"), g = () => o === 0 ? "info.lighter" : o > 0 ? "success.lighter" : "error.lighter", S = () => o === 0 ? Y(n.stayed_at, l) : o > 0 ? n.less_spending : n.more_spending, C = () => {
|
|
3031
3047
|
if (o === 0) return null;
|
|
3032
|
-
const
|
|
3033
|
-
return /* @__PURE__ */
|
|
3048
|
+
const b = o > 0 ? n.up_from : n.down_from, v = Y(b, l, p);
|
|
3049
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
3034
3050
|
/* @__PURE__ */ e(
|
|
3035
3051
|
an,
|
|
3036
3052
|
{
|
|
@@ -3039,18 +3055,18 @@ const R = {
|
|
|
3039
3055
|
sx: { color: "text.secondary", fontSize: 8, mx: 4, p: 1 }
|
|
3040
3056
|
}
|
|
3041
3057
|
),
|
|
3042
|
-
|
|
3058
|
+
v
|
|
3043
3059
|
] });
|
|
3044
3060
|
};
|
|
3045
|
-
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */
|
|
3046
|
-
/* @__PURE__ */ e(A, { sx: { borderBottom: "1px solid", borderBottomColor: "divider", p: 16 }, children: /* @__PURE__ */
|
|
3047
|
-
|
|
3061
|
+
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ s(_, { sx: { backgroundColor: "background.paper" }, children: [
|
|
3062
|
+
/* @__PURE__ */ e(A, { sx: { borderBottom: "1px solid", borderBottomColor: "divider", p: 16 }, children: /* @__PURE__ */ s(
|
|
3063
|
+
_,
|
|
3048
3064
|
{
|
|
3049
3065
|
flexDirection: "row",
|
|
3050
3066
|
sx: { alignItems: "center", gap: 16, height: 48, width: "100%" },
|
|
3051
3067
|
children: [
|
|
3052
3068
|
/* @__PURE__ */ e(
|
|
3053
|
-
|
|
3069
|
+
_,
|
|
3054
3070
|
{
|
|
3055
3071
|
sx: {
|
|
3056
3072
|
alignItems: "center",
|
|
@@ -3063,18 +3079,18 @@ const R = {
|
|
|
3063
3079
|
children: /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: "Body", children: o > 0 ? `+${o}` : o })
|
|
3064
3080
|
}
|
|
3065
3081
|
),
|
|
3066
|
-
/* @__PURE__ */
|
|
3067
|
-
/* @__PURE__ */ e(
|
|
3068
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ s(_, { sx: { gap: 2, width: "80%" }, children: [
|
|
3083
|
+
/* @__PURE__ */ e(T, { fontWeight: 600, variant: "Body", children: S() }),
|
|
3084
|
+
/* @__PURE__ */ s(T, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
|
|
3069
3085
|
m,
|
|
3070
3086
|
" ",
|
|
3071
|
-
|
|
3087
|
+
C()
|
|
3072
3088
|
] })
|
|
3073
3089
|
] })
|
|
3074
3090
|
]
|
|
3075
3091
|
}
|
|
3076
3092
|
) }),
|
|
3077
|
-
o !== 0 && /* @__PURE__ */ e(A, { sx: { color: "text.secondary", pb: 8, pl: 32, pr: 16, pt: 12 }, children: /* @__PURE__ */
|
|
3093
|
+
o !== 0 && /* @__PURE__ */ e(A, { sx: { color: "text.secondary", pb: 8, pl: 32, pr: 16, pt: 12 }, children: /* @__PURE__ */ s(
|
|
3078
3094
|
ao,
|
|
3079
3095
|
{
|
|
3080
3096
|
sx: {
|
|
@@ -3089,20 +3105,20 @@ const R = {
|
|
|
3089
3105
|
/* @__PURE__ */ e(
|
|
3090
3106
|
it,
|
|
3091
3107
|
{
|
|
3092
|
-
content:
|
|
3108
|
+
content: Y(
|
|
3093
3109
|
n.spend_to_income_description,
|
|
3094
|
-
|
|
3095
|
-
|
|
3110
|
+
we(a),
|
|
3111
|
+
we(d)
|
|
3096
3112
|
)
|
|
3097
3113
|
}
|
|
3098
3114
|
),
|
|
3099
3115
|
/* @__PURE__ */ e(
|
|
3100
3116
|
it,
|
|
3101
3117
|
{
|
|
3102
|
-
content:
|
|
3118
|
+
content: Y(
|
|
3103
3119
|
n.credit_score_description,
|
|
3104
|
-
|
|
3105
|
-
|
|
3120
|
+
i,
|
|
3121
|
+
c
|
|
3106
3122
|
),
|
|
3107
3123
|
islast: !0
|
|
3108
3124
|
}
|
|
@@ -3111,21 +3127,21 @@ const R = {
|
|
|
3111
3127
|
}
|
|
3112
3128
|
) })
|
|
3113
3129
|
] }) });
|
|
3114
|
-
}, Kr =
|
|
3115
|
-
const n =
|
|
3116
|
-
if (!
|
|
3117
|
-
const p = We(a.health_score || 0, o),
|
|
3130
|
+
}, Kr = x(Nr), jr = ({ isOpen: t, onClose: r }) => {
|
|
3131
|
+
const n = G(), { finstrong: o } = w(), { isCopyLoaded: c, isInitialized: i } = U(), { healthScore: a, healthScoreChangeReports: d, augmentedChartData: l } = P();
|
|
3132
|
+
if (!c || !i) return /* @__PURE__ */ e(te, {});
|
|
3133
|
+
const p = We(a.health_score || 0, o), u = d.slice().reverse();
|
|
3118
3134
|
return /* @__PURE__ */ e(
|
|
3119
3135
|
Bt,
|
|
3120
3136
|
{
|
|
3121
|
-
additionalContent: /* @__PURE__ */ e(
|
|
3137
|
+
additionalContent: /* @__PURE__ */ e(_, { sx: { pl: 18, backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(
|
|
3122
3138
|
ze,
|
|
3123
3139
|
{
|
|
3124
3140
|
axisColor: n.palette.divider,
|
|
3125
3141
|
baseline: "min",
|
|
3126
3142
|
colors: [n.palette.primary.main],
|
|
3127
3143
|
curveType: "natural",
|
|
3128
|
-
datasets: [
|
|
3144
|
+
datasets: [l],
|
|
3129
3145
|
height: 160,
|
|
3130
3146
|
labels: [o.key_indicators_label],
|
|
3131
3147
|
margin: { top: 12, left: 24 },
|
|
@@ -3139,8 +3155,8 @@ const R = {
|
|
|
3139
3155
|
isOpen: t,
|
|
3140
3156
|
loadConnectAccountsCard: !1,
|
|
3141
3157
|
onClose: r,
|
|
3142
|
-
stickyComponent: /* @__PURE__ */
|
|
3143
|
-
|
|
3158
|
+
stickyComponent: /* @__PURE__ */ s(
|
|
3159
|
+
_,
|
|
3144
3160
|
{
|
|
3145
3161
|
direction: "row",
|
|
3146
3162
|
sx: { backgroundColor: "background.paper", gap: 16, pb: 12, pt: 8, px: 24 },
|
|
@@ -3153,24 +3169,24 @@ const R = {
|
|
|
3153
3169
|
size: "SM"
|
|
3154
3170
|
}
|
|
3155
3171
|
) }),
|
|
3156
|
-
/* @__PURE__ */
|
|
3172
|
+
/* @__PURE__ */ s(A, { children: [
|
|
3157
3173
|
/* @__PURE__ */ e(k, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: p.status }),
|
|
3158
3174
|
/* @__PURE__ */ e(k, { variant: "caption", children: p.description })
|
|
3159
3175
|
] })
|
|
3160
3176
|
]
|
|
3161
3177
|
}
|
|
3162
3178
|
),
|
|
3163
|
-
children: /* @__PURE__ */ e(
|
|
3179
|
+
children: /* @__PURE__ */ e(_, { sx: { gap: 16 }, children: u.map((m, g) => /* @__PURE__ */ e(Kr, { report: m }, g)) })
|
|
3164
3180
|
}
|
|
3165
3181
|
);
|
|
3166
|
-
}, Vr =
|
|
3167
|
-
const t =
|
|
3168
|
-
return !
|
|
3182
|
+
}, Vr = x(jr), Yr = x(() => {
|
|
3183
|
+
const t = G(), [r, { width: n }] = xt(), { finstrong: o } = w(), { isCopyLoaded: c, isInitialized: i } = U(), { healthScore: a, healthScoreChange: d } = P(), l = t.palette.mode === "dark", p = We(a?.health_score, o);
|
|
3184
|
+
return !c || !i ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ s(K, { ref: r, sx: { p: 16 }, children: [
|
|
3169
3185
|
/* @__PURE__ */ e(
|
|
3170
3186
|
go,
|
|
3171
3187
|
{
|
|
3172
3188
|
action: /* @__PURE__ */ e(
|
|
3173
|
-
|
|
3189
|
+
W,
|
|
3174
3190
|
{
|
|
3175
3191
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
3176
3192
|
sx: {
|
|
@@ -3183,7 +3199,7 @@ const R = {
|
|
|
3183
3199
|
children: o.financial_strength_header_action
|
|
3184
3200
|
}
|
|
3185
3201
|
),
|
|
3186
|
-
subheader: /* @__PURE__ */ e(
|
|
3202
|
+
subheader: /* @__PURE__ */ e(X, { color: "text.primary", children: o.financial_strength_header }),
|
|
3187
3203
|
sx: {
|
|
3188
3204
|
p: 0,
|
|
3189
3205
|
"& .MuiCardHeader-content": {
|
|
@@ -3192,7 +3208,7 @@ const R = {
|
|
|
3192
3208
|
}
|
|
3193
3209
|
}
|
|
3194
3210
|
),
|
|
3195
|
-
/* @__PURE__ */ e(
|
|
3211
|
+
/* @__PURE__ */ e(_, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
|
|
3196
3212
|
Pt,
|
|
3197
3213
|
{
|
|
3198
3214
|
arcRadius: n <= 323 ? 73 : 154,
|
|
@@ -3201,12 +3217,12 @@ const R = {
|
|
|
3201
3217
|
size: n <= 323 ? "M" : "L"
|
|
3202
3218
|
}
|
|
3203
3219
|
) }),
|
|
3204
|
-
a?.health_score ? /* @__PURE__ */
|
|
3220
|
+
a?.health_score ? /* @__PURE__ */ s(
|
|
3205
3221
|
_o,
|
|
3206
3222
|
{
|
|
3207
3223
|
sx: {
|
|
3208
3224
|
px: 16,
|
|
3209
|
-
backgroundColor:
|
|
3225
|
+
backgroundColor: l ? "grey.800" : "grey.50",
|
|
3210
3226
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3211
3227
|
"&.Mui-expanded": {
|
|
3212
3228
|
m: 0
|
|
@@ -3234,7 +3250,7 @@ const R = {
|
|
|
3234
3250
|
]
|
|
3235
3251
|
}
|
|
3236
3252
|
) : /* @__PURE__ */ e(
|
|
3237
|
-
|
|
3253
|
+
Me,
|
|
3238
3254
|
{
|
|
3239
3255
|
buttonText: o.connect_more_accounts_title,
|
|
3240
3256
|
description: o.health_score_zero_description,
|
|
@@ -3242,7 +3258,7 @@ const R = {
|
|
|
3242
3258
|
hasIcon: !1,
|
|
3243
3259
|
isDashboard: !0,
|
|
3244
3260
|
sx: {
|
|
3245
|
-
backgroundColor:
|
|
3261
|
+
backgroundColor: l ? "grey.800" : "grey.50",
|
|
3246
3262
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3247
3263
|
".connect-more-accounts-title": {
|
|
3248
3264
|
fontWeight: 600,
|
|
@@ -3255,55 +3271,55 @@ const R = {
|
|
|
3255
3271
|
}
|
|
3256
3272
|
)
|
|
3257
3273
|
] });
|
|
3258
|
-
}), Xr = ({ onBackClick: t, sx: r }) => {
|
|
3259
|
-
const { visibleAccounts:
|
|
3260
|
-
augmentedChartData:
|
|
3261
|
-
calculateHealthScore:
|
|
3262
|
-
healthScore:
|
|
3263
|
-
loadAugmentedChartData:
|
|
3264
|
-
loadMonthlySummaries:
|
|
3265
|
-
} =
|
|
3274
|
+
}), Xr = ({ onBackClick: t, sx: r, onTrendsClick: n, onSpendingClick: o }) => {
|
|
3275
|
+
const { visibleAccounts: c } = xe(), { dateRange: i, isDataLoaded: a, loadBudgetData: d, setTheme: l } = yt(), { reloadCategoryTotals: p } = Ee(), {
|
|
3276
|
+
augmentedChartData: u,
|
|
3277
|
+
calculateHealthScore: m,
|
|
3278
|
+
healthScore: g,
|
|
3279
|
+
loadAugmentedChartData: S,
|
|
3280
|
+
loadMonthlySummaries: C
|
|
3281
|
+
} = P(), { finstrong: b, connect: v } = w(), { isCopyLoaded: y, isInitialized: f, selectedAccounts: D, setSelectedAccounts: F } = U(), { isMobile: H } = He(), O = G(), { userProfile: N } = Q(), [E, ce] = h.useState(!1), [j, oe] = h.useState(!1), [le, de] = h.useState(!1);
|
|
3266
3282
|
if (h.useEffect(() => {
|
|
3267
|
-
|
|
3268
|
-
}, []), h.useEffect(() =>
|
|
3269
|
-
|
|
3270
|
-
}, [
|
|
3271
|
-
|
|
3272
|
-
}, [
|
|
3273
|
-
const
|
|
3274
|
-
},
|
|
3275
|
-
return /* @__PURE__ */
|
|
3283
|
+
l(O);
|
|
3284
|
+
}, []), h.useEffect(() => F(c), [c]), h.useEffect(() => {
|
|
3285
|
+
f && (m().finally(), S().finally(), C().finally());
|
|
3286
|
+
}, [f]), h.useEffect(() => {
|
|
3287
|
+
f && (p(D, i.start, i.end), a || d());
|
|
3288
|
+
}, [i, a, f, D]), !y || !f) return /* @__PURE__ */ e(te, {});
|
|
3289
|
+
const V = () => {
|
|
3290
|
+
}, me = () => ce(!0);
|
|
3291
|
+
return /* @__PURE__ */ s(
|
|
3276
3292
|
zn,
|
|
3277
3293
|
{
|
|
3278
|
-
accountOptions:
|
|
3294
|
+
accountOptions: c,
|
|
3279
3295
|
actions: [
|
|
3280
3296
|
{
|
|
3281
3297
|
iconName: "person",
|
|
3282
3298
|
label: b.profile,
|
|
3283
|
-
onClick:
|
|
3299
|
+
onClick: me
|
|
3284
3300
|
}
|
|
3285
3301
|
],
|
|
3286
3302
|
hasDivider: !0,
|
|
3287
|
-
onAccountsFilterClick:
|
|
3303
|
+
onAccountsFilterClick: V,
|
|
3288
3304
|
onBackClick: t,
|
|
3289
3305
|
sx: r,
|
|
3290
3306
|
title: b.title,
|
|
3291
3307
|
children: [
|
|
3292
|
-
N.has_completed_finstrong_onboarding ? /* @__PURE__ */
|
|
3293
|
-
|
|
3308
|
+
N.has_completed_finstrong_onboarding ? /* @__PURE__ */ s(
|
|
3309
|
+
_,
|
|
3294
3310
|
{
|
|
3295
3311
|
sx: {
|
|
3296
3312
|
flexDirection: { md: "row" },
|
|
3297
3313
|
gap: 24,
|
|
3298
3314
|
justifyContent: "center",
|
|
3299
|
-
pt:
|
|
3315
|
+
pt: H ? 24 : 16,
|
|
3300
3316
|
px: 24
|
|
3301
3317
|
},
|
|
3302
3318
|
children: [
|
|
3303
|
-
/* @__PURE__ */
|
|
3319
|
+
/* @__PURE__ */ s(_, { sx: { gap: 24, width: { md: 432 } }, children: [
|
|
3304
3320
|
/* @__PURE__ */ e(Yr, {}),
|
|
3305
3321
|
/* @__PURE__ */ e(
|
|
3306
|
-
|
|
3322
|
+
Me,
|
|
3307
3323
|
{
|
|
3308
3324
|
description: b.connect_more_accounts_description,
|
|
3309
3325
|
drawerType: "connectDrawer",
|
|
@@ -3311,14 +3327,14 @@ const R = {
|
|
|
3311
3327
|
}
|
|
3312
3328
|
)
|
|
3313
3329
|
] }),
|
|
3314
|
-
/* @__PURE__ */ e(
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */ e(
|
|
3330
|
+
/* @__PURE__ */ e(_, { sx: { maxWidth: 848, minWidth: 288, width: { md: 720 } }, children: /* @__PURE__ */ s(K, { sx: { background: O.palette.background.paper, p: 16 }, children: [
|
|
3331
|
+
/* @__PURE__ */ s(_, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
|
3332
|
+
/* @__PURE__ */ e(X, { children: b.key_indicators }),
|
|
3317
3333
|
/* @__PURE__ */ e(
|
|
3318
|
-
|
|
3334
|
+
W,
|
|
3319
3335
|
{
|
|
3320
3336
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
3321
|
-
onClick: () =>
|
|
3337
|
+
onClick: () => oe(!0),
|
|
3322
3338
|
sx: {
|
|
3323
3339
|
fontSize: 13
|
|
3324
3340
|
},
|
|
@@ -3327,20 +3343,20 @@ const R = {
|
|
|
3327
3343
|
}
|
|
3328
3344
|
)
|
|
3329
3345
|
] }),
|
|
3330
|
-
|
|
3346
|
+
u.length ? /* @__PURE__ */ e(
|
|
3331
3347
|
ze,
|
|
3332
3348
|
{
|
|
3333
|
-
axisColor:
|
|
3349
|
+
axisColor: O.palette.divider,
|
|
3334
3350
|
baseline: "min",
|
|
3335
|
-
colors: [
|
|
3351
|
+
colors: [O.palette.primary.main],
|
|
3336
3352
|
curveType: "natural",
|
|
3337
3353
|
customLegendVariant: "XSmall",
|
|
3338
|
-
datasets: [
|
|
3354
|
+
datasets: [u],
|
|
3339
3355
|
height: 300,
|
|
3340
3356
|
isGraphClippingXAxis: !0,
|
|
3341
|
-
labelBackgroundColor:
|
|
3342
|
-
labelFontColor:
|
|
3343
|
-
labelFontSize: typeof
|
|
3357
|
+
labelBackgroundColor: O.palette.border.dark,
|
|
3358
|
+
labelFontColor: O.palette.common.white,
|
|
3359
|
+
labelFontSize: typeof O.typography.XSmall?.fontSize == "string" ? parseFloat(O.typography.XSmall.fontSize) : O.typography.XSmall?.fontSize,
|
|
3344
3360
|
labels: [b.key_indicators_label],
|
|
3345
3361
|
margin: { right: 20, left: 25 },
|
|
3346
3362
|
showArea: !0,
|
|
@@ -3351,32 +3367,38 @@ const R = {
|
|
|
3351
3367
|
title: b.peer_average,
|
|
3352
3368
|
useCustomMark: !0
|
|
3353
3369
|
}
|
|
3354
|
-
) : /* @__PURE__ */ e(kr, { onClick: () =>
|
|
3355
|
-
|
|
3370
|
+
) : /* @__PURE__ */ e(kr, { onClick: () => de(!0) }),
|
|
3371
|
+
g.health_score !== null && /* @__PURE__ */ e(
|
|
3372
|
+
vr,
|
|
3373
|
+
{
|
|
3374
|
+
onSpendingClick: o,
|
|
3375
|
+
onTrendsClick: n
|
|
3376
|
+
}
|
|
3377
|
+
)
|
|
3356
3378
|
] }) })
|
|
3357
3379
|
]
|
|
3358
3380
|
}
|
|
3359
3381
|
) : /* @__PURE__ */ e(Wr, {}),
|
|
3360
|
-
/* @__PURE__ */ e(Hr, { isOpen:
|
|
3382
|
+
/* @__PURE__ */ e(Hr, { isOpen: E, onClose: () => ce(!1) }),
|
|
3361
3383
|
/* @__PURE__ */ e(
|
|
3362
3384
|
ne,
|
|
3363
3385
|
{
|
|
3364
|
-
onClose: () =>
|
|
3365
|
-
showConnectWidget:
|
|
3386
|
+
onClose: () => de(!1),
|
|
3387
|
+
showConnectWidget: le,
|
|
3366
3388
|
title: v.mini_title
|
|
3367
3389
|
}
|
|
3368
3390
|
),
|
|
3369
3391
|
/* @__PURE__ */ e(
|
|
3370
3392
|
Vr,
|
|
3371
3393
|
{
|
|
3372
|
-
isOpen:
|
|
3373
|
-
onClose: () =>
|
|
3394
|
+
isOpen: j,
|
|
3395
|
+
onClose: () => oe(!1)
|
|
3374
3396
|
}
|
|
3375
3397
|
)
|
|
3376
3398
|
]
|
|
3377
3399
|
}
|
|
3378
3400
|
);
|
|
3379
|
-
}, pi =
|
|
3401
|
+
}, pi = x(Xr);
|
|
3380
3402
|
export {
|
|
3381
3403
|
bo as CreditScoreGraph,
|
|
3382
3404
|
Ft as DialScoreCard,
|