@mx-cartographer/experiences 8.2.3 → 8.2.4-alpha-ram1-bug-testing

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 (77) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{AccountDetailsHeader-CfdnKyJK.mjs → AccountDetailsHeader-DIysk_4w.mjs} +1 -1
  3. package/dist/{AccountFields-CAy0x_4i.mjs → AccountFields-mwJ8NXsX.mjs} +18 -18
  4. package/dist/{AccountListItem-BYyeeCf6.mjs → AccountListItem-BDXHs4tV.mjs} +7 -8
  5. package/dist/{CategorySelectorDrawer-Cu1ohxeM.mjs → CategorySelectorDrawer-CmaDLhnf.mjs} +71 -68
  6. package/dist/{ConnectCard-Dix8BoV_.mjs → ConnectCard-CCep7Zqe.mjs} +9 -9
  7. package/dist/{ConnectDrawer-DgfsTpyW.mjs → ConnectDrawer-Cnjr3Ddg.mjs} +2 -2
  8. package/dist/{ConnectionsDrawer-D7IXAza2.mjs → ConnectionsDrawer-CtfPXk0M.mjs} +1 -1
  9. package/dist/{CurrencyDialog-d4dL7vA5.mjs → CurrencyDialog-DumQCTPO.mjs} +18 -16
  10. package/dist/{CurrencyInput-B59ugxPN.mjs → CurrencyInput-adTIRtL3.mjs} +28 -26
  11. package/dist/{Dialog-iLlBR8TG.mjs → Dialog-CwWc0AbH.mjs} +11 -11
  12. package/dist/{Drawer-XPaLYjiO.mjs → Drawer-BXqqBMxg.mjs} +26 -28
  13. package/dist/{EmbeddedCard-BNl3quCs.mjs → EmbeddedCard-DPwJjqMH.mjs} +37 -37
  14. package/dist/{EmptyState-DHAkGsjk.mjs → EmptyState-CJUDc3kD.mjs} +17 -17
  15. package/dist/{ExportCsvAction-hDprC41l.mjs → ExportCsvAction-Bw02ZJEj.mjs} +2 -2
  16. package/dist/{GlobalAccountFilter-DrhtwPqh.mjs → GlobalAccountFilter-7Cg2-9A5.mjs} +25 -25
  17. package/dist/{Help-BSQm9o29.mjs → Help-DJ8PrVHX.mjs} +56 -73
  18. package/dist/{ListItemAction-DGjHxNDJ.mjs → ListItemAction-CwspSmQi.mjs} +22 -22
  19. package/dist/{ManageIncome-DwylSiWs.mjs → ManageIncome-B1JfqslT.mjs} +6 -6
  20. package/dist/{NotificationSettings-CCg-Tml2.mjs → NotificationSettings-6p-h5phZ.mjs} +48 -48
  21. package/dist/{OriginalBalanceAction-CvDx0K6k.mjs → OriginalBalanceAction-CkJPnp2c.mjs} +2 -2
  22. package/dist/{RecurringSettings-CPXLW6AR.mjs → RecurringSettings-cm6MK_aS.mjs} +1 -1
  23. package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-CC9F_Ezk.mjs} +1 -1
  24. package/dist/SearchBox-Cpgu_gdO.mjs +50 -0
  25. package/dist/Select-BFt-HD-L.mjs +55 -0
  26. package/dist/{SelectionBox-Bx2a5rh4.mjs → SelectionBox-B4xELRgp.mjs} +1 -1
  27. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +1 -1
  28. package/dist/{SpendingLegend-BmkEr9Nh.mjs → SpendingLegend-5Ct_FZ8o.mjs} +1 -1
  29. package/dist/{ToggleListItem-BLu_fWA2.mjs → ToggleListItem-Dl1lXNwj.mjs} +29 -28
  30. package/dist/{TransactionDetails-CbBSxdOi.mjs → TransactionDetails-C3dlAzYf.mjs} +386 -393
  31. package/dist/{ViewMoreMicroCard-D_LoKlJU.mjs → ViewMoreMicroCard-BD_MNc2z.mjs} +526 -518
  32. package/dist/{WidgetContainer-CYcmwsSu.mjs → WidgetContainer-DNuz_s7W.mjs} +5 -5
  33. package/dist/accounts/index.es.js +199 -194
  34. package/dist/analytics/index.es.js +1 -1
  35. package/dist/budgets/index.es.js +183 -184
  36. package/dist/cashflow/index.es.js +70 -80
  37. package/dist/categories/index.es.js +1 -1
  38. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  39. package/dist/common/components/WidgetContainer.d.ts +1 -1
  40. package/dist/common/components/charts/stackedlinechart/CustomAreaTooltip.d.ts +1 -1
  41. package/dist/common/hooks/usePrevious.d.ts +1 -1
  42. package/dist/common/index.es.js +206 -194
  43. package/dist/common/utils/Theme.d.ts +6 -5
  44. package/dist/common/utils/index.d.ts +1 -1
  45. package/dist/dashboard/index.es.js +47 -47
  46. package/dist/debts/index.es.js +140 -140
  47. package/dist/finstrong/index.es.js +40 -32
  48. package/dist/finstrong/util/finstrongUtils.d.ts +1 -1
  49. package/dist/goals/index.es.js +154 -165
  50. package/dist/help/index.es.js +2 -2
  51. package/dist/insights/components/insights/UserFeedback/Types.d.ts +1 -1
  52. package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +3 -3
  53. package/dist/insights/hooks/useContainerDimensions.d.ts +1 -1
  54. package/dist/insights/index.es.js +677 -687
  55. package/dist/insights/themes/Typography.d.ts +0 -2
  56. package/dist/investments/index.es.js +205 -207
  57. package/dist/merchants/index.es.js +1 -1
  58. package/dist/microinsights/cards/InsightCard.d.ts +2 -2
  59. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +3 -5
  60. package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +3 -5
  61. package/dist/microinsights/cards/ZeroStateCard.d.ts +3 -5
  62. package/dist/microinsights/carousel/BeatList.d.ts +2 -2
  63. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +12 -1
  64. package/dist/microinsights/index.es.js +1 -1
  65. package/dist/microinsights/interfaces.d.ts +11 -5
  66. package/dist/networth/index.es.js +85 -87
  67. package/dist/notifications/index.es.js +7 -8
  68. package/dist/recurringtransactions/index.es.js +53 -53
  69. package/dist/settings/index.es.js +111 -111
  70. package/dist/spending/index.es.js +7 -7
  71. package/dist/transactions/components/shared/TransactionList.d.ts +2 -2
  72. package/dist/transactions/index.es.js +138 -140
  73. package/dist/trends/index.es.js +293 -292
  74. package/dist/{useScreenSize-CeFhWTt_.mjs → useScreenSize-mWpmnh5w.mjs} +1 -1
  75. package/package.json +29 -23
  76. package/dist/SearchBox-CwDgvWVJ.mjs +0 -48
  77. package/dist/Select-BZRUpOib.mjs +0 -51
@@ -1,58 +1,57 @@
1
- import { jsxs as m, jsx as e, Fragment as Ke } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as e, Fragment as Ve } from "react/jsx-runtime";
2
2
  import l from "react";
3
3
  import { observer as I } from "mobx-react-lite";
4
4
  import { endOfMonth as Be } from "date-fns/endOfMonth";
5
- import { isAfter as Ye } from "date-fns/isAfter";
6
- import { startOfMonth as se } from "date-fns/startOfMonth";
7
- import { startOfToday as ae } from "date-fns/startOfToday";
5
+ import { isAfter as Ke } from "date-fns/isAfter";
6
+ import { startOfMonth as ie } from "date-fns/startOfMonth";
7
+ import { startOfToday as re } from "date-fns/startOfToday";
8
8
  import Ae from "@mui/material/Alert";
9
9
  import xe from "@mui/material/Snackbar";
10
10
  import x from "@mui/material/Stack";
11
- import ce from "@mui/material/styles/useTheme";
12
- import Y from "@mui/material/Box";
13
- import X from "@mui/material/List";
11
+ import { useTheme as H, alpha as Ye } from "@mui/material/styles";
12
+ import X from "@mui/material/Box";
13
+ import Z from "@mui/material/List";
14
14
  import { b as R } from "../Localization-DnoVyBNK.mjs";
