@mx-cartographer/experiences 7.4.5-alpha.mega1 → 7.4.5-alpha.saba-1

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.
@@ -182,7 +182,7 @@ const K = () => {
182
182
  onPrimaryCtaClick: a,
183
183
  primaryCtaLabel: i.primary_cta,
184
184
  subTitle: c || !l ? void 0 : i.sub_title,
185
- sx: { height: "100%", ...t },
185
+ sx: t,
186
186
  title: i.title,
187
187
  children: [
188
188
  !l && /* @__PURE__ */ e(te, {}),
@@ -1,4 +1,4 @@
1
- import { g as _e, T as m, G as ue, a as Pe, M as q, C as Ae, b as Ve } from "../GoalStore-CrNhjvNc.mjs";
1
+ import { g as _e, T as u, G as ue, a as Pe, M as q, C as Te, b as Ve } from "../GoalStore-CrNhjvNc.mjs";
2
2
  import { c as qn, d as Jn } from "../GoalStore-CrNhjvNc.mjs";
3
3
  import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
4
4
  import y from "react";
@@ -10,15 +10,15 @@ import ce from "@mui/material/Tab";
10
10
  import ze from "@mui/material/Tabs";
11
11
  import { Text as A, H2 as pe, P, H3 as He, Icon as $e, InstitutionLogo as oe } from "@mxenabled/mxui";
12
12
  import he from "@mui/material/Button";
13
- import Te from "@mui/material/Card";
14
- import Ce from "@mui/material/CardActionArea";
15
- import Se from "@mui/material/CardContent";
16
- import be from "@mui/material/Unstable_Grid2";
13
+ import Ce from "@mui/material/Card";
14
+ import Se from "@mui/material/CardActionArea";
15
+ import Re from "@mui/material/CardContent";
16
+ import fe from "@mui/material/Unstable_Grid2";
17
17
  import ae from "@mui/material/Avatar";
18
18
  import Xe from "@mui/material/CardHeader";
19
- import { Payments as Re, NoteStack as Ee, Person as xe, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as ve, Trophy as Je } from "@mxenabled/mx-icons";
20
- import { u as C, l as I, a as Ie, d as j, p as Ge, g as Ne, n as Qe, b as ke } from "../hooks-C41HAxM5.mjs";
21
- import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
19
+ import { Payments as Ee, NoteStack as xe, Person as ve, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
20
+ import { u as C, l as I, b as ge, a as Ge, d as j, p as Ne, g as ke, n as Qe } from "../hooks-C41HAxM5.mjs";
21
+ import { u as be } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as x } from "../NumberFormatting-DjTD0t3W.mjs";
23
23
  import { S as et } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import E from "@mui/material/Divider";
@@ -34,7 +34,7 @@ import { D as F } from "../Drawer-BEtCk82g.mjs";
34
34
  import { b as L } from "../Localization-2MODESHW.mjs";
35
35
  import { f as re, a as ie, D as nt } from "../Dialog-BPTr3qHE.mjs";
36
36
  import V from "@mui/material/ListItemAvatar";
37
- import { g as De, A as ye } from "../ConnectDrawer-CuUj16NH.mjs";
37
+ import { g as De, A as Ae } from "../ConnectDrawer-CuUj16NH.mjs";
38
38
  import ot from "@mui/material/Collapse";
39
39
  import at from "@mui/material/ListItemIcon";
40
40
  import rt from "@mui/material/Checkbox";
@@ -67,54 +67,54 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
67
67
  "$1$2$3"
68
68
  ) : x(t, "0,0.00"), Le = D(
69
69
  ({ goal: t, isInDrawer: n = !1, onClick: s }) => {
70
- const { goals: l } = C(), { isMobile: p, isTablet: a } = ge(), u = p || a, {
70
+ const { goals: c } = C(), { isMobile: p, isTablet: a } = be(), _ = p || a, {
71
71
  backgroundColor: h,
72
72
  color: g,
73
73
  percentage: r,
74
- percentageText: o,
75
- projectedText: _
76
- } = _e(l, t), d = t.track_type === m.DEBT_TRACK ? t.initial_amount : t.amount, c = [
74
+ percentageText: m,
75
+ projectedText: o
76
+ } = _e(c, t), d = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, l = [
77
77
  {
78
78
  color: h,
79
79
  percentage: `${r}`
80
80
  }
81
81
  ];
82
- let f = /* @__PURE__ */ e(Re, {});
83
- return t.track_type === m.DEBT_TRACK ? f = /* @__PURE__ */ e(Ee, {}) : t.track_type === m.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ i(Ce, { disabled: !s, onClick: s, children: [
82
+ let f = /* @__PURE__ */ e(Ee, {});
83
+ return t.track_type === u.DEBT_TRACK ? f = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ i(Se, { disabled: !s, onClick: s, children: [
84
84
  /* @__PURE__ */ e(
85
85
  Xe,
86
86
  {
87
87
  avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: h, color: g, height: 48, width: 48 }, variant: "rounded", children: f }),
88
- subheader: /* @__PURE__ */ e(A, { variant: n || u ? "H3" : "H2", children: `${x(t.current_amount, u ? "0,0" : "0,0.00")} / ${Et(
88
+ subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Et(
89
89
  d,
90
- u
90
+ _
91
91
  )}` }),
92
92
  title: /* @__PURE__ */ e(pe, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
93
93
  }
94
94
  ),
95
- /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ i(b, { gap: 6, children: [
96
- /* @__PURE__ */ e(et, { data: c, height: 24 }),
95
+ /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ i(b, { gap: 6, children: [
96
+ /* @__PURE__ */ e(et, { data: l, height: 24 }),
97
97
  /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
98
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o }),
99
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
98
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: m }),
99
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o })
100
100
  ] })
101
101
  ] }) })
102
102
  ] }) });
103
103
  }
104
104
  ), xt = D(({ trackType: t }) => {
105
- const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
105
+ const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
106
  let r = 0;
107
- return t === m.SAVINGS_TRACK ? r = l?.amount_allocated_for_savings_goals || 0 : t === m.DEBT_TRACK ? r = l?.amount_allocated_for_debt_goals || 0 : t === m.RETIREMENT_TRACK && (r = l?.amount_allocated_for_retirement_goals || 0), r;
108
- }, [l]), [u, h] = y.useState(a), g = async () => {
109
- if (l) {
110
- const r = { ...l };
111
- t === m.SAVINGS_TRACK ? r.amount_allocated_for_savings_goals = u : t === m.DEBT_TRACK ? r.amount_allocated_for_debt_goals = u : t === m.RETIREMENT_TRACK && (r.amount_allocated_for_retirement_goals = u), await p(r), s(n.alert_contribution_updated);
107
+ return t === u.SAVINGS_TRACK ? r = c?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? r = c?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (r = c?.amount_allocated_for_retirement_goals || 0), r;
108
+ }, [c]), [_, h] = y.useState(a), g = async () => {
109
+ if (c) {
110
+ const r = { ...c };
111
+ t === u.SAVINGS_TRACK ? r.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? r.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (r.amount_allocated_for_retirement_goals = _), await p(r), s(n.alert_contribution_updated);
112
112
  }
113
113
  };
