@mx-cartographer/experiences 7.13.21 → 7.13.22-alpha.al0

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