@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.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 (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-KpPw1phO.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,69 +1,70 @@
1
- import { jsx as e, jsxs as s, Fragment as O } from "react/jsx-runtime";
2
- import g from "react";
3
- import { observer as S } from "mobx-react-lite";
1
+ import { jsx as e, jsxs as s, Fragment as H } from "react/jsx-runtime";
2
+ import x from "react";
3
+ import { observer as D } from "mobx-react-lite";
4
4
  import w from "@mui/material/Stack";
5
- import { useTheme as V, Card as _e, Stack as _, Box as W } from "@mui/material";
6
- import { Text as l, H3 as Se, InstitutionLogo as Te, Icon as te } from "@mxenabled/mxui";
7
- import { intervalToDuration as Ae, formatDuration as Ee } from "date-fns";
8
- import { addMonths as se } from "date-fns/addMonths";
9
- import { fromUnixTime as ce } from "date-fns/fromUnixTime";
10
- import { getUnixTime as de } from "date-fns/getUnixTime";
11
- import { a as P, M as Ie, I as Me } from "../DebtsStore-pL63fmdT.mjs";
12
- import { D as Lr } from "../DebtsStore-pL63fmdT.mjs";
13
- import { f as q, a as X } from "../Dialog-CDV0kKxj.mjs";
14
- import { f as N, a as ke } from "../NumberFormatting-DjTD0t3W.mjs";
15
- import { G as Pe, x as Z, u as v, l as Y, g as B, d as J, n as Ne, b as Fe } from "../hooks-C41HAxM5.mjs";
16
- import { u as K } from "../useScreenSize-B5afALev.mjs";
17
- import { D as re } from "../Drawer-BF40nbsH.mjs";
18
- import { b as I } from "../Localization-2MODESHW.mjs";
19
- import { A as Be, u as Re } from "../AccountDetailsHeader-DRjFuyJT.mjs";
20
- import Le from "@mui/material/Card";
21
- import $e from "@mui/material/CardContent";
22
- import Oe from "@mui/material/CardHeader";
23
- import { LineChart as He } from "@mui/x-charts";
24
- import ne from "@mui/material/Box";
25
- import { useTheme as We } from "@mui/material/styles";
26
- import { A as T, W as Ge } from "../WidgetContainer-CDh9fjpR.mjs";
27
- import pe from "@mui/material/Tab";
28
- import je from "@mui/material/Tabs";
29
- import ye from "@mui/material/List";
30
- import G from "@mui/material/Divider";
31
- import { M as ze, I as Ve, O as Ye } from "../OriginalBalanceAction-2Y_3U_mg.mjs";
32
- import Ke from "@mui/material/TextField";
33
- import { L as Q } from "../ListItemAction-BNCWQAN_.mjs";
34
- import { C as oe } from "../CurrencyInput-D1cjbdCI.mjs";
35
- import he from "@mui/material/Alert";
36
- import ue from "@mui/material/AlertTitle";
37
- import me from "@mui/material/Paper";
38
- import { Error as Ue, CheckCircle as fe } from "@mxenabled/mx-icons";
39
- import { T as be } from "../TabContentContainer-CnMXkVqr.mjs";
40
- import { DataGridPro as qe } from "@mui/x-data-grid-pro";
41
- import { H as j } from "../HeaderCell-P8w6CmfO.mjs";
42
- import { h as Xe } from "../ConnectDrawer-DVp54lUH.mjs";
43
- import xe from "@mui/material/Button";
44
- import Ze from "@mui/material/IconButton";
45
- import Je from "@mui/material/ListItem";
46
- import Qe from "@mui/material/Popover";
47
- import { L as et } from "../Loader-Ckqi9Rx6.mjs";
48
- const tt = (n, o = 0, r = 0) => {
5
+ import { useTheme as X, Card as be, Stack as _, Box as G } from "@mui/material";
6
+ import { Text as l, H3 as ve, InstitutionLogo as De, Icon as ee } from "@mxenabled/mxui";
7
+ import { intervalToDuration as Te, formatDuration as Ae } from "date-fns";
8
+ import { addMonths as le } from "date-fns/addMonths";
9
+ import { fromUnixTime as se } from "date-fns/fromUnixTime";
10
+ import { getUnixTime as ce } from "date-fns/getUnixTime";
11
+ import { D as P, M as Ee, I as Ie } from "../DebtsStore-Bq-aPy-5.mjs";
12
+ import { a as Lr } from "../DebtsStore-Bq-aPy-5.mjs";
13
+ import { f as k, a as Be } from "../NumberFormatting-DjTD0t3W.mjs";
14
+ import { f as K, a as U } from "../Dialog-BPTr3qHE.mjs";
15
+ import { G as Me, w as q, u as S, l as V, g as F, d as Z, b as Pe } from "../hooks-ZMp65DFz.mjs";
16
+ import { u as Y } from "../useScreenSize-B6JyS_Lj.mjs";
17
+ import { D as te } from "../Drawer-By9V-B5L.mjs";
18
+ import { b as E } from "../Localization-2MODESHW.mjs";
19
+ import { A as ke, u as Ne } from "../AccountDetailsHeader-BkG3MNYo.mjs";
20
+ import Fe from "@mui/material/Card";
21
+ import Re from "@mui/material/CardContent";
22
+ import Le from "@mui/material/CardHeader";
23
+ import re from "@mui/material/Box";
24
+ import { useTheme as $e } from "@mui/material/styles";
25
+ import { LineChart as He } from "@mui/x-charts/LineChart";
26
+ import { A as T, W as Oe } from "../WidgetContainer-CoFDmQRE.mjs";
27
+ import de from "@mui/material/Tab";
28
+ import We from "@mui/material/Tabs";
29
+ import _e from "@mui/material/List";
30
+ import j from "@mui/material/Divider";
31
+ import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-C6jdS4ws.mjs";
32
+ import Xe from "@mui/material/TextField";
33
+ import { L as J } from "../ListItemAction-BxTkF6Tz.mjs";
34
+ import { C as ae } from "../CurrencyInput-itK0R3wV.mjs";
35
+ import pe from "@mui/material/Alert";
36
+ import me from "@mui/material/AlertTitle";
37
+ import he from "@mui/material/Paper";
38
+ import { Error as Ve, CheckCircle as ye } from "@mxenabled/mx-icons";
39
+ import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
40
+ import { DataGridPro as Ye } from "@mui/x-data-grid-pro";
41
+ import { H as z } from "../HeaderCell-DjuifqHJ.mjs";
42
+ import { f as Ke } from "../ConnectDrawer-BkvlItWx.mjs";
43
+ import fe from "@mui/material/Button";
44
+ import Ue from "@mui/material/IconButton";
45
+ import qe from "@mui/material/ListItem";
46
+ import Ze from "@mui/material/Popover";
47
+ import { u as Je } from "../useWidgetLoadTimer-hIOioiKx.mjs";
48
+ import { L as Qe } from "../Loader-DUaFpDGv.mjs";
49
+ const et = (a, o = 0, r = 0) => {
49
50
  if (r === 0) return 0;
50
- const t = o / (Ie * Me);
51
+ const t = o / (Ee * Ie);
51
52
  return Math.ceil(
52
- t === 0 ? n / r : -Math.log(1 - t * n / r) / Math.log(1 + t)
53
+ t === 0 ? a / r : -Math.log(1 - t * a / r) / Math.log(1 + t)
53
54
  );
54
- }, rt = (n, o, r, t, a) => {
55
+ }, tt = (a, o, r, t, n) => {
55
56
  const i = [];
56
57
  if (r === 0) {
57
- for (let c = 0; c < n; c++) {
58
- const d = o - t * (c + 1), h = o - t * c, m = d >= 0 ? t : h;
58
+ for (let c = 0; c < a; c++) {
59
+ const d = o - t * (c + 1), m = o - t * c, b = d >= 0 ? t : m;
59
60
  i.push({
60
61
  balance: d >= 0 ? d : 0,
61
62
  interest: r,
62
- payment: m,
63
- principal: m,
64
- timestamp: de(
65
- se(
66
- ce(a),
63
+ payment: b,
64
+ principal: b,
65
+ timestamp: ce(
66
+ le(
67
+ se(n),
67
68
  // convert seconds → Date
68
69
  c + 1
69
70
  // add (index + 1) months
@@ -74,98 +75,98 @@ const tt = (n, o = 0, r = 0) => {
74
75
  return i;
75
76
  }
76
77
  const p = r / 1200;
77
- for (let c = 0; c < n; c++) {
78
- const d = de(se(ce(a), c + 1)), h = Math.pow(1 + p, c), m = o * h - t * ((h - 1) / p), x = Math.pow(1 + p, c + 1), u = o * x - t * ((x - 1) / p), D = t + Math.min(u, 0), M = m * p;
78
+ for (let c = 0; c < a; c++) {
79
+ const d = ce(le(se(n), c + 1)), m = Math.pow(1 + p, c), b = o * m - t * ((m - 1) / p), f = Math.pow(1 + p, c + 1), u = o * f - t * ((f - 1) / p), v = t + Math.min(u, 0), M = b * p;
79
80
  i.push({
80
81
  balance: Math.max(0, u),
81
82
  interest: M,
82
- payment: D,
83
- principal: D - M,
83
+ payment: v,
84
+ principal: v - M,
84
85
  timestamp: d
85
86
  });
86
87
  }
87
88
  return i;
88
- }, nt = (n) => (n[n.length - 1] || {}).timestamp, ot = (n) => {
89
- const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: a } = n, i = tt(t, r ?? 0, o ?? 0), p = rt(
89
+ }, rt = (a) => (a[a.length - 1] || {}).timestamp, at = (a) => {
90
+ const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: n } = a, i = et(t, r ?? 0, o ?? 0), p = tt(
90
91
  i,
91
92
  t,
92
93
  r ?? 0,
93
94
  o ?? 0,
94
- a
95
- ), c = nt(p);
95
+ n
96
+ ), c = rt(p);
96
97
  return {
97
- ...n,
98
+ ...a,
98
99
  minimumFinalPayment: c,
99
100
  minimumPayments: p
100
101
  };
101
- }, ge = (n, o) => {
102
- const [r, t] = n.reduce(
103
- ([a, i], p) => (p.is_paid_off || p.is_impossible ? i.push({ ...p, minimumPayments: [] }) : a.push(ot(p)), [a, i]),
102
+ }, ge = (a, o) => {
103
+ const [r, t] = a.reduce(
104
+ ([n, i], p) => (p.is_paid_off || p.is_impossible ? i.push({ ...p, minimumPayments: [] }) : n.push(at(p)), [n, i]),
104
105
  [[], []]
105
106
  );
106
107
  switch (o) {
107
108
  case P.FASTEST_PAYOFF_FIRST:
108
- r.sort((a, i) => (a.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
109
+ r.sort((n, i) => (n.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
109
110
  break;
110
111
  case P.HIGHEST_INTEREST:
111
- r.sort((a, i) => (i.interest_rate ?? 0) - (a.interest_rate ?? 0));
112
+ r.sort((n, i) => (i.interest_rate ?? 0) - (n.interest_rate ?? 0));
112
113
  break;
113
114
  case P.LOWEST_BALANCE:
114
- r.sort((a, i) => a.balance - i.balance);
115
+ r.sort((n, i) => n.balance - i.balance);
115
116
  break;
116
117
  case P.HIGHEST_BALANCE:
117
- r.sort((a, i) => i.balance - a.balance);
118
+ r.sort((n, i) => i.balance - n.balance);
118
119
  break;
119
120
  default:
120
- r.sort((a, i) => a.balance - i.balance);
121
+ r.sort((n, i) => n.balance - i.balance);
121
122
  }
122
- n.splice(0, n.length, ...r, ...t);
123
+ a.splice(0, a.length, ...r, ...t);
123
124
  };
124
- function at(n, o, r = 0) {
125
- const t = n.map((m) => ({ ...m })).filter(
126
- (m) => m.interest_rate !== void 0 && m.monthly_payment !== void 0 && !m.is_paid_off
125
+ function ot(a, o, r = 0) {
126
+ const t = a.map((b) => ({ ...b })).filter(
127
+ (b) => b.interest_rate !== void 0 && b.monthly_payment !== void 0 && !b.is_paid_off
127
128
  );
128
129
  ge(t, o);
129
- let a = 0, i = 0;
130
+ let n = 0, i = 0;
130
131
  const p = /* @__PURE__ */ new Date(), c = /* @__PURE__ */ new Date();
131
- for (; t.some((m) => m.balance >= 0.01 && !m.is_impossible); ) {
132
- let m = !1;
133
- for (const [x, u] of t.entries()) {
132
+ for (; t.some((b) => b.balance >= 0.01 && !b.is_impossible); ) {
133
+ let b = !1;
134
+ for (const [f, u] of t.entries()) {
134
135
  if (u.balance <= 0.01 || u.is_impossible) continue;
135
- const M = (u.interest_rate ?? 0) / 100 / 12, F = u.balance * M;
136
+ const M = (u.interest_rate ?? 0) / 100 / 12, I = u.balance * M;
136
137
  let C = u.monthly_payment ?? 0;
137
- x === 0 && r && (C += r), u.balance += F;
138
- const A = Math.min(u.balance, C + i);
139
- if (A <= F) {
138
+ f === 0 && r && (C += r), u.balance += I;
139
+ const B = Math.min(u.balance, C + i);
140
+ if (B <= I) {
140
141
  u.is_impossible = !0;
141
142
  continue;
142
143
  }
143
- u.balance -= A, u.balance = u.balance < 0.01 ? 0 : u.balance, a += F, u.balance <= 0 && (i += C), A > 0 && (m = !0);
144
+ u.balance -= B, u.balance = u.balance < 0.01 ? 0 : u.balance, n += I, u.balance <= 0 && (i += C), B > 0 && (b = !0);
144
145
  }
145
- m && c.setMonth(c.getMonth() + 1);
146
+ b && c.setMonth(c.getMonth() + 1);
146
147
  }
147
- const d = t.some((m) => m.is_impossible && m.balance > 0), h = Ae({ start: p, end: c });
148
+ const d = t.some((b) => b.is_impossible && b.balance > 0), m = Te({ start: p, end: c });
148
149
  return {
149
- payoffSavings: d ? "N/A" : N(a, "0,0.00"),
150
- payoffDate: d ? "Never" : q(c, X.MONTH_YEAR),
151
- payoffDuration: d ? "Stagnant" : Ee(h, { format: ["years", "months"] }) || "0 months"
150
+ payoffSavings: d ? "N/A" : k(n, "0,0.00"),
151
+ payoffDate: d ? "Never" : K(c, U.MONTH_YEAR),
152
+ payoffDuration: d ? "Stagnant" : Ae(m, { format: ["years", "months"] }) || "0 months"
152
153
  };
153
154
  }
154
- const L = () => {
155
- if (!g.useContext(Pe))
155
+ const $ = () => {
156
+ if (!x.useContext(Me))
156
157
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
157
- return Z().uiStore;
158
- }, it = ({ debts: n, onClickCta: o, sx: r }) => {
159
- const t = V(), { isMobile: a } = K(), { debts: i } = v(), { selectedDebtPriority: p } = L(), { monthlyCashFlowProfile: c } = Y(), { payoffDate: d, payoffSavings: h, payoffDuration: m } = g.useMemo(() => {
160
- const x = c?.extra_payment ?? 0;
161
- return at(n, p, x);
162
- }, [n, p, c]);
158
+ return q().uiStore;
159
+ }, nt = ({ debts: a, onClickCta: o, sx: r }) => {
160
+ const t = X(), { isMobile: n } = Y(), { debts: i } = S(), { selectedDebtPriority: p } = $(), { monthlyCashFlowProfile: c } = V(), { payoffDate: d, payoffSavings: m, payoffDuration: b } = x.useMemo(() => {
161
+ const f = c?.extra_payment ?? 0;
162
+ return ot(a, p, f);
163
+ }, [a, p, c]);
163
164
  return /* @__PURE__ */ e(
164
- _e,
165
+ be,
165
166
  {
166
167
  sx: {
167
168
  boxShadow: t.shadows[2],
168
- width: a ? "100%" : "186px",
169
+ width: n ? "100%" : "186px",
169
170
  minWidth: "186px",
170
171
  ...r
171
172
  },
@@ -173,25 +174,25 @@ const L = () => {
173
174
  /* @__PURE__ */ s(
174
175
  _,
175
176
  {
176
- gap: a ? "4px" : "0",
177
+ gap: n ? "4px" : "0",
177
178
  sx: {
178
179
  borderBottom: "1px solid",
179
180
  borderBottomColor: t.palette.grey[300],
180
181
  pb: "8px"
181
182
  },
182
183
  children: [
183
- /* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_date_description }),
184
- /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "body2", children: d })
184
+ /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
185
+ /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "Small", children: d })
185
186
  ]
186
187
  }
187
188
  ),
188
- /* @__PURE__ */ s(_, { gap: a ? "4px" : "0", children: [
189
- /* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: h }),
190
- /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "caption", children: i.snowball_card_amount_description })
189
+ /* @__PURE__ */ s(_, { gap: n ? "4px" : "0", children: [
190
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: m }),
191
+ /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
191
192
  ] }),
192
- /* @__PURE__ */ s(_, { gap: a ? "4px" : "0", children: [
193
- /* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: m }),
194
- /* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_duration_description })
193
+ /* @__PURE__ */ s(_, { gap: n ? "4px" : "0", children: [
194
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: b }),
195
+ /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
195
196
  ] }),
196
197
  /* @__PURE__ */ e(
197
198
  l,
@@ -200,39 +201,39 @@ const L = () => {
200
201
  color: t.palette.primary.main,
201
202
  onClick: o,
202
203
  sx: { cursor: "pointer" },
203
- variant: "body2",
204
+ variant: "Small",
204
205
  children: i.snowball_card_cta
205
206
  }
206
207
  )
207
208
  ] })
208
209
  }
209
210
  );
210
- }, lt = S(it), st = ({ isOpen: n, onClose: o }) => {
211
- const r = V(), { debts: t } = v(), [a, i] = g.useState(!1);
211
+ }, it = D(nt), lt = ({ isOpen: a, onClose: o }) => {
212
+ const r = X(), { debts: t } = S(), [n, i] = x.useState(!1);
212
213
  return /* @__PURE__ */ e(
213
- re,
214
+ te,
214
215
  {
215
216
  ariaLabelClose: "",
216
- isOpen: n,
217
+ isOpen: a,
217
218
  onClose: o,
218
219
  title: t.snowball_drawer_title,
219
220
  children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
220
221
  /* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
221
222
  /* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
222
- /* @__PURE__ */ e(l, { mb: 12, variant: "h3", children: t.snowball_drawer_subtitle }),
223
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "body2", children: t.snowball_drawer_amount_description }),
224
- /* @__PURE__ */ e(l, { variant: "h1", children: t.snowball_drawer_savings }),
225
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "body2", children: t.snowball_drawer_duration_description })
223
+ /* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
224
+ /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
225
+ /* @__PURE__ */ e(l, { variant: "H1", children: t.snowball_drawer_savings }),
226
+ /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
226
227
  ] }),
227
- /* @__PURE__ */ s(_e, { sx: { display: "grid", py: 16, px: 24 }, children: [
228
- /* @__PURE__ */ e(l, { mb: 4, variant: "h3", children: t.snowball_drawer_question }),
228
+ /* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
229
+ /* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
229
230
  /* @__PURE__ */ e(
230
231
  l,
231
232
  {
232
233
  color: r.palette.secondary.main,
233
234
  mb: 8,
234
- sx: { whiteSpace: a ? "normal" : "nowrap" },
235
- variant: "subtitle2",
235
+ sx: { whiteSpace: n ? "normal" : "nowrap" },
236
+ variant: "ParagraphSmall",
236
237
  children: t.snowball_drawer_answer
237
238
  }
238
239
  ),
@@ -241,10 +242,10 @@ const L = () => {
241
242
  {
242
243
  bold: !0,
243
244
  color: r.palette.primary.main,
244
- onClick: () => i(!a),
245
+ onClick: () => i(!n),
245
246
  sx: { cursor: "pointer" },
246
- variant: "body2",
247
- children: a ? t.snowball_drawer_less : t.snowball_drawer_more
247
+ variant: "Small",
248
+ children: n ? t.snowball_drawer_less : t.snowball_drawer_more
248
249
  }
249
250
  )
250
251
  ] })
@@ -256,18 +257,18 @@ const L = () => {
256
257
  color: r.palette.secondary.main,
257
258
  px: 24,
258
259
  sx: { textAlign: "center", whiteSpace: "normal" },
259
- variant: "body2",
260
+ variant: "Small",
260
261
  children: t.snowball_drawer_disclaimer
261
262
  }
262
263
  ),
263
264
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
264
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: I(t.snowball_drawer_month_header, 1) }),
265
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
265
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 1) }),
266
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
266
267
  ] }),
267
268
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
268
269
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
269
270
  /* @__PURE__ */ e(
270
- W,
271
+ G,
271
272
  {
272
273
  sx: {
273
274
  display: "flex",
@@ -279,14 +280,14 @@ const L = () => {
279
280
  backgroundColor: r.palette.success.main,
280
281
  marginRight: 12
281
282
  },
282
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
283
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
283
284
  }
284
285
  ),
285
286
  /* @__PURE__ */ s(
286
287
  _,
287
288
  {
288
289
  sx: {
289
- borderBottom: `1px solid ${r.palette.neutral.light}`,
290
+ borderBottom: `1px solid ${r.palette.border.light}`,
290
291
  flexDirection: "row",
291
292
  flexGrow: 1,
292
293
  py: 14,
@@ -294,25 +295,25 @@ const L = () => {
294
295
  },
295
296
  children: [
296
297
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
297
- /* @__PURE__ */ e(l, { variant: "body1", children: I(t.snowball_drawer_debt_label, "A") }),
298
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
299
- I(
298
+ /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "A") }),
299
+ /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
300
+ E(
300
301
  t.snowball_drawer_rollover_explainer_pt1,
301
302
  "$100"
302
303
  ),
303
- /* @__PURE__ */ e("strong", { children: I(t.snowball_drawer_debt_label, "B") }),
304
+ /* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "B") }),
304
305
  t.snowball_drawer_rollover_explainer_pt2
305
306
  ] })
306
307
  ] }),
307
308
  /* @__PURE__ */ s(_, { children: [
308
- /* @__PURE__ */ e(l, { variant: "body1", children: "$100.00" }),
309
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$100.00" }),
309
310
  /* @__PURE__ */ e(
310
311
  l,
311
312
  {
312
313
  bold: !0,
313
314
  color: r.palette.success.main,
314
315
  textAlign: "end",
315
- variant: "tiny",
316
+ variant: "Tiny",
316
317
  children: t.snowball_drawer_paid_label
317
318
  }
318
319
  )
@@ -323,14 +324,14 @@ const L = () => {
323
324
  ] }),
324
325
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
325
326
  /* @__PURE__ */ e(
326
- W,
327
+ G,
327
328
  {
328
329
  sx: {
329
330
  width: 20,
330
331
  height: 20,
331
332
  marginRight: 12,
332
333
  borderRadius: "50%",
333
- border: `3px solid ${r.palette.neutral.dark}`
334
+ border: `3px solid ${r.palette.border.darker}`
334
335
  }
335
336
  }
336
337
  ),
@@ -338,35 +339,35 @@ const L = () => {
338
339
  _,
339
340
  {
340
341
  sx: {
341
- borderBottom: `1px solid ${r.palette.neutral.light}`,
342
+ borderBottom: `1px solid ${r.palette.border.light}`,
342
343
  flexDirection: "row",
343
344
  flexGrow: 1,
344
345
  py: 14,
345
346
  pr: 24
346
347
  },
347
348
  children: [
348
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: I(t.snowball_drawer_debt_label, "B") }),
349
- /* @__PURE__ */ e(l, { variant: "body1", children: "$400.00" })
349
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
350
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
350
351
  ]
351
352
  }
352
353
  )
353
354
  ] }),
354
355
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, py: 14, children: [
355
356
  /* @__PURE__ */ e(
356
- W,
357
+ G,
357
358
  {
358
359
  sx: {
359
360
  width: 20,
360
361
  height: 20,
361
362
  marginRight: 12,
362
363
  borderRadius: "50%",
363
- border: `3px solid ${r.palette.neutral.dark}`
364
+ border: `3px solid ${r.palette.border.darker}`
364
365
  }
365
366
  }
366
367
  ),
367
368
  /* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
368
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: I(t.snowball_drawer_debt_label, "C") }),
369
- /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
369
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
370
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
370
371
  ] })
371
372
  ] }),
372
373
  /* @__PURE__ */ s(
@@ -377,24 +378,24 @@ const L = () => {
377
378
  px: 24,
378
379
  flexDirection: "row",
379
380
  justifyContent: "space-between",
380
- borderTop: `1px solid ${r.palette.neutral.light}`,
381
- borderBottom: `1px solid ${r.palette.neutral.light}`
381
+ borderTop: `1px solid ${r.palette.border.light}`,
382
+ borderBottom: `1px solid ${r.palette.border.light}`
382
383
  },
383
384
  children: [
384
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
385
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
385
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
386
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
386
387
  ]
387
388
  }
388
389
  )
389
390
  ] }),
390
391
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
391
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: I(t.snowball_drawer_month_header, 2) }),
392
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
392
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 2) }),
393
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
393
394
  ] }),
