@mx-cartographer/experiences 7.2.15-alpha-ram5-finstrong-testing → 7.2.15-alpha-ram7-finstrong-testing
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/finstrong/index.es.js +202 -202
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as ve, e as we,
|
|
|
9
9
|
import { y as ji, F as Yi } from "../FinstrongStore-BbnA6Crl.mjs";
|
|
10
10
|
import * as st from "d3";
|
|
11
11
|
import { observer as S } from "mobx-react-lite";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as w, b as j, p as J, z as F, q as Hn, a as kt, d as Me, m as Ye, g as Nn, f as Kn, j as Ve, h as jn, i as Yn } from "../hooks-C41HAxM5.mjs";
|
|
13
13
|
import { L as Q } from "../Loader-DUaFpDGv.mjs";
|
|
14
14
|
import m from "react";
|
|
15
15
|
import $ from "@mui/material/Button";
|
|
@@ -33,7 +33,7 @@ import { g as Tt } from "../AccountFields-CPkGZ3SD.mjs";
|
|
|
33
33
|
import Re from "@mui/material/List";
|
|
34
34
|
import Zn from "@mui/material/ListItemButton";
|
|
35
35
|
import Jn from "@mui/material/ListSubheader";
|
|
36
|
-
import { f as
|
|
36
|
+
import { f as W } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
37
37
|
import { S as ct, F as Ot, e as Qn, R as Rt } from "../RecurringTransactions-CngsRZ3K.mjs";
|
|
38
38
|
import { Button as eo } from "@mui/material";
|
|
39
39
|
import { S as to } from "../StatusBar-BK_uYHAB.mjs";
|
|
@@ -89,32 +89,32 @@ const Go = ({
|
|
|
89
89
|
unitsPerSegment: _,
|
|
90
90
|
isFinacialStrengthGraph: b
|
|
91
91
|
}) => {
|
|
92
|
-
const
|
|
93
|
-
{ offset: "13.62%", color:
|
|
94
|
-
{ offset: "36.67%", color:
|
|
95
|
-
{ offset: "59.72%", color:
|
|
96
|
-
{ offset: "83.46%", color:
|
|
92
|
+
const x = E(), v = [
|
|
93
|
+
{ offset: "13.62%", color: x.palette.chartMono.chartMono2 },
|
|
94
|
+
{ offset: "36.67%", color: x.palette.chartMono.chartMono3 },
|
|
95
|
+
{ offset: "59.72%", color: x.palette.chartMono.chartMono4 },
|
|
96
|
+
{ offset: "83.46%", color: x.palette.chartMono.chartMono5 }
|
|
97
97
|
], [y, D] = Dn(
|
|
98
98
|
t,
|
|
99
99
|
c,
|
|
100
100
|
o,
|
|
101
101
|
r
|
|
102
|
-
), [g,
|
|
102
|
+
), [g, f] = In(
|
|
103
103
|
y,
|
|
104
104
|
D,
|
|
105
105
|
r,
|
|
106
106
|
_,
|
|
107
107
|
h
|
|
108
|
-
), M = st.arc().innerRadius(l).outerRadius(p).startAngle(y).endAngle(D).padAngle(0.02).cornerRadius(8),
|
|
108
|
+
), M = st.arc().innerRadius(l).outerRadius(p).startAngle(y).endAngle(D).padAngle(0.02).cornerRadius(8), P = st.arc().innerRadius(l).outerRadius(p).startAngle(g).endAngle(f).padAngle(0.02).cornerRadius(8);
|
|
109
109
|
return /* @__PURE__ */ i(z, { children: [
|
|
110
110
|
/* @__PURE__ */ e(
|
|
111
111
|
"path",
|
|
112
112
|
{
|
|
113
113
|
d: M({}),
|
|
114
|
-
fill: b ?
|
|
114
|
+
fill: b ? x.palette.divider : n
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
b && /* @__PURE__ */ e("path", { d:
|
|
117
|
+
b && /* @__PURE__ */ e("path", { d: P({}), fill: "url(#arcGradient)" }),
|
|
118
118
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
|
119
119
|
"linearGradient",
|
|
120
120
|
{
|
|
@@ -125,7 +125,7 @@ const Go = ({
|
|
|
125
125
|
x2: a - d * 0.8 * Math.cos(Math.PI / 1.35),
|
|
126
126
|
y1: s + d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
127
127
|
y2: s - d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
128
|
-
children:
|
|
128
|
+
children: v.map((G, H) => /* @__PURE__ */ e("stop", { offset: G.offset, stopColor: G.color }, H))
|
|
129
129
|
}
|
|
130
130
|
) })
|
|
131
131
|
] });
|
|
@@ -143,7 +143,7 @@ const Go = ({
|
|
|
143
143
|
footerRightContent: h,
|
|
144
144
|
isFinacialStrengthGraph: _ = !1
|
|
145
145
|
}) => {
|
|
146
|
-
const b = E(),
|
|
146
|
+
const b = E(), x = -Math.PI / 1.35, v = Math.PI / 1.35, y = v - x, D = y / (a - c), g = (r - c) * D, f = x + g + 0.02, M = n !== "SM" ? 0.1 : 0.12, P = t, G = t * (1 - M), H = P * 2.5, T = H / 2, V = H / 2, re = (G + P) / 2, ae = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [Ce, ie] = An(re, f, ae), X = r / 25, se = {
|
|
147
147
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
|
148
148
|
M: { markerSize: 10, healthScoreFontSize: 48 },
|
|
149
149
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
|
@@ -167,10 +167,10 @@ const Go = ({
|
|
|
167
167
|
{
|
|
168
168
|
data: o,
|
|
169
169
|
innerRadius: G,
|
|
170
|
-
outerRadius:
|
|
171
|
-
startAngle: Math.round(rt(
|
|
170
|
+
outerRadius: P,
|
|
171
|
+
startAngle: Math.round(rt(x)),
|
|
172
172
|
// Use Math.degrees to convert
|
|
173
|
-
endAngle: Math.round(rt(
|
|
173
|
+
endAngle: Math.round(rt(v))
|
|
174
174
|
// Use Math.degrees to convert
|
|
175
175
|
}
|
|
176
176
|
],
|
|
@@ -184,15 +184,15 @@ const Go = ({
|
|
|
184
184
|
{
|
|
185
185
|
arcColor: he.color,
|
|
186
186
|
arcRadius: t,
|
|
187
|
-
arcStartAngle:
|
|
187
|
+
arcStartAngle: x,
|
|
188
188
|
centerX: T,
|
|
189
189
|
centerY: V,
|
|
190
190
|
dataIndex: he.dataIndex,
|
|
191
191
|
dialScoreData: o,
|
|
192
192
|
innerArcRadius: G,
|
|
193
193
|
isFinacialStrengthGraph: _,
|
|
194
|
-
outterArcRadius:
|
|
195
|
-
progressEndAngle:
|
|
194
|
+
outterArcRadius: P,
|
|
195
|
+
progressEndAngle: f,
|
|
196
196
|
totalAngularSpan: y,
|
|
197
197
|
unitsPerSegment: X
|
|
198
198
|
}
|
|
@@ -313,7 +313,7 @@ const Go = ({
|
|
|
313
313
|
{ id: 2, label: "Group B", value: 25 },
|
|
314
314
|
{ id: 3, label: "Group C", value: 25 },
|
|
315
315
|
{ id: 4, label: "Group D", value: 25 }
|
|
316
|
-
], { finstrong: a } =
|
|
316
|
+
], { finstrong: a } = w(), s = je(n, a);
|
|
317
317
|
return /* @__PURE__ */ e(
|
|
318
318
|
zt,
|
|
319
319
|
{
|
|
@@ -367,7 +367,7 @@ const Go = ({
|
|
|
367
367
|
value: 12,
|
|
368
368
|
color: d ? ve.EXCEPTIONAL : we.EXCEPTIONAL
|
|
369
369
|
}
|
|
370
|
-
], { finstrong: p } =
|
|
370
|
+
], { finstrong: p } = w(), { isCopyLoaded: h } = j();
|
|
371
371
|
if (!h) return /* @__PURE__ */ e(Q, {});
|
|
372
372
|
const { status: _, color: b = "none" } = St(
|
|
373
373
|
n,
|
|
@@ -401,7 +401,7 @@ const Go = ({
|
|
|
401
401
|
description: s,
|
|
402
402
|
sx: d
|
|
403
403
|
}) => {
|
|
404
|
-
const [l, p] = m.useState(!1), { connect: h, finstrong: _ } =
|
|
404
|
+
const [l, p] = m.useState(!1), { connect: h, finstrong: _ } = w();
|
|
405
405
|
return t ? /* @__PURE__ */ i(
|
|
406
406
|
K,
|
|
407
407
|
{
|
|
@@ -467,7 +467,7 @@ const Go = ({
|
|
|
467
467
|
};
|
|
468
468
|
var _e = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(_e || {});
|
|
469
469
|
const No = ({ isOpen: t, onClose: r }) => {
|
|
470
|
-
const { common: n, finstrong: o } =
|
|
470
|
+
const { common: n, finstrong: o } = w(), { isMobile: c } = Ue(), { updateUser: a, user: s } = J(), [d, l] = m.useState(s.credit_score || 0), p = !isNaN(d), h = () => {
|
|
471
471
|
r(), setTimeout(() => l(s.credit_score || 0), 300);
|
|
472
472
|
}, _ = () => {
|
|
473
473
|
!d || d === s.credit_score || a({ ...s, credit_score: d });
|
|
@@ -516,7 +516,7 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
516
516
|
credit_over_time_title: "Your Credit Over Time",
|
|
517
517
|
credit_over_time_zero_state_desc: "Add your credit score to start building a full picture of your credit health."
|
|
518
518
|
}, Ko = ({ chartFor: t }) => {
|
|
519
|
-
const r = E(), n = r.palette.mode === "dark", { monthlySummaries: o } = F(), { user: c } = J(), { finstrong: a } =
|
|
519
|
+
const r = E(), n = r.palette.mode === "dark", { monthlySummaries: o } = F(), { user: c } = J(), { finstrong: a } = w(), [s, { width: d }] = It(), l = {
|
|
520
520
|
savingsOverTime: {
|
|
521
521
|
icon: /* @__PURE__ */ e(gt, { size: 48, sx: { marginBottom: 8 } }),
|
|
522
522
|
title: a.key_indicators_save.zero_state_title,
|
|
@@ -545,22 +545,22 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
545
545
|
title: ze.credit_over_time_title,
|
|
546
546
|
valueKey: "credit_score"
|
|
547
547
|
}
|
|
548
|
-
}[t], _ = Tn(o, h.valueKey), b = Math.max(...o.map((M) => M[h.valueKey])),
|
|
549
|
-
let
|
|
548
|
+
}[t], _ = Tn(o, h.valueKey), b = Math.max(...o.map((M) => M[h.valueKey])), x = () => b >= 1e6 ? { formatter: "0.000a", leftMargin: 55 } : b >= 1e3 ? { formatter: "0a", leftMargin: 35 } : { formatter: "0a", leftMargin: 30 }, { formatter: v, leftMargin: y } = x(), D = h.title, g = t === "creditOverTime";
|
|
549
|
+
let f;
|
|
550
550
|
if (g) {
|
|
551
551
|
const { color: M } = St(
|
|
552
552
|
c?.credit_score ?? 0,
|
|
553
553
|
n,
|
|
554
554
|
a.credit_score_status
|
|
555
555
|
);
|
|
556
|
-
|
|
556
|
+
f = M;
|
|
557
557
|
}
|
|
558
558
|
return /* @__PURE__ */ e(K, { ref: s, sx: { backgroundColor: "background.paper" }, children: _.length >= 1 ? /* @__PURE__ */ i(u, { gap: 8, sx: { pl: 18 }, children: [
|
|
559
559
|
/* @__PURE__ */ e(k, { sx: { pb: 8, pt: 16 }, variant: "h3", children: D }),
|
|
560
560
|
/* @__PURE__ */ e(
|
|
561
561
|
Xe,
|
|
562
562
|
{
|
|
563
|
-
areaColor:
|
|
563
|
+
areaColor: f,
|
|
564
564
|
axisColor: r.palette.divider,
|
|
565
565
|
baseline: "min",
|
|
566
566
|
chartFor: t,
|
|
@@ -589,7 +589,7 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
589
589
|
showYAxis: g,
|
|
590
590
|
showYAxisTicks: g,
|
|
591
591
|
useCustomMark: !0,
|
|
592
|
-
valueFormatterString: g ? void 0 :
|
|
592
|
+
valueFormatterString: g ? void 0 : v,
|
|
593
593
|
width: d < 342 ? d - 48 : 342
|
|
594
594
|
}
|
|
595
595
|
)
|
|
@@ -617,7 +617,7 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
617
617
|
/* @__PURE__ */ e(Je, { chartFor: "creditOverTime" })
|
|
618
618
|
] });
|
|
619
619
|
}, Vo = S(Yo), Le = ({ status: t }) => {
|
|
620
|
-
const { finstrong: r } =
|
|
620
|
+
const { finstrong: r } = w(), n = On(Rn[t]), o = {
|
|
621
621
|
GOOD: r.key_indicators_good,
|
|
622
622
|
FAIR: r.key_indicators_fair,
|
|
623
623
|
OFF_TRACK: r.key_indicators_off_track,
|
|
@@ -666,8 +666,8 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
666
666
|
title: h,
|
|
667
667
|
drawerType: _
|
|
668
668
|
}) => {
|
|
669
|
-
const { finstrong: b } =
|
|
670
|
-
return
|
|
669
|
+
const { finstrong: b } = w(), { isCopyLoaded: x } = j();
|
|
670
|
+
return x ? /* @__PURE__ */ i(te, { isOpen: s, onClose: l, title: a || b.key_indicators, children: [
|
|
671
671
|
(h || c) && /* @__PURE__ */ i(
|
|
672
672
|
u,
|
|
673
673
|
{
|
|
@@ -713,7 +713,7 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
713
713
|
shouldShowBalance: r = !0,
|
|
714
714
|
loadAccounts: n
|
|
715
715
|
}) => {
|
|
716
|
-
const { config: o } = kt(), { accounts: c } =
|
|
716
|
+
const { config: o } = kt(), { accounts: c } = w(), { selectedAccounts: a } = j(), s = m.useCallback(
|
|
717
717
|
(l) => {
|
|
718
718
|
t?.(l);
|
|
719
719
|
},
|
|
@@ -734,23 +734,23 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
734
734
|
{
|
|
735
735
|
subheader: /* @__PURE__ */ e(Jn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
736
736
|
/* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: c.account_types[l] }),
|
|
737
|
-
r && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children:
|
|
737
|
+
r && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: W(h, "0,0.00") })
|
|
738
738
|
] }) }),
|
|
739
739
|
sx: { bgcolor: "background.paper" },
|
|
740
740
|
children: [
|
|
741
741
|
p.map((_, b) => {
|
|
742
|
-
const { firstValue:
|
|
742
|
+
const { firstValue: x } = Tt(_, c), v = Dt(_, {
|
|
743
743
|
allowNickname: o?.show_account_nicknames_in_master
|
|
744
744
|
}), y = /* @__PURE__ */ i(z, { children: [
|
|
745
745
|
/* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: _.institution_guid ?? "" }) }),
|
|
746
746
|
/* @__PURE__ */ e(
|
|
747
747
|
be,
|
|
748
748
|
{
|
|
749
|
-
primary: `${
|
|
749
|
+
primary: `${v}${_.account_number ? ` *${_.account_number}` : ""}`,
|
|
750
750
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
751
751
|
}
|
|
752
752
|
),
|
|
753
|
-
r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children:
|
|
753
|
+
r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: W(x ?? 0, "0,0.00") })
|
|
754
754
|
] });
|
|
755
755
|
return /* @__PURE__ */ i(m.Fragment, { children: [
|
|
756
756
|
/* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(_), children: y }) : y }),
|
|
@@ -764,17 +764,17 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
764
764
|
);
|
|
765
765
|
}) }) : null;
|
|
766
766
|
}, Nt = S(Jo), Qo = ({ loadAccounts: t, loadMoreLabel: r }) => {
|
|
767
|
-
const n = E(), { config: o } = kt(), { connect: c, finstrong: a } =
|
|
767
|
+
const n = E(), { config: o } = kt(), { connect: c, finstrong: a } = w(), { accounts: s } = w(), { selectedAccounts: d } = j(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = m.useMemo(
|
|
768
768
|
() => d.filter(
|
|
769
769
|
(y) => t ? t.includes(y.account_type) : !0
|
|
770
770
|
),
|
|
771
771
|
[d, t]
|
|
772
|
-
),
|
|
772
|
+
), x = m.useMemo(() => b.slice(0, 3), [b]), v = (y) => {
|
|
773
773
|
const { firstValue: D } = Tt(y, s);
|
|
774
774
|
return D;
|
|
775
775
|
};
|
|
776
776
|
return b.length >= 1 ? /* @__PURE__ */ i(z, { children: [
|
|
777
|
-
/* @__PURE__ */ e(C, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children:
|
|
777
|
+
/* @__PURE__ */ e(C, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: x.map((y, D) => /* @__PURE__ */ i(m.Fragment, { children: [
|
|
778
778
|
/* @__PURE__ */ i(ye, { sx: { px: 24 }, children: [
|
|
779
779
|
/* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: y.institution_guid ?? "" }) }),
|
|
780
780
|
/* @__PURE__ */ e(
|
|
@@ -787,9 +787,9 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
787
787
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
788
788
|
}
|
|
789
789
|
),
|
|
790
|
-
/* @__PURE__ */ e(k, { bold: !0, variant: "body2", children:
|
|
790
|
+
/* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: W(v(y), "0,0.00") })
|
|
791
791
|
] }),
|
|
792
|
-
D <
|
|
792
|
+
D < x.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
|
|
793
793
|
] }, y.guid)) }),
|
|
794
794
|
b.length > 3 && /* @__PURE__ */ i(z, { children: [
|
|
795
795
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
@@ -841,13 +841,13 @@ const No = ({ isOpen: t, onClose: r }) => {
|
|
|
841
841
|
...n
|
|
842
842
|
},
|
|
843
843
|
children: [
|
|
844
|
-
typeof t == "number" ? /* @__PURE__ */ e(k, { variant: "h2", children:
|
|
844
|
+
typeof t == "number" ? /* @__PURE__ */ e(k, { variant: "h2", children: W(t, "0,0.00") }) : t,
|
|
845
845
|
/* @__PURE__ */ e(k, { color: "text.secondary", fontWeight: "400", variant: "subtitle2", children: r })
|
|
846
846
|
]
|
|
847
847
|
}
|
|
848
848
|
);
|
|
849
849
|
var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), ke = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(ke || {}), U = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(U || {});
|
|
850
|
-
const
|
|
850
|
+
const L = {
|
|
851
851
|
bi_weekly: "Bi-Weekly",
|
|
852
852
|
calculate: "Calculate",
|
|
853
853
|
daily: "Daily",
|
|
@@ -867,23 +867,23 @@ const B = {
|
|
|
867
867
|
weekly: "Weekly",
|
|
868
868
|
years: "Years"
|
|
869
869
|
}, er = [
|
|
870
|
-
{ id: U.Monthly, label:
|
|
871
|
-
{ id: U.BiWeekly, label:
|
|
872
|
-
{ id: U.Weekly, label:
|
|
873
|
-
{ id: U.Daily, label:
|
|
870
|
+
{ id: U.Monthly, label: L.monthly },
|
|
871
|
+
{ id: U.BiWeekly, label: L.bi_weekly },
|
|
872
|
+
{ id: U.Weekly, label: L.weekly },
|
|
873
|
+
{ id: U.Daily, label: L.daily }
|
|
874
874
|
], tr = {
|
|
875
|
-
[U.Monthly]:
|
|
876
|
-
[U.BiWeekly]:
|
|
877
|
-
[U.Weekly]:
|
|
878
|
-
[U.Daily]:
|
|
875
|
+
[U.Monthly]: L.estimated_period_monthly,
|
|
876
|
+
[U.BiWeekly]: L.estimated_period_bi_weekly,
|
|
877
|
+
[U.Weekly]: L.estimated_period_weekly,
|
|
878
|
+
[U.Daily]: L.estimated_period_daily
|
|
879
879
|
}, nr = [
|
|
880
|
-
{ id: ke.Months, label:
|
|
881
|
-
{ id: ke.Years, label:
|
|
882
|
-
{ id: ke.Days, label:
|
|
880
|
+
{ id: ke.Months, label: L.months },
|
|
881
|
+
{ id: ke.Years, label: L.years },
|
|
882
|
+
{ id: ke.Days, label: L.days }
|
|
883
883
|
], or = ({ total: t }) => {
|
|
884
884
|
const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = m.useState(0), [c, a] = m.useState(at(t)), [s, d] = m.useState(
|
|
885
885
|
at(t)
|
|
886
|
-
), [l, p] = m.useState(r), [h, _] = m.useState(Fn(t)), [b,
|
|
886
|
+
), [l, p] = m.useState(r), [h, _] = m.useState(Fn(t)), [b, x] = m.useState(ke.Months);
|
|
887
887
|
m.useEffect(() => {
|
|
888
888
|
o(
|
|
889
889
|
it({
|
|
@@ -895,7 +895,7 @@ const B = {
|
|
|
895
895
|
})
|
|
896
896
|
), a(s);
|
|
897
897
|
}, []);
|
|
898
|
-
const
|
|
898
|
+
const v = (y) => {
|
|
899
899
|
y.preventDefault(), o(
|
|
900
900
|
it({
|
|
901
901
|
contribution: s,
|
|
@@ -906,40 +906,40 @@ const B = {
|
|
|
906
906
|
})
|
|
907
907
|
), a(s);
|
|
908
908
|
};
|
|
909
|
-
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("form", { onSubmit:
|
|
909
|
+
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("form", { onSubmit: v, children: /* @__PURE__ */ i(u, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
|
|
910
910
|
/* @__PURE__ */ e(
|
|
911
911
|
Se,
|
|
912
912
|
{
|
|
913
913
|
balance: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", height: 32 }, children: [
|
|
914
|
-
/* @__PURE__ */ e(I, { variant: "h2", children:
|
|
914
|
+
/* @__PURE__ */ e(I, { variant: "h2", children: W(n, "0,0") }),
|
|
915
915
|
/* @__PURE__ */ i(I, { sx: { alignSelf: "end", height: 24 }, variant: "subtitle2", children: [
|
|
916
916
|
"/",
|
|
917
917
|
tr[c]
|
|
918
918
|
] })
|
|
919
919
|
] }),
|
|
920
|
-
title:
|
|
920
|
+
title: L.estimated_contribution
|
|
921
921
|
}
|
|
922
922
|
),
|
|
923
923
|
/* @__PURE__ */ e(
|
|
924
924
|
Oe,
|
|
925
925
|
{
|
|
926
|
-
"aria-label":
|
|
927
|
-
helperText:
|
|
926
|
+
"aria-label": L.savings_goal,
|
|
927
|
+
helperText: L.suggested_goal,
|
|
928
928
|
inputProps: {
|
|
929
929
|
noValidate: !0,
|
|
930
930
|
pattern: "[0-9]*"
|
|
931
931
|
},
|
|
932
|
-
label:
|
|
932
|
+
label: L.savings_goal,
|
|
933
933
|
onChange: (y) => {
|
|
934
934
|
y.target.value && p(Number(y.target.value.replace(/[^0-9]/g, "")));
|
|
935
935
|
},
|
|
936
|
-
value: l ?
|
|
936
|
+
value: l ? W(l, "0,0") : ""
|
|
937
937
|
}
|
|
938
938
|
),
|
|
939
939
|
/* @__PURE__ */ e(
|
|
940
940
|
ct,
|
|
941
941
|
{
|
|
942
|
-
label:
|
|
942
|
+
label: L.how_often_contribute,
|
|
943
943
|
onChange: d,
|
|
944
944
|
options: er,
|
|
945
945
|
required: !0,
|
|
@@ -950,13 +950,13 @@ const B = {
|
|
|
950
950
|
/* @__PURE__ */ e(
|
|
951
951
|
Oe,
|
|
952
952
|
{
|
|
953
|
-
"aria-label":
|
|
953
|
+
"aria-label": L.meet_your_goal_within,
|
|
954
954
|
fullWidth: !0,
|
|
955
955
|
inputProps: {
|
|
956
956
|
noValidate: !0,
|
|
957
957
|
pattern: "[0-9]*"
|
|
958
958
|
},
|
|
959
|
-
label:
|
|
959
|
+
label: L.meet_your_goal_within,
|
|
960
960
|
onChange: (y) => _(Number(y.target.value)),
|
|
961
961
|
sx: {
|
|
962
962
|
"& .MuiInputBase-root": {
|
|
@@ -982,11 +982,11 @@ const B = {
|
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
},
|
|
985
|
-
children: /* @__PURE__ */ e(ct, { label: "", onChange:
|
|
985
|
+
children: /* @__PURE__ */ e(ct, { label: "", onChange: x, options: nr, value: b })
|
|
986
986
|
}
|
|
987
987
|
)
|
|
988
988
|
] }),
|
|
989
|
-
/* @__PURE__ */ e($, { fullWidth: !0, onClick:
|
|
989
|
+
/* @__PURE__ */ e($, { fullWidth: !0, onClick: v, type: "submit", variant: "contained", children: L.calculate })
|
|
990
990
|
] }) }) });
|
|
991
991
|
}, rr = S(or), Ae = {
|
|
992
992
|
connect_accounts: "Connect Accounts",
|
|
@@ -1100,7 +1100,7 @@ const B = {
|
|
|
1100
1100
|
percentage: n
|
|
1101
1101
|
}
|
|
1102
1102
|
],
|
|
1103
|
-
value:
|
|
1103
|
+
value: W(r ?? 0, "0,0.00")
|
|
1104
1104
|
}
|
|
1105
1105
|
);
|
|
1106
1106
|
}, dr = S(lr), ut = 65, _t = 34, pr = ({
|
|
@@ -1114,23 +1114,23 @@ const B = {
|
|
|
1114
1114
|
width: d = "100%",
|
|
1115
1115
|
zeroState: l = /* @__PURE__ */ e(ro, {})
|
|
1116
1116
|
}) => {
|
|
1117
|
-
const { getCategoryName: p } = Ye(), { onEvent: h } = Nn(), { categories: _ } =
|
|
1118
|
-
const M = t.find((
|
|
1117
|
+
const { getCategoryName: p } = Ye(), { onEvent: h } = Nn(), { categories: _ } = w(), { clearExpandedSplits: b, setShowInsights: x, toggleSplit: v } = oo(), y = (f) => {
|
|
1118
|
+
const M = t.find((P) => P.guid === f);
|
|
1119
1119
|
if (M?.has_been_split) {
|
|
1120
|
-
|
|
1120
|
+
v(M.guid);
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
1123
|
h(ao.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
1124
1124
|
account_guid: M?.account_guid,
|
|
1125
|
-
transaction_guid:
|
|
1126
|
-
}), c?.(
|
|
1125
|
+
transaction_guid: f
|
|
1126
|
+
}), c?.(f);
|
|
1127
1127
|
}, D = m.useRef(null), g = no({
|
|
1128
1128
|
count: t.length,
|
|
1129
1129
|
getScrollElement: () => D.current,
|
|
1130
|
-
estimateSize: (
|
|
1130
|
+
estimateSize: (f) => ut + (Ne(f, t) ? _t : 0),
|
|
1131
1131
|
overscan: 5
|
|
1132
1132
|
});
|
|
1133
|
-
return m.useEffect(() => g.measure(), [t]), m.useEffect(() =>
|
|
1133
|
+
return m.useEffect(() => g.measure(), [t]), m.useEffect(() => x(a), [a]), m.useEffect(() => () => b(), []), /* @__PURE__ */ e(Re, { sx: { width: d }, children: /* @__PURE__ */ e(C, { height: n, overflow: "auto", ref: D, width: d, children: /* @__PURE__ */ i(
|
|
1134
1134
|
C,
|
|
1135
1135
|
{
|
|
1136
1136
|
height: (
|
|
@@ -1142,19 +1142,19 @@ const B = {
|
|
|
1142
1142
|
children: [
|
|
1143
1143
|
s && o,
|
|
1144
1144
|
!s && g.getVirtualItems().length === 0 && l,
|
|
1145
|
-
!s && g.getVirtualItems().length > 0 && g.getVirtualItems().map((
|
|
1146
|
-
const M = t[
|
|
1145
|
+
!s && g.getVirtualItems().length > 0 && g.getVirtualItems().map((f) => {
|
|
1146
|
+
const M = t[f.index], P = Ne(f.index, t), G = Ft(f.index, t), H = ut + (P ? _t : 0);
|
|
1147
1147
|
return /* @__PURE__ */ i(
|
|
1148
1148
|
C,
|
|
1149
1149
|
{
|
|
1150
1150
|
sx: {
|
|
1151
1151
|
height: H,
|
|
1152
1152
|
position: "absolute",
|
|
1153
|
-
transform: `translateY(${
|
|
1153
|
+
transform: `translateY(${f.start}px)`,
|
|
1154
1154
|
width: "100%"
|
|
1155
1155
|
},
|
|
1156
1156
|
children: [
|
|
1157
|
-
|
|
1157
|
+
P && /* @__PURE__ */ e(Pt, { bgcolor: r, children: Ze(M.date) }),
|
|
1158
1158
|
/* @__PURE__ */ e(
|
|
1159
1159
|
Bt,
|
|
1160
1160
|
{
|
|
@@ -1184,7 +1184,7 @@ const B = {
|
|
|
1184
1184
|
formatDate: o = Ze,
|
|
1185
1185
|
secondaryIcon: c
|
|
1186
1186
|
}) => {
|
|
1187
|
-
const a = E(), { connect: s, finstrong: d } =
|
|
1187
|
+
const a = E(), { connect: s, finstrong: d } = w(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = 3, x = t.length > b, v = t.length - b;
|
|
1188
1188
|
return !t || t.length === 0 ? /* @__PURE__ */ i(z, { children: [
|
|
1189
1189
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
1190
1190
|
$,
|
|
@@ -1247,7 +1247,7 @@ const B = {
|
|
|
1247
1247
|
/* @__PURE__ */ e(I, { variant: "caption", children: o(y.date) })
|
|
1248
1248
|
] })
|
|
1249
1249
|
] }),
|
|
1250
|
-
/* @__PURE__ */ e(k, { bold: !0, sx: { color: r, flexShrink: 0 }, variant: "body1", children:
|
|
1250
|
+
/* @__PURE__ */ e(k, { bold: !0, sx: { color: r, flexShrink: 0 }, variant: "body1", children: W(y.amount, "0,0.00") })
|
|
1251
1251
|
]
|
|
1252
1252
|
},
|
|
1253
1253
|
y.guid || D
|
|
@@ -1256,7 +1256,7 @@ const B = {
|
|
|
1256
1256
|
},
|
|
1257
1257
|
D
|
|
1258
1258
|
)) }),
|
|
1259
|
-
|
|
1259
|
+
x && /* @__PURE__ */ i(z, { children: [
|
|
1260
1260
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
1261
1261
|
$,
|
|
1262
1262
|
{
|
|
@@ -1265,7 +1265,7 @@ const B = {
|
|
|
1265
1265
|
size: "small",
|
|
1266
1266
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1267
1267
|
children: /* @__PURE__ */ i(I, { bold: !0, variant: "body1", children: [
|
|
1268
|
-
|
|
1268
|
+
v,
|
|
1269
1269
|
" ",
|
|
1270
1270
|
d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_more_transactions
|
|
1271
1271
|
] })
|
|
@@ -1287,7 +1287,7 @@ const B = {
|
|
|
1287
1287
|
finstrong: {
|
|
1288
1288
|
key_indicators_spend: { pay_bills_on_time_drawer: t }
|
|
1289
1289
|
}
|
|
1290
|
-
} =
|
|
1290
|
+
} = w(), { getSpendingFeeTransactions: r, allTransactions: n } = F();
|
|
1291
1291
|
return m.useEffect(() => {
|
|
1292
1292
|
r().finally();
|
|
1293
1293
|
}, []), /* @__PURE__ */ e(z, { children: n.spendingFee.length === 0 ? /* @__PURE__ */ i(
|
|
@@ -1333,7 +1333,7 @@ const B = {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
) });
|
|
1335
1335
|
}, hr = S(_r), mr = () => {
|
|
1336
|
-
const { healthScore: t } = F(), { finstrong: r } =
|
|
1336
|
+
const { healthScore: t } = F(), { finstrong: r } = w(), { key_indicators_spend: n } = r, { pay_bills_on_time_drawer: o } = n, c = Bn(t.spending_fee_transaction_count);
|
|
1337
1337
|
return /* @__PURE__ */ i(
|
|
1338
1338
|
u,
|
|
1339
1339
|
{
|
|
@@ -1357,7 +1357,7 @@ const B = {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
);
|
|
1359
1359
|
}, gr = S(mr), yr = () => {
|
|
1360
|
-
const { savingsAndCheckingAccountsBalance: t } = Me(), { finstrong: r } =
|
|
1360
|
+
const { savingsAndCheckingAccountsBalance: t } = Me(), { finstrong: r } = w();
|
|
1361
1361
|
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1362
1362
|
/* @__PURE__ */ e(
|
|
1363
1363
|
Se,
|
|
@@ -1375,7 +1375,7 @@ const B = {
|
|
|
1375
1375
|
)
|
|
1376
1376
|
] });
|
|
1377
1377
|
}, br = S(yr), fr = () => {
|
|
1378
|
-
const { finstrong: t } =
|
|
1378
|
+
const { finstrong: t } = w(), { healthScore: r, allTransactions: n, loadSpendTransactions: o, loadDebtSpend: c } = F(), { isInitialized: a } = j();
|
|
1379
1379
|
m.useEffect(() => {
|
|
1380
1380
|
a && (o().finally(), c().finally());
|
|
1381
1381
|
}, [a]);
|
|
@@ -1394,7 +1394,7 @@ const B = {
|
|
|
1394
1394
|
/* @__PURE__ */ e($e, { amountColor: "text.primary", transactions: s })
|
|
1395
1395
|
] }) : /* @__PURE__ */ e(Q, {});
|
|
1396
1396
|
}, xr = S(fr), Sr = () => {
|
|
1397
|
-
const [t, r] = m.useState(0), { finstrong: n } =
|
|
1397
|
+
const [t, r] = m.useState(0), { finstrong: n } = w();
|
|
1398
1398
|
return /* @__PURE__ */ i(z, { children: [
|
|
1399
1399
|
/* @__PURE__ */ i(K, { children: [
|
|
1400
1400
|
/* @__PURE__ */ i(
|
|
@@ -1432,7 +1432,7 @@ const B = {
|
|
|
1432
1432
|
/* @__PURE__ */ e(Je, { chartFor: "savingsOverTime" })
|
|
1433
1433
|
] });
|
|
1434
1434
|
}, Cr = S(Sr), vr = () => {
|
|
1435
|
-
const { finstrong: t } =
|
|
1435
|
+
const { finstrong: t } = w(), { healthScore: r } = F(), n = r.months_of_cash_on_hand, o = wt(n ? n * 30 : null), c = 183 / 6, a = Math.floor(n), s = Math.round((n - a) * c), d = n / 6 * 100;
|
|
1436
1436
|
return /* @__PURE__ */ e(
|
|
1437
1437
|
We,
|
|
1438
1438
|
{
|
|
@@ -1482,7 +1482,7 @@ const B = {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
);
|
|
1484
1484
|
}, wr = S(vr), kr = () => {
|
|
1485
|
-
const { healthScore: t } = F(), { finstrong: r } =
|
|
1485
|
+
const { healthScore: t } = F(), { finstrong: r } = w(), n = Te(t.debt_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((s) => o ? "MISSING" : s <= 30 ? "GOOD" : s >= 31 && s <= 39 ? "FAIR" : s >= 40 ? "OFF_TRACK" : "MISSING")(n);
|
|
1486
1486
|
return /* @__PURE__ */ e(
|
|
1487
1487
|
We,
|
|
1488
1488
|
{
|
|
@@ -1558,11 +1558,11 @@ const B = {
|
|
|
1558
1558
|
percentage: `${n}%`
|
|
1559
1559
|
}
|
|
1560
1560
|
],
|
|
1561
|
-
value:
|
|
1561
|
+
value: W(t.ninety_day_debt_spend, "0,0.00")
|
|
1562
1562
|
}
|
|
1563
1563
|
);
|
|
1564
1564
|
}, Mr = S(kr), Dr = () => {
|
|
1565
|
-
const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } =
|
|
1565
|
+
const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } = w(), [c, a] = m.useState(!1);
|
|
1566
1566
|
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1567
1567
|
/* @__PURE__ */ e(
|
|
1568
1568
|
Se,
|
|
@@ -1595,7 +1595,7 @@ const B = {
|
|
|
1595
1595
|
)
|
|
1596
1596
|
] });
|
|
1597
1597
|
}, Ir = S(Dr), Ar = () => {
|
|
1598
|
-
const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } =
|
|
1598
|
+
const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } = w(), [c, a] = m.useState(!1);
|
|
1599
1599
|
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1600
1600
|
/* @__PURE__ */ e(
|
|
1601
1601
|
Se,
|
|
@@ -1647,8 +1647,8 @@ const B = {
|
|
|
1647
1647
|
const _ = new ResizeObserver(() => {
|
|
1648
1648
|
window.requestAnimationFrame(() => {
|
|
1649
1649
|
if (s.current) {
|
|
1650
|
-
const { width: b } = s.current.getBoundingClientRect(),
|
|
1651
|
-
|
|
1650
|
+
const { width: b } = s.current.getBoundingClientRect(), x = b / 2, v = s.current.querySelector("text");
|
|
1651
|
+
v && v.setAttribute("transform", `translate(${x}, -8)`);
|
|
1652
1652
|
}
|
|
1653
1653
|
});
|
|
1654
1654
|
});
|
|
@@ -1685,23 +1685,23 @@ const B = {
|
|
|
1685
1685
|
totalMain: l
|
|
1686
1686
|
}) => {
|
|
1687
1687
|
const p = E(), h = so(p.breakpoints.down("xs")), _ = m.useMemo(
|
|
1688
|
-
() => r.sort((g,
|
|
1689
|
-
const
|
|
1688
|
+
() => r.sort((g, f) => g.month - f.month).map((g) => {
|
|
1689
|
+
const f = Ln(g.month), M = {
|
|
1690
1690
|
spending_vs_income: {
|
|
1691
1691
|
main: g.standard_spend,
|
|
1692
1692
|
comparison: g.income,
|
|
1693
|
-
formattedMain:
|
|
1694
|
-
formattedComparison:
|
|
1693
|
+
formattedMain: W(Math.round(g.standard_spend / 100) * 100, "0.0a"),
|
|
1694
|
+
formattedComparison: W(Math.round(g.income / 100) * 100, "0.0a")
|
|
1695
1695
|
},
|
|
1696
1696
|
debt_payment_vs_income: {
|
|
1697
1697
|
main: g.income,
|
|
1698
1698
|
comparison: g.debt_spend,
|
|
1699
|
-
formattedMain:
|
|
1700
|
-
formattedComparison:
|
|
1699
|
+
formattedMain: W(g.income, "0.0a"),
|
|
1700
|
+
formattedComparison: W(g.debt_spend, "0.0a")
|
|
1701
1701
|
}
|
|
1702
1702
|
};
|
|
1703
1703
|
return {
|
|
1704
|
-
label:
|
|
1704
|
+
label: f,
|
|
1705
1705
|
...M[t]
|
|
1706
1706
|
};
|
|
1707
1707
|
}),
|
|
@@ -1709,10 +1709,10 @@ const B = {
|
|
|
1709
1709
|
), b = {
|
|
1710
1710
|
dataKey: "label",
|
|
1711
1711
|
scaleType: "band"
|
|
1712
|
-
},
|
|
1712
|
+
}, x = Math.max(..._.map((g) => Math.max(g.main, g.comparison))), v = Math.ceil(x * 1.2 / 1e3) * 1e3, y = v / 3, D = {
|
|
1713
1713
|
scaleType: "linear",
|
|
1714
1714
|
min: 0,
|
|
1715
|
-
max:
|
|
1715
|
+
max: v,
|
|
1716
1716
|
tickNumber: 4,
|
|
1717
1717
|
tickMinStep: y,
|
|
1718
1718
|
valueFormatter: (g) => g === 0 ? "$0" : `$${(g / 1e3).toFixed(0)}K`
|
|
@@ -1815,16 +1815,16 @@ const B = {
|
|
|
1815
1815
|
{
|
|
1816
1816
|
slots: {
|
|
1817
1817
|
bar: (g) => {
|
|
1818
|
-
const { ownerState:
|
|
1818
|
+
const { ownerState: f, style: M, ...P } = g;
|
|
1819
1819
|
return /* @__PURE__ */ e(
|
|
1820
1820
|
Or,
|
|
1821
1821
|
{
|
|
1822
|
-
...
|
|
1823
|
-
color:
|
|
1822
|
+
...P,
|
|
1823
|
+
color: f.color,
|
|
1824
1824
|
data: _,
|
|
1825
1825
|
series: {
|
|
1826
|
-
index:
|
|
1827
|
-
type: Number(
|
|
1826
|
+
index: f.dataIndex,
|
|
1827
|
+
type: Number(f.id.toString().split("-").pop())
|
|
1828
1828
|
},
|
|
1829
1829
|
style: M
|
|
1830
1830
|
}
|
|
@@ -1880,7 +1880,7 @@ const B = {
|
|
|
1880
1880
|
}
|
|
1881
1881
|
);
|
|
1882
1882
|
}, Rr = () => {
|
|
1883
|
-
const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = F(), { isInitialized: o } = j(), [c, a] = m.useState(0), { finstrong: s } =
|
|
1883
|
+
const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = F(), { isInitialized: o } = j(), [c, a] = m.useState(0), { finstrong: s } = w();
|
|
1884
1884
|
return m.useEffect(() => {
|
|
1885
1885
|
o && (t().finally(), r().finally());
|
|
1886
1886
|
}, [o]), /* @__PURE__ */ i(z, { children: [
|
|
@@ -1985,7 +1985,7 @@ const B = {
|
|
|
1985
1985
|
] })
|
|
1986
1986
|
] });
|
|
1987
1987
|
}, Fr = S(Rr), Pr = () => {
|
|
1988
|
-
const { healthScore: t } = F(), { finstrong: r } =
|
|
1988
|
+
const { healthScore: t } = F(), { finstrong: r } = w(), n = Te(t.spend_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((d) => o ? "MISSING" : d < 100 ? "GOOD" : d >= 100 && d <= 109 ? "FAIR" : d >= 110 ? "OFF_TRACK" : "MISSING")(n), s = {
|
|
1989
1989
|
GOOD: [{ percentage: `${n}%` }],
|
|
1990
1990
|
FAIR: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
1991
1991
|
OFF_TRACK: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
@@ -2005,7 +2005,7 @@ const B = {
|
|
|
2005
2005
|
},
|
|
2006
2006
|
children: [
|
|
2007
2007
|
/* @__PURE__ */ i(I, { variant: "body2", children: [
|
|
2008
|
-
o ? "-" :
|
|
2008
|
+
o ? "-" : W(t.ninety_day_income, "0,0.00"),
|
|
2009
2009
|
" ",
|
|
2010
2010
|
r?.key_indicators_spend.spend_less_than_you_make_drawer.income
|
|
2011
2011
|
] }),
|
|
@@ -2020,29 +2020,29 @@ const B = {
|
|
|
2020
2020
|
label: r?.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_sticky_description,
|
|
2021
2021
|
status: a,
|
|
2022
2022
|
statusBarData: s,
|
|
2023
|
-
value: o ? "$0" :
|
|
2023
|
+
value: o ? "$0" : W(t.ninety_day_spend, "0,0.00")
|
|
2024
2024
|
}
|
|
2025
2025
|
);
|
|
2026
2026
|
}, Br = S(Pr), Lr = () => {
|
|
2027
|
-
const t = E(), { monthlySummaries: r, handleFinstrongWidgetPrimaryCtaClick: n } = F(), { finstrong: o, goals: c, spending: a } =
|
|
2028
|
-
m.useEffect(() => {
|
|
2029
|
-
|
|
2027
|
+
const t = E(), { monthlySummaries: r, handleFinstrongWidgetPrimaryCtaClick: n } = F(), { finstrong: o, goals: c, spending: a } = w(), { selectedAccounts: s, selectedAccountGuids: d } = j(), { categories: l, dateRangeCategoryTotals: p, loadDateRangeCategoryTotals: h } = Ye(), { appDataStore: _ } = Kn(), [b, x] = m.useState("");
|
|
2028
|
+
console.log(d, "selectedAccountGuids"), m.useEffect(() => {
|
|
2029
|
+
h(
|
|
2030
2030
|
s,
|
|
2031
2031
|
_o(Lt(/* @__PURE__ */ new Date())),
|
|
2032
2032
|
ho(Wt(/* @__PURE__ */ new Date()))
|
|
2033
2033
|
).finally();
|
|
2034
2034
|
}, [s]);
|
|
2035
|
-
const
|
|
2036
|
-
() => mo(
|
|
2037
|
-
[
|
|
2035
|
+
const v = m.useMemo(
|
|
2036
|
+
() => mo(l, c, t, p),
|
|
2037
|
+
[l, p]
|
|
2038
2038
|
);
|
|
2039
|
-
console.log(JSON.parse(JSON.stringify(
|
|
2040
|
-
const
|
|
2041
|
-
b
|
|
2042
|
-
}, { totalSpending:
|
|
2043
|
-
(
|
|
2044
|
-
totalSpending:
|
|
2045
|
-
totalIncome:
|
|
2039
|
+
console.log(JSON.parse(JSON.stringify(v)), "spendingData");
|
|
2040
|
+
const y = (f) => {
|
|
2041
|
+
x(b === f ? "" : f);
|
|
2042
|
+
}, { totalSpending: D, totalIncome: g } = m.useMemo(() => r?.reduce(
|
|
2043
|
+
(f, { standard_spend: M = 0, income: P = 0 }) => ({
|
|
2044
|
+
totalSpending: f.totalSpending + M,
|
|
2045
|
+
totalIncome: f.totalIncome + P
|
|
2046
2046
|
}),
|
|
2047
2047
|
{ totalSpending: 0, totalIncome: 0 }
|
|
2048
2048
|
), [r]);
|
|
@@ -2050,7 +2050,7 @@ const B = {
|
|
|
2050
2050
|
r.length ? /* @__PURE__ */ e(
|
|
2051
2051
|
jt,
|
|
2052
2052
|
{
|
|
2053
|
-
...
|
|
2053
|
+
..._.appData.client_profile?.allow_trends_widget && {
|
|
2054
2054
|
buttonLabel: o.key_indicators_spend.spend_less_than_you_make_drawer.view_more
|
|
2055
2055
|
},
|
|
2056
2056
|
chartFor: "spending_vs_income",
|
|
@@ -2059,8 +2059,8 @@ const B = {
|
|
|
2059
2059
|
legendLabelMain: o.key_indicators_spend.spend_less_than_you_make_drawer.spending,
|
|
2060
2060
|
onClick: () => n("trends")(),
|
|
2061
2061
|
title: o.key_indicators_spend.spend_less_than_you_make_drawer.trends,
|
|
2062
|
-
totalComparison:
|
|
2063
|
-
totalMain:
|
|
2062
|
+
totalComparison: W(g, "0,0.00"),
|
|
2063
|
+
totalMain: W(D, "0,0.00")
|
|
2064
2064
|
}
|
|
2065
2065
|
) : /* @__PURE__ */ e(
|
|
2066
2066
|
Fe,
|
|
@@ -2083,7 +2083,7 @@ const B = {
|
|
|
2083
2083
|
variant: "no-buttons"
|
|
2084
2084
|
}
|
|
2085
2085
|
),
|
|
2086
|
-
|
|
2086
|
+
v ? /* @__PURE__ */ i(
|
|
2087
2087
|
K,
|
|
2088
2088
|
{
|
|
2089
2089
|
sx: {
|
|
@@ -2103,7 +2103,7 @@ const B = {
|
|
|
2103
2103
|
},
|
|
2104
2104
|
children: [
|
|
2105
2105
|
/* @__PURE__ */ e(N, { children: o.key_indicators_spend.spend_less_than_you_make_drawer.spending }),
|
|
2106
|
-
|
|
2106
|
+
_.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
|
|
2107
2107
|
$,
|
|
2108
2108
|
{
|
|
2109
2109
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
@@ -2124,18 +2124,18 @@ const B = {
|
|
|
2124
2124
|
/* @__PURE__ */ e(
|
|
2125
2125
|
go,
|
|
2126
2126
|
{
|
|
2127
|
-
data:
|
|
2128
|
-
onSelected:
|
|
2129
|
-
selectedId:
|
|
2127
|
+
data: v,
|
|
2128
|
+
onSelected: y,
|
|
2129
|
+
selectedId: b,
|
|
2130
2130
|
totalLabel: a.total_spending
|
|
2131
2131
|
}
|
|
2132
2132
|
),
|
|
2133
2133
|
/* @__PURE__ */ e(
|
|
2134
2134
|
yo,
|
|
2135
2135
|
{
|
|
2136
|
-
data:
|
|
2137
|
-
onSelected:
|
|
2138
|
-
selectedId:
|
|
2136
|
+
data: v,
|
|
2137
|
+
onSelected: y,
|
|
2138
|
+
selectedId: b
|
|
2139
2139
|
}
|
|
2140
2140
|
)
|
|
2141
2141
|
] })
|
|
@@ -2172,7 +2172,7 @@ const B = {
|
|
|
2172
2172
|
isOpen: r,
|
|
2173
2173
|
onClose: n
|
|
2174
2174
|
}) => {
|
|
2175
|
-
const { finstrong: o } =
|
|
2175
|
+
const { finstrong: o } = w(), a = {
|
|
2176
2176
|
spendLessThanYouMake: {
|
|
2177
2177
|
title: o.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_title,
|
|
2178
2178
|
description: o.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_description,
|
|
@@ -2286,7 +2286,7 @@ const B = {
|
|
|
2286
2286
|
)
|
|
2287
2287
|
] });
|
|
2288
2288
|
}, Er = () => {
|
|
2289
|
-
const { finstrong: t } =
|
|
2289
|
+
const { finstrong: t } = w(), { key_indicators_spend: r } = t, { healthScore: n } = F(), o = (s) => {
|
|
2290
2290
|
const d = $n(s), l = {
|
|
2291
2291
|
GOOD: r.ratio_good_description,
|
|
2292
2292
|
FAIR: r.ratio_fair_description,
|
|
@@ -2331,7 +2331,7 @@ const B = {
|
|
|
2331
2331
|
)
|
|
2332
2332
|
] });
|
|
2333
2333
|
}, Gr = S(Er), Hr = () => {
|
|
2334
|
-
const { healthScore: t } = F(), { finstrong: r } =
|
|
2334
|
+
const { healthScore: t } = F(), { finstrong: r } = w(), { key_indicators_save: n } = r, o = (d) => {
|
|
2335
2335
|
const l = wt(d), p = {
|
|
2336
2336
|
GOOD: n.days_of_cash_good_description,
|
|
2337
2337
|
FAIR: n.days_of_cash_fair_description,
|
|
@@ -2353,7 +2353,7 @@ const B = {
|
|
|
2353
2353
|
let h;
|
|
2354
2354
|
return l === "FAIR" && d !== null ? h = Y(
|
|
2355
2355
|
p[l],
|
|
2356
|
-
|
|
2356
|
+
W(d, "0,0.00")
|
|
2357
2357
|
) : h = p[l], {
|
|
2358
2358
|
cardState: l,
|
|
2359
2359
|
description: h,
|
|
@@ -2389,7 +2389,7 @@ const B = {
|
|
|
2389
2389
|
)
|
|
2390
2390
|
] });
|
|
2391
2391
|
}, Nr = S(Hr), Kr = () => {
|
|
2392
|
-
const { healthScore: t } = F(), { finstrong: r } =
|
|
2392
|
+
const { healthScore: t } = F(), { finstrong: r } = w(), { key_indicators_borrow: n } = r, { user: o } = J(), c = (l) => {
|
|
2393
2393
|
const p = zn(l), h = {
|
|
2394
2394
|
GOOD: n.manage_debit_good_description,
|
|
2395
2395
|
FAIR: n.manage_debit_fair_description,
|
|
@@ -2441,7 +2441,7 @@ const B = {
|
|
|
2441
2441
|
)
|
|
2442
2442
|
] });
|
|
2443
2443
|
}, jr = S(Kr), Yr = () => {
|
|
2444
|
-
const [t, r] = m.useState(0), { finstrong: n } =
|
|
2444
|
+
const [t, r] = m.useState(0), { finstrong: n } = w();
|
|
2445
2445
|
return /* @__PURE__ */ i(z, { children: [
|
|
2446
2446
|
/* @__PURE__ */ i(
|
|
2447
2447
|
qe,
|
|
@@ -2500,7 +2500,7 @@ const B = {
|
|
|
2500
2500
|
/* @__PURE__ */ e(ue, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(jr, {}) })
|
|
2501
2501
|
] });
|
|
2502
2502
|
}, Vr = S(Yr), Xr = ({ onClick: t }) => {
|
|
2503
|
-
const { finstrong: r } =
|
|
2503
|
+
const { finstrong: r } = w(), { isCopyLoaded: n } = j();
|
|
2504
2504
|
return n ? /* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
|
2505
2505
|
/* @__PURE__ */ e(bt, { size: 48 }),
|
|
2506
2506
|
/* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
|
@@ -2540,12 +2540,12 @@ const B = {
|
|
|
2540
2540
|
/* @__PURE__ */ i(u, { children: [
|
|
2541
2541
|
!!o.length && /* @__PURE__ */ e(C, { sx: { pb: 24 }, children: o.reduce((p, h, _) => {
|
|
2542
2542
|
if (h.guid === l.guid) return p;
|
|
2543
|
-
const b = Ne(_, o),
|
|
2543
|
+
const b = Ne(_, o), x = Ft(_, o);
|
|
2544
2544
|
return p.push(
|
|
2545
2545
|
/* @__PURE__ */ i(m.Fragment, { children: [
|
|
2546
2546
|
b && /* @__PURE__ */ e(Pt, { children: Ze(h.date) }),
|
|
2547
2547
|
/* @__PURE__ */ e(Bt, { transaction: h }),
|
|
2548
|
-
/* @__PURE__ */ e(ne, { sx: { ml:
|
|
2548
|
+
/* @__PURE__ */ e(ne, { sx: { ml: x ? 44 : 0 } })
|
|
2549
2549
|
] }, h.guid)
|
|
2550
2550
|
), p;
|
|
2551
2551
|
}, []) }),
|
|
@@ -2658,7 +2658,7 @@ const B = {
|
|
|
2658
2658
|
] }), ht = {
|
|
2659
2659
|
step: O.ConnectAccounts,
|
|
2660
2660
|
type: "main"
|
|
2661
|
-
},
|
|
2661
|
+
}, B = {
|
|
2662
2662
|
add_accounts: "Add Accounts",
|
|
2663
2663
|
add_income_primary: "What is your monthly income?",
|
|
2664
2664
|
add_income_secondary: "Add your income so that we can accurately measure your financial strength.",
|
|
@@ -2677,9 +2677,9 @@ const B = {
|
|
|
2677
2677
|
do_it_later: "Do It Later",
|
|
2678
2678
|
next: "Next"
|
|
2679
2679
|
}, ia = ({ isOpen: t, onClose: r }) => {
|
|
2680
|
-
const { visibleAccounts: n } = Me(), { calculateHealthScore: o } = F(), { finstrong: c } =
|
|
2680
|
+
const { visibleAccounts: n } = Me(), { calculateHealthScore: o } = F(), { finstrong: c } = w(), { setSelectedAccounts: a } = j(), { addRepeatingTransaction: s, setDateRange: d } = Ve(), { filter: l, setFilter: p, transactions: h } = jn(), { user: _, userProfile: b, updateUser: x, updateUserProfile: v } = J(), [y, D] = m.useState(_.credit_score || 0), [g, f] = m.useState(
|
|
2681
2681
|
ht
|
|
2682
|
-
), [M,
|
|
2682
|
+
), [M, P] = m.useState(1), [G, H] = m.useState(Ot.EveryMonth), [T, V] = m.useState([]), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(_.birthday), [ce, he] = m.useState(15), [q, Qe] = m.useState("");
|
|
2683
2683
|
m.useEffect(() => {
|
|
2684
2684
|
d({ start: Lt(dt()), end: Wt(dt()) });
|
|
2685
2685
|
}, []), m.useEffect(() => {
|
|
@@ -2712,9 +2712,9 @@ const B = {
|
|
|
2712
2712
|
}, Ut = {
|
|
2713
2713
|
[O.ConnectAccounts]: {
|
|
2714
2714
|
main: le ? /* @__PURE__ */ e(Nt, { shouldShowBalance: !1 }) : null,
|
|
2715
|
-
mainActionContent: le ?
|
|
2716
|
-
primaryText:
|
|
2717
|
-
secondaryText:
|
|
2715
|
+
mainActionContent: le ? B.next : B.add_accounts,
|
|
2716
|
+
primaryText: B.connect_your_accounts_primary,
|
|
2717
|
+
secondaryText: B.connect_your_accounts_secondary
|
|
2718
2718
|
},
|
|
2719
2719
|
[O.MonthlyIncome]: {
|
|
2720
2720
|
detail: /* @__PURE__ */ e(
|
|
@@ -2725,62 +2725,62 @@ const B = {
|
|
|
2725
2725
|
incomeTransactions: T,
|
|
2726
2726
|
secondDay: ce,
|
|
2727
2727
|
setCurrentStep: (A) => {
|
|
2728
|
-
|
|
2728
|
+
f(A), V((R) => {
|
|
2729
2729
|
if (R.some((de) => de.guid === q)) return R.filter((de) => de.guid !== q);
|
|
2730
2730
|
const Ie = h.find((de) => de.guid === q);
|
|
2731
2731
|
return Ie ? [...R, { ...Ie, firstDay: M, frequency: G, secondDay: ce }] : R;
|
|
2732
2732
|
});
|
|
2733
2733
|
},
|
|
2734
|
-
setFirstDay:
|
|
2734
|
+
setFirstDay: P,
|
|
2735
2735
|
setFrequency: H,
|
|
2736
2736
|
setSecondDay: he,
|
|
2737
2737
|
transaction: et
|
|
2738
2738
|
}
|
|
2739
2739
|
),
|
|
2740
|
-
detailActionContent:
|
|
2740
|
+
detailActionContent: B.confirm_income,
|
|
2741
2741
|
main: /* @__PURE__ */ e(
|
|
2742
2742
|
Co,
|
|
2743
2743
|
{
|
|
2744
2744
|
onSearch: qt,
|
|
2745
2745
|
onSelected: (A) => {
|
|
2746
|
-
|
|
2746
|
+
f({ step: O.MonthlyIncome, type: "detail" }), Qe(A);
|
|
2747
2747
|
}
|
|
2748
2748
|
}
|
|
2749
2749
|
),
|
|
2750
|
-
mainActionContent:
|
|
2751
|
-
primaryText:
|
|
2752
|
-
secondaryText:
|
|
2750
|
+
mainActionContent: B.confirm_income,
|
|
2751
|
+
primaryText: B.add_income_primary,
|
|
2752
|
+
secondaryText: B.add_income_secondary
|
|
2753
2753
|
},
|
|
2754
2754
|
[O.Birthday]: {
|
|
2755
2755
|
main: /* @__PURE__ */ e(ta, { selectedDate: X, setSelectedDate: se }),
|
|
2756
|
-
mainActionContent:
|
|
2757
|
-
primaryText:
|
|
2758
|
-
secondaryText:
|
|
2756
|
+
mainActionContent: B.next,
|
|
2757
|
+
primaryText: B.birthday_primary,
|
|
2758
|
+
secondaryText: B.birthday_secondary
|
|
2759
2759
|
},
|
|
2760
2760
|
[O.CreditScore]: {
|
|
2761
2761
|
main: /* @__PURE__ */ e(ra, { creditScore: y, setCreditScore: D }),
|
|
2762
|
-
mainActionContent:
|
|
2763
|
-
primaryText:
|
|
2764
|
-
secondaryText:
|
|
2762
|
+
mainActionContent: B.next,
|
|
2763
|
+
primaryText: B.credit_score_primary,
|
|
2764
|
+
secondaryText: B.credit_score_secondary
|
|
2765
2765
|
}
|
|
2766
2766
|
}, tt = () => {
|
|
2767
|
-
|
|
2767
|
+
f(ht), ae(!1), Qe(""), r();
|
|
2768
2768
|
}, nt = async () => {
|
|
2769
|
-
ae(!0), await en(T), await o(), await
|
|
2769
|
+
ae(!0), await en(T), await o(), await v({ ...b, has_completed_finstrong_onboarding: !0 }), tt();
|
|
2770
2770
|
}, Zt = () => {
|
|
2771
2771
|
if (g.step === O.CreditScore) {
|
|
2772
2772
|
nt();
|
|
2773
2773
|
return;
|
|
2774
2774
|
}
|
|
2775
|
-
|
|
2775
|
+
f({ step: g.step + 1, type: "main" });
|
|
2776
2776
|
}, Jt = () => {
|
|
2777
2777
|
const { step: A } = g, R = A + 1;
|
|
2778
2778
|
switch (A) {
|
|
2779
2779
|
case O.Birthday:
|
|
2780
|
-
X && X !== _.birthday &&
|
|
2780
|
+
X && X !== _.birthday && x({ ..._, birthday: X });
|
|
2781
2781
|
break;
|
|
2782
2782
|
case O.CreditScore:
|
|
2783
|
-
y && y !== _.credit_score &&
|
|
2783
|
+
y && y !== _.credit_score && x({ ..._, credit_score: y }), nt();
|
|
2784
2784
|
return;
|
|
2785
2785
|
case O.MonthlyIncome:
|
|
2786
2786
|
q && T.findIndex(({ guid: ge }) => ge === q) === -1 && V((ge) => [
|
|
@@ -2795,18 +2795,18 @@ const B = {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
break;
|
|
2797
2797
|
}
|
|
2798
|
-
R in O &&
|
|
2798
|
+
R in O && f({ step: R, type: "main" });
|
|
2799
2799
|
}, Qt = () => {
|
|
2800
2800
|
const { step: A, type: R } = g;
|
|
2801
2801
|
if (R === "detail") {
|
|
2802
|
-
|
|
2802
|
+
f({ step: A, type: "main" });
|
|
2803
2803
|
return;
|
|
2804
2804
|
}
|
|
2805
2805
|
if (A === O.Birthday && T.length) {
|
|
2806
|
-
|
|
2806
|
+
f({ step: A - 1, type: "detail" });
|
|
2807
2807
|
return;
|
|
2808
2808
|
}
|
|
2809
|
-
A > O.ConnectAccounts &&
|
|
2809
|
+
A > O.ConnectAccounts && f({ step: A - 1, type: "main" });
|
|
2810
2810
|
}, en = async (A) => {
|
|
2811
2811
|
for (const R of A) {
|
|
2812
2812
|
const {
|
|
@@ -2854,13 +2854,13 @@ const B = {
|
|
|
2854
2854
|
primaryButtonProps: tn,
|
|
2855
2855
|
primaryText: me?.mainActionContent,
|
|
2856
2856
|
secondaryColor: "primary",
|
|
2857
|
-
secondaryText:
|
|
2857
|
+
secondaryText: B.back,
|
|
2858
2858
|
title: c.title,
|
|
2859
2859
|
...!re && { onPrimaryAction: Jt },
|
|
2860
2860
|
children: [
|
|
2861
2861
|
re && /* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 24, position: "relative", px: 16, top: 126 }, children: [
|
|
2862
|
-
/* @__PURE__ */ e(Pe, { children:
|
|
2863
|
-
/* @__PURE__ */ e(k, { sx: { textAlign: "center" }, variant: "subtitle1", children:
|
|
2862
|
+
/* @__PURE__ */ e(Pe, { children: B.calculate_primary }),
|
|
2863
|
+
/* @__PURE__ */ e(k, { sx: { textAlign: "center" }, variant: "subtitle1", children: B.calculate_secondary })
|
|
2864
2864
|
] }),
|
|
2865
2865
|
me && !re && /* @__PURE__ */ i(m.Fragment, { children: [
|
|
2866
2866
|
/* @__PURE__ */ e(
|
|
@@ -2874,7 +2874,7 @@ const B = {
|
|
|
2874
2874
|
),
|
|
2875
2875
|
g.type === "main" && /* @__PURE__ */ i(C, { children: [
|
|
2876
2876
|
me.main,
|
|
2877
|
-
nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e($, { fullWidth: !0, onClick: Zt, children:
|
|
2877
|
+
nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e($, { fullWidth: !0, onClick: Zt, children: B.do_it_later }) })
|
|
2878
2878
|
] }),
|
|
2879
2879
|
g.type === "detail" && me.detail
|
|
2880
2880
|
] })
|
|
@@ -2886,7 +2886,7 @@ const B = {
|
|
|
2886
2886
|
{
|
|
2887
2887
|
onClose: () => ie(!1),
|
|
2888
2888
|
showConnectWidget: Ce,
|
|
2889
|
-
title:
|
|
2889
|
+
title: B.connect_accounts
|
|
2890
2890
|
}
|
|
2891
2891
|
)
|
|
2892
2892
|
] });
|
|
@@ -2922,7 +2922,7 @@ const B = {
|
|
|
2922
2922
|
/* @__PURE__ */ e(sa, { isOpen: t, onClose: () => r(!1) })
|
|
2923
2923
|
] });
|
|
2924
2924
|
}, la = ({ isOpen: t, onClose: r }) => {
|
|
2925
|
-
const { finstrong: n } =
|
|
2925
|
+
const { finstrong: n } = w(), o = E(), { updateUser: c, user: a } = J(), [s, d] = m.useState(a.birthday), l = (h) => {
|
|
2926
2926
|
d(Math.floor(new Date(h).getTime() / 1e3));
|
|
2927
2927
|
};
|
|
2928
2928
|
return /* @__PURE__ */ e(
|
|
@@ -2975,9 +2975,9 @@ const B = {
|
|
|
2975
2975
|
accounts: o,
|
|
2976
2976
|
common: c,
|
|
2977
2977
|
finstrong: a
|
|
2978
|
-
} =
|
|
2979
|
-
const { repeating_transaction_type: y, transactions: D, recurrence_type: g, amount:
|
|
2980
|
-
return y === Rt.Income && (D.length > 0 || g === Ot.EveryYear) ?
|
|
2978
|
+
} = w(), { repeatingTransactions: s } = Ve(), { user: d } = J(), l = s.reduce((x, v) => {
|
|
2979
|
+
const { repeating_transaction_type: y, transactions: D, recurrence_type: g, amount: f } = v;
|
|
2980
|
+
return y === Rt.Income && (D.length > 0 || g === Ot.EveryYear) ? x + f : x;
|
|
2981
2981
|
}, 0), [p, h] = m.useState(null), b = [
|
|
2982
2982
|
{
|
|
2983
2983
|
dynamicCopy: a.add_profile_item,
|
|
@@ -3014,7 +3014,7 @@ const B = {
|
|
|
3014
3014
|
n.length > 1 ? a.accounts : a.account
|
|
3015
3015
|
) : void 0
|
|
3016
3016
|
}
|
|
3017
|
-
].map((
|
|
3017
|
+
].map((x) => En(x));
|
|
3018
3018
|
return /* @__PURE__ */ i(te, { isOpen: t, onClose: r, title: a.financial_profile, children: [
|
|
3019
3019
|
/* @__PURE__ */ i(u, { sx: { gap: 20, p: 24 }, children: [
|
|
3020
3020
|
/* @__PURE__ */ i(u, { sx: { gap: 8 }, children: [
|
|
@@ -3025,7 +3025,7 @@ const B = {
|
|
|
3025
3025
|
Yt,
|
|
3026
3026
|
{
|
|
3027
3027
|
completeCopy: a.complete,
|
|
3028
|
-
value: b.reduce((
|
|
3028
|
+
value: b.reduce((x, v) => x + (v.isComplete ? 1 : 0), 0)
|
|
3029
3029
|
}
|
|
3030
3030
|
)
|
|
3031
3031
|
] }),
|
|
@@ -3070,7 +3070,7 @@ const B = {
|
|
|
3070
3070
|
] }),
|
|
3071
3071
|
/* @__PURE__ */ e(Po, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(k, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: t }) })
|
|
3072
3072
|
] }), _a = ({ report: t }) => {
|
|
3073
|
-
const { finstrong: r } =
|
|
3073
|
+
const { finstrong: r } = w(), { score_history_drawer_timeline: n } = r, {
|
|
3074
3074
|
health_score_point_difference: o,
|
|
3075
3075
|
newer_credit_score: c,
|
|
3076
3076
|
older_credit_score: a,
|
|
@@ -3079,7 +3079,7 @@ const B = {
|
|
|
3079
3079
|
older_health_score: l,
|
|
3080
3080
|
newer_health_score: p,
|
|
3081
3081
|
newer_score_calculated_at: h
|
|
3082
|
-
} = t, _ = Ao(new Date(h), "MMM d"), b = () => o === 0 ? "info.lighter" : o > 0 ? "success.lighter" : "error.lighter",
|
|
3082
|
+
} = t, _ = Ao(new Date(h), "MMM d"), b = () => o === 0 ? "info.lighter" : o > 0 ? "success.lighter" : "error.lighter", x = () => o === 0 ? Y(n.stayed_at, l) : o > 0 ? n.less_spending : n.more_spending, v = () => {
|
|
3083
3083
|
if (o === 0) return null;
|
|
3084
3084
|
const y = o > 0 ? n.up_from : n.down_from, D = Y(y, l, p);
|
|
3085
3085
|
return /* @__PURE__ */ i(z, { children: [
|
|
@@ -3116,11 +3116,11 @@ const B = {
|
|
|
3116
3116
|
}
|
|
3117
3117
|
),
|
|
3118
3118
|
/* @__PURE__ */ i(u, { sx: { gap: 2, width: "80%" }, children: [
|
|
3119
|
-
/* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children:
|
|
3119
|
+
/* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children: x() }),
|
|
3120
3120
|
/* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
|
|
3121
3121
|
_,
|
|
3122
3122
|
" ",
|
|
3123
|
-
|
|
3123
|
+
v()
|
|
3124
3124
|
] })
|
|
3125
3125
|
] })
|
|
3126
3126
|
]
|
|
@@ -3164,7 +3164,7 @@ const B = {
|
|
|
3164
3164
|
) })
|
|
3165
3165
|
] }) });
|
|
3166
3166
|
}, ha = S(_a), ma = ({ isOpen: t, onClose: r }) => {
|
|
3167
|
-
const n = E(), { finstrong: o } =
|
|
3167
|
+
const n = E(), { finstrong: o } = w(), { isCopyLoaded: c, isInitialized: a } = j(), { healthScore: s, healthScoreChangeReports: d, augmentedChartData: l } = F();
|
|
3168
3168
|
if (!c || !a) return /* @__PURE__ */ e(Q, {});
|
|
3169
3169
|
const p = je(s.health_score || 0, o), h = d.slice().reverse();
|
|
3170
3170
|
return /* @__PURE__ */ e(
|
|
@@ -3276,7 +3276,7 @@ const B = {
|
|
|
3276
3276
|
] })
|
|
3277
3277
|
] });
|
|
3278
3278
|
}, ba = ({ isOpen: t, onClose: r }) => {
|
|
3279
|
-
const { finstrong: n } =
|
|
3279
|
+
const { finstrong: n } = w(), { isCopyLoaded: o } = j();
|
|
3280
3280
|
return o ? /* @__PURE__ */ e(te, { isOpen: t, onClose: r, title: n.score_rubric, children: /* @__PURE__ */ i(u, { sx: { gap: 36, p: 24 }, children: [
|
|
3281
3281
|
/* @__PURE__ */ i(u, { sx: { gap: 20 }, children: [
|
|
3282
3282
|
/* @__PURE__ */ i(u, { sx: { gap: 8 }, children: [
|
|
@@ -3356,7 +3356,7 @@ const B = {
|
|
|
3356
3356
|
] })
|
|
3357
3357
|
] }) }) : /* @__PURE__ */ e(Q, {});
|
|
3358
3358
|
}, fa = S(ba), xa = S(() => {
|
|
3359
|
-
const [t, r] = m.useState(!1), n = E(), [o, { width: c }] = It(), { finstrong: a } =
|
|
3359
|
+
const [t, r] = m.useState(!1), n = E(), [o, { width: c }] = It(), { finstrong: a } = w(), { isCopyLoaded: s, isInitialized: d } = j(), { healthScore: l, healthScoreChange: p } = F(), h = n.palette.mode === "dark", _ = je(l?.health_score, a);
|
|
3360
3360
|
return !s || !d ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ i(K, { ref: o, sx: { p: 16 }, children: [
|
|
3361
3361
|
/* @__PURE__ */ e(
|
|
3362
3362
|
Eo,
|
|
@@ -3460,18 +3460,18 @@ const B = {
|
|
|
3460
3460
|
augmentedChartData: h,
|
|
3461
3461
|
calculateHealthScore: _,
|
|
3462
3462
|
healthScore: b,
|
|
3463
|
-
loadAugmentedChartData:
|
|
3464
|
-
loadMonthlySummaries:
|
|
3465
|
-
} = p, { finstrong: y, connect: D } =
|
|
3463
|
+
loadAugmentedChartData: x,
|
|
3464
|
+
loadMonthlySummaries: v
|
|
3465
|
+
} = p, { finstrong: y, connect: D } = w(), { isCopyLoaded: g, isInitialized: f, selectedAccounts: M, setSelectedAccounts: P } = j(), { loadRepeatingTransactions: G } = Ve(), { isMobile: H } = Ue(), T = E(), { userProfile: V } = J(), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(!1);
|
|
3466
3466
|
if (m.useEffect(() => {
|
|
3467
3467
|
d(T);
|
|
3468
3468
|
}, []), m.useEffect(() => {
|
|
3469
3469
|
n && (p.handleFinstrongWidgetPrimaryCtaClick = n);
|
|
3470
|
-
}, [n, p]), m.useEffect(() =>
|
|
3471
|
-
|
|
3472
|
-
}, [
|
|
3473
|
-
|
|
3474
|
-
}, [c, a,
|
|
3470
|
+
}, [n, p]), m.useEffect(() => P(o), [o]), m.useEffect(() => {
|
|
3471
|
+
f && (_().finally(), x().finally(), v().finally());
|
|
3472
|
+
}, [f]), m.useEffect(() => {
|
|
3473
|
+
f && (l(M, c.start, c.end), a || (s(), G().finally()));
|
|
3474
|
+
}, [c, a, f, M]), !g || !f) return /* @__PURE__ */ e(Q, {});
|
|
3475
3475
|
const ce = () => {
|
|
3476
3476
|
}, he = () => ae(!0);
|
|
3477
3477
|
return /* @__PURE__ */ i(
|
package/package.json
CHANGED