@mx-cartographer/experiences 8.1.12 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-CMjOp7S2.mjs → Account-BaJmiJAG.mjs} +4 -4
  3. package/dist/{Account-BIKn4XEZ.mjs → Account-BxHMlV9R.mjs} +1 -1
  4. package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-CfdnKyJK.mjs} +21 -21
  5. package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-CAy0x_4i.mjs} +6 -6
  6. package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-BYyeeCf6.mjs} +7 -7
  7. package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-T5_Odvos.mjs} +1 -1
  8. package/dist/{Analytics-CxK7O19c.mjs → Analytics-CkYXKvco.mjs} +1 -1
  9. package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
  10. package/dist/BudgetUtil-Bg2AQJpQ.mjs +74 -0
  11. package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
  12. package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-Cu1ohxeM.mjs} +2 -2
  13. package/dist/{Connect-CBBTL1HJ.mjs → Connect-Dk6GZEsA.mjs} +1 -1
  14. package/dist/ConnectCard-Dix8BoV_.mjs +54 -0
  15. package/dist/{ConnectDrawer-DNnuF80E.mjs → ConnectDrawer-DgfsTpyW.mjs} +2 -2
  16. package/dist/{ConnectionsDrawer-DX6d7uwJ.mjs → ConnectionsDrawer-D7IXAza2.mjs} +2 -2
  17. package/dist/CurrencyDialog-d4dL7vA5.mjs +371 -0
  18. package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-B59ugxPN.mjs} +15 -16
  19. package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
  20. package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-HudZ3Bjs.mjs} +6 -7
  21. package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bhq59ZVg.mjs} +1 -1
  22. package/dist/DebtUtils-DD3186U-.mjs +153 -0
  23. package/dist/EmbeddedCard-BNl3quCs.mjs +856 -0
  24. package/dist/Error-Dogaw2jO.mjs +84 -0
  25. package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
  26. package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-hDprC41l.mjs} +6 -5
  27. package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
  28. package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
  29. package/dist/GoalsUtil-C9EnLWvC.mjs +107 -0
  30. package/dist/{Help-C_CM4gpK.mjs → Help-BSQm9o29.mjs} +68 -67
  31. package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
  32. package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
  33. package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-CejWS_rh.mjs} +2 -2
  34. package/dist/{ListItemAction-CNpknVvo.mjs → ListItemAction-DGjHxNDJ.mjs} +1 -1
  35. package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
  36. package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
  37. package/dist/Localization-DnoVyBNK.mjs +38 -0
  38. package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-DwylSiWs.mjs} +51 -51
  39. package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
  40. package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
  41. package/dist/NetWorthUtils-DilGN1nW.mjs +95 -0
  42. package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-CCg-Tml2.mjs} +13 -13
  43. package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
  44. package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
  45. package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-CvDx0K6k.mjs} +4 -4
  46. package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-CPXLW6AR.mjs} +9 -9
  47. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +253 -0
  48. package/dist/Select-BZRUpOib.mjs +51 -0
  49. package/dist/SelectionBox-Bx2a5rh4.mjs +48 -0
  50. package/dist/Sizes-DISGrlUg.mjs +6 -0
  51. package/dist/{SpendingData-Dj85XEUp.mjs → SpendingData-PKlh8caU.mjs} +6 -6
  52. package/dist/{SpendingLegend-BS8mHUbu.mjs → SpendingLegend-BmkEr9Nh.mjs} +4 -4
  53. package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-CbBSxdOi.mjs} +33 -33
  54. package/dist/TransactionUtils-BphBJBbU.mjs +234 -0
  55. package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
  56. package/dist/UserStore-CRpKQjpP.mjs +3002 -0
  57. package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-K69RRs_b.mjs} +28 -30
  58. package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-DalWyz5A.mjs} +3 -3
  59. package/dist/accounts/hooks/useUiStore.d.ts +6 -1
  60. package/dist/accounts/index.d.ts +0 -1
  61. package/dist/accounts/index.es.js +62 -64
  62. package/dist/analytics/index.es.js +2 -2
  63. package/dist/budgets/index.es.js +18 -18
  64. package/dist/cashflow/context/hooks.d.ts +15 -1
  65. package/dist/cashflow/index.d.ts +0 -1
  66. package/dist/cashflow/index.es.js +28 -31
  67. package/dist/categories/context/hooks.d.ts +19 -1
  68. package/dist/categories/index.d.ts +0 -1
  69. package/dist/categories/index.es.js +4 -6
  70. package/dist/common/constants/ScheduledPayment.d.ts +1 -1
  71. package/dist/common/constants/index.d.ts +0 -3
  72. package/dist/common/context/GlobalDataProvider.d.ts +1 -1
  73. package/dist/common/context/hooks.d.ts +20 -20
  74. package/dist/common/index.d.ts +3 -1
  75. package/dist/common/index.es.js +215 -961
  76. package/dist/common/utils/AccountFilter.d.ts +1 -1
  77. package/dist/common/utils/index.d.ts +0 -4
  78. package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
  79. package/dist/core/constants/Transaction.d.ts +10 -0
  80. package/dist/core/constants/index.d.ts +2 -0
  81. package/dist/core/index.d.ts +1 -1
  82. package/dist/core/index.es.js +94 -79
  83. package/dist/{accounts → core}/stores/AccountStore.d.ts +14 -4
  84. package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
  85. package/dist/{common → core}/stores/AppDataStore.d.ts +4 -5
  86. package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
  87. package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +3 -4
  88. package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
  89. package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -4
  90. package/dist/{common → core}/stores/ConnectStore.d.ts +2 -2
  91. package/dist/core/stores/DebtsStore.d.ts +22 -0
  92. package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +4 -4
  93. package/dist/{common → core}/stores/GlobalCopyStore.d.ts +2 -2
  94. package/dist/{common → core}/stores/GlobalStore.d.ts +2 -25
  95. package/dist/{common → core}/stores/GlobalUiStore.d.ts +3 -3
  96. package/dist/{goals → core}/stores/GoalStore.d.ts +3 -3
  97. package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -6
  98. package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -4
  99. package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -3
  100. package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -4
  101. package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -3
  102. package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -3
  103. package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -5
  104. package/dist/{transactions → core}/stores/TransactionStore.d.ts +27 -6
  105. package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -5
  106. package/dist/{common → core}/stores/UserStore.d.ts +2 -2
  107. package/dist/core/stores/index.d.ts +24 -0
  108. package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
  109. package/dist/core/types/Offer.d.ts +32 -0
  110. package/dist/core/types/index.d.ts +3 -1
  111. package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +1 -1
  112. package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
  113. package/dist/{budgets → core}/utils/BudgetUtil.d.ts +2 -2
  114. package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
  115. package/dist/core/utils/DebtUtils.d.ts +31 -0
  116. package/dist/core/utils/FinstrongUtils.d.ts +7 -0
  117. package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
  118. package/dist/core/utils/HelpUtil.d.ts +3 -0
  119. package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
  120. package/dist/core/utils/Localization.d.ts +3 -0
  121. package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
  122. package/dist/{notifications → core}/utils/NotificationUtils.d.ts +1 -1
  123. package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
  124. package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +1 -1
  125. package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
  126. package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
  127. package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
  128. package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +1 -1
  129. package/dist/core/utils/index.d.ts +1 -1
  130. package/dist/dashboard/index.es.js +4 -4
  131. package/dist/debts/components/DebtsChart.d.ts +1 -1
  132. package/dist/debts/components/DebtsTable.d.ts +1 -1
  133. package/dist/debts/components/SnowballCard.d.ts +1 -1
  134. package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
  135. package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
  136. package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
  137. package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
  138. package/dist/debts/index.d.ts +0 -1
  139. package/dist/debts/index.es.js +568 -691
  140. package/dist/debts/utils/DebtsTable.d.ts +1 -1
  141. package/dist/debts/utils/SnowballCard.d.ts +2 -2
  142. package/dist/finstrong/index.d.ts +0 -1
  143. package/dist/finstrong/index.es.js +1565 -1342
  144. package/dist/finstrong/util/finstrongUtils.d.ts +1 -7
  145. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
  146. package/dist/goals/index.d.ts +0 -1
  147. package/dist/goals/index.es.js +71 -73
  148. package/dist/help/index.es.js +4 -4
  149. package/dist/help/utils/index.d.ts +0 -1
  150. package/dist/{hooks-RzCoiTd0.mjs → hooks-BaO_gOI6.mjs} +17 -17
  151. package/dist/insights/index.d.ts +0 -1
  152. package/dist/insights/index.es.js +52 -54
  153. package/dist/investments/components/AnalysisDetails.d.ts +1 -1
  154. package/dist/investments/index.es.js +6 -6
  155. package/dist/merchants/index.d.ts +0 -1
  156. package/dist/merchants/index.es.js +12 -14
  157. package/dist/microinsights/index.es.js +1 -1
  158. package/dist/microinsights/interfaces.d.ts +1 -33
  159. package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
  160. package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
  161. package/dist/networth/components/NetWorthChange.d.ts +1 -1
  162. package/dist/networth/components/NetWorthListItem.d.ts +1 -1
  163. package/dist/networth/components/NetWorthSummary.d.ts +1 -1
  164. package/dist/networth/index.d.ts +0 -4
  165. package/dist/networth/index.es.js +232 -237
  166. package/dist/notifications/index.d.ts +0 -2
  167. package/dist/notifications/index.es.js +23 -26
  168. package/dist/recurringtransactions/index.d.ts +0 -1
  169. package/dist/recurringtransactions/index.es.js +92 -96
  170. package/dist/settings/index.d.ts +0 -1
  171. package/dist/settings/index.es.js +11 -13
  172. package/dist/spending/index.es.js +10 -10
  173. package/dist/transactions/context/hooks.d.ts +1 -1
  174. package/dist/transactions/index.d.ts +0 -4
  175. package/dist/transactions/index.es.js +102 -109
  176. package/dist/trends/index.d.ts +0 -1
  177. package/dist/trends/index.es.js +67 -68
  178. package/dist/trends/utils/shared.d.ts +1 -1
  179. package/dist/{useAccountDisplayName-pliH6hz0.mjs → useAccountDisplayName-CFa_MrS6.mjs} +1 -1
  180. package/dist/{useInsightsEnabled-CzJoG8xi.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
  181. package/dist/{useWidgetLoadTimer-BZjr-BiE.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
  182. package/package.json +1 -1
  183. package/dist/AccountApi-WEM2M9tg.mjs +0 -19
  184. package/dist/AccountStore-CGrjC2Oe.mjs +0 -253
  185. package/dist/ApiEndpoints-C5IA97i7.mjs +0 -118
  186. package/dist/BeatApi-C6pBa0Rb.mjs +0 -21
  187. package/dist/BeatStore-C7-PIhpB.mjs +0 -163
  188. package/dist/BudgetUtil-H9igoNVm.mjs +0 -479
  189. package/dist/CashflowStore-BEi92kJg.mjs +0 -91
  190. package/dist/CategoryApi-CogDFScz.mjs +0 -29
  191. package/dist/CategoryStore-CA4NTaKH.mjs +0 -160
  192. package/dist/CategoryUtil-BJOHgYKS.mjs +0 -80
  193. package/dist/DebtsStore-BJlC2-yO.mjs +0 -63
  194. package/dist/EmbeddedCard-B9JoBaan.mjs +0 -811
  195. package/dist/FinstrongApi-FpmsS_sy.mjs +0 -19
  196. package/dist/FinstrongStore-DYawCv1d.mjs +0 -435
  197. package/dist/GlobalCopyApi-DkS-2Zf_.mjs +0 -41
  198. package/dist/Goal-MFBpoOIC.mjs +0 -29
  199. package/dist/GoalStore-BBAEbf43.mjs +0 -395
  200. package/dist/Localization-C_HZg9tJ.mjs +0 -15
  201. package/dist/Localization-CkQ49EKr.mjs +0 -26
  202. package/dist/MerchantApi-D8ahYxiG.mjs +0 -15
  203. package/dist/MerchantStore-CyZTv-BM.mjs +0 -26
  204. package/dist/NetWorthStore-BY-B_hxy.mjs +0 -168
  205. package/dist/NotificationApi-DF0obHoR.mjs +0 -20
  206. package/dist/NotificationStore-DlAM5Ue0.mjs +0 -69
  207. package/dist/RecurringTransactions-DCt94TN4.mjs +0 -297
  208. package/dist/RecurringTransactionsStore-CFJYC7lI.mjs +0 -264
  209. package/dist/RepeatingTransaction-D2gmBTd0.mjs +0 -7
  210. package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +0 -17
  211. package/dist/SettingsApi-D9d7SLhB.mjs +0 -22
  212. package/dist/SettingsStore-BcbuKfFO.mjs +0 -250
  213. package/dist/Transaction-Cn5_iFm0.mjs +0 -5
  214. package/dist/TransactionApi-CLG2eSNe.mjs +0 -86
  215. package/dist/TransactionStore-amPYxHnA.mjs +0 -710
  216. package/dist/TrendsStore-bYjIGqyR.mjs +0 -183
  217. package/dist/WidgetApi-C0BA2cFX.mjs +0 -102
  218. package/dist/accounts/stores/UiStore.d.ts +0 -10
  219. package/dist/accounts/utils/index.d.ts +0 -1
  220. package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
  221. package/dist/categories/stores/UiStore.d.ts +0 -20
  222. package/dist/common/stores/index.d.ts +0 -3
  223. package/dist/common/utils/Categories.d.ts +0 -6
  224. package/dist/common/utils/Localization.d.ts +0 -3
  225. package/dist/debts/store/DebtsStore.d.ts +0 -10
  226. package/dist/debts/store/DebtsUiStore.d.ts +0 -13
  227. package/dist/debts/utils/DebtStore.d.ts +0 -4
  228. package/dist/debts/utils/DebtsWidget.d.ts +0 -20
  229. package/dist/debts/utils/shared.d.ts +0 -12
  230. package/dist/exportTransactionsToCSV-CSvbZrvL.mjs +0 -133
  231. package/dist/help/constants/index.d.ts +0 -1
  232. package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
  233. package/dist/transactions/analytics.d.ts +0 -3
  234. package/dist/transactions/constants/Transaction.d.ts +0 -2
  235. package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
  236. package/dist/transactions/stores/UiStore.d.ts +0 -25
  237. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
  238. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
  239. /package/dist/{common → core}/constants/Category.d.ts +0 -0
  240. /package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
  241. /package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
  242. /package/dist/{help → core}/constants/Help.d.ts +0 -0
  243. /package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
  244. /package/dist/{common → core}/constants/Numbers.d.ts +0 -0
  245. /package/dist/{common → core}/constants/Table.d.ts +0 -0
  246. /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
@@ -1,65 +1,116 @@
1
- import { jsx as t, jsxs as r, Fragment as D } from "react/jsx-runtime";
2
- import { fromUnixTime as rt } from "date-fns/fromUnixTime";
3
- import { observer as _ } from "mobx-react-lite";
4
- import it from "@mui/material/Stack/Stack";
5
- import { useTheme as z } from "@mui/material/styles";
6
- import { L as at } from "../LineChart-CeZnCZ7j.mjs";
7
- import { u as Y } from "../useScreenSize-CeFhWTt_.mjs";
8
- import { p as st, q as R, u as E, g as G, d as ct, b as q } from "../hooks-RzCoiTd0.mjs";
9
- import { f as lt, D as mt } from "../DateFormats-CaOj_4eI.mjs";
1
+ import { jsxs as r, jsx as e, Fragment as N } from "react/jsx-runtime";
10
2
  import u from "react";
11
- import dt from "@mui/material/Button";
3
+ import { observer as _ } from "mobx-react-lite";
4
+ import m from "@mui/material/Stack";
5
+ import { P as Y, Text as d, Icon as H } from "@mxenabled/mxui";
6
+ import { Icon as Z } from "@mxenabled/mx-icons";
7
+ import { f as F } from "../NumberFormatting--XMeeBfr.mjs";
8
+ import { d as re, g as z, u as E, b as q, x as R, D as ie } from "../hooks-BaO_gOI6.mjs";
9
+ import { u as J } from "../useWidgetLoadTimer-CJb-RELP.mjs";
10
+ import { A as v } from "../Analytics-CzGzz_sE.mjs";
11
+ import { L as Q } from "../Loader-CxeBwuPG.mjs";
12
+ import { M as ae } from "../MicroWidgetContainer-CfKdQfhi.mjs";
13
+ import { format as se, fromUnixTime as ce, differenceInMonths as le } from "date-fns";
14
+ import P from "@mui/material/Box";
15
+ import { C as de } from "../ConnectionsDrawer-D7IXAza2.mjs";
16
+ import { fromUnixTime as me } from "date-fns/fromUnixTime";
17
+ import he from "@mui/material/Stack/Stack";
18
+ import { useTheme as G } from "@mui/material/styles";
19
+ import { L as pe } from "../LineChart-CejWS_rh.mjs";
20
+ import { u as ee } from "../useScreenSize-CeFhWTt_.mjs";
21
+ import { f as ue, D as fe } from "../DateFormats-HudZ3Bjs.mjs";
22
+ import xe from "@mui/material/Button";
12
23
  import L from "@mui/material/Divider";
13
24
  import j from "@mui/material/List";
14
25
  import A from "@mui/material/ListSubheader";
15
- import d from "@mui/material/Stack";
16
- import { Text as m, Icon as H, P as Z } from "@mxenabled/mxui";
17
26
  import O from "@mui/material/ListItem";
18
- import J from "@mui/material/ListItemButton";
27
+ import te from "@mui/material/ListItemButton";
19
28
  import b from "@mui/material/ListItemText";
20
- import { j as Q } from "../DateUtil-D0TO0DaZ.mjs";
21
- import { C as x } from "../CurrencyText-oqd6cX3M.mjs";
22
- import P from "@mui/material/styles/useTheme";
23
- import { Stack as ht } from "@mui/material";
24
- import tt from "@mui/material/Box";
25
- import pt from "@mui/material/Collapse";
26
- import F from "@mui/material/ListItemIcon";
27
- import { g as K } from "../NetWorthStore-BY-B_hxy.mjs";
28
- import { N as Se } from "../NetWorthStore-BY-B_hxy.mjs";
29
- import { D as U } from "../Drawer-XPaLYjiO.mjs";
30
- import { A as v } from "../Analytics-CzGzz_sE.mjs";
31
- import { format as ut, fromUnixTime as ft, differenceInMonths as xt } from "date-fns";
32
- import { Icon as et } from "@mxenabled/mx-icons";
33
- import { f as V } from "../NumberFormatting-CyrvFgfd.mjs";
34
- import { u as nt } from "../useWidgetLoadTimer-BZjr-BiE.mjs";
35
- import { L as ot } from "../Loader-CxeBwuPG.mjs";
36
- import { M as gt } from "../MicroWidgetContainer-DAesImQ6.mjs";
37
- import { C as yt } from "../ConnectionsDrawer-DX6d7uwJ.mjs";
38
- import { W as Ct } from "../WidgetContainer-BPJoDkhL.mjs";
39
- import { E as bt } from "../EmptyState-DHAkGsjk.mjs";
40
- const _t = () => {
41
- const { isMobile: e } = Y(), { availableWidth: s } = st(), i = z(), {
29
+ import { j as ne } from "../DateUtil-Bhq59ZVg.mjs";
30
+ import { C as x } from "../CurrencyText-CCbE6MmF.mjs";
31
+ import oe from "@mui/material/styles/useTheme";
32
+ import { Stack as ge } from "@mui/material";
33
+ import ye from "@mui/material/Collapse";
34
+ import K from "@mui/material/ListItemIcon";
35
+ import { g as U } from "../NetWorthUtils-DilGN1nW.mjs";
36
+ import { D as V } from "../Drawer-XPaLYjiO.mjs";
37
+ import { W as Ce } from "../WidgetContainer-DalWyz5A.mjs";
38
+ import { E as be } from "../EmptyState-DHAkGsjk.mjs";
39
+ const _e = ({ amount: t, copy: s, trendValue: i }) => {
40
+ const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
41
+ return /* @__PURE__ */ r(m, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
42
+ /* @__PURE__ */ e(Y, { variant: "h1", children: F(t, "0,0") }),
43
+ t !== 0 && /* @__PURE__ */ r(m, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
44
+ /* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 8 }, children: [
45
+ /* @__PURE__ */ e(Z, { name: o, size: 20 }),
46
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: F(i, "0,0.00") })
47
+ ] }),
48
+ /* @__PURE__ */ e(d, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: s.this_month })
49
+ ] })
50
+ ] });
51
+ }, we = ({ copy: t }) => /* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 12 }, children: [
52
+ /* @__PURE__ */ e(Z, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
53
+ /* @__PURE__ */ r(m, { children: [
54
+ /* @__PURE__ */ e(d, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: t.empty_widget_header }),
55
+ /* @__PURE__ */ e(Y, { sx: { color: "text.secondary" }, variant: "body2", children: t.zero_state_description })
56
+ ] })
57
+ ] }), _t = _(({ onCTAClick: t }) => {
58
+ const { visibleAccounts: s } = re(), { onEvent: i } = z(), { net_worth: n, common: a } = E(), { isInitialized: o } = q(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: g, selectedData: f } = R();
59
+ if (u.useEffect(() => {
60
+ c || l().finally();
61
+ }, []), J({
62
+ widgetName: "NetWorthMicroWidget",
63
+ isLoaded: c
64
+ }), u.useEffect(() => {
65
+ c && i(v.NET_WORTH_LOAD_WIDGET, {
66
+ state: s?.length ? "default" : "zeroState"
67
+ });
68
+ }, [c]), !o || !c) return /* @__PURE__ */ e(Q, { height: 100 });
69
+ const S = () => {
70
+ i(
71
+ s.length ? v.NET_WORTH_CLICK_VIEW_DETAILS : v.NET_WORTH_CLICK_GET_STARTED
72
+ ), t();
73
+ };
74
+ return /* @__PURE__ */ e(
75
+ ae,
76
+ {
77
+ className: "mx-networth-microwidget",
78
+ ctaLabel: a.see_details,
79
+ onCTAClick: S,
80
+ title: n.net_worth,
81
+ children: g.accounts.length ? /* @__PURE__ */ e(
82
+ _e,
83
+ {
84
+ amount: f?.y,
85
+ copy: n,
86
+ trendValue: f?.change
87
+ }
88
+ ) : /* @__PURE__ */ e(we, { copy: n })
89
+ }
90
+ );
91
+ }), ve = () => {
92
+ const { isMobile: t } = ee(), { availableWidth: s } = ie(), i = G(), {
42
93
  hoveredData: n,
43
94
  netWorthChartData: a,
44
95
  selectedData: o,
45
96
  setHoveredIndex: c,
46
97
  setSelectedIndex: l
47
98
  } = R(), g = s - 320, f = a.map((h) => ({
48
- x: lt(rt(h.x), mt.MONTH_SHORT),
99
+ x: ue(me(h.x), fe.MONTH_SHORT),
49
100
  y: h.y
50
- })), W = o ? { index: a.findIndex((h) => h.x === o.x) } : void 0, S = n ? { index: a.findIndex((h) => h.x === n.x) } : void 0, w = (h) => ({
51
- fill: h === W?.index ? i.palette.success.main : "",
52
- filter: h === S?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
101
+ })), S = o ? { index: a.findIndex((h) => h.x === o.x) } : void 0, W = n ? { index: a.findIndex((h) => h.x === n.x) } : void 0, w = (h) => ({
102
+ fill: h === S?.index ? i.palette.success.main : "",
103
+ filter: h === W?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
53
104
  stroke: i.palette.success.main
54
105
  }), y = (h, M) => {
55
106
  l(M);
56
107
  }, k = (h) => {
57
108
  c(h);
58
- }, N = () => {
109
+ }, D = () => {
59
110
  c(-1);
60
111
  };
