@mx-cartographer/experiences 8.0.24 → 8.1.0

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 (148) hide show
  1. package/CHANGELOG.md +8 -9
  2. package/dist/{AccountApi-ChQr5PAZ.mjs → AccountApi-WEM2M9tg.mjs} +1 -1
  3. package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-IPRH6Wja.mjs} +2 -2
  4. package/dist/{AccountFields-CxqONzjY.mjs → AccountFields-BbPSfzru.mjs} +3 -3
  5. package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-qpACFl6i.mjs} +2 -2
  6. package/dist/{AccountStore-B7zfcad7.mjs → AccountStore-BeEiLNhW.mjs} +2 -2
  7. package/dist/Analytics-CjZ0emfs.mjs +53 -0
  8. package/dist/{Fetch-B6tMJC1r.mjs → ApiEndpoints-C5IA97i7.mjs} +48 -50
  9. package/dist/{BeatApi-EFHXULDx.mjs → BeatApi-C6pBa0Rb.mjs} +1 -1
  10. package/dist/{BeatStore-C6CAT-ce.mjs → BeatStore-DuvvrljY.mjs} +1 -1
  11. package/dist/{BudgetUtil-DZpOoZQa.mjs → BudgetUtil-CLh4xtj4.mjs} +60 -60
  12. package/dist/CategoryApi-CogDFScz.mjs +29 -0
  13. package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-BG04ByUx.mjs} +1 -1
  14. package/dist/CategoryStore-Bp1kO9Z-.mjs +160 -0
  15. package/dist/{CategoryUtil-BVixr0d5.mjs → CategoryUtil-DKRCegQv.mjs} +1 -1
  16. package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-BkNVHxSV.mjs} +14 -13
  17. package/dist/{CurrencyText-CA-E5N_y.mjs → CurrencyText-oqd6cX3M.mjs} +1 -1
  18. package/dist/{DateFormats-BMpMrZpW.mjs → DateFormats-CaOj_4eI.mjs} +1 -1
  19. package/dist/{DateUtil-wcYTmDRD.mjs → DateUtil-C57sqxn4.mjs} +1 -1
  20. package/dist/{EmbeddedCard-qwIhF1VP.mjs → EmbeddedCard-j7IGx3s1.mjs} +5 -5
  21. package/dist/{ExportCsvAction-CHCmCCqf.mjs → ExportCsvAction-7sjz7AXQ.mjs} +1 -1
  22. package/dist/FinstrongApi-FpmsS_sy.mjs +19 -0
  23. package/dist/{FinstrongStore-BQxXxxYD.mjs → FinstrongStore-DgyDJTEP.mjs} +121 -137
  24. package/dist/GlobalCopyApi-DkS-2Zf_.mjs +41 -0
  25. package/dist/Goal-MFBpoOIC.mjs +29 -0
  26. package/dist/{GoalStore-fgXt--2Y.mjs → GoalStore-DcaT4fM6.mjs} +81 -104
  27. package/dist/{Help-BkmSY96v.mjs → Help-cTsMzSQh.mjs} +1 -1
  28. package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DkD_s9NN.mjs} +1 -1
  29. package/dist/Localization-C_HZg9tJ.mjs +15 -0
  30. package/dist/Localization-CkQ49EKr.mjs +26 -0
  31. package/dist/{ManageIncome-DqqI9HB1.mjs → ManageIncome-DwSE_a8L.mjs} +20 -20
  32. package/dist/MerchantApi-D8ahYxiG.mjs +15 -0
  33. package/dist/MerchantStore-CyZTv-BM.mjs +26 -0
  34. package/dist/{NetWorthStore-BqZ44-4M.mjs → NetWorthStore-Ba3q3VcH.mjs} +1 -1
  35. package/dist/NotificationApi-DF0obHoR.mjs +20 -0
  36. package/dist/{NotificationSettings-DBT37CVB.mjs → NotificationSettings-DB-eNgSv.mjs} +3 -3
  37. package/dist/NotificationStore-DlAM5Ue0.mjs +69 -0
  38. package/dist/{NumberFormatting-QCaNwbjv.mjs → NumberFormatting-CyrvFgfd.mjs} +1 -1
  39. package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-AB1TGb5P.mjs} +2 -2
  40. package/dist/{RecurringSettings-OBGLelZQ.mjs → RecurringSettings-CZKeZC4m.mjs} +8 -8
  41. package/dist/{RecurringTransactions-BbZ6MQsX.mjs → RecurringTransactions-kzlU8OFY.mjs} +5 -5
  42. package/dist/{RecurringTransactionsStore-BE_eUfTC.mjs → RecurringTransactionsStore-D62Dt2BF.mjs} +76 -90
  43. package/dist/{RepeatingTransaction-DF4vJn_v.mjs → RepeatingTransaction-D2gmBTd0.mjs} +3 -3
  44. package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +17 -0
  45. package/dist/SettingsApi-D9d7SLhB.mjs +22 -0
  46. package/dist/{SettingsStore-BoIoiRLj.mjs → SettingsStore-Dsz1mvd3.mjs} +41 -60
  47. package/dist/{SpendingData-Bz1bCWAs.mjs → SpendingData-CoZOmlZD.mjs} +1 -1
  48. package/dist/{SpendingLegend-CypdabwS.mjs → SpendingLegend-DljKEG69.mjs} +2 -2
  49. package/dist/{Transaction-C3Pg9TKf.mjs → Transaction-Cn5_iFm0.mjs} +2 -2
  50. package/dist/{TransactionApi-Ck5Ua-7F.mjs → TransactionApi-CLG2eSNe.mjs} +1 -1
  51. package/dist/{TransactionDetails-I1ny1ecc.mjs → TransactionDetails-CN-yZkin.mjs} +9 -9
  52. package/dist/{TransactionStore-BUsgGRL1.mjs → TransactionStore-6ovFO8P1.mjs} +10 -10
  53. package/dist/{TrendsStore-CYdTo7cN.mjs → TrendsStore-DZa6cyQC.mjs} +1 -1
  54. package/dist/{ViewMoreMicroCard-BJOZcYnB.mjs → ViewMoreMicroCard-BsEitNRJ.mjs} +10 -9
  55. package/dist/WidgetApi-C0BA2cFX.mjs +102 -0
  56. package/dist/{WidgetContainer-DYKMArWw.mjs → WidgetContainer-Bc75FqK7.mjs} +1 -1
  57. package/dist/accounts/index.d.ts +0 -1
  58. package/dist/accounts/index.es.js +63 -65
  59. package/dist/accounts/stores/AccountStore.d.ts +1 -1
  60. package/dist/budgets/index.es.js +11 -11
  61. package/dist/budgets/store/BudgetsStore.d.ts +1 -1
  62. package/dist/cashflow/index.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +428 -449
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  66. package/dist/common/components/Error.d.ts +11 -0
  67. package/dist/common/components/index.d.ts +1 -0
  68. package/dist/common/constants/index.d.ts +0 -1
  69. package/dist/common/index.d.ts +0 -1
  70. package/dist/common/index.es.js +391 -492
  71. package/dist/common/stores/AppDataStore.d.ts +2 -2
  72. package/dist/common/stores/ConnectStore.d.ts +1 -1
  73. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  74. package/dist/common/stores/UserStore.d.ts +1 -1
  75. package/dist/common/utils/Localization.d.ts +0 -9
  76. package/dist/common/utils/index.d.ts +1 -2
  77. package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
  78. package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
  79. package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
  80. package/dist/{common → core}/api/BannerApi.d.ts +1 -1
  81. package/dist/{common → core}/api/BeatApi.d.ts +2 -2
  82. package/dist/{budgets → core}/api/BudgetsApi.d.ts +2 -2
  83. package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
  84. package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
  85. package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
  86. package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
  87. package/dist/{help → core}/api/HelpApi.d.ts +2 -2
  88. package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
  89. package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
  90. package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
  91. package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -2
  92. package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
  93. package/dist/{settings → core}/api/SettingsApi.d.ts +2 -2
  94. package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
  95. package/dist/{common → core}/api/UserApi.d.ts +2 -2
  96. package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
  97. package/dist/core/api/index.d.ts +20 -0
  98. package/dist/{common → core}/constants/ApiEndpoints.d.ts +0 -2
  99. package/dist/core/constants/index.d.ts +1 -0
  100. package/dist/core/index.d.ts +2 -0
  101. package/dist/core/index.es.js +90 -38
  102. package/dist/{common → core}/utils/Fetch.d.ts +1 -1
  103. package/dist/core/utils/Localization.d.ts +9 -0
  104. package/dist/core/utils/index.d.ts +2 -0
  105. package/dist/debts/index.es.js +7 -7
  106. package/dist/{exportTransactionsToCSV-DgdB3TBt.mjs → exportTransactionsToCSV-Dnd5lVq7.mjs} +2 -2
  107. package/dist/finstrong/index.d.ts +0 -1
  108. package/dist/finstrong/index.es.js +16 -17
  109. package/dist/finstrong/stores/FinstrongStore.d.ts +1 -1
  110. package/dist/goals/index.d.ts +0 -1
  111. package/dist/goals/index.es.js +50 -51
  112. package/dist/goals/stores/GoalStore.d.ts +1 -1
  113. package/dist/help/index.es.js +2 -2
  114. package/dist/help/store/HelpStore.d.ts +1 -1
  115. package/dist/insights/index.es.js +6 -6
  116. package/dist/insights/store/BeatStore.d.ts +1 -1
  117. package/dist/investments/index.es.js +2 -2
  118. package/dist/investments/stores/HoldingStore.d.ts +1 -1
  119. package/dist/merchants/index.es.js +1 -1
  120. package/dist/merchants/stores/MerchantStore.d.ts +1 -1
  121. package/dist/microinsights/index.es.js +1 -1
  122. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  123. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  124. package/dist/networth/index.es.js +8 -8
  125. package/dist/networth/stores/NetWorthStore.d.ts +1 -1
  126. package/dist/notifications/index.es.js +5 -5
  127. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  128. package/dist/recurringtransactions/index.es.js +26 -25
  129. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -1
  130. package/dist/settings/index.d.ts +0 -1
  131. package/dist/settings/index.es.js +65 -66
  132. package/dist/settings/stores/SettingsStore.d.ts +2 -2
  133. package/dist/spending/index.es.js +6 -6
  134. package/dist/transactions/index.d.ts +0 -1
  135. package/dist/transactions/index.es.js +22 -24
  136. package/dist/transactions/stores/TransactionStore.d.ts +3 -2
  137. package/dist/trends/index.es.js +14 -14
  138. package/package.json +1 -1
  139. package/dist/CategoryStore-FTxUbn0f.mjs +0 -186
  140. package/dist/Goal-0loDagc5.mjs +0 -6
  141. package/dist/Localization-CPkpIwIx.mjs +0 -37
  142. package/dist/MerchantStore-BzGi4JAZ.mjs +0 -37
  143. package/dist/NotificationStore-D_e8zo5M.mjs +0 -86
  144. package/dist/cashflow/api/CashflowApi.d.ts +0 -13
  145. package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
  146. package/dist/common/api/index.d.ts +0 -10
  147. package/dist/repeatingTransactions-DHIG94pi.mjs +0 -4
  148. package/dist/useCombineEvents-Bqojlv8q.mjs +0 -92