114
114
  return /* @__PURE__ */ e(b, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
115
115
  Q,
116
116
  {
117
- isSaveDisabled: !u || isNaN(u),
117
+ isSaveDisabled: !_ || isNaN(_),
118
118
  label: n.contribution_label,
119
119
  onCancel: () => h(a),
120
120
  onSave: g,
@@ -123,28 +123,28 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
123
123
  children: /* @__PURE__ */ e(
124
124
  we,
125
125
  {
126
- amount: u,
126
+ amount: _,
127
127
  autoFocus: !0,
128
- error: !u || isNaN(u),
128
+ error: !_ || isNaN(_),
129
129
  fullWidth: !0,
130
130
  minAmount: 0,
131
- setAmount: (r) => h(isNaN(Number(r)) ? u : Number(r)),
131
+ setAmount: (r) => h(isNaN(Number(r)) ? _ : Number(r)),
132
132
  sx: { ".MuiTypography-Body": { p: 0 } }
133
133
  }
134
134
  )
135
135
  }
136
136
  ) });
137
137
  }), vt = ({ goals: t }) => {
138
- const { goals: n, common: s } = C(), { reorderGoals: l, setAlert: p } = I(), [a, u] = y.useState(!1), [h, g] = y.useState(t.map((c) => ({ ...c })));
138
+ const { goals: n, common: s } = C(), { reorderGoals: c, setAlert: p } = I(), [a, _] = y.useState(!1), [h, g] = y.useState(t.map((l) => ({ ...l })));
139
139
  y.useEffect(() => {
140
- a && g(t.map((c) => ({ ...c })));
140
+ a && g(t.map((l) => ({ ...l })));
141
141
  }, [a]);
142
142
  const r = [
143
143
  {
144
144
  field: "name",
145
145
  flex: 1,
146
- renderCell: (c) => {
147
- const f = c.row;
146
+ renderCell: (l) => {
147
+ const f = l.row;
148
148
  return /* @__PURE__ */ i(b, { children: [
149
149
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: f.name }),
150
150
  /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
@@ -162,28 +162,28 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
162
162
  align: "right",
163
163
  field: "amount",
164
164
  minWidth: 140,
165
- renderCell: (c) => {
166
- const f = c.row;
165
+ renderCell: (l) => {
166
+ const f = l.row;
167
167
  return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(f.amount, "0,0.00") });
168
168
  },
169
169
  sortable: !1
170
170
  }
171
- ], o = h.map((c) => ({
172
- id: c.guid,
171
+ ], m = h.map((l) => ({
172
+ id: l.guid,
173
173
  isHovering: !1,
174
- __reorder__: c.name,
175
- ...c
176
- })), _ = ({ oldIndex: c, targetIndex: f }) => {
174
+ __reorder__: l.name,
175
+ ...l
176
+ })), o = ({ oldIndex: l, targetIndex: f }) => {
177
177
  const T = [...h];
178
- T.splice(f, 0, T.splice(c, 1)[0]);
178
+ T.splice(f, 0, T.splice(l, 1)[0]);
179
179
  for (let S = 0; S < T.length; S += 1)
180
180
  T[S].position = S + 1;
181
181
  g(T);
182
182
  }, d = async () => {
183
- await l(h), p(n.alert_goals_reordered), u(!1);
183
+ await c(h), p(n.alert_goals_reordered), _(!1);
184
184
  };
185
185
  return /* @__PURE__ */ i(b, { children: [
186
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => u(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
186
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
187
187
  b,
188
188
  {
189
189
  alignItems: "center",
@@ -201,7 +201,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
201
201
  {
202
202
  ariaLabelClose: s.close_aria,
203
203
  isOpen: a,
204
- onClose: () => u(!1),
204
+ onClose: () => _(!1),
205
205
  onPrimaryAction: d,
206
206
  title: n.reorder_goals_title,
207
207
  children: /* @__PURE__ */ i(b, { children: [
@@ -214,9 +214,9 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
214
214
  disableColumnFilter: !0,
215
215
  disableColumnMenu: !0,
216
216
  hideFooter: !0,
217
- onRowOrderChange: _,
217
+ onRowOrderChange: o,
218
218
  rowReordering: !0,
219
- rows: o,
219
+ rows: m,
220
220
  slots: {
221
221
  rowReorderIcon: () => /* @__PURE__ */ e(Ue, { sx: { ml: 12 } })
222
222
  //TODO: Add to mx-icons
@@ -233,9 +233,9 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
233
233
  )
234
234
  ] });
235
235
  }, It = ({ goal: t, index: n }) => {
236
- const { goals: s } = C(), { percentage: l } = _e(s, t), p = t.goal_type === ue.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : L(s.goal_percentage_reached, `${l * 100}`);
236
+ const { goals: s } = C(), { percentage: c } = _e(s, t), p = t.goal_type === ue.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : L(s.goal_percentage_reached, `${c * 100}`);
237
237
  return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
238
- t.track_type !== m.RETIREMENT_TRACK && /* @__PURE__ */ e(
238
+ t.track_type !== u.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
239
  V,
240
240
  {
241
241
  sx: {
@@ -280,13 +280,13 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
280
280
  ] }) })
281
281
  ] }) }, t.guid);
282
282
  }, Nt = ({ trackType: t }) => {
283
- const { goals: n, common: s } = C(), { orderedGoals: l } = I(), p = l.filter((c) => c.track_type === t), a = p.filter(
284
- (c) => c.track_type === m.SAVINGS_TRACK && !c.has_been_spent || c.track_type !== m.SAVINGS_TRACK && !c.is_complete
285
- ), u = p.filter(
286
- (c) => c.track_type === m.SAVINGS_TRACK && c.has_been_spent || c.track_type !== m.SAVINGS_TRACK && c.is_complete
283
+ const { goals: n, common: s } = C(), { orderedGoals: c } = I(), p = c.filter((l) => l.track_type === t), a = p.filter(
284
+ (l) => l.track_type === u.SAVINGS_TRACK && !l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && !l.is_complete
285
+ ), _ = p.filter(
286
+ (l) => l.track_type === u.SAVINGS_TRACK && l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && l.is_complete
287
287
  ), [h, g] = y.useState(!1);
288
- let r = n.manage_saving_goals, o = n.manage_saving_drawer_title, _ = n.manage_saving_title, d = n.manage_saving_description;
289
- return t === m.DEBT_TRACK ? (r = n.manage_debt_goals, o = n.manage_debt_drawer_title, _ = n.manage_debt_title, d = n.manage_debt_description) : t === m.RETIREMENT_TRACK && (r = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, _ = n.manage_retirement_title, d = n.manage_retirement_description), /* @__PURE__ */ i(b, { children: [
288
+ let r = n.manage_saving_goals, m = n.manage_saving_drawer_title, o = n.manage_saving_title, d = n.manage_saving_description;
289
+ return t === u.DEBT_TRACK ? (r = n.manage_debt_goals, m = n.manage_debt_drawer_title, o = n.manage_debt_title, d = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (r = n.manage_retirement_goals, m = n.manage_retirement_drawer_title, o = n.manage_retirement_title, d = n.manage_retirement_description), /* @__PURE__ */ i(b, { children: [
290
290
  /* @__PURE__ */ e(he, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => g(!0), children: r }),
291
291
  /* @__PURE__ */ e(
292
292
  F,
@@ -294,40 +294,40 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
294
294
  ariaLabelClose: s.close_aria,
295
295
  isOpen: h,
296
296
  onClose: () => g(!1),
297
- title: o,
297
+ title: m,
298
298
  children: /* @__PURE__ */ i(b, { children: [
299
299
  /* @__PURE__ */ i(b, { m: 24, children: [
300
- /* @__PURE__ */ e(He, { children: _ }),
300
+ /* @__PURE__ */ e(He, { children: o }),
301
301
  /* @__PURE__ */ e(P, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: d })
302
302
  ] }),
303
303
  /* @__PURE__ */ e(xt, { trackType: t }),
304
304
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
305
305
  /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
306
- a.map((c, f) => {
306
+ a.map((l, f) => {
307
307
  const T = f >= a.length - 1;
308
308
  return /* @__PURE__ */ i(b, { children: [
309
- /* @__PURE__ */ e(It, { goal: c, index: f }),
309
+ /* @__PURE__ */ e(It, { goal: l, index: f }),
310
310
  /* @__PURE__ */ e(
311
311
  E,
312
312
  {
313
- variant: T && t === m.RETIREMENT_TRACK ? "fullWidth" : "inset"
313
+ variant: T && t === u.RETIREMENT_TRACK ? "fullWidth" : "inset"
314
314
  }
315
315
  )
316
- ] }, `ongoing-${c.guid}`);
316
+ ] }, `ongoing-${l.guid}`);
317
317
  }),
318
- t !== m.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { children: [
318
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { children: [
319
319
  /* @__PURE__ */ e(vt, { goals: a }),
320
320
  /* @__PURE__ */ e(E, {})
321
321
  ] })
322
322
  ] }),
323
- t !== m.RETIREMENT_TRACK && u.length > 0 && /* @__PURE__ */ i(b, { children: [
323
+ t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ i(b, { children: [
324
324
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
325
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: u.map((c, f) => {
325
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((l, f) => {
326
326
  const T = f > a.length - 1;
327
327
  return /* @__PURE__ */ i(b, { children: [
328
- /* @__PURE__ */ e(Gt, { goal: c }),
328
+ /* @__PURE__ */ e(Gt, { goal: l }),
329
329
  /* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
330
- ] }, `complete-${c.guid}`);
330
+ ] }, `complete-${l.guid}`);
331
331
  }) })
332
332
  ] })
333
333
  ] })
@@ -335,19 +335,19 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
335
335
  )
336
336
  ] });
337
337
  }, me = D(({ trackType: t, onAddGoals: n }) => {
338
- const { isMobile: s } = ge(), { goals: l } = C(), { orderedGoals: p, setSelectedGoal: a } = I(), u = p.filter((o) => o.track_type === t), h = u.filter(
339
- (o) => o.track_type === m.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== m.SAVINGS_TRACK && !o.is_complete
340
- ), g = u.filter(
341
- (o) => o.track_type === m.SAVINGS_TRACK && o.has_been_spent || o.track_type !== m.SAVINGS_TRACK && o.is_complete
342
- ), r = t === m.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
338
+ const { isMobile: s } = be(), { goals: c } = C(), { selectedAccountGuids: p } = ge(), { orderedGoals: a, setSelectedGoal: _ } = I(), h = a.filter((o) => o.track_type === t && p.includes(o.account_guid)), g = h.filter(
339
+ (o) => o.track_type === u.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && !o.is_complete
340
+ ), r = h.filter(
341
+ (o) => o.track_type === u.SAVINGS_TRACK && o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && o.is_complete
342
+ ), m = t === u.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
343
343
  return /* @__PURE__ */ i(b, { mt: 16, mx: s ? 24 : 0, children: [
344
344
  /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
345
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: l.ongoing_title }),
345
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
346
346
  /* @__PURE__ */ e(Nt, { trackType: t })
347
347
  ] }),
348
- h.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: h.map((o, _, d) => (
348
+ g.length > 0 ? /* @__PURE__ */ e(fe, { container: !0, spacing: 24, children: g.map((o, d, l) => (
349
349
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
350
- /* @__PURE__ */ e(be, { xs: s || _ === 0 && d.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => a(o) }, o.guid) }, _)
350
+ /* @__PURE__ */ e(fe, { xs: s || d === 0 && l.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, d)
351
351
  )) }) : /* @__PURE__ */ i(
352
352
  b,
353
353
  {
@@ -369,16 +369,16 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
369
369
  width: { sm: 381 }
370
370
  }),
371
371
  variant: "Small",
372
- children: Pe(t, l)
372
+ children: Pe(t, c)
373
373
  }
374
374
  ),
375
- /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: l.add_goals_button })
375
+ /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
376
376
  ]
377
377
  }
378
378
  ),
379
- t !== m.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { gap: 16, mt: 48, children: [
380
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: l.complete_title }),
381
- g.length === 0 && /* @__PURE__ */ e(b, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
379
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { gap: 16, mt: 48, children: [
380
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.complete_title }),
381
+ r.length === 0 && /* @__PURE__ */ e(b, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
382
382
  P,
383
383
  {
384
384
  sx: (o) => ({
@@ -389,10 +389,10 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
389
389
  }
390
390
  }),
391
391
  variant: "Small",
392
- children: r
392
+ children: m
393
393
  }
394
394
  ) }),
395
- g.map((o) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => a(o), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
395
+ r.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Se, { onClick: () => _(o), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
396
396
  /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", gap: 6, children: [
397
397
  /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
398
398
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
@@ -402,27 +402,27 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
402
402
  ] })
403
403
  ] });
404
404
  }), kt = ({ goalType: t, onClick: n }) => {
405
- const { goals: s } = C(), { bgcolor: l, icon: p, label: a, description: u, subTypes: h, type: g } = t, [r, o] = y.useState(!1), _ = h.length > 0;
405
+ const { goals: s } = C(), { bgcolor: c, icon: p, label: a, description: _, subTypes: h, type: g } = t, [r, m] = y.useState(!1), o = h.length > 0;
406
406
  return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
407
407
  /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(
408
408
  k,
409
409
  {
410
- onClick: _ ? () => o(!r) : () => n(
411
- g === m.RETIREMENT_TRACK ? s.retirement : "",
412
- g === m.RETIREMENT_TRACK ? q.RETIREMENT : q.OTHER,
410
+ onClick: o ? () => m(!r) : () => n(
411
+ g === u.RETIREMENT_TRACK ? s.retirement : "",
412
+ g === u.RETIREMENT_TRACK ? q.RETIREMENT : q.OTHER,
413
413
  g
414
414
  ),
415
415
  children: [
416
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: p, sx: { color: "grey.900" } }) }) }),
417
- /* @__PURE__ */ e(w, { primary: a, secondary: u, sx: { mr: 24 } }),
418
- !_ && /* @__PURE__ */ e(M, {}),
419
- _ && (r ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
416
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: p, sx: { color: "grey.900" } }) }) }),
417
+ /* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
418
+ !o && /* @__PURE__ */ e(M, {}),
419
+ o && (r ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
420
420
  ]
