@mx-cartographer/experiences 7.2.9-alpha-finstrong-testing → 7.2.9-alpha-ram1-finstrong-testing

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