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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +217 -0
  2. package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
  3. package/dist/Account-CMjOp7S2.mjs +118 -0
  4. package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
  5. package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
  6. package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
  7. package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
  8. package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
  9. package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
  10. package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
  11. package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
  12. package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
  13. package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
  14. package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
  16. package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
  17. package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
  19. package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
  21. package/dist/Drawer-Bet2ZPJo.mjs +176 -0
  22. package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
  23. package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
  24. package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
  25. package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
  26. package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
  27. package/dist/LineChart-DHj-Bufi.mjs +580 -0
  28. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
  29. package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
  30. package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
  31. package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
  32. package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
  33. package/dist/NotificationSettings-e789PcRb.mjs +676 -0
  34. package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
  35. package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
  36. package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
  37. package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
  38. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
  39. package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
  40. package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
  41. package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
  42. package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
  43. package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
  44. package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
  45. package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
  46. package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
  47. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
  48. package/dist/accounts/index.es.js +933 -232
  49. package/dist/accounts/stores/AccountStore.d.ts +6 -2
  50. package/dist/accounts/utils/AccountDetails.d.ts +5 -0
  51. package/dist/analytics/index.es.js +2 -2
  52. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  53. package/dist/budgets/index.es.js +561 -522
  54. package/dist/cashflow/index.es.js +397 -396
  55. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
  56. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
  57. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
  58. package/dist/categories/components/SubcategoryRow.d.ts +1 -0
  59. package/dist/categories/index.es.js +2 -2
  60. package/dist/categories/stores/CategoryStore.d.ts +5 -3
  61. package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
  62. package/dist/common/components/WidgetContainer.d.ts +7 -6
  63. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  64. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  65. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
  66. package/dist/common/components/index.d.ts +2 -2
  67. package/dist/common/hooks/index.d.ts +1 -0
  68. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  69. package/dist/common/index.es.js +325 -306
  70. package/dist/common/stores/GlobalUiStore.d.ts +7 -4
  71. package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
  72. package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
  73. package/dist/common/types/localization/CommonCopy.d.ts +3 -0
  74. package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
  75. package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
  76. package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
  77. package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
  78. package/dist/dashboard/index.es.js +95 -125
  79. package/dist/debts/index.es.js +466 -460
  80. package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
  81. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  82. package/dist/finstrong/index.es.js +1660 -1553
  83. package/dist/goals/index.es.js +716 -677
  84. package/dist/goals/stores/GoalStore.d.ts +2 -0
  85. package/dist/help/index.es.js +14 -10
  86. package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
  87. package/dist/investments/index.es.js +464 -457
  88. package/dist/merchants/index.es.js +1 -1
  89. package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
  90. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
  91. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
  92. package/dist/microinsights/beaticons/index.d.ts +1 -0
  93. package/dist/microinsights/cards/InsightCard.d.ts +0 -2
  94. package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
  95. package/dist/microinsights/index.d.ts +2 -2
  96. package/dist/microinsights/index.es.js +824 -14
  97. package/dist/networth/components/NetWorthChart.d.ts +3 -2
  98. package/dist/networth/components/NetWorthList.d.ts +3 -3
  99. package/dist/networth/index.es.js +433 -438
  100. package/dist/networth/stores/NetWorthStore.d.ts +20 -9
  101. package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
  102. package/dist/notifications/index.es.js +5 -5
  103. package/dist/recurringtransactions/index.es.js +331 -325
  104. package/dist/settings/index.es.js +293 -285
  105. package/dist/spending/components/SpendingChart.d.ts +1 -1
  106. package/dist/spending/components/SpendingList.d.ts +1 -1
  107. package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
  108. package/dist/spending/index.es.js +250 -235
  109. package/dist/transactions/index.es.js +288 -281
  110. package/dist/transactions/stores/TransactionStore.d.ts +5 -0
  111. package/dist/trends/components/TrendsTable.d.ts +0 -2
  112. package/dist/trends/index.es.js +876 -802
  113. package/dist/trends/utils/TrendsData.d.ts +1 -0
  114. package/dist/trends/utils/TrendsTable.d.ts +12 -0
  115. package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
  116. package/dist/useAriaLive-B3_pRUio.mjs +35 -0
  117. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
  118. package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
  119. package/package.json +26 -21
  120. package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
  121. package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
  122. package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
  123. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  124. package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
  125. package/dist/Drawer-Dqe5EqvA.mjs +0 -163
  126. package/dist/LineChart-bc1D9xBE.mjs +0 -581
  127. package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
  128. package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
  129. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  130. package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
  131. package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
  132. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  133. package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
  134. package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
  135. package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
  136. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
  137. package/dist/common/components/accountfilter/index.d.ts +0 -1
  138. package/dist/microinsights/cards/BaseCard.d.ts +0 -13
  139. package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
@@ -1,59 +1,61 @@
1
- import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
2
- import f, { useState as J } from "react";
1
+ import { jsxs as o, Fragment as B, jsx as e } from "react/jsx-runtime";
2
+ import p, { useState as Y } from "react";
3
3
  import { observer as T } from "mobx-react-lite";
4
- import { addMonths as Pe } from "date-fns/addMonths";
4
+ import { addMonths as Xe } from "date-fns/addMonths";
5
5
  import { startOfToday as W } from "date-fns/startOfToday";
6
6
  import D from "@mui/material/Box";
7
7
  import v from "@mui/material/Divider";
8
8
  import s from "@mui/material/Stack";
9
9
  import se from "@mui/material/styles/useTheme";
10
- import { Text as h, P as N, Icon as j, InstitutionLogo as xe, H1 as de, H2 as qe } from "@mxenabled/mxui";
11
- import { G as Xe, v as me, u as k, q as ce, d as Le, b as q, j as P, g as ke, n as Ye, a as Qe, h as Ne, p as Ve } from "../hooks-C41HAxM5.mjs";
12
- import { C as L } from "../CurrencyText-Dr0EZ7bp.mjs";
10
+ import { Text as m, P as N, Icon as $, InstitutionLogo as Ce, H2 as de, H3 as Ve } from "@mxenabled/mxui";
11
+ import { G as Ye, t as me, u as L, p as ce, d as Ne, b as P, j as U, g as ke, a as Qe, h as He, o as Ke } from "../hooks-fY_n74f7.mjs";
12
+ import { C as R } from "../CurrencyText-C-85TnUF.mjs";
13
13
  import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
14
- import { L as te } from "../Loader-BSWSYqvn.mjs";
14
+ import { L as Z } from "../Loader-BSWSYqvn.mjs";
15
15
  import { I as he } from "../CashflowStore-naOtJcwo.mjs";
16
- import { C as zn } from "../CashflowStore-naOtJcwo.mjs";
17
- import { b as $ } from "../Localization-2MODESHW.mjs";
18
- import { M as Ke } from "../MiniWidgetContainer-D7MkHG15.mjs";
19
- import { E as Je } from "../EmptyState-DoxNUae-.mjs";
20
- import { R as Ze } from "../RecurringSettings-RfZ8Wuhh.mjs";
21
- import et from "@mui/material/Tabs";
16
+ import { C as Pn } from "../CashflowStore-naOtJcwo.mjs";
17
+ import { b as G } from "../Localization-2MODESHW.mjs";
18
+ import { u as Oe } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
19
+ import { M as Je } from "../MiniWidgetContainer-DKn7ndO6.mjs";
20
+ import { E as Ze } from "../EmptyState-DoxNUae-.mjs";
21
+ import { R as et } from "../RecurringSettings-BpCUcE8w.mjs";
22
+ import tt from "@mui/material/Tabs";
22
23
  import ye from "@mui/material/Tab";