61
- return /* @__PURE__ */ t(it, { sx: { width: "100%" }, children: /* @__PURE__ */ t(
62
- at,
112
+ return /* @__PURE__ */ e(he, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
113
+ pe,
63
114
  {
64
115
  baseline: "min",
65
116
  chartFor: "networthChart",
@@ -70,16 +121,16 @@ const _t = () => {
70
121
  height: 350,
71
122
  labels: [],
72
123
  margin: { right: 20, left: 38 },
73
- markHandlers: { onMarkClick: y, onMouseEnter: k, onMouseLeave: N },
124
+ markHandlers: { onMarkClick: y, onMouseEnter: k, onMouseLeave: D },
74
125
  markStyles: w,
75
126
  showArea: !0,
76
127
  useCustomMark: !0,
77
128
  valueFormatterString: "0.0[0]a",
78
- width: e ? s - 48 : g
129
+ width: t ? s - 48 : g
79
130
  }
80
131
  ) });
81
- }, wt = _(_t), vt = ({
82
- item: e,
132
+ }, Se = _(ve), We = ({
133
+ item: t,
83
134
  getStyles: s,
84
135
  isHovered: i = !1,
85
136
  isSelected: n = !1,
@@ -91,9 +142,9 @@ const _t = () => {
91
142
  color: ""
92
143
  });
93
144
  return u.useEffect(() => {
94
- g(s(e));
145
+ g(s(t));
95
146
  }, [i, n]), /* @__PURE__ */ r(u.Fragment, { children: [
96
- /* @__PURE__ */ t(
147
+ /* @__PURE__ */ e(
97
148
  O,
98
149
  {
99
150
  sx: {
@@ -101,19 +152,19 @@ const _t = () => {
101
152
  minHeight: 44,
102
153
  "&:hover": { color: n ? "inherit" : l.color }
103
154
  },
104
- children: /* @__PURE__ */ t(
105
- J,
155
+ children: /* @__PURE__ */ e(
156
+ te,
106
157
  {
107
- onClick: (f) => a?.(f, e.x),
108
- onMouseEnter: () => o(e.x),
158
+ onClick: (f) => a?.(f, t.x),
159
+ onMouseEnter: () => o(t.x),
109
160
  onMouseLeave: () => c(),
110
161
  sx: { minHeight: 20, padding: 12 },
111
- children: /* @__PURE__ */ t(
162
+ children: /* @__PURE__ */ e(
112
163
  b,
113
164
  {
114
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
115
- /* @__PURE__ */ t(m, { variant: "body1", children: Q(e.x) }),
116
- /* @__PURE__ */ t(x, { amount: e.y, sx: { color: "inherit" }, variant: "body1" })
165
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
166
+ /* @__PURE__ */ e(d, { variant: "body1", children: ne(t.x) }),
167
+ /* @__PURE__ */ e(x, { amount: t.y, sx: { color: "inherit" }, variant: "body1" })
117
168
  ] })
118
169
  }
119
170
  )
@@ -121,18 +172,18 @@ const _t = () => {
121
172
  )
122
173
  }
123
174
  ),
124
- /* @__PURE__ */ t(L, {})
125
- ] }, e.x);
126
- }, Wt = _(vt), St = ({
127
- currencyLabel: e,
175
+ /* @__PURE__ */ e(L, {})
176
+ ] }, t.x);
177
+ }, Te = _(We), Ie = ({
178
+ currencyLabel: t,
128
179
  currencyVariant: s = "body2",
129
180
  iconSize: i,
130
181
  netWorth: n,
131
182
  theme: a
132
183
  }) => {
133
184
  let o = a.palette.secondary.main, c = a.palette.secondary.main, l = "trending_flat";
134
- return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = a.palette.success.main, c = a.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(ht, { alignItems: "center", direction: "row", spacing: 4, children: [
135
- /* @__PURE__ */ t(
185
+ return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = a.palette.success.main, c = a.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(ge, { alignItems: "center", direction: "row", spacing: 4, children: [
186
+ /* @__PURE__ */ e(
136
187
  H,
137
188
  {
138
189
  name: l,
@@ -142,40 +193,40 @@ const _t = () => {
142
193
  }
143
194
  }
144
195
  ),
145
- /* @__PURE__ */ t(x, { amount: n.change, color: c, variant: s }),
146
- /* @__PURE__ */ t(m, { variant: "body2", children: e })
196
+ /* @__PURE__ */ e(x, { amount: n.change, color: c, variant: s }),
197
+ /* @__PURE__ */ e(d, { variant: "body2", children: t })
147
198
  ] });
148
- }, B = _(St), Tt = ({
149
- netWorth: e,
199
+ }, B = _(Ie), Le = ({
200
+ netWorth: t,
150
201
  gains: s,
151
202
  losses: i,
152
203
  totalGains: n,
153
204
  totalLosses: a
154
205
  }) => {
155
- const { net_worth: o } = E(), c = P();
156
- return /* @__PURE__ */ r(D, { children: [
157
- /* @__PURE__ */ r(d, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
158
- /* @__PURE__ */ t(m, { variant: "body2", children: Q(e?.x) }),
159
- /* @__PURE__ */ t(m, { variant: "body1", children: o.total_change }),
160
- e && /* @__PURE__ */ t(B, { currencyVariant: "h1", iconSize: 32, netWorth: e, theme: c })
206
+ const { net_worth: o } = E(), c = oe();
207
+ return /* @__PURE__ */ r(N, { children: [
208
+ /* @__PURE__ */ r(m, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
209
+ /* @__PURE__ */ e(d, { variant: "body2", children: ne(t?.x) }),
210
+ /* @__PURE__ */ e(d, { variant: "body1", children: o.total_change }),
211
+ t && /* @__PURE__ */ e(B, { currencyVariant: "h1", iconSize: 32, netWorth: t, theme: c })
161
212
  ] }),
162
213
  /* @__PURE__ */ r(j, { children: [
163
- /* @__PURE__ */ t(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
214
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
164
215
  b,
165
216
  {
166
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", children: [
167
- /* @__PURE__ */ t(m, { sx: { fontWeight: 700 }, variant: "caption", children: o.gains }),
168
- /* @__PURE__ */ t(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
217
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
218
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.gains }),
219
+ /* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
169
220
  ] })
170
221
  }
171
222
  ) }),
172
223
  s?.map((l) => /* @__PURE__ */ r(u.Fragment, { children: [
173
- /* @__PURE__ */ t(O, { sx: { backgroundColor: c.palette.background.paper, py: 14 }, children: /* @__PURE__ */ t(
224
+ /* @__PURE__ */ e(O, { sx: { backgroundColor: c.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
174
225
  b,
175
226
  {
176
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", children: [
177
- /* @__PURE__ */ t(m, { sx: { mr: 10 }, variant: "body1", children: l.accountName }),
178
- /* @__PURE__ */ t(
227
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
228
+ /* @__PURE__ */ e(d, { sx: { mr: 10 }, variant: "body1", children: l.accountName }),
229
+ /* @__PURE__ */ e(
179
230
  x,
180
231
  {
181
232
  amount: l.gain,
@@ -187,28 +238,28 @@ const _t = () => {
187
238
  sx: { px: 16 }
188
239
  }
189
240
  ) }),
190
- /* @__PURE__ */ t(L, {})
241
+ /* @__PURE__ */ e(L, {})
191
242
  ] }, l.accountName)),
192
- /* @__PURE__ */ t(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
243
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
193
244
  b,
194
245
  {
195
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", children: [
196
- /* @__PURE__ */ t(m, { sx: { fontWeight: 700 }, variant: "caption", children: o.losses }),
197
- /* @__PURE__ */ t(x, { amount: a, sx: { fontWeight: 400 }, variant: "caption" })
246
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
247
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.losses }),
248
+ /* @__PURE__ */ e(x, { amount: a, sx: { fontWeight: 400 }, variant: "caption" })
198
249
  ] })
199
250
  }
200
251
  ) }),
201
- i?.map((l) => /* @__PURE__ */ r(D, { children: [
202
- /* @__PURE__ */ t(
252
+ i?.map((l) => /* @__PURE__ */ r(N, { children: [
253
+ /* @__PURE__ */ e(
203
254
  O,
204
255
  {
205
256
  sx: { backgroundColor: c.palette.background.paper, py: 14 },
206
- children: /* @__PURE__ */ t(
257
+ children: /* @__PURE__ */ e(
207
258
  b,
208
259
  {
209
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", children: [
210
- /* @__PURE__ */ t(
211
- m,
260
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
261
+ /* @__PURE__ */ e(
262
+ d,
212
263
  {
213
264
  sx: {
214
265
  mr: 10
@@ -217,7 +268,7 @@ const _t = () => {
217
268
  children: l.accountName
218
269
  }
219
270
  ),
220
- /* @__PURE__ */ t(
271
+ /* @__PURE__ */ e(
221
272
  x,
222
273
  {
223
274
  amount: l.loss,
@@ -232,31 +283,31 @@ const _t = () => {
232
283
  },
233
284
  l.accountName
234
285
  ),
235
- /* @__PURE__ */ t(L, {})
286
+ /* @__PURE__ */ e(L, {})
236
287
  ] }))
237
288
  ] })
238
289
  ] });
239
- }, It = _(Tt), Lt = ({ accounts: e, name: s, icon: i }) => {
290
+ }, De = _(Le), Ne = ({ accounts: t, name: s, icon: i }) => {
240
291
  const [n, a] = u.useState(!1);
241
- return /* @__PURE__ */ r(D, { children: [
242
- /* @__PURE__ */ t(O, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(J, { onClick: () => a(!n), children: [
243
- i && /* @__PURE__ */ t(F, { children: /* @__PURE__ */ t(H, { name: i, size: 24, sx: { mr: 12 } }) }),
244
- /* @__PURE__ */ t(
292
+ return /* @__PURE__ */ r(N, { children: [
293
+ /* @__PURE__ */ e(O, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(te, { onClick: () => a(!n), children: [
294
+ i && /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(H, { name: i, size: 24, sx: { mr: 12 } }) }),
295
+ /* @__PURE__ */ e(
245
296
  b,
246
297
  {
247
- primary: /* @__PURE__ */ t(m, { sx: { fontWeight: 700 }, variant: "body1", children: s })
298
+ primary: /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "body1", children: s })
248
299
  }
249
300
  ),
250
- /* @__PURE__ */ t(F, { children: n ? /* @__PURE__ */ t(H, { name: "expand_less", size: 24 }) : /* @__PURE__ */ t(H, { name: "expand_more", size: 24 }) })
301
+ /* @__PURE__ */ e(K, { children: n ? /* @__PURE__ */ e(H, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(H, { name: "expand_more", size: 24 }) })
251
302
  ] }) }),
252
- /* @__PURE__ */ t(L, {}),
253
- /* @__PURE__ */ t(pt, { in: n, timeout: "auto", unmountOnExit: !0, children: e.map((o, c) => /* @__PURE__ */ r(j, { children: [
254
- /* @__PURE__ */ t(O, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ t(
303
+ /* @__PURE__ */ e(L, {}),
304
+ /* @__PURE__ */ e(ye, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((o, c) => /* @__PURE__ */ r(j, { children: [
305
+ /* @__PURE__ */ e(O, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
255
306
  b,
256
307
  {
257
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
258
- /* @__PURE__ */ t(
259
- m,
308
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
309
+ /* @__PURE__ */ e(
310
+ d,
260
311
  {
261
312
  sx: {
262
313
  marginRight: 10
@@ -265,7 +316,7 @@ const _t = () => {
265
316
  children: o.accountName
266
317
  }
267
318
  ),
268
- /* @__PURE__ */ t(
319
+ /* @__PURE__ */ e(
269
320
  x,
270
321
  {
271
322
  amount: o.balance,
@@ -279,20 +330,20 @@ const _t = () => {
279
330
  sx: { pl: 72, pr: 16 }
280
331
  }
281
332
  ) }),
282
- c < e.length - 1 ? /* @__PURE__ */ t(L, { variant: "inset" }) : /* @__PURE__ */ t(L, {})
333
+ c < t.length - 1 ? /* @__PURE__ */ e(L, { variant: "inset" }) : /* @__PURE__ */ e(L, {})
283
334
  ] }, o.accountName)) })
284
335
  ] });
285
- }, X = ({ groupedAccounts: e }) => /* @__PURE__ */ t(D, { children: e.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ t(Lt, { accounts: s, icon: i, name: n }, n)) }), Nt = ({
286
- netWorth: e,
336
+ }, X = ({ groupedAccounts: t }) => /* @__PURE__ */ e(N, { children: t.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ e(Ne, { accounts: s, icon: i, name: n }, n)) }), Ee = ({
337
+ netWorth: t,
287
338
  assets: s,
288
339
  liabilities: i,
289
340
  totalAssets: n,
290
341
  totalLiabilities: a
291
342
  }) => {
292
- const { net_worth: o } = E(), c = P();
293
- return /* @__PURE__ */ r(D, { children: [
343
+ const { net_worth: o } = E(), c = oe();
344
+ return /* @__PURE__ */ r(N, { children: [
294
345
  /* @__PURE__ */ r(
295
- tt,
346
+ P,
296
347
  {
297
348
  sx: {
298
349
  alignItems: "center",
@@ -303,14 +354,14 @@ const _t = () => {
303
354
  marginBottom: 8
304
355
  },
305
356
  children: [
306
- /* @__PURE__ */ t(m, { variant: "body1", children: o.current_net_worth }),
307
- /* @__PURE__ */ t(x, { amount: e?.y ?? 0, variant: "h1" }),
308
- e && /* @__PURE__ */ t(
357
+ /* @__PURE__ */ e(d, { variant: "body1", children: o.current_net_worth }),
358
+ /* @__PURE__ */ e(x, { amount: t?.y ?? 0, variant: "h1" }),
359
+ t && /* @__PURE__ */ e(
309
360
  B,
310
361
  {
311
362
  currencyLabel: o.this_month,
312
363
  iconSize: 20,
313
- netWorth: e,
364
+ netWorth: t,
314
365
  theme: c
315
366
  }
316
367
  )
@@ -318,22 +369,22 @@ const _t = () => {
318
369
  }
319
370
  ),
320
371
  /* @__PURE__ */ r(j, { children: [
321
- /* @__PURE__ */ t(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
372
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
322
373
  b,
323
374
  {
324
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", children: [
325
- /* @__PURE__ */ t(m, { sx: { fontWeight: 700 }, variant: "caption", children: o.assets }),
326
- /* @__PURE__ */ t(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
375
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
376
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.assets }),
377
+ /* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
327
378
  ] })
328
379
  }
329
380
  ) }),
330
- /* @__PURE__ */ t(X, { groupedAccounts: K(s) }),
331
- /* @__PURE__ */ t(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
381
+ /* @__PURE__ */ e(X, { groupedAccounts: U(s) }),
382
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
332
383
  b,
333
384
  {
334
- primary: /* @__PURE__ */ r(d, { direction: "row", justifyContent: "space-between", children: [
335
- /* @__PURE__ */ t(m, { sx: { fontWeight: 700 }, variant: "caption", children: o.liabilities }),
336
- /* @__PURE__ */ t(
385
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
386
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.liabilities }),
387
+ /* @__PURE__ */ e(
337
388
  x,
338
389
  {
339
390
  amount: a,
@@ -344,11 +395,11 @@ const _t = () => {
344
395
  ] })
345
396
  }
346
397
  ) }),
347
- /* @__PURE__ */ t(X, { groupedAccounts: K(i) })
398
+ /* @__PURE__ */ e(X, { groupedAccounts: U(i) })
348
399
  ] })
349
400
  ] });
350
- }, Dt = _(Nt), Et = () => {
351
- const { net_worth: e } = E(), s = z(), { onEvent: i } = G(), {
401
+ }, ke = _(Ee), Me = () => {
402
+ const { net_worth: t } = E(), s = G(), { onEvent: i } = z(), {
352
403
  assetsLiabilities: n,
353
404
  gainsLosses: a,
354
405
  hoveredData: o,
@@ -356,15 +407,15 @@ const _t = () => {
356
407
  selectedData: l,
357
408
  setHoveredIndex: g,
358
409
  setSelectedIndex: f
359
- } = R(), [W, S] = u.useState(!1), [w, y] = u.useState(!1), k = (p) => {
410
+ } = R(), [S, W] = u.useState(!1), [w, y] = u.useState(!1), k = (p) => {
360
411
  const C = p.x === o?.x, T = p.x === l?.x, I = {
361
412
  backgroundColor: "inherit",
362
413
  borderBottom: "inherit",
363
414
  color: "inherit"
364
415
  };
365
416
  return C && (I.color = T ? "inherit" : I.color, I.backgroundColor = s.palette.action.hover), T && (I.backgroundColor = s.palette.primary.main, I.borderBottom = s.palette.neutral.light, I.color = s.palette.common.white), I;
366
- }, N = (p, C) => {
367
- f(C), p.currentTarget instanceof HTMLDivElement && S(!0);
417
+ }, D = (p, C) => {
418
+ f(C), p.currentTarget instanceof HTMLDivElement && W(!0);
368
419
  }, h = () => {
369
420
  y(!0), i(v.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES);
370
421
  }, M = (p) => {
@@ -372,155 +423,103 @@ const _t = () => {
372
423
  }, $ = () => {
373
424
  g(-1);
374
425
  };
375
- return /* @__PURE__ */ r(d, { direction: "column", sx: { width: 320 }, children: [
426
+ return /* @__PURE__ */ r(m, { direction: "column", sx: { width: 320 }, children: [
376
427
  /* @__PURE__ */ r(j, { children: [
377
- /* @__PURE__ */ t(A, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ t(m, { bold: !0, component: "h2", variant: "body1", children: e.monthly_totals }) }),
378
- /* @__PURE__ */ t(L, {}),
379
- c.map((p, C) => /* @__PURE__ */ t(
380
- Wt,
428
+ /* @__PURE__ */ e(A, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(d, { bold: !0, component: "h2", variant: "body1", children: t.monthly_totals }) }),
429
+ /* @__PURE__ */ e(L, {}),
430
+ c.map((p, C) => /* @__PURE__ */ e(
431
+ Te,
381
432
  {
382
433
  getStyles: k,
383
434
  isHovered: p.x === o?.x,
384
435
  isSelected: p.x === l?.x,
385
436
  item: p,
386
- onItemClick: (T) => N(T, C),
437
+ onItemClick: (T) => D(T, C),
387
438
  onMouseEnter: () => M(C),
388
439
  onMouseLeave: () => $()
389
440
  },
390
441
  p.x
391
442
  ))
392
443
  ] }),
393
- /* @__PURE__ */ t(
394
- dt,
444
+ /* @__PURE__ */ e(
445
+ xe,
395
446
  {
396
447
  onClick: () => h(),
397
448
  sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
398
449
  variant: "outlined",
399
- children: e.view_assets_and_liabilities
450
+ children: t.view_assets_and_liabilities
400
451
  }
401
452
  ),
402
- /* @__PURE__ */ t(
403
- U,
453
+ /* @__PURE__ */ e(
454
+ V,
404
455
  {
405
456
  ariaLabelClose: "Close",
406
- isOpen: W,
407
- onClose: () => S(!1),
457
+ isOpen: S,
458
+ onClose: () => W(!1),
408
459
  shouldShowHeaderBorders: !1,
409
460
  shouldShowHeaderShadow: !0,
410
- title: e.gains_and_losses,
411
- children: a && /* @__PURE__ */ t(It, { ...a })
461
+ title: t.gains_and_losses,
462
+ children: a && /* @__PURE__ */ e(De, { ...a })
412
463
  }
413
464
  ),
414
- /* @__PURE__ */ t(
415
- U,
465
+ /* @__PURE__ */ e(
466
+ V,
416
467
  {
417
468
  ariaLabelClose: "Close",
418
469
  isOpen: w,
419
470
  onClose: () => y(!1),
420
471
  shouldShowHeaderBorders: !1,
421
472
  shouldShowHeaderShadow: !0,
422
- title: e.assets_and_liabilities,
423
- children: n && /* @__PURE__ */ t(Dt, { ...n })
473
+ title: t.assets_and_liabilities,
474
+ children: n && /* @__PURE__ */ e(ke, { ...n })
424
475
  }
425
476
  )
426
477
  ] });
427
- }, kt = _(Et), Mt = ({ hoveredData: e, selectedData: s }) => {
428
- const { net_worth: i } = E(), n = z(), a = e || s, o = ut(ft(a.x), "MMMM");
429
- return /* @__PURE__ */ r(d, { alignItems: "center", direction: "column", m: 24, children: [
430
- /* @__PURE__ */ t(m, { color: n.palette.secondary.main, variant: "body2", children: `${o} ${i.net_worth}` }),
431
- /* @__PURE__ */ t(x, { amount: a.y, variant: "h2" }),
432
- /* @__PURE__ */ t(B, { currencyLabel: i.this_month, netWorth: a, theme: n })
433
- ] });
434
- }, At = _(Mt), Ot = ({ amount: e, copy: s, trendValue: i }) => {
435
- const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
436
- return /* @__PURE__ */ r(d, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
437
- /* @__PURE__ */ t(Z, { variant: "h1", children: V(e, "0,0") }),
438
- e !== 0 && /* @__PURE__ */ r(d, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
439
- /* @__PURE__ */ r(d, { sx: { flexDirection: "row", gap: 8 }, children: [
440
- /* @__PURE__ */ t(et, { name: o, size: 20 }),
441
- /* @__PURE__ */ t(m, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: V(i, "0,0.00") })
442
- ] }),
443
- /* @__PURE__ */ t(m, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: s.this_month })
444
- ] })
478
+ }, Ae = _(Me), Oe = ({ hoveredData: t, selectedData: s }) => {
479
+ const { net_worth: i } = E(), n = G(), a = t || s, o = se(ce(a.x), "MMMM");
480
+ return /* @__PURE__ */ r(m, { alignItems: "center", direction: "column", m: 24, children: [
481
+ /* @__PURE__ */ e(d, { color: n.palette.secondary.main, variant: "body2", children: `${o} ${i.net_worth}` }),
482
+ /* @__PURE__ */ e(x, { amount: a.y, variant: "h2" }),
483
+ /* @__PURE__ */ e(B, { currencyLabel: i.this_month, netWorth: a, theme: n })
445
484
  ] });
446
- }, Ht = ({ copy: e }) => /* @__PURE__ */ r(d, { sx: { flexDirection: "row", gap: 12 }, children: [
447
- /* @__PURE__ */ t(et, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
448
- /* @__PURE__ */ r(d, { children: [
449
- /* @__PURE__ */ t(m, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: e.empty_widget_header }),
450
- /* @__PURE__ */ t(Z, { sx: { color: "text.secondary" }, variant: "body2", children: e.zero_state_description })
451
- ] })
452
- ] }), _e = _(({ onCTAClick: e }) => {
453
- const { visibleAccounts: s } = ct(), { onEvent: i } = G(), { net_worth: n, common: a } = E(), { isInitialized: o } = q(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: g, selectedData: f } = R();
454
- if (u.useEffect(() => {
455
- c || l().finally();
456
- }, []), nt({
457
- widgetName: "NetWorthMicroWidget",
458
- isLoaded: c
459
- }), u.useEffect(() => {
460
- c && i(v.NET_WORTH_LOAD_WIDGET, {
461
- state: s?.length ? "default" : "zeroState"
462
- });
463
- }, [c]), !o || !c) return /* @__PURE__ */ t(ot, { height: 100 });
464
- const W = () => {
465
- i(
466
- s.length ? v.NET_WORTH_CLICK_VIEW_DETAILS : v.NET_WORTH_CLICK_GET_STARTED
467
- ), e();
468
- };
469
- return /* @__PURE__ */ t(
470
- gt,
471
- {
472
- className: "mx-networth-microwidget",
473
- ctaLabel: a.see_details,
474
- onCTAClick: W,
475
- title: n.net_worth,
476
- children: g.accounts.length ? /* @__PURE__ */ t(
477
- Ot,
478
- {
479
- amount: f?.y,
480
- copy: n,
481
- trendValue: f?.change
482
- }
483
- ) : /* @__PURE__ */ t(Ht, { copy: n })
484
- }
485
- );
486
- }), we = _(({ onBackClick: e, onMenuClick: s }) => {
485
+ }, He = _(Oe), wt = _(({ onBackClick: t, onMenuClick: s }) => {
487
486
  const { isInitialized: i } = q(), { accounts: n, net_worth: a } = E(), {
488
487
  hoveredData: o,
489
488
  isNetWorthDataLoaded: c,
490
489
  loadNetWorthData: l,
491
490
  netWorthChartData: g,
492
491
  selectedData: f,
493
- setTimeframe: W,
494
- timeframe: S
495
- } = R(), { isMobile: w } = Y(), { onEvent: y } = G(), [k, N] = u.useState(!1);
496
- nt({
492
+ setTimeframe: S,
493
+ timeframe: W
494
+ } = R(), { isMobile: w } = ee(), { onEvent: y } = z(), [k, D] = u.useState(!1);
495
+ J({
497
496
  widgetName: "NetWorthWidget",
498
497
  isLoaded: c
499
498
  }), u.useEffect(() => {
500
499
  c || l().finally(), y(v.NET_WORTH_VIEW);
501
500
  }, []), u.useEffect(() => {
502
- y(v.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: S + "M" });
503
- }, [S]);
501
+ y(v.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: W + "M" });
502
+ }, [W]);
504
503
  const h = async (p) => {
505
504
  const C = p[0], T = p[1];
506
- C && T && W(xt(T, C));
505
+ C && T && S(le(T, C));
507
506
  }, M = () => {
508
- N(!0), y(v.ACCOUNTS_CLICK_CONNECT);
507
+ D(!0), y(v.ACCOUNTS_CLICK_CONNECT);
509
508
  };
510
- if (!i || !c) return /* @__PURE__ */ t(ot, {});
509
+ if (!i || !c) return /* @__PURE__ */ e(Q, {});
511
510
  const $ = g.length === 0;
512
511
  return /* @__PURE__ */ r(
513
- Ct,
512
+ Ce,
514
513
  {
515
514
  calendarActions: { onRangeChanged: h },
516
515
  dateRangeVariant: w ? "timeframetabs" : "timeframebuttons",
517
516
  onAccountsFilterClick: () => y(v.NET_WORTH_WIDGET_CLICK_FILTER),
518
- onBackClick: e,
517
+ onBackClick: t,
519
518
  onMenuClick: s,
520
519
  title: a.net_worth,
521
520
  children: [
522
- $ ? /* @__PURE__ */ t(tt, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ t(
523
- bt,
521
+ $ ? /* @__PURE__ */ e(P, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ e(
522
+ be,
524
523
  {
525
524
  header: a.empty_widget_header,
526
525
  icon: "elevation",
@@ -534,25 +533,25 @@ const _t = () => {
534
533
  }
535
534
  }
536
535
  }
537
- ) }) : /* @__PURE__ */ r(D, { children: [
538
- f && /* @__PURE__ */ t(At, { hoveredData: o, selectedData: f }),
536
+ ) }) : /* @__PURE__ */ r(N, { children: [
537
+ f && /* @__PURE__ */ e(He, { hoveredData: o, selectedData: f }),
539
538
  /* @__PURE__ */ r(
540
- d,
539
+ m,
541
540
  {
542
541
  alignItems: w ? "center" : "flex-start",
543
542
  direction: w ? "column" : "row",
544
543
  spacing: w ? 0 : 48,
545
544
  children: [
546
- /* @__PURE__ */ t(wt, {}),
547
- /* @__PURE__ */ t(kt, {})
545
+ /* @__PURE__ */ e(Se, {}),
546
+ /* @__PURE__ */ e(Ae, {})
548
547
  ]
549
548
  }
550
549
  )
551
550
  ] }),
552
- /* @__PURE__ */ t(
553
- yt,
551
+ /* @__PURE__ */ e(
552
+ de,
554
553
  {
555
- onClose: () => N(!1),
554
+ onClose: () => D(!1),
556
555
  showConnectionsWidget: k,
557
556
  title: n.manage_connections
558
557
  }
@@ -562,10 +561,6 @@ const _t = () => {
562
561
  );
563
562
  });
564
563
  export {
565
- wt as NetWorthChart,
566
- kt as NetWorthList,
567
- _e as NetWorthMicroWidget,
568
- Se as NetWorthStore,
569
- At as NetWorthSummary,
570
- we as NetWorthWidget
564
+ _t as NetWorthMicroWidget,
565
+ wt as NetWorthWidget
571
566
  };