15
- import { Text as C, CategoryIcon as H, Icon as z, H3 as Le } from "@mxenabled/mxui";
15
+ import { Text as C, CategoryIcon as V, Icon as z, H3 as Le } from "@mxenabled/mxui";
16
16
  import { f as D } from "../NumberFormatting--XMeeBfr.mjs";
17
- import { u as E, o as w, i as le, l as Z, D as de, a as Ne, g as q, b as J, h as Q, d as ke } from "../hooks-BaO_gOI6.mjs";
17
+ import { u as E, o as w, i as le, l as q, D as de, a as Ne, g as J, b as Q, h as ee, d as ke } from "../hooks-BaO_gOI6.mjs";
18
18
  import $e from "@mui/material/Button";
19
19
  import ue from "@mui/material/Divider";
20
- import ee from "@mui/material/ListItem";
20
+ import te from "@mui/material/ListItem";
21
21
  import me from "@mui/material/ListItemAvatar";
22
- import te from "@mui/material/ListItemButton";
23
- import oe from "@mui/material/ListItemText";
24
- import { D as $ } from "../Drawer-XPaLYjiO.mjs";
22
+ import oe from "@mui/material/ListItemButton";
23
+ import ne from "@mui/material/ListItemText";
24
+ import { D as $ } from "../Drawer-BXqqBMxg.mjs";
25
25
  import Xe from "@mui/material/ListItemSecondaryAction";
26
- import { C as Ze } from "../CurrencyInput-B59ugxPN.mjs";
27
- import { D as W } from "../Dialog-iLlBR8TG.mjs";
28
- import { C as qe } from "../ConnectionsDrawer-D7IXAza2.mjs";
26
+ import { C as Ze } from "../CurrencyInput-adTIRtL3.mjs";
27
+ import { D as W } from "../Dialog-CwWc0AbH.mjs";
28
+ import { C as qe } from "../ConnectionsDrawer-CtfPXk0M.mjs";
29
29
  import * as O from "d3";
30
30
  import Je from "@mui/material/Tooltip";
31
- import { useTheme as Ge, alpha as Qe } from "@mui/material/styles";
32
- import { u as ge } from "../useScreenSize-CeFhWTt_.mjs";
31
+ import { u as ge } from "../useScreenSize-mWpmnh5w.mjs";
33
32
  import { L as pe } from "../Loader-CxeBwuPG.mjs";
34
- import { E as _e } from "../EmptyState-DHAkGsjk.mjs";
33
+ import { E as _e } from "../EmptyState-CJUDc3kD.mjs";
35
34
  import { A as P } from "../Analytics-CzGzz_sE.mjs";
36
35
  import Ee from "@mui/material/Tab";
37
- import et from "@mui/material/Tabs";
38
- import { e as tt, g as we } from "../TransactionUtils-BphBJBbU.mjs";
39
- import { T as ve } from "../EmbeddedCard-BNl3quCs.mjs";
40
- import { T as ot, c as nt } from "../TransactionDetails-CbBSxdOi.mjs";
36
+ import Qe from "@mui/material/Tabs";
37
+ import { e as et, g as we } from "../TransactionUtils-BphBJBbU.mjs";
38
+ import { T as ve } from "../EmbeddedCard-DPwJjqMH.mjs";
39
+ import { T as tt, c as ot } from "../TransactionDetails-C3dlAzYf.mjs";
41
40
  import Te from "@mui/material/Card";
42
41
  import De from "@mui/material/CardContent";
43
42
  import { S as Se } from "../StatusBar-CPfSXe80.mjs";
44
- import { S as Pe } from "../SingleSegmentDonut-PsRQPkmV.mjs";
45
- import { u as at, C as rt } from "../CategorySelectorDrawer-Cu1ohxeM.mjs";
46
- import je from "@mui/material/CardHeader";
47
- import { subDays as st } from "date-fns/subDays";
48
- import it from "@mui/material/IconButton";
49
- import { M as ct } from "../ManageIncome-DwylSiWs.mjs";
50
- import { u as ze } from "../useWidgetLoadTimer-CJb-RELP.mjs";
51
- import { W as lt } from "../WidgetContainer-CYcmwsSu.mjs";
52
- import { g as dt, a as ut } from "../BudgetUtil-Bg2AQJpQ.mjs";
53
- import { M as mt } from "../MiniWidgetContainer-BdPiUU-u.mjs";
54
- import { b as gt } from "../CurrencyDialog-d4dL7vA5.mjs";
55
- const pt = I(() => {
43
+ import { S as Ge } from "../SingleSegmentDonut-7Uy6VEld.mjs";
44
+ import { u as nt, C as at } from "../CategorySelectorDrawer-CmaDLhnf.mjs";
45
+ import Pe from "@mui/material/CardHeader";
46
+ import { subDays as rt } from "date-fns/subDays";
47
+ import st from "@mui/material/IconButton";
48
+ import { M as it } from "../ManageIncome-B1JfqslT.mjs";
49
+ import { u as je } from "../useWidgetLoadTimer-CJb-RELP.mjs";
50
+ import { W as ct } from "../WidgetContainer-DNuz_s7W.mjs";
51
+ import { g as lt, a as dt } from "../BudgetUtil-Bg2AQJpQ.mjs";
52
+ import { M as ut } from "../MiniWidgetContainer-BdPiUU-u.mjs";
53
+ import { b as mt } from "../CurrencyDialog-DumQCTPO.mjs";
54
+ const gt = I(() => {
56
55
  const { budgets: t } = E(), { totalBudgeted: n } = w(), { incomeTotal: c } = le(), i = c - n;
57
56
  return /* @__PURE__ */ m(x, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
58
57
  /* @__PURE__ */ m(x, { alignItems: "center", children: [
@@ -70,27 +69,27 @@ const pt = I(() => {
70
69
  /* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.remaining })
71
70
  ] })
72
71
  ] });
73
- }), ht = I(
72
+ }), pt = I(
74
73
  ({ category: t }) => {
75
74
  const { budgets: n } = E(), { budgets: c } = w(), i = l.useMemo(() => {
76
75
  const a = c.find((r) => r.category_guid === t.guid), s = D(t.totalAverageAmount, "0,0"), o = a ? R(n.recalculate_previous_budget, D(a.amount, "0,0")) : n.recalculate_new_budget;
77
76
  return `${s} - ${o}`;
78
77
  }, [n, c]);
79
78
  return /* @__PURE__ */ m(l.Fragment, { children: [
80
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { children: [
81
- /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid, variant: "filled" }) }),
82
- /* @__PURE__ */ e(oe, { primary: t.name, secondary: i })
79
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { children: [
80
+ /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(V, { categoryGuid: t.guid, variant: "filled" }) }),
81
+ /* @__PURE__ */ e(ne, { primary: t.name, secondary: i })
83
82
  ] }) }),
84
83
  /* @__PURE__ */ e(ue, {})
85
84
  ] }, t.guid);
86
85
  }
87
- ), bt = ({ onRecalculateBudgets: t }) => {
88
- const { budgets: n, common: c } = E(), { spendCategories: i } = Z(), { recalculateBudgets: a, setAlert: s } = w(), [o, r] = l.useState(!1), p = i.filter((u) => u.totalAverageAmount > 0), d = async () => {
86
+ ), ht = ({ onRecalculateBudgets: t }) => {
87
+ const { budgets: n, common: c } = E(), { spendCategories: i } = q(), { recalculateBudgets: a, setAlert: s } = w(), [o, r] = l.useState(!1), p = i.filter((u) => u.totalAverageAmount > 0), d = async () => {
89
88
  await a(p), r(!1), s(n.alert_recalculated_budgets), t?.();
90
89
  };
91
90
  return /* @__PURE__ */ m(l.Fragment, { children: [
92
91
  /* @__PURE__ */ e($e, { onClick: () => r(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
93
- /* @__PURE__ */ e(C, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "subtitle1", children: n.recalculate_help }),
92
+ /* @__PURE__ */ e(C, { sx: { mx: 24, my: 16, textAlign: "center" }, variant: "subtitle1", children: n.recalculate_help }),
94
93
  /* @__PURE__ */ e(
95
94
  $,
96
95
  {
@@ -104,7 +103,7 @@ const pt = I(() => {
104
103
  /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: n.recalculate_description_top }),
105
104
  /* @__PURE__ */ e(C, { variant: "subtitle2", children: n.recalculate_description_bottom })
106
105
  ] }),
107
- /* @__PURE__ */ e(Y, { bgcolor: "background.paper", children: /* @__PURE__ */ e(X, { children: p.map((u) => /* @__PURE__ */ e(ht, { category: u }, u.guid)) }) })
106
+ /* @__PURE__ */ e(X, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Z, { children: p.map((u) => /* @__PURE__ */ e(pt, { category: u }, u.guid)) }) })
108
107
  ] })
109
108
  }
110
109
  )
