@mx-cartographer/experiences 7.2.16-alpha.mm0 → 8.0.0-alpha.bb1

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 (63) hide show
  1. package/dist/{Account-vp_TAbGt.mjs → Account-Bxw0_4FU.mjs} +1 -1
  2. package/dist/{AccountDetailsContent-CsH1w_GZ.mjs → AccountDetailsContent-CAM9y39M.mjs} +6 -6
  3. package/dist/{AccountDetailsHeader-Df1JkzYi.mjs → AccountDetailsHeader-JtSX6Uf9.mjs} +4 -4
  4. package/dist/{AccountFields-DUToRRqW.mjs → AccountFields-C9FlatNb.mjs} +2 -2
  5. package/dist/{AccountListItem-CeY_WIpj.mjs → AccountListItem-JFMZROh7.mjs} +7 -7
  6. package/dist/{AccountStore-BkoLK9Tq.mjs → AccountStore-BgNOyMdp.mjs} +74 -100
  7. package/dist/Accounts-BRf_YeTf.mjs +27 -0
  8. package/dist/CategoryStore-yHI0hWmK.mjs +174 -0
  9. package/dist/CategoryUtil-pZRIYOgN.mjs +80 -0
  10. package/dist/{ConnectDrawer-Bw5s6Dw1.mjs → ConnectDrawer-BQNs-hjk.mjs} +9 -9
  11. package/dist/{ConnectionsDrawer-BDvVuJQf.mjs → ConnectionsDrawer-ByGQE7D5.mjs} +3 -3
  12. package/dist/{DebtsStore-BD_XwsI7.mjs → DebtsStore-C9bblOgW.mjs} +1 -1
  13. package/dist/{GoalStore-DZ_Jvsa_.mjs → GoalStore-D-aB35SY.mjs} +151 -111
  14. package/dist/{ManageIncome-CV-bGuR-.mjs → ManageIncome-1s_q5W4X.mjs} +3 -3
  15. package/dist/{NetWorthStore-D1NiDUcc.mjs → NetWorthStore-DCsTZpuS.mjs} +2 -2
  16. package/dist/{NotificationSettings-5i3IywCi.mjs → NotificationSettings-DqrkNMod.mjs} +236 -238
  17. package/dist/{NotificationStore-C6PH6MKm.mjs → NotificationStore-BxP_P2dA.mjs} +23 -15
  18. package/dist/{RecurringSettings-G6_BbsIF.mjs → RecurringSettings-A_rAGCTP.mjs} +3 -3
  19. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-DK8dWldr.mjs} +3 -3
  20. package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4YOD7_D.mjs} +29 -26
  21. package/dist/{TransactionDetails-CDtya0KS.mjs → TransactionDetails-oP1eSuiS.mjs} +1 -1
  22. package/dist/TransactionStore-ai3uII_r.mjs +690 -0
  23. package/dist/{WidgetContainer-EbrN1oIo.mjs → WidgetContainer-BHWANqT4.mjs} +1 -1
  24. package/dist/accounts/components/AccountsWidgetContent.d.ts +3 -0
  25. package/dist/accounts/index.es.js +184 -174
  26. package/dist/accounts/stores/AccountStore.d.ts +25 -22
  27. package/dist/accounts/utils/Accounts.d.ts +2 -1
  28. package/dist/budgets/index.es.js +499 -501
  29. package/dist/budgets/store/BudgetsStore.d.ts +1 -0
  30. package/dist/cashflow/index.es.js +382 -384
  31. package/dist/categories/index.es.js +1 -1
  32. package/dist/categories/stores/CategoryStore.d.ts +5 -1
  33. package/dist/categories/util/CategoryUtil.d.ts +3 -2
  34. package/dist/common/index.es.js +206 -214
  35. package/dist/common/stores/AppDataStore.d.ts +3 -1
  36. package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
  37. package/dist/common/stores/GlobalStore.d.ts +3 -3
  38. package/dist/common/stores/UserStore.d.ts +3 -2
  39. package/dist/common/types/Account.d.ts +9 -6
  40. package/dist/dashboard/index.es.js +1 -1
  41. package/dist/debts/index.es.js +375 -377
  42. package/dist/finstrong/index.es.js +415 -417
  43. package/dist/goals/index.es.js +557 -559
  44. package/dist/goals/stores/GoalStore.d.ts +17 -4
  45. package/dist/help/index.es.js +1 -1
  46. package/dist/investments/index.es.js +435 -437
  47. package/dist/investments/stores/HoldingStore.d.ts +1 -0
  48. package/dist/networth/index.es.js +172 -174
  49. package/dist/notifications/index.es.js +3 -3
  50. package/dist/notifications/stores/NotificationStore.d.ts +3 -1
  51. package/dist/recurringtransactions/index.es.js +173 -175
  52. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +3 -2
  53. package/dist/settings/index.es.js +279 -285
  54. package/dist/spending/index.es.js +281 -283
  55. package/dist/transactions/index.es.js +6 -6
  56. package/dist/transactions/stores/TransactionStore.d.ts +21 -77
  57. package/dist/trends/index.es.js +4 -4
  58. package/dist/{useAccountDisplayName-jS05A6-6.mjs → useAccountDisplayName-BUAApBIb.mjs} +1 -1
  59. package/package.json +4 -4
  60. package/dist/Accounts-C1QxUB-e.mjs +0 -9
  61. package/dist/CategoryStore-BCcpI3oJ.mjs +0 -183
  62. package/dist/CategoryUtil-BR3H5i6n.mjs +0 -78
  63. package/dist/TransactionStore-DxPLdF3B.mjs +0 -677
@@ -1,79 +1,79 @@
1
- import { G as k } from "../useCombineEvents-BUDIR1ba.mjs";
1
+ import { G as L } from "../useCombineEvents-BUDIR1ba.mjs";
2
2
  import { A as ss, a as rs, u as os, b as as } from "../useCombineEvents-BUDIR1ba.mjs";
3
- import { F as S, A as h } from "../Fetch-87LIQbEA.mjs";
3
+ import { F as y, A as h } from "../Fetch-87LIQbEA.mjs";
4
4
  import { B as is } from "../BeatApi-DhJpgCLz.mjs";
5
- import { C as et } from "../CategoryStore-BCcpI3oJ.mjs";
6
- import { a as ds } from "../CategoryStore-BCcpI3oJ.mjs";
7
- import { N as st } from "../NotificationStore-C6PH6MKm.mjs";
8
- import { a as us } from "../NotificationStore-C6PH6MKm.mjs";
5
+ import { C as et } from "../CategoryStore-yHI0hWmK.mjs";
6
+ import { a as ds } from "../CategoryStore-yHI0hWmK.mjs";
7
+ import { N as st } from "../NotificationStore-BxP_P2dA.mjs";
8
+ import { a as us } from "../NotificationStore-BxP_P2dA.mjs";
9
9
  import { T as rt } from "../User-BQUxBeZV.mjs";
10
10
  import { C as gs, b as ps, L as ms, a as _s } from "../User-BQUxBeZV.mjs";
11
11
  import { H as ot } from "../Help-DhcC-C05.mjs";
12
12
  import { E as ys } from "../Help-DhcC-C05.mjs";
13
13
  import { M as bs } from "../MicroWidgetContainer-DpeqN9n3.mjs";
