@mx-cartographer/experiences 7.4.8-alpha.mm0 → 7.4.8

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-BrOTlmeK.mjs → Account-01wOyrH1.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-B7FqH05C.mjs → AccountDetailsContent-COMjOzwr.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-C8MxsxhN.mjs → AccountDetailsHeader-Cbi5G6fJ.mjs} +4 -4
  5. package/dist/{AccountFields-BQZ-o6Kj.mjs → AccountFields-Cd_nOWmf.mjs} +2 -2
  6. package/dist/{AccountListItem-aIE9WWTO.mjs → AccountListItem-DxY4cCF1.mjs} +4 -4
  7. package/dist/{AccountStore-DqO84Aer.mjs → AccountStore-C1zMBzHq.mjs} +2 -2
  8. package/dist/{Accounts-DC_A4UCa.mjs → Accounts-D7QljYas.mjs} +1 -1
  9. package/dist/{BudgetUtil-BmZXkL0C.mjs → BudgetUtil-Df2nII9u.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-SUgfE5GN.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +1 -1
  11. package/dist/{ConnectDrawer-KL8t1qSC.mjs → ConnectDrawer-CuUj16NH.mjs} +1 -1
  12. package/dist/{ConnectionsDrawer-DaK5uIL5.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +2 -2
  13. package/dist/{CurrencyInput-itK0R3wV.mjs → CurrencyInput-BFKcs-_K.mjs} +1 -1
  14. package/dist/{DebtsStore-DVPZbv2C.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
  15. package/dist/{ExportCsvAction-Cglo8Mca.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  16. package/dist/{GoalStore-o4rrjGSJ.mjs → GoalStore-CrNhjvNc.mjs} +2 -2
  17. package/dist/{Help-BjLMsuMS.mjs → Help-BnPXM_N2.mjs} +1 -1
  18. package/dist/{LineChart-BQRxZF3p.mjs → LineChart-bc1D9xBE.mjs} +1 -1
  19. package/dist/{ListItemAction-BxTkF6Tz.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
  20. package/dist/{ManageIncome-rcnDYsBJ.mjs → ManageIncome-A69EUO5u.mjs} +75 -75
  21. package/dist/{MicroWidgetContainer-B2hO9rOG.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-98-hKFqm.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  23. package/dist/{NetWorthStore-DG2X69jG.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
  24. package/dist/{NotificationSettings-C7FYNM7I.mjs → NotificationSettings-CNmJWVeI.mjs} +248 -250
  25. package/dist/{OriginalBalanceAction-C6jdS4ws.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +3 -3
  26. package/dist/{RecurringSettings-C81H1l38.mjs → RecurringSettings-B0uObPlD.mjs} +3 -3
  27. package/dist/{SpendingLegend-DqZxN_BZ.mjs → SpendingLegend-Bf-wbJvb.mjs} +2 -2
  28. package/dist/{TransactionDetails-BA_E5nQ-.mjs → TransactionDetails-COH0OKNG.mjs} +5 -5
  29. package/dist/{TransactionStore-PRlwE-TF.mjs → TransactionStore-Dz-G8Wd0.mjs} +2 -2
  30. package/dist/{User-Cnlegl1N.mjs → User-wXzDI4M8.mjs} +1 -1
  31. package/dist/{ViewMoreMicroCard-DfPXJzbv.mjs → ViewMoreMicroCard-C0832BMe.mjs} +101 -105
  32. package/dist/{WidgetContainer-CaPjoWeE.mjs → WidgetContainer-6dsjtOVg.mjs} +2 -2
  33. package/dist/accounts/index.es.js +140 -148
  34. package/dist/analytics/index.es.js +2 -2
  35. package/dist/budgets/index.es.js +478 -483
  36. package/dist/cashflow/index.es.js +362 -367
  37. package/dist/categories/index.es.js +1 -1
  38. package/dist/common/hooks/index.d.ts +0 -1
  39. package/dist/common/index.es.js +33 -35
  40. package/dist/dashboard/index.es.js +88 -90
  41. package/dist/debts/index.es.js +342 -346
  42. package/dist/{exportTransactionsToCSV-DuAaI5XA.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +1 -1
  43. package/dist/finstrong/index.es.js +350 -352
  44. package/dist/goals/index.es.js +511 -518
  45. package/dist/help/index.es.js +9 -13
  46. package/dist/{hooks-ZMp65DFz.mjs → hooks-C41HAxM5.mjs} +11 -11
  47. package/dist/investments/index.es.js +393 -395
  48. package/dist/merchants/index.es.js +1 -1
  49. package/dist/microinsights/index.es.js +1 -1
  50. package/dist/networth/index.es.js +240 -245
  51. package/dist/notifications/index.es.js +2 -2
  52. package/dist/recurringtransactions/index.es.js +285 -293
  53. package/dist/settings/index.es.js +249 -252
  54. package/dist/spending/index.es.js +126 -138
  55. package/dist/transactions/index.es.js +73 -77
  56. package/dist/trends/index.es.js +588 -601
  57. package/dist/{useAccountDisplayName-Cjx8YmKK.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
  58. package/dist/{useInsightsEnabled-B7dxpDrX.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  59. package/package.json +1 -1
  60. package/dist/common/hooks/useWidgetLoadTimer.d.ts +0 -6
  61. package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +0 -23
@@ -1,158 +1,157 @@
1
- import { g as ue, T as u, G as me, a as Pe, M as J, C as Ae, b as Ve } from "../GoalStore-o4rrjGSJ.mjs";
2
- import { c as qn, d as Jn } from "../GoalStore-o4rrjGSJ.mjs";
3
- import { jsxs as r, jsx as e, Fragment as U } from "react/jsx-runtime";
1
+ import { g as _e, T as u, G as ue, a as Pe, M as q, C as Te, b as Ve } from "../GoalStore-CrNhjvNc.mjs";
2
+ import { c as qn, d as Jn } from "../GoalStore-CrNhjvNc.mjs";
3
+ import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
4
4
  import y from "react";
5
5
  import { observer as D } from "mobx-react-lite";
6
6
  import je from "@mui/material/Alert";
7
7
  import Fe from "@mui/material/Snackbar";
8
- import f from "@mui/material/Stack";
9
- import le from "@mui/material/Tab";
8
+ import b from "@mui/material/Stack";
9
+ import ce from "@mui/material/Tab";
10
10
  import ze from "@mui/material/Tabs";
11
- import { Text as A, H2 as _e, P as W, H3 as He, Icon as $e, InstitutionLogo as ne } from "@mxenabled/mxui";
12
- import pe from "@mui/material/Button";
13
- import Te from "@mui/material/Card";
14
- import Ce from "@mui/material/CardActionArea";
15
- import Se from "@mui/material/CardContent";
16
- import be from "@mui/material/Unstable_Grid2";
17
- import oe from "@mui/material/Avatar";
11
+ import { Text as A, H2 as pe, P, H3 as He, Icon as $e, InstitutionLogo as oe } from "@mxenabled/mxui";
12
+ import he from "@mui/material/Button";
13
+ import Ce from "@mui/material/Card";
14
+ import Se from "@mui/material/CardActionArea";
15
+ import Re from "@mui/material/CardContent";
16
+ import fe from "@mui/material/Unstable_Grid2";
17
+ import ae from "@mui/material/Avatar";
18
18
  import Xe from "@mui/material/CardHeader";
19
- import { Payments as Re, NoteStack as Ee, Person as xe, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as ve, Trophy as Je } from "@mxenabled/mx-icons";
20
- import { u as C, l as I, b as he, a as Ie, d as V, o as Ge, g as Ne } from "../hooks-ZMp65DFz.mjs";
21
- import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
19
+ import { Payments as Ee, NoteStack as xe, Person as ve, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
20
+ import { u as C, l as I, b as ge, a as Ge, d as j, p as Ne, g as ke, n as Qe } from "../hooks-C41HAxM5.mjs";
21
+ import { u as be } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as x } from "../NumberFormatting-DjTD0t3W.mjs";
23
- import { S as Qe } from "../StatusBar-BK_uYHAB.mjs";
23
+ import { S as et } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import E from "@mui/material/Divider";
25
25
  import B from "@mui/material/List";
26
- import { L as ee } from "../ListItemAction-BxTkF6Tz.mjs";
27
- import { C as ke } from "../CurrencyInput-itK0R3wV.mjs";
28
- import { fromUnixTime as Q } from "date-fns/fromUnixTime";
26
+ import { L as Q } from "../ListItemAction-uobBrm_a.mjs";
27
+ import { C as we } from "../CurrencyInput-BFKcs-_K.mjs";
28
+ import { fromUnixTime as J } from "date-fns/fromUnixTime";
29
29
  import N from "@mui/material/ListItem";
30
30
  import k from "@mui/material/ListItemButton";
31
31
  import w from "@mui/material/ListItemText";
32
- import { DataGridPro as et } from "@mui/x-data-grid-pro";
33
- import { D as j } from "../Drawer-BEtCk82g.mjs";
32
+ import { DataGridPro as tt } from "@mui/x-data-grid-pro";
33
+ import { D as F } from "../Drawer-BEtCk82g.mjs";
34
34
  import { b as L } from "../Localization-2MODESHW.mjs";
35
- import { f as ae, a as re, D as tt } from "../Dialog-BPTr3qHE.mjs";
36
- import P from "@mui/material/ListItemAvatar";
37
- import { g as we, A as ye } from "../ConnectDrawer-KL8t1qSC.mjs";
38
- import nt from "@mui/material/Collapse";
39
- import ot from "@mui/material/ListItemIcon";
40
- import at from "@mui/material/Checkbox";
41
- import { u as rt, A as it } from "../AccountDetailsHeader-C8MxsxhN.mjs";
42
- import { A as st } from "../AccountDetailsContent-B7FqH05C.mjs";
43
- import { u as lt } from "../useAccountDisplayName-Cjx8YmKK.mjs";
44
- import De from "@mui/material/TextField";
45
- import { M as ct, I as dt, O as mt } from "../OriginalBalanceAction-C6jdS4ws.mjs";
46
- import { getUnixTime as ut } from "date-fns/getUnixTime";
47
- import { isValid as _t } from "date-fns/isValid";
48
- import { AdapterDateFns as pt } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
- import { DatePicker as ht } from "@mui/x-date-pickers";
50
- import { LocalizationProvider as gt } from "@mui/x-date-pickers/LocalizationProvider";
51
- import { u as Ke } from "../useWidgetLoadTimer-C1NBkyLd.mjs";
52
- import { A as Y, W as bt } from "../WidgetContainer-CaPjoWeE.mjs";
35
+ import { f as re, a as ie, D as nt } from "../Dialog-BPTr3qHE.mjs";
36
+ import V from "@mui/material/ListItemAvatar";
37
+ import { g as De, A as Ae } from "../ConnectDrawer-CuUj16NH.mjs";
38
+ import ot from "@mui/material/Collapse";
39
+ import at from "@mui/material/ListItemIcon";
40
+ import rt from "@mui/material/Checkbox";
41
+ import { u as it, A as st } from "../AccountDetailsHeader-Cbi5G6fJ.mjs";
42
+ import { A as lt } from "../AccountDetailsContent-COMjOzwr.mjs";
43
+ import { u as ct } from "../useAccountDisplayName-CMMlIOXF.mjs";
44
+ import Ke from "@mui/material/TextField";
45
+ import { M as dt, I as mt, O as ut } from "../OriginalBalanceAction-DK8_LkPz.mjs";
46
+ import { getUnixTime as _t } from "date-fns/getUnixTime";
47
+ import { isValid as pt } from "date-fns/isValid";
48
+ import { AdapterDateFns as ht } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
+ import { DatePicker as gt } from "@mui/x-date-pickers";
50
+ import { LocalizationProvider as bt } from "@mui/x-date-pickers/LocalizationProvider";
51
+ import { A as Y, W as ft } from "../WidgetContainer-6dsjtOVg.mjs";
53
52
  import { L as Me } from "../Loader-DUaFpDGv.mjs";
54
- import { E as ft } from "../EmptyState-DoxNUae-.mjs";
55
- import yt from "@mui/material/Stack/Stack";
56
- import At from "@mui/material/Box";
57
- import Tt from "@mui/material/styles/useTheme";
58
- import { S as Ct } from "../SingleSegmentDonut-BgbLgwHi.mjs";
59
- import { M as St } from "../MicroWidgetContainer-B2hO9rOG.mjs";
60
- function ce({ title: t, subtitle: n }) {
61
- return /* @__PURE__ */ r(f, { children: [
53
+ import { E as yt } from "../EmptyState-DoxNUae-.mjs";
54
+ import At from "@mui/material/Stack/Stack";
55
+ import Tt from "@mui/material/Box";
56
+ import Ct from "@mui/material/styles/useTheme";
57
+ import { S as St } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
+ import { M as Rt } from "../MicroWidgetContainer-DEiRnYVa.mjs";
59
+ function de({ title: t, subtitle: n }) {
60
+ return /* @__PURE__ */ i(b, { children: [
62
61
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
63
62
  /* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "Body", children: n })
64
63
  ] });
65
64
  }
66
- const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
65
+ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
67
66
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
68
67
  "$1$2$3"
69
68
  ) : x(t, "0,0.00"), Le = D(
70
- ({ goal: t, isInDrawer: n = !1, onClick: i }) => {
71
- const { goals: s } = C(), { isMobile: p, isTablet: a } = ge(), _ = p || a, {
72
- backgroundColor: g,
73
- color: l,
74
- percentage: h,
75
- percentageText: d,
69
+ ({ goal: t, isInDrawer: n = !1, onClick: s }) => {
70
+ const { goals: c } = C(), { isMobile: p, isTablet: a } = be(), _ = p || a, {
71
+ backgroundColor: h,
72
+ color: g,
73
+ percentage: r,
74
+ percentageText: m,
76
75
  projectedText: o
77
- } = ue(s, t), c = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, m = [
76
+ } = _e(c, t), d = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, l = [
78
77
  {
79
- color: g,
80
- percentage: `${h}`
78
+ color: h,
79
+ percentage: `${r}`
81
80
  }
82
81
  ];
83
- let b = /* @__PURE__ */ e(Re, {});
84
- return t.track_type === u.DEBT_TRACK ? b = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ r(Ce, { disabled: !i, onClick: i, children: [
82
+ let f = /* @__PURE__ */ e(Ee, {});
83
+ return t.track_type === u.DEBT_TRACK ? f = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ i(Se, { disabled: !s, onClick: s, children: [
85
84
  /* @__PURE__ */ e(
86
85
  Xe,
87
86
  {
88
- avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: g, color: l, height: 48, width: 48 }, variant: "rounded", children: b }),
89
- subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Rt(
90
- c,
87
+ avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: h, color: g, height: 48, width: 48 }, variant: "rounded", children: f }),
88
+ subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Et(
89
+ d,
91
90
  _
92
91
  )}` }),
93
- title: /* @__PURE__ */ e(_e, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
92
+ title: /* @__PURE__ */ e(pe, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
94
93
  }
95
94
  ),
96
- /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ r(f, { gap: 6, children: [
97
- /* @__PURE__ */ e(Qe, { data: m, height: 24 }),
98
- /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
99
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: d }),
95
+ /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ i(b, { gap: 6, children: [
96
+ /* @__PURE__ */ e(et, { data: l, height: 24 }),
97
+ /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
98
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: m }),
100
99
  t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o })
101
100
  ] })
102
101
  ] }) })
103
102
  ] }) });
104
103
  }
105
- ), Et = D(({ trackType: t }) => {
106
- const { goals: n } = C(), { setAlert: i, monthlyCashFlowProfile: s, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
107
- let h = 0;
108
- return t === u.SAVINGS_TRACK ? h = s?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? h = s?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (h = s?.amount_allocated_for_retirement_goals || 0), h;
109
- }, [s]), [_, g] = y.useState(a), l = async () => {
110
- if (s) {
111
- const h = { ...s };
112
- t === u.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await p(h), i(n.alert_contribution_updated);
104
+ ), xt = D(({ trackType: t }) => {
105
+ const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
+ let r = 0;
107
+ return t === u.SAVINGS_TRACK ? r = c?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? r = c?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (r = c?.amount_allocated_for_retirement_goals || 0), r;
108
+ }, [c]), [_, h] = y.useState(a), g = async () => {
109
+ if (c) {
110
+ const r = { ...c };
111
+ t === u.SAVINGS_TRACK ? r.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? r.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (r.amount_allocated_for_retirement_goals = _), await p(r), s(n.alert_contribution_updated);
113
112
  }
114
113
  };
115
- return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
116
- ee,
114
+ return /* @__PURE__ */ e(b, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
115
+ Q,
117
116
  {
118
117
  isSaveDisabled: !_ || isNaN(_),
119
118
  label: n.contribution_label,
120
- onCancel: () => g(a),
121
- onSave: l,
119
+ onCancel: () => h(a),
120
+ onSave: g,
122
121
  primaryText: n.contribution_label,
123
122
  secondaryText: x(a, "0,0.00"),
124
123
  children: /* @__PURE__ */ e(
125
- ke,
124
+ we,
126
125
  {
127
126
  amount: _,
128
127
  autoFocus: !0,
129
128
  error: !_ || isNaN(_),
130
129
  fullWidth: !0,
131
130
  minAmount: 0,
132
- setAmount: (h) => g(isNaN(Number(h)) ? _ : Number(h)),
131
+ setAmount: (r) => h(isNaN(Number(r)) ? _ : Number(r)),
133
132
  sx: { ".MuiTypography-Body": { p: 0 } }
134
133
  }
135
134
  )
136
135
  }
137
136
  ) });
138
- }), xt = ({ goals: t }) => {
139
- const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((m) => ({ ...m })));
137
+ }), vt = ({ goals: t }) => {
138
+ const { goals: n, common: s } = C(), { reorderGoals: c, setAlert: p } = I(), [a, _] = y.useState(!1), [h, g] = y.useState(t.map((l) => ({ ...l })));
140
139
  y.useEffect(() => {
141
- a && l(t.map((m) => ({ ...m })));
140
+ a && g(t.map((l) => ({ ...l })));
142
141
  }, [a]);
143
- const h = [
142
+ const r = [
144
143
  {
145
144
  field: "name",
146
145
  flex: 1,
147
- renderCell: (m) => {
148
- const b = m.row;
149
- return /* @__PURE__ */ r(f, { children: [
150
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: b.name }),
146
+ renderCell: (l) => {
147
+ const f = l.row;
148
+ return /* @__PURE__ */ i(b, { children: [
149
+ /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: f.name }),
151
150
  /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
152
151
  n.goal_projection,
153
- ae(
154
- Q(b.projected_to_complete_at || 0),
155
- re.MONTH_SHORT_YEAR
152
+ re(
153
+ J(f.projected_to_complete_at || 0),
154
+ ie.MONTH_SHORT_YEAR
156
155
  )
157
156
  ) })
158
157
  ] });
@@ -163,29 +162,29 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
163
162
  align: "right",
164
163
  field: "amount",
165
164
  minWidth: 140,
166
- renderCell: (m) => {
167
- const b = m.row;
168
- return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(b.amount, "0,0.00") });
165
+ renderCell: (l) => {
166
+ const f = l.row;
167
+ return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(f.amount, "0,0.00") });
169
168
  },
170
169
  sortable: !1
171
170
  }
172
- ], d = g.map((m) => ({
173
- id: m.guid,
171
+ ], m = h.map((l) => ({
172
+ id: l.guid,
174
173
  isHovering: !1,
175
- __reorder__: m.name,
176
- ...m
177
- })), o = ({ oldIndex: m, targetIndex: b }) => {
178
- const T = [...g];
179
- T.splice(b, 0, T.splice(m, 1)[0]);
174
+ __reorder__: l.name,
175
+ ...l
176
+ })), o = ({ oldIndex: l, targetIndex: f }) => {
177
+ const T = [...h];
178
+ T.splice(f, 0, T.splice(l, 1)[0]);
180
179
  for (let S = 0; S < T.length; S += 1)
181
180
  T[S].position = S + 1;
182
- l(T);
183
- }, c = async () => {
184
- await s(g), p(n.alert_goals_reordered), _(!1);
181
+ g(T);
182
+ }, d = async () => {
183
+ await c(h), p(n.alert_goals_reordered), _(!1);
185
184
  };
186
- return /* @__PURE__ */ r(f, { children: [
187
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(
188
- f,
185
+ return /* @__PURE__ */ i(b, { children: [
186
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
187
+ b,
189
188
  {
190
189
  alignItems: "center",
191
190
  color: "action.active",
@@ -198,26 +197,26 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
198
197
  }
199
198
  ) }) }) }),
200
199
  /* @__PURE__ */ e(
201
- j,
200
+ F,
202
201
  {
203
- ariaLabelClose: i.close_aria,
202
+ ariaLabelClose: s.close_aria,
204
203
  isOpen: a,
205
204
  onClose: () => _(!1),
206
- onPrimaryAction: c,
205
+ onPrimaryAction: d,
207
206
  title: n.reorder_goals_title,
208
- children: /* @__PURE__ */ r(f, { children: [
209
- /* @__PURE__ */ e(W, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
207
+ children: /* @__PURE__ */ i(b, { children: [
208
+ /* @__PURE__ */ e(P, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
210
209
  /* @__PURE__ */ e(
211
- et,
210
+ tt,
212
211
  {
213
212
  columnHeaderHeight: 0,
214
- columns: h,
213
+ columns: r,
215
214
  disableColumnFilter: !0,
216
215
  disableColumnMenu: !0,
217
216
  hideFooter: !0,
218
217
  onRowOrderChange: o,
219
218
  rowReordering: !0,
220
- rows: d,
219
+ rows: m,
221
220
  slots: {
222
221
  rowReorderIcon: () => /* @__PURE__ */ e(Ue, { sx: { ml: 12 } })
223
222
  //TODO: Add to mx-icons
@@ -233,11 +232,11 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
233
232
  }
234
233
  )
235
234
  ] });
236
- }, vt = ({ goal: t, index: n }) => {
237
- const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed : L(i.goal_percentage_reached, `${s * 100}`);
238
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
235
+ }, It = ({ goal: t, index: n }) => {
236
+ const { goals: s } = C(), { percentage: c } = _e(s, t), p = t.goal_type === ue.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : L(s.goal_percentage_reached, `${c * 100}`);
237
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
239
238
  t.track_type !== u.RETIREMENT_TRACK && /* @__PURE__ */ e(
240
- P,
239
+ V,
241
240
  {
242
241
  sx: {
243
242
  alignItems: "center",
@@ -245,114 +244,114 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
245
244
  justifyContent: "center",
246
245
  ".MuiAvatar-root": { height: "16px", width: "16px" }
247
246
  },
248
- children: /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
247
+ children: /* @__PURE__ */ e(ae, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
249
248
  }
250
249
  ),
251
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
252
- /* @__PURE__ */ r(f, { children: [
250
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
251
+ /* @__PURE__ */ i(b, { children: [
253
252
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
254
253
  /* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : L(
255
- i.goal_projection,
256
- ae(
257
- Q(t.projected_to_complete_at || 0),
258
- re.MONTH_SHORT_YEAR
254
+ s.goal_projection,
255
+ re(
256
+ J(t.projected_to_complete_at || 0),
257
+ ie.MONTH_SHORT_YEAR
259
258
  )
260
259
  ) })
261
260
  ] }),
262
261
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
263
262
  ] }) })
264
263
  ] }) });
265
- }, It = ({ goal: t }) => {
264
+ }, Gt = ({ goal: t }) => {
266
265
  const { goals: n } = C();
267
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
268
- /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
269
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
270
- /* @__PURE__ */ r(f, { children: [
266
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
267
+ /* @__PURE__ */ e(V, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
268
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
269
+ /* @__PURE__ */ i(b, { children: [
271
270
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
272
271
  /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
273
272
  n.completed_label,
274
- ae(
275
- Q(t.completed_at || 0),
276
- re.MONTH_SHORT_YEAR
273
+ re(
274
+ J(t.completed_at || 0),
275
+ ie.MONTH_SHORT_YEAR
277
276
  )
278
277
  ) })
279
278
  ] }),
280
279
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
281
280
  ] }) })
282
281
  ] }) }, t.guid);
283
- }, Gt = ({ trackType: t }) => {
284
- const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((m) => m.track_type === t), a = p.filter(
285
- (m) => m.track_type === u.SAVINGS_TRACK && !m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && !m.is_complete
282
+ }, Nt = ({ trackType: t }) => {
283
+ const { goals: n, common: s } = C(), { orderedGoals: c } = I(), p = c.filter((l) => l.track_type === t), a = p.filter(
284
+ (l) => l.track_type === u.SAVINGS_TRACK && !l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && !l.is_complete
286
285
  ), _ = p.filter(
287
- (m) => m.track_type === u.SAVINGS_TRACK && m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && m.is_complete
288
- ), [g, l] = y.useState(!1);
289
- let h = n.manage_saving_goals, d = n.manage_saving_drawer_title, o = n.manage_saving_title, c = n.manage_saving_description;
290
- return t === u.DEBT_TRACK ? (h = n.manage_debt_goals, d = n.manage_debt_drawer_title, o = n.manage_debt_title, c = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (h = n.manage_retirement_goals, d = n.manage_retirement_drawer_title, o = n.manage_retirement_title, c = n.manage_retirement_description), /* @__PURE__ */ r(f, { children: [
291
- /* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => l(!0), children: h }),
286
+ (l) => l.track_type === u.SAVINGS_TRACK && l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && l.is_complete
287
+ ), [h, g] = y.useState(!1);
288
+ let r = n.manage_saving_goals, m = n.manage_saving_drawer_title, o = n.manage_saving_title, d = n.manage_saving_description;
289
+ return t === u.DEBT_TRACK ? (r = n.manage_debt_goals, m = n.manage_debt_drawer_title, o = n.manage_debt_title, d = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (r = n.manage_retirement_goals, m = n.manage_retirement_drawer_title, o = n.manage_retirement_title, d = n.manage_retirement_description), /* @__PURE__ */ i(b, { children: [
290
+ /* @__PURE__ */ e(he, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => g(!0), children: r }),
292
291
  /* @__PURE__ */ e(
293
- j,
292
+ F,
294
293
  {
295
- ariaLabelClose: i.close_aria,
296
- isOpen: g,
297
- onClose: () => l(!1),
298
- title: d,
299
- children: /* @__PURE__ */ r(f, { children: [
300
- /* @__PURE__ */ r(f, { m: 24, children: [
294
+ ariaLabelClose: s.close_aria,
295
+ isOpen: h,
296
+ onClose: () => g(!1),
297
+ title: m,
298
+ children: /* @__PURE__ */ i(b, { children: [
299
+ /* @__PURE__ */ i(b, { m: 24, children: [
301
300
  /* @__PURE__ */ e(He, { children: o }),
302
- /* @__PURE__ */ e(W, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: c })
301
+ /* @__PURE__ */ e(P, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: d })
303
302
  ] }),
304
- /* @__PURE__ */ e(Et, { trackType: t }),
303
+ /* @__PURE__ */ e(xt, { trackType: t }),
305
304
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
306
- /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
307
- a.map((m, b) => {
308
- const T = b >= a.length - 1;
309
- return /* @__PURE__ */ r(f, { children: [
310
- /* @__PURE__ */ e(vt, { goal: m, index: b }),
305
+ /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
306
+ a.map((l, f) => {
307
+ const T = f >= a.length - 1;
308
+ return /* @__PURE__ */ i(b, { children: [
309
+ /* @__PURE__ */ e(It, { goal: l, index: f }),
311
310
  /* @__PURE__ */ e(
312
311
  E,
313
312
  {
314
313
  variant: T && t === u.RETIREMENT_TRACK ? "fullWidth" : "inset"
315
314
  }
316
315
  )
317
- ] }, `ongoing-${m.guid}`);
316
+ ] }, `ongoing-${l.guid}`);
318
317
  }),
319
- t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { children: [
320
- /* @__PURE__ */ e(xt, { goals: a }),
318
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { children: [
319
+ /* @__PURE__ */ e(vt, { goals: a }),
321
320
  /* @__PURE__ */ e(E, {})
322
321
  ] })
323
322
  ] }),
324
- t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ r(f, { children: [
323
+ t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ i(b, { children: [
325
324
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
326
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((m, b) => {
327
- const T = b > a.length - 1;
328
- return /* @__PURE__ */ r(f, { children: [
329
- /* @__PURE__ */ e(It, { goal: m }),
325
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((l, f) => {
326
+ const T = f > a.length - 1;
327
+ return /* @__PURE__ */ i(b, { children: [
328
+ /* @__PURE__ */ e(Gt, { goal: l }),
330
329
  /* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
331
- ] }, `complete-${m.guid}`);
330
+ ] }, `complete-${l.guid}`);
332
331
  }) })
333
332
  ] })
334
333
  ] })
335
334
  }
336
335
  )
337
336
  ] });
338
- }, de = D(({ trackType: t, onAddGoals: n }) => {
339
- const { isMobile: i } = ge(), { goals: s } = C(), { selectedAccountGuids: p } = he(), { orderedGoals: a, setSelectedGoal: _ } = I(), g = a.filter(
337
+ }, me = D(({ trackType: t, onAddGoals: n }) => {
338
+ const { isMobile: s } = be(), { goals: c } = C(), { selectedAccountGuids: p } = ge(), { orderedGoals: a, setSelectedGoal: _ } = I(), h = a.filter(
340
339
  (o) => o.track_type === t && p.includes(o.account_guid)
341
- ), l = g.filter(
340
+ ), g = h.filter(
342
341
  (o) => o.track_type === u.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && !o.is_complete
343
- ), h = g.filter(
342
+ ), r = h.filter(
344
343
  (o) => o.track_type === u.SAVINGS_TRACK && o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && o.is_complete
345
- ), d = t === u.DEBT_TRACK ? s.zero_state_complete_debt : s.zero_state_complete_savings;
346
- return /* @__PURE__ */ r(f, { mt: 16, mx: i ? 24 : 0, children: [
347
- /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
348
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.ongoing_title }),
349
- /* @__PURE__ */ e(Gt, { trackType: t })
344
+ ), m = t === u.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
345
+ return /* @__PURE__ */ i(b, { mt: 16, mx: s ? 24 : 0, children: [
346
+ /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
347
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
348
+ /* @__PURE__ */ e(Nt, { trackType: t })
350
349
  ] }),
351
- l.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: l.map((o, c, m) => (
350
+ g.length > 0 ? /* @__PURE__ */ e(fe, { container: !0, spacing: 24, children: g.map((o, d, l) => (
352
351
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
353
- /* @__PURE__ */ e(be, { xs: i || c === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, c)
354
- )) }) : /* @__PURE__ */ r(
355
- f,
352
+ /* @__PURE__ */ e(fe, { xs: s || d === 0 && l.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, d)
353
+ )) }) : /* @__PURE__ */ i(
354
+ b,
356
355
  {
357
356
  alignItems: "center",
358
357
  bgcolor: "background.default",
@@ -362,7 +361,7 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
362
361
  py: 18,
363
362
  children: [
364
363
  /* @__PURE__ */ e(
365
- W,
364
+ P,
366
365
  {
367
366
  sx: (o) => ({
368
367
  color: "text.secondary",
@@ -372,17 +371,17 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
372
371
  width: { sm: 381 }
373
372
  }),
374
373
  variant: "Small",
375
- children: Pe(t, s)
374
+ children: Pe(t, c)
376
375
  }
377
376
  ),
378
- /* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: s.add_goals_button })
377
+ /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
379
378
  ]
380
379
  }
381
380
  ),
382
- t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { gap: 16, mt: 48, children: [
383
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.complete_title }),
384
- h.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
385
- W,
381
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { gap: 16, mt: 48, children: [
382
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.complete_title }),
383
+ r.length === 0 && /* @__PURE__ */ e(b, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
384
+ P,
386
385
  {
387
386
  sx: (o) => ({
388
387
  color: "text.secondary",
@@ -392,11 +391,11 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
392
391
  }
393
392
  }),
394
393
  variant: "Small",
395
- children: d
394
+ children: m
396
395
  }
397
396
  ) }),
398
- h.map((o) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => _(o), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
399
- /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", gap: 6, children: [
397
+ r.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Se, { onClick: () => _(o), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
398
+ /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", gap: 6, children: [
400
399
  /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
401
400
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
402
401
  ] }),
@@ -404,65 +403,65 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
404
403
  ] }) }) }) }, o.guid))
405
404
  ] })
406
405
  ] });
407
- }), Nt = ({ goalType: t, onClick: n }) => {
408
- const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h, d] = y.useState(!1), o = g.length > 0;
409
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
410
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(
406
+ }), kt = ({ goalType: t, onClick: n }) => {
407
+ const { goals: s } = C(), { bgcolor: c, icon: p, label: a, description: _, subTypes: h, type: g } = t, [r, m] = y.useState(!1), o = h.length > 0;
408
+ return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
409
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(
411
410
  k,
412
411
  {
413
- onClick: o ? () => d(!h) : () => n(
414
- l === u.RETIREMENT_TRACK ? i.retirement : "",
415
- l === u.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
416
- l
412
+ onClick: o ? () => m(!r) : () => n(
413
+ g === u.RETIREMENT_TRACK ? s.retirement : "",
414
+ g === u.RETIREMENT_TRACK ? q.RETIREMENT : q.OTHER,
415
+ g
417
416
  ),
418
417
  children: [
419
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: p, sx: { color: "grey.900" } }) }) }),
418
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: p, sx: { color: "grey.900" } }) }) }),
420
419
  /* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
421
420
  !o && /* @__PURE__ */ e(M, {}),
422
- o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
421
+ o && (r ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
423
422
  ]
424
423
  }
425
424
  ) }),
426
425
  /* @__PURE__ */ e(E, { variant: "inset" }),
427
- o && /* @__PURE__ */ e(nt, { in: h, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: g.map((c, m) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ r(k, { onClick: () => n(c.label, c.metaType, l), children: [
428
- /* @__PURE__ */ e(ot, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: c.icon }) }),
426
+ o && /* @__PURE__ */ e(ot, { in: r, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: h.map((d, l) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(d.label, d.metaType, g), children: [
427
+ /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: d.icon }) }),
429
428
  /* @__PURE__ */ e(
430
429
  w,
431
430
  {
432
- primary: c.label,
431
+ primary: d.label,
433
432
  primaryTypographyProps: { variant: "Body" }
434
433
  }
435
434
  ),
436
435
  /* @__PURE__ */ e(M, {})
437
- ] }) }, m)) }) })
436
+ ] }) }, l)) }) })
438
437
  ] }) });
439
438
  }, Be = ({
440
439
  accounts: t,
441
440
  isOpen: n,
442
- onClose: i,
443
- onSave: s,
441
+ onClose: s,
442
+ onSave: c,
444
443
  title: p
445
444
  }) => {
446
- const { goals: a, common: _ } = C(), { config: g } = Ie(), [l, h] = y.useState([]), d = (o) => {
447
- const c = l.findIndex((b) => b.guid === o.guid), m = [...l];
448
- c >= 0 ? m.splice(c, 1) : m.push(o), h(m);
445
+ const { goals: a, common: _ } = C(), { config: h } = Ge(), [g, r] = y.useState([]), m = (o) => {
446
+ const d = g.findIndex((f) => f.guid === o.guid), l = [...g];
447
+ d >= 0 ? l.splice(d, 1) : l.push(o), r(l);
449
448
  };
450
- return /* @__PURE__ */ r(
451
- j,
449
+ return /* @__PURE__ */ i(
450
+ F,
452
451
  {
453
452
  ariaLabelClose: _.close_aria,
454
453
  isOpen: n,
455
- onClose: i,
456
- onPrimaryAction: () => s(l),
454
+ onClose: s,
455
+ onPrimaryAction: () => c(g),
457
456
  title: p,
458
457
  children: [
459
- /* @__PURE__ */ e(W, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
460
- /* @__PURE__ */ r(B, { sx: { bgcolor: "background.white" }, children: [
458
+ /* @__PURE__ */ e(P, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
459
+ /* @__PURE__ */ i(B, { sx: { bgcolor: "background.white" }, children: [
461
460
  /* @__PURE__ */ e(E, { variant: "fullWidth" }),
462
- t.map((o, c) => /* @__PURE__ */ r(y.Fragment, { children: [
463
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => d(o), children: [
464
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
465
- ne,
461
+ t.map((o, d) => /* @__PURE__ */ i(y.Fragment, { children: [
462
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => m(o), children: [
463
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
464
+ oe,
466
465
  {
467
466
  alt: o?.name || "",
468
467
  institutionGuid: o?.institution_guid || ""
@@ -471,19 +470,19 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
471
470
  /* @__PURE__ */ e(
472
471
  w,
473
472
  {
474
- primary: we(o, {
475
- allowNickname: g?.show_account_nicknames_in_master
473
+ primary: De(o, {
474
+ allowNickname: h?.show_account_nicknames_in_master
476
475
  }),
477
476
  secondary: x(o.balance || 0, "0,0.00")
478
477
  }
479
478
  ),
480
- /* @__PURE__ */ e(at, { checked: l.some((m) => m.guid === o.guid) })
479
+ /* @__PURE__ */ e(rt, { checked: g.some((l) => l.guid === o.guid) })
481
480
  ] }) }),
482
- /* @__PURE__ */ e(E, { variant: c < t.length - 1 ? "inset" : "fullWidth" })
481
+ /* @__PURE__ */ e(E, { variant: d < t.length - 1 ? "inset" : "fullWidth" })
483
482
  ] }, o.guid))
484
483
  ] }),
485
484
  /* @__PURE__ */ e(
486
- Ae,
485
+ Te,
487
486
  {
488
487
  description: a.connect_description,
489
488
  label: a.connect_button,
@@ -493,58 +492,58 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
493
492
  ]
494
493
  }
495
494
  );
496
- }, kt = ({ onClose: t }) => {
497
- const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ie(), { visibleDebtAccounts: g } = V(), [l, h] = y.useState(!1), d = Ve(n), o = (m, b, T) => {
498
- T === u.DEBT_TRACK ? h(!0) : a({
495
+ }, wt = ({ onClose: t }) => {
496
+ const { goals: n } = C(), { addGoal: s, debtGoals: c, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ge(), { visibleDebtAccounts: h } = j(), [g, r] = y.useState(!1), m = Ve(n), o = (l, f, T) => {
497
+ T === u.DEBT_TRACK ? r(!0) : a({
499
498
  amount: 0,
500
499
  current_amount: 0,
501
- goal_type: me.SAVE_AMOUNT,
500
+ goal_type: ue.SAVE_AMOUNT,
502
501
  initial_amount: 0,
503
- meta_type: b,
504
- name: m,
502
+ meta_type: f,
503
+ name: l,
505
504
  track_type: T
506
505
  });
507
- }, c = async (m) => {
508
- for (const b of m) {
509
- let T = J.CREDIT_CARD;
510
- b.account_type === ye.LOAN ? T = J.LOANS : b.account_type === ye.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await i({
511
- account_guid: b.guid,
506
+ }, d = async (l) => {
507
+ for (const f of l) {
508
+ let T = q.CREDIT_CARD;
509
+ f.account_type === Ae.LOAN ? T = q.LOANS : f.account_type === Ae.LINE_OF_CREDIT && (T = q.LINE_OF_CREDIT), await s({
510
+ account_guid: f.guid,
512
511
  amount: 0,
513
512
  current_amount: 0,
514
- goal_type: me.KEEP_BALANCE_BELOW,
515
- initial_amount: b.balance || 0,
516
- interest_rate: b.interest_rate || 0,
513
+ goal_type: ue.KEEP_BALANCE_BELOW,
514
+ initial_amount: f.balance || 0,
515
+ interest_rate: f.interest_rate || 0,
517
516
  meta_type: T,
518
- monthly_payment: b.minimum_payment || 0,
519
- name: we(b, {
517
+ monthly_payment: f.minimum_payment || 0,
518
+ name: De(f, {
520
519
  allowNickname: _?.show_account_nicknames_in_master
521
520
  }),
522
521
  track_type: u.DEBT_TRACK
523
522
  }), p(n.alert_goal_added);
524
523
  }
525
- h(!1), t?.(u.DEBT_TRACK);
524
+ r(!1), t?.(u.DEBT_TRACK);
526
525
  };
527
- return /* @__PURE__ */ r(f, { children: [
528
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: d.map((m, b) => /* @__PURE__ */ e(Nt, { goalType: m, onClick: o }, b)) }),
526
+ return /* @__PURE__ */ i(b, { children: [
527
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: m.map((l, f) => /* @__PURE__ */ e(kt, { goalType: l, onClick: o }, f)) }),
529
528
  /* @__PURE__ */ e(
530
529
  Be,
531
530
  {
532
- accounts: g.filter((m) => !s.find((b) => b.account_guid === m.guid)),
533
- isOpen: l,
534
- onClose: () => h(!1),
535
- onSave: c,
531
+ accounts: h.filter((l) => !c.find((f) => f.account_guid === l.guid)),
532
+ isOpen: g,
533
+ onClose: () => r(!1),
534
+ onSave: d,
536
535
  title: n.select_debt_accounts_title
537
536
  }
538
537
  )
539
538
  ] });
540
539
  }, Oe = ({ account: t }) => {
541
- const { accounts: n } = C(), i = lt(t), { setSelectedAccount: s } = rt(), [p, a] = y.useState(!1);
542
- return /* @__PURE__ */ r(N, { sx: { bgcolor: "background.paper" }, children: [
543
- /* @__PURE__ */ r(k, { onClick: () => {
544
- s(t), a(!0);
540
+ const { accounts: n } = C(), s = ct(t), { setSelectedAccount: c } = it(), [p, a] = y.useState(!1);
541
+ return /* @__PURE__ */ i(N, { sx: { bgcolor: "background.paper" }, children: [
542
+ /* @__PURE__ */ i(k, { onClick: () => {
543
+ c(t), a(!0);
545
544
  }, children: [
546
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
547
- ne,
545
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
546
+ oe,
548
547
  {
549
548
  alt: t.name || "",
550
549
  institutionGuid: t.institution_guid || ""
@@ -553,65 +552,65 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
553
552
  /* @__PURE__ */ e(
554
553
  w,
555
554
  {
556
- primary: i,
555
+ primary: s,
557
556
  secondary: x(t.balance || 0, "0,0.00")
558
557
  }
559
558
  ),
560
559
  /* @__PURE__ */ e(M, {})
561
560
  ] }),
562
- /* @__PURE__ */ e(j, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ r(f, { children: [
563
- /* @__PURE__ */ e(it, {}),
564
- /* @__PURE__ */ e(st, {})
561
+ /* @__PURE__ */ e(F, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ i(b, { children: [
562
+ /* @__PURE__ */ e(st, {}),
563
+ /* @__PURE__ */ e(lt, {})
565
564
  ] }) })
566
565
  ] });
567
- }, wt = D(({ goal: t }) => {
568
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, d = async () => {
569
- const c = { ...t, amount: a };
570
- t.amount = a, g ? s(c) : (await p(c), i(n.alert_goal_updated_amount));
566
+ }, Dt = D(({ goal: t }) => {
567
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.amount), h = !t.guid, g = a < 0 || a > 9999999999e-2, r = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, m = async () => {
568
+ const d = { ...t, amount: a };
569
+ t.amount = a, h ? c(d) : (await p(d), s(n.alert_goal_updated_amount));
571
570
  }, o = () => {
572
571
  setTimeout(() => {
573
572
  _(t.amount);
574
573
  }, 250);
575
574
  };
576
575
  return /* @__PURE__ */ e(
577
- ee,
576
+ Q,
578
577
  {
579
- isDisabled: h,
580
- isSaveDisabled: l,
578
+ isDisabled: r,
579
+ isSaveDisabled: g,
581
580
  label: n.details_amount_to_save,
582
581
  onCancel: o,
583
- onSave: d,
582
+ onSave: m,
584
583
  primaryText: n.details_amount_to_save,
585
584
  secondaryText: x(t.amount, "0,0"),
586
- zeroStateText: g && t.amount === 0 ? n.add_amount : void 0,
585
+ zeroStateText: h && t.amount === 0 ? n.add_amount : void 0,
587
586
  children: /* @__PURE__ */ e(
588
- ke,
587
+ we,
589
588
  {
590
589
  amount: a,
591
590
  autoFocus: !0,
592
- error: l,
591
+ error: g,
593
592
  fullWidth: !0,
594
593
  minAmount: 0,
595
- setAmount: (c) => _(isNaN(Number(c)) ? a : Number(c)),
594
+ setAmount: (d) => _(isNaN(Number(d)) ? a : Number(d)),
596
595
  sx: { ".MuiTypography-Body": { p: 0 } }
597
596
  }
598
597
  )
599
598
  }
600
599
  );
601
- }), Dt = ({ goal: t }) => {
602
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h, d] = y.useState(!1), o = async ({ balance: c, guid: m }) => {
603
- const b = { ...t, account_guid: m, current_amount: c || 0 };
604
- l ? _(b) : (await g(b), a(p.alert_account_changed)), d(!1);
600
+ }), Kt = ({ goal: t }) => {
601
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = j(), { accounts: c, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: h } = I(), g = !t.guid, [r, m] = y.useState(!1), o = async ({ balance: d, guid: l }) => {
602
+ const f = { ...t, account_guid: l, current_amount: d || 0 };
603
+ g ? _(f) : (await h(f), a(p.alert_account_changed)), m(!1);
605
604
  };
606
- return /* @__PURE__ */ r(f, { children: [
607
- l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => d(!0), children: [
608
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
609
- /* @__PURE__ */ e(ve, { filled: !0 }),
605
+ return /* @__PURE__ */ i(b, { children: [
606
+ g && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => m(!0), children: [
607
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
608
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
610
609
  p.details_add_account
611
610
  ] }) }),
612
611
  /* @__PURE__ */ e(M, { color: "primary" })
613
- ] }) }) : /* @__PURE__ */ r(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
614
- /* @__PURE__ */ e(pe, { onClick: () => d(!0), variant: "text", children: p.details_change_account }),
612
+ ] }) }) : /* @__PURE__ */ i(b, { sx: { gap: 8, my: 24, mx: 24 }, children: [
613
+ /* @__PURE__ */ e(he, { onClick: () => m(!0), variant: "text", children: p.details_change_account }),
615
614
  /* @__PURE__ */ e(
616
615
  A,
617
616
  {
@@ -622,45 +621,45 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
622
621
  }
623
622
  )
624
623
  ] }),
625
- /* @__PURE__ */ e(j, { isOpen: h, onClose: () => d(!1), title: p.details_change_account, children: /* @__PURE__ */ r(f, { children: [
626
- n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[1] }),
627
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
628
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
629
- ne,
624
+ /* @__PURE__ */ e(F, { isOpen: r, onClose: () => m(!1), title: p.details_change_account, children: /* @__PURE__ */ i(b, { children: [
625
+ n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
626
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
627
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
628
+ oe,
630
629
  {
631
- alt: c?.name || "",
632
- institutionGuid: c?.institution_guid || ""
630
+ alt: d?.name || "",
631
+ institutionGuid: d?.institution_guid || ""
633
632
  }
634
633
  ) }),
635
634
  /* @__PURE__ */ e(
636
635
  w,
637
636
  {
638
- primary: c?.name || c?.feed_name,
639
- secondary: x(c?.balance || 0, "0,0.00")
637
+ primary: d?.name || d?.feed_name,
638
+ secondary: x(d?.balance || 0, "0,0.00")
640
639
  }
641
640
  ),
642
641
  /* @__PURE__ */ e(M, {})
643
- ] }) }, c.guid)) }),
644
- i.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[2] }),
645
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: i.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
646
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
647
- ne,
642
+ ] }) }, d.guid)) }),
643
+ s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
644
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: s.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
645
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
646
+ oe,
648
647
  {
649
- alt: c?.name || "",
650
- institutionGuid: c?.institution_guid || ""
648
+ alt: d?.name || "",
649
+ institutionGuid: d?.institution_guid || ""
651
650
  }
652
651
  ) }),
653
652
  /* @__PURE__ */ e(
654
653
  w,
655
654
  {
656
- primary: c?.name || c?.feed_name,
657
- secondary: x(c?.balance || 0, "0,0.00")
655
+ primary: d?.name || d?.feed_name,
656
+ secondary: x(d?.balance || 0, "0,0.00")
658
657
  }
659
658
  ),
660
659
  /* @__PURE__ */ e(M, {})
661
- ] }) }, c.guid)) }),
660
+ ] }) }, d.guid)) }),
662
661
  /* @__PURE__ */ e(
663
- Ae,
662
+ Te,
664
663
  {
665
664
  description: p.connect_description,
666
665
  label: p.connect_button,
@@ -669,27 +668,27 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
669
668
  )
670
669
  ] }) })
671
670
  ] });
672
- }, Kt = D(({ goal: t }) => {
673
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, h = async () => {
671
+ }, Mt = D(({ goal: t }) => {
672
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.name), h = !t.guid, g = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, r = async () => {
674
673
  const o = { ...t, name: a };
675
- t.name = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_name));
676
- }, d = () => {
674
+ t.name = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_name));
675
+ }, m = () => {
677
676
  setTimeout(() => {
678
677
  _(t.name);
679
678
  }, 250);
680
679
  };
681
680
  return /* @__PURE__ */ e(
682
- ee,
681
+ Q,
683
682
  {
684
- isDisabled: l,
683
+ isDisabled: g,
685
684
  isSaveDisabled: !a,
686
685
  label: n.details_goal_name,
687
- onCancel: d,
688
- onSave: h,
686
+ onCancel: m,
687
+ onSave: r,
689
688
  primaryText: n.details_goal_name,
690
689
  secondaryText: t.name,
691
690
  children: /* @__PURE__ */ e(
692
- De,
691
+ Ke,
693
692
  {
694
693
  error: !a,
695
694
  fullWidth: !0,
@@ -700,32 +699,32 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
700
699
  )
701
700
  }
702
701
  );
703
- }), Mt = ({ goal: t }) => {
704
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), g = !t.guid, l = async () => {
702
+ }), Lt = ({ goal: t }) => {
703
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), h = !t.guid, g = async () => {
705
704
  if (!isNaN(a)) {
706
705
  const o = { ...t, retirement_age: a };
707
- t.retirement_age = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_retirement_age));
706
+ t.retirement_age = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_retirement_age));
708
707
  }
709
- }, h = () => {
708
+ }, r = () => {
710
709
  setTimeout(() => {
711
710
  _(t.retirement_age || 65);
712
711
  }, 250);
713
- }, d = !a || isNaN(a) || a < 20 || a >= 100;
712
+ }, m = !a || isNaN(a) || a < 20 || a >= 100;
714
713
  return /* @__PURE__ */ e(
715
- ee,
714
+ Q,
716
715
  {
717
716
  isDisabled: t.is_complete,
718
- isSaveDisabled: d,
717
+ isSaveDisabled: m,
719
718
  label: n.details_retirement_age,
720
- onCancel: h,
721
- onSave: l,
719
+ onCancel: r,
720
+ onSave: g,
722
721
  primaryText: n.details_retirement_age,
723
722
  secondaryText: `${t.retirement_age}`,
724
- zeroStateText: g && !t.retirement_age ? n.add_age : void 0,
723
+ zeroStateText: h && !t.retirement_age ? n.add_age : void 0,
725
724
  children: /* @__PURE__ */ e(
726
- De,
725
+ Ke,
727
726
  {
728
- error: d,
727
+ error: m,
729
728
  fullWidth: !0,
730
729
  label: n.details_retirement_age,
731
730
  onChange: (o) => _(Number(o.target.value)),
@@ -734,68 +733,68 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
734
733
  )
735
734
  }
736
735
  );
737
- }, Lt = D(({ goal: t }) => {
738
- const { goals: n } = C(), { user: i, updateUser: s } = Ge(), { setAlert: p } = I(), [a, _] = y.useState(Q(i.birthday ?? 0)), [g, l] = y.useState(null), h = t.is_complete, d = async () => {
739
- a && _t(a) && (await s({ ...i, birthday: ut(a) }), p(n.alert_goal_updated_birthday));
736
+ }, Bt = D(({ goal: t }) => {
737
+ const { goals: n } = C(), { user: s, updateUser: c } = Ne(), { setAlert: p } = I(), [a, _] = y.useState(J(s.birthday ?? 0)), [h, g] = y.useState(null), r = t.is_complete, m = async () => {
738
+ a && pt(a) && (await c({ ...s, birthday: _t(a) }), p(n.alert_goal_updated_birthday));
740
739
  };
741
740
  return /* @__PURE__ */ e(
742
- ee,
741
+ Q,
743
742
  {
744
- isDisabled: h,
745
- isSaveDisabled: !!g,
743
+ isDisabled: r,
744
+ isSaveDisabled: !!h,
746
745
  label: n.details_birthday,
747
- onSave: d,
746
+ onSave: m,
748
747
  primaryText: n.details_birthday,
749
- secondaryText: `${ae(Q(i.birthday ?? 0), re.MONTH_DAY_YEAR)}`,
750
- zeroStateText: !t.guid && !i.birthday ? n.add_birthday : void 0,
751
- children: /* @__PURE__ */ e(gt, { dateAdapter: pt, children: /* @__PURE__ */ e(
752
- ht,
748
+ secondaryText: `${re(J(s.birthday ?? 0), ie.MONTH_DAY_YEAR)}`,
749
+ zeroStateText: !t.guid && !s.birthday ? n.add_birthday : void 0,
750
+ children: /* @__PURE__ */ e(bt, { dateAdapter: ht, children: /* @__PURE__ */ e(
751
+ gt,
753
752
  {
754
753
  label: n.details_birthday,
755
754
  onChange: _,
756
- onError: (o) => l(o),
755
+ onError: (o) => g(o),
757
756
  sx: { width: "100%" },
758
757
  value: a
759
758
  }
760
759
  ) })
761
760
  }
762
761
  );
763
- }), Bt = ({ goal: t }) => {
764
- const { goals: n } = C(), { visibleRetirementAccounts: i } = V(), {
765
- addRetirementGoalAccount: s,
762
+ }), Ot = ({ goal: t }) => {
763
+ const { goals: n } = C(), { visibleRetirementAccounts: s } = j(), {
764
+ addRetirementGoalAccount: c,
766
765
  newRetirementGoalAccounts: p,
767
766
  retirementGoalAccounts: a,
768
767
  selectedGoal: _,
769
- setAlert: g,
770
- setNewRetirementGoalAccounts: l,
771
- setSelectedGoal: h
772
- } = I(), [d, o] = y.useState(!1), c = !t.guid, m = i.filter(
773
- (S) => c ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
774
- ), b = i.filter(
768
+ setAlert: h,
769
+ setNewRetirementGoalAccounts: g,
770
+ setSelectedGoal: r
771
+ } = I(), [m, o] = y.useState(!1), d = !t.guid, l = s.filter(
772
+ (S) => d ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
773
+ ), f = s.filter(
775
774
  (S) => !a.find((R) => R.account_guid === S.guid)
776
775
  ), T = async (S) => {
777
776
  const R = S.map((v) => ({
778
777
  account_guid: v.guid,
779
778
  retirement_goal_guid: t.guid
780
779
  }));
781
- if (c)
782
- l(R);
780
+ if (d)
781
+ g(R);
783
782
  else
784
783
  for (const v of R)
785
- await s(v), g(n.alert_account_added);
786
- h({
784
+ await c(v), h(n.alert_account_added);
785
+ r({
787
786
  ..._,
788
- current_amount: S.reduce((v, F) => v + (F.balance || 0), 0)
787
+ current_amount: S.reduce((v, K) => v + (K.balance || 0), 0)
789
788
  }), o(!1);
790
789
  };
791
- return /* @__PURE__ */ r(f, { children: [
792
- m.map((S) => /* @__PURE__ */ r(f, { children: [
790
+ return /* @__PURE__ */ i(b, { children: [
791
+ l.map((S) => /* @__PURE__ */ i(b, { children: [
793
792
  /* @__PURE__ */ e(Oe, { account: S }),
794
793
  /* @__PURE__ */ e(E, {})
795
794
  ] }, S.guid)),
796
- /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => o(!0), children: [
797
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
798
- /* @__PURE__ */ e(ve, { filled: !0 }),
795
+ /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
796
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
797
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
799
798
  n.details_add_account
800
799
  ] }) }),
801
800
  /* @__PURE__ */ e(M, { color: "primary" })
@@ -803,216 +802,213 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
803
802
  /* @__PURE__ */ e(
804
803
  Be,
805
804
  {
806
- accounts: b,
807
- isOpen: d,
805
+ accounts: f,
806
+ isOpen: m,
808
807
  onClose: () => o(!1),
809
808
  onSave: T,
810
809
  title: n.add_select_accounts
811
810
  }
812
811
  )
813
812
  ] });
814
- }, Ot = D(({ goal: t }) => {
815
- const { goals: n } = C(), { visibleAccounts: i } = V(), s = y.useMemo(
816
- () => i.find((_) => _.guid === t.account_guid),
817
- [i, t]
813
+ }, Wt = D(({ goal: t }) => {
814
+ const { goals: n } = C(), { visibleAccounts: s } = j(), c = y.useMemo(
815
+ () => s.find((_) => _.guid === t.account_guid),
816
+ [s, t]
818
817
  ), p = t.track_type;
819
818
  let a = n.details_save_title;
820
- return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ r(f, { children: [
821
- /* @__PURE__ */ r(f, { mx: 24, children: [
819
+ return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(b, { children: [
820
+ /* @__PURE__ */ i(b, { mx: 24, children: [
822
821
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
823
822
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
824
823
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
825
824
  ] }),
826
- /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
827
- /* @__PURE__ */ e(Kt, { goal: t }),
825
+ /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
826
+ /* @__PURE__ */ e(Mt, { goal: t }),
828
827
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
829
- (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ r(U, { children: [
830
- /* @__PURE__ */ e(wt, { goal: t }),
828
+ (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
829
+ /* @__PURE__ */ e(Dt, { goal: t }),
831
830
  /* @__PURE__ */ e(E, { sx: { ml: p === u.RETIREMENT_TRACK ? 24 : 0 } })
832
831
  ] }),
833
- t.track_type === u.DEBT_TRACK && /* @__PURE__ */ r(U, { children: [
834
- /* @__PURE__ */ e(ct, { goal: t }),
835
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
832
+ t.track_type === u.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
836
833
  /* @__PURE__ */ e(dt, { goal: t }),
837
834
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
838
835
  /* @__PURE__ */ e(mt, { goal: t }),
836
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
837
+ /* @__PURE__ */ e(ut, { goal: t }),
839
838
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
840
839
  ] }),
841
- t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
842
- /* @__PURE__ */ e(Mt, { goal: t }),
843
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
840
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
844
841
  /* @__PURE__ */ e(Lt, { goal: t }),
842
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
843
+ /* @__PURE__ */ e(Bt, { goal: t }),
845
844
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
846
845
  ] })
847
846
  ] }),
848
847
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === u.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
849
- t.track_type !== u.RETIREMENT_TRACK && s && /* @__PURE__ */ r(U, { children: [
850
- /* @__PURE__ */ e(Oe, { account: s }),
848
+ t.track_type !== u.RETIREMENT_TRACK && c && /* @__PURE__ */ i(U, { children: [
849
+ /* @__PURE__ */ e(Oe, { account: c }),
851
850
  /* @__PURE__ */ e(E, {})
852
851
  ] }),
853
- t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
854
- /* @__PURE__ */ e(Bt, { goal: t }),
852
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
853
+ /* @__PURE__ */ e(Ot, { goal: t }),
855
854
  /* @__PURE__ */ e(E, {})
856
855
  ] }),
857
- t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Dt, { goal: t })
856
+ t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Kt, { goal: t })
858
857
  ] });
859
- }), Wt = D(({ onClose: t }) => {
860
- const { visibleRetirementAccounts: n } = V(), { goals: i, common: s } = C(), {
858
+ }), Pt = D(({ onClose: t }) => {
859
+ const { visibleRetirementAccounts: n } = j(), { goals: s, common: c } = C(), {
861
860
  addGoal: p,
862
861
  addRetirementGoal: a,
863
862
  deleteGoal: _,
864
- deleteRetirementGoal: g,
865
- newRetirementGoalAccounts: l,
866
- retirementGoalAccounts: h,
867
- selectedGoal: d,
863
+ deleteRetirementGoal: h,
864
+ newRetirementGoalAccounts: g,
865
+ retirementGoalAccounts: r,
866
+ selectedGoal: m,
868
867
  setAlert: o,
869
- setSelectedGoal: c,
870
- updateGoal: m
871
- } = I(), { user: b } = Ge(), [T, S] = y.useState(!1), R = !d?.guid, v = d?.track_type === u.SAVINGS_TRACK && d.is_complete && !d.has_been_spent, F = y.useMemo(() => {
872
- const G = R ? l : h;
873
- return n.filter(($) => G.some((K) => K.account_guid === $.guid));
874
- }, [R, n, l, h]), Z = y.useMemo(() => {
875
- if (!d) return !1;
868
+ setSelectedGoal: d,
869
+ updateGoal: l
870
+ } = I(), { user: f } = Ne(), [T, S] = y.useState(!1), R = !m?.guid, v = m?.track_type === u.SAVINGS_TRACK && m.is_complete && !m.has_been_spent, K = y.useMemo(() => {
871
+ const G = R ? g : r;
872
+ return n.filter((H) => G.some(($) => $.account_guid === H.guid));
873
+ }, [R, n, g, r]), se = y.useMemo(() => {
874
+ if (!m) return !1;
876
875
  if (!R && !v) return !0;
877
- const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } = d;
878
- return $ === u.SAVINGS_TRACK ? G ? !!K && !!q : !1 : $ === u.RETIREMENT_TRACK ? F.length ? !!K && !!q && !!O && !!b.birthday : !1 : !0;
879
- }, [d, F, b.birthday]);
880
- let z = s.delete_button, H = () => S(!0);
881
- R ? (H = () => te(), z = s.save_button) : v && (H = () => se(), z = i.mark_as_complete_button);
882
- const te = async () => {
883
- if (d) {
884
- const G = d.track_type;
885
- G !== u.RETIREMENT_TRACK ? await p(d) : G === u.RETIREMENT_TRACK && await a({ ...d, target_amount: d.amount }), o(i.alert_goal_added), c(void 0), G && t?.(G);
876
+ const { account_guid: G, track_type: H, name: $, amount: O, retirement_age: ne } = m;
877
+ return H === u.SAVINGS_TRACK ? G ? !!$ && !!O : !1 : H === u.RETIREMENT_TRACK ? K.length ? !!$ && !!O && !!ne && !!f.birthday : !1 : !0;
878
+ }, [m, K, f.birthday]);
879
+ let W = c.delete_button, z = () => S(!0);
880
+ R ? (z = () => ee(), W = c.save_button) : v && (z = () => le(), W = s.mark_as_complete_button);
881
+ const ee = async () => {
882
+ if (m) {
883
+ const G = m.track_type;
884
+ G !== u.RETIREMENT_TRACK ? await p(m) : G === u.RETIREMENT_TRACK && await a({ ...m, target_amount: m.amount }), o(s.alert_goal_added), d(void 0), G && t?.(G);
886
885
  }
887
- }, ie = async () => {
888
- d && (d.track_type !== u.RETIREMENT_TRACK ? await _(d.guid) : d.track_type === u.RETIREMENT_TRACK && await g(d), o(i.alert_goal_deleted), c(void 0));
889
- }, se = async () => {
886
+ }, te = async () => {
887
+ m && (m.track_type !== u.RETIREMENT_TRACK ? await _(m.guid) : m.track_type === u.RETIREMENT_TRACK && await h(m), o(s.alert_goal_deleted), d(void 0));
888
+ }, le = async () => {
890
889
  const G = {
891
- ...d,
890
+ ...m,
892
891
  has_been_spent: !0
893
892
  };
894
- await m(G), o(i.alert_goal_completed), c(void 0);
893
+ await l(G), o(s.alert_goal_completed), d(void 0);
895
894
  };
896
- return /* @__PURE__ */ r(f, { children: [
895
+ return /* @__PURE__ */ i(b, { children: [
897
896
  /* @__PURE__ */ e(
898
- j,
897
+ F,
899
898
  {
900
- ariaLabelClose: s.close_aria,
899
+ ariaLabelClose: c.close_aria,
901
900
  hasSecondaryAction: R,
902
- isOpen: !!d,
903
- isPrimaryDisabled: !Z,
904
- onClose: () => c(void 0),
905
- onPrimaryAction: H,
901
+ isOpen: !!m,
902
+ isPrimaryDisabled: !se,
903
+ onClose: () => d(void 0),
904
+ onPrimaryAction: z,
906
905
  primaryColor: R || v ? "primary" : "error",
907
- primaryText: z,
906
+ primaryText: W,
908
907
  secondaryColor: "primary",
909
- title: i.goal_details,
910
- children: d && /* @__PURE__ */ e(Ot, { goal: d })
908
+ title: s.goal_details,
909
+ children: m && /* @__PURE__ */ e(Wt, { goal: m })
911
910
  }
912
911
  ),
913
912
  /* @__PURE__ */ e(
914
- tt,
913
+ nt,
915
914
  {
916
- copy: { close_aria: s.close_aria, title: i.delete_goal },
915
+ copy: { close_aria: c.close_aria, title: s.delete_goal },
917
916
  isOpen: T,
918
917
  maxWidth: "xs",
919
918
  onClose: () => S(!1),
920
- onPrimaryAction: ie,
919
+ onPrimaryAction: te,
921
920
  primaryColor: "error",
922
- primaryText: s.delete_button,
923
- children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(i.delete_description, d?.name || "") })
921
+ primaryText: c.delete_button,
922
+ children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(s.delete_description, m?.name || "") })
924
923
  }
925
924
  )
926
925
  ] });
927
926
  }), Xn = D(({ onBackClick: t, sx: n }) => {
928
- const { onEvent: i } = Ne(), { isMobile: s } = ge(), { visibleAccounts: p } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: g } = he(), { goals: l, common: h } = C(), { alert: d, goals: o, goalsLoaded: c, loadGoals: m, monthlyCashFlowProfile: b, setAlert: T, retirmentGoals: S } = I(), [R, v] = y.useState(0), [F, Z] = y.useState(!1), z = b?.amount_allocated_for_savings_goals || 0, H = b?.amount_allocated_for_debt_goals || 0, te = b?.amount_allocated_for_retirement_goals || 0;
929
- Ke({
930
- widgetName: "GoalsWidget",
931
- isLoaded: c
932
- });
933
- const ie = a ? L(
934
- s ? l.tab_subtitle_mobile : l.tab_subtitle,
927
+ const { onEvent: s } = ke(), { onLoad: c } = Qe(), { isMobile: p } = be(), { visibleAccounts: a } = j(), { isCopyLoaded: _, isInitialized: h, setSelectedAccounts: g } = ge(), { goals: r, common: m } = C(), { alert: o, goals: d, goalsLoaded: l, loadGoals: f, monthlyCashFlowProfile: T, setAlert: S, retirmentGoals: R } = I(), [v, K] = y.useState(0), [se, W] = y.useState(!1), z = T?.amount_allocated_for_savings_goals || 0, ee = T?.amount_allocated_for_debt_goals || 0, te = T?.amount_allocated_for_retirement_goals || 0, le = _ ? L(
928
+ p ? r.tab_subtitle_mobile : r.tab_subtitle,
935
929
  x(z, "0,0")
936
- ) : "", se = a ? L(
937
- s ? l.tab_subtitle_mobile : l.tab_subtitle,
938
- x(H, "0,0")
939
- ) : "", G = a ? L(
940
- s ? l.tab_subtitle_mobile : l.tab_subtitle,
930
+ ) : "", G = _ ? L(
931
+ p ? r.tab_subtitle_mobile : r.tab_subtitle,
932
+ x(ee, "0,0")
933
+ ) : "", H = _ ? L(
934
+ p ? r.tab_subtitle_mobile : r.tab_subtitle,
941
935
  x(te, "0,0")
942
936
  ) : "";
943
937
  y.useEffect(() => {
944
- g(p), i(Y.GOALS_VIEW);
945
- }, [p]), y.useEffect(() => {
946
- _ && m().finally();
947
- }, [_, z, H, te]);
938
+ g(a), s(Y.GOALS_VIEW);
939
+ }, [a]), y.useEffect(() => {
940
+ h && f().finally(() => {
941
+ c?.("GoalsWidget");
942
+ });
943
+ }, [h, z, ee, te]);
948
944
  const $ = () => {
949
- i(Y.GOALS_CLICK_FILTER);
950
- }, K = () => {
951
- Z(!0), i(Y.GOALS_CLICK_ADD);
952
- }, q = (X) => {
953
- Z(!1), X === u.SAVINGS_TRACK ? v(0) : X === u.DEBT_TRACK ? v(1) : X === u.RETIREMENT_TRACK && v(2);
954
- }, O = y.useMemo(
955
- () => c && (o.length === 0 || o.every(({ track_type: X }) => !X) && S.length === 0),
956
- [o, c, S]
945
+ s(Y.GOALS_CLICK_FILTER);
946
+ }, O = () => {
947
+ W(!0), s(Y.GOALS_CLICK_ADD);
948
+ }, ne = (X) => {
949
+ W(!1), X === u.SAVINGS_TRACK ? K(0) : X === u.DEBT_TRACK ? K(1) : X === u.RETIREMENT_TRACK && K(2);
950
+ }, Z = y.useMemo(
951
+ () => l && (d.length === 0 || d.every(({ track_type: X }) => !X) && R.length === 0),
952
+ [d, l, R]
957
953
  );
958
- return !c || !a || !_ ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ r(
959
- bt,
954
+ return !l || !_ || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
955
+ ft,
960
956
  {
961
- accountOptions: p,
957
+ accountOptions: a,
962
958
  actions: [
963
959
  {
964
960
  iconName: "add",
965
- label: l.add_title,
966
- onClick: K
961
+ label: r.add_title,
962
+ onClick: O
967
963
  }
968
964
  ],
969
965
  onAccountsFilterClick: $,
970
966
  onBackClick: t,
971
967
  sx: n,
972
- title: l.title,
968
+ title: r.title,
973
969
  children: [
974
- /* @__PURE__ */ r(f, { mx: s ? 0 : 48, my: 24, children: [
975
- /* @__PURE__ */ r(
970
+ /* @__PURE__ */ i(b, { mx: p ? 0 : 48, my: 24, children: [
971
+ /* @__PURE__ */ i(
976
972
  ze,
977
973
  {
978
- onChange: (X, We) => v(We),
974
+ onChange: (X, We) => K(We),
979
975
  sx: { bgcolor: "background.paper" },
980
976
  textColor: "primary",
981
- value: O ? !1 : R,
977
+ value: Z ? !1 : v,
982
978
  variant: "fullWidth",
983
979
  children: [
984
980
  /* @__PURE__ */ e(
985
- le,
981
+ ce,
986
982
  {
987
- disabled: O,
988
- label: /* @__PURE__ */ e(ce, { subtitle: ie, title: l.tab_saving_title })
983
+ disabled: Z,
984
+ label: /* @__PURE__ */ e(de, { subtitle: le, title: r.tab_saving_title })
989
985
  }
990
986
  ),
991
987
  /* @__PURE__ */ e(
992
- le,
988
+ ce,
993
989
  {
994
- disabled: O,
995
- label: /* @__PURE__ */ e(ce, { subtitle: se, title: l.tab_debt_title })
990
+ disabled: Z,
991
+ label: /* @__PURE__ */ e(de, { subtitle: G, title: r.tab_debt_title })
996
992
  }
997
993
  ),
998
994
  /* @__PURE__ */ e(
999
- le,
995
+ ce,
1000
996
  {
1001
- disabled: O,
1002
- label: /* @__PURE__ */ e(ce, { subtitle: G, title: l.tab_retirement_title })
997
+ disabled: Z,
998
+ label: /* @__PURE__ */ e(de, { subtitle: H, title: r.tab_retirement_title })
1003
999
  }
1004
1000
  )
1005
1001
  ]
1006
1002
  }
1007
1003
  ),
1008
- O ? /* @__PURE__ */ e(
1009
- ft,
1004
+ Z ? /* @__PURE__ */ e(
1005
+ yt,
1010
1006
  {
1011
- header: l.create_goals_header,
1007
+ header: r.create_goals_header,
1012
1008
  icon: "trophy",
1013
- onClick: K,
1014
- primaryButton: l.add_goals_button,
1015
- subText: l.empty_state_subheader,
1009
+ onClick: O,
1010
+ primaryButton: r.add_goals_button,
1011
+ subText: r.empty_state_subheader,
1016
1012
  sx: {
1017
1013
  width: { sm: 432 },
1018
1014
  ".buttons-footer": {
@@ -1020,67 +1016,67 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1020
1016
  }
1021
1017
  }
1022
1018
  }
1023
- ) : /* @__PURE__ */ r(U, { children: [
1024
- R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.SAVINGS_TRACK }),
1025
- R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.DEBT_TRACK }),
1026
- R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.RETIREMENT_TRACK })
1019
+ ) : /* @__PURE__ */ i(U, { children: [
1020
+ v === 0 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.SAVINGS_TRACK }),
1021
+ v === 1 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.DEBT_TRACK }),
1022
+ v === 2 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.RETIREMENT_TRACK })
1027
1023
  ] })
1028
1024
  ] }),
1029
- /* @__PURE__ */ e(Wt, { onClose: q }),
1025
+ /* @__PURE__ */ e(Pt, { onClose: ne }),
1030
1026
  /* @__PURE__ */ e(
1031
- j,
1027
+ F,
1032
1028
  {
1033
- ariaLabelClose: h.close_aria,
1034
- isOpen: F,
1035
- onClose: () => Z(!1),
1036
- title: l.add_goal_title,
1037
- children: /* @__PURE__ */ e(kt, { onClose: q })
1029
+ ariaLabelClose: m.close_aria,
1030
+ isOpen: se,
1031
+ onClose: () => W(!1),
1032
+ title: r.add_goal_title,
1033
+ children: /* @__PURE__ */ e(wt, { onClose: ne })
1038
1034
  }
1039
1035
  ),
1040
- /* @__PURE__ */ e(Fe, { onClose: () => T(""), open: !!d, children: /* @__PURE__ */ e(je, { onClose: () => T(""), severity: "success", variant: "filled", children: d }) })
1036
+ /* @__PURE__ */ e(Fe, { onClose: () => S(""), open: !!o, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: o }) })
1041
1037
  ]
1042
1038
  }
1043
1039
  );
1044
- }), Pt = D(({ goal: t }) => {
1045
- const { goals: n } = C(), i = Tt(), {
1046
- backgroundColor: s,
1040
+ }), Vt = D(({ goal: t }) => {
1041
+ const { goals: n } = C(), s = Ct(), {
1042
+ backgroundColor: c,
1047
1043
  color: p,
1048
1044
  percentage: a,
1049
1045
  projectedText: _
1050
- } = ue(n, t), g = Math.round(a * 100);
1051
- let l = /* @__PURE__ */ e(Re, {});
1052
- return t.track_type === u.DEBT_TRACK ? l = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1053
- /* @__PURE__ */ e(oe, { sx: { bgcolor: s, color: p, height: 32, width: 32 }, variant: "rounded", children: l }),
1054
- /* @__PURE__ */ r(At, { sx: { width: "100%" }, children: [
1055
- /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1046
+ } = _e(n, t), h = Math.round(a * 100);
1047
+ let g = /* @__PURE__ */ e(Ee, {});
1048
+ return t.track_type === u.DEBT_TRACK ? g = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (g = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1049
+ /* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: p, height: 32, width: 32 }, variant: "rounded", children: g }),
1050
+ /* @__PURE__ */ i(Tt, { sx: { width: "100%" }, children: [
1051
+ /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1056
1052
  t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
1057
1053
  ] }),
1058
1054
  /* @__PURE__ */ e(
1059
- Ct,
1055
+ St,
1060
1056
  {
1061
- backgroundStrokeColor: i.palette.border.lighter,
1062
- color: i.palette.primary.main,
1063
- percent: g,
1057
+ backgroundStrokeColor: s.palette.border.lighter,
1058
+ color: s.palette.primary.main,
1059
+ percent: h,
1064
1060
  size: 40,
1065
1061
  strokeWidth: 3,
1066
- children: /* @__PURE__ */ e(W, { fontWeight: 700, variant: "caption", children: `${g}%` })
1062
+ children: /* @__PURE__ */ e(P, { fontWeight: 700, variant: "caption", children: `${h}%` })
1067
1063
  }
1068
1064
  )
1069
1065
  ] });
1070
- }), Vt = ({ header: t, subText: n, sx: i }) => /* @__PURE__ */ r(
1071
- f,
1066
+ }), jt = ({ header: t, subText: n, sx: s }) => /* @__PURE__ */ i(
1067
+ b,
1072
1068
  {
1073
1069
  sx: {
1074
1070
  alignItems: "center",
1075
1071
  alignSelf: "center",
1076
1072
  px: 24,
1077
- ...i
1073
+ ...s
1078
1074
  },
1079
1075
  children: [
1080
1076
  /* @__PURE__ */ e(Je, { size: 32 }),
1081
- /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, children: t }),
1077
+ /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, children: t }),
1082
1078
  /* @__PURE__ */ e(
1083
- W,
1079
+ P,
1084
1080
  {
1085
1081
  color: "text.secondary",
1086
1082
  sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
@@ -1091,42 +1087,39 @@ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1091
1087
  ]
1092
1088
  }
1093
1089
  ), Un = D(({ onCTAClick: t }) => {
1094
- const { visibleAccounts: n } = V(), { onEvent: i } = Ne(), { goals: s } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = he(), { ongoingGoalsForMicroWidget: g, loadGoals: l, goalsLoaded: h } = I();
1095
- Ke({
1096
- widgetName: "GoalsMicroWidget",
1097
- isLoaded: h
1098
- }), y.useEffect(() => {
1090
+ const { visibleAccounts: n } = j(), { onEvent: s } = ke(), { goals: c } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = ge(), { ongoingGoalsForMicroWidget: h, loadGoals: g, goalsLoaded: r } = I();
1091
+ y.useEffect(() => {
1099
1092
  a(n);
1100
1093
  }, []), y.useEffect(() => {
1101
- p && (l().finally(), i(Y.GOALS_LOAD_WIDGET, {
1094
+ p && (g().finally(), s(Y.GOALS_LOAD_WIDGET, {
1102
1095
  state: n?.length ? "default" : "zeroState"
1103
1096
  }));
1104
1097
  }, [p]);
1105
- const d = y.useMemo(
1106
- () => h && g.length === 0,
1107
- [g, h]
1098
+ const m = y.useMemo(
1099
+ () => r && h.length === 0,
1100
+ [h, r]
1108
1101
  ), o = () => {
1109
- i(
1110
- d ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1102
+ s(
1103
+ m ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1111
1104
  ), t();
1112
1105
  };
1113
- return !h || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1114
- St,
1106
+ return !r || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1107
+ Rt,
1115
1108
  {
1116
1109
  className: "mx-goals-microwidget",
1117
- ctaLabel: d ? s.get_started : s.view_details,
1110
+ ctaLabel: m ? c.get_started : c.view_details,
1118
1111
  onCTAClick: o,
1119
- title: s.title,
1120
- children: d ? /* @__PURE__ */ e(
1121
- Vt,
1112
+ title: c.title,
1113
+ children: m ? /* @__PURE__ */ e(
1114
+ jt,
1122
1115
  {
1123
- header: s.create_goals_header,
1124
- subText: s.micro_zero_state_description
1116
+ header: c.create_goals_header,
1117
+ subText: c.micro_zero_state_description
1125
1118
  }
1126
- ) : /* @__PURE__ */ e(yt, { sx: { justifyContent: "space-between" }, children: g.map((c, m) => /* @__PURE__ */ r(y.Fragment, { children: [
1127
- /* @__PURE__ */ e(Pt, { goal: c }),
1128
- m !== g.length - 1 && /* @__PURE__ */ e(E, {})
1129
- ] }, c.guid)) })
1119
+ ) : /* @__PURE__ */ e(At, { sx: { justifyContent: "space-between" }, children: h.map((d, l) => /* @__PURE__ */ i(y.Fragment, { children: [
1120
+ /* @__PURE__ */ e(Vt, { goal: d }),
1121
+ l !== h.length - 1 && /* @__PURE__ */ e(E, {})
1122
+ ] }, d.guid)) })
1130
1123
  }
1131
1124
  );
1132
1125
  });