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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/CHANGELOG.md +128 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
  3. package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
  4. package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
  6. package/dist/AccountListItem-wgmlex-_.mjs +90 -0
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
  8. package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
  12. package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
  13. package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
  14. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
  15. package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
  16. package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
  17. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
  18. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
  19. package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
  20. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  21. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
  22. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
  23. package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
  24. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  25. package/dist/Drawer-BF40nbsH.mjs +163 -0
  26. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  27. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
  28. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  29. package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
  30. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
  31. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  32. package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
  33. package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
  34. package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
  35. package/dist/LineChart-C1PxNf7P.mjs +581 -0
  36. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
  37. package/dist/Loader-Ckqi9Rx6.mjs +21 -0
  38. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
  39. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  40. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
  41. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
  42. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
  43. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
  44. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
  45. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  46. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
  47. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
  48. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
  49. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
  50. package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
  51. package/dist/SearchBox-B7km148n.mjs +39 -0
  52. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
  53. package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
  54. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  55. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
  56. package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
  57. package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
  58. package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
  59. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  60. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  61. package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
  62. package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
  63. package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
  64. package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
  65. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
  66. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
  67. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  68. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  69. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  70. package/dist/accounts/index.es.js +228 -199
  71. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  72. package/dist/analytics/index.es.js +27 -27
  73. package/dist/budgets/index.es.js +459 -462
  74. package/dist/cashflow/index.es.js +419 -428
  75. package/dist/categories/index.es.js +2 -2
  76. package/dist/categories/stores/CategoryStore.d.ts +1 -1
  77. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  78. package/dist/common/components/Loader.d.ts +1 -2
  79. package/dist/common/components/Select.d.ts +4 -2
  80. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  81. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  82. package/dist/common/components/charts/LineChart.d.ts +12 -2
  83. package/dist/common/components/charts/index.d.ts +0 -3
  84. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  85. package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
  86. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  87. package/dist/common/components/drawer/Footer.d.ts +17 -0
  88. package/dist/common/components/index.d.ts +0 -1
  89. package/dist/common/hooks/index.d.ts +0 -1
  90. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  91. package/dist/common/index.es.js +413 -674
  92. package/dist/common/stores/GlobalStore.d.ts +7 -1
  93. package/dist/common/stores/GlobalUiStore.d.ts +3 -2
  94. package/dist/common/types/Finstrong.d.ts +54 -0
  95. package/dist/common/types/Global.d.ts +1 -0
  96. package/dist/common/types/Widgets.d.ts +1 -0
  97. package/dist/common/types/index.d.ts +1 -1
  98. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  99. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  100. package/dist/common/utils/Theme.d.ts +1 -3
  101. package/dist/dashboard/index.es.js +21 -21
  102. package/dist/debts/components/DebtsChart.d.ts +1 -2
  103. package/dist/debts/index.es.js +673 -665
  104. package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
  105. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  106. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  107. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  108. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  109. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  110. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  111. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  112. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  113. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  114. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  115. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  116. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  117. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  118. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  119. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  120. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  121. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  122. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  123. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  124. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  125. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  126. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  127. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  128. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  129. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  130. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  131. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  132. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  133. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  134. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  135. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  136. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  137. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  138. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  139. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  140. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  141. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  142. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  143. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  144. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  145. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  146. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  147. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  148. package/dist/finstrong/constants/index.d.ts +9 -0
  149. package/dist/finstrong/index.es.js +3175 -1067
  150. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  151. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  152. package/dist/goals/index.es.js +580 -570
  153. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  154. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  155. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  156. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  157. package/dist/help/index.es.js +6 -6
  158. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  159. package/dist/insights/index.es.js +1 -1
  160. package/dist/investments/index.es.js +537 -536
  161. package/dist/merchants/index.es.js +9 -9
  162. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  163. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  164. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  165. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  166. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  167. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  168. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  169. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  170. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  171. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  172. package/dist/microinsights/constants/App.d.ts +0 -1
  173. package/dist/microinsights/index.d.ts +3 -3
  174. package/dist/microinsights/index.es.js +7 -7
  175. package/dist/microinsights/interfaces.d.ts +0 -6
  176. package/dist/networth/components/NetWorthChange.d.ts +3 -1
  177. package/dist/networth/index.es.js +262 -254
  178. package/dist/notifications/index.es.js +90 -91
  179. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  180. package/dist/recurringtransactions/index.es.js +586 -562
  181. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
  182. package/dist/settings/index.es.js +371 -365
  183. package/dist/spending/index.es.js +267 -419
  184. package/dist/spending/utils/SpendingData.d.ts +2 -1
  185. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  186. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  187. package/dist/transactions/index.es.js +231 -226
  188. package/dist/transactions/stores/TransactionStore.d.ts +1 -1
  189. package/dist/transactions/stores/UiStore.d.ts +0 -2
  190. package/dist/trends/index.es.js +988 -612
  191. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
  192. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
  193. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  194. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
  195. package/package.json +51 -56
  196. package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
  197. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  198. package/dist/AccountListItem-JFMZROh7.mjs +0 -90
  199. package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
  200. package/dist/Drawer-kEE73B87.mjs +0 -113
  201. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  202. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  203. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  204. package/dist/Loader-DUaFpDGv.mjs +0 -24
  205. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  206. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  207. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  208. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  209. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  210. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  211. package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
  212. package/dist/common/components/barchart/Bar.d.ts +0 -25
  213. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  214. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  215. package/dist/common/components/barchart/Legend.d.ts +0 -8
  216. package/dist/common/components/barchart/Util.d.ts +0 -42
  217. package/dist/common/components/barchart/index.d.ts +0 -1
  218. package/dist/common/hooks/usePrevious.d.ts +0 -2
  219. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  220. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  221. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  222. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,106 +1,105 @@
1
- import { jsxs as g, jsx as e, Fragment as je } from "react/jsx-runtime";
2
- import l from "react";
3
- import { observer as I } from "mobx-react-lite";
4
- import { endOfMonth as ge } from "date-fns/endOfMonth";
5
- import { startOfMonth as J } from "date-fns/startOfMonth";
6
- import H from "@mui/material/Box";
1
+ import { jsxs as g, jsx as e, Fragment as Pe } from "react/jsx-runtime";
2
+ import c from "react";
3
+ import { observer as E } from "mobx-react-lite";
4
+ import { endOfMonth as me } from "date-fns/endOfMonth";
5
+ import { startOfMonth as Q } from "date-fns/startOfMonth";
6
+ import F from "@mui/material/Box";
7
7
  import B from "@mui/material/Stack";
8
- import ee from "@mui/material/styles/useTheme";
9
- import { Text as y, CategoryIcon as W, Icon as P, H1 as ze, H3 as ve } from "@mxenabled/mxui";
8
+ import { useTheme as H } from "@mui/material/styles";
9
+ import { Text as y, CategoryIcon as W, Icon as G, H1 as je, H3 as Ae } from "@mxenabled/mxui";
10
10
  import K from "@mui/material/List";
11
- import { u as w, i as D, j as te, m as U, q as ne, g as X, b as oe, h as ae, a as Ue, d as Ae } from "../hooks-D6XlXHf4.mjs";
12
- import { f as T } from "../NumberFormatting-Buh7u8Oi.mjs";
11
+ import { u as w, i as D, j as te, m as V, q as ne, g as Y, b as oe, d as pe, h as ae, a as ze, n as Ue } from "../hooks-C41HAxM5.mjs";
12
+ import { f as T } from "../NumberFormatting-DjTD0t3W.mjs";
13
13
  import Te from "@mui/material/Button";
14
14
  import re from "@mui/material/Divider";
15
- import V from "@mui/material/ListItem";
15
+ import X from "@mui/material/ListItem";
16
16
  import se from "@mui/material/ListItemAvatar";
17
- import Y from "@mui/material/ListItemButton";
18
- import Z from "@mui/material/ListItemText";
17
+ import Z from "@mui/material/ListItemButton";
18
+ import q from "@mui/material/ListItemText";
19
19
  import { b as R } from "../Localization-2MODESHW.mjs";
20
- import { D as $ } from "../Drawer-kEE73B87.mjs";
20
+ import { D as L } from "../Drawer-BF40nbsH.mjs";
21
21
  import Fe from "@mui/material/ListItemSecondaryAction";
22
- import { C as He } from "../CurrencyInput-DUsQbkXb.mjs";
23
- import { a as j } from "../Dialog-CWW597AF.mjs";
24
- import { C as We } from "../ConnectionsDrawer-ByGQE7D5.mjs";
22
+ import { C as He } from "../CurrencyInput-D1cjbdCI.mjs";
23
+ import { D as j } from "../Dialog-CDV0kKxj.mjs";
24
+ import { C as We } from "../ConnectionsDrawer-Dsc04-4Z.mjs";
25
25
  import * as O from "d3";
26
26
  import Ke from "@mui/material/Tooltip";
27
- import { useTheme as Xe } from "@mui/material/styles";
28
- import { u as ie } from "../useScreenSize-B6JyS_Lj.mjs";
29
- import { L as z } from "../Loader-DUaFpDGv.mjs";
30
- import { E as ue } from "../EmptyState-DA_lfRBv.mjs";
31
- import { A as k, W as Ve } from "../WidgetContainer-BHWANqT4.mjs";
32
- import { u as Ye } from "../BudgetUtil-B2ZXyw-g.mjs";
33
- import { M as Ze } from "../MiniWidgetContainer-D0gfmbaF.mjs";
34
- import { isAfter as qe } from "date-fns/isAfter";
35
- import { startOfToday as q } from "date-fns/startOfToday";
36
- import Je from "@mui/material/Alert";
37
- import Qe from "@mui/material/Snackbar";
38
- import _e from "@mui/material/Tab";
39
- import et from "@mui/material/Tabs";
40
- import { e as tt } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
41
- import { T as we, a as nt } from "../TransactionDetails-oP1eSuiS.mjs";
42
- import he from "@mui/material/Card";
27
+ import { L as he } from "../Loader-Ckqi9Rx6.mjs";
28
+ import { u as ie } from "../useScreenSize-B5afALev.mjs";
29
+ import { E as de } from "../EmptyState-DoxNUae-.mjs";
30
+ import { A as k, W as Ve } from "../WidgetContainer-CDh9fjpR.mjs";
31
+ import { u as Ye } from "../BudgetUtil-Jv8h9H9l.mjs";
32
+ import { M as Xe } from "../MiniWidgetContainer-CKzf_Ira.mjs";
33
+ import { isAfter as Ze } from "date-fns/isAfter";
34
+ import { startOfToday as J } from "date-fns/startOfToday";
35
+ import qe from "@mui/material/Alert";
36
+ import Je from "@mui/material/Snackbar";
37
+ import Ce from "@mui/material/Tab";
38
+ import Qe from "@mui/material/Tabs";
39
+ import { e as et } from "../exportTransactionsToCSV-BgV_wTLT.mjs";
40
+ import { T as we, a as tt } from "../TransactionDetails-Bn0qY5Hw.mjs";
41
+ import be from "@mui/material/Card";
43
42
  import fe from "@mui/material/CardContent";
