@mx-cartographer/experiences 8.0.19 → 8.0.21

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