@@ -1,65 +1,64 @@
1
- import { jsxs as o, Fragment as B, jsx as e } from "react/jsx-runtime";
2
- import h, { useState as X } from "react";
3
- import { observer as E } from "mobx-react-lite";
4
- import { addMonths as Ve } from "date-fns/addMonths";
5
- import { startOfToday as W } from "date-fns/startOfToday";
6
- import D from "@mui/material/Box";
1
+ import { jsxs as n, Fragment as $, jsx as e } from "react/jsx-runtime";
2
+ import h, { useState as V } from "react";
3
+ import { observer as A } from "mobx-react-lite";
4
+ import { addMonths as Ye } from "date-fns/addMonths";
5
+ import { startOfToday as F } from "date-fns/startOfToday";
6
+ import I from "@mui/material/Box";
7
7
  import v from "@mui/material/Divider";
8
8
  import s from "@mui/material/Stack";
9
- import re from "@mui/material/styles/useTheme";
10
- import { Text as m, P as k, Icon as M, InstitutionLogo as ye, H2 as me, H3 as Ye } from "@mxenabled/mxui";
11
- import { G as Qe, t as ue, u as L, p as se, d as Ne, b as q, i as U, g as ke, a as Ke, h as Oe, o as Xe } from "../hooks-BxkfR-Ff.mjs";
12
- import { C as R } from "../CurrencyText-CA-E5N_y.mjs";
9
+ import ie from "@mui/material/styles/useTheme";
10
+ import { Text as m, P as N, Icon as z, InstitutionLogo as xe, H2 as de, H3 as qe } from "@mxenabled/mxui";
11
+ import { G as Ke, t as me, u as k, p as ae, d as ke, b as P, i as j, g as Le, a as Ve, h as Ne, o as Xe } from "../hooks-BxkfR-Ff.mjs";
12
+ import { C as E } from "../CurrencyText-oqd6cX3M.mjs";
13
13
  import { I as pe } from "../CashflowStore-CeAzChyD.mjs";
14
- import { C as Vn } from "../CashflowStore-CeAzChyD.mjs";
15
- import { u as he } from "../useScreenSize-CUcpY7aJ.mjs";
16
- import { L as te } from "../Loader-D3rjKx72.mjs";
17
- import { b as $ } from "../Localization-CPkpIwIx.mjs";
14
+ import { C as Bn } from "../CashflowStore-CeAzChyD.mjs";
15
+ import { u as ue } from "../useScreenSize-CUcpY7aJ.mjs";
16
+ import { L as Z } from "../Loader-D3rjKx72.mjs";
17
+ import { b as H } from "../Localization-CkQ49EKr.mjs";
18
18
  import { M as Je } from "../MiniWidgetContainer-Bhkv-hpz.mjs";
19
- import { E as Ze } from "../EmptyState-DHAkGsjk.mjs";
20
- import { u as Fe } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
21
- import { R as et } from "../RecurringSettings-OBGLelZQ.mjs";
22
- import tt from "@mui/material/Tabs";
23
- import Ce from "@mui/material/Tab";
24
- import { getUnixTime as z } from "date-fns/getUnixTime";
25
- import ee from "@mui/material/List";
26
- import ne from "@mui/material/ListItem";
27
- import { A as nt } from "../AccountListItem-D9WJDbZ1.mjs";
28
- import { f as V, D as Y } from "../DateFormats-BMpMrZpW.mjs";
29
- import ot from "@mui/material/ListSubheader";
30
- import { f as Z } from "../NumberFormatting-QCaNwbjv.mjs";
31
- import { isAfter as He } from "date-fns/isAfter";
32
- import { isBefore as We } from "date-fns/isBefore";
33
- import { isToday as $e } from "date-fns/isToday";
34
- import { addDays as _e } from "date-fns/addDays";
35
- import { alpha as it, keyframes as at } from "@mui/material/styles";
36
- import { DataGridPro as rt } from "@mui/x-data-grid-pro";
37
- import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
38
- import G from "@mui/material/Button";
39
- import { M as st, S as ct, i as lt, d as Se, c as dt } from "../ManageIncome-DqqI9HB1.mjs";
40
- import { D as Ge } from "../Drawer-Bbe4AMB1.mjs";
41
- import { subDays as Me } from "date-fns/subDays";
42
- import { endOfToday as mt } from "date-fns/endOfToday";
43
- import { W as ut } from "../WidgetContainer-DYKMArWw.mjs";
44
- import { A as Ie } from "../Analytics-0Xm_BjHU.mjs";
45
- import { A as J } from "../Account-BiB1F8lL.mjs";
19
+ import { E as Qe } from "../EmptyState-DHAkGsjk.mjs";
20
+ import { u as Oe } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
21
+ import { R as Ze } from "../RecurringSettings-CZKeZC4m.mjs";
22
+ import et from "@mui/material/Tabs";
23
+ import ye from "@mui/material/Tab";
24
+ import { getUnixTime as le } from "date-fns/getUnixTime";
25
+ import Q from "@mui/material/List";
26
+ import ee from "@mui/material/ListItem";
27
+ import { A as tt } from "../AccountListItem-qpACFl6i.mjs";
28
+ import { f as U, D as Y } from "../DateFormats-CaOj_4eI.mjs";
29
+ import nt from "@mui/material/ListSubheader";
30
+ import { f as J } from "../NumberFormatting-CyrvFgfd.mjs";
31
+ import { isAfter as Ge } from "date-fns/isAfter";
32
+ import { isBefore as Me } from "date-fns/isBefore";
33
+ import { isToday as Fe } from "date-fns/isToday";
34
+ import { addDays as Ce } from "date-fns/addDays";
35
+ import { alpha as ot, keyframes as it } from "@mui/material/styles";
36
+ import { DataGridPro as at } from "@mui/x-data-grid-pro";
37
+ import { T as _e } from "../TabContentContainer-j01JYR_7.mjs";
38
+ import W from "@mui/material/Button";
39
+ import { M as rt, S as st, i as ct, b as we, c as lt } from "../ManageIncome-DwSE_a8L.mjs";
40
+ import { D as He } from "../Drawer-Bbe4AMB1.mjs";
41
+ import { subDays as We } from "date-fns/subDays";
42
+ import { endOfToday as dt } from "date-fns/endOfToday";
43
+ import { W as mt } from "../WidgetContainer-Bc75FqK7.mjs";
44
+ import { A as Se } from "../Analytics-0Xm_BjHU.mjs";
45
+ import { A as X } from "../Account-BiB1F8lL.mjs";
46
46
  import { formatISO as pt } from "date-fns/formatISO";
47
47
  import { fromUnixTime as De } from "date-fns/fromUnixTime";
