@mx-cartographer/experiences 7.0.52-alpha.mega5 → 7.0.52-alpha.mega7

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.
@@ -1,133 +1,265 @@
1
- import { jsx as e, jsxs as m, Fragment as Ge } from "react/jsx-runtime";
1
+ import { jsxs as u, jsx as e, Fragment as je } from "react/jsx-runtime";
2
2
  import l from "react";
3
3
  import { observer as I } from "mobx-react-lite";
4
- import { endOfMonth as de } from "date-fns/endOfMonth";
4
+ import { endOfMonth as ue } from "date-fns/endOfMonth";
5
5
  import { startOfMonth as q } from "date-fns/startOfMonth";
6
6
  import F from "@mui/material/Box";
7
- import B from "@mui/material/Stack";
8
- import J from "@mui/material/styles/useTheme";
9
- import { Icon as P, Text as f, CategoryIcon as W, H1 as je, H3 as Be } from "@mxenabled/mxui";
10
- import { u as ze } from "../BudgetUtil-2EncZLBQ.mjs";
11
- import { C as Ue } from "../ConnectionsDrawer-BprLSCBH.mjs";
12
- import * as O from "d3";
13
- import Fe from "@mui/material/Tooltip";
14
- import { a as Q, i as w, m as z, u as D, g as H, b as ee, p as We, j as te, h as ne, d as ve } from "../hooks-CE2TKk4a.mjs";
15
- import { L as G } from "../Loader-DUaFpDGv.mjs";
16
- import { E as ce } from "../EmptyState-BYvgSeMz.mjs";
17
- import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
18
- import { A as L, W as He } from "../WidgetContainer-hsbxZmZB.mjs";
19
- import X from "@mui/material/List";
7
+ import C from "@mui/material/Stack";
8
+ import Q from "@mui/material/styles/useTheme";
9
+ import { Text as y, CategoryIcon as H, Icon as N, H1 as ze, H3 as xe } from "@mxenabled/mxui";
10
+ import W from "@mui/material/List";
11
+ import { u as w, i as D, j as ee, m as j, p as te, g as X, b as ne, h as oe, a as Ue, d as Ae } from "../hooks-CE2TKk4a.mjs";
20
12
  import { f as T } from "../NumberFormatting-CtWHhyBX.mjs";
21
- import xe from "@mui/material/Button";
22
- import oe from "@mui/material/Divider";
13
+ import ve from "@mui/material/Button";
14
+ import ae from "@mui/material/Divider";
23
15
  import K from "@mui/material/ListItem";
24
- import ae from "@mui/material/ListItemAvatar";
16
+ import re from "@mui/material/ListItemAvatar";
25
17
  import V from "@mui/material/ListItemButton";
26
18
  import Y from "@mui/material/ListItemText";
27
- import { b as R } from "../Localization-2MODESHW.mjs";
19
+ import { b as M } from "../Localization-2MODESHW.mjs";
28
20
  import { D as k } from "../Drawer-kEE73B87.mjs";
29
- import Xe from "@mui/material/ListItemSecondaryAction";
30
- import { C as Ke } from "../CurrencyInput-CRtdzs3o.mjs";
31
- import { a as j } from "../Dialog-CWW597AF.mjs";
32
- import { M as Ve } from "../MiniWidgetContainer-CldJb_TI.mjs";
33
- import { isAfter as Ye } from "date-fns/isAfter";
21
+ import Fe from "@mui/material/ListItemSecondaryAction";
22
+ import { C as He } from "../CurrencyInput-CRtdzs3o.mjs";
23
+ import { a as $ } from "../Dialog-CWW597AF.mjs";
24
+ import { C as We } from "../ConnectionsDrawer-BprLSCBH.mjs";
25
+ import * as O from "d3";
26
+ import Xe from "@mui/material/Tooltip";
27
+ import { L as G } from "../Loader-DUaFpDGv.mjs";
28
+ import { E as le } from "../EmptyState-Cu00ZWJL.mjs";
29
+ import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
30
+ import { A as L, W as Ke } from "../WidgetContainer-hsbxZmZB.mjs";
31
+ import { u as Ve } from "../BudgetUtil-2EncZLBQ.mjs";
32
+ import { M as Ye } from "../MiniWidgetContainer-DTQdRK-3.mjs";
33
+ import { isAfter as Ze } from "date-fns/isAfter";
34
34
  import { startOfToday as Z } from "date-fns/startOfToday";
35
- import Ze from "@mui/material/Alert";
36
- import qe from "@mui/material/Snackbar";
35
+ import qe from "@mui/material/Alert";
36
+ import Je from "@mui/material/Snackbar";
37
37
  import ye from "@mui/material/Tab";
38
- import Je from "@mui/material/Tabs";
39
- import { e as Qe } from "../exportTransactionsToCSV-D8TTNrrE.mjs";
40
- import { T as Ae, a as et } from "../TransactionDetails-Cl8xcpbh.mjs";
38
+ import Qe from "@mui/material/Tabs";
39
+ import { e as et } from "../exportTransactionsToCSV-D8TTNrrE.mjs";
40
+ import { T as Te, a as tt } from "../TransactionDetails-Cl8xcpbh.mjs";
41
41
  import pe from "@mui/material/Card";
42
42
  import he from "@mui/material/CardContent";
