@mx-cartographer/experiences 7.8.0-alpha.test1 → 7.8.0-alpha.test3

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.
@@ -161,7 +161,7 @@ const it = E(() => {
161
161
  }
162
162
  )
163
163
  ] });
164
- }), Me = E(({ onAddBudget: t, onRecalculateBudgets: o }) => {
164
+ }), Re = E(({ onAddBudget: t, onRecalculateBudgets: o }) => {
165
165
  const { budgets: i } = w(), { addBudget: s, setAlert: a, unbudgetedCategories: r } = D(), n = async (c, d) => {
166
166
  await s(c, d), t?.(), a(L(i.alert_budget_created, c.name));
167
167
  };
@@ -177,7 +177,7 @@ const it = E(() => {
177
177
  )) }) }),
178
178
  /* @__PURE__ */ e(lt, { onRecalculateBudgets: o })
179
179
  ] });
180
- }), _e = 5, Re = 100, Q = 25, ut = (t) => {
180
+ }), _e = 5, Me = 100, Q = 25, ut = (t) => {
181
181
  const o = (a) => {
182
182
  a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
183
183
  }, i = (a) => {
@@ -207,7 +207,7 @@ const it = E(() => {
207
207
  a.x = Ce(a.x ?? 0, r, i - r), a.y = Ce(a.y ?? 0, r, o - r);
208
208
  }), O.selectAll(".bubble").data(s).attr("transform", (a) => `translate(${a.x},${a.y})`);
209
209
  });