44
- import { S as pe } from "../StatusBar-BK_uYHAB.mjs";
45
- import { S as De } from "../SingleSegmentDonut-BgbLgwHi.mjs";
46
- import { u as ot, b as at } from "../CategorySelectorDrawer-DUe4lH5-.mjs";
47
- import Ie from "@mui/material/CardHeader";
48
- import { subDays as rt } from "date-fns/subDays";
49
- import st from "@mui/material/IconButton";
50
- import { M as it } from "../ManageIncome-1s_q5W4X.mjs";
51
- const ct = I(() => {
43
+ import { S as ge } from "../StatusBar-CPfSXe80.mjs";
44
+ import { S as De } from "../SingleSegmentDonut-7Uy6VEld.mjs";
45
+ import { u as nt, b as ot } from "../CategorySelectorDrawer-Dl006GKy.mjs";
46
+ import Ee from "@mui/material/CardHeader";
47
+ import { subDays as at } from "date-fns/subDays";
48
+ import rt from "@mui/material/IconButton";
49
+ import { M as st } from "../ManageIncome-8EsStyIQ.mjs";
50
+ const it = E(() => {
52
51
  const { budgets: t } = w(), { totalBudgeted: o } = D(), { incomeTotal: i } = te(), s = i - o;
53
52
  return /* @__PURE__ */ g(B, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
54
53
  /* @__PURE__ */ g(B, { alignItems: "center", children: [
55
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(i, "0,0") }),
56
- /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.projected_income })
54
+ /* @__PURE__ */ e(y, { bold: !0, variant: "body1", children: T(i, "0,0") }),
55
+ /* @__PURE__ */ e(y, { color: "secondary", variant: "body2", children: t.projected_income })
57
56
  ] }),
58
- /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
57
+ /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "body1", children: "-" }),
59
58
  /* @__PURE__ */ g(B, { alignItems: "center", children: [
60
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(o, "0,0") }),
61
- /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.budgeted })
59
+ /* @__PURE__ */ e(y, { bold: !0, variant: "body1", children: T(o, "0,0") }),
60
+ /* @__PURE__ */ e(y, { color: "secondary", variant: "body2", children: t.budgeted })
62
61
  ] }),
63
- /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
62
+ /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "body1", children: "=" }),
64
63
  /* @__PURE__ */ g(B, { alignItems: "center", children: [
65
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(s, "0,0") }),
66
- /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.remaining })
64
+ /* @__PURE__ */ e(y, { bold: !0, variant: "body1", children: T(s, "0,0") }),
65
+ /* @__PURE__ */ e(y, { color: "secondary", variant: "body2", children: t.remaining })
67
66
  ] })
68
67
  ] });