421
421
  }
422
422
  ) }),
423
423
  /* @__PURE__ */ e(E, { variant: "inset" }),
424
- _ && /* @__PURE__ */ e(ot, { in: r, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: h.map((d, c) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(d.label, d.metaType, g), children: [
425
- /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: d.icon }) }),
424
+ o && /* @__PURE__ */ e(ot, { in: r, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: h.map((d, l) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(d.label, d.metaType, g), children: [
425
+ /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: d.icon }) }),
426
426
  /* @__PURE__ */ e(
427
427
  w,
428
428
  {
@@ -431,56 +431,56 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
431
431
  }
432
432
  ),
433
433
  /* @__PURE__ */ e(M, {})
434
- ] }) }, c)) }) })
434
+ ] }) }, l)) }) })
435
435
  ] }) });
436
436
  }, Be = ({
437
437
  accounts: t,
438
438
  isOpen: n,
439
439
  onClose: s,
440
- onSave: l,
440
+ onSave: c,
441
441
  title: p
442
442
  }) => {
443
- const { goals: a, common: u } = C(), { config: h } = Ie(), [g, r] = y.useState([]), o = (_) => {
444
- const d = g.findIndex((f) => f.guid === _.guid), c = [...g];
445
- d >= 0 ? c.splice(d, 1) : c.push(_), r(c);
443
+ const { goals: a, common: _ } = C(), { config: h } = Ge(), [g, r] = y.useState([]), m = (o) => {
444
+ const d = g.findIndex((f) => f.guid === o.guid), l = [...g];
445
+ d >= 0 ? l.splice(d, 1) : l.push(o), r(l);
446
446
  };
447
447
  return /* @__PURE__ */ i(
448
448
  F,
449
449
  {
450
- ariaLabelClose: u.close_aria,
450
+ ariaLabelClose: _.close_aria,
451
451
  isOpen: n,
452
452
  onClose: s,
453
- onPrimaryAction: () => l(g),
453
+ onPrimaryAction: () => c(g),
454
454
  title: p,
455
455
  children: [
456
456
  /* @__PURE__ */ e(P, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
457
457
  /* @__PURE__ */ i(B, { sx: { bgcolor: "background.white" }, children: [
458
458
  /* @__PURE__ */ e(E, { variant: "fullWidth" }),
459
- t.map((_, d) => /* @__PURE__ */ i(y.Fragment, { children: [
460
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(_), children: [
459
+ t.map((o, d) => /* @__PURE__ */ i(y.Fragment, { children: [
460
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => m(o), children: [
461
461
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
462
462
  oe,
463
463
  {
464
- alt: _?.name || "",
465
- institutionGuid: _?.institution_guid || ""
464
+ alt: o?.name || "",
465
+ institutionGuid: o?.institution_guid || ""
466
466
  }
467
467
  ) }),
468
468
  /* @__PURE__ */ e(
469
469
  w,
470
470
  {
471
- primary: De(_, {
471
+ primary: De(o, {
472
472
  allowNickname: h?.show_account_nicknames_in_master
473
473
  }),
474
- secondary: x(_.balance || 0, "0,0.00")
474
+ secondary: x(o.balance || 0, "0,0.00")
475
475
  }
476
476
  ),
477
- /* @__PURE__ */ e(rt, { checked: g.some((c) => c.guid === _.guid) })
477
+ /* @__PURE__ */ e(rt, { checked: g.some((l) => l.guid === o.guid) })
478
478
  ] }) }),
479
479
  /* @__PURE__ */ e(E, { variant: d < t.length - 1 ? "inset" : "fullWidth" })
480
- ] }, _.guid))
480
+ ] }, o.guid))
481
481
  ] }),
482
482
  /* @__PURE__ */ e(
483
- Ae,
483
+ Te,
484
484
  {
485
485
  description: a.connect_description,
486
486
  label: a.connect_button,
@@ -491,20 +491,20 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
491
491
  }
492
492
  );
493
493
  }, wt = ({ onClose: t }) => {
494
- const { goals: n } = C(), { addGoal: s, debtGoals: l, setAlert: p, setSelectedGoal: a } = I(), { config: u } = Ie(), { visibleDebtAccounts: h } = j(), [g, r] = y.useState(!1), o = Ve(n), _ = (c, f, T) => {
495
- T === m.DEBT_TRACK ? r(!0) : a({
494
+ const { goals: n } = C(), { addGoal: s, debtGoals: c, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ge(), { visibleDebtAccounts: h } = j(), [g, r] = y.useState(!1), m = Ve(n), o = (l, f, T) => {
495
+ T === u.DEBT_TRACK ? r(!0) : a({
496
496
  amount: 0,
497
497
  current_amount: 0,
498
498
  goal_type: ue.SAVE_AMOUNT,
499
499
  initial_amount: 0,
500
500
  meta_type: f,
501
- name: c,
501
+ name: l,
502
502
  track_type: T
503
503
  });
504
- }, d = async (c) => {
505
- for (const f of c) {
504
+ }, d = async (l) => {
505
+ for (const f of l) {
506
506
  let T = q.CREDIT_CARD;
507
- f.account_type === ye.LOAN ? T = q.LOANS : f.account_type === ye.LINE_OF_CREDIT && (T = q.LINE_OF_CREDIT), await s({
507
+ f.account_type === Ae.LOAN ? T = q.LOANS : f.account_type === Ae.LINE_OF_CREDIT && (T = q.LINE_OF_CREDIT), await s({
508
508
  account_guid: f.guid,
509
509
  amount: 0,
510
510
  current_amount: 0,
@@ -514,19 +514,19 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
514
514
  meta_type: T,
515
515
  monthly_payment: f.minimum_payment || 0,
516
516
  name: De(f, {
517
- allowNickname: u?.show_account_nicknames_in_master
517
+ allowNickname: _?.show_account_nicknames_in_master
518
518
  }),
519
- track_type: m.DEBT_TRACK
519
+ track_type: u.DEBT_TRACK
520
520
  }), p(n.alert_goal_added);
521
521
  }
522
- r(!1), t?.(m.DEBT_TRACK);
522
+ r(!1), t?.(u.DEBT_TRACK);
523
523
  };
524
524
  return /* @__PURE__ */ i(b, { children: [
525
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: o.map((c, f) => /* @__PURE__ */ e(kt, { goalType: c, onClick: _ }, f)) }),
525
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: m.map((l, f) => /* @__PURE__ */ e(kt, { goalType: l, onClick: o }, f)) }),
526
526
  /* @__PURE__ */ e(
527
527
  Be,
528
528
  {
529
- accounts: h.filter((c) => !l.find((f) => f.account_guid === c.guid)),
529
+ accounts: h.filter((l) => !c.find((f) => f.account_guid === l.guid)),
530
530
  isOpen: g,
531
531
  onClose: () => r(!1),
532
532
  onSave: d,
@@ -535,10 +535,10 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
535
535
  )
536
536
  ] });
537
537
  }, Oe = ({ account: t }) => {
538
- const { accounts: n } = C(), s = ct(t), { setSelectedAccount: l } = it(), [p, a] = y.useState(!1);
538
+ const { accounts: n } = C(), s = ct(t), { setSelectedAccount: c } = it(), [p, a] = y.useState(!1);
539
539
  return /* @__PURE__ */ i(N, { sx: { bgcolor: "background.paper" }, children: [
540
540
  /* @__PURE__ */ i(k, { onClick: () => {
541
- l(t), a(!0);
541
+ c(t), a(!0);
542
542
  }, children: [
543
543
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
544
544
  oe,
@@ -562,12 +562,12 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
562
562
  ] }) })
563
563
  ] });
564
564
  }, Dt = D(({ goal: t }) => {
565
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, u] = y.useState(t.amount), h = !t.guid, g = a < 0 || a > 9999999999e-2, r = t.track_type === m.SAVINGS_TRACK && t.has_been_spent || t.track_type !== m.SAVINGS_TRACK && t.is_complete, o = async () => {
565
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.amount), h = !t.guid, g = a < 0 || a > 9999999999e-2, r = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, m = async () => {
566
566
  const d = { ...t, amount: a };
567
- t.amount = a, h ? l(d) : (await p(d), s(n.alert_goal_updated_amount));
568
- }, _ = () => {
567
+ t.amount = a, h ? c(d) : (await p(d), s(n.alert_goal_updated_amount));
568
+ }, o = () => {
569
569
  setTimeout(() => {
570
- u(t.amount);
570
+ _(t.amount);
571
571
  }, 250);
572
572
  };
573
573
  return /* @__PURE__ */ e(
@@ -576,8 +576,8 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
576
576
  isDisabled: r,
577
577
  isSaveDisabled: g,
578
578
  label: n.details_amount_to_save,
579
- onCancel: _,
580
- onSave: o,
579
+ onCancel: o,
580
+ onSave: m,
581
581
  primaryText: n.details_amount_to_save,
582
582
  secondaryText: x(t.amount, "0,0"),
583
583
  zeroStateText: h && t.amount === 0 ? n.add_amount : void 0,
@@ -589,26 +589,26 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
589
589
  error: g,
590
590
  fullWidth: !0,
591
591
  minAmount: 0,
592
- setAmount: (d) => u(isNaN(Number(d)) ? a : Number(d)),
592
+ setAmount: (d) => _(isNaN(Number(d)) ? a : Number(d)),
593
593
  sx: { ".MuiTypography-Body": { p: 0 } }
594
594
  }
595
595
  )
596
596
  }
597
597
  );
598
598
  }), Kt = ({ goal: t }) => {
599
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = j(), { accounts: l, goals: p } = C(), { setAlert: a, setSelectedGoal: u, updateGoal: h } = I(), g = !t.guid, [r, o] = y.useState(!1), _ = async ({ balance: d, guid: c }) => {
600
- const f = { ...t, account_guid: c, current_amount: d || 0 };
601
- g ? u(f) : (await h(f), a(p.alert_account_changed)), o(!1);
599
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = j(), { accounts: c, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: h } = I(), g = !t.guid, [r, m] = y.useState(!1), o = async ({ balance: d, guid: l }) => {
600
+ const f = { ...t, account_guid: l, current_amount: d || 0 };
601
+ g ? _(f) : (await h(f), a(p.alert_account_changed)), m(!1);
602
602
  };
603
603
  return /* @__PURE__ */ i(b, { children: [
604
- g && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
604
+ g && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => m(!0), children: [
605
605
  /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
606
- /* @__PURE__ */ e(ve, { filled: !0 }),
606
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
607
607
  p.details_add_account
608
608
  ] }) }),
609
609
  /* @__PURE__ */ e(M, { color: "primary" })
610
610
  ] }) }) : /* @__PURE__ */ i(b, { sx: { gap: 8, my: 24, mx: 24 }, children: [
611
- /* @__PURE__ */ e(he, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
611
+ /* @__PURE__ */ e(he, { onClick: () => m(!0), variant: "text", children: p.details_change_account }),
612
612
  /* @__PURE__ */ e(
613
613
  A,
614
614
  {
@@ -619,9 +619,9 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
619
619
  }
620
620
  )
621
621
  ] }),
622
- /* @__PURE__ */ e(F, { isOpen: r, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ i(b, { children: [
623
- n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[1] }),
624
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => _(d), children: [
622
+ /* @__PURE__ */ e(F, { isOpen: r, onClose: () => m(!1), title: p.details_change_account, children: /* @__PURE__ */ i(b, { children: [
623
+ n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
624
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
625
625
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
626
626
  oe,
627
627
  {
@@ -638,8 +638,8 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
638
638
  ),
639
639
  /* @__PURE__ */ e(M, {})
640
640
  ] }) }, d.guid)) }),
641
- s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[2] }),
642
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: s.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => _(d), children: [
641
+ s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
642
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: s.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
643
643
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
644
644
  oe,
645
645
  {
@@ -657,7 +657,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
657
657
  /* @__PURE__ */ e(M, {})
658
658
  ] }) }, d.guid)) }),