@@ -135,15 +134,15 @@ const pt = I(() => {
135
134
  }
136
135
  )
137
136
  ] });
138
- }, ft = I(({ category: t, onAddBudget: n }) => {
137
+ }, bt = I(({ category: t, onAddBudget: n }) => {
139
138
  const { budgets: c, common: i } = E(), [a, s] = l.useState(!1), [o, r] = l.useState(
140
139
  `${t.totalAmount === 0 ? "" : t.totalAmount}`
141
140
  );
142
141
  return /* @__PURE__ */ m(l.Fragment, { children: [
143
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { onClick: () => s(!0), children: [
144
- /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid }) }),
142
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => s(!0), children: [
143
+ /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(V, { categoryGuid: t.guid }) }),
145
144
  /* @__PURE__ */ e(
146
- oe,
145
+ ne,
147
146
  {
148
147
  primary: t.name,
149
148
  secondary: D(t.totalAmount, "0,0")
@@ -164,23 +163,23 @@ const pt = I(() => {
164
163
  }
165
164
  )
166
165
  ] });
167
- }), Fe = I(({ onAddBudget: t, onRecalculateBudgets: n }) => {
166
+ }), ze = I(({ onAddBudget: t, onRecalculateBudgets: n }) => {
168
167
  const { budgets: c } = E(), { addBudget: i, setAlert: a, unbudgetedCategories: s } = w(), o = async (r, p) => {
169
168
  await i(r, p), t?.(), a(R(c.alert_budget_created, r.name));
170
169
  };
171
170
  return /* @__PURE__ */ m(x, { children: [
172
- /* @__PURE__ */ e(pt, {}),
173
- /* @__PURE__ */ e(Y, { bgcolor: "background.paper", children: /* @__PURE__ */ e(X, { children: s.map((r) => /* @__PURE__ */ e(
174
- ft,
171
+ /* @__PURE__ */ e(gt, {}),
172
+ /* @__PURE__ */ e(X, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Z, { children: s.map((r) => /* @__PURE__ */ e(
173
+ bt,
175
174
  {
176
175
  category: r,
177
176
  onAddBudget: o
178
177
  },
179
178
  r.guid
180
179
  )) }) }),
181
- /* @__PURE__ */ e(bt, { onRecalculateBudgets: n })
180
+ /* @__PURE__ */ e(ht, { onRecalculateBudgets: n })
182
181
  ] });
183
- }), Ie = 5, Ue = 100, ie = 25, yt = (t) => {
182
+ }), Ie = 5, Fe = 100, ce = 25, ft = (t) => {
184
183
  const n = (a) => {
185
184
  a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
186
185
  }, c = (a) => {
@@ -189,14 +188,14 @@ const pt = I(() => {
189
188
  a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
190
189
  };
191
190
  return O.drag().on("start", n).on("drag", c).on("end", i);
192
- }, _t = (t) => {
191
+ }, yt = (t) => {
193
192
  let n = t.transaction_total / t.amount;
194
193
  n < 0 ? n = 0 : n > 1 && (n = 1);
195
194
  const c = n * 2 * Math.PI, i = O.interpolate(0, c), a = O.arc().cornerRadius(5).innerRadius(t.radius - Ie * 2).outerRadius(t.radius - Ie).startAngle(0).endAngle(0);
196
195
  return (s) => (a.endAngle(i(s)), a(t) || "");
197
- }, Ct = (t) => {
198
- O.selectAll(".bubble").call(yt(t));
199
- }, Oe = (t, n, c) => Math.min(Math.max(t, n), c), Bt = (t, n, c) => {
196
+ }, _t = (t) => {
197
+ O.selectAll(".bubble").call(ft(t));
198
+ }, Oe = (t, n, c) => Math.min(Math.max(t, n), c), Ct = (t, n, c) => {
200
199
  t.alpha(1).restart().force(
201
200
  "x",
202
201
  O.forceX().x(c / 2).strength(0.01)
@@ -206,18 +205,18 @@ const pt = I(() => {
206
205
  ).on("tick", () => {
207
206
  const i = t.nodes();
208
207
  i.forEach((a) => {
209
- const s = a.radius ?? ie;
208
+ const s = a.radius ?? ce;
210
209
  a.x = Oe(a.x ?? 0, s, c - s), a.y = Oe(a.y ?? 0, s, n - s);
211
210
  }), O.selectAll(".bubble").data(i).attr("transform", (a) => `translate(${a.x},${a.y})`);
212
211
  });
213
- }, We = (t, n) => O.scaleLinear().domain([t, n]).range([ie, Ue]), St = (t) => {
212
+ }, Ue = (t, n) => O.scaleLinear().domain([t, n]).range([ce, Fe]), Bt = (t) => {
214
213
  const n = t.reduce((s, o) => {
215
214
  const r = Math.max(o.transaction_total, o.amount);
216
215
  return r > s ? r : s;
217
216
  }, 0), c = t.reduce((s, o) => {
218
217
  const r = Math.max(o.transaction_total, o.amount);
219
218
  return r < s ? r : s;
220
- }, n), i = We(c, n), a = t.map((s) => {
219
+ }, n), i = Ue(c, n), a = t.map((s) => {
221
220
  const o = i(Math.max(s.transaction_total, s.amount)) || 25;
222
221
  return {
223
222
  ...s,
@@ -225,25 +224,25 @@ const pt = I(() => {
225
224
  };
226
225
  });
227
226
  return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((s) => s.radius + 2).strength(0.7));
228
- }, At = (t, n, c) => {
229
- const a = Math.PI * ie ** 2 * t, s = c < 400 || n < 300, o = s ? 40 : 20, r = Math.max(100, c - o), p = Math.max(100, n - o), d = r * p;
230
- let u = ie;
227
+ }, St = (t, n, c) => {
228
+ const a = Math.PI * ce ** 2 * t, s = c < 400 || n < 300, o = s ? 40 : 20, r = Math.max(100, c - o), p = Math.max(100, n - o), d = r * p;
229
+ let u = ce;
231
230
  if (a < d) {
232
231
  const g = Math.sqrt(d / (t * Math.PI)), h = Math.min(r, p) / 4;
233
- u = Math.min(Ue, g, h);
232
+ u = Math.min(Fe, g, h);
234
233
  }
235
234
  return s && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
236
- }, xt = (t, n, c, i, a) => {
237
- const { maxRadius: s, minRadius: o } = At(t, n, a);
235
+ }, At = (t, n, c, i, a) => {
236
+ const { maxRadius: s, minRadius: o } = St(t, n, a);
238
237
  return O.scaleLinear().domain([i, c]).range([o, s]);
239
- }, vt = (t, n, c = !1, i, a) => {
240
- const s = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...s), r = Math.max(...s), p = c ? xt(t.length, i, r, o, a) : We(o, r);
238
+ }, xt = (t, n, c = !1, i, a) => {
239
+ const s = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...s), r = Math.max(...s), p = c ? At(t.length, i, r, o, a) : Ue(o, r);
241
240
  return t.map((d) => ({
242
241
  ...d,
243
242
  radius: p(Math.max(d.transaction_total, d.amount))
244
243
  }));
245
- }, Me = 5, Tt = 2e3, Dt = ({ bubble: t }) => {
246
- const n = ce(), {
244
+ }, Me = 5, vt = 2e3, Tt = ({ bubble: t }) => {
245
+ const n = H(), {
247
246
  amount: c,
248
247
  guid: i,
249
248
  budgetColors: { mercury: a },
@@ -251,7 +250,7 @@ const pt = I(() => {
251
250
  transaction_total: o
252
251
  } = t, r = `mercury-${i}`;
253
252
  l.useEffect(() => {
254
- O.select(`.${r}`).selectAll(".status").remove(), O.select(`.${r}`).append("path").transition().duration(Tt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => _t(t));
253
+ O.select(`.${r}`).selectAll(".status").remove(), O.select(`.${r}`).append("path").transition().duration(vt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => yt(t));
255
254
  }, [c, s, o]);
256
255
  const p = O.arc().innerRadius((d) => d - 2 * Me).outerRadius((d) => d - Me).startAngle(0).endAngle(2 * Math.PI);
257
256
  return /* @__PURE__ */ e("g", { className: r, children: /* @__PURE__ */ e(
@@ -261,10 +260,10 @@ const pt = I(() => {
261
260
  style: { fill: n.palette.common.white, fillOpacity: 0.35 }
262
261
  }
263
262
  ) });
264
- }, Et = l.memo(Dt), U = 75, Ce = 50;
265
- function wt({ bubble: t, isDraggable: n, onClick: c = () => {
263
+ }, Dt = l.memo(Tt), U = 75, Ce = 50;
264
+ function Et({ bubble: t, isDraggable: n, onClick: c = () => {
266
265
  } }) {
267
- const [i, a] = l.useState(!1), s = Ge(), { availableWidth: o } = de(), r = l.useMemo(() => {
266
+ const [i, a] = l.useState(!1), s = H(), { availableWidth: o } = de(), r = l.useMemo(() => {
268
267
  if (t)
269
268
  return {
270
269
  amount: t.amount,
@@ -370,13 +369,13 @@ function wt({ bubble: t, isDraggable: n, onClick: c = () => {
370
369
  children: h.split(" ")[1]
371
370
  }
372
371
  ),
373
- /* @__PURE__ */ e(Et, { bubble: r })
372
+ /* @__PURE__ */ e(Dt, { bubble: r })
374
373
  ]
375
374
  },
376
375
  g
377
376
  );
378
377
  }
379
- const It = ({
378
+ const wt = ({
380
379
  height: t,
381
380
  width: n,
382
381
  isDraggable: c = !1,
@@ -384,7 +383,7 @@ const It = ({
384
383
  }
385
384
  }) => {
386
385
  const [a, s] = l.useState([]), o = l.useRef(null), r = l.useRef(!1), { detailedBudgets: p } = w(), d = l.useCallback(() => {
387
- const u = o.current, S = St(p), g = S.nodes();
386
+ const u = o.current, S = Bt(p), g = S.nodes();
388
387
  if (u) {
389
388
  const h = u.nodes(), _ = new Map(h.map((y) => [y.guid, y]));
390
389
  g.forEach((y) => {
@@ -406,9 +405,9 @@ const It = ({
406
405
  }, []), l.useEffect(() => {
407
406
  const u = o.current;
408
407
  if (!u) return;
409
- const S = u.nodes(), g = n > 0 && n < 450 || t > 0 && t < 300, h = vt(S, p, g, t, n);
410
- u.nodes(h), Bt(u, t, n), c && setTimeout(() => {
411
- Ct(u);
408
+ const S = u.nodes(), g = n > 0 && n < 450 || t > 0 && t < 300, h = xt(S, p, g, t, n);
409
+ u.nodes(h), Ct(u, t, n), c && setTimeout(() => {
410
+ _t(u);
412
411
  }, 0), s([...h]);
413
412
  }, [t, n, c, p]), /* @__PURE__ */ e(
414
413
  "svg",
@@ -416,15 +415,15 @@ const It = ({
416
415
  height: t,
417
416
  style: { overflow: "visible", touchAction: "manipulation" },
418
417
  width: Math.abs(n),
419
- children: a.map((u) => /* @__PURE__ */ e(wt, { bubble: u, isDraggable: c, onClick: i }, u.guid))
418
+ children: a.map((u) => /* @__PURE__ */ e(Et, { bubble: u, isDraggable: c, onClick: i }, u.guid))
420
419
  }
421
420
  );
422
- }, Ot = I(It), Mt = ({
421
+ }, It = I(wt), Ot = ({
423
422
  isMiniWidget: t = !1,
424
423
  onConnectAccountsClick: n,
425
424
  createBudgetOnClick: c
426
425
  }) => {
427
- const { config: i } = Ne(), { recalculateBudgets: a } = w(), { spendCategories: s } = Z(), { budgets: o } = E(), { availableWidth: r } = de(), { isMobile: p } = ge(r), d = t && p, [u, S] = l.useState(!1), [g, h] = l.useState(!1), [_, y] = l.useState(!1), A = l.useMemo(() => [...s.filter((b) => b.totalAverageAmount > 0)], [s]), v = async () => {
426
+ const { config: i } = Ne(), { recalculateBudgets: a } = w(), { spendCategories: s } = q(), { budgets: o } = E(), { availableWidth: r } = de(), { isMobile: p } = ge(r), d = t && p, [u, S] = l.useState(!1), [g, h] = l.useState(!1), [_, y] = l.useState(!1), A = l.useMemo(() => [...s.filter((b) => b.totalAverageAmount > 0)], [s]), v = async () => {
428
427
  y(!0);
429
428
  const { data: b, isSuccess: B } = await a(A);
430
429
  y(!1), B ? (b.length === 0 && h(!0), S(!1)) : S(!0);
@@ -450,7 +449,7 @@ const It = ({
450
449
  ...d && { justifyContent: "center", mt: 0, svg: { height: 32, width: 32 } }
451
450
  }
452
451
  }
453
- ) : /* @__PURE__ */ e(Ke, { children: g ? /* @__PURE__ */ e(
452
+ ) : /* @__PURE__ */ e(Ve, { children: g ? /* @__PURE__ */ e(
454
453
  _e,
455
454
  {
456
455
  header: o.zero_state_generate_budgets_header,
@@ -501,7 +500,7 @@ const It = ({
501
500
  }
502
501
  }
503
502
  ) });
504
- }, He = I(
503
+ }, We = I(
505
504
  ({
506
505
  createBudgetOnClick: t = () => {
507
506
  },
@@ -511,7 +510,7 @@ const It = ({
511
510
  shouldShowZeroState: a,
512
511
  unavailableWidth: s = 24
513
512
  }) => {
514
- const { onEvent: o } = q(), { setSelectedBudget: r } = w(), { isInitialized: p } = J(), { accounts: d } = E(), { availableWidth: u } = de(), { isMobile: S } = ge(), [g, h] = l.useState(!1), _ = l.useMemo(() => u - s, [u]), y = (v) => {
513
+ const { onEvent: o } = J(), { setSelectedBudget: r } = w(), { isInitialized: p } = Q(), { accounts: d } = E(), { availableWidth: u } = de(), { isMobile: S } = ge(), [g, h] = l.useState(!1), _ = l.useMemo(() => u - s, [u]), y = (v) => {
515
514
  r(v), o(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
516
515
  budget_category: v.category.name,
517
516
  click_type: "bubble"
@@ -520,20 +519,20 @@ const It = ({
520
519
  h(!0), o(P.ACCOUNTS_CLICK_CONNECT);
521
520
  };
522
521
  return /* @__PURE__ */ m(
523
- Y,
522
+ X,
524
523
  {
525
524
  ml: a || S ? 0 : 24,
526
525
  sx: { alignSelf: "center", ...i && { height: "100%" } },
527
526
  children: [
528
527
  a || !p ? /* @__PURE__ */ e(
529
- Mt,
528
+ Ot,
530
529
  {
531
530
  createBudgetOnClick: t,
532
531
  isMiniWidget: i,
533
532
  onConnectAccountsClick: A
534
533
  }
535
534
  ) : /* @__PURE__ */ e(
536
- Ot,
535
+ It,
537
536
  {
538
537
  height: n,
539
538
  isDraggable: c,
@@ -553,7 +552,7 @@ const It = ({
553
552
  }
554
553
  );
555
554
  }
556
- ), Ve = ({ budget: t }) => {
555
+ ), He = ({ budget: t }) => {
557
556
  const {
558
557
  amount: n,
559
558
  budgetColors: { background: c },
@@ -568,19 +567,19 @@ const It = ({
568
567
  }
569
568
  ];
570
569
  return /* @__PURE__ */ e(Te, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(De, { children: /* @__PURE__ */ m(x, { alignItems: "center", gap: 16, children: [
571
- /* @__PURE__ */ e(H, { categoryGuid: a, size: 56 }),
570
+ /* @__PURE__ */ e(V, { categoryGuid: a, size: 56 }),
572
571
  /* @__PURE__ */ e(C, { variant: "h1", children: `${D(o, "0,0")} / ${D(n, "0,0")}` }),
573
572
  /* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: i }),
574
573
  /* @__PURE__ */ e(Se, { data: r, height: 10 })
575
574
  ] }) }) });
576
- }, Rt = I(() => {
575
+ }, Mt = I(() => {
577
576
  const { budgets: t } = E();
578
577
  return /* @__PURE__ */ m(x, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
579
578
  /* @__PURE__ */ e(z, { color: "action", name: "bubble_chart", sx: { fontSize: 32 } }),
580
579
  /* @__PURE__ */ e(C, { bold: !0, color: "text.secondary", variant: "body2", children: t.zero_state_no_sub_budgets }),
581
580
  /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: t.zero_state_no_sub_budgets_description })
582
581
  ] });
583
- }), Lt = I(({ budget: t }) => {
582
+ }), Rt = I(({ budget: t }) => {
584
583
  const {
585
584
  amount: n,
586
585
  budgetColors: { background: c },
@@ -588,10 +587,10 @@ const It = ({
588
587
  percentage: a,
589
588
  transaction_total: s
590
589
  } = t, { setSelectedSubBudget: o } = w();
591
- return /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { onClick: () => o(t), children: [
592
- /* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: c, percent: a, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: i.parent_guid, variant: "basic" }) }) }),
590
+ return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => o(t), children: [
591
+ /* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ge, { color: c, percent: a, size: 40, children: /* @__PURE__ */ e(V, { categoryGuid: i.parent_guid, variant: "basic" }) }) }),
593
592
  /* @__PURE__ */ e(
594
- oe,
593
+ ne,
595
594
  {
596
595
  primary: /* @__PURE__ */ e(x, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }) }),
597
596
  secondary: /* @__PURE__ */ e(x, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { fontWeight: 400, variant: "body1", children: `
@@ -601,8 +600,8 @@ const It = ({
601
600
  }
602
601
  )
603
602
  ] }) });
604
- }), Nt = I(({ category: t, parentBudget: n }) => {
605
- const { budgets: c, common: i } = E(), { setExpandedGuid: a, setOnSelect: s } = at(), { addBudget: o } = w(), [r, p] = l.useState(!1), [d, u] = l.useState(!1), [S, g] = l.useState(""), [h, _] = l.useState(void 0);
603
+ }), Lt = I(({ category: t, parentBudget: n }) => {
604
+ const { budgets: c, common: i } = E(), { setExpandedGuid: a, setOnSelect: s } = nt(), { addBudget: o } = w(), [r, p] = l.useState(!1), [d, u] = l.useState(!1), [S, g] = l.useState(""), [h, _] = l.useState(void 0);
606
605
  l.useEffect(() => {
607
606
  s((v) => {
608
607
  const b = t.subCategories.find((B) => B.guid === v);
@@ -614,8 +613,8 @@ const It = ({
614
613
  }, A = async () => {
615
614
  h && Number(S) > 0 && (await o(h, Number(S), n.guid), u(!1), p(!1), _(void 0));
616
615
  };
617
- return /* @__PURE__ */ m(Y, { children: [
618
- /* @__PURE__ */ e(ee, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(te, { onClick: y, children: /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
616
+ return /* @__PURE__ */ m(X, { children: [
617
+ /* @__PURE__ */ e(te, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(oe, { onClick: y, children: /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
619
618
  /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", gap: 8, children: [
620
619
  /* @__PURE__ */ e(z, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
621
620
  /* @__PURE__ */ e(C, { bold: !0, sx: { color: "primary.light" }, variant: "body1", children: c.add_sub_budget_button })
@@ -630,7 +629,7 @@ const It = ({
630
629
  isOpen: r,
631
630
  onClose: () => p(!1),
632
631
  title: c.add_sub_budget_title,
633
- children: /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(rt, { category: t, subCategories: t.subCategories }) })
632
+ children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(at, { category: t, subCategories: t.subCategories }) })
634
633
  }
635
634
  ),
636
635
  /* @__PURE__ */ e(
@@ -653,8 +652,8 @@ const It = ({
653
652
  }
654
653
  )
655
654
  ] });
656
- }), kt = I(({ budget: t }) => {
657
- const { category: n, subBudgets: c } = t, { budgets: i, common: a } = E(), { deleteBudget: s, selectedSubBudget: o, setSelectedSubBudget: r, updateBudget: p } = w(), { filter: d, setFilter: u } = Q(), [S, g] = l.useState(!1), [h, _] = l.useState(!1), [y, A] = l.useState("");
655
+ }), Nt = I(({ budget: t }) => {
656
+ const { category: n, subBudgets: c } = t, { budgets: i, common: a } = E(), { deleteBudget: s, selectedSubBudget: o, setSelectedSubBudget: r, updateBudget: p } = w(), { filter: d, setFilter: u } = ee(), [S, g] = l.useState(!1), [h, _] = l.useState(!1), [y, A] = l.useState("");
658
657
  l.useEffect(() => {
659
658
  o && (A(`${o.amount}`), u({
660
659
  ...d,
@@ -675,12 +674,12 @@ const It = ({
675
674
  }), r(void 0);
676
675
  };
677
676
  return /* @__PURE__ */ m(l.Fragment, { children: [
678
- /* @__PURE__ */ m(X, { sx: { bgcolor: "background.paper" }, children: [
679
- c.length === 0 ? /* @__PURE__ */ e(Rt, {}) : c.map((f) => /* @__PURE__ */ m(l.Fragment, { children: [
680
- /* @__PURE__ */ e(Lt, { budget: f }),
677
+ /* @__PURE__ */ m(Z, { sx: { bgcolor: "background.paper" }, children: [
678
+ c.length === 0 ? /* @__PURE__ */ e(Mt, {}) : c.map((f) => /* @__PURE__ */ m(l.Fragment, { children: [
679
+ /* @__PURE__ */ e(Rt, { budget: f }),
681
680
  /* @__PURE__ */ e(ue, {})
682
681
  ] }, f.guid)),
683
- /* @__PURE__ */ e(Nt, { category: n, parentBudget: t })
682
+ /* @__PURE__ */ e(Lt, { category: n, parentBudget: t })
684
683
  ] }),
685
684
  /* @__PURE__ */ e(
686
685
  $,
@@ -694,7 +693,7 @@ const It = ({
694
693
  secondaryText: i.details_delete_button,
695
694
  title: i.details_title,
696
695
  children: o && /* @__PURE__ */ m(x, { gap: 24, children: [
697
- /* @__PURE__ */ e(Ve, { budget: o }),
696
+ /* @__PURE__ */ e(He, { budget: o }),
698
697
  /* @__PURE__ */ e(ve, { height: "100%" })
699
698
  ] })
700
699
  }
@@ -734,24 +733,24 @@ const It = ({
734
733
  )
735
734
  ] })
736
735
  ] });
737
- }), $t = I(({ budget: t }) => {
736
+ }), kt = I(({ budget: t }) => {
738
737
  const { is_mobile_webview: n } = Ne(), { setAlert: c } = w(), { budgets: i, common: a, transactions: s } = E(), { isDesktop: o, isSmallTablet: r, isTablet: p } = ge(), {
739
738
  sortedTransactions: d,
740
739
  sortedTransactionsWithSplits: u,
741
740
  tags: S
742
- } = Q(), [g, h] = l.useState(0), [_, y] = l.useState(""), A = l.useMemo(
741
+ } = ee(), [g, h] = l.useState(0), [_, y] = l.useState(""), A = l.useMemo(
743
742
  () => d.find((f) => f.guid === _),
744
743
  [_, d]
745
744
  ), v = (f, T) => {
746
745
  h(T);
747
746
  }, b = () => {
748
- tt(u, S), c(i.alert_csv_downloaded);
747
+ et(u, S), c(i.alert_csv_downloaded);
749
748
  }, B = d.length > 0 && !n && (o || p && !r);
750
749
  return /* @__PURE__ */ m(x, { gap: 24, children: [
751
- /* @__PURE__ */ e(Ve, { budget: t }),
750
+ /* @__PURE__ */ e(He, { budget: t }),
752
751
  /* @__PURE__ */ m(x, { children: [
753
752
  /* @__PURE__ */ m(
754
- et,
753
+ Qe,
755
754
  {
756
755
  onChange: v,
757
756
  sx: { width: "100%" },
@@ -776,7 +775,7 @@ const It = ({
776
775
  ) }),
777
776
  /* @__PURE__ */ e(ve, { height: "100%", onClick: y })
778
777
  ] }),
779
- g === 1 && /* @__PURE__ */ e(kt, { budget: t }),
778
+ g === 1 && /* @__PURE__ */ e(Nt, { budget: t }),
780
779
  /* @__PURE__ */ e(
781
780
  $,
782
781
  {
@@ -784,13 +783,13 @@ const It = ({
784
783
  isOpen: !!A,
785
784
  onClose: () => y(""),
786
785
  title: i.details_transaction_drawer,
787
- children: A && /* @__PURE__ */ e(ot, { transaction: A })
786
+ children: A && /* @__PURE__ */ e(tt, { transaction: A })
788
787
  }
789
788
  )
790
789
  ] })
791
790
  ] });
792
- }), Gt = I(() => {
793
- const { selectedAccountGuids: t } = J(), { budgets: n, common: c } = E(), {
791
+ }), $t = I(() => {
792
+ const { selectedAccountGuids: t } = Q(), { budgets: n, common: c } = E(), {
794
793
  alert: i,
795
794
  dateRange: a,
796
795
  deleteBudget: s,
@@ -799,7 +798,7 @@ const It = ({
799
798
  setAlert: p,
800
799
  setSelectedBudget: d,
801
800
  updateBudget: u
802
- } = w(), { setFilter: S } = Q(), [g, h] = l.useState(!1), [_, y] = l.useState(!1), [A, v] = l.useState(!1), [b, B] = l.useState("");
801
+ } = w(), { setFilter: S } = ee(), [g, h] = l.useState(!1), [_, y] = l.useState(!1), [A, v] = l.useState(!1), [b, B] = l.useState("");
803
802
  l.useEffect(() => {
804
803
  o && !r && (B(`${o.amount}`), h(!0), S({
805
804
  accounts: t,
@@ -838,7 +837,7 @@ const It = ({
838
837
  secondaryText: n.details_delete_button,
839
838
  title: n.details_title,
840
839
  children: [
841
- /* @__PURE__ */ e($t, { budget: o }),
840
+ /* @__PURE__ */ e(kt, { budget: o }),
842
841
  /* @__PURE__ */ e(
843
842
  xe,
844
843
  {
@@ -886,7 +885,7 @@ const It = ({
886
885
  }
887
886
  )
888
887
  ] });
889
- }), Pt = ({ budget: t, onClick: n }) => {
888
+ }), Gt = ({ budget: t, onClick: n }) => {
890
889
  const {
891
890
  amount: c,
892
891
  budgetColors: { background: i, description: a },
@@ -896,10 +895,10 @@ const It = ({
896
895
  subBudgets: p,
897
896
  transaction_total: d
898
897
  } = t, u = r > 100;
899
- return /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { onClick: () => n?.(t), children: [
900
- /* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: i, percent: r, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: s, variant: "basic" }) }) }),
898
+ return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => n?.(t), children: [
899
+ /* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ge, { color: i, percent: r, size: 40, children: /* @__PURE__ */ e(V, { categoryGuid: s, variant: "basic" }) }) }),
901
900
  /* @__PURE__ */ e(
902
- oe,
901
+ ne,
903
902
  {
904
903
  primary: /* @__PURE__ */ m(x, { component: "span", direction: "row", justifyContent: "space-between", children: [
905
904
  /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }),
@@ -930,22 +929,22 @@ const It = ({
930
929
  }
931
930
  )
932
931
  ] }) });
933
- }, jt = I(() => {
934
- const { onEvent: t } = q(), { budgets: n } = E(), { detailedBudgets: c, setSelectedBudget: i } = w(), a = (s) => {
932
+ }, Pt = I(() => {
933
+ const { onEvent: t } = J(), { budgets: n } = E(), { detailedBudgets: c, setSelectedBudget: i } = w(), a = (s) => {
935
934
  i(s), t(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
936
935
  budget_category: s.category.name,
937
936
  click_type: "list"
938
937
  });
939
938
  };
940
939
  return /* @__PURE__ */ m(Te, { elevation: 2, children: [
941
- /* @__PURE__ */ e(je, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: n.budget_categories_title }) }),
942
- /* @__PURE__ */ e(De, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(X, { children: c.map((s) => /* @__PURE__ */ m(l.Fragment, { children: [
943
- /* @__PURE__ */ e(Pt, { budget: s, onClick: a }),
940
+ /* @__PURE__ */ e(Pe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: n.budget_categories_title }) }),
941
+ /* @__PURE__ */ e(De, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(Z, { children: c.map((s) => /* @__PURE__ */ m(l.Fragment, { children: [
942
+ /* @__PURE__ */ e(Gt, { budget: s, onClick: a }),
944
943
  /* @__PURE__ */ e(ue, {})
945
944
  ] }, s.guid)) }) })
946
945
  ] });
947
- }), zt = I(() => {
948
- const t = ce(), { onEvent: n } = q(), { visibleAccounts: c } = ke(), { budgets: i, common: a, recurring: s } = E(), { incomeCategories: o, spendCategories: r } = Z(), { detailedBudgets: p, totalBudgeted: d } = w(), { incomeTotal: u } = le(), { setFilter: S } = Q(), [g, h] = l.useState(!1), [_, y] = l.useMemo(() => {
946
+ }), jt = I(() => {
947
+ const t = H(), { onEvent: n } = J(), { visibleAccounts: c } = ke(), { budgets: i, common: a, recurring: s } = E(), { incomeCategories: o, spendCategories: r } = q(), { detailedBudgets: p, totalBudgeted: d } = w(), { incomeTotal: u } = le(), { setFilter: S } = ee(), [g, h] = l.useState(!1), [_, y] = l.useMemo(() => {
949
948
  const B = r.reduce((M, N) => M + N.totalAmount, 0);
950
949
  let f = B / d;
951
950
  f > 1 && (f = 1);
@@ -975,13 +974,13 @@ const It = ({
975
974
  S({
976
975
  accounts: c.map((B) => B.guid),
977
976
  dateRange: {
978
- start: st(/* @__PURE__ */ new Date(), 90),
977
+ start: rt(/* @__PURE__ */ new Date(), 90),
979
978
  end: /* @__PURE__ */ new Date()
980
979
  }
981
980
  }), h(!0), n(P.BUDGETS_CLICK_EDIT_INCOME);
982
981
  };
983
982
  return /* @__PURE__ */ m(Te, { elevation: 2, sx: { overflow: "visible" }, children: [
984
- /* @__PURE__ */ e(je, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: i.overview_title }) }),
983
+ /* @__PURE__ */ e(Pe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: i.overview_title }) }),
985
984
  /* @__PURE__ */ e(De, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(x, { gap: 24, children: [
986
985
  /* @__PURE__ */ m(x, { gap: 8, children: [
987
986
  /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 8 }, variant: "body1", children: i.spending_title }),
@@ -996,7 +995,7 @@ const It = ({
996
995
  /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
997
996
  /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: i.income_title }),
998
997
  /* @__PURE__ */ e(
999
- it,
998
+ st,
1000
999
  {
1001
1000
  "aria-label": s.manage_income,
1002
1001
  onClick: b,
@@ -1020,13 +1019,13 @@ const It = ({
1020
1019
  isOpen: g,
1021
1020
  onClose: () => h(!1),
1022
1021
  title: s.manage_income,
1023
- children: /* @__PURE__ */ e(ct, { forOverview: !0 })
1022
+ children: /* @__PURE__ */ e(it, { forOverview: !0 })
1024
1023
  }
1025
1024
  )
1026
1025
  ] });
1027
- }), Re = 480, Ho = I(
1026
+ }), Re = 480, Uo = I(
1028
1027
  ({ onBackClick: t, onMenuClick: n, sx: c }) => {
1029
- const i = ce(), { onEvent: a } = q(), { visibleAccounts: s } = ke(), { budgets: o, common: r } = E(), { isInitialized: p, selectedAccounts: d, setDisplayedDate: u } = J(), {
1028
+ const i = H(), { onEvent: a } = J(), { visibleAccounts: s } = ke(), { budgets: o, common: r } = E(), { isInitialized: p, selectedAccounts: d, setDisplayedDate: u } = Q(), {
1030
1029
  alert: S,
1031
1030
  dateRange: g,
1032
1031
  isDataLoaded: h,
@@ -1035,43 +1034,43 @@ const It = ({
1035
1034
  setAlert: A,
1036
1035
  setTheme: v,
1037
1036
  detailedBudgets: b
1038
- } = w(), { setDateRange: B } = le(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: T } = Z(), { isSmallTablet: L, isMobile: M, isSmallMobile: N } = ge(), k = L || M || N, [G, F] = l.useState(!1);
1039
- ze({
1037
+ } = w(), { setDateRange: B } = le(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: T } = q(), { isSmallTablet: L, isMobile: M, isSmallMobile: N } = ge(), k = L || M || N, [G, F] = l.useState(!1);
1038
+ je({
1040
1039
  widgetName: "BubbleBudgetsWidget",
1041
1040
  isLoaded: h
1042
1041
  }), l.useEffect(() => {
1043
1042
  v(i), h || _().finally(() => {
1044
1043
  a(P.BUDGETS_VIEW);
1045
1044
  });
1046
- }, []), l.useEffect(() => (y({ start: se(ae()), end: Be(ae()) }), () => {
1047
- y({ start: se(ae()), end: Be(ae()) });
1045
+ }, []), l.useEffect(() => (y({ start: ie(re()), end: Be(re()) }), () => {
1046
+ y({ start: ie(re()), end: Be(re()) });
1048
1047
  }), [s]), l.useEffect(() => {
1049
1048
  p && (u(g.start, g.end), f(d, g.start, g.end).finally(), T(d).finally(), B(g));
1050
1049
  }, [p, d, g]);
1051
- const be = (K) => {
1052
- y({ start: K[0] || /* @__PURE__ */ new Date(), end: K[1] || /* @__PURE__ */ new Date() });
1050
+ const be = (Y) => {
1051
+ y({ start: Y[0] || /* @__PURE__ */ new Date(), end: Y[1] || /* @__PURE__ */ new Date() });
1053
1052
  }, fe = () => {
1054
1053
  a(P.BUDGETS_CLICK_FILTER);
1055
- }, ne = () => {
1054
+ }, ae = () => {
1056
1055
  F(!0), a(P.BUDGETS_CLICK_ADD);
1057
1056
  }, ye = () => {
1058
1057
  F(!1);
1059
1058
  }, j = () => {
1060
1059
  F(!1);
1061
- }, V = Ye(g.end, se(/* @__PURE__ */ new Date()));
1060
+ }, K = Ke(g.end, ie(/* @__PURE__ */ new Date()));
1062
1061
  return !p || !h ? /* @__PURE__ */ e(pe, {}) : /* @__PURE__ */ m(
1063
- lt,
1062
+ ct,
1064
1063
  {
1065
1064
  actions: [
1066
1065
  {
1067
1066
  iconName: "add",
1068
1067
  label: o.add_title,
1069
- onClick: ne
1068
+ onClick: ae
1070
1069
  }
1071
1070
  ],
1072
1071
  calendarActions: {
1073
1072
  onRangeChanged: be,
1074
- shouldDisableNext: V,
1073
+ shouldDisableNext: K,
1075
1074
  shouldDisablePicker: !0
1076
1075
  },
1077
1076
  hasDivider: !0,
@@ -1090,9 +1089,9 @@ const It = ({
1090
1089
  width: "100%",
1091
1090
  children: [
1092
1091
  /* @__PURE__ */ e(x, { height: k ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1093
- He,
1092
+ We,
1094
1093
  {
1095
- createBudgetOnClick: ne,
1094
+ createBudgetOnClick: ae,
1096
1095
  height: k ? 450 : 800,
1097
1096
  isDraggable: !0,
1098
1097
  shouldShowZeroState: b.length === 0,
@@ -1107,15 +1106,15 @@ const It = ({
1107
1106
  sx: { mr: 24, mt: 48 },
1108
1107
  width: k ? "100%" : Re,
1109
1108
  children: [
1110
- /* @__PURE__ */ e(zt, {}),
1111
- /* @__PURE__ */ e(jt, {})
1109
+ /* @__PURE__ */ e(jt, {}),
1110
+ /* @__PURE__ */ e(Pt, {})
1112
1111
  ]
1113
1112
  }
1114
1113
  )
1115
1114
  ]
1116
1115
  }
1117
1116
  ),
1118
- /* @__PURE__ */ e(Gt, {}),
1117
+ /* @__PURE__ */ e($t, {}),
1119
1118
  /* @__PURE__ */ e(
1120
1119
  $,
1121
1120
  {
@@ -1124,7 +1123,7 @@ const It = ({
1124
1123
  onClose: () => F(!1),
1125
1124
  title: o.add_new_title,
1126
1125
  children: /* @__PURE__ */ e(
1127
- Fe,
1126
+ ze,
1128
1127
  {
1129
1128
  onAddBudget: ye,
1130
1129
  onRecalculateBudgets: j
@@ -1159,7 +1158,7 @@ const It = ({
1159
1158
  }
1160
1159
  );
1161
1160
  }
1162
- ), Ft = ({
1161
+ ), zt = ({
1163
1162
  budgetsCopy: t,
1164
1163
  difference: n,
1165
1164
  handleAddClick: c,
@@ -1175,7 +1174,7 @@ const It = ({
1175
1174
  }, [a]);
1176
1175
  return /* @__PURE__ */ m(x, { sx: { height: "100%", justifyContent: "space-between" }, children: [
1177
1176
  /* @__PURE__ */ e(
1178
- He,
1177
+ We,
1179
1178
  {
1180
1179
  createBudgetOnClick: c,
1181
1180
  height: o,
@@ -1183,13 +1182,13 @@ const It = ({
1183
1182
  shouldShowZeroState: i
1184
1183
  }
1185
1184
  ),
1186
- !i && /* @__PURE__ */ m(Y, { ml: 16, children: [
1185
+ !i && /* @__PURE__ */ m(X, { ml: 16, children: [
1187
1186
  /* @__PURE__ */ e(C, { bold: !0, color: n < 0 ? "error.main" : "success.main", children: D(Math.abs(n), "0,0") }),
1188
1187
  /* @__PURE__ */ e(C, { children: n < 0 ? t.overspent_in_budgets : t.left_in_budgets })
1189
1188
  ] })
1190
1189
  ] });
1191
- }, Ut = (t) => {
1192
- const n = ce(), { onEvent: c } = q(), { detailedBudgets: i, isDataLoaded: a, loadBudgetData: s, setTheme: o } = w(), { budgets: r, common: p } = E(), { isInitialized: d, selectedAccounts: u } = J(), { loadDateRangeCategoryTotals: S, loadMonthlyCategoryTotals: g } = Z(), h = dt(i), [_, y] = l.useState(!1);
1190
+ }, Ft = (t) => {
1191
+ const n = H(), { onEvent: c } = J(), { detailedBudgets: i, isDataLoaded: a, loadBudgetData: s, setTheme: o } = w(), { budgets: r, common: p } = E(), { isInitialized: d, selectedAccounts: u } = Q(), { loadDateRangeCategoryTotals: S, loadMonthlyCategoryTotals: g } = q(), h = lt(i), [_, y] = l.useState(!1);
1193
1192
  l.useEffect(() => {
1194
1193
  a || s().finally();
1195
1194
  }, []), l.useEffect(() => {
@@ -1197,7 +1196,7 @@ const It = ({
1197
1196
  }, [n]), l.useEffect(() => {
1198
1197
  d && !a && (S(
1199
1198
  u,
1200
- se(/* @__PURE__ */ new Date()),
1199
+ ie(/* @__PURE__ */ new Date()),
1201
1200
  Be(/* @__PURE__ */ new Date())
1202
1201
  ).finally(), g(u).finally());
1203
1202
  }, [d, u, a]);
@@ -1206,13 +1205,13 @@ const It = ({
1206
1205
  }, v = () => {
1207
1206
  y(!1);
1208
1207
  }, b = () => y(!1);
1209
- if (ze({
1208
+ if (je({
1210
1209
  widgetName: "BubbleBudgetsMiniWidget",
1211
1210
  isLoaded: a
1212
1211
  }), !d || !a) return /* @__PURE__ */ e(pe, {});
1213
1212
  const B = i.length === 0;
1214
1213
  return /* @__PURE__ */ m(
1215
- mt,
1214
+ ut,
1216
1215
  {
1217
1216
  contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
1218
1217
  primaryCtaLabel: B ? r.get_started_cta : r.details_cta,
@@ -1222,7 +1221,7 @@ const It = ({
1222
1221
  ...t,
1223
1222
  children: [
1224
1223
  /* @__PURE__ */ e(
1225
- Ft,
1224
+ zt,
1226
1225
  {
1227
1226
  budgetsCopy: r,
1228
1227
  difference: h,
@@ -1238,7 +1237,7 @@ const It = ({
1238
1237
  onClose: () => y(!1),
1239
1238
  title: r.add_new_title,
1240
1239
  children: /* @__PURE__ */ e(
1241
- Fe,
1240
+ ze,
1242
1241
  {
1243
1242
  onAddBudget: v,
1244
1243
  onRecalculateBudgets: b
@@ -1249,12 +1248,12 @@ const It = ({
1249
1248
  ]
1250
1249
  }
1251
1250
  );
1252
- }, Vo = I(Ut), re = {
1251
+ }, Wo = I(Ft), se = {
1253
1252
  CANCEL_DELETE: "Cancel - Delete",
1254
1253
  END_SAVE: "End - Save",
1255
1254
  END_DELETE: "End - Delete",
1256
1255
  START_DELETE: "Start - Delete"
1257
- }, Wt = ({
1256
+ }, Ut = ({
1258
1257
  onClose: t,
1259
1258
  onEvent: n,
1260
1259
  onViewHistory: c,
@@ -1269,14 +1268,14 @@ const It = ({
1269
1268
  setAlert: d,
1270
1269
  setSelectedBudget: u,
1271
1270
  updateBudget: S
1272
- } = w(), { budgets: g, common: h } = E(), { isCopyLoaded: _, selectedAccountGuids: y } = J(), A = Ge(), { setFilter: v } = Q(), [b, B] = l.useState(""), [f, T] = l.useState(null), [L, M] = l.useState(!1), N = l.useRef(!1);
1271
+ } = w(), { budgets: g, common: h } = E(), { isCopyLoaded: _, selectedAccountGuids: y } = Q(), A = H(), { setFilter: v } = ee(), [b, B] = l.useState(""), [f, T] = l.useState(null), [L, M] = l.useState(!1), N = l.useRef(!1);
1273
1272
  if (l.useEffect(() => {
1274
1273
  !r || p || (B(`${r.amount}`), v({
1275
1274
  accounts: y,
1276
1275
  dateRange: s,
1277
- custom: ({ category_guid: j, top_level_category_guid: V }) => {
1278
- const { category_guid: K } = r;
1279
- return j === K || V === K;
1276
+ custom: ({ category_guid: j, top_level_category_guid: K }) => {
1277
+ const { category_guid: Y } = r;
1278
+ return j === Y || K === Y;
1280
1279
  }
1281
1280
  }), M(!0));
1282
1281
  }, [r]), !_) return /* @__PURE__ */ e(pe, {});
@@ -1286,22 +1285,22 @@ const It = ({
1286
1285
  u(void 0), t?.();
1287
1286
  }, 250);
1288
1287
  }, G = () => {
1289
- f === "delete" && n?.(re.CANCEL_DELETE, b), B(r.amount ? `${r.amount}` : ""), T(null);
1288
+ f === "delete" && n?.(se.CANCEL_DELETE, b), B(r.amount ? `${r.amount}` : ""), T(null);
1290
1289
  }, F = async () => {
1291
1290
  if (f === "edit") {
1292
1291
  if (N.current) return;
1293
1292
  N.current = !0, await S({
1294
1293
  ...r,
1295
1294
  amount: Number(b)
1296
- }), n?.(re.END_SAVE, b), d(
1295
+ }), n?.(se.END_SAVE, b), d(
1297
1296
  R(g.alert_budget_updated, r.category.name)
1298
1297
  ), T(null), N.current = !1;
1299
1298
  }
1300
- f === "delete" && (await o(r.guid), n?.(re.END_DELETE, b), k());
1301
- }, { remainingAmount: be, spentPercentage: fe, iconColor: ne } = ut(
1299
+ f === "delete" && (await o(r.guid), n?.(se.END_DELETE, b), k());
1300
+ }, { remainingAmount: be, spentPercentage: fe, iconColor: ae } = dt(
1302
1301
  r.transaction_total ?? 0,
1303
1302
  r.amount ?? 0
1304
- ), ye = (j, V) => R(j, /* @__PURE__ */ e("b", { children: V }));
1303
+ ), ye = (j, K) => R(j, /* @__PURE__ */ e("b", { children: K }));
1305
1304
  return /* @__PURE__ */ m(l.Fragment, { children: [
1306
1305
  /* @__PURE__ */ m(
1307
1306
  $,
@@ -1318,7 +1317,7 @@ const It = ({
1318
1317
  /* EDIT */
1319
1318
  ),
1320
1319
  onSecondaryAction: () => {
1321
- n?.(re.START_DELETE, b), T(
1320
+ n?.(se.START_DELETE, b), T(
1322
1321
  "delete"
1323
1322
  /* DELETE */
1324
1323
  );
@@ -1334,22 +1333,22 @@ const It = ({
1334
1333
  title: R(g.details_type_title, r.category.name),
1335
1334
  children: [
1336
1335
  /* @__PURE__ */ e(
1337
- nt,
1336
+ ot,
1338
1337
  {
1339
1338
  amount: r.amount,
1340
1339
  icon: /* @__PURE__ */ e(
1341
- H,
1340
+ V,
1342
1341
  {
1343
1342
  categoryGuid: r.category.guid,
1344
1343
  size: 44,
1345
1344
  sx: {
1346
- bgcolor: Qe(we(r.category.guid, A), 0.15),
1345
+ bgcolor: Ye(we(r.category.guid, A), 0.15),
1347
1346
  border: `1px solid ${we(r.category.guid, A)}`,
1348
1347
  color: "text.primary"
1349
1348
  }
1350
1349
  }
1351
1350
  ),
1352
- iconColor: ne,
1351
+ iconColor: ae,
1353
1352
  onViewHistory: c,
1354
1353
  remainingAmount: be,
1355
1354
  spentPercentage: fe,
@@ -1372,7 +1371,7 @@ const It = ({
1372
1371
  }
1373
1372
  ),
1374
1373
  f && /* @__PURE__ */ e(
1375
- gt,
1374
+ mt,
1376
1375
  {
1377
1376
  closeAriaLabel: h.close_aria,
1378
1377
  content: ye(
@@ -1394,9 +1393,9 @@ const It = ({
1394
1393
  }
1395
1394
  )
1396
1395
  ] });
1397
- }, Ko = I(Wt);
1396
+ }, Ho = I(Ut);
1398
1397
  export {
1399
- Vo as BubbleBudgetsMiniWidget,
1400
- Ho as BubbleBudgetsWidget,
1401
- Ko as BudgetDetailsDrawerV2
1398
+ Wo as BubbleBudgetsMiniWidget,
1399
+ Uo as BubbleBudgetsWidget,
1400
+ Ho as BudgetDetailsDrawerV2
1402
1401
  };