@mx-cartographer/experiences 7.2.14-alpha.san6 → 7.2.14-alpha.san7

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,18 +1,18 @@
1
1
  import { jsxs as i, Fragment as z, jsx as e } from "react/jsx-runtime";
2
2
  import C from "@mui/material/Box";
3
3
  import u from "@mui/material/Stack";
4
- import { useTheme as E, alpha as fe } from "@mui/material/styles";
4
+ import { useTheme as E, alpha as be } from "@mui/material/styles";
5
5
  import { PieChart as _n, BarPlot as hn } from "@mui/x-charts";
6
6
  import { TrendingUp as gt, ArrowRightAlt as mn, TrendingDown as gn, AccountBalance as yt, ChevronRight as Z, MultilineChart as bt, CreditCard as Ke, CheckCircle as yn, Cancel as bn, Savings as fn, ContentCopy as xn, Add as ft, Cardiology as Sn, Payments as Cn, CalendarMonth as vn, ExpandMore as wn } from "@mxenabled/mx-icons";
7
7
  import { P as k, H3 as N, Text as I, InstitutionLogo as xt, H2 as Pe, MerchantLogo as kn, Icon as Mn } from "@mxenabled/mxui";
8
- import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as ve, e as we, f as Tn, h as On, i as Rn, j as Ct, k as at, l as Fn, m as it, n as Pn, o as vt, p as Bn, q as wt, s as Te, t as Ln, u as Wn, v as $n, w as zn, A as ee, x as En, P as Gn } from "../FinstrongStore-1MFI6RcM.mjs";
8
+ import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as Ce, e as ve, f as Tn, h as On, i as Rn, j as Ct, k as at, l as Fn, m as it, n as Pn, o as vt, p as Bn, q as wt, s as Te, t as Ln, u as Wn, v as $n, w as zn, A as ee, x as En, P as Gn } from "../FinstrongStore-1MFI6RcM.mjs";
9
9
  import { y as Gi, F as Hi } from "../FinstrongStore-1MFI6RcM.mjs";
10
10
  import * as st from "d3";
11
11
  import { observer as S } from "mobx-react-lite";
12
- import { u as v, b as j, p as Q, z as F, q as Hn, a as kt, d as Me, m as Ye, g as Nn, f as Kn, j as Ve, h as jn, i as Yn } from "../hooks-C41HAxM5.mjs";
12
+ import { u as v, b as j, p as Q, z as F, q as Hn, a as kt, d as ke, m as Ye, g as Nn, f as Kn, j as Ve, h as jn, i as Yn } from "../hooks-C41HAxM5.mjs";
13
13
  import { L as J } from "../Loader-DUaFpDGv.mjs";
14
14
  import m from "react";
15
- import W from "@mui/material/Button";
15
+ import $ from "@mui/material/Button";
16
16
  import K from "@mui/material/Card";
17
17
  import { L as Xe } from "../LineChart-Ct9DNmhS.mjs";
18
18
  import { C as Mt } from "../ConnectionsDrawer-Bz4uwdFE.mjs";
@@ -26,9 +26,9 @@ import { u as It } from "../useDimensions-27p2evRx.mjs";
26
26
  import Un from "@mui/material/Chip";
27
27
  import { D as te } from "../Drawer-BEtCk82g.mjs";
28
28
  import ne from "@mui/material/Divider";
29
- import ye from "@mui/material/ListItem";
29
+ import ge from "@mui/material/ListItem";
30
30
  import At from "@mui/material/ListItemAvatar";
31
- import be from "@mui/material/ListItemText";
31
+ import ye from "@mui/material/ListItemText";
32
32
  import { g as Tt } from "../AccountFields-CPkGZ3SD.mjs";
33
33
  import Re from "@mui/material/List";
34
34
  import Zn from "@mui/material/ListItemButton";