659
659
  /* @__PURE__ */ e(
660
- Ae,
660
+ Te,
661
661
  {
662
662
  description: p.connect_description,
663
663
  label: p.connect_button,
@@ -667,12 +667,12 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
667
667
  ] }) })
668
668
  ] });
669
669
  }, Mt = D(({ goal: t }) => {
670
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, u] = y.useState(t.name), h = !t.guid, g = t.track_type === m.SAVINGS_TRACK && t.has_been_spent || t.track_type !== m.SAVINGS_TRACK && t.is_complete, r = async () => {
671
- const _ = { ...t, name: a };
672
- t.name = a, h ? l(_) : (await p(_), s(n.alert_goal_updated_name));
673
- }, o = () => {
670
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.name), h = !t.guid, g = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, r = async () => {
671
+ const o = { ...t, name: a };
672
+ t.name = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_name));
673
+ }, m = () => {
674
674
  setTimeout(() => {
675
- u(t.name);
675
+ _(t.name);
676
676
  }, 250);
677
677
  };
678
678
  return /* @__PURE__ */ e(
@@ -681,7 +681,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
681
681
  isDisabled: g,
682
682
  isSaveDisabled: !a,
683
683
  label: n.details_goal_name,
684
- onCancel: o,
684
+ onCancel: m,
685
685
  onSave: r,
686
686
  primaryText: n.details_goal_name,
687
687
  secondaryText: t.name,
@@ -691,28 +691,28 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
691
691
  error: !a,
692
692
  fullWidth: !0,
693
693
  label: n.details_goal_name,
694
- onChange: (_) => u(_.target.value),
694
+ onChange: (o) => _(o.target.value),
695
695
  value: a
696
696
  }