23
- import { getUnixTime as B } from "date-fns/getUnixTime";
24
- import ee from "@mui/material/List";
25
- import ne from "@mui/material/ListItem";
26
- import { A as tt } from "../AccountListItem-DxmAs98Z.mjs";
27
- import { f as X, a as Y } from "../Dialog-CDV0kKxj.mjs";
28
- import nt from "@mui/material/ListSubheader";
29
- import { f as Z } from "../NumberFormatting-DjTD0t3W.mjs";
30
- import { isAfter as Oe } from "date-fns/isAfter";
31
- import { isBefore as He } from "date-fns/isBefore";
32
- import { isToday as Fe } from "date-fns/isToday";
33
- import { addDays as Ce } from "date-fns/addDays";
34
- import { alpha as ot, keyframes as at } from "@mui/material/styles";
35
- import { DataGridPro as it } from "@mui/x-data-grid-pro";
36
- import { T as Se } from "../TabContentContainer-CnMXkVqr.mjs";
37
- import G from "@mui/material/Button";
38
- import { M as rt, S as st, i as ct, d as _e, c as lt } from "../ManageIncome-D_qVX5dN.mjs";
39
- import { D as We } from "../Drawer-Dqe5EqvA.mjs";
40
- import { subDays as Me } from "date-fns/subDays";
41
- import { endOfToday as dt } from "date-fns/endOfToday";
42
- import { W as mt, A as we } from "../WidgetContainer-B1Jzb4XA.mjs";
43
- import { formatISO as ut } from "date-fns/formatISO";
44
- import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
45
- import { startOfMonth as ht } from "date-fns/startOfMonth";
46
- import { S as pt, c as ft } from "../TransactionDetails-Duv1X9ec.mjs";
47
- import { F as gt, R as De, e as ve } from "../RecurringTransactions-Bhx56aA3.mjs";
48
- import { h as bt } from "../DateUtil-CDPZw_-m.mjs";
49
- import { F as xt, A as z } from "../Fetch-DecPFeGU.mjs";
50
- const Q = () => {
51
- if (!f.useContext(Xe))
24
+ import { getUnixTime as z } from "date-fns/getUnixTime";
25
+ import J from "@mui/material/List";
26
+ import ee from "@mui/material/ListItem";
27
+ import { A as nt } from "../AccountListItem-Ds5C0mOT.mjs";
28
+ import { f as q, D as X } from "../Dialog-CWymUiuO.mjs";
29
+ import ot from "@mui/material/ListSubheader";
30
+ import { f as K } from "../NumberFormatting-DjTD0t3W.mjs";
31
+ import { isAfter as Fe } from "date-fns/isAfter";
32
+ import { isBefore as We } from "date-fns/isBefore";
33
+ import { isToday as Ge } from "date-fns/isToday";
34
+ import { addDays as Se } from "date-fns/addDays";
35
+ import { alpha as at, keyframes as it } from "@mui/material/styles";
36
+ import { DataGridPro as rt } from "@mui/x-data-grid-pro";
37
+ import { T as we } from "../TabContentContainer-CnMXkVqr.mjs";
38
+ import M from "@mui/material/Button";
39
+ import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-DIIyqDTp.mjs";
40
+ import { D as Me } from "../Drawer-Bet2ZPJo.mjs";
41
+ import { subDays as $e } from "date-fns/subDays";
42
+ import { endOfToday as mt } from "date-fns/endOfToday";
43
+ import { W as ut, A as Ie } from "../WidgetContainer-mzejMmz2.mjs";
44
+ import { A as Q } from "../Account-CMjOp7S2.mjs";
45
+ import { formatISO as ht } from "date-fns/formatISO";
46
+ import { fromUnixTime as De } from "date-fns/fromUnixTime";
47
+ import { startOfMonth as pt } from "date-fns/startOfMonth";
48
+ import { S as ft, b as gt } from "../TransactionDetails-CPwv9xtZ.mjs";
49
+ import { F as bt, R as ve, e as Ae } from "../RepeatingTransaction-C2txVA9O.mjs";
50
+ import { h as xt } from "../DateUtil-CVsMhbZU.mjs";
51
+ import { F as Ct, A as j } from "../Fetch-DecPFeGU.mjs";
52
+ const V = () => {
53
+ if (!p.useContext(Ye))
52
54
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
53
55
  return me().uiStore;
54
56
  }, yt = ({ remaining: a }) => {
55
- const { cashflow: n } = k();
56
- return /* @__PURE__ */ o(U, { children: [
57
+ const { cashflow: n } = L();
58
+ return /* @__PURE__ */ o(B, { children: [
57
59
  /* @__PURE__ */ e(
58
60
  D,
59
61
  {
@@ -65,38 +67,36 @@ const Q = () => {
65
67
  }
66
68
  }
67
69
  ),
68
- /* @__PURE__ */ e(h, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
69
- /* @__PURE__ */ e(L, { amount: a, bold: !0, sx: { fontSize: 12 } })
70
+ /* @__PURE__ */ e(m, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
71
+ /* @__PURE__ */ e(R, { amount: a, bold: !0, sx: { fontSize: 12 } })
70
72
  ] });
71
- }, pe = T(yt), Ct = () => {
72
- const a = se(), { availableWidth: n } = ce(), { isMobile: t } = ue(), { visibleCashAccounts: i, visibleCashBalance: g } = Le(), { selectedAccounts: x, selectedAccountGuids: u, setSelectedAccounts: c } = q(), { cashflow: m } = k(), {
73
- daysUntilNextIncome: r,
74
- expensesTilNextIncome: l,
75
- selectedCashAccounts: d,
76
- setNextIncome: b,
77
- setSelectedCashAccounts: C,
78
- setUpcomingExpenses: _
79
- } = Q(), { isDataLoaded: O, nextIncomeRecurrence: A, upcomingExpenses: H } = P();
80
- f.useEffect(() => {
81
- c(i);
82
- }, [i]), f.useEffect(() => {
83
- C(
84
- i.filter((I) => u.includes(I.guid))
73
+ }, pe = T(yt), St = () => {
74
+ const a = se(), { availableWidth: n } = ce(), { isMobile: t } = ue(), { visibleCashAccounts: i, visibleCashBalance: f } = Ne(), { selectedAccountGuids: u } = P(), { cashflow: c } = L(), {
75
+ daysUntilNextIncome: l,
76
+ expensesTilNextIncome: g,
77
+ selectedCashAccounts: r,
78
+ setNextIncome: h,
79
+ setSelectedCashAccounts: d,
80
+ setUpcomingExpenses: x
81
+ } = V(), { isDataLoaded: S, nextIncomeRecurrence: w, upcomingExpenses: A } = U();
82
+ p.useEffect(() => {
83
+ d(
84
+ i.filter((C) => u.includes(C.guid))
85
85
  );
86
- }, [i, x]), f.useEffect(() => {
87
- A && b(A), _(H);
88
- }, [A, H]);
89
- const p = f.useMemo(
90
- () => i.filter((I) => u.includes(I.guid)).reduce((I, M) => I + (M?.balance || 0), 0),
91
- [u, H]
92
- ), w = f.useMemo(
93
- () => l.filter((I) => u.includes(I.accountGuid || "")).reduce((I, M) => I + M.amount, 0),
94
- [u, l]
95
- ), R = f.useMemo(
96
- () => p - w,
97
- [p, w]
86
+ }, [i, u]), p.useEffect(() => {
87
+ w && h(w), x(A);
88
+ }, [w, A]);
89
+ const _ = p.useMemo(
90
+ () => i.filter((C) => u.includes(C.guid)).reduce((C, I) => C + (I?.balance || 0), 0),
91
+ [u, A]
92
+ ), k = p.useMemo(
93
+ () => g.filter((C) => u.includes(C.accountGuid || "")).reduce((C, I) => C + I.amount, 0),
94
+ [u, g]
95
+ ), b = p.useMemo(
96
+ () => _ - k,
97
+ [_, k]
98
98
  );
99
- return O ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
99
+ return S ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
100
100
  s,
101
101
  {
102
102
  border: `1px solid ${a.palette.border.light}`,
@@ -106,43 +106,43 @@ const Q = () => {
106
106
  px: 24,
107
107
  children: [
108
108
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
109
- /* @__PURE__ */ e(L, { amount: p, variant: "H2" }),
110
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: $(
111
- m.total_cash_accounts,
112
- d.length
109
+ /* @__PURE__ */ e(R, { amount: _, variant: "H2" }),
110
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: G(
111
+ c.total_cash_accounts,
112
+ r.length
113
113
  ) })
114
114
  ] }),
115
- /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
115
+ /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e($, { name: "remove" }) }),
116
116
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
117
- /* @__PURE__ */ e(L, { amount: w, variant: "H2" }),
118
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: $(m.expenses_due, l.length) })
117
+ /* @__PURE__ */ e(R, { amount: k, variant: "H2" }),
118
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: G(c.expenses_due, g.length) })
119
119
  ] }),
120
- /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
120
+ /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e($, { name: "equal" }) }),
121
121
  /* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
122
- /* @__PURE__ */ e(L, { amount: R, variant: "H2" }),
122
+ /* @__PURE__ */ e(R, { amount: b, variant: "H2" }),
123
123
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
124
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: m.available_to_spend }),
125
- /* @__PURE__ */ e(he, { body: m.tooltip_body, title: m.tooltip_title })
124
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
125
+ /* @__PURE__ */ e(he, { body: c.tooltip_body, title: c.tooltip_title })
126
126
  ] })
127
127
  ] }),
