@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms2

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