697
697
  )
698
698
  }
699
699
  );
700
700
  }), Lt = ({ goal: t }) => {
701
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, u] = y.useState(t.retirement_age || 65), h = !t.guid, g = async () => {
701
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), h = !t.guid, g = async () => {
702
702
  if (!isNaN(a)) {
703
- const _ = { ...t, retirement_age: a };
704
- t.retirement_age = a, h ? l(_) : (await p(_), s(n.alert_goal_updated_retirement_age));
703
+ const o = { ...t, retirement_age: a };
704
+ t.retirement_age = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_retirement_age));
705
705
  }
706
706
  }, r = () => {
707
707
  setTimeout(() => {
708
- u(t.retirement_age || 65);
708
+ _(t.retirement_age || 65);
709
709
  }, 250);
710
- }, o = !a || isNaN(a) || a < 20 || a >= 100;
710
+ }, m = !a || isNaN(a) || a < 20 || a >= 100;
711
711
  return /* @__PURE__ */ e(
712
712
  Q,
713
713
  {
714
714
  isDisabled: t.is_complete,
715
- isSaveDisabled: o,
715
+ isSaveDisabled: m,
716
716
  label: n.details_retirement_age,
717
717
  onCancel: r,
718
718
  onSave: g,
@@ -722,18 +722,18 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
722
722
  children: /* @__PURE__ */ e(
723
723
  Ke,
724
724
  {
725
- error: o,
725
+ error: m,
726
726
  fullWidth: !0,
727
727
  label: n.details_retirement_age,
728
- onChange: (_) => u(Number(_.target.value)),
728
+ onChange: (o) => _(Number(o.target.value)),
729
729
  value: isNaN(a) ? "" : a
730
730
  }
731
731
  )
732
732
  }
733
733
  );