69
- }), lt = I(
68
+ }), ct = E(
70
69
  ({ category: t }) => {
71
- const { budgets: o } = w(), { budgets: i } = D(), s = l.useMemo(() => {
72
- const a = i.find((c) => c.category_guid === t.guid), n = T(t.totalAverageAmount, "0,0"), r = a ? R(o.recalculate_previous_budget, T(a.amount, "0,0")) : o.recalculate_new_budget;
70
+ const { budgets: o } = w(), { budgets: i } = D(), s = c.useMemo(() => {
71
+ const a = i.find((l) => l.category_guid === t.guid), n = T(t.totalAverageAmount, "0,0"), r = a ? R(o.recalculate_previous_budget, T(a.amount, "0,0")) : o.recalculate_new_budget;
73
72
  return `${n} - ${r}`;
74
73
  }, [o, i]);
75
- return /* @__PURE__ */ g(l.Fragment, { children: [
76
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { children: [
74
+ return /* @__PURE__ */ g(c.Fragment, { children: [
75
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ g(Z, { children: [
77
76
  /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid, variant: "filled" }) }),
78
- /* @__PURE__ */ e(Z, { primary: t.name, secondary: s })
77
+ /* @__PURE__ */ e(q, { primary: t.name, secondary: s })
79
78
  ] }) }),
80
79
  /* @__PURE__ */ e(re, {})
81
80
  ] }, t.guid);
82
81
  }
83
- ), dt = ({ onRecalculateBudgets: t }) => {
84
- const { budgets: o, common: i } = w(), { spendCategories: s } = U(), { recalculateBudgets: a, setAlert: n } = D(), [r, c] = l.useState(!1), d = s.filter((u) => u.totalAverageAmount > 0), m = async () => {
85
- await a(d), c(!1), n(o.alert_recalculated_budgets), t?.();
82
+ ), lt = ({ onRecalculateBudgets: t }) => {
83
+ const { budgets: o, common: i } = w(), { spendCategories: s } = V(), { recalculateBudgets: a, setAlert: n } = D(), [r, l] = c.useState(!1), d = s.filter((u) => u.totalAverageAmount > 0), m = async () => {
84
+ await a(d), l(!1), n(o.alert_recalculated_budgets), t?.();
86
85
  };
87
- return /* @__PURE__ */ g(l.Fragment, { children: [
88
- /* @__PURE__ */ e(Te, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
89
- /* @__PURE__ */ e(y, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
86
+ return /* @__PURE__ */ g(c.Fragment, { children: [
87
+ /* @__PURE__ */ e(Te, { onClick: () => l(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
88
+ /* @__PURE__ */ e(y, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "subtitle1", children: o.recalculate_help }),
90
89
  /* @__PURE__ */ e(
91
- $,
90
+ L,
92
91
  {
93
92
  ariaLabelClose: i.close_aria,
94
93
  isOpen: r,
95
- onClose: () => c(!1),
94
+ onClose: () => l(!1),
96
95
  onPrimaryAction: m,
97
96
  title: o.recalculate_title,
98
97
  children: /* @__PURE__ */ g(B, { children: [
99
98
  /* @__PURE__ */ g(B, { mx: 24, my: 16, children: [
100
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
101
- /* @__PURE__ */ e(y, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
99
+ /* @__PURE__ */ e(y, { bold: !0, variant: "body1", children: o.recalculate_description_top }),
100
+ /* @__PURE__ */ e(y, { variant: "subtitle2", children: o.recalculate_description_bottom })
102
101
  ] }),
103
- /* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: d.map((u) => /* @__PURE__ */ e(lt, { category: u }, u.guid)) }) })
102
+ /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: d.map((u) => /* @__PURE__ */ e(ct, { category: u }, u.guid)) }) })
104
103
  ] })
105
104
  }
106
105
  )
@@ -127,25 +126,25 @@ const ct = I(() => {
127
126
  label: s.add_label,
128
127
  minAmount: 0,
129
128
  setAmount: i,
130
- sx: { ".MuiTypography-Body": { p: 0 } }
129
+ sx: { ".MuiTypography-body1": { p: 0 } }
131
130
  }
132
131
  )
133
132
  ] });
134
- }, ut = I(({ category: t, onAddBudget: o }) => {
135
- const { budgets: i, common: s } = w(), [a, n] = l.useState(!1), [r, c] = l.useState(
133
+ }, dt = E(({ category: t, onAddBudget: o }) => {
134
+ const { budgets: i, common: s } = w(), [a, n] = c.useState(!1), [r, l] = c.useState(
136
135
  `${t.totalAmount === 0 ? "" : t.totalAmount}`
137
136
  );
138
- return /* @__PURE__ */ g(l.Fragment, { children: [
139
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => n(!0), children: [
137
+ return /* @__PURE__ */ g(c.Fragment, { children: [
138
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ g(Z, { onClick: () => n(!0), children: [
140
139
  /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid }) }),
141
140
  /* @__PURE__ */ e(
142
- Z,
141
+ q,
143
142
  {
144
143
  primary: t.name,
145
144
  secondary: T(t.totalAmount, "0,0")
146
145
  }
147
146
  ),
148
- /* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ e(P, { name: "add", size: 20 }) })
147
+ /* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ e(G, { name: "add", size: 20 }) })
149
148
  ] }) }, t.guid),
150
149
  /* @__PURE__ */ e(
151
150
  j,
@@ -156,27 +155,27 @@ const ct = I(() => {
156
155
  onClose: () => n(!1),
157
156
  onPrimaryAction: () => o(t, Number(r)),
158
157
  primaryText: i.add_save_button,
159
- children: /* @__PURE__ */ e(ce, { amount: r, categoryName: t.name, onAmountChanged: c })
158
+ children: /* @__PURE__ */ e(ce, { amount: r, categoryName: t.name, onAmountChanged: l })
160
159
  }
161
160
  )
162
161
  ] });
163
- }), Ee = I(({ onRecalculateBudgets: t }) => {
164
- const { budgets: o } = w(), { addBudget: i, setAlert: s, unbudgetedCategories: a } = D(), n = async (r, c) => {
165
- await i(r, c), s(R(o.alert_budget_created, r.name));
162
+ }), Ie = E(({ onRecalculateBudgets: t }) => {
163
+ const { budgets: o } = w(), { addBudget: i, setAlert: s, unbudgetedCategories: a } = D(), n = async (r, l) => {
164
+ await i(r, l), s(R(o.alert_budget_created, r.name));
166
165
  };
167
166
  return /* @__PURE__ */ g(B, { children: [
168
- /* @__PURE__ */ e(ct, {}),
169
- /* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: a.map((r) => /* @__PURE__ */ e(
170
- ut,
167
+ /* @__PURE__ */ e(it, {}),
168
+ /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: a.map((r) => /* @__PURE__ */ e(
169
+ dt,
171
170
  {
172
171
  category: r,
173
172
  onAddBudget: n
174
173
  },
175
174
  r.guid
176
175
  )) }) }),
177
- /* @__PURE__ */ e(dt, { onRecalculateBudgets: t })
176
+ /* @__PURE__ */ e(lt, { onRecalculateBudgets: t })
178
177
  ] });
179
- }), Ce = 5, Oe = 100, Q = 25, mt = (t) => {
178
+ }), Be = 5, Oe = 100, ee = 25, ut = (t) => {
180
179
  const o = (a) => {
181
180
  a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
182
181
  }, i = (a) => {
@@ -185,14 +184,14 @@ const ct = I(() => {
185
184
  a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
186
185
  };
187
186
  return O.drag().on("start", o).on("drag", i).on("end", s);
188
- }, gt = (t) => {
187
+ }, mt = (t) => {
189
188
  let o = t.transaction_total / t.amount;
190
189
  o < 0 ? o = 0 : o > 1 && (o = 1);
191
- const i = o * 2 * Math.PI, s = O.interpolate(0, i), a = O.arc().cornerRadius(5).innerRadius(t.radius - Ce * 2).outerRadius(t.radius - Ce).startAngle(0).endAngle(0);
190
+ const i = o * 2 * Math.PI, s = O.interpolate(0, i), a = O.arc().cornerRadius(5).innerRadius(t.radius - Be * 2).outerRadius(t.radius - Be).startAngle(0).endAngle(0);
192
191
  return (n) => (a.endAngle(s(n)), a(t) || "");
193
- }, pt = (t) => {
194
- O.selectAll(".bubble").call(mt(t));
195
- }, Be = (t, o, i) => Math.min(Math.max(t, o), i), ht = (t, o, i) => {
192
+ }, gt = (t) => {
193
+ O.selectAll(".bubble").call(ut(t));
194
+ }, Se = (t, o, i) => Math.min(Math.max(t, o), i), pt = (t, o, i) => {
196
195
  t.alpha(1).restart().force(
197
196
  "x",
198
197
  O.forceX().x(i / 2).strength(0.01)
@@ -202,17 +201,17 @@ const ct = I(() => {
202
201
  ).on("tick", () => {
203
202
  const s = t.nodes();
204
203
  s.forEach((a) => {
205
- const n = a.radius ?? Q;
206
- a.x = Be(a.x ?? 0, n, i - n), a.y = Be(a.y ?? 0, n, o - n);
204
+ const n = a.radius ?? ee;
205
+ a.x = Se(a.x ?? 0, n, i - n), a.y = Se(a.y ?? 0, n, o - n);
207
206
  }), O.selectAll(".bubble").data(s).attr("transform", (a) => `translate(${a.x},${a.y})`);
208
207
  });
209
- }, Me = (t, o) => O.scaleLinear().domain([t, o]).range([Q, Oe]), ft = (t) => {
208
+ }, Me = (t, o) => O.scaleLinear().domain([t, o]).range([ee, Oe]), ht = (t) => {
210
209
  const o = t.reduce((n, r) => {
211
- const c = Math.max(r.transaction_total, r.amount);
212
- return c > n ? c : n;
210
+ const l = Math.max(r.transaction_total, r.amount);
211
+ return l > n ? l : n;
213
212
  }, 0), i = t.reduce((n, r) => {
214
- const c = Math.max(r.transaction_total, r.amount);
215
- return c < n ? c : n;
213
+ const l = Math.max(r.transaction_total, r.amount);
214
+ return l < n ? l : n;
216
215
  }, o), s = Me(i, o), a = t.map((n) => {
217
216
  const r = s(Math.max(n.transaction_total, n.amount)) || 25;
218
217
  return {
@@ -222,45 +221,45 @@ const ct = I(() => {
222
221
  });
223
222
  return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((n) => n.radius + 2).strength(0.7));
224
223
  }, bt = (t, o, i) => {
225
- const a = Math.PI * Q ** 2 * t, n = i < 400 || o < 300, r = n ? 40 : 20, c = Math.max(100, i - r), d = Math.max(100, o - r), m = c * d;
226
- let u = Q;
224
+ const a = Math.PI * ee ** 2 * t, n = i < 400 || o < 300, r = n ? 40 : 20, l = Math.max(100, i - r), d = Math.max(100, o - r), m = l * d;
225
+ let u = ee;
227
226
  if (a < m) {
228
- const f = Math.sqrt(m / (t * Math.PI)), h = Math.min(c, d) / 4;
229
- u = Math.min(Oe, f, h);
227
+ const h = Math.sqrt(m / (t * Math.PI)), p = Math.min(l, d) / 4;
228
+ u = Math.min(Oe, h, p);
230
229
  }
231
230
  return n && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
232
- }, yt = (t, o, i, s, a) => {
231
+ }, ft = (t, o, i, s, a) => {
233
232
  const { maxRadius: n, minRadius: r } = bt(t, o, a);
234
233
  return O.scaleLinear().domain([s, i]).range([r, n]);
235
- }, _t = (t, o, i = !1, s, a) => {
236
- const n = o.map((m) => Math.max(m.transaction_total, m.amount)), r = Math.min(...n), c = Math.max(...n), d = i ? yt(t.length, s, c, r, a) : Me(r, c);
234
+ }, yt = (t, o, i = !1, s, a) => {
235
+ const n = o.map((m) => Math.max(m.transaction_total, m.amount)), r = Math.min(...n), l = Math.max(...n), d = i ? ft(t.length, s, l, r, a) : Me(r, l);
237
236
  return t.map((m) => ({
238
237
  ...m,
239
238
  radius: d(Math.max(m.transaction_total, m.amount))
240
239
  }));
241
- }, Se = 5, Ct = 2e3, Bt = ({ bubble: t }) => {
242
- const o = ee(), {
240
+ }, xe = 5, _t = 2e3, Ct = ({ bubble: t }) => {
241
+ const o = H(), {
243
242
  amount: i,
244
243
  guid: s,
245
244
  budgetColors: { mercury: a },
246
245
  radius: n,
247
246
  transaction_total: r
248
- } = t, c = `mercury-${s}`;
249
- l.useEffect(() => {
250
- O.select(`.${c}`).selectAll(".status").remove(), O.select(`.${c}`).append("path").transition().duration(Ct).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => gt(t));
247
+ } = t, l = `mercury-${s}`;
248
+ c.useEffect(() => {
249
+ O.select(`.${l}`).selectAll(".status").remove(), O.select(`.${l}`).append("path").transition().duration(_t).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => mt(t));
251
250
  }, [i, n, r]);
252
- const d = O.arc().innerRadius((m) => m - 2 * Se).outerRadius((m) => m - Se).startAngle(0).endAngle(2 * Math.PI);
253
- return /* @__PURE__ */ e("g", { className: c, children: /* @__PURE__ */ e(
251
+ const d = O.arc().innerRadius((m) => m - 2 * xe).outerRadius((m) => m - xe).startAngle(0).endAngle(2 * Math.PI);
252
+ return /* @__PURE__ */ e("g", { className: l, children: /* @__PURE__ */ e(
254
253
  "path",
255
254
  {
256
255
  d: d(n) || "",
257
256
  style: { fill: o.palette.common.white, fillOpacity: 0.35 }
258
257
  }
259
258
  ) });
260
- }, St = l.memo(Bt), G = 75, me = 50;
261
- function xt({ bubble: t, isDraggable: o, onClick: i = () => {
259
+ }, Bt = c.memo(Ct), P = 75, ue = 50;
260
+ function St({ bubble: t, isDraggable: o, onClick: i = () => {
262
261
  } }) {
263
- const [s, a] = l.useState(!1), n = Xe(), { availableWidth: r } = ne(), c = l.useMemo(() => {
262
+ const [s, a] = c.useState(!1), n = H(), { availableWidth: r } = ne(), l = c.useMemo(() => {
264
263
  if (t)
265
264
  return {
266
265
  amount: t.amount,
@@ -273,40 +272,40 @@ function xt({ bubble: t, isDraggable: o, onClick: i = () => {
273
272
  if (!t) return;
274
273
  const {
275
274
  budgetColors: { background: d, text: m },
276
- category: { icon: u, name: _ },
277
- guid: f,
278
- description: h,
279
- radius: p,
275
+ category: { icon: u, name: C },
276
+ guid: h,
277
+ description: p,
278
+ radius: b,
280
279
  x: S,
281
- y: b
282
- } = t, C = r < 400 ? -8 : -12;
283
- let v = C, A = C;
284
- p > G ? (v = -14, A = -45) : p > me && (A = -32);
280
+ y: _
281
+ } = t, f = r < 400 ? -8 : -12;
282
+ let A = f, v = f;
283
+ b > P ? (A = -14, v = -45) : b > ue && (v = -32);
285
284
  let x = 32;
286
- p <= G && (x = r < 400 ? 16 : 24);
287
- const E = `${t.category.name}: ${h}`, M = {
285
+ b <= P && (x = r < 400 ? 16 : 24);
286
+ const I = `${t.category.name}: ${p}`, M = {
288
287
  modifiers: [
289
288
  {
290
289
  name: "offset",
291
290
  options: { offset: [0, 15] }
292
291
  }
293
292
  ]
294
- }, N = (L) => {
295
- (L.key === "Enter" || L.key === " ") && (L.preventDefault(), i(t));
296
- }, F = () => {
293
+ }, N = (U) => {
294
+ (U.key === "Enter" || U.key === " ") && (U.preventDefault(), i(t));
295
+ }, z = () => {
297
296
  a(!0);
298
- }, le = () => {
297
+ }, $ = () => {
299
298
  a(!1);
300
299
  };
301
300
  return /* @__PURE__ */ g(
302
301
  "g",
303
302
  {
304
- "aria-label": `${_} - ${h}`,
303
+ "aria-label": `${C} - ${p}`,
305
304
  className: "bubble",
306
- id: `bubble-${f}`,
307
- onBlur: le,
305
+ id: `bubble-${h}`,
306
+ onBlur: $,
308
307
  onClick: () => i(t),
309
- onFocus: F,
308
+ onFocus: z,
310
309
  onKeyDown: N,
311
310
  onMouseEnter: () => a(!0),
312
311
  onMouseLeave: () => a(!1),
@@ -315,7 +314,7 @@ function xt({ bubble: t, isDraggable: o, onClick: i = () => {
315
314
  tabIndex: 0,
316
315
  textAnchor: "middle",
317
316
  x: S,
318
- y: b,
317
+ y: _,
319
318
  children: [
320
319
  /* @__PURE__ */ e("style", { children: `
321
320
  .bubble:focus,
@@ -329,111 +328,102 @@ function xt({ bubble: t, isDraggable: o, onClick: i = () => {
329
328
  stroke-opacity: 0.8;
330
329
  }
331
330
  ` }),
332
- /* @__PURE__ */ e(
333
- Ke,
334
- {
335
- followCursor: !0,
336
- open: s,
337
- slotProps: { popper: M },
338
- title: E,
339
- children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${f}`, r: p })
340
- }
341
- ),
342
- /* @__PURE__ */ e("svg", { x: v, y: A, children: /* @__PURE__ */ e(P, { name: u, size: x, sx: { fill: m } }) }),
343
- p > G && /* @__PURE__ */ e(
331
+ /* @__PURE__ */ e(Ke, { open: s, slotProps: { popper: M }, title: I, children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${h}`, r: b }) }),
332
+ /* @__PURE__ */ e("svg", { x: A, y: v, children: /* @__PURE__ */ e(G, { name: u, size: x, sx: { fill: m } }) }),
333
+ b > P && /* @__PURE__ */ e(
344
334
  y,
345
335
  {
346
336
  bold: !0,
347
337
  component: "text",
348
- id: `budget-category-${f}`,
338
+ id: `budget-category-${h}`,
349
339
  sx: { fill: m },
350
- variant: "Small",
340
+ variant: "body2",
351
341
  y: 4,
352
- children: _
342
+ children: C
353
343
  }
354
344
  ),
355
- p > me && /* @__PURE__ */ e(
345
+ b > ue && /* @__PURE__ */ e(
356
346
  y,
357
347
  {
358
348
  bold: !0,
359
349
  component: "text",
360
- id: `budget-description-${f}-1`,
350
+ id: `budget-description-${h}-1`,
361
351
  sx: { fill: m },
362
- variant: "Body",
363
- y: p <= G ? 12 : 24,
364
- children: p <= G ? h.split(" ")[0] : h
352
+ variant: "body1",
353
+ y: b <= P ? 12 : 24,
354
+ children: b <= P ? p.split(" ")[0] : p
365
355
  }
366
356
  ),
367
- p <= G && p > me && /* @__PURE__ */ e(
357
+ b <= P && b > ue && /* @__PURE__ */ e(
368
358
  y,
369
359
  {
370
360
  component: "text",
371
- id: `budget-description-${f}-2`,
361
+ id: `budget-description-${h}-2`,
372
362
  sx: { fill: m },
373
- variant: "XSmall",
363
+ variant: "caption",
374
364
  y: 28,
375
- children: h.split(" ")[1]
365
+ children: p.split(" ")[1]
376
366
  }
377
367
  ),
378
- /* @__PURE__ */ e(St, { bubble: c })
368
+ /* @__PURE__ */ e(Bt, { bubble: l })
379
369
  ]
380
370
  },
381
- f
371
+ h
382
372
  );
383
373
  }
384
- const vt = ({
374
+ const xt = ({
385
375
  height: t,
386
376
  width: o,
387
377
  isDraggable: i = !1,
388
378
  onClick: s = () => {
389
379
  }
390
380
  }) => {
391
- const [a, n] = l.useState([]), r = l.useRef(null), c = l.useRef(!1), { detailedBudgets: d } = D(), m = l.useCallback(() => {
392
- const u = r.current, _ = ft(d), f = _.nodes();
381
+ const [a, n] = c.useState([]), r = c.useRef(null), l = c.useRef(!1), { detailedBudgets: d } = D(), m = c.useCallback(() => {
382
+ const u = r.current, C = ht(d), h = C.nodes();
393
383
  if (u) {
394
- const h = u.nodes(), p = new Map(h.map((S) => [S.guid, S]));
395
- f.forEach((S) => {
396
- const b = p.get(S.guid);
397
- b && Object.assign(S, {
398
- vx: b.vx,
399
- vy: b.vy,
400
- x: b.x,
401
- y: b.y
384
+ const p = u.nodes(), b = new Map(p.map((S) => [S.guid, S]));
385
+ h.forEach((S) => {
386
+ const _ = b.get(S.guid);
387
+ _ && Object.assign(S, {
388
+ vx: _.vx,
389
+ vy: _.vy,
390
+ x: _.x,
391
+ y: _.y
402
392
  });
403
393
  });
404
394
  }
405
- r.current = _, c.current = !1, n(f);
395
+ r.current = C, l.current = !1, n(h);
406
396
  }, [d]);
407
- return l.useEffect(() => {
397
+ return c.useEffect(() => {
408
398
  m();
409
- }, [m]), l.useEffect(() => () => {
399
+ }, [m]), c.useEffect(() => () => {
410
400
  r.current && (r.current.stop(), r.current = null);
411
- }, []), l.useEffect(() => {
401
+ }, []), c.useEffect(() => {
412
402
  const u = r.current;
413
403
  if (!u) return;
414
- const _ = u.nodes(), f = o > 0 && o < 450 || t > 0 && t < 300, h = _t(_, d, f, t, o);
415
- u.nodes(h), ht(u, t, o), i && setTimeout(() => {
416
- pt(u);
417
- }, 0), n([...h]);
418
- }, [t, o, i, d]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(o), children: a.map((u) => /* @__PURE__ */ e(xt, { bubble: u, isDraggable: i, onClick: s }, u.guid)) });
419
- }, At = I(vt), Tt = ({
404
+ const C = u.nodes(), h = o > 0 && o < 450 || t > 0 && t < 300, p = yt(C, d, h, t, o);
405
+ u.nodes(p), pt(u, t, o), i && setTimeout(() => {
406
+ gt(u);
407
+ }, 0), n([...p]);
408
+ }, [t, o, i, d]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(o), children: a.map((u) => /* @__PURE__ */ e(St, { bubble: u, isDraggable: i, onClick: s }, u.guid)) });
409
+ }, vt = E(xt), At = ({
420
410
  isMiniWidget: t = !1,
421
411
  onConnectAccountsClick: o,
422
412
  createBudgetOnClick: i
423
413
  }) => {
424
- const { recalculateBudgets: s } = D(), { spendCategories: a } = U(), { budgets: n } = w(), { availableWidth: r } = ne(), { isMobile: c } = ie(r), d = t && c, [m, u] = l.useState(!1), [_, f] = l.useState(!1), [h, p] = l.useState(!1), S = l.useMemo(() => [...a.filter((C) => C.totalAverageAmount > 0)], [a]), b = async () => {
425
- p(!0);
426
- const { data: C, isSuccess: v } = await s(S);
427
- p(!1), v ? (C.length === 0 && f(!0), u(!1)) : u(!0);
414
+ const { recalculateBudgets: s } = D(), { spendCategories: a } = V(), { budgets: n } = w(), { availableWidth: r } = ne(), { isMobile: l } = ie(r), d = t && l, [m, u] = c.useState(!1), [C, h] = c.useState(!1), [p, b] = c.useState(!1), S = c.useMemo(() => [...a.filter((f) => f.totalAverageAmount > 0)], [a]), _ = async () => {
415
+ b(!0);
416
+ const { data: f, isSuccess: A } = await s(S);
417
+ b(!1), A ? (f.length === 0 && h(!0), u(!1)) : u(!0);
428
418
  };
429
- return h ? /* @__PURE__ */ e(z, {}) : m ? /* @__PURE__ */ e(
430
- ue,
419
+ return p ? /* @__PURE__ */ e(he, {}) : m ? /* @__PURE__ */ e(
420
+ de,
431
421
  {
432
422
  header: n.autogenerate_budgets_error_header,
433
423
  icon: "error",
434
424
  iconColor: "#4D4D4D",
435
- onClick: (C) => {
436
- C === "primary" ? b() : i();
425
+ onClick: (f) => {
426
+ f === "primary" ? _() : i();
437
427
  },
438
428
  primaryButton: n.autogenerate_budgets_error_primary_button,
439
429
  secondaryButton: n.zero_state_generate_budgets_secondary_button,
@@ -447,14 +437,14 @@ const vt = ({
447
437
  ...d && { justifyContent: "center", mt: 0, svg: { height: 32, width: 32 } }
448
438
  }
449
439
  }
450
- ) : /* @__PURE__ */ e(je, { children: _ ? /* @__PURE__ */ e(
451
- ue,
440
+ ) : /* @__PURE__ */ e(Pe, { children: C ? /* @__PURE__ */ e(
441
+ de,
452
442
  {
453
443
  header: n.zero_state_generate_budgets_header,
454
444
  icon: "error",
455
445
  iconColor: "#4D4D4D",
456
- onClick: (C) => {
457
- C === "primary" ? o() : i();
446
+ onClick: (f) => {
447
+ f === "primary" ? o() : i();
458
448
  },
459
449
  primaryButton: n.zero_state_generate_budgets_primary_button,
460
450
  secondaryButton: n.zero_state_generate_budgets_secondary_button,
@@ -473,13 +463,13 @@ const vt = ({
473
463
  }
474
464
  }
475
465
  ) : /* @__PURE__ */ e(
476
- ue,
466
+ de,
477
467
  {
478
468
  header: n.create_budgets_title,
479
469
  icon: "bubble_chart",
480
470
  iconColor: "#1A1A1A",
481
- onClick: (C) => {
482
- C === "primary" ? b() : i();
471
+ onClick: (f) => {
472
+ f === "primary" ? _() : i();
483
473
  },
484
474
  primaryButton: n.empty_state_primary_button,
485
475
  secondaryButton: t ? void 0 : n.empty_state_secondary_button,
@@ -498,7 +488,7 @@ const vt = ({
498
488
  }
499
489
  }
500
490
  ) });
501
- }, Re = I(
491
+ }, Re = E(
502
492
  ({
503
493
  createBudgetOnClick: t = () => {
504
494
  },
@@ -508,34 +498,34 @@ const vt = ({
508
498
  shouldShowZeroState: a,
509
499
  unavailableWidth: n = 24
510
500
  }) => {
511
- const { onEvent: r } = X(), { setSelectedBudget: c } = D(), { isLoadingCategoryTotals: d } = U(), { isInitialized: m } = oe(), { accounts: u } = w(), { availableWidth: _ } = ne(), { isMobile: f } = ie(), [h, p] = l.useState(!1), S = l.useMemo(() => _ - n, [_]), b = (v) => {
512
- c(v), r(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
513
- budget_category: v.category.name,
501
+ const { onEvent: r } = Y(), { setSelectedBudget: l } = D(), { isInitialized: d } = oe(), { accounts: m } = w(), { availableWidth: u } = ne(), { isMobile: C } = ie(), [h, p] = c.useState(!1), b = c.useMemo(() => u - n, [u]), S = (f) => {
502
+ l(f), r(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
503
+ budget_category: f.category.name,
514
504
  click_type: "bubble"
515
505
  });
516
- }, C = () => {
506
+ }, _ = () => {
517
507
  p(!0), r(k.ACCOUNTS_CLICK_CONNECT);
518
508
  };
519
- return d ? /* @__PURE__ */ e(B, { alignItems: "center", height: o, justifyContent: "center", width: Math.abs(S), children: /* @__PURE__ */ e(z, {}) }) : /* @__PURE__ */ g(
520
- H,
509
+ return /* @__PURE__ */ g(
510
+ F,
521
511
  {
522
- ml: a || f ? 0 : 24,
512
+ ml: a || C ? 0 : 24,
523
513
  sx: { alignSelf: "center", ...s && { height: "100%" } },
524
514
  children: [
525
- a || !m ? /* @__PURE__ */ e(
526
- Tt,
515
+ a || !d ? /* @__PURE__ */ e(
516
+ At,
527
517
  {
528
518
  createBudgetOnClick: t,
529
519
  isMiniWidget: s,
530
- onConnectAccountsClick: C
520
+ onConnectAccountsClick: _
531
521
  }
532
522
  ) : /* @__PURE__ */ e(
533
- At,
523
+ vt,
534
524
  {
535
525
  height: o,
536
526
  isDraggable: i,
537
- onClick: b,
538
- width: S
527
+ onClick: S,
528
+ width: b
539
529
  }
540
530
  ),
541
531
  /* @__PURE__ */ e(
@@ -543,26 +533,26 @@ const vt = ({
543
533
  {
544
534
  onClose: () => p(!1),
545
535
  showConnectionsWidget: h,
546
- title: u.manage_connections
536
+ title: m.manage_connections
547
537
  }
548
538
  )
549
539
  ]
550
540
  }
551
541
  );
552
542
  }
553
- ), wt = ({
543
+ ), Tt = ({
554
544
  budgetsCopy: t,
555
545
  difference: o,
556
546
  handleAddClick: i,
557
547
  shouldShowZeroState: s
558
548
  }) => {
559
- const { availableHeight: a = 0 } = ne(), n = l.useRef(null);
560
- l.useEffect(() => {
549
+ const { availableHeight: a = 0 } = ne(), n = c.useRef(null);
550
+ c.useEffect(() => {
561
551
  a > 0 && n.current === null && (n.current = a);
562
552
  }, [a]);
563
- const r = l.useMemo(() => {
564
- const c = n.current ?? a;
565
- return c > 0 ? Math.round(Math.max(120, Math.min(450, c * 0.8))) - 40 : 450;
553
+ const r = c.useMemo(() => {
554
+ const l = n.current ?? a;
555
+ return l > 0 ? Math.round(Math.max(120, Math.min(450, l * 0.8))) - 40 : 450;
566
556
  }, [a]);
567
557
  return /* @__PURE__ */ g(B, { sx: { height: "100%", justifyContent: "space-between" }, children: [
568
558
  /* @__PURE__ */ e(
@@ -574,55 +564,61 @@ const vt = ({
574
564
  shouldShowZeroState: s
575
565
  }
576
566
  ),
577
- !s && /* @__PURE__ */ g(H, { ml: 16, children: [
567
+ !s && /* @__PURE__ */ g(F, { ml: 16, children: [
578
568
  /* @__PURE__ */ e(y, { bold: !0, color: o < 0 ? "error.main" : "success.main", children: T(Math.abs(o), "0,0") }),
579
569
  /* @__PURE__ */ e(y, { children: o < 0 ? t.overspent_in_budgets : t.left_in_budgets })
580
570
  ] })
581
571
  ] });
582
- }, Dt = (t) => {
583
- const o = ee(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = D(), { budgets: c, common: d } = w(), { isCopyLoaded: m, isInitialized: u, selectedAccounts: _ } = oe(), { reloadCategoryTotals: f } = U(), h = Ye(), p = s.length === 0, [S, b] = l.useState(!1), C = () => {
584
- b(!0), i(k.BUDGETS_CLICK_ADD);
585
- }, v = () => b(!1);
586
- return l.useEffect(() => {
587
- r(o);
588
- }, [o]), l.useEffect(() => {
589
- u && !a && f(_, J(/* @__PURE__ */ new Date()), ge(/* @__PURE__ */ new Date())).then(
590
- () => {
591
- n().finally();
592
- }
593
- );
594
- }, [u, _]), m ? /* @__PURE__ */ g(
595
- Ze,
572
+ }, wt = (t) => {
573
+ const o = H(), { onEvent: i } = Y(), { visibleAccounts: s } = pe(), { detailedBudgets: a, isDataLoaded: n, loadBudgetData: r, setTheme: l } = D(), { budgets: d, common: m } = w(), { isInitialized: u, selectedAccounts: C, setSelectedAccounts: h } = oe(), { reloadCategoryTotals: p } = V(), b = Ye(), S = a.length === 0, [_, f] = c.useState(!1);
574
+ c.useEffect(() => {
575
+ n || r().finally();
576
+ }, []), c.useEffect(() => {
577
+ l(o);
578
+ }, [o]), c.useEffect(() => {
579
+ h(s);
580
+ }, [s]), c.useEffect(() => {
581
+ u && !n && p(
582
+ C,
583
+ Q(/* @__PURE__ */ new Date()),
584
+ me(/* @__PURE__ */ new Date())
585
+ ).finally();
586
+ }, [u, C]);
587
+ const A = () => {
588
+ f(!0), i(k.BUDGETS_CLICK_ADD);
589
+ }, v = () => f(!1);
590
+ return !u || !n ? /* @__PURE__ */ e(he, {}) : /* @__PURE__ */ g(
591
+ Xe,
596
592
  {
597
593
  contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
598
- primaryCtaLabel: p ? c.get_started_cta : c.details_cta,
594
+ primaryCtaLabel: S ? d.get_started_cta : d.details_cta,
599
595
  sx: { height: "100%" },
600
- title: c.budgets_title,
596
+ title: d.budgets_title,
601
597
  ...t,
602
598
  children: [
603
- a ? /* @__PURE__ */ e(
604
- wt,
599
+ /* @__PURE__ */ e(
600
+ Tt,
605
601
  {
606
- budgetsCopy: c,
607
- difference: h,
608
- handleAddClick: C,
609
- shouldShowZeroState: p
602
+ budgetsCopy: d,
603
+ difference: b,
604
+ handleAddClick: A,
605
+ shouldShowZeroState: S
610
606
  }
611
- ) : /* @__PURE__ */ e(z, {}),
607
+ ),
612
608
  /* @__PURE__ */ e(
613
- $,
609
+ L,
614
610
  {
615
- ariaLabelClose: d.close_aria,
616
- isOpen: S,
617
- onClose: () => b(!1),
618
- title: c.add_new_title,
619
- children: /* @__PURE__ */ e(Ee, { onRecalculateBudgets: v })
611
+ ariaLabelClose: m.close_aria,
612
+ isOpen: _,
613
+ onClose: () => f(!1),
614
+ title: d.add_new_title,
615
+ children: /* @__PURE__ */ e(Ie, { onRecalculateBudgets: v })
620
616
  }
621
617
  )
622
618
  ]
623
619
  }
624
- ) : /* @__PURE__ */ e(z, {});
625
- }, Ln = I(Dt), Le = ({ budget: t }) => {
620
+ );
621
+ }, Mn = E(wt), ke = ({ budget: t }) => {
626
622
  const {
627
623
  amount: o,
628
624
  budgetColors: { background: i },
@@ -630,26 +626,26 @@ const vt = ({
630
626
  category_guid: a,
631
627
  percentage: n,
632
628
  transaction_total: r
633
- } = t, c = [
629
+ } = t, l = [
634
630
  {
635
631
  color: i,
636
632
  percentage: `${n}%`
637
633
  }
638
634
  ];
639
- return /* @__PURE__ */ e(he, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ g(B, { alignItems: "center", gap: 16, children: [
635
+ return /* @__PURE__ */ e(be, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ g(B, { alignItems: "center", gap: 16, children: [
640
636
  /* @__PURE__ */ e(W, { categoryGuid: a, size: 56 }),
641
- /* @__PURE__ */ e(ze, { children: `${T(r, "0,0")} / ${T(o, "0,0")}` }),
642
- /* @__PURE__ */ e(y, { bold: !0, variant: "XSmall", children: s }),
643
- /* @__PURE__ */ e(pe, { data: c, height: 10 })
637
+ /* @__PURE__ */ e(je, { children: `${T(r, "0,0")} / ${T(o, "0,0")}` }),
638
+ /* @__PURE__ */ e(y, { bold: !0, variant: "caption", children: s }),
639
+ /* @__PURE__ */ e(ge, { data: l, height: 10 })
644
640
  ] }) }) });
645
- }, It = I(() => {
641
+ }, Dt = E(() => {
646
642
  const { budgets: t } = w();
647
643
  return /* @__PURE__ */ g(B, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
648
- /* @__PURE__ */ e(P, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
649
- /* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
650
- /* @__PURE__ */ e(y, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
644
+ /* @__PURE__ */ e(G, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
645
+ /* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "body2", children: t.zero_state_no_sub_budgets }),
646
+ /* @__PURE__ */ e(y, { color: "text.secondary", variant: "caption", children: t.zero_state_no_sub_budgets_description })
651
647
  ] });
652
- }), Et = I(({ budget: t }) => {
648
+ }), Et = E(({ budget: t }) => {
653
649
  const {
654
650
  amount: o,
655
651
  budgetColors: { background: i },
@@ -657,133 +653,133 @@ const vt = ({
657
653
  percentage: a,
658
654
  transaction_total: n
659
655
  } = t, { setSelectedSubBudget: r } = D();
660
- return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => r(t), children: [
656
+ return /* @__PURE__ */ e(X, { children: /* @__PURE__ */ g(Z, { onClick: () => r(t), children: [
661
657
  /* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(De, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
662
658
  /* @__PURE__ */ e(
663
- Z,
659
+ q,
664
660
  {
665
- primary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }) }),
666
- secondary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
661
+ primary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { bold: !0, variant: "body1", children: t.category.name }) }),
662
+ secondary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { fontWeight: 400, variant: "body1", children: `
667
663
  ${T(n, "0,0")} /
668
664
  ${T(o, "0,0")}
669
665
  ` }) })
670
666
  }
671
667
  )
672
668
  ] }) });
673
- }), Ot = I(({ category: t, parentBudget: o }) => {
674
- const { budgets: i, common: s } = w(), { setExpandedGuid: a, setOnSelect: n } = ot(), { addBudget: r } = D(), [c, d] = l.useState(!1), [m, u] = l.useState(!1), [_, f] = l.useState(""), [h, p] = l.useState(void 0);
675
- l.useEffect(() => {
676
- n((C) => {
677
- const v = t.subCategories.find((A) => A.guid === C);
678
- v && (p(v), f(`${v.currentAmount === 0 ? "" : v.currentAmount}`), u(!0));
669
+ }), It = E(({ category: t, parentBudget: o }) => {
670
+ const { budgets: i, common: s } = w(), { setExpandedGuid: a, setOnSelect: n } = nt(), { addBudget: r } = D(), [l, d] = c.useState(!1), [m, u] = c.useState(!1), [C, h] = c.useState(""), [p, b] = c.useState(void 0);
671
+ c.useEffect(() => {
672
+ n((f) => {
673
+ const A = t.subCategories.find((v) => v.guid === f);
674
+ A && (b(A), h(`${A.currentAmount === 0 ? "" : A.currentAmount}`), u(!0));
679
675
  });
680
676
  }, []);
681
677
  const S = () => {
682
678
  a(t.guid), d(!0);
683
- }, b = async () => {
684
- h && Number(_) > 0 && (await r(h, Number(_), o.guid), u(!1), d(!1), p(void 0));
679
+ }, _ = async () => {
680
+ p && Number(C) > 0 && (await r(p, Number(C), o.guid), u(!1), d(!1), b(void 0));
685
681
  };
686
- return /* @__PURE__ */ g(H, { children: [
687
- /* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: S, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
682
+ return /* @__PURE__ */ g(F, { children: [
683
+ /* @__PURE__ */ e(X, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Z, { onClick: S, children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
688
684
  /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 8, children: [
689
- /* @__PURE__ */ e(P, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
690
- /* @__PURE__ */ e(y, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
685
+ /* @__PURE__ */ e(G, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
686
+ /* @__PURE__ */ e(y, { bold: !0, sx: { color: "primary.light" }, variant: "body1", children: i.add_sub_budget_button })
691
687
  ] }),
692
- /* @__PURE__ */ e(P, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
688
+ /* @__PURE__ */ e(G, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
693
689
  ] }) }) }) }),
694
690
  /* @__PURE__ */ e(re, {}),
695
691
  /* @__PURE__ */ e(
696
- $,
692
+ L,
697
693
  {
698
694
  ariaLabelClose: s.close_aria,
699
- isOpen: c,
695
+ isOpen: l,
700
696
  onClose: () => d(!1),
701
697
  title: i.add_sub_budget_title,
702
- children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(at, { category: t, subCategories: t.subCategories }) })
698
+ children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(ot, { category: t, subCategories: t.subCategories }) })
703
699
  }
704
700
  ),
705
701
  /* @__PURE__ */ e(
706
702
  j,
707
703
  {
708
704
  copy: { close_aria: s.close_aria, title: i.add_title },
709
- disablePrimaryButton: Number(_) <= 0,
705
+ disablePrimaryButton: Number(C) <= 0,
710
706
  isOpen: m,
711
707
  onClose: () => u(!1),
712
- onPrimaryAction: b,
708
+ onPrimaryAction: _,
713
709
  primaryText: i.add_save_button,
714
710
  children: /* @__PURE__ */ e(
715
711
  ce,
716
712
  {
717
- amount: _,
718
- categoryName: h?.name || "",
719
- onAmountChanged: f
713
+ amount: C,
714
+ categoryName: p?.name || "",
715
+ onAmountChanged: h
720
716
  }
721
717
  )
722
718
  }
723
719
  )
724
720
  ] });
725
- }), Mt = I(({ budget: t }) => {
726
- const { category: o, subBudgets: i } = t, { budgets: s, common: a } = w(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: d } = D(), { filter: m, setFilter: u } = ae(), [_, f] = l.useState(!1), [h, p] = l.useState(!1), [S, b] = l.useState("");
727
- l.useEffect(() => {
728
- r && (b(`${r.amount}`), u({
721
+ }), Ot = E(({ budget: t }) => {
722
+ const { category: o, subBudgets: i } = t, { budgets: s, common: a } = w(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: l, updateBudget: d } = D(), { filter: m, setFilter: u } = ae(), [C, h] = c.useState(!1), [p, b] = c.useState(!1), [S, _] = c.useState("");
723
+ c.useEffect(() => {
724
+ r && (_(`${r.amount}`), u({
729
725
  ...m,
730
726
  custom: (x) => x.category_guid === r.category_guid
731
727
  }));
732
728
  }, [r]);
733
- const C = async () => {
729
+ const f = async () => {
734
730
  r && await d({
735
731
  ...r,
736
732
  amount: Number(S)
737
733
  });
738
- }, v = async () => {
739
- r && await n(r.guid), p(!1), A();
740
- }, A = () => {
734
+ }, A = async () => {
735
+ r && await n(r.guid), b(!1), v();
736
+ }, v = () => {
741
737
  u({
742
738
  ...m,
743
739
  custom: (x) => x.category_guid === t.category_guid || x.top_level_category_guid === t.category_guid
744
- }), c(void 0);
740
+ }), l(void 0);
745
741
  };
746
- return /* @__PURE__ */ g(l.Fragment, { children: [
742
+ return /* @__PURE__ */ g(c.Fragment, { children: [
747
743
  /* @__PURE__ */ g(K, { sx: { bgcolor: "background.paper" }, children: [
748
- i.length === 0 ? /* @__PURE__ */ e(It, {}) : i.map((x) => /* @__PURE__ */ g(l.Fragment, { children: [
744
+ i.length === 0 ? /* @__PURE__ */ e(Dt, {}) : i.map((x) => /* @__PURE__ */ g(c.Fragment, { children: [
749
745
  /* @__PURE__ */ e(Et, { budget: x }),
750
746
  /* @__PURE__ */ e(re, {})
751
747
  ] }, x.guid)),
752
- /* @__PURE__ */ e(Ot, { category: o, parentBudget: t })
748
+ /* @__PURE__ */ e(It, { category: o, parentBudget: t })
753
749
  ] }),
754
750
  /* @__PURE__ */ e(
755
- $,
751
+ L,
756
752
  {
757
753
  ariaLabelClose: a.close_aria,
758
754
  isOpen: !!r,
759
- onClose: A,
760
- onPrimaryAction: () => f(!0),
761
- onSecondaryAction: () => p(!0),
755
+ onClose: v,
756
+ onPrimaryAction: () => h(!0),
757
+ onSecondaryAction: () => b(!0),
762
758
  primaryText: s.details_edit_button,
763
759
  secondaryText: s.details_delete_button,
764
760
  title: s.details_title,
765
761
  children: r && /* @__PURE__ */ g(B, { gap: 24, children: [
766
- /* @__PURE__ */ e(Le, { budget: r }),
762
+ /* @__PURE__ */ e(ke, { budget: r }),
767
763
  /* @__PURE__ */ e(we, { height: "100%" })
768
764
  ] })
769
765
  }
770
766
  ),
771
- r && /* @__PURE__ */ g(l.Fragment, { children: [
767
+ r && /* @__PURE__ */ g(c.Fragment, { children: [
772
768
  /* @__PURE__ */ e(
773
769
  j,
774
770
  {
775
771
  copy: { close_aria: a.close_aria, title: s.details_edit_title },
776
772
  disablePrimaryButton: Number(S) <= 0,
777
- isOpen: _,
778
- onClose: () => f(!1),
779
- onPrimaryAction: C,
773
+ isOpen: C,
774
+ onClose: () => h(!1),
775
+ onPrimaryAction: f,
780
776
  primaryText: s.edit_save_button,
781
777
  children: /* @__PURE__ */ e(
782
778
  ce,
783
779
  {
784
780
  amount: S,
785
781
  categoryName: r.category.name,
786
- onAmountChanged: b
782
+ onAmountChanged: _
787
783
  }
788
784
  )
789
785
  }
@@ -792,135 +788,135 @@ const vt = ({
792
788
  j,
793
789
  {
794
790
  copy: { close_aria: a.close_aria, title: s.delete_title },
795
- isOpen: h,
796
- onClose: () => p(!1),
797
- onPrimaryAction: v,
791
+ isOpen: p,
792
+ onClose: () => b(!1),
793
+ onPrimaryAction: A,
798
794
  primaryColor: "error",
799
795
  primaryText: "Delete",
800
796
  secondaryColor: "secondary",
801
- children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: R(s.delete_description, r.category.name) })
797
+ children: /* @__PURE__ */ e(y, { variant: "subtitle1", children: R(s.delete_description, r.category.name) })
802
798
  }
803
799
  )
804
800
  ] })
805
801
  ] });
806
- }), Rt = I(({ budget: t }) => {
807
- const { is_mobile_webview: o } = Ue(), { setAlert: i } = D(), { budgets: s, common: a, transactions: n } = w(), { isDesktop: r, isSmallTablet: c, isTablet: d } = ie(), {
802
+ }), Mt = E(({ budget: t }) => {
803
+ const { is_mobile_webview: o } = ze(), { setAlert: i } = D(), { budgets: s, common: a, transactions: n } = w(), { isDesktop: r, isSmallTablet: l, isTablet: d } = ie(), {
808
804
  sortedTransactions: m,
809
805
  sortedTransactionsWithSplits: u,
810
- tags: _
811
- } = ae(), [f, h] = l.useState(0), [p, S] = l.useState(""), b = l.useMemo(
812
- () => m.find((x) => x.guid === p),
813
- [p, m]
814
- ), C = (x, E) => {
815
- h(E);
816
- }, v = () => {
817
- tt(u, _), i(s.alert_csv_downloaded);
818
- }, A = m.length > 0 && !o && (r || d && !c);
806
+ tags: C
807
+ } = ae(), [h, p] = c.useState(0), [b, S] = c.useState(""), _ = c.useMemo(
808
+ () => m.find((x) => x.guid === b),
809
+ [b, m]
810
+ ), f = (x, I) => {
811
+ p(I);
812
+ }, A = () => {
813
+ et(u, C), i(s.alert_csv_downloaded);
814
+ }, v = m.length > 0 && !o && (r || d && !l);
819
815
  return /* @__PURE__ */ g(B, { gap: 24, children: [
820
- /* @__PURE__ */ e(Le, { budget: t }),
816
+ /* @__PURE__ */ e(ke, { budget: t }),
821
817
  /* @__PURE__ */ g(B, { children: [
822
818
  /* @__PURE__ */ g(
823
- et,
819
+ Qe,
824
820
  {
825
- onChange: C,
821
+ onChange: f,
826
822
  sx: { width: "100%" },
827
823
  textColor: "primary",
828
- value: f,
824
+ value: h,
829
825
  variant: "fullWidth",
830
826
  children: [
831
- /* @__PURE__ */ e(_e, { label: s.details_transactions_tab }),
832
- /* @__PURE__ */ e(_e, { label: s.details_subbudgets_tab })
827
+ /* @__PURE__ */ e(Ce, { label: s.details_transactions_tab }),
828
+ /* @__PURE__ */ e(Ce, { label: s.details_subbudgets_tab })
833
829
  ]
834
830
  }
835
831
  ),
836
- f === 0 && /* @__PURE__ */ g(B, { children: [
837
- A && /* @__PURE__ */ e(B, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
832
+ h === 0 && /* @__PURE__ */ g(B, { children: [
833
+ v && /* @__PURE__ */ e(B, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
838
834
  Te,
839
835
  {
840
- onClick: v,
841
- startIcon: /* @__PURE__ */ e(P, { name: "ios_share" }),
836
+ onClick: A,
837
+ startIcon: /* @__PURE__ */ e(G, { name: "ios_share" }),
842
838
  variant: "text",
843
839
  children: n.export_csv_btn
844
840
  }
845
841
  ) }),
846
842
  /* @__PURE__ */ e(we, { height: "100%", onClick: S })
847
843
  ] }),
848
- f === 1 && /* @__PURE__ */ e(Mt, { budget: t }),
844
+ h === 1 && /* @__PURE__ */ e(Ot, { budget: t }),
849
845
  /* @__PURE__ */ e(
850
- $,
846
+ L,
851
847
  {
852
848
  ariaLabelClose: a.close_aria,
853
- isOpen: !!b,
849
+ isOpen: !!_,
854
850
  onClose: () => S(""),
855
851
  title: s.details_transaction_drawer,
856
- children: b && /* @__PURE__ */ e(nt, { transaction: b })
852
+ children: _ && /* @__PURE__ */ e(tt, { transaction: _ })
857
853
  }
858
854
  )
859
855
  ] })
860
856
  ] });
861
- }), Lt = I(() => {
857
+ }), Rt = E(() => {
862
858
  const { selectedAccountGuids: t } = oe(), { budgets: o, common: i } = w(), {
863
859
  dateRange: s,
864
860
  deleteBudget: a,
865
861
  selectedBudget: n,
866
862
  selectedSubBudget: r,
867
- setAlert: c,
863
+ setAlert: l,
868
864
  setSelectedBudget: d,
869
865
  updateBudget: m
870
- } = D(), { setFilter: u } = ae(), [_, f] = l.useState(!1), [h, p] = l.useState(!1), [S, b] = l.useState(!1), [C, v] = l.useState("");
871
- l.useEffect(() => {
872
- n && !r && (v(`${n.amount}`), f(!0), u({
866
+ } = D(), { setFilter: u } = ae(), [C, h] = c.useState(!1), [p, b] = c.useState(!1), [S, _] = c.useState(!1), [f, A] = c.useState("");
867
+ c.useEffect(() => {
868
+ n && !r && (A(`${n.amount}`), h(!0), u({
873
869
  accounts: t,
874
870
  dateRange: s,
875
871
  custom: (M) => M.category_guid === n.category_guid || M.top_level_category_guid === n.category_guid,
876
872
  showSplits: !0
877
873
  }));
878
874
  }, [n]);
879
- const A = async () => {
875
+ const v = async () => {
880
876
  n && (await m({
881
877
  ...n,
882
- amount: Number(C),
883
- percentage: n.category.totalAmount / Number(C) * 100
884
- }), c(R(o.alert_budget_updated, n.category.name)));
878
+ amount: Number(f),
879
+ percentage: n.category.totalAmount / Number(f) * 100
880
+ }), l(R(o.alert_budget_updated, n.category.name)));
885
881
  }, x = async () => {
886
- n && (await a(n.guid), c(R(o.alert_budget_deleted, n.category.name))), b(!1), E();
887
- }, E = () => {
888
- f(!1), setTimeout(() => {
882
+ n && (await a(n.guid), l(R(o.alert_budget_deleted, n.category.name))), _(!1), I();
883
+ }, I = () => {
884
+ h(!1), setTimeout(() => {
889
885
  d(void 0);
890
886
  }, 250);
891
887
  };
892
888
  if (n)
893
- return /* @__PURE__ */ g(l.Fragment, { children: [
889
+ return /* @__PURE__ */ g(c.Fragment, { children: [
894
890
  /* @__PURE__ */ e(
895
- $,
891
+ L,
896
892
  {
897
893
  ariaLabelClose: i.close_aria,
898
- isOpen: _,
899
- onClose: E,
900
- onPrimaryAction: () => p(!0),
901
- onSecondaryAction: () => b(!0),
894
+ isOpen: C,
895
+ onClose: I,
896
+ onPrimaryAction: () => b(!0),
897
+ onSecondaryAction: () => _(!0),
902
898
  primaryText: o.details_edit_button,
903
899
  secondaryColor: "error",
904
900
  secondaryText: o.details_delete_button,
905
901
  title: o.details_title,
906
- children: /* @__PURE__ */ e(Rt, { budget: n })
902
+ children: /* @__PURE__ */ e(Mt, { budget: n })
907
903
  }
908
904
  ),
909
905
  /* @__PURE__ */ e(
910
906
  j,
911
907
  {
912
908
  copy: { close_aria: i.close_aria, title: o.details_edit_title },
913
- disablePrimaryButton: Number(C) <= 0,
914
- isOpen: h,
915
- onClose: () => p(!1),
916
- onPrimaryAction: A,
909
+ disablePrimaryButton: Number(f) <= 0,
910
+ isOpen: p,
911
+ onClose: () => b(!1),
912
+ onPrimaryAction: v,
917
913
  primaryText: o.edit_save_button,
918
914
  children: /* @__PURE__ */ e(
919
915
  ce,
920
916
  {
921
- amount: C,
917
+ amount: f,
922
918
  categoryName: n.category.name,
923
- onAmountChanged: v
919
+ onAmountChanged: A
924
920
  }
925
921
  )
926
922
  }
@@ -930,12 +926,12 @@ const vt = ({
930
926
  {
931
927
  copy: { close_aria: i.close_aria, title: o.delete_title },
932
928
  isOpen: S,
933
- onClose: () => b(!1),
929
+ onClose: () => _(!1),
934
930
  onPrimaryAction: x,
935
931
  primaryColor: "error",
936
932
  primaryText: o.details_delete_button,
937
933
  secondaryColor: "secondary",
938
- children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: R(o.delete_description, n.category.name) })
934
+ children: /* @__PURE__ */ e(y, { variant: "subtitle1", children: R(o.delete_description, n.category.name) })
939
935
  }
940
936
  )
941
937
  ] });
@@ -945,235 +941,236 @@ const vt = ({
945
941
  budgetColors: { background: s, description: a },
946
942
  category_guid: n,
947
943
  description: r,
948
- percentage: c,
944
+ percentage: l,
949
945
  subBudgets: d,
950
946
  transaction_total: m
951
947
  } = t;
952
- return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => o?.(t), children: [
953
- /* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(De, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: n, variant: "basic" }) }) }),
948
+ return /* @__PURE__ */ e(X, { children: /* @__PURE__ */ g(Z, { onClick: () => o?.(t), children: [
949
+ /* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(De, { color: s, percent: l, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: n, variant: "basic" }) }) }),
954
950
  /* @__PURE__ */ e(
955
- Z,
951
+ q,
956
952
  {
957
953
  primary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
958
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }),
959
- /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
954
+ /* @__PURE__ */ e(y, { bold: !0, variant: "body1", children: t.category.name }),
955
+ /* @__PURE__ */ e(y, { fontWeight: 400, variant: "body1", children: `
960
956
  ${T(m, "0,0")} /
961
957
  ${T(i, "0,0")}
962
958
  ` })
963
959
  ] }),
964
960
  secondary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
965
- /* @__PURE__ */ e(y, { variant: "XSmall", children: `${d.length} Sub-budgets` }),
966
- /* @__PURE__ */ e(y, { bold: c > 100, color: a, variant: "XSmall", children: r })
961
+ /* @__PURE__ */ e(y, { variant: "caption", children: `${d.length} Sub-budgets` }),
962
+ /* @__PURE__ */ e(y, { bold: l > 100, color: a, variant: "caption", children: r })
967
963
  ] })
968
964
  }
969
965
  )
970
966
  ] }) });
971
- }, $t = I(() => {
972
- const { onEvent: t } = X(), { budgets: o } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), a = (n) => {
967
+ }, Lt = E(() => {
968
+ const { onEvent: t } = Y(), { budgets: o } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), a = (n) => {
973
969
  s(n), t(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
974
970
  budget_category: n.category.name,
975
971
  click_type: "list"
976
972
  });
977
973
  };
978
- return /* @__PURE__ */ g(he, { elevation: 2, children: [
979
- /* @__PURE__ */ e(Ie, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(ve, { children: o.budget_categories_title }) }),
980
- /* @__PURE__ */ e(fe, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(K, { children: i.map((n) => /* @__PURE__ */ g(l.Fragment, { children: [
974
+ return /* @__PURE__ */ g(be, { elevation: 2, children: [
975
+ /* @__PURE__ */ e(Ee, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Ae, { children: o.budget_categories_title }) }),
976
+ /* @__PURE__ */ e(fe, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(K, { children: i.map((n) => /* @__PURE__ */ g(c.Fragment, { children: [
981
977
  /* @__PURE__ */ e(kt, { budget: n, onClick: a }),
982
978
  /* @__PURE__ */ e(re, {})
983
979
  ] }, n.guid)) }) })
984
980
  ] });
985
- }), Nt = I(() => {
986
- const t = ee(), { onEvent: o } = X(), { visibleAccounts: i } = Ae(), { budgets: s, common: a, recurring: n } = w(), { incomeCategories: r, spendCategories: c } = U(), { detailedBudgets: d, totalBudgeted: m } = D(), { incomeTotal: u } = te(), { setFilter: _ } = ae(), [f, h] = l.useState(!1), [p, S] = l.useMemo(() => {
987
- const A = c.reduce((N, F) => N + F.totalAmount, 0);
988
- let x = A / m;
981
+ }), Nt = E(() => {
982
+ const t = H(), { onEvent: o } = Y(), { visibleAccounts: i } = pe(), { budgets: s, common: a, recurring: n } = w(), { incomeCategories: r, spendCategories: l } = V(), { detailedBudgets: d, totalBudgeted: m } = D(), { incomeTotal: u } = te(), { setFilter: C } = ae(), [h, p] = c.useState(!1), [b, S] = c.useMemo(() => {
983
+ const v = l.reduce((N, z) => N + z.totalAmount, 0);
984
+ let x = v / m;
989
985
  x > 1 && (x = 1);
990
- let E = t.palette.success.main;
991
- x > 0.8 && x < 1 ? E = t.palette.warning.main : x >= 1 && (E = t.palette.error.main);
986
+ let I = t.palette.success.main;
987
+ x > 0.8 && x < 1 ? I = t.palette.warning.main : x >= 1 && (I = t.palette.error.main);
992
988
  const M = [
993
989
  {
994
- color: E,
990
+ color: I,
995
991
  percentage: `${x}`
996
992
  }
997
993
  ];
998
- return [A, M];
999
- }, [d, c]), [b, C] = l.useMemo(() => {
1000
- const A = Math.abs(
994
+ return [v, M];
995
+ }, [d, l]), [_, f] = c.useMemo(() => {
996
+ const v = Math.abs(
1001
997
  r.reduce((M, N) => M + N.totalAmount, 0)
1002
998
  );
1003
- let x = A / u;
999
+ let x = v / u;
1004
1000
  x > 1 && (x = 1);
1005
- const E = [
1001
+ const I = [
1006
1002
  {
1007
1003
  color: t.palette.secondary.main,
1008
1004
  percentage: `${x}`
1009
1005
  }
1010
1006
  ];
1011
- return [A, E];
1012
- }, [r, u]), v = () => {
1013
- _({
1014
- accounts: i.map((A) => A.guid),
1007
+ return [v, I];
1008
+ }, [r, u]), A = () => {
1009
+ C({
1010
+ accounts: i.map((v) => v.guid),
1015
1011
  dateRange: {
1016
- start: rt(/* @__PURE__ */ new Date(), 90),
1012
+ start: at(/* @__PURE__ */ new Date(), 90),
1017
1013
  end: /* @__PURE__ */ new Date()
1018
1014
  }
1019
- }), h(!0), o(k.BUDGETS_CLICK_EDIT_INCOME);
1015
+ }), p(!0), o(k.BUDGETS_CLICK_EDIT_INCOME);
1020
1016
  };
1021
- return /* @__PURE__ */ g(he, { elevation: 2, sx: { overflow: "visible" }, children: [
1022
- /* @__PURE__ */ e(Ie, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(ve, { children: s.overview_title }) }),
1017
+ return /* @__PURE__ */ g(be, { elevation: 2, sx: { overflow: "visible" }, children: [
1018
+ /* @__PURE__ */ e(Ee, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Ae, { children: s.overview_title }) }),
1023
1019
  /* @__PURE__ */ e(fe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ g(B, { gap: 24, children: [
1024
1020
  /* @__PURE__ */ g(B, { gap: 8, children: [
1025
- /* @__PURE__ */ e(y, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
1026
- /* @__PURE__ */ e(pe, { data: S, height: 16 }),
1027
- /* @__PURE__ */ e(y, { variant: "Small", children: R(
1021
+ /* @__PURE__ */ e(y, { bold: !0, sx: { mb: 8 }, variant: "body1", children: s.spending_title }),
1022
+ /* @__PURE__ */ e(ge, { data: S, height: 16 }),
1023
+ /* @__PURE__ */ e(y, { variant: "body2", children: R(
1028
1024
  s.spending_description,
1029
- T(p, "0,0"),
1025
+ T(b, "0,0"),
1030
1026
  T(m, "0,0")
1031
1027
  ) })
1032
1028
  ] }),
1033
1029
  /* @__PURE__ */ g(B, { gap: 8, children: [
1034
1030
  /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
1035
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: s.income_title }),
1031
+ /* @__PURE__ */ e(y, { bold: !0, variant: "body1", children: s.income_title }),
1036
1032
  /* @__PURE__ */ e(
1037
- st,
1033
+ rt,
1038
1034
  {
1039
1035
  "aria-label": n.manage_income,
1040
- onClick: v,
1036
+ onClick: A,
1041
1037
  sx: { p: 0 },
1042
- children: /* @__PURE__ */ e(P, { color: "primary", name: "edit" })
1038
+ children: /* @__PURE__ */ e(G, { color: "primary", name: "edit" })
1043
1039
  }
1044
1040
  )
1045
1041
  ] }),
1046
- /* @__PURE__ */ e(pe, { data: C, height: 16 }),
1047
- /* @__PURE__ */ e(y, { variant: "Small", children: R(
1042
+ /* @__PURE__ */ e(ge, { data: f, height: 16 }),
1043
+ /* @__PURE__ */ e(y, { variant: "body2", children: R(
1048
1044
  s.income_description,
1049
- T(b, "0,0"),
1045
+ T(_, "0,0"),
1050
1046
  T(u, "0,0")
1051
1047
  ) })
1052
1048
  ] })
1053
1049
  ] }) }),
1054
1050
  /* @__PURE__ */ e(
1055
- $,
1051
+ L,
1056
1052
  {
1057
1053
  ariaLabelClose: a.close_aria,
1058
- isOpen: f,
1059
- onClose: () => h(!1),
1054
+ isOpen: h,
1055
+ onClose: () => p(!1),
1060
1056
  title: n.manage_income,
1061
- children: /* @__PURE__ */ e(it, { forOverview: !0 })
1057
+ children: /* @__PURE__ */ e(st, { forOverview: !0 })
1062
1058
  }
1063
1059
  )
1064
1060
  ] });
1065
- }), xe = 480, kn = I(({ onBackClick: t, sx: o }) => {
1066
- const i = ee(), { onEvent: s } = X(), { visibleAccounts: a } = Ae(), { budgets: n, common: r } = w(), { isCopyLoaded: c, isInitialized: d, selectedAccounts: m, setDisplayedDate: u, setSelectedAccounts: _ } = oe(), {
1067
- alert: f,
1068
- dateRange: h,
1069
- isDataLoaded: p,
1061
+ }), ve = 480, Rn = E(({ onBackClick: t, sx: o }) => {
1062
+ const i = H(), { onEvent: s } = Y(), { onLoad: a } = Ue(), { visibleAccounts: n } = pe(), { budgets: r, common: l } = w(), { isInitialized: d, selectedAccounts: m, setDisplayedDate: u, setSelectedAccounts: C } = oe(), {
1063
+ alert: h,
1064
+ dateRange: p,
1065
+ isDataLoaded: b,
1070
1066
  loadBudgetData: S,
1071
- setDateRange: b,
1072
- setAlert: C,
1073
- setTheme: v,
1074
- detailedBudgets: A
1075
- } = D(), { loadRepeatingTransactions: x, setDateRange: E } = te(), { reloadCategoryTotals: M } = U(), { isSmallTablet: N, isMobile: F, isSmallMobile: le } = ie(), L = N || F || le, [ke, de] = l.useState(!1);
1076
- l.useEffect(() => (v(i), _(a), b({ start: J(q()), end: ge(q()) }), s(k.BUDGETS_VIEW), () => {
1077
- b({ start: J(q()), end: ge(q()) });
1078
- }), []), l.useEffect(() => {
1079
- _(a);
1080
- }, [a]), l.useEffect(() => {
1081
- d && (u(h.start, h.end), M(m, h.start, h.end).finally(), E(h), p || (x().finally(), S().finally()));
1082
- }, [d, m, h]);
1083
- const $e = (ye) => {
1084
- b({ start: ye[0] || /* @__PURE__ */ new Date(), end: ye[1] || /* @__PURE__ */ new Date() });
1067
+ setDateRange: _,
1068
+ setAlert: f,
1069
+ setTheme: A,
1070
+ detailedBudgets: v
1071
+ } = D(), { setDateRange: x } = te(), { reloadCategoryTotals: I } = V(), { isSmallTablet: M, isMobile: N, isSmallMobile: z } = ie(), $ = M || N || z, [U, le] = c.useState(!1);
1072
+ c.useEffect(() => {
1073
+ A(i), S().finally(() => {
1074
+ s(k.BUDGETS_VIEW), a?.("BubbleBudgetsWidget");
1075
+ });
1076
+ }, []), c.useEffect(() => (C(n), _({ start: Q(J()), end: me(J()) }), () => {
1077
+ _({ start: Q(J()), end: me(J()) });
1078
+ }), [n]), c.useEffect(() => {
1079
+ d && (u(p.start, p.end), I(m, p.start, p.end).finally(), x(p));
1080
+ }, [d, m, p]);
1081
+ const Le = (_e) => {
1082
+ _({ start: _e[0] || /* @__PURE__ */ new Date(), end: _e[1] || /* @__PURE__ */ new Date() });
1085
1083
  }, Ne = () => {
1086
1084
  s(k.BUDGETS_CLICK_FILTER);
1087
- }, be = () => {
1088
- de(!0), s(k.BUDGETS_CLICK_ADD);
1089
- }, Pe = () => {
1090
- de(!1);
1091
- }, Ge = qe(h.end, J(/* @__PURE__ */ new Date()));
1092
- return !c || !d || !p ? /* @__PURE__ */ e(z, {}) : /* @__PURE__ */ g(
1085
+ }, ye = () => {
1086
+ le(!0), s(k.BUDGETS_CLICK_ADD);
1087
+ }, $e = () => {
1088
+ le(!1);
1089
+ }, Ge = Ze(p.end, Q(/* @__PURE__ */ new Date()));
1090
+ return !d || !b ? /* @__PURE__ */ e(he, {}) : /* @__PURE__ */ g(
1093
1091
  Ve,
1094
1092
  {
1095
- accountOptions: a,
1093
+ accountOptions: n,
1096
1094
  actions: [
1097
1095
  {
1098
1096
  iconName: "add",
1099
- label: n.add_title,
1100
- onClick: be
1097
+ label: r.add_title,
1098
+ onClick: ye
1101
1099
  }
1102
1100
  ],
1103
1101
  calendarActions: {
1104
- onRangeChanged: $e,
1102
+ onRangeChanged: Le,
1105
1103
  shouldDisableNext: Ge,
1106
1104
  shouldDisablePicker: !0
1107
1105
  },
1108
1106
  onAccountsFilterClick: Ne,
1109
1107
  onBackClick: t,
1110
1108
  sx: o,
1111
- title: n.budgets_title,
1109
+ title: r.budgets_title,
1112
1110
  children: [
1113
- (!d || !p) && /* @__PURE__ */ e(z, {}),
1114
- d && p && /* @__PURE__ */ g(
1111
+ /* @__PURE__ */ g(
1115
1112
  B,
1116
1113
  {
1117
- direction: L ? "column" : "row",
1114
+ direction: $ ? "column" : "row",
1118
1115
  height: "100%",
1119
1116
  sx: { justifyContent: "center" },
1120
1117
  width: "100%",
1121
1118
  children: [
1122
- /* @__PURE__ */ e(B, { height: L ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1119
+ /* @__PURE__ */ e(B, { height: $ ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1123
1120
  Re,
1124
1121
  {
1125
- createBudgetOnClick: be,
1126
- height: L ? 450 : 800,
1122
+ createBudgetOnClick: ye,
1123
+ height: $ ? 450 : 800,
1127
1124
  isDraggable: !0,
1128
- shouldShowZeroState: A.length === 0,
1129
- unavailableWidth: L ? 0 : xe
1125
+ shouldShowZeroState: v.length === 0,
1126
+ unavailableWidth: $ ? 0 : ve
1130
1127
  }
1131
1128
  ) }),
1132
- A.length !== 0 && /* @__PURE__ */ g(
1129
+ v.length !== 0 && /* @__PURE__ */ g(
1133
1130
  B,
1134
1131
  {
1135
1132
  gap: 24,
1136
1133
  height: "100%",
1137
1134
  sx: { mr: 24, mt: 48 },
1138
- width: L ? "100%" : xe,
1135
+ width: $ ? "100%" : ve,
1139
1136
  children: [
1140
1137
  /* @__PURE__ */ e(Nt, {}),
1141
- /* @__PURE__ */ e($t, {})
1138
+ /* @__PURE__ */ e(Lt, {})
1142
1139
  ]
1143
1140
  }
1144
1141
  )
1145
1142
  ]
1146
1143
  }
1147
1144
  ),
1148
- /* @__PURE__ */ e(Lt, {}),
1145
+ /* @__PURE__ */ e(Rt, {}),
1149
1146
  /* @__PURE__ */ e(
1150
- $,
1147
+ L,
1151
1148
  {
1152
- ariaLabelClose: r.close_aria,
1153
- isOpen: ke,
1154
- onClose: () => de(!1),
1155
- title: n.add_new_title,
1156
- children: /* @__PURE__ */ e(Ee, { onRecalculateBudgets: Pe })
1149
+ ariaLabelClose: l.close_aria,
1150
+ isOpen: U,
1151
+ onClose: () => le(!1),
1152
+ title: r.add_new_title,
1153
+ children: /* @__PURE__ */ e(Ie, { onRecalculateBudgets: $e })
1157
1154
  }
1158
1155
  ),
1159
1156
  /* @__PURE__ */ e(
1160
- Qe,
1157
+ Je,
1161
1158
  {
1162
1159
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
1163
1160
  autoHideDuration: 3500,
1164
1161
  onClose: () => {
1165
- C("");
1162
+ f("");
1166
1163
  },
1167
- open: !!f,
1164
+ open: !!h,
1168
1165
  children: /* @__PURE__ */ e(
1169
- Je,
1166
+ qe,
1170
1167
  {
1171
1168
  onClose: () => {
1172
- C("");
1169
+ f("");
1173
1170
  },
1174
1171
  severity: "success",
1175
1172
  variant: "filled",
1176
- children: f
1173
+ children: h
1177
1174
  }
1178
1175
  )
1179
1176
  }
@@ -1183,6 +1180,6 @@ const vt = ({
1183
1180
  );
1184
1181
  });
1185
1182
  export {
1186
- Ln as BubbleBudgetsMiniWidget,
1187
- kn as BubbleBudgetsWidget
1183
+ Mn as BubbleBudgetsMiniWidget,
1184
+ Rn as BubbleBudgetsWidget
1188
1185
  };