210
- }, Le = (t, o) => O.scaleLinear().domain([t, o]).range([Q, Re]), ht = (t) => {
210
+ }, Le = (t, o) => O.scaleLinear().domain([t, o]).range([Q, Me]), ht = (t) => {
211
211
  const o = t.reduce((r, n) => {
212
212
  const c = Math.max(n.transaction_total, n.amount);
213
213
  return c > r ? c : r;
@@ -227,7 +227,7 @@ const it = E(() => {
227
227
  let u = Q;
228
228
  if (a < m) {
229
229
  const h = Math.sqrt(m / (t * Math.PI)), b = Math.min(c, d) / 4;
230
- u = Math.min(Re, h, b);
230
+ u = Math.min(Me, h, b);
231
231
  }
232
232
  return r && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
233
233
  }, bt = (t, o, i, s, a) => {
@@ -285,7 +285,7 @@ function St({ bubble: t, isDraggable: o, onClick: i = () => {
285
285
  p > j ? (v = -14, A = -45) : p > de && (A = -32);
286
286
  let x = 32;
287
287
  p <= j && (x = n < 400 ? 16 : 24);
288
- const M = `${t.category.name}: ${b}`, R = {
288
+ const R = `${t.category.name}: ${b}`, M = {
289
289
  modifiers: [
290
290
  {
291
291
  name: "offset",
@@ -330,7 +330,7 @@ function St({ bubble: t, isDraggable: o, onClick: i = () => {
330
330
  stroke-opacity: 0.8;
331
331
  }
332
332
  ` }),
333
- /* @__PURE__ */ e(Xe, { open: s, slotProps: { popper: R }, title: M, children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${h}`, r: p }) }),
333
+ /* @__PURE__ */ e(Xe, { open: s, slotProps: { popper: M }, title: R, children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${h}`, r: p }) }),
334
334
  /* @__PURE__ */ e("svg", { x: v, y: A, children: /* @__PURE__ */ e(P, { name: u, size: x, sx: { fill: m } }) }),
335
335
  p > j && /* @__PURE__ */ e(
336
336
  y,
@@ -572,7 +572,7 @@ const xt = ({
572
572
  ] })
573
573
  ] });
574
574
  }, wt = (t) => {
575
- const o = ee(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: r, setTheme: n } = D(), { budgets: c, common: d } = w(), { isInitialized: m, selectedAccounts: u } = oe(), { reloadCategoryTotals: f } = K(), h = Ze(), [b, p] = l.useState(!1);
575
+ const o = ee(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: r, setTheme: n } = D(), { budgets: c, common: d } = w(), { isInitialized: m, selectedAccounts: u } = oe(), { loadDateRangeCategoryTotals: f } = K(), h = Ze(), [b, p] = l.useState(!1);
576
576
  l.useEffect(() => {
577
577
  a || r().finally();
578
578
  }, []), l.useEffect(() => {
@@ -620,7 +620,7 @@ const xt = ({
620
620
  onClose: () => p(!1),
621
621
  title: c.add_new_title,
622
622
  children: /* @__PURE__ */ e(
623
- Me,
623
+ Re,
624
624
  {
625
625
  onAddBudget: S,
626
626
  onRecalculateBudgets: C
@@ -812,7 +812,7 @@ const xt = ({
812
812
  )
813
813
  ] })
814
814
  ] });
815
- }), Mt = E(({ budget: t }) => {
815
+ }), Rt = E(({ budget: t }) => {
816
816
  const { is_mobile_webview: o } = Fe(), { setAlert: i } = D(), { budgets: s, common: a, transactions: r } = w(), { isDesktop: n, isSmallTablet: c, isTablet: d } = ie(), {
817
817
  sortedTransactions: m,
818
818
  sortedTransactionsWithSplits: u,
@@ -820,8 +820,8 @@ const xt = ({
820
820
  } = ae(), [h, b] = l.useState(0), [p, _] = l.useState(""), S = l.useMemo(
821
821
  () => m.find((x) => x.guid === p),
822
822
  [p, m]
823
- ), C = (x, M) => {
824
- b(M);
823
+ ), C = (x, R) => {
824
+ b(R);
825
825
  }, v = () => {
826
826
  et(u, f), i(s.alert_csv_downloaded);
827
827
  }, A = m.length > 0 && !o && (n || d && !c);
@@ -867,7 +867,7 @@ const xt = ({
867
867
  )
868
868
  ] })
869
869
  ] });
870
- }), Rt = E(() => {
870
+ }), Mt = E(() => {
871
871
  const { selectedAccountGuids: t } = oe(), { budgets: o, common: i } = w(), {
872
872
  alert: s,
873
873
  dateRange: a,
@@ -892,9 +892,9 @@ const xt = ({
892
892
  amount: Number(v),
893
893
  percentage: n.category.totalAmount / Number(v) * 100
894
894
  }), _(!1), d(L(o.alert_budget_updated, n.category.name)));
895
- }, M = async () => {
896
- n && (await r(n.guid), d(L(o.alert_budget_deleted, n.category.name))), R();
897
- }, R = () => {
895
+ }, R = async () => {
896
+ n && (await r(n.guid), d(L(o.alert_budget_deleted, n.category.name))), M();
897
+ }, M = () => {
898
898
  b(!1), setTimeout(() => {
899
899
  m(void 0);
900
900
  }, 250);
@@ -908,7 +908,7 @@ const xt = ({
908
908
  {
909
909
  ariaLabelClose: i.close_aria,
910
910
  isOpen: h,
911
- onClose: R,
911
+ onClose: M,
912
912
  onPrimaryAction: () => _(!0),
913
913
  onSecondaryAction: () => C(!0),
914
914
  primaryText: o.details_edit_button,
@@ -916,7 +916,7 @@ const xt = ({
916
916
  secondaryText: o.details_delete_button,
917
917
  title: o.details_title,
918
918
  children: [
919
- /* @__PURE__ */ e(Mt, { budget: n }),
919
+ /* @__PURE__ */ e(Rt, { budget: n }),
920
920
  /* @__PURE__ */ e(
921
921
  De,
922
922
  {
@@ -956,7 +956,7 @@ const xt = ({
956
956
  copy: { close_aria: i.close_aria, title: o.delete_title },
957
957
  isOpen: S,
958
958
  onClose: () => C(!1),
959
- onPrimaryAction: M,
959
+ onPrimaryAction: R,
960
960
  primaryColor: "error",
961
961
  primaryText: o.details_delete_button,
962
962
  secondaryColor: "secondary",
@@ -1012,28 +1012,28 @@ const xt = ({
1012
1012
  const A = c.reduce((I, k) => I + k.totalAmount, 0);
1013
1013
  let x = A / m;
1014
1014
  x > 1 && (x = 1);
1015
- let M = t.palette.success.main;
1016
- x > 0.8 && x < 1 ? M = t.palette.warning.main : x >= 1 && (M = t.palette.error.main);
1017
- const R = [
1015
+ let R = t.palette.success.main;
1016
+ x > 0.8 && x < 1 ? R = t.palette.warning.main : x >= 1 && (R = t.palette.error.main);
1017
+ const M = [
1018
1018
  {
1019
- color: M,
1019
+ color: R,
1020
1020
  percentage: `${x}`
1021
1021
  }
1022
1022
  ];
1023
- return [A, R];
1023
+ return [A, M];
1024
1024
  }, [d, c]), [S, C] = l.useMemo(() => {
1025
1025
  const A = Math.abs(
1026
- n.reduce((R, I) => R + I.totalAmount, 0)
1026
+ n.reduce((M, I) => M + I.totalAmount, 0)
1027
1027
  );
1028
1028
  let x = A / u;
1029
1029
  x > 1 && (x = 1);
1030
- const M = [
1030
+ const R = [
1031
1031
  {
1032
1032
  color: t.palette.secondary.main,
1033
1033
  percentage: `${x}`
1034
1034
  }
1035
1035
  ];
1036
- return [A, M];
1036
+ return [A, R];
1037
1037
  }, [n, u]), v = () => {
1038
1038
  f({
1039
1039
  accounts: i.map((A) => A.guid),
@@ -1097,7 +1097,7 @@ const xt = ({
1097
1097
  setAlert: _,
1098
1098
  setTheme: S,
1099
1099
  detailedBudgets: C
1100
- } = D(), { setDateRange: v } = te(), { reloadCategoryTotals: A } = K(), { isSmallTablet: x, isMobile: M, isSmallMobile: R } = ie(), I = x || M || R, [k, G] = l.useState(!1);
1100
+ } = D(), { setDateRange: v } = te(), { loadDateRangeCategoryTotals: A } = K(), { isSmallTablet: x, isMobile: R, isSmallMobile: M } = ie(), I = x || R || M, [k, G] = l.useState(!1);
1101
1101
  Te({
1102
1102
  widgetName: "BubbleBudgetsWidget",
1103
1103
  isLoaded: h
@@ -1175,7 +1175,7 @@ const xt = ({
1175
1175
  ]
1176
1176
  }
1177
1177
  ),
1178
- /* @__PURE__ */ e(Rt, {}),
1178
+ /* @__PURE__ */ e(Mt, {}),
1179
1179
  /* @__PURE__ */ e(
1180
1180
  $,
1181
1181
  {
@@ -1184,7 +1184,7 @@ const xt = ({
1184
1184
  onClose: () => G(!1),
1185
1185
  title: r.add_new_title,
1186
1186
  children: /* @__PURE__ */ e(
1187
- Me,
1187
+ Re,
1188
1188
  {
1189
1189
  onAddBudget: Pe,
1190
1190
  onRecalculateBudgets: Ge
@@ -873,7 +873,7 @@ const zt = C(({ onBackClick: t, sx: a }) => {
873
873
  const { isMobile: a } = O(), { categoriesLoaded: o, loadCategories: i } = z();
874
874
  return p.useEffect(() => {
875
875
  o || i().finally();
876
- }, []), /* @__PURE__ */ e(X, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(f, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
876
+ }), /* @__PURE__ */ e(X, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(f, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
877
877
  };
878
878
  export {
879
879
  Qt as AccountNotificationProfiles,
@@ -1,9 +1,9 @@
1
1
  import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import l from "react";
3
- import { observer as v } from "mobx-react-lite";
3
+ import { observer as A } from "mobx-react-lite";
4
4
  import { startOfMonth as at } from "date-fns/startOfMonth";
5
5
  import { endOfMonth as ot } from "date-fns/endOfMonth";
6
- import L from "@mui/material/Box";
6
+ import v from "@mui/material/Box";
7
7
  import b from "@mui/material/Stack";
8
8
  import N from "@mui/material/Tab";
9
9
  import it from "@mui/material/Tabs";
@@ -11,7 +11,7 @@ import yt from "@mui/material/styles/useTheme";
11
11
  import { g as rt, a as st, S as $, b as Y } from "../SpendingLegend-BSHRsmqN.mjs";
12
12
  import { Text as T, Icon as _t } from "@mxenabled/mxui";
13
13
  import { f as R } from "../NumberFormatting-DjTD0t3W.mjs";
14
- import { u as A, m as E, d as lt, b as z, a as V, h as ct, g as bt } from "../hooks-ZMp65DFz.mjs";
14
+ import { u as I, m as E, d as lt, b as z, a as V, h as ct, g as bt } from "../hooks-ZMp65DFz.mjs";
15
15
  import { u as dt } from "../useWidgetLoadTimer-hIOioiKx.mjs";
16
16
  import { L as gt } from "../Loader-DUaFpDGv.mjs";
17
17
  import { M as Ct } from "../MiniWidgetContainer-98-hKFqm.mjs";
@@ -27,13 +27,13 @@ import Q from "@mui/material/ListItem";
27
27
  import Z from "@mui/material/ListItemButton";
28
28
  import { u as Lt } from "../useScreenSize-B6JyS_Lj.mjs";
29
29
  import { D as tt } from "../Drawer-DV4NTsFg.mjs";
30
- import { b as w } from "../Category-CevNQ03n.mjs";
30
+ import { b as L } from "../Category-CevNQ03n.mjs";
31
31
  import { A as et, W as vt } from "../WidgetContainer-Bj3HyCfV.mjs";
32
32
  const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b, { direction: "column", children: [
33
33
  /* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
34
34
  /* @__PURE__ */ t(T, { variant: "XSmall", children: R(n, a === "mini" ? "0,0" : "0,0.00") })
35
35
  ] }), At = () => {
36
- const n = yt(), { goals: d, spending: a } = A(), { categories: o, dateRangeCategoryTotals: i } = E(), g = l.useMemo(
36
+ const n = yt(), { goals: d, spending: a } = I(), { categories: o, dateRangeCategoryTotals: i } = E(), g = l.useMemo(
37
37
  () => [
38
38
  n.palette.chartMono.chartMono5,
39
39
  n.palette.chartMono.chartMono4,
@@ -49,17 +49,17 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
49
49
  ), m = l.useMemo(
50
50
  () => st(o, i, g),
51
51
  [o, i, g]
52
- ), I = (f, M) => {
53
- _(M), r("");
52
+ ), M = (f, D) => {
53
+ _(D), r("");
54
54
  }, y = (f) => {
55
55
  r(e === f ? "" : f);
56
56
  };
57
- return /* @__PURE__ */ c(L, { width: "100%", children: [
57
+ return /* @__PURE__ */ c(v, { width: "100%", children: [
58
58
  /* @__PURE__ */ c(
59
59
  it,
60
60
  {
61
61
  "aria-label": a.mini_title,
62
- onChange: I,
62
+ onChange: M,
63
63
  value: p,
64
64
  variant: "fullWidth",
65
65
  children: [
@@ -99,7 +99,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
99
99
  }
100
100
  ),
101
101
  /* @__PURE__ */ t(
102
- L,
102
+ v,
103
103
  {
104
104
  "aria-labelledby": "spending-tab",
105
105
  hidden: p !== 0,
@@ -120,7 +120,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
120
120
  }
121
121
  ),
122
122
  /* @__PURE__ */ t(
123
- L,
123
+ v,
124
124
  {
125
125
  "aria-labelledby": "income-tab",
126
126
  hidden: p !== 1,
@@ -142,8 +142,8 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
142
142
  }
143
143
  )
144
144
  ] });
145
- }, It = v(At), Et = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
146
- const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { spending: p } = A(), { isInitialized: _, selectedAccounts: u } = z();
145
+ }, It = A(At), Et = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
146
+ const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { spending: p } = I(), { isInitialized: _, selectedAccounts: u } = z();
147
147
  return dt({
148
148
  widgetName: "SpendingMiniWidget",
149
149
  isLoaded: i
@@ -166,13 +166,13 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
166
166
  children: /* @__PURE__ */ t(It, {})
167
167
  }
168
168
  ) : /* @__PURE__ */ t(gt, {});
169
- }, fe = v(Et), Wt = ({
169
+ }, fe = A(Et), Wt = ({
170
170
  data: n,
171
171
  onSelected: d,
172
172
  selectedId: a = "",
173
173
  title: o
174
174
  }) => {
175
- const { spending: i } = A(), g = n.categoryData.find((e) => e.guid === a);
175
+ const { spending: i } = I(), g = n.categoryData.find((e) => e.guid === a);
176
176
  return /* @__PURE__ */ c(b, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
177
177
  /* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${o} ${i.by_category}` }),
178
178
  /* @__PURE__ */ t(F, { "aria-hidden": "true" }),
@@ -194,7 +194,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
194
194
  sx: { minHeight: 44, px: 8, py: 0 },
195
195
  children: [
196
196
  /* @__PURE__ */ t(
197
- L,
197
+ v,
198
198
  {
199
199
  borderRadius: 4,
200
200
  flexShrink: 0,
@@ -253,14 +253,14 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
253
253
  ] }, e.guid)) }),
254
254
  /* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${R(n.totalAmount, "0,0.00")}` })
255
255
  ] });
256
- }, Rt = v(Wt), Nt = ({
256
+ }, Rt = A(Wt), Nt = ({
257
257
  data: n,
258
258
  onSelected: d,
259
259
  onViewTransactions: a,
260
260
  selectedId: o,
261
261
  title: i
262
262
  }) => {
263
- const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = E(), { spending: p } = A();
263
+ const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = E(), { spending: p } = I();
264
264
  return /* @__PURE__ */ c(
265
265
  b,
266
266
  {
@@ -305,7 +305,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
305
305
  ]
306
306
  }
307
307
  );
308
- }, nt = v(Nt), $t = (n) => [
308
+ }, nt = A(Nt), $t = (n) => [
309
309
  n.palette.chartMono.chartMono5,
310
310
  n.palette.chartMono.chartMono4,
311
311
  n.palette.chartMono.chartMono3,
@@ -317,12 +317,12 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
317
317
  goals: g,
318
318
  spending: e,
319
319
  transactions: r
320
- } = A(), { displayedDateRange: p, selectedAccountGuids: _ } = z(), {
320
+ } = I(), { displayedDateRange: p, selectedAccountGuids: _ } = z(), {
321
321
  setFilter: u,
322
322
  sortedTransactions: m,
323
- sortedTransactionsWithSplits: I,
323
+ sortedTransactionsWithSplits: M,
324
324
  tags: y
325
- } = ct(), f = a?.master?.deep_link_params?.account_guids, M = a?.master?.deep_link_params?.view, [D, C] = l.useState(""), [x, W] = l.useState(M === "income" ? 1 : 0), [H, P] = l.useState(""), [pt, O] = l.useState(!1), B = l.useMemo(
325
+ } = ct(), f = a?.master?.deep_link_params?.account_guids, D = a?.master?.deep_link_params?.view, [x, C] = l.useState(""), [w, W] = l.useState(D === "income" ? 1 : 0), [H, P] = l.useState(""), [pt, O] = l.useState(!1), B = l.useMemo(
326
326
  () => rt(o, g, n, i),
327
327
  [o, i]
328
328
  ), K = l.useMemo(
@@ -334,14 +334,14 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
334
334
  ), ut = (s, S) => {
335
335
  W(S), C("");
336
336
  }, U = (s, S = !1) => {
337
- S ? mt(s) : C(D === s || s === "0" ? "" : s);
337
+ S ? mt(s) : C(x === s || s === "0" ? "" : s);
338
338
  }, mt = (s) => {
339
339
  u({
340
340
  ...{
341
341
  accounts: f || _,
342
342
  dateRange: p
343
343
  },
344
- custom: (h) => D === "other" ? h.top_level_category_guid === s : h.category_guid === s,
344
+ custom: (h) => x === "other" ? h.top_level_category_guid === s : h.category_guid === s,
345
345
  showSplits: !0
346
346
  }), O(!0);
347
347
  }, X = (s) => {
@@ -349,7 +349,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
349
349
  accounts: f || _,
350
350
  dateRange: p
351
351
  };
352
- if (x === 0)
352
+ if (w === 0)
353
353
  if (s === "other") {
354
354
  const h = B.categoryData.find((j) => j.guid === "other");
355
355
  u({
@@ -359,20 +359,20 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
359
359
  } else
360
360
  u({
361
361
  ...S,
362
- custom: (h) => s ? h.top_level_category_guid === s : h.top_level_category_guid !== w.INCOME && h.category_guid !== w.INCOME && h.top_level_category_guid !== w.INVESTMENTS && h.top_level_category_guid !== w.TRANSFER,
362
+ custom: (h) => s ? h.top_level_category_guid === s : h.top_level_category_guid !== L.INCOME && h.category_guid !== L.INCOME && h.top_level_category_guid !== L.INVESTMENTS && h.top_level_category_guid !== L.TRANSFER,
363
363
  showSplits: !!s
364
364
  });
365
365
  else
366
366
  u({
367
367
  ...S,
368
- custom: (h) => s ? h.category_guid === s : h.category_guid === w.INCOME || h.top_level_category_guid === w.INCOME
368
+ custom: (h) => s ? h.category_guid === s : h.category_guid === L.INCOME || h.top_level_category_guid === L.INCOME
369
369
  });
370
370
  O(!0);
371
371
  }, ht = () => {
372
- Mt(I, y);
372
+ Mt(M, y);
373
373
  };
374
- return /* @__PURE__ */ c(L, { children: [
375
- /* @__PURE__ */ c(it, { onChange: ut, value: x, variant: "fullWidth", children: [
374
+ return /* @__PURE__ */ c(v, { children: [
375
+ /* @__PURE__ */ c(it, { onChange: ut, value: w, variant: "fullWidth", children: [
376
376
  /* @__PURE__ */ t(
377
377
  N,
378
378
  {
@@ -398,23 +398,23 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
398
398
  }
399
399
  )
400
400
  ] }),
401
- x === 0 && /* @__PURE__ */ t(
401
+ w === 0 && /* @__PURE__ */ t(
402
402
  nt,
403
403
  {
404
404
  data: B,
405
405
  onSelected: U,
406
406
  onViewTransactions: X,
407
- selectedId: D,
407
+ selectedId: x,
408
408
  title: e.spend_tab_title
409
409
  }
410
410
  ),
411
- x === 1 && /* @__PURE__ */ t(
411
+ w === 1 && /* @__PURE__ */ t(
412
412
  nt,
413
413
  {
414
414
  data: K,
415
415
  onSelected: U,
416
416
  onViewTransactions: X,
417
- selectedId: D,
417
+ selectedId: x,
418
418
  title: e.income_tab_title
419
419
  }
420
420
  ),
@@ -450,35 +450,35 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
450
450
  }
451
451
  )
452
452
  ] });
453
- }, Ot = v(kt), Bt = ({ onBackClick: n, sx: d = {} }) => {
454
- const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { categoriesLoaded: i, dateRangeTotalsLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { isTransactionDataLoaded: p, loadTransactionData: _ } = ct(), { spending: u } = A(), { displayedDateRange: m, isInitialized: I, setDisplayedDate: y, selectedAccounts: f } = z(), { onEvent: M } = bt(), { clientConfig: D } = V(), C = D?.master?.deep_link_params?.date_range;
453
+ }, Ot = A(kt), Bt = ({ onBackClick: n, sx: d = {} }) => {
454
+ const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { categoriesLoaded: i, dateRangeTotalsLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { isTransactionDataLoaded: p, loadTransactionData: _ } = ct(), { spending: u } = I(), { displayedDateRange: m, isInitialized: M, setDisplayedDate: y, selectedAccounts: f } = z(), { onEvent: D } = bt(), { clientConfig: x } = V(), C = x?.master?.deep_link_params?.date_range;
455
455
  dt({
456
456
  widgetName: "SpendingWidget",
457
457
  isLoaded: g
458
458
  }), l.useEffect(() => {
459
- C && Array.isArray(C) && C.length === 2 ? y(C[0], C[1]) : y(at(q()), ot(q())), a || o().finally(), i || e().finally(), p || _().finally(), M(et.SPENDING_VIEW);
459
+ C && Array.isArray(C) && C.length === 2 ? y(C[0], C[1]) : y(at(q()), ot(q())), a || o().finally(), i || e().finally(), p || _().finally(), D(et.SPENDING_VIEW);
460
460
  }, []), l.useEffect(() => {
461
- r(
461
+ M && r(
462
462
  f,
463
463
  m.start,
464
464
  m.end
465
465
  ).finally();
466
- }, [m, f]);
467
- const x = (W) => {
466
+ }, [m, M, f]);
467
+ const w = (W) => {
468
468
  y(W[0], W[1]);
469
469
  };
470
- return I ? /* @__PURE__ */ t(
470
+ return M ? /* @__PURE__ */ t(
471
471
  vt,
472
472
  {
473
- calendarActions: { onRangeChanged: x },
474
- onAccountsFilterClick: () => M(et.SPENDING_CLICK_FILTER),
473
+ calendarActions: { onRangeChanged: w },
474
+ onAccountsFilterClick: () => D(et.SPENDING_CLICK_FILTER),
475
475
  onBackClick: n,
476
476
  sx: d,
477
477
  title: u.title,
478
- children: /* @__PURE__ */ t(L, { width: "100%", children: /* @__PURE__ */ t(Ot, {}) })
478
+ children: /* @__PURE__ */ t(v, { width: "100%", children: /* @__PURE__ */ t(Ot, {}) })
479
479
  }
480
480
  ) : /* @__PURE__ */ t(gt, {});
481
- }, ye = v(Bt);
481
+ }, ye = A(Bt);
482
482
  export {
483
483
  fe as SpendingMiniWidget,
484
484
  ye as SpendingWidget