128
- /* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(U, { children: [
129
- /* @__PURE__ */ e(h, { variant: "H2", children: $(m.days, r) }),
130
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: m.next_paycheck })
128
+ /* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(B, { children: [
129
+ /* @__PURE__ */ e(m, { variant: "H2", children: G(c.days, l) }),
130
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
131
131
  ] }) })
132
132
  ]
133
133
  }
134
134
  ) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
135
135
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
136
- /* @__PURE__ */ e(h, { variant: "Small", children: $(
137
- m.total_cash_accounts,
138
- d.length
136
+ /* @__PURE__ */ e(m, { variant: "Small", children: G(
137
+ c.total_cash_accounts,
138
+ r.length
139
139
  ) }),
140
- /* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "XSmall" })
140
+ /* @__PURE__ */ e(R, { amount: f, bold: !0, variant: "XSmall" })
141
141
  ] }),
142
142
  /* @__PURE__ */ e(v, {}),
143
143
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
144
- /* @__PURE__ */ e(h, { variant: "Small", children: $(m.expenses_due, l.length) }),
145
- /* @__PURE__ */ e(L, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
144
+ /* @__PURE__ */ e(m, { variant: "Small", children: G(c.expenses_due, g.length) }),
145
+ /* @__PURE__ */ e(R, { amount: k, bold: !0, symbol: "-", variant: "XSmall" })
146
146
  ] }),
147
147
  /* @__PURE__ */ e(v, {}),
148
148
  /* @__PURE__ */ e(
@@ -156,38 +156,41 @@ const Q = () => {
156
156
  justifyContent: "space-between",
157
157
  px: 16,
158
158
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
159
- children: /* @__PURE__ */ e(pe, { remaining: R })
159
+ children: /* @__PURE__ */ e(pe, { remaining: b })
160
160
  }
161
161
  ),
162
162
  /* @__PURE__ */ e(v, {}),
163
163
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
164
- /* @__PURE__ */ e(h, { variant: "Small", children: m.next_paycheck }),
165
- /* @__PURE__ */ e(h, { bold: !0, variant: "XSmall", children: $(m.days, r) })
164
+ /* @__PURE__ */ e(m, { variant: "Small", children: c.next_paycheck }),
165
+ /* @__PURE__ */ e(m, { bold: !0, variant: "XSmall", children: G(c.days, l) })
166
166
  ] })
167
- ] }) }) : /* @__PURE__ */ e(te, { height: t ? 210 : 120 });
168
- }, St = T(Ct), _t = ({
167
+ ] }) }) : /* @__PURE__ */ e(Z, { height: t ? 210 : 120 });
168
+ }, wt = T(St), _t = ({
169
169
  onPrimaryCtaClick: a,
170
170
  onSecondaryCtaClick: n,
171
171
  sx: t = {}
172
172
  }) => {
173
- const { cashflow: i } = k(), { isInitialized: g } = q(), { loadRepeatingTransactionData: x, income: u, isDataLoaded: c, setDateRange: m } = P();
174
- f.useEffect(() => {
175
- m({ start: W(), end: Pe(W(), 1) }), c || x().finally();
176
- }, []);
177
- const r = c && !u.length;
178
- return g ? /* @__PURE__ */ o(
179
- Ke,
173
+ const { cashflow: i } = L(), { isInitialized: f } = P(), { loadRepeatingTransactionData: u, income: c, isDataLoaded: l, setDateRange: g } = U();
174
+ p.useEffect(() => {
175
+ g({ start: W(), end: Xe(W(), 1) }), l || u().finally();
176
+ }, []), Oe({
177
+ widgetName: "CashflowMiniWidget",
178
+ isLoaded: l
179
+ });
180
+ const r = l && !c.length;
181
+ return f ? /* @__PURE__ */ o(
182
+ Je,
180
183
  {
181
184
  className: "mx-exp-cashflow-miniwidget",
182
185
  onPrimaryCtaClick: a,
183
186
  primaryCtaLabel: i.primary_cta,
184
- subTitle: r || !c ? void 0 : i.sub_title,
187
+ subTitle: r || !l ? void 0 : i.sub_title,
185
188
  sx: { height: "100%", ...t },
186
189
  title: i.title,
187
190
  children: [
188
- !c && /* @__PURE__ */ e(te, {}),
189
- c && (r ? /* @__PURE__ */ e(
190
- Je,
191
+ !l && /* @__PURE__ */ e(Z, {}),
192
+ l && (r ? /* @__PURE__ */ e(
193
+ Ze,
191
194
  {
192
195
  header: i.create,
193
196
  icon: "local_atm",
@@ -196,12 +199,12 @@ const Q = () => {
196
199
  primaryButtonStartIcon: "add",
197
200
  subText: i.create_description
198
201
  }
199
- ) : /* @__PURE__ */ e(St, {}))
202
+ ) : /* @__PURE__ */ e(wt, {}))
200
203
  ]
201
204
  }
202
- ) : /* @__PURE__ */ e(te, {});
203
- }, Fn = T(_t), wt = ({ remaining: a }) => /* @__PURE__ */ e(
204
- ne,
205
+ ) : /* @__PURE__ */ e(Z, {});
206
+ }, Mn = T(_t), It = ({ remaining: a }) => /* @__PURE__ */ e(
207
+ ee,
205
208
  {
206
209
  sx: {
207
210
  alignItems: "center",
@@ -216,16 +219,16 @@ const Q = () => {
216
219
  children: /* @__PURE__ */ e(pe, { remaining: a })
217
220
  }
218
221
  );
219
- var oe = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(oe || {});
220
- const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
221
- /* @__PURE__ */ o(ne, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
222
+ var te = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(te || {});
223
+ const Dt = ({ recurrence: a }) => /* @__PURE__ */ o(B, { children: [
224
+ /* @__PURE__ */ o(ee, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
222
225
  /* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
223
- /* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: X(a.expectedDate, Y.MONTH) }),
224
- /* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: X(a.expectedDate, Y.DAY) })
226
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: q(a.expectedDate, X.MONTH) }),
227
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: q(a.expectedDate, X.DAY) })
225
228
  ] }),
226
- /* @__PURE__ */ e(h, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
229
+ /* @__PURE__ */ e(m, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
227
230
  /* @__PURE__ */ e(
228
- L,
231
+ R,
229
232
  {
230
233
  amount: a.amount,
231
234
  bold: !0,
@@ -234,11 +237,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
234
237
  )
235
238
  ] }),
236
239
  /* @__PURE__ */ e(v, {})
237
- ] }), Ae = T(It), Dt = ({ total: a, type: n }) => {
238
- const { cashflow: t } = k();
239
- return /* @__PURE__ */ o(U, { children: [
240
+ ] }), Ee = T(Dt), vt = ({ total: a, type: n }) => {
241
+ const { cashflow: t } = L();
242
+ return /* @__PURE__ */ o(B, { children: [
240
243
  /* @__PURE__ */ o(
241
- nt,
244
+ ot,
242
245
  {
243
246
  sx: {
244
247
  alignItems: "center",
@@ -250,40 +253,40 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
250
253
  px: 24
251
254
  },
252
255
  children: [
253
- /* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 12 }, children: n === oe.EXPENSE ? t.expenses : t.income }),
254
- /* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 13 }, children: [
255
- n === oe.EXPENSE ? "-" : "+",
256
- Z(a, "0,0.00")
256
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: n === te.EXPENSE ? t.expenses : t.income }),
257
+ /* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 13 }, children: [
258
+ n === te.EXPENSE ? "-" : "+",
259
+ K(a, "0,0.00")
257
260
  ] })
258
261
  ]
259
262
  }
260
263
  ),
261
264
  /* @__PURE__ */ e(v, {})
262
265
  ] });
263
- }, Ee = T(Dt), re = (a, n) => (t) => t.accountGuid === a.guid && (Fe(t.expectedDate) || Oe(t.expectedDate, n.start)) && He(t.expectedDate, n.end), vt = () => {
264
- const { availableWidth: a } = ce(), { cashflow: n } = k(), { upcomingExpenses: t, upcomingIncome: i } = P(), { dateRange: g, selectedCashAccounts: x } = Q();
266
+ }, Te = T(vt), re = (a, n) => (t) => t.accountGuid === a.guid && (Ge(t.expectedDate) || Fe(t.expectedDate, n.start)) && We(t.expectedDate, n.end), At = () => {
267
+ const { availableWidth: a } = ce(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } = U(), { dateRange: f, selectedCashAccounts: u } = V();
265
268
  return /* @__PURE__ */ o(s, { children: [
266
269
  /* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
267
- /* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
268
- /* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
269
- X(g.start, Y.FULL_MONTH_DAY),
270
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
271
+ /* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
272
+ q(f.start, X.FULL_MONTH_DAY),
270
273
  " -",
271
274
  " ",
272
- X(g.end, Y.FULL_MONTH_DAY)
275
+ q(f.end, X.FULL_MONTH_DAY)
273
276
  ] })
274
277
  ] }),
275
- /* @__PURE__ */ e(s, { children: x.map((u) => {
276
- const c = i.filter(re(u, g)).sort((d, b) => B(d.expectedDate) - B(b.expectedDate)), m = t.filter(
277
- re(u, g)
278
- ), r = c.reduce(
279
- (d, b) => d + b.amount,
278
+ /* @__PURE__ */ e(s, { children: u.map((c) => {
279
+ const l = i.filter(re(c, f)).sort((d, x) => z(d.expectedDate) - z(x.expectedDate)), g = t.filter(
280
+ re(c, f)
281
+ ), r = l.reduce(
282
+ (d, x) => d + x.amount,
280
283
  0
281
- ), l = m.reduce(
282
- (d, b) => d + b.amount,
284
+ ), h = g.reduce(
285
+ (d, x) => d + x.amount,
283
286
  0
284
287
  );
285
288
  return /* @__PURE__ */ o(
286
- ee,
289
+ J,
287
290
  {
288
291
  sx: {
289
292
  border: "1px solid",
@@ -293,9 +296,9 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
293
296
  },
294
297
  children: [
295
298
  /* @__PURE__ */ e(
296
- tt,
299
+ nt,
297
300
  {
298
- account: u,
301
+ account: c,
299
302
  listItemProps: {
300
303
  disableGutters: !1,
301
304
  disablePadding: !1,
@@ -304,52 +307,52 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
304
307
  }
305
308
  ),
306
309
  /* @__PURE__ */ e(v, {}),
307
- c.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
308
- ee,
310
+ l.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
311
+ J,
309
312
  {
310
- subheader: /* @__PURE__ */ e(Ee, { total: r, type: oe.INCOME }),
313
+ subheader: /* @__PURE__ */ e(Te, { total: r, type: te.INCOME }),
311
314
  sx: { width: "100%" },
312
- children: c.map((d) => /* @__PURE__ */ e(Ae, { recurrence: d }, d.repeatingTransactionGuid))
315
+ children: l.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
313
316
  }
314
317
  ) }),
315
- m.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
316
- ee,
318
+ g.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
319
+ J,
317
320
  {
318
- subheader: /* @__PURE__ */ e(Ee, { total: l, type: oe.EXPENSE }),
321
+ subheader: /* @__PURE__ */ e(Te, { total: h, type: te.EXPENSE }),
319
322
  sx: { width: "100%" },
320
- children: m.map((d) => /* @__PURE__ */ e(Ae, { recurrence: d }, d.repeatingTransactionGuid))
323
+ children: g.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
321
324
  }
322
325
  ) }),
323
326
  /* @__PURE__ */ e(
324
- wt,
327
+ It,
325
328
  {
326
- remaining: (u.available_balance || u.balance || 0) + r - l
329
+ remaining: (c.available_balance || c.balance || 0) + r - h
327
330
  }
328
331
  )
329
332
  ]
330
333
  },
331
- u.guid
334
+ c.guid
332
335
  );
333
336
  }) })
334
337
  ] });
335
- }, At = T(vt), Et = () => {
336
- const { availableWidth: a } = ce(), n = se(), { cashflow: t } = k(), { upcomingExpenses: i, upcomingIncome: g } = P(), { dateRange: x, selectedCashAccounts: u } = Q(), c = [
338
+ }, Et = T(At), Tt = () => {
339
+ const { availableWidth: a } = ce(), n = se(), { cashflow: t } = L(), { upcomingExpenses: i, upcomingIncome: f } = U(), { dateRange: u, selectedCashAccounts: c } = V(), l = [
337
340
  {
338
341
  field: "account",
339
342
  flex: 1.5,
340
343
  headerName: t.accounts,
341
- renderCell: ({ value: { name: r, nickname: l, institution_guid: d, account_number: b } }) => {
342
- const C = l || r;
344
+ renderCell: ({ value: { name: r, nickname: h, institution_guid: d, account_number: x } }) => {
345
+ const S = h || r;
343
346
  return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
344
347
  /* @__PURE__ */ e(
345
- xe,
348
+ Ce,
346
349
  {
347
350
  alt: t.institution_logo,
348
351
  institutionGuid: d || "",
349
352
  size: 16
350
353
  }
351
354
  ),
352
- /* @__PURE__ */ e(h, { variant: "body2", children: `${C} ${b ? `*${b}` : ""}` })
355
+ /* @__PURE__ */ e(m, { variant: "body2", children: `${S} ${x ? `*${x}` : ""}` })
353
356
  ] });
354
357
  }
355
358
  },
@@ -358,21 +361,21 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
358
361
  flex: 1,
359
362
  headerName: t.balance,
360
363
  type: "number",
361
- renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "Small", children: Z(r.value, "0,0.00") })
364
+ renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "Small", children: K(r.value, "0,0.00") })
362
365
  },
363
366
  {
364
367
  field: "income",
365
368
  flex: 1,
366
369
  headerName: t.projected_income,
367
370
  type: "number",
368
- renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "Small", children: `+${Z(r.value, "0,0.00")}` })
371
+ renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "Small", children: `+${K(r.value, "0,0.00")}` })
369
372
  },
370
373
  {
371
374
  field: "expenses",
372
375
  flex: 1.1,
373
376
  headerName: t.projected_expenses,
374
377
  type: "number",
375
- renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "Small", children: `-${Z(r.value, "0,0.00")}` })
378
+ renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "Small", children: `-${K(r.value, "0,0.00")}` })
376
379
  },