14
14
  import { M as xs } from "../MiniWidgetContainer-D0gfmbaF.mjs";
15
- import { A as vs, D as Ds, W as As } from "../WidgetContainer-EbrN1oIo.mjs";
16
- import { k as Ts, a as Bs, e as Is, h as Ns, A as Ms, f as ks, l as $s, d as Rs, n as Ps, E as Os, j as Us, N as Ls, i as Gs, P as Hs, o as Fs, S as Ws } from "../ConnectDrawer-Bw5s6Dw1.mjs";
15
+ import { A as Ds, D as vs, W as As } from "../WidgetContainer-BHWANqT4.mjs";
16
+ import { k as Ts, a as Bs, h as Is, j as Ns, A as Ms, i as ks, l as $s, C as Rs, n as Ls, E as Os, M as Ps, N as Us, c as Hs, P as Gs, o as Fs, S as Ws } from "../ConnectDrawer-BQNs-hjk.mjs";
17
17
  import { C as Ys } from "../CurrencyInput-DUsQbkXb.mjs";
18
- import { L as zs } from "../Loader-DUaFpDGv.mjs";
18
+ import { L as Xs } from "../Loader-DUaFpDGv.mjs";
19
19
  import { R as js } from "../ResponsiveButton-DZFp78fJ.mjs";
20
20
  import { S as Vs } from "../SearchBox-B2_zLv8-.mjs";
21
- import { T as at } from "../TransactionStore-DxPLdF3B.mjs";
22
- import { S as Js } from "../TransactionStore-DxPLdF3B.mjs";
21
+ import { T as at } from "../TransactionStore-ai3uII_r.mjs";
22
+ import { S as Js } from "../TransactionStore-ai3uII_r.mjs";
23
23
  import { T as er } from "../TabContentContainer-j01JYR_7.mjs";
24
24
  import { I as rr } from "../IconBacking-B9oC6uL2.mjs";
25
- import { D as ar, F as nr, a as ir, c as cr, R as dr, S as lr } from "../RecurringTransactions-ej39mgA6.mjs";
25
+ import { D as ar, F as nr, c as ir, d as cr, R as dr, S as lr } from "../RecurringTransactions-DK8dWldr.mjs";
26
26
  import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
27
27
  import { I as hr } from "../CashflowStore-D9Dpuz7X.mjs";
28
- import { d as it } from "../GoalStore-DZ_Jvsa_.mjs";
29
- import { C as pr, G as mr, M as _r, T as fr } from "../GoalStore-DZ_Jvsa_.mjs";
28
+ import { d as it } from "../GoalStore-D-aB35SY.mjs";
29
+ import { C as pr, G as mr, M as _r, T as fr } from "../GoalStore-D-aB35SY.mjs";
30
30
  import { C as Sr } from "../CurrencyText-kyC1aseI.mjs";
31
31
  import { E as wr } from "../EmptyState-DA_lfRBv.mjs";
32
32
  import { L as Cr } from "../ListItemAction-DHa3KJPs.mjs";
33
33
  import { T as ct } from "../TrendsStore-DCYbpXPO.mjs";
34
- import { L as Dr, S as Ar } from "../TrendsStore-DCYbpXPO.mjs";
34
+ import { L as vr, S as Ar } from "../TrendsStore-DCYbpXPO.mjs";
35
35
  import { A as Tr, B as Br, I as Ir, N as Nr, T as Mr, a as kr } from "../ToggleListItem-r0Kx56wF.mjs";
36
- import { jsxs as y, jsx as n } from "react/jsx-runtime";
36
+ import { jsxs as f, jsx as n } from "react/jsx-runtime";
37
37
  import dt, { useRef as lt, useEffect as ut } from "react";
38
38
  import { css as x, keyframes as ht } from "@mxenabled/cssinjs";
39
39
  import { useTokens as C, Text as B } from "@mxenabled/mxui";
40
40
  import { D as Rr } from "../Donut-oaQFlbit.mjs";
41
41
  import { L as Or } from "../LineChart-D4GI7nVh.mjs";