48
- import { startOfMonth as ht } from "date-fns/startOfMonth";
49
- import { S as ft, a as gt } from "../EmbeddedCard-qwIhF1VP.mjs";
50
- import { c as ve } from "../RecurringTransactions-BbZ6MQsX.mjs";
51
- import { h as bt } from "../DateUtil-wcYTmDRD.mjs";
52
- import { F as xt, R as Ae } from "../RepeatingTransaction-DF4vJn_v.mjs";
53
- import { F as yt, A as j } from "../Fetch-B6tMJC1r.mjs";
54
- const Q = () => {
55
- if (!h.useContext(Qe))
48
+ import { startOfMonth as ut } from "date-fns/startOfMonth";
49
+ import { S as ht, a as ft } from "../EmbeddedCard-j7IGx3s1.mjs";
50
+ import { c as Ie } from "../RecurringTransactions-kzlU8OFY.mjs";
51
+ import { h as gt } from "../DateUtil-C57sqxn4.mjs";
52
+ import { F as bt, b as ve } from "../RepeatingTransaction-D2gmBTd0.mjs";
53
+ const q = () => {
54
+ if (!h.useContext(Ke))
56
55
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
57
- return ue().uiStore;
58
- }, Ct = ({ remaining: i }) => {
59
- const { cashflow: n } = L();
60
- return /* @__PURE__ */ o(B, { children: [
56
+ return me().uiStore;
57
+ }, xt = ({ remaining: i }) => {
58
+ const { cashflow: o } = k();
59
+ return /* @__PURE__ */ n($, { children: [
61
60
  /* @__PURE__ */ e(
62
- D,
61
+ I,
63
62
  {
64
63
  sx: {
65
64
  borderRadius: "1px",
@@ -69,36 +68,36 @@ const Q = () => {
69
68
  }
70
69
  }
71
70
  ),
72
- /* @__PURE__ */ e(m, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
73
- /* @__PURE__ */ e(R, { amount: i, bold: !0, sx: { fontSize: 12 } })
71
+ /* @__PURE__ */ e(m, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: o.remaining_cash }),
72
+ /* @__PURE__ */ e(E, { amount: i, bold: !0, sx: { fontSize: 12 } })
74
73
  ] });
75
- }, fe = E(Ct), _t = () => {
76
- const i = re(), { availableWidth: n } = se(), { isMobile: t } = he(), { visibleCashAccounts: a, visibleCashBalance: f } = Ne(), { selectedAccountGuids: u } = q(), { cashflow: c } = L(), {
74
+ }, he = A(xt), yt = () => {
75
+ const i = ie(), { availableWidth: o } = ae(), { isMobile: t } = ue(), { visibleCashAccounts: r, visibleCashBalance: f } = ke(), { selectedAccountGuids: p } = P(), { cashflow: c } = k(), {
77
76
  daysUntilNextIncome: l,
78
77
  expensesTilNextIncome: b,
79
- selectedCashAccounts: r,
78
+ selectedCashAccounts: a,
80
79
  setNextIncome: g,
81
80
  setSelectedCashAccounts: d,
82
81
  setUpcomingExpenses: x
83
- } = Q(), { isDataLoaded: _, nextIncomeRecurrence: w, upcomingExpenses: T } = U();
82
+ } = q(), { isDataLoaded: _, nextIncomeRecurrence: w, upcomingExpenses: R } = j();
84
83
  h.useEffect(() => {
85
84
  d(
86
- a.filter((C) => u.includes(C.guid))
85
+ r.filter((C) => p.includes(C.guid))
87
86
  );
88
- }, [a, u]), h.useEffect(() => {
89
- w && g(w), x(T);
90
- }, [w, T]);
91
- const I = h.useMemo(
92
- () => a.filter((C) => u.includes(C.guid)).reduce((C, S) => C + (S?.balance || 0), 0),
93
- [u, T]
94
- ), N = h.useMemo(
95
- () => b.filter((C) => u.includes(C.accountGuid || "")).reduce((C, S) => C + S.amount, 0),
96
- [u, b]
97
- ), p = h.useMemo(
98
- () => I - N,
99
- [I, N]
87
+ }, [r, p]), h.useEffect(() => {
88
+ w && g(w), x(R);
89
+ }, [w, R]);
90
+ const D = h.useMemo(
91
+ () => r.filter((C) => p.includes(C.guid)).reduce((C, S) => C + (S?.balance || 0), 0),
92
+ [p, R]
93
+ ), L = h.useMemo(
94
+ () => b.filter((C) => p.includes(C.accountGuid || "")).reduce((C, S) => C + S.amount, 0),
95
+ [p, b]
96
+ ), u = h.useMemo(
97
+ () => D - L,
98
+ [D, L]
100
99
  );
101
- return _ ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
100
+ return _ ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: o > 710 ? /* @__PURE__ */ n(
102
101
  s,
103
102
  {
104
103
  border: `1px solid ${i.palette.divider}`,
@@ -107,44 +106,44 @@ const Q = () => {
107
106
  justifyContent: "space-between",
108
107
  px: 24,
109
108
  children: [
110
- /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
111
- /* @__PURE__ */ e(R, { amount: I, variant: "h2" }),
112
- /* @__PURE__ */ e(k, { variant: "caption", whiteSpace: "nowrap", children: $(
109
+ /* @__PURE__ */ n(s, { pb: 14, pt: 12, children: [
110
+ /* @__PURE__ */ e(E, { amount: D, variant: "h2" }),
111
+ /* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: H(
113
112
  c.total_cash_accounts,
114
- r.length
113
+ a.length
115
114
  ) })
116
115
  ] }),
117
- /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(M, { name: "remove" }) }),
118
- /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
119
- /* @__PURE__ */ e(R, { amount: N, variant: "h2" }),
120
- /* @__PURE__ */ e(k, { variant: "caption", whiteSpace: "nowrap", children: $(c.expenses_due, b.length) })
116
+ /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(z, { name: "remove" }) }),
117
+ /* @__PURE__ */ n(s, { pb: 14, pt: 12, children: [
118
+ /* @__PURE__ */ e(E, { amount: L, variant: "h2" }),
119
+ /* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: H(c.expenses_due, b.length) })
121
120
  ] }),
122
- /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(M, { name: "equal" }) }),
123
- /* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
124
- /* @__PURE__ */ e(R, { amount: p, variant: "h2" }),
125
- /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
126
- /* @__PURE__ */ e(k, { variant: "caption", whiteSpace: "nowrap", children: c.available_to_spend }),
121
+ /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(z, { name: "equal" }) }),
122
+ /* @__PURE__ */ n(s, { pb: 14, pr: 24, pt: 12, children: [
123
+ /* @__PURE__ */ e(E, { amount: u, variant: "h2" }),
124
+ /* @__PURE__ */ n(s, { alignItems: "center", direction: "row", gap: 8, children: [
125
+ /* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: c.available_to_spend }),
127
126
  /* @__PURE__ */ e(pe, { body: c.tooltip_body, title: c.tooltip_title })
128
127
  ] })
129
128
  ] }),
130
- /* @__PURE__ */ e(s, { borderLeft: `1px solid ${i.palette.divider}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(B, { children: [
131
- /* @__PURE__ */ e(m, { variant: "h2", children: $(c.days, l) }),
132
- /* @__PURE__ */ e(k, { variant: "caption", whiteSpace: "nowrap", children: c.next_paycheck })
129
+ /* @__PURE__ */ e(s, { borderLeft: `1px solid ${i.palette.divider}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ n($, { children: [
130
+ /* @__PURE__ */ e(m, { variant: "h2", children: H(c.days, l) }),
131
+ /* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: c.next_paycheck })
133
132
  ] }) })
134
133
  ]
135
134
  }
136
- ) : /* @__PURE__ */ o(s, { border: `1px solid ${i.palette.divider}`, borderRadius: 1, children: [
137
- /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
138
- /* @__PURE__ */ e(m, { variant: "body2", children: $(
135
+ ) : /* @__PURE__ */ n(s, { border: `1px solid ${i.palette.divider}`, borderRadius: 1, children: [
136
+ /* @__PURE__ */ n(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
137
+ /* @__PURE__ */ e(m, { variant: "body2", children: H(
139
138
  c.total_cash_accounts,
140
- r.length
139
+ a.length
141
140
  ) }),
142
- /* @__PURE__ */ e(R, { amount: f, bold: !0, variant: "caption" })
141
+ /* @__PURE__ */ e(E, { amount: f, bold: !0, variant: "caption" })
143
142
  ] }),
144
143
  /* @__PURE__ */ e(v, {}),
145
- /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
146
- /* @__PURE__ */ e(m, { variant: "body2", children: $(c.expenses_due, b.length) }),
147
- /* @__PURE__ */ e(R, { amount: N, bold: !0, symbol: "-", variant: "caption" })
144
+ /* @__PURE__ */ n(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
145
+ /* @__PURE__ */ e(m, { variant: "body2", children: H(c.expenses_due, b.length) }),
146
+ /* @__PURE__ */ e(E, { amount: L, bold: !0, symbol: "-", variant: "caption" })
148
147
  ] }),
149
148
  /* @__PURE__ */ e(v, {}),
150
149
  /* @__PURE__ */ e(
@@ -158,56 +157,56 @@ const Q = () => {
158
157
  justifyContent: "space-between",
159
158
  px: 16,
160
159
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
161
- children: /* @__PURE__ */ e(fe, { remaining: p })
160
+ children: /* @__PURE__ */ e(he, { remaining: u })
162
161
  }
163
162
  ),
164
163
  /* @__PURE__ */ e(v, {}),
165
- /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
164
+ /* @__PURE__ */ n(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
166
165
  /* @__PURE__ */ e(m, { variant: "body2", children: c.next_paycheck }),
167
- /* @__PURE__ */ e(m, { bold: !0, variant: "caption", children: $(c.days, l) })
166
+ /* @__PURE__ */ e(m, { bold: !0, variant: "caption", children: H(c.days, l) })
168
167
  ] })
169
- ] }) }) : /* @__PURE__ */ e(te, { height: t ? 210 : 120 });
170
- }, wt = E(_t), St = ({
168
+ ] }) }) : /* @__PURE__ */ e(Z, { height: t ? 210 : 120 });
169
+ }, Ct = A(yt), _t = ({
171
170
  onPrimaryCtaClick: i,
172
- onSecondaryCtaClick: n,
171
+ onSecondaryCtaClick: o,
173
172
  sx: t = {}
174
173
  }) => {
175
- const { cashflow: a } = L(), { isInitialized: f } = q(), { loadRepeatingTransactionData: u, income: c, isDataLoaded: l, setDateRange: b } = U();
174
+ const { cashflow: r } = k(), { isInitialized: f } = P(), { loadRepeatingTransactionData: p, income: c, isDataLoaded: l, setDateRange: b } = j();
176
175
  h.useEffect(() => {
177
- b({ start: W(), end: Ve(W(), 1) }), l || u().finally();
178
- }, []), Fe({
176
+ b({ start: F(), end: Ye(F(), 1) }), l || p().finally();
177
+ }, []), Oe({
179
178
  widgetName: "CashflowMiniWidget",
180
179
  isLoaded: l
181
180
  });
182
- const r = l && !c.length;
183
- return f ? /* @__PURE__ */ o(
181
+ const a = l && !c.length;
182
+ return f ? /* @__PURE__ */ n(
184
183
  Je,
185
184
  {
186
185
  className: "mx-exp-cashflow-miniwidget",
187
186
  onPrimaryCtaClick: i,
188
- primaryCtaLabel: a.primary_cta,
189
- primaryCtaLabelAria: a.primary_cta_aria,
190
- subTitle: r || !l ? void 0 : a.sub_title,
187
+ primaryCtaLabel: r.primary_cta,
188
+ primaryCtaLabelAria: r.primary_cta_aria,
189
+ subTitle: a || !l ? void 0 : r.sub_title,
191
190
  sx: { height: "100%", ...t },
192
- title: a.title,
191
+ title: r.title,
193
192
  children: [
194
- !l && /* @__PURE__ */ e(te, {}),
195
- l && (r ? /* @__PURE__ */ e(
196
- Ze,
193
+ !l && /* @__PURE__ */ e(Z, {}),
194
+ l && (a ? /* @__PURE__ */ e(
195
+ Qe,
197
196
  {
198
- header: a.create,
197
+ header: r.create,
199
198
  icon: "local_atm",
200
- onClick: n,
201
- primaryButton: a.add_income,
199
+ onClick: o,
200
+ primaryButton: r.add_income,
202
201
  primaryButtonStartIcon: "add",
203
- subText: a.create_description
202
+ subText: r.create_description
204
203
  }
205
- ) : /* @__PURE__ */ e(wt, {}))
204
+ ) : /* @__PURE__ */ e(Ct, {}))
206
205
  ]
207
206
  }
208
- ) : /* @__PURE__ */ e(te, {});
209
- }, jn = E(St), It = ({ remaining: i }) => /* @__PURE__ */ e(
210
- ne,
207
+ ) : /* @__PURE__ */ e(Z, {});
208
+ }, Hn = A(_t), wt = ({ remaining: i }) => /* @__PURE__ */ e(
209
+ ee,
211
210
  {
212
211
  sx: {
213
212
  alignItems: "center",
@@ -219,19 +218,19 @@ const Q = () => {
219
218
  borderBottomRightRadius: "3px",
220
219
  minHeight: "auto"
221
220
  },
222
- children: /* @__PURE__ */ e(fe, { remaining: i })
221
+ children: /* @__PURE__ */ e(he, { remaining: i })
223
222
  }
224
223
  );
225
- var oe = /* @__PURE__ */ ((i) => (i.EXPENSE = "expense", i.INCOME = "income", i))(oe || {});
226
- const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
227
- /* @__PURE__ */ o(ne, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
228
- /* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
229
- /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: V(i.expectedDate, Y.MONTH) }),
230
- /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: V(i.expectedDate, Y.DAY) })
224
+ var te = /* @__PURE__ */ ((i) => (i.EXPENSE = "expense", i.INCOME = "income", i))(te || {});
225
+ const St = ({ recurrence: i }) => /* @__PURE__ */ n($, { children: [
226
+ /* @__PURE__ */ n(ee, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
227
+ /* @__PURE__ */ n(s, { alignItems: "center", height: 32, width: 32, children: [
228
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: U(i.expectedDate, Y.MONTH) }),
229
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: U(i.expectedDate, Y.DAY) })
231
230
  ] }),
232
231
  /* @__PURE__ */ e(m, { sx: { flexGrow: 1, fontSize: 13 }, children: i.name }),
233
232
  /* @__PURE__ */ e(
234
- R,
233
+ E,
235
234
  {
236
235
  amount: i.amount,
237
236
  bold: !0,
@@ -240,11 +239,11 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
240
239
  )
241
240
  ] }),
242
241
  /* @__PURE__ */ e(v, {})
243
- ] }), Ee = E(Dt), vt = ({ total: i, type: n }) => {
244
- const { cashflow: t } = L();
245
- return /* @__PURE__ */ o(B, { children: [
246
- /* @__PURE__ */ o(
247
- ot,
242
+ ] }), Te = A(St), Dt = ({ total: i, type: o }) => {
243
+ const { cashflow: t } = k();
244
+ return /* @__PURE__ */ n($, { children: [
245
+ /* @__PURE__ */ n(
246
+ nt,
248
247
  {
249
248
  sx: {
250
249
  alignItems: "center",
@@ -256,40 +255,40 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
256
255
  px: 24
257
256
  },
258
257
  children: [
259
- /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: n === oe.EXPENSE ? t.expenses : t.income }),
260
- /* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 13 }, children: [
261
- n === oe.EXPENSE ? "-" : "+",
262
- Z(i, "0,0.00")
258
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: o === te.EXPENSE ? t.expenses : t.income }),
259
+ /* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 13 }, children: [
260
+ o === te.EXPENSE ? "-" : "+",
261
+ J(i, "0,0.00")
263
262
  ] })
264
263
  ]
265
264
  }
266
265
  ),
267
266
  /* @__PURE__ */ e(v, {})
268
267
  ] });
269
- }, Te = E(vt), ae = (i, n) => (t) => t.accountGuid === i.guid && ($e(t.expectedDate) || He(t.expectedDate, n.start)) && We(t.expectedDate, n.end), At = () => {
270
- const { availableWidth: i } = se(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: a } = U(), { dateRange: f, selectedCashAccounts: u } = Q();
271
- return /* @__PURE__ */ o(s, { children: [
272
- /* @__PURE__ */ o(s, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
273
- /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
274
- /* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
275
- V(f.start, Y.FULL_MONTH_DAY),
268
+ }, Ae = A(Dt), oe = (i, o) => (t) => t.accountGuid === i.guid && (Fe(t.expectedDate) || Ge(t.expectedDate, o.start)) && Me(t.expectedDate, o.end), It = () => {
269
+ const { availableWidth: i } = ae(), { cashflow: o } = k(), { upcomingExpenses: t, upcomingIncome: r } = j(), { dateRange: f, selectedCashAccounts: p } = q();
270
+ return /* @__PURE__ */ n(s, { children: [
271
+ /* @__PURE__ */ n(s, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
272
+ /* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: o.accounts_breakdown }),
273
+ /* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
274
+ U(f.start, Y.FULL_MONTH_DAY),
276
275
  " -",
277
276
  " ",
278
- V(f.end, Y.FULL_MONTH_DAY)
277
+ U(f.end, Y.FULL_MONTH_DAY)
279
278
  ] })
280
279
  ] }),
281
- /* @__PURE__ */ e(s, { children: u.map((c) => {
282
- const l = a.filter(ae(c, f)).sort((d, x) => z(d.expectedDate) - z(x.expectedDate)), b = t.filter(
283
- ae(c, f)
284
- ), r = l.reduce(
280
+ /* @__PURE__ */ e(s, { children: p.map((c) => {
281
+ const l = r.filter(oe(c, f)).sort((d, x) => le(d.expectedDate) - le(x.expectedDate)), b = t.filter(
282
+ oe(c, f)
283
+ ), a = l.reduce(
285
284
  (d, x) => d + x.amount,
286
285
  0
287
286
  ), g = b.reduce(
288
287
  (d, x) => d + x.amount,
289
288
  0
290
289
  );
291
- return /* @__PURE__ */ o(
292
- ee,
290
+ return /* @__PURE__ */ n(
291
+ Q,
293
292
  {
294
293
  sx: {
295
294
  border: "1px solid",
@@ -299,7 +298,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
299
298
  },
300
299
  children: [
301
300
  /* @__PURE__ */ e(
302
- nt,
301
+ tt,
303
302
  {
304
303
  account: c,
305
304
  listItemProps: {
@@ -310,26 +309,26 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
310
309
  }
311
310
  ),
312
311
  /* @__PURE__ */ e(v, {}),
313
- l.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
314
- ee,
312
+ l.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
313
+ Q,
315
314
  {
316
- subheader: /* @__PURE__ */ e(Te, { total: r, type: oe.INCOME }),
315
+ subheader: /* @__PURE__ */ e(Ae, { total: a, type: te.INCOME }),
317
316
  sx: { width: "100%" },
318
- children: l.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
317
+ children: l.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
319
318
  }
320
319
  ) }),
321
- b.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
322
- ee,
320
+ b.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
321
+ Q,
323
322
  {
324
- subheader: /* @__PURE__ */ e(Te, { total: g, type: oe.EXPENSE }),
323
+ subheader: /* @__PURE__ */ e(Ae, { total: g, type: te.EXPENSE }),
325
324
  sx: { width: "100%" },
326
- children: b.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
325
+ children: b.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
327
326
  }
328
327
  ) }),
329
328
  /* @__PURE__ */ e(
330
- It,
329
+ wt,
331
330
  {
332
- remaining: (c.available_balance || c.balance || 0) + r - g
331
+ remaining: (c.available_balance || c.balance || 0) + a - g
333
332
  }
334
333
  )
335
334
  ]
@@ -338,17 +337,17 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
338
337
  );
339
338
  }) })
340
339
  ] });
341
- }, Et = E(At), Tt = () => {
342
- const { availableWidth: i } = se(), n = re(), { cashflow: t } = L(), { upcomingExpenses: a, upcomingIncome: f } = U(), { dateRange: u, selectedCashAccounts: c } = Q(), l = [
340
+ }, vt = A(It), Tt = () => {
341
+ const { availableWidth: i } = ae(), o = ie(), { cashflow: t } = k(), { upcomingExpenses: r, upcomingIncome: f } = j(), { dateRange: p, selectedCashAccounts: c } = q(), l = [
343
342
  {
344
343
  field: "account",
345
344
  flex: 1.5,
346
345
  headerName: t.accounts,
347
- renderCell: ({ value: { name: r, nickname: g, institution_guid: d, account_number: x } }) => {
348
- const _ = g || r;
349
- return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
346
+ renderCell: ({ value: { name: a, nickname: g, institution_guid: d, account_number: x } }) => {
347
+ const _ = g || a;
348
+ return /* @__PURE__ */ n(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
350
349
  /* @__PURE__ */ e(
351
- ye,
350
+ xe,
352
351
  {
353
352
  alt: t.institution_logo,
354
353
  institutionGuid: d || "",
@@ -364,69 +363,69 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
364
363
  flex: 1,
365
364
  headerName: t.balance,
366
365
  type: "number",
367
- renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: Z(r.value, "0,0.00") })
366
+ renderCell: (a) => /* @__PURE__ */ e(m, { color: o.palette.text.primary, variant: "body2", children: J(a.value, "0,0.00") })
368
367
  },
369
368
  {
370
369
  field: "income",
371
370
  flex: 1,
372
371
  headerName: t.projected_income,
373
372
  type: "number",
374
- renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: `+${Z(r.value, "0,0.00")}` })
373
+ renderCell: (a) => /* @__PURE__ */ e(m, { color: o.palette.text.primary, variant: "body2", children: `+${J(a.value, "0,0.00")}` })
375
374
  },
376
375
  {
377
376
  field: "expenses",
378
377
  flex: 1.1,
379
378
  headerName: t.projected_expenses,
380
379
  type: "number",
381
- renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: `-${Z(r.value, "0,0.00")}` })
380
+ renderCell: (a) => /* @__PURE__ */ e(m, { color: o.palette.text.primary, variant: "body2", children: `-${J(a.value, "0,0.00")}` })
382
381
  },
383
382
  {
384
383
  field: "remaining",
385
384
  flex: 1,
386
385
  headerName: t.remaining,
387
386
  type: "number",
388
- renderCell: (r) => {
389
- const g = r.row.balance + r.row.income - r.row.expenses;
387
+ renderCell: (a) => {
388
+ const g = a.row.balance + a.row.income - a.row.expenses;
390
389
  return /* @__PURE__ */ e(
391
390
  m,
392
391
  {
393
- color: Math.sign(g) === -1 ? n.palette.error.main : n.palette.text.primary,
392
+ color: Math.sign(g) === -1 ? o.palette.error.main : o.palette.text.primary,
394
393
  variant: "body2",
395
- children: Z(g, "0,0.00")
394
+ children: J(g, "0,0.00")
396
395
  }
397
396
  );
398
397
  }
399
398
  }
400
- ], b = h.useMemo(() => c.map((r) => {
401
- const g = a.filter(
402
- ae(r, { start: W(), end: _e(W(), 30) })
399
+ ], b = h.useMemo(() => c.map((a) => {
400
+ const g = r.filter(
401
+ oe(a, { start: F(), end: Ce(F(), 30) })
403
402
  ).reduce((_, w) => _ + w.amount, 0), d = f.filter(
404
- ae(r, { start: W(), end: _e(W(), 30) })
405
- ).reduce((_, w) => _ + w.amount, 0), x = (r.balance || 0) + d - g;
403
+ oe(a, { start: F(), end: Ce(F(), 30) })
404
+ ).reduce((_, w) => _ + w.amount, 0), x = (a.balance || 0) + d - g;
406
405
  return {
407
- account: r,
408
- balance: r.balance || 0,
409
- id: r.guid,
406
+ account: a,
407
+ balance: a.balance || 0,
408
+ id: a.guid,
410
409
  income: d,
411
410
  expenses: g,
412
411
  remaining: x
413
412
  };
414
- }), [c, a, f]);
415
- return /* @__PURE__ */ o(
416
- D,
413
+ }), [c, r, f]);
414
+ return /* @__PURE__ */ n(
415
+ I,
417
416
  {
418
417
  sx: {
419
418
  width: "100%"
420
419
  },
421
420
  children: [
422
- /* @__PURE__ */ o(
421
+ /* @__PURE__ */ n(
423
422
  s,
424
423
  {
425
424
  direction: i < 540 ? "column" : "row",
426
425
  justifyContent: "space-between",
427
426
  mb: 12,
428
427
  children: [
429
- /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
428
+ /* @__PURE__ */ n(s, { alignItems: "center", direction: "row", gap: 8, children: [
430
429
  /* @__PURE__ */ e(
431
430
  m,
432
431
  {
@@ -446,17 +445,17 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
446
445
  }
447
446
  )
448
447
  ] }),
449
- /* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
450
- V(u.start, Y.FULL_MONTH_DAY),
448
+ /* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
449
+ U(p.start, Y.FULL_MONTH_DAY),
451
450
  " -",
452
451
  " ",
453
- V(u.end, Y.FULL_MONTH_DAY)
452
+ U(p.end, Y.FULL_MONTH_DAY)
454
453
  ] })
455
454
  ]
456
455
  }
457
456
  ),
458
457
  i > 650 ? /* @__PURE__ */ e(
459
- rt,
458
+ at,
460
459
  {
461
460
  columnHeaderHeight: 48,
462
461
  columns: l,
@@ -471,24 +470,24 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
471
470
  borderColor: "neutral.light",
472
471
  borderRadius: 1,
473
472
  "& .MuiDataGrid-columnHeader .MuiIconButton-root": {
474
- color: n.palette.primary.main,
473
+ color: o.palette.primary.main,
475
474
  "&:hover": {
476
- backgroundColor: it(n.palette.primary.main, 0.1)
475
+ backgroundColor: ot(o.palette.primary.main, 0.1)
477
476
  }
478
477
  },
479
478
  "& .MuiDataGrid-columnHeaderTitle": {
480
- fontFamily: n.typography.h3.fontFamily,
481
- fontSize: n.typography.body2.fontSize
479
+ fontFamily: o.typography.h3.fontFamily,
480
+ fontSize: o.typography.body2.fontSize
482
481
  },
483
482
  "& .MuiDataGrid-sortIcon": {
484
- color: n.palette.primary.main
483
+ color: o.palette.primary.main
485
484
  }
486
485
  }
487
486
  }
488
- ) : b.map((r) => {
489
- const { name: g, nickname: d, institution_guid: x, account_number: _ } = r.account, w = d || g;
487
+ ) : b.map((a) => {
488
+ const { name: g, nickname: d, institution_guid: x, account_number: _ } = a.account, w = d || g;
490
489
  return /* @__PURE__ */ e(
491
- ee,
490
+ Q,
492
491
  {
493
492
  sx: {
494
493
  border: "1px solid",
@@ -496,8 +495,8 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
496
495
  borderRadius: 1,
497
496
  marginBottom: 24
498
497
  },
499
- children: /* @__PURE__ */ e(ne, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
500
- /* @__PURE__ */ o(
498
+ children: /* @__PURE__ */ e(ee, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ n(s, { width: "100%", children: [
499
+ /* @__PURE__ */ n(
501
500
  s,
502
501
  {
503
502
  alignItems: "center",
@@ -506,9 +505,9 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
506
505
  px: 16,
507
506
  py: 12,
508
507
  children: [
509
- /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
508
+ /* @__PURE__ */ n(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
510
509
  /* @__PURE__ */ e(
511
- ye,
510
+ xe,
512
511
  {
513
512
  alt: t.institution_logo,
514
513
  institutionGuid: x || "",
@@ -517,12 +516,12 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
517
516
  ),
518
517
  /* @__PURE__ */ e(m, { variant: "body2", children: `${w} ${_ ? `*${_}` : ""}` })
519
518
  ] }),
520
- /* @__PURE__ */ e(R, { amount: r.balance, bold: !0, variant: "body2" })
519
+ /* @__PURE__ */ e(E, { amount: a.balance, bold: !0, variant: "body2" })
521
520
  ]
522
521
  }
523
522
  ),
524
523
  /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
525
- /* @__PURE__ */ o(
524
+ /* @__PURE__ */ n(
526
525
  s,
527
526
  {
528
527
  alignItems: "center",
@@ -532,12 +531,12 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
532
531
  py: 12,
533
532
  children: [
534
533
  /* @__PURE__ */ e(m, { variant: "body2", children: t.projected_income }),
535
- /* @__PURE__ */ e(R, { amount: r.income, bold: !0, symbol: "+", variant: "body2" })
534
+ /* @__PURE__ */ e(E, { amount: a.income, bold: !0, symbol: "+", variant: "body2" })
536
535
  ]
537
536
  }
538
537
  ),
539
538
  /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
540
- /* @__PURE__ */ o(
539
+ /* @__PURE__ */ n(
541
540
  s,
542
541
  {
543
542
  alignItems: "center",
@@ -547,7 +546,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
547
546
  py: 12,
548
547
  children: [
549
548
  /* @__PURE__ */ e(m, { variant: "body2", children: t.projected_expenses }),
550
- /* @__PURE__ */ e(R, { amount: r.expenses, bold: !0, symbol: "-", variant: "body2" })
549
+ /* @__PURE__ */ e(E, { amount: a.expenses, bold: !0, symbol: "-", variant: "body2" })
551
550
  ]
552
551
  }
553
552
  ),
@@ -563,36 +562,36 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
563
562
  px: 16,
564
563
  py: 12,
565
564
  sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
566
- children: /* @__PURE__ */ e(fe, { remaining: r.remaining })
565
+ children: /* @__PURE__ */ e(he, { remaining: a.remaining })
567
566
  }
568
567
  )
569
568
  ] }) })
570
569
  },
571
- r.id
570
+ a.id
572
571
  );
573
572
  })
574
573
  ]
575
574
  }
576
575
  );
577
- }, Rt = E(Tt), Lt = () => {
578
- const { cashflow: i } = L(), { isDesktop: n } = he(), { onEvent: t } = ke(), [a, f] = h.useState(0), u = (c, l) => {
576
+ }, At = A(Tt), Rt = () => {
577
+ const { cashflow: i } = k(), { isDesktop: o } = ue(), { onEvent: t } = Le(), [r, f] = h.useState(0), p = (c, l) => {
579
578
  f(l);
580
579
  };
581
580
  return h.useEffect(() => {
582
- t(a === 0 ? "cash_flow_summary" : "cash_flow_details");
583
- }, [a]), /* @__PURE__ */ o(D, { children: [
584
- /* @__PURE__ */ o(
585
- tt,
581
+ t(r === 0 ? "cash_flow_summary" : "cash_flow_details");
582
+ }, [r]), /* @__PURE__ */ n(I, { children: [
583
+ /* @__PURE__ */ n(
584
+ et,
586
585
  {
587
586
  "aria-label": i.cashflow_summary_and_details,
588
587
  centered: !0,
589
- onChange: u,
588
+ onChange: p,
590
589
  textColor: "primary",
591
- value: a,
590
+ value: r,
592
591
  variant: "fullWidth",
593
592
  children: [
594
593
  /* @__PURE__ */ e(
595
- Ce,
594
+ ye,
596
595
  {
597
596
  "aria-controls": "cashflow-tabpanel-0",
598
597
  id: "cashflow-tab-0",
@@ -603,7 +602,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
603
602
  }
604
603
  ),
605
604
  /* @__PURE__ */ e(
606
- Ce,
605
+ ye,
607
606
  {
608
607
  "aria-controls": "cashflow-tabpanel-1",
609
608
  id: "cashflow-tab-1",
@@ -616,108 +615,108 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
616
615
  ]
617
616
  }
618
617
  ),
619
- /* @__PURE__ */ e(D, { sx: { mb: 32 } }),
620
- /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: a, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Rt, {}) }) }),
621
- /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: a, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Et, {}) }) })
618
+ /* @__PURE__ */ e(I, { sx: { mb: 32 } }),
619
+ /* @__PURE__ */ e(_e, { index: 0, name: "cashflow", value: r, children: /* @__PURE__ */ e(I, { sx: { m: o ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) }),
620
+ /* @__PURE__ */ e(_e, { index: 1, name: "cashflow", value: r, children: /* @__PURE__ */ e(I, { sx: { m: o ? 48 : 16 }, children: /* @__PURE__ */ e(vt, {}) }) })
622
621
  ] });
623
- }, Nt = E(Lt), ie = ({
622
+ }, Et = A(Rt), ne = ({
624
623
  amount: i,
625
- isMobile: n = !1,
624
+ isMobile: o = !1,
626
625
  isTotal: t = !1,
627
- label: a,
626
+ label: r,
628
627
  symbol: f,
629
- tooltip: u
630
- }) => /* @__PURE__ */ o(
628
+ tooltip: p
629
+ }) => /* @__PURE__ */ n(
631
630
  s,
632
631
  {
633
632
  bgcolor: t ? "background.default" : "transparent",
634
- direction: n ? "row" : "column",
635
- justifyContent: n ? "space-between" : "initial",
636
- padding: n ? "14px 16px" : 0,
633
+ direction: o ? "row" : "column",
634
+ justifyContent: o ? "space-between" : "initial",
635
+ padding: o ? "14px 16px" : 0,
637
636
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
638
637
  children: [
639
- !n && /* @__PURE__ */ e(R, { amount: i, component: "h2", variant: "h2" }),
640
- /* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
641
- /* @__PURE__ */ e(m, { bold: t, variant: "body2", children: a }),
642
- u
638
+ !o && /* @__PURE__ */ e(E, { amount: i, component: "h2", variant: "h2" }),
639
+ /* @__PURE__ */ n(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
640
+ /* @__PURE__ */ e(m, { bold: t, variant: "body2", children: r }),
641
+ p
643
642
  ] }),
644
- n && /* @__PURE__ */ e(R, { amount: i, component: "h2", symbol: f, variant: "body2" })
643
+ o && /* @__PURE__ */ e(E, { amount: i, component: "h2", symbol: f, variant: "body2" })
645
644
  ]
646
645
  }
647
- ), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && ($e(t.expectedDate) || He(t.expectedDate, n.start)) && We(t.expectedDate, n.end), kt = () => {
648
- const { availableWidth: i } = se(), { cashflow: n } = L(), { income: t, isDataLoaded: a, upcomingExpenses: f, upcomingIncome: u } = U(), { selectedAccountGuids: c } = q(), { dateRange: l, selectedCashAccounts: b } = Q(), [r, g] = h.useState(!1), d = h.useMemo(
646
+ ), Re = (i, o) => (t) => t.accountGuid && i.includes(t.accountGuid) && (Fe(t.expectedDate) || Ge(t.expectedDate, o.start)) && Me(t.expectedDate, o.end), kt = () => {
647
+ const { availableWidth: i } = ae(), { cashflow: o } = k(), { income: t, isDataLoaded: r, upcomingExpenses: f, upcomingIncome: p } = j(), { selectedAccountGuids: c } = P(), { dateRange: l, selectedCashAccounts: b } = q(), [a, g] = h.useState(!1), d = h.useMemo(
649
648
  () => f.filter(Re(c, l)),
650
649
  [l, c, f]
651
650
  ), x = h.useMemo(
652
- () => u.filter(Re(c, l)),
653
- [l, c, u]
651
+ () => p.filter(Re(c, l)),
652
+ [l, c, p]
654
653
  ), _ = h.useMemo(
655
654
  () => b.reduce((C, S) => C + (S?.balance || 0), 0),
656
655
  [b]
657
- ), w = d.reduce((C, S) => C + S.amount, 0), T = x.reduce((C, S) => C + S.amount, 0), I = _ - w + T, N = a && t.length > 0, p = i < 725;
658
- return /* @__PURE__ */ o(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
659
- /* @__PURE__ */ o(
656
+ ), w = d.reduce((C, S) => C + S.amount, 0), R = x.reduce((C, S) => C + S.amount, 0), D = _ - w + R, L = r && t.length > 0, u = i < 725;
657
+ return /* @__PURE__ */ n(s, { sx: { mx: u ? 16 : 0, my: u ? 24 : 42 }, children: [
658
+ /* @__PURE__ */ n(
660
659
  s,
661
660
  {
662
- border: p ? "1px solid" : "none",
661
+ border: u ? "1px solid" : "none",
663
662
  borderColor: "neutral.light",
664
663
  borderRadius: 2,
665
- flexDirection: p ? "column" : "row",
666
- gap: p ? 0 : 24,
664
+ flexDirection: u ? "column" : "row",
665
+ gap: u ? 0 : 24,
667
666
  justifyContent: "center",
668
667
  children: [
669
668
  /* @__PURE__ */ e(
670
- ie,
669
+ ne,
671
670
  {
672
671
  amount: _,
673
- isMobile: p,
674
- label: $(n.cash_and_bank, b.length)
672
+ isMobile: u,
673
+ label: H(o.cash_and_bank, b.length)
675
674
  }
676
675
  ),
677
- p && /* @__PURE__ */ e(v, {}),
678
- N ? /* @__PURE__ */ o(B, { children: [
679
- !p && /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
676
+ u && /* @__PURE__ */ e(v, {}),
677
+ L ? /* @__PURE__ */ n($, { children: [
678
+ !u && /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
680
679
  /* @__PURE__ */ e(
681
- ie,
680
+ ne,
682
681
  {
683
- amount: T,
684
- isMobile: p,
685
- label: n.to_be_received,
686
- symbol: p ? "+" : void 0
682
+ amount: R,
683
+ isMobile: u,
684
+ label: o.to_be_received,
685
+ symbol: u ? "+" : void 0
687
686
  }
688
687
  )
689
688
  ] }) : /* @__PURE__ */ e(
690
- G,
689
+ W,
691
690
  {
692
691
  onClick: () => g(!0),
693
- startIcon: /* @__PURE__ */ e(M, { name: "add" }),
692
+ startIcon: /* @__PURE__ */ e(z, { name: "add" }),
694
693
  sx: { fontSize: 13 },
695
- children: n.add_income
694
+ children: o.add_income
696
695
  }
697
696
  ),
698
- p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
697
+ u ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
699
698
  /* @__PURE__ */ e(
700
- ie,
699
+ ne,
701
700
  {
702
701
  amount: w,
703
- isMobile: p,
704
- label: $(n.to_be_paid_out, d.length),
705
- symbol: p ? "-" : void 0
702
+ isMobile: u,
703
+ label: H(o.to_be_paid_out, d.length),
704
+ symbol: u ? "-" : void 0
706
705
  }
707
706
  ),
708
- p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
707
+ u ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
709
708
  /* @__PURE__ */ e(
710
- ie,
709
+ ne,
711
710
  {
712
- amount: I,
713
- isMobile: p,
714
- isTotal: p,
715
- label: n.remaining_cash,
711
+ amount: D,
712
+ isMobile: u,
713
+ isTotal: u,
714
+ label: o.remaining_cash,
716
715
  tooltip: /* @__PURE__ */ e(
717
716
  pe,
718
717
  {
719
- body: n.remaining_income_tooltip_body,
720
- title: n.remaining_income_tooltip_title
718
+ body: o.remaining_income_tooltip_body,
719
+ title: o.remaining_income_tooltip_title
721
720
  }
722
721
  )
723
722
  }
@@ -726,53 +725,53 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
726
725
  }
727
726
  ),
728
727
  /* @__PURE__ */ e(
729
- Ge,
728
+ He,
730
729
  {
731
- ariaLabelClose: n.close_manage_income_aria,
732
- isOpen: r,
730
+ ariaLabelClose: o.close_manage_income_aria,
731
+ isOpen: a,
733
732
  onClose: () => g(!1),
734
733
  shouldShowHeaderBorders: !1,
735
- title: n.manage_income,
736
- children: /* @__PURE__ */ e(st, {})
734
+ title: o.manage_income,
735
+ children: /* @__PURE__ */ e(rt, {})
737
736
  }
738
737
  )
739
738
  ] });
740
- }, Ot = E(kt), Ft = ({ onBackClick: i, onMenuClick: n, sx: t = {} }) => {
741
- const { selectedAccounts: a, selectedAccountGuids: f, shouldDisableNextDate: u, shouldDisablePrevDate: c } = q(), { onEvent: l } = ke(), { clientConfig: b } = Ke(), { visibleCashAccounts: r } = Ne(), { setFilter: g } = Oe(), { dateRange: d, setSelectedCashAccounts: x } = Q(), { loadRepeatingTransactionData: _, isDataLoaded: w, setDateRange: T } = U(), { cashflow: I, recurring: N } = L(), { isInitialized: p } = q(), S = b?.master?.deep_link_params?.view === "manage_income", [ce, K] = h.useState(S);
739
+ }, Lt = A(kt), Nt = ({ onBackClick: i, onMenuClick: o, sx: t = {} }) => {
740
+ const { selectedAccounts: r, selectedAccountGuids: f, shouldDisableNextDate: p, shouldDisablePrevDate: c } = P(), { onEvent: l } = Le(), { clientConfig: b } = Ve(), { visibleCashAccounts: a } = ke(), { setFilter: g } = Ne(), { dateRange: d, setSelectedCashAccounts: x } = q(), { loadRepeatingTransactionData: _, isDataLoaded: w, setDateRange: R } = j(), { cashflow: D, recurring: L } = k(), { isInitialized: u } = P(), S = b?.master?.deep_link_params?.view === "manage_income", [re, K] = h.useState(S);
742
741
  return h.useEffect(() => {
743
- T(d), w || _().finally();
742
+ R(d), w || _().finally();
744
743
  }, []), h.useEffect(() => {
745
- const le = r.map((F) => F.guid), P = a.filter(
746
- (F) => f.includes(F.guid) && le.includes(F.guid)
744
+ const se = a.map((G) => G.guid), B = r.filter(
745
+ (G) => f.includes(G.guid) && se.includes(G.guid)
747
746
  );
748
- x(P), g({
749
- dateRange: { start: Me(W(), 90), end: mt() },
750
- accounts: P.map((F) => F.guid)
747
+ x(B), g({
748
+ dateRange: { start: We(F(), 90), end: dt() },
749
+ accounts: B.map((G) => G.guid)
751
750
  });
752
- }, [r, a]), Fe({
751
+ }, [a, r]), Oe({
753
752
  widgetName: "CashflowWidget",
754
753
  isLoaded: w
755
- }), p ? /* @__PURE__ */ o(
756
- ut,
754
+ }), u ? /* @__PURE__ */ n(
755
+ mt,
757
756
  {
758
757
  actions: [
759
758
  {
760
- label: N.action_title,
759
+ label: L.action_title,
761
760
  iconName: "credit_card_gear",
762
761
  onClick: () => {
763
- K(!0), l(Ie.CASH_FLOW_CLICK_SETTINGS);
762
+ K(!0), l(Se.CASH_FLOW_CLICK_SETTINGS);
764
763
  }
765
764
  }
766
765
  ],
767
766
  allowedAccountTypes: [
768
- J.CASH,
769
- J.CHECKING,
770
- J.PREPAID,
771
- J.SAVINGS,
772
- J.CHECKING_LINE_OF_CREDIT
767
+ X.CASH,
768
+ X.CHECKING,
769
+ X.PREPAID,
770
+ X.SAVINGS,
771
+ X.CHECKING_LINE_OF_CREDIT
773
772
  ],
774
773
  calendarActions: {
775
- shouldDisableNext: u,
774
+ shouldDisableNext: p,
776
775
  shouldDisablePrevious: c,
777
776
  shouldDisablePicker: !0,
778
777
  onRangeChanged: () => {
@@ -781,280 +780,280 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
781
780
  dateRange: d,
782
781
  dateRangeVariant: "readonly",
783
782
  hasDivider: !0,
784
- onAccountsFilterClick: () => l(Ie.CASH_FLOW_CLICK_FILTER),
783
+ onAccountsFilterClick: () => l(Se.CASH_FLOW_CLICK_FILTER),
785
784
  onBackClick: i,
786
- onMenuClick: n,
785
+ onMenuClick: o,
787
786
  sx: t,
788
- title: I.title,
787
+ title: D.title,
789
788
  children: [
790
- /* @__PURE__ */ e(Ot, {}),
791
- /* @__PURE__ */ e(Nt, {}),
789
+ /* @__PURE__ */ e(Lt, {}),
790
+ /* @__PURE__ */ e(Et, {}),
792
791
  /* @__PURE__ */ e(
793
- Ge,
792
+ He,
794
793
  {
795
- ariaLabelClose: I.close_settings_aria,
796
- isOpen: ce,
794
+ ariaLabelClose: D.close_settings_aria,
795
+ isOpen: re,
797
796
  onClose: () => K(!1),
798
797
  shouldShowHeaderBorders: !1,
799
- title: N.action_title,
800
- children: /* @__PURE__ */ e(et, { defaultSelectedTab: S ? 1 : 0 })
798
+ title: L.action_title,
799
+ children: /* @__PURE__ */ e(Ze, { defaultSelectedTab: S ? 1 : 0 })
801
800
  }
802
801
  )
803
802
  ]
804
803
  }
805
- ) : /* @__PURE__ */ e(te, {});
806
- }, zn = E(Ft), Ht = ({ handleNextStep: i }) => {
807
- const { completeOnboarding: n } = ue(), { cashflow: t } = L(), a = re();
808
- return /* @__PURE__ */ o(s, { children: [
809
- /* @__PURE__ */ e(me, { pb: 12, variant: "h1", children: t.welcome_title }),
804
+ ) : /* @__PURE__ */ e(Z, {});
805
+ }, Wn = A(Nt), Ot = ({ handleNextStep: i }) => {
806
+ const { completeOnboarding: o } = me(), { cashflow: t } = k(), r = ie();
807
+ return /* @__PURE__ */ n(s, { children: [
808
+ /* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: t.welcome_title }),
810
809
  /* @__PURE__ */ e(
811
- Ye,
810
+ qe,
812
811
  {
813
- color: a.palette.primary.light,
812
+ color: r.palette.primary.light,
814
813
  pb: 8,
815
814
  sx: { wordBreak: "break-word", whiteSpace: "initial" },
816
815
  children: t.welcome_sub_title
817
816
  }
818
817
  ),
819
- /* @__PURE__ */ e(k, { pb: 32, children: t.welcome_description }),
820
- /* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
821
- /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
818
+ /* @__PURE__ */ e(N, { pb: 32, children: t.welcome_description }),
819
+ /* @__PURE__ */ n(s, { direction: "column", mb: 32, spacing: 32, children: [
820
+ /* @__PURE__ */ n(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
822
821
  /* @__PURE__ */ e(
823
- D,
822
+ I,
824
823
  {
825
- bgcolor: a.palette.primary.lighter,
824
+ bgcolor: r.palette.primary.lighter,
826
825
  borderRadius: 1,
827
826
  component: "span",
828
827
  height: 44,
829
828
  mr: 24,
830
829
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
831
830
  width: 44,
832
- children: /* @__PURE__ */ e(M, { color: "primary", name: "currency_exchange" })
831
+ children: /* @__PURE__ */ e(z, { color: "primary", name: "currency_exchange" })
833
832
  }
834
833
  ),
835
834
  t.bullet_one
836
835
  ] }),
837
- /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
836
+ /* @__PURE__ */ n(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
838
837
  /* @__PURE__ */ e(
839
- D,
838
+ I,
840
839
  {
841
- bgcolor: a.palette.primary.lighter,
840
+ bgcolor: r.palette.primary.lighter,
842
841
  borderRadius: 1,
843
842
  component: "span",
844
843
  height: 44,
845
844
  mr: 24,
846
845
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
847
846
  width: 44,
848
- children: /* @__PURE__ */ e(M, { color: "primary", name: "cardiology" })
847
+ children: /* @__PURE__ */ e(z, { color: "primary", name: "cardiology" })
849
848
  }
850
849
  ),
851
850
  t.bullet_two
852
851
  ] }),
853
- /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
852
+ /* @__PURE__ */ n(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
854
853
  /* @__PURE__ */ e(
855
- D,
854
+ I,
856
855
  {
857
- bgcolor: a.palette.primary.lighter,
856
+ bgcolor: r.palette.primary.lighter,
858
857
  borderRadius: 1,
859
858
  component: "span",
860
859
  height: 44,
861
860
  mr: 24,
862
861
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
863
862
  width: 44,
864
- children: /* @__PURE__ */ e(M, { color: "primary", name: "flare" })
863
+ children: /* @__PURE__ */ e(z, { color: "primary", name: "flare" })
865
864
  }
866
865
  ),
867
866
  t.bullet_three
868
867
  ] })
869
868
  ] }),
870
- /* @__PURE__ */ o(s, { direction: "row", spacing: 16, children: [
871
- /* @__PURE__ */ e(G, { onClick: i, variant: "contained", children: t.get_started_button }),
872
- /* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
869
+ /* @__PURE__ */ n(s, { direction: "row", spacing: 16, children: [
870
+ /* @__PURE__ */ e(W, { onClick: i, variant: "contained", children: t.get_started_button }),
871
+ /* @__PURE__ */ e(W, { onClick: o, variant: "outlined", children: t.skip_button })
873
872
  ] })
874
873
  ] });
875
- }, Wt = E(Ht), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", je = {
876
- CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
877
- CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
878
- }, $t = () => {
879
- const { cashflow: i } = L();
880
- return /* @__PURE__ */ o(h.Fragment, { children: [
881
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: je.CASHFLOW_LOADING_ANIMATION }) }),
882
- /* @__PURE__ */ e(me, { pb: 12, variant: "h1", children: i.loading_title }),
883
- /* @__PURE__ */ e(k, { children: i.loading_description })
874
+ }, Gt = A(Ot), Ee = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", ze = {
875
+ CASHFLOW_ONBOARDING: `${Ee}/cashflow-onboarding.png`,
876
+ CASHFLOW_LOADING_ANIMATION: `${Ee}/loading-animation.gif`
877
+ }, Mt = () => {
878
+ const { cashflow: i } = k();
879
+ return /* @__PURE__ */ n(h.Fragment, { children: [
880
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: ze.CASHFLOW_LOADING_ANIMATION }) }),
881
+ /* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: i.loading_title }),
882
+ /* @__PURE__ */ e(N, { children: i.loading_description })
884
883
  ] });
885
- }, Gt = E($t), Mt = at`
884
+ }, Ft = A(Mt), Ht = it`
886
885
  from {
887
886
  transform: rotate(0deg);
888
887
  }
889
888
  to {
890
889
  transform: rotate(360deg);
891
890
  }
892
- `, jt = () => {
893
- const { addRepeatingTransaction: i, repeatingTransactions: n } = U(), { cashflow: t, common: a } = L(), { user: f } = Xe(), { completeOnboarding: u } = ue(), { isDirty: c } = Q(), { isMobile: l } = he(), { isCopyLoaded: b, setDisplayedDate: r } = q(), { filter: g, setFilter: d, transactions: x } = Oe(), _ = re(), [w, T] = X(!0), [I, N] = h.useState(xt.EveryMonth), [p, C] = h.useState(1), [S, ce] = h.useState(15), [K, le] = X(!1), [P, F] = X(1), [O, ze] = X([]), [ge, de] = X(""), H = h.useMemo(
894
- () => x.find((y) => y.guid === ge),
895
- [ge, x]
896
- ), Be = !!n.filter(
897
- (y) => y.repeating_transaction_type === Ae.Income
898
- ).length, be = async () => {
899
- F(2), r(
891
+ `, Wt = () => {
892
+ const { addRepeatingTransaction: i, repeatingTransactions: o } = j(), { cashflow: t, common: r } = k(), { user: f } = Xe(), { completeOnboarding: p } = me(), { isDirty: c } = q(), { isMobile: l } = ue(), { isCopyLoaded: b, setDisplayedDate: a } = P(), { filter: g, setFilter: d, transactions: x } = Ne(), _ = ie(), [w, R] = V(!0), [D, L] = h.useState(bt.EveryMonth), [u, C] = h.useState(1), [S, re] = h.useState(15), [K, se] = V(!1), [B, G] = V(1), [O, $e] = V([]), [fe, ce] = V(""), M = h.useMemo(
893
+ () => x.find((y) => y.guid === fe),
894
+ [fe, x]
895
+ ), je = !!o.filter(
896
+ (y) => y.repeating_transaction_type === ve.Income
897
+ ).length, ge = async () => {
898
+ G(2), a(
900
899
  // Beginning of the month, 90 days before today
901
- ht(Me(W(), 90)),
902
- W()
903
- ), d({ ...g, custom: Se }), F(3);
904
- }, Ue = async () => {
900
+ ut(We(F(), 90)),
901
+ F()
902
+ ), d({ ...g, custom: we }), G(3);
903
+ }, Be = async () => {
905
904
  if (!(O.length < 1)) {
906
- le(!0);
905
+ se(!0);
907
906
  for (let y = 0; y < O.length; y++) {
908
- const A = O[y], xe = ve(I, De(A.date)), qe = {
909
- account_guid: A.account_guid,
910
- amount: A.amount,
907
+ const T = O[y], be = Ie(D, De(T.date)), Ue = {
908
+ account_guid: T.account_guid,
909
+ amount: T.amount,
911
910
  created_by: 0,
912
911
  //user
913
- merchant_guid: A.merchant_guid,
914
- description: A.feed_description || A.description,
915
- predicted_occurs_on: pt(xe, { representation: "date" }),
916
- recurrence_day: xe.getDay(),
917
- recurrence_type: I,
918
- repeating_transaction_type: Ae.Income,
912
+ merchant_guid: T.merchant_guid,
913
+ description: T.feed_description || T.description,
914
+ predicted_occurs_on: pt(be, { representation: "date" }),
915
+ recurrence_day: be.getDay(),
916
+ recurrence_type: D,
917
+ repeating_transaction_type: ve.Income,
919
918
  second_recurrence_day: S,
920
- transaction_type: A.transaction_type,
919
+ transaction_type: T.transaction_type,
921
920
  user_guid: f.guid
922
921
  };
923
- await i(qe, A);
922
+ await i(Ue, T);
924
923
  }
925
- await u();
924
+ await p();
926
925
  }
927
- }, Pe = !H && w || !H && O.length < 1;
928
- return b ? /* @__PURE__ */ o(
929
- D,
926
+ }, Pe = !M && w || !M && O.length < 1;
927
+ return b ? /* @__PURE__ */ n(
928
+ I,
930
929
  {
931
930
  sx: {
932
931
  display: "flex",
933
932
  alignItems: l ? "flex-start" : "center",
934
933
  backgroundColor: _.palette.background.paper,
935
- backgroundImage: l ? null : `url(${je.CASHFLOW_ONBOARDING})`,
934
+ backgroundImage: l ? null : `url(${ze.CASHFLOW_ONBOARDING})`,
936
935
  backgroundRepeat: "no-repeat",
937
936
  backgroundPosition: "left 100px",
938
937
  backgroundSize: "35%",
939
938
  py: 24
940
939
  },
941
940
  children: [
942
- P === 1 && /* @__PURE__ */ e(
943
- D,
941
+ B === 1 && /* @__PURE__ */ e(
942
+ I,
944
943
  {
945
944
  sx: {
946
945
  ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
947
946
  },
948
- children: /* @__PURE__ */ e(Wt, { handleNextStep: be })
947
+ children: /* @__PURE__ */ e(Gt, { handleNextStep: ge })
949
948
  }
950
949
  ),
951
- P === 2 && /* @__PURE__ */ e(
952
- D,
950
+ B === 2 && /* @__PURE__ */ e(
951
+ I,
953
952
  {
954
953
  sx: {
955
954
  ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
956
955
  },
957
- children: /* @__PURE__ */ e(Gt, {})
956
+ children: /* @__PURE__ */ e(Ft, {})
958
957
  }
959
958
  ),
960
- P === 3 && /* @__PURE__ */ o(
961
- D,
959
+ B === 3 && /* @__PURE__ */ n(
960
+ I,
962
961
  {
963
962
  sx: {
964
963
  ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
965
964
  },
966
965
  children: [
967
- /* @__PURE__ */ e(me, { pb: 12, variant: "h1", children: t.add_income_title }),
968
- /* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
969
- O.length > 0 && !H && /* @__PURE__ */ o(B, { children: [
970
- /* @__PURE__ */ e(ee, { children: O.map((y, A) => /* @__PURE__ */ o(h.Fragment, { children: [
971
- /* @__PURE__ */ e(ft, { bgcolor: "background.paper", children: bt(
972
- z(y.nextDate || y.date)
966
+ /* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: t.add_income_title }),
967
+ /* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
968
+ O.length > 0 && !M && /* @__PURE__ */ n($, { children: [
969
+ /* @__PURE__ */ e(Q, { children: O.map((y, T) => /* @__PURE__ */ n(h.Fragment, { children: [
970
+ /* @__PURE__ */ e(ht, { bgcolor: "background.paper", children: gt(
971
+ le(y.nextDate || y.date)
973
972
  ) }),
974
- /* @__PURE__ */ e(gt, { transaction: y }),
975
- A !== O.length - 1 && /* @__PURE__ */ e(v, {})
973
+ /* @__PURE__ */ e(ft, { transaction: y }),
974
+ T !== O.length - 1 && /* @__PURE__ */ e(v, {})
976
975
  ] }, y.guid)) }),
977
- /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
976
+ /* @__PURE__ */ n(s, { alignItems: "center", direction: "row", children: [
978
977
  /* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
979
978
  /* @__PURE__ */ e(
980
- G,
979
+ W,
981
980
  {
982
- onClick: () => T(!0),
983
- startIcon: /* @__PURE__ */ e(M, { name: "add", size: 20 }),
981
+ onClick: () => R(!0),
982
+ startIcon: /* @__PURE__ */ e(z, { name: "add", size: 20 }),
984
983
  children: t.add_income
985
984
  }
986
985
  )
987
986
  ] })
988
987
  ] }),
989
988
  Pe && /* @__PURE__ */ e(
990
- ct,
989
+ st,
991
990
  {
992
991
  bgcolor: "background.paper",
993
992
  onSearch: (y) => d({
994
993
  ...g,
995
- custom: (A) => y ? lt(A, y) : Se(A)
994
+ custom: (T) => y ? ct(T, y) : we(T)
996
995
  }),
997
996
  onSelected: (y) => {
998
- de(y), T(!1);
997
+ ce(y), R(!1);
999
998
  }
1000
999
  }
1001
1000
  ),
1002
- !Be && c && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
1003
- H && /* @__PURE__ */ o(B, { children: [
1001
+ !je && c && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
1002
+ M && /* @__PURE__ */ n($, { children: [
1004
1003
  /* @__PURE__ */ e(
1005
- dt,
1004
+ lt,
1006
1005
  {
1007
1006
  bgcolor: "background.paper",
1008
- firstDay: p,
1009
- frequency: I,
1007
+ firstDay: u,
1008
+ frequency: D,
1010
1009
  onFirstDayChange: C,
1011
- onFrequencyChange: N,
1012
- onSecondDayChange: ce,
1010
+ onFrequencyChange: L,
1011
+ onSecondDayChange: re,
1013
1012
  secondDay: S,
1014
- transaction: H
1013
+ transaction: M
1015
1014
  }
1016
1015
  ),
1017
- /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
1016
+ /* @__PURE__ */ n(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
1018
1017
  /* @__PURE__ */ e(
1019
- G,
1018
+ W,
1020
1019
  {
1021
- "aria-disabled": !H,
1020
+ "aria-disabled": !M,
1022
1021
  onClick: () => {
1023
1022
  const y = [...O];
1024
1023
  y.push({
1025
- ...H,
1026
- nextDate: ve(I, De(H.date)),
1027
- frequency: I
1028
- }), ze(y), de("");
1024
+ ...M,
1025
+ nextDate: Ie(D, De(M.date)),
1026
+ frequency: D
1027
+ }), $e(y), ce("");
1029
1028
  },
1030
1029
  variant: "contained",
1031
- children: a.confirm_button
1030
+ children: r.confirm_button
1032
1031
  }
1033
1032
  ),
1034
1033
  /* @__PURE__ */ e(
1035
- G,
1034
+ W,
1036
1035
  {
1037
1036
  onClick: () => {
1038
- de(""), T(!0), be().finally();
1037
+ ce(""), R(!0), ge().finally();
1039
1038
  },
1040
1039
  variant: "outlined",
1041
- children: a.cancel_button
1040
+ children: r.cancel_button
1042
1041
  }
1043
1042
  )
1044
1043
  ] })
1045
1044
  ] }),
1046
- O.length > 0 && !H && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
1045
+ O.length > 0 && !M && /* @__PURE__ */ n(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
1047
1046
  /* @__PURE__ */ e(
1048
- G,
1047
+ W,
1049
1048
  {
1050
1049
  "aria-disabled": O.length < 1 || K,
1051
- onClick: Ue,
1050
+ onClick: Be,
1052
1051
  startIcon: K ? /* @__PURE__ */ e(
1053
- M,
1052
+ z,
1054
1053
  {
1055
1054
  name: "progress_activity",
1056
1055
  sx: {
1057
- animation: `${Mt} 2s linear infinite`
1056
+ animation: `${Ht} 2s linear infinite`
1058
1057
  }
1059
1058
  }
1060
1059
  ) : null,
@@ -1062,38 +1061,18 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
1062
1061
  children: t.confirm_income_button
1063
1062
  }
1064
1063
  ),
1065
- /* @__PURE__ */ e(G, { onClick: u, variant: "outlined", children: t.skip_button })
1064
+ /* @__PURE__ */ e(W, { onClick: p, variant: "outlined", children: t.skip_button })
1066
1065
  ] })
1067
1066
  ]
1068
1067
  }
1069
1068
  )
1070
1069
  ]
1071
1070
  }
1072
- ) : /* @__PURE__ */ e(te, {});
1073
- }, Bn = E(jt);
1074
- class Un {
1075
- fetchInstance;
1076
- constructor(n, t, a) {
1077
- this.fetchInstance = new yt(n, t, void 0, a);
1078
- }
1079
- addCashflowEvent = async (n) => this.fetchInstance.post(j.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1080
- addCashflowSequence = async (n) => this.fetchInstance.post(j.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
1081
- getCashflowSequences = async () => this.fetchInstance.get(j.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
1082
- getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
1083
- `${j.CASHFLOW_EVENTS}/from/${z(n)}/to/${z(t)}`
1084
- ).then((a) => a.cashflow_events);
1085
- deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${j.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
1086
- getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
1087
- `${j.CASHFLOW_SEQUENCES}/projected_events/from/${z(
1088
- n
1089
- )}/to/${z(t)}`
1090
- ).then((a) => a.cashflow_events);
1091
- updateCashflowSequence = async (n) => this.fetchInstance.put(`${j.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1092
- }
1071
+ ) : /* @__PURE__ */ e(Z, {});
1072
+ }, zn = A(Wt);
1093
1073
  export {
1094
- Un as CashflowApi,
1095
- jn as CashflowMiniWidget,
1096
- Bn as CashflowOnboarding,
1097
- Vn as CashflowStore,
1098
- zn as CashflowWidget
1074
+ Hn as CashflowMiniWidget,
1075
+ zn as CashflowOnboarding,
1076
+ Bn as CashflowStore,
1077
+ Wn as CashflowWidget
1099
1078
  };