394
395
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
395
396
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
396
397
  /* @__PURE__ */ e(
397
- W,
398
+ G,
398
399
  {
399
400
  sx: {
400
401
  display: "flex",
@@ -406,14 +407,14 @@ const L = () => {
406
407
  backgroundColor: r.palette.success.main,
407
408
  marginRight: 12
408
409
  },
409
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
410
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
410
411
  }
411
412
  ),
412
413
  /* @__PURE__ */ s(
413
414
  _,
414
415
  {
415
416
  sx: {
416
- borderBottom: `1px solid ${r.palette.neutral.light}`,
417
+ borderBottom: `1px solid ${r.palette.border.light}`,
417
418
  flexDirection: "row",
418
419
  flexGrow: 1,
419
420
  py: 14,
@@ -421,25 +422,25 @@ const L = () => {
421
422
  },
422
423
  children: [
423
424
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
424
- /* @__PURE__ */ e(l, { variant: "body1", children: I(t.snowball_drawer_debt_label, "B") }),
425
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
426
- I(
425
+ /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
426
+ /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
427
+ E(
427
428
  t.snowball_drawer_rollover_explainer_pt1,
428
429
  "$500"
429
430
  ),
430
- /* @__PURE__ */ e("strong", { children: I(t.snowball_drawer_debt_label, "C") }),
431
+ /* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "C") }),
431
432
  t.snowball_drawer_rollover_explainer_pt2
432
433
  ] })
433
434
  ] }),
434
435
  /* @__PURE__ */ s(_, { children: [
435
- /* @__PURE__ */ e(l, { variant: "body1", children: "$500.00" }),
436
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$500.00" }),
436
437
  /* @__PURE__ */ e(
437
438
  l,
438
439
  {
439
440
  bold: !0,
440
441
  color: r.palette.success.main,
441
442
  textAlign: "end",
442
- variant: "tiny",
443
+ variant: "Tiny",
443
444
  children: t.snowball_drawer_paid_label
444
445
  }
445
446
  )
@@ -450,14 +451,14 @@ const L = () => {
450
451
  ] }),
451
452
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
452
453
  /* @__PURE__ */ e(
453
- W,
454
+ G,
454
455
  {
455
456
  sx: {
456
457
  width: 20,
457
458
  height: 20,
458
459
  marginRight: 12,
459
460
  borderRadius: "50%",
460
- border: `3px solid ${r.palette.neutral.dark}`
461
+ border: `3px solid ${r.palette.border.darker}`
461
462
  }
462
463
  }
463
464
  ),
@@ -471,8 +472,8 @@ const L = () => {
471
472
  pr: 24
472
473
  },
473
474
  children: [
474
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: I(t.snowball_drawer_debt_label, "C") }),
475
- /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
475
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
476
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
476
477
  ]
477
478
  }
478
479
  )
@@ -485,24 +486,24 @@ const L = () => {
485
486
  px: 24,
486
487
  flexDirection: "row",
487
488
  justifyContent: "space-between",
488
- borderTop: `1px solid ${r.palette.neutral.light}`,
489
- borderBottom: `1px solid ${r.palette.neutral.light}`
489
+ borderTop: `1px solid ${r.palette.border.light}`,
490
+ borderBottom: `1px solid ${r.palette.border.light}`
490
491
  },
491
492
  children: [
492
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
493
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
493
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
494
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
494
495
  ]
495
496
  }
496
497
  )
497
498
  ] }),