377
380
  {
378
381
  field: "remaining",
@@ -380,32 +383,32 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
380
383
  headerName: t.remaining,
381
384
  type: "number",
382
385
  renderCell: (r) => {
383
- const l = r.row.balance + r.row.income - r.row.expenses;
386
+ const h = r.row.balance + r.row.income - r.row.expenses;
384
387
  return /* @__PURE__ */ e(
385
- h,
388
+ m,
386
389
  {
387
- color: Math.sign(l) === -1 ? n.palette.error.main : n.palette.text.primary,
390
+ color: Math.sign(h) === -1 ? n.palette.error.main : n.palette.text.primary,
388
391
  variant: "Small",
389
- children: Z(l, "0,0.00")
392
+ children: K(h, "0,0.00")
390
393
  }
391
394
  );
392
395
  }
393
396
  }
394
- ], m = f.useMemo(() => u.map((r) => {
395
- const l = i.filter(
396
- re(r, { start: W(), end: Ce(W(), 30) })
397
- ).reduce((C, _) => C + _.amount, 0), d = g.filter(
398
- re(r, { start: W(), end: Ce(W(), 30) })
399
- ).reduce((C, _) => C + _.amount, 0), b = (r.balance || 0) + d - l;
397
+ ], g = p.useMemo(() => c.map((r) => {
398
+ const h = i.filter(
399
+ re(r, { start: W(), end: Se(W(), 30) })
400
+ ).reduce((S, w) => S + w.amount, 0), d = f.filter(
401
+ re(r, { start: W(), end: Se(W(), 30) })
402
+ ).reduce((S, w) => S + w.amount, 0), x = (r.balance || 0) + d - h;
400
403
  return {
401
404
  account: r,
402
405
  balance: r.balance || 0,
403
406
  id: r.guid,
404
407
  income: d,
405
- expenses: l,
406
- remaining: b
408
+ expenses: h,
409
+ remaining: x
407
410
  };
408
- }), [u, i, g]);
411
+ }), [c, i, f]);
409
412
  return /* @__PURE__ */ o(
410
413
  D,
411
414
  {
@@ -422,7 +425,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
422
425
  children: [
423
426
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
424
427
  /* @__PURE__ */ e(
425
- h,
428
+ m,
426
429
  {
427
430
  bold: !0,
428
431
  sx: {
@@ -440,26 +443,26 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
440
443
  }
441
444
  )
442
445
  ] }),
443
- /* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
444
- X(x.start, Y.FULL_MONTH_DAY),
446
+ /* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
447
+ q(u.start, X.FULL_MONTH_DAY),
445
448
  " -",
446
449
  " ",
447
- X(x.end, Y.FULL_MONTH_DAY)
450
+ q(u.end, X.FULL_MONTH_DAY)
448
451
  ] })
449
452
  ]
450
453
  }
451
454
  ),
452
455
  a > 650 ? /* @__PURE__ */ e(
453
- it,
456
+ rt,
454
457
  {
455
458
  columnHeaderHeight: 48,
456
- columns: c,
459
+ columns: l,
457
460
  density: "standard",
458
461
  disableColumnMenu: !0,
459
462
  disableRowSelectionOnClick: !0,
460
463
  hideFooter: !0,
461
464
  rowHeight: 48,
462
- rows: m,
465
+ rows: g,
463
466
  sx: {
464
467
  border: "1px solid",
465
468
  borderColor: "border.light",
@@ -467,7 +470,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
467
470
  "& .MuiDataGrid-columnHeader .MuiIconButton-root": {
468
471
  color: n.palette.primary.main,
469
472
  "&:hover": {
470
- backgroundColor: ot(n.palette.primary.main, 0.1)
473
+ backgroundColor: at(n.palette.primary.main, 0.1)
471
474
  }
472
475
  },
473
476
  "& .MuiDataGrid-columnHeaderTitle": {
@@ -479,10 +482,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
479
482
  }
480
483
  }
481
484
  }
482
- ) : m.map((r) => {
483
- const { name: l, nickname: d, institution_guid: b, account_number: C } = r.account, _ = d || l;
485
+ ) : g.map((r) => {
486
+ const { name: h, nickname: d, institution_guid: x, account_number: S } = r.account, w = d || h;
484
487
  return /* @__PURE__ */ e(
485
- ee,
488
+ J,
486
489
  {
487
490
  sx: {
488
491
  border: "1px solid",
@@ -490,7 +493,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
490
493
  borderRadius: 1,
491
494
  marginBottom: 24
492
495
  },
493
- children: /* @__PURE__ */ e(ne, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
496
+ children: /* @__PURE__ */ e(ee, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
494
497
  /* @__PURE__ */ o(
495
498
  s,
496
499
  {
@@ -502,16 +505,16 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
502
505
  children: [
503
506
  /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
504
507
  /* @__PURE__ */ e(
505
- xe,
508
+ Ce,
506
509
  {
507
510
  alt: t.institution_logo,
508
- institutionGuid: b || "",
511
+ institutionGuid: x || "",
509
512
  size: 16
510
513
  }
511
514
  ),
512
- /* @__PURE__ */ e(h, { variant: "Small", children: `${_} ${C ? `*${C}` : ""}` })
515
+ /* @__PURE__ */ e(m, { variant: "Small", children: `${w} ${S ? `*${S}` : ""}` })
513
516
  ] }),
514
- /* @__PURE__ */ e(L, { amount: r.balance, bold: !0, variant: "Small" })
517
+ /* @__PURE__ */ e(R, { amount: r.balance, bold: !0, variant: "Small" })
515
518
  ]
516
519
  }
517
520
  ),
@@ -525,8 +528,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
525
528
  px: 16,
526
529
  py: 12,
527
530
  children: [
528
- /* @__PURE__ */ e(h, { variant: "Small", children: t.projected_income }),
529
- /* @__PURE__ */ e(L, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
531
+ /* @__PURE__ */ e(m, { variant: "Small", children: t.projected_income }),
532
+ /* @__PURE__ */ e(R, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
530
533
  ]
531
534
  }
532
535
  ),
@@ -540,8 +543,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
540
543
  px: 16,
541
544
  py: 12,
542
545
  children: [
543
- /* @__PURE__ */ e(h, { variant: "Small", children: t.projected_expenses }),
544
- /* @__PURE__ */ e(L, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
546
+ /* @__PURE__ */ e(m, { variant: "Small", children: t.projected_expenses }),
547
+ /* @__PURE__ */ e(R, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
545
548
  ]
546
549
  }
547
550
  ),
@@ -568,19 +571,19 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
568
571
  ]
569
572
  }
570
573
  );
571
- }, Tt = T(Et), Rt = () => {
572
- const { cashflow: a } = k(), { isDesktop: n } = ue(), { onEvent: t } = ke(), [i, g] = f.useState(0), x = (u, c) => {
573
- g(c);
574
+ }, Rt = T(Tt), Lt = () => {
575
+ const { cashflow: a } = L(), { isDesktop: n } = ue(), { onEvent: t } = ke(), [i, f] = p.useState(0), u = (c, l) => {
576
+ f(l);
574
577
  };
575
- return f.useEffect(() => {
578
+ return p.useEffect(() => {
576
579
  t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
577
580
  }, [i]), /* @__PURE__ */ o(D, { children: [
578
581
  /* @__PURE__ */ o(
579
- et,
582
+ tt,
580
583
  {
581
584
  "aria-label": a.cashflow_summary_and_details,
582
585
  centered: !0,
583
- onChange: x,
586
+ onChange: u,
584
587
  textColor: "primary",
585
588
  value: i,
586
589
  variant: "fullWidth",
@@ -611,16 +614,16 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
611
614
  }
612
615
  ),
613
616
  /* @__PURE__ */ e(D, { sx: { mb: 32 } }),
614
- /* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Tt, {}) }) }),
615
- /* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) })
617
+ /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Rt, {}) }) }),
618
+ /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Et, {}) }) })
616
619
  ] });
617
- }, Lt = T(Rt), ie = ({
620
+ }, Nt = T(Lt), ie = ({
618
621
  amount: a,
619
622
  isMobile: n = !1,
620
623
  isTotal: t = !1,
621
624
  label: i,
622
- symbol: g,
623
- tooltip: x
625
+ symbol: f,
626
+ tooltip: u
624
627
  }) => /* @__PURE__ */ o(
625
628
  s,
626
629
  {
@@ -630,82 +633,82 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
630
633
  padding: n ? "14px 16px" : 0,
631
634
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
632
635
  children: [
633
- !n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "H2" }),
636
+ !n && /* @__PURE__ */ e(R, { amount: a, component: "h2", variant: "H2" }),
634
637
  /* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
635
- /* @__PURE__ */ e(h, { bold: t, variant: "Small", children: i }),
636
- x
638
+ /* @__PURE__ */ e(m, { bold: t, variant: "Small", children: i }),
639
+ u
637
640
  ] }),
638
- n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "Small" })
641
+ n && /* @__PURE__ */ e(R, { amount: a, component: "h2", symbol: f, variant: "Small" })
639
642
  ]
640
643
  }
641
- ), Te = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Fe(t.expectedDate) || Oe(t.expectedDate, n.start)) && He(t.expectedDate, n.end), kt = () => {
642
- const { availableWidth: a } = ce(), { cashflow: n } = k(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: x } = P(), { selectedAccountGuids: u } = q(), { dateRange: c, selectedCashAccounts: m } = Q(), [r, l] = f.useState(!1), d = f.useMemo(
643
- () => g.filter(Te(u, c)),
644
- [c, u, g]
645
- ), b = f.useMemo(
646
- () => x.filter(Te(u, c)),
647
- [c, u, x]
648
- ), C = f.useMemo(
649
- () => m.reduce((w, R) => w + (R?.balance || 0), 0),
650
- [m]
651
- ), _ = d.reduce((w, R) => w + R.amount, 0), O = b.reduce((w, R) => w + R.amount, 0), A = C - _ + O, H = i && t.length > 0, p = a < 725;
652
- return /* @__PURE__ */ o(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
644
+ ), Re = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Ge(t.expectedDate) || Fe(t.expectedDate, n.start)) && We(t.expectedDate, n.end), kt = () => {
645
+ const { availableWidth: a } = ce(), { cashflow: n } = L(), { income: t, isDataLoaded: i, upcomingExpenses: f, upcomingIncome: u } = U(), { selectedAccountGuids: c } = P(), { dateRange: l, selectedCashAccounts: g } = V(), [r, h] = p.useState(!1), d = p.useMemo(
646
+ () => f.filter(Re(c, l)),
647
+ [l, c, f]
648
+ ), x = p.useMemo(
649
+ () => u.filter(Re(c, l)),
650
+ [l, c, u]
651
+ ), S = p.useMemo(
652
+ () => g.reduce((C, I) => C + (I?.balance || 0), 0),
653
+ [g]
654
+ ), w = d.reduce((C, I) => C + I.amount, 0), A = x.reduce((C, I) => C + I.amount, 0), _ = S - w + A, k = i && t.length > 0, b = a < 725;
655
+ return /* @__PURE__ */ o(s, { sx: { mx: b ? 16 : 0, my: b ? 24 : 42 }, children: [
653
656
  /* @__PURE__ */ o(
654
657
  s,
655
658
  {
656
- border: p ? "1px solid" : "none",
659
+ border: b ? "1px solid" : "none",
657
660
  borderColor: "border.light",
658
661
  borderRadius: 2,
659
- flexDirection: p ? "column" : "row",
660
- gap: p ? 0 : 24,
662
+ flexDirection: b ? "column" : "row",
663
+ gap: b ? 0 : 24,
661
664
  justifyContent: "center",
662
665
  children: [
663
666
  /* @__PURE__ */ e(
664
667
  ie,
665
668
  {
666
- amount: C,
667
- isMobile: p,
668
- label: $(n.cash_and_bank, m.length)
669
+ amount: S,
670
+ isMobile: b,
671
+ label: G(n.cash_and_bank, g.length)
669
672
  }
670
673
  ),
671
- p && /* @__PURE__ */ e(v, {}),
672
- H ? /* @__PURE__ */ o(U, { children: [
673
- !p && /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
674
+ b && /* @__PURE__ */ e(v, {}),
675
+ k ? /* @__PURE__ */ o(B, { children: [
676
+ !b && /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
674
677
  /* @__PURE__ */ e(
675
678
  ie,
676
679
  {
677
- amount: O,
678
- isMobile: p,
680
+ amount: A,
681
+ isMobile: b,
679
682
  label: n.to_be_received,
680
- symbol: p ? "+" : void 0
683
+ symbol: b ? "+" : void 0
681
684
  }
682
685
  )
683
686
  ] }) : /* @__PURE__ */ e(
684
- G,
687
+ M,
685
688
  {
686
- onClick: () => l(!0),
687
- startIcon: /* @__PURE__ */ e(j, { name: "add" }),
689
+ onClick: () => h(!0),
690
+ startIcon: /* @__PURE__ */ e($, { name: "add" }),
688
691
  sx: { fontSize: 13 },
689
692
  children: n.add_income
690
693
  }
691
694
  ),
692
- p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
695
+ b ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
693
696
  /* @__PURE__ */ e(
694
697
  ie,
695
698
  {
696
- amount: _,
697
- isMobile: p,
698
- label: $(n.to_be_paid_out, d.length),
699
- symbol: p ? "-" : void 0
699
+ amount: w,
700
+ isMobile: b,
701
+ label: G(n.to_be_paid_out, d.length),
702
+ symbol: b ? "-" : void 0
700
703
  }
701
704
  ),
702
- p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
705
+ b ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
703
706
  /* @__PURE__ */ e(
704
707
  ie,
705
708
  {
706
- amount: A,
707
- isMobile: p,
708
- isTotal: p,
709
+ amount: _,
710
+ isMobile: b,
711
+ isTotal: b,
709
712
  label: n.remaining_cash,
710
713
  tooltip: /* @__PURE__ */ e(
711
714
  he,
@@ -720,93 +723,91 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
720
723
  }
721
724
  ),
722
725
  /* @__PURE__ */ e(
723
- We,
726
+ Me,
724
727
  {
725
728
  ariaLabelClose: n.close_manage_income_aria,
726
729
  isOpen: r,
727
- onClose: () => l(!1),
730
+ onClose: () => h(!1),
728
731
  shouldShowHeaderBorders: !1,
729
732
  title: n.manage_income,
730
- children: /* @__PURE__ */ e(rt, {})
733
+ children: /* @__PURE__ */ e(st, {})
731
734
  }
732
735
  )
733
736
  ] });
734
- }, Nt = T(kt), Ot = ({ onBackClick: a, sx: n = {} }) => {
735
- const {
736
- selectedAccounts: t,
737
- selectedAccountGuids: i,
738
- setSelectedAccounts: g,
739
- shouldDisableNextDate: x,
740
- shouldDisablePrevDate: u
741
- } = q(), { onEvent: c } = ke(), { onLoad: m } = Ye(), { clientConfig: r } = Qe(), { visibleCashAccounts: l } = Le(), { setFilter: d } = Ne(), { dateRange: b, setSelectedCashAccounts: C } = Q(), { loadRepeatingTransactionData: _, isDataLoaded: O, setDateRange: A } = P(), { cashflow: H, recurring: p } = k(), { isInitialized: w } = q(), I = r?.master?.deep_link_params?.view === "manage_income", [M, ae] = f.useState(I);
742
- return f.useEffect(() => {
743
- A(b), O || _().finally(() => {
744
- m?.("CashflowWidget");
745
- });
746
- }, []), f.useEffect(() => {
747
- g(l);
748
- }, [l]), f.useEffect(() => {
749
- const V = l.map((S) => S.guid), K = t.filter(
750
- (S) => i.includes(S.guid) && V.includes(S.guid)
737
+ }, Ht = T(kt), Ot = ({ onBackClick: a, sx: n = {} }) => {
738
+ const { selectedAccounts: t, selectedAccountGuids: i, shouldDisableNextDate: f, shouldDisablePrevDate: u } = P(), { onEvent: c } = ke(), { clientConfig: l } = Qe(), { visibleCashAccounts: g } = Ne(), { setFilter: r } = He(), { dateRange: h, setSelectedCashAccounts: d } = V(), { loadRepeatingTransactionData: x, isDataLoaded: S, setDateRange: w } = U(), { cashflow: A, recurring: _ } = L(), { isInitialized: k } = P(), C = l?.master?.deep_link_params?.view === "manage_income", [I, ne] = p.useState(C);
739
+ return p.useEffect(() => {
740
+ w(h), S || x().finally();
741
+ }, []), p.useEffect(() => {
742
+ const oe = g.map((H) => H.guid), ae = t.filter(
743
+ (H) => i.includes(H.guid) && oe.includes(H.guid)
751
744
  );
752
- C(K), d({
753
- dateRange: { start: Me(W(), 90), end: dt() },
754
- accounts: K.map((S) => S.guid)
745
+ d(ae), r({
746
+ dateRange: { start: $e(W(), 90), end: mt() },
747
+ accounts: ae.map((H) => H.guid)
755
748
  });
756
- }, [l, t]), w ? /* @__PURE__ */ o(
757
- mt,
749
+ }, [g, t]), Oe({
750
+ widgetName: "CashflowWidget",
751
+ isLoaded: S
752
+ }), k ? /* @__PURE__ */ o(
753
+ ut,
758
754
  {
759
- accountOptions: l,
760
755
  actions: [
761
756
  {
762
- label: p.action_title,
757
+ label: _.action_title,
763
758
  iconName: "credit_card_gear",
764
759
  onClick: () => {
765
- ae(!0), c(we.CASH_FLOW_CLICK_SETTINGS);
760
+ ne(!0), c(Ie.CASH_FLOW_CLICK_SETTINGS);
766
761
  }
767
762
  }
768
763
  ],
764
+ allowedAccountTypes: [
765
+ Q.CASH,
766
+ Q.CHECKING,
767
+ Q.PREPAID,
768
+ Q.SAVINGS,
769
+ Q.CHECKING_LINE_OF_CREDIT
770
+ ],
769
771
  calendarActions: {
770
- shouldDisableNext: x,
772
+ shouldDisableNext: f,
771
773
  shouldDisablePrevious: u,
772
774
  shouldDisablePicker: !0,
773
775
  onRangeChanged: () => {
774
776
  }
775
777
  },
776
- dateRange: b,
778
+ dateRange: h,
777
779
  dateRangeVariant: "readonly",
778
- onAccountsFilterClick: () => c(we.CASH_FLOW_CLICK_FILTER),
780
+ onAccountsFilterClick: () => c(Ie.CASH_FLOW_CLICK_FILTER),
779
781
  onBackClick: a,
780
782
  sx: n,
781
- title: H.title,
783
+ title: A.title,
782
784
  children: [
785
+ /* @__PURE__ */ e(Ht, {}),
783
786
  /* @__PURE__ */ e(Nt, {}),
784
- /* @__PURE__ */ e(Lt, {}),
785
787
  /* @__PURE__ */ e(
786
- We,
788
+ Me,
787
789
  {
788
- ariaLabelClose: H.close_settings_aria,
789
- isOpen: M,
790
- onClose: () => ae(!1),
790
+ ariaLabelClose: A.close_settings_aria,
791
+ isOpen: I,
792
+ onClose: () => ne(!1),
791
793
  shouldShowHeaderBorders: !1,
792
- title: p.action_title,
793
- children: /* @__PURE__ */ e(Ze, { defaultSelectedTab: I ? 1 : 0 })
794
+ title: _.action_title,
795
+ children: /* @__PURE__ */ e(et, { defaultSelectedTab: C ? 1 : 0 })
794
796
  }
795
797
  )
796
798
  ]
797
799
  }
798
- ) : /* @__PURE__ */ e(te, {});
799
- }, Wn = T(Ot), Ht = ({ handleNextStep: a }) => {
800
- const { completeOnboarding: n } = me(), { cashflow: t } = k(), i = se();
800
+ ) : /* @__PURE__ */ e(Z, {});
801
+ }, $n = T(Ot), Ft = ({ handleNextStep: a }) => {
802
+ const { completeOnboarding: n } = me(), { cashflow: t } = L(), i = se();
801
803
  return /* @__PURE__ */ o(s, { children: [
802
- /* @__PURE__ */ e(de, { pb: 12, children: t.welcome_title }),
804
+ /* @__PURE__ */ e(de, { pb: 12, variant: "H1", children: t.welcome_title }),
803
805
  /* @__PURE__ */ e(
804
- qe,
806
+ Ve,
805
807
  {
806
808
  color: i.palette.primary.light,
807
809
  pb: 8,
808
810
  sx: { wordBreak: "break-word", whiteSpace: "initial" },
809
- variant: "H3",
810
811
  children: t.welcome_sub_title
811
812
  }
812
813
  ),
@@ -823,7 +824,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
823
824
  mr: 24,
824
825
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
825
826
  width: 44,
826
- children: /* @__PURE__ */ e(j, { color: "primary", name: "currency_exchange" })
827
+ children: /* @__PURE__ */ e($, { color: "primary", name: "currency_exchange" })
827
828
  }
828
829
  ),
829
830
  t.bullet_one
@@ -839,7 +840,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
839
840
  mr: 24,
840
841
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
841
842
  width: 44,
842
- children: /* @__PURE__ */ e(j, { color: "primary", name: "cardiology" })
843
+ children: /* @__PURE__ */ e($, { color: "primary", name: "cardiology" })
843
844
  }
844
845
  ),
845
846
  t.bullet_two
@@ -855,181 +856,181 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
855
856
  mr: 24,
856
857
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
857
858
  width: 44,
858
- children: /* @__PURE__ */ e(j, { color: "primary", name: "flare" })
859
+ children: /* @__PURE__ */ e($, { color: "primary", name: "flare" })
859
860
  }
860
861
  ),
861
862
  t.bullet_three
862
863
  ] })
863
864
  ] }),
864
865
  /* @__PURE__ */ o(s, { direction: "row", spacing: 16, children: [
865
- /* @__PURE__ */ e(G, { onClick: a, variant: "contained", children: t.get_started_button }),
866
- /* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
866
+ /* @__PURE__ */ e(M, { onClick: a, variant: "contained", children: t.get_started_button }),
867
+ /* @__PURE__ */ e(M, { onClick: n, variant: "outlined", children: t.skip_button })
867
868
  ] })
868
869
  ] });
