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