498
499
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
499
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: I(t.snowball_drawer_month_header, 3) }),
500
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
500
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 3) }),
501
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
501
502
  ] }),
502
503
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
503
504
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
504
505
  /* @__PURE__ */ e(
505
- W,
506
+ G,
506
507
  {
507
508
  sx: {
508
509
  display: "flex",
@@ -514,7 +515,7 @@ const L = () => {
514
515
  backgroundColor: r.palette.success.main,
515
516
  marginRight: 12
516
517
  },
517
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
518
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
518
519
  }
519
520
  ),
520
521
  /* @__PURE__ */ s(
@@ -528,16 +529,16 @@ const L = () => {
528
529
  pr: 24
529
530
  },
530
531
  children: [
531
- /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "body1", children: I(t.snowball_drawer_debt_label, "C") }) }),
532
+ /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }) }),
532
533
  /* @__PURE__ */ s(_, { children: [
533
- /* @__PURE__ */ e(l, { variant: "body1", children: "$1,500.00" }),
534
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
534
535
  /* @__PURE__ */ e(
535
536
  l,
536
537
  {
537
538
  bold: !0,
538
539
  color: r.palette.success.main,
539
540
  textAlign: "end",
540
- variant: "tiny",
541
+ variant: "Tiny",
541
542
  children: t.snowball_drawer_paid_label
542
543
  }
543
544
  )
@@ -554,12 +555,12 @@ const L = () => {
554
555
  px: 24,
555
556
  flexDirection: "row",
556
557
  justifyContent: "space-between",
557
- borderTop: `1px solid ${r.palette.neutral.light}`,
558
- borderBottom: `1px solid ${r.palette.neutral.light}`
558
+ borderTop: `1px solid ${r.palette.border.light}`,
559
+ borderBottom: `1px solid ${r.palette.border.light}`
559
560
  },
560
561
  children: [
561
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
562
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
562
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
563
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
563
564
  ]
564
565
  }
565
566
  )
@@ -568,50 +569,50 @@ const L = () => {
568
569
  ] })
569
570
  }
570
571
  );
571
- }, ct = S(st), dt = "#FF7B08";
572
- function pt(n, o) {
573
- const [r, t, a] = n.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
572
+ }, st = D(lt), ct = "#FF7B08";
573
+ function dt(a, o) {
574
+ const [r, t, n] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
574
575
  Math.max(0, Math.min(255, Math.round(r * o))),
575
576
  Math.max(0, Math.min(255, Math.round(t * o))),
576
- Math.max(0, Math.min(255, Math.round(a * o)))
577
+ Math.max(0, Math.min(255, Math.round(n * o)))
577
578
  ];
578
579
  return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
579
580
  }