734
734
  }, Bt = D(({ goal: t }) => {
735
- const { goals: n } = C(), { user: s, updateUser: l } = Ge(), { setAlert: p } = I(), [a, u] = y.useState(J(s.birthday ?? 0)), [h, g] = y.useState(null), r = t.is_complete, o = async () => {
736
- a && pt(a) && (await l({ ...s, birthday: _t(a) }), p(n.alert_goal_updated_birthday));
735
+ const { goals: n } = C(), { user: s, updateUser: c } = Ne(), { setAlert: p } = I(), [a, _] = y.useState(J(s.birthday ?? 0)), [h, g] = y.useState(null), r = t.is_complete, m = async () => {
736
+ a && pt(a) && (await c({ ...s, birthday: _t(a) }), p(n.alert_goal_updated_birthday));
737
737
  };
738
738
  return /* @__PURE__ */ e(
739
739
  Q,
@@ -741,7 +741,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
741
741
  isDisabled: r,
742
742
  isSaveDisabled: !!h,
743
743
  label: n.details_birthday,
744
- onSave: o,
744
+ onSave: m,
745
745
  primaryText: n.details_birthday,
746
746
  secondaryText: `${re(J(s.birthday ?? 0), ie.MONTH_DAY_YEAR)}`,
747
747
  zeroStateText: !t.guid && !s.birthday ? n.add_birthday : void 0,
@@ -749,8 +749,8 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
749
749
  gt,
750
750
  {
751
751
  label: n.details_birthday,
752
- onChange: u,
753
- onError: (_) => g(_),
752
+ onChange: _,
753
+ onError: (o) => g(o),
754
754
  sx: { width: "100%" },
755
755
  value: a
756
756
  }
@@ -759,14 +759,14 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
759
759
  );
760
760
  }), Ot = ({ goal: t }) => {
761
761
  const { goals: n } = C(), { visibleRetirementAccounts: s } = j(), {
762
- addRetirementGoalAccount: l,
762
+ addRetirementGoalAccount: c,
763
763
  newRetirementGoalAccounts: p,
764
764
  retirementGoalAccounts: a,
765
- selectedGoal: u,
765
+ selectedGoal: _,
766
766
  setAlert: h,
767
767
  setNewRetirementGoalAccounts: g,
768
768
  setSelectedGoal: r
769
- } = I(), [o, _] = y.useState(!1), d = !t.guid, c = s.filter(
769
+ } = I(), [m, o] = y.useState(!1), d = !t.guid, l = s.filter(
770
770
  (S) => d ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
771
771
  ), f = s.filter(
772
772
  (S) => !a.find((R) => R.account_guid === S.guid)
@@ -779,20 +779,20 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
779
779
  g(R);
780
780
  else
781
781
  for (const v of R)
782
- await l(v), h(n.alert_account_added);
782
+ await c(v), h(n.alert_account_added);
783
783
  r({
784
- ...u,
784
+ ..._,
785
785
  current_amount: S.reduce((v, K) => v + (K.balance || 0), 0)
786
- }), _(!1);
786
+ }), o(!1);
787
787
  };
788
788
  return /* @__PURE__ */ i(b, { children: [
789
- c.map((S) => /* @__PURE__ */ i(b, { children: [
789
+ l.map((S) => /* @__PURE__ */ i(b, { children: [
790
790
  /* @__PURE__ */ e(Oe, { account: S }),
791
791
  /* @__PURE__ */ e(E, {})
792
792
  ] }, S.guid)),
793
- /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => _(!0), children: [
793
+ /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
794
794
  /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
795
- /* @__PURE__ */ e(ve, { filled: !0 }),
795
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
796
796
  n.details_add_account
797
797
  ] }) }),
798
798
  /* @__PURE__ */ e(M, { color: "primary" })
@@ -801,20 +801,20 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
801
801
  Be,
802
802
  {
803
803
  accounts: f,
804
- isOpen: o,
805
- onClose: () => _(!1),
804
+ isOpen: m,
805
+ onClose: () => o(!1),
806
806
  onSave: T,
807
807
  title: n.add_select_accounts
808
808
  }
809
809
  )
810
810
  ] });
811
811
  }, Wt = D(({ goal: t }) => {
812
- const { goals: n } = C(), { visibleAccounts: s } = j(), l = y.useMemo(
813
- () => s.find((u) => u.guid === t.account_guid),
812
+ const { goals: n } = C(), { visibleAccounts: s } = j(), c = y.useMemo(
813
+ () => s.find((_) => _.guid === t.account_guid),
814
814
  [s, t]
815
815
  ), p = t.track_type;
816
816
  let a = n.details_save_title;
817
- return t.track_type === m.DEBT_TRACK ? a = n.details_debt_title : t.track_type === m.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(b, { children: [
817
+ return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(b, { children: [
818
818
  /* @__PURE__ */ i(b, { mx: 24, children: [
819
819
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
820
820
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
@@ -823,11 +823,11 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
823
823
  /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
824
824
  /* @__PURE__ */ e(Mt, { goal: t }),
825
825
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
826
- (p === m.SAVINGS_TRACK || p === m.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
826
+ (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
827
827
  /* @__PURE__ */ e(Dt, { goal: t }),
828
- /* @__PURE__ */ e(E, { sx: { ml: p === m.RETIREMENT_TRACK ? 24 : 0 } })
828
+ /* @__PURE__ */ e(E, { sx: { ml: p === u.RETIREMENT_TRACK ? 24 : 0 } })
829
829
  ] }),
830
- t.track_type === m.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
830
+ t.track_type === u.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
831
831
  /* @__PURE__ */ e(dt, { goal: t }),
832
832
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
833
833
  /* @__PURE__ */ e(mt, { goal: t }),
@@ -835,68 +835,68 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
835
835
  /* @__PURE__ */ e(ut, { goal: t }),
836
836
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
837
837
  ] }),
838
- t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
838
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
839
839
  /* @__PURE__ */ e(Lt, { goal: t }),
840
840
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
841
841
  /* @__PURE__ */ e(Bt, { goal: t }),
842
842
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
843
843
  ] })
844
844
  ] }),
845
- /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === m.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
846
- t.track_type !== m.RETIREMENT_TRACK && l && /* @__PURE__ */ i(U, { children: [
847
- /* @__PURE__ */ e(Oe, { account: l }),
845
+ /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === u.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
846
+ t.track_type !== u.RETIREMENT_TRACK && c && /* @__PURE__ */ i(U, { children: [
847
+ /* @__PURE__ */ e(Oe, { account: c }),
848
848
  /* @__PURE__ */ e(E, {})
849
849
  ] }),
850
- t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
850
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
851
851
  /* @__PURE__ */ e(Ot, { goal: t }),
852
852
  /* @__PURE__ */ e(E, {})
853
853
  ] }),
854
- t.track_type === m.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Kt, { goal: t })
854
+ t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Kt, { goal: t })
855
855
  ] });
