@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1

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