@@ -77,14 +77,14 @@ const zo = ({
77
77
  dataIndex: r,
78
78
  arcColor: n,
79
79
  arcStartAngle: o,
80
- totalAngularSpan: l,
80
+ totalAngularSpan: c,
81
81
  centerX: a,
82
82
  centerY: s,
83
- arcRadius: p,
84
- innerArcRadius: c,
85
- outterArcRadius: d,
86
- progressEndAngle: _,
87
- unitsPerSegment: h,
83
+ arcRadius: d,
84
+ innerArcRadius: l,
85
+ outterArcRadius: p,
86
+ progressEndAngle: h,
87
+ unitsPerSegment: _,
88
88
  isFinacialStrengthGraph: b
89
89
  }) => {
90
90
  const f = E(), w = [
@@ -94,16 +94,16 @@ const zo = ({
94
94
  { offset: "83.46%", color: f.palette.chartMono.chartMono5 }
95
95
  ], [y, D] = Dn(
96
96
  t,
97
- l,
97
+ c,
98
98
  o,
99
99
  r
100
100
  ), [g, x] = In(
101
101
  y,
102
102
  D,
103
103
  r,
104
- h,
105
- _
106
- ), M = st.arc().innerRadius(c).outerRadius(d).startAngle(y).endAngle(D).padAngle(0.02).cornerRadius(8), $ = st.arc().innerRadius(c).outerRadius(d).startAngle(g).endAngle(x).padAngle(0.02).cornerRadius(8);
104
+ _,
105
+ h
106
+ ), M = st.arc().innerRadius(l).outerRadius(p).startAngle(y).endAngle(D).padAngle(0.02).cornerRadius(8), W = st.arc().innerRadius(l).outerRadius(p).startAngle(g).endAngle(x).padAngle(0.02).cornerRadius(8);
107
107
  return /* @__PURE__ */ i(z, { children: [
108
108
  /* @__PURE__ */ e(
109
109
  "path",
@@ -112,17 +112,17 @@ const zo = ({
112
112
  fill: b ? f.palette.divider : n
113
113
  }
114
114
  ),
115
- b && /* @__PURE__ */ e("path", { d: $({}), fill: "url(#arcGradient)" }),
115
+ b && /* @__PURE__ */ e("path", { d: W({}), fill: "url(#arcGradient)" }),
116
116
  /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
117
117
  "linearGradient",
118
118
  {
119
119
  gradientTransform: `rotate(5, ${a}, ${s})`,
120
120
  gradientUnits: "userSpaceOnUse",
121
121
  id: "arcGradient",
122
- x1: a + p * 0.8 * Math.cos(Math.PI / 1.35),
123
- x2: a - p * 0.8 * Math.cos(Math.PI / 1.35),
124
- y1: s + p * 0.8 * Math.sin(Math.PI / 1.35),
125
- y2: s - p * 0.8 * Math.sin(Math.PI / 1.35),
122
+ x1: a + d * 0.8 * Math.cos(Math.PI / 1.35),
123
+ x2: a - d * 0.8 * Math.cos(Math.PI / 1.35),
124
+ y1: s + d * 0.8 * Math.sin(Math.PI / 1.35),
125
+ y2: s - d * 0.8 * Math.sin(Math.PI / 1.35),
126
126
  children: w.map((G, H) => /* @__PURE__ */ e("stop", { offset: G.offset, stopColor: G.color }, H))
127
127
  }
128
128
  ) })
@@ -132,20 +132,20 @@ const zo = ({
132
132
  healthScore: r,
133
133
  size: n = "L",
134
134
  dialScoreData: o,
135
- minValue: l = 0,
135
+ minValue: c = 0,
136
136
  maxValue: a = 100,
137
137
  markerColor: s,
138
- healthScoreStatus: p,
139
- footerCenterContent: c,
140
- footerLeftContent: d,
141
- footerRightContent: _,
142
- isFinacialStrengthGraph: h = !1
138
+ healthScoreStatus: d,
139
+ footerCenterContent: l,
140
+ footerLeftContent: p,
141
+ footerRightContent: h,
142
+ isFinacialStrengthGraph: _ = !1
143
143
  }) => {
144
- const b = E(), f = -Math.PI / 1.35, w = Math.PI / 1.35, y = w - f, D = y / (a - l), g = (r - l) * D, x = f + g + 0.02, M = n !== "SM" ? 0.1 : 0.12, $ = t, G = t * (1 - M), H = $ * 2.5, T = H / 2, V = H / 2, re = (G + $) / 2, ae = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [Ce, ie] = An(re, x, ae), X = r / 25, se = {
144
+ const b = E(), f = -Math.PI / 1.35, w = Math.PI / 1.35, y = w - f, D = y / (a - c), g = (r - c) * D, x = f + g + 0.02, M = n !== "SM" ? 0.1 : 0.12, W = t, G = t * (1 - M), H = W * 2.5, T = H / 2, V = H / 2, re = (G + W) / 2, ae = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [Se, ie] = An(re, x, ae), X = r / 25, se = {
145
145
  L: { markerSize: 12, healthScoreFontSize: 64 },
146
146
  M: { markerSize: 10, healthScoreFontSize: 48 },
147
147
  SM: { markerSize: 3, healthScoreFontSize: 14 }
148
- }, ce = c === 0 ? mn : gn;
148
+ }, ce = l === 0 ? mn : gn;
149
149
  return /* @__PURE__ */ i(
150
150
  u,
151
151
  {
@@ -165,7 +165,7 @@ const zo = ({
165
165
  {
166
166
  data: o,
167
167
  innerRadius: G,
168
- outerRadius: $,
168
+ outerRadius: W,
169
169
  startAngle: Math.round(rt(f)),
170
170
  // Use Math.degrees to convert
171
171
  endAngle: Math.round(rt(w))
@@ -177,19 +177,19 @@ const zo = ({
177
177
  legend: { hidden: !0 }
178
178
  },
179
179
  slots: {
180
- pieArc: (he) => /* @__PURE__ */ e(
180
+ pieArc: (Me) => /* @__PURE__ */ e(
181
181
  zo,
182
182
  {
183
- arcColor: he.color,
183
+ arcColor: Me.color,
184
184
  arcRadius: t,
185
185
  arcStartAngle: f,
186
186
  centerX: T,
187
187
  centerY: V,
188
- dataIndex: he.dataIndex,
188
+ dataIndex: Me.dataIndex,
189
189
  dialScoreData: o,
190
190
  innerArcRadius: G,
191
- isFinacialStrengthGraph: h,
192
- outterArcRadius: $,
191
+ isFinacialStrengthGraph: _,
192
+ outterArcRadius: W,
193
193
  progressEndAngle: x,
194
194
  totalAngularSpan: y,
195
195
  unitsPerSegment: X
@@ -202,14 +202,14 @@ const zo = ({
202
202
  }
203
203
  },
204
204
  width: H,
205
- children: r >= l && r <= a && /* @__PURE__ */ e(
205
+ children: r >= c && r <= a && /* @__PURE__ */ e(
206
206
  "circle",
207
207
  {
208
- cx: T + Ce,
208
+ cx: T + Se,
209
209
  cy: V + ie,
210
210
  fill: b.palette.common.white,
211
211
  r: se[n].markerSize,
212
- stroke: h ? "url(#arcGradient)" : s,
212
+ stroke: _ ? "url(#arcGradient)" : s,
213
213
  strokeWidth: n !== "SM" ? 3 : 1
214
214
  }
215
215
  )
@@ -242,13 +242,13 @@ const zo = ({
242
242
  children: r
243
243
  }
244
244
  ),
245
- n !== "SM" && /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children: p })
245
+ n !== "SM" && /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children: d })
246
246
  ]
247
247
  }
248
248
  )
249
249
  }
250
250
  ),
251
- c !== void 0 && /* @__PURE__ */ e(
251
+ l !== void 0 && /* @__PURE__ */ e(
252
252
  C,
253
253
  {
254
254
  sx: {
@@ -258,23 +258,23 @@ const zo = ({
258
258
  transform: "translate(-50%, -50%)",
259
259
  textAlign: "center"
260
260
  },
261
- children: typeof c == "number" ? /* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
262
- c > 0 ? /* @__PURE__ */ e(gt, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(ce, { size: 16, sx: { color: "text.secondary" } }),
261
+ children: typeof l == "number" ? /* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
262
+ l > 0 ? /* @__PURE__ */ e(gt, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(ce, { size: 16, sx: { color: "text.secondary" } }),
263
263
  /* @__PURE__ */ e(
264
264
  k,
265
265
  {
266
266
  sx: {
267
267
  fontWeight: 600,
268
- color: c > 0 ? "success.main" : "text.secondary"
268
+ color: l > 0 ? "success.main" : "text.secondary"
269
269
  },
270
270
  variant: "body1",
271
- children: c
271
+ children: l
272
272
  }
273
273
  )
274
- ] }) : /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle2", children: c })
274
+ ] }) : /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle2", children: l })
275
275
  }
276
276
  ),
277
- d !== void 0 && /* @__PURE__ */ e(
277
+ p !== void 0 && /* @__PURE__ */ e(
278
278
  C,
279
279
  {
280
280
  sx: {
@@ -285,10 +285,10 @@ const zo = ({
285
285
  transform: "translate(-50%, -50%)",
286
286
  textAlign: "left"
287
287
  },
288
- children: /* @__PURE__ */ e(k, { variant: "body1", children: d })
288
+ children: /* @__PURE__ */ e(k, { variant: "body1", children: p })
289
289
  }
290
290
  ),
291
- _ !== void 0 && /* @__PURE__ */ e(
291
+ h !== void 0 && /* @__PURE__ */ e(
292
292
  C,
293
293
  {
294
294
  sx: {
@@ -298,7 +298,7 @@ const zo = ({
298
298
  transform: "translate(-50%, -50%)",
299
299
  textAlign: "right"
300
300
  },
301
- children: /* @__PURE__ */ e(k, { variant: "body1", children: _ })
301
+ children: /* @__PURE__ */ e(k, { variant: "body1", children: h })
302
302
  }
303
303
  )
304
304
  ]
@@ -306,7 +306,7 @@ const zo = ({
306
306
  );
307
307
  }, Et = S(
308
308
  ({ arcRadius: t, size: r = "L", healthScore: n, footerCenterContent: o }) => {
309
- const l = [
309
+ const c = [
310
310
  { id: 1, label: "Group A", value: 25 },
311
311
  { id: 2, label: "Group B", value: 25 },
312
312
  { id: 3, label: "Group C", value: 25 },
@@ -316,7 +316,7 @@ const zo = ({
316
316
  zt,
317
317
  {
318
318
  arcRadius: t,
319
- dialScoreData: l,
319
+ dialScoreData: c,
320
320
  footerCenterContent: r === "L" ? a.footer_center_content_updated_just_now : o,
321
321
  healthScore: n,
322
322
  healthScoreStatus: s.status,
@@ -331,60 +331,60 @@ const zo = ({
331
331
  size: r = "L",
332
332
  healthScore: n,
333
333
  maxValue: o = 850,
334
- minValue: l = 300,
334
+ minValue: c = 300,
335
335
  footerCenterContent: a
336
336
  }) => {
337
- const p = E().palette.mode === "dark", c = [
337
+ const d = E().palette.mode === "dark", l = [
338
338
  {
339
339
  id: 1,
340
340
  label: "Poor",
341
341
  value: 29,
342
- color: p ? ve.POOR : we.POOR
342
+ color: d ? Ce.POOR : ve.POOR
343
343
  },
344
344
  {
345
345
  id: 2,
346
346
  label: "Fair",
347
347
  value: 25,
348
- color: p ? ve.FAIR : we.FAIR
348
+ color: d ? Ce.FAIR : ve.FAIR
349
349
  },
350
350
  {
351
351
  id: 3,
352
352
  label: "Good",
353
353
  value: 17,
354
- color: p ? ve.GOOD : we.GOOD
354
+ color: d ? Ce.GOOD : ve.GOOD
355
355
  },
356
356
  {
357
357
  id: 4,
358
358
  label: "Very Good",
359
359
  value: 17,
360
- color: p ? ve.VERY_GOOD : we.VERY_GOOD
360
+ color: d ? Ce.VERY_GOOD : ve.VERY_GOOD
361
361
  },
362
362
  {
363
363
  id: 5,
364
364
  label: "Exceptional",
365
365
  value: 12,
366
- color: p ? ve.EXCEPTIONAL : we.EXCEPTIONAL
366
+ color: d ? Ce.EXCEPTIONAL : ve.EXCEPTIONAL
367
367
  }
368
- ], { finstrong: d } = v(), { isCopyLoaded: _ } = j();
369
- if (!_) return /* @__PURE__ */ e(J, {});
370
- const { status: h, color: b = "none" } = St(
368
+ ], { finstrong: p } = v(), { isCopyLoaded: h } = j();
369
+ if (!h) return /* @__PURE__ */ e(J, {});
370
+ const { status: _, color: b = "none" } = St(
371
371
  n,
372
- p,
373
- d.credit_score_status
372
+ d,
373
+ p.credit_score_status
374
374
  );
375
375
  return /* @__PURE__ */ e(
376
376
  zt,
377
377
  {
378
378
  arcRadius: t,
379
- dialScoreData: c,
379
+ dialScoreData: l,
380
380
  footerCenterContent: a,
381
- footerLeftContent: l,
381
+ footerLeftContent: c,
382
382
  footerRightContent: o,
383
383
  healthScore: n,
384
- healthScoreStatus: h,
384
+ healthScoreStatus: _,
385
385
  markerColor: b,
386
386
  maxValue: o,
387
- minValue: l,
387
+ minValue: c,
388
388
  size: r
389
389
  }
390
390
  );
@@ -394,12 +394,12 @@ const zo = ({
394
394
  isDashboard: r = !1,
395
395
  hasIcon: n = !0,
396
396
  buttonText: o,
397
- title: l,
397
+ title: c,
398
398
  titleDrawer: a,
399
399
  description: s,
400
- sx: p
400
+ sx: d
401
401
  }) => {
402
- const [c, d] = m.useState(!1), { connect: _, finstrong: h } = v();
402
+ const [l, p] = m.useState(!1), { connect: h, finstrong: _ } = v();
403
403
  return t ? /* @__PURE__ */ i(
404
404
  K,
405
405
  {
@@ -408,7 +408,7 @@ const zo = ({
408
408
  pt: 18,
409
409
  px: 24,
410
410
  width: "100%",
411
- ...p
411
+ ...d
412
412
  },
413
413
  children: [
414
414
  /* @__PURE__ */ i(
@@ -420,7 +420,7 @@ const zo = ({
420
420
  },
421
421
  children: [
422
422
  n && /* @__PURE__ */ e(yt, { sx: { height: 20, width: 20 } }),
423
- /* @__PURE__ */ e(N, { className: "connect-more-accounts-title", sx: { ...r && { fontSize: 15 } }, children: l || h.connect_more_accounts_title })
423
+ /* @__PURE__ */ e(N, { className: "connect-more-accounts-title", sx: { ...r && { fontSize: 15 } }, children: c || _.connect_more_accounts_title })
424
424
  ]
425
425
  }
426
426
  ),
@@ -430,33 +430,33 @@ const zo = ({
430
430
  className: "connect-more-accounts-description",
431
431
  sx: { color: "text.secondary", mt: 8 },
432
432
  variant: "subtitle1",
433
- children: s || h.connect_more_accounts_description
433
+ children: s || _.connect_more_accounts_description
434
434
  }
435
435
  ),
436
436
  /* @__PURE__ */ e(
437
- W,
437
+ $,
438
438
  {
439
439
  endIcon: /* @__PURE__ */ e(Z, {}),
440
- onClick: () => d(!0),
440
+ onClick: () => p(!0),
441
441
  size: "small",
442
442
  sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
443
- children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: o || h.connect_more_accounts_button })
443
+ children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: o || _.connect_more_accounts_button })
444
444
  }
445
445
  ),
446
446
  t === "connectDrawer" && /* @__PURE__ */ e(
447
447
  oe,
448
448
  {
449
- onClose: () => d(!1),
450
- showConnectWidget: c,
451
- title: a || _.mini_title
449
+ onClose: () => p(!1),
450
+ showConnectWidget: l,
451
+ title: a || h.mini_title
452
452
  }
453
453
  ),
454
454
  t === "connectionsDrawer" && /* @__PURE__ */ e(
455
455
  Mt,
456
456
  {
457
- onClose: () => d(!1),
458
- showConnectionsWidget: c,
459
- title: a || _.mini_title
457
+ onClose: () => p(!1),
458
+ showConnectionsWidget: l,
459
+ title: a || h.mini_title
460
460
  }
461
461
  )
462
462
  ]
@@ -465,45 +465,45 @@ const zo = ({
465
465
  };
466
466
  var _e = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(_e || {});
467
467
  const Go = ({ isOpen: t, onClose: r }) => {
468
- const { common: n, finstrong: o } = v(), { isMobile: l } = Ue(), { updateUser: a, user: s } = Q(), [p, c] = m.useState(s.credit_score || 0), d = !isNaN(p), _ = () => {
469
- r(), setTimeout(() => c(s.credit_score || 0), 300);
470
- }, h = () => {
471
- !p || p === s.credit_score || a({ ...s, credit_score: p });
468
+ const { common: n, finstrong: o } = v(), { isMobile: c } = Ue(), { updateUser: a, user: s } = Q(), [d, l] = m.useState(s.credit_score || 0), p = !isNaN(d), h = () => {
469
+ r(), setTimeout(() => l(s.credit_score || 0), 300);
470
+ }, _ = () => {
471
+ !d || d === s.credit_score || a({ ...s, credit_score: d });
472
472
  };
473
473
  return /* @__PURE__ */ e(
474
474
  Vn,
475
475
  {
476
476
  copy: { close_aria: n.close_aria, title: o.edit_credit_score },
477
- disablePrimaryButton: !p || !d,
477
+ disablePrimaryButton: !d || !p,
478
478
  isOpen: t,
479
479
  maxWidth: "xs",
480
- onClose: _,
481
- onPrimaryAction: h,
480
+ onClose: h,
481
+ onPrimaryAction: _,
482
482
  primaryColor: "primary",
483
483
  primaryText: n.save_button,
484
484
  sx: {
485
485
  "& .MuiDialog-paper": {
486
- minWidth: l ? "100%" : 400
486
+ minWidth: c ? "100%" : 400
487
487
  }
488
488
  },
489
489
  children: /* @__PURE__ */ e(
490
490
  "form",
491
491
  {
492
492
  onSubmit: (b) => {
493
- b.preventDefault(), h(), _();
493
+ b.preventDefault(), _(), h();
494
494
  },
495
495
  children: /* @__PURE__ */ e(
496
496
  Oe,
497
497
  {
498
- error: !d,
498
+ error: !p,
499
499
  fullWidth: !0,
500
500
  inputMode: "numeric",
501
501
  inputProps: {
502
502
  noValidate: !0,
503
503
  pattern: "[0-9]*"
504
504
  },
505
- onChange: (b) => c(Number(b.target.value)),
506
- value: d ? p : ""
505
+ onChange: (b) => l(Number(b.target.value)),
506
+ value: p ? d : ""
507
507
  }
508
508
  )
509
509
  }
@@ -514,7 +514,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
514
514
  credit_over_time_title: "Your Credit Over Time",
515
515
  credit_over_time_zero_state_desc: "Add your credit score to start building a full picture of your credit health."
516
516
  }, Ho = ({ chartFor: t }) => {
517
- const r = E(), n = r.palette.mode === "dark", { monthlySummaries: o } = F(), { user: l } = Q(), { finstrong: a } = v(), [s, { width: p }] = It(), c = {
517
+ const r = E(), n = r.palette.mode === "dark", { monthlySummaries: o } = F(), { user: c } = Q(), { finstrong: a } = v(), [s, { width: d }] = It(), l = {
518
518
  savingsOverTime: {
519
519
  icon: /* @__PURE__ */ e(gt, { size: 48, sx: { marginBottom: 8 } }),
520
520
  title: a.key_indicators_save.zero_state_title,
@@ -530,7 +530,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
530
530
  title: ze.credit_over_time_title,
531
531
  description: ze.credit_over_time_zero_state_desc
532
532
  }
533
- }[t], _ = {
533
+ }[t], h = {
534
534
  savingsOverTime: {
535
535
  title: a.key_indicators_save.savings_over_time,
536
536
  valueKey: "available_cash"
@@ -543,17 +543,17 @@ const Go = ({ isOpen: t, onClose: r }) => {
543
543
  title: ze.credit_over_time_title,
544
544
  valueKey: "credit_score"
545
545
  }
546
- }[t], h = Tn(o, _.valueKey), b = Math.max(...o.map((M) => M[_.valueKey])), f = () => b >= 1e6 ? { formatter: "0.000a", leftMargin: 55 } : b >= 1e3 ? { formatter: "0a", leftMargin: 35 } : { formatter: "0a", leftMargin: 30 }, { formatter: w, leftMargin: y } = f(), D = _.title, g = t === "creditOverTime";
546
+ }[t], _ = Tn(o, h.valueKey), b = Math.max(...o.map((M) => M[h.valueKey])), f = () => b >= 1e6 ? { formatter: "0.000a", leftMargin: 55 } : b >= 1e3 ? { formatter: "0a", leftMargin: 35 } : { formatter: "0a", leftMargin: 30 }, { formatter: w, leftMargin: y } = f(), D = h.title, g = t === "creditOverTime";
547
547
  let x;
548
548
  if (g) {
549
549
  const { color: M } = St(
550
- l?.credit_score ?? 0,
550
+ c?.credit_score ?? 0,
551
551
  n,
552
552
  a.credit_score_status
553
553
  );
554
554
  x = M;
555
555
  }
556
- return /* @__PURE__ */ e(K, { ref: s, sx: { backgroundColor: "background.paper" }, children: h.length >= 1 ? /* @__PURE__ */ i(u, { gap: 8, sx: { pl: 18 }, children: [
556
+ return /* @__PURE__ */ e(K, { ref: s, sx: { backgroundColor: "background.paper" }, children: _.length >= 1 ? /* @__PURE__ */ i(u, { gap: 8, sx: { pl: 18 }, children: [
557
557
  /* @__PURE__ */ e(k, { sx: { pb: 8, pt: 16 }, variant: "h3", children: D }),
558
558
  /* @__PURE__ */ e(
559
559
  Xe,
@@ -564,7 +564,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
564
564
  chartFor: t,
565
565
  colors: [r.palette.primary.main],
566
566
  curveType: g ? "linear" : "natural",
567
- datasets: h ? [h] : [],
567
+ datasets: _ ? [_] : [],
568
568
  height: 244,
569
569
  labelFontColor: g ? "text.primary" : "",
570
570
  labelFontSize: g ? 13 : void 0,
@@ -573,7 +573,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
573
573
  markStyles: (M) => g ? {
574
574
  markLabelStyles: {
575
575
  marginLeft: 16,
576
- transform: M === h.length - 1 ? "translateX(-16px)" : "translateX(16px)",
576
+ transform: M === _.length - 1 ? "translateX(-16px)" : "translateX(16px)",
577
577
  fontWeight: 600
578
578
  }
579
579
  } : {},
@@ -588,18 +588,18 @@ const Go = ({ isOpen: t, onClose: r }) => {
588
588
  showYAxisTicks: g,
589
589
  useCustomMark: !0,
590
590
  valueFormatterString: g ? void 0 : w,
591
- width: p < 342 ? p - 48 : 342
591
+ width: d < 342 ? d - 48 : 342
592
592
  }
593
593
  )
594
594
  ] }) : /* @__PURE__ */ i(u, { gap: 8, sx: { alignItems: "center", p: 24, pb: 48 }, children: [
595
- c.icon,
596
- /* @__PURE__ */ e(k, { fontWeight: 600, variant: "body1", children: c.title }),
597
- /* @__PURE__ */ e(k, { align: "center", variant: "subtitle1", children: c.description })
595
+ l.icon,
596
+ /* @__PURE__ */ e(k, { fontWeight: 600, variant: "body1", children: l.title }),
597
+ /* @__PURE__ */ e(k, { align: "center", variant: "subtitle1", children: l.description })
598
598
  ] }) });
599
599
  }, Qe = S(Ho), No = {
600
600
  updated_score: "Updated Score"
601
601
  }, Ko = () => {
602
- const { healthScoreChange: t } = F(), { user: r } = Q(), { availableWidth: n } = Hn(), { isSmallMobile: o } = Ue(n), [l, a] = m.useState(!1);
602
+ const { healthScoreChange: t } = F(), { user: r } = Q(), { availableWidth: n } = Hn(), { isSmallMobile: o } = Ue(n), [c, a] = m.useState(!1);
603
603
  return /* @__PURE__ */ i(u, { sx: { gap: 28 }, children: [
604
604
  /* @__PURE__ */ e(
605
605
  Eo,
@@ -610,8 +610,8 @@ const Go = ({ isOpen: t, onClose: r }) => {
610
610
  size: o ? "M" : "L"
611
611
  }
612
612
  ),
613
- /* @__PURE__ */ e(W, { onClick: () => a(!0), variant: "contained", children: No.updated_score }),
614
- /* @__PURE__ */ e(Gt, { isOpen: l, onClose: () => a(!1) }),
613
+ /* @__PURE__ */ e($, { onClick: () => a(!0), variant: "contained", children: No.updated_score }),
614
+ /* @__PURE__ */ e(Gt, { isOpen: c, onClose: () => a(!1) }),
615
615
  /* @__PURE__ */ e(Qe, { chartFor: "creditOverTime" })
616
616
  ] });
617
617
  }, jo = S(Ko), Le = ({ status: t }) => {
@@ -655,18 +655,18 @@ const Go = ({ isOpen: t, onClose: r }) => {
655
655
  connectTitle: r,
656
656
  connectDescription: n,
657
657
  children: o,
658
- description: l,
658
+ description: c,
659
659
  drawerTitle: a,
660
660
  isOpen: s,
661
- loadConnectAccountsCard: p = !0,
662
- onClose: c,
663
- stickyComponent: d,
664
- title: _,
665
- drawerType: h
661
+ loadConnectAccountsCard: d = !0,
662
+ onClose: l,
663
+ stickyComponent: p,
664
+ title: h,
665
+ drawerType: _
666
666
  }) => {
667
667
  const { finstrong: b } = v(), { isCopyLoaded: f } = j();
668
- return f ? /* @__PURE__ */ i(te, { isOpen: s, onClose: c, title: a || b.key_indicators, children: [
669
- (_ || l) && /* @__PURE__ */ i(
668
+ return f ? /* @__PURE__ */ i(te, { isOpen: s, onClose: l, title: a || b.key_indicators, children: [
669
+ (h || c) && /* @__PURE__ */ i(
670
670
  u,
671
671
  {
672
672
  sx: {
@@ -675,12 +675,12 @@ const Go = ({ isOpen: t, onClose: r }) => {
675
675
  p: 24
676
676
  },
677
677
  children: [
678
- _ && typeof _ == "string" ? /* @__PURE__ */ e(N, { children: _ }) : _,
679
- l && /* @__PURE__ */ e(k, { sx: { lineHeight: "24px" }, children: l })
678
+ h && typeof h == "string" ? /* @__PURE__ */ e(N, { children: h }) : h,
679
+ c && /* @__PURE__ */ e(k, { sx: { lineHeight: "24px" }, children: c })
680
680
  ]
681
681
  }
682
682
  ),
683
- d && /* @__PURE__ */ e(
683
+ p && /* @__PURE__ */ e(
684
684
  C,
685
685
  {
686
686
  sx: {
@@ -688,17 +688,17 @@ const Go = ({ isOpen: t, onClose: r }) => {
688
688
  top: 0,
689
689
  zIndex: 1
690
690
  },
691
- children: d
691
+ children: p
692
692
  }
693
693
  ),
694
694
  t && /* @__PURE__ */ e(C, { children: t }),
695
695
  /* @__PURE__ */ i(u, { sx: { p: 24, gap: 24 }, children: [
696
696
  o,
697
- p && /* @__PURE__ */ e(
697
+ d && /* @__PURE__ */ e(
698
698
  Be,
699
699
  {
700
700
  description: n,
701
- drawerType: h,
701
+ drawerType: _,
702
702
  isDashboard: !0,
703
703
  sx: { backgroundColor: "background.paper" },
704
704
  title: r
@@ -711,72 +711,72 @@ const Go = ({ isOpen: t, onClose: r }) => {
711
711
  shouldShowBalance: r = !0,
712
712
  loadAccounts: n
713
713
  }) => {
714
- const { config: o } = kt(), { accounts: l } = v(), { selectedAccounts: a } = j(), s = m.useCallback(
715
- (c) => {
716
- t?.(c);
714
+ const { config: o } = kt(), { accounts: c } = v(), { selectedAccounts: a } = j(), s = m.useCallback(
715
+ (l) => {
716
+ t?.(l);
717
717
  },
718
718
  [t]
719
- ), p = m.useMemo(
720
- () => Array.from(new Set(a.map((c) => c.account_type))).filter(
721
- (c) => n ? n.includes(c) : !0
719
+ ), d = m.useMemo(
720
+ () => Array.from(new Set(a.map((l) => l.account_type))).filter(
721
+ (l) => n ? n.includes(l) : !0
722
722
  ),
723
723
  [a, n]
724
724
  );
725
- return a.length ? /* @__PURE__ */ e(m.Fragment, { children: p.map((c) => {
726
- const { accountsForType: d, totalBalanceForType: _ } = a.reduce(
727
- (h, b) => (b.account_type === c && (h.accountsForType.push(b), h.totalBalanceForType += b.balance || 0), h),
725
+ return a.length ? /* @__PURE__ */ e(m.Fragment, { children: d.map((l) => {
726
+ const { accountsForType: p, totalBalanceForType: h } = a.reduce(
727
+ (_, b) => (b.account_type === l && (_.accountsForType.push(b), _.totalBalanceForType += b.balance || 0), _),
728
728
  { accountsForType: [], totalBalanceForType: 0 }
729
729
  );
730
730
  return /* @__PURE__ */ i(
731
731
  Re,
732
732
  {
733
733
  subheader: /* @__PURE__ */ e(Qn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
734
- /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: l.account_types[c] }),
735
- r && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: L(_, "0,0.00") })
734
+ /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: c.account_types[l] }),
735
+ r && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: L(h, "0,0.00") })
736
736
  ] }) }),
737
737
  sx: { bgcolor: "background.paper" },
738
738
  children: [
739
- d.map((h, b) => {
740
- const { firstValue: f } = Tt(h, l), w = Dt(h, {
739
+ p.map((_, b) => {
740
+ const { firstValue: f } = Tt(_, c), w = Dt(_, {
741
741
  allowNickname: o?.show_account_nicknames_in_master
742
742
  }), y = /* @__PURE__ */ i(z, { children: [
743
- /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: h.institution_guid ?? "" }) }),
743
+ /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: _.institution_guid ?? "" }) }),
744
744
  /* @__PURE__ */ e(
745
- be,
745
+ ye,
746
746
  {
747
- primary: `${w}${h.account_number ? ` *${h.account_number}` : ""}`,
747
+ primary: `${w}${_.account_number ? ` *${_.account_number}` : ""}`,
748
748
  primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
749
749
  }
750
750
  ),
751
751
  r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: L(f ?? 0, "0,0.00") })
752
752
  ] });
753
753
  return /* @__PURE__ */ i(m.Fragment, { children: [
754
- /* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(h), children: y }) : y }),
755
- b !== d.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
756
- ] }, h.guid);
754
+ /* @__PURE__ */ e(ge, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(_), children: y }) : y }),
755
+ b !== p.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
756
+ ] }, _.guid);
757
757
  }),
758
758
  /* @__PURE__ */ e(ne, {})
759
759
  ]
760
760
  },
761
- c
761
+ l
762
762
  );
763
763
  }) }) : null;
764
764
  }, Nt = S(Uo), Zo = ({ loadAccounts: t, loadMoreLabel: r }) => {
765
- const n = E(), { config: o } = kt(), { connect: l, finstrong: a } = v(), { accounts: s } = v(), { selectedAccounts: p } = j(), [c, d] = m.useState(!1), [_, h] = m.useState(!1), b = m.useMemo(
766
- () => p.filter(
765
+ const n = E(), { config: o } = kt(), { connect: c, finstrong: a } = v(), { accounts: s } = v(), { selectedAccounts: d } = j(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = m.useMemo(
766
+ () => d.filter(
767
767
  (y) => t ? t.includes(y.account_type) : !0
768
768
  ),
769
- [p, t]
769
+ [d, t]
770
770
  ), f = m.useMemo(() => b.slice(0, 3), [b]), w = (y) => {
771
771
  const { firstValue: D } = Tt(y, s);
772
772
  return D;
773
773
  };
774
774
  return b.length >= 1 ? /* @__PURE__ */ i(z, { children: [
775
775
  /* @__PURE__ */ e(C, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: f.map((y, D) => /* @__PURE__ */ i(m.Fragment, { children: [
776
- /* @__PURE__ */ i(ye, { sx: { px: 24 }, children: [
776
+ /* @__PURE__ */ i(ge, { sx: { px: 24 }, children: [
777
777
  /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: y.institution_guid ?? "" }) }),
778
778
  /* @__PURE__ */ e(
779
- be,
779
+ ye,
780
780
  {
781
781
  primary: `${Dt(y, {
782
782
  allowNickname: o?.show_account_nicknames_in_master
@@ -791,10 +791,10 @@ const Go = ({ isOpen: t, onClose: r }) => {
791
791
  ] }, y.guid)) }),
792
792
  b.length > 3 && /* @__PURE__ */ i(z, { children: [
793
793
  /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
794
- W,
794
+ $,
795
795
  {
796
796
  endIcon: /* @__PURE__ */ e(Z, {}),
797
- onClick: () => d(!0),
797
+ onClick: () => p(!0),
798
798
  size: "small",
799
799
  sx: { my: 0, px: 16, py: 12, width: "100%" },
800
800
  children: /* @__PURE__ */ i(I, { bold: !0, variant: "body1", children: [
@@ -804,13 +804,13 @@ const Go = ({ isOpen: t, onClose: r }) => {
804
804
  ] })
805
805
  }
806
806
  ) }),
807
- /* @__PURE__ */ e(te, { isOpen: c, onClose: () => d(!1), title: a.accounts, children: /* @__PURE__ */ e(Nt, { loadAccounts: t }) })
807
+ /* @__PURE__ */ e(te, { isOpen: l, onClose: () => p(!1), title: a.accounts, children: /* @__PURE__ */ e(Nt, { loadAccounts: t }) })
808
808
  ] })
809
809
  ] }) : /* @__PURE__ */ i(z, { children: [
810
810
  /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
811
- W,
811
+ $,
812
812
  {
813
- onClick: () => h(!0),
813
+ onClick: () => _(!0),
814
814
  size: "small",
815
815
  sx: { my: 0, px: 16, py: 12, width: "100%" },
816
816
  variant: "contained",
@@ -820,13 +820,13 @@ const Go = ({ isOpen: t, onClose: r }) => {
820
820
  /* @__PURE__ */ e(
821
821
  oe,
822
822
  {
823
- onClose: () => h(!1),
824
- showConnectWidget: _,
825
- title: l.mini_title
823
+ onClose: () => _(!1),
824
+ showConnectWidget: h,
825
+ title: c.mini_title
826
826
  }
827
827
  )
828
828
  ] });
829
- }, Kt = S(Zo), Se = ({ balance: t, title: r, sx: n }) => /* @__PURE__ */ i(
829
+ }, Kt = S(Zo), xe = ({ balance: t, title: r, sx: n }) => /* @__PURE__ */ i(
830
830
  u,
831
831
  {
832
832
  sx: {
@@ -844,7 +844,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
844
844
  ]
845
845
  }
846
846
  );
847
- var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), ke = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(ke || {}), U = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(U || {});
847
+ var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), we = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(we || {}), U = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(U || {});
848
848
  const B = {
849
849
  bi_weekly: "Bi-Weekly",
850
850
  calculate: "Calculate",
@@ -875,19 +875,19 @@ const B = {
875
875
  [U.Weekly]: B.estimated_period_weekly,
876
876
  [U.Daily]: B.estimated_period_daily
877
877
  }, er = [
878
- { id: ke.Months, label: B.months },
879
- { id: ke.Years, label: B.years },
880
- { id: ke.Days, label: B.days }
878
+ { id: we.Months, label: B.months },
879
+ { id: we.Years, label: B.years },
880
+ { id: we.Days, label: B.days }
881
881
  ], tr = ({ total: t }) => {
882
- const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = m.useState(0), [l, a] = m.useState(at(t)), [s, p] = m.useState(
882
+ const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = m.useState(0), [c, a] = m.useState(at(t)), [s, d] = m.useState(
883
883
  at(t)
884
- ), [c, d] = m.useState(r), [_, h] = m.useState(Fn(t)), [b, f] = m.useState(ke.Months);
884
+ ), [l, p] = m.useState(r), [h, _] = m.useState(Fn(t)), [b, f] = m.useState(we.Months);
885
885
  m.useEffect(() => {
886
886
  o(
887
887
  it({
888
888
  contribution: s,
889
- goalAmount: c,
890
- goalPeriod: _,
889
+ goalAmount: l,
890
+ goalPeriod: h,
891
891
  targetPeriod: b,
892
892
  totalSaved: t
893
893
  })
@@ -897,8 +897,8 @@ const B = {
897
897
  y.preventDefault(), o(
898
898
  it({
899
899
  contribution: s,
900
- goalAmount: c,
901
- goalPeriod: _,
900
+ goalAmount: l,
901
+ goalPeriod: h,
902
902
  targetPeriod: b,
903
903
  totalSaved: t
904
904
  })
@@ -906,13 +906,13 @@ const B = {
906
906
  };
907
907
  return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("form", { onSubmit: w, children: /* @__PURE__ */ i(u, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
908
908
  /* @__PURE__ */ e(
909
- Se,
909
+ xe,
910
910
  {
911
911
  balance: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", height: 32 }, children: [
912
912
  /* @__PURE__ */ e(I, { variant: "h2", children: L(n, "0,0") }),
913
913
  /* @__PURE__ */ i(I, { sx: { alignSelf: "end", height: 24 }, variant: "subtitle2", children: [
914
914
  "/",
915
- Jo[l]
915
+ Jo[c]
916
916
  ] })
917
917
  ] }),
918
918
  title: B.estimated_contribution
@@ -929,16 +929,16 @@ const B = {
929
929
  },
930
930
  label: B.savings_goal,
931
931
  onChange: (y) => {
932
- y.target.value && d(Number(y.target.value.replace(/[^0-9]/g, "")));
932
+ y.target.value && p(Number(y.target.value.replace(/[^0-9]/g, "")));
933
933
  },
934
- value: c ? L(c, "0,0") : ""
934
+ value: l ? L(l, "0,0") : ""
935
935
  }
936
936
  ),
937
937
  /* @__PURE__ */ e(
938
938
  ct,
939
939
  {
940
940
  label: B.how_often_contribute,
941
- onChange: p,
941
+ onChange: d,
942
942
  options: Qo,
943
943
  required: !0,
944
944
  value: s
@@ -955,7 +955,7 @@ const B = {
955
955
  pattern: "[0-9]*"
956
956
  },
957
957
  label: B.meet_your_goal_within,
958
- onChange: (y) => h(Number(y.target.value)),
958
+ onChange: (y) => _(Number(y.target.value)),
959
959
  sx: {
960
960
  "& .MuiInputBase-root": {
961
961
  borderBottomRightRadius: 0,
@@ -965,7 +965,7 @@ const B = {
965
965
  }
966
966
  }
967
967
  },
968
- value: _
968
+ value: h
969
969
  }
970
970
  ),
971
971
  /* @__PURE__ */ e(
@@ -984,20 +984,20 @@ const B = {
984
984
  }
985
985
  )
986
986
  ] }),
987
- /* @__PURE__ */ e(W, { fullWidth: !0, onClick: w, type: "submit", variant: "contained", children: B.calculate })
987
+ /* @__PURE__ */ e($, { fullWidth: !0, onClick: w, type: "submit", variant: "contained", children: B.calculate })
988
988
  ] }) }) });
989
989
  }, nr = S(tr), Ae = {
990
990
  connect_accounts: "Connect Accounts",
991
991
  more_accounts: "More Accounts",
992
992
  your_savings: "Your Savings"
993
993
  }, or = () => {
994
- const { savingsAccounts: t } = Me(), [r, n] = m.useState(!1), o = m.useMemo(
995
- () => t.reduce((l, a) => l + (a.balance ?? 0), 0),
994
+ const { savingsAccounts: t } = ke(), [r, n] = m.useState(!1), o = m.useMemo(
995
+ () => t.reduce((c, a) => c + (a.balance ?? 0), 0),
996
996
  [t]
997
997
  );
998
998
  return /* @__PURE__ */ i(u, { sx: { gap: 24 }, children: [
999
999
  /* @__PURE__ */ e(K, { sx: { bgcolor: "background.paper", p: 16 }, children: /* @__PURE__ */ i(u, { sx: { gap: 16 }, children: [
1000
- /* @__PURE__ */ e(Se, { balance: o, title: Ae.your_savings }),
1000
+ /* @__PURE__ */ e(xe, { balance: o, title: Ae.your_savings }),
1001
1001
  t.length ? /* @__PURE__ */ e(Kt, { loadAccounts: [He.SAVINGS], loadMoreLabel: Ae.connect_accounts }) : /* @__PURE__ */ e(eo, { onClick: () => n(!0), variant: "contained", children: Ae.connect_accounts })
1002
1002
  ] }) }),
1003
1003
  /* @__PURE__ */ e(nr, { total: o }),
@@ -1011,7 +1011,7 @@ const B = {
1011
1011
  )
1012
1012
  ] });
1013
1013
  }, rr = S(or), We = S(
1014
- ({ label: t, value: r, status: n, bottomComponent: o, statusBarData: l = [] }) => {
1014
+ ({ label: t, value: r, status: n, bottomComponent: o, statusBarData: c = [] }) => {
1015
1015
  const a = {
1016
1016
  GOOD: {
1017
1017
  progressBarColor: "primary.main"
@@ -1025,12 +1025,12 @@ const B = {
1025
1025
  MISSING: {
1026
1026
  progressBarColor: "text.secondary"
1027
1027
  }
1028
- }[n], s = l.map((p, c) => l.length === 2 ? {
1029
- color: c === 0 ? "primary.main" : p.color || a?.progressBarColor,
1030
- percentage: p.percentage
1028
+ }[n], s = c.map((d, l) => c.length === 2 ? {
1029
+ color: l === 0 ? "primary.main" : d.color || a?.progressBarColor,
1030
+ percentage: d.percentage
1031
1031
  } : {
1032
- color: p.color || a?.progressBarColor,
1033
- percentage: p.percentage
1032
+ color: d.color || a?.progressBarColor,
1033
+ percentage: d.percentage
1034
1034
  });
1035
1035
  return /* @__PURE__ */ i(
1036
1036
  u,
@@ -1077,7 +1077,7 @@ const B = {
1077
1077
  return /* @__PURE__ */ e(
1078
1078
  We,
1079
1079
  {
1080
- bottomComponent: /* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: ir.map((l) => /* @__PURE__ */ i(u, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
1080
+ bottomComponent: /* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: ir.map((c) => /* @__PURE__ */ i(u, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
1081
1081
  /* @__PURE__ */ e(
1082
1082
  ne,
1083
1083
  {
@@ -1089,8 +1089,8 @@ const B = {
1089
1089
  }
1090
1090
  }
1091
1091
  ),
1092
- /* @__PURE__ */ e(I, { variant: "caption", children: l })
1093
- ] }, l)) }),
1092
+ /* @__PURE__ */ e(I, { variant: "caption", children: c })
1093
+ ] }, c)) }),
1094
1094
  label: ar.sticky_label,
1095
1095
  status: o,
1096
1096
  statusBarData: [
@@ -1106,29 +1106,29 @@ const B = {
1106
1106
  bgcolor: r,
1107
1107
  height: n = "calc(100dvh - 36px)",
1108
1108
  loader: o = /* @__PURE__ */ e(J, { label: "Loading", size: 40 }),
1109
- onClick: l,
1109
+ onClick: c,
1110
1110
  showInsights: a = !1,
1111
1111
  showLoader: s = !1,
1112
- width: p = "100%",
1113
- zeroState: c = /* @__PURE__ */ e(ro, {})
1112
+ width: d = "100%",
1113
+ zeroState: l = /* @__PURE__ */ e(ro, {})
1114
1114
  }) => {
1115
- const { getCategoryName: d } = Ye(), { onEvent: _ } = Nn(), { categories: h } = v(), { clearExpandedSplits: b, setShowInsights: f, toggleSplit: w } = oo(), y = (x) => {
1116
- const M = t.find(($) => $.guid === x);
1115
+ const { getCategoryName: p } = Ye(), { onEvent: h } = Nn(), { categories: _ } = v(), { clearExpandedSplits: b, setShowInsights: f, toggleSplit: w } = oo(), y = (x) => {
1116
+ const M = t.find((W) => W.guid === x);
1117
1117
  if (M?.has_been_split) {
1118
1118
  w(M.guid);
1119
1119
  return;
1120
1120
  }
1121
- _(ao.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
1121
+ h(ao.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
1122
1122
  account_guid: M?.account_guid,
1123
1123
  transaction_guid: x
1124
- }), l?.(x);
1124
+ }), c?.(x);
1125
1125
  }, D = m.useRef(null), g = no({
1126
1126
  count: t.length,
1127
1127
  getScrollElement: () => D.current,
1128
1128
  estimateSize: (x) => ut + (Ne(x, t) ? _t : 0),
1129
1129
  overscan: 5
1130
1130
  });
1131
- return m.useEffect(() => g.measure(), [t]), m.useEffect(() => f(a), [a]), m.useEffect(() => () => b(), []), /* @__PURE__ */ e(Re, { sx: { width: p }, children: /* @__PURE__ */ e(C, { height: n, overflow: "auto", ref: D, width: p, children: /* @__PURE__ */ i(
1131
+ return m.useEffect(() => g.measure(), [t]), m.useEffect(() => f(a), [a]), m.useEffect(() => () => b(), []), /* @__PURE__ */ e(Re, { sx: { width: d }, children: /* @__PURE__ */ e(C, { height: n, overflow: "auto", ref: D, width: d, children: /* @__PURE__ */ i(
1132
1132
  C,
1133
1133
  {
1134
1134
  height: (
@@ -1139,9 +1139,9 @@ const B = {
1139
1139
  width: "100%",
1140
1140
  children: [
1141
1141
  s && o,
1142
- !s && g.getVirtualItems().length === 0 && c,
1142
+ !s && g.getVirtualItems().length === 0 && l,
1143
1143
  !s && g.getVirtualItems().length > 0 && g.getVirtualItems().map((x) => {
1144
- const M = t[x.index], $ = Ne(x.index, t), G = Ft(x.index, t), H = ut + ($ ? _t : 0);
1144
+ const M = t[x.index], W = Ne(x.index, t), G = Ft(x.index, t), H = ut + (W ? _t : 0);
1145
1145
  return /* @__PURE__ */ i(
1146
1146
  C,
1147
1147
  {
@@ -1152,17 +1152,17 @@ const B = {
1152
1152
  width: "100%"
1153
1153
  },
1154
1154
  children: [
1155
- $ && /* @__PURE__ */ e(Pt, { bgcolor: r, children: Ze(M.date) }),
1155
+ W && /* @__PURE__ */ e(Pt, { bgcolor: r, children: Ze(M.date) }),
1156
1156
  /* @__PURE__ */ e(
1157
1157
  Bt,
1158
1158
  {
1159
- ...l && { onClick: y },
1159
+ ...c && { onClick: y },
1160
1160
  transaction: {
1161
1161
  ...M,
1162
- category: h.default_categories[M.top_level_category_guid]?.replace(
1162
+ category: _.default_categories[M.top_level_category_guid]?.replace(
1163
1163
  /&amp;/g,
1164
1164
  "&"
1165
- ) ?? d(M.top_level_category_guid)
1165
+ ) ?? p(M.top_level_category_guid)
1166
1166
  }
1167
1167
  }
1168
1168
  ),
@@ -1180,25 +1180,25 @@ const B = {
1180
1180
  amountColor: r = "success.main",
1181
1181
  amountPosition: n = "center",
1182
1182
  formatDate: o = Ze,
1183
- secondaryIcon: l
1183
+ secondaryIcon: c
1184
1184
  }) => {
1185
- const a = E(), { connect: s, finstrong: p } = v(), [c, d] = m.useState(!1), [_, h] = m.useState(!1), b = 3, f = t.length > b, w = t.length - b;
1185
+ const a = E(), { connect: s, finstrong: d } = v(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = 3, f = t.length > b, w = t.length - b;
1186
1186
  return !t || t.length === 0 ? /* @__PURE__ */ i(z, { children: [
1187
1187
  /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
1188
- W,
1188
+ $,
1189
1189
  {
1190
- onClick: () => h(!0),
1190
+ onClick: () => _(!0),
1191
1191
  size: "small",
1192
1192
  sx: { my: 0, px: 16, py: 12, width: "100%" },
1193
1193
  variant: "contained",
1194
- children: /* @__PURE__ */ e(I, { bold: !0, variant: "body1", children: p.connect_more_accounts_button })
1194
+ children: /* @__PURE__ */ e(I, { bold: !0, variant: "body1", children: d.connect_more_accounts_button })
1195
1195
  }
1196
1196
  ) }),
1197
1197
  /* @__PURE__ */ e(
1198
1198
  oe,
1199
1199
  {
1200
- onClose: () => h(!1),
1201
- showConnectWidget: _,
1200
+ onClose: () => _(!1),
1201
+ showConnectWidget: h,
1202
1202
  title: s.mini_title
1203
1203
  }
1204
1204
  )
@@ -1241,7 +1241,7 @@ const B = {
1241
1241
  /* @__PURE__ */ i(u, { sx: { gap: 4 }, children: [
1242
1242
  /* @__PURE__ */ e(k, { bold: !0, variant: "body1", children: y.description }),
1243
1243
  /* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
1244
- !!l && l,
1244
+ !!c && c,
1245
1245
  /* @__PURE__ */ e(I, { variant: "caption", children: o(y.date) })
1246
1246
  ] })
1247
1247
  ] }),
@@ -1256,25 +1256,25 @@ const B = {
1256
1256
  )) }),
1257
1257
  f && /* @__PURE__ */ i(z, { children: [
1258
1258
  /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
1259
- W,
1259
+ $,
1260
1260
  {
1261
1261
  endIcon: /* @__PURE__ */ e(Z, {}),
1262
- onClick: () => d(!0),
1262
+ onClick: () => p(!0),
1263
1263
  size: "small",
1264
1264
  sx: { my: 0, px: 16, py: 12, width: "100%" },
1265
1265
  children: /* @__PURE__ */ i(I, { bold: !0, variant: "body1", children: [
1266
1266
  w,
1267
1267
  " ",
1268
- p.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_more_transactions
1268
+ d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_more_transactions
1269
1269
  ] })
1270
1270
  }
1271
1271
  ) }),
1272
1272
  /* @__PURE__ */ e(
1273
1273
  te,
1274
1274
  {
1275
- isOpen: c,
1276
- onClose: () => d(!1),
1277
- title: p.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
1275
+ isOpen: l,
1276
+ onClose: () => p(!1),
1277
+ title: d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
1278
1278
  children: /* @__PURE__ */ e(dr, { transactions: t })
1279
1279
  }
1280
1280
  )
@@ -1331,7 +1331,7 @@ const B = {
1331
1331
  }
1332
1332
  ) });
1333
1333
  }, ur = S(pr), _r = () => {
1334
- const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_spend: n } = r, { pay_bills_on_time_drawer: o } = n, l = Bn(t.spending_fee_transaction_count);
1334
+ const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_spend: n } = r, { pay_bills_on_time_drawer: o } = n, c = Bn(t.spending_fee_transaction_count);
1335
1335
  return /* @__PURE__ */ i(
1336
1336
  u,
1337
1337
  {
@@ -1349,16 +1349,16 @@ const B = {
1349
1349
  " ",
1350
1350
  o.pay_bills_on_time_sticky_fee_count
1351
1351
  ] }),
1352
- /* @__PURE__ */ e(Le, { status: l })
1352
+ /* @__PURE__ */ e(Le, { status: c })
1353
1353
  ] })
1354
1354
  ]
1355
1355
  }
1356
1356
  );
1357
1357
  }, hr = S(_r), mr = () => {
1358
- const { savingsAndCheckingAccountsBalance: t } = Me(), { finstrong: r } = v();
1358
+ const { savingsAndCheckingAccountsBalance: t } = ke(), { finstrong: r } = v();
1359
1359
  return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1360
1360
  /* @__PURE__ */ e(
1361
- Se,
1361
+ xe,
1362
1362
  {
1363
1363
  balance: t,
1364
1364
  title: r.key_indicators_save.drawer_available_balance
@@ -1373,17 +1373,17 @@ const B = {
1373
1373
  )
1374
1374
  ] });
1375
1375
  }, gr = S(mr), yr = () => {
1376
- const { finstrong: t } = v(), { healthScore: r, allTransactions: n, loadSpendTransactions: o, loadDebtSpend: l } = F(), { isInitialized: a } = j();
1376
+ const { finstrong: t } = v(), { healthScore: r, allTransactions: n, loadSpendTransactions: o, loadDebtSpend: c } = F(), { isInitialized: a } = j();
1377
1377
  m.useEffect(() => {
1378
- a && (o().finally(), l().finally());
1378
+ a && (o().finally(), c().finally());
1379
1379
  }, [a]);
1380
1380
  const s = m.useMemo(() => {
1381
- const p = n.spend.map((d) => d.transaction), c = n.debtSpend.map((d) => d.transaction);
1382
- return [...p, ...c];
1381
+ const d = n.spend.map((p) => p.transaction), l = n.debtSpend.map((p) => p.transaction);
1382
+ return [...d, ...l];
1383
1383
  }, [n.spend, n.debtSpend]);
1384
1384
  return a ? /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1385
1385
  /* @__PURE__ */ e(
1386
- Se,
1386
+ xe,
1387
1387
  {
1388
1388
  balance: r.ninety_day_spend / 90,
1389
1389
  title: t.key_indicators_save.drawer_daily_spend
@@ -1400,7 +1400,7 @@ const B = {
1400
1400
  {
1401
1401
  "aria-label": n.key_indicators_save.drawer_title,
1402
1402
  centered: !0,
1403
- onChange: (o, l) => r(l),
1403
+ onChange: (o, c) => r(c),
1404
1404
  sx: { mb: 0 },
1405
1405
  value: t,
1406
1406
  variant: "fullWidth",
@@ -1430,7 +1430,7 @@ const B = {
1430
1430
  /* @__PURE__ */ e(Qe, { chartFor: "savingsOverTime" })
1431
1431
  ] });
1432
1432
  }, xr = S(fr), Sr = () => {
1433
- const { finstrong: t } = v(), { healthScore: r } = F(), n = r.months_of_cash_on_hand, o = wt(n ? n * 30 : null), l = 183 / 6, a = Math.floor(n), s = Math.round((n - a) * l), p = n / 6 * 100;
1433
+ const { finstrong: t } = v(), { healthScore: r } = F(), n = r.months_of_cash_on_hand, o = wt(n ? n * 30 : null), c = 183 / 6, a = Math.floor(n), s = Math.round((n - a) * c), d = n / 6 * 100;
1434
1434
  return /* @__PURE__ */ e(
1435
1435
  We,
1436
1436
  {
@@ -1444,7 +1444,7 @@ const B = {
1444
1444
  mt: 2,
1445
1445
  px: 1
1446
1446
  },
1447
- children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((d) => /* @__PURE__ */ i(
1447
+ children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((p) => /* @__PURE__ */ i(
1448
1448
  u,
1449
1449
  {
1450
1450
  sx: {
@@ -1462,10 +1462,10 @@ const B = {
1462
1462
  }
1463
1463
  }
1464
1464
  ),
1465
- /* @__PURE__ */ e(I, { variant: "XSmall", children: d })
1465
+ /* @__PURE__ */ e(I, { variant: "XSmall", children: p })
1466
1466
  ]
1467
1467
  },
1468
- d
1468
+ p
1469
1469
  ))
1470
1470
  }
1471
1471
  ),
@@ -1473,7 +1473,7 @@ const B = {
1473
1473
  status: o,
1474
1474
  statusBarData: [
1475
1475
  {
1476
- percentage: `${p}%`
1476
+ percentage: `${d}%`
1477
1477
  }
1478
1478
  ],
1479
1479
  value: Y(t.key_indicators_save.drawer_progress_bar_value, a, s)
@@ -1560,10 +1560,10 @@ const B = {
1560
1560
  }
1561
1561
  );
1562
1562
  }, wr = S(vr), kr = () => {
1563
- const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } = v(), [l, a] = m.useState(!1);
1563
+ const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
1564
1564
  return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1565
1565
  /* @__PURE__ */ e(
1566
- Se,
1566
+ xe,
1567
1567
  {
1568
1568
  balance: t.ninety_day_income,
1569
1569
  sx: { flexDirection: "column-reverse" },
@@ -1574,7 +1574,7 @@ const B = {
1574
1574
  // TODO: Need to add More Transactions functionality
1575
1575
  /* @__PURE__ */ e($e, { transactions: r.income.map((s) => s.transaction) })
1576
1576
  ) : /* @__PURE__ */ e(
1577
- W,
1577
+ $,
1578
1578
  {
1579
1579
  onClick: () => {
1580
1580
  a(!0);
@@ -1587,16 +1587,16 @@ const B = {
1587
1587
  oe,
1588
1588
  {
1589
1589
  onClose: () => a(!1),
1590
- showConnectWidget: l,
1590
+ showConnectWidget: c,
1591
1591
  title: n.mini_title
1592
1592
  }
1593
1593
  )
1594
1594
  ] });
1595
1595
  }, Mr = S(kr), Dr = () => {
1596
- const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } = v(), [l, a] = m.useState(!1);
1596
+ const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
1597
1597
  return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1598
1598
  /* @__PURE__ */ e(
1599
- Se,
1599
+ xe,
1600
1600
  {
1601
1601
  balance: r.ninety_day_debt_spend,
1602
1602
  sx: { flexDirection: "column-reverse" },
@@ -1613,7 +1613,7 @@ const B = {
1613
1613
  }
1614
1614
  )
1615
1615
  ) : /* @__PURE__ */ e(
1616
- W,
1616
+ $,
1617
1617
  {
1618
1618
  onClick: () => {
1619
1619
  a(!0);
@@ -1626,7 +1626,7 @@ const B = {
1626
1626
  oe,
1627
1627
  {
1628
1628
  onClose: () => a(!1),
1629
- showConnectWidget: l,
1629
+ showConnectWidget: c,
1630
1630
  title: n.mini_title
1631
1631
  }
1632
1632
  )
@@ -1636,13 +1636,13 @@ const B = {
1636
1636
  data: r,
1637
1637
  series: n,
1638
1638
  style: o,
1639
- ...l
1639
+ ...c
1640
1640
  }) => {
1641
- const a = E(), s = m.useRef(null), { width: p } = uo({
1641
+ const a = E(), s = m.useRef(null), { width: d } = uo({
1642
1642
  width: o.width
1643
1643
  });
1644
1644
  m.useLayoutEffect(() => {
1645
- const h = new ResizeObserver(() => {
1645
+ const _ = new ResizeObserver(() => {
1646
1646
  window.requestAnimationFrame(() => {
1647
1647
  if (s.current) {
1648
1648
  const { width: b } = s.current.getBoundingClientRect(), f = b / 2, w = s.current.querySelector("text");
@@ -1650,13 +1650,13 @@ const B = {
1650
1650
  }
1651
1651
  });
1652
1652
  });
1653
- return s.current && h.observe(s.current), () => {
1654
- s.current && h.unobserve(s.current);
1653
+ return s.current && _.observe(s.current), () => {
1654
+ s.current && _.unobserve(s.current);
1655
1655
  };
1656
1656
  }, []);
1657
- const { formattedComparison: c, formattedMain: d } = r[n.index], _ = n.type === 0 ? d : c;
1657
+ const { formattedComparison: l, formattedMain: p } = r[n.index], h = n.type === 0 ? p : l;
1658
1658
  return /* @__PURE__ */ i("g", { children: [
1659
- /* @__PURE__ */ e(lt.rect, { ...l, fill: t, ref: s, rx: 2, style: o }),
1659
+ /* @__PURE__ */ e(lt.rect, { ...c, fill: t, ref: s, rx: 2, style: o }),
1660
1660
  /* @__PURE__ */ e(
1661
1661
  lt.text,
1662
1662
  {
@@ -1664,10 +1664,10 @@ const B = {
1664
1664
  fontSize: 9,
1665
1665
  fontWeight: 400,
1666
1666
  textAnchor: "middle",
1667
- transform: p.to((h) => `translate(${h / 2}, -5)`),
1667
+ transform: d.to((_) => `translate(${_ / 2}, -5)`),
1668
1668
  x: o.x,
1669
1669
  y: o.y,
1670
- children: _
1670
+ children: h
1671
1671
  }
1672
1672
  )
1673
1673
  ] });
@@ -1676,13 +1676,13 @@ const B = {
1676
1676
  data: r,
1677
1677
  title: n,
1678
1678
  buttonLabel: o,
1679
- onClick: l,
1679
+ onClick: c,
1680
1680
  legendLabelMain: a,
1681
1681
  legendLabelComparison: s,
1682
- totalComparison: p,
1683
- totalMain: c
1682
+ totalComparison: d,
1683
+ totalMain: l
1684
1684
  }) => {
1685
- const d = E(), _ = so(d.breakpoints.down("xs")), h = m.useMemo(
1685
+ const p = E(), h = so(p.breakpoints.down("xs")), _ = m.useMemo(
1686
1686
  () => r.sort((g, x) => g.month - x.month).map((g) => {
1687
1687
  const x = Ln(g.month), M = {
1688
1688
  spending_vs_income: {
@@ -1707,7 +1707,7 @@ const B = {
1707
1707
  ), b = {
1708
1708
  dataKey: "label",
1709
1709
  scaleType: "band"
1710
- }, f = Math.max(...h.map((g) => Math.max(g.main, g.comparison))), w = Math.ceil(f * 1.2 / 1e3) * 1e3, y = w / 3, D = {
1710
+ }, f = Math.max(..._.map((g) => Math.max(g.main, g.comparison))), w = Math.ceil(f * 1.2 / 1e3) * 1e3, y = w / 3, D = {
1711
1711
  scaleType: "linear",
1712
1712
  min: 0,
1713
1713
  max: w,
@@ -1736,10 +1736,10 @@ const B = {
1736
1736
  children: [
1737
1737
  /* @__PURE__ */ e(N, { children: n }),
1738
1738
  o && /* @__PURE__ */ e(
1739
- W,
1739
+ $,
1740
1740
  {
1741
1741
  endIcon: /* @__PURE__ */ e(Z, {}),
1742
- onClick: l,
1742
+ onClick: c,
1743
1743
  size: "small",
1744
1744
  sx: {
1745
1745
  pl: 8,
@@ -1770,7 +1770,7 @@ const B = {
1770
1770
  a,
1771
1771
  " "
1772
1772
  ] }),
1773
- !_ && c && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: c })
1773
+ !h && l && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: l })
1774
1774
  ] })
1775
1775
  ] }),
1776
1776
  /* @__PURE__ */ i(u, { alignItems: "center", direction: "row", spacing: 8, children: [
@@ -1790,15 +1790,15 @@ const B = {
1790
1790
  s,
1791
1791
  " "
1792
1792
  ] }),
1793
- !_ && p && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: p })
1793
+ !h && d && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: d })
1794
1794
  ] })
1795
1795
  ] })
1796
1796
  ] }),
1797
1797
  /* @__PURE__ */ i(
1798
1798
  po,
1799
1799
  {
1800
- colors: [`${d.palette.chartMono.chartMono3}`, `${d.palette.chartMono.chartMono5}`],
1801
- dataset: h,
1800
+ colors: [`${p.palette.chartMono.chartMono3}`, `${p.palette.chartMono.chartMono5}`],
1801
+ dataset: _,
1802
1802
  height: 240,
1803
1803
  margin: { top: 20, bottom: 30, right: 10, left: 42 },
1804
1804
  series: [
@@ -1813,13 +1813,13 @@ const B = {
1813
1813
  {
1814
1814
  slots: {
1815
1815
  bar: (g) => {
1816
- const { ownerState: x, style: M, ...$ } = g;
1816
+ const { ownerState: x, style: M, ...W } = g;
1817
1817
  return /* @__PURE__ */ e(
1818
1818
  Ar,
1819
1819
  {
1820
- ...$,
1820
+ ...W,
1821
1821
  color: x.color,
1822
- data: h,
1822
+ data: _,
1823
1823
  series: {
1824
1824
  index: x.dataIndex,
1825
1825
  type: Number(x.id.toString().split("-").pop())
@@ -1836,10 +1836,10 @@ const B = {
1836
1836
  {
1837
1837
  sx: () => ({
1838
1838
  ".MuiChartsAxis-line": {
1839
- stroke: d.palette.divider
1839
+ stroke: p.palette.divider
1840
1840
  },
1841
1841
  ".MuiChartsAxis-tick": {
1842
- stroke: d.palette.divider
1842
+ stroke: p.palette.divider
1843
1843
  },
1844
1844
  ".MuiChartsAxis-tickLabel": {
1845
1845
  transform: "translateY(10px)"
@@ -1856,10 +1856,10 @@ const B = {
1856
1856
  {
1857
1857
  sx: () => ({
1858
1858
  ".MuiChartsAxis-line": {
1859
- stroke: d.palette.divider
1859
+ stroke: p.palette.divider
1860
1860
  },
1861
1861
  ".MuiChartsAxis-tick": {
1862
- stroke: d.palette.divider
1862
+ stroke: p.palette.divider
1863
1863
  },
1864
1864
  ".MuiChartsAxis-tickLabel": {
1865
1865
  transform: "translateX(-8px)"
@@ -1878,7 +1878,7 @@ const B = {
1878
1878
  }
1879
1879
  );
1880
1880
  }, Tr = () => {
1881
- const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = F(), { isInitialized: o } = j(), [l, a] = m.useState(0), { finstrong: s } = v();
1881
+ const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = F(), { isInitialized: o } = j(), [c, a] = m.useState(0), { finstrong: s } = v();
1882
1882
  return m.useEffect(() => {
1883
1883
  o && (t().finally(), r().finally());
1884
1884
  }, [o]), /* @__PURE__ */ i(z, { children: [
@@ -1888,9 +1888,9 @@ const B = {
1888
1888
  {
1889
1889
  "aria-label": s.key_indicators_save.drawer_title,
1890
1890
  centered: !0,
1891
- onChange: (p, c) => a(c),
1891
+ onChange: (d, l) => a(l),
1892
1892
  sx: { mb: 0 },
1893
- value: l,
1893
+ value: c,
1894
1894
  variant: "fullWidth",
1895
1895
  children: [
1896
1896
  /* @__PURE__ */ e(
@@ -1920,7 +1920,7 @@ const B = {
1920
1920
  "aria-labelledby": "income-details-tab-0",
1921
1921
  index: 0,
1922
1922
  name: "income-details",
1923
- value: l,
1923
+ value: c,
1924
1924
  children: /* @__PURE__ */ e(Mr, {})
1925
1925
  }
1926
1926
  ),
@@ -1930,7 +1930,7 @@ const B = {
1930
1930
  "aria-labelledby": "debt-payment-details-tab-1",
1931
1931
  index: 1,
1932
1932
  name: "debt-payment-details",
1933
- value: l,
1933
+ value: c,
1934
1934
  children: /* @__PURE__ */ e(Ir, {})
1935
1935
  }
1936
1936
  )
@@ -1983,7 +1983,7 @@ const B = {
1983
1983
  ] })
1984
1984
  ] });
1985
1985
  }, Or = S(Tr), Rr = () => {
1986
- const { healthScore: t } = F(), { finstrong: r } = v(), n = Te(t.spend_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((p) => o ? "MISSING" : p < 100 ? "GOOD" : p >= 100 && p <= 109 ? "FAIR" : p >= 110 ? "OFF_TRACK" : "MISSING")(n), s = {
1986
+ const { healthScore: t } = F(), { finstrong: r } = v(), n = Te(t.spend_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((d) => o ? "MISSING" : d < 100 ? "GOOD" : d >= 100 && d <= 109 ? "FAIR" : d >= 110 ? "OFF_TRACK" : "MISSING")(n), s = {
1987
1987
  GOOD: [{ percentage: `${n}%` }],
1988
1988
  FAIR: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
1989
1989
  OFF_TRACK: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
@@ -2022,19 +2022,19 @@ const B = {
2022
2022
  }
2023
2023
  );
2024
2024
  }, Fr = S(Rr), Pr = () => {
2025
- const t = E(), { monthlySummaries: r, handleFinstrongWidgetPrimaryCtaClick: n } = F(), { finstrong: o, goals: l, spending: a } = v(), { selectedAccounts: s } = j(), { categories: p, dateRangeCategoryTotals: c, loadDateRangeCategoryTotals: d } = Ye(), { appDataStore: _ } = Kn(), [h, b] = m.useState("");
2025
+ const t = E(), { monthlySummaries: r, handleFinstrongWidgetPrimaryCtaClick: n } = F(), { finstrong: o, goals: c, spending: a } = v(), { selectedAccounts: s } = j(), { categories: d, dateRangeCategoryTotals: l, loadDateRangeCategoryTotals: p } = Ye(), { appDataStore: h } = Kn(), [_, b] = m.useState("");
2026
2026
  m.useEffect(() => {
2027
- d(
2027
+ p(
2028
2028
  s,
2029
2029
  Lt(/* @__PURE__ */ new Date()),
2030
2030
  Wt(/* @__PURE__ */ new Date())
2031
2031
  ).finally();
2032
2032
  }, [s]);
2033
2033
  const f = m.useMemo(
2034
- () => _o(p, l, t, c),
2035
- [p, c]
2034
+ () => _o(d, c, t, l),
2035
+ [d, l]
2036
2036
  ), w = (g) => {
2037
- b(h === g ? "" : g);
2037
+ b(_ === g ? "" : g);
2038
2038
  }, { totalSpending: y, totalIncome: D } = m.useMemo(() => r?.reduce(
2039
2039
  (g, { standard_spend: x = 0, income: M = 0 }) => ({
2040
2040
  totalSpending: g.totalSpending + x,
@@ -2046,7 +2046,7 @@ const B = {
2046
2046
  r.length ? /* @__PURE__ */ e(
2047
2047
  jt,
2048
2048
  {
2049
- ..._.appData.client_profile?.allow_trends_widget && {
2049
+ ...h.appData.client_profile?.allow_trends_widget && {
2050
2050
  buttonLabel: o.key_indicators_spend.spend_less_than_you_make_drawer.view_more
2051
2051
  },
2052
2052
  chartFor: "spending_vs_income",
@@ -2099,8 +2099,8 @@ const B = {
2099
2099
  },
2100
2100
  children: [
2101
2101
  /* @__PURE__ */ e(N, { children: o.key_indicators_spend.spend_less_than_you_make_drawer.spending }),
2102
- _.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
2103
- W,
2102
+ h.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
2103
+ $,
2104
2104
  {
2105
2105
  endIcon: /* @__PURE__ */ e(Z, {}),
2106
2106
  onClick: () => n("Spending")(),
@@ -2122,7 +2122,7 @@ const B = {
2122
2122
  {
2123
2123
  data: f,
2124
2124
  onSelected: w,
2125
- selectedId: h,
2125
+ selectedId: _,
2126
2126
  totalLabel: a.total_spending
2127
2127
  }
2128
2128
  ),
@@ -2131,7 +2131,7 @@ const B = {
2131
2131
  {
2132
2132
  data: f,
2133
2133
  onSelected: w,
2134
- selectedId: h
2134
+ selectedId: _
2135
2135
  }
2136
2136
  )
2137
2137
  ] })
@@ -2237,19 +2237,18 @@ const B = {
2237
2237
  children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: a.content })
2238
2238
  }
2239
2239
  );
2240
- }, Wr = S(Lr), xe = ({
2240
+ }, Wr = S(Lr), fe = ({
2241
2241
  drawerFor: t,
2242
2242
  title: r,
2243
2243
  description: n,
2244
- cardState: o = "MISSING",
2245
- onPrimaryCtaClick: l
2244
+ cardState: o = "MISSING"
2246
2245
  }) => {
2247
- const [a, s] = m.useState(!1);
2246
+ const [c, a] = m.useState(!1);
2248
2247
  return /* @__PURE__ */ i(z, { children: [
2249
2248
  /* @__PURE__ */ i(
2250
2249
  u,
2251
2250
  {
2252
- onClick: () => s(!0),
2251
+ onClick: () => a(!0),
2253
2252
  sx: {
2254
2253
  alignItems: "center",
2255
2254
  flexDirection: "row",
@@ -2277,90 +2276,88 @@ const B = {
2277
2276
  Wr,
2278
2277
  {
2279
2278
  drawerFor: t,
2280
- isOpen: a,
2281
- onClose: () => s(!1),
2282
- onPrimaryCtaClick: l
2279
+ isOpen: c,
2280
+ onClose: () => a(!1)
2283
2281
  }
2284
2282
  )
2285
2283
  ] });
2286
- }, $r = ({ onPrimaryCtaClick: t }) => {
2287
- const { finstrong: r } = v(), { key_indicators_spend: n } = r, { healthScore: o } = F(), l = (p) => {
2288
- const c = $n(p), d = {
2289
- GOOD: n.ratio_good_description,
2290
- FAIR: n.ratio_fair_description,
2291
- OFF_TRACK: n.ratio_off_track_description,
2292
- MISSING: n.ratio_missing_description
2293
- }, _ = c === "MISSING" ? d[c] : Y(d[c], p);
2284
+ }, $r = () => {
2285
+ const { finstrong: t } = v(), { key_indicators_spend: r } = t, { healthScore: n } = F(), o = (s) => {
2286
+ const d = $n(s), l = {
2287
+ GOOD: r.ratio_good_description,
2288
+ FAIR: r.ratio_fair_description,
2289
+ OFF_TRACK: r.ratio_off_track_description,
2290
+ MISSING: r.ratio_missing_description
2291
+ }, p = d === "MISSING" ? l[d] : Y(l[d], s);
2294
2292
  return {
2295
- cardState: c,
2296
- description: _,
2297
- title: n.ratio_card_title
2293
+ cardState: d,
2294
+ description: p,
2295
+ title: r.ratio_card_title
2298
2296
  };
2299
- }, { spendToIncomeRatio: a, spendFeeCount: s } = m.useMemo(() => {
2300
- const p = o.spend_to_income_ratio !== null ? Math.round(o.spend_to_income_ratio * 100) : null, c = l(p), d = Wn(
2301
- o.spending_fee_transaction_count,
2302
- n
2297
+ }, { spendToIncomeRatio: c, spendFeeCount: a } = m.useMemo(() => {
2298
+ const s = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, d = o(s), l = Wn(
2299
+ n.spending_fee_transaction_count,
2300
+ r
2303
2301
  );
2304
- return { spendToIncomeRatio: c, spendFeeCount: d };
2302
+ return { spendToIncomeRatio: d, spendFeeCount: l };
2305
2303
  }, [
2306
- o.spend_to_income_ratio,
2307
- o.spending_fee_transaction_count,
2308
- n,
2309
- r
2304
+ n.spend_to_income_ratio,
2305
+ n.spending_fee_transaction_count,
2306
+ r,
2307
+ t
2310
2308
  ]);
2311
2309
  return /* @__PURE__ */ i(u, { sx: { gap: 24, p: 8, pt: 24 }, children: [
2312
2310
  /* @__PURE__ */ e(
2313
- xe,
2311
+ fe,
2314
2312
  {
2315
- cardState: a.cardState,
2316
- description: a.description,
2313
+ cardState: c.cardState,
2314
+ description: c.description,
2317
2315
  drawerFor: _e.SpendLessThanYouMake,
2318
- onPrimaryCtaClick: t,
2319
- title: a.title
2316
+ title: c.title
2320
2317
  }
2321
2318
  ),
2322
2319
  /* @__PURE__ */ e(
2323
- xe,
2320
+ fe,
2324
2321
  {
2325
- cardState: s.cardState,
2326
- description: s.description,
2322
+ cardState: a.cardState,
2323
+ description: a.description,
2327
2324
  drawerFor: _e.PayBillsOnTime,
2328
- title: s.title
2325
+ title: a.title
2329
2326
  }
2330
2327
  )
2331
2328
  ] });
2332
2329
  }, zr = S($r), Er = () => {
2333
- const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_save: n } = r, o = (p) => {
2334
- const c = wt(p), d = {
2330
+ const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_save: n } = r, o = (d) => {
2331
+ const l = wt(d), p = {
2335
2332
  GOOD: n.days_of_cash_good_description,
2336
2333
  FAIR: n.days_of_cash_fair_description,
2337
2334
  OFF_TRACK: n.days_of_cash_off_track_description,
2338
2335
  MISSING: n.days_of_cash_missing_description
2339
- }, _ = c === "MISSING" ? d[c] : Y(d[c], p);
2336
+ }, h = l === "MISSING" ? p[l] : Y(p[l], d);
2340
2337
  return {
2341
- cardState: c,
2342
- description: _,
2338
+ cardState: l,
2339
+ description: h,
2343
2340
  title: n.days_of_cash_title
2344
2341
  };
2345
- }, l = (p) => {
2346
- const c = vt(p), d = {
2342
+ }, c = (d) => {
2343
+ const l = vt(d), p = {
2347
2344
  GOOD: n.emergency_savings_good_description,
2348
2345
  FAIR: n.emergency_savings_fair_description,
2349
2346
  OFF_TRACK: n.emergency_savings_off_track_description,
2350
2347
  MISSING: n.emergency_savings_missing_description
2351
2348
  };
2352
- let _;
2353
- return c === "FAIR" && p !== null ? _ = Y(
2354
- d[c],
2355
- L(p, "0,0.00")
2356
- ) : _ = d[c], {
2357
- cardState: c,
2358
- description: _,
2349
+ let h;
2350
+ return l === "FAIR" && d !== null ? h = Y(
2351
+ p[l],
2352
+ L(d, "0,0.00")
2353
+ ) : h = p[l], {
2354
+ cardState: l,
2355
+ description: h,
2359
2356
  title: n.emergency_savings_title
2360
2357
  };
2361
2358
  }, { daysOfCashOnHand: a, emergencySavings: s } = m.useMemo(() => {
2362
- 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);
2363
- return { daysOfCashOnHand: c, emergencySavings: _ };
2359
+ const d = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null, l = o(d), p = t.emergency_savings_on_hand !== null ? Math.round(t.emergency_savings_on_hand) : null, h = c(p);
2360
+ return { daysOfCashOnHand: l, emergencySavings: h };
2364
2361
  }, [
2365
2362
  t.months_of_cash_on_hand,
2366
2363
  t.emergency_savings_on_hand,
@@ -2369,7 +2366,7 @@ const B = {
2369
2366
  ]);
2370
2367
  return /* @__PURE__ */ i(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
2371
2368
  /* @__PURE__ */ e(
2372
- xe,
2369
+ fe,
2373
2370
  {
2374
2371
  cardState: a.cardState,
2375
2372
  description: a.description,
@@ -2378,7 +2375,7 @@ const B = {
2378
2375
  }
2379
2376
  ),
2380
2377
  /* @__PURE__ */ e(
2381
- xe,
2378
+ fe,
2382
2379
  {
2383
2380
  cardState: s.cardState,
2384
2381
  description: s.description,
@@ -2388,40 +2385,40 @@ const B = {
2388
2385
  )
2389
2386
  ] });
2390
2387
  }, Gr = S(Er), Hr = () => {
2391
- const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_borrow: n } = r, { user: o } = Q(), l = (c) => {
2392
- const d = zn(c), _ = {
2388
+ const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_borrow: n } = r, { user: o } = Q(), c = (l) => {
2389
+ const p = zn(l), h = {
2393
2390
  GOOD: n.manage_debit_good_description,
2394
2391
  FAIR: n.manage_debit_fair_description,
2395
2392
  OFF_TRACK: n.manage_debit_off_track_description,
2396
2393
  MISSING: n.manage_debit_missing_description
2397
- }, h = d === "FAIR" || d === "OFF_TRACK" ? Y(_[d], c) : _[d];
2394
+ }, _ = p === "FAIR" || p === "OFF_TRACK" ? Y(h[p], l) : h[p];
2398
2395
  return {
2399
- cardState: d,
2400
- description: h,
2396
+ cardState: p,
2397
+ description: _,
2401
2398
  title: n.manage_debit_title
2402
2399
  };
2403
- }, a = (c) => {
2404
- const d = Ct(c), _ = {
2400
+ }, a = (l) => {
2401
+ const p = Ct(l), h = {
2405
2402
  GOOD: n.credit_score_good_description,
2406
2403
  FAIR: n.credit_score_fair_description,
2407
2404
  OFF_TRACK: n.credit_score_off_track_description,
2408
2405
  MISSING: n.credit_score_missing_description
2409
- }, h = d === "MISSING" ? _[d] : Y(_[d], c);
2406
+ }, _ = p === "MISSING" ? h[p] : Y(h[p], l);
2410
2407
  return {
2411
- cardState: d,
2412
- description: h,
2408
+ cardState: p,
2409
+ description: _,
2413
2410
  title: n.credit_score_title
2414
2411
  };
2415
- }, { manageDebtStatus: s, creditScoreStatus: p } = m.useMemo(() => {
2416
- const c = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, d = l(c), _ = a(o.credit_score || null);
2412
+ }, { manageDebtStatus: s, creditScoreStatus: d } = m.useMemo(() => {
2413
+ const l = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, p = c(l), h = a(o.credit_score || null);
2417
2414
  return {
2418
- manageDebtStatus: d,
2419
- creditScoreStatus: _
2415
+ manageDebtStatus: p,
2416
+ creditScoreStatus: h
2420
2417
  };
2421
2418
  }, [t.debt_to_income_ratio, o.credit_score, n, r]);
2422
2419
  return /* @__PURE__ */ i(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
2423
2420
  /* @__PURE__ */ e(
2424
- xe,
2421
+ fe,
2425
2422
  {
2426
2423
  cardState: s.cardState,
2427
2424
  description: s.description,
@@ -2430,24 +2427,24 @@ const B = {
2430
2427
  }
2431
2428
  ),
2432
2429
  /* @__PURE__ */ e(
2433
- xe,
2430
+ fe,
2434
2431
  {
2435
- cardState: p.cardState,
2436
- description: p.description,
2432
+ cardState: d.cardState,
2433
+ description: d.description,
2437
2434
  drawerFor: _e.HaveAGoodCreditScore,
2438
- title: p.title
2435
+ title: d.title
2439
2436
  }
2440
2437
  )
2441
2438
  ] });
2442
- }, Nr = S(Hr), Kr = ({ onPrimaryCtaClick: t }) => {
2443
- const [r, n] = m.useState(0), { finstrong: o } = v();
2439
+ }, Nr = S(Hr), Kr = () => {
2440
+ const [t, r] = m.useState(0), { finstrong: n } = v();
2444
2441
  return /* @__PURE__ */ i(z, { children: [
2445
2442
  /* @__PURE__ */ i(
2446
2443
  qe,
2447
2444
  {
2448
2445
  "aria-label": "Key Indicators",
2449
2446
  centered: !0,
2450
- onChange: (l, a) => n(a),
2447
+ onChange: (o, c) => r(c),
2451
2448
  sx: {
2452
2449
  mb: 0,
2453
2450
  "& .MuiTab-root": {
@@ -2455,7 +2452,7 @@ const B = {
2455
2452
  }
2456
2453
  },
2457
2454
  textColor: "primary",
2458
- value: r,
2455
+ value: t,
2459
2456
  variant: "fullWidth",
2460
2457
  children: [
2461
2458
  /* @__PURE__ */ e(
@@ -2465,7 +2462,7 @@ const B = {
2465
2462
  icon: /* @__PURE__ */ e(Ke, { sx: { mr: 8 } }),
2466
2463
  iconPosition: "start",
2467
2464
  id: "spend-details-tab-0",
2468
- label: o.key_indicators_spend.title,
2465
+ label: n.key_indicators_spend.title,
2469
2466
  sx: { minHeight: 44 }
2470
2467
  }
2471
2468
  ),
@@ -2476,7 +2473,7 @@ const B = {
2476
2473
  icon: /* @__PURE__ */ e(fn, { sx: { mr: 8 } }),
2477
2474
  iconPosition: "start",
2478
2475
  id: "save-details-tab-1",
2479
- label: o.key_indicators_save.title,
2476
+ label: n.key_indicators_save.title,
2480
2477
  sx: { minHeight: 44 }
2481
2478
  }
2482
2479
  ),
@@ -2487,16 +2484,16 @@ const B = {
2487
2484
  icon: /* @__PURE__ */ e(xn, { sx: { mr: 8 } }),
2488
2485
  iconPosition: "start",
2489
2486
  id: "borrow-details-tab-2",
2490
- label: o.key_indicators_borrow.title,
2487
+ label: n.key_indicators_borrow.title,
2491
2488
  sx: { minHeight: 44 }
2492
2489
  }
2493
2490
  )
2494
2491
  ]
2495
2492
  }
2496
2493
  ),
2497
- /* @__PURE__ */ e(ue, { index: 0, name: "spend-details", value: r, children: /* @__PURE__ */ e(zr, { onPrimaryCtaClick: t }) }),
2498
- /* @__PURE__ */ e(ue, { index: 1, name: "save-details", value: r, children: /* @__PURE__ */ e(Gr, {}) }),
2499
- /* @__PURE__ */ e(ue, { index: 2, name: "borrow-details", value: r, children: /* @__PURE__ */ e(Nr, {}) })
2494
+ /* @__PURE__ */ e(ue, { index: 0, name: "spend-details", value: t, children: /* @__PURE__ */ e(zr, {}) }),
2495
+ /* @__PURE__ */ e(ue, { index: 1, name: "save-details", value: t, children: /* @__PURE__ */ e(Gr, {}) }),
2496
+ /* @__PURE__ */ e(ue, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(Nr, {}) })
2500
2497
  ] });
2501
2498
  }, jr = S(Kr), Yr = ({ onClick: t }) => {
2502
2499
  const { finstrong: r } = v(), { isCopyLoaded: n } = j();
@@ -2507,7 +2504,7 @@ const B = {
2507
2504
  /* @__PURE__ */ e(k, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: r.missing_data_description })
2508
2505
  ] }),
2509
2506
  /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
2510
- W,
2507
+ $,
2511
2508
  {
2512
2509
  endIcon: /* @__PURE__ */ e(Z, {}),
2513
2510
  onClick: t,
@@ -2530,23 +2527,23 @@ const B = {
2530
2527
  frequency: r,
2531
2528
  secondDay: n,
2532
2529
  incomeTransactions: o,
2533
- setCurrentStep: l,
2530
+ setCurrentStep: c,
2534
2531
  setFirstDay: a,
2535
2532
  setFrequency: s,
2536
- setSecondDay: p,
2537
- transaction: c
2533
+ setSecondDay: d,
2534
+ transaction: l
2538
2535
  }) => /* @__PURE__ */ i(m.Fragment, { children: [
2539
2536
  /* @__PURE__ */ i(u, { children: [
2540
- !!o.length && /* @__PURE__ */ e(C, { sx: { pb: 24 }, children: o.reduce((d, _, h) => {
2541
- if (_.guid === c.guid) return d;
2542
- const b = Ne(h, o), f = Ft(h, o);
2543
- return d.push(
2537
+ !!o.length && /* @__PURE__ */ e(C, { sx: { pb: 24 }, children: o.reduce((p, h, _) => {
2538
+ if (h.guid === l.guid) return p;
2539
+ const b = Ne(_, o), f = Ft(_, o);
2540
+ return p.push(
2544
2541
  /* @__PURE__ */ i(m.Fragment, { children: [
2545
- b && /* @__PURE__ */ e(Pt, { children: Ze(_.date) }),
2546
- /* @__PURE__ */ e(Bt, { transaction: _ }),
2542
+ b && /* @__PURE__ */ e(Pt, { children: Ze(h.date) }),
2543
+ /* @__PURE__ */ e(Bt, { transaction: h }),
2547
2544
  /* @__PURE__ */ e(ne, { sx: { ml: f ? 44 : 0 } })
2548
- ] }, _.guid)
2549
- ), d;
2545
+ ] }, h.guid)
2546
+ ), p;
2550
2547
  }, []) }),
2551
2548
  /* @__PURE__ */ e(
2552
2549
  fo,
@@ -2555,17 +2552,17 @@ const B = {
2555
2552
  frequency: r,
2556
2553
  onFirstDayChange: a,
2557
2554
  onFrequencyChange: s,
2558
- onSecondDayChange: p,
2555
+ onSecondDayChange: d,
2559
2556
  secondDay: n,
2560
- transaction: c
2557
+ transaction: l
2561
2558
  }
2562
2559
  )
2563
2560
  ] }),
2564
2561
  /* @__PURE__ */ e(C, { sx: { px: 24 }, children: /* @__PURE__ */ e(
2565
- W,
2562
+ $,
2566
2563
  {
2567
2564
  fullWidth: !0,
2568
- onClick: () => l({ step: O.MonthlyIncome, type: "main" }),
2565
+ onClick: () => c({ step: O.MonthlyIncome, type: "main" }),
2569
2566
  startIcon: /* @__PURE__ */ e(ft, {}),
2570
2567
  children: Xr.add_more_income
2571
2568
  }
@@ -2573,8 +2570,8 @@ const B = {
2573
2570
  ] }), Ur = S(qr), Zr = {
2574
2571
  select_date: "Select Date"
2575
2572
  }, Qr = ({ selectedDate: t, setSelectedDate: r }) => {
2576
- const n = E(), o = (l) => {
2577
- r(Math.floor(new Date(l).getTime() / 1e3));
2573
+ const n = E(), o = (c) => {
2574
+ r(Math.floor(new Date(c).getTime() / 1e3));
2578
2575
  };
2579
2576
  return /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(Co, { dateAdapter: $t, children: /* @__PURE__ */ e(
2580
2577
  vo,
@@ -2586,13 +2583,13 @@ const B = {
2586
2583
  nextIconButton: {
2587
2584
  sx: {
2588
2585
  color: "primary.main",
2589
- "&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
2586
+ "&:hover": { bgcolor: be(n.palette.primary.light, 0.1) }
2590
2587
  }
2591
2588
  },
2592
2589
  previousIconButton: {
2593
2590
  sx: {
2594
2591
  color: "primary.main",
2595
- "&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
2592
+ "&:hover": { bgcolor: be(n.palette.primary.light, 0.1) }
2596
2593
  }
2597
2594
  }
2598
2595
  },
@@ -2600,7 +2597,7 @@ const B = {
2600
2597
  width: "100%",
2601
2598
  "& .MuiIconButton-edgeEnd": {
2602
2599
  color: "primary.main",
2603
- "&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
2600
+ "&:hover": { bgcolor: be(n.palette.primary.light, 0.1) }
2604
2601
  }
2605
2602
  },
2606
2603
  value: t ? new Date(t * 1e3) : null
@@ -2676,13 +2673,13 @@ const B = {
2676
2673
  do_it_later: "Do It Later",
2677
2674
  next: "Next"
2678
2675
  }, ra = ({ isOpen: t, onClose: r }) => {
2679
- const { visibleAccounts: n } = Me(), { calculateHealthScore: o } = F(), { finstrong: l } = v(), { setSelectedAccounts: a } = j(), { addRepeatingTransaction: s, setDateRange: p } = Ve(), { filter: c, setFilter: d, transactions: _ } = jn(), { user: h, userProfile: b, updateUser: f, updateUserProfile: w } = Q(), [y, D] = m.useState(h.credit_score || 0), [g, x] = m.useState(
2676
+ const { visibleAccounts: n } = ke(), { calculateHealthScore: o } = F(), { finstrong: c } = v(), { setSelectedAccounts: a } = j(), { addRepeatingTransaction: s, setDateRange: d } = Ve(), { filter: l, setFilter: p, transactions: h } = jn(), { user: _, userProfile: b, updateUser: f, updateUserProfile: w } = Q(), [y, D] = m.useState(_.credit_score || 0), [g, x] = m.useState(
2680
2677
  ht
2681
- ), [M, $] = m.useState(1), [G, H] = m.useState(Ot.EveryMonth), [T, V] = m.useState([]), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(h.birthday), [ce, he] = m.useState(15), [q, Je] = m.useState("");
2678
+ ), [M, W] = m.useState(1), [G, H] = m.useState(Ot.EveryMonth), [T, V] = m.useState([]), [re, ae] = m.useState(!1), [Se, ie] = m.useState(!1), [X, se] = m.useState(_.birthday), [ce, Me] = m.useState(15), [q, Je] = m.useState("");
2682
2679
  m.useEffect(() => {
2683
- p({ start: Lt(dt()), end: Wt(dt()) });
2680
+ d({ start: Lt(dt()), end: Wt(dt()) });
2684
2681
  }, []), m.useEffect(() => {
2685
- d({
2682
+ p({
2686
2683
  accounts: n.map((A) => A.guid),
2687
2684
  dateRange: {
2688
2685
  start: bo(/* @__PURE__ */ new Date(), 90),
@@ -2692,20 +2689,20 @@ const B = {
2692
2689
  }), a(n);
2693
2690
  }, [n]);
2694
2691
  const et = m.useMemo(
2695
- () => _.find((A) => A.guid === q),
2696
- [q, _]
2692
+ () => h.find((A) => A.guid === q),
2693
+ [q, h]
2697
2694
  ), Vt = m.useMemo(() => ({
2698
2695
  [O.ConnectAccounts]: !0,
2699
2696
  [O.MonthlyIncome]: !!q,
2700
- [O.Birthday]: !!h.birthday || !!X,
2701
- [O.CreditScore]: !!h.credit_score || !!y
2702
- })[g.step], [y, g, X, q, h]), le = n.length > 0, Xt = m.useMemo(() => {
2697
+ [O.Birthday]: !!_.birthday || !!X,
2698
+ [O.CreditScore]: !!_.credit_score || !!y
2699
+ })[g.step], [y, g, X, q, _]), le = n.length > 0, Xt = m.useMemo(() => {
2703
2700
  const { step: A } = g;
2704
2701
  let R = 0;
2705
- return A >= O.MonthlyIncome && le && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (h.birthday || h.credit_score) && R++, R;
2706
- }, [g.step, le, T.length, h.birthday, h.credit_score]), qt = (A) => {
2707
- d({
2708
- ...c,
2702
+ return A >= O.MonthlyIncome && le && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (_.birthday || _.credit_score) && R++, R;
2703
+ }, [g.step, le, T.length, _.birthday, _.credit_score]), qt = (A) => {
2704
+ p({
2705
+ ...l,
2709
2706
  custom: (R) => A ? So(R, A) : pt(R)
2710
2707
  });
2711
2708
  }, Ut = {
@@ -2726,13 +2723,13 @@ const B = {
2726
2723
  setCurrentStep: (A) => {
2727
2724
  x(A), V((R) => {
2728
2725
  if (R.some((de) => de.guid === q)) return R.filter((de) => de.guid !== q);
2729
- const Ie = _.find((de) => de.guid === q);
2726
+ const Ie = h.find((de) => de.guid === q);
2730
2727
  return Ie ? [...R, { ...Ie, firstDay: M, frequency: G, secondDay: ce }] : R;
2731
2728
  });
2732
2729
  },
2733
- setFirstDay: $,
2730
+ setFirstDay: W,
2734
2731
  setFrequency: H,
2735
- setSecondDay: he,
2732
+ setSecondDay: Me,
2736
2733
  transaction: et
2737
2734
  }
2738
2735
  ),
@@ -2776,14 +2773,14 @@ const B = {
2776
2773
  const { step: A } = g, R = A + 1;
2777
2774
  switch (A) {
2778
2775
  case O.Birthday:
2779
- X && X !== h.birthday && f({ ...h, birthday: X });
2776
+ X && X !== _.birthday && f({ ..._, birthday: X });
2780
2777
  break;
2781
2778
  case O.CreditScore:
2782
- y && y !== h.credit_score && f({ ...h, credit_score: y }), nt();
2779
+ y && y !== _.credit_score && f({ ..._, credit_score: y }), nt();
2783
2780
  return;
2784
2781
  case O.MonthlyIncome:
2785
- q && T.findIndex(({ guid: ge }) => ge === q) === -1 && V((ge) => [
2786
- ...ge,
2782
+ q && T.findIndex(({ guid: me }) => me === q) === -1 && V((me) => [
2783
+ ...me,
2787
2784
  { ...et, firstDay: M, frequency: G, secondDay: ce }
2788
2785
  ]);
2789
2786
  break;
@@ -2809,7 +2806,7 @@ const B = {
2809
2806
  }, en = async (A) => {
2810
2807
  for (const R of A) {
2811
2808
  const {
2812
- account_guid: ge,
2809
+ account_guid: me,
2813
2810
  amount: Ie,
2814
2811
  date: de,
2815
2812
  description: on,
@@ -2821,7 +2818,7 @@ const B = {
2821
2818
  payee: ln,
2822
2819
  transaction_type: dn
2823
2820
  } = R, pn = Jn(ot, yo(de)), un = {
2824
- account_guid: ge,
2821
+ account_guid: me,
2825
2822
  amount: Ie,
2826
2823
  created_by: 0,
2827
2824
  description: ln || on || rn,
@@ -2832,11 +2829,11 @@ const B = {
2832
2829
  repeating_transaction_type: Rt.Income,
2833
2830
  second_recurrence_day: sn,
2834
2831
  transaction_type: dn,
2835
- user_guid: h.guid
2832
+ user_guid: _.guid
2836
2833
  };
2837
2834
  await s(un, R);
2838
2835
  }
2839
- }, me = Ut[g.step], De = g.step === O.ConnectAccounts, tn = {
2836
+ }, he = Ut[g.step], De = g.step === O.ConnectAccounts, tn = {
2840
2837
  fullWidth: !0,
2841
2838
  ...De && !le && { startIcon: /* @__PURE__ */ e(ft, {}) }
2842
2839
  }, nn = !De || De && !le;
@@ -2851,31 +2848,31 @@ const B = {
2851
2848
  onClose: tt,
2852
2849
  onSecondaryAction: Jt,
2853
2850
  primaryButtonProps: tn,
2854
- primaryText: me?.mainActionContent,
2851
+ primaryText: he?.mainActionContent,
2855
2852
  secondaryColor: "primary",
2856
2853
  secondaryText: P.back,
2857
- title: l.title,
2854
+ title: c.title,
2858
2855
  ...!re && { onPrimaryAction: Qt },
2859
2856
  children: [
2860
2857
  re && /* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 24, position: "relative", px: 16, top: 126 }, children: [
2861
2858
  /* @__PURE__ */ e(Pe, { children: P.calculate_primary }),
2862
2859
  /* @__PURE__ */ e(k, { sx: { textAlign: "center" }, variant: "subtitle1", children: P.calculate_secondary })
2863
2860
  ] }),
2864
- me && !re && /* @__PURE__ */ i(m.Fragment, { children: [
2861
+ he && !re && /* @__PURE__ */ i(m.Fragment, { children: [
2865
2862
  /* @__PURE__ */ e(
2866
2863
  oa,
2867
2864
  {
2868
- completeCopy: l.complete,
2869
- primaryText: me.primaryText,
2870
- secondaryText: me.secondaryText,
2865
+ completeCopy: c.complete,
2866
+ primaryText: he.primaryText,
2867
+ secondaryText: he.secondaryText,
2871
2868
  value: Xt
2872
2869
  }
2873
2870
  ),
2874
2871
  g.type === "main" && /* @__PURE__ */ i(C, { children: [
2875
- me.main,
2876
- nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e(W, { fullWidth: !0, onClick: Zt, children: P.do_it_later }) })
2872
+ he.main,
2873
+ nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e($, { fullWidth: !0, onClick: Zt, children: P.do_it_later }) })
2877
2874
  ] }),
2878
- g.type === "detail" && me.detail
2875
+ g.type === "detail" && he.detail
2879
2876
  ] })
2880
2877
  ]
2881
2878
  }
@@ -2884,7 +2881,7 @@ const B = {
2884
2881
  oe,
2885
2882
  {
2886
2883
  onClose: () => ie(!1),
2887
- showConnectWidget: Ce,
2884
+ showConnectWidget: Se,
2888
2885
  title: P.connect_accounts
2889
2886
  }
2890
2887
  )
@@ -2914,15 +2911,15 @@ const B = {
2914
2911
  /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle1", children: Ge.onboarding_subtitle })
2915
2912
  ] })
2916
2913
  ] }),
2917
- /* @__PURE__ */ e(W, { onClick: () => r(!0), variant: "contained", children: Ge.get_started })
2914
+ /* @__PURE__ */ e($, { onClick: () => r(!0), variant: "contained", children: Ge.get_started })
2918
2915
  ]
2919
2916
  }
2920
2917
  ),
2921
2918
  /* @__PURE__ */ e(aa, { isOpen: t, onClose: () => r(!1) })
2922
2919
  ] });
2923
2920
  }, sa = ({ isOpen: t, onClose: r }) => {
2924
- const { finstrong: n } = v(), o = E(), { updateUser: l, user: a } = Q(), [s, p] = m.useState(a.birthday), c = (_) => {
2925
- p(Math.floor(new Date(_).getTime() / 1e3));
2921
+ const { finstrong: n } = v(), o = E(), { updateUser: c, user: a } = Q(), [s, d] = m.useState(a.birthday), l = (h) => {
2922
+ d(Math.floor(new Date(h).getTime() / 1e3));
2926
2923
  };
2927
2924
  return /* @__PURE__ */ e(
2928
2925
  te,
@@ -2930,7 +2927,7 @@ const B = {
2930
2927
  isOpen: t,
2931
2928
  onClose: r,
2932
2929
  onPrimaryAction: () => {
2933
- !s || s === a.birthday || (l({ ...a, birthday: s }), r());
2930
+ !s || s === a.birthday || (c({ ...a, birthday: s }), r());
2934
2931
  },
2935
2932
  onSecondaryAction: r,
2936
2933
  title: n.date_of_birth,
@@ -2938,18 +2935,18 @@ const B = {
2938
2935
  wo,
2939
2936
  {
2940
2937
  disableFuture: !0,
2941
- onChange: c,
2938
+ onChange: l,
2942
2939
  slotProps: {
2943
2940
  nextIconButton: {
2944
2941
  sx: {
2945
2942
  color: "primary.main",
2946
- "&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
2943
+ "&:hover": { bgcolor: be(o.palette.primary.light, 0.1) }
2947
2944
  }
2948
2945
  },
2949
2946
  previousIconButton: {
2950
2947
  sx: {
2951
2948
  color: "primary.main",
2952
- "&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
2949
+ "&:hover": { bgcolor: be(o.palette.primary.light, 0.1) }
2953
2950
  }
2954
2951
  }
2955
2952
  },
@@ -2961,7 +2958,7 @@ const B = {
2961
2958
  width: "100%",
2962
2959
  "& .MuiIconButton-edgeEnd": {
2963
2960
  color: "primary.main",
2964
- "&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
2961
+ "&:hover": { bgcolor: be(o.palette.primary.light, 0.1) }
2965
2962
  }
2966
2963
  },
2967
2964
  value: s ? new Date(s * 1e3) : /* @__PURE__ */ new Date()
@@ -2970,21 +2967,21 @@ const B = {
2970
2967
  }
2971
2968
  );
2972
2969
  }, ca = S(sa), la = ({ isOpen: t, onClose: r }) => {
2973
- const { visibleFinstrongAccounts: n } = Me(), {
2970
+ const { visibleFinstrongAccounts: n } = ke(), {
2974
2971
  accounts: o,
2975
- common: l,
2972
+ common: c,
2976
2973
  finstrong: a
2977
- } = v(), { repeatingTransactions: s } = Ve(), { user: p } = Q(), c = s.reduce((f, w) => {
2974
+ } = v(), { repeatingTransactions: s } = Ve(), { user: d } = Q(), l = s.reduce((f, w) => {
2978
2975
  const { repeating_transaction_type: y, transactions: D, recurrence_type: g, amount: x } = w;
2979
2976
  return y === Rt.Income && (D.length > 0 || g === Ot.EveryYear) ? f + x : f;
2980
- }, 0), [d, _] = m.useState(null), b = [
2977
+ }, 0), [p, h] = m.useState(null), b = [
2981
2978
  {
2982
2979
  dynamicCopy: a.add_profile_item,
2983
2980
  fallbackLabel: a.monthly_income,
2984
2981
  icon: /* @__PURE__ */ e(Cn, {}),
2985
2982
  key: ee.MonthlyIncome,
2986
2983
  label: a.monthly_income,
2987
- value: c
2984
+ value: l
2988
2985
  },
2989
2986
  {
2990
2987
  dynamicCopy: a.add_profile_item,
@@ -2992,7 +2989,7 @@ const B = {
2992
2989
  icon: /* @__PURE__ */ e(vn, {}),
2993
2990
  key: ee.DateOfBirth,
2994
2991
  label: a.date_of_birth,
2995
- value: p.birthday
2992
+ value: d.birthday
2996
2993
  },
2997
2994
  {
2998
2995
  dynamicCopy: a.add_profile_item,
@@ -3000,7 +2997,7 @@ const B = {
3000
2997
  icon: /* @__PURE__ */ e(Ke, {}),
3001
2998
  key: ee.CreditScore,
3002
2999
  label: a.credit_score,
3003
- value: p.credit_score
3000
+ value: d.credit_score
3004
3001
  },
3005
3002
  {
3006
3003
  fallbackLabel: a.connect_your_accounts,
@@ -3028,7 +3025,7 @@ const B = {
3028
3025
  }
3029
3026
  )
3030
3027
  ] }),
3031
- /* @__PURE__ */ e(Gn, { list: b, onClickItem: _ }),
3028
+ /* @__PURE__ */ e(Gn, { list: b, onClickItem: h }),
3032
3029
  /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(
3033
3030
  Be,
3034
3031
  {
@@ -3036,25 +3033,25 @@ const B = {
3036
3033
  drawerType: "connectDrawer",
3037
3034
  isDashboard: !0,
3038
3035
  title: a.dont_see_all_your_accounts,
3039
- titleDrawer: l.add_accounts
3036
+ titleDrawer: c.add_accounts
3040
3037
  }
3041
3038
  ) }),
3042
3039
  /* @__PURE__ */ e(
3043
3040
  te,
3044
3041
  {
3045
- isOpen: d === ee.MonthlyIncome,
3046
- onClose: () => _(null),
3047
- title: l.settings,
3042
+ isOpen: p === ee.MonthlyIncome,
3043
+ onClose: () => h(null),
3044
+ title: c.settings,
3048
3045
  children: /* @__PURE__ */ e(ko, {})
3049
3046
  }
3050
3047
  ),
3051
- /* @__PURE__ */ e(ca, { isOpen: d === ee.DateOfBirth, onClose: () => _(null) }),
3052
- /* @__PURE__ */ e(Gt, { isOpen: d === ee.CreditScore, onClose: () => _(null) }),
3048
+ /* @__PURE__ */ e(ca, { isOpen: p === ee.DateOfBirth, onClose: () => h(null) }),
3049
+ /* @__PURE__ */ e(Gt, { isOpen: p === ee.CreditScore, onClose: () => h(null) }),
3053
3050
  /* @__PURE__ */ e(
3054
3051
  Mt,
3055
3052
  {
3056
- onClose: () => _(null),
3057
- showConnectionsWidget: d === ee.Connections,
3053
+ onClose: () => h(null),
3054
+ showConnectionsWidget: p === ee.Connections,
3058
3055
  title: o.manage_connections
3059
3056
  }
3060
3057
  )
@@ -3071,16 +3068,16 @@ const B = {
3071
3068
  ] }), pa = ({ report: t }) => {
3072
3069
  const { finstrong: r } = v(), { score_history_drawer_timeline: n } = r, {
3073
3070
  health_score_point_difference: o,
3074
- newer_credit_score: l,
3071
+ newer_credit_score: c,
3075
3072
  older_credit_score: a,
3076
3073
  older_spend_to_income_ratio: s,
3077
- newer_spend_to_income_ratio: p,
3078
- older_health_score: c,
3079
- newer_health_score: d,
3080
- newer_score_calculated_at: _
3081
- } = t, h = Do(new Date(_), "MMM d"), b = () => o === 0 ? "info.lighter" : o > 0 ? "success.lighter" : "error.lighter", f = () => o === 0 ? Y(n.stayed_at, c) : o > 0 ? n.less_spending : n.more_spending, w = () => {
3074
+ newer_spend_to_income_ratio: d,
3075
+ older_health_score: l,
3076
+ newer_health_score: p,
3077
+ newer_score_calculated_at: h
3078
+ } = t, _ = Do(new Date(h), "MMM d"), b = () => o === 0 ? "info.lighter" : o > 0 ? "success.lighter" : "error.lighter", f = () => o === 0 ? Y(n.stayed_at, l) : o > 0 ? n.less_spending : n.more_spending, w = () => {
3082
3079
  if (o === 0) return null;
3083
- const y = o > 0 ? n.up_from : n.down_from, D = Y(y, c, d);
3080
+ const y = o > 0 ? n.up_from : n.down_from, D = Y(y, l, p);
3084
3081
  return /* @__PURE__ */ i(z, { children: [
3085
3082
  /* @__PURE__ */ e(
3086
3083
  Mn,
@@ -3117,7 +3114,7 @@ const B = {
3117
3114
  /* @__PURE__ */ i(u, { sx: { gap: 2, width: "80%" }, children: [
3118
3115
  /* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children: f() }),
3119
3116
  /* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
3120
- h,
3117
+ _,
3121
3118
  " ",
3122
3119
  w()
3123
3120
  ] })
@@ -3143,7 +3140,7 @@ const B = {
3143
3140
  content: Y(
3144
3141
  n.spend_to_income_description,
3145
3142
  Te(s),
3146
- Te(p)
3143
+ Te(d)
3147
3144
  )
3148
3145
  }
3149
3146
  ),
@@ -3153,7 +3150,7 @@ const B = {
3153
3150
  content: Y(
3154
3151
  n.credit_score_description,
3155
3152
  a,
3156
- l
3153
+ c
3157
3154
  ),
3158
3155
  islast: !0
3159
3156
  }
@@ -3163,9 +3160,9 @@ const B = {
3163
3160
  ) })
3164
3161
  ] }) });
3165
3162
  }, ua = S(pa), _a = ({ isOpen: t, onClose: r }) => {
3166
- const n = E(), { finstrong: o } = v(), { isCopyLoaded: l, isInitialized: a } = j(), { healthScore: s, healthScoreChangeReports: p, augmentedChartData: c } = F();
3167
- if (!l || !a) return /* @__PURE__ */ e(J, {});
3168
- const d = je(s.health_score || 0, o), _ = p.slice().reverse();
3163
+ const n = E(), { finstrong: o } = v(), { isCopyLoaded: c, isInitialized: a } = j(), { healthScore: s, healthScoreChangeReports: d, augmentedChartData: l } = F();
3164
+ if (!c || !a) return /* @__PURE__ */ e(J, {});
3165
+ const p = je(s.health_score || 0, o), h = d.slice().reverse();
3169
3166
  return /* @__PURE__ */ e(
3170
3167
  Ht,
3171
3168
  {
@@ -3176,7 +3173,7 @@ const B = {
3176
3173
  baseline: "min",
3177
3174
  colors: [n.palette.primary.main],
3178
3175
  curveType: "natural",
3179
- datasets: [c],
3176
+ datasets: [l],
3180
3177
  height: 160,
3181
3178
  labels: [o.key_indicators_label],
3182
3179
  margin: { top: 12, left: 24 },
@@ -3205,13 +3202,13 @@ const B = {
3205
3202
  }
3206
3203
  ) }),
3207
3204
  /* @__PURE__ */ i(C, { children: [
3208
- /* @__PURE__ */ e(k, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: d.status }),
3209
- /* @__PURE__ */ e(k, { variant: "caption", children: d.description })
3205
+ /* @__PURE__ */ e(k, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: p.status }),
3206
+ /* @__PURE__ */ e(k, { variant: "caption", children: p.description })
3210
3207
  ] })
3211
3208
  ]
3212
3209
  }
3213
3210
  ),
3214
- children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: _.map((h, b) => /* @__PURE__ */ e(ua, { report: h }, b)) })
3211
+ children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: h.map((_, b) => /* @__PURE__ */ e(ua, { report: _ }, b)) })
3215
3212
  }
3216
3213
  );
3217
3214
  }, ha = S(_a), ma = ({ copy: t }) => {
@@ -3227,9 +3224,9 @@ const B = {
3227
3224
  { color: "chartMono.chartMono3", text: t.building, value: "26-50" },
3228
3225
  { color: "chartMono.chartMono4", text: t.stable, value: "51-75" },
3229
3226
  { color: "chartMono.chartMono5", text: t.strong, value: "76-100" }
3230
- ].map(({ color: o, text: l, value: a }) => /* @__PURE__ */ i(u, { sx: { gap: 4, textAlign: "center", width: "100%" }, children: [
3227
+ ].map(({ color: o, text: c, value: a }) => /* @__PURE__ */ i(u, { sx: { gap: 4, textAlign: "center", width: "100%" }, children: [
3231
3228
  /* @__PURE__ */ i(C, { children: [
3232
- /* @__PURE__ */ e(k, { sx: { fontWeight: 700, textTransform: "uppercase" }, variant: "caption", children: l }),
3229
+ /* @__PURE__ */ e(k, { sx: { fontWeight: 700, textTransform: "uppercase" }, variant: "caption", children: c }),
3233
3230
  /* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "caption", children: [
3234
3231
  "(",
3235
3232
  a,
@@ -3237,7 +3234,7 @@ const B = {
3237
3234
  ] })
3238
3235
  ] }),
3239
3236
  /* @__PURE__ */ e(C, { sx: { border: "2px solid", borderColor: o, borderRadius: "3px" } })
3240
- ] }, l)) }),
3237
+ ] }, c)) }),
3241
3238
  /* @__PURE__ */ i(C, { children: [
3242
3239
  /* @__PURE__ */ e(
3243
3240
  C,
@@ -3306,15 +3303,15 @@ const B = {
3306
3303
  }
3307
3304
  },
3308
3305
  children: [
3309
- /* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(
3310
- be,
3306
+ /* @__PURE__ */ e(ge, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(
3307
+ ye,
3311
3308
  {
3312
3309
  primary: n.understand_your_habits,
3313
3310
  secondary: n.understand_your_habits_description
3314
3311
  }
3315
3312
  ) }),
3316
- /* @__PURE__ */ e(ye, { sx: { display: "list-item", pt: 16 }, children: /* @__PURE__ */ e(
3317
- be,
3313
+ /* @__PURE__ */ e(ge, { sx: { display: "list-item", pt: 16 }, children: /* @__PURE__ */ e(
3314
+ ye,
3318
3315
  {
3319
3316
  primary: n.see_whats_possible,
3320
3317
  secondary: n.see_whats_possible_description
@@ -3347,21 +3344,21 @@ const B = {
3347
3344
  }
3348
3345
  },
3349
3346
  children: [
3350
- /* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(be, { secondary: n.we_ask_questions_description_1 }) }),
3351
- /* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(be, { secondary: n.we_ask_questions_description_2 }) })
3347
+ /* @__PURE__ */ e(ge, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(ye, { secondary: n.we_ask_questions_description_1 }) }),
3348
+ /* @__PURE__ */ e(ge, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(ye, { secondary: n.we_ask_questions_description_2 }) })
3352
3349
  ]
3353
3350
  }
3354
3351
  )
3355
3352
  ] })
3356
3353
  ] }) }) : /* @__PURE__ */ e(J, {});
3357
3354
  }, ya = S(ga), ba = S(() => {
3358
- const [t, r] = m.useState(!1), n = E(), [o, { width: l }] = It(), { finstrong: a } = v(), { isCopyLoaded: s, isInitialized: p } = j(), { healthScore: c, healthScoreChange: d } = F(), _ = n.palette.mode === "dark", h = je(c?.health_score, a);
3359
- return !s || !p ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ i(K, { ref: o, sx: { p: 16 }, children: [
3355
+ const [t, r] = m.useState(!1), n = E(), [o, { width: c }] = It(), { finstrong: a } = v(), { isCopyLoaded: s, isInitialized: d } = j(), { healthScore: l, healthScoreChange: p } = F(), h = n.palette.mode === "dark", _ = je(l?.health_score, a);
3356
+ return !s || !d ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ i(K, { ref: o, sx: { p: 16 }, children: [
3360
3357
  /* @__PURE__ */ e(
3361
3358
  $o,
3362
3359
  {
3363
3360
  action: /* @__PURE__ */ e(
3364
- W,
3361
+ $,
3365
3362
  {
3366
3363
  endIcon: /* @__PURE__ */ e(Z, {}),
3367
3364
  onClick: () => r(!0),
@@ -3387,18 +3384,18 @@ const B = {
3387
3384
  /* @__PURE__ */ e(u, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
3388
3385
  Et,
3389
3386
  {
3390
- arcRadius: l <= 323 ? 73 : 154,
3391
- footerCenterContent: d,
3392
- healthScore: c?.health_score || 0,
3393
- size: l <= 323 ? "M" : "L"
3387
+ arcRadius: c <= 323 ? 73 : 154,
3388
+ footerCenterContent: p,
3389
+ healthScore: l?.health_score || 0,
3390
+ size: c <= 323 ? "M" : "L"
3394
3391
  }
3395
3392
  ) }),
3396
- c?.health_score ? /* @__PURE__ */ i(
3393
+ l?.health_score ? /* @__PURE__ */ i(
3397
3394
  Bo,
3398
3395
  {
3399
3396
  sx: {
3400
3397
  px: 16,
3401
- backgroundColor: _ ? "grey.800" : "grey.50",
3398
+ backgroundColor: h ? "grey.800" : "grey.50",
3402
3399
  //TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
3403
3400
  "&.Mui-expanded": {
3404
3401
  m: 0
@@ -3422,7 +3419,7 @@ const B = {
3422
3419
  children: /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: "body1", children: a.accordion_title_text })
3423
3420
  }
3424
3421
  ),
3425
- /* @__PURE__ */ e(Lo, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(k, { variant: "subtitle1", children: h.scoreContent }) })
3422
+ /* @__PURE__ */ e(Lo, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(k, { variant: "subtitle1", children: _.scoreContent }) })
3426
3423
  ]
3427
3424
  }
3428
3425
  ) : /* @__PURE__ */ e(
@@ -3434,7 +3431,7 @@ const B = {
3434
3431
  hasIcon: !1,
3435
3432
  isDashboard: !0,
3436
3433
  sx: {
3437
- backgroundColor: _ ? "grey.800" : "grey.50",
3434
+ backgroundColor: h ? "grey.800" : "grey.50",
3438
3435
  //TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
3439
3436
  ".connect-more-accounts-title": {
3440
3437
  fontWeight: 600,
@@ -3455,24 +3452,23 @@ const B = {
3455
3452
  )
3456
3453
  ] });
3457
3454
  }), fa = ({ onBackClick: t, sx: r, onPrimaryCtaClick: n }) => {
3458
- const { visibleAccounts: o } = Me(), { dateRange: l, isDataLoaded: a, loadBudgetData: s, setTheme: p } = Yn(), { reloadCategoryTotals: c } = Ye(), d = F(), {
3459
- augmentedChartData: _,
3460
- calculateHealthScore: h,
3455
+ const { visibleAccounts: o } = ke(), { dateRange: c, isDataLoaded: a, loadBudgetData: s, setTheme: d } = Yn(), { reloadCategoryTotals: l } = Ye(), p = F(), {
3456
+ augmentedChartData: h,
3457
+ calculateHealthScore: _,
3461
3458
  healthScore: b,
3462
3459
  loadAugmentedChartData: f,
3463
3460
  loadMonthlySummaries: w
3464
- } = d, { finstrong: y, connect: D } = v(), { isCopyLoaded: g, isInitialized: x, selectedAccounts: M, setSelectedAccounts: $ } = j(), { loadRepeatingTransactions: G } = Ve(), { isMobile: H } = Ue(), T = E(), { userProfile: V } = Q(), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(!1);
3461
+ } = p, { finstrong: y, connect: D } = v(), { isCopyLoaded: g, isInitialized: x, selectedAccounts: M, setSelectedAccounts: W } = j(), { loadRepeatingTransactions: G } = Ve(), { isMobile: H } = Ue(), T = E(), { userProfile: V } = Q(), [re, ae] = m.useState(!1), [Se, ie] = m.useState(!1), [X, se] = m.useState(!1);
3465
3462
  if (m.useEffect(() => {
3466
- p(T);
3463
+ d(T);
3467
3464
  }, []), m.useEffect(() => {
3468
- n && (d.handleFinstrongWidgetPrimaryCtaClick = n);
3469
- }, [n, d]), m.useEffect(() => $(o), [o]), m.useEffect(() => {
3470
- x && (h().finally(), f().finally(), w().finally());
3465
+ n && (p.handleFinstrongWidgetPrimaryCtaClick = n);
3466
+ }, [n, p]), m.useEffect(() => W(o), [o]), m.useEffect(() => {
3467
+ x && (_().finally(), f().finally(), w().finally());
3471
3468
  }, [x]), m.useEffect(() => {
3472
- x && (c(M, l.start, l.end), a || (s(), G().finally()));
3473
- }, [l, a, x, M]), !g || !x) return /* @__PURE__ */ e(J, {});
3474
- const ce = () => {
3475
- }, he = () => ae(!0);
3469
+ x && (l(M, c.start, c.end), a || (s(), G().finally()));
3470
+ }, [c, a, x, M]), !g || !x) return /* @__PURE__ */ e(J, {});
3471
+ const ce = () => ae(!0);
3476
3472
  return /* @__PURE__ */ i(
3477
3473
  io,
3478
3474
  {
@@ -3481,11 +3477,10 @@ const B = {
3481
3477
  {
3482
3478
  iconName: "person",
3483
3479
  label: y.profile,
3484
- onClick: he
3480
+ onClick: ce
3485
3481
  }
3486
3482
  ],
3487
3483
  hasDivider: !0,
3488
- onAccountsFilterClick: ce,
3489
3484
  onBackClick: t,
3490
3485
  sx: r,
3491
3486
  title: y.title,
@@ -3516,7 +3511,7 @@ const B = {
3516
3511
  /* @__PURE__ */ i(u, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
3517
3512
  /* @__PURE__ */ e(N, { children: y.key_indicators }),
3518
3513
  /* @__PURE__ */ e(
3519
- W,
3514
+ $,
3520
3515
  {
3521
3516
  endIcon: /* @__PURE__ */ e(Z, {}),
3522
3517
  onClick: () => ie(!0),
@@ -3528,7 +3523,7 @@ const B = {
3528
3523
  }
3529
3524
  )
3530
3525
  ] }),
3531
- _.length ? /* @__PURE__ */ e(
3526
+ h.length ? /* @__PURE__ */ e(
3532
3527
  Xe,
3533
3528
  {
3534
3529
  axisColor: T.palette.divider,
@@ -3536,7 +3531,7 @@ const B = {
3536
3531
  colors: [T.palette.primary.main],
3537
3532
  curveType: "natural",
3538
3533
  customLegendVariant: "XSmall",
3539
- datasets: [_],
3534
+ datasets: [h],
3540
3535
  height: 300,
3541
3536
  isGraphClippingXAxis: !0,
3542
3537
  labelBackgroundColor: T.palette.border.dark,
@@ -3554,17 +3549,7 @@ const B = {
3554
3549
  }
3555
3550
  ) : /* @__PURE__ */ e(Vr, { onClick: () => se(!0) }),
3556
3551
  b.health_score !== null && /* @__PURE__ */ e(jr, {})
3557
- ] }) }),
3558
- /* @__PURE__ */ e(
3559
- W,
3560
- {
3561
- sx: { background: "red", width: 100 },
3562
- onClick: () => {
3563
- console.log("test"), d.handleFinstrongWidgetPrimaryCtaClick("trends")();
3564
- },
3565
- children: "test"
3566
- }
3567
- )
3552
+ ] }) })
3568
3553
  ]
3569
3554
  }
3570
3555
  ) : /* @__PURE__ */ e(ia, {}),
@@ -3580,7 +3565,7 @@ const B = {
3580
3565
  /* @__PURE__ */ e(
3581
3566
  ha,
3582
3567
  {
3583
- isOpen: Ce,
3568
+ isOpen: Se,
3584
3569
  onClose: () => ie(!1)
3585
3570
  }
3586
3571
  )