856
856
  }), Pt = D(({ onClose: t }) => {
857
- const { visibleRetirementAccounts: n } = j(), { goals: s, common: l } = C(), {
857
+ const { visibleRetirementAccounts: n } = j(), { goals: s, common: c } = C(), {
858
858
  addGoal: p,
859
859
  addRetirementGoal: a,
860
- deleteGoal: u,
860
+ deleteGoal: _,
861
861
  deleteRetirementGoal: h,
862
862
  newRetirementGoalAccounts: g,
863
863
  retirementGoalAccounts: r,
864
- selectedGoal: o,
865
- setAlert: _,
864
+ selectedGoal: m,
865
+ setAlert: o,
866
866
  setSelectedGoal: d,
867
- updateGoal: c
868
- } = I(), { user: f } = Ge(), [T, S] = y.useState(!1), R = !o?.guid, v = o?.track_type === m.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, K = y.useMemo(() => {
867
+ updateGoal: l
868
+ } = I(), { user: f } = Ne(), [T, S] = y.useState(!1), R = !m?.guid, v = m?.track_type === u.SAVINGS_TRACK && m.is_complete && !m.has_been_spent, K = y.useMemo(() => {
869
869
  const G = R ? g : r;
870
870
  return n.filter((H) => G.some(($) => $.account_guid === H.guid));
871
871
  }, [R, n, g, r]), se = y.useMemo(() => {
872
- if (!o) return !1;
872
+ if (!m) return !1;
873
873
  if (!R && !v) return !0;
874
- const { account_guid: G, track_type: H, name: $, amount: O, retirement_age: ne } = o;
875
- return H === m.SAVINGS_TRACK ? G ? !!$ && !!O : !1 : H === m.RETIREMENT_TRACK ? K.length ? !!$ && !!O && !!ne && !!f.birthday : !1 : !0;
876
- }, [o, K, f.birthday]);
877
- let W = l.delete_button, z = () => S(!0);
878
- R ? (z = () => ee(), W = l.save_button) : v && (z = () => le(), W = s.mark_as_complete_button);
874
+ const { account_guid: G, track_type: H, name: $, amount: O, retirement_age: ne } = m;
875
+ return H === u.SAVINGS_TRACK ? G ? !!$ && !!O : !1 : H === u.RETIREMENT_TRACK ? K.length ? !!$ && !!O && !!ne && !!f.birthday : !1 : !0;
876
+ }, [m, K, f.birthday]);
877
+ let W = c.delete_button, z = () => S(!0);
878
+ R ? (z = () => ee(), W = c.save_button) : v && (z = () => le(), W = s.mark_as_complete_button);
879
879
  const ee = async () => {
880
- if (o) {
881
- const G = o.track_type;
882
- G !== m.RETIREMENT_TRACK ? await p(o) : G === m.RETIREMENT_TRACK && await a({ ...o, target_amount: o.amount }), _(s.alert_goal_added), d(void 0), G && t?.(G);
880
+ if (m) {
881
+ const G = m.track_type;
882
+ G !== u.RETIREMENT_TRACK ? await p(m) : G === u.RETIREMENT_TRACK && await a({ ...m, target_amount: m.amount }), o(s.alert_goal_added), d(void 0), G && t?.(G);
883
883
  }
884
884
  }, te = async () => {
885
- o && (o.track_type !== m.RETIREMENT_TRACK ? await u(o.guid) : o.track_type === m.RETIREMENT_TRACK && await h(o), _(s.alert_goal_deleted), d(void 0));
885
+ m && (m.track_type !== u.RETIREMENT_TRACK ? await _(m.guid) : m.track_type === u.RETIREMENT_TRACK && await h(m), o(s.alert_goal_deleted), d(void 0));
886
886
  }, le = async () => {
887
887
  const G = {
888
- ...o,
888
+ ...m,
889
889
  has_been_spent: !0
890
890
  };
891
- await c(G), _(s.alert_goal_completed), d(void 0);
891
+ await l(G), o(s.alert_goal_completed), d(void 0);
892
892
  };
893
893
  return /* @__PURE__ */ i(b, { children: [
894
894
  /* @__PURE__ */ e(
895
895
  F,
896
896
  {
897
- ariaLabelClose: l.close_aria,
897
+ ariaLabelClose: c.close_aria,
898
898
  hasSecondaryAction: R,
899
- isOpen: !!o,
899
+ isOpen: !!m,
900
900
  isPrimaryDisabled: !se,
901
901
  onClose: () => d(void 0),
902
902
  onPrimaryAction: z,
@@ -904,39 +904,39 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
904
904
  primaryText: W,
905
905
  secondaryColor: "primary",
906
906
  title: s.goal_details,
907
- children: o && /* @__PURE__ */ e(Wt, { goal: o })
907
+ children: m && /* @__PURE__ */ e(Wt, { goal: m })
908
908
  }
909
909
  ),
910
910
  /* @__PURE__ */ e(
911
911
  nt,
912
912
  {
913
- copy: { close_aria: l.close_aria, title: s.delete_goal },
913
+ copy: { close_aria: c.close_aria, title: s.delete_goal },
914
914
  isOpen: T,
915
915
  maxWidth: "xs",
916
916
  onClose: () => S(!1),
917
917
  onPrimaryAction: te,
918
918
  primaryColor: "error",
919
- primaryText: l.delete_button,
920
- children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(s.delete_description, o?.name || "") })
919
+ primaryText: c.delete_button,
920
+ children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(s.delete_description, m?.name || "") })
921
921
  }
922
922
  )
923
923
  ] });
