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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-BF4QA-Lx.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,77 +1,80 @@
1
- import { H as R } from "../Help-c-zHlDbv.mjs";
2
- import { E as Ce } from "../Help-c-zHlDbv.mjs";
3
- import { M as Ae } from "../MicroWidgetContainer-BGpNl5ZS.mjs";
4
- import { M as xe } from "../MiniWidgetContainer-CKzf_Ira.mjs";
5
- import { C as Ie } from "../CurrencyInput-D1cjbdCI.mjs";
6
- import { L as Be } from "../Loader-Ckqi9Rx6.mjs";
7
- import { R as Ne } from "../ResponsiveButton-Cn6-R7ue.mjs";
8
- import { T as $ } from "../TransactionStore-DbwAutwC.mjs";
9
- import { S as Le } from "../TransactionStore-DbwAutwC.mjs";
10
- import { T as Pe } from "../TabContentContainer-CnMXkVqr.mjs";
11
- import { I as Re } from "../IconBacking-DgT8DCeh.mjs";
12
- import { D as Ge, F as Fe, c as He, d as We, R as qe, S as Ye } from "../RecurringTransactions-CxcSL1dY.mjs";
13
- import { C as G } from "../CashflowStore-CA190BPF.mjs";
14
- import { I as Ke } from "../CashflowStore-CA190BPF.mjs";
15
- import { k as je, a as Ve, i as Ze, j as Xe, A as Je, h as ts, l as es, C as ss, n as rs, E as os, M as as, N as is, c as ns, P as cs, o as ds, S as us } from "../ConnectDrawer-DVp54lUH.mjs";
16
- import { T as F } from "../User-BklmOUSd.mjs";
17
- import { C as hs, b as gs, L as ps, a as _s } from "../User-BklmOUSd.mjs";
18
- import { S as ms } from "../StatusBar-CPfSXe80.mjs";
19
- import { A as Ss, D as bs, W as ws } from "../WidgetContainer-CDh9fjpR.mjs";
20
- import { a as Ds, D as As, O as Es, b as xs, f as Ts } from "../Dialog-CDV0kKxj.mjs";
21
- import { jsxs as w, jsx as b } from "react/jsx-runtime";
22
- import { css as H } from "@mxenabled/cssinjs";
23
- import { D as W, a as q } from "../SingleSegmentDonut-7Uy6VEld.mjs";
24
- import { S as vs } from "../SingleSegmentDonut-7Uy6VEld.mjs";
25
- import { D as ks } from "../Drawer-BF40nbsH.mjs";
26
- import { G as C } from "../useCombineEvents-kNzLTWCp.mjs";
27
- import { A as Us, b as Ls, u as Os, a as Ps } from "../useCombineEvents-kNzLTWCp.mjs";
28
- import { F as h, A as i } from "../Fetch-DecPFeGU.mjs";
29
- import { B as Rs } from "../BeatApi-De2IaqH2.mjs";
30
- import { C as Y } from "../CategoryStore-MUwRWH9e.mjs";
31
- import { a as Gs } from "../CategoryStore-MUwRWH9e.mjs";
32
- import { N as Q } from "../NotificationStore-Ck2KdNmT.mjs";
33
- import { a as Hs } from "../NotificationStore-Ck2KdNmT.mjs";
34
- import { S as qs } from "../SearchBox-B7km148n.mjs";
35
- import { d as K } from "../GoalStore-C1-w3Y1E.mjs";
36
- import { C as Qs, G as Ks, M as zs, T as js } from "../GoalStore-C1-w3Y1E.mjs";
37
- import { C as Zs } from "../CurrencyText-Dr0EZ7bp.mjs";
38
- import { E as Js } from "../EmptyState-DoxNUae-.mjs";
39
- import { L as er } from "../ListItemAction-BNCWQAN_.mjs";
40
- import { T as z } from "../TrendsStore-_mRaFUdf.mjs";
41
- import { L as rr } from "../TrendsStore-_mRaFUdf.mjs";
42
- import { A as ar, B as ir, I as nr, N as cr, T as dr, a as ur } from "../ToggleListItem-ciFTiqRS.mjs";
43
- import { I as hr, P as gr, S as pr } from "../Account-B4CDD-zq.mjs";
44
- import { b as f } from "../Category-Ccoew_sA.mjs";
45
- import { a as fr, c as mr, C as yr, P as Sr } from "../Category-Ccoew_sA.mjs";
46
- import { C as wr, f as Cr, b as Dr, a as Ar, g as Er, i as xr } from "../NumberFormatting-DjTD0t3W.mjs";
47
- import { R as j } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
48
- import { S as Ir, T as vr } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
49
- import { G as kr, C as Nr, D as Ur, W as Lr, d as Or, a as Pr, i as Mr, v as Rr, m as $r, x as Gr, y as Fr, g as Hr, z as Wr, u as qr, f as Yr, b as Qr, l as Kr, A as zr, t as jr, n as Vr, c as Zr, r as Xr, o as Jr, B as to, j as eo, s as so, h as ro, w as oo, p as ao, q as io } from "../hooks-C41HAxM5.mjs";
50
- import { u as co } from "../useAccountDisplayName-CcIp09Xc.mjs";
51
- import { u as lo } from "../useInsightsEnabled-CNjP5cfR.mjs";
52
- import { u as go } from "../useScreenSize-B5afALev.mjs";
53
- import { makeAutoObservable as l, runInAction as p, reaction as V, autorun as Z } from "mobx";
54
- import { a as X } from "../AccountStore-HbVblv86.mjs";
55
- import J from "posthog-js";
56
- import { B as tt } from "../BeatStore-D_NYuBSz.mjs";
57
- import { endOfMonth as O } from "date-fns/endOfMonth";
58
- import { startOfMonth as P } from "date-fns/startOfMonth";
59
- import { startOfToday as D } from "date-fns/startOfToday";
60
- import { f as et, a as st, b as A } from "../BudgetUtil-Jv8h9H9l.mjs";
61
- import { g as _o, e as fo, c as mo, d as yo, i as So } from "../BudgetUtil-Jv8h9H9l.mjs";
62
- import { D as rt } from "../DebtsStore-pL63fmdT.mjs";
63
- import { F as ot } from "../FinstrongStore-BGf36b0z.mjs";
64
- import { A as at, m as it, a as nt, b as ct } from "../InvestmentUtil-jOyOgzIB.mjs";
65
- import { M as dt } from "../MerchantStore-WvZ4gnQe.mjs";
66
- import { N as ut } from "../NetWorthStore-Bti6u-d9.mjs";
67
- import { a as lt } from "../SettingsStore-BASMQSIp.mjs";
68
- import { addMonths as ht } from "date-fns/addMonths";
69
- import { getMonth as m } from "date-fns/getMonth";
70
- import { i as wo } from "../DateUtil-CDPZw_-m.mjs";
71
- import { b as Do, a as Ao, g as Eo } from "../Localization-2MODESHW.mjs";
72
- import { lighten as E, darken as x, alpha as gt } from "@mui/material";
73
- var pt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.EveryWeek = 1] = "EveryWeek", s[s.EveryOtherWeek = 2] = "EveryOtherWeek", s[s.EveryMonth = 3] = "EveryMonth", s[s.EveryOtherMonth = 4] = "EveryOtherMonth", s[s.EveryQuarter = 5] = "EveryQuarter", s[s.EveryOtherQuarter = 6] = "EveryOtherQuarter", s[s.EveryYear = 7] = "EveryYear", s))(pt || {});
74
- const ge = [
1
+ import { G as $ } from "../useCombineEvents-CRwX-qWE.mjs";
2
+ import { A as rs, a as os, u as as, b as ns } from "../useCombineEvents-CRwX-qWE.mjs";
3
+ import { F as S, A as h } from "../Fetch-DecPFeGU.mjs";
4
+ import { B as cs } from "../BeatApi-De2IaqH2.mjs";
5
+ import { C as et } from "../CategoryStore-CA3tS1BO.mjs";
6
+ import { a as ls } from "../CategoryStore-CA3tS1BO.mjs";
7
+ import { N as st } from "../NotificationStore-CDX_kqHa.mjs";
8
+ import { a as hs } from "../NotificationStore-CDX_kqHa.mjs";
9
+ import { T as rt } from "../User-Cnlegl1N.mjs";
10
+ import { C as ps, b as ms, L as _s, a as fs } from "../User-Cnlegl1N.mjs";
11
+ import { H as ot } from "../Help-DhcC-C05.mjs";
12
+ import { E as Ss } from "../Help-DhcC-C05.mjs";
13
+ import { M as ws } from "../MicroWidgetContainer-r6mtxRer.mjs";
14
+ import { M as Cs } from "../MiniWidgetContainer-Bg02sF1Y.mjs";
15
+ import { A as Ds, D as As, W as Es } from "../WidgetContainer-CoFDmQRE.mjs";
16
+ import { k as Bs, a as Is, e as Ns, h as Ms, A as $s, f as ks, l as Rs, d as Us, n as Ps, E as Os, j as Ls, N as Gs, i as Hs, P as Fs, o as Ws, S as qs } from "../ConnectDrawer-BkvlItWx.mjs";
17
+ import { C as Qs } from "../CurrencyInput-itK0R3wV.mjs";
18
+ import { L as Xs } from "../Loader-DUaFpDGv.mjs";
19
+ import { R as Ks } from "../ResponsiveButton-DZFp78fJ.mjs";
20
+ import { S as Zs } from "../SearchBox-B2_zLv8-.mjs";
21
+ import { T as at } from "../TransactionStore-PRlwE-TF.mjs";
22
+ import { S as tr } from "../TransactionStore-PRlwE-TF.mjs";
23
+ import { T as sr } from "../TabContentContainer-j01JYR_7.mjs";
24
+ import { I as or } from "../IconBacking-B9oC6uL2.mjs";
25
+ import { D as nr, F as ir, a as cr, c as dr, R as lr, S as ur } from "../RecurringTransactions-BqijW_8S.mjs";
26
+ import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
27
+ import { I as gr } from "../CashflowStore-D9Dpuz7X.mjs";
28
+ import { d as it } from "../GoalStore-1P19goZ7.mjs";
29
+ import { C as mr, G as _r, M as fr, T as yr } from "../GoalStore-1P19goZ7.mjs";
30
+ import { C as br } from "../CurrencyText-Dr0EZ7bp.mjs";
31
+ import { E as xr } from "../EmptyState-DoxNUae-.mjs";
32
+ import { L as vr } from "../ListItemAction-BxTkF6Tz.mjs";
33
+ import { T as ct } from "../TrendsStore-yO7qYv97.mjs";
34
+ import { L as Ar } from "../TrendsStore-yO7qYv97.mjs";
35
+ import { A as Tr, B as Br, I as Ir, N as Nr, T as Mr, a as $r } from "../ToggleListItem-ciFTiqRS.mjs";
36
+ import { jsxs as y, jsx as n } from "react/jsx-runtime";
37
+ import dt, { useRef as lt, useEffect as ut } from "react";
38
+ import { css as x, keyframes as ht } from "@mxenabled/cssinjs";
39
+ import { useTokens as C, Text as B } from "@mxenabled/mxui";
40
+ import { S as Rr } from "../StatusBar-BK_uYHAB.mjs";
41
+ import { a as Pr, D as Or, O as Lr, b as Gr, f as Hr } from "../Dialog-BPTr3qHE.mjs";
42
+ import { D as gt, a as pt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
43
+ import { S as Wr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
44
+ import { D as Yr } from "../Drawer-By9V-B5L.mjs";
45
+ import { I as zr, P as Xr, S as jr } from "../Account-CvR2-dSR.mjs";
46
+ import { b as E } from "../Category-CevNQ03n.mjs";
47
+ import { C as Vr, c as Zr, a as Jr, P as to } from "../Category-CevNQ03n.mjs";
48
+ import { C as so, f as ro, b as oo, a as ao, g as no, i as io } from "../NumberFormatting-DjTD0t3W.mjs";
49
+ import { R as mt } from "../RecurringTransactionsStore-BhBUVm9a.mjs";
50
+ import { S as lo, T as uo } from "../RecurringTransactionsStore-BhBUVm9a.mjs";
51
+ import { G as go, C as po, D as mo, W as _o, d as fo, a as yo, i as So, t as bo, m as wo, w as xo, x as Co, g as vo, z as Do, u as Ao, f as Eo, b as To, l as Bo, A as Io, s as No, y as Mo, c as $o, q as ko, n as Ro, B as Uo, j as Po, r as Oo, h as Lo, v as Go, o as Ho, p as Fo } from "../hooks-ZMp65DFz.mjs";
52
+ import { u as qo } from "../useAccountDisplayName-B7iXTNM8.mjs";
53
+ import { u as Qo } from "../useInsightsEnabled-B7dxpDrX.mjs";
54
+ import { u as Xo } from "../useScreenSize-B6JyS_Lj.mjs";
55
+ import { u as Ko } from "../useWidgetLoadTimer-hIOioiKx.mjs";
56
+ import { makeAutoObservable as f, runInAction as p, reaction as _t, autorun as ft } from "mobx";
57
+ import { a as yt } from "../AccountStore-LgfBcYMe.mjs";
58
+ import St from "posthog-js";
59
+ import { B as bt } from "../BeatStore-D_NYuBSz.mjs";
60
+ import { endOfMonth as Z } from "date-fns/endOfMonth";
61
+ import { startOfMonth as J } from "date-fns/startOfMonth";
62
+ import { startOfToday as O } from "date-fns/startOfToday";
63
+ import { f as wt, a as xt, b as L } from "../BudgetUtil-BmZXkL0C.mjs";
64
+ import { g as Zo, e as Jo, c as ta, d as ea, i as sa } from "../BudgetUtil-BmZXkL0C.mjs";
65
+ import { a as Ct } from "../DebtsStore-Bq-aPy-5.mjs";
66
+ import { F as vt } from "../FinstrongStore-BIrX0Xg2.mjs";
67
+ import { A as Dt, m as At, a as Et, b as Tt } from "../InvestmentUtil-jOyOgzIB.mjs";
68
+ import { M as Bt } from "../MerchantStore-WvZ4gnQe.mjs";
69
+ import { N as It } from "../NetWorthStore-rC0q7P7t.mjs";
70
+ import { a as Nt } from "../SettingsStore-krIRNwHK.mjs";
71
+ import { addMonths as Mt } from "date-fns/addMonths";
72
+ import { getMonth as T } from "date-fns/getMonth";
73
+ import { i as oa } from "../DateUtil-CBdcsyuk.mjs";
74
+ import { b as na, a as ia, g as ca } from "../Localization-2MODESHW.mjs";
75
+ import { alpha as $t, lighten as G, darken as H } from "@mui/material";
76
+ var kt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.EveryWeek = 1] = "EveryWeek", s[s.EveryOtherWeek = 2] = "EveryOtherWeek", s[s.EveryMonth = 3] = "EveryMonth", s[s.EveryOtherMonth = 4] = "EveryOtherMonth", s[s.EveryQuarter = 5] = "EveryQuarter", s[s.EveryOtherQuarter = 6] = "EveryOtherQuarter", s[s.EveryYear = 7] = "EveryYear", s))(kt || {});
77
+ const Qe = [
75
78
  { id: 0, copy: "frequency_unknown" },
76
79
  { id: 1, copy: "frequency_every_week" },
77
80
  { id: 2, copy: "frequency_every_other_week" },
@@ -80,101 +83,113 @@ const ge = [
80
83
  { id: 5, copy: "frequency_every_quarter" },
81
84
  { id: 6, copy: "frequency_every_other_quarter" },
82
85
  { id: 7, copy: "frequency_every_year" }
83
- ], pe = {
86
+ ], ze = {
84
87
  ERROR: "ERROR",
85
88
  LOADING: "LOADING",
86
89
  SUCCESS: "SUCCESS"
87
90
  };
88
- var _t = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))(_t || {}), ft = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(ft || {});
89
- const mt = [
91
+ var Rt = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))(Rt || {}), Ut = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(Ut || {});
92
+ const Pt = [
90
93
  "fontFamily",
94
+ "H1",
91
95
  "h1",
96
+ "H2",
92
97
  "h2",
98
+ "H3",
93
99
  "h3",
100
+ "Body",
94
101
  "body1",
102
+ "Small",
95
103
  "body2",
104
+ "Button",
96
105
  "button",
106
+ "XSmall",
97
107
  "caption",
108
+ "Paragraph",
98
109
  "subtitle1",
110
+ "ParagraphSmall",
99
111
  "subtitle2",
112
+ "Tiny",
100
113
  "tiny"
101
- ], yt = [
114
+ ], Ot = [
102
115
  { key: "primary", light: "primary_color", dark: "primary_color_dark" },
103
116
  { key: "secondary", light: "neutral_color", dark: "neutral_color_dark" },
104
117
  { key: "error", light: "error_color", dark: "error_color_dark" },
105
118
  { key: "warning", light: "warning_color", dark: "warning_color_dark" },
106
119
  { key: "info", light: "info_color", dark: "info_color_dark" },
107
120
  { key: "success", light: "success_color", dark: "success_color_dark" }
108
- ], _e = (s, t, e) => {
109
- const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, n = (d, S) => d ? {
110
- light: r ? x(d, 0.3) : E(d, 0.55),
111
- main: d,
112
- dark: r ? E(d, 0.7) : x(d, 0.5)
113
- } : S, a = Object.fromEntries(
114
- yt.map(({ key: d, light: S, dark: M }) => [
115
- d,
116
- n(
117
- t?.[r ? M : S],
118
- s.palette[d]
121
+ ], Xe = (s, t, e) => {
122
+ const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (i, _) => i ? {
123
+ lighter: G(i, 0.5),
124
+ light: G(i, 0.25),
125
+ main: i,
126
+ dark: H(i, 0.25),
127
+ darker: H(i, 0.5)
128
+ } : _, c = Object.fromEntries(
129
+ Ot.map(({ key: i, light: _, dark: b }) => [
130
+ i,
131
+ a(
132
+ t?.[r ? b : _],
133
+ s.palette[i]
119
134
  )
120
135
  ])
121
- ), c = Object.fromEntries(
122
- mt.map((d) => [
123
- d,
124
- d === "fontFamily" ? o : { fontFamily: o }
136
+ ), d = Object.fromEntries(
137
+ Pt.map((i) => [
138
+ i,
139
+ i === "fontFamily" ? o : { fontFamily: o }
125
140
  ])
126
- ), g = {
141
+ ), u = {
127
142
  MuiTabs: {
128
143
  styleOverrides: {
129
- indicator: { backgroundColor: a.primary.light }
144
+ indicator: { backgroundColor: c.primary.light }
130
145
  }
131
146
  },
132
147
  MuiPickersCalendarHeader: {
133
148
  styleOverrides: {
134
149
  switchViewButton: {
135
- color: a.primary.light,
136
- "&:hover": { backgroundColor: gt(a.primary.light, 0.1) }
150
+ color: c.primary.lighter,
151
+ "&:hover": { backgroundColor: $t(c.primary.light, 0.1) }
137
152
  }
138
153
  }
139
154
  }
140
- }, u = t?.button_corner_radius, _ = t?.card_corner_radius, y = {
141
- ...g,
142
- ...u && {
155
+ }, l = t?.button_corner_radius, g = t?.card_corner_radius, m = {
156
+ ...u,
157
+ ...l && {
143
158
  MuiButton: {
144
159
  styleOverrides: {
145
- root: { borderRadius: `${u}px`, textTransform: "none" }
160
+ root: { borderRadius: `${l}px`, textTransform: "none" }
146
161
  }
147
162
  },
148
163
  MuiIconButton: {
149
164
  styleOverrides: {
150
165
  root: {
151
- borderRadius: `${u}px`,
152
- minWidth: u,
153
- minHeight: u
166
+ borderRadius: `${l}px`,
167
+ minWidth: l,
168
+ minHeight: l
154
169
  }
155
170
  }
156
171
  },
157
172
  MuiToggleButton: {
158
173
  styleOverrides: {
159
- root: { borderRadius: `${u}px`, textTransform: "none" }
174
+ root: { borderRadius: `${l}px`, textTransform: "none" }
160
175
  }
161
176
  }
162
177
  },
163
- ..._ && {
178
+ ...g && {
164
179
  MuiCard: {
165
- styleOverrides: { root: { borderRadius: `${_}px` } }
180
+ styleOverrides: { root: { borderRadius: `${g}px` } }
166
181
  },
167
182
  MuiPaper: {
168
- styleOverrides: { root: { borderRadius: `${_}px` } }
183
+ styleOverrides: { root: { borderRadius: `${g}px` } }
169
184
  }
170
185
  }
171
186
  };
172
- return { typography: c, palette: a, components: y };
187
+ return { typography: d, palette: c, components: m };
173
188
  };
174
- class T {
189
+ class F {
175
190
  fetchInstance;
176
191
  constructor(t) {
177
- this.fetchInstance = new h(t, "", {
192
+ this.fetchInstance = new S(t, "", {
178
193
  Accept: "application/json",
179
194
  "Content-Type": "application/json"
180
195
  });
@@ -188,90 +203,345 @@ class T {
188
203
  }
189
204
  };
190
205
  }
191
- class fe {
206
+ class je {
192
207
  fetchInstance;
193
208
  constructor(t, e, r) {
194
- this.fetchInstance = new h(t, e, void 0, r);
209
+ this.fetchInstance = new S(t, e, void 0, r);
195
210
  }
196
- getLocalizedCopy = async (t) => this.fetchInstance.post(i.LOCALIZED_COPY, t).then((e) => e);
197
- getLocalizedContent = async (t) => this.fetchInstance.post(`${i.LOCALIZED_CONTENT}/${t}`).then((e) => e);
211
+ getLocalizedCopy = async (t) => this.fetchInstance.post(h.LOCALIZED_COPY, t).then((e) => e);
212
+ getLocalizedContent = async (t) => this.fetchInstance.post(`${h.LOCALIZED_CONTENT}/${t}`).then((e) => e);
198
213
  }
199
- class me {
214
+ class Ke {
200
215
  fetchInstance;
201
216
  constructor(t, e, r) {
202
- this.fetchInstance = new h(t, e, void 0, r);
217
+ this.fetchInstance = new S(t, e, void 0, r);
203
218
  }
204
- addScheduledPayment = async (t) => this.fetchInstance.post(i.SCHEDULED_PAYMENTS, {
219
+ addScheduledPayment = async (t) => this.fetchInstance.post(h.SCHEDULED_PAYMENTS, {
205
220
  ...t,
206
221
  is_recurring: "true",
207
- transaction_type: F.DEBIT
222
+ transaction_type: rt.DEBIT
208
223
  }).then((e) => e.scheduled_payment);
209
- getScheduledPayments = async () => this.fetchInstance.get(i.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
210
- updateScheduledPayment = async (t) => this.fetchInstance.put(`${i.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
211
- deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${i.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
224
+ getScheduledPayments = async () => this.fetchInstance.get(h.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
225
+ updateScheduledPayment = async (t) => this.fetchInstance.put(`${h.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
226
+ deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${h.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
212
227
  }
213
- class I {
228
+ class k {
214
229
  fetchInstance;
215
230
  constructor(t, e, r) {
216
- this.fetchInstance = new h(t, e, void 0, r);
231
+ this.fetchInstance = new S(t, e, void 0, r);
217
232
  }
218
- getUserFeatures = async () => this.fetchInstance.get(i.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
219
- updateUser = async (t) => this.fetchInstance.put(i.USER, t).then((e) => e.user);
220
- updateUserProfile = async (t) => this.fetchInstance.put(`${i.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
233
+ getUserFeatures = async () => this.fetchInstance.get(h.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
234
+ updateUser = async (t) => this.fetchInstance.put(h.USER, t).then((e) => e.user);
235
+ updateUserProfile = async (t) => this.fetchInstance.put(`${h.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
221
236
  }
222
- class v {
237
+ class W {
223
238
  fetchInstance;
224
239
  constructor(t, e) {
225
- this.fetchInstance = new h(t, e);
240
+ this.fetchInstance = new S(t, e);
226
241
  }
227
- requestWidgetUrl = async (t) => this.fetchInstance.post(i.WIDGET_URLS, t).then((e) => e.widget_url);
242
+ requestWidgetUrl = async (t) => this.fetchInstance.post(h.WIDGET_URLS, t).then((e) => e.widget_url);
228
243
  }
229
- var St = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(St || {}), bt = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(bt || {}), wt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(wt || {}), Ct = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(Ct || {});
230
- const ye = ({
244
+ var Lt = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(Lt || {}), Gt = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(Gt || {}), Ht = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(Ht || {}), Ft = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(Ft || {});
245
+ const Ve = (s) => {
246
+ const t = lt();
247
+ return ut(() => {
248
+ t.current = s;
249
+ }, [s]), t.current;
250
+ }, Wt = ({ color: s, labelAverage: t, labelMain: e }) => {
251
+ const r = C(), o = qt(r, s);
252
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
253
+ /* @__PURE__ */ n("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
254
+ /* @__PURE__ */ n(B, { variant: "XSmall", children: e }),
255
+ /* @__PURE__ */ y("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
256
+ /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
257
+ /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
258
+ /* @__PURE__ */ n("div", { className: "mx-cmn-dot" })
259
+ ] }),
260
+ /* @__PURE__ */ n(B, { variant: "XSmall", children: t })
261
+ ] });
262
+ }, qt = (s, t) => x({
263
+ alignItems: "center",
264
+ display: "flex",
265
+ gap: s.Spacing.XSmall,
266
+ justifyContent: "flex-end",
267
+ marginRight: s.Spacing.XLarge,
268
+ paddingBottom: s.Spacing.XSmall,
269
+ width: "100%",
270
+ "& .mx-cmn-color-square": {
271
+ backgroundColor: t,
272
+ height: 6,
273
+ width: 6
274
+ },
275
+ "& .mx-cmn-triple-dot": {
276
+ display: "flex",
277
+ gap: 1
278
+ },
279
+ "& .mx-cmn-dot": {
280
+ backgroundColor: s.Color.Neutral500,
281
+ height: 3,
282
+ width: 3,
283
+ borderRadius: 1.5
284
+ },
285
+ "& > .kyper-text": {
286
+ marginRight: s.Spacing.XSmall
287
+ }
288
+ }), q = ({
289
+ ariaLabel: s,
290
+ color: t,
291
+ height: e,
292
+ index: r,
293
+ label: o,
294
+ onClick: a,
295
+ selectedIndex: c,
296
+ value: d
297
+ }) => {
298
+ const u = C(), l = Yt(u, t, e), g = (_) => {
299
+ a && (_.key === " " || _.key === "Enter") && a(r);
300
+ }, m = c === void 0 || c === r ? "primary" : "secondary", i = () => /* @__PURE__ */ n(
301
+ B,
302
+ {
303
+ "aria-hidden": !0,
304
+ bold: c === r,
305
+ className: "mx-cmn-bar-text",
306
+ color: m,
307
+ component: "div",
308
+ variant: "Small",
309
+ children: o
310
+ }
311
+ );
312
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-container ${l} ${d < 0 ? "mx-cmn-negative" : ""}`, children: [
313
+ d >= 0 && /* @__PURE__ */ n(i, {}),
314
+ /* @__PURE__ */ n(
315
+ "div",
316
+ {
317
+ "aria-label": s,
318
+ className: `mx-cmn-bar ${a ? "mx-cmn-clickable" : ""} ${d < 0 ? "mx-cmn-bar-negative" : ""}`,
319
+ onClick: a ? () => a?.(r) : void 0,
320
+ onKeyDown: g,
321
+ role: s ? "button" : void 0,
322
+ tabIndex: s ? 0 : void 0
323
+ }
324
+ ),
325
+ d < 0 && /* @__PURE__ */ n(i, {})
326
+ ] });
327
+ }, Yt = (s, t, e) => {
328
+ const r = `expandBar-${Math.round(e)}`, o = ht(r, { from: { height: 0 }, to: { height: e } });
329
+ return x({
330
+ display: "flex",
331
+ flexDirection: "column",
332
+ justifyContent: "flex-end",
333
+ height: "100%",
334
+ "&.mx-cmn-negative": {
335
+ justifyContent: "flex-start"
336
+ },
337
+ "& .mx-cmn-bar": {
338
+ animationDelay: ".5s",
339
+ animationDuration: "1s",
340
+ animationFillMode: "forwards",
341
+ animationName: o,
342
+ animationTimingFunction: s.Easing.Default,
343
+ backgroundColor: t,
344
+ borderRadius: `${s.BorderRadius.Medium}px ${s.BorderRadius.Medium}px 0 0`,
345
+ maxHeight: e
346
+ },
347
+ "& .mx-cmn-bar-negative": {
348
+ borderRadius: `0 0 ${s.BorderRadius.Medium}px ${s.BorderRadius.Medium}px`,
349
+ marginTop: -s.Spacing.XTiny
350
+ },
351
+ "& .mx-cmn-bar-text": {
352
+ display: "flex",
353
+ justifyContent: "center",
354
+ marginBottom: s.Spacing.Tiny,
355
+ marginTop: s.Spacing.Tiny,
356
+ whiteSpace: "nowrap",
357
+ width: "100%"
358
+ }
359
+ });
360
+ }, Y = ({
361
+ ariaLabel: s,
362
+ averageLineHeight: t,
363
+ bottomHeight: e,
364
+ color: r,
365
+ index: o = -1,
366
+ onClick: a,
367
+ range: c,
368
+ selectedIndex: d,
369
+ topHeight: u,
370
+ value: l,
371
+ valueLabel: g = "",
372
+ width: m,
373
+ xAxisLabel: i = ""
374
+ }) => {
375
+ const _ = C(), b = Qt(_, m), v = l / c * u, D = Math.abs(l) / c * e, A = d === void 0 || d === o ? "primary" : "secondary";
376
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-barchart-bar-column ${b}`, children: [
377
+ /* @__PURE__ */ n("div", { style: { height: u }, children: l >= 0 && /* @__PURE__ */ n(
378
+ q,
379
+ {
380
+ ariaLabel: s,
381
+ color: r,
382
+ height: v,
383
+ index: o,
384
+ label: g,
385
+ onClick: a,
386
+ selectedIndex: d,
387
+ value: l
388
+ }
389
+ ) }),
390
+ /* @__PURE__ */ n("div", { className: "mx-cmn-zero-line" }),
391
+ t !== 0 && /* @__PURE__ */ n("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
392
+ /* @__PURE__ */ n("div", { style: { height: e }, children: l < 0 && /* @__PURE__ */ n(
393
+ q,
394
+ {
395
+ ariaLabel: s,
396
+ color: r,
397
+ height: D,
398
+ index: o,
399
+ label: g,
400
+ onClick: a,
401
+ value: l
402
+ }
403
+ ) }),
404
+ /* @__PURE__ */ n(
405
+ "div",
406
+ {
407
+ className: `mx-cmn-bar-label ${a ? "mx-cmn-clickable" : ""}`,
408
+ onClick: a ? () => a(o) : void 0,
409
+ children: /* @__PURE__ */ n(B, { bold: d === o, color: A, variant: "Small", children: i })
410
+ }
411
+ )
412
+ ] });
413
+ }, Qt = (s, t) => x({
414
+ display: "flex",
415
+ flexDirection: "column",
416
+ flexGrow: t === void 0 ? 1 : 0,
417
+ width: t,
418
+ "& .mx-cmn-chart-average": {
419
+ borderTop: `${s.Spacing.XTiny}px dotted ${s.Color.Neutral500}`,
420
+ position: "relative",
421
+ marginRight: s.Spacing.XTiny
422
+ },
423
+ "& .mx-cmn-zero-line": {
424
+ borderBottom: "1px solid text.primary",
425
+ width: "100%"
426
+ },
427
+ "& .mx-cmn-bar-label": {
428
+ minHeight: s.Spacing.Medium,
429
+ maxHeight: s.Spacing.Medium,
430
+ marginBottom: s.Spacing.XSmall,
431
+ marginTop: s.Spacing.XSmall,
432
+ textAlign: "center",
433
+ width: "100%"
434
+ },
435
+ "& .mx-cmn-clickable": {
436
+ cursor: "pointer"
437
+ }
438
+ }), zt = (s, t) => s + t, Xt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, jt = (s, t) => [...s, t.value], Q = (s, t, e) => {
439
+ const r = s && t ? e / 2 : e;
440
+ return s ? r : 0;
441
+ }, Kt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Vt = ({
442
+ average: s,
443
+ barWidth: t = "8%",
444
+ color: e,
445
+ data: r,
446
+ height: o,
447
+ legendLabelAverage: a,
448
+ legendLabelMain: c,
449
+ onBarClick: d,
450
+ selectedIndex: u,
451
+ valueFormatter: l = (g) => `${g}`
452
+ }) => {
453
+ const g = C(), m = Zt(g), i = r.reduce(jt, []), _ = s !== void 0 ? s : i.reduce(zt, 0) / i.length, b = Math.max(...i), v = Math.min(...i), D = i.reduce(Xt, 0), A = b >= 0, R = v < 0, I = Q(A, R, o), N = Q(R, A, o), U = Kt(_, b, v, I || N), tt = (w) => u === void 0 || w === u ? e : `${e}80`, P = () => /* @__PURE__ */ n(
454
+ Y,
455
+ {
456
+ averageLineHeight: U,
457
+ bottomHeight: N,
458
+ color: "",
459
+ range: D,
460
+ topHeight: I,
461
+ value: 0,
462
+ width: void 0
463
+ }
464
+ );
465
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart ${m}`, children: [
466
+ /* @__PURE__ */ y("div", { className: "mx-cmn-chart-container", children: [
467
+ /* @__PURE__ */ n(P, {}),
468
+ r.map((w, M) => /* @__PURE__ */ y(dt.Fragment, { children: [
469
+ /* @__PURE__ */ n(
470
+ Y,
471
+ {
472
+ ariaLabel: w.ariaLabel,
473
+ averageLineHeight: U,
474
+ bottomHeight: N,
475
+ color: tt(M),
476
+ index: M,
477
+ onClick: d,
478
+ range: D,
479
+ selectedIndex: u,
480
+ topHeight: I,
481
+ value: w.value,
482
+ valueLabel: l(w.value),
483
+ width: t,
484
+ xAxisLabel: w.label
485
+ }
486
+ ),
487
+ /* @__PURE__ */ n(P, {})
488
+ ] }, `column-${M}`))
489
+ ] }),
490
+ /* @__PURE__ */ n(Wt, { color: e, labelAverage: a, labelMain: c })
491
+ ] });
492
+ }, Zt = (s) => x({
493
+ "& .mx-cmn-chart-container": {
494
+ alignItems: "flex-end",
495
+ display: "flex",
496
+ justifyContent: "space-evenly",
497
+ marginTop: s.Spacing.Large,
498
+ marginBottom: s.Spacing.Medium
499
+ }
500
+ }), Ze = Vt, Jt = ({
231
501
  hasGap: s = !1,
232
502
  segments: t,
233
- size: e = W,
234
- strokeWidth: r = q,
503
+ size: e = gt,
504
+ strokeWidth: r = pt,
235
505
  children: o
236
506
  }) => {
237
- const n = Dt(e), a = (e - r) / 2, c = e / 2;
238
- let g = -90 - (s ? 1 : 0), u = 0;
239
- return /* @__PURE__ */ w("div", { className: `mx-cmn-multi-segment-donut ${n}`, children: [
240
- /* @__PURE__ */ w("svg", { height: e, width: e, children: [
241
- /* @__PURE__ */ b(
507
+ const a = C(), c = te(a, e), d = (e - r) / 2, u = e / 2;
508
+ let l = -90 - (s ? 1 : 0), g = 0;
509
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-multi-segment-donut ${c}`, children: [
510
+ /* @__PURE__ */ y("svg", { height: e, width: e, children: [
511
+ /* @__PURE__ */ n(
242
512
  "circle",
243
513
  {
244
- cx: c,
245
- cy: c,
514
+ cx: u,
515
+ cy: u,
246
516
  fill: "none",
247
- r: a,
248
- stroke: "#E4E8EE",
517
+ r: d,
518
+ stroke: a.Color.Neutral300,
249
519
  strokeWidth: r
250
520
  }
251
521
  ),
252
- t.map((_, y) => (g += 360 * u + (s ? 1 : 0), u = (_.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ b(
522
+ t.map((m, i) => (l += 360 * g + (s ? 1 : 0), g = (m.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
253
523
  "circle",
254
524
  {
255
- cx: c,
256
- cy: c,
525
+ cx: u,
526
+ cy: u,
257
527
  fill: "none",
258
- r: a,
259
- stroke: _.color,
260
- strokeDasharray: 2 * Math.PI * a,
261
- strokeDashoffset: 2 * Math.PI * a * (1 - u),
528
+ r: d,
529
+ stroke: m.color,
530
+ strokeDasharray: 2 * Math.PI * d,
531
+ strokeDashoffset: 2 * Math.PI * d * (1 - g),
262
532
  strokeWidth: r,
263
- transform: `rotate(${g}, ${c}, ${c})`
533
+ transform: `rotate(${l}, ${u}, ${u})`
264
534
  },
265
- y
535
+ i
266
536
  )))
267
537
  ] }),
268
- /* @__PURE__ */ b("div", { className: "mx-cmn-multi-segment-donut-children", children: o })
538
+ /* @__PURE__ */ n("div", { className: "mx-cmn-multi-segment-donut-children", children: o })
269
539
  ] });
270
- }, Dt = (s) => H({
271
- height: s,
272
- marginTop: "-8px",
540
+ }, te = (s, t) => x({
541
+ height: t,
542
+ marginTop: `-${s.Spacing.XSmall}px`,
273
543
  position: "relative",
274
- width: s,
544
+ width: t,
275
545
  "& .mx-cmn-multi-segment-donut-children": {
276
546
  left: "50%",
277
547
  position: "absolute",
@@ -279,20 +549,25 @@ const ye = ({
279
549
  top: "50%",
280
550
  transform: "translate(-50%, -50%)"
281
551
  }
282
- });
283
- class At {
552
+ }), Je = Jt;
553
+ class ee {
284
554
  globalStore;
285
- api = new C("/", "");
555
+ api = new $("/", "");
286
556
  copy = {};
287
557
  featureNamespace = "experiences";
288
558
  isInitialized = !1;
289
559
  constructor(t) {
290
- this.globalStore = t, this.api = new C(
560
+ this.globalStore = t, this.api = new $(
291
561
  t.endpoint,
292
562
  t.sessionToken,
293
563
  t.onError
294
- ), l(this);
564
+ ), f(this);
295
565
  }
566
+ // DEPRECATED: Initialize api in constructor and use loadCopy instead
567
+ // TODO: Remove this function
568
+ initialize = async (t, e) => {
569
+ this.api = new $(t, e), await this.loadCopy();
570
+ };
296
571
  loadCopy = async () => {
297
572
  await this.getCopy(this.featureNamespace), p(() => {
298
573
  this.isInitialized = !0;
@@ -309,7 +584,7 @@ class At {
309
584
  }
310
585
  };
311
586
  }
312
- class Et {
587
+ class se {
313
588
  globalStore;
314
589
  survey = null;
315
590
  currentQuestionIndex = 0;
@@ -317,7 +592,7 @@ class Et {
317
592
  response = null;
318
593
  responses = {};
319
594
  constructor(t) {
320
- this.globalStore = t, l(this);
595
+ this.globalStore = t, f(this);
321
596
  }
322
597
  get isLastQuestion() {
323
598
  return this.currentQuestionIndex === this.surveyQuestions.length - 1;
@@ -339,7 +614,7 @@ class Et {
339
614
  return this.survey ? this.survey.questions : [];
340
615
  }
341
616
  loadSurvey = (t = !1) => {
342
- J.getActiveMatchingSurveys((e) => {
617
+ St.getActiveMatchingSurveys((e) => {
343
618
  p(() => {
344
619
  if (e.length > 0) {
345
620
  const r = e.find((o) => o.id === this.surveyId);
@@ -358,12 +633,12 @@ class Et {
358
633
  this.response = t, this.question && (this.responses[`$survey_response_${this.question.id}`] = t);
359
634
  };
360
635
  }
361
- class B {
636
+ class z {
362
637
  fetchInstance;
363
638
  constructor(t, e, r) {
364
- this.fetchInstance = new h(t, e, void 0, r);
639
+ this.fetchInstance = new S(t, e, void 0, r);
365
640
  }
366
- addBudget = async (t, e, r = null) => this.fetchInstance.post(i.BUDGETS, {
641
+ addBudget = async (t, e, r = null) => this.fetchInstance.post(h.BUDGETS, {
367
642
  amount: e,
368
643
  category_guid: t.guid,
369
644
  category_name: t.name,
@@ -371,36 +646,36 @@ class B {
371
646
  }).then((o) => o.budget).catch((o) => {
372
647
  throw o;
373
648
  });
374
- deleteBudget = async (t) => this.fetchInstance.delete(`${i.BUDGETS}/${t}`).then((e) => e).catch((e) => {
649
+ deleteBudget = async (t) => this.fetchInstance.delete(`${h.BUDGETS}/${t}`).then((e) => e).catch((e) => {
375
650
  throw e;
376
651
  });
377
- getBudgets = async () => this.fetchInstance.get(i.BUDGETS).then((t) => t.budgets).catch((t) => t);
378
- updateBudget = async (t) => this.fetchInstance.put(`${i.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
652
+ getBudgets = async () => this.fetchInstance.get(h.BUDGETS).then((t) => t.budgets).catch((t) => t);
653
+ updateBudget = async (t) => this.fetchInstance.put(`${h.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
379
654
  throw e;
380
655
  });
381
656
  }
382
- class xt {
383
- api = new B("/", "");
657
+ class re {
658
+ api = new z("/", "");
384
659
  globalStore;
385
660
  alert = "";
386
- dateRange = { start: P(D()), end: O(D()) };
661
+ dateRange = { start: J(O()), end: Z(O()) };
387
662
  budgets = [];
388
663
  selectedBudget;
389
664
  selectedSubBudget;
390
665
  isDataLoaded = !1;
391
666
  theme = {};
392
667
  constructor(t) {
393
- this.globalStore = t, this.api = new B(t.endpoint, t.sessionToken, t.onError), l(this);
668
+ this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken, t.onError), f(this);
394
669
  }
395
670
  loadBudgetData = async () => {
396
- this.globalStore.recurringTransactionsStore.isDataLoaded || await this.globalStore.recurringTransactionsStore.loadRepeatingTransactionData(), await this.loadBudgets(), V(
671
+ await this.loadBudgets(), _t(
397
672
  () => this.detailedBudgets,
398
673
  (t) => {
399
674
  if (t) {
400
675
  const e = this.selectedBudget;
401
- e && (this.selectedBudget = et(t, e.guid));
676
+ e && (this.selectedBudget = wt(t, e.guid));
402
677
  const r = this.selectedSubBudget;
403
- r && r.parent_guid && (this.selectedSubBudget = st(
678
+ r && r.parent_guid && (this.selectedSubBudget = xt(
404
679
  t,
405
680
  r.guid,
406
681
  r.parent_guid
@@ -410,24 +685,23 @@ class xt {
410
685
  );
411
686
  };
412
687
  get detailedBudgets() {
413
- return A(
688
+ return L(
414
689
  this.budgets.filter(
415
- (t) => t.category_guid !== f.INCOME && t.category_guid !== f.TRANSFER && t.category_guid !== f.INVESTMENTS
690
+ (t) => t.category_guid !== E.INCOME && t.category_guid !== E.TRANSFER && t.category_guid !== E.INVESTMENTS
416
691
  ),
417
692
  this.globalStore.categoryStore.detailedCategories,
418
693
  this.globalStore.copyStore.copy.budgets,
419
694
  this.theme
420
695
  ).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
421
696
  }
422
- // TODO: Replace this with income from recurring transactions. Income budgets are deprecated.
423
697
  get incomeBudget() {
424
- return A(
698
+ return L(
425
699
  this.budgets.filter((r) => !r.parent_guid),
426
700
  this.globalStore.categoryStore.detailedCategories,
427
701
  this.globalStore.copyStore.copy.budgets,
428
702
  this.theme
429
703
  ).reduce(
430
- (r, o) => o.category_guid !== f.INCOME ? r : !r || o.percentage > r.percentage ? o : r,
704
+ (r, o) => o.category_guid !== E.INCOME ? r : !r || o.percentage > r.percentage ? o : r,
431
705
  void 0
432
706
  )?.amount;
433
707
  }
@@ -462,15 +736,14 @@ class xt {
462
736
  loadBudgets = async () => {
463
737
  try {
464
738
  const t = await this.api.getBudgets();
465
- this.setBudgets(t);
739
+ p(() => {
740
+ this.budgets = t, this.isDataLoaded = !0;
741
+ });
466
742
  } catch (t) {
467
743
  throw console.error(`Error occurred while loading budgets: ${t}`), t;
468
744
  }
469
745
  };
470
746
  setAlert = (t) => this.alert = t;
471
- setBudgets = (t) => {
472
- this.budgets = t, this.isDataLoaded = !0;
473
- };
474
747
  setDateRange = (t) => this.dateRange = t;
475
748
  setSelectedBudget = (t) => this.selectedBudget = t;
476
749
  setSelectedSubBudget = (t) => this.selectedSubBudget = t;
@@ -482,7 +755,7 @@ class xt {
482
755
  recalculateBudgets = async (t) => {
483
756
  try {
484
757
  for (const r of t) {
485
- const o = this.budgets.find((n) => n.category_guid === r.guid);
758
+ const o = this.budgets.find((a) => a.category_guid === r.guid);
486
759
  o ? await this.api.updateBudget({
487
760
  ...o,
488
761
  amount: r.totalAverageAmount
@@ -510,38 +783,38 @@ class xt {
510
783
  }
511
784
  };
512
785
  }
513
- class k {
786
+ class X {
514
787
  fetchInstance;
515
788
  constructor(t, e, r) {
516
- this.fetchInstance = new h(t, e, void 0, r);
789
+ this.fetchInstance = new S(t, e, void 0, r);
517
790
  }
518
- createSupportTicket = async (t) => this.fetchInstance.post(i.SUPPORT_TICKETS, t).then((e) => e);
791
+ createSupportTicket = async (t) => this.fetchInstance.post(h.SUPPORT_TICKETS, t).then((e) => e);
519
792
  }
520
- const Tt = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, It = (s, t) => {
793
+ const oe = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, ae = (s, t) => {
521
794
  const e = [];
522
- for (const r of R) {
795
+ for (const r of ot) {
523
796
  const o = t[r.guid];
524
797
  if (!o) continue;
525
- const n = {
798
+ const a = {
526
799
  ...r,
527
800
  title: o.label,
528
- topics: r.topics.map(({ topicKey: a }, c) => ({
529
- topicKey: a,
530
- label: o.topics[c]
801
+ topics: r.topics.map(({ topicKey: c }, d) => ({
802
+ topicKey: c,
803
+ label: o.topics[d]
531
804
  }))
532
805
  };
533
- Tt(n, s) && e.push(n);
806
+ oe(a, s) && e.push(a);
534
807
  }
535
808
  return e;
536
809
  };
537
- class vt {
810
+ class ne {
538
811
  alert = { message: "", severity: void 0 };
539
- api = new k("/", "");
812
+ api = new X("/", "");
540
813
  appConfig;
541
814
  globalStore;
542
815
  isLoading = !1;
543
816
  constructor(t) {
544
- this.globalStore = t, this.api = new k(t.endpoint, t.sessionToken, t.onError), l(this);
817
+ this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), f(this);
545
818
  }
546
819
  createSupportTicket = async (t) => {
547
820
  try {
@@ -560,7 +833,7 @@ class vt {
560
833
  const { client_communication_profile: t, client_profile: e } = this.globalStore.appDataStore.appData, {
561
834
  help: { category_list: r }
562
835
  } = this.globalStore.copyStore.copy;
563
- return It(
836
+ return ae(
564
837
  {
565
838
  ...t,
566
839
  ...e,
@@ -570,45 +843,44 @@ class vt {
570
843
  );
571
844
  }
572
845
  }
573
- class N {
846
+ class j {
574
847
  fetchInstance;
575
848
  constructor(t, e, r) {
576
- this.fetchInstance = new h(t, e, void 0, r);
849
+ this.fetchInstance = new S(t, e, void 0, r);
577
850
  }
578
- getHoldings = async () => this.fetchInstance.get(i.HOLDINGS).then((t) => t.holdings);
579
- updateHoldings = async (t) => this.fetchInstance.put(`${i.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
851
+ getHoldings = async () => this.fetchInstance.get(h.HOLDINGS).then((t) => t.holdings);
852
+ updateHoldings = async (t) => this.fetchInstance.put(`${h.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
580
853
  }
581
- class Bt {
582
- analysisType = at.Stocks;
583
- api = new N("/", "");
854
+ class ie {
855
+ analysisType = Dt.Stocks;
856
+ api = new j("/", "");
584
857
  holdings = [];
585
858
  holdingsLoaded = !1;
586
859
  globalStore;
587
860
  showConnectionsWidget = !1;
588
861
  constructor(t) {
589
- this.globalStore = t, this.api = new N(t.endpoint, t.sessionToken, t.onError), l(this);
862
+ this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), f(this);
590
863
  }
591
864
  get analysisChartData() {
592
- return it(nt(this.visibleHoldings), this.analysisType);
865
+ return At(Et(this.visibleHoldings), this.analysisType);
593
866
  }
594
867
  get analysisDetails() {
595
- return ct(this.visibleHoldings)[this.analysisType] || {};
868
+ return Tt(this.visibleHoldings)[this.analysisType] || {};
596
869
  }
597
870
  get visibleHoldings() {
598
871
  return this.holdings.filter(
599
872
  (t) => this.globalStore.globalUiStore.selectedAccountGuids.includes(t.account_guid)
600
873
  );
601
874
  }
602
- setHoldings = (t) => {
603
- this.holdings = t, this.holdingsLoaded = !0;
604
- };
605
875
  setShowConnectionsWidget = (t) => {
606
876
  this.showConnectionsWidget = t;
607
877
  };
608
878
  loadHoldings = async () => {
609
879
  try {
610
880
  const t = await this.api.getHoldings();
611
- this.setHoldings(t);
881
+ p(() => {
882
+ this.holdings = [...t], this.holdingsLoaded = !0;
883
+ });
612
884
  } catch (t) {
613
885
  console.error(`Error occured while getting holdings: ${t}`);
614
886
  }
@@ -631,7 +903,7 @@ class Bt {
631
903
  }
632
904
  };
633
905
  }
634
- const U = {
906
+ const K = {
635
907
  clientConfig: {},
636
908
  clientStyleProfile: {},
637
909
  config: {
@@ -735,22 +1007,21 @@ const U = {
735
1007
  postHogPublicKey: "phc_1fVYJICC69TpW4wagp9o2XqQ8E7X98cAmcR5psSpfkE",
736
1008
  userFeatures: []
737
1009
  };
738
- class L {
1010
+ class V {
739
1011
  fetchInstance;
740
1012
  constructor(t, e, r) {
741
- this.fetchInstance = new h(t, e, void 0, r);
1013
+ this.fetchInstance = new S(t, e, void 0, r);
742
1014
  }
743
- getAppData = async () => this.fetchInstance.get(i.APP_DATA).then((t) => t);
1015
+ getAppData = async () => this.fetchInstance.get(h.APP_DATA).then((t) => t);
744
1016
  }
745
- class kt {
1017
+ class ce {
746
1018
  globalStore;
747
- api = new L("/", "");
748
- bannerApi = new T("/");
1019
+ api = new V("/", "");
1020
+ bannerApi = new F("/");
749
1021
  appData = {};
750
- isAppDataLoaded = !1;
751
1022
  banner = {};
752
1023
  constructor(t) {
753
- this.globalStore = t, this.api = new L(t.endpoint, t.sessionToken, t.onError), l(this);
1024
+ this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), f(this);
754
1025
  }
755
1026
  get appConfig() {
756
1027
  return this.globalStore.appConfig;
@@ -770,15 +1041,14 @@ class kt {
770
1041
  get userProfile() {
771
1042
  return this.appData.user_profile;
772
1043
  }
773
- setAppData = (t) => {
774
- this.appData = t, this.bannerApi = new T(t.address?.bullseye || "/"), this.isAppDataLoaded = !0;
775
- };
776
- loadAppData = async () => {
1044
+ loadAppData = async (t) => {
777
1045
  try {
778
- const t = await this.api.getAppData();
779
- this.setAppData(t);
780
- } catch (t) {
781
- console.error(`Error loading app data: ${t}`);
1046
+ const e = t || await this.api.getAppData();
1047
+ p(() => {
1048
+ this.appData = e, this.bannerApi = new F(e.address?.bullseye || "/");
1049
+ });
1050
+ } catch (e) {
1051
+ console.error(`Error loading app data: ${e}`);
782
1052
  }
783
1053
  };
784
1054
  loadBanner = async () => {
@@ -795,40 +1065,35 @@ class kt {
795
1065
  setUserCommunicationProfile = (t) => this.appData.user_communication_profile = t;
796
1066
  setUserProfile = (t) => this.appData.user_profile = t;
797
1067
  }
798
- class Nt {
1068
+ class de {
799
1069
  globalStore;
800
- widgetApi = new v("/", "");
1070
+ widgetApi = new W("/", "");
801
1071
  constructor(t) {
802
- this.globalStore = t, this.widgetApi = new v(t.endpoint, t.sessionToken), l(this);
1072
+ this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), f(this);
803
1073
  }
804
1074
  loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
805
1075
  widget_url: { widget_type: t, color_scheme: e, ...r }
806
1076
  });
807
1077
  }
808
- class Ut {
1078
+ class le {
809
1079
  globalStore;
1080
+ isInitialized = !1;
810
1081
  selectedAccounts = [];
811
1082
  selectedAccountGuids = this.selectedAccounts.map((t) => t.guid);
812
1083
  displayedDate = /* @__PURE__ */ new Date();
813
1084
  displayedDateRange = {
814
- start: P(this.displayedDate),
815
- end: O(this.displayedDate)
1085
+ start: J(this.displayedDate),
1086
+ end: Z(this.displayedDate)
816
1087
  };
817
1088
  constructor(t) {
818
- l(this), this.globalStore = t;
1089
+ f(this), this.globalStore = t;
819
1090
  }
820
1091
  get isCopyLoaded() {
821
1092
  return this.globalStore.copyStore.isInitialized;
822
1093
  }
823
- get isConfigLoaded() {
824
- return this.globalStore.appDataStore.isAppDataLoaded;
825
- }
826
- get areUserFeaturesLoaded() {
827
- return this.globalStore.userStore.userFeaturesLoaded;
828
- }
829
- get isInitialized() {
830
- return this.isCopyLoaded && this.isConfigLoaded && this.areUserFeaturesLoaded;
831
- }
1094
+ setInitialized = (t) => {
1095
+ this.isInitialized = t;
1096
+ };
832
1097
  // for the global account filter
833
1098
  // if excluded from 1 widget, excluded from all
834
1099
  setSelectedAccounts = (t) => {
@@ -838,8 +1103,8 @@ class Ut {
838
1103
  };
839
1104
  // Sets an array of selected account guids for the AccountFilter component
840
1105
  setSelectedAccountGuids = async (t) => {
841
- const e = new Set(this.selectedAccountGuids), r = new Set(t), o = [...r].filter((a) => !e.has(a)), n = [...e].filter((a) => !r.has(a));
842
- o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !1), n.length > 0 && this.globalStore.accountStore.updateAccountFiltering(n, !0), this.selectedAccountGuids = t;
1106
+ const e = new Set(this.selectedAccountGuids), r = new Set(t), o = [...r].filter((c) => !e.has(c)), a = [...e].filter((c) => !r.has(c));
1107
+ o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !1), a.length > 0 && this.globalStore.accountStore.updateAccountFiltering(a, !0), this.selectedAccountGuids = t;
843
1108
  };
844
1109
  setDisplayedDate = (t, e) => {
845
1110
  this.displayedDate = e, this.displayedDateRange = {
@@ -848,37 +1113,40 @@ class Ut {
848
1113
  };
849
1114
  };
850
1115
  get shouldDisableNextDate() {
851
- const t = m(this.displayedDate), e = m(ht(/* @__PURE__ */ new Date(), 1));
1116
+ const t = T(this.displayedDate), e = T(Mt(/* @__PURE__ */ new Date(), 1));
852
1117
  return t === e;
853
1118
  }
854
1119
  get shouldDisablePrevDate() {
855
- const t = m(this.displayedDate), e = m(/* @__PURE__ */ new Date());
1120
+ const t = T(this.displayedDate), e = T(/* @__PURE__ */ new Date());
856
1121
  return t === e;
857
1122
  }
858
1123
  }
859
- class Lt {
1124
+ class ue {
860
1125
  globalStore;
861
- api = new I("/", "");
1126
+ api = new k("/", "");
862
1127
  userFeatures = [];
863
- userFeaturesLoaded = !1;
864
1128
  constructor(t) {
865
- this.globalStore = t, this.api = new I(t.endpoint, t.sessionToken, t.onError), l(this);
1129
+ this.globalStore = t, this.api = new k(t.endpoint, t.sessionToken, t.onError), f(this);
866
1130
  }
1131
+ // DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
1132
+ // TODO: Remove this function
1133
+ initialize = async (t, e) => {
1134
+ this.api = new k(t, e), await this.loadUserFeatures();
1135
+ };
867
1136
  get userProfile() {
868
1137
  return this.globalStore.appDataStore.userProfile;
869
1138
  }
870
1139
  get user() {
871
1140
  return this.globalStore.appDataStore.user;
872
1141
  }
873
- setUserFeatures = (t) => {
874
- this.userFeatures = t, this.userFeaturesLoaded = !0;
875
- };
876
- loadUserFeatures = async () => {
1142
+ loadUserFeatures = async (t) => {
877
1143
  try {
878
- const t = await this.api.getUserFeatures();
879
- this.setUserFeatures(t);
880
- } catch (t) {
881
- console.error(`Error occurred while loading user features: ${t}`);
1144
+ const e = t || await this.api.getUserFeatures();
1145
+ p(() => {
1146
+ this.userFeatures = e;
1147
+ });
1148
+ } catch (e) {
1149
+ console.error(`Error occurred while loading user features: ${e}`);
882
1150
  }
883
1151
  };
884
1152
  updateUser = async (t) => {
@@ -898,9 +1166,9 @@ class Lt {
898
1166
  }
899
1167
  };
900
1168
  }
901
- class Se {
1169
+ class ts {
902
1170
  // Global properties
903
- appConfig = U;
1171
+ appConfig = K;
904
1172
  endpoint = "/";
905
1173
  sessionToken = "";
906
1174
  onError;
@@ -930,11 +1198,11 @@ class Se {
930
1198
  userStore;
931
1199
  // UI Stores
932
1200
  globalUiStore;
933
- constructor(t = U, e = "/", r, o) {
934
- this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.onStoreUpdate = o, this.accountStore = new X(this), this.appDataStore = new kt(this), this.analyticsStore = new Et(this), this.beatStore = new tt(this), this.budgetsStore = new xt(this), this.cashflowStore = new G(this), this.categoryStore = new Y(this), this.connectStore = new Nt(this), this.copyStore = new At(this), this.debtsStore = new rt(this), this.finstrongStore = new ot(this), this.goalStore = new K(this), this.helpStore = new vt(this), this.holdingStore = new Bt(this), this.merchantStore = new dt(this), this.netWorthStore = new ut(this), this.notificationStore = new Q(this), this.recurringTransactionsStore = new j(this), this.settingsStore = new lt(this), this.transactionStore = new $(this), this.trendsStore = new z(this), this.userStore = new Lt(this), this.globalUiStore = new Ut(this), l(this), Z(() => {
935
- const { transactions: n } = this.transactionStore;
1201
+ constructor(t = K, e = "/", r, o) {
1202
+ this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.onStoreUpdate = o, this.accountStore = new yt(this), this.appDataStore = new ce(this), this.analyticsStore = new se(this), this.beatStore = new bt(this), this.budgetsStore = new re(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new de(this), this.copyStore = new ee(this), this.debtsStore = new Ct(this), this.finstrongStore = new vt(this), this.goalStore = new it(this), this.helpStore = new ne(this), this.holdingStore = new ie(this), this.merchantStore = new Bt(this), this.netWorthStore = new It(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new Nt(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new ue(this), this.globalUiStore = new le(this), f(this), ft(() => {
1203
+ const { transactions: a } = this.transactionStore;
936
1204
  this.emitUpdate({
937
- transactions: n
1205
+ transactions: a
938
1206
  });
939
1207
  });
940
1208
  }
@@ -945,178 +1213,186 @@ class Se {
945
1213
  emitUpdate = (t) => {
946
1214
  this.onStoreUpdate?.(t);
947
1215
  };
948
- loadConfigData = async () => {
949
- await Promise.all([
950
- // Load copy, config and user data
951
- this.copyStore.loadCopy(),
952
- this.appDataStore.loadAppData(),
953
- this.userStore.loadUserFeatures()
954
- ]);
955
- };
956
1216
  loadData = async ({
957
1217
  accounts: t,
958
1218
  appData: e,
959
1219
  associatedBeats: r,
960
1220
  categories: o,
961
- institutions: n,
962
- transactionRules: a,
963
- transactions: c,
964
- userFeatures: g
1221
+ institutions: a,
1222
+ transactionRules: c,
1223
+ transactions: d,
1224
+ userFeatures: u
965
1225
  } = {}) => {
966
- (!e || !g) && await this.loadConfigData(), e && this.appDataStore.setAppData(e), g && this.userStore.setUserFeatures(g), t && (await this.accountStore.loadMembers(), n && this.accountStore.setInstitutions(n), this.accountStore.setAccounts(t)), r && this.transactionStore.setAssociatedBeats(r), o && this.categoryStore.setCategories(o), c && this.transactionStore.setTransactions(c), a && this.transactionStore.setTransactionRules(a);
1226
+ await Promise.all([
1227
+ // Load copy, config and quser data
1228
+ this.copyStore.loadCopy(),
1229
+ this.appDataStore.loadAppData(e),
1230
+ this.userStore.loadUserFeatures(u)
1231
+ ]), await Promise.all([
1232
+ this.accountStore.loadAccountData({ accounts: t, institutions: a }),
1233
+ this.categoryStore.loadCategories(o),
1234
+ this.transactionStore.loadTransactionData({
1235
+ associatedBeats: r,
1236
+ transactionRules: c,
1237
+ transactions: d
1238
+ })
1239
+ ]), this.globalUiStore.setInitialized(!0);
967
1240
  };
968
1241
  }
969
1242
  export {
970
- Ss as ANALYTICS_EVENTS,
971
- je as AccountFilter,
972
- Ve as AccountIcon,
973
- Ze as AccountIconVariants,
974
- ar as AccountNotificationTypes,
975
- Xe as AccountSubType,
976
- Je as AccountType,
977
- ts as AccountTypeName,
978
- Us as AnalyticsApi,
979
- i as ApiEndpoints,
980
- T as BannerApi,
981
- Rs as BeatApi,
982
- ir as BudgetNotificationTypes,
983
- hs as Calendar,
984
- gs as CalendarSelectionTypes,
985
- Gs as CategoryApi,
986
- fr as CategoryColors,
987
- mr as CategoryGuidToName,
988
- f as CategoryGuids,
989
- yr as CategoryIcon,
990
- Qs as ConnectCard,
991
- es as ConnectDrawer,
992
- ss as ConnectionStatus,
993
- rs as ConnectionStatusEnums,
994
- wr as CurrencyCodes,
995
- Ie as CurrencyInput,
996
- Zs as CurrencyText,
997
- Ds as DATE_FORMATS_INTL,
998
- W as DEFAULT_DONUT_SIZE,
999
- q as DEFAULT_STROKE_WIDTH,
1000
- Ge as DataRow,
1001
- bs as DateRangeSelector,
1002
- As as Dialog,
1003
- ks as Drawer,
1004
- Js as EmptyState,
1005
- Ce as ErrorBoundary,
1006
- os as ErrorStatuses,
1007
- bt as ExpenseStatus,
1008
- h as Fetch,
1009
- Fe as Frequency,
1010
- C as GlobalCopyApi,
1011
- At as GlobalCopyStore,
1012
- kr as GlobalDataContext,
1013
- Nr as GlobalDataProvider,
1014
- Se as GlobalStore,
1015
- Ks as GoalType,
1016
- hr as INCOME_ACCOUNT_TYPES,
1017
- Re as IconBacking,
1018
- Ke as InformationTooltip,
1019
- nr as InsightNotificationTypes,
1020
- ft as IterationItemTypes,
1021
- pe as LOADING_STATUS,
1022
- er as ListItemAction,
1023
- rr as ListItemRow,
1024
- ps as ListItemWrapper,
1025
- Be as Loader,
1026
- fe as LocalizedCopyApi,
1027
- zs as MetaType,
1028
- as as MfaStatuses,
1029
- Ae as MicroWidgetContainer,
1030
- xe as MiniWidgetContainer,
1031
- ye as MultiSegmentDonut,
1032
- is as NonConnectedStatuses,
1033
- Hs as NotificationApi,
1034
- cr as NotificationTypes,
1035
- Es as ORDINAL_DATE_FORMAT,
1036
- xs as ORDINAL_MONTH_DAY_YEAR_FORMAT,
1037
- gr as PAYMENT_ACCOUNT_TYPES,
1038
- Sr as PaymentCategories,
1039
- _t as PlanTypes,
1040
- ns as ProcessingStatuses,
1041
- cs as PropertyType,
1042
- ds as PropertyTypeName,
1043
- ge as RECURRENCE_COPY,
1044
- He as RecurrenceStatus,
1045
- We as RecurrenceType,
1046
- pt as RecurrenceTypes,
1047
- qe as RepeatingType,
1048
- Ne as ResponsiveButton,
1049
- pr as SPENDING_ACCOUNT_TYPES,
1050
- wt as ScheduledPaymentTypes,
1051
- me as ScheduledPaymentsApi,
1052
- Ct as ScreenSize,
1053
- qs as SearchBox,
1054
- Ye as Select,
1055
- Le as SelectionBox,
1056
- vs as SingleSegmentDonut,
1057
- Ir as Sizes,
1058
- ms as StatusBar,
1059
- us as StatusName,
1060
- vr as TOUCH_TARGET,
1061
- Pe as TabContentContainer,
1062
- dr as ToggleButtonListItem,
1063
- ur as ToggleListItem,
1064
- js as TrackType,
1065
- _s as TransactionStatus,
1066
- F as TransactionType,
1067
- I as UserApi,
1068
- Lt as UserStore,
1069
- St as UserVerification,
1070
- v as WidgetApi,
1071
- ws as WidgetContainer,
1072
- Ur as WidgetContainerContext,
1073
- Lr as WidgetContainerProvider,
1074
- Ls as analyticsSession,
1075
- Do as buildDynamicCopy,
1076
- Ao as buildPluralCopy,
1077
- Cr as formatCurrency,
1078
- Ts as formatDate,
1079
- Dr as formatOrdinal,
1080
- Ar as formatPercentage,
1081
- wo as fromTimestampToMonthYear,
1082
- _o as getCategory,
1083
- fo as getCategoryTotalsByParent,
1084
- _e as getClientTheme,
1085
- Er as getCurrencyCodes,
1086
- mo as getDetailedCategory,
1087
- yo as getDetailedSubCategory,
1088
- Eo as getLocale,
1089
- So as isIncome,
1090
- xr as isValidNumber,
1091
- co as useAccountDisplayName,
1092
- Or as useAccountStore,
1093
- Pr as useAppConfig,
1094
- Mr as useBudgetsStore,
1095
- Rr as useCashflowStore,
1096
- $r as useCategoryStore,
1097
- Os as useCombineEvents,
1098
- Ps as useCombinePageviews,
1099
- Gr as useDebtStore,
1100
- Fr as useError,
1101
- Hr as useEvent,
1102
- Wr as useFinstrongStore,
1103
- qr as useGlobalCopyStore,
1104
- Yr as useGlobalStore,
1105
- Qr as useGlobalUiStore,
1106
- Kr as useGoalStore,
1107
- zr as useHelpStore,
1108
- jr as useHoldingStore,
1109
- lo as useInsightsEnabled,
1110
- Vr as useLoad,
1111
- Zr as useMerchantStore,
1112
- Xr as useNetWorthStore,
1113
- Jr as useNotificationStore,
1114
- to as usePageView,
1115
- eo as useRecurringTransactionsStore,
1116
- go as useScreenSize,
1117
- so as useSettingsStore,
1118
- ro as useTransactionStore,
1119
- oo as useTrendsStore,
1120
- ao as useUserStore,
1121
- io as useWidgetContainerProvider
1243
+ Ds as ANALYTICS_EVENTS,
1244
+ Bs as AccountFilter,
1245
+ Is as AccountIcon,
1246
+ Ns as AccountIconVariants,
1247
+ Tr as AccountNotificationTypes,
1248
+ Ms as AccountSubType,
1249
+ $s as AccountType,
1250
+ ks as AccountTypeName,
1251
+ rs as AnalyticsApi,
1252
+ h as ApiEndpoints,
1253
+ F as BannerApi,
1254
+ Ze as BarChart,
1255
+ cs as BeatApi,
1256
+ Br as BudgetNotificationTypes,
1257
+ ps as Calendar,
1258
+ ms as CalendarSelectionTypes,
1259
+ ls as CategoryApi,
1260
+ Vr as CategoryColors,
1261
+ Zr as CategoryGuidToName,
1262
+ E as CategoryGuids,
1263
+ Jr as CategoryIcon,
1264
+ mr as ConnectCard,
1265
+ Rs as ConnectDrawer,
1266
+ Us as ConnectionStatus,
1267
+ Ps as ConnectionStatusEnums,
1268
+ so as CurrencyCodes,
1269
+ Qs as CurrencyInput,
1270
+ br as CurrencyText,
1271
+ Pr as DATE_FORMATS_INTL,
1272
+ gt as DEFAULT_DONUT_SIZE,
1273
+ pt as DEFAULT_STROKE_WIDTH,
1274
+ nr as DataRow,
1275
+ As as DateRangeSelector,
1276
+ Or as Dialog,
1277
+ Yr as Drawer,
1278
+ xr as EmptyState,
1279
+ Ss as ErrorBoundary,
1280
+ Os as ErrorStatuses,
1281
+ Gt as ExpenseStatus,
1282
+ S as Fetch,
1283
+ ir as Frequency,
1284
+ $ as GlobalCopyApi,
1285
+ ee as GlobalCopyStore,
1286
+ go as GlobalDataContext,
1287
+ po as GlobalDataProvider,
1288
+ ts as GlobalStore,
1289
+ _r as GoalType,
1290
+ zr as INCOME_ACCOUNT_TYPES,
1291
+ or as IconBacking,
1292
+ gr as InformationTooltip,
1293
+ Ir as InsightNotificationTypes,
1294
+ Ut as IterationItemTypes,
1295
+ ze as LOADING_STATUS,
1296
+ vr as ListItemAction,
1297
+ Ar as ListItemRow,
1298
+ _s as ListItemWrapper,
1299
+ Xs as Loader,
1300
+ je as LocalizedCopyApi,
1301
+ fr as MetaType,
1302
+ Ls as MfaStatuses,
1303
+ ws as MicroWidgetContainer,
1304
+ Cs as MiniWidgetContainer,
1305
+ Je as MultiSegmentDonut,
1306
+ Gs as NonConnectedStatuses,
1307
+ hs as NotificationApi,
1308
+ Nr as NotificationTypes,
1309
+ Lr as ORDINAL_DATE_FORMAT,
1310
+ Gr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
1311
+ Xr as PAYMENT_ACCOUNT_TYPES,
1312
+ to as PaymentCategories,
1313
+ Rt as PlanTypes,
1314
+ Hs as ProcessingStatuses,
1315
+ Fs as PropertyType,
1316
+ Ws as PropertyTypeName,
1317
+ Qe as RECURRENCE_COPY,
1318
+ cr as RecurrenceStatus,
1319
+ dr as RecurrenceType,
1320
+ kt as RecurrenceTypes,
1321
+ lr as RepeatingType,
1322
+ Ks as ResponsiveButton,
1323
+ jr as SPENDING_ACCOUNT_TYPES,
1324
+ Ht as ScheduledPaymentTypes,
1325
+ Ke as ScheduledPaymentsApi,
1326
+ Ft as ScreenSize,
1327
+ Zs as SearchBox,
1328
+ ur as Select,
1329
+ tr as SelectionBox,
1330
+ Wr as SingleSegmentDonut,
1331
+ lo as Sizes,
1332
+ Rr as StatusBar,
1333
+ qs as StatusName,
1334
+ uo as TOUCH_TARGET,
1335
+ sr as TabContentContainer,
1336
+ Mr as ToggleButtonListItem,
1337
+ $r as ToggleListItem,
1338
+ yr as TrackType,
1339
+ fs as TransactionStatus,
1340
+ rt as TransactionType,
1341
+ k as UserApi,
1342
+ ue as UserStore,
1343
+ Lt as UserVerification,
1344
+ W as WidgetApi,
1345
+ Es as WidgetContainer,
1346
+ mo as WidgetContainerContext,
1347
+ _o as WidgetContainerProvider,
1348
+ os as analyticsSession,
1349
+ na as buildDynamicCopy,
1350
+ ia as buildPluralCopy,
1351
+ ro as formatCurrency,
1352
+ Hr as formatDate,
1353
+ oo as formatOrdinal,
1354
+ ao as formatPercentage,
1355
+ oa as fromTimestampToMonthYear,
1356
+ Zo as getCategory,
1357
+ Jo as getCategoryTotalsByParent,
1358
+ Xe as getClientTheme,
1359
+ no as getCurrencyCodes,
1360
+ ta as getDetailedCategory,
1361
+ ea as getDetailedSubCategory,
1362
+ ca as getLocale,
1363
+ sa as isIncome,
1364
+ io as isValidNumber,
1365
+ qo as useAccountDisplayName,
1366
+ fo as useAccountStore,
1367
+ yo as useAppConfig,
1368
+ So as useBudgetsStore,
1369
+ bo as useCashflowStore,
1370
+ wo as useCategoryStore,
1371
+ as as useCombineEvents,
1372
+ ns as useCombinePageviews,
1373
+ xo as useDebtStore,
1374
+ Co as useError,
1375
+ vo as useEvent,
1376
+ Do as useFinstrongStore,
1377
+ Ao as useGlobalCopyStore,
1378
+ Eo as useGlobalStore,
1379
+ To as useGlobalUiStore,
1380
+ Bo as useGoalStore,
1381
+ Io as useHelpStore,
1382
+ No as useHoldingStore,
1383
+ Qo as useInsightsEnabled,
1384
+ Mo as useLoad,
1385
+ $o as useMerchantStore,
1386
+ ko as useNetWorthStore,
1387
+ Ro as useNotificationStore,
1388
+ Uo as usePageView,
1389
+ Ve as usePrevious,
1390
+ Po as useRecurringTransactionsStore,
1391
+ Xo as useScreenSize,
1392
+ Oo as useSettingsStore,
1393
+ Lo as useTransactionStore,
1394
+ Go as useTrendsStore,
1395
+ Ho as useUserStore,
1396
+ Fo as useWidgetContainerProvider,
1397
+ Ko as useWidgetLoadTimer
1122
1398
  };