869
- }, Ft = T(Ht), Re = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", $e = {
870
- CASHFLOW_ONBOARDING: `${Re}/cashflow-onboarding.png`,
871
- CASHFLOW_LOADING_ANIMATION: `${Re}/loading-animation.gif`
872
- }, Wt = () => {
873
- const { cashflow: a } = k();
874
- return /* @__PURE__ */ o(f.Fragment, { children: [
875
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: $e.CASHFLOW_LOADING_ANIMATION }) }),
876
- /* @__PURE__ */ e(de, { pb: 12, children: a.loading_title }),
870
+ }, Wt = T(Ft), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", je = {
871
+ CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
872
+ CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
873
+ }, Gt = () => {
874
+ const { cashflow: a } = L();
875
+ return /* @__PURE__ */ o(p.Fragment, { children: [
876
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: je.CASHFLOW_LOADING_ANIMATION }) }),
877
+ /* @__PURE__ */ e(de, { pb: 12, variant: "H1", children: a.loading_title }),
877
878
  /* @__PURE__ */ e(N, { children: a.loading_description })
878
879
  ] });
879
- }, Mt = T(Wt), $t = at`
880
+ }, Mt = T(Gt), $t = it`
880
881
  from {
881
882
  transform: rotate(0deg);
882
883
  }
