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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-BF4QA-Lx.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,91 +1,92 @@
1
- import { jsx as e, jsxs as a, Fragment as P } from "react/jsx-runtime";
2
- import x from "react";
3
- import { observer as C } from "mobx-react-lite";
4
- import { endOfMonth as W } from "date-fns/endOfMonth";
5
- import { endOfToday as X } from "date-fns/endOfToday";
6
- import { startOfMonth as N } from "date-fns/startOfMonth";
7
- import { startOfToday as J } from "date-fns/startOfToday";
8
- import { subDays as Q } from "date-fns/subDays";
9
- import { R as De } from "../RecurringSettings-DAncu--R.mjs";
10
- import { M as vn } from "../RecurringSettings-DAncu--R.mjs";
11
- import { addMonths as We } from "date-fns/addMonths";
12
- import { subMonths as $e } from "date-fns/subMonths";
13
- import { isBefore as Pe } from "date-fns/isBefore";
14
- import q from "@mui/material/Grid";
15
- import ge from "@mui/material/IconButton";
16
- import d from "@mui/material/Stack";
17
- import he from "@mui/material/Tab";
18
- import ze from "@mui/material/Tabs";
19
- import { Cancel as Te, CheckCircle as we, Schedule as Be, MonetizationOn as Fe, ChevronLeft as He, ChevronRight as Ue, CurrencyExchange as je } from "@mxenabled/mx-icons";
20
- import { Text as f, MerchantLogo as ee, InstitutionLogo as Ke, H3 as Ye, P as V } from "@mxenabled/mxui";
21
- import { getWeeksInMonth as fe } from "date-fns/getWeeksInMonth";
22
- import { useTheme as te } from "@mui/material/styles";
23
- import { AdapterDateFns as qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
24
- import { DateCalendar as Ve } from "@mui/x-date-pickers/DateCalendar";
25
- import { LocalizationProvider as Ze } from "@mui/x-date-pickers/LocalizationProvider";
26
- import { isSameDay as Xe } from "date-fns/isSameDay";
27
- import Je from "@mui/material/Badge";
28
- import { PickersDay as Qe } from "@mui/x-date-pickers/PickersDay";
29
- import { I as z } from "../IconBacking-DgT8DCeh.mjs";
30
- import { u as R, b as B, j as _, g as F, q as Se, d as ne, h as re, n as et } from "../hooks-C41HAxM5.mjs";
31
- import { d as M, c as T, g as xe, f as tt } from "../RecurringTransactions-CxcSL1dY.mjs";
32
- import { T as O } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
33
- import { R as An } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
34
- import { A as I, W as nt } from "../WidgetContainer-CDh9fjpR.mjs";
35
- import rt from "@mui/material/Button";
36
- import Z from "@mui/material/Divider";
37
- import be from "@mui/material/List";
38
- import _e from "@mui/material/ListItem";
39
- import it from "@mui/material/ListSubheader";
40
- import ot from "@mui/material/ListItemAvatar";
41
- import at from "@mui/material/ListItemButton";
42
- import st from "@mui/material/ListItemText";
43
- import { b as ct } from "../ManageIncome-8EsStyIQ.mjs";
44
- import { c as Gn, M as Nn, S as On } from "../ManageIncome-8EsStyIQ.mjs";
45
- import { D as ie } from "../Drawer-BF40nbsH.mjs";
46
- import { f as v } from "../NumberFormatting-DjTD0t3W.mjs";
47
- import { b as E } from "../Localization-2MODESHW.mjs";
48
- import { f as L, a as A } from "../Dialog-CDV0kKxj.mjs";
49
- import G from "@mui/material/Box";
50
- import { S as Ie } from "../StatusBar-CPfSXe80.mjs";
51
- import { u as oe } from "../useScreenSize-B5afALev.mjs";
52
- import { S as Me } from "../SkeletonLoader-BaNboJjD.mjs";
53
- import { L as ae } from "../Loader-Ckqi9Rx6.mjs";
54
- import { M as lt } from "../MiniWidgetContainer-CKzf_Ira.mjs";
55
- import { u as dt } from "../useDimensions-27p2evRx.mjs";
56
- import { M as ut } from "../MicroWidgetContainer-BGpNl5ZS.mjs";
57
- const H = {
1
+ import { jsx as e, jsxs as o, Fragment as X } from "react/jsx-runtime";
2
+ import f from "react";
3
+ import { observer as T } from "mobx-react-lite";
4
+ import { endOfMonth as F } from "date-fns/endOfMonth";
5
+ import { endOfToday as de } from "date-fns/endOfToday";
6
+ import { startOfMonth as k } from "date-fns/startOfMonth";
7
+ import { startOfToday as ue } from "date-fns/startOfToday";
8
+ import { subDays as me } from "date-fns/subDays";
9
+ import ae from "@mui/material/Skeleton";
10
+ import l from "@mui/material/Stack";
11
+ import { R as Ne } from "../RecurringSettings-B4ybrS0B.mjs";
12
+ import { M as Gn } from "../RecurringSettings-B4ybrS0B.mjs";
13
+ import { addMonths as Fe } from "date-fns/addMonths";
14
+ import { subMonths as Ue } from "date-fns/subMonths";
15
+ import { isBefore as je } from "date-fns/isBefore";
16
+ import se from "@mui/material/Unstable_Grid2";
17
+ import Se from "@mui/material/IconButton";
18
+ import _e from "@mui/material/Tab";
19
+ import Ke from "@mui/material/Tabs";
20
+ import { Schedule as Ye, MonetizationOn as Ve, Cancel as Ge, CheckCircle as Oe, ChevronLeft as Xe, ChevronRight as qe, CurrencyExchange as Ze } from "@mxenabled/mx-icons";
21
+ import { Text as g, MerchantLogo as pe, InstitutionLogo as Je, H3 as Qe, P as ce } from "@mxenabled/mxui";
22
+ import { getWeeksInMonth as Ie } from "date-fns/getWeeksInMonth";
23
+ import ge from "@mui/material/styles/useTheme";
24
+ import { AdapterDateFns as et } from "@mui/x-date-pickers/AdapterDateFnsV3";
25
+ import { DateCalendar as tt } from "@mui/x-date-pickers/DateCalendar";
26
+ import { LocalizationProvider as nt } from "@mui/x-date-pickers/LocalizationProvider";
27
+ import { isSameDay as it } from "date-fns/isSameDay";
28
+ import rt from "@mui/material/Badge";
29
+ import { PickersDay as ot } from "@mui/x-date-pickers/PickersDay";
30
+ import { I as q } from "../IconBacking-B9oC6uL2.mjs";
31
+ import { u as w, b as Z, j as I, g as J, p as ke, d as he, h as fe } from "../hooks-ZMp65DFz.mjs";
32
+ import { c as v, a as D, g as Me, f as at } from "../RecurringTransactions-BqijW_8S.mjs";
33
+ import { T as H } from "../RecurringTransactionsStore-BhBUVm9a.mjs";
34
+ import { R as kn } from "../RecurringTransactionsStore-BhBUVm9a.mjs";
35
+ import { A as _, W as st } from "../WidgetContainer-CoFDmQRE.mjs";
36
+ import ct from "@mui/material/Button";
37
+ import le from "@mui/material/Divider";
38
+ import ve from "@mui/material/List";
39
+ import We from "@mui/material/ListItem";
40
+ import lt from "@mui/material/ListSubheader";
41
+ import dt from "@mui/material/ListItemAvatar";
42
+ import ut from "@mui/material/ListItemButton";
43
+ import mt from "@mui/material/ListItemText";
44
+ import { b as pt } from "../ManageIncome-CaoQl609.mjs";
45
+ import { c as $n, M as Bn, S as Pn } from "../ManageIncome-CaoQl609.mjs";
46
+ import { f as L } from "../NumberFormatting-DjTD0t3W.mjs";
47
+ import { D as xe } from "../Drawer-By9V-B5L.mjs";
48
+ import { b as G } from "../Localization-2MODESHW.mjs";
49
+ import { f as A, a as E } from "../Dialog-BPTr3qHE.mjs";
50
+ import O from "@mui/material/Box";
51
+ import { S as $e } from "../StatusBar-BK_uYHAB.mjs";
52
+ import { u as ye } from "../useScreenSize-B6JyS_Lj.mjs";
53
+ import { u as be } from "../useWidgetLoadTimer-hIOioiKx.mjs";
54
+ import { L as V } from "../Loader-DUaFpDGv.mjs";
55
+ import { M as gt } from "../MiniWidgetContainer-Bg02sF1Y.mjs";
56
+ import { u as ht } from "../useDimensions-27p2evRx.mjs";
57
+ import { M as ft } from "../MicroWidgetContainer-r6mtxRer.mjs";
58
+ const Q = {
58
59
  gridRow: 1,
59
60
  gridColumn: 1,
60
61
  zIndex: 2
61
- }, U = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, se = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(Be, { color: "primary", filled: !0, sx: { fontSize: n, ...H } }) }), ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(
62
- Fe,
62
+ }, ee = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ye, { color: "primary", filled: !0, sx: { fontSize: n, ...Q } }) }), Re = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(
63
+ Ve,
63
64
  {
64
65
  filled: !0,
65
- sx: { color: "categories.income", fontSize: n, ...H }
66
+ sx: { color: "categories.income", fontSize: n, ...Q }
66
67
  }
67
- ) }), le = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(Te, { color: "error", filled: !0, sx: { fontSize: n, ...H } }) }), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(we, { color: "success", filled: !0, sx: { fontSize: n, ...H } }) }), mt = C(
68
- ({ day: t, outsideCurrentMonth: n, ...r }) => {
69
- const { recurring: i } = R(), { selectedAccountGuids: o } = B(), { recurrences: c, setSelectedDay: u } = _(), s = x.useMemo(
70
- () => c.filter((g) => o.includes(g.accountGuid)),
71
- [o, c]
68
+ ) }), Te = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ge, { color: "error", filled: !0, sx: { fontSize: n, ...Q } }) }), we = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Oe, { color: "success", filled: !0, sx: { fontSize: n, ...Q } }) }), xt = T(
69
+ ({ day: t, outsideCurrentMonth: n, ...i }) => {
70
+ const { recurring: r } = w(), { selectedAccountGuids: a } = Z(), { recurrences: c, setSelectedDay: p } = I(), s = f.useMemo(
71
+ () => c.filter((d) => a.includes(d.accountGuid)),
72
+ [a, c]
72
73
  ).filter(
73
- (g) => Xe(g.occurredOnDate || g.expectedDate, t)
74
- ), l = s.some(
75
- (g) => g.type !== M.Income && g.status === T.Upcoming
74
+ (d) => it(d.occurredOnDate || d.expectedDate, t)
76
75
  ), m = s.some(
77
- (g) => g.type !== M.Income && g.status === T.Missed
78
- ), h = s.some(
79
- (g) => g.type !== M.Income && g.status === T.Paid
80
- ), b = s.some((g) => g.type === M.Income), y = (l ? 1 : 0) + (m ? 1 : 0) + (h ? 1 : 0) + (b ? 1 : 0);
76
+ (d) => d.type !== v.Income && d.status === D.Upcoming
77
+ ), u = s.some(
78
+ (d) => d.type !== v.Income && d.status === D.Missed
79
+ ), x = s.some(
80
+ (d) => d.type !== v.Income && d.status === D.Paid
81
+ ), b = s.some((d) => d.type === v.Income), y = (m ? 1 : 0) + (u ? 1 : 0) + (x ? 1 : 0) + (b ? 1 : 0);
81
82
  return /* @__PURE__ */ e(
82
- Je,
83
+ rt,
83
84
  {
84
- badgeContent: s.length > 0 && /* @__PURE__ */ a(P, { children: [
85
- m && /* @__PURE__ */ e(le, { isOffset: !0 }),
86
- h && /* @__PURE__ */ e(de, { isOffset: !0 }),
87
- l && /* @__PURE__ */ e(se, { isOffset: !0 }),
88
- b && /* @__PURE__ */ e(ce, { isOffset: !0 })
85
+ badgeContent: s.length > 0 && /* @__PURE__ */ o(X, { children: [
86
+ u && /* @__PURE__ */ e(Te, { isOffset: !0 }),
87
+ x && /* @__PURE__ */ e(we, { isOffset: !0 }),
88
+ m && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
89
+ b && /* @__PURE__ */ e(Re, { isOffset: !0 })
89
90
  ] }),
90
91
  overlap: "circular",
91
92
  sx: {
@@ -96,15 +97,15 @@ const H = {
96
97
  }
97
98
  },
98
99
  children: /* @__PURE__ */ e(
99
- Qe,
100
+ ot,
100
101
  {
101
102
  "aria-label": `
102
- ${h && i.paid},
103
- ${m && i.missed},
104
- ${l && i.upcoming},
105
- ${b && i.income}`,
103
+ ${x && r.paid},
104
+ ${u && r.missed},
105
+ ${m && r.upcoming},
106
+ ${b && r.income}`,
106
107
  day: t,
107
- onClick: () => u(t),
108
+ onClick: () => p(t),
108
109
  outsideCurrentMonth: n,
109
110
  sx: {
110
111
  "&.MuiPickersDay-root": {
@@ -113,19 +114,19 @@ const H = {
113
114
  }
114
115
  }
115
116
  },
116
- ...r
117
+ ...i
117
118
  }
118
119
  )
119
120
  }
120
121
  );
121
122
  }
122
- ), $ = ({ icon: t, label: n }) => /* @__PURE__ */ a(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
123
+ ), Y = ({ icon: t, label: n }) => /* @__PURE__ */ o(l, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
123
124
  /* @__PURE__ */ e(t, {}),
124
- /* @__PURE__ */ e(f, { variant: "caption", children: n })
125
- ] }), pt = C(() => {
126
- const { recurring: t } = R();
127
- return /* @__PURE__ */ a(
128
- d,
125
+ /* @__PURE__ */ e(g, { variant: "XSmall", children: n })
126
+ ] }), yt = T(() => {
127
+ const { recurring: t } = w();
128
+ return /* @__PURE__ */ o(
129
+ l,
129
130
  {
130
131
  alignItems: "center",
131
132
  "aria-hidden": !0,
@@ -134,35 +135,35 @@ const H = {
134
135
  justifyContent: "center",
135
136
  mt: 12,
136
137
  children: [
137
- /* @__PURE__ */ e($, { icon: se, label: t.expense }),
138
- /* @__PURE__ */ e($, { icon: ce, label: t.income }),
139
- /* @__PURE__ */ e($, { icon: le, label: t.missed }),
140
- /* @__PURE__ */ e($, { icon: de, label: t.paid })
138
+ /* @__PURE__ */ e(Y, { icon: Ce, label: t.expense }),
139
+ /* @__PURE__ */ e(Y, { icon: Re, label: t.income }),
140
+ /* @__PURE__ */ e(Y, { icon: Te, label: t.missed }),
141
+ /* @__PURE__ */ e(Y, { icon: we, label: t.paid })
141
142
  ]
142
143
  }
143
144
  );
144
- }), ye = 58, ve = C(() => {
145
- const t = te(), { onEvent: n } = F(), { selectedDay: r, setDateRange: i } = _(), [o, c] = x.useState(
146
- fe(/* @__PURE__ */ new Date()) * O + ye
147
- ), u = (m) => {
148
- c(fe(m) * O + ye), i({
149
- start: N(m),
150
- end: W(m)
151
- }), p(m), n(I.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
152
- }, p = (m) => {
153
- m && requestAnimationFrame(() => {
154
- const h = document.getElementById("recurrence-list");
155
- h?.setAttribute("tabindex", "-1"), h?.focus();
145
+ }), Le = 58, Be = T(() => {
146
+ const t = ge(), { onEvent: n } = J(), { selectedDay: i, setDateRange: r } = I(), [a, c] = f.useState(
147
+ Ie(/* @__PURE__ */ new Date()) * H + Le
148
+ ), p = (u) => {
149
+ c(Ie(u) * H + Le), r({
150
+ start: k(u),
151
+ end: F(u)
152
+ }), h(u), n(_.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
153
+ }, h = (u) => {
154
+ u && requestAnimationFrame(() => {
155
+ const x = document.getElementById("recurrence-list");
156
+ x?.setAttribute("tabindex", "-1"), x?.focus();
156
157
  });
157
158
  }, s = /* @__PURE__ */ e(
158
- Ve,
159
+ tt,
159
160
  {
160
- minDate: N(/* @__PURE__ */ new Date()),
161
- onChange: p,
162
- onMonthChange: u,
161
+ minDate: k(/* @__PURE__ */ new Date()),
162
+ onChange: h,
163
+ onMonthChange: p,
163
164
  showDaysOutsideCurrentMonth: !0,
164
165
  slots: {
165
- day: mt
166
+ day: xt
166
167
  },
167
168
  sx: {
168
169
  "& .MuiPickersArrowSwitcher-button": {
@@ -183,19 +184,19 @@ const H = {
183
184
  pr: 8
184
185
  },
185
186
  "& .MuiPickersCalendarHeader-label": {
186
- fontFamily: t.typography.body1.fontFamily,
187
- fontSize: t.typography.body1.fontSize,
187
+ fontFamily: t.typography.Body.fontFamily,
188
+ fontSize: t.typography.Body.fontSize,
188
189
  fontWeight: 600
189
190
  },
190
191
  "& .MuiDayCalendar-slideTransition": {
191
- minHeight: o
192
+ minHeight: a
192
193
  },
193
194
  "&.MuiDateCalendar-root": {
194
- minHeight: o + O
195
+ minHeight: a + H
195
196
  },
196
197
  "& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
197
- height: O,
198
- width: O,
198
+ height: H,
199
+ width: H,
199
200
  margin: 0
200
201
  },
201
202
  "& .MuiDayCalendar-weekDayLabel": {
@@ -203,12 +204,12 @@ const H = {
203
204
  fontSize: t.typography.body2.fontSize
204
205
  }
205
206
  },
206
- value: r,
207
+ value: i,
207
208
  views: ["day"]
208
209
  }
209
210
  );
210
- return /* @__PURE__ */ a(
211
- d,
211
+ return /* @__PURE__ */ o(
212
+ l,
212
213
  {
213
214
  "aria-describedby": "calendar-description",
214
215
  "aria-labelledby": "calendar-label",
@@ -232,103 +233,103 @@ const H = {
232
233
  children: "Calendar filter for recurring transactions list. Filter by month or select specific date."
233
234
  }
234
235
  ),
235
- /* @__PURE__ */ a(Ze, { dateAdapter: qe, children: [
236
- r && s,
237
- !r && s,
238
- /* @__PURE__ */ e(pt, {})
236
+ /* @__PURE__ */ o(nt, { dateAdapter: et, children: [
237
+ i && s,
238
+ !i && s,
239
+ /* @__PURE__ */ e(yt, {})
239
240
  ] })
240
241
  ]
241
242
  }
242
243
  );
243
- }), gt = (t) => {
244
- if (t.type === M.Income)
245
- return /* @__PURE__ */ e(ce, {});
244
+ }), bt = (t) => {
245
+ if (t.type === v.Income)
246
+ return /* @__PURE__ */ e(Re, {});
246
247
  switch (t.status) {
247
- case T.Missed:
248
- return /* @__PURE__ */ e(le, {});
249
- case T.Paid:
250
- return /* @__PURE__ */ e(de, {});
248
+ case D.Missed:
249
+ return /* @__PURE__ */ e(Te, {});
250
+ case D.Paid:
251
+ return /* @__PURE__ */ e(we, {});
251
252
  default:
252
- return /* @__PURE__ */ e(se, {});
253
+ return /* @__PURE__ */ e(Ce, {});
253
254
  }
254
- }, ht = (t, n) => {
255
+ }, Ct = (t, n) => {
255
256
  switch (t.status) {
256
- case T.Paid:
257
- return t.expectedDate ? E(
257
+ case D.Paid:
258
+ return t.expectedDate ? G(
258
259
  n.paid_on,
259
- L(
260
+ A(
260
261
  t.occurredOnDate || t.expectedDate,
261
- A.MONTH_DAY
262
+ E.MONTH_DAY
262
263
  )
263
264
  ) : n.paid;
264
- case T.Missed:
265
- return E(
265
+ case D.Missed:
266
+ return G(
266
267
  n.missed_on,
267
- L(t.expectedDate, A.MONTH_DAY)
268
+ A(t.expectedDate, E.MONTH_DAY)
268
269
  );
269
- case T.Upcoming:
270
- return E(
270
+ case D.Upcoming:
271
+ return G(
271
272
  n.upcoming_on,
272
- L(t.expectedDate, A.MONTH_DAY)
273
+ A(t.expectedDate, E.MONTH_DAY)
273
274
  );
274
275
  default:
275
276
  return n.unknown;
276
277
  }
277
- }, Ce = ({
278
+ }, Ae = ({
278
279
  recurrence: t,
279
280
  isMini: n = !1,
280
- onRecurrenceClick: r = () => {
281
+ onRecurrenceClick: i = () => {
281
282
  },
282
- showOrdinal: i = !1
283
+ showOrdinal: r = !1
283
284
  }) => {
284
- const { recurring: o } = R(), { detailedRepeatingTransactions: c } = _(), [u, p] = x.useState(!1), s = x.useMemo(
285
- () => c.find((D) => D.guid === t.repeatingTransactionGuid),
285
+ const { recurring: a } = w(), { repeatingTransactions: c } = I(), [p, h] = f.useState(!1), s = f.useMemo(
286
+ () => c.find((C) => C.guid === t.repeatingTransactionGuid),
286
287
  [t, c]
287
- ), l = t.type === M.Income, m = t.status === T.Paid, h = t.status === T.Missed, b = t.status === T.Upcoming;
288
- let y = o.paid?.toLowerCase();
289
- return h ? y = o.missed?.toLowerCase() : b && (y = i ? xe(o, s || {}, !0) : xe(o, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
290
- /* @__PURE__ */ a(_e, { disableGutters: !0, disablePadding: !0, children: [
291
- /* @__PURE__ */ a(at, { onClick: () => {
292
- p(!0), r(t);
288
+ ), m = t.type === v.Income, u = t.status === D.Paid, x = t.status === D.Missed, b = t.status === D.Upcoming;
289
+ let y = a.paid?.toLowerCase();
290
+ return x ? y = a.missed?.toLowerCase() : b && (y = r ? Me(a, s || {}, !0) : Me(a, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
291
+ /* @__PURE__ */ o(We, { disableGutters: !0, disablePadding: !0, children: [
292
+ /* @__PURE__ */ o(ut, { onClick: () => {
293
+ h(!0), i(t);
293
294
  }, children: [
294
- /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ e(
295
- ee,
295
+ /* @__PURE__ */ e(dt, { children: /* @__PURE__ */ e(
296
+ pe,
296
297
  {
297
298
  categoryGuid: t.categoryGuid,
298
299
  merchantGuid: t.merchantGuid
299
300
  }
300
301
  ) }),
301
- /* @__PURE__ */ e(st, { children: /* @__PURE__ */ a(
302
- d,
302
+ /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ o(
303
+ l,
303
304
  {
304
305
  direction: "row",
305
306
  gap: 4,
306
307
  sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
307
308
  children: [
308
- /* @__PURE__ */ a(d, { direction: "column", width: "50%", children: [
309
- /* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: t.name }),
310
- /* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
311
- gt(t),
312
- /* @__PURE__ */ e(f, { variant: "caption", children: ht(t, o) })
313
- ] }) : /* @__PURE__ */ a(P, { children: [
309
+ /* @__PURE__ */ o(l, { direction: "column", width: "50%", children: [
310
+ /* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: t.name }),
311
+ /* @__PURE__ */ e(l, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ o(l, { direction: "row", gap: 4, children: [
312
+ bt(t),
313
+ /* @__PURE__ */ e(g, { variant: "caption", children: Ct(t, a) })
314
+ ] }) : /* @__PURE__ */ o(X, { children: [
314
315
  t.institutionGuid && /* @__PURE__ */ e(
315
- Ke,
316
+ Je,
316
317
  {
317
318
  alt: `${t.institutionName} institution logo`,
318
319
  institutionGuid: t.institutionGuid,
319
320
  size: 12
320
321
  }
321
322
  ),
322
- /* @__PURE__ */ e(f, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
323
+ /* @__PURE__ */ e(g, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
323
324
  ] }) })
324
325
  ] }),
325
- /* @__PURE__ */ a(d, { alignItems: "flex-end", width: "100%", children: [
326
- /* @__PURE__ */ a(f, { bold: !0, color: l ? "success.main" : "text.primary", variant: "body1", children: [
327
- l ? "+" : "",
328
- v(t.amount, "0,0.00")
326
+ /* @__PURE__ */ o(l, { alignItems: "flex-end", width: "100%", children: [
327
+ /* @__PURE__ */ o(g, { bold: !0, color: m ? "success.main" : "text.primary", variant: "body1", children: [
328
+ m ? "+" : "",
329
+ L(t.amount, "0,0.00")
329
330
  ] }),
330
- !n && /* @__PURE__ */ a(
331
- d,
331
+ !n && /* @__PURE__ */ o(
332
+ l,
332
333
  {
333
334
  direction: "row",
334
335
  sx: {
@@ -339,9 +340,9 @@ const H = {
339
340
  width: "100%"
340
341
  },
341
342
  children: [
342
- m && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
343
- h && /* @__PURE__ */ e(Te, { color: "error", filled: !0, size: 12 }),
344
- /* @__PURE__ */ e(f, { bold: !0, color: "text.secondary", variant: "caption", children: y })
343
+ u && /* @__PURE__ */ e(Oe, { color: "success", filled: !0, size: 12 }),
344
+ x && /* @__PURE__ */ e(Ge, { color: "error", filled: !0, size: 12 }),
345
+ /* @__PURE__ */ e(g, { bold: !0, color: "text.secondary", variant: "caption", children: y })
345
346
  ]
346
347
  }
347
348
  )
@@ -351,240 +352,240 @@ const H = {
351
352
  ) })
352
353
  ] }),
353
354
  /* @__PURE__ */ e(
354
- ie,
355
+ xe,
355
356
  {
356
- ariaLabelClose: o.close_drawer_aria,
357
- isOpen: u,
358
- onClose: () => p(!1),
359
- title: t.type === M.Income ? o.income_details : o.expense_details,
357
+ ariaLabelClose: a.close_drawer_aria,
358
+ isOpen: p,
359
+ onClose: () => h(!1),
360
+ title: t.type === v.Income ? a.income_details : a.expense_details,
360
361
  children: s && /* @__PURE__ */ e(
361
- ct,
362
+ pt,
362
363
  {
363
- onDeleted: () => p(!1),
364
+ onDeleted: () => h(!1),
364
365
  recurringTransaction: s
365
366
  }
366
367
  )
367
368
  }
368
369
  )
369
370
  ] });
370
- }, k = C(
371
+ }, z = T(
371
372
  ({
372
373
  recurrences: t,
373
374
  isMini: n = !1,
374
- onResetClick: r,
375
- onRecurrenceClick: i,
376
- sx: o = {},
375
+ onResetClick: i,
376
+ onRecurrenceClick: r,
377
+ sx: a = {},
377
378
  title: c
378
379
  }) => {
379
- const { recurring: u } = R(), p = x.useMemo(() => tt(t), [t]);
380
- return /* @__PURE__ */ a(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...o }, "tab-index": -1, children: [
381
- c && /* @__PURE__ */ a(
382
- d,
380
+ const { recurring: p } = w(), h = f.useMemo(() => at(t), [t]);
381
+ return /* @__PURE__ */ o(l, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...a }, "tab-index": -1, children: [
382
+ c && /* @__PURE__ */ o(
383
+ l,
383
384
  {
384
385
  sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
385
386
  children: [
386
- /* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: c }),
387
- r && /* @__PURE__ */ e(rt, { onClick: r, variant: "text", children: u.reset })
387
+ /* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: c }),
388
+ i && /* @__PURE__ */ e(ct, { onClick: i, variant: "text", children: p.reset })
388
389
  ]
389
390
  }
390
391
  ),
391
- t.length === 0 ? /* @__PURE__ */ e(f, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: u.no_activities }) : /* @__PURE__ */ e(be, { children: n ? t.map((s, l) => /* @__PURE__ */ a(x.Fragment, { children: [
392
+ t.length === 0 ? /* @__PURE__ */ e(g, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: p.no_activities }) : /* @__PURE__ */ e(ve, { children: n ? t.map((s, m) => /* @__PURE__ */ o(f.Fragment, { children: [
392
393
  /* @__PURE__ */ e(
393
- Ce,
394
+ Ae,
394
395
  {
395
396
  isMini: n,
396
- onRecurrenceClick: i,
397
+ onRecurrenceClick: r,
397
398
  recurrence: s
398
399
  }
399
400
  ),
400
- /* @__PURE__ */ e(Z, { sx: { mx: 24 } })
401
- ] }, `recurrence-${l}`)) : p.map((s, l) => /* @__PURE__ */ a(x.Fragment, { children: [
402
- /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ e(
403
- be,
401
+ /* @__PURE__ */ e(le, { sx: { mx: 24 } })
402
+ ] }, `recurrence-${m}`)) : h.map((s, m) => /* @__PURE__ */ o(f.Fragment, { children: [
403
+ /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(
404
+ ve,
404
405
  {
405
- subheader: /* @__PURE__ */ e(it, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(f, { bold: !0, variant: "caption", children: L(s.date, A.DAY_OF_WEEK_MONTH_DAY) }) }),
406
+ subheader: /* @__PURE__ */ e(lt, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
406
407
  sx: { width: "100%" },
407
- children: s.recurrences.map((m, h) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
408
- Ce,
408
+ children: s.recurrences.map((u, x) => /* @__PURE__ */ e(f.Fragment, { children: /* @__PURE__ */ e(
409
+ Ae,
409
410
  {
410
411
  isMini: n,
411
- onRecurrenceClick: i,
412
- recurrence: m
412
+ onRecurrenceClick: r,
413
+ recurrence: u
413
414
  }
414
- ) }, `day-recurrence-${h}`))
415
+ ) }, `day-recurrence-${x}`))
415
416
  }
416
417
  ) }, s.id),
417
- /* @__PURE__ */ e(Z, { sx: { mx: 24 } })
418
- ] }, `recurrence-${l}`)) })
418
+ /* @__PURE__ */ e(le, { sx: { mx: 24 } })
419
+ ] }, `recurrence-${m}`)) })
419
420
  ] });
420
421
  }
421
- ), Re = C(
422
- ({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total: c, upcoming: u }) => {
423
- const p = te(), { isSmallMobile: s } = oe(), { recurring: l } = R(), m = x.useMemo(() => {
424
- const h = [{ color: p.palette.success.main, percentage: `${i / t}` }];
425
- return r && h.push({ color: p.palette.error.main, percentage: `${r / t}` }), h;
426
- }, [i, t, r]);
427
- return /* @__PURE__ */ a(d, { children: [
428
- /* @__PURE__ */ a(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
429
- /* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: `${o} (${c})` }),
430
- /* @__PURE__ */ e(f, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${v(t, "0,0.00")}` })
422
+ ), Ee = T(
423
+ ({ expected: t, isExpense: n = !0, missed: i, paid: r, title: a, total: c, upcoming: p }) => {
424
+ const h = ge(), { isSmallMobile: s } = ye(), { recurring: m } = w(), u = f.useMemo(() => {
425
+ const x = [{ color: h.palette.success.main, percentage: `${r / t}` }];
426
+ return i && x.push({ color: h.palette.error.main, percentage: `${i / t}` }), x;
427
+ }, [r, t, i]);
428
+ return /* @__PURE__ */ o(l, { children: [
429
+ /* @__PURE__ */ o(l, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
430
+ /* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: `${a} (${c})` }),
431
+ /* @__PURE__ */ e(g, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
431
432
  ] }),
432
- /* @__PURE__ */ e(Ie, { data: m, height: 12 }),
433
- /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
434
- /* @__PURE__ */ e(G, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
435
- !s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(i, "0,0.00") }),
436
- /* @__PURE__ */ e(f, { variant: "caption", children: l.paid?.toLowerCase() }),
437
- r !== void 0 && /* @__PURE__ */ a(P, { children: [
438
- /* @__PURE__ */ e(G, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
439
- !s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(r, "0,0.00") }),
440
- /* @__PURE__ */ e(f, { variant: "caption", children: l.missed?.toLowerCase() })
433
+ /* @__PURE__ */ e($e, { data: u, height: 12 }),
434
+ /* @__PURE__ */ o(l, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
435
+ /* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
436
+ !s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
437
+ /* @__PURE__ */ e(g, { variant: "caption", children: m.paid?.toLowerCase() }),
438
+ i !== void 0 && /* @__PURE__ */ o(X, { children: [
439
+ /* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
440
+ !s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
441
+ /* @__PURE__ */ e(g, { variant: "caption", children: m.missed?.toLowerCase() })
441
442
  ] }),
442
- /* @__PURE__ */ e(G, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
443
- !s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(u, "0,0.00") }),
444
- /* @__PURE__ */ e(f, { variant: "caption", children: l.upcoming })
443
+ /* @__PURE__ */ e(O, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
444
+ !s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(p, "0,0.00") }),
445
+ /* @__PURE__ */ e(g, { variant: "caption", children: m.upcoming })
445
446
  ] })
446
447
  ] });
447
448
  }
448
- ), ft = C(() => {
449
- const { recurring: t } = R(), { availableWidth: n } = Se(), { isDesktop: r, isSmallMobile: i, isMobile: o } = oe(n), { onEvent: c } = F(), {
450
- currentMonthExpenses: u,
451
- currentMonthIncome: p,
449
+ ), Rt = T(() => {
450
+ const { recurring: t } = w(), { availableWidth: n } = ke(), { isDesktop: i, isSmallMobile: r, isMobile: a } = ye(n), { onEvent: c } = J(), {
451
+ currentMonthExpenses: p,
452
+ currentMonthIncome: h,
452
453
  dateRange: s,
453
- expenseTotal: l,
454
- incomeTotal: m,
455
- missedExpenseTotal: h,
454
+ expenseTotal: m,
455
+ incomeTotal: u,
456
+ missedExpenseTotal: x,
456
457
  pastRecurrences: b,
457
458
  paidExpenseTotal: y,
458
- paidIncomeTotal: g,
459
- selectedDay: D,
460
- selectedDayRecurrences: j,
461
- setDateRange: S,
462
- upcomingExpenseTotal: K,
463
- upcomingIncomeTotal: Le,
464
- upcomingRecurrences: ue
465
- } = _(), [Y, Ae] = x.useState(0), Ee = Pe(s.start, /* @__PURE__ */ new Date()), Ge = (w, ke) => {
466
- Ae(ke);
467
- }, me = (w) => {
468
- c(I.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
469
- transaction_guid: w.transaction?.guid
459
+ paidIncomeTotal: d,
460
+ selectedDay: C,
461
+ selectedDayRecurrences: W,
462
+ setDateRange: U,
463
+ upcomingExpenseTotal: te,
464
+ upcomingIncomeTotal: ne,
465
+ upcomingRecurrences: $
466
+ } = I(), [B, S] = f.useState(0), ie = je(s.start, /* @__PURE__ */ new Date()), M = (R, oe) => {
467
+ S(oe);
468
+ }, j = (R) => {
469
+ c(_.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
470
+ transaction_guid: R.transaction?.guid
470
471
  });
471
- }, pe = (w) => {
472
- c(I.RECURRING_TRANSACTIONS_CLICK_PAID, {
473
- transaction_guid: w.transaction?.guid
472
+ }, K = (R) => {
473
+ c(_.RECURRING_TRANSACTIONS_CLICK_PAID, {
474
+ transaction_guid: R.transaction?.guid
474
475
  });
475
- }, Ne = () => {
476
- const w = We(s.start, 1);
477
- S({
478
- start: N(w),
479
- end: W(w)
476
+ }, P = () => {
477
+ const R = Fe(s.start, 1);
478
+ U({
479
+ start: k(R),
480
+ end: F(R)
480
481
  });
481
- }, Oe = () => {
482
- const w = $e(s.start, 1);
483
- S({
484
- start: N(w),
485
- end: W(w)
482
+ }, re = () => {
483
+ const R = Ue(s.start, 1);
484
+ U({
485
+ start: k(R),
486
+ end: F(R)
486
487
  });
487
488
  };
488
- return /* @__PURE__ */ a(
489
- q,
489
+ return /* @__PURE__ */ o(
490
+ se,
490
491
  {
491
492
  container: !0,
492
493
  sx: {
493
494
  pt: 16
494
495
  },
495
496
  children: [
496
- /* @__PURE__ */ a(q, { size: { md: "grow", sm: 12 }, width: "100%", children: [
497
- /* @__PURE__ */ a(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
498
- /* @__PURE__ */ a(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
499
- /* @__PURE__ */ e(Ye, { children: E(
497
+ /* @__PURE__ */ o(se, { md: !0, sm: 12, width: "100%", children: [
498
+ /* @__PURE__ */ o(l, { sx: { gap: 16, px: i ? 48 : 24 }, children: [
499
+ /* @__PURE__ */ o(l, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
500
+ /* @__PURE__ */ e(Qe, { children: G(
500
501
  t.header_title,
501
- L(s.start, A.MONTH_LONG)
502
+ A(s.start, E.MONTH_LONG)
502
503
  ) }),
503
- !r && /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
504
+ !i && /* @__PURE__ */ o(l, { direction: "row", gap: 4, children: [
504
505
  /* @__PURE__ */ e(
505
- ge,
506
+ Se,
506
507
  {
507
508
  color: "primary",
508
- disabled: Ee,
509
- onClick: Oe,
510
- children: /* @__PURE__ */ e(He, {})
509
+ disabled: ie,
510
+ onClick: re,
511
+ children: /* @__PURE__ */ e(Xe, {})
511
512
  }
512
513
  ),
513
- /* @__PURE__ */ e(ge, { color: "primary", onClick: Ne, children: /* @__PURE__ */ e(Ue, {}) })
514
+ /* @__PURE__ */ e(Se, { color: "primary", onClick: P, children: /* @__PURE__ */ e(qe, {}) })
514
515
  ] })
515
516
  ] }),
516
517
  /* @__PURE__ */ e(
517
- Re,
518
+ Ee,
518
519
  {
519
- expected: l,
520
- missed: h,
520
+ expected: m,
521
+ missed: x,
521
522
  paid: y,
522
523
  title: t.expenses,
523
- total: u.length,
524
- upcoming: K
524
+ total: p.length,
525
+ upcoming: te
525
526
  }
526
527
  ),
527
528
  /* @__PURE__ */ e(
528
- Re,
529
+ Ee,
529
530
  {
530
- expected: m,
531
+ expected: u,
531
532
  isExpense: !1,
532
- paid: g,
533
+ paid: d,
533
534
  title: t.deposits,
534
- total: p.length,
535
- upcoming: Le
535
+ total: h.length,
536
+ upcoming: ne
536
537
  }
537
538
  ),
538
- r && /* @__PURE__ */ e(
539
- k,
539
+ i && /* @__PURE__ */ e(
540
+ z,
540
541
  {
541
- onRecurrenceClick: me,
542
- recurrences: ue,
542
+ onRecurrenceClick: j,
543
+ recurrences: $,
543
544
  title: t.upcoming_activity
544
545
  }
545
546
  )
546
547
  ] }),
547
- !r && /* @__PURE__ */ a(d, { sx: { px: o ? 0 : 24 }, children: [
548
- /* @__PURE__ */ a(ze, { onChange: Ge, value: Y, variant: "fullWidth", children: [
548
+ !i && /* @__PURE__ */ o(l, { sx: { px: a ? 0 : 24 }, children: [
549
+ /* @__PURE__ */ o(Ke, { onChange: M, value: B, variant: "fullWidth", children: [
549
550
  /* @__PURE__ */ e(
550
- he,
551
+ _e,
551
552
  {
552
- label: /* @__PURE__ */ e(f, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
553
+ label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.upcoming : t.upcoming_activity })
553
554
  }
554
555
  ),
555
556
  /* @__PURE__ */ e(
556
- he,
557
+ _e,
557
558
  {
558
- label: /* @__PURE__ */ e(f, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
559
+ label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.past : t.past_transactions })
559
560
  }
560
561
  )
561
562
  ] }),
562
- Y === 0 && /* @__PURE__ */ e(
563
- k,
563
+ B === 0 && /* @__PURE__ */ e(
564
+ z,
564
565
  {
565
- onRecurrenceClick: me,
566
- recurrences: ue
566
+ onRecurrenceClick: j,
567
+ recurrences: $
567
568
  }
568
569
  ),
569
- Y === 1 && /* @__PURE__ */ e(
570
- k,
570
+ B === 1 && /* @__PURE__ */ e(
571
+ z,
571
572
  {
572
- onRecurrenceClick: pe,
573
+ onRecurrenceClick: K,
573
574
  recurrences: b
574
575
  }
575
576
  )
576
577
  ] })
577
578
  ] }),
578
- r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */ a(d, { gap: 24, children: [
579
- /* @__PURE__ */ e(ve, {}),
579
+ i && /* @__PURE__ */ e(se, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(l, { gap: 24, children: [
580
+ /* @__PURE__ */ e(Be, {}),
580
581
  /* @__PURE__ */ e(
581
- k,
582
+ z,
582
583
  {
583
- onRecurrenceClick: pe,
584
- recurrences: j || b,
585
- title: D ? E(
584
+ onRecurrenceClick: K,
585
+ recurrences: W || b,
586
+ title: C ? G(
586
587
  t.day_transactions,
587
- L(D, A.MONTH_DAY)
588
+ A(C, E.MONTH_DAY)
588
589
  ) : t.past_transactions
589
590
  }
590
591
  )
@@ -592,340 +593,359 @@ const H = {
592
593
  ]
593
594
  }
594
595
  );
595
- }), Tn = C(({ onBackClick: t, sx: n = {} }) => {
596
- const { accounts: r } = ne(), { recurring: i } = R(), { isInitialized: o, selectedAccountGuids: c, setSelectedAccounts: u } = B(), { isDataLoaded: p, loadRepeatingTransactionData: s, setDateRange: l } = _(), { setFilter: m } = re(), { onEvent: h } = F(), { onLoad: b } = et(), { isMobile: y } = oe(), [g, D] = x.useState(!1);
597
- return x.useEffect(() => {
598
- p || s().finally(() => {
599
- b?.("RecurringTransactionsWidget");
600
- });
601
- }, []), x.useEffect(() => {
602
- u(r);
603
- }, [r]), x.useEffect(() => {
604
- m({
605
- dateRange: { start: Q(J(), 90), end: X() },
606
- accounts: c
607
- }), l({ start: N(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) });
608
- }, [c]), o ? /* @__PURE__ */ a(
609
- nt,
596
+ }), Mn = T(({ onBackClick: t, sx: n = {} }) => {
597
+ const { accounts: i } = he(), { recurring: r } = w(), { isCopyLoaded: a, isInitialized: c, selectedAccountGuids: p, setSelectedAccounts: h } = Z(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: u } = I(), { setFilter: x } = fe(), { onEvent: b } = J(), { isMobile: y } = ye(), [d, C] = f.useState(!1);
598
+ return be({
599
+ widgetName: "RecurringTransactionsWidget",
600
+ isLoaded: s
601
+ }), f.useEffect(() => {
602
+ h(i);
603
+ }, [i]), f.useEffect(() => {
604
+ c && (x({
605
+ dateRange: { start: me(ue(), 90), end: de() },
606
+ accounts: p
607
+ }), u({ start: k(/* @__PURE__ */ new Date()), end: F(/* @__PURE__ */ new Date()) }), m().finally());
608
+ }, [c]), a ? /* @__PURE__ */ o(
609
+ st,
610
610
  {
611
- accountOptions: r,
611
+ accountOptions: i,
612
612
  actions: [
613
613
  {
614
- label: i.action_title,
614
+ label: r.action_title,
615
615
  iconName: "credit_card_gear",
616
616
  onClick: () => {
617
- D(!0), h(I.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
617
+ C(!0), b(_.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
618
618
  }
619
619
  }
620
620
  ],
621
621
  hasDivider: y,
622
- onAccountsFilterClick: () => h(I.RECURRING_TRANSACTIONS_CLICK_FILTER),
622
+ onAccountsFilterClick: () => b(_.RECURRING_TRANSACTIONS_CLICK_FILTER),
623
623
  onBackClick: t,
624
624
  sx: n,
625
- title: i.title,
625
+ title: r.title,
626
626
  children: [
627
- p ? /* @__PURE__ */ e(ft, {}) : /* @__PURE__ */ e(Me, { variant: "list" }),
627
+ c && s ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ o(l, { direction: "column", p: 48, spacing: 24, children: [
628
+ /* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
629
+ /* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
630
+ /* @__PURE__ */ e(ae, { height: 600, variant: "rounded", width: "100%" })
631
+ ] }),
628
632
  /* @__PURE__ */ e(
629
- ie,
633
+ xe,
630
634
  {
631
- ariaLabelClose: i.close_drawer_aria,
632
- isOpen: g,
633
- onClose: () => D(!1),
635
+ ariaLabelClose: r.close_drawer_aria,
636
+ isOpen: d,
637
+ onClose: () => C(!1),
634
638
  shouldShowHeaderBorders: !1,
635
- title: i.action_title,
636
- children: /* @__PURE__ */ e(De, {})
639
+ title: r.action_title,
640
+ children: /* @__PURE__ */ e(Ne, {})
637
641
  }
638
642
  )
639
643
  ]
640
644
  }
641
- ) : /* @__PURE__ */ e(ae, {});
642
- }), xt = C(() => {
643
- const { recurring: t } = R(), { availableWidth: n } = Se(), { selectedDay: r, selectedDayRecurrences: i, setSelectedDay: o, upcomingRecurrences: c } = _(), u = n < 750;
644
- return /* @__PURE__ */ a(d, { flexDirection: u ? "column" : "row", width: "100%", children: [
645
- /* @__PURE__ */ e(ve, {}),
646
- !u && /* @__PURE__ */ e(Z, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
645
+ ) : /* @__PURE__ */ e(V, {});
646
+ }), Tt = T(() => {
647
+ const { recurring: t } = w(), { availableWidth: n } = ke(), { selectedDay: i, selectedDayRecurrences: r, setSelectedDay: a, upcomingRecurrences: c } = I(), p = n < 750;
648
+ return /* @__PURE__ */ o(l, { flexDirection: p ? "column" : "row", width: "100%", children: [
649
+ /* @__PURE__ */ e(Be, {}),
650
+ !p && /* @__PURE__ */ e(le, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
647
651
  /* @__PURE__ */ e(
648
- k,
652
+ z,
649
653
  {
650
654
  isMini: !0,
651
- onResetClick: r ? () => o(r) : void 0,
652
- recurrences: i || c.slice(0, 5),
653
- sx: { width: u ? "100%" : "calc(100% - 336px)", mt: 12 },
654
- title: r ? E(
655
+ onResetClick: i ? () => a(i) : void 0,
656
+ recurrences: r || c.slice(0, 5),
657
+ sx: { width: p ? "100%" : "calc(100% - 336px)", mt: 12 },
658
+ title: i ? G(
655
659
  t.day_transactions,
656
- L(r, A.MONTH_DAY)
660
+ A(i, E.MONTH_DAY)
657
661
  ) : t.upcoming_activity
658
662
  }
659
663
  )
660
664
  ] });
661
- }), wn = C(
665
+ }), vn = T(
662
666
  ({ onPrimaryCtaClick: t, sx: n }) => {
663
- const { accounts: r } = ne(), { recurring: i } = R(), { setFilter: o } = re(), { isDataLoaded: c, loadRepeatingTransactionData: u } = _(), { isInitialized: p, setSelectedAccounts: s, selectedAccountGuids: l } = B();
664
- return x.useEffect(() => {
665
- c || u().finally();
666
- }, []), x.useEffect(() => {
667
- s(r);
668
- }, [r]), x.useEffect(() => {
669
- l.length > 0 && o({
670
- dateRange: { start: Q(J(), 90), end: X() },
671
- accounts: l
672
- });
673
- }, [l]), p ? /* @__PURE__ */ e(
674
- lt,
667
+ const { accounts: i } = he(), { recurring: r } = w(), { setFilter: a } = fe(), { isDataLoaded: c, loadRepeatingTransactions: p } = I(), { isCopyLoaded: h, isInitialized: s, setSelectedAccounts: m, selectedAccountGuids: u } = Z();
668
+ return be({
669
+ widgetName: "RecurringTransactionsMiniWidget",
670
+ isLoaded: c
671
+ }), f.useEffect(() => {
672
+ s && m(i);
673
+ }, [s]), f.useEffect(() => {
674
+ u.length > 0 && (a({
675
+ dateRange: { start: me(ue(), 90), end: de() },
676
+ accounts: u
677
+ }), p().finally());
678
+ }, [u]), !h || !s ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ e(
679
+ gt,
675
680
  {
676
681
  className: "mx-exp-recurring-transactions-miniwidget",
677
682
  onPrimaryCtaClick: t,
678
- primaryCtaLabel: i.primary_cta,
679
- subTitle: i.sub_title,
683
+ primaryCtaLabel: r.primary_cta,
684
+ subTitle: r.sub_title,
680
685
  sx: n,
681
- title: i.mini_title,
682
- children: c ? /* @__PURE__ */ e(xt, {}) : /* @__PURE__ */ e(Me, { sx: { mx: 16 }, variant: "list" })
686
+ title: r.mini_title,
687
+ children: c ? /* @__PURE__ */ e(Tt, {}) : /* @__PURE__ */ e(V, {})
683
688
  }
684
- ) : /* @__PURE__ */ e(ae, {});
689
+ );
685
690
  }
686
- ), bt = C(() => {
687
- const { recurring: t } = R();
688
- return /* @__PURE__ */ a(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
689
- /* @__PURE__ */ e(je, { size: 32 }),
690
- /* @__PURE__ */ a(d, { children: [
691
- /* @__PURE__ */ e(V, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
692
- /* @__PURE__ */ e(V, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
693
- ] })
694
- ] });
695
- }), yt = ({
696
- amount: t,
697
- bgcolor: n,
698
- isLargeScreen: r,
699
- isSmallScreen: i,
700
- label: o
701
- }) => /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
702
- /* @__PURE__ */ e(
703
- G,
704
- {
705
- sx: {
706
- borderRadius: "2px",
707
- bgcolor: n,
708
- height: 8,
709
- width: 8
710
- }
711
- }
712
- ),
713
- /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
714
- !i && /* @__PURE__ */ e(f, { bold: !0, variant: "caption", children: v(t, t === 0 || !r ? "0,0" : "0,0.00") }),
715
- /* @__PURE__ */ e(f, { variant: "caption", children: o })
716
- ] })
717
- ] }), Ct = ({
691
+ ), wt = ({
692
+ upcomingRecurrences: t,
693
+ maxLogos: n = 3
694
+ }) => /* @__PURE__ */ e(l, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, r) => /* @__PURE__ */ e(
695
+ pe,
696
+ {
697
+ categoryGuid: i.categoryGuid || "",
698
+ merchantGuid: i.merchantGuid || ""
699
+ },
700
+ `${i.categoryGuid}-${i.merchantGuid}-${r}`
701
+ )) }), Dt = ({
718
702
  upcomingRecurrences: t,
719
703
  logoSize: n = 32,
720
- maxLogos: r = 3
704
+ maxLogos: i = 3
721
705
  }) => {
722
- const i = (o) => o * (n / 2);
706
+ const r = (a) => a * (n / 2);
723
707
  return /* @__PURE__ */ e(
724
- G,
708
+ O,
725
709
  {
726
710
  sx: {
727
711
  position: "relative",
728
712
  width: 64
729
713
  },
730
- children: t.map((o, c) => c < r ? /* @__PURE__ */ e(
731
- G,
714
+ children: t.map((a, c) => c < i ? /* @__PURE__ */ e(
715
+ O,
732
716
  {
733
717
  sx: {
734
718
  borderRadius: "4px",
735
- left: i(c),
719
+ left: r(c),
736
720
  outlineColor: "common.white",
737
721
  outlineStyle: "solid",
738
722
  outlineWidth: 2,
739
723
  position: "absolute"
740
724
  },
741
725
  children: /* @__PURE__ */ e(
742
- ee,
726
+ pe,
743
727
  {
744
- categoryGuid: o.categoryGuid || "",
745
- merchantGuid: o.merchantGuid || "",
728
+ categoryGuid: a.categoryGuid || "",
729
+ merchantGuid: a.merchantGuid || "",
746
730
  size: n
747
731
  }
748
732
  )
749
733
  },
750
- `${o.categoryGuid}-${o.merchantGuid}-${c}`
734
+ `${a.categoryGuid}-${a.merchantGuid}-${c}`
751
735
  ) : null)
752
736
  }
753
737
  );
754
- }, Rt = ({
755
- upcomingRecurrences: t,
756
- maxLogos: n = 3
757
- }) => /* @__PURE__ */ e(d, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((r, i) => /* @__PURE__ */ e(
758
- ee,
759
- {
760
- categoryGuid: r.categoryGuid || "",
761
- merchantGuid: r.merchantGuid || ""
762
- },
763
- `${r.categoryGuid}-${r.merchantGuid}-${i}`
764
- )) }), Dt = C(() => {
765
- const t = te(), [n, { width: r }] = dt(), {
766
- upcomingRecurrences: i,
767
- expenseTotal: o,
768
- missedExpenseTotal: c,
769
- paidExpenseTotal: u,
770
- upcomingExpenseTotal: p
771
- } = _(), { recurring: s } = R(), l = r <= 288, m = r >= 450, h = 32, b = i.length > 0, y = x.useMemo(() => v(o, o === 0 ? "0,0" : "0,0.00"), [o]), g = x.useMemo(() => {
772
- const S = [
773
- { color: t.palette.success.main, percentage: `${u / o}` }
774
- ];
775
- return c && S.push({
776
- color: t.palette.error.main,
777
- percentage: `${c / o}`
778
- }), S;
779
- }, [
780
- u,
781
- o,
782
- c,
783
- t.palette.success.main,
784
- t.palette.error.main
785
- ]), D = () => b ? l ? /* @__PURE__ */ e(
786
- Ct,
787
- {
788
- logoSize: h,
789
- maxLogos: 3,
790
- upcomingRecurrences: i.slice(0, 3)
791
- }
792
- ) : /* @__PURE__ */ e(Rt, { maxLogos: 3, upcomingRecurrences: i.slice(0, 3) }) : /* @__PURE__ */ e(d, { sx: { width: l ? 64 : 104 } }), j = [
793
- {
794
- amount: u,
795
- bgColor: "success.main",
796
- label: s.paid
797
- },
798
- {
799
- amount: c,
800
- bgColor: "error.main",
801
- label: s.missed
802
- },
738
+ }, St = ({
739
+ amount: t,
740
+ bgcolor: n,
741
+ isLargeScreen: i,
742
+ isSmallScreen: r,
743
+ label: a
744
+ }) => /* @__PURE__ */ o(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
745
+ /* @__PURE__ */ e(
746
+ O,
803
747
  {
804
- amount: p,
805
- bgColor: "neutral.light",
806
- label: s.upcoming
748
+ sx: {
749
+ borderRadius: "2px",
750
+ bgcolor: n,
751
+ height: 8,
752
+ width: 8
753
+ }
807
754
  }
808
- ];
809
- return /* @__PURE__ */ a(P, { children: [
810
- /* @__PURE__ */ a(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
811
- /* @__PURE__ */ a(
812
- d,
813
- {
814
- sx: [
815
- y.length >= 10 && l ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
816
- {
817
- alignItems: "baseline",
818
- overflow: "hidden",
819
- textOverflow: "ellipsis",
820
- whiteSpace: "nowrap"
821
- }
822
- ],
823
- children: [
824
- /* @__PURE__ */ e(
825
- f,
826
- {
827
- sx: { width: "100%" },
828
- variant: y.length >= 10 && l ? "h3" : "h2",
829
- children: y
830
- }
831
- ),
832
- /* @__PURE__ */ e(V, { sx: { pr: 12 }, variant: "caption", children: s.expected })
833
- ]
834
- }
835
- ),
836
- D()
837
- ] }),
838
- /* @__PURE__ */ a(d, { sx: { pt: 12 }, children: [
839
- /* @__PURE__ */ e(Ie, { data: g }),
840
- /* @__PURE__ */ e(
841
- d,
842
- {
843
- sx: {
844
- alignItems: "center",
845
- flexDirection: "row",
846
- gap: 16,
847
- mt: 4
848
- },
849
- children: j.map((S, K) => /* @__PURE__ */ e(
850
- yt,
851
- {
852
- amount: S.amount,
853
- bgcolor: S.bgColor,
854
- isLargeScreen: m,
855
- isSmallScreen: l,
856
- label: S.label
857
- },
858
- `recurrence-legend-${K}`
859
- ))
860
- }
861
- )
755
+ ),
756
+ /* @__PURE__ */ o(l, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
757
+ !r && /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
758
+ /* @__PURE__ */ e(g, { variant: "caption", children: a })
759
+ ] })
760
+ ] }), _t = T(() => {
761
+ const { recurring: t } = w();
762
+ return /* @__PURE__ */ o(l, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
763
+ /* @__PURE__ */ e(Ze, { size: 32 }),
764
+ /* @__PURE__ */ o(l, { children: [
765
+ /* @__PURE__ */ e(ce, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
766
+ /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
862
767
  ] })
863
768
  ] });
864
- }), Sn = C(
769
+ }), Ln = T(
865
770
  ({ onCTAClick: t }) => {
866
- const { onEvent: n } = F(), { accounts: r } = ne(), { isInitialized: i, selectedAccountGuids: o, setSelectedAccounts: c } = B(), {
867
- loadRepeatingTransactionData: u,
868
- upcomingRecurrences: p,
869
- repeatingTransactions: s,
870
- setDateRange: l,
871
- isDataLoaded: m
872
- } = _(), { setFilter: h } = re(), { recurring: b, budgets: y } = R();
873
- x.useEffect(() => {
874
- m || u().finally(() => {
875
- n(I.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
876
- state: p.length > 0 ? "default" : "zeroState"
877
- });
771
+ const [n, i] = f.useState(!1), { onEvent: r } = J(), a = ge(), { accounts: c } = he(), [p, { width: h }] = ht(), { isCopyLoaded: s, isInitialized: m, selectedAccountGuids: u, setSelectedAccounts: x } = Z(), {
772
+ loadRepeatingTransactions: b,
773
+ upcomingRecurrences: y,
774
+ expenseTotal: d,
775
+ missedExpenseTotal: C,
776
+ paidExpenseTotal: W,
777
+ repeatingTransactions: U,
778
+ setDateRange: te,
779
+ upcomingExpenseTotal: ne,
780
+ isDataLoaded: $
781
+ } = I(), { setFilter: B } = fe(), { recurring: S, budgets: ie } = w();
782
+ be({
783
+ widgetName: "RecurringTransactionsMicroWidget",
784
+ isLoaded: $
785
+ }), f.useEffect(() => {
786
+ x(c);
787
+ }, [c]), f.useEffect(() => {
788
+ m && (B({
789
+ dateRange: { start: me(ue(), 90), end: de() },
790
+ accounts: u
791
+ }), te({ start: k(/* @__PURE__ */ new Date()), end: F(/* @__PURE__ */ new Date()) }), b().finally(), i(!0));
792
+ }, [m]), f.useEffect(() => {
793
+ n && r(_.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
794
+ state: y.length > 0 ? "default" : "zeroState"
878
795
  });
879
- }, []), x.useEffect(() => {
880
- i && c(r);
881
- }, [i, r]), x.useEffect(() => {
882
- i && (h({
883
- dateRange: { start: Q(J(), 90), end: X() },
884
- accounts: o
885
- }), l({ start: N(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) }));
886
- }, [i, o]);
887
- const g = () => {
888
- n(
889
- p.length > 0 ? I.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : I.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
796
+ }, [n]);
797
+ const M = h <= 288, j = h >= 450, K = f.useMemo(() => {
798
+ const N = [
799
+ { color: a.palette.success.main, percentage: `${W / d}` }
800
+ ];
801
+ return C && N.push({
802
+ color: a.palette.error.main,
803
+ percentage: `${C / d}`
804
+ }), N;
805
+ }, [
806
+ W,
807
+ d,
808
+ C,
809
+ a.palette.success.main,
810
+ a.palette.error.main
811
+ ]), P = f.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), re = () => {
812
+ r(
813
+ y.length > 0 ? _.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : _.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
890
814
  ), t();
891
815
  };
892
- if (!i || !m) return /* @__PURE__ */ e(ae, { height: 100 });
893
- const D = !s?.length;
816
+ if (!s || !n || !$) return /* @__PURE__ */ e(V, { height: 100 });
817
+ const R = 32, oe = y.length > 0, Pe = () => oe ? M ? /* @__PURE__ */ e(
818
+ Dt,
819
+ {
820
+ logoSize: R,
821
+ maxLogos: 3,
822
+ upcomingRecurrences: y.slice(0, 3)
823
+ }
824
+ ) : /* @__PURE__ */ e(wt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(l, { sx: { width: M ? 64 : 104 } }), He = [
825
+ {
826
+ amount: W,
827
+ bgColor: "success.main",
828
+ label: S.paid
829
+ },
830
+ {
831
+ amount: C,
832
+ bgColor: "error.main",
833
+ label: S.missed
834
+ },
835
+ {
836
+ amount: ne,
837
+ bgColor: "border.light",
838
+ label: S.upcoming
839
+ }
840
+ ], De = !U?.length;
894
841
  return /* @__PURE__ */ e(
895
- ut,
842
+ ft,
896
843
  {
897
844
  className: "mx-recurring-transaction-microwidget",
898
- ctaLabel: D ? y.get_started_cta : b.primary_cta,
899
- onCTAClick: g,
900
- title: b.recurring_expenses,
901
- children: D ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ e(Dt, {})
845
+ ctaLabel: De ? ie.get_started_cta : S.primary_cta,
846
+ onCTAClick: re,
847
+ title: S.recurring_expenses,
848
+ children: De ? /* @__PURE__ */ e(_t, {}) : /* @__PURE__ */ o(X, { children: [
849
+ /* @__PURE__ */ o(
850
+ l,
851
+ {
852
+ ref: p,
853
+ sx: {
854
+ flexDirection: "row",
855
+ justifyContent: "space-between"
856
+ },
857
+ children: [
858
+ /* @__PURE__ */ o(
859
+ l,
860
+ {
861
+ sx: [
862
+ P.length >= 10 && M ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
863
+ {
864
+ alignItems: "baseline",
865
+ overflow: "hidden",
866
+ textOverflow: "ellipsis",
867
+ whiteSpace: "nowrap"
868
+ }
869
+ ],
870
+ children: [
871
+ /* @__PURE__ */ e(
872
+ g,
873
+ {
874
+ sx: { width: "100%" },
875
+ variant: P.length >= 10 && M ? "H3" : "H2",
876
+ children: P
877
+ }
878
+ ),
879
+ /* @__PURE__ */ e(
880
+ ce,
881
+ {
882
+ sx: {
883
+ pr: 12
884
+ },
885
+ variant: "XSmall",
886
+ children: S.expected
887
+ }
888
+ )
889
+ ]
890
+ }
891
+ ),
892
+ Pe()
893
+ ]
894
+ }
895
+ ),
896
+ /* @__PURE__ */ o(l, { sx: { pt: 12 }, children: [
897
+ /* @__PURE__ */ e($e, { data: K }),
898
+ /* @__PURE__ */ e(
899
+ l,
900
+ {
901
+ sx: {
902
+ alignItems: "center",
903
+ flexDirection: "row",
904
+ gap: 16,
905
+ mt: 4
906
+ },
907
+ children: He.map((N, ze) => /* @__PURE__ */ e(
908
+ St,
909
+ {
910
+ amount: N.amount,
911
+ bgcolor: N.bgColor,
912
+ isLargeScreen: j,
913
+ isSmallScreen: M,
914
+ label: N.label
915
+ },
916
+ `recurrence-legend-${ze}`
917
+ ))
918
+ }
919
+ )
920
+ ] })
921
+ ] })
902
922
  }
903
923
  );
904
924
  }
905
- ), _n = C(
906
- ({ isOpen: t, onClose: n, selectedTab: r }) => {
907
- const { cashflow: i } = R();
925
+ ), An = T(
926
+ ({ isOpen: t, onClose: n, selectedTab: i }) => {
927
+ const { cashflow: r } = w();
908
928
  return /* @__PURE__ */ e(
909
- ie,
929
+ xe,
910
930
  {
911
- ariaLabelClose: i.close_settings_aria,
931
+ ariaLabelClose: r.close_settings_aria,
912
932
  isOpen: t,
913
933
  onClose: n,
914
- title: i.cashflow_settings,
915
- children: /* @__PURE__ */ e(De, { defaultSelectedTab: r })
934
+ title: r.cashflow_settings,
935
+ children: /* @__PURE__ */ e(Ne, { defaultSelectedTab: i })
916
936
  }
917
937
  );
918
938
  }
919
939
  );
920
940
  export {
921
- Gn as AddRecurringTransactionDetails,
922
- vn as ManageExpenses,
923
- Nn as ManageIncome,
924
- De as RecurringSettings,
925
- _n as RecurringSettingsDrawer,
926
- Sn as RecurringTransactionsMicroWidget,
927
- wn as RecurringTransactionsMiniWidget,
928
- An as RecurringTransactionsStore,
929
- Tn as RecurringTransactionsWidget,
930
- On as SelectTransaction
941
+ $n as AddRecurringTransactionDetails,
942
+ Gn as ManageExpenses,
943
+ Bn as ManageIncome,
944
+ Ne as RecurringSettings,
945
+ An as RecurringSettingsDrawer,
946
+ Ln as RecurringTransactionsMicroWidget,
947
+ vn as RecurringTransactionsMiniWidget,
948
+ kn as RecurringTransactionsStore,
949
+ Mn as RecurringTransactionsWidget,
950
+ Pn as SelectTransaction
931
951
  };