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

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