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