924
924
  }), Xn = D(({ onBackClick: t, sx: n }) => {
925
- const { onEvent: s } = Ne(), { onLoad: l } = Qe(), { isMobile: p } = ge(), { visibleAccounts: a } = j(), { isCopyLoaded: u, isInitialized: h, setSelectedAccounts: g } = ke(), { goals: r, common: o } = C(), { alert: _, goals: d, goalsLoaded: c, loadGoals: f, monthlyCashFlowProfile: T, setAlert: S, retirmentGoals: R } = I(), [v, K] = y.useState(0), [se, W] = y.useState(!1), z = T?.amount_allocated_for_savings_goals || 0, ee = T?.amount_allocated_for_debt_goals || 0, te = T?.amount_allocated_for_retirement_goals || 0, le = u ? L(
925
+ const { onEvent: s } = ke(), { onLoad: c } = Qe(), { isMobile: p } = be(), { visibleAccounts: a } = j(), { isCopyLoaded: _, isInitialized: h, setSelectedAccounts: g } = ge(), { goals: r, common: m } = C(), { alert: o, goals: d, goalsLoaded: l, loadGoals: f, monthlyCashFlowProfile: T, setAlert: S, retirmentGoals: R } = I(), [v, K] = y.useState(0), [se, W] = y.useState(!1), z = T?.amount_allocated_for_savings_goals || 0, ee = T?.amount_allocated_for_debt_goals || 0, te = T?.amount_allocated_for_retirement_goals || 0, le = _ ? L(
926
926
  p ? r.tab_subtitle_mobile : r.tab_subtitle,
927
927
  x(z, "0,0")
928
- ) : "", G = u ? L(
928
+ ) : "", G = _ ? L(
929
929
  p ? r.tab_subtitle_mobile : r.tab_subtitle,
930
930
  x(ee, "0,0")
931
- ) : "", H = u ? L(
931
+ ) : "", H = _ ? L(
932
932
  p ? r.tab_subtitle_mobile : r.tab_subtitle,
933
933
  x(te, "0,0")
934
934
  ) : "";
935
935
  y.useEffect(() => {
936
936
  g(a), s(Y.GOALS_VIEW);
937
- }, []), y.useEffect(() => {
937
+ }, [a]), y.useEffect(() => {
938
938
  h && f().finally(() => {
939
- l?.("GoalsWidget");
939
+ c?.("GoalsWidget");
940
940
  });
941
941
  }, [h, z, ee, te]);
942
942
  const $ = () => {
@@ -944,12 +944,12 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
944
944
  }, O = () => {
945
945
  W(!0), s(Y.GOALS_CLICK_ADD);
946
946
  }, ne = (X) => {
947
- W(!1), X === m.SAVINGS_TRACK ? K(0) : X === m.DEBT_TRACK ? K(1) : X === m.RETIREMENT_TRACK && K(2);
947
+ W(!1), X === u.SAVINGS_TRACK ? K(0) : X === u.DEBT_TRACK ? K(1) : X === u.RETIREMENT_TRACK && K(2);
948
948
  }, Z = y.useMemo(
949
- () => c && (d.length === 0 || d.every(({ track_type: X }) => !X) && R.length === 0),
950
- [d, c, R]
949
+ () => l && (d.length === 0 || d.every(({ track_type: X }) => !X) && R.length === 0),
950
+ [d, l, R]
951
951
  );
952
- return !c || !u || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
952
+ return !l || !_ || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
953
953
  ft,
954
954
  {
955
955
  accountOptions: a,
@@ -1015,39 +1015,39 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1015
1015
  }
1016
1016
  }
1017
1017
  ) : /* @__PURE__ */ i(U, { children: [
1018
- v === 0 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: m.SAVINGS_TRACK }),
1019
- v === 1 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: m.DEBT_TRACK }),
1020
- v === 2 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: m.RETIREMENT_TRACK })
1018
+ v === 0 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.SAVINGS_TRACK }),
1019
+ v === 1 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.DEBT_TRACK }),
1020
+ v === 2 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.RETIREMENT_TRACK })
1021
1021
  ] })
1022
1022
  ] }),
1023
1023
  /* @__PURE__ */ e(Pt, { onClose: ne }),
1024
1024
  /* @__PURE__ */ e(
1025
1025
  F,
1026
1026
  {
1027
- ariaLabelClose: o.close_aria,
1027
+ ariaLabelClose: m.close_aria,
1028
1028
  isOpen: se,
1029
1029
  onClose: () => W(!1),
1030
1030
  title: r.add_goal_title,
1031
1031
  children: /* @__PURE__ */ e(wt, { onClose: ne })
1032
1032
  }
1033
1033
  ),
1034
- /* @__PURE__ */ e(Fe, { onClose: () => S(""), open: !!_, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: _ }) })
1034
+ /* @__PURE__ */ e(Fe, { onClose: () => S(""), open: !!o, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: o }) })
1035
1035
  ]
1036
1036
  }
1037
1037
  );
1038
1038
  }), Vt = D(({ goal: t }) => {
1039
1039
  const { goals: n } = C(), s = Ct(), {
1040
- backgroundColor: l,
1040
+ backgroundColor: c,
1041
1041
  color: p,
1042
1042
  percentage: a,
1043
- projectedText: u
1043
+ projectedText: _
1044
1044
  } = _e(n, t), h = Math.round(a * 100);
1045
- let g = /* @__PURE__ */ e(Re, {});
1046
- return t.track_type === m.DEBT_TRACK ? g = /* @__PURE__ */ e(Ee, {}) : t.track_type === m.RETIREMENT_TRACK && (g = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1047
- /* @__PURE__ */ e(ae, { sx: { bgcolor: l, color: p, height: 32, width: 32 }, variant: "rounded", children: g }),
1045
+ let g = /* @__PURE__ */ e(Ee, {});
1046
+ return t.track_type === u.DEBT_TRACK ? g = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (g = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1047
+ /* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: p, height: 32, width: 32 }, variant: "rounded", children: g }),
1048
1048
  /* @__PURE__ */ i(Tt, { sx: { width: "100%" }, children: [
1049
1049
  /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1050
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: u })
1050
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
1051
1051
  ] }),
1052
1052
  /* @__PURE__ */ e(
1053
1053
  St,
@@ -1085,7 +1085,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1085
1085
  ]
1086
1086
  }
1087
1087
  ), Un = D(({ onCTAClick: t }) => {
1088
- const { visibleAccounts: n } = j(), { onEvent: s } = Ne(), { goals: l } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: u } = ke(), { ongoingGoalsForMicroWidget: h, loadGoals: g, goalsLoaded: r } = I();
1088
+ const { visibleAccounts: n } = j(), { onEvent: s } = ke(), { goals: c } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = ge(), { ongoingGoalsForMicroWidget: h, loadGoals: g, goalsLoaded: r } = I();
1089
1089
  y.useEffect(() => {
1090
1090
  a(n);
1091
1091
  }, []), y.useEffect(() => {
@@ -1093,30 +1093,30 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1093
1093
  state: n?.length ? "default" : "zeroState"
1094
1094
  }));
1095
1095
  }, [p]);
1096
- const o = y.useMemo(
1096
+ const m = y.useMemo(
1097
1097
  () => r && h.length === 0,
1098
1098
  [h, r]
1099
- ), _ = () => {
1099
+ ), o = () => {
1100
1100
  s(
1101
- o ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1101
+ m ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1102
1102
  ), t();
1103
1103
  };
1104
- return !r || !u || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1104
+ return !r || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1105
1105
  Rt,
1106
1106
  {
1107
1107
  className: "mx-goals-microwidget",
1108
- ctaLabel: o ? l.get_started : l.view_details,
1109
- onCTAClick: _,
1110
- title: l.title,
1111
- children: o ? /* @__PURE__ */ e(
1108
+ ctaLabel: m ? c.get_started : c.view_details,
1109
+ onCTAClick: o,
1110
+ title: c.title,
1111
+ children: m ? /* @__PURE__ */ e(
1112
1112
  jt,
1113
1113
  {
1114
- header: l.create_goals_header,
1115
- subText: l.micro_zero_state_description
1114
+ header: c.create_goals_header,
1115
+ subText: c.micro_zero_state_description
1116
1116
  }
1117
- ) : /* @__PURE__ */ e(At, { sx: { justifyContent: "space-between" }, children: h.map((d, c) => /* @__PURE__ */ i(y.Fragment, { children: [
1117
+ ) : /* @__PURE__ */ e(At, { sx: { justifyContent: "space-between" }, children: h.map((d, l) => /* @__PURE__ */ i(y.Fragment, { children: [
1118
1118
  /* @__PURE__ */ e(Vt, { goal: d }),
1119
- c !== h.length - 1 && /* @__PURE__ */ e(E, {})
1119
+ l !== h.length - 1 && /* @__PURE__ */ e(E, {})
1120
1120
  ] }, d.guid)) })
1121
1121
  }
1122
1122
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.4.5-alpha.mega1",
3
+ "version": "7.4.5-alpha.saba-1",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",