43
- import { S as ue } from "../StatusBar-BK_uYHAB.mjs";
44
- import { S as Te } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
- import { u as tt, b as nt } from "../CategorySelectorDrawer-BmenK5bu.mjs";
46
- import we from "@mui/material/CardHeader";
47
- import { subDays as ot } from "date-fns/subDays";
48
- import at from "@mui/material/IconButton";
49
- import { M as rt } from "../ManageIncome-clecqBHm.mjs";
50
- const be = 5, De = 100, me = 25, st = (t) => {
51
- const n = (a) => {
52
- a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
53
- }, i = (a) => {
54
- a.subject.fx = a.x, a.subject.fy = a.y;
55
- }, s = (a) => {
56
- a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
43
+ import { S as me } from "../StatusBar-BK_uYHAB.mjs";
44
+ import { S as we } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
+ import { u as nt, b as ot } from "../CategorySelectorDrawer-BmenK5bu.mjs";
46
+ import De from "@mui/material/CardHeader";
47
+ import { subDays as at } from "date-fns/subDays";
48
+ import rt from "@mui/material/IconButton";
49
+ import { M as st } from "../ManageIncome-clecqBHm.mjs";
50
+ const it = I(() => {
51
+ const { budgets: t } = w(), { totalBudgeted: a } = D(), { incomeTotal: i } = ee(), s = i - a;
52
+ return /* @__PURE__ */ u(C, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
53
+ /* @__PURE__ */ u(C, { alignItems: "center", children: [
54
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(i, "0,0") }),
55
+ /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.projected_income })
56
+ ] }),
57
+ /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
58
+ /* @__PURE__ */ u(C, { alignItems: "center", children: [
59
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(a, "0,0") }),
60
+ /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.budgeted })
61
+ ] }),
62
+ /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
63
+ /* @__PURE__ */ u(C, { alignItems: "center", children: [
64
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(s, "0,0") }),
65
+ /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.remaining })
66
+ ] })
67
+ ] });
68
+ }), ct = I(
69
+ ({ category: t }) => {
70
+ const { budgets: a } = w(), { budgets: i } = D(), s = l.useMemo(() => {
71
+ const n = i.find((c) => c.category_guid === t.guid), o = T(t.totalAverageAmount, "0,0"), r = n ? M(a.recalculate_previous_budget, T(n.amount, "0,0")) : a.recalculate_new_budget;
72
+ return `${o} - ${r}`;
73
+ }, [a, i]);
74
+ return /* @__PURE__ */ u(l.Fragment, { children: [
75
+ /* @__PURE__ */ e(K, { children: /* @__PURE__ */ u(V, { children: [
76
+ /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid, variant: "filled" }) }),
77
+ /* @__PURE__ */ e(Y, { primary: t.name, secondary: s })
78
+ ] }) }),
79
+ /* @__PURE__ */ e(ae, {})
80
+ ] }, t.guid);
81
+ }
82
+ ), lt = ({ onRecalculateBudgets: t }) => {
83
+ const { budgets: a, common: i } = w(), { spendCategories: s } = j(), { recalculateBudgets: n, setAlert: o } = D(), [r, c] = l.useState(!1), m = s.filter((d) => d.totalAverageAmount > 0), g = async () => {
84
+ await n(m), c(!1), o(a.alert_recalculated_budgets), t?.();
85
+ };
86
+ return /* @__PURE__ */ u(l.Fragment, { children: [
87
+ /* @__PURE__ */ e(ve, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: a.recalculate_button }),
88
+ /* @__PURE__ */ e(y, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: a.recalculate_help }),
89
+ /* @__PURE__ */ e(
90
+ k,
91
+ {
92
+ ariaLabelClose: i.close_aria,
93
+ isOpen: r,
94
+ onClose: () => c(!1),
95
+ onPrimaryAction: g,
96
+ title: a.recalculate_title,
97
+ children: /* @__PURE__ */ u(C, { children: [
98
+ /* @__PURE__ */ u(C, { mx: 24, my: 16, children: [
99
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: a.recalculate_description_top }),
100
+ /* @__PURE__ */ e(y, { variant: "ParagraphSmall", children: a.recalculate_description_bottom })
101
+ ] }),
102
+ /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(W, { children: m.map((d) => /* @__PURE__ */ e(ct, { category: d }, d.guid)) }) })
103
+ ] })
104
+ }
105
+ )
106
+ ] });
107
+ }, se = ({
108
+ amount: t,
109
+ categoryName: a,
110
+ onAmountChanged: i
111
+ }) => {
112
+ const { budgets: s } = w(), { totalBudgeted: n } = D(), { incomeTotal: o } = ee(), r = o - n;
113
+ return /* @__PURE__ */ u(C, { gap: 16, children: [
114
+ /* @__PURE__ */ u(C, { children: [
115
+ /* @__PURE__ */ e(y, { children: M(
116
+ s.add_description_top,
117
+ T(r, "0,0")
118
+ ) }),
119
+ /* @__PURE__ */ e(y, { children: M(s.add_description_bottom, a) })
120
+ ] }),
121
+ /* @__PURE__ */ e(
122
+ He,
123
+ {
124
+ amount: t,
125
+ autoFocus: !0,
126
+ label: s.add_label,
127
+ minAmount: 0,
128
+ setAmount: i,
129
+ sx: { ".MuiTypography-Body": { p: 0 } }
130
+ }
131
+ )
132
+ ] });
133
+ }, dt = I(({ category: t, onAddBudget: a }) => {
134
+ const { budgets: i, common: s } = w(), [n, o] = l.useState(!1), [r, c] = l.useState(
135
+ `${t.totalAmount === 0 ? "" : t.totalAmount}`
136
+ );
137
+ return /* @__PURE__ */ u(l.Fragment, { children: [
138
+ /* @__PURE__ */ e(K, { children: /* @__PURE__ */ u(V, { onClick: () => o(!0), children: [
139
+ /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid }) }),
140
+ /* @__PURE__ */ e(
141
+ Y,
142
+ {
143
+ primary: t.name,
144
+ secondary: T(t.totalAmount, "0,0")
145
+ }
146
+ ),
147
+ /* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ e(N, { name: "add", size: 20 }) })
148
+ ] }) }, t.guid),
149
+ /* @__PURE__ */ e(
150
+ $,
151
+ {
152
+ copy: { close_aria: s.close_aria, title: i.add_title },
153
+ disablePrimaryButton: Number(r) <= 0,
154
+ isOpen: n,
155
+ onClose: () => o(!1),
156
+ onPrimaryAction: () => a(t, Number(r)),
157
+ primaryText: i.add_save_button,
158
+ children: /* @__PURE__ */ e(se, { amount: r, categoryName: t.name, onAmountChanged: c })
159
+ }
160
+ )
161
+ ] });
162
+ }), Ie = I(({ onRecalculateBudgets: t }) => {
163
+ const { budgets: a } = w(), { addBudget: i, setAlert: s, unbudgetedCategories: n } = D(), o = async (r, c) => {
164
+ await i(r, c), s(M(a.alert_budget_created, r.name));
57
165
  };
58
- return O.drag().on("start", n).on("drag", i).on("end", s);
59
- }, it = (t) => {
60
- let n = t.transaction_total / t.amount;
61
- n < 0 ? n = 0 : n > 1 && (n = 1);
62
- const i = n * 2 * Math.PI, s = O.interpolate(0, i), a = O.arc().cornerRadius(5).innerRadius(t.radius - be * 2).outerRadius(t.radius - be).startAngle(0).endAngle(0);
63
- return (o) => (a.endAngle(s(o)), a(t) || "");
64
- }, ct = (t) => {
65
- O.selectAll(".bubble").call(st(t));
66
- }, lt = (t, n, i) => {
166
+ return /* @__PURE__ */ u(C, { children: [
167
+ /* @__PURE__ */ e(it, {}),
168
+ /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(W, { children: n.map((r) => /* @__PURE__ */ e(
169
+ dt,
170
+ {
171
+ category: r,
172
+ onAddBudget: o
173
+ },
174
+ r.guid
175
+ )) }) }),
176
+ /* @__PURE__ */ e(lt, { onRecalculateBudgets: t })
177
+ ] });
178
+ }), be = 5, Ee = 100, J = 25, ut = (t) => {
179
+ const a = (n) => {
180
+ n.active || t.alphaTarget(0.3).restart(), n.subject.fx = n.subject.x, n.subject.fy = n.subject.y;
181
+ }, i = (n) => {
182
+ n.subject.fx = n.x, n.subject.fy = n.y;
183
+ }, s = (n) => {
184
+ n.active || t.alphaTarget(0), n.subject.fx = null, n.subject.fy = null;
185
+ };
186
+ return O.drag().on("start", a).on("drag", i).on("end", s);
187
+ }, mt = (t) => {
188
+ let a = t.transaction_total / t.amount;
189
+ a < 0 ? a = 0 : a > 1 && (a = 1);
190
+ const i = a * 2 * Math.PI, s = O.interpolate(0, i), n = O.arc().cornerRadius(5).innerRadius(t.radius - be * 2).outerRadius(t.radius - be).startAngle(0).endAngle(0);
191
+ return (o) => (n.endAngle(s(o)), n(t) || "");
192
+ }, gt = (t) => {
193
+ O.selectAll(".bubble").call(ut(t));
194
+ }, Ce = (t, a, i) => Math.min(Math.max(t, a), i), pt = (t, a, i) => {
67
195
  t.alpha(1).restart().force(
68
196
  "x",
69
197
  O.forceX().x(i / 2).strength(0.01)
70
198
  ).force(
71
199
  "y",
72
- O.forceY().y(n / 2).strength(0.02)
200
+ O.forceY().y(a / 2).strength(0.02)
73
201
  ).on("tick", () => {
74
- O.selectAll(".bubble").data(t.nodes()).attr("transform", (s) => `translate(${s.x},${s.y})`);
202
+ const s = t.nodes();
203
+ s.forEach((n) => {
204
+ const o = n.radius ?? J;
205
+ n.x = Ce(n.x ?? 0, o, i - o), n.y = Ce(n.y ?? 0, o, a - o);
206
+ }), O.selectAll(".bubble").data(s).attr("transform", (n) => `translate(${n.x},${n.y})`);
75
207
  });
76
- }, Ie = (t, n) => O.scaleLinear().domain([t, n]).range([me, De]), dt = (t) => {
77
- const n = t.reduce((o, r) => {
208
+ }, Oe = (t, a) => O.scaleLinear().domain([t, a]).range([J, Ee]), ht = (t) => {
209
+ const a = t.reduce((o, r) => {
78
210
  const c = Math.max(r.transaction_total, r.amount);
79
211
  return c > o ? c : o;
80
212
  }, 0), i = t.reduce((o, r) => {
81
213
  const c = Math.max(r.transaction_total, r.amount);
82
214
  return c < o ? c : o;
83
- }, n), s = Ie(i, n), a = t.map((o) => {
215
+ }, a), s = Oe(i, a), n = t.map((o) => {
84
216
  const r = s(Math.max(o.transaction_total, o.amount)) || 25;
85
217
  return {
86
218
  ...o,
87
219
  radius: r
88
220
  };
89
221
  });
90
- return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((o) => o.radius + 2).strength(0.7));
91
- }, ut = (t, n, i) => {
92
- const a = Math.PI * me ** 2 * t, o = i < 400 || n < 300, r = o ? 40 : 20, c = Math.max(100, i - r), g = Math.max(100, n - r), d = c * g;
93
- let u = me;
94
- if (a < d) {
95
- const y = Math.sqrt(d / (t * Math.PI)), p = Math.min(c, g) / 4;
96
- u = Math.min(De, y, p);
222
+ return O.forceSimulation(n).velocityDecay(0.05).force("collide", O.forceCollide((o) => o.radius + 2).strength(0.7));
223
+ }, ft = (t, a, i) => {
224
+ const n = Math.PI * J ** 2 * t, o = i < 400 || a < 300, r = o ? 40 : 20, c = Math.max(100, i - r), m = Math.max(100, a - r), g = c * m;
225
+ let d = J;
226
+ if (n < g) {
227
+ const _ = Math.sqrt(g / (t * Math.PI)), p = Math.min(c, m) / 4;
228
+ d = Math.min(Ee, _, p);
97
229
  }
98
- return o && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
99
- }, mt = (t, n, i, s, a) => {
100
- const { maxRadius: o, minRadius: r } = ut(t, n, a);
230
+ return o && t <= 3 && (d = Math.min(d, 45)), { minRadius: Math.max(20, d * 0.6), maxRadius: d };
231
+ }, _t = (t, a, i, s, n) => {
232
+ const { maxRadius: o, minRadius: r } = ft(t, a, n);
101
233
  return O.scaleLinear().domain([s, i]).range([r, o]);
102
- }, gt = (t, n, i = !1, s, a) => {
103
- const o = n.map((d) => Math.max(d.transaction_total, d.amount)), r = Math.min(...o), c = Math.max(...o), g = i ? mt(t.length, s, c, r, a) : Ie(r, c);
104
- return t.map((d) => ({
105
- ...d,
106
- radius: g(Math.max(d.transaction_total, d.amount))
234
+ }, yt = (t, a, i = !1, s, n) => {
235
+ const o = a.map((g) => Math.max(g.transaction_total, g.amount)), r = Math.min(...o), c = Math.max(...o), m = i ? _t(t.length, s, c, r, n) : Oe(r, c);
236
+ return t.map((g) => ({
237
+ ...g,
238
+ radius: m(Math.max(g.transaction_total, g.amount))
107
239
  }));
108
- }, Ce = 5, pt = 2e3, ht = ({ bubble: t }) => {
109
- const n = J(), {
240
+ }, Se = 5, bt = 2e3, Ct = ({ bubble: t }) => {
241
+ const a = Q(), {
110
242
  amount: i,
111
243
  guid: s,
112
- budgetColors: { mercury: a },
244
+ budgetColors: { mercury: n },
113
245
  radius: o,
114
246
  transaction_total: r
115
247
  } = t, c = `mercury-${s}`;
116
248
  l.useEffect(() => {
117
- O.select(`.${c}`).selectAll(".status").remove(), O.select(`.${c}`).append("path").transition().duration(pt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => it(t));
249
+ O.select(`.${c}`).selectAll(".status").remove(), O.select(`.${c}`).append("path").transition().duration(bt).delay(0).attr("class", "status").attr("style", `fill: ${n}; fill-opacity: 1;`).attrTween("d", () => mt(t));
118
250
  }, [i, o, r]);
119
- const g = O.arc().innerRadius((d) => d - 2 * Ce).outerRadius((d) => d - Ce).startAngle(0).endAngle(2 * Math.PI);
251
+ const m = O.arc().innerRadius((g) => g - 2 * Se).outerRadius((g) => g - Se).startAngle(0).endAngle(2 * Math.PI);
120
252
  return /* @__PURE__ */ e("g", { className: c, children: /* @__PURE__ */ e(
121
253
  "path",
122
254
  {
123
- d: g(o) || "",
124
- style: { fill: n.palette.common.white, fillOpacity: 0.35 }
255
+ d: m(o) || "",
256
+ style: { fill: a.palette.common.white, fillOpacity: 0.35 }
125
257
  }
126
258
  ) });
127
- }, _t = l.memo(ht), $ = 75, le = 50;
128
- function ft({ bubble: t, isDraggable: n, isMiniWidget: i, onClick: s = () => {
259
+ }, St = l.memo(Ct), P = 75, de = 50;
260
+ function Bt({ bubble: t, isDraggable: a, onClick: i = () => {
129
261
  } }) {
130
- const [a, o] = l.useState(!1), { is_mobile_webview: r } = Q(), c = r && i, g = l.useMemo(() => {
262
+ const [s, n] = l.useState(!1), { availableWidth: o } = te(), r = l.useMemo(() => {
131
263
  if (t)
132
264
  return {
133
265
  amount: t.amount,
@@ -139,19 +271,19 @@ function ft({ bubble: t, isDraggable: n, isMiniWidget: i, onClick: s = () => {
139
271
  }, [t.amount, t.budgetColors, t.guid, t.radius, t.transaction_total]);
140
272
  if (!t) return;
141
273
  const {
142
- budgetColors: { background: d, text: u },
143
- category: { icon: C, name: y },
144
- guid: p,
145
- description: b,
146
- radius: _,
147
- x: h,
148
- y: A
149
- } = t, v = c ? -8 : -12;
150
- let x = v, S = v;
151
- _ > $ ? (x = -14, S = -45) : _ > le && (S = -32);
152
- let E = 32;
153
- _ <= $ && (E = c ? 16 : 24);
154
- const M = `${t.category.name}: ${b}`, N = {
274
+ budgetColors: { background: c, text: m },
275
+ category: { icon: g, name: d },
276
+ guid: f,
277
+ description: _,
278
+ radius: p,
279
+ x: b,
280
+ y: S
281
+ } = t, h = o < 320 ? -8 : -12;
282
+ let x = h, A = h;
283
+ p > P ? (x = -14, A = -45) : p > de && (A = -32);
284
+ let v = 32;
285
+ p <= P && (v = o < 320 ? 16 : 24);
286
+ const B = `${t.category.name}: ${_}`, E = {
155
287
  modifiers: [
156
288
  {
157
289
  name: "offset",
@@ -159,86 +291,85 @@ function ft({ bubble: t, isDraggable: n, isMiniWidget: i, onClick: s = () => {
159
291
  }
160
292
  ]
161
293
  };
162
- return /* @__PURE__ */ m(
294
+ return /* @__PURE__ */ u(
163
295
  "g",
164
296
  {
165
297
  className: "bubble",
166
- id: `bubble-${p}`,
167
- onClick: () => s(t),
168
- onMouseEnter: () => o(!0),
169
- onMouseLeave: () => o(!1),
170
- style: { cursor: n ? "pointer" : "default" },
298
+ id: `bubble-${f}`,
299
+ onClick: () => i(t),
300
+ onMouseEnter: () => n(!0),
301
+ onMouseLeave: () => n(!1),
302
+ style: { cursor: a ? "pointer" : "default" },
171
303
  textAnchor: "middle",
172
- x: h,
173
- y: A,
304
+ x: b,
305
+ y: S,
174
306
  children: [
175
307
  /* @__PURE__ */ e(
176
- Fe,
308
+ Xe,
177
309
  {
178
310
  followCursor: !0,
179
- open: a,
180
- slotProps: { popper: N },
181
- title: M,
182
- children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${p}`, r: _ })
311
+ open: s,
312
+ slotProps: { popper: E },
313
+ title: B,
314
+ children: /* @__PURE__ */ e("circle", { fill: c, id: `circle-${f}`, r: p })
183
315
  }
184
316
  ),
185
- /* @__PURE__ */ e("svg", { x, y: S, children: /* @__PURE__ */ e(P, { name: C, size: E, sx: { fill: u } }) }),
186
- _ > $ && /* @__PURE__ */ e(
187
- f,
317
+ /* @__PURE__ */ e("svg", { x, y: A, children: /* @__PURE__ */ e(N, { name: g, size: v, sx: { fill: m } }) }),
318
+ p > P && /* @__PURE__ */ e(
319
+ y,
188
320
  {
189
321
  bold: !0,
190
322
  component: "text",
191
- id: `budget-category-${p}`,
192
- sx: { fill: u },
323
+ id: `budget-category-${f}`,
324
+ sx: { fill: m },
193
325
  variant: "Small",
194
326
  y: 4,
195
- children: y
327
+ children: d
196
328
  }
197
329
  ),
198
- _ > le && /* @__PURE__ */ e(
199
- f,
330
+ p > de && /* @__PURE__ */ e(
331
+ y,
200
332
  {
201
333
  bold: !0,
202
334
  component: "text",
203
- id: `budget-description-${p}-1`,
204
- sx: { fill: u },
335
+ id: `budget-description-${f}-1`,
336
+ sx: { fill: m },
205
337
  variant: "Body",
206
- y: _ <= $ ? 12 : 24,
207
- children: _ <= $ ? b.split(" ")[0] : b
338
+ y: p <= P ? 12 : 24,
339
+ children: p <= P ? _.split(" ")[0] : _
208
340
  }
209
341
  ),
210
- _ <= $ && _ > le && /* @__PURE__ */ e(
211
- f,
342
+ p <= P && p > de && /* @__PURE__ */ e(
343
+ y,
212
344
  {
213
345
  component: "text",
214
- id: `budget-description-${p}-2`,
215
- sx: { fill: u },
346
+ id: `budget-description-${f}-2`,
347
+ sx: { fill: m },
216
348
  variant: "XSmall",
217
349
  y: 28,
218
- children: b.split(" ")[1]
350
+ children: _.split(" ")[1]
219
351
  }
220
352
  ),
221
- /* @__PURE__ */ e(_t, { bubble: g })
353
+ /* @__PURE__ */ e(St, { bubble: r })
222
354
  ]
223
355
  },
224
- p
356
+ f
225
357
  );
226
358
  }
227
- const yt = ({
359
+ const xt = ({
228
360
  height: t,
229
- width: n,
361
+ width: a,
230
362
  isDraggable: i = !1,
231
- isMiniWidget: s = !1,
232
- onClick: a = () => {
363
+ onClick: s = () => {
233
364
  }
234
365
  }) => {
235
- const [o, r] = l.useState([]), c = l.useRef(null), { detailedBudgets: g } = w(), d = l.useCallback(() => {
236
- const u = c.current, C = dt(g), y = C.nodes();
237
- if (u) {
238
- const p = u.nodes(), b = new Map(p.map((_) => [_.guid, _]));
239
- y.forEach((_) => {
240
- const h = b.get(_.guid);
241
- h && Object.assign(_, {
366
+ const [n, o] = l.useState([]), r = l.useRef(null), c = l.useRef(!1), { detailedBudgets: m } = D(), g = l.useCallback(() => {
367
+ const d = r.current, f = ht(m), _ = f.nodes();
368
+ if (d) {
369
+ const p = d.nodes(), b = new Map(p.map((S) => [S.guid, S]));
370
+ _.forEach((S) => {
371
+ const h = b.get(S.guid);
372
+ h && Object.assign(S, {
242
373
  vx: h.vx,
243
374
  vy: h.vy,
244
375
  x: h.x,
@@ -246,48 +377,39 @@ const yt = ({
246
377
  });
247
378
  });
248
379
  }
249
- c.current = C, r(y);
250
- }, [g]);
380
+ r.current = f, c.current = !1, o(_);
381
+ }, [m]);
251
382
  return l.useEffect(() => {
252
- d();
253
- }, [d]), l.useEffect(() => () => {
254
- c.current && (c.current.stop(), c.current = null);
383
+ g();
384
+ }, [g]), l.useEffect(() => () => {
385
+ r.current && (r.current.stop(), r.current = null);
255
386
  }, []), l.useEffect(() => {
256
- const u = c.current;
257
- if (!u) return;
258
- const C = u.nodes(), y = n > 0 && n < 450, p = gt(C, g, y, t, n);
259
- u.nodes(p), lt(u, t, n), i && ct(u), r([...p]);
260
- }, [t, n, i, g]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(n), children: o.map((u) => /* @__PURE__ */ e(
261
- ft,
262
- {
263
- bubble: u,
264
- isDraggable: i,
265
- isMiniWidget: s,
266
- onClick: a
267
- },
268
- u.guid
269
- )) });
270
- }, bt = I(yt), Ct = ({
387
+ const d = r.current;
388
+ if (!d) return;
389
+ const f = d.nodes(), _ = a > 0 && a < 450 || t > 0 && t < 300, p = yt(f, m, _, t, a);
390
+ d.nodes(p), pt(d, t, a), o([...p]);
391
+ }, [t, a, m]), l.useLayoutEffect(() => {
392
+ const d = r.current;
393
+ d && (i && !c.current ? (gt(d), c.current = !0) : !i && c.current && (c.current = !1));
394
+ }, [i, n.length]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(a), children: n.map((d) => /* @__PURE__ */ e(Bt, { bubble: d, isDraggable: i, onClick: s }, d.guid)) });
395
+ }, At = I(xt), vt = ({
271
396
  isMiniWidget: t = !1,
272
- onConnectAccountsClick: n,
397
+ onConnectAccountsClick: a,
273
398
  createBudgetOnClick: i
274
399
  }) => {
275
- const { is_mobile_webview: s } = Q(), a = s && t, { recalculateBudgets: o } = w(), { spendCategories: r } = z(), { budgets: c } = D(), [g, d] = l.useState(!1), [u, C] = l.useState(!1), [y, p] = l.useState(!1), b = l.useMemo(() => [...r.filter((h) => h.totalAverageAmount > 0)], [r]), _ = async () => {
400
+ const { availableWidth: s } = te(), n = s <= 320 && t, { recalculateBudgets: o } = D(), { spendCategories: r } = j(), { budgets: c } = w(), [m, g] = l.useState(!1), [d, f] = l.useState(!1), [_, p] = l.useState(!1), b = l.useMemo(() => [...r.filter((h) => h.totalAverageAmount > 0)], [r]), S = async () => {
276
401
  p(!0);
277
- const { data: h, isSuccess: A } = await o(b);
278
- p(!1), A ? (h.length === 0 && d(!0), C(!1)) : C(!0);
402
+ const { data: h, isSuccess: x } = await o(b);
403
+ p(!1), x ? (h.length === 0 && g(!0), f(!1)) : f(!0);
279
404
  };
280
- return y ? /* @__PURE__ */ e(G, {}) : u ? /* @__PURE__ */ e(
281
- ce,
405
+ return _ ? /* @__PURE__ */ e(G, {}) : d ? /* @__PURE__ */ e(
406
+ le,
282
407
  {
283
- buttonStyles: {
284
- ...a && { mt: 16 }
285
- },
286
408
  header: c.autogenerate_budgets_error_header,
287
409
  icon: "error",
288
410
  iconColor: "#4D4D4D",
289
411
  onClick: (h) => {
290
- h === "primary" ? _() : i();
412
+ h === "primary" ? S() : i();
291
413
  },
292
414
  primaryButton: c.autogenerate_budgets_error_primary_button,
293
415
  secondaryButton: c.zero_state_generate_budgets_secondary_button,
@@ -295,22 +417,20 @@ const yt = ({
295
417
  sx: {
296
418
  width: { sm: 468 },
297
419
  ".buttons-footer": {
298
- width: 208
420
+ width: 208,
421
+ ...n && { mt: 16, button: { height: "max-content" } }
299
422
  },
300
- ...a && { mt: 0 }
423
+ ...n && { mt: 0 }
301
424
  }
302
425
  }
303
- ) : /* @__PURE__ */ e(Ge, { children: g ? /* @__PURE__ */ e(
304
- ce,
426
+ ) : /* @__PURE__ */ e(je, { children: m ? /* @__PURE__ */ e(
427
+ le,
305
428
  {
306
- buttonStyles: {
307
- ...a && { mt: 16 }
308
- },
309
429
  header: c.zero_state_generate_budgets_header,
310
430
  icon: "error",
311
431
  iconColor: "#4D4D4D",
312
432
  onClick: (h) => {
313
- h === "primary" ? n() : i();
433
+ h === "primary" ? a() : i();
314
434
  },
315
435
  primaryButton: c.zero_state_generate_budgets_primary_button,
316
436
  secondaryButton: c.zero_state_generate_budgets_secondary_button,
@@ -318,25 +438,23 @@ const yt = ({
318
438
  sx: {
319
439
  width: t ? "100%" : { sm: 500 },
320
440
  height: t ? "100%" : { sm: 468 },
321
- mt: a ? 0 : 50,
441
+ mt: n ? 0 : 50,
322
442
  ".buttons-footer": {
323
443
  width: 208,
324
- height: 100
444
+ height: 100,
445
+ ...n && { mt: 16, button: { height: "max-content" } }
325
446
  },
326
447
  padding: t ? 5 : 0
327
448
  }
328
449
  }
329
450
  ) : /* @__PURE__ */ e(
330
- ce,
451
+ le,
331
452
  {
332
- buttonStyles: {
333
- ...a && { mt: 24 }
334
- },
335
453
  header: c.create_budgets_title,
336
454
  icon: "bubble_chart",
337
455
  iconColor: "#1A1A1A",
338
456
  onClick: (h) => {
339
- h === "primary" ? _() : i();
457
+ h === "primary" ? S() : i();
340
458
  },
341
459
  primaryButton: c.empty_state_primary_button,
342
460
  secondaryButton: t ? void 0 : c.empty_state_secondary_button,
@@ -344,252 +462,140 @@ const yt = ({
344
462
  sx: {
345
463
  width: t ? "100%" : { sm: 432 },
346
464
  height: t ? "100%" : { sm: 468 },
347
- mt: a ? 0 : 50,
465
+ mt: n ? 0 : 50,
348
466
  ".buttons-footer": {
349
467
  width: 208,
350
- height: 100
468
+ height: 100,
469
+ ...n && { mt: 24, button: { height: "max-content" } }
351
470
  },
352
- padding: t ? 4 : 0
471
+ padding: t ? 4 : 0,
472
+ ...n && { svg: { height: 32, width: 32 } }
353
473
  }
354
474
  }
355
475
  ) });
356
- }, Ee = I(
476
+ }, Me = I(
357
477
  ({
358
478
  createBudgetOnClick: t = () => {
359
479
  },
360
- height: n,
480
+ height: a,
361
481
  isDraggable: i = !1,
362
482
  isMiniWidget: s = !1,
363
- shouldShowZeroState: a,
483
+ shouldShowZeroState: n,
364
484
  unavailableWidth: o = 24
365
485
  }) => {
366
- const { onEvent: r } = H(), { setSelectedBudget: c } = w(), { isLoadingCategoryTotals: g } = z(), { isInitialized: d } = ee(), { accounts: u } = D(), { availableWidth: C } = We(), { isMobile: y } = ge(), [p, b] = l.useState(!1), _ = l.useMemo(() => C - o, [C]), h = (v) => {
367
- c(v), r(L.BUDGETS_CLICK_BUDGET_CATEGORY, {
368
- budget_category: v.category.name,
486
+ const { onEvent: r } = X(), { setSelectedBudget: c } = D(), { isLoadingCategoryTotals: m } = j(), { isInitialized: g } = ne(), { accounts: d } = w(), { availableWidth: f } = te(), { isMobile: _ } = ge(), [p, b] = l.useState(!1), S = l.useMemo(() => f - o, [f]), h = (A) => {
487
+ c(A), r(L.BUDGETS_CLICK_BUDGET_CATEGORY, {
488
+ budget_category: A.category.name,
369
489
  click_type: "bubble"
370
490
  });
371
- }, A = () => {
491
+ }, x = () => {
372
492
  b(!0), r(L.ACCOUNTS_CLICK_CONNECT);
373
493
  };
374
- return g ? /* @__PURE__ */ e(B, { alignItems: "center", height: n, justifyContent: "center", width: Math.abs(_), children: /* @__PURE__ */ e(G, {}) }) : /* @__PURE__ */ m(F, { ml: a || y ? 0 : 24, sx: { alignSelf: "center" }, children: [
375
- a || !d ? /* @__PURE__ */ e(
376
- Ct,
494
+ return m ? /* @__PURE__ */ e(C, { alignItems: "center", height: a, justifyContent: "center", width: Math.abs(S), children: /* @__PURE__ */ e(G, {}) }) : /* @__PURE__ */ u(F, { ml: n || _ ? 0 : 24, sx: { alignSelf: "center" }, children: [
495
+ n || !g ? /* @__PURE__ */ e(
496
+ vt,
377
497
  {
378
498
  createBudgetOnClick: t,
379
499
  isMiniWidget: s,
380
- onConnectAccountsClick: A
500
+ onConnectAccountsClick: x
381
501
  }
382
502
  ) : /* @__PURE__ */ e(
383
- bt,
503
+ At,
384
504
  {
385
- height: n,
505
+ height: a,
386
506
  isDraggable: i,
387
- isMiniWidget: s,
388
507
  onClick: h,
389
- width: _
508
+ width: S
390
509
  }
391
510
  ),
392
511
  /* @__PURE__ */ e(
393
- Ue,
512
+ We,
394
513
  {
395
514
  onClose: () => b(!1),
396
515
  showConnectionsWidget: p,
397
- title: u.manage_connections
516
+ title: d.manage_connections
398
517
  }
399
518
  )
400
519
  ] });
401
520
  }
402
- ), St = I(() => {
403
- const { budgets: t } = D(), { totalBudgeted: n } = w(), { incomeTotal: i } = te(), s = i - n;
404
- return /* @__PURE__ */ m(B, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
405
- /* @__PURE__ */ m(B, { alignItems: "center", children: [
406
- /* @__PURE__ */ e(f, { bold: !0, variant: "Body", children: T(i, "0,0") }),
407
- /* @__PURE__ */ e(f, { color: "secondary", variant: "Small", children: t.projected_income })
408
- ] }),
409
- /* @__PURE__ */ e(f, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
410
- /* @__PURE__ */ m(B, { alignItems: "center", children: [
411
- /* @__PURE__ */ e(f, { bold: !0, variant: "Body", children: T(n, "0,0") }),
412
- /* @__PURE__ */ e(f, { color: "secondary", variant: "Small", children: t.budgeted })
413
- ] }),
414
- /* @__PURE__ */ e(f, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
415
- /* @__PURE__ */ m(B, { alignItems: "center", children: [
416
- /* @__PURE__ */ e(f, { bold: !0, variant: "Body", children: T(s, "0,0") }),
417
- /* @__PURE__ */ e(f, { color: "secondary", variant: "Small", children: t.remaining })
418
- ] })
419
- ] });
420
- }), Bt = I(
421
- ({ category: t }) => {
422
- const { budgets: n } = D(), { budgets: i } = w(), s = l.useMemo(() => {
423
- const a = i.find((c) => c.category_guid === t.guid), o = T(t.totalAverageAmount, "0,0"), r = a ? R(n.recalculate_previous_budget, T(a.amount, "0,0")) : n.recalculate_new_budget;
424
- return `${o} - ${r}`;
425
- }, [n, i]);
426
- return /* @__PURE__ */ m(l.Fragment, { children: [
427
- /* @__PURE__ */ e(K, { children: /* @__PURE__ */ m(V, { children: [
428
- /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid, variant: "filled" }) }),
429
- /* @__PURE__ */ e(Y, { primary: t.name, secondary: s })
430
- ] }) }),
431
- /* @__PURE__ */ e(oe, {})
432
- ] }, t.guid);
433
- }
434
- ), vt = ({ onRecalculateBudgets: t }) => {
435
- const { budgets: n, common: i } = D(), { spendCategories: s } = z(), { recalculateBudgets: a, setAlert: o } = w(), [r, c] = l.useState(!1), g = s.filter((u) => u.totalAverageAmount > 0), d = async () => {
436
- await a(g), c(!1), o(n.alert_recalculated_budgets), t?.();
437
- };
438
- return /* @__PURE__ */ m(l.Fragment, { children: [
439
- /* @__PURE__ */ e(xe, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
440
- /* @__PURE__ */ e(f, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: n.recalculate_help }),
441
- /* @__PURE__ */ e(
442
- k,
443
- {
444
- ariaLabelClose: i.close_aria,
445
- isOpen: r,
446
- onClose: () => c(!1),
447
- onPrimaryAction: d,
448
- title: n.recalculate_title,
449
- children: /* @__PURE__ */ m(B, { children: [
450
- /* @__PURE__ */ m(B, { mx: 24, my: 16, children: [
451
- /* @__PURE__ */ e(f, { bold: !0, variant: "Body", children: n.recalculate_description_top }),
452
- /* @__PURE__ */ e(f, { variant: "ParagraphSmall", children: n.recalculate_description_bottom })
453
- ] }),
454
- /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(X, { children: g.map((u) => /* @__PURE__ */ e(Bt, { category: u }, u.guid)) }) })
455
- ] })
456
- }
457
- )
458
- ] });
459
- }, re = ({
460
- amount: t,
461
- categoryName: n,
462
- onAmountChanged: i
521
+ ), Tt = ({
522
+ budgetsCopy: t,
523
+ difference: a,
524
+ handleAddClick: i,
525
+ shouldShowZeroState: s
463
526
  }) => {
464
- const { budgets: s } = D(), { totalBudgeted: a } = w(), { incomeTotal: o } = te(), r = o - a;
465
- return /* @__PURE__ */ m(B, { gap: 16, children: [
466
- /* @__PURE__ */ m(B, { children: [
467
- /* @__PURE__ */ e(f, { children: R(
468
- s.add_description_top,
469
- T(r, "0,0")
470
- ) }),
471
- /* @__PURE__ */ e(f, { children: R(s.add_description_bottom, n) })
472
- ] }),
473
- /* @__PURE__ */ e(
474
- Ke,
475
- {
476
- amount: t,
477
- autoFocus: !0,
478
- label: s.add_label,
479
- minAmount: 0,
480
- setAmount: i,
481
- sx: { ".MuiTypography-Body": { p: 0 } }
482
- }
483
- )
484
- ] });
485
- }, xt = I(({ category: t, onAddBudget: n }) => {
486
- const { budgets: i, common: s } = D(), [a, o] = l.useState(!1), [r, c] = l.useState(
487
- `${t.totalAmount === 0 ? "" : t.totalAmount}`
488
- );
489
- return /* @__PURE__ */ m(l.Fragment, { children: [
490
- /* @__PURE__ */ e(K, { children: /* @__PURE__ */ m(V, { onClick: () => o(!0), children: [
491
- /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid }) }),
492
- /* @__PURE__ */ e(
493
- Y,
494
- {
495
- primary: t.name,
496
- secondary: T(t.totalAmount, "0,0")
497
- }
498
- ),
499
- /* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(P, { name: "add", size: 20 }) })
500
- ] }) }, t.guid),
527
+ const { availableHeight: n = 0 } = te(), o = l.useRef(null);
528
+ l.useEffect(() => {
529
+ n > 0 && o.current === null && (o.current = n);
530
+ }, [n]);
531
+ const r = l.useMemo(() => {
532
+ const c = o.current ?? n;
533
+ return c > 0 ? Math.round(Math.max(140, Math.min(450, c * 0.8))) - 40 : 450;
534
+ }, [n]);
535
+ return /* @__PURE__ */ u(C, { sx: { height: "100%", justifyContent: "space-between" }, children: [
501
536
  /* @__PURE__ */ e(
502
- j,
537
+ Me,
503
538
  {
504
- copy: { close_aria: s.close_aria, title: i.add_title },
505
- disablePrimaryButton: Number(r) <= 0,
506
- isOpen: a,
507
- onClose: () => o(!1),
508
- onPrimaryAction: () => n(t, Number(r)),
509
- primaryText: i.add_save_button,
510
- children: /* @__PURE__ */ e(re, { amount: r, categoryName: t.name, onAmountChanged: c })
539
+ createBudgetOnClick: i,
540
+ height: r,
541
+ isMiniWidget: !0,
542
+ shouldShowZeroState: s
511
543
  }
512
- )
513
- ] });
514
- }), Oe = I(({ onRecalculateBudgets: t }) => {
515
- const { budgets: n } = D(), { addBudget: i, setAlert: s, unbudgetedCategories: a } = w(), o = async (r, c) => {
516
- await i(r, c), s(R(n.alert_budget_created, r.name));
517
- };
518
- return /* @__PURE__ */ m(B, { children: [
519
- /* @__PURE__ */ e(St, {}),
520
- /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(X, { children: a.map((r) => /* @__PURE__ */ e(
521
- xt,
522
- {
523
- category: r,
524
- onAddBudget: o
525
- },
526
- r.guid
527
- )) }) }),
528
- /* @__PURE__ */ e(vt, { onRecalculateBudgets: t })
544
+ ),
545
+ !s && /* @__PURE__ */ u(F, { ml: 16, children: [
546
+ /* @__PURE__ */ e(y, { bold: !0, color: a < 0 ? "error.main" : "success.main", children: T(Math.abs(a), "0,0") }),
547
+ /* @__PURE__ */ e(y, { children: a < 0 ? t.overspent_in_budgets : t.left_in_budgets })
548
+ ] })
529
549
  ] });
530
- }), At = (t) => {
531
- const n = J(), { is_mobile_webview: i } = Q(), s = i, { onEvent: a } = H(), { detailedBudgets: o, isDataLoaded: r, loadBudgetData: c, setTheme: g } = w(), { budgets: d, common: u } = D(), { isCopyLoaded: C, isInitialized: y, selectedAccounts: p } = ee(), { reloadCategoryTotals: b } = z(), _ = ze(), h = o.length === 0, [A, v] = l.useState(!1), x = () => {
532
- v(!0), a(L.BUDGETS_CLICK_ADD);
533
- }, S = () => {
534
- v(!1);
535
- };
550
+ }, wt = (t) => {
551
+ const a = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: n, loadBudgetData: o, setTheme: r } = D(), { budgets: c, common: m } = w(), { isCopyLoaded: g, isInitialized: d, selectedAccounts: f } = ne(), { reloadCategoryTotals: _ } = j(), p = Ve(), b = s.length === 0, [S, h] = l.useState(!1), x = () => {
552
+ h(!0), i(L.BUDGETS_CLICK_ADD);
553
+ }, A = () => h(!1);
536
554
  return l.useEffect(() => {
537
- g(n);
538
- }, [n]), l.useEffect(() => {
539
- y && !r && b(p, q(/* @__PURE__ */ new Date()), de(/* @__PURE__ */ new Date())).then(
555
+ r(a);
556
+ }, [a]), l.useEffect(() => {
557
+ d && !n && _(f, q(/* @__PURE__ */ new Date()), ue(/* @__PURE__ */ new Date())).then(
540
558
  () => {
541
- c().finally();
559
+ o().finally();
542
560
  }
543
561
  );
544
- }, [y, p]), C ? /* @__PURE__ */ m(
545
- Ve,
562
+ }, [d, f]), g ? /* @__PURE__ */ u(
563
+ Ye,
546
564
  {
547
- primaryCtaLabel: h ? d.get_started_cta : d.details_cta,
548
- title: d.budgets_title,
565
+ contentStyles: { height: "calc(100% - 52px)" },
566
+ primaryCtaLabel: b ? c.get_started_cta : c.details_cta,
567
+ sx: { height: "100%" },
568
+ title: c.budgets_title,
549
569
  ...t,
550
570
  children: [
551
- r ? /* @__PURE__ */ m(
552
- B,
571
+ n ? /* @__PURE__ */ e(
572
+ Tt,
553
573
  {
554
- sx: {
555
- ...!s && { height: 450, mt: 32 }
556
- },
557
- children: [
558
- /* @__PURE__ */ e(
559
- Ee,
560
- {
561
- createBudgetOnClick: x,
562
- height: s ? 220 : 370,
563
- isMiniWidget: !0,
564
- shouldShowZeroState: h
565
- }
566
- ),
567
- !h && /* @__PURE__ */ m(F, { ml: 16, children: [
568
- /* @__PURE__ */ e(f, { bold: !0, color: _ < 0 ? "error.main" : "success.main", children: T(Math.abs(_), "0,0") }),
569
- /* @__PURE__ */ e(f, { children: _ < 0 ? d.overspent_in_budgets : d.left_in_budgets })
570
- ] })
571
- ]
574
+ budgetsCopy: c,
575
+ difference: p,
576
+ handleAddClick: x,
577
+ shouldShowZeroState: b
572
578
  }
573
579
  ) : /* @__PURE__ */ e(G, {}),
574
580
  /* @__PURE__ */ e(
575
581
  k,
576
582
  {
577
- ariaLabelClose: u.close_aria,
578
- isOpen: A,
579
- onClose: () => v(!1),
580
- title: d.add_new_title,
581
- children: /* @__PURE__ */ e(Oe, { onRecalculateBudgets: S })
583
+ ariaLabelClose: m.close_aria,
584
+ isOpen: S,
585
+ onClose: () => h(!1),
586
+ title: c.add_new_title,
587
+ children: /* @__PURE__ */ e(Ie, { onRecalculateBudgets: A })
582
588
  }
583
589
  )
584
590
  ]
585
591
  }
586
592
  ) : /* @__PURE__ */ e(G, {});
587
- }, En = I(At), Me = ({ budget: t }) => {
593
+ }, Mn = I(wt), Re = ({ budget: t }) => {
588
594
  const {
589
- amount: n,
595
+ amount: a,
590
596
  budgetColors: { background: i },
591
597
  category: { name: s },
592
- category_guid: a,
598
+ category_guid: n,
593
599
  percentage: o,
594
600
  transaction_total: r
595
601
  } = t, c = [
@@ -598,152 +604,152 @@ const yt = ({
598
604
  percentage: `${o}%`
599
605
  }
600
606
  ];
601
- return /* @__PURE__ */ e(pe, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(he, { children: /* @__PURE__ */ m(B, { alignItems: "center", gap: 16, children: [
602
- /* @__PURE__ */ e(W, { categoryGuid: a, size: 56 }),
603
- /* @__PURE__ */ e(je, { children: `${T(r, "0,0")} / ${T(n, "0,0")}` }),
604
- /* @__PURE__ */ e(f, { bold: !0, variant: "XSmall", children: s }),
605
- /* @__PURE__ */ e(ue, { data: c, height: 10 })
607
+ return /* @__PURE__ */ e(pe, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(he, { children: /* @__PURE__ */ u(C, { alignItems: "center", gap: 16, children: [
608
+ /* @__PURE__ */ e(H, { categoryGuid: n, size: 56 }),
609
+ /* @__PURE__ */ e(ze, { children: `${T(r, "0,0")} / ${T(a, "0,0")}` }),
610
+ /* @__PURE__ */ e(y, { bold: !0, variant: "XSmall", children: s }),
611
+ /* @__PURE__ */ e(me, { data: c, height: 10 })
606
612
  ] }) }) });
607
- }, Tt = I(() => {
608
- const { budgets: t } = D();
609
- return /* @__PURE__ */ m(B, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
610
- /* @__PURE__ */ e(P, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
611
- /* @__PURE__ */ e(f, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
612
- /* @__PURE__ */ e(f, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
613
+ }, Dt = I(() => {
614
+ const { budgets: t } = w();
615
+ return /* @__PURE__ */ u(C, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
616
+ /* @__PURE__ */ e(N, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
617
+ /* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
618
+ /* @__PURE__ */ e(y, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
613
619
  ] });
614
- }), wt = I(({ budget: t }) => {
620
+ }), It = I(({ budget: t }) => {
615
621
  const {
616
- amount: n,
622
+ amount: a,
617
623
  budgetColors: { background: i },
618
624
  category: s,
619
- percentage: a,
625
+ percentage: n,
620
626
  transaction_total: o
621
- } = t, { setSelectedSubBudget: r } = w();
622
- return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ m(V, { onClick: () => r(t), children: [
623
- /* @__PURE__ */ e(ae, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Te, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
627
+ } = t, { setSelectedSubBudget: r } = D();
628
+ return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ u(V, { onClick: () => r(t), children: [
629
+ /* @__PURE__ */ e(re, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(we, { color: i, percent: n, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
624
630
  /* @__PURE__ */ e(
625
631
  Y,
626
632
  {
627
- primary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(f, { bold: !0, variant: "Body", children: t.category.name }) }),
628
- secondary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(f, { fontWeight: 400, variant: "Body", children: `
633
+ primary: /* @__PURE__ */ e(C, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }) }),
634
+ secondary: /* @__PURE__ */ e(C, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
629
635
  ${T(o, "0,0")} /
630
- ${T(n, "0,0")}
636
+ ${T(a, "0,0")}
631
637
  ` }) })
632
638
  }
633
639
  )
634
640
  ] }) });
635
- }), Dt = I(({ category: t, parentBudget: n }) => {
636
- const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: o } = tt(), { addBudget: r } = w(), [c, g] = l.useState(!1), [d, u] = l.useState(!1), [C, y] = l.useState(""), [p, b] = l.useState(void 0);
641
+ }), Et = I(({ category: t, parentBudget: a }) => {
642
+ const { budgets: i, common: s } = w(), { setExpandedGuid: n, setOnSelect: o } = nt(), { addBudget: r } = D(), [c, m] = l.useState(!1), [g, d] = l.useState(!1), [f, _] = l.useState(""), [p, b] = l.useState(void 0);
637
643
  l.useEffect(() => {
638
- o((A) => {
639
- const v = t.subCategories.find((x) => x.guid === A);
640
- v && (b(v), y(`${v.currentAmount === 0 ? "" : v.currentAmount}`), u(!0));
644
+ o((x) => {
645
+ const A = t.subCategories.find((v) => v.guid === x);
646
+ A && (b(A), _(`${A.currentAmount === 0 ? "" : A.currentAmount}`), d(!0));
641
647
  });
642
648
  }, []);
643
- const _ = () => {
644
- a(t.guid), g(!0);
649
+ const S = () => {
650
+ n(t.guid), m(!0);
645
651
  }, h = async () => {
646
- p && Number(C) > 0 && (await r(p, Number(C), n.guid), u(!1), g(!1), b(void 0));
652
+ p && Number(f) > 0 && (await r(p, Number(f), a.guid), d(!1), m(!1), b(void 0));
647
653
  };
648
- return /* @__PURE__ */ m(F, { children: [
649
- /* @__PURE__ */ e(K, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(V, { onClick: _, children: /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ m(B, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
650
- /* @__PURE__ */ m(B, { alignItems: "center", direction: "row", gap: 8, children: [
651
- /* @__PURE__ */ e(P, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
652
- /* @__PURE__ */ e(f, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
654
+ return /* @__PURE__ */ u(F, { children: [
655
+ /* @__PURE__ */ e(K, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(V, { onClick: S, children: /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ u(C, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
656
+ /* @__PURE__ */ u(C, { alignItems: "center", direction: "row", gap: 8, children: [
657
+ /* @__PURE__ */ e(N, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
658
+ /* @__PURE__ */ e(y, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
653
659
  ] }),
654
- /* @__PURE__ */ e(P, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
660
+ /* @__PURE__ */ e(N, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
655
661
  ] }) }) }) }),
656
- /* @__PURE__ */ e(oe, {}),
662
+ /* @__PURE__ */ e(ae, {}),
657
663
  /* @__PURE__ */ e(
658
664
  k,
659
665
  {
660
666
  ariaLabelClose: s.close_aria,
661
667
  isOpen: c,
662
- onClose: () => g(!1),
668
+ onClose: () => m(!1),
663
669
  title: i.add_sub_budget_title,
664
- children: /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(nt, { category: t, subCategories: t.subCategories }) })
670
+ children: /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(ot, { category: t, subCategories: t.subCategories }) })
665
671
  }
666
672
  ),
667
673
  /* @__PURE__ */ e(
668
- j,
674
+ $,
669
675
  {
670
676
  copy: { close_aria: s.close_aria, title: i.add_title },
671
- disablePrimaryButton: Number(C) <= 0,
672
- isOpen: d,
673
- onClose: () => u(!1),
677
+ disablePrimaryButton: Number(f) <= 0,
678
+ isOpen: g,
679
+ onClose: () => d(!1),
674
680
  onPrimaryAction: h,
675
681
  primaryText: i.add_save_button,
676
682
  children: /* @__PURE__ */ e(
677
- re,
683
+ se,
678
684
  {
679
- amount: C,
685
+ amount: f,
680
686
  categoryName: p?.name || "",
681
- onAmountChanged: y
687
+ onAmountChanged: _
682
688
  }
683
689
  )
684
690
  }
685
691
  )
686
692
  ] });
687
- }), It = I(({ budget: t }) => {
688
- const { category: n, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: o, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: g } = w(), { filter: d, setFilter: u } = ne(), [C, y] = l.useState(!1), [p, b] = l.useState(!1), [_, h] = l.useState("");
693
+ }), Ot = I(({ budget: t }) => {
694
+ const { category: a, subBudgets: i } = t, { budgets: s, common: n } = w(), { deleteBudget: o, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: m } = D(), { filter: g, setFilter: d } = oe(), [f, _] = l.useState(!1), [p, b] = l.useState(!1), [S, h] = l.useState("");
689
695
  l.useEffect(() => {
690
- r && (h(`${r.amount}`), u({
691
- ...d,
692
- custom: (S) => S.category_guid === r.category_guid
696
+ r && (h(`${r.amount}`), d({
697
+ ...g,
698
+ custom: (B) => B.category_guid === r.category_guid
693
699
  }));
694
700
  }, [r]);
695
- const A = async () => {
696
- r && await g({
701
+ const x = async () => {
702
+ r && await m({
697
703
  ...r,
698
- amount: Number(_)
704
+ amount: Number(S)
699
705
  });
700
- }, v = async () => {
701
- r && await o(r.guid), b(!1), x();
702
- }, x = () => {
703
- u({
704
- ...d,
705
- custom: (S) => S.category_guid === t.category_guid || S.top_level_category_guid === t.category_guid
706
+ }, A = async () => {
707
+ r && await o(r.guid), b(!1), v();
708
+ }, v = () => {
709
+ d({
710
+ ...g,
711
+ custom: (B) => B.category_guid === t.category_guid || B.top_level_category_guid === t.category_guid
706
712
  }), c(void 0);
707
713
  };
708
- return /* @__PURE__ */ m(l.Fragment, { children: [
709
- /* @__PURE__ */ m(X, { sx: { bgcolor: "background.paper" }, children: [
710
- i.length === 0 ? /* @__PURE__ */ e(Tt, {}) : i.map((S) => /* @__PURE__ */ m(l.Fragment, { children: [
711
- /* @__PURE__ */ e(wt, { budget: S }),
712
- /* @__PURE__ */ e(oe, {})
713
- ] }, S.guid)),
714
- /* @__PURE__ */ e(Dt, { category: n, parentBudget: t })
714
+ return /* @__PURE__ */ u(l.Fragment, { children: [
715
+ /* @__PURE__ */ u(W, { sx: { bgcolor: "background.paper" }, children: [
716
+ i.length === 0 ? /* @__PURE__ */ e(Dt, {}) : i.map((B) => /* @__PURE__ */ u(l.Fragment, { children: [
717
+ /* @__PURE__ */ e(It, { budget: B }),
718
+ /* @__PURE__ */ e(ae, {})
719
+ ] }, B.guid)),
720
+ /* @__PURE__ */ e(Et, { category: a, parentBudget: t })
715
721
  ] }),
716
722
  /* @__PURE__ */ e(
717
723
  k,
718
724
  {
719
- ariaLabelClose: a.close_aria,
725
+ ariaLabelClose: n.close_aria,
720
726
  isOpen: !!r,
721
- onClose: x,
722
- onPrimaryAction: () => y(!0),
727
+ onClose: v,
728
+ onPrimaryAction: () => _(!0),
723
729
  onSecondaryAction: () => b(!0),
724
730
  primaryText: s.details_edit_button,
725
731
  secondaryText: s.details_delete_button,
726
732
  title: s.details_title,
727
- children: r && /* @__PURE__ */ m(B, { gap: 24, children: [
728
- /* @__PURE__ */ e(Me, { budget: r }),
729
- /* @__PURE__ */ e(Ae, { height: "100%" })
733
+ children: r && /* @__PURE__ */ u(C, { gap: 24, children: [
734
+ /* @__PURE__ */ e(Re, { budget: r }),
735
+ /* @__PURE__ */ e(Te, { height: "100%" })
730
736
  ] })
731
737
  }
732
738
  ),
733
- r && /* @__PURE__ */ m(l.Fragment, { children: [
739
+ r && /* @__PURE__ */ u(l.Fragment, { children: [
734
740
  /* @__PURE__ */ e(
735
- j,
741
+ $,
736
742
  {
737
- copy: { close_aria: a.close_aria, title: s.details_edit_title },
738
- disablePrimaryButton: Number(_) <= 0,
739
- isOpen: C,
740
- onClose: () => y(!1),
741
- onPrimaryAction: A,
743
+ copy: { close_aria: n.close_aria, title: s.details_edit_title },
744
+ disablePrimaryButton: Number(S) <= 0,
745
+ isOpen: f,
746
+ onClose: () => _(!1),
747
+ onPrimaryAction: x,
742
748
  primaryText: s.edit_save_button,
743
749
  children: /* @__PURE__ */ e(
744
- re,
750
+ se,
745
751
  {
746
- amount: _,
752
+ amount: S,
747
753
  categoryName: r.category.name,
748
754
  onAmountChanged: h
749
755
  }
@@ -751,43 +757,43 @@ const yt = ({
751
757
  }
752
758
  ),
753
759
  /* @__PURE__ */ e(
754
- j,
760
+ $,
755
761
  {
756
- copy: { close_aria: a.close_aria, title: s.delete_title },
762
+ copy: { close_aria: n.close_aria, title: s.delete_title },
757
763
  isOpen: p,
758
764
  onClose: () => b(!1),
759
- onPrimaryAction: v,
765
+ onPrimaryAction: A,
760
766
  primaryColor: "error",
761
767
  primaryText: "Delete",
762
768
  secondaryColor: "secondary",
763
- children: /* @__PURE__ */ e(f, { variant: "Paragraph", children: R(s.delete_description, r.category.name) })
769
+ children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: M(s.delete_description, r.category.name) })
764
770
  }
765
771
  )
766
772
  ] })
767
773
  ] });
768
- }), Et = I(({ budget: t }) => {
769
- const { is_mobile_webview: n } = Q(), { setAlert: i } = w(), { budgets: s, common: a, transactions: o } = D(), { isDesktop: r, isSmallTablet: c, isTablet: g } = ge(), {
770
- sortedTransactions: d,
771
- sortedTransactionsWithSplits: u,
772
- tags: C
773
- } = ne(), [y, p] = l.useState(0), [b, _] = l.useState(""), h = l.useMemo(
774
- () => d.find((S) => S.guid === b),
775
- [b, d]
776
- ), A = (S, E) => {
774
+ }), Mt = I(({ budget: t }) => {
775
+ const { is_mobile_webview: a } = Ue(), { setAlert: i } = D(), { budgets: s, common: n, transactions: o } = w(), { isDesktop: r, isSmallTablet: c, isTablet: m } = ge(), {
776
+ sortedTransactions: g,
777
+ sortedTransactionsWithSplits: d,
778
+ tags: f
779
+ } = oe(), [_, p] = l.useState(0), [b, S] = l.useState(""), h = l.useMemo(
780
+ () => g.find((B) => B.guid === b),
781
+ [b, g]
782
+ ), x = (B, E) => {
777
783
  p(E);
778
- }, v = () => {
779
- Qe(u, C), i(s.alert_csv_downloaded);
780
- }, x = d.length > 0 && !n && (r || g && !c);
781
- return /* @__PURE__ */ m(B, { gap: 24, children: [
782
- /* @__PURE__ */ e(Me, { budget: t }),
783
- /* @__PURE__ */ m(B, { children: [
784
- /* @__PURE__ */ m(
785
- Je,
784
+ }, A = () => {
785
+ et(d, f), i(s.alert_csv_downloaded);
786
+ }, v = g.length > 0 && !a && (r || m && !c);
787
+ return /* @__PURE__ */ u(C, { gap: 24, children: [
788
+ /* @__PURE__ */ e(Re, { budget: t }),
789
+ /* @__PURE__ */ u(C, { children: [
790
+ /* @__PURE__ */ u(
791
+ Qe,
786
792
  {
787
- onChange: A,
793
+ onChange: x,
788
794
  sx: { width: "100%" },
789
795
  textColor: "primary",
790
- value: y,
796
+ value: _,
791
797
  variant: "fullWidth",
792
798
  children: [
793
799
  /* @__PURE__ */ e(ye, { label: s.details_transactions_tab }),
@@ -795,347 +801,347 @@ const yt = ({
795
801
  ]
796
802
  }
797
803
  ),
798
- y === 0 && /* @__PURE__ */ m(B, { children: [
799
- x && /* @__PURE__ */ e(B, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
800
- xe,
804
+ _ === 0 && /* @__PURE__ */ u(C, { children: [
805
+ v && /* @__PURE__ */ e(C, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
806
+ ve,
801
807
  {
802
- onClick: v,
803
- startIcon: /* @__PURE__ */ e(P, { name: "ios_share" }),
808
+ onClick: A,
809
+ startIcon: /* @__PURE__ */ e(N, { name: "ios_share" }),
804
810
  variant: "text",
805
811
  children: o.export_csv_btn
806
812
  }
807
813
  ) }),
808
- /* @__PURE__ */ e(Ae, { height: "100%", onClick: _ })
814
+ /* @__PURE__ */ e(Te, { height: "100%", onClick: S })
809
815
  ] }),
810
- y === 1 && /* @__PURE__ */ e(It, { budget: t }),
816
+ _ === 1 && /* @__PURE__ */ e(Ot, { budget: t }),
811
817
  /* @__PURE__ */ e(
812
818
  k,
813
819
  {
814
- ariaLabelClose: a.close_aria,
820
+ ariaLabelClose: n.close_aria,
815
821
  isOpen: !!h,
816
- onClose: () => _(""),
822
+ onClose: () => S(""),
817
823
  title: s.details_transaction_drawer,
818
- children: h && /* @__PURE__ */ e(et, { transaction: h })
824
+ children: h && /* @__PURE__ */ e(tt, { transaction: h })
819
825
  }
820
826
  )
821
827
  ] })
822
828
  ] });
823
- }), Ot = I(() => {
824
- const { selectedAccountGuids: t } = ee(), { budgets: n, common: i } = D(), {
829
+ }), Rt = I(() => {
830
+ const { selectedAccountGuids: t } = ne(), { budgets: a, common: i } = w(), {
825
831
  dateRange: s,
826
- deleteBudget: a,
832
+ deleteBudget: n,
827
833
  selectedBudget: o,
828
834
  selectedSubBudget: r,
829
835
  setAlert: c,
830
- setSelectedBudget: g,
831
- updateBudget: d
832
- } = w(), { setFilter: u } = ne(), [C, y] = l.useState(!1), [p, b] = l.useState(!1), [_, h] = l.useState(!1), [A, v] = l.useState("");
836
+ setSelectedBudget: m,
837
+ updateBudget: g
838
+ } = D(), { setFilter: d } = oe(), [f, _] = l.useState(!1), [p, b] = l.useState(!1), [S, h] = l.useState(!1), [x, A] = l.useState("");
833
839
  l.useEffect(() => {
834
- o && !r && (v(`${o.amount}`), y(!0), u({
840
+ o && !r && (A(`${o.amount}`), _(!0), d({
835
841
  accounts: t,
836
842
  dateRange: s,
837
- custom: (M) => M.category_guid === o.category_guid || M.top_level_category_guid === o.category_guid,
843
+ custom: (R) => R.category_guid === o.category_guid || R.top_level_category_guid === o.category_guid,
838
844
  showSplits: !0
839
845
  }));
840
846
  }, [o]);
841
- const x = async () => {
842
- o && (await d({
847
+ const v = async () => {
848
+ o && (await g({
843
849
  ...o,
844
- amount: Number(A),
845
- percentage: o.category.totalAmount / Number(A) * 100
846
- }), c(R(n.alert_budget_updated, o.category.name)));
847
- }, S = async () => {
848
- o && (await a(o.guid), c(R(n.alert_budget_deleted, o.category.name))), h(!1), E();
850
+ amount: Number(x),
851
+ percentage: o.category.totalAmount / Number(x) * 100
852
+ }), c(M(a.alert_budget_updated, o.category.name)));
853
+ }, B = async () => {
854
+ o && (await n(o.guid), c(M(a.alert_budget_deleted, o.category.name))), h(!1), E();
849
855
  }, E = () => {
850
- y(!1), setTimeout(() => {
851
- g(void 0);
856
+ _(!1), setTimeout(() => {
857
+ m(void 0);
852
858
  }, 250);
853
859
  };
854
860
  if (o)
855
- return /* @__PURE__ */ m(l.Fragment, { children: [
861
+ return /* @__PURE__ */ u(l.Fragment, { children: [
856
862
  /* @__PURE__ */ e(
857
863
  k,
858
864
  {
859
865
  ariaLabelClose: i.close_aria,
860
- isOpen: C,
866
+ isOpen: f,
861
867
  onClose: E,
862
868
  onPrimaryAction: () => b(!0),
863
869
  onSecondaryAction: () => h(!0),
864
- primaryText: n.details_edit_button,
870
+ primaryText: a.details_edit_button,
865
871
  secondaryColor: "error",
866
- secondaryText: n.details_delete_button,
867
- title: n.details_title,
868
- children: /* @__PURE__ */ e(Et, { budget: o })
872
+ secondaryText: a.details_delete_button,
873
+ title: a.details_title,
874
+ children: /* @__PURE__ */ e(Mt, { budget: o })
869
875
  }
870
876
  ),
871
877
  /* @__PURE__ */ e(
872
- j,
878
+ $,
873
879
  {
874
- copy: { close_aria: i.close_aria, title: n.details_edit_title },
875
- disablePrimaryButton: Number(A) <= 0,
880
+ copy: { close_aria: i.close_aria, title: a.details_edit_title },
881
+ disablePrimaryButton: Number(x) <= 0,
876
882
  isOpen: p,
877
883
  onClose: () => b(!1),
878
- onPrimaryAction: x,
879
- primaryText: n.edit_save_button,
884
+ onPrimaryAction: v,
885
+ primaryText: a.edit_save_button,
880
886
  children: /* @__PURE__ */ e(
881
- re,
887
+ se,
882
888
  {
883
- amount: A,
889
+ amount: x,
884
890
  categoryName: o.category.name,
885
- onAmountChanged: v
891
+ onAmountChanged: A
886
892
  }
887
893
  )
888
894
  }
889
895
  ),
890
896
  /* @__PURE__ */ e(
891
- j,
897
+ $,
892
898
  {
893
- copy: { close_aria: i.close_aria, title: n.delete_title },
894
- isOpen: _,
899
+ copy: { close_aria: i.close_aria, title: a.delete_title },
900
+ isOpen: S,
895
901
  onClose: () => h(!1),
896
- onPrimaryAction: S,
902
+ onPrimaryAction: B,
897
903
  primaryColor: "error",
898
- primaryText: n.details_delete_button,
904
+ primaryText: a.details_delete_button,
899
905
  secondaryColor: "secondary",
900
- children: /* @__PURE__ */ e(f, { variant: "Paragraph", children: R(n.delete_description, o.category.name) })
906
+ children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: M(a.delete_description, o.category.name) })
901
907
  }
902
908
  )
903
909
  ] });
904
- }), Mt = ({ budget: t, onClick: n }) => {
910
+ }), Lt = ({ budget: t, onClick: a }) => {
905
911
  const {
906
912
  amount: i,
907
- budgetColors: { background: s, description: a },
913
+ budgetColors: { background: s, description: n },
908
914
  category_guid: o,
909
915
  description: r,
910
916
  percentage: c,
911
- subBudgets: g,
912
- transaction_total: d
917
+ subBudgets: m,
918
+ transaction_total: g
913
919
  } = t;
914
- return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ m(V, { onClick: () => n?.(t), children: [
915
- /* @__PURE__ */ e(ae, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Te, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: o, variant: "basic" }) }) }),
920
+ return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ u(V, { onClick: () => a?.(t), children: [
921
+ /* @__PURE__ */ e(re, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(we, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: o, variant: "basic" }) }) }),
916
922
  /* @__PURE__ */ e(
917
923
  Y,
918
924
  {
919
- primary: /* @__PURE__ */ m(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
920
- /* @__PURE__ */ e(f, { bold: !0, variant: "Body", children: t.category.name }),
921
- /* @__PURE__ */ e(f, { fontWeight: 400, variant: "Body", children: `
922
- ${T(d, "0,0")} /
925
+ primary: /* @__PURE__ */ u(C, { component: "span", direction: "row", justifyContent: "space-between", children: [
926
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }),
927
+ /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
928
+ ${T(g, "0,0")} /
923
929
  ${T(i, "0,0")}
924
930
  ` })
925
931
  ] }),
926
- secondary: /* @__PURE__ */ m(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
927
- /* @__PURE__ */ e(f, { variant: "XSmall", children: `${g.length} Sub-budgets` }),
928
- /* @__PURE__ */ e(f, { bold: c > 100, color: a, variant: "XSmall", children: r })
932
+ secondary: /* @__PURE__ */ u(C, { component: "span", direction: "row", justifyContent: "space-between", children: [
933
+ /* @__PURE__ */ e(y, { variant: "XSmall", children: `${m.length} Sub-budgets` }),
934
+ /* @__PURE__ */ e(y, { bold: c > 100, color: n, variant: "XSmall", children: r })
929
935
  ] })
930
936
  }
931
937
  )
932
938
  ] }) });
933
- }, Rt = I(() => {
934
- const { onEvent: t } = H(), { budgets: n } = D(), { detailedBudgets: i, setSelectedBudget: s } = w(), a = (o) => {
939
+ }, kt = I(() => {
940
+ const { onEvent: t } = X(), { budgets: a } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), n = (o) => {
935
941
  s(o), t(L.BUDGETS_CLICK_BUDGET_CATEGORY, {
936
942
  budget_category: o.category.name,
937
943
  click_type: "list"
938
944
  });
939
945
  };
940
- return /* @__PURE__ */ m(pe, { elevation: 2, children: [
941
- /* @__PURE__ */ e(we, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Be, { children: n.budget_categories_title }) }),
942
- /* @__PURE__ */ e(he, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(X, { children: i.map((o) => /* @__PURE__ */ m(l.Fragment, { children: [
943
- /* @__PURE__ */ e(Mt, { budget: o, onClick: a }),
944
- /* @__PURE__ */ e(oe, {})
946
+ return /* @__PURE__ */ u(pe, { elevation: 2, children: [
947
+ /* @__PURE__ */ e(De, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(xe, { children: a.budget_categories_title }) }),
948
+ /* @__PURE__ */ e(he, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(W, { children: i.map((o) => /* @__PURE__ */ u(l.Fragment, { children: [
949
+ /* @__PURE__ */ e(Lt, { budget: o, onClick: n }),
950
+ /* @__PURE__ */ e(ae, {})
945
951
  ] }, o.guid)) }) })
946
952
  ] });
947
- }), Lt = I(() => {
948
- const t = J(), { onEvent: n } = H(), { visibleAccounts: i } = ve(), { budgets: s, common: a, recurring: o } = D(), { incomeCategories: r, spendCategories: c } = z(), { detailedBudgets: g, totalBudgeted: d } = w(), { incomeTotal: u } = te(), { setFilter: C } = ne(), [y, p] = l.useState(!1), [b, _] = l.useMemo(() => {
949
- const x = c.reduce((N, se) => N + se.totalAmount, 0);
950
- let S = x / d;
951
- S > 1 && (S = 1);
953
+ }), Nt = I(() => {
954
+ const t = Q(), { onEvent: a } = X(), { visibleAccounts: i } = Ae(), { budgets: s, common: n, recurring: o } = w(), { incomeCategories: r, spendCategories: c } = j(), { detailedBudgets: m, totalBudgeted: g } = D(), { incomeTotal: d } = ee(), { setFilter: f } = oe(), [_, p] = l.useState(!1), [b, S] = l.useMemo(() => {
955
+ const v = c.reduce((z, ie) => z + ie.totalAmount, 0);
956
+ let B = v / g;
957
+ B > 1 && (B = 1);
952
958
  let E = t.palette.success.main;
953
- S > 0.8 && S < 1 ? E = t.palette.warning.main : S >= 1 && (E = t.palette.error.main);
954
- const M = [
959
+ B > 0.8 && B < 1 ? E = t.palette.warning.main : B >= 1 && (E = t.palette.error.main);
960
+ const R = [
955
961
  {
956
962
  color: E,
957
- percentage: `${S}`
963
+ percentage: `${B}`
958
964
  }
959
965
  ];
960
- return [x, M];
961
- }, [g, c]), [h, A] = l.useMemo(() => {
962
- const x = Math.abs(
963
- r.reduce((M, N) => M + N.totalAmount, 0)
966
+ return [v, R];
967
+ }, [m, c]), [h, x] = l.useMemo(() => {
968
+ const v = Math.abs(
969
+ r.reduce((R, z) => R + z.totalAmount, 0)
964
970
  );
965
- let S = x / u;
966
- S > 1 && (S = 1);
971
+ let B = v / d;
972
+ B > 1 && (B = 1);
967
973
  const E = [
968
974
  {
969
975
  color: t.palette.secondary.main,
970
- percentage: `${S}`
976
+ percentage: `${B}`
971
977
  }
972
978
  ];
973
- return [x, E];
974
- }, [r, u]), v = () => {
975
- C({
976
- accounts: i.map((x) => x.guid),
979
+ return [v, E];
980
+ }, [r, d]), A = () => {
981
+ f({
982
+ accounts: i.map((v) => v.guid),
977
983
  dateRange: {
978
- start: ot(/* @__PURE__ */ new Date(), 90),
984
+ start: at(/* @__PURE__ */ new Date(), 90),
979
985
  end: /* @__PURE__ */ new Date()
980
986
  }
981
- }), p(!0), n(L.BUDGETS_CLICK_EDIT_INCOME);
987
+ }), p(!0), a(L.BUDGETS_CLICK_EDIT_INCOME);
982
988
  };
983
- return /* @__PURE__ */ m(pe, { elevation: 2, sx: { overflow: "visible" }, children: [
984
- /* @__PURE__ */ e(we, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Be, { children: s.overview_title }) }),
985
- /* @__PURE__ */ e(he, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(B, { gap: 24, children: [
986
- /* @__PURE__ */ m(B, { gap: 8, children: [
987
- /* @__PURE__ */ e(f, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
988
- /* @__PURE__ */ e(ue, { data: _, height: 16 }),
989
- /* @__PURE__ */ e(f, { variant: "Small", children: R(
989
+ return /* @__PURE__ */ u(pe, { elevation: 2, sx: { overflow: "visible" }, children: [
990
+ /* @__PURE__ */ e(De, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(xe, { children: s.overview_title }) }),
991
+ /* @__PURE__ */ e(he, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ u(C, { gap: 24, children: [
992
+ /* @__PURE__ */ u(C, { gap: 8, children: [
993
+ /* @__PURE__ */ e(y, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
994
+ /* @__PURE__ */ e(me, { data: S, height: 16 }),
995
+ /* @__PURE__ */ e(y, { variant: "Small", children: M(
990
996
  s.spending_description,
991
997
  T(b, "0,0"),
992
- T(d, "0,0")
998
+ T(g, "0,0")
993
999
  ) })
994
1000
  ] }),
995
- /* @__PURE__ */ m(B, { gap: 8, children: [
996
- /* @__PURE__ */ m(B, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
997
- /* @__PURE__ */ e(f, { bold: !0, variant: "Body", children: s.income_title }),
1001
+ /* @__PURE__ */ u(C, { gap: 8, children: [
1002
+ /* @__PURE__ */ u(C, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
1003
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: s.income_title }),
998
1004
  /* @__PURE__ */ e(
999
- at,
1005
+ rt,
1000
1006
  {
1001
1007
  "aria-label": o.manage_income,
1002
- onClick: v,
1008
+ onClick: A,
1003
1009
  sx: { p: 0 },
1004
- children: /* @__PURE__ */ e(P, { color: "primary", name: "edit" })
1010
+ children: /* @__PURE__ */ e(N, { color: "primary", name: "edit" })
1005
1011
  }
1006
1012
  )
1007
1013
  ] }),
1008
- /* @__PURE__ */ e(ue, { data: A, height: 16 }),
1009
- /* @__PURE__ */ e(f, { variant: "Small", children: R(
1014
+ /* @__PURE__ */ e(me, { data: x, height: 16 }),
1015
+ /* @__PURE__ */ e(y, { variant: "Small", children: M(
1010
1016
  s.income_description,
1011
1017
  T(h, "0,0"),
1012
- T(u, "0,0")
1018
+ T(d, "0,0")
1013
1019
  ) })
1014
1020
  ] })
1015
1021
  ] }) }),
1016
1022
  /* @__PURE__ */ e(
1017
1023
  k,
1018
1024
  {
1019
- ariaLabelClose: a.close_aria,
1020
- isOpen: y,
1025
+ ariaLabelClose: n.close_aria,
1026
+ isOpen: _,
1021
1027
  onClose: () => p(!1),
1022
1028
  title: o.manage_income,
1023
- children: /* @__PURE__ */ e(rt, { forOverview: !0 })
1029
+ children: /* @__PURE__ */ e(st, { forOverview: !0 })
1024
1030
  }
1025
1031
  )
1026
1032
  ] });
1027
- }), Se = 480, On = I(({ onBackClick: t, sx: n }) => {
1028
- const i = J(), { onEvent: s } = H(), { visibleAccounts: a } = ve(), { budgets: o, common: r } = D(), { isCopyLoaded: c, isInitialized: g, selectedAccounts: d, setDisplayedDate: u, setSelectedAccounts: C } = ee(), {
1029
- alert: y,
1033
+ }), Be = 480, Rn = I(({ onBackClick: t, sx: a }) => {
1034
+ const i = Q(), { onEvent: s } = X(), { visibleAccounts: n } = Ae(), { budgets: o, common: r } = w(), { isCopyLoaded: c, isInitialized: m, selectedAccounts: g, setDisplayedDate: d, setSelectedAccounts: f } = ne(), {
1035
+ alert: _,
1030
1036
  dateRange: p,
1031
1037
  isDataLoaded: b,
1032
- loadBudgetData: _,
1038
+ loadBudgetData: S,
1033
1039
  setDateRange: h,
1034
- setAlert: A,
1035
- setTheme: v,
1036
- detailedBudgets: x
1037
- } = w(), { loadRepeatingTransactions: S, setDateRange: E } = te(), { reloadCategoryTotals: M } = z(), { isSmallTablet: N, isMobile: se, isSmallMobile: Re } = ge(), U = N || se || Re, [Le, ie] = l.useState(!1);
1038
- l.useEffect(() => (v(i), C(a), h({ start: q(Z()), end: de(Z()) }), s(L.BUDGETS_VIEW), () => {
1039
- h({ start: q(Z()), end: de(Z()) });
1040
+ setAlert: x,
1041
+ setTheme: A,
1042
+ detailedBudgets: v
1043
+ } = D(), { loadRepeatingTransactions: B, setDateRange: E } = ee(), { reloadCategoryTotals: R } = j(), { isSmallTablet: z, isMobile: ie, isSmallMobile: Le } = ge(), U = z || ie || Le, [ke, ce] = l.useState(!1);
1044
+ l.useEffect(() => (A(i), f(n), h({ start: q(Z()), end: ue(Z()) }), s(L.BUDGETS_VIEW), () => {
1045
+ h({ start: q(Z()), end: ue(Z()) });
1040
1046
  }), []), l.useEffect(() => {
1041
- C(a);
1042
- }, [a]), l.useEffect(() => {
1043
- g && (u(p.start, p.end), M(d, p.start, p.end).finally(), E(p), b || (S().finally(), _().finally()));
1044
- }, [g, d, p]);
1045
- const ke = (fe) => {
1046
- h({ start: fe[0] || /* @__PURE__ */ new Date(), end: fe[1] || /* @__PURE__ */ new Date() });
1047
- }, Ne = () => {
1048
- s(L.BUDGETS_CLICK_FILTER);
1049
- }, _e = () => {
1050
- ie(!0), s(L.BUDGETS_CLICK_ADD);
1047
+ f(n);
1048
+ }, [n]), l.useEffect(() => {
1049
+ m && (d(p.start, p.end), R(g, p.start, p.end).finally(), E(p), b || (B().finally(), S().finally()));
1050
+ }, [m, g, p]);
1051
+ const Ne = (_e) => {
1052
+ h({ start: _e[0] || /* @__PURE__ */ new Date(), end: _e[1] || /* @__PURE__ */ new Date() });
1051
1053
  }, Pe = () => {
1052
- ie(!1);
1053
- }, $e = Ye(p.end, q(/* @__PURE__ */ new Date()));
1054
- return !c || !g || !b ? /* @__PURE__ */ e(G, {}) : /* @__PURE__ */ m(
1055
- He,
1054
+ s(L.BUDGETS_CLICK_FILTER);
1055
+ }, fe = () => {
1056
+ ce(!0), s(L.BUDGETS_CLICK_ADD);
1057
+ }, $e = () => {
1058
+ ce(!1);
1059
+ }, Ge = Ze(p.end, q(/* @__PURE__ */ new Date()));
1060
+ return !c || !m || !b ? /* @__PURE__ */ e(G, {}) : /* @__PURE__ */ u(
1061
+ Ke,
1056
1062
  {
1057
- accountOptions: a,
1063
+ accountOptions: n,
1058
1064
  actions: [
1059
1065
  {
1060
1066
  iconName: "add",
1061
1067
  label: o.add_title,
1062
- onClick: _e
1068
+ onClick: fe
1063
1069
  }
1064
1070
  ],
1065
1071
  calendarActions: {
1066
- onRangeChanged: ke,
1067
- shouldDisableNext: $e,
1072
+ onRangeChanged: Ne,
1073
+ shouldDisableNext: Ge,
1068
1074
  shouldDisablePicker: !0
1069
1075
  },
1070
- onAccountsFilterClick: Ne,
1076
+ onAccountsFilterClick: Pe,
1071
1077
  onBackClick: t,
1072
- sx: n,
1078
+ sx: a,
1073
1079
  title: o.budgets_title,
1074
1080
  children: [
1075
- (!g || !b) && /* @__PURE__ */ e(G, {}),
1076
- g && b && /* @__PURE__ */ m(
1077
- B,
1081
+ (!m || !b) && /* @__PURE__ */ e(G, {}),
1082
+ m && b && /* @__PURE__ */ u(
1083
+ C,
1078
1084
  {
1079
1085
  direction: U ? "column" : "row",
1080
1086
  height: "100%",
1081
1087
  sx: { justifyContent: "center" },
1082
1088
  width: "100%",
1083
1089
  children: [
1084
- /* @__PURE__ */ e(B, { height: U ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1085
- Ee,
1090
+ /* @__PURE__ */ e(C, { height: U ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1091
+ Me,
1086
1092
  {
1087
- createBudgetOnClick: _e,
1093
+ createBudgetOnClick: fe,
1088
1094
  height: U ? 450 : 800,
1089
1095
  isDraggable: !0,
1090
- shouldShowZeroState: x.length === 0,
1091
- unavailableWidth: U ? 0 : Se
1096
+ shouldShowZeroState: v.length === 0,
1097
+ unavailableWidth: U ? 0 : Be
1092
1098
  }
1093
1099
  ) }),
1094
- x.length !== 0 && /* @__PURE__ */ m(
1095
- B,
1100
+ v.length !== 0 && /* @__PURE__ */ u(
1101
+ C,
1096
1102
  {
1097
1103
  gap: 24,
1098
1104
  height: "100%",
1099
1105
  sx: { mr: 24, mt: 48 },
1100
- width: U ? "100%" : Se,
1106
+ width: U ? "100%" : Be,
1101
1107
  children: [
1102
- /* @__PURE__ */ e(Lt, {}),
1103
- /* @__PURE__ */ e(Rt, {})
1108
+ /* @__PURE__ */ e(Nt, {}),
1109
+ /* @__PURE__ */ e(kt, {})
1104
1110
  ]
1105
1111
  }
1106
1112
  )
1107
1113
  ]
1108
1114
  }
1109
1115
  ),
1110
- /* @__PURE__ */ e(Ot, {}),
1116
+ /* @__PURE__ */ e(Rt, {}),
1111
1117
  /* @__PURE__ */ e(
1112
1118
  k,
1113
1119
  {
1114
1120
  ariaLabelClose: r.close_aria,
1115
- isOpen: Le,
1116
- onClose: () => ie(!1),
1121
+ isOpen: ke,
1122
+ onClose: () => ce(!1),
1117
1123
  title: o.add_new_title,
1118
- children: /* @__PURE__ */ e(Oe, { onRecalculateBudgets: Pe })
1124
+ children: /* @__PURE__ */ e(Ie, { onRecalculateBudgets: $e })
1119
1125
  }
1120
1126
  ),
1121
1127
  /* @__PURE__ */ e(
1122
- qe,
1128
+ Je,
1123
1129
  {
1124
1130
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
1125
1131
  autoHideDuration: 3500,
1126
1132
  onClose: () => {
1127
- A("");
1133
+ x("");
1128
1134
  },
1129
- open: !!y,
1135
+ open: !!_,
1130
1136
  children: /* @__PURE__ */ e(
1131
- Ze,
1137
+ qe,
1132
1138
  {
1133
1139
  onClose: () => {
1134
- A("");
1140
+ x("");
1135
1141
  },
1136
1142
  severity: "success",
1137
1143
  variant: "filled",
1138
- children: y
1144
+ children: _
1139
1145
  }
1140
1146
  )
1141
1147
  }
@@ -1145,6 +1151,6 @@ const yt = ({
1145
1151
  );
1146
1152
  });
1147
1153
  export {
1148
- En as BubbleBudgetsMiniWidget,
1149
- On as BubbleBudgetsWidget
1154
+ Mn as BubbleBudgetsMiniWidget,
1155
+ Rn as BubbleBudgetsWidget
1150
1156
  };