580
- const we = ({
581
- sx: n,
581
+ const xe = ({
582
+ sx: a,
582
583
  height: o = 500,
583
584
  width: r,
584
585
  debts: t,
585
- hoveredDebtGuid: a,
586
+ hoveredDebtGuid: n,
586
587
  onClickArea: i,
587
588
  onHoverArea: p
588
589
  }) => {
589
- const c = We(), { onEvent: d } = B(), h = t.filter((b) => !b.is_impossible), m = [
590
+ const c = $e(), { onEvent: d } = F(), m = t.filter((h) => !h.is_impossible), b = [
590
591
  ...new Set(
591
- h.flatMap((b) => b.dataset.map((f) => new Date(f.x).getTime()))
592
+ m.flatMap((h) => h.dataset.map((g) => new Date(g.x).getTime()))
592
593
  )
593
- ].sort((b, f) => b - f).map((b) => new Date(b)), x = h.map((b) => {
594
- const f = new Map(b.dataset.map((R) => [new Date(R.x).getTime(), R.y]));
595
- let E = f.get(m[0].getTime()) ?? 0;
596
- const $ = m.map((R) => {
597
- const z = f.get(R.getTime()) ?? E;
598
- return E = z, { x: R, y: z };
594
+ ].sort((h, g) => h - g).map((h) => new Date(h)), f = m.map((h) => {
595
+ const g = new Map(h.dataset.map((L) => [new Date(L.x).getTime(), L.y]));
596
+ let A = g.get(b[0].getTime()) ?? 0;
597
+ const R = b.map((L) => {
598
+ const O = g.get(L.getTime()) ?? A;
599
+ return A = O, { x: L, y: O };
599
600
  });
600
- return { ...b, dataset: $ };
601
- }), u = x.reduce(
602
- (b, f) => b + (f.dataset[0]?.y ?? 0),
601
+ return { ...h, dataset: R };
602
+ }), u = f.reduce(
603
+ (h, g) => h + (g.dataset[0]?.y ?? 0),
603
604
  0
604
- ), D = m.map((b, f) => {
605
- const E = f / (m.length - 1), $ = u * (1 - E);
606
- return { x: b, y: $ };
607
- }), M = Math.ceil(u / 100) * 100, F = m, C = x.map((b, f) => {
608
- const E = 1 - f / x.length * 0.5, $ = pt(dt, E);
605
+ ), v = b.map((h, g) => {
606
+ const A = g / (b.length - 1), R = u * (1 - A);
607
+ return { x: h, y: R };
608
+ }), M = Math.ceil(u / 100) * 100, I = b, C = f.map((h, g) => {
609
+ const A = 1 - g / f.length * 0.5, R = dt(ct, A);
609
610
  return {
610
- id: `debt-${f}`,
611
- guid: b.guid,
612
- label: b.name,
613
- data: b.dataset.map((R) => R.y),
614
- color: $,
611
+ id: `debt-${g}`,
612
+ guid: h.guid,
613
+ label: h.name,
614
+ data: h.dataset.map((L) => L.y),
615
+ color: R,
615
616
  curve: "linear",
616
617
  type: "line",
617
618
  area: !0,
@@ -622,7 +623,7 @@ const we = ({
622
623
  C.push({
623
624
  id: "payoff-line",
624
625
  label: "Payoff Line",
625
- data: D.map((b) => b.y),
626
+ data: v.map((h) => h.y),
626
627
  color: c.palette.grey[700],
627
628
  curve: "linear",
628
629
  type: "line",
@@ -630,9 +631,9 @@ const we = ({
630
631
  showMark: !1,
631
632
  disableHighlight: !0
632
633
  });
633
- const A = (b) => C.findIndex((f) => f?.guid === b);
634
+ const B = (h) => C.findIndex((g) => g?.guid === h);
634
635
  return /* @__PURE__ */ e(
635
- ne,
636
+ re,
636
637
  {
637
638
  sx: {
638
639
  width: "100%",
@@ -652,22 +653,20 @@ const we = ({
652
653
  axisHighlight: { x: "none" },
653
654
  disableLineItemHighlight: !0,
654
655
  height: o,
655
- onAreaClick: (b, f) => {
656
+ hideLegend: !0,
657
+ margin: { bottom: 24, left: 32, right: 72, top: 48 },
658
+ onAreaClick: (h, g) => {
656
659
  i?.();
657
- const E = C.find(($) => $.id === f.seriesId);
658
- d(T.DEBTS_CLICK_CHART_AREA, { account_guid: E?.guid });
660
+ const A = C.find((R) => R.id === g.seriesId);
661
+ d(T.DEBTS_CLICK_CHART_AREA, { account_guid: A?.guid });
659
662
  },
660
- onHighlightChange: (b) => {
661
- const f = C.find((E) => E.id === b?.seriesId)?.guid;
662
- p?.(f ?? "");
663
+ onHighlightChange: (h) => {
664
+ const g = C.find((A) => A.id === h?.seriesId)?.guid;
665
+ p?.(g ?? "");
663
666
  },
664
667
  series: C,
665
668
  skipAnimation: !0,
666
- slotProps: {
667
- legend: {
668
- hidden: !0
669
- }
670
- },
669
+ slotProps: { tooltip: { trigger: "none" } },
671
670
  sx: {
672
671
  p: 4,
673
672
  "& .MuiBarLabel-root": {
@@ -685,26 +684,26 @@ const we = ({
685
684
  strokeDasharray: "10 5",
686
685
  strokeWidth: 1
687
686
  },
688
- [`& .MuiLineElement-series-debt-${A(a ?? "0")}`]: {
687
+ [`& .MuiLineElement-series-debt-${B(n ?? "0")}`]: {
689
688
  opacity: 1
690
689
  },
691
- [`& .MuiAreaElement-series-debt-${A(a ?? "0")}`]: {
690
+ [`& .MuiAreaElement-series-debt-${B(n ?? "0")}`]: {
692
691
  opacity: 1
693
692
  },
694
693
  "& .MuiChartsAxis-tickLabel > tspan": {
695
- fontFamily: c.typography.body2.fontFamily
694
+ fontFamily: c.typography.Small.fontFamily
696
695
  },
697
- ...n
696
+ ...a
698
697
  },
699
- tooltip: { trigger: "none" },
700
698
  width: r,
701
699
  xAxis: [
702
700
  {
703
- data: F,
704
- scaleType: "time",
705
- min: m[0],
701
+ data: I,
706
702
  disableTicks: !0,
707
- valueFormatter: (b) => q(b, X.MONTH_SHORT_YEAR)
703
+ min: b[0],
704
+ scaleType: "time",
705
+ tickLabelMinGap: 24,
706
+ valueFormatter: (h) => K(h, U.MONTH_SHORT_YEAR)
708
707
  }
709
708
  ],
710
709
  yAxis: [
@@ -712,18 +711,18 @@ const we = ({
712
711
  min: 0,
713
712
  max: M,
714
713
  disableTicks: !0,
715
- valueFormatter: (b) => N(b, "0a")
714
+ valueFormatter: (h) => k(h, "0a")
716
715
  }
717
716
  ]
718
717
  }
719
718
  )
720
719
  }
721
720
  );
722
- }, ht = () => {
723
- const n = V(), { debts: o } = v(), { selectedDebtChartData: r } = L();
724
- return /* @__PURE__ */ s(O, { children: [
721
+ }, pt = () => {
722
+ const a = X(), { debts: o } = S(), { selectedDebtChartData: r } = $();
723
+ return /* @__PURE__ */ s(H, { children: [
725
724
  /* @__PURE__ */ s(
726
- Le,
725
+ Fe,
727
726
  {
728
727
  sx: {
729
728
  "& .MuiCardContent-root:last-child": {
@@ -731,42 +730,42 @@ const we = ({
731
730
  }
732
731
  },
733
732
  children: [
734
- /* @__PURE__ */ e(Oe, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Se, { sx: { pb: 4 }, children: o.details_chart_title }) }),
735
- /* @__PURE__ */ e($e, { sx: { p: 0 }, children: /* @__PURE__ */ e(we, { debts: [r], height: 250 }) })
733
+ /* @__PURE__ */ e(Le, { sx: { pb: 0 }, title: /* @__PURE__ */ e(ve, { sx: { pb: 4 }, children: o.details_chart_title }) }),
734
+ /* @__PURE__ */ e(Re, { sx: { p: 0 }, children: /* @__PURE__ */ e(xe, { debts: [r], height: 250 }) })
736
735
  ]
737
736
  }
738
737
  ),
739
738
  /* @__PURE__ */ e(
740
739
  l,
741
740
  {
742
- color: n.palette.text.secondary,
741
+ color: a.palette.text.secondary,
743
742
  sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
744
- variant: "body2",
743
+ variant: "Small",
745
744
  children: o.details_chart_description
746
745
  }
747
746
  )
748
747
  ] });
749
- }, ut = S(ht), mt = () => {
750
- const n = V(), { onEvent: o } = B(), { debts: r } = v(), { selectedDebtChartData: t, showCompleted: a, showError: i } = L();
751
- return g.useEffect(() => o(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(ye, { children: i || a ? /* @__PURE__ */ e(
748
+ }, mt = D(pt), ht = () => {
749
+ const a = X(), { onEvent: o } = F(), { debts: r } = S(), { selectedDebtChartData: t, showCompleted: n, showError: i } = $();
750
+ return x.useEffect(() => o(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(_e, { children: i || n ? /* @__PURE__ */ e(
752
751
  l,
753
752
  {
754
- color: n.palette.secondary.main,
753
+ color: a.palette.secondary.main,
755
754
  component: "div",
756
755
  sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
757
- variant: "body2",
756
+ variant: "Small",
758
757
  children: i ? r.schedule_error_message : r.schedule_complete_message
759
758
  }
760
- ) : /* @__PURE__ */ s(O, { children: [
759
+ ) : /* @__PURE__ */ s(H, { children: [
761
760
  /* @__PURE__ */ s(w, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
762
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.schedule_month_heading }),
763
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.schedule_amount_heading })
761
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_month_heading }),
762
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_amount_heading })
764
763
  ] }),
765
- t.dataset.slice(1).map(({ x: p, y: c, payment: d }) => /* @__PURE__ */ e(w, { bgcolor: n.palette.background.paper, children: /* @__PURE__ */ e(w, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
764
+ t.dataset.slice(1).map(({ x: p, y: c, payment: d }) => /* @__PURE__ */ e(w, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(w, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
766
765
  w,
767
766
  {
768
767
  sx: {
769
- borderBottom: `1px solid ${n.palette.neutral.light}`,
768
+ borderBottom: `1px solid ${a.palette.border.light}`,
770
769
  flexDirection: "row",
771
770
  flexGrow: 1,
772
771
  py: 14,
@@ -774,19 +773,19 @@ const we = ({
774
773
  },
775
774
  children: [
776
775
  /* @__PURE__ */ s(w, { flexGrow: 1, children: [
777
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: q(p, X.MONTH_YEAR) }),
778
- /* @__PURE__ */ e(l, { color: n.palette.secondary.main, variant: "caption", children: r.schedule_month_label })
776
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(p, U.MONTH_YEAR) }),
777
+ /* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: r.schedule_month_label })
779
778
  ] }),
780
779
  /* @__PURE__ */ s(w, { children: [
781
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: N(c, "0,0.00") }),
780
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: k(c, "0,0.00") }),
782
781
  /* @__PURE__ */ e(
783
782
  l,
784
783
  {
785
784
  bold: !0,
786
- color: n.palette.success.main,
785
+ color: a.palette.success.main,
787
786
  textAlign: "end",
788
- variant: "tiny",
789
- children: `+${N(d, "0,0")}`
787
+ variant: "Tiny",
788
+ children: `+${k(d, "0,0")}`
790
789
  }
791
790
  )
792
791
  ] })
@@ -804,135 +803,135 @@ const we = ({
804
803
  px: 24
805
804
  },
806
805
  children: [
807
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: r.schedule_payoff_label }),
808
- /* @__PURE__ */ e(l, { variant: "body1", children: "-" })
806
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: r.schedule_payoff_label }),
807
+ /* @__PURE__ */ e(l, { variant: "Body", children: "-" })
809
808
  ]
810
809
  }
811
810
  ) })
812
811
  ] }) });
813
- }, bt = S(mt), _t = S(({ debt: n }) => {
814
- const { debts: o } = v(), { updateAccount: r } = J(), { onEvent: t } = B(), [a, i] = g.useState(n.interest_rate ?? 0), p = a < 0, c = async () => {
815
- await r({ ...n.account, interest_rate: a }), n.interest_rate = a, t(T.DEBTS_SAVE_RATE_ACTION, { account_guid: n.guid });
812
+ }, ut = D(ht), bt = D(({ debt: a }) => {
813
+ const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.interest_rate ?? 0), p = n < 0, c = async () => {
814
+ await r({ ...a.account, interest_rate: n }), a.interest_rate = n, t(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
816
815
  }, d = () => {
817
816
  setTimeout(() => {
818
- i(n.interest_rate ?? 0);
817
+ i(a.interest_rate ?? 0);
819
818
  }, 250);
820
819
  };
821
820
  return /* @__PURE__ */ e(
822
- Q,
821
+ J,
823
822
  {
824
823
  isSaveDisabled: p,
825
824
  label: `${o.details_interest_rate} (%)`,
826
825
  onCancel: d,
827
826
  onSave: c,
828
827
  primaryText: o.details_interest_rate,
829
- secondaryText: ke(Number(n.interest_rate) / 100),
830
- zeroStateText: n.interest_rate ? void 0 : o.add_interest_rate,
828
+ secondaryText: Be(Number(a.interest_rate) / 100),
829
+ zeroStateText: a.interest_rate ? void 0 : o.add_interest_rate,
831
830
  children: /* @__PURE__ */ e(
832
- Ke,
831
+ Xe,
833
832
  {
834
833
  error: p,
835
834
  fullWidth: !0,
836
- onChange: (h) => i(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
835
+ onChange: (m) => i(isNaN(parseFloat(m.target.value)) ? 0 : parseFloat(m.target.value)),
837
836
  type: "number",
838
- value: a
837
+ value: n
839
838
  }
840
839
  )
841
840
  }
842
841
  );
843
- }), yt = S(({ debt: n }) => {
844
- const { debts: o } = v(), { updateAccount: r } = J(), { onEvent: t } = B(), [a, i] = g.useState(n.monthly_payment ?? 0), p = a < 0 || a > 9999999999e-2, c = async () => {
845
- await r({ ...n.account, minimum_payment: a }), n.monthly_payment = a, t(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: n.guid });
842
+ }), _t = D(({ debt: a }) => {
843
+ const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.monthly_payment ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
844
+ await r({ ...a.account, minimum_payment: n }), a.monthly_payment = n, t(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
846
845
  }, d = () => {
847
846
  setTimeout(() => {
848
- i(n.monthly_payment ?? 0);
847
+ i(a.monthly_payment ?? 0);
849
848
  }, 250);
850
849
  };
851
850
  return /* @__PURE__ */ e(
852
- Q,
851
+ J,
853
852
  {
854
853
  isSaveDisabled: p,
855
854
  label: o.details_monthly_payment,
856
855
  onCancel: d,
857
856
  onSave: c,
858
857
  primaryText: o.details_monthly_payment,
859
- secondaryText: N(n.monthly_payment, "0,0"),
860
- zeroStateText: n.monthly_payment ? void 0 : o.add_monthly_payment,
858
+ secondaryText: k(a.monthly_payment, "0,0"),
859
+ zeroStateText: a.monthly_payment ? void 0 : o.add_monthly_payment,
861
860
  children: /* @__PURE__ */ e(
862
- oe,
861
+ ae,
863
862
  {
864
- amount: a,
863
+ amount: n,
865
864
  autoFocus: !0,
866
865
  error: p,
867
866
  fullWidth: !0,
868
867
  minAmount: 0,
869
- setAmount: (h) => i(isNaN(Number(h)) ? a : Number(h)),
870
- sx: { ".MuiTypography-body1": { p: 0 } }
868
+ setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
869
+ sx: { ".MuiTypography-Body": { p: 0 } }
871
870
  }
872
871
  )
873
872
  }
874
873
  );
875
- }), ft = S(({ debt: n }) => {
876
- const { debts: o } = v(), { updateAccount: r } = J(), { onEvent: t } = B(), [a, i] = g.useState(n.original_balance ?? 0), p = a < 0 || a > 9999999999e-2, c = async () => {
877
- await r({ ...n.account, original_balance: a }), n.original_balance = a, t(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: n.guid });
874
+ }), yt = D(({ debt: a }) => {
875
+ const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.original_balance ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
876
+ await r({ ...a.account, original_balance: n }), a.original_balance = n, t(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
878
877
  }, d = () => {
879
878
  setTimeout(() => {
880
- i(n.original_balance ?? 0);
879
+ i(a.original_balance ?? 0);
881
880
  }, 250);
882
881
  };
883
882
  return /* @__PURE__ */ e(
884
- Q,
883
+ J,
885
884
  {
886
885
  isSaveDisabled: p,
887
886
  label: o.details_original_balance,
888
887
  onCancel: d,
889
888
  onSave: c,
890
889
  primaryText: o.details_original_balance,
891
- secondaryText: N(n.original_balance, "0,0"),
892
- zeroStateText: n.original_balance ? void 0 : o.add_original_balance,
890
+ secondaryText: k(a.original_balance, "0,0"),
891
+ zeroStateText: a.original_balance ? void 0 : o.add_original_balance,
893
892
  children: /* @__PURE__ */ e(
894
- oe,
893
+ ae,
895
894
  {
896
- amount: a,
895
+ amount: n,
897
896
  autoFocus: !0,
898
897
  error: p,
899
898
  fullWidth: !0,
900
899
  minAmount: 0,
901
- setAmount: (h) => i(isNaN(Number(h)) ? a : Number(h)),
902
- sx: { ".MuiTypography-body1": { p: 0 } }
900
+ setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
901
+ sx: { ".MuiTypography-Body": { p: 0 } }
903
902
  }
904
903
  )
905
904
  }
906
905
  );
907
- }), xt = () => {
908
- const { onEvent: n } = B(), { selectedDebtChartData: o } = L();
909
- return g.useEffect(() => n(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(w, { bgcolor: "background.paper", children: [
910
- o?.goal && /* @__PURE__ */ s(O, { children: [
906
+ }), ft = () => {
907
+ const { onEvent: a } = F(), { selectedDebtChartData: o } = $();
908
+ return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(w, { bgcolor: "background.paper", children: [
909
+ o?.goal && /* @__PURE__ */ s(H, { children: [
910
+ /* @__PURE__ */ e(Ge, { goal: o.goal }),
911
+ /* @__PURE__ */ e(j, {}),
912
+ /* @__PURE__ */ e(je, { goal: o.goal }),
913
+ /* @__PURE__ */ e(j, {}),
911
914
  /* @__PURE__ */ e(ze, { goal: o.goal }),
912
- /* @__PURE__ */ e(G, {}),
913
- /* @__PURE__ */ e(Ve, { goal: o.goal }),
914
- /* @__PURE__ */ e(G, {}),
915
- /* @__PURE__ */ e(Ye, { goal: o.goal }),
916
- /* @__PURE__ */ e(G, {})
915
+ /* @__PURE__ */ e(j, {})
917
916
  ] }),
918
- !o?.goal && o?.account && /* @__PURE__ */ s(O, { children: [
919
- /* @__PURE__ */ e(yt, { debt: o }),
920
- /* @__PURE__ */ e(G, {}),
917
+ !o?.goal && o?.account && /* @__PURE__ */ s(H, { children: [
921
918
  /* @__PURE__ */ e(_t, { debt: o }),
922
- /* @__PURE__ */ e(G, {}),
923
- /* @__PURE__ */ e(ft, { debt: o }),
924
- /* @__PURE__ */ e(G, {})
919
+ /* @__PURE__ */ e(j, {}),
920
+ /* @__PURE__ */ e(bt, { debt: o }),
921
+ /* @__PURE__ */ e(j, {}),
922
+ /* @__PURE__ */ e(yt, { debt: o }),
923
+ /* @__PURE__ */ e(j, {})
925
924
  ] })
926
925
  ] });
927
- }, gt = S(xt), wt = ({ setTabValue: n, sx: o }) => {
928
- const { debts: r } = v(), { showError: t, showCompleted: a } = L();
929
- return g.useEffect(() => {
930
- t && n(1);
931
- }, [t]), !t && !a ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ s(w, { gap: 16, children: [
932
- /* @__PURE__ */ e(me, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
933
- he,
926
+ }, gt = D(ft), xt = ({ setTabValue: a, sx: o }) => {
927
+ const { debts: r } = S(), { showError: t, showCompleted: n } = $();
928
+ return x.useEffect(() => {
929
+ t && a(1);
930
+ }, [t]), !t && !n ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ s(w, { gap: 16, children: [
931
+ /* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
932
+ pe,
934
933
  {
935
- icon: t ? /* @__PURE__ */ e(Ue, { filled: !0 }) : /* @__PURE__ */ e(fe, { color: "success", filled: !0 }),
934
+ icon: t ? /* @__PURE__ */ e(Ve, { filled: !0 }) : /* @__PURE__ */ e(ye, { color: "success", filled: !0 }),
936
935
  severity: "error",
937
936
  sx: {
938
937
  alignItems: "start",
@@ -945,15 +944,15 @@ const we = ({
945
944
  }
946
945
  },
947
946
  children: [
948
- /* @__PURE__ */ e(ue, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: t ? r.status_error_title : r.status_complete_title }),
949
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: t ? r.status_error_description : r.status_complete_description })
947
+ /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: t ? r.status_error_title : r.status_complete_title }),
948
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: t ? r.status_error_description : r.status_complete_description })
950
949
  ]
951
950
  }
952
951
  ) }),
953
- t && /* @__PURE__ */ e(me, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
954
- he,
952
+ t && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
953
+ pe,
955
954
  {
956
- icon: /* @__PURE__ */ e(O, {}),
955
+ icon: /* @__PURE__ */ e(H, {}),
957
956
  severity: "error",
958
957
  sx: {
959
958
  borderRadius: 2,
@@ -963,66 +962,66 @@ const we = ({
963
962
  }
964
963
  },
965
964
  children: [
966
- /* @__PURE__ */ e(ue, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: r.status_info_title }),
967
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: r.status_info_description })
965
+ /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r.status_info_title }),
966
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r.status_info_description })
968
967
  ]
969
968
  }
970
969
  ) })
971
970
  ] });
972
- }, Ct = S(wt), vt = () => {
973
- const { debts: n } = v(), { showError: o, showCompleted: r } = L(), [t, a] = g.useState(0);
974
- return /* @__PURE__ */ s(O, { children: [
975
- (o || r) && /* @__PURE__ */ e(Ct, { setTabValue: a, sx: { mt: -24 } }),
971
+ }, wt = D(xt), Ct = () => {
972
+ const { debts: a } = S(), { showError: o, showCompleted: r } = $(), [t, n] = x.useState(0);
973
+ return /* @__PURE__ */ s(H, { children: [
974
+ (o || r) && /* @__PURE__ */ e(wt, { setTabValue: n, sx: { mt: -24 } }),
976
975
  /* @__PURE__ */ s(
977
- je,
976
+ We,
978
977
  {
979
- "aria-label": n.details_tabs_aria_label,
978
+ "aria-label": a.details_tabs_aria_label,
980
979
  centered: !0,
981
- onChange: (i, p) => a(p),
980
+ onChange: (i, p) => n(p),
982
981
  textColor: "primary",
983
982
  value: t,
984
983
  variant: "fullWidth",
985
984
  children: [
986
985
  /* @__PURE__ */ e(
987
- pe,
986
+ de,
988
987
  {
989
988
  "aria-controls": "debt-schedule-tabpanel-0",
990
989
  id: "debt-schedule-tab-0",
991
- label: n.schedule_tab_label
990
+ label: a.schedule_tab_label
992
991
  }
993
992
  ),
994
993
  /* @__PURE__ */ e(
995
- pe,
994
+ de,
996
995
  {
997
996
  "aria-controls": "debt-details-tabpanel-1",
998
997
  id: "debt-details-tab-1",
999
- label: n.details_tab_label
998
+ label: a.details_tab_label
1000
999
  }
1001
1000
  )
1002
1001
  ]
1003
1002
  }
1004
1003
  ),
1005
- /* @__PURE__ */ e(be, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(bt, {}) }),
1006
- /* @__PURE__ */ e(be, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(gt, {}) })
1004
+ /* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(ut, {}) }),
1005
+ /* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(gt, {}) })
1007
1006
  ] });
1008
- }, Dt = S(vt), St = ({ isOpen: n, onClose: o }) => {
1009
- const { debts: r } = v(), { showError: t, showCompleted: a } = L(), i = t || a ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ e(ut, {});
1007
+ }, St = D(Ct), vt = ({ isOpen: a, onClose: o }) => {
1008
+ const { debts: r } = S(), { showError: t, showCompleted: n } = $(), i = t || n ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ e(mt, {});
1010
1009
  return /* @__PURE__ */ e(
1011
- re,
1010
+ te,
1012
1011
  {
1013
1012
  ariaLabelClose: r.details_close_aria,
1014
- isOpen: n,
1013
+ isOpen: a,
1015
1014
  onClose: o,
1016
1015
  title: r.details_title,
1017
1016
  children: /* @__PURE__ */ s(w, { bgcolor: "background.default", children: [
1018
- /* @__PURE__ */ e(Be, { customDetailsChart: i }),
1019
- /* @__PURE__ */ e(Dt, {})
1017
+ /* @__PURE__ */ e(ke, { customDetailsChart: i }),
1018
+ /* @__PURE__ */ e(St, {})
1020
1019
  ] })
1021
1020
  }
1022
1021
  );
1023
- }, Tt = S(() => {
1024
- const { debts: n } = v(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } = Y(), { onEvent: t } = B(), [a, i] = g.useState(o?.extra_payment ?? 0), p = a < 0 || a > 9999999999e-2, c = async () => {
1025
- o && (await r({ ...o, extra_payment: a }), o.extra_payment = a, t(T.DEBTS_SAVE_PAYDOWN_ACTION, {
1022
+ }, Dt = D(() => {
1023
+ const { debts: a } = S(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } = V(), { onEvent: t } = F(), [n, i] = x.useState(o?.extra_payment ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
1024
+ o && (await r({ ...o, extra_payment: n }), o.extra_payment = n, t(T.DEBTS_SAVE_PAYDOWN_ACTION, {
1026
1025
  user_guid: o?.user_guid
1027
1026
  }));
1028
1027
  }, d = () => {
@@ -1031,83 +1030,83 @@ const we = ({
1031
1030
  }, 250);
1032
1031
  };
1033
1032
  return /* @__PURE__ */ e(
1034
- Q,
1033
+ J,
1035
1034
  {
1036
1035
  isSaveDisabled: p,
1037
- label: n.paydown_drawer_extra_payment,
1036
+ label: a.paydown_drawer_extra_payment,
1038
1037
  onCancel: d,
1039
1038
  onSave: c,
1040
- primaryText: n.paydown_drawer_extra_payment,
1041
- secondaryText: N(o?.extra_payment, "0,0"),
1042
- zeroStateText: o?.extra_payment ? void 0 : n.add_extra_payment,
1039
+ primaryText: a.paydown_drawer_extra_payment,
1040
+ secondaryText: k(o?.extra_payment, "0,0"),
1041
+ zeroStateText: o?.extra_payment ? void 0 : a.add_extra_payment,
1043
1042
  children: /* @__PURE__ */ e(
1044
- oe,
1043
+ ae,
1045
1044
  {
1046
- amount: a,
1045
+ amount: n,
1047
1046
  autoFocus: !0,
1048
1047
  error: p,
1049
1048
  fullWidth: !0,
1050
1049
  minAmount: 0,
1051
- setAmount: (h) => i(isNaN(Number(h)) ? a : Number(h)),
1052
- sx: { ".MuiTypography-body1": { p: 0 } }
1050
+ setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
1051
+ sx: { ".MuiTypography-Body": { p: 0 } }
1053
1052
  }
1054
1053
  )
1055
1054
  }
1056
1055
  );
1057
- }), At = () => {
1058
- const { debts: n } = v(), { totalMonthlyPayments: o } = Z(), { monthlyCashFlowProfile: r } = Y(), t = o + Number(r?.extra_payment);
1056
+ }), Tt = () => {
1057
+ const { debts: a } = S(), { totalMonthlyPayments: o } = q(), { monthlyCashFlowProfile: r } = V(), t = o + Number(r?.extra_payment);
1059
1058
  return /* @__PURE__ */ s(w, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1060
1059
  /* @__PURE__ */ s(w, { p: 24, children: [
1061
1060
  /* @__PURE__ */ s(w, { alignItems: "center", gap: 4, mb: 24, children: [
1062
- /* @__PURE__ */ e(l, { variant: "body1", children: n.paydown_drawer_mimimum_label }),
1063
- /* @__PURE__ */ e(l, { bold: !0, variant: "h1", children: N(o, "0,0") }),
1064
- /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "body2", width: 208, children: n.paydown_drawer_minimum_info })
1061
+ /* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
1062
+ /* @__PURE__ */ e(l, { bold: !0, variant: "H1", children: k(o, "0,0") }),
1063
+ /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
1065
1064
  ] }),
1066
1065
  /* @__PURE__ */ s(w, { children: [
1067
- /* @__PURE__ */ e(l, { variant: "h3", children: n.paydown_drawer_subtitle }),
1068
- /* @__PURE__ */ e(l, { truncate: !1, variant: "subtitle2", children: n.paydown_drawer_description })
1066
+ /* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
1067
+ /* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1069
1068
  ] })
1070
1069
  ] }),
1071
- /* @__PURE__ */ e(w, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Tt, {}) }),
1070
+ /* @__PURE__ */ e(w, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Dt, {}) }),
1072
1071
  /* @__PURE__ */ e(w, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(w, { gap: 4, children: [
1073
- /* @__PURE__ */ e(l, { variant: "body2", children: n.paydown_drawer_total_payment }),
1074
- /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "body1", children: N(t, "0,0") })
1072
+ /* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
1073
+ /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: k(t, "0,0") })
1075
1074
  ] }) })
1076
1075
  ] });
1077
- }, Et = S(At), It = ({ isOpen: n, onClose: o }) => {
1078
- const { debts: r } = v();
1076
+ }, At = D(Tt), Et = ({ isOpen: a, onClose: o }) => {
1077
+ const { debts: r } = S();
1079
1078
  return /* @__PURE__ */ e(
1080
- re,
1079
+ te,
1081
1080
  {
1082
1081
  ariaLabelClose: r.paydown_drawer_close_aria,
1083
- isOpen: n,
1082
+ isOpen: a,
1084
1083
  onClose: o,
1085
1084
  title: r.paydown_drawer_title,
1086
- children: /* @__PURE__ */ e(Et, {})
1085
+ children: /* @__PURE__ */ e(At, {})
1087
1086
  }
1088
1087
  );
1089
1088
  };
1090
- function Mt(n, o) {
1089
+ function It(a, o) {
1091
1090
  const r = (t) => {
1092
1091
  if (typeof t == "number") return t;
1093
1092
  if (t === "!" || t === "✓") return 1 / 0;
1094
1093
  throw new Error("Unsupported value");
1095
1094
  };
1096
- return r(n) - r(o);
1095
+ return r(a) - r(o);
1097
1096
  }
1098
- function kt(n) {
1099
- return n.is_paid_off ? "✓" : n.priority === void 0 || n.is_impossible ? "!" : n.priority;
1097
+ function Bt(a) {
1098
+ return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
1100
1099
  }
1101
- const Pt = (n) => {
1100
+ const Mt = (a) => {
1102
1101
  const o = {
1103
1102
  text: "#121417",
1104
1103
  background: "#FFB252"
1105
1104
  };
1106
- return n === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), n === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
1107
- }, Nt = (n) => {
1108
- const o = String(n.formattedValue), r = Pt(o);
1105
+ return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
1106
+ }, Pt = (a) => {
1107
+ const o = String(a.formattedValue), r = Mt(o);
1109
1108
  return /* @__PURE__ */ e(
1110
- ne,
1109
+ re,
1111
1110
  {
1112
1111
  sx: {
1113
1112
  display: "flex",
@@ -1120,40 +1119,40 @@ const Pt = (n) => {
1120
1119
  backgroundColor: r.background,
1121
1120
  marginLeft: "10px"
1122
1121
  },
1123
- children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "body2", children: o })
1122
+ children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "Small", children: o })
1124
1123
  }
1125
1124
  );
1126
- }, Ft = (n) => {
1127
- const o = n.row.account, r = Xe[o.account_type];
1125
+ }, kt = (a) => {
1126
+ const o = a.row.account, r = Ke[o.account_type];
1128
1127
  return /* @__PURE__ */ s(w, { alignItems: "center", flexDirection: "row", children: [
1129
1128
  /* @__PURE__ */ e(
1130
- Te,
1129
+ De,
1131
1130
  {
1132
1131
  alt: `${o.institutionName}`,
1133
1132
  institutionGuid: o.institution_guid || ""
1134
1133
  }
1135
1134
  ),
1136
1135
  /* @__PURE__ */ s(w, { ml: 12, children: [
1137
- /* @__PURE__ */ e(l, { variant: "body2", children: o.name }),
1138
- /* @__PURE__ */ e(l, { variant: "caption", children: r })
1136
+ /* @__PURE__ */ e(l, { variant: "Small", children: o.name }),
1137
+ /* @__PURE__ */ e(l, { variant: "XSmall", children: r })
1139
1138
  ] })
1140
1139
  ] });
1141
- }, Bt = ({
1142
- sx: n = {},
1140
+ }, Nt = ({
1141
+ sx: a = {},
1143
1142
  debts: o,
1144
1143
  hoveredDebtGuid: r,
1145
1144
  onHoverRow: t,
1146
- onClickRow: a
1145
+ onClickRow: n
1147
1146
  }) => {
1148
- const i = V(), { onEvent: p } = B(), { isMobile: c } = K(), { debts: d } = v(), [h, m] = g.useState([
1147
+ const i = X(), { onEvent: p } = F(), { isMobile: c } = Y(), { debts: d } = S(), [m, b] = x.useState([
1149
1148
  { field: "priority", sort: "asc" }
1150
- ]), x = [
1149
+ ]), f = [
1151
1150
  {
1152
1151
  field: "priority",
1153
1152
  headerName: d.table_column_priority,
1154
- renderHeader: j,
1155
- renderCell: Nt,
1156
- sortComparator: Mt,
1153
+ renderHeader: z,
1154
+ renderCell: Pt,
1155
+ sortComparator: It,
1157
1156
  sortable: !0,
1158
1157
  hideSortIcons: !0,
1159
1158
  type: "custom",
@@ -1165,8 +1164,8 @@ const Pt = (n) => {
1165
1164
  {
1166
1165
  field: "account",
1167
1166
  headerName: d.table_column_account,
1168
- renderHeader: j,
1169
- renderCell: Ft,
1167
+ renderHeader: z,
1168
+ renderCell: kt,
1170
1169
  sortable: !1,
1171
1170
  type: "custom",
1172
1171
  align: "left",
@@ -1177,8 +1176,8 @@ const Pt = (n) => {
1177
1176
  {
1178
1177
  field: "balance",
1179
1178
  headerName: d.table_column_balance,
1180
- renderHeader: j,
1181
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: N(y.value, "0,0") }),
1179
+ renderHeader: z,
1180
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: k(y.value, "0,0") }),
1182
1181
  sortable: !0,
1183
1182
  hideSortIcons: c,
1184
1183
  type: "number",
@@ -1190,8 +1189,8 @@ const Pt = (n) => {
1190
1189
  {
1191
1190
  field: "interest_rate",
1192
1191
  headerName: d.table_column_interest_rate,
1193
- renderHeader: j,
1194
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
1192
+ renderHeader: z,
1193
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
1195
1194
  sortable: !0,
1196
1195
  hideSortIcons: c,
1197
1196
  type: "number",
@@ -1203,8 +1202,8 @@ const Pt = (n) => {
1203
1202
  {
1204
1203
  field: "projected_payoff_date",
1205
1204
  headerName: d.table_column_payoff_date,
1206
- renderHeader: j,
1207
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: y.value ? q(y.value, X.MONTH_SHORT_YEAR) : "---" }),
1205
+ renderHeader: z,
1206
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: y.value ? K(y.value, U.MONTH_SHORT_YEAR) : "---" }),
1208
1207
  sortable: !0,
1209
1208
  hideSortIcons: c,
1210
1209
  type: "number",
@@ -1216,8 +1215,8 @@ const Pt = (n) => {
1216
1215
  {
1217
1216
  field: "monthly_payment",
1218
1217
  headerName: d.table_column_amount_due,
1219
- renderHeader: j,
1220
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: typeof y.value == "number" ? N(y.value, "0,0") : "---" }),
1218
+ renderHeader: z,
1219
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: typeof y.value == "number" ? k(y.value, "0,0") : "---" }),
1221
1220
  sortable: !0,
1222
1221
  hideSortIcons: c,
1223
1222
  type: "number",
@@ -1227,12 +1226,12 @@ const Pt = (n) => {
1227
1226
  flex: 0.6
1228
1227
  }
1229
1228
  ], u = [
1230
- ...x.slice(0, 3),
1229
+ ...f.slice(0, 3),
1231
1230
  {
1232
1231
  field: "chevron",
1233
1232
  headerName: "",
1234
1233
  renderHeader: void 0,
1235
- renderCell: () => /* @__PURE__ */ e(te, { name: "chevron_right'" }),
1234
+ renderCell: () => /* @__PURE__ */ e(ee, { name: "chevron_right'" }),
1236
1235
  sortable: !0,
1237
1236
  hideSortIcons: !0,
1238
1237
  type: "custom",
@@ -1240,20 +1239,20 @@ const Pt = (n) => {
1240
1239
  headerAlign: "right",
1241
1240
  width: 20
1242
1241
  }
1243
- ], D = g.useMemo(() => o.map((y, k) => ({
1242
+ ], v = x.useMemo(() => o.map((y, N) => ({
1244
1243
  ...y,
1245
- id: k,
1246
- priority: kt(y)
1244
+ id: N,
1245
+ priority: Bt(y)
1247
1246
  })), [o]), M = (y) => {
1248
- const f = y.target.closest("[data-id]")?.getAttribute("data-id"), E = o[Number(f)];
1249
- t?.(E?.guid ?? "");
1250
- }, F = (y) => {
1247
+ const g = y.target.closest("[data-id]")?.getAttribute("data-id"), A = o[Number(g)];
1248
+ t?.(A?.guid ?? "");
1249
+ }, I = (y) => {
1251
1250
  c || M(y);
1252
1251
  }, C = (y) => {
1253
1252
  c && M(y);
1254
- }, A = (y) => D.find((k) => k.guid === y)?.id;
1253
+ }, B = (y) => v.find((N) => N.guid === y)?.id;
1255
1254
  return /* @__PURE__ */ e(
1256
- ne,
1255
+ re,
1257
1256
  {
1258
1257
  sx: {
1259
1258
  height: "100dvh",
@@ -1261,36 +1260,36 @@ const Pt = (n) => {
1261
1260
  mt: "15px",
1262
1261
  overflowX: "auto",
1263
1262
  boxShadow: "none",
1264
- ...n
1263
+ ...a
1265
1264
  },
1266
1265
  children: /* @__PURE__ */ e(
1267
- qe,
1266
+ Ye,
1268
1267
  {
1269
- columns: c ? u : x,
1268
+ columns: c ? u : f,
1270
1269
  disableColumnFilter: !0,
1271
1270
  disableColumnMenu: !0,
1272
1271
  hideFooter: !0,
1273
- initialState: { sorting: { sortModel: h } },
1272
+ initialState: { sorting: { sortModel: m } },
1274
1273
  onRowClick: (y) => {
1275
- a(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1274
+ n(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1276
1275
  },
1277
1276
  onSortModelChange: (y) => {
1278
- m(y), p(T.DEBTS_CLICK_TABLE_SORT);
1277
+ b(y), p(T.DEBTS_CLICK_TABLE_SORT);
1279
1278
  },
1280
- rows: D,
1279
+ rows: v,
1281
1280
  slotProps: {
1282
1281
  baseIconButton: { color: "secondary", sx: { ml: 8 } },
1283
1282
  row: {
1284
- onMouseEnter: F,
1283
+ onMouseEnter: I,
1285
1284
  onMouseLeave: () => !c && t?.(""),
1286
1285
  onTouchStart: C,
1287
1286
  onClick: c ? C : void 0
1288
1287
  }
1289
1288
  },
1290
- sortModel: h,
1289
+ sortModel: m,
1291
1290
  sortingOrder: ["asc", "desc"],
1292
1291
  sx: {
1293
- [`& .MuiDataGrid-row[data-id="${A(r)}"]`]: {
1292
+ [`& .MuiDataGrid-row[data-id="${B(r)}"]`]: {
1294
1293
  backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1295
1294
  filter: "brightness(98%)"
1296
1295
  }
@@ -1299,33 +1298,33 @@ const Pt = (n) => {
1299
1298
  )
1300
1299
  }
1301
1300
  );
1302
- }, Rt = ({ buttonText: n, isOpen: o, onClick: r }) => {
1303
- const { isDesktop: t, isTablet: a } = K(), i = o ? "unfold_less" : "unfold_more";
1304
- return t || a ? /* @__PURE__ */ e(
1305
- xe,
1301
+ }, Ft = ({ buttonText: a, isOpen: o, onClick: r }) => {
1302
+ const { isDesktop: t, isTablet: n } = Y(), i = o ? "unfold_less" : "unfold_more";
1303
+ return t || n ? /* @__PURE__ */ e(
1304
+ fe,
1306
1305
  {
1307
1306
  "aria-controls": "prioritize-debts",
1308
1307
  "aria-describedby": "prioritize-debts",
1309
1308
  "aria-haspopup": !0,
1310
1309
  "aria-label": "prioritize-debts",
1311
1310
  onClick: r,
1312
- startIcon: /* @__PURE__ */ e(te, { name: i }),
1311
+ startIcon: /* @__PURE__ */ e(ee, { name: i }),
1313
1312
  sx: { justifyContent: "start", minWidth: 214, mx: 4 },
1314
- children: n
1313
+ children: a
1315
1314
  }
1316
1315
  ) : /* @__PURE__ */ e(
1317
- Ze,
1316
+ Ue,
1318
1317
  {
1319
1318
  "aria-controls": "prioritize-debts",
1320
1319
  "aria-describedby": "prioritize-debts",
1321
1320
  "aria-haspopup": !0,
1322
1321
  "aria-label": "prioritize-debts",
1323
1322
  onClick: r,
1324
- children: /* @__PURE__ */ e(te, { name: i })
1323
+ children: /* @__PURE__ */ e(ee, { name: i })
1325
1324
  }
1326
1325
  );
1327
- }, Lt = S(({ buttonEl: n, onClose: o }) => {
1328
- const { onEvent: r } = B(), { debts: t } = v(), { selectedDebtPriority: a, setSelectedDebtPriority: i } = L(), p = !!n, c = [
1326
+ }, Rt = D(({ buttonEl: a, onClose: o }) => {
1327
+ const { onEvent: r } = F(), { debts: t } = S(), { selectedDebtPriority: n, setSelectedDebtPriority: i } = $(), p = !!a, c = [
1329
1328
  {
1330
1329
  priority: P.FASTEST_PAYOFF_FIRST,
1331
1330
  text: t.priority_sort_fastest_payoff
@@ -1342,13 +1341,13 @@ const Pt = (n) => {
1342
1341
  priority: P.HIGHEST_BALANCE,
1343
1342
  text: t.priority_sort_highest_balance
1344
1343
  }
1345
- ], d = (h) => {
1346
- i(h), r(T.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1344
+ ], d = (m) => {
1345
+ i(m), r(T.DEBTS_CLICK_PRIORITY, { debts_priority: m });
1347
1346
  };
1348
1347
  return /* @__PURE__ */ e(
1349
- Qe,
1348
+ Ze,
1350
1349
  {
1351
- anchorEl: n,
1350
+ anchorEl: a,
1352
1351
  anchorOrigin: {
1353
1352
  vertical: "bottom",
1354
1353
  horizontal: "left"
@@ -1360,13 +1359,13 @@ const Pt = (n) => {
1360
1359
  vertical: "top",
1361
1360
  horizontal: "left"
1362
1361
  },
1363
- children: /* @__PURE__ */ e(ye, { children: c.map(({ priority: h, text: m }) => /* @__PURE__ */ s(
1364
- Je,
1362
+ children: /* @__PURE__ */ e(_e, { children: c.map(({ priority: m, text: b }) => /* @__PURE__ */ s(
1363
+ qe,
1365
1364
  {
1366
- onClick: () => d(h),
1365
+ onClick: () => d(m),
1367
1366
  sx: {
1368
- bgcolor: a === h ? "primary.main" : void 0,
1369
- color: a === h ? "#fff" : void 0,
1367
+ bgcolor: n === m ? "primary.main" : void 0,
1368
+ color: n === m ? "#fff" : void 0,
1370
1369
  justifyContent: "space-between",
1371
1370
  minHeight: 44,
1372
1371
  minWidth: 268,
@@ -1379,173 +1378,176 @@ const Pt = (n) => {
1379
1378
  }
1380
1379
  },
1381
1380
  children: [
1382
- /* @__PURE__ */ e(l, { color: "inherit", variant: "body2", children: m }),
1383
- a === h && /* @__PURE__ */ e(fe, { color: "inherit", filled: !0, fontSize: "small" })
1381
+ /* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: b }),
1382
+ n === m && /* @__PURE__ */ e(ye, { color: "inherit", filled: !0, fontSize: "small" })
1384
1383
  ]
1385
1384
  },
1386
- h
1385
+ m
1387
1386
  )) })
1388
1387
  }
1389
1388
  );
1390
- }), $t = S(() => {
1391
- const { onEvent: n } = B(), { debts: o } = v(), { selectedDebtPriority: r } = L(), [t, a] = g.useState(null), i = (h) => {
1392
- a(h.currentTarget), n(T.DEBTS_CLICK_PRIORITIZE);
1389
+ }), Lt = D(() => {
1390
+ const { onEvent: a } = F(), { debts: o } = S(), { selectedDebtPriority: r } = $(), [t, n] = x.useState(null), i = (m) => {
1391
+ n(m.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
1393
1392
  }, p = () => {
1394
- a(null);
1395
- }, c = !!t, d = g.useMemo(() => ({
1393
+ n(null);
1394
+ }, c = !!t, d = x.useMemo(() => ({
1396
1395
  [P.FASTEST_PAYOFF_FIRST]: o.priority_sort_fastest_payoff,
1397
1396
  [P.HIGHEST_INTEREST]: o.priority_sort_highest_interest,
1398
1397
  [P.HIGHEST_BALANCE]: o.priority_sort_highest_balance,
1399
1398
  [P.LOWEST_BALANCE]: o.priority_sort_lowest_balance
1400
1399
  })[r] ?? o.priority_sort_lowest_balance, [r]);
1401
1400
  return /* @__PURE__ */ s(_, { children: [
1402
- /* @__PURE__ */ e(Rt, { buttonText: d, isOpen: c, onClick: i }),
1403
- /* @__PURE__ */ e(Lt, { buttonEl: t, onClose: p })
1401
+ /* @__PURE__ */ e(Ft, { buttonText: d, isOpen: c, onClick: i }),
1402
+ /* @__PURE__ */ e(Rt, { buttonEl: t, onClose: p })
1404
1403
  ] });
1405
- }), Ot = (n, o, r = 0) => {
1406
- const t = n.map((d) => ({ ...d }));
1404
+ }), $t = (a, o, r = 0) => {
1405
+ const t = a.map((d) => ({ ...d }));
1407
1406
  ge(t, o);
1408
- const a = /* @__PURE__ */ new Date(), i = [];
1407
+ const n = /* @__PURE__ */ new Date(), i = [];
1409
1408
  let p = 0, c = 1;
1410
1409
  for (const d of t)
1411
1410
  i.push({
1412
1411
  ...d,
1413
1412
  // Start with the initial balance
1414
- dataset: [{ x: new Date(a), y: d.balance }]
1413
+ dataset: [{ x: new Date(n), y: d.balance }]
1415
1414
  });
1416
1415
  for (; t.some((d) => d.balance >= 0.01 && !d.is_impossible); ) {
1417
- let d = !1, h = !1, m = !1;
1418
- for (const [x, u] of t.entries()) {
1416
+ let d = !1, m = !1, b = !1;
1417
+ for (const [f, u] of t.entries()) {
1419
1418
  if (u.balance <= 0.01) continue;
1420
- const D = i[x].dataset, F = (u.interest_rate ?? 0) / 100 / 12, C = u.balance * F, A = u.monthly_payment ?? 0;
1421
- let y = A, k = 0;
1422
- !m && r > 0 && (y += r, m = !0), !h && p > 0 && (k = p, h = !0), u.balance += C;
1423
- const b = Math.min(u.balance, y + k);
1424
- if (b <= C) {
1425
- u.is_impossible = !0, i[x].is_impossible = !0, i[x].priority = void 0, D.push({ x: new Date(a), y: u.balance });
1419
+ const v = i[f].dataset, I = (u.interest_rate ?? 0) / 100 / 12, C = u.balance * I, B = u.monthly_payment ?? 0;
1420
+ let y = B, N = 0;
1421
+ !b && r > 0 && (y += r, b = !0), !m && p > 0 && (N = p, m = !0), u.balance += C;
1422
+ const h = Math.min(u.balance, y + N);
1423
+ if (h <= C) {
1424
+ u.is_impossible = !0, i[f].is_impossible = !0, i[f].priority = void 0, v.push({ x: new Date(n), y: u.balance });
1426
1425
  continue;
1427
1426
  }
1428
- u.balance -= b, u.balance = u.balance < 0.01 ? 0 : u.balance, D.push({
1429
- x: new Date(a),
1427
+ u.balance -= h, u.balance = u.balance < 0.01 ? 0 : u.balance, v.push({
1428
+ x: new Date(n),
1430
1429
  y: Math.max(0, u.balance),
1431
- payment: b,
1432
- extra: k
1433
- }), u.balance <= 0 && (p += A, i[x].projected_payoff_date = new Date(a)), b > 0 && (d = !0);
1430
+ payment: h,
1431
+ extra: N
1432
+ }), u.balance <= 0 && (p += B, i[f].projected_payoff_date = new Date(n)), h > 0 && (d = !0);
1434
1433
  }
1435
- d && a.setMonth(a.getMonth() + 1);
1434
+ d && n.setMonth(n.getMonth() + 1);
1436
1435
  }
1437
1436
  return i.forEach((d) => {
1438
1437
  (d.interest_rate === void 0 || d.monthly_payment === void 0) && (d.projected_payoff_date = void 0);
1439
1438
  }), i.forEach((d) => {
1440
1439
  d.priority = !d.is_paid_off && !d.is_impossible ? c++ : void 0;
1441
1440
  }), i;
1442
- }, Ht = S(({ onClick: n }) => {
1443
- const { debts: o } = v(), { isDesktop: r } = K(), { totalMonthlyPayments: t } = Z(), { monthlyCashFlowProfile: a } = Y(), i = t + Number(a?.extra_payment), p = r ? o.paydown_button_long : o.paydown_button_short;
1441
+ }, Ht = D(({ onClick: a }) => {
1442
+ const { debts: o } = S(), { isDesktop: r } = Y(), { totalMonthlyPayments: t } = q(), { monthlyCashFlowProfile: n } = V(), i = t + Number(n?.extra_payment), p = r ? o.paydown_button_long : o.paydown_button_short;
1444
1443
  return /* @__PURE__ */ e(
1445
- xe,
1444
+ fe,
1446
1445
  {
1447
1446
  "aria-controls": "extra-paydown",
1448
1447
  "aria-describedby": "extra-paydown",
1449
1448
  "aria-haspopup": !0,
1450
1449
  "aria-label": "extra-paydown",
1451
- onClick: n,
1450
+ onClick: a,
1452
1451
  sx: { justifyContent: "start", minWidth: 100, mx: 4 },
1453
- children: I(p, N(i, "0,0"))
1452
+ children: E(p, k(i, "0,0"))
1454
1453
  }
1455
1454
  );
1456
- }), Wt = ({ onBackClick: n, sx: o }) => {
1457
- const [r, t] = g.useState(!1), [a, i] = g.useState(!1), [p, c] = g.useState(!1), [d, h] = g.useState(""), { isDesktop: m, isMobile: x } = K(), { debts: u } = v(), { onEvent: D } = B(), { onLoad: M } = Ne(), { isCopyLoaded: F, isInitialized: C, setSelectedAccounts: A } = Fe(), { setSelectedAccount: y } = Re(), { selectedDebtPriority: k, setSelectedDebtChartData: b } = L(), { visibleDebtAccounts: f } = J(), { goalsLoaded: E, loadGoals: $, monthlyCashFlowProfile: R } = Y(), { debts: z } = Z(), U = g.useMemo(() => {
1458
- const H = R?.extra_payment ?? 0;
1459
- return Ot(z, k, H);
1460
- }, [z, k, R]);
1461
- g.useEffect(() => {
1462
- A(f), D(T.DEBTS_VIEW);
1463
- }, []), g.useEffect(() => {
1464
- A(f);
1465
- }, [f]), g.useEffect(() => {
1466
- C && $().finally(() => {
1467
- M?.("DebtsWidget");
1468
- });
1469
- }, [C]);
1470
- const ae = (H) => h(H), ie = () => {
1471
- const H = f.find((ee) => ee.guid === d), le = U.find((ee) => ee.guid === d);
1472
- H && y(H), le && b(le), t(!0);
1473
- }, Ce = () => D(T.DEBTS_CLICK_FILTER), ve = () => {
1474
- c(!0), D(T.DEBTS_CLICK_SNOWBALL_CTA);
1475
- }, De = () => {
1476
- i(!0), D(T.DEBTS_CLICK_PAYDOWN);
1455
+ }), Ot = ({ onBackClick: a, sx: o }) => {
1456
+ const [r, t] = x.useState(!1), [n, i] = x.useState(!1), [p, c] = x.useState(!1), [d, m] = x.useState(""), { isDesktop: b, isMobile: f } = Y(), { debts: u } = S(), { onEvent: v } = F(), { isCopyLoaded: M, isInitialized: I, setSelectedAccounts: C } = Pe(), { setSelectedAccount: B } = Ne(), { selectedDebtPriority: y, setSelectedDebtChartData: N } = $(), { visibleDebtAccounts: h } = Z(), { goalsLoaded: g, loadGoals: A, monthlyCashFlowProfile: R } = V(), { debts: L } = q();
1457
+ Je({
1458
+ widgetName: "DebtsWidget",
1459
+ isLoaded: g
1460
+ });
1461
+ const O = x.useMemo(() => {
1462
+ const W = R?.extra_payment ?? 0;
1463
+ return $t(L, y, W);
1464
+ }, [L, y, R]);
1465
+ x.useEffect(() => {
1466
+ C(h), v(T.DEBTS_VIEW);
1467
+ }, []), x.useEffect(() => {
1468
+ C(h);
1469
+ }, [h]), x.useEffect(() => {
1470
+ I && A().finally();
1471
+ }, [I]);
1472
+ const oe = (W) => m(W), ne = () => {
1473
+ const W = h.find((Q) => Q.guid === d), ie = O.find((Q) => Q.guid === d);
1474
+ W && B(W), ie && N(ie), t(!0);
1475
+ }, we = () => v(T.DEBTS_CLICK_FILTER), Ce = () => {
1476
+ c(!0), v(T.DEBTS_CLICK_SNOWBALL_CTA);
1477
+ }, Se = () => {
1478
+ i(!0), v(T.DEBTS_CLICK_PAYDOWN);
1477
1479
  };
1478
- return !E || !F || !C ? /* @__PURE__ */ e(et, {}) : /* @__PURE__ */ s(
1479
- Ge,
1480
+ return !g || !M || !I ? /* @__PURE__ */ e(Qe, {}) : /* @__PURE__ */ s(
1481
+ Oe,
1480
1482
  {
1481
- accountOptions: f,
1483
+ accountOptions: h,
1482
1484
  actions: [
1483
- /* @__PURE__ */ e($t, {}, "prioritize-debts"),
1484
- /* @__PURE__ */ e(Ht, { onClick: De }, "extra-paydown")
1485
+ /* @__PURE__ */ e(Lt, {}, "prioritize-debts"),
1486
+ /* @__PURE__ */ e(Ht, { onClick: Se }, "extra-paydown")
1485
1487
  ],
1486
- onAccountsFilterClick: Ce,
1487
- onBackClick: n,
1488
+ onAccountsFilterClick: we,
1489
+ onBackClick: a,
1488
1490
  sx: o,
1489
1491
  title: u.title,
1490
1492
  children: [
1491
- /* @__PURE__ */ s(w, { sx: { px: m ? "48px" : "24px" }, children: [
1493
+ /* @__PURE__ */ s(w, { sx: { px: b ? "48px" : "24px" }, children: [
1492
1494
  /* @__PURE__ */ s(
1493
1495
  w,
1494
1496
  {
1495
1497
  sx: {
1496
- alignItems: x ? "flex-start" : "flex-end",
1497
- flexDirection: x ? "column" : "row",
1498
- mx: x ? "-12px" : 0
1498
+ alignItems: f ? "flex-start" : "flex-end",
1499
+ flexDirection: f ? "column" : "row",
1500
+ mx: f ? "-12px" : 0
1499
1501
  },
1500
1502
  children: [
1501
1503
  /* @__PURE__ */ e(
1502
- we,
1504
+ xe,
1503
1505
  {
1504
- debts: U,
1505
- height: x ? 250 : void 0,
1506
+ debts: O,
1507
+ height: f ? 250 : void 0,
1506
1508
  hoveredDebtGuid: d,
1507
- onClickArea: ie,
1508
- onHoverArea: ae,
1509
- sx: { mr: x ? "4px" : "-48px" }
1509
+ onClickArea: ne,
1510
+ onHoverArea: oe,
1511
+ sx: { mr: f ? "4px" : "-48px" }
1510
1512
  }
1511
1513
  ),
1512
1514
  /* @__PURE__ */ e(
1513
- lt,
1515
+ it,
1514
1516
  {
1515
- debts: U,
1516
- onClickCta: ve,
1517
- sx: { mb: x ? "0px" : "64px" }
1517
+ debts: O,
1518
+ onClickCta: Ce,
1519
+ sx: { mb: f ? "0px" : "64px" }
1518
1520
  }
1519
1521
  )
1520
1522
  ]
1521
1523
  }
1522
1524
  ),
1523
- /* @__PURE__ */ e(w, { sx: { mx: x ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1524
- Bt,
1525
+ /* @__PURE__ */ e(w, { sx: { mx: f ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1526
+ Nt,
1525
1527
  {
1526
- debts: U,
1528
+ debts: O,
1527
1529
  hoveredDebtGuid: d,
1528
- onClickRow: ie,
1529
- onHoverRow: ae
1530
+ onClickRow: ne,
1531
+ onHoverRow: oe
1530
1532
  }
1531
1533
  ) })
1532
1534
  ] }),
1533
1535
  /* @__PURE__ */ e(
1534
- ct,
1536
+ st,
1535
1537
  {
1536
1538
  isOpen: p,
1537
1539
  onClose: () => c(!1)
1538
1540
  }
1539
1541
  ),
1540
- /* @__PURE__ */ e(St, { isOpen: r, onClose: () => t(!1) }),
1541
- /* @__PURE__ */ e(It, { isOpen: a, onClose: () => i(!1) })
1542
+ /* @__PURE__ */ e(vt, { isOpen: r, onClose: () => t(!1) }),
1543
+ /* @__PURE__ */ e(Et, { isOpen: n, onClose: () => i(!1) })
1542
1544
  ]
1543
1545
  }
1544
1546
  );
1545
- }, Fr = S(Wt);
1547
+ }, Nr = D(Ot);
1546
1548
  export {
1547
- we as DebtsChart,
1549
+ xe as DebtsChart,
1548
1550
  Lr as DebtsStore,
1549
- Bt as DebtsTable,
1550
- Fr as DebtsWidget
1551
+ Nt as DebtsTable,
1552
+ Nr as DebtsWidget
1551
1553
  };