@mx-cartographer/experiences 8.0.0-alpha.test2 → 8.0.0-alpha.v2
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.
- package/CHANGELOG.md +335 -0
- package/README.md +5 -3
- package/dist/{Account-CMjOp7S2.mjs → Account-BiB1F8lL.mjs} +2 -2
- package/dist/{Account-BIKn4XEZ.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-ChQr5PAZ.mjs} +1 -1
- package/dist/AccountDetailsHeader-D9gbTbUt.mjs +95 -0
- package/dist/{AccountFields-DuFtmuud.mjs → AccountFields-CxqONzjY.mjs} +12 -12
- package/dist/AccountListItem-D9WJDbZ1.mjs +94 -0
- package/dist/{AccountStore-Cq_w2Hfb.mjs → AccountStore-DpYvNnql.mjs} +15 -9
- package/dist/Accounts-CseLC3lL.mjs +5 -0
- package/dist/Accounts-o7ohkngR.mjs +27 -0
- package/dist/{Analytics-i5h6BxR1.mjs → Analytics-BYItVAe-.mjs} +10 -0
- package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-EFHXULDx.mjs} +1 -1
- package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C6CAT-ce.mjs} +1 -1
- package/dist/BudgetUtil-CLhRnCoX.mjs +479 -0
- package/dist/CashflowStore-CeAzChyD.mjs +91 -0
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-CzRxYpiP.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +118 -110
- package/dist/{CategoryStore-V-0d9oje.mjs → CategoryStore-FTxUbn0f.mjs} +3 -3
- package/dist/{CategoryUtil-DB-9JMbi.mjs → CategoryUtil-BVixr0d5.mjs} +4 -4
- package/dist/Connect-eYIWqCEr.mjs +39 -0
- package/dist/ConnectDrawer-C0wjwcJt.mjs +58 -0
- package/dist/{ConnectionsDrawer-DMBBzlIJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +10 -9
- package/dist/CurrencyInput-DuMktPu3.mjs +85 -0
- package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CA-E5N_y.mjs} +1 -1
- package/dist/{DateFormats-Cs-NbEZ7.mjs → DateFormats-BMpMrZpW.mjs} +1 -1
- package/dist/{DateUtil-CVXVMbjf.mjs → DateUtil-wcYTmDRD.mjs} +1 -1
- package/dist/{DebtsStore-Dv_T7Dts.mjs → DebtsStore-BZqNLaqd.mjs} +3 -3
- package/dist/Dialog-Ck34yr-d.mjs +63 -0
- package/dist/{Donut-DKY8mL3P.mjs → Donut-CpxJlVvJ.mjs} +29 -27
- package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-Bbe4AMB1.mjs} +14 -14
- package/dist/{ExportCsvAction-Cc14QGA9.mjs → ExportCsvAction-ErKh7wJ2.mjs} +4 -4
- package/dist/{Fetch-DecPFeGU.mjs → Fetch-B6tMJC1r.mjs} +2 -1
- package/dist/{FinstrongStore-DW7-LvAh.mjs → FinstrongStore-BQxXxxYD.mjs} +129 -129
- package/dist/GlobalAccountFilter-B73Pw1hJ.mjs +237 -0
- package/dist/Goal-0loDagc5.mjs +6 -0
- package/dist/GoalStore-fgXt--2Y.mjs +418 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-CgpJK03Q.mjs → Help-B8mD4aLJ.mjs} +6 -6
- package/dist/{Help-DOPJteew.mjs → Help-D-laTbKu.mjs} +544 -493
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/LineChart-EAr5ox5U.mjs +612 -0
- package/dist/{ListItemAction-engf-T9W.mjs → ListItemAction-4KB7P75M.mjs} +2 -2
- package/dist/Loader-D3rjKx72.mjs +21 -0
- package/dist/Localization-CPkpIwIx.mjs +37 -0
- package/dist/{ManageIncome-BVqHHIO7.mjs → ManageIncome-Cc-wba0I.mjs} +118 -113
- package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-BzGi4JAZ.mjs} +1 -1
- package/dist/MicroWidgetContainer-B_EnfvCq.mjs +45 -0
- package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +66 -0
- package/dist/{NetWorthStore-B6ziBtaH.mjs → NetWorthStore-BqZ44-4M.mjs} +5 -5
- package/dist/Notification-DTNYSd8P.mjs +7 -0
- package/dist/{NotificationSettings-CEzQSKfg.mjs → NotificationSettings-D7VqsrZy.mjs} +160 -159
- package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-D_e8zo5M.mjs} +28 -21
- package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting-QCaNwbjv.mjs} +1 -1
- package/dist/{Transaction-C8QRYhYc.mjs → OnClickEvents-CseHDZ94.mjs} +32 -25
- package/dist/{OriginalBalanceAction-CYqr8z8w.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +10 -10
- package/dist/{RecurringSettings-rEotGPcM.mjs → RecurringSettings-BN9H5ALr.mjs} +4 -4
- package/dist/RecurringTransactions-BCJp-Nap.mjs +297 -0
- package/dist/{RecurringTransactionsStore-DpzLX8E8.mjs → RecurringTransactionsStore-CkMA7gY3.mjs} +11 -10
- package/dist/RepeatingTransaction-DF4vJn_v.mjs +7 -0
- package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-DZFp78fJ.mjs} +12 -12
- package/dist/SearchBox-CwDgvWVJ.mjs +48 -0
- package/dist/{SettingsStore-ImYpLCSK.mjs → SettingsStore-BoIoiRLj.mjs} +3 -3
- package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +5 -5
- package/dist/{SpendingData-CI_C9xln.mjs → SpendingData-Bz1bCWAs.mjs} +4 -4
- package/dist/SpendingLegend-BgjazduU.mjs +193 -0
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/StatusIndicator-4tWnjeKS.mjs +264 -0
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/ToggleListItem-BLu_fWA2.mjs +90 -0
- package/dist/Transaction-Cn5_iFm0.mjs +5 -0
- package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-Ck5Ua-7F.mjs} +1 -1
- package/dist/TransactionDetails-D1I1XEsT.mjs +1469 -0
- package/dist/{TransactionStore-CEehNrKo.mjs → TransactionStore-Bx9euVrY.mjs} +195 -177
- package/dist/{TrendsStore-ncmbS9eE.mjs → TrendsStore-CYdTo7cN.mjs} +10 -10
- package/dist/ViewMoreMicroCard-D24H9kDm.mjs +1291 -0
- package/dist/{WidgetContainer-DFwVgavi.mjs → WidgetContainer-B7xDq2bM.mjs} +47 -46
- package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
- package/dist/accounts/AccountsWidget.d.ts +1 -1
- package/dist/accounts/api/AccountApi.d.ts +1 -1
- package/dist/accounts/components/AccountListItem.d.ts +1 -1
- package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
- package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
- package/dist/accounts/index.es.js +459 -368
- package/dist/accounts/stores/AccountStore.d.ts +2 -1
- package/dist/accounts/stores/UiStore.d.ts +1 -1
- package/dist/accounts/utils/AccountDetails.d.ts +1 -1
- package/dist/accounts/utils/AccountFields.d.ts +1 -1
- package/dist/accounts/utils/Accounts.d.ts +2 -2
- package/dist/analytics/index.es.js +93 -112
- package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
- package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
- package/dist/budgets/api/BudgetsApi.d.ts +5 -1
- package/dist/budgets/components/BubbleChart.d.ts +1 -1
- package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +4 -1
- package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
- package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
- package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
- package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
- package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
- package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
- package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
- package/dist/budgets/index.es.js +851 -865
- package/dist/budgets/store/BudgetsStore.d.ts +15 -1
- package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
- package/dist/budgets/utils/BudgetUtil.d.ts +6 -1
- package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
- package/dist/cashflow/CashflowWidget.d.ts +1 -1
- package/dist/cashflow/api/CashflowApi.d.ts +1 -1
- package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
- package/dist/cashflow/index.es.js +290 -288
- package/dist/cashflow/stores/UiStore.d.ts +1 -1
- package/dist/cashflow/util/Filters.d.ts +1 -1
- package/dist/categories/components/CategoryRow.d.ts +1 -1
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
- package/dist/categories/components/SubcategoryList.d.ts +1 -1
- package/dist/categories/components/SubcategoryRow.d.ts +1 -1
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -1
- package/dist/categories/util/CategoryUtil.d.ts +1 -1
- package/dist/common/api/AnalyticsApi.d.ts +1 -1
- package/dist/common/api/AppDataApi.d.ts +1 -1
- package/dist/common/api/BeatApi.d.ts +1 -1
- package/dist/common/api/CategoryApi.d.ts +1 -1
- package/dist/common/api/GlobalCopyApi.d.ts +1 -1
- package/dist/common/api/LocalizedCopyApi.d.ts +1 -1
- package/dist/common/api/NotificationApi.d.ts +1 -1
- package/dist/common/api/ScheduledPaymentsApi.d.ts +1 -1
- package/dist/common/api/UserApi.d.ts +1 -1
- package/dist/common/components/CurrencyDialog.d.ts +1 -1
- package/dist/common/components/CurrencyInput.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +1 -0
- package/dist/common/components/charts/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
- package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/constants/Account.d.ts +1 -1
- package/dist/common/constants/Analytics.d.ts +10 -0
- package/dist/common/constants/ApiEndpoints.d.ts +1 -0
- package/dist/common/constants/DefaultConfig.d.ts +1 -1
- package/dist/common/constants/ScheduledPayment.d.ts +1 -10
- package/dist/common/constants/SpendingPlan.d.ts +0 -10
- package/dist/common/constants/index.d.ts +2 -2
- package/dist/common/context/GlobalDataProvider.d.ts +2 -1
- package/dist/common/context/hooks.d.ts +4 -4
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
- package/dist/common/hooks/useCombineEvents.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +2 -0
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +625 -860
- package/dist/common/stores/AppDataStore.d.ts +3 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
- package/dist/common/stores/GlobalStore.d.ts +4 -2
- package/dist/common/stores/GlobalUiStore.d.ts +3 -3
- package/dist/common/stores/UserStore.d.ts +1 -1
- package/dist/common/utils/AccountDisplayName.d.ts +1 -1
- package/dist/common/utils/AccountFilter.d.ts +1 -1
- package/dist/common/utils/Analytics.d.ts +1 -1
- package/dist/common/utils/Categories.d.ts +1 -1
- package/dist/common/utils/Fetch.d.ts +1 -1
- package/dist/common/utils/Localization.d.ts +9 -1
- package/dist/common/utils/Theme.d.ts +3 -3
- package/dist/common/utils/User.d.ts +1 -1
- package/dist/common/utils/index.d.ts +1 -1
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/constants/repeatingTransactions.d.ts +10 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.es.js +41 -0
- package/dist/{common → core}/types/Analytics.d.ts +6 -3
- package/dist/{common → core}/types/AppData.d.ts +1 -0
- package/dist/{common → core}/types/Beat.d.ts +2 -0
- package/dist/{common → core}/types/Budget.d.ts +8 -0
- package/dist/{common → core}/types/Expense.d.ts +2 -1
- package/dist/{common → core}/types/Finstrong.d.ts +0 -2
- package/dist/{common → core}/types/Notification.d.ts +15 -5
- package/dist/{common → core}/types/index.d.ts +1 -2
- package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +11 -0
- package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
- package/dist/{common → core}/types/localization/CommonCopy.d.ts +2 -0
- package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
- package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
- package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +46 -45
- package/dist/debts/DebtsWidget.d.ts +1 -1
- package/dist/debts/components/actions/DebtsPriorityAction.d.ts +5 -1
- package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
- package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
- package/dist/debts/index.es.js +705 -646
- package/dist/debts/store/DebtsStore.d.ts +2 -1
- package/dist/debts/utils/DebtStore.d.ts +1 -1
- package/dist/debts/utils/DebtsWidget.d.ts +7 -1
- package/dist/debts/utils/shared.d.ts +1 -1
- package/dist/{exportTransactionsToCSV-CGnrndmA.mjs → exportTransactionsToCSV-MCYH_zzN.mjs} +5 -5
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +1 -1
- package/dist/finstrong/components/HealthChart.d.ts +1 -1
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
- package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
- package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
- package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
- package/dist/finstrong/index.es.js +161 -159
- package/dist/finstrong/stores/FinstrongStore.d.ts +3 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +3 -3
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/api/GoalApi.d.ts +2 -2
- package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
- package/dist/goals/components/AddGoal.d.ts +1 -1
- package/dist/goals/components/GoalDetails.d.ts +1 -1
- package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
- package/dist/goals/components/GoalList.d.ts +1 -1
- package/dist/goals/components/GoalStatusCard.d.ts +1 -1
- package/dist/goals/components/ManageGoals.d.ts +1 -1
- package/dist/goals/components/actions/AccountAction.d.ts +1 -1
- package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
- package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
- package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
- package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
- package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
- package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
- package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
- package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
- package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
- package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
- package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
- package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
- package/dist/goals/index.es.js +445 -419
- package/dist/goals/stores/GoalStore.d.ts +2 -1
- package/dist/goals/util/GoalsUtil.d.ts +1 -1
- package/dist/help/HelpWidget.d.ts +1 -1
- package/dist/help/api/HelpApi.d.ts +1 -1
- package/dist/help/components/HelpContent.d.ts +1 -1
- package/dist/help/components/HelpList.d.ts +1 -1
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/ContentItem.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/NoImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/components/content/section/Accounts.d.ts +1 -1
- package/dist/help/components/content/section/Budgets.d.ts +1 -1
- package/dist/help/components/content/section/CashFlow.d.ts +1 -1
- package/dist/help/components/content/section/Debts.d.ts +1 -1
- package/dist/help/components/content/section/General.d.ts +1 -1
- package/dist/help/components/content/section/Goals.d.ts +1 -1
- package/dist/help/components/content/section/Insights.d.ts +1 -1
- package/dist/help/components/content/section/Investments.d.ts +1 -1
- package/dist/help/components/content/section/Mobile.d.ts +1 -1
- package/dist/help/components/content/section/NetWorth.d.ts +1 -1
- package/dist/help/components/content/section/Notifications.d.ts +1 -1
- package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
- package/dist/help/components/content/section/Spending.d.ts +1 -1
- package/dist/help/components/content/section/Transactions.d.ts +1 -1
- package/dist/help/components/content/section/Trends.d.ts +1 -1
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
- package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
- package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
- package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
- package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
- package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
- package/dist/help/index.es.js +8 -8
- package/dist/help/store/HelpStore.d.ts +5 -4
- package/dist/help/utils/getAccessibleHelpCategories.d.ts +2 -2
- package/dist/{hooks-CBl85iRr.mjs → hooks-BxkfR-Ff.mjs} +12 -12
- package/dist/insights/components/feed/Header.d.ts +8 -0
- package/dist/insights/components/index.d.ts +4 -0
- package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +1 -0
- package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +1 -0
- package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +2 -1
- package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +3 -1
- package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +2 -1
- package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
- package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
- package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
- package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
- package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
- package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
- package/dist/insights/components/shared/StatusIndicator.d.ts +1 -1
- package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
- package/dist/insights/index.es.js +1361 -1081
- package/dist/insights/store/BeatStore.d.ts +1 -1
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/api/HoldingApi.d.ts +1 -1
- package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
- package/dist/investments/index.es.js +258 -258
- package/dist/investments/stores/HoldingStore.d.ts +2 -1
- package/dist/investments/util/InvestmentUtil.d.ts +1 -1
- package/dist/merchants/api/MerchantApi.d.ts +1 -1
- package/dist/merchants/index.es.js +16 -16
- package/dist/merchants/stores/MerchantStore.d.ts +2 -1
- package/dist/microinsights/InsightsMicroWidget.d.ts +1 -1
- package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
- package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
- package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
- package/dist/microinsights/beaticons/index.d.ts +3 -0
- package/dist/microinsights/cards/InsightCard.d.ts +1 -1
- package/dist/microinsights/carousel/BeatList.d.ts +1 -1
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -1
- package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +1 -1
- package/dist/microinsights/constants/Analytics.d.ts +1 -1
- package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
- package/dist/microinsights/context/hooks.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +1 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
- package/dist/microinsights/utils/DataSeries.d.ts +1 -1
- package/dist/microinsights/utils/colorType.d.ts +22 -0
- package/dist/networth/NetWorthWidget.d.ts +1 -1
- package/dist/networth/components/micro/NetworthData.d.ts +1 -1
- package/dist/networth/components/micro/ZeroState.d.ts +1 -1
- package/dist/networth/index.es.js +181 -174
- package/dist/networth/stores/NetWorthStore.d.ts +2 -1
- package/dist/networth/types/NetWorth.d.ts +1 -1
- package/dist/networth/utils/NetWorthUtils.d.ts +1 -1
- package/dist/notifications/components/NotificationBadge.d.ts +1 -1
- package/dist/notifications/components/NotificationCard.d.ts +1 -1
- package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
- package/dist/notifications/components/NotificationList.d.ts +2 -1
- package/dist/notifications/index.es.js +104 -92
- package/dist/notifications/stores/NotificationStore.d.ts +2 -1
- package/dist/notifications/utils/NotificationUtils.d.ts +2 -1
- package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -1
- package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
- package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
- package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
- package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +477 -451
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -1
- package/dist/recurringtransactions/util/RecurringTransactions.d.ts +1 -1
- package/dist/repeatingTransactions-DHIG94pi.mjs +4 -0
- package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
- package/dist/settings/SettingsWidget.d.ts +1 -1
- package/dist/settings/TransactionRulesWidget.d.ts +1 -1
- package/dist/settings/api/SettingsApi.d.ts +1 -2
- package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
- package/dist/settings/components/devices/DeviceList.d.ts +1 -1
- package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
- package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
- package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
- package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
- package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
- package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
- package/dist/settings/index.es.js +314 -323
- package/dist/settings/stores/SettingsStore.d.ts +3 -2
- package/dist/settings/util/Notifications.d.ts +1 -1
- package/dist/spending/SpendingMiniWidget.d.ts +1 -1
- package/dist/spending/SpendingWidget.d.ts +1 -1
- package/dist/spending/index.es.js +167 -166
- package/dist/spending/utils/SpendingData.d.ts +1 -1
- package/dist/transactions/TransactionWidget.d.ts +1 -1
- package/dist/transactions/api/TransactionApi.d.ts +1 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -1
- package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
- package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
- package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
- package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
- package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
- package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
- package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
- package/dist/transactions/constants/Actions.d.ts +4 -3
- package/dist/transactions/constants/Transaction.d.ts +1 -1
- package/dist/transactions/index.es.js +195 -187
- package/dist/transactions/stores/TransactionStore.d.ts +2 -1
- package/dist/transactions/stores/UiStore.d.ts +1 -1
- package/dist/transactions/utils/Filters.d.ts +1 -1
- package/dist/transactions/utils/Transactions.d.ts +1 -1
- package/dist/transactions/utils/buildDetailedTransactions.d.ts +2 -2
- package/dist/transactions/utils/exportTransactionsToCSV.d.ts +1 -1
- package/dist/transactions/utils/sortAndFilterTransactions.d.ts +1 -1
- package/dist/trends/TrendsFullWidget.d.ts +1 -1
- package/dist/trends/TrendsMiniWidget.d.ts +1 -1
- package/dist/trends/TrendsWidget.d.ts +1 -1
- package/dist/trends/components/CategoriesList.d.ts +1 -1
- package/dist/trends/components/CategoriesListItem.d.ts +1 -1
- package/dist/trends/components/CategoryDetails.d.ts +3 -0
- package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
- package/dist/trends/components/TrendsInsights.d.ts +1 -1
- package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
- package/dist/trends/components/trendstable/TrendsTable.d.ts +1 -1
- package/dist/trends/index.es.js +817 -764
- package/dist/trends/stores/TrendsStore.d.ts +2 -1
- package/dist/trends/utils/SpendingData.d.ts +1 -1
- package/dist/trends/utils/TrendsData.d.ts +1 -1
- package/dist/trends/utils/TrendsTable.d.ts +1 -1
- package/dist/trends/utils/TrendsWidget.d.ts +7 -0
- package/dist/trends/utils/shared.d.ts +1 -1
- package/dist/{useAccountDisplayName-b2xxcD0C.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
- package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-Bqojlv8q.mjs} +3 -3
- package/dist/{useInsightsEnabled-Dd-AfsqC.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DmNCCLa-.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
- package/package.json +17 -10
- package/dist/AccountDetailsHeader-Bn2E0Qjk.mjs +0 -95
- package/dist/AccountListItem-k63LpVBs.mjs +0 -90
- package/dist/Accounts-CuE8aSZN.mjs +0 -27
- package/dist/BudgetUtil-BZiGckNY.mjs +0 -238
- package/dist/CashflowStore-naOtJcwo.mjs +0 -91
- package/dist/CurrencyInput-BEB3FS70.mjs +0 -85
- package/dist/Dialog-jmgGw5WA.mjs +0 -58
- package/dist/GlobalAccountFilter-CIF-aT3F.mjs +0 -316
- package/dist/GoalStore-BjHKNAVm.mjs +0 -421
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-CnscUFUG.mjs +0 -580
- package/dist/Loader-icSc5MlE.mjs +0 -24
- package/dist/Localization-2MODESHW.mjs +0 -30
- package/dist/MicroWidgetContainer-CBRk9KG-.mjs +0 -45
- package/dist/MiniWidgetContainer-CXQcSWSl.mjs +0 -56
- package/dist/Notification-Bs1fdbzI.mjs +0 -95
- package/dist/RecurringTransactions-DlKYwpfK.mjs +0 -296
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/SpendingLegend-Bld71d7q.mjs +0 -193
- package/dist/StatusIndicator-CNMQeYyJ.mjs +0 -55
- package/dist/TransactionDetails-Lvt9GCU5.mjs +0 -1194
- package/dist/TransactionList-BDffKJMO.mjs +0 -204
- package/dist/User-DS18cMaz.mjs +0 -237
- package/dist/ViewMoreMicroCard-YHRLl08A.mjs +0 -1152
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/types/SpendingPlan.d.ts +0 -44
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
- /package/dist/{common → core}/types/Account.d.ts +0 -0
- /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
- /package/dist/{common → core}/types/Category.d.ts +0 -0
- /package/dist/{common → core}/types/Client.d.ts +0 -0
- /package/dist/{common → core}/types/Date.d.ts +0 -0
- /package/dist/{common → core}/types/Debt.d.ts +0 -0
- /package/dist/{common → core}/types/Global.d.ts +0 -0
- /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
- /package/dist/{common → core}/types/Goal.d.ts +0 -0
- /package/dist/{common → core}/types/Handlers.d.ts +0 -0
- /package/dist/{common → core}/types/Help.d.ts +0 -0
- /package/dist/{common → core}/types/Holding.d.ts +0 -0
- /package/dist/{common → core}/types/Institution.d.ts +0 -0
- /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
- /package/dist/{common → core}/types/Merchant.d.ts +0 -0
- /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
- /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
- /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
- /package/dist/{common → core}/types/Transaction.d.ts +0 -0
- /package/dist/{common → core}/types/User.d.ts +0 -0
- /package/dist/{common → core}/types/Widgets.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/TrendsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/index.d.ts +0 -0
package/dist/debts/index.es.js
CHANGED
|
@@ -1,73 +1,75 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
5
|
-
import { useTheme as V, Card as
|
|
6
|
-
import { Text as l, P as
|
|
7
|
-
import { intervalToDuration as
|
|
8
|
-
import { addMonths as
|
|
9
|
-
import { fromUnixTime as
|
|
10
|
-
import { getUnixTime as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { f as
|
|
14
|
-
import { f as
|
|
15
|
-
import { G as
|
|
16
|
-
import { u as
|
|
17
|
-
import { D as
|
|
18
|
-
import { b as
|
|
19
|
-
import { A as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { useTheme as
|
|
25
|
-
import { LineChart as
|
|
26
|
-
import { A as
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import { M as
|
|
32
|
-
import
|
|
33
|
-
import { L as
|
|
34
|
-
import { C as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import { Error as
|
|
39
|
-
import { T as
|
|
40
|
-
import { DataGridPro as
|
|
41
|
-
import { H as
|
|
42
|
-
import {
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import {
|
|
48
|
-
import { u as
|
|
49
|
-
import {
|
|
50
|
-
|
|
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 V, Card as we, Stack as _, Box as W } from "@mui/material";
|
|
6
|
+
import { Text as l, P as Ce, H3 as Fe, InstitutionLogo as Le, Icon as ae } from "@mxenabled/mxui";
|
|
7
|
+
import { intervalToDuration as $e, formatDuration as Oe } from "date-fns";
|
|
8
|
+
import { addMonths as me } from "date-fns/addMonths";
|
|
9
|
+
import { fromUnixTime as ue } from "date-fns/fromUnixTime";
|
|
10
|
+
import { getUnixTime as be } from "date-fns/getUnixTime";
|
|
11
|
+
import { a as P, M as He, I as We } from "../DebtsStore-BZqNLaqd.mjs";
|
|
12
|
+
import { D as ro } from "../DebtsStore-BZqNLaqd.mjs";
|
|
13
|
+
import { f as R, a as Ge } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
14
|
+
import { f as Q, D as ee } from "../DateFormats-BMpMrZpW.mjs";
|
|
15
|
+
import { G as je, v as te, u as C, k as K, g as B, d as re, a as ze, b as Ye } from "../hooks-BxkfR-Ff.mjs";
|
|
16
|
+
import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
|
+
import { D as ie } from "../Drawer-Bbe4AMB1.mjs";
|
|
18
|
+
import { b as E } from "../Localization-CPkpIwIx.mjs";
|
|
19
|
+
import { A as Ve, u as Ke } from "../AccountDetailsHeader-D9gbTbUt.mjs";
|
|
20
|
+
import Ue from "@mui/material/Card";
|
|
21
|
+
import qe from "@mui/material/CardContent";
|
|
22
|
+
import Xe from "@mui/material/CardHeader";
|
|
23
|
+
import le from "@mui/material/Box";
|
|
24
|
+
import { useTheme as Ze } from "@mui/material/styles";
|
|
25
|
+
import { LineChart as Je } from "@mui/x-charts/LineChart";
|
|
26
|
+
import { A as S } from "../Analytics-BYItVAe-.mjs";
|
|
27
|
+
import _e from "@mui/material/Tab";
|
|
28
|
+
import Qe from "@mui/material/Tabs";
|
|
29
|
+
import ve from "@mui/material/List";
|
|
30
|
+
import G from "@mui/material/Divider";
|
|
31
|
+
import { M as et, I as tt, O as rt } from "../OriginalBalanceAction-DjpvVVFz.mjs";
|
|
32
|
+
import ot from "@mui/material/TextField";
|
|
33
|
+
import { L as oe } from "../ListItemAction-4KB7P75M.mjs";
|
|
34
|
+
import { C as se } from "../CurrencyInput-DuMktPu3.mjs";
|
|
35
|
+
import ye from "@mui/material/Alert";
|
|
36
|
+
import fe from "@mui/material/AlertTitle";
|
|
37
|
+
import xe from "@mui/material/Paper";
|
|
38
|
+
import { Error as nt, CheckCircle as De } from "@mxenabled/mx-icons";
|
|
39
|
+
import { T as ge } from "../TabContentContainer-j01JYR_7.mjs";
|
|
40
|
+
import { DataGridPro as at } from "@mui/x-data-grid-pro";
|
|
41
|
+
import { H as j } from "../HeaderCell-P8w6CmfO.mjs";
|
|
42
|
+
import { f as it, A as Y } from "../Account-BiB1F8lL.mjs";
|
|
43
|
+
import Se from "@mui/material/Button";
|
|
44
|
+
import lt from "@mui/material/IconButton";
|
|
45
|
+
import st from "@mui/material/ListItem";
|
|
46
|
+
import ct from "@mui/material/Popover";
|
|
47
|
+
import { C as dt } from "../ConnectDrawer-C0wjwcJt.mjs";
|
|
48
|
+
import { u as pt } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
49
|
+
import { L as ht } from "../Loader-D3rjKx72.mjs";
|
|
50
|
+
import { W as mt } from "../WidgetContainer-B7xDq2bM.mjs";
|
|
51
|
+
import { E as ut } from "../EmptyState-DHAkGsjk.mjs";
|
|
52
|
+
const bt = (o, n = 0, r = 0) => {
|
|
51
53
|
if (r === 0) return 0;
|
|
52
|
-
const t =
|
|
54
|
+
const t = n / (He * We);
|
|
53
55
|
return Math.ceil(
|
|
54
|
-
t === 0 ?
|
|
56
|
+
t === 0 ? o / r : -Math.log(1 - t * o / r) / Math.log(1 + t)
|
|
55
57
|
);
|
|
56
|
-
},
|
|
58
|
+
}, _t = (o, n, r, t, a) => {
|
|
57
59
|
const i = [];
|
|
58
60
|
if (r === 0) {
|
|
59
|
-
for (let
|
|
60
|
-
const p =
|
|
61
|
+
for (let d = 0; d < o; d++) {
|
|
62
|
+
const p = n - t * (d + 1), m = n - t * d, h = p >= 0 ? t : m;
|
|
61
63
|
i.push({
|
|
62
64
|
balance: p >= 0 ? p : 0,
|
|
63
65
|
interest: r,
|
|
64
|
-
payment:
|
|
65
|
-
principal:
|
|
66
|
-
timestamp:
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
payment: h,
|
|
67
|
+
principal: h,
|
|
68
|
+
timestamp: be(
|
|
69
|
+
me(
|
|
70
|
+
ue(a),
|
|
69
71
|
// convert seconds → Date
|
|
70
|
-
|
|
72
|
+
d + 1
|
|
71
73
|
// add (index + 1) months
|
|
72
74
|
)
|
|
73
75
|
)
|
|
@@ -75,99 +77,99 @@ const rt = (a, o = 0, r = 0) => {
|
|
|
75
77
|
}
|
|
76
78
|
return i;
|
|
77
79
|
}
|
|
78
|
-
const
|
|
79
|
-
for (let
|
|
80
|
-
const p =
|
|
80
|
+
const c = r / 1200;
|
|
81
|
+
for (let d = 0; d < o; d++) {
|
|
82
|
+
const p = be(me(ue(a), d + 1)), m = Math.pow(1 + c, d), h = n * m - t * ((m - 1) / c), w = Math.pow(1 + c, d + 1), b = n * w - t * ((w - 1) / c), M = t + Math.min(b, 0), k = h * c;
|
|
81
83
|
i.push({
|
|
82
|
-
balance: Math.max(0,
|
|
83
|
-
interest:
|
|
84
|
-
payment:
|
|
85
|
-
principal:
|
|
84
|
+
balance: Math.max(0, b),
|
|
85
|
+
interest: k,
|
|
86
|
+
payment: M,
|
|
87
|
+
principal: M - k,
|
|
86
88
|
timestamp: p
|
|
87
89
|
});
|
|
88
90
|
}
|
|
89
91
|
return i;
|
|
90
|
-
},
|
|
91
|
-
const { monthly_payment:
|
|
92
|
+
}, yt = (o) => (o[o.length - 1] || {}).timestamp, ft = (o) => {
|
|
93
|
+
const { monthly_payment: n, interest_rate: r, balance: t, payment_due_date: a } = o, i = bt(t, r ?? 0, n ?? 0), c = _t(
|
|
92
94
|
i,
|
|
93
95
|
t,
|
|
94
96
|
r ?? 0,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
),
|
|
97
|
+
n ?? 0,
|
|
98
|
+
a
|
|
99
|
+
), d = yt(c);
|
|
98
100
|
return {
|
|
99
|
-
...
|
|
100
|
-
minimumFinalPayment:
|
|
101
|
-
minimumPayments:
|
|
101
|
+
...o,
|
|
102
|
+
minimumFinalPayment: d,
|
|
103
|
+
minimumPayments: c
|
|
102
104
|
};
|
|
103
|
-
},
|
|
104
|
-
const [r, t] =
|
|
105
|
-
([
|
|
105
|
+
}, Te = (o, n) => {
|
|
106
|
+
const [r, t] = o.reduce(
|
|
107
|
+
([a, i], c) => (c.is_paid_off || c.is_impossible ? i.push({ ...c, minimumPayments: [] }) : a.push(ft(c)), [a, i]),
|
|
106
108
|
[[], []]
|
|
107
109
|
);
|
|
108
|
-
switch (
|
|
109
|
-
case
|
|
110
|
-
r.sort((
|
|
110
|
+
switch (n) {
|
|
111
|
+
case P.FASTEST_PAYOFF_FIRST:
|
|
112
|
+
r.sort((a, i) => (a.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
|
|
111
113
|
break;
|
|
112
|
-
case
|
|
113
|
-
r.sort((
|
|
114
|
+
case P.HIGHEST_INTEREST:
|
|
115
|
+
r.sort((a, i) => (i.interest_rate ?? 0) - (a.interest_rate ?? 0));
|
|
114
116
|
break;
|
|
115
|
-
case
|
|
116
|
-
r.sort((
|
|
117
|
+
case P.LOWEST_BALANCE:
|
|
118
|
+
r.sort((a, i) => a.balance - i.balance);
|
|
117
119
|
break;
|
|
118
|
-
case
|
|
119
|
-
r.sort((
|
|
120
|
+
case P.HIGHEST_BALANCE:
|
|
121
|
+
r.sort((a, i) => i.balance - a.balance);
|
|
120
122
|
break;
|
|
121
123
|
default:
|
|
122
|
-
r.sort((
|
|
124
|
+
r.sort((a, i) => a.balance - i.balance);
|
|
123
125
|
}
|
|
124
|
-
|
|
126
|
+
o.splice(0, o.length, ...r, ...t);
|
|
125
127
|
};
|
|
126
|
-
function
|
|
127
|
-
const t =
|
|
128
|
-
(
|
|
128
|
+
function xt(o, n, r = 0) {
|
|
129
|
+
const t = o.map((h) => ({ ...h })).filter(
|
|
130
|
+
(h) => h.interest_rate !== void 0 && h.monthly_payment !== void 0 && !h.is_paid_off
|
|
129
131
|
);
|
|
130
|
-
|
|
131
|
-
let
|
|
132
|
-
const
|
|
133
|
-
for (; t.some((
|
|
134
|
-
let
|
|
135
|
-
for (const [w,
|
|
136
|
-
if (
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
w === 0 && r && (
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
|
|
132
|
+
Te(t, n);
|
|
133
|
+
let a = 0, i = 0;
|
|
134
|
+
const c = /* @__PURE__ */ new Date(), d = /* @__PURE__ */ new Date();
|
|
135
|
+
for (; t.some((h) => h.balance >= 0.01 && !h.is_impossible); ) {
|
|
136
|
+
let h = !1;
|
|
137
|
+
for (const [w, b] of t.entries()) {
|
|
138
|
+
if (b.balance <= 0.01 || b.is_impossible) continue;
|
|
139
|
+
const k = (b.interest_rate ?? 0) / 100 / 12, I = b.balance * k;
|
|
140
|
+
let v = b.monthly_payment ?? 0;
|
|
141
|
+
w === 0 && r && (v += r), b.balance += I;
|
|
142
|
+
const T = Math.min(b.balance, v + i);
|
|
143
|
+
if (T <= I) {
|
|
144
|
+
b.is_impossible = !0;
|
|
143
145
|
continue;
|
|
144
146
|
}
|
|
145
|
-
|
|
147
|
+
b.balance -= T, b.balance = b.balance < 0.01 ? 0 : b.balance, a += I, b.balance <= 0 && (i += v), T > 0 && (h = !0);
|
|
146
148
|
}
|
|
147
|
-
|
|
149
|
+
h && d.setMonth(d.getMonth() + 1);
|
|
148
150
|
}
|
|
149
|
-
const p = t.some((
|
|
151
|
+
const p = t.some((h) => h.is_impossible && h.balance > 0), m = $e({ start: c, end: d });
|
|
150
152
|
return {
|
|
151
|
-
payoffSavings: p ? "N/A" :
|
|
152
|
-
payoffDate: p ? "Never" :
|
|
153
|
-
payoffDuration: p ? "Stagnant" :
|
|
153
|
+
payoffSavings: p ? "N/A" : R(a, "0,0.00"),
|
|
154
|
+
payoffDate: p ? "Never" : Q(d, ee.MONTH_YEAR),
|
|
155
|
+
payoffDuration: p ? "Stagnant" : Oe(m, { format: ["years", "months"] }) || "0 months"
|
|
154
156
|
};
|
|
155
157
|
}
|
|
156
158
|
const F = () => {
|
|
157
|
-
if (!
|
|
159
|
+
if (!x.useContext(je))
|
|
158
160
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
|
159
|
-
return
|
|
160
|
-
},
|
|
161
|
-
const t = V(), { isMobile:
|
|
162
|
-
const w =
|
|
163
|
-
return
|
|
164
|
-
}, [
|
|
161
|
+
return te().uiStore;
|
|
162
|
+
}, gt = ({ debts: o, onClickCta: n, sx: r }) => {
|
|
163
|
+
const t = V(), { isMobile: a } = U(), { debts: i } = C(), { selectedDebtPriority: c } = F(), { monthlyCashFlowProfile: d } = K(), { payoffDate: p, payoffSavings: m, payoffDuration: h } = x.useMemo(() => {
|
|
164
|
+
const w = d?.extra_payment ?? 0;
|
|
165
|
+
return xt(o, c, w);
|
|
166
|
+
}, [o, c, d]);
|
|
165
167
|
return /* @__PURE__ */ e(
|
|
166
|
-
|
|
168
|
+
we,
|
|
167
169
|
{
|
|
168
170
|
sx: {
|
|
169
171
|
boxShadow: t.shadows[2],
|
|
170
|
-
width:
|
|
172
|
+
width: a ? "100%" : "186px",
|
|
171
173
|
minWidth: "186px",
|
|
172
174
|
...r
|
|
173
175
|
},
|
|
@@ -175,66 +177,66 @@ const F = () => {
|
|
|
175
177
|
/* @__PURE__ */ s(
|
|
176
178
|
_,
|
|
177
179
|
{
|
|
178
|
-
gap:
|
|
180
|
+
gap: a ? "4px" : "0",
|
|
179
181
|
sx: {
|
|
180
182
|
borderBottom: "1px solid",
|
|
181
183
|
borderBottomColor: t.palette.grey[300],
|
|
182
184
|
pb: "8px"
|
|
183
185
|
},
|
|
184
186
|
children: [
|
|
185
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
186
|
-
/* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "
|
|
187
|
+
/* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_date_description }),
|
|
188
|
+
/* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "body2", children: p })
|
|
187
189
|
]
|
|
188
190
|
}
|
|
189
191
|
),
|
|
190
|
-
/* @__PURE__ */ s(_, { gap:
|
|
191
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
192
|
-
/* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "
|
|
192
|
+
/* @__PURE__ */ s(_, { gap: a ? "4px" : "0", children: [
|
|
193
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: m }),
|
|
194
|
+
/* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "caption", children: i.snowball_card_amount_description })
|
|
193
195
|
] }),
|
|
194
|
-
/* @__PURE__ */ s(_, { gap:
|
|
195
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
196
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
196
|
+
/* @__PURE__ */ s(_, { gap: a ? "4px" : "0", children: [
|
|
197
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: h }),
|
|
198
|
+
/* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_duration_description })
|
|
197
199
|
] }),
|
|
198
200
|
/* @__PURE__ */ e(
|
|
199
201
|
l,
|
|
200
202
|
{
|
|
201
203
|
bold: !0,
|
|
202
204
|
color: t.palette.primary.main,
|
|
203
|
-
onClick:
|
|
205
|
+
onClick: n,
|
|
204
206
|
sx: { cursor: "pointer" },
|
|
205
|
-
variant: "
|
|
207
|
+
variant: "body2",
|
|
206
208
|
children: i.snowball_card_cta
|
|
207
209
|
}
|
|
208
210
|
)
|
|
209
211
|
] })
|
|
210
212
|
}
|
|
211
213
|
);
|
|
212
|
-
},
|
|
213
|
-
const r = V(), { debts: t } = C(), [
|
|
214
|
+
}, wt = D(gt), Ct = ({ isOpen: o, onClose: n }) => {
|
|
215
|
+
const r = V(), { debts: t } = C(), [a, i] = x.useState(!1);
|
|
214
216
|
return /* @__PURE__ */ e(
|
|
215
|
-
|
|
217
|
+
ie,
|
|
216
218
|
{
|
|
217
219
|
ariaLabelClose: "",
|
|
218
|
-
isOpen:
|
|
219
|
-
onClose:
|
|
220
|
+
isOpen: o,
|
|
221
|
+
onClose: n,
|
|
220
222
|
title: t.snowball_drawer_title,
|
|
221
223
|
children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
|
|
222
224
|
/* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
|
|
223
225
|
/* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
|
|
224
|
-
/* @__PURE__ */ e(l, { mb: 12, variant: "
|
|
225
|
-
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "
|
|
226
|
-
/* @__PURE__ */ e(
|
|
227
|
-
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "
|
|
226
|
+
/* @__PURE__ */ e(l, { mb: 12, variant: "h3", children: t.snowball_drawer_subtitle }),
|
|
227
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "body2", children: t.snowball_drawer_amount_description }),
|
|
228
|
+
/* @__PURE__ */ e(Ce, { variant: "h1", children: t.snowball_drawer_savings }),
|
|
229
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "body2", children: t.snowball_drawer_duration_description })
|
|
228
230
|
] }),
|
|
229
|
-
/* @__PURE__ */ s(
|
|
230
|
-
/* @__PURE__ */ e(l, { mb: 4, variant: "
|
|
231
|
+
/* @__PURE__ */ s(we, { sx: { display: "grid", py: 16, px: 24 }, children: [
|
|
232
|
+
/* @__PURE__ */ e(l, { mb: 4, variant: "h3", children: t.snowball_drawer_question }),
|
|
231
233
|
/* @__PURE__ */ e(
|
|
232
234
|
l,
|
|
233
235
|
{
|
|
234
236
|
color: r.palette.secondary.main,
|
|
235
237
|
mb: 8,
|
|
236
|
-
sx: { whiteSpace:
|
|
237
|
-
variant: "
|
|
238
|
+
sx: { whiteSpace: a ? "normal" : "nowrap" },
|
|
239
|
+
variant: "subtitle2",
|
|
238
240
|
children: t.snowball_drawer_answer
|
|
239
241
|
}
|
|
240
242
|
),
|
|
@@ -243,10 +245,10 @@ const F = () => {
|
|
|
243
245
|
{
|
|
244
246
|
bold: !0,
|
|
245
247
|
color: r.palette.primary.main,
|
|
246
|
-
onClick: () => i(!
|
|
248
|
+
onClick: () => i(!a),
|
|
247
249
|
sx: { cursor: "pointer" },
|
|
248
|
-
variant: "
|
|
249
|
-
children:
|
|
250
|
+
variant: "body2",
|
|
251
|
+
children: a ? t.snowball_drawer_less : t.snowball_drawer_more
|
|
250
252
|
}
|
|
251
253
|
)
|
|
252
254
|
] })
|
|
@@ -258,13 +260,13 @@ const F = () => {
|
|
|
258
260
|
color: r.palette.secondary.main,
|
|
259
261
|
px: 24,
|
|
260
262
|
sx: { textAlign: "center", whiteSpace: "normal" },
|
|
261
|
-
variant: "
|
|
263
|
+
variant: "body2",
|
|
262
264
|
children: t.snowball_drawer_disclaimer
|
|
263
265
|
}
|
|
264
266
|
),
|
|
265
267
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
266
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
267
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
268
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 1) }),
|
|
269
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
|
|
268
270
|
] }),
|
|
269
271
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
270
272
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -281,14 +283,14 @@ const F = () => {
|
|
|
281
283
|
backgroundColor: r.palette.success.main,
|
|
282
284
|
marginRight: 12
|
|
283
285
|
},
|
|
284
|
-
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "
|
|
286
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
|
|
285
287
|
}
|
|
286
288
|
),
|
|
287
289
|
/* @__PURE__ */ s(
|
|
288
290
|
_,
|
|
289
291
|
{
|
|
290
292
|
sx: {
|
|
291
|
-
borderBottom: `1px solid ${r.palette.
|
|
293
|
+
borderBottom: `1px solid ${r.palette.neutral.light}`,
|
|
292
294
|
flexDirection: "row",
|
|
293
295
|
flexGrow: 1,
|
|
294
296
|
py: 14,
|
|
@@ -296,25 +298,25 @@ const F = () => {
|
|
|
296
298
|
},
|
|
297
299
|
children: [
|
|
298
300
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
299
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
300
|
-
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "
|
|
301
|
-
|
|
301
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "A") }),
|
|
302
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
|
|
303
|
+
E(
|
|
302
304
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
303
305
|
"$100"
|
|
304
306
|
),
|
|
305
|
-
/* @__PURE__ */ e("strong", { children:
|
|
307
|
+
/* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "B") }),
|
|
306
308
|
t.snowball_drawer_rollover_explainer_pt2
|
|
307
309
|
] })
|
|
308
310
|
] }),
|
|
309
311
|
/* @__PURE__ */ s(_, { children: [
|
|
310
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
312
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: "$100.00" }),
|
|
311
313
|
/* @__PURE__ */ e(
|
|
312
314
|
l,
|
|
313
315
|
{
|
|
314
316
|
bold: !0,
|
|
315
317
|
color: r.palette.success.main,
|
|
316
318
|
textAlign: "end",
|
|
317
|
-
variant: "
|
|
319
|
+
variant: "tiny",
|
|
318
320
|
children: t.snowball_drawer_paid_label
|
|
319
321
|
}
|
|
320
322
|
)
|
|
@@ -332,7 +334,7 @@ const F = () => {
|
|
|
332
334
|
height: 20,
|
|
333
335
|
marginRight: 12,
|
|
334
336
|
borderRadius: "50%",
|
|
335
|
-
border: `3px solid ${r.palette.
|
|
337
|
+
border: `3px solid ${r.palette.neutral.main}`
|
|
336
338
|
}
|
|
337
339
|
}
|
|
338
340
|
),
|
|
@@ -340,15 +342,15 @@ const F = () => {
|
|
|
340
342
|
_,
|
|
341
343
|
{
|
|
342
344
|
sx: {
|
|
343
|
-
borderBottom: `1px solid ${r.palette.
|
|
345
|
+
borderBottom: `1px solid ${r.palette.neutral.light}`,
|
|
344
346
|
flexDirection: "row",
|
|
345
347
|
flexGrow: 1,
|
|
346
348
|
py: 14,
|
|
347
349
|
pr: 24
|
|
348
350
|
},
|
|
349
351
|
children: [
|
|
350
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
351
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
352
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
|
|
353
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: "$400.00" })
|
|
352
354
|
]
|
|
353
355
|
}
|
|
354
356
|
)
|
|
@@ -362,13 +364,13 @@ const F = () => {
|
|
|
362
364
|
height: 20,
|
|
363
365
|
marginRight: 12,
|
|
364
366
|
borderRadius: "50%",
|
|
365
|
-
border: `3px solid ${r.palette.
|
|
367
|
+
border: `3px solid ${r.palette.neutral.main}`
|
|
366
368
|
}
|
|
367
369
|
}
|
|
368
370
|
),
|
|
369
371
|
/* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
|
|
370
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
371
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
372
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
|
|
373
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
|
|
372
374
|
] })
|
|
373
375
|
] }),
|
|
374
376
|
/* @__PURE__ */ s(
|
|
@@ -379,19 +381,19 @@ const F = () => {
|
|
|
379
381
|
px: 24,
|
|
380
382
|
flexDirection: "row",
|
|
381
383
|
justifyContent: "space-between",
|
|
382
|
-
borderTop: `1px solid ${r.palette.
|
|
383
|
-
borderBottom: `1px solid ${r.palette.
|
|
384
|
+
borderTop: `1px solid ${r.palette.neutral.light}`,
|
|
385
|
+
borderBottom: `1px solid ${r.palette.neutral.light}`
|
|
384
386
|
},
|
|
385
387
|
children: [
|
|
386
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
387
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
388
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
|
|
389
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
|
|
388
390
|
]
|
|
389
391
|
}
|
|
390
392
|
)
|
|
391
393
|
] }),
|
|
392
394
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
393
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
394
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
395
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 2) }),
|
|
396
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
|
|
395
397
|
] }),
|
|
396
398
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
397
399
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -408,14 +410,14 @@ const F = () => {
|
|
|
408
410
|
backgroundColor: r.palette.success.main,
|
|
409
411
|
marginRight: 12
|
|
410
412
|
},
|
|
411
|
-
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "
|
|
413
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
|
|
412
414
|
}
|
|
413
415
|
),
|
|
414
416
|
/* @__PURE__ */ s(
|
|
415
417
|
_,
|
|
416
418
|
{
|
|
417
419
|
sx: {
|
|
418
|
-
borderBottom: `1px solid ${r.palette.
|
|
420
|
+
borderBottom: `1px solid ${r.palette.neutral.light}`,
|
|
419
421
|
flexDirection: "row",
|
|
420
422
|
flexGrow: 1,
|
|
421
423
|
py: 14,
|
|
@@ -423,25 +425,25 @@ const F = () => {
|
|
|
423
425
|
},
|
|
424
426
|
children: [
|
|
425
427
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
426
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
427
|
-
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "
|
|
428
|
-
|
|
428
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
|
|
429
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
|
|
430
|
+
E(
|
|
429
431
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
430
432
|
"$500"
|
|
431
433
|
),
|
|
432
|
-
/* @__PURE__ */ e("strong", { children:
|
|
434
|
+
/* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "C") }),
|
|
433
435
|
t.snowball_drawer_rollover_explainer_pt2
|
|
434
436
|
] })
|
|
435
437
|
] }),
|
|
436
438
|
/* @__PURE__ */ s(_, { children: [
|
|
437
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
439
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: "$500.00" }),
|
|
438
440
|
/* @__PURE__ */ e(
|
|
439
441
|
l,
|
|
440
442
|
{
|
|
441
443
|
bold: !0,
|
|
442
444
|
color: r.palette.success.main,
|
|
443
445
|
textAlign: "end",
|
|
444
|
-
variant: "
|
|
446
|
+
variant: "tiny",
|
|
445
447
|
children: t.snowball_drawer_paid_label
|
|
446
448
|
}
|
|
447
449
|
)
|
|
@@ -459,7 +461,7 @@ const F = () => {
|
|
|
459
461
|
height: 20,
|
|
460
462
|
marginRight: 12,
|
|
461
463
|
borderRadius: "50%",
|
|
462
|
-
border: `3px solid ${r.palette.
|
|
464
|
+
border: `3px solid ${r.palette.neutral.main}`
|
|
463
465
|
}
|
|
464
466
|
}
|
|
465
467
|
),
|
|
@@ -473,8 +475,8 @@ const F = () => {
|
|
|
473
475
|
pr: 24
|
|
474
476
|
},
|
|
475
477
|
children: [
|
|
476
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
477
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
478
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
|
|
479
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
|
|
478
480
|
]
|
|
479
481
|
}
|
|
480
482
|
)
|
|
@@ -487,19 +489,19 @@ const F = () => {
|
|
|
487
489
|
px: 24,
|
|
488
490
|
flexDirection: "row",
|
|
489
491
|
justifyContent: "space-between",
|
|
490
|
-
borderTop: `1px solid ${r.palette.
|
|
491
|
-
borderBottom: `1px solid ${r.palette.
|
|
492
|
+
borderTop: `1px solid ${r.palette.neutral.light}`,
|
|
493
|
+
borderBottom: `1px solid ${r.palette.neutral.light}`
|
|
492
494
|
},
|
|
493
495
|
children: [
|
|
494
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
495
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
496
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
|
|
497
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
|
|
496
498
|
]
|
|
497
499
|
}
|
|
498
500
|
)
|
|
499
501
|
] }),
|
|
500
502
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
501
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
502
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
503
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 3) }),
|
|
504
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
|
|
503
505
|
] }),
|
|
504
506
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
505
507
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -516,7 +518,7 @@ const F = () => {
|
|
|
516
518
|
backgroundColor: r.palette.success.main,
|
|
517
519
|
marginRight: 12
|
|
518
520
|
},
|
|
519
|
-
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "
|
|
521
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
|
|
520
522
|
}
|
|
521
523
|
),
|
|
522
524
|
/* @__PURE__ */ s(
|
|
@@ -530,16 +532,16 @@ const F = () => {
|
|
|
530
532
|
pr: 24
|
|
531
533
|
},
|
|
532
534
|
children: [
|
|
533
|
-
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "
|
|
535
|
+
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }) }),
|
|
534
536
|
/* @__PURE__ */ s(_, { children: [
|
|
535
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
537
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: "$1,500.00" }),
|
|
536
538
|
/* @__PURE__ */ e(
|
|
537
539
|
l,
|
|
538
540
|
{
|
|
539
541
|
bold: !0,
|
|
540
542
|
color: r.palette.success.main,
|
|
541
543
|
textAlign: "end",
|
|
542
|
-
variant: "
|
|
544
|
+
variant: "tiny",
|
|
543
545
|
children: t.snowball_drawer_paid_label
|
|
544
546
|
}
|
|
545
547
|
)
|
|
@@ -556,12 +558,12 @@ const F = () => {
|
|
|
556
558
|
px: 24,
|
|
557
559
|
flexDirection: "row",
|
|
558
560
|
justifyContent: "space-between",
|
|
559
|
-
borderTop: `1px solid ${r.palette.
|
|
560
|
-
borderBottom: `1px solid ${r.palette.
|
|
561
|
+
borderTop: `1px solid ${r.palette.neutral.light}`,
|
|
562
|
+
borderBottom: `1px solid ${r.palette.neutral.light}`
|
|
561
563
|
},
|
|
562
564
|
children: [
|
|
563
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
564
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
565
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
|
|
566
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
|
|
565
567
|
]
|
|
566
568
|
}
|
|
567
569
|
)
|
|
@@ -570,50 +572,50 @@ const F = () => {
|
|
|
570
572
|
] })
|
|
571
573
|
}
|
|
572
574
|
);
|
|
573
|
-
},
|
|
574
|
-
function
|
|
575
|
-
const [r, t,
|
|
576
|
-
Math.max(0, Math.min(255, Math.round(r *
|
|
577
|
-
Math.max(0, Math.min(255, Math.round(t *
|
|
578
|
-
Math.max(0, Math.min(255, Math.round(
|
|
575
|
+
}, vt = D(Ct), Dt = "#FF7B08";
|
|
576
|
+
function St(o, n) {
|
|
577
|
+
const [r, t, a] = o.replace(/^#/, "").match(/.{1,2}/g).map((c) => parseInt(c, 16)), i = [
|
|
578
|
+
Math.max(0, Math.min(255, Math.round(r * n))),
|
|
579
|
+
Math.max(0, Math.min(255, Math.round(t * n))),
|
|
580
|
+
Math.max(0, Math.min(255, Math.round(a * n)))
|
|
579
581
|
];
|
|
580
582
|
return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
|
|
581
583
|
}
|
|
582
|
-
const
|
|
583
|
-
sx:
|
|
584
|
-
height:
|
|
584
|
+
const Ae = ({
|
|
585
|
+
sx: o,
|
|
586
|
+
height: n = 500,
|
|
585
587
|
width: r,
|
|
586
588
|
debts: t,
|
|
587
|
-
hoveredDebtGuid:
|
|
589
|
+
hoveredDebtGuid: a,
|
|
588
590
|
onClickArea: i,
|
|
589
|
-
onHoverArea:
|
|
591
|
+
onHoverArea: c
|
|
590
592
|
}) => {
|
|
591
|
-
const
|
|
593
|
+
const d = Ze(), { onEvent: p } = B(), m = t.filter((u) => !u.is_impossible), h = [
|
|
592
594
|
...new Set(
|
|
593
|
-
m.flatMap((
|
|
595
|
+
m.flatMap((u) => u.dataset.map((f) => new Date(f.x).getTime()))
|
|
594
596
|
)
|
|
595
|
-
].sort((
|
|
596
|
-
const
|
|
597
|
-
let
|
|
598
|
-
const
|
|
599
|
-
const
|
|
600
|
-
return
|
|
597
|
+
].sort((u, f) => u - f).map((u) => new Date(u)), w = m.map((u) => {
|
|
598
|
+
const f = new Map(u.dataset.map((L) => [new Date(L.x).getTime(), L.y]));
|
|
599
|
+
let A = f.get(h[0].getTime()) ?? 0;
|
|
600
|
+
const N = h.map((L) => {
|
|
601
|
+
const z = f.get(L.getTime()) ?? A;
|
|
602
|
+
return A = z, { x: L, y: z };
|
|
601
603
|
});
|
|
602
|
-
return { ...
|
|
603
|
-
}),
|
|
604
|
-
(
|
|
604
|
+
return { ...u, dataset: N };
|
|
605
|
+
}), b = w.reduce(
|
|
606
|
+
(u, f) => u + (f.dataset[0]?.y ?? 0),
|
|
605
607
|
0
|
|
606
|
-
),
|
|
607
|
-
const
|
|
608
|
-
return { x:
|
|
609
|
-
}),
|
|
610
|
-
const
|
|
608
|
+
), M = h.map((u, f) => {
|
|
609
|
+
const A = f / (h.length - 1), N = b * (1 - A);
|
|
610
|
+
return { x: u, y: N };
|
|
611
|
+
}), k = Math.ceil(b / 100) * 100, I = h, v = w.map((u, f) => {
|
|
612
|
+
const A = 1 - f / w.length * 0.5, N = St(Dt, A);
|
|
611
613
|
return {
|
|
612
|
-
id: `debt-${
|
|
613
|
-
guid:
|
|
614
|
-
label:
|
|
615
|
-
data:
|
|
616
|
-
color:
|
|
614
|
+
id: `debt-${f}`,
|
|
615
|
+
guid: u.guid,
|
|
616
|
+
label: u.name,
|
|
617
|
+
data: u.dataset.map((L) => L.y),
|
|
618
|
+
color: N,
|
|
617
619
|
curve: "linear",
|
|
618
620
|
type: "line",
|
|
619
621
|
area: !0,
|
|
@@ -621,20 +623,20 @@ const Ce = ({
|
|
|
621
623
|
showMark: !1
|
|
622
624
|
};
|
|
623
625
|
});
|
|
624
|
-
|
|
626
|
+
v.push({
|
|
625
627
|
id: "payoff-line",
|
|
626
628
|
label: "Payoff Line",
|
|
627
|
-
data:
|
|
628
|
-
color:
|
|
629
|
+
data: M.map((u) => u.y),
|
|
630
|
+
color: d.palette.grey[700],
|
|
629
631
|
curve: "linear",
|
|
630
632
|
type: "line",
|
|
631
633
|
stack: void 0,
|
|
632
634
|
showMark: !1,
|
|
633
635
|
disableHighlight: !0
|
|
634
636
|
});
|
|
635
|
-
const
|
|
637
|
+
const T = (u) => v.findIndex((f) => f?.guid === u);
|
|
636
638
|
return /* @__PURE__ */ e(
|
|
637
|
-
|
|
639
|
+
le,
|
|
638
640
|
{
|
|
639
641
|
sx: {
|
|
640
642
|
width: "100%",
|
|
@@ -649,23 +651,23 @@ const Ce = ({
|
|
|
649
651
|
}
|
|
650
652
|
},
|
|
651
653
|
children: /* @__PURE__ */ e(
|
|
652
|
-
|
|
654
|
+
Je,
|
|
653
655
|
{
|
|
654
656
|
axisHighlight: { x: "none" },
|
|
655
657
|
disableLineItemHighlight: !0,
|
|
656
|
-
height:
|
|
658
|
+
height: n,
|
|
657
659
|
hideLegend: !0,
|
|
658
660
|
margin: { bottom: 24, left: 32, right: 72, top: 48 },
|
|
659
|
-
onAreaClick: (
|
|
661
|
+
onAreaClick: (u, f) => {
|
|
660
662
|
i?.();
|
|
661
|
-
const
|
|
662
|
-
p(
|
|
663
|
+
const A = v.find((N) => N.id === f.seriesId);
|
|
664
|
+
p(S.DEBTS_CLICK_CHART_AREA, { account_guid: A?.guid });
|
|
663
665
|
},
|
|
664
|
-
onHighlightChange: (
|
|
665
|
-
const
|
|
666
|
-
|
|
666
|
+
onHighlightChange: (u) => {
|
|
667
|
+
const f = v.find((A) => A.id === u?.seriesId)?.guid;
|
|
668
|
+
c?.(f ?? "");
|
|
667
669
|
},
|
|
668
|
-
series:
|
|
670
|
+
series: v,
|
|
669
671
|
skipAnimation: !0,
|
|
670
672
|
slotProps: { tooltip: { trigger: "none" } },
|
|
671
673
|
sx: {
|
|
@@ -685,45 +687,45 @@ const Ce = ({
|
|
|
685
687
|
strokeDasharray: "10 5",
|
|
686
688
|
strokeWidth: 1
|
|
687
689
|
},
|
|
688
|
-
[`& .MuiLineElement-series-debt-${
|
|
690
|
+
[`& .MuiLineElement-series-debt-${T(a ?? "0")}`]: {
|
|
689
691
|
opacity: 1
|
|
690
692
|
},
|
|
691
|
-
[`& .MuiAreaElement-series-debt-${
|
|
693
|
+
[`& .MuiAreaElement-series-debt-${T(a ?? "0")}`]: {
|
|
692
694
|
opacity: 1
|
|
693
695
|
},
|
|
694
696
|
"& .MuiChartsAxis-tickLabel > tspan": {
|
|
695
|
-
fontFamily:
|
|
697
|
+
fontFamily: d.typography.body2.fontFamily
|
|
696
698
|
},
|
|
697
|
-
...
|
|
699
|
+
...o
|
|
698
700
|
},
|
|
699
701
|
width: r,
|
|
700
702
|
xAxis: [
|
|
701
703
|
{
|
|
702
|
-
data:
|
|
704
|
+
data: I,
|
|
703
705
|
disableTicks: !0,
|
|
704
|
-
min:
|
|
706
|
+
min: h[0],
|
|
705
707
|
scaleType: "time",
|
|
706
708
|
tickLabelMinGap: 24,
|
|
707
|
-
valueFormatter: (
|
|
709
|
+
valueFormatter: (u) => Q(u, ee.MONTH_SHORT_YEAR)
|
|
708
710
|
}
|
|
709
711
|
],
|
|
710
712
|
yAxis: [
|
|
711
713
|
{
|
|
712
714
|
min: 0,
|
|
713
|
-
max:
|
|
715
|
+
max: k,
|
|
714
716
|
disableTicks: !0,
|
|
715
|
-
valueFormatter: (
|
|
717
|
+
valueFormatter: (u) => R(u, "0a")
|
|
716
718
|
}
|
|
717
719
|
]
|
|
718
720
|
}
|
|
719
721
|
)
|
|
720
722
|
}
|
|
721
723
|
);
|
|
722
|
-
},
|
|
723
|
-
const
|
|
724
|
-
return /* @__PURE__ */ s(
|
|
724
|
+
}, Tt = () => {
|
|
725
|
+
const o = V(), { debts: n } = C(), { selectedDebtChartData: r } = F();
|
|
726
|
+
return /* @__PURE__ */ s($, { children: [
|
|
725
727
|
/* @__PURE__ */ s(
|
|
726
|
-
|
|
728
|
+
Ue,
|
|
727
729
|
{
|
|
728
730
|
sx: {
|
|
729
731
|
"& .MuiCardContent-root:last-child": {
|
|
@@ -731,70 +733,70 @@ const Ce = ({
|
|
|
731
733
|
}
|
|
732
734
|
},
|
|
733
735
|
children: [
|
|
734
|
-
/* @__PURE__ */ e(
|
|
735
|
-
/* @__PURE__ */ e(
|
|
736
|
+
/* @__PURE__ */ e(Xe, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Fe, { sx: { pb: 4 }, children: n.details_chart_title }) }),
|
|
737
|
+
/* @__PURE__ */ e(qe, { sx: { p: 0 }, children: /* @__PURE__ */ e(Ae, { debts: [r], height: 250 }) })
|
|
736
738
|
]
|
|
737
739
|
}
|
|
738
740
|
),
|
|
739
741
|
/* @__PURE__ */ e(
|
|
740
742
|
l,
|
|
741
743
|
{
|
|
742
|
-
color:
|
|
744
|
+
color: o.palette.text.secondary,
|
|
743
745
|
sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
|
|
744
|
-
variant: "
|
|
745
|
-
children:
|
|
746
|
+
variant: "body2",
|
|
747
|
+
children: n.details_chart_description
|
|
746
748
|
}
|
|
747
749
|
)
|
|
748
750
|
] });
|
|
749
|
-
},
|
|
750
|
-
const
|
|
751
|
-
return
|
|
751
|
+
}, At = D(Tt), Et = () => {
|
|
752
|
+
const o = V(), { onEvent: n } = B(), { debts: r } = C(), { selectedDebtChartData: t, showCompleted: a, showError: i } = F();
|
|
753
|
+
return x.useEffect(() => n(S.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(ve, { children: i || a ? /* @__PURE__ */ e(
|
|
752
754
|
l,
|
|
753
755
|
{
|
|
754
|
-
color:
|
|
756
|
+
color: o.palette.secondary.main,
|
|
755
757
|
component: "div",
|
|
756
758
|
sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
|
|
757
|
-
variant: "
|
|
759
|
+
variant: "body2",
|
|
758
760
|
children: i ? r.schedule_error_message : r.schedule_complete_message
|
|
759
761
|
}
|
|
760
|
-
) : /* @__PURE__ */ s(
|
|
761
|
-
/* @__PURE__ */ s(
|
|
762
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
763
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
762
|
+
) : /* @__PURE__ */ s($, { children: [
|
|
763
|
+
/* @__PURE__ */ s(g, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
764
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.schedule_month_heading }),
|
|
765
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.schedule_amount_heading })
|
|
764
766
|
] }),
|
|
765
|
-
t.dataset.slice(1).map(({ x:
|
|
766
|
-
|
|
767
|
+
t.dataset.slice(1).map(({ x: c, y: d, payment: p }) => /* @__PURE__ */ e(g, { bgcolor: o.palette.background.paper, children: /* @__PURE__ */ e(g, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
|
|
768
|
+
g,
|
|
767
769
|
{
|
|
768
770
|
sx: {
|
|
769
|
-
borderBottom: `1px solid ${
|
|
771
|
+
borderBottom: `1px solid ${o.palette.divider}`,
|
|
770
772
|
flexDirection: "row",
|
|
771
773
|
flexGrow: 1,
|
|
772
774
|
py: 14,
|
|
773
775
|
pr: 24
|
|
774
776
|
},
|
|
775
777
|
children: [
|
|
776
|
-
/* @__PURE__ */ s(
|
|
777
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
778
|
-
/* @__PURE__ */ e(l, { color:
|
|
778
|
+
/* @__PURE__ */ s(g, { flexGrow: 1, children: [
|
|
779
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: Q(c, ee.MONTH_YEAR) }),
|
|
780
|
+
/* @__PURE__ */ e(l, { color: o.palette.secondary.main, variant: "caption", children: r.schedule_month_label })
|
|
779
781
|
] }),
|
|
780
|
-
/* @__PURE__ */ s(
|
|
781
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
782
|
+
/* @__PURE__ */ s(g, { children: [
|
|
783
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: R(d, "0,0.00") }),
|
|
782
784
|
/* @__PURE__ */ e(
|
|
783
785
|
l,
|
|
784
786
|
{
|
|
785
787
|
bold: !0,
|
|
786
|
-
color:
|
|
788
|
+
color: o.palette.success.main,
|
|
787
789
|
textAlign: "end",
|
|
788
|
-
variant: "
|
|
789
|
-
children: `+${
|
|
790
|
+
variant: "tiny",
|
|
791
|
+
children: `+${R(p, "0,0")}`
|
|
790
792
|
}
|
|
791
793
|
)
|
|
792
794
|
] })
|
|
793
795
|
]
|
|
794
796
|
}
|
|
795
|
-
) }) }, String(
|
|
796
|
-
/* @__PURE__ */ e(
|
|
797
|
-
|
|
797
|
+
) }) }, String(c))),
|
|
798
|
+
/* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
|
|
799
|
+
g,
|
|
798
800
|
{
|
|
799
801
|
sx: {
|
|
800
802
|
alignItems: "center",
|
|
@@ -804,135 +806,135 @@ const Ce = ({
|
|
|
804
806
|
px: 24
|
|
805
807
|
},
|
|
806
808
|
children: [
|
|
807
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
808
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
809
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: r.schedule_payoff_label }),
|
|
810
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: "-" })
|
|
809
811
|
]
|
|
810
812
|
}
|
|
811
813
|
) })
|
|
812
814
|
] }) });
|
|
813
|
-
},
|
|
814
|
-
const { debts:
|
|
815
|
-
await r({ ...
|
|
815
|
+
}, It = D(Et), Mt = D(({ debt: o }) => {
|
|
816
|
+
const { debts: n } = C(), { updateAccount: r } = re(), { onEvent: t } = B(), [a, i] = x.useState(o.interest_rate ?? 0), c = a < 0, d = async () => {
|
|
817
|
+
await r({ ...o.account, interest_rate: a }), o.interest_rate = a, t(S.DEBTS_SAVE_RATE_ACTION, { account_guid: o.guid });
|
|
816
818
|
}, p = () => {
|
|
817
819
|
setTimeout(() => {
|
|
818
|
-
i(
|
|
820
|
+
i(o.interest_rate ?? 0);
|
|
819
821
|
}, 250);
|
|
820
822
|
};
|
|
821
823
|
return /* @__PURE__ */ e(
|
|
822
|
-
|
|
824
|
+
oe,
|
|
823
825
|
{
|
|
824
|
-
isSaveDisabled:
|
|
825
|
-
label: `${
|
|
826
|
+
isSaveDisabled: c,
|
|
827
|
+
label: `${n.details_interest_rate} (%)`,
|
|
826
828
|
onCancel: p,
|
|
827
|
-
onSave:
|
|
828
|
-
primaryText:
|
|
829
|
-
secondaryText:
|
|
830
|
-
zeroStateText:
|
|
829
|
+
onSave: d,
|
|
830
|
+
primaryText: n.details_interest_rate,
|
|
831
|
+
secondaryText: Ge(Number(o.interest_rate) / 100),
|
|
832
|
+
zeroStateText: o.interest_rate ? void 0 : n.add_interest_rate,
|
|
831
833
|
children: /* @__PURE__ */ e(
|
|
832
|
-
|
|
834
|
+
ot,
|
|
833
835
|
{
|
|
834
|
-
error:
|
|
836
|
+
error: c,
|
|
835
837
|
fullWidth: !0,
|
|
836
838
|
onChange: (m) => i(isNaN(parseFloat(m.target.value)) ? 0 : parseFloat(m.target.value)),
|
|
837
839
|
type: "number",
|
|
838
|
-
value:
|
|
840
|
+
value: a
|
|
839
841
|
}
|
|
840
842
|
)
|
|
841
843
|
}
|
|
842
844
|
);
|
|
843
|
-
}),
|
|
844
|
-
const { debts:
|
|
845
|
-
await r({ ...
|
|
845
|
+
}), kt = D(({ debt: o }) => {
|
|
846
|
+
const { debts: n } = C(), { updateAccount: r } = re(), { onEvent: t } = B(), [a, i] = x.useState(o.monthly_payment ?? 0), c = a < 0 || a > 9999999999e-2, d = async () => {
|
|
847
|
+
await r({ ...o.account, minimum_payment: a }), o.monthly_payment = a, t(S.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: o.guid });
|
|
846
848
|
}, p = () => {
|
|
847
849
|
setTimeout(() => {
|
|
848
|
-
i(
|
|
850
|
+
i(o.monthly_payment ?? 0);
|
|
849
851
|
}, 250);
|
|
850
852
|
};
|
|
851
853
|
return /* @__PURE__ */ e(
|
|
852
|
-
|
|
854
|
+
oe,
|
|
853
855
|
{
|
|
854
|
-
isSaveDisabled:
|
|
855
|
-
label:
|
|
856
|
+
isSaveDisabled: c,
|
|
857
|
+
label: n.details_monthly_payment,
|
|
856
858
|
onCancel: p,
|
|
857
|
-
onSave:
|
|
858
|
-
primaryText:
|
|
859
|
-
secondaryText:
|
|
860
|
-
zeroStateText:
|
|
859
|
+
onSave: d,
|
|
860
|
+
primaryText: n.details_monthly_payment,
|
|
861
|
+
secondaryText: R(o.monthly_payment, "0,0"),
|
|
862
|
+
zeroStateText: o.monthly_payment ? void 0 : n.add_monthly_payment,
|
|
861
863
|
children: /* @__PURE__ */ e(
|
|
862
|
-
|
|
864
|
+
se,
|
|
863
865
|
{
|
|
864
|
-
amount:
|
|
866
|
+
amount: a,
|
|
865
867
|
autoFocus: !0,
|
|
866
|
-
error:
|
|
868
|
+
error: c,
|
|
867
869
|
fullWidth: !0,
|
|
868
870
|
minAmount: 0,
|
|
869
|
-
setAmount: (m) => i(isNaN(Number(m)) ?
|
|
870
|
-
sx: { ".MuiTypography-
|
|
871
|
+
setAmount: (m) => i(isNaN(Number(m)) ? a : Number(m)),
|
|
872
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
871
873
|
}
|
|
872
874
|
)
|
|
873
875
|
}
|
|
874
876
|
);
|
|
875
|
-
}),
|
|
876
|
-
const { debts:
|
|
877
|
-
await r({ ...
|
|
877
|
+
}), Nt = D(({ debt: o }) => {
|
|
878
|
+
const { debts: n } = C(), { updateAccount: r } = re(), { onEvent: t } = B(), [a, i] = x.useState(o.original_balance ?? 0), c = a < 0 || a > 9999999999e-2, d = async () => {
|
|
879
|
+
await r({ ...o.account, original_balance: a }), o.original_balance = a, t(S.DEBTS_SAVE_BALANCE_ACTION, { account_guid: o.guid });
|
|
878
880
|
}, p = () => {
|
|
879
881
|
setTimeout(() => {
|
|
880
|
-
i(
|
|
882
|
+
i(o.original_balance ?? 0);
|
|
881
883
|
}, 250);
|
|
882
884
|
};
|
|
883
885
|
return /* @__PURE__ */ e(
|
|
884
|
-
|
|
886
|
+
oe,
|
|
885
887
|
{
|
|
886
|
-
isSaveDisabled:
|
|
887
|
-
label:
|
|
888
|
+
isSaveDisabled: c,
|
|
889
|
+
label: n.details_original_balance,
|
|
888
890
|
onCancel: p,
|
|
889
|
-
onSave:
|
|
890
|
-
primaryText:
|
|
891
|
-
secondaryText:
|
|
892
|
-
zeroStateText:
|
|
891
|
+
onSave: d,
|
|
892
|
+
primaryText: n.details_original_balance,
|
|
893
|
+
secondaryText: R(o.original_balance, "0,0"),
|
|
894
|
+
zeroStateText: o.original_balance ? void 0 : n.add_original_balance,
|
|
893
895
|
children: /* @__PURE__ */ e(
|
|
894
|
-
|
|
896
|
+
se,
|
|
895
897
|
{
|
|
896
|
-
amount:
|
|
898
|
+
amount: a,
|
|
897
899
|
autoFocus: !0,
|
|
898
|
-
error:
|
|
900
|
+
error: c,
|
|
899
901
|
fullWidth: !0,
|
|
900
902
|
minAmount: 0,
|
|
901
|
-
setAmount: (m) => i(isNaN(Number(m)) ?
|
|
902
|
-
sx: { ".MuiTypography-
|
|
903
|
+
setAmount: (m) => i(isNaN(Number(m)) ? a : Number(m)),
|
|
904
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
903
905
|
}
|
|
904
906
|
)
|
|
905
907
|
}
|
|
906
908
|
);
|
|
907
|
-
}),
|
|
908
|
-
const { onEvent:
|
|
909
|
-
return
|
|
910
|
-
|
|
911
|
-
/* @__PURE__ */ e(
|
|
912
|
-
/* @__PURE__ */ e(
|
|
913
|
-
/* @__PURE__ */ e(
|
|
914
|
-
/* @__PURE__ */ e(
|
|
915
|
-
/* @__PURE__ */ e(
|
|
916
|
-
/* @__PURE__ */ e(
|
|
909
|
+
}), Pt = () => {
|
|
910
|
+
const { onEvent: o } = B(), { selectedDebtChartData: n } = F();
|
|
911
|
+
return x.useEffect(() => o(S.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(g, { bgcolor: "background.paper", children: [
|
|
912
|
+
n?.goal && /* @__PURE__ */ s($, { children: [
|
|
913
|
+
/* @__PURE__ */ e(et, { goal: n.goal }),
|
|
914
|
+
/* @__PURE__ */ e(G, {}),
|
|
915
|
+
/* @__PURE__ */ e(tt, { goal: n.goal }),
|
|
916
|
+
/* @__PURE__ */ e(G, {}),
|
|
917
|
+
/* @__PURE__ */ e(rt, { goal: n.goal }),
|
|
918
|
+
/* @__PURE__ */ e(G, {})
|
|
917
919
|
] }),
|
|
918
|
-
!
|
|
919
|
-
/* @__PURE__ */ e(
|
|
920
|
-
/* @__PURE__ */ e(
|
|
921
|
-
/* @__PURE__ */ e(
|
|
922
|
-
/* @__PURE__ */ e(
|
|
923
|
-
/* @__PURE__ */ e(
|
|
924
|
-
/* @__PURE__ */ e(
|
|
920
|
+
!n?.goal && n?.account && /* @__PURE__ */ s($, { children: [
|
|
921
|
+
/* @__PURE__ */ e(kt, { debt: n }),
|
|
922
|
+
/* @__PURE__ */ e(G, {}),
|
|
923
|
+
/* @__PURE__ */ e(Mt, { debt: n }),
|
|
924
|
+
/* @__PURE__ */ e(G, {}),
|
|
925
|
+
/* @__PURE__ */ e(Nt, { debt: n }),
|
|
926
|
+
/* @__PURE__ */ e(G, {})
|
|
925
927
|
] })
|
|
926
928
|
] });
|
|
927
|
-
},
|
|
928
|
-
const { debts: r } = C(), { showError: t, showCompleted:
|
|
929
|
-
return
|
|
930
|
-
t &&
|
|
931
|
-
}, [t]), !t && !
|
|
932
|
-
/* @__PURE__ */ e(
|
|
933
|
-
|
|
929
|
+
}, Rt = D(Pt), Bt = ({ setTabValue: o, sx: n }) => {
|
|
930
|
+
const { debts: r } = C(), { showError: t, showCompleted: a } = F();
|
|
931
|
+
return x.useEffect(() => {
|
|
932
|
+
t && o(1);
|
|
933
|
+
}, [t]), !t && !a ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ s(g, { gap: 16, children: [
|
|
934
|
+
/* @__PURE__ */ e(xe, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
|
|
935
|
+
ye,
|
|
934
936
|
{
|
|
935
|
-
icon: t ? /* @__PURE__ */ e(
|
|
937
|
+
icon: t ? /* @__PURE__ */ e(nt, { filled: !0 }) : /* @__PURE__ */ e(De, { color: "success", filled: !0 }),
|
|
936
938
|
severity: "error",
|
|
937
939
|
sx: {
|
|
938
940
|
alignItems: "start",
|
|
@@ -945,15 +947,15 @@ const Ce = ({
|
|
|
945
947
|
}
|
|
946
948
|
},
|
|
947
949
|
children: [
|
|
948
|
-
/* @__PURE__ */ e(
|
|
949
|
-
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "
|
|
950
|
+
/* @__PURE__ */ e(fe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: t ? r.status_error_title : r.status_complete_title }),
|
|
951
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: t ? r.status_error_description : r.status_complete_description })
|
|
950
952
|
]
|
|
951
953
|
}
|
|
952
954
|
) }),
|
|
953
|
-
t && /* @__PURE__ */ e(
|
|
954
|
-
|
|
955
|
+
t && /* @__PURE__ */ e(xe, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
|
|
956
|
+
ye,
|
|
955
957
|
{
|
|
956
|
-
icon: /* @__PURE__ */ e(
|
|
958
|
+
icon: /* @__PURE__ */ e($, {}),
|
|
957
959
|
severity: "error",
|
|
958
960
|
sx: {
|
|
959
961
|
borderRadius: 2,
|
|
@@ -963,151 +965,151 @@ const Ce = ({
|
|
|
963
965
|
}
|
|
964
966
|
},
|
|
965
967
|
children: [
|
|
966
|
-
/* @__PURE__ */ e(
|
|
967
|
-
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "
|
|
968
|
+
/* @__PURE__ */ e(fe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: r.status_info_title }),
|
|
969
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: r.status_info_description })
|
|
968
970
|
]
|
|
969
971
|
}
|
|
970
972
|
) })
|
|
971
973
|
] });
|
|
972
|
-
},
|
|
973
|
-
const { debts:
|
|
974
|
-
return /* @__PURE__ */ s(
|
|
975
|
-
(
|
|
974
|
+
}, Ft = D(Bt), Lt = () => {
|
|
975
|
+
const { debts: o } = C(), { showError: n, showCompleted: r } = F(), [t, a] = x.useState(0);
|
|
976
|
+
return /* @__PURE__ */ s($, { children: [
|
|
977
|
+
(n || r) && /* @__PURE__ */ e(Ft, { setTabValue: a, sx: { mt: -24 } }),
|
|
976
978
|
/* @__PURE__ */ s(
|
|
977
|
-
|
|
979
|
+
Qe,
|
|
978
980
|
{
|
|
979
|
-
"aria-label":
|
|
981
|
+
"aria-label": o.details_tabs_aria_label,
|
|
980
982
|
centered: !0,
|
|
981
|
-
onChange: (i,
|
|
983
|
+
onChange: (i, c) => a(c),
|
|
982
984
|
textColor: "primary",
|
|
983
985
|
value: t,
|
|
984
986
|
variant: "fullWidth",
|
|
985
987
|
children: [
|
|
986
988
|
/* @__PURE__ */ e(
|
|
987
|
-
|
|
989
|
+
_e,
|
|
988
990
|
{
|
|
989
991
|
"aria-controls": "debt-schedule-tabpanel-0",
|
|
990
992
|
id: "debt-schedule-tab-0",
|
|
991
|
-
label:
|
|
993
|
+
label: o.schedule_tab_label
|
|
992
994
|
}
|
|
993
995
|
),
|
|
994
996
|
/* @__PURE__ */ e(
|
|
995
|
-
|
|
997
|
+
_e,
|
|
996
998
|
{
|
|
997
999
|
"aria-controls": "debt-details-tabpanel-1",
|
|
998
1000
|
id: "debt-details-tab-1",
|
|
999
|
-
label:
|
|
1001
|
+
label: o.details_tab_label
|
|
1000
1002
|
}
|
|
1001
1003
|
)
|
|
1002
1004
|
]
|
|
1003
1005
|
}
|
|
1004
1006
|
),
|
|
1005
|
-
/* @__PURE__ */ e(
|
|
1006
|
-
/* @__PURE__ */ e(
|
|
1007
|
+
/* @__PURE__ */ e(ge, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(It, {}) }),
|
|
1008
|
+
/* @__PURE__ */ e(ge, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(Rt, {}) })
|
|
1007
1009
|
] });
|
|
1008
|
-
},
|
|
1009
|
-
const { debts: r } = C(), { showError: t, showCompleted:
|
|
1010
|
+
}, $t = D(Lt), Ot = ({ isOpen: o, onClose: n }) => {
|
|
1011
|
+
const { debts: r } = C(), { showError: t, showCompleted: a } = F(), i = t || a ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(At, {});
|
|
1010
1012
|
return /* @__PURE__ */ e(
|
|
1011
|
-
|
|
1013
|
+
ie,
|
|
1012
1014
|
{
|
|
1013
1015
|
ariaLabelClose: r.details_close_aria,
|
|
1014
|
-
isOpen:
|
|
1015
|
-
onClose:
|
|
1016
|
+
isOpen: o,
|
|
1017
|
+
onClose: n,
|
|
1016
1018
|
title: r.details_title,
|
|
1017
|
-
children: /* @__PURE__ */ s(
|
|
1018
|
-
/* @__PURE__ */ e(
|
|
1019
|
-
/* @__PURE__ */ e(
|
|
1019
|
+
children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
|
|
1020
|
+
/* @__PURE__ */ e(Ve, { customDetailsChart: i }),
|
|
1021
|
+
/* @__PURE__ */ e($t, {})
|
|
1020
1022
|
] })
|
|
1021
1023
|
}
|
|
1022
1024
|
);
|
|
1023
|
-
},
|
|
1024
|
-
const { debts:
|
|
1025
|
-
|
|
1026
|
-
user_guid:
|
|
1025
|
+
}, Ht = D(() => {
|
|
1026
|
+
const { debts: o } = C(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = K(), { onEvent: t } = B(), [a, i] = x.useState(n?.extra_payment ?? 0), c = a < 0 || a > 9999999999e-2, d = async () => {
|
|
1027
|
+
n && (await r({ ...n, extra_payment: a }), n.extra_payment = a, t(S.DEBTS_SAVE_PAYDOWN_ACTION, {
|
|
1028
|
+
user_guid: n?.user_guid
|
|
1027
1029
|
}));
|
|
1028
1030
|
}, p = () => {
|
|
1029
1031
|
setTimeout(() => {
|
|
1030
|
-
i(
|
|
1032
|
+
i(n?.extra_payment ?? 0);
|
|
1031
1033
|
}, 250);
|
|
1032
1034
|
};
|
|
1033
1035
|
return /* @__PURE__ */ e(
|
|
1034
|
-
|
|
1036
|
+
oe,
|
|
1035
1037
|
{
|
|
1036
|
-
isSaveDisabled:
|
|
1037
|
-
label:
|
|
1038
|
+
isSaveDisabled: c,
|
|
1039
|
+
label: o.paydown_drawer_extra_payment,
|
|
1038
1040
|
onCancel: p,
|
|
1039
|
-
onSave:
|
|
1040
|
-
primaryText:
|
|
1041
|
-
secondaryText:
|
|
1042
|
-
zeroStateText:
|
|
1041
|
+
onSave: d,
|
|
1042
|
+
primaryText: o.paydown_drawer_extra_payment,
|
|
1043
|
+
secondaryText: R(n?.extra_payment, "0,0"),
|
|
1044
|
+
zeroStateText: n?.extra_payment ? void 0 : o.add_extra_payment,
|
|
1043
1045
|
children: /* @__PURE__ */ e(
|
|
1044
|
-
|
|
1046
|
+
se,
|
|
1045
1047
|
{
|
|
1046
|
-
amount:
|
|
1048
|
+
amount: a,
|
|
1047
1049
|
autoFocus: !0,
|
|
1048
|
-
error:
|
|
1050
|
+
error: c,
|
|
1049
1051
|
fullWidth: !0,
|
|
1050
1052
|
minAmount: 0,
|
|
1051
|
-
setAmount: (m) => i(isNaN(Number(m)) ?
|
|
1052
|
-
sx: { ".MuiTypography-
|
|
1053
|
+
setAmount: (m) => i(isNaN(Number(m)) ? a : Number(m)),
|
|
1054
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
1053
1055
|
}
|
|
1054
1056
|
)
|
|
1055
1057
|
}
|
|
1056
1058
|
);
|
|
1057
|
-
}),
|
|
1058
|
-
const { debts:
|
|
1059
|
-
return /* @__PURE__ */ s(
|
|
1060
|
-
/* @__PURE__ */ s(
|
|
1061
|
-
/* @__PURE__ */ s(
|
|
1062
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1063
|
-
/* @__PURE__ */ e(
|
|
1064
|
-
/* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "
|
|
1059
|
+
}), Wt = () => {
|
|
1060
|
+
const { debts: o } = C(), { totalMonthlyPayments: n } = te(), { monthlyCashFlowProfile: r } = K(), t = n + Number(r?.extra_payment);
|
|
1061
|
+
return /* @__PURE__ */ s(g, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
1062
|
+
/* @__PURE__ */ s(g, { p: 24, children: [
|
|
1063
|
+
/* @__PURE__ */ s(g, { alignItems: "center", gap: 4, mb: 24, children: [
|
|
1064
|
+
/* @__PURE__ */ e(l, { variant: "body1", children: o.paydown_drawer_mimimum_label }),
|
|
1065
|
+
/* @__PURE__ */ e(Ce, { bold: !0, variant: "h1", children: R(n, "0,0") }),
|
|
1066
|
+
/* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "body2", width: 208, children: o.paydown_drawer_minimum_info })
|
|
1065
1067
|
] }),
|
|
1066
|
-
/* @__PURE__ */ s(
|
|
1067
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1068
|
-
/* @__PURE__ */ e(l, { truncate: !1, variant: "
|
|
1068
|
+
/* @__PURE__ */ s(g, { children: [
|
|
1069
|
+
/* @__PURE__ */ e(l, { variant: "h3", children: o.paydown_drawer_subtitle }),
|
|
1070
|
+
/* @__PURE__ */ e(l, { truncate: !1, variant: "subtitle2", children: o.paydown_drawer_description })
|
|
1069
1071
|
] })
|
|
1070
1072
|
] }),
|
|
1071
|
-
/* @__PURE__ */ e(
|
|
1072
|
-
/* @__PURE__ */ e(
|
|
1073
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1074
|
-
/* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "
|
|
1073
|
+
/* @__PURE__ */ e(g, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Ht, {}) }),
|
|
1074
|
+
/* @__PURE__ */ e(g, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(g, { gap: 4, children: [
|
|
1075
|
+
/* @__PURE__ */ e(l, { variant: "body2", children: o.paydown_drawer_total_payment }),
|
|
1076
|
+
/* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "body1", children: R(t, "0,0") })
|
|
1075
1077
|
] }) })
|
|
1076
1078
|
] });
|
|
1077
|
-
},
|
|
1079
|
+
}, Gt = D(Wt), jt = ({ isOpen: o, onClose: n }) => {
|
|
1078
1080
|
const { debts: r } = C();
|
|
1079
1081
|
return /* @__PURE__ */ e(
|
|
1080
|
-
|
|
1082
|
+
ie,
|
|
1081
1083
|
{
|
|
1082
1084
|
ariaLabelClose: r.paydown_drawer_close_aria,
|
|
1083
|
-
isOpen:
|
|
1084
|
-
onClose:
|
|
1085
|
+
isOpen: o,
|
|
1086
|
+
onClose: n,
|
|
1085
1087
|
title: r.paydown_drawer_title,
|
|
1086
|
-
children: /* @__PURE__ */ e(
|
|
1088
|
+
children: /* @__PURE__ */ e(Gt, {})
|
|
1087
1089
|
}
|
|
1088
1090
|
);
|
|
1089
1091
|
};
|
|
1090
|
-
function
|
|
1092
|
+
function zt(o, n) {
|
|
1091
1093
|
const r = (t) => {
|
|
1092
1094
|
if (typeof t == "number") return t;
|
|
1093
1095
|
if (t === "!" || t === "✓") return 1 / 0;
|
|
1094
1096
|
throw new Error("Unsupported value");
|
|
1095
1097
|
};
|
|
1096
|
-
return r(
|
|
1098
|
+
return r(o) - r(n);
|
|
1097
1099
|
}
|
|
1098
|
-
function
|
|
1099
|
-
return
|
|
1100
|
+
function Yt(o) {
|
|
1101
|
+
return o.is_paid_off ? "✓" : o.priority === void 0 || o.is_impossible ? "!" : o.priority;
|
|
1100
1102
|
}
|
|
1101
|
-
const
|
|
1102
|
-
const
|
|
1103
|
+
const Vt = (o) => {
|
|
1104
|
+
const n = {
|
|
1103
1105
|
text: "#121417",
|
|
1104
1106
|
background: "#FFB252"
|
|
1105
1107
|
};
|
|
1106
|
-
return
|
|
1107
|
-
},
|
|
1108
|
-
const
|
|
1108
|
+
return o === "!" && (n.text = "#FFFFFF", n.background = "#DF320C"), o === "✓" && (n.text = "#FFFFFF", n.background = "#09A57F"), n;
|
|
1109
|
+
}, Kt = (o) => {
|
|
1110
|
+
const n = String(o.formattedValue), r = Vt(n);
|
|
1109
1111
|
return /* @__PURE__ */ e(
|
|
1110
|
-
|
|
1112
|
+
le,
|
|
1111
1113
|
{
|
|
1112
1114
|
sx: {
|
|
1113
1115
|
display: "flex",
|
|
@@ -1120,80 +1122,80 @@ const kt = (a) => {
|
|
|
1120
1122
|
backgroundColor: r.background,
|
|
1121
1123
|
marginLeft: "10px"
|
|
1122
1124
|
},
|
|
1123
|
-
children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "
|
|
1125
|
+
children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "body2", children: n })
|
|
1124
1126
|
}
|
|
1125
1127
|
);
|
|
1126
|
-
},
|
|
1127
|
-
const
|
|
1128
|
-
return /* @__PURE__ */ s(
|
|
1128
|
+
}, Ut = (o) => {
|
|
1129
|
+
const n = o.row.account, r = it[n.account_type];
|
|
1130
|
+
return /* @__PURE__ */ s(g, { alignItems: "center", flexDirection: "row", children: [
|
|
1129
1131
|
/* @__PURE__ */ e(
|
|
1130
|
-
|
|
1132
|
+
Le,
|
|
1131
1133
|
{
|
|
1132
|
-
alt: `${
|
|
1133
|
-
institutionGuid:
|
|
1134
|
+
alt: `${n.institutionName}`,
|
|
1135
|
+
institutionGuid: n.institution_guid || ""
|
|
1134
1136
|
}
|
|
1135
1137
|
),
|
|
1136
|
-
/* @__PURE__ */ s(
|
|
1137
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1138
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1138
|
+
/* @__PURE__ */ s(g, { ml: 12, children: [
|
|
1139
|
+
/* @__PURE__ */ e(l, { variant: "body2", children: n.name }),
|
|
1140
|
+
/* @__PURE__ */ e(l, { variant: "caption", children: r })
|
|
1139
1141
|
] })
|
|
1140
1142
|
] });
|
|
1141
|
-
},
|
|
1142
|
-
sx:
|
|
1143
|
-
debts:
|
|
1143
|
+
}, qt = ({
|
|
1144
|
+
sx: o = {},
|
|
1145
|
+
debts: n,
|
|
1144
1146
|
hoveredDebtGuid: r,
|
|
1145
1147
|
onHoverRow: t,
|
|
1146
|
-
onClickRow:
|
|
1148
|
+
onClickRow: a
|
|
1147
1149
|
}) => {
|
|
1148
|
-
const i = V(), { onEvent:
|
|
1150
|
+
const i = V(), { onEvent: c } = B(), { isMobile: d } = U(), { debts: p, common: m } = C(), [h, w] = x.useState([
|
|
1149
1151
|
{ field: "priority", sort: "asc" }
|
|
1150
|
-
]),
|
|
1152
|
+
]), b = [
|
|
1151
1153
|
{
|
|
1152
1154
|
field: "priority",
|
|
1153
1155
|
headerName: p.table_column_priority,
|
|
1154
|
-
renderHeader:
|
|
1155
|
-
renderCell:
|
|
1156
|
-
sortComparator:
|
|
1156
|
+
renderHeader: j,
|
|
1157
|
+
renderCell: Kt,
|
|
1158
|
+
sortComparator: zt,
|
|
1157
1159
|
sortable: !0,
|
|
1158
1160
|
hideSortIcons: !0,
|
|
1159
1161
|
type: "custom",
|
|
1160
1162
|
align: "left",
|
|
1161
1163
|
headerAlign: "left",
|
|
1162
|
-
minWidth:
|
|
1163
|
-
flex:
|
|
1164
|
+
minWidth: d ? 67 : 72,
|
|
1165
|
+
flex: d ? 0.2 : 0.4
|
|
1164
1166
|
},
|
|
1165
1167
|
{
|
|
1166
1168
|
field: "account",
|
|
1167
1169
|
headerName: p.table_column_account,
|
|
1168
|
-
renderHeader:
|
|
1169
|
-
renderCell:
|
|
1170
|
+
renderHeader: j,
|
|
1171
|
+
renderCell: Ut,
|
|
1170
1172
|
sortable: !1,
|
|
1171
1173
|
type: "custom",
|
|
1172
1174
|
align: "left",
|
|
1173
1175
|
headerAlign: "left",
|
|
1174
|
-
minWidth:
|
|
1176
|
+
minWidth: d ? 180 : 225,
|
|
1175
1177
|
flex: 1
|
|
1176
1178
|
},
|
|
1177
1179
|
{
|
|
1178
1180
|
field: "balance",
|
|
1179
1181
|
headerName: p.table_column_balance,
|
|
1180
|
-
renderHeader:
|
|
1181
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1182
|
+
renderHeader: j,
|
|
1183
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: R(y.value, "0,0") }),
|
|
1182
1184
|
sortable: !0,
|
|
1183
|
-
hideSortIcons:
|
|
1185
|
+
hideSortIcons: d,
|
|
1184
1186
|
type: "number",
|
|
1185
1187
|
align: "left",
|
|
1186
1188
|
headerAlign: "left",
|
|
1187
|
-
minWidth:
|
|
1188
|
-
flex:
|
|
1189
|
+
minWidth: d ? 70 : 122,
|
|
1190
|
+
flex: d ? 0.4 : 0.6
|
|
1189
1191
|
},
|
|
1190
1192
|
{
|
|
1191
1193
|
field: "interest_rate",
|
|
1192
1194
|
headerName: p.table_column_interest_rate,
|
|
1193
|
-
renderHeader:
|
|
1194
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1195
|
+
renderHeader: j,
|
|
1196
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
|
|
1195
1197
|
sortable: !0,
|
|
1196
|
-
hideSortIcons:
|
|
1198
|
+
hideSortIcons: d,
|
|
1197
1199
|
type: "number",
|
|
1198
1200
|
align: "left",
|
|
1199
1201
|
headerAlign: "left",
|
|
@@ -1203,10 +1205,10 @@ const kt = (a) => {
|
|
|
1203
1205
|
{
|
|
1204
1206
|
field: "projected_payoff_date",
|
|
1205
1207
|
headerName: p.table_column_payoff_date,
|
|
1206
|
-
renderHeader:
|
|
1207
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1208
|
+
renderHeader: j,
|
|
1209
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: y.value ? Q(y.value, ee.MONTH_SHORT_YEAR) : "---" }),
|
|
1208
1210
|
sortable: !0,
|
|
1209
|
-
hideSortIcons:
|
|
1211
|
+
hideSortIcons: d,
|
|
1210
1212
|
type: "number",
|
|
1211
1213
|
align: "left",
|
|
1212
1214
|
headerAlign: "left",
|
|
@@ -1216,23 +1218,23 @@ const kt = (a) => {
|
|
|
1216
1218
|
{
|
|
1217
1219
|
field: "monthly_payment",
|
|
1218
1220
|
headerName: p.table_column_amount_due,
|
|
1219
|
-
renderHeader:
|
|
1220
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1221
|
+
renderHeader: j,
|
|
1222
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: typeof y.value == "number" ? R(y.value, "0,0") : "---" }),
|
|
1221
1223
|
sortable: !0,
|
|
1222
|
-
hideSortIcons:
|
|
1224
|
+
hideSortIcons: d,
|
|
1223
1225
|
type: "number",
|
|
1224
1226
|
align: "left",
|
|
1225
1227
|
headerAlign: "left",
|
|
1226
1228
|
minWidth: 122,
|
|
1227
1229
|
flex: 0.6
|
|
1228
1230
|
}
|
|
1229
|
-
],
|
|
1230
|
-
...
|
|
1231
|
+
], M = [
|
|
1232
|
+
...b.slice(0, 3),
|
|
1231
1233
|
{
|
|
1232
1234
|
field: "chevron",
|
|
1233
1235
|
headerClassName: "chevron-header",
|
|
1234
1236
|
headerName: "",
|
|
1235
|
-
renderCell: () => /* @__PURE__ */ e(_, { "aria-label": m.see_details, role: "button", children: /* @__PURE__ */ e(
|
|
1237
|
+
renderCell: () => /* @__PURE__ */ e(_, { "aria-label": m.see_details, role: "button", children: /* @__PURE__ */ e(ae, { name: "chevron_right" }) }),
|
|
1236
1238
|
sortable: !1,
|
|
1237
1239
|
hideSortIcons: !0,
|
|
1238
1240
|
type: "custom",
|
|
@@ -1240,58 +1242,59 @@ const kt = (a) => {
|
|
|
1240
1242
|
headerAlign: "right",
|
|
1241
1243
|
width: 20
|
|
1242
1244
|
}
|
|
1243
|
-
],
|
|
1245
|
+
], k = x.useMemo(() => n.map((y, u) => ({
|
|
1244
1246
|
...y,
|
|
1245
|
-
id:
|
|
1246
|
-
priority:
|
|
1247
|
-
})), [
|
|
1248
|
-
const
|
|
1249
|
-
t?.(
|
|
1250
|
-
},
|
|
1251
|
-
|
|
1252
|
-
},
|
|
1253
|
-
|
|
1254
|
-
},
|
|
1247
|
+
id: u,
|
|
1248
|
+
priority: Yt(y)
|
|
1249
|
+
})), [n]), I = (y) => {
|
|
1250
|
+
const A = y.target.closest("[data-id]")?.getAttribute("data-id"), N = n[Number(A)];
|
|
1251
|
+
t?.(N?.guid ?? "");
|
|
1252
|
+
}, v = (y) => {
|
|
1253
|
+
d || I(y);
|
|
1254
|
+
}, T = (y) => {
|
|
1255
|
+
d && I(y);
|
|
1256
|
+
}, O = (y) => k.find((u) => u.guid === y)?.id;
|
|
1255
1257
|
return /* @__PURE__ */ e(
|
|
1256
|
-
|
|
1258
|
+
le,
|
|
1257
1259
|
{
|
|
1258
1260
|
sx: {
|
|
1259
|
-
height: "
|
|
1261
|
+
height: "auto",
|
|
1260
1262
|
width: "100%",
|
|
1261
1263
|
mt: "15px",
|
|
1262
1264
|
overflowX: "auto",
|
|
1265
|
+
overflowY: "visible",
|
|
1263
1266
|
boxShadow: "none",
|
|
1264
|
-
...
|
|
1267
|
+
...o
|
|
1265
1268
|
},
|
|
1266
1269
|
children: /* @__PURE__ */ e(
|
|
1267
|
-
|
|
1270
|
+
at,
|
|
1268
1271
|
{
|
|
1269
|
-
columns:
|
|
1272
|
+
columns: d ? M : b,
|
|
1270
1273
|
disableColumnFilter: !0,
|
|
1271
1274
|
disableColumnMenu: !0,
|
|
1272
1275
|
hideFooter: !0,
|
|
1273
|
-
initialState: { sorting: { sortModel:
|
|
1276
|
+
initialState: { sorting: { sortModel: h } },
|
|
1274
1277
|
onRowClick: (y) => {
|
|
1275
|
-
|
|
1278
|
+
a(), c(S.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
|
|
1276
1279
|
},
|
|
1277
1280
|
onSortModelChange: (y) => {
|
|
1278
|
-
w(y),
|
|
1281
|
+
w(y), c(S.DEBTS_CLICK_TABLE_SORT);
|
|
1279
1282
|
},
|
|
1280
|
-
rows:
|
|
1283
|
+
rows: k,
|
|
1281
1284
|
slotProps: {
|
|
1282
1285
|
baseIconButton: { color: "secondary", sx: { ml: 8 } },
|
|
1283
1286
|
row: {
|
|
1284
|
-
onMouseEnter:
|
|
1285
|
-
onMouseLeave: () => !
|
|
1286
|
-
onTouchStart:
|
|
1287
|
-
onClick:
|
|
1287
|
+
onMouseEnter: v,
|
|
1288
|
+
onMouseLeave: () => !d && t?.(""),
|
|
1289
|
+
onTouchStart: T,
|
|
1290
|
+
onClick: d ? T : void 0
|
|
1288
1291
|
}
|
|
1289
1292
|
},
|
|
1290
|
-
sortModel:
|
|
1293
|
+
sortModel: h,
|
|
1291
1294
|
sortingOrder: ["asc", "desc"],
|
|
1292
1295
|
sx: {
|
|
1293
1296
|
"& .chevron-header": { display: "none" },
|
|
1294
|
-
[`& .MuiDataGrid-row[data-id="${
|
|
1297
|
+
[`& .MuiDataGrid-row[data-id="${O(r)}"]`]: {
|
|
1295
1298
|
backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
|
|
1296
1299
|
filter: "brightness(98%)"
|
|
1297
1300
|
}
|
|
@@ -1300,74 +1303,81 @@ const kt = (a) => {
|
|
|
1300
1303
|
)
|
|
1301
1304
|
}
|
|
1302
1305
|
);
|
|
1303
|
-
},
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1306
|
+
}, Xt = ({
|
|
1307
|
+
buttonText: o,
|
|
1308
|
+
disabled: n,
|
|
1309
|
+
isOpen: r,
|
|
1310
|
+
onClick: t
|
|
1311
|
+
}) => {
|
|
1312
|
+
const { isDesktop: a, isTablet: i } = U(), c = r ? "unfold_less" : "unfold_more";
|
|
1313
|
+
return a || i ? /* @__PURE__ */ e(
|
|
1314
|
+
Se,
|
|
1307
1315
|
{
|
|
1308
1316
|
"aria-controls": "prioritize-debts",
|
|
1309
1317
|
"aria-describedby": "prioritize-debts",
|
|
1310
1318
|
"aria-haspopup": !0,
|
|
1311
1319
|
"aria-label": "prioritize-debts",
|
|
1312
|
-
|
|
1313
|
-
|
|
1320
|
+
disabled: n,
|
|
1321
|
+
onClick: t,
|
|
1322
|
+
startIcon: /* @__PURE__ */ e(ae, { name: c }),
|
|
1314
1323
|
sx: { justifyContent: "start", minWidth: 214, mx: 4 },
|
|
1315
|
-
children:
|
|
1324
|
+
children: o
|
|
1316
1325
|
}
|
|
1317
1326
|
) : /* @__PURE__ */ e(
|
|
1318
|
-
|
|
1327
|
+
lt,
|
|
1319
1328
|
{
|
|
1320
1329
|
"aria-controls": "prioritize-debts",
|
|
1321
1330
|
"aria-describedby": "prioritize-debts",
|
|
1322
1331
|
"aria-haspopup": !0,
|
|
1323
1332
|
"aria-label": "prioritize-debts",
|
|
1324
|
-
|
|
1325
|
-
|
|
1333
|
+
disabled: n,
|
|
1334
|
+
onClick: t,
|
|
1335
|
+
children: /* @__PURE__ */ e(ae, { name: c })
|
|
1326
1336
|
}
|
|
1327
1337
|
);
|
|
1328
|
-
},
|
|
1329
|
-
const { onEvent: r } =
|
|
1338
|
+
}, Zt = D(({ buttonEl: o, onClose: n }) => {
|
|
1339
|
+
const { onEvent: r } = B(), { debts: t } = C(), { selectedDebtPriority: a, setSelectedDebtPriority: i } = F(), c = !!o, d = [
|
|
1330
1340
|
{
|
|
1331
|
-
priority:
|
|
1341
|
+
priority: P.FASTEST_PAYOFF_FIRST,
|
|
1332
1342
|
text: t.priority_sort_fastest_payoff
|
|
1333
1343
|
},
|
|
1334
1344
|
{
|
|
1335
|
-
priority:
|
|
1345
|
+
priority: P.HIGHEST_INTEREST,
|
|
1336
1346
|
text: t.priority_sort_highest_interest
|
|
1337
1347
|
},
|
|
1338
1348
|
{
|
|
1339
|
-
priority:
|
|
1349
|
+
priority: P.LOWEST_BALANCE,
|
|
1340
1350
|
text: t.priority_sort_lowest_balance
|
|
1341
1351
|
},
|
|
1342
1352
|
{
|
|
1343
|
-
priority:
|
|
1353
|
+
priority: P.HIGHEST_BALANCE,
|
|
1344
1354
|
text: t.priority_sort_highest_balance
|
|
1345
1355
|
}
|
|
1346
1356
|
], p = (m) => {
|
|
1347
|
-
i(m), r(
|
|
1357
|
+
i(m), r(S.DEBTS_CLICK_PRIORITY, { debts_priority: m });
|
|
1348
1358
|
};
|
|
1349
1359
|
return /* @__PURE__ */ e(
|
|
1350
|
-
|
|
1360
|
+
ct,
|
|
1351
1361
|
{
|
|
1352
|
-
anchorEl:
|
|
1362
|
+
anchorEl: o,
|
|
1353
1363
|
anchorOrigin: {
|
|
1354
1364
|
vertical: "bottom",
|
|
1355
1365
|
horizontal: "left"
|
|
1356
1366
|
},
|
|
1357
1367
|
id: "prioritize-debts",
|
|
1358
|
-
onClose:
|
|
1359
|
-
open:
|
|
1368
|
+
onClose: n,
|
|
1369
|
+
open: c,
|
|
1360
1370
|
transformOrigin: {
|
|
1361
1371
|
vertical: "top",
|
|
1362
1372
|
horizontal: "left"
|
|
1363
1373
|
},
|
|
1364
|
-
children: /* @__PURE__ */ e(
|
|
1365
|
-
|
|
1374
|
+
children: /* @__PURE__ */ e(ve, { children: d.map(({ priority: m, text: h }) => /* @__PURE__ */ s(
|
|
1375
|
+
st,
|
|
1366
1376
|
{
|
|
1367
1377
|
onClick: () => p(m),
|
|
1368
1378
|
sx: {
|
|
1369
|
-
bgcolor:
|
|
1370
|
-
color:
|
|
1379
|
+
bgcolor: a === m ? "primary.main" : void 0,
|
|
1380
|
+
color: a === m ? "#fff" : void 0,
|
|
1371
1381
|
justifyContent: "space-between",
|
|
1372
1382
|
minHeight: 44,
|
|
1373
1383
|
minWidth: 268,
|
|
@@ -1380,180 +1390,229 @@ const kt = (a) => {
|
|
|
1380
1390
|
}
|
|
1381
1391
|
},
|
|
1382
1392
|
children: [
|
|
1383
|
-
/* @__PURE__ */ e(l, { color: "inherit", variant: "
|
|
1384
|
-
|
|
1393
|
+
/* @__PURE__ */ e(l, { color: "inherit", variant: "body2", children: h }),
|
|
1394
|
+
a === m && /* @__PURE__ */ e(De, { color: "inherit", filled: !0, fontSize: "small" })
|
|
1385
1395
|
]
|
|
1386
1396
|
},
|
|
1387
1397
|
m
|
|
1388
1398
|
)) })
|
|
1389
1399
|
}
|
|
1390
1400
|
);
|
|
1391
|
-
}),
|
|
1392
|
-
const { onEvent:
|
|
1393
|
-
|
|
1401
|
+
}), Jt = D(({ disabled: o }) => {
|
|
1402
|
+
const { onEvent: n } = B(), { debts: r } = C(), { selectedDebtPriority: t } = F(), [a, i] = x.useState(null), c = (h) => {
|
|
1403
|
+
i(h.currentTarget), n(S.DEBTS_CLICK_PRIORITIZE);
|
|
1394
1404
|
}, d = () => {
|
|
1395
|
-
|
|
1396
|
-
},
|
|
1397
|
-
[
|
|
1398
|
-
[
|
|
1399
|
-
[
|
|
1400
|
-
[
|
|
1401
|
-
})[
|
|
1405
|
+
i(null);
|
|
1406
|
+
}, p = !!a, m = x.useMemo(() => ({
|
|
1407
|
+
[P.FASTEST_PAYOFF_FIRST]: r.priority_sort_fastest_payoff,
|
|
1408
|
+
[P.HIGHEST_INTEREST]: r.priority_sort_highest_interest,
|
|
1409
|
+
[P.HIGHEST_BALANCE]: r.priority_sort_highest_balance,
|
|
1410
|
+
[P.LOWEST_BALANCE]: r.priority_sort_lowest_balance
|
|
1411
|
+
})[t] ?? r.priority_sort_lowest_balance, [t]);
|
|
1402
1412
|
return /* @__PURE__ */ s(_, { children: [
|
|
1403
|
-
/* @__PURE__ */ e(
|
|
1404
|
-
|
|
1413
|
+
/* @__PURE__ */ e(
|
|
1414
|
+
Xt,
|
|
1415
|
+
{
|
|
1416
|
+
buttonText: m,
|
|
1417
|
+
disabled: o,
|
|
1418
|
+
isOpen: p,
|
|
1419
|
+
onClick: c
|
|
1420
|
+
}
|
|
1421
|
+
),
|
|
1422
|
+
/* @__PURE__ */ e(Zt, { buttonEl: a, onClose: d })
|
|
1405
1423
|
] });
|
|
1406
|
-
}),
|
|
1407
|
-
const t =
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
let
|
|
1424
|
+
}), Qt = (o, n, r = 0) => {
|
|
1425
|
+
const t = o.map((p) => ({ ...p }));
|
|
1426
|
+
Te(t, n);
|
|
1427
|
+
const a = /* @__PURE__ */ new Date(), i = [];
|
|
1428
|
+
let c = 0, d = 1;
|
|
1411
1429
|
for (const p of t)
|
|
1412
1430
|
i.push({
|
|
1413
1431
|
...p,
|
|
1414
1432
|
// Start with the initial balance
|
|
1415
|
-
dataset: [{ x: new Date(
|
|
1433
|
+
dataset: [{ x: new Date(a), y: p.balance }]
|
|
1416
1434
|
});
|
|
1417
1435
|
for (; t.some((p) => p.balance >= 0.01 && !p.is_impossible); ) {
|
|
1418
|
-
let p = !1, m = !1,
|
|
1419
|
-
for (const [w,
|
|
1420
|
-
if (
|
|
1421
|
-
const
|
|
1422
|
-
let
|
|
1423
|
-
!
|
|
1424
|
-
const
|
|
1425
|
-
if (
|
|
1426
|
-
|
|
1436
|
+
let p = !1, m = !1, h = !1;
|
|
1437
|
+
for (const [w, b] of t.entries()) {
|
|
1438
|
+
if (b.balance <= 0.01) continue;
|
|
1439
|
+
const M = i[w].dataset, I = (b.interest_rate ?? 0) / 100 / 12, v = b.balance * I, T = b.monthly_payment ?? 0;
|
|
1440
|
+
let O = T, y = 0;
|
|
1441
|
+
!h && r > 0 && (O += r, h = !0), !m && c > 0 && (y = c, m = !0), b.balance += v;
|
|
1442
|
+
const u = Math.min(b.balance, O + y);
|
|
1443
|
+
if (u <= v) {
|
|
1444
|
+
b.is_impossible = !0, i[w].is_impossible = !0, i[w].priority = void 0, M.push({ x: new Date(a), y: b.balance });
|
|
1427
1445
|
continue;
|
|
1428
1446
|
}
|
|
1429
|
-
|
|
1430
|
-
x: new Date(
|
|
1431
|
-
y: Math.max(0,
|
|
1432
|
-
payment:
|
|
1447
|
+
b.balance -= u, b.balance = b.balance < 0.01 ? 0 : b.balance, M.push({
|
|
1448
|
+
x: new Date(a),
|
|
1449
|
+
y: Math.max(0, b.balance),
|
|
1450
|
+
payment: u,
|
|
1433
1451
|
extra: y
|
|
1434
|
-
}),
|
|
1452
|
+
}), b.balance <= 0 && (c += T, i[w].projected_payoff_date = new Date(a)), u > 0 && (p = !0);
|
|
1435
1453
|
}
|
|
1436
|
-
p &&
|
|
1454
|
+
p && a.setMonth(a.getMonth() + 1);
|
|
1437
1455
|
}
|
|
1438
1456
|
return i.forEach((p) => {
|
|
1439
1457
|
(p.interest_rate === void 0 || p.monthly_payment === void 0) && (p.projected_payoff_date = void 0);
|
|
1440
1458
|
}), i.forEach((p) => {
|
|
1441
|
-
p.priority = !p.is_paid_off && !p.is_impossible ?
|
|
1459
|
+
p.priority = !p.is_paid_off && !p.is_impossible ? d++ : void 0;
|
|
1442
1460
|
}), i;
|
|
1443
|
-
},
|
|
1444
|
-
|
|
1461
|
+
}, er = (o, n, r) => ({
|
|
1462
|
+
description: n ? o.empty_state_description : o.empty_state_description_no_aggregation,
|
|
1463
|
+
header: n ? o.empty_state_header : o.empty_state_header_no_aggregation,
|
|
1464
|
+
onClickHandler: n ? r : void 0,
|
|
1465
|
+
primaryButton: n ? o.connect_accounts : void 0
|
|
1466
|
+
}), tr = D(({ disabled: o, onClick: n }) => {
|
|
1467
|
+
const { debts: r } = C(), { isDesktop: t } = U(), { totalMonthlyPayments: a } = te(), { monthlyCashFlowProfile: i } = K(), c = a + Number(i?.extra_payment), d = t ? r.paydown_button_long : r.paydown_button_short;
|
|
1445
1468
|
return /* @__PURE__ */ e(
|
|
1446
|
-
|
|
1469
|
+
Se,
|
|
1447
1470
|
{
|
|
1448
1471
|
"aria-controls": "extra-paydown",
|
|
1449
1472
|
"aria-describedby": "extra-paydown",
|
|
1450
1473
|
"aria-haspopup": !0,
|
|
1451
1474
|
"aria-label": "extra-paydown",
|
|
1452
|
-
|
|
1475
|
+
disabled: o,
|
|
1476
|
+
onClick: n,
|
|
1453
1477
|
sx: { justifyContent: "start", minWidth: 100, mx: 4 },
|
|
1454
|
-
children:
|
|
1478
|
+
children: E(d, R(c, "0,0"))
|
|
1455
1479
|
}
|
|
1456
1480
|
);
|
|
1457
|
-
}),
|
|
1458
|
-
const { isDesktop: r, isMobile: t } =
|
|
1459
|
-
|
|
1481
|
+
}), rr = ({ onBackClick: o, sx: n }) => {
|
|
1482
|
+
const { isDesktop: r, isMobile: t } = U(), { connect: a, debts: i } = C(), { onEvent: c } = B(), {
|
|
1483
|
+
config: { show_connections_widget_in_master: d }
|
|
1484
|
+
} = ze(), { isInitialized: p } = Ye(), { setSelectedAccount: m } = Ke(), { selectedDebtPriority: h, setSelectedDebtChartData: w } = F(), {
|
|
1485
|
+
isAccountDataLoaded: b,
|
|
1486
|
+
loadAccountData: M,
|
|
1487
|
+
detailedAccounts: k,
|
|
1488
|
+
visibleDebtAccounts: I
|
|
1489
|
+
} = re(), { isAllGoalDataLoaded: v, loadGoalData: T, monthlyCashFlowProfile: O } = K(), { debts: y } = te(), [u, f] = x.useState(!1), [A, N] = x.useState(!1), [L, z] = x.useState(!1), [q, Ee] = x.useState(""), [Ie, ce] = x.useState(!1);
|
|
1490
|
+
pt({
|
|
1460
1491
|
widgetName: "DebtsWidget",
|
|
1461
|
-
isLoaded:
|
|
1492
|
+
isLoaded: v
|
|
1462
1493
|
});
|
|
1463
|
-
const
|
|
1464
|
-
const
|
|
1465
|
-
return
|
|
1466
|
-
}, [
|
|
1467
|
-
|
|
1468
|
-
b ||
|
|
1469
|
-
}, []),
|
|
1470
|
-
|
|
1471
|
-
}, [
|
|
1472
|
-
const
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1475
|
-
},
|
|
1476
|
-
|
|
1477
|
-
},
|
|
1478
|
-
|
|
1494
|
+
const X = x.useMemo(() => {
|
|
1495
|
+
const H = O?.extra_payment ?? 0;
|
|
1496
|
+
return Qt(y, h, H);
|
|
1497
|
+
}, [y, h, O]);
|
|
1498
|
+
x.useEffect(() => {
|
|
1499
|
+
b || M().finally(), c(S.DEBTS_VIEW);
|
|
1500
|
+
}, []), x.useEffect(() => {
|
|
1501
|
+
p && T().finally();
|
|
1502
|
+
}, [p]);
|
|
1503
|
+
const de = (H) => Ee(H), pe = () => {
|
|
1504
|
+
const H = I.find((ne) => ne.guid === q), he = X.find((ne) => ne.guid === q);
|
|
1505
|
+
H && m(H), he && w(he), f(!0);
|
|
1506
|
+
}, Me = () => c(S.DEBTS_CLICK_FILTER), ke = () => {
|
|
1507
|
+
z(!0), c(S.DEBTS_CLICK_SNOWBALL_CTA);
|
|
1508
|
+
}, Ne = () => {
|
|
1509
|
+
N(!0), c(S.DEBTS_CLICK_PAYDOWN);
|
|
1479
1510
|
};
|
|
1480
|
-
|
|
1481
|
-
|
|
1511
|
+
if (!p || !v)
|
|
1512
|
+
return /* @__PURE__ */ e(ht, {});
|
|
1513
|
+
const Pe = k.length === 0, Re = I.length === 0, Be = y.length === 0, Z = Pe || Re || Be, J = er(
|
|
1514
|
+
i,
|
|
1515
|
+
d,
|
|
1516
|
+
() => ce(!0)
|
|
1517
|
+
);
|
|
1518
|
+
return /* @__PURE__ */ s(
|
|
1519
|
+
mt,
|
|
1482
1520
|
{
|
|
1483
1521
|
actions: [
|
|
1484
|
-
/* @__PURE__ */ e(
|
|
1485
|
-
/* @__PURE__ */ e(
|
|
1522
|
+
/* @__PURE__ */ e(Jt, { disabled: Z }, "prioritize-debts"),
|
|
1523
|
+
/* @__PURE__ */ e(tr, { disabled: Z, onClick: Ne }, "extra-paydown")
|
|
1486
1524
|
],
|
|
1487
1525
|
allowedAccountTypes: [
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1526
|
+
Y.CREDIT_CARD,
|
|
1527
|
+
Y.LOAN,
|
|
1528
|
+
Y.MORTGAGE,
|
|
1529
|
+
Y.LINE_OF_CREDIT,
|
|
1530
|
+
Y.CHECKING_LINE_OF_CREDIT
|
|
1493
1531
|
],
|
|
1494
|
-
onAccountsFilterClick:
|
|
1495
|
-
onBackClick:
|
|
1496
|
-
sx:
|
|
1497
|
-
title:
|
|
1532
|
+
onAccountsFilterClick: Me,
|
|
1533
|
+
onBackClick: o,
|
|
1534
|
+
sx: n,
|
|
1535
|
+
title: i.title,
|
|
1498
1536
|
children: [
|
|
1499
|
-
/* @__PURE__ */ s(
|
|
1500
|
-
/* @__PURE__ */
|
|
1501
|
-
|
|
1537
|
+
/* @__PURE__ */ s(g, { sx: { pt: 48, px: r ? "48px" : "24px" }, children: [
|
|
1538
|
+
Z && /* @__PURE__ */ e(
|
|
1539
|
+
ut,
|
|
1502
1540
|
{
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
/* @__PURE__ */ e(
|
|
1510
|
-
Ce,
|
|
1511
|
-
{
|
|
1512
|
-
debts: H,
|
|
1513
|
-
height: t ? 250 : void 0,
|
|
1514
|
-
hoveredDebtGuid: E,
|
|
1515
|
-
onClickArea: ie,
|
|
1516
|
-
onHoverArea: ne,
|
|
1517
|
-
sx: { mr: t ? "4px" : "-48px" }
|
|
1518
|
-
}
|
|
1519
|
-
),
|
|
1520
|
-
/* @__PURE__ */ e(
|
|
1521
|
-
st,
|
|
1522
|
-
{
|
|
1523
|
-
debts: H,
|
|
1524
|
-
onClickCta: ve,
|
|
1525
|
-
sx: { mb: t ? "0px" : "64px" }
|
|
1526
|
-
}
|
|
1527
|
-
)
|
|
1528
|
-
]
|
|
1541
|
+
header: J.header,
|
|
1542
|
+
icon: "note_stack",
|
|
1543
|
+
onClick: J.onClickHandler,
|
|
1544
|
+
primaryButton: J.primaryButton,
|
|
1545
|
+
subText: J.description,
|
|
1546
|
+
sx: { maxWidth: 400 }
|
|
1529
1547
|
}
|
|
1530
1548
|
),
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1549
|
+
!Z && /* @__PURE__ */ s($, { children: [
|
|
1550
|
+
/* @__PURE__ */ s(
|
|
1551
|
+
g,
|
|
1552
|
+
{
|
|
1553
|
+
sx: {
|
|
1554
|
+
alignItems: t ? "flex-start" : "flex-end",
|
|
1555
|
+
flexDirection: t ? "column" : "row",
|
|
1556
|
+
mx: t ? "-12px" : 0
|
|
1557
|
+
},
|
|
1558
|
+
children: [
|
|
1559
|
+
/* @__PURE__ */ e(
|
|
1560
|
+
Ae,
|
|
1561
|
+
{
|
|
1562
|
+
debts: X,
|
|
1563
|
+
height: t ? 250 : void 0,
|
|
1564
|
+
hoveredDebtGuid: q,
|
|
1565
|
+
onClickArea: pe,
|
|
1566
|
+
onHoverArea: de,
|
|
1567
|
+
sx: { mr: t ? "4px" : "-48px" }
|
|
1568
|
+
}
|
|
1569
|
+
),
|
|
1570
|
+
/* @__PURE__ */ e(
|
|
1571
|
+
wt,
|
|
1572
|
+
{
|
|
1573
|
+
debts: X,
|
|
1574
|
+
onClickCta: ke,
|
|
1575
|
+
sx: { mb: t ? "0px" : "64px" }
|
|
1576
|
+
}
|
|
1577
|
+
)
|
|
1578
|
+
]
|
|
1579
|
+
}
|
|
1580
|
+
),
|
|
1581
|
+
/* @__PURE__ */ e(g, { sx: { mx: t ? "-24px" : 0 }, children: /* @__PURE__ */ e(
|
|
1582
|
+
qt,
|
|
1583
|
+
{
|
|
1584
|
+
debts: X,
|
|
1585
|
+
hoveredDebtGuid: q,
|
|
1586
|
+
onClickRow: pe,
|
|
1587
|
+
onHoverRow: de
|
|
1588
|
+
}
|
|
1589
|
+
) })
|
|
1590
|
+
] })
|
|
1540
1591
|
] }),
|
|
1541
1592
|
/* @__PURE__ */ e(
|
|
1542
|
-
|
|
1593
|
+
vt,
|
|
1543
1594
|
{
|
|
1544
|
-
isOpen:
|
|
1545
|
-
onClose: () =>
|
|
1595
|
+
isOpen: L,
|
|
1596
|
+
onClose: () => z(!1)
|
|
1546
1597
|
}
|
|
1547
1598
|
),
|
|
1548
|
-
/* @__PURE__ */ e(
|
|
1549
|
-
/* @__PURE__ */ e(
|
|
1599
|
+
/* @__PURE__ */ e(Ot, { isOpen: u, onClose: () => f(!1) }),
|
|
1600
|
+
/* @__PURE__ */ e(jt, { isOpen: A, onClose: () => N(!1) }),
|
|
1601
|
+
/* @__PURE__ */ e(
|
|
1602
|
+
dt,
|
|
1603
|
+
{
|
|
1604
|
+
onClose: () => ce(!1),
|
|
1605
|
+
showConnectWidget: Ie,
|
|
1606
|
+
title: a.mini_title
|
|
1607
|
+
}
|
|
1608
|
+
)
|
|
1550
1609
|
]
|
|
1551
1610
|
}
|
|
1552
1611
|
);
|
|
1553
|
-
},
|
|
1612
|
+
}, Qr = D(rr);
|
|
1554
1613
|
export {
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1614
|
+
Ae as DebtsChart,
|
|
1615
|
+
ro as DebtsStore,
|
|
1616
|
+
qt as DebtsTable,
|
|
1617
|
+
Qr as DebtsWidget
|
|
1559
1618
|
};
|