42
- import { S as Lr } from "../StatusBar-BK_uYHAB.mjs";
43
- import { D as Hr, a as Fr, O as Wr, b as qr, f as Yr } from "../Dialog-CWW597AF.mjs";
42
+ import { S as Ur } from "../StatusBar-BK_uYHAB.mjs";
43
+ import { D as Gr, a as Fr, O as Wr, b as qr, f as Yr } from "../Dialog-CWW597AF.mjs";
44
44
  import { D as gt, a as pt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
- import { S as zr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
+ import { S as Xr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
46
46
  import { D as jr } from "../Drawer-kEE73B87.mjs";
47
- import { I as Vr, P as Zr, S as Jr } from "../Account-vp_TAbGt.mjs";
47
+ import { I as Vr, P as Zr, S as Jr } from "../Account-Bxw0_4FU.mjs";
48
48
  import { b as E } from "../Category-CevNQ03n.mjs";
49
49
  import { C as eo, c as so, a as ro, P as oo } from "../Category-CevNQ03n.mjs";
50
50
  import { C as no, f as io, b as co, a as lo, g as uo, i as ho } from "../NumberFormatting-Buh7u8Oi.mjs";
51
- import { R as mt } from "../RecurringTransactionsStore-DrzS1LmF.mjs";
52
- import { S as po, T as mo } from "../RecurringTransactionsStore-DrzS1LmF.mjs";
53
- import { G as fo, C as yo, D as So, W as bo, d as wo, a as xo, i as Co, v as vo, m as Do, y as Ao, z as Eo, g as To, x as Bo, u as Io, f as No, b as Mo, l as ko, A as $o, t as Ro, n as Po, c as Oo, r as Uo, o as Lo, B as Go, j as Ho, s as Fo, h as Wo, w as qo, p as Yo, q as Qo } from "../hooks-D6XlXHf4.mjs";
54
- import { u as Xo } from "../useAccountDisplayName-jS05A6-6.mjs";
51
+ import { R as mt } from "../RecurringTransactionsStore-C4YOD7_D.mjs";
52
+ import { S as po, T as mo } from "../RecurringTransactionsStore-C4YOD7_D.mjs";
53
+ import { G as fo, C as yo, D as So, W as bo, d as wo, a as xo, i as Co, v as Do, m as vo, y as Ao, z as Eo, g as To, x as Bo, u as Io, f as No, b as Mo, l as ko, A as $o, t as Ro, n as Lo, c as Oo, r as Po, o as Uo, B as Ho, j as Go, s as Fo, h as Wo, w as qo, p as Yo, q as Qo } from "../hooks-D6XlXHf4.mjs";
54
+ import { u as zo } from "../useAccountDisplayName-BUAApBIb.mjs";
55
55
  import { u as Ko } from "../useInsightsEnabled-DBpwEq10.mjs";
56
56
  import { u as Zo } from "../useScreenSize-B6JyS_Lj.mjs";
57
- import { makeAutoObservable as f, runInAction as p, reaction as _t } from "mobx";
58
- import { a as ft } from "../AccountStore-BkoLK9Tq.mjs";
57
+ import { makeAutoObservable as _, runInAction as S, reaction as _t } from "mobx";
58
+ import { a as ft } from "../AccountStore-BgNOyMdp.mjs";
59
59
  import yt from "posthog-js";
60
60
  import { B as St } from "../BeatStore-IBnXd4YK.mjs";
61
61
  import { endOfMonth as Z } from "date-fns/endOfMonth";
62
62
  import { startOfMonth as J } from "date-fns/startOfMonth";
63
- import { startOfToday as U } from "date-fns/startOfToday";
64
- import { f as bt, a as wt, b as L } from "../BudgetUtil-B2ZXyw-g.mjs";
63
+ import { startOfToday as O } from "date-fns/startOfToday";
64
+ import { f as bt, a as wt, b as P } from "../BudgetUtil-B2ZXyw-g.mjs";
65
65
  import { g as ta, e as ea, c as sa, d as ra, i as oa } from "../BudgetUtil-B2ZXyw-g.mjs";
66
- import { a as xt } from "../DebtsStore-BD_XwsI7.mjs";
66
+ import { a as xt } from "../DebtsStore-C9bblOgW.mjs";
67
67
  import { a as Ct } from "../FinstrongStore-F2c607dj.mjs";
68
- import { A as vt, m as Dt, a as At, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
68
+ import { A as Dt, m as vt, a as At, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
69
69
  import { M as Tt } from "../MerchantStore-DrFvsUyy.mjs";
70
- import { N as Bt } from "../NetWorthStore-D1NiDUcc.mjs";
70
+ import { N as Bt } from "../NetWorthStore-DCsTZpuS.mjs";
71
71
  import { a as It } from "../SettingsStore-BcgS_Ohv.mjs";
72
72
  import { addMonths as Nt } from "date-fns/addMonths";
73
73
  import { getMonth as T } from "date-fns/getMonth";
74
74
  import { i as na } from "../DateUtil-BcuH7ErC.mjs";
75
75
  import { b as ca, a as da, g as la } from "../Localization-2MODESHW.mjs";
76
- import { alpha as Mt, lighten as G, darken as H } from "@mui/material";
76
+ import { alpha as Mt, lighten as U, darken as H } from "@mui/material";
77
77
  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 || {});
78
78
  const Ye = [
79
79
  { id: 0, copy: "frequency_unknown" },
@@ -90,7 +90,7 @@ const Ye = [
90
90
  SUCCESS: "SUCCESS"
91
91
  };
92
92
  var $t = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))($t || {}), Rt = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(Rt || {});
93
- const Pt = [
93
+ const Lt = [
94
94
  "fontFamily",
95
95
  "H1",
96
96
  "h1",
@@ -119,27 +119,27 @@ const Pt = [
119
119
  { key: "warning", light: "warning_color", dark: "warning_color_dark" },
120
120
  { key: "info", light: "info_color", dark: "info_color_dark" },
121
121
  { key: "success", light: "success_color", dark: "success_color_dark" }
122
- ], ze = (s, t, e) => {
123
- const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (i, _) => i ? {
124
- lighter: G(i, 0.5),
125
- light: G(i, 0.25),
122
+ ], Xe = (s, t, e) => {
123
+ const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (i, m) => i ? {
124
+ lighter: U(i, 0.5),
125
+ light: U(i, 0.25),
126
126
  main: i,
127
127
  dark: H(i, 0.25),
128
128
  darker: H(i, 0.5)
129
- } : _, c = Object.fromEntries(
130
- Ot.map(({ key: i, light: _, dark: b }) => [
129
+ } : m, c = Object.fromEntries(
130
+ Ot.map(({ key: i, light: m, dark: b }) => [
131
131
  i,
132
132
  a(
133
- t?.[r ? b : _],
133
+ t?.[r ? b : m],
134
134
  s.palette[i]
135
135
  )
136
136
  ])
137
137
  ), d = Object.fromEntries(
138
- Pt.map((i) => [
138
+ Lt.map((i) => [
139
139
  i,
140
140
  i === "fontFamily" ? o : { fontFamily: o }
141
141
  ])
142
- ), u = {
142
+ ), l = {
143
143
  MuiTabs: {
144
144
  styleOverrides: {
145
145
  indicator: { backgroundColor: c.primary.light }
@@ -153,26 +153,26 @@ const Pt = [
153
153
  }
154
154
  }
155
155
  }
156
- }, l = t?.button_corner_radius, g = t?.card_corner_radius, m = {
157
- ...u,
158
- ...l && {
156
+ }, u = t?.button_corner_radius, g = t?.card_corner_radius, p = {
157
+ ...l,
158
+ ...u && {
159
159
  MuiButton: {
160
160
  styleOverrides: {
161
- root: { borderRadius: `${l}px`, textTransform: "none" }
161
+ root: { borderRadius: `${u}px`, textTransform: "none" }
162
162
  }
163
163
  },
164
164
  MuiIconButton: {
165
165
  styleOverrides: {
166
166
  root: {
167
- borderRadius: `${l}px`,
168
- minWidth: l,
169
- minHeight: l
167
+ borderRadius: `${u}px`,
168
+ minWidth: u,
169
+ minHeight: u
170
170
  }
171
171
  }
172
172
  },
173
173
  MuiToggleButton: {
174
174
  styleOverrides: {
175
- root: { borderRadius: `${l}px`, textTransform: "none" }
175
+ root: { borderRadius: `${u}px`, textTransform: "none" }
176
176
  }
177
177
  }
178
178
  },
@@ -185,12 +185,12 @@ const Pt = [
185
185
  }
186
186
  }
187
187
  };
188
- return { typography: d, palette: c, components: m };
188
+ return { typography: d, palette: c, components: p };
189
189
  };
190
- class F {
190
+ class G {
191
191
  fetchInstance;
192
192
  constructor(t) {
193
- this.fetchInstance = new S(t, "", {
193
+ this.fetchInstance = new y(t, "", {
194
194
  Accept: "application/json",
195
195
  "Content-Type": "application/json"
196
196
  });
@@ -204,10 +204,10 @@ class F {
204
204
  }
205
205
  };
206
206
  }
207
- class Xe {
207
+ class ze {
208
208
  fetchInstance;
209
209
  constructor(t, e, r) {
210
- this.fetchInstance = new S(t, e, void 0, r);
210
+ this.fetchInstance = new y(t, e, void 0, r);
211
211
  }
212
212
  getLocalizedCopy = async (t) => this.fetchInstance.post(h.LOCALIZED_COPY, t).then((e) => e);
213
213
  getLocalizedContent = async (t) => this.fetchInstance.post(`${h.LOCALIZED_CONTENT}/${t}`).then((e) => e);
@@ -215,7 +215,7 @@ class Xe {
215
215
  class je {
216
216
  fetchInstance;
217
217
  constructor(t, e, r) {
218
- this.fetchInstance = new S(t, e, void 0, r);
218
+ this.fetchInstance = new y(t, e, void 0, r);
219
219
  }
220
220
  addScheduledPayment = async (t) => this.fetchInstance.post(h.SCHEDULED_PAYMENTS, {
221
221
  ...t,
@@ -226,10 +226,10 @@ class je {
226
226
  updateScheduledPayment = async (t) => this.fetchInstance.put(`${h.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
227
227
  deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${h.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
228
228
  }
229
- class $ {
229
+ class F {
230
230
  fetchInstance;
231
231
  constructor(t, e, r) {
232
- this.fetchInstance = new S(t, e, void 0, r);
232
+ this.fetchInstance = new y(t, e, void 0, r);
233
233
  }
234
234
  getUserFeatures = async () => this.fetchInstance.get(h.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
235
235
  updateUser = async (t) => this.fetchInstance.put(h.USER, t).then((e) => e.user);
@@ -238,11 +238,11 @@ class $ {
238
238
  class W {
239
239
  fetchInstance;
240
240
  constructor(t, e) {
241
- this.fetchInstance = new S(t, e);
241
+ this.fetchInstance = new y(t, e);
242
242
  }
243
243
  requestWidgetUrl = async (t) => this.fetchInstance.post(h.WIDGET_URLS, t).then((e) => e.widget_url);
244
244
  }
245
- var Ut = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(Ut || {}), Lt = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(Lt || {}), Gt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(Gt || {}), Ht = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(Ht || {});
245
+ var Pt = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(Pt || {}), Ut = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(Ut || {}), Ht = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(Ht || {}), Gt = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(Gt || {});
246
246
  const Ke = (s) => {
247
247
  const t = lt();
248
248
  return ut(() => {
@@ -250,10 +250,10 @@ const Ke = (s) => {
250
250
  }, [s]), t.current;
251
251
  }, Ft = ({ color: s, labelAverage: t, labelMain: e }) => {
252
252
  const r = C(), o = Wt(r, s);
253
- return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
253
+ return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
254
254
  /* @__PURE__ */ n("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
255
255
  /* @__PURE__ */ n(B, { variant: "XSmall", children: e }),
256
- /* @__PURE__ */ y("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
256
+ /* @__PURE__ */ f("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
257
257
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
258
258
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
259
259
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" })
@@ -296,21 +296,21 @@ const Ke = (s) => {
296
296
  selectedIndex: c,
297
297
  value: d
298
298
  }) => {
299
- const u = C(), l = qt(u, t, e), g = (_) => {
300
- a && (_.key === " " || _.key === "Enter") && a(r);
301
- }, m = c === void 0 || c === r ? "primary" : "secondary", i = () => /* @__PURE__ */ n(
299
+ const l = C(), u = qt(l, t, e), g = (m) => {
300
+ a && (m.key === " " || m.key === "Enter") && a(r);
301
+ }, p = c === void 0 || c === r ? "primary" : "secondary", i = () => /* @__PURE__ */ n(
302
302
  B,
303
303
  {
304
304
  "aria-hidden": !0,
305
305
  bold: c === r,
306
306
  className: "mx-cmn-bar-text",
307
- color: m,
307
+ color: p,
308
308
  component: "div",
309
309
  variant: "Small",
310
310
  children: o
311
311
  }
312
312
  );
313
- return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-container ${l} ${d < 0 ? "mx-cmn-negative" : ""}`, children: [
313
+ return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-container ${u} ${d < 0 ? "mx-cmn-negative" : ""}`, children: [
314
314
  d >= 0 && /* @__PURE__ */ n(i, {}),
315
315
  /* @__PURE__ */ n(
316
316
  "div",
@@ -367,39 +367,39 @@ const Ke = (s) => {
367
367
  onClick: a,
368
368
  range: c,
369
369
  selectedIndex: d,
370
- topHeight: u,
371
- value: l,
370
+ topHeight: l,
371
+ value: u,
372
372
  valueLabel: g = "",
373
- width: m,
373
+ width: p,
374
374
  xAxisLabel: i = ""
375
375
  }) => {
376
- const _ = C(), b = Yt(_, m), v = l / c * u, D = Math.abs(l) / c * e, A = d === void 0 || d === o ? "primary" : "secondary";
377
- return /* @__PURE__ */ y("div", { className: `mx-cmn-barchart-bar-column ${b}`, children: [
378
- /* @__PURE__ */ n("div", { style: { height: u }, children: l >= 0 && /* @__PURE__ */ n(
376
+ const m = C(), b = Yt(m, p), D = u / c * l, v = Math.abs(u) / c * e, A = d === void 0 || d === o ? "primary" : "secondary";
377
+ return /* @__PURE__ */ f("div", { className: `mx-cmn-barchart-bar-column ${b}`, children: [
378
+ /* @__PURE__ */ n("div", { style: { height: l }, children: u >= 0 && /* @__PURE__ */ n(
379
379
  q,
380
380
  {
381
381
  ariaLabel: s,
382
382
  color: r,
383
- height: v,
383
+ height: D,
384
384
  index: o,
385
385
  label: g,
386
386
  onClick: a,
387
387
  selectedIndex: d,
388
- value: l
388
+ value: u
389
389
  }
390
390
  ) }),
391
391
  /* @__PURE__ */ n("div", { className: "mx-cmn-zero-line" }),
392
392
  t !== 0 && /* @__PURE__ */ n("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
393
- /* @__PURE__ */ n("div", { style: { height: e }, children: l < 0 && /* @__PURE__ */ n(
393
+ /* @__PURE__ */ n("div", { style: { height: e }, children: u < 0 && /* @__PURE__ */ n(
394
394
  q,
395
395
  {
396
396
  ariaLabel: s,
397
397
  color: r,
398
- height: D,
398
+ height: v,
399
399
  index: o,
400
400
  label: g,
401
401
  onClick: a,
402
- value: l
402
+ value: u
403
403
  }
404
404
  ) }),
405
405
  /* @__PURE__ */ n(
@@ -436,7 +436,7 @@ const Ke = (s) => {
436
436
  "& .mx-cmn-clickable": {
437
437
  cursor: "pointer"
438
438
  }
439
- }), Qt = (s, t) => s + t, zt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, Xt = (s, t) => [...s, t.value], Q = (s, t, e) => {
439
+ }), Qt = (s, t) => s + t, Xt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, zt = (s, t) => [...s, t.value], Q = (s, t, e) => {
440
440
  const r = s && t ? e / 2 : e;
441
441
  return s ? r : 0;
442
442
  }, jt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Kt = ({
@@ -448,44 +448,44 @@ const Ke = (s) => {
448
448
  legendLabelAverage: a,
449
449
  legendLabelMain: c,
450
450
  onBarClick: d,
451
- selectedIndex: u,
452
- valueFormatter: l = (g) => `${g}`
451
+ selectedIndex: l,
452
+ valueFormatter: u = (g) => `${g}`
453
453
  }) => {
454
- const g = C(), m = Vt(g), i = r.reduce(Xt, []), _ = s !== void 0 ? s : i.reduce(Qt, 0) / i.length, b = Math.max(...i), v = Math.min(...i), D = i.reduce(zt, 0), A = b >= 0, R = v < 0, I = Q(A, R, o), N = Q(R, A, o), P = jt(_, b, v, I || N), tt = (w) => u === void 0 || w === u ? e : `${e}80`, O = () => /* @__PURE__ */ n(
454
+ const g = C(), p = Vt(g), i = r.reduce(zt, []), m = s !== void 0 ? s : i.reduce(Qt, 0) / i.length, b = Math.max(...i), D = Math.min(...i), v = i.reduce(Xt, 0), A = b >= 0, k = D < 0, I = Q(A, k, o), N = Q(k, A, o), $ = jt(m, b, D, I || N), tt = (w) => l === void 0 || w === l ? e : `${e}80`, R = () => /* @__PURE__ */ n(
455
455
  Y,
456
456
  {
457
- averageLineHeight: P,
457
+ averageLineHeight: $,
458
458
  bottomHeight: N,
459
459
  color: "",
460
- range: D,
460
+ range: v,
461
461
  topHeight: I,
462
462
  value: 0,
463
463
  width: void 0
464
464
  }
465
465
  );
466
- return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart ${m}`, children: [
467
- /* @__PURE__ */ y("div", { className: "mx-cmn-chart-container", children: [
468
- /* @__PURE__ */ n(O, {}),
469
- r.map((w, M) => /* @__PURE__ */ y(dt.Fragment, { children: [
466
+ return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart ${p}`, children: [
467
+ /* @__PURE__ */ f("div", { className: "mx-cmn-chart-container", children: [
468
+ /* @__PURE__ */ n(R, {}),
469
+ r.map((w, M) => /* @__PURE__ */ f(dt.Fragment, { children: [
470
470
  /* @__PURE__ */ n(
471
471
  Y,
472
472
  {
473
473
  ariaLabel: w.ariaLabel,
474
- averageLineHeight: P,
474
+ averageLineHeight: $,
475
475
  bottomHeight: N,
476
476
  color: tt(M),
477
477
  index: M,
478
478
  onClick: d,
479
- range: D,
480
- selectedIndex: u,
479
+ range: v,
480
+ selectedIndex: l,
481
481
  topHeight: I,
482
482
  value: w.value,
483
- valueLabel: l(w.value),
483
+ valueLabel: u(w.value),
484
484
  width: t,
485
485
  xAxisLabel: w.label
486
486
  }
487
487
  ),
488
- /* @__PURE__ */ n(O, {})
488
+ /* @__PURE__ */ n(R, {})
489
489
  ] }, `column-${M}`))
490
490
  ] }),
491
491
  /* @__PURE__ */ n(Ft, { color: e, labelAverage: a, labelMain: c })
@@ -505,33 +505,33 @@ const Ke = (s) => {
505
505
  strokeWidth: r = pt,
506
506
  children: o
507
507
  }) => {
508
- const a = C(), c = Jt(a, e), d = (e - r) / 2, u = e / 2;
509
- let l = -90 - (s ? 1 : 0), g = 0;
510
- return /* @__PURE__ */ y("div", { className: `mx-cmn-multi-segment-donut ${c}`, children: [
511
- /* @__PURE__ */ y("svg", { height: e, width: e, children: [
508
+ const a = C(), c = Jt(a, e), d = (e - r) / 2, l = e / 2;
509
+ let u = -90 - (s ? 1 : 0), g = 0;
510
+ return /* @__PURE__ */ f("div", { className: `mx-cmn-multi-segment-donut ${c}`, children: [
511
+ /* @__PURE__ */ f("svg", { height: e, width: e, children: [
512
512
  /* @__PURE__ */ n(
513
513
  "circle",
514
514
  {
515
- cx: u,
516
- cy: u,
515
+ cx: l,
516
+ cy: l,
517
517
  fill: "none",
518
518
  r: d,
519
519
  stroke: a.Color.Neutral300,
520
520
  strokeWidth: r
521
521
  }
522
522
  ),
523
- t.map((m, i) => (l += 360 * g + (s ? 1 : 0), g = (m.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
523
+ t.map((p, i) => (u += 360 * g + (s ? 1 : 0), g = (p.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
524
524
  "circle",
525
525
  {
526
- cx: u,
527
- cy: u,
526
+ cx: l,
527
+ cy: l,
528
528
  fill: "none",
529
529
  r: d,
530
- stroke: m.color,
530
+ stroke: p.color,
531
531
  strokeDasharray: 2 * Math.PI * d,
532
532
  strokeDashoffset: 2 * Math.PI * d * (1 - g),
533
533
  strokeWidth: r,
534
- transform: `rotate(${l}, ${u}, ${u})`
534
+ transform: `rotate(${u}, ${l}, ${l})`
535
535
  },
536
536
  i
537
537
  )))
@@ -553,31 +553,26 @@ const Ke = (s) => {
553
553
  }), Ze = Zt;
554
554
  class te {
555
555
  globalStore;
556
- api = new k("/", "");
556
+ api = new L("/", "");
557
557
  copy = {};
558
558
  featureNamespace = "experiences";
559
559
  isInitialized = !1;
560
560
  constructor(t) {
561
- this.globalStore = t, this.api = new k(
561
+ this.globalStore = t, this.api = new L(
562
562
  t.endpoint,
563
563
  t.sessionToken,
564
564
  t.onError
565
- ), f(this);
565
+ ), _(this);
566
566
  }
567
- // DEPRECATED: Initialize api in constructor and use loadCopy instead
568
- // TODO: Remove this function
569
- initialize = async (t, e) => {
570
- this.api = new k(t, e), await this.loadCopy();
571
- };
572
567
  loadCopy = async () => {
573
- await this.getCopy(this.featureNamespace), p(() => {
568
+ await this.getCopy(this.featureNamespace), S(() => {
574
569
  this.isInitialized = !0;
575
570
  });
576
571
  };
577
572
  getCopy = async (t, e = "") => {
578
573
  try {
579
574
  const r = await this.api.getGlobalCopy(t, e);
580
- p(() => {
575
+ S(() => {
581
576
  this.copy = r[t];
582
577
  });
583
578
  } catch (r) {
@@ -593,7 +588,7 @@ class ee {
593
588
  response = null;
594
589
  responses = {};
595
590
  constructor(t) {
596
- this.globalStore = t, f(this);
591
+ this.globalStore = t, _(this);
597
592
  }
598
593
  get isLastQuestion() {
599
594
  return this.currentQuestionIndex === this.surveyQuestions.length - 1;
@@ -616,7 +611,7 @@ class ee {
616
611
  }
617
612
  loadSurvey = (t = !1) => {
618
613
  yt.getActiveMatchingSurveys((e) => {
619
- p(() => {
614
+ S(() => {
620
615
  if (e.length > 0) {
621
616
  const r = e.find((o) => o.id === this.surveyId);
622
617
  r && (this.survey = r, this.currentQuestionIndex = 0, this.question = r.questions[0], this.response = null, this.responses = {});
@@ -634,10 +629,10 @@ class ee {
634
629
  this.response = t, this.question && (this.responses[`$survey_response_${this.question.id}`] = t);
635
630
  };
636
631
  }
637
- class z {
632
+ class X {
638
633
  fetchInstance;
639
634
  constructor(t, e, r) {
640
- this.fetchInstance = new S(t, e, void 0, r);
635
+ this.fetchInstance = new y(t, e, void 0, r);
641
636
  }
642
637
  addBudget = async (t, e, r = null) => this.fetchInstance.post(h.BUDGETS, {
643
638
  amount: e,
@@ -656,17 +651,17 @@ class z {
656
651
  });
657
652
  }
658
653
  class se {
659
- api = new z("/", "");
654
+ api = new X("/", "");
660
655
  globalStore;
661
656
  alert = "";
662
- dateRange = { start: J(U()), end: Z(U()) };
657
+ dateRange = { start: J(O()), end: Z(O()) };
663
658
  budgets = [];
664
659
  selectedBudget;
665
660
  selectedSubBudget;
666
661
  isDataLoaded = !1;
667
662
  theme = {};
668
663
  constructor(t) {
669
- this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken, t.onError), f(this);
664
+ this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), _(this);
670
665
  }
671
666
  loadBudgetData = async () => {
672
667
  await this.loadBudgets(), _t(
@@ -686,7 +681,7 @@ class se {
686
681
  );
687
682
  };
688
683
  get detailedBudgets() {
689
- return L(
684
+ return P(
690
685
  this.budgets.filter(
691
686
  (t) => t.category_guid !== E.INCOME && t.category_guid !== E.TRANSFER && t.category_guid !== E.INVESTMENTS
692
687
  ),
@@ -695,8 +690,9 @@ class se {
695
690
  this.theme
696
691
  ).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
697
692
  }
693
+ // TODO: Replace this with income from recurring transactions. Income budgets are deprecated.
698
694
  get incomeBudget() {
699
- return L(
695
+ return P(
700
696
  this.budgets.filter((r) => !r.parent_guid),
701
697
  this.globalStore.categoryStore.detailedCategories,
702
698
  this.globalStore.copyStore.copy.budgets,
@@ -717,7 +713,7 @@ class se {
717
713
  addBudget = async (t, e, r = null) => {
718
714
  try {
719
715
  const o = await this.api.addBudget(t, e, r);
720
- p(() => {
716
+ S(() => {
721
717
  this.budgets.push(o);
722
718
  });
723
719
  } catch (o) {
@@ -726,7 +722,7 @@ class se {
726
722
  };
727
723
  deleteBudget = async (t) => {
728
724
  try {
729
- await this.api.deleteBudget(t), p(() => {
725
+ await this.api.deleteBudget(t), S(() => {
730
726
  const e = this.budgets.findIndex((r) => r.guid === t);
731
727
  e >= 0 && this.budgets.splice(e, 1);
732
728
  });
@@ -737,14 +733,15 @@ class se {
737
733
  loadBudgets = async () => {
738
734
  try {
739
735
  const t = await this.api.getBudgets();
740
- p(() => {
741
- this.budgets = t, this.isDataLoaded = !0;
742
- });
736
+ this.setBudgets(t);
743
737
  } catch (t) {
744
738
  throw console.error(`Error occurred while loading budgets: ${t}`), t;
745
739
  }
746
740
  };
747
741
  setAlert = (t) => this.alert = t;
742
+ setBudgets = (t) => {
743
+ this.budgets = t, this.isDataLoaded = !0;
744
+ };
748
745
  setDateRange = (t) => this.dateRange = t;
749
746
  setSelectedBudget = (t) => this.selectedBudget = t;
750
747
  setSelectedSubBudget = (t) => this.selectedSubBudget = t;
@@ -775,7 +772,7 @@ class se {
775
772
  updateBudget = async (t) => {
776
773
  try {
777
774
  const e = await this.api.updateBudget(t);
778
- p(() => {
775
+ S(() => {
779
776
  const r = this.budgets.findIndex((o) => o.guid === t.guid);
780
777
  r >= 0 && (this.budgets[r] = e);
781
778
  });
@@ -784,10 +781,10 @@ class se {
784
781
  }
785
782
  };
786
783
  }
787
- class X {
784
+ class z {
788
785
  fetchInstance;
789
786
  constructor(t, e, r) {
790
- this.fetchInstance = new S(t, e, void 0, r);
787
+ this.fetchInstance = new y(t, e, void 0, r);
791
788
  }
792
789
  createSupportTicket = async (t) => this.fetchInstance.post(h.SUPPORT_TICKETS, t).then((e) => e);
793
790
  }
@@ -810,12 +807,12 @@ const re = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flag
810
807
  };
811
808
  class ae {
812
809
  alert = { message: "", severity: void 0 };
813
- api = new X("/", "");
810
+ api = new z("/", "");
814
811
  appConfig;
815
812
  globalStore;
816
813
  isLoading = !1;
817
814
  constructor(t) {
818
- this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), f(this);
815
+ this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken, t.onError), _(this);
819
816
  }
820
817
  createSupportTicket = async (t) => {
821
818
  try {
@@ -847,23 +844,23 @@ class ae {
847
844
  class j {
848
845
  fetchInstance;
849
846
  constructor(t, e, r) {
850
- this.fetchInstance = new S(t, e, void 0, r);
847
+ this.fetchInstance = new y(t, e, void 0, r);
851
848
  }
852
849
  getHoldings = async () => this.fetchInstance.get(h.HOLDINGS).then((t) => t.holdings);
853
850
  updateHoldings = async (t) => this.fetchInstance.put(`${h.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
854
851
  }
855
852
  class ne {
856
- analysisType = vt.Stocks;
853
+ analysisType = Dt.Stocks;
857
854
  api = new j("/", "");
858
855
  holdings = [];
859
856
  holdingsLoaded = !1;
860
857
  globalStore;
861
858
  showConnectionsWidget = !1;
862
859
  constructor(t) {
863
- this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), f(this);
860
+ this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), _(this);
864
861
  }
865
862
  get analysisChartData() {
866
- return Dt(At(this.visibleHoldings), this.analysisType);
863
+ return vt(At(this.visibleHoldings), this.analysisType);
867
864
  }
868
865
  get analysisDetails() {
869
866
  return Et(this.visibleHoldings)[this.analysisType] || {};
@@ -873,15 +870,16 @@ class ne {
873
870
  (t) => this.globalStore.globalUiStore.selectedAccountGuids.includes(t.account_guid)
874
871
  );
875
872
  }
873
+ setHoldings = (t) => {
874
+ this.holdings = t, this.holdingsLoaded = !0;
875
+ };
876
876
  setShowConnectionsWidget = (t) => {
877
877
  this.showConnectionsWidget = t;
878
878
  };
879
879
  loadHoldings = async () => {
880
880
  try {
881
881
  const t = await this.api.getHoldings();
882
- p(() => {
883
- this.holdings = [...t], this.holdingsLoaded = !0;
884
- });
882
+ this.setHoldings(t);
885
883
  } catch (t) {
886
884
  console.error(`Error occured while getting holdings: ${t}`);
887
885
  }
@@ -895,7 +893,7 @@ class ne {
895
893
  const e = await this.api.updateHoldings(t), r = this.holdings.findIndex(({ guid: o }) => o === t.guid);
896
894
  if (r >= 0) {
897
895
  const o = [...this.holdings];
898
- o[r] = e, p(() => {
896
+ o[r] = e, S(() => {
899
897
  this.holdings = o, this.holdingsLoaded = !0;
900
898
  });
901
899
  }
@@ -1011,18 +1009,19 @@ const K = {
1011
1009
  class V {
1012
1010
  fetchInstance;
1013
1011
  constructor(t, e, r) {
1014
- this.fetchInstance = new S(t, e, void 0, r);
1012
+ this.fetchInstance = new y(t, e, void 0, r);
1015
1013
  }
1016
1014
  getAppData = async () => this.fetchInstance.get(h.APP_DATA).then((t) => t);
1017
1015
  }
1018
1016
  class ie {
1019
1017
  globalStore;
1020
1018
  api = new V("/", "");
1021
- bannerApi = new F("/");
1019
+ bannerApi = new G("/");
1022
1020
  appData = {};
1021
+ isAppDataLoaded = !1;
1023
1022
  banner = {};
1024
1023
  constructor(t) {
1025
- this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), f(this);
1024
+ this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), _(this);
1026
1025
  }
1027
1026
  get appConfig() {
1028
1027
  return this.globalStore.appConfig;
@@ -1042,20 +1041,21 @@ class ie {
1042
1041
  get userProfile() {
1043
1042
  return this.appData.user_profile;
1044
1043
  }
1045
- loadAppData = async (t) => {
1044
+ setAppData = (t) => {
1045
+ this.appData = t, this.bannerApi = new G(t.address?.bullseye || "/"), this.isAppDataLoaded = !0;
1046
+ };
1047
+ loadAppData = async () => {
1046
1048
  try {
1047
- const e = t || await this.api.getAppData();
1048
- p(() => {
1049
- this.appData = e, this.bannerApi = new F(e.address?.bullseye || "/");
1050
- });
1051
- } catch (e) {
1052
- console.error(`Error loading app data: ${e}`);
1049
+ const t = await this.api.getAppData();
1050
+ this.setAppData(t);
1051
+ } catch (t) {
1052
+ console.error(`Error loading app data: ${t}`);
1053
1053
  }
1054
1054
  };
1055
1055
  loadBanner = async () => {
1056
1056
  try {
1057
1057
  const t = this.user?.guid ?? null, e = t ? await this.bannerApi.getBanner(t) : {};
1058
- p(() => {
1058
+ S(() => {
1059
1059
  this.banner = e;
1060
1060
  });
1061
1061
  } catch (t) {
@@ -1070,7 +1070,7 @@ class ce {
1070
1070
  globalStore;
1071
1071
  widgetApi = new W("/", "");
1072
1072
  constructor(t) {
1073
- this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), f(this);
1073
+ this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), _(this);
1074
1074
  }
1075
1075
  loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
1076
1076
  widget_url: { widget_type: t, color_scheme: e, ...r }
@@ -1087,7 +1087,7 @@ class de {
1087
1087
  end: Z(this.displayedDate)
1088
1088
  };
1089
1089
  constructor(t) {
1090
- f(this), this.globalStore = t;
1090
+ _(this), this.globalStore = t;
1091
1091
  }
1092
1092
  get isCopyLoaded() {
1093
1093
  return this.globalStore.copyStore.isInitialized;
@@ -1124,30 +1124,27 @@ class de {
1124
1124
  }
1125
1125
  class le {
1126
1126
  globalStore;
1127
- api = new $("/", "");
1127
+ api = new F("/", "");
1128
1128
  userFeatures = [];
1129
+ userFeaturesLoaded = !1;
1129
1130
  constructor(t) {
1130
- this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken, t.onError), f(this);
1131
+ this.globalStore = t, this.api = new F(t.endpoint, t.sessionToken, t.onError), _(this);
1131
1132
  }
1132
- // DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
1133
- // TODO: Remove this function
1134
- initialize = async (t, e) => {
1135
- this.api = new $(t, e), await this.loadUserFeatures();
1136
- };
1137
1133
  get userProfile() {
1138
1134
  return this.globalStore.appDataStore.userProfile;
1139
1135
  }
1140
1136
  get user() {
1141
1137
  return this.globalStore.appDataStore.user;
1142
1138
  }
1143
- loadUserFeatures = async (t) => {
1139
+ setUserFeatures = (t) => {
1140
+ this.userFeatures = t, this.userFeaturesLoaded = !0;
1141
+ };
1142
+ loadUserFeatures = async () => {
1144
1143
  try {
1145
- const e = t || await this.api.getUserFeatures();
1146
- p(() => {
1147
- this.userFeatures = e;
1148
- });
1149
- } catch (e) {
1150
- console.error(`Error occurred while loading user features: ${e}`);
1144
+ const t = await this.api.getUserFeatures();
1145
+ this.setUserFeatures(t);
1146
+ } catch (t) {
1147
+ console.error(`Error occurred while loading user features: ${t}`);
1151
1148
  }
1152
1149
  };
1153
1150
  updateUser = async (t) => {
@@ -1199,11 +1196,19 @@ class Je {
1199
1196
  // UI Stores
1200
1197
  globalUiStore;
1201
1198
  constructor(t = K, e = "/", r) {
1202
- this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.accountStore = new ft(this), this.appDataStore = new ie(this), this.analyticsStore = new ee(this), this.beatStore = new St(this), this.budgetsStore = new se(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new ce(this), this.copyStore = new te(this), this.debtsStore = new xt(this), this.finstrongStore = new Ct(this), this.goalStore = new it(this), this.helpStore = new ae(this), this.holdingStore = new ne(this), this.merchantStore = new Tt(this), this.netWorthStore = new Bt(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new It(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new le(this), this.globalUiStore = new de(this), f(this);
1199
+ this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.accountStore = new ft(this), this.appDataStore = new ie(this), this.analyticsStore = new ee(this), this.beatStore = new St(this), this.budgetsStore = new se(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new ce(this), this.copyStore = new te(this), this.debtsStore = new xt(this), this.finstrongStore = new Ct(this), this.goalStore = new it(this), this.helpStore = new ae(this), this.holdingStore = new ne(this), this.merchantStore = new Tt(this), this.netWorthStore = new Bt(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new It(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new le(this), this.globalUiStore = new de(this), _(this);
1203
1200
  }
1204
1201
  get isInitialized() {
1205
1202
  return this.globalUiStore.isInitialized;
1206
1203
  }
1204
+ loadConfigData = async () => {
1205
+ await Promise.all([
1206
+ // Load copy, config and quser data
1207
+ this.copyStore.loadCopy(),
1208
+ this.appDataStore.loadAppData(),
1209
+ this.userStore.loadUserFeatures()
1210
+ ]), this.globalUiStore.setInitialized(!0);
1211
+ };
1207
1212
  loadData = async ({
1208
1213
  accounts: t,
1209
1214
  appData: e,
@@ -1212,26 +1217,13 @@ class Je {
1212
1217
  institutions: a,
1213
1218
  transactionRules: c,
1214
1219
  transactions: d,
1215
- userFeatures: u
1220
+ userFeatures: l
1216
1221
  } = {}) => {
1217
- await Promise.all([
1218
- // Load copy, config and quser data
1219
- this.copyStore.loadCopy(),
1220
- this.appDataStore.loadAppData(e),
1221
- this.userStore.loadUserFeatures(u)
1222
- ]), await Promise.all([
1223
- this.accountStore.loadAccountData({ accounts: t, institutions: a }),
1224
- this.categoryStore.loadCategories(o),
1225
- this.transactionStore.loadTransactionData({
1226
- associatedBeats: r,
1227
- transactionRules: c,
1228
- transactions: d
1229
- })
1230
- ]), this.globalUiStore.setInitialized(!0);
1222
+ await this.loadConfigData(), e && this.appDataStore.setAppData(e), l && this.userStore.setUserFeatures(l), t && a && (await this.accountStore.loadMembers(), this.accountStore.setInstitutions(a), this.accountStore.setAccounts(t)), r && this.transactionStore.setAssociatedBeats(r), o && this.categoryStore.setCategories(o), d && this.transactionStore.setTransactions(d), c && this.transactionStore.setTransactionRules(c);
1231
1223
  };
1232
1224
  }
1233
1225
  export {
1234
- vs as ANALYTICS_EVENTS,
1226
+ Ds as ANALYTICS_EVENTS,
1235
1227
  Ts as AccountFilter,
1236
1228
  Bs as AccountIcon,
1237
1229
  Is as AccountIconVariants,
@@ -1241,7 +1233,7 @@ export {
1241
1233
  ks as AccountTypeName,
1242
1234
  ss as AnalyticsApi,
1243
1235
  h as ApiEndpoints,
1244
- F as BannerApi,
1236
+ G as BannerApi,
1245
1237
  Ve as BarChart,
1246
1238
  is as BeatApi,
1247
1239
  Br as BudgetNotificationTypes,
@@ -1255,25 +1247,25 @@ export {
1255
1247
  pr as ConnectCard,
1256
1248
  $s as ConnectDrawer,
1257
1249
  Rs as ConnectionStatus,
1258
- Ps as ConnectionStatusEnums,
1250
+ Ls as ConnectionStatusEnums,
1259
1251
  no as CurrencyCodes,
1260
1252
  Ys as CurrencyInput,
1261
1253
  Sr as CurrencyText,
1262
- Hr as DATE_FORMATS_INTL,
1254
+ Gr as DATE_FORMATS_INTL,
1263
1255
  gt as DEFAULT_DONUT_SIZE,
1264
1256
  pt as DEFAULT_STROKE_WIDTH,
1265
1257
  ar as DataRow,
1266
- Ds as DateRangeSelector,
1258
+ vs as DateRangeSelector,
1267
1259
  Fr as Dialog,
1268
1260
  Rr as Donut,
1269
1261
  jr as Drawer,
1270
1262
  wr as EmptyState,
1271
1263
  ys as ErrorBoundary,
1272
1264
  Os as ErrorStatuses,
1273
- Lt as ExpenseStatus,
1274
- S as Fetch,
1265
+ Ut as ExpenseStatus,
1266
+ y as Fetch,
1275
1267
  nr as Frequency,
1276
- k as GlobalCopyApi,
1268
+ L as GlobalCopyApi,
1277
1269
  te as GlobalCopyStore,
1278
1270
  fo as GlobalDataContext,
1279
1271
  yo as GlobalDataProvider,
@@ -1287,16 +1279,16 @@ export {
1287
1279
  Qe as LOADING_STATUS,
1288
1280
  Or as LineChart,
1289
1281
  Cr as ListItemAction,
1290
- Dr as ListItemRow,
1282
+ vr as ListItemRow,
1291
1283
  ms as ListItemWrapper,
1292
- zs as Loader,
1293
- Xe as LocalizedCopyApi,
1284
+ Xs as Loader,
1285
+ ze as LocalizedCopyApi,
1294
1286
  _r as MetaType,
1295
- Us as MfaStatuses,
1287
+ Ps as MfaStatuses,
1296
1288
  bs as MicroWidgetContainer,
1297
1289
  xs as MiniWidgetContainer,
1298
1290
  Ze as MultiSegmentDonut,
1299
- Ls as NonConnectedStatuses,
1291
+ Us as NonConnectedStatuses,
1300
1292
  us as NotificationApi,
1301
1293
  Nr as NotificationTypes,
1302
1294
  Wr as ORDINAL_DATE_FORMAT,
@@ -1304,8 +1296,8 @@ export {
1304
1296
  Zr as PAYMENT_ACCOUNT_TYPES,
1305
1297
  oo as PaymentCategories,
1306
1298
  $t as PlanTypes,
1307
- Gs as ProcessingStatuses,
1308
- Hs as PropertyType,
1299
+ Hs as ProcessingStatuses,
1300
+ Gs as PropertyType,
1309
1301
  Fs as PropertyTypeName,
1310
1302
  Ye as RECURRENCE_COPY,
1311
1303
  ir as RecurrenceStatus,
@@ -1314,16 +1306,16 @@ export {
1314
1306
  dr as RepeatingType,
1315
1307
  js as ResponsiveButton,
1316
1308
  Jr as SPENDING_ACCOUNT_TYPES,
1317
- Gt as ScheduledPaymentTypes,
1309
+ Ht as ScheduledPaymentTypes,
1318
1310
  je as ScheduledPaymentsApi,
1319
- Ht as ScreenSize,
1311
+ Gt as ScreenSize,
1320
1312
  Vs as SearchBox,
1321
1313
  lr as Select,
1322
1314
  Js as SelectionBox,
1323
- zr as SingleSegmentDonut,
1315
+ Xr as SingleSegmentDonut,
1324
1316
  po as Sizes,
1325
1317
  Ar as StackedLineChart,
1326
- Lr as StatusBar,
1318
+ Ur as StatusBar,
1327
1319
  Ws as StatusName,
1328
1320
  mo as TOUCH_TARGET,
1329
1321
  er as TabContentContainer,
@@ -1332,9 +1324,9 @@ export {
1332
1324
  fr as TrackType,
1333
1325
  _s as TransactionStatus,
1334
1326
  rt as TransactionType,
1335
- $ as UserApi,
1327
+ F as UserApi,
1336
1328
  le as UserStore,
1337
- Ut as UserVerification,
1329
+ Pt as UserVerification,
1338
1330
  W as WidgetApi,
1339
1331
  As as WidgetContainer,
1340
1332
  So as WidgetContainerContext,
@@ -1349,19 +1341,19 @@ export {
1349
1341
  na as fromTimestampToMonthYear,
1350
1342
  ta as getCategory,
1351
1343
  ea as getCategoryTotalsByParent,
1352
- ze as getClientTheme,
1344
+ Xe as getClientTheme,
1353
1345
  uo as getCurrencyCodes,
1354
1346
  sa as getDetailedCategory,
1355
1347
  ra as getDetailedSubCategory,
1356
1348
  la as getLocale,
1357
1349
  oa as isIncome,
1358
1350
  ho as isValidNumber,
1359
- Xo as useAccountDisplayName,
1351
+ zo as useAccountDisplayName,
1360
1352
  wo as useAccountStore,
1361
1353
  xo as useAppConfig,
1362
1354
  Co as useBudgetsStore,
1363
- vo as useCashflowStore,
1364
- Do as useCategoryStore,
1355
+ Do as useCashflowStore,
1356
+ vo as useCategoryStore,
1365
1357
  os as useCombineEvents,
1366
1358
  as as useCombinePageviews,
1367
1359
  Ao as useDebtStore,
@@ -1375,13 +1367,13 @@ export {
1375
1367
  $o as useHelpStore,
1376
1368
  Ro as useHoldingStore,
1377
1369
  Ko as useInsightsEnabled,
1378
- Po as useLoad,
1370
+ Lo as useLoad,
1379
1371
  Oo as useMerchantStore,
1380
- Uo as useNetWorthStore,
1381
- Lo as useNotificationStore,
1382
- Go as usePageView,
1372
+ Po as useNetWorthStore,
1373
+ Uo as useNotificationStore,
1374
+ Ho as usePageView,
1383
1375
  Ke as usePrevious,
1384
- Ho as useRecurringTransactionsStore,
1376
+ Go as useRecurringTransactionsStore,
1385
1377
  Zo as useScreenSize,
1386
1378
  Fo as useSettingsStore,
1387
1379
  Wo as useTransactionStore,