883
884
  to {
884
885
  transform: rotate(360deg);
885
886
  }
886
- `, Gt = () => {
887
- const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { cashflow: t, common: i } = k(), { user: g } = Ve(), { completeOnboarding: x } = me(), { isDirty: u } = Q(), { isMobile: c } = ue(), { isCopyLoaded: m, setDisplayedDate: r } = q(), { filter: l, setFilter: d, transactions: b } = Ne(), C = se(), [_, O] = J(!0), [A, H] = f.useState(gt.EveryMonth), [p, w] = f.useState(1), [R, I] = f.useState(15), [M, ae] = J(!1), [V, K] = J(1), [S, Ge] = J([]), [fe, le] = J(""), F = f.useMemo(
888
- () => b.find((y) => y.guid === fe),
889
- [fe, b]
890
- ), je = !!n.filter(
891
- (y) => y.repeating_transaction_type === De.Income
892
- ).length, ge = async () => {
893
- K(2), r(
887
+ `, jt = () => {
888
+ const { addRepeatingTransaction: a, repeatingTransactions: n } = U(), { cashflow: t, common: i } = L(), { user: f } = Ke(), { completeOnboarding: u } = me(), { isDirty: c } = V(), { isMobile: l } = ue(), { isCopyLoaded: g, setDisplayedDate: r } = P(), { filter: h, setFilter: d, transactions: x } = He(), S = se(), [w, A] = Y(!0), [_, k] = p.useState(bt.EveryMonth), [b, C] = p.useState(1), [I, ne] = p.useState(15), [oe, ae] = Y(!1), [H, fe] = Y(1), [O, ze] = Y([]), [ge, le] = Y(""), F = p.useMemo(
889
+ () => x.find((y) => y.guid === ge),
890
+ [ge, x]
891
+ ), Be = !!n.filter(
892
+ (y) => y.repeating_transaction_type === ve.Income
893
+ ).length, be = async () => {
894
+ fe(2), r(
894
895
  // Beginning of the month, 90 days before today
895
- ht(Me(W(), 90)),
896
+ pt($e(W(), 90)),
896
897
  W()
897
- ), d({ ...l, custom: _e }), K(3);
898
- }, ze = async () => {
899
- if (!(S.length < 1)) {
898
+ ), d({ ...h, custom: _e }), fe(3);
899
+ }, Ue = async () => {
900
+ if (!(O.length < 1)) {
900
901
  ae(!0);
901
- for (let y = 0; y < S.length; y++) {
902
- const E = S[y], be = ve(A, Ie(E.date)), Ue = {
902
+ for (let y = 0; y < O.length; y++) {
903
+ const E = O[y], xe = Ae(_, De(E.date)), qe = {
903
904
  account_guid: E.account_guid,
904
905
  amount: E.amount,
905
906
  created_by: 0,
906
907
  //user
907
908
  merchant_guid: E.merchant_guid,
908
909
  description: E.feed_description || E.description,
909
- predicted_occurs_on: ut(be, { representation: "date" }),
910
- recurrence_day: be.getDay(),
911
- recurrence_type: A,
912
- repeating_transaction_type: De.Income,
913
- second_recurrence_day: R,
910
+ predicted_occurs_on: ht(xe, { representation: "date" }),
911
+ recurrence_day: xe.getDay(),
912
+ recurrence_type: _,
913
+ repeating_transaction_type: ve.Income,
914
+ second_recurrence_day: I,
914
915
  transaction_type: E.transaction_type,
915
- user_guid: g.guid
916
+ user_guid: f.guid
916
917
  };
917
- await a(Ue, E);
918
+ await a(qe, E);
918
919
  }
919
- await x();
920
+ await u();
920
921
  }
921
- }, Be = !F && _ || !F && S.length < 1;
922
- return m ? /* @__PURE__ */ o(
922
+ }, Pe = !F && w || !F && O.length < 1;
923
+ return g ? /* @__PURE__ */ o(
923
924
  D,
924
925
  {
925
926
  sx: {
926
927
  display: "flex",
927
- alignItems: c ? "flex-start" : "center",
928
- backgroundColor: C.palette.background.paper,
929
- backgroundImage: c ? null : `url(${$e.CASHFLOW_ONBOARDING})`,
928
+ alignItems: l ? "flex-start" : "center",
929
+ backgroundColor: S.palette.background.paper,
930
+ backgroundImage: l ? null : `url(${je.CASHFLOW_ONBOARDING})`,
930
931
  backgroundRepeat: "no-repeat",
931
932
  backgroundPosition: "left 100px",
932
933
  backgroundSize: "35%",
933
934
  py: 24
934
935
  },
935
936
  children: [
936
- V === 1 && /* @__PURE__ */ e(
937
+ H === 1 && /* @__PURE__ */ e(
937
938
  D,
938
939
  {
939
940
  sx: {
940
- ...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
941
+ ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
941
942
  },
942
- children: /* @__PURE__ */ e(Ft, { handleNextStep: ge })
943
+ children: /* @__PURE__ */ e(Wt, { handleNextStep: be })
943
944
  }
944
945
  ),
945
- V === 2 && /* @__PURE__ */ e(
946
+ H === 2 && /* @__PURE__ */ e(
946
947
  D,
947
948
  {
948
949
  sx: {
949
- ...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
950
+ ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
950
951
  },
951
952
  children: /* @__PURE__ */ e(Mt, {})
952
953
  }
953
954
  ),
954
- V === 3 && /* @__PURE__ */ o(
955
+ H === 3 && /* @__PURE__ */ o(
955
956
  D,
956
957
  {
957
958
  sx: {
958
- ...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
959
+ ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
959
960
  },
960
961
  children: [
961
- /* @__PURE__ */ e(de, { pb: 12, children: t.add_income_title }),
962
+ /* @__PURE__ */ e(de, { pb: 12, variant: "H1", children: t.add_income_title }),
962
963
  /* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
963
- S.length > 0 && !F && /* @__PURE__ */ o(U, { children: [
964
- /* @__PURE__ */ e(ee, { children: S.map((y, E) => /* @__PURE__ */ o(f.Fragment, { children: [
965
- /* @__PURE__ */ e(pt, { bgcolor: "background.paper", children: bt(
966
- B(y.nextDate || y.date)
964
+ O.length > 0 && !F && /* @__PURE__ */ o(B, { children: [
965
+ /* @__PURE__ */ e(J, { children: O.map((y, E) => /* @__PURE__ */ o(p.Fragment, { children: [
966
+ /* @__PURE__ */ e(ft, { bgcolor: "background.paper", children: xt(
967
+ z(y.nextDate || y.date)
967
968
  ) }),
968
- /* @__PURE__ */ e(ft, { transaction: y }),
969
- E !== S.length - 1 && /* @__PURE__ */ e(v, {})
969
+ /* @__PURE__ */ e(gt, { transaction: y }),
970
+ E !== O.length - 1 && /* @__PURE__ */ e(v, {})
970
971
  ] }, y.guid)) }),
971
972
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
972
973
  /* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
973
974
  /* @__PURE__ */ e(
974
- G,
975
+ M,
975
976
  {
976
- onClick: () => O(!0),
977
- startIcon: /* @__PURE__ */ e(j, { name: "add", size: 20 }),
977
+ onClick: () => A(!0),
978
+ startIcon: /* @__PURE__ */ e($, { name: "add", size: 20 }),
978
979
  children: t.add_income
979
980
  }
980
981
  )
981
982
  ] })
982
983
  ] }),
983
- Be && /* @__PURE__ */ e(
984
- st,
984
+ Pe && /* @__PURE__ */ e(
985
+ ct,
985
986
  {
986
987
  bgcolor: "background.paper",
987
988
  onSearch: (y) => d({
988
- ...l,
989
- custom: (E) => y ? ct(E, y) : _e(E)
989
+ ...h,
990
+ custom: (E) => y ? lt(E, y) : _e(E)
990
991
  }),
991
992
  onSelected: (y) => {
992
- le(y), O(!1);
993
+ le(y), A(!1);
993
994
  }
994
995
  }
995
996
  ),
996
- !je && u && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
997
- F && /* @__PURE__ */ o(U, { children: [
997
+ !Be && c && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
998
+ F && /* @__PURE__ */ o(B, { children: [
998
999
  /* @__PURE__ */ e(
999
- lt,
1000
+ dt,
1000
1001
  {
1001
1002
  bgcolor: "background.paper",
1002
- firstDay: p,
1003
- frequency: A,
1004
- onFirstDayChange: w,
1005
- onFrequencyChange: H,
1006
- onSecondDayChange: I,
1007
- secondDay: R,
1003
+ firstDay: b,
1004
+ frequency: _,
1005
+ onFirstDayChange: C,
1006
+ onFrequencyChange: k,
1007
+ onSecondDayChange: ne,
1008
+ secondDay: I,
1008
1009
  transaction: F
1009
1010
  }
1010
1011
  ),
1011
1012
  /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
1012
1013
  /* @__PURE__ */ e(
1013
- G,
1014
+ M,
1014
1015
  {
1015
1016
  "aria-disabled": !F,
1016
1017
  onClick: () => {
1017
- const y = [...S];
1018
+ const y = [...O];
1018
1019
  y.push({
1019
1020
  ...F,
1020
- nextDate: ve(A, Ie(F.date)),
1021
- frequency: A
1022
- }), Ge(y), le("");
1021
+ nextDate: Ae(_, De(F.date)),
1022
+ frequency: _
1023
+ }), ze(y), le("");
1023
1024
  },
1024
1025
  variant: "contained",
1025
1026
  children: i.confirm_button
1026
1027
  }
1027
1028
  ),
1028
1029
  /* @__PURE__ */ e(
1029
- G,
1030
+ M,
1030
1031
  {
1031
1032
  onClick: () => {
1032
- le(""), O(!0), ge().finally();
1033
+ le(""), A(!0), be().finally();
1033
1034
  },
1034
1035
  variant: "outlined",
1035
1036
  children: i.cancel_button
@@ -1037,14 +1038,14 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
1037
1038
  )
1038
1039
  ] })
1039
1040
  ] }),
1040
- S.length > 0 && !F && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
1041
+ O.length > 0 && !F && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
1041
1042
  /* @__PURE__ */ e(
1042
- G,
1043
+ M,
1043
1044
  {
1044
- "aria-disabled": S.length < 1 || M,
1045
- onClick: ze,
1046
- startIcon: M ? /* @__PURE__ */ e(
1047
- j,
1045
+ "aria-disabled": O.length < 1 || oe,
1046
+ onClick: Ue,
1047
+ startIcon: oe ? /* @__PURE__ */ e(
1048
+ $,
1048
1049
  {
1049
1050
  name: "progress_activity",
1050
1051
  sx: {
@@ -1056,38 +1057,38 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
1056
1057
  children: t.confirm_income_button
1057
1058
  }
1058
1059
  ),
1059
- /* @__PURE__ */ e(G, { onClick: x, variant: "outlined", children: t.skip_button })
1060
+ /* @__PURE__ */ e(M, { onClick: u, variant: "outlined", children: t.skip_button })
1060
1061
  ] })
1061
1062
  ]
1062
1063
  }
1063
1064
  )
1064
1065
  ]
1065
1066
  }
1066
- ) : /* @__PURE__ */ e(te, {});
1067
- }, Mn = T(Gt);
1068
- class $n {
1067
+ ) : /* @__PURE__ */ e(Z, {});
1068
+ }, jn = T(jt);
1069
+ class zn {
1069
1070
  fetchInstance;
1070
1071
  constructor(n, t, i) {
1071
- this.fetchInstance = new xt(n, t, void 0, i);
1072
+ this.fetchInstance = new Ct(n, t, void 0, i);
1072
1073
  }
1073
- addCashflowEvent = async (n) => this.fetchInstance.post(z.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1074
- addCashflowSequence = async (n) => this.fetchInstance.post(z.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
1075
- getCashflowSequences = async () => this.fetchInstance.get(z.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
1074
+ addCashflowEvent = async (n) => this.fetchInstance.post(j.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1075
+ addCashflowSequence = async (n) => this.fetchInstance.post(j.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
1076
+ getCashflowSequences = async () => this.fetchInstance.get(j.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
1076
1077
  getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
1077
- `${z.CASHFLOW_EVENTS}/from/${B(n)}/to/${B(t)}`
1078
+ `${j.CASHFLOW_EVENTS}/from/${z(n)}/to/${z(t)}`
1078
1079
  ).then((i) => i.cashflow_events);
1079
- deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${z.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
1080
+ deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${j.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
1080
1081
  getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
1081
- `${z.CASHFLOW_SEQUENCES}/projected_events/from/${B(
1082
+ `${j.CASHFLOW_SEQUENCES}/projected_events/from/${z(
1082
1083
  n
1083
- )}/to/${B(t)}`
1084
+ )}/to/${z(t)}`
1084
1085
  ).then((i) => i.cashflow_events);
1085
- updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1086
+ updateCashflowSequence = async (n) => this.fetchInstance.put(`${j.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1086
1087
  }
1087
1088
  export {
1088
- $n as CashflowApi,
1089
- Fn as CashflowMiniWidget,
1090
- Mn as CashflowOnboarding,
1091
- zn as CashflowStore,
1092
- Wn as CashflowWidget
1089
+ zn as CashflowApi,
1090
+ Mn as CashflowMiniWidget,
1091
+ jn as CashflowOnboarding,
1092
+ Pn as CashflowStore,
1093
+ $n as CashflowWidget
1093
1094
  };