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

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