@mx-cartographer/experiences 7.11.20 → 7.11.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountDetailsHeader-DCTCLB3K.mjs → AccountDetailsHeader-DkBNsLsI.mjs} +2 -2
  3. package/dist/{AccountListItem-CZk-bo6j.mjs → AccountListItem-BIVhda6q.mjs} +2 -2
  4. package/dist/{AccountStore-Cw54qb7Y.mjs → AccountStore-Brc0MNSF.mjs} +1 -1
  5. package/dist/BudgetUtil--_QXyszn.mjs +479 -0
  6. package/dist/{CategorySelectorDrawer-Blb22HWt.mjs → CategorySelectorDrawer-5n6Pil_E.mjs} +1 -1
  7. package/dist/{Connect-Df7iVTcV.mjs → Connect-eYIWqCEr.mjs} +1 -1
  8. package/dist/{ConnectDrawer-CVt-8rPJ.mjs → ConnectDrawer-CioFo6Wy.mjs} +2 -2
  9. package/dist/{ConnectionsDrawer-c7HaKeRj.mjs → ConnectionsDrawer-DqhSaMrJ.mjs} +2 -2
  10. package/dist/{CurrencyInput-bcKNJ22c.mjs → CurrencyInput-DuMktPu3.mjs} +1 -1
  11. package/dist/{ExportCsvAction-B5Mn5uyb.mjs → ExportCsvAction-Bg6gO_Cz.mjs} +3 -3
  12. package/dist/{GlobalAccountFilter-CbwySv6c.mjs → GlobalAccountFilter-B73Pw1hJ.mjs} +1 -1
  13. package/dist/{GoalStore-DXIP9dLt.mjs → GoalStore-0bd-Upkc.mjs} +1 -1
  14. package/dist/{Help-COWDMsJq.mjs → Help-CINT6-wG.mjs} +1 -1
  15. package/dist/{LineChart-DVn1AamK.mjs → LineChart-B1qbKR8q.mjs} +1 -1
  16. package/dist/{ListItemAction-5YhgdUZW.mjs → ListItemAction-CfXGuY7a.mjs} +1 -1
  17. package/dist/{ManageIncome-_ZP3uPwX.mjs → ManageIncome-C0ddaiMR.mjs} +10 -10
  18. package/dist/{MicroWidgetContainer-CMES42I1.mjs → MicroWidgetContainer-B_EnfvCq.mjs} +1 -1
  19. package/dist/{MiniWidgetContainer-DhEx4qKi.mjs → MiniWidgetContainer-Cu72GNsE.mjs} +1 -1
  20. package/dist/{NotificationSettings-D8uSK6m9.mjs → NotificationSettings-DCbMa5mg.mjs} +4 -4
  21. package/dist/{OriginalBalanceAction-DuVHcBdO.mjs → OriginalBalanceAction-CW_xOa6Z.mjs} +3 -3
  22. package/dist/{RecurringSettings-CSrJUzaC.mjs → RecurringSettings-CD1_vCES.mjs} +2 -2
  23. package/dist/{SpendingLegend-Cpd_jtoX.mjs → SpendingLegend-DHi0vx8B.mjs} +1 -1
  24. package/dist/StatusIndicator-wyBzyHJc.mjs +252 -0
  25. package/dist/{Transaction-BR682Yj5.mjs → Transaction-B_2AG36b.mjs} +1 -1
  26. package/dist/TransactionDetails-CgC3Qu7o.mjs +1474 -0
  27. package/dist/{TransactionStore-BbjZQa-N.mjs → TransactionStore-DIbZkSVI.mjs} +2 -2
  28. package/dist/{ViewMoreMicroCard-Bf1J0zYY.mjs → ViewMoreMicroCard-CLHlPWC-.mjs} +1 -1
  29. package/dist/{WidgetContainer-DSs6lJbr.mjs → WidgetContainer-BSCjBupR.mjs} +2 -2
  30. package/dist/accounts/index.es.js +13 -13
  31. package/dist/analytics/index.es.js +11 -11
  32. package/dist/budgets/api/BudgetsApi.d.ts +2 -0
  33. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  34. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  35. package/dist/budgets/index.es.js +550 -609
  36. package/dist/budgets/store/BudgetsStore.d.ts +6 -0
  37. package/dist/budgets/utils/BudgetUtil.d.ts +5 -0
  38. package/dist/cashflow/index.es.js +8 -8
  39. package/dist/categories/index.es.js +1 -1
  40. package/dist/common/index.es.js +254 -224
  41. package/dist/common/types/localization/BudgetsCopy.d.ts +4 -0
  42. package/dist/dashboard/index.es.js +4 -4
  43. package/dist/debts/index.es.js +8 -8
  44. package/dist/{exportTransactionsToCSV-CKHt_UOp.mjs → exportTransactionsToCSV-EwhjfqsJ.mjs} +1 -1
  45. package/dist/finstrong/index.es.js +10 -10
  46. package/dist/goals/index.es.js +10 -10
  47. package/dist/help/index.es.js +4 -4
  48. package/dist/{hooks-zu7yblbi.mjs → hooks-BxkfR-Ff.mjs} +5 -5
  49. package/dist/insights/index.es.js +103 -104
  50. package/dist/investments/index.es.js +4 -4
  51. package/dist/merchants/index.es.js +1 -1
  52. package/dist/microinsights/index.es.js +1 -1
  53. package/dist/networth/index.es.js +6 -6
  54. package/dist/notifications/index.es.js +2 -2
  55. package/dist/recurringtransactions/index.es.js +9 -9
  56. package/dist/settings/index.es.js +7 -7
  57. package/dist/spending/index.es.js +8 -8
  58. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +5 -0
  59. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
  60. package/dist/transactions/index.es.js +16 -16
  61. package/dist/trends/index.es.js +12 -12
  62. package/dist/{useAccountDisplayName-CxYB0Wpw.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
  63. package/dist/{useInsightsEnabled-CYLDtNYt.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
  64. package/dist/{useWidgetLoadTimer-Bmgv_UeH.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
  65. package/package.json +1 -1
  66. package/dist/BudgetUtil-QbRXtLKn.mjs +0 -101
  67. package/dist/StatusIndicator-0iX3Gnnu.mjs +0 -55
  68. package/dist/TransactionDetails-BEKQKH03.mjs +0 -1261
  69. package/dist/TransactionList-CXiLG0Ur.mjs +0 -204
  70. package/dist/User-BIgPTsU6.mjs +0 -372
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.11.21] - 03-14-2026
2
+
3
+ - **ADDED** - `Merchant Budget Flow` Added the Manage Merchant Budget Flow
4
+
1
5
  ## [7.11.20] - 03-12-2026
2
6
 
3
7
  - **FIXED** - `Finstrong` Chart Date Bug Fixed
@@ -3,7 +3,7 @@ import { observer as f } from "mobx-react-lite";
3
3
  import a from "@mui/material/Stack";
4
4
  import { H3 as T, InstitutionLogo as x, Text as l, H2 as D } from "@mxenabled/mxui";
5
5
  import p from "react";
6
- import { G as N, d as _, m as P, f as G, u as O } from "./hooks-zu7yblbi.mjs";
6
+ import { G as N, d as _, l as P, f as G, u as O } from "./hooks-BxkfR-Ff.mjs";
7
7
  import { g as R } from "./AccountFields-DeZSQOuM.mjs";
8
8
  import { A as r } from "./Account-BiB1F8lL.mjs";
9
9
  import w from "@mui/material/Card";
@@ -11,7 +11,7 @@ import v from "@mui/material/CardContent";
11
11
  import L from "@mui/material/CardHeader";
12
12
  import { L as H } from "./Loader-D3rjKx72.mjs";
13
13
  import { I as M, P as U, S as Y } from "./Account-DuOz1a27.mjs";
14
- import { u as j } from "./useAccountDisplayName-CxYB0Wpw.mjs";
14
+ import { u as j } from "./useAccountDisplayName-DKwT1mWv.mjs";
15
15
  import { f as z } from "./NumberFormatting-QCaNwbjv.mjs";
16
16
  const C = () => {
17
17
  if (!p.useContext(N))
@@ -11,8 +11,8 @@ import { InstitutionLogo as L, Text as o } from "@mxenabled/mxui";
11
11
  import { Error as A } from "@mxenabled/mx-icons";
12
12
  import { I as j } from "./IconBacking-B9oC6uL2.mjs";
13
13
  import { g as T } from "./AccountFields-DeZSQOuM.mjs";
14
- import { u as X } from "./useAccountDisplayName-CxYB0Wpw.mjs";
15
- import { u as $ } from "./hooks-zu7yblbi.mjs";
14
+ import { u as X } from "./useAccountDisplayName-DKwT1mWv.mjs";
15
+ import { u as $ } from "./hooks-BxkfR-Ff.mjs";
16
16
  import { C as d } from "./Account-BiB1F8lL.mjs";
17
17
  import { f as k } from "./NumberFormatting-QCaNwbjv.mjs";
18
18
  const w = {
@@ -1,5 +1,5 @@
1
1
  import { makeAutoObservable as h, runInAction as a } from "mobx";
2
- import { i as g } from "./User-BIgPTsU6.mjs";
2
+ import { i as g } from "./BudgetUtil--_QXyszn.mjs";
3
3
  import { A as d } from "./AccountApi-ChQr5PAZ.mjs";
4
4
  import { d as m } from "./Accounts-M-LTzStv.mjs";
5
5
  import { A as s, d as u } from "./Account-BiB1F8lL.mjs";
@@ -0,0 +1,479 @@
1
+ import { jsxs as h, jsx as o } from "react/jsx-runtime";
2
+ import k from "react";
3
+ import { css as R } from "@mxenabled/cssinjs";
4
+ import { addDays as G } from "date-fns/addDays";
5
+ import { addMonths as P } from "date-fns/addMonths";
6
+ import { eachDayOfInterval as Y } from "date-fns/eachDayOfInterval";
7
+ import { eachWeekOfInterval as Z } from "date-fns/eachWeekOfInterval";
8
+ import { endOfMonth as q } from "date-fns/endOfMonth";
9
+ import { format as L } from "date-fns/format";
10
+ import { isBefore as J } from "date-fns/isBefore";
11
+ import { isSameMonth as K } from "date-fns/isSameMonth";
12
+ import { startOfMonth as Q } from "date-fns/startOfMonth";
13
+ import { startOfToday as I } from "date-fns/startOfToday";
14
+ import { subMonths as U } from "date-fns/subMonths";
15
+ import b from "@mui/material/Button";
16
+ import V from "@mui/material/Paper";
17
+ import { H2 as X, Text as z, H3 as tt, P as et } from "@mxenabled/mxui";
18
+ import { ChevronLeft as nt, ChevronRight as rt, Icon as ot } from "@mxenabled/mx-icons";
19
+ import { f as at, D as it } from "./DateFormats-BMpMrZpW.mjs";
20
+ import { isSameDay as f } from "date-fns/isSameDay";
21
+ import { isWithinInterval as st } from "date-fns/isWithinInterval";
22
+ import ct from "@mui/material/styles/useTheme";
23
+ import lt from "@mui/material/Dialog";
24
+ import dt from "@mui/material/DialogActions";
25
+ import mt from "@mui/material/DialogContent";
26
+ import ut from "@mui/material/IconButton";
27
+ import gt from "@mui/material/InputAdornment";
28
+ import E from "@mui/material/Stack";
29
+ import ft from "@mui/material/TextField";
30
+ import { u as pt } from "./useScreenSize-B6JyS_Lj.mjs";
31
+ import { m as ht } from "./hooks-BxkfR-Ff.mjs";
32
+ import { b as T } from "./Category-CevNQ03n.mjs";
33
+ import { b as j } from "./Localization-CPkpIwIx.mjs";
34
+ import { f as O } from "./NumberFormatting-QCaNwbjv.mjs";
35
+ const W = (t, n) => t.find((e) => e.guid === n), xt = (t, n) => t.find((e) => e.guid === n), yt = (t, n) => {
36
+ const e = t.find((r) => r.subCategories.find((a) => a.guid === n));
37
+ if (e)
38
+ return e.subCategories.find((r) => r.guid === n);
39
+ }, ce = (t, n) => {
40
+ const e = [];
41
+ for (const r of n) {
42
+ const a = W(t, r.category_guid);
43
+ if (!a) continue;
44
+ const s = a.parent_guid ?? a.guid, d = W(t, s);
45
+ if (!d) continue;
46
+ const i = {
47
+ amount: r.total,
48
+ category: a,
49
+ guid: a.guid,
50
+ subCategoryTotals: []
51
+ }, l = e.find((m) => m.guid === s);
52
+ l ? (l.amount += r.total, l.subCategoryTotals.push(i)) : e.push({
53
+ amount: r.total,
54
+ category: d,
55
+ guid: s,
56
+ subCategoryTotals: [i]
57
+ });
58
+ }
59
+ return e;
60
+ }, le = (t, n) => {
61
+ const e = t.find((r) => r.guid === n);
62
+ return e ? e.guid === T.INCOME || e.parent_guid === T.INCOME : !1;
63
+ }, Ct = ({ copy: t, date: n, onNextClick: e, onPreviousClick: r }) => {
64
+ const a = bt();
65
+ return /* @__PURE__ */ h("div", { className: `mx-cmn-calendar-header ${a}`, children: [
66
+ /* @__PURE__ */ o(X, { className: "mx-cmn-calendar-header-title", variant: "H3", children: at(n, it.MONTH_YEAR) }),
67
+ /* @__PURE__ */ h("div", { className: "mx-cmn-calendar-header-button-container", children: [
68
+ /* @__PURE__ */ o(b, { "aria-label": t.prevAria, onClick: r, children: /* @__PURE__ */ o(nt, { size: 24 }) }),
69
+ /* @__PURE__ */ o(b, { "aria-label": t.nextAria, onClick: e, children: /* @__PURE__ */ o(rt, { size: 24 }) })
70
+ ] })
71
+ ] });
72
+ }, bt = () => R({
73
+ alignItems: "center",
74
+ display: "flex",
75
+ marginBottom: 16,
76
+ marginRight: -16,
77
+ paddingLeft: 8,
78
+ "& .mx-cmn-calendar-header-title": {
79
+ flexGrow: 1
80
+ },
81
+ "& .mx-cmn-calendar-header-button-container": {
82
+ display: "flex",
83
+ gap: 4
84
+ }
85
+ }), vt = ({ beginDate: t, date: n, endDate: e, isInMonth: r, onClick: a }) => {
86
+ const s = ct(), d = kt(s), i = t && e && st(n, { start: t, end: e }) && !f(n, t) && !f(n, e), l = t && e && f(t, n) && !f(t, e), m = e && t && f(e, n) && !f(t, e), u = t && f(t, n) || e && f(e, n), p = f(n, I());
87
+ return /* @__PURE__ */ o(
88
+ "div",
89
+ {
90
+ className: `
91
+ mx-cmn-calendar-day
92
+ ${d}
93
+ ${r ? "" : "mx-cmn-out-of-month"}
94
+ ${i ? "mx-cmn-date-interval" : ""}
95
+ `,
96
+ children: /* @__PURE__ */ o(
97
+ b,
98
+ {
99
+ className: `
100
+ mx-cmn-calendar-day-button
101
+ ${l ? "mx-cmn-range-start" : ""}
102
+ ${m ? "mx-cmn-range-end" : ""}
103
+ `,
104
+ color: u ? "primary" : "secondary",
105
+ onClick: () => a(n),
106
+ variant: u ? "contained" : "text",
107
+ children: /* @__PURE__ */ o(
108
+ z,
109
+ {
110
+ className: `
111
+ mx-cmn-calendar-day-text
112
+ ${u ? "mx-cmn-day-selected" : ""}
113
+ ${p ? "mx-cmn-today" : ""}`,
114
+ variant: "Small",
115
+ children: L(n, "d")
116
+ }
117
+ )
118
+ }
119
+ )
120
+ }
121
+ );
122
+ }, kt = (t) => R({
123
+ height: B,
124
+ width: B,
125
+ display: "flex",
126
+ justifyContent: "center",
127
+ "&.mx-cmn-out-of-month": {
128
+ backgroundColor: t.palette.background.default
129
+ },
130
+ "&.mx-cmn-date-interval": {
131
+ backgroundColor: t.palette.secondary.light
132
+ },
133
+ "& .MuiButton-root": {
134
+ maxWidth: 44,
135
+ minWidth: 44,
136
+ height: 44,
137
+ padding: 0,
138
+ width: 44,
139
+ "&.mx-cmn-range-start": {
140
+ borderTopRightRadius: 0,
141
+ borderBottomRightRadius: 0,
142
+ "&:focus": {
143
+ boxShadow: "none"
144
+ }
145
+ },
146
+ "&.mx-cmn-range-end": {
147
+ borderTopLeftRadius: 0,
148
+ borderBottomLeftRadius: 0,
149
+ "&:focus": {
150
+ boxShadow: "none"
151
+ }
152
+ }
153
+ },
154
+ "& .mx-cmn-calendar-day-text": {
155
+ "&.mx-cmn-day-selected": {
156
+ color: t.palette.primary,
157
+ "&.mx-cmn-day-selected": {
158
+ borderColor: t.palette.common.white
159
+ }
160
+ },
161
+ "&.mx-cmn-today": {
162
+ borderBottom: `solid 2px ${t.palette.primary.main}`,
163
+ marginBottom: -6,
164
+ paddingBottom: 5
165
+ }
166
+ }
167
+ }), Bt = 340, B = 44;
168
+ var St = /* @__PURE__ */ ((t) => (t.None = "None", t.Single = "Single", t.Range = "Range", t))(St || {});
169
+ const wt = ({
170
+ copy: t,
171
+ beginDate: n = void 0,
172
+ endDate: e = void 0,
173
+ onDateSelected: r,
174
+ onRangeSelected: a,
175
+ selectionType: s = "Single"
176
+ /* Single */
177
+ }) => {
178
+ const d = _t(), [i, l] = k.useState(I), [m, u] = k.useState(n), [p, g] = k.useState(e);
179
+ k.useEffect(() => {
180
+ u(n), g(e), n && l(n);
181
+ }, [n, e]);
182
+ const v = k.useMemo(() => {
183
+ const c = Z({ start: Q(i), end: q(i) }), y = [];
184
+ for (let C = 0; C < c.length; C++) {
185
+ const S = c[C], $ = Y({ start: S, end: G(S, 6) }), A = [];
186
+ for (let M = 0; M < $.length; M++)
187
+ A.push($[M]);
188
+ y.push(A);
189
+ }
190
+ return y;
191
+ }, [i]), w = (c) => {
192
+ if (s !== "None") {
193
+ if (s === "Single") {
194
+ u(c), r?.(c);
195
+ return;
196
+ }
197
+ !m || p ? (u(c), g(void 0)) : J(c, m) ? (g(m), u(c), a?.(c, m)) : (g(c), a?.(m, c));
198
+ }
199
+ }, _ = () => {
200
+ const c = I();
201
+ l(c), s !== "None" && (u(c), s === "Single" ? r?.(c) : (g(c), a?.(c, c)));
202
+ }, N = () => {
203
+ l(P(i, 1));
204
+ }, x = () => {
205
+ l(U(i, 1));
206
+ };
207
+ return /* @__PURE__ */ o("div", { className: `mx-cmn-calendar ${d}`, children: /* @__PURE__ */ h(V, { sx: { boxShadow: "none" }, children: [
208
+ /* @__PURE__ */ o(
209
+ Ct,
210
+ {
211
+ copy: t,
212
+ date: i,
213
+ onNextClick: N,
214
+ onPreviousClick: x
215
+ }
216
+ ),
217
+ /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-header-row", children: v[0].map((c, y) => /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ o(z, { bold: !0, variant: "Small", children: L(c, "EEEEE") }) }, y)) }),
218
+ v.map((c, y) => /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-week", children: c.map((C, S) => /* @__PURE__ */ o(
219
+ vt,
220
+ {
221
+ beginDate: m,
222
+ date: C,
223
+ endDate: p,
224
+ isInMonth: K(C, i),
225
+ onClick: w
226
+ },
227
+ S
228
+ )) }, `w-${y}`)),
229
+ /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ o(b, { onClick: _, size: "small", variant: "text", children: t.today }) })
230
+ ] }) });
231
+ }, _t = () => R({
232
+ width: Bt,
233
+ "& .MuiPaper-root": {
234
+ paddingLeft: 24,
235
+ paddingRight: 24,
236
+ paddingTop: 4,
237
+ paddingBottom: 4
238
+ },
239
+ "& .mx-cmn-calendar-header-row": {
240
+ display: "flex",
241
+ justifyContent: "center",
242
+ textAlign: "center",
243
+ "& .mx-cmn-calendar-header-cell": {
244
+ height: B,
245
+ width: B,
246
+ minWidth: B,
247
+ "& .kmui-text": {
248
+ alignItems: "center",
249
+ display: "flex",
250
+ height: "100%",
251
+ justifyContent: "center",
252
+ width: "100%"
253
+ }
254
+ }
255
+ },
256
+ "& .mx-cmn-calendar-week": {
257
+ display: "flex",
258
+ justifyContent: "center",
259
+ textAlign: "center"
260
+ },
261
+ "& .mx-cmn-calendar-today-container": {
262
+ display: "block",
263
+ marginTop: 16,
264
+ textAlign: "center",
265
+ width: "100%",
266
+ "& > .MuiButton-root": {
267
+ display: "inline-block",
268
+ marginLeft: "auto",
269
+ marginRight: "auto"
270
+ }
271
+ }
272
+ }), de = wt, Nt = ({
273
+ closeAriaLabel: t,
274
+ content: n,
275
+ inputLabel: e,
276
+ inputValue: r,
277
+ isOpen: a,
278
+ handleInputChange: s,
279
+ handleModalClose: d,
280
+ handlePrimaryAction: i,
281
+ handleSecondaryAction: l,
282
+ primaryColor: m = "primary",
283
+ primaryText: u,
284
+ secondaryColor: p = "primary",
285
+ secondaryText: g,
286
+ title: v
287
+ }) => {
288
+ const w = parseFloat(r ?? "0"), _ = r !== "" && r !== "0" && !isNaN(w), { isSmallMobile: N } = pt();
289
+ return /* @__PURE__ */ o(
290
+ lt,
291
+ {
292
+ "aria-label": v,
293
+ "aria-labelledby": "modal-title",
294
+ maxWidth: "xs",
295
+ onClose: d,
296
+ open: a,
297
+ role: "dialog",
298
+ sx: {
299
+ "& .MuiDialogContent-root": { p: 0 },
300
+ ...N && { "& .MuiDialog-paper": { minWidth: "100%" } }
301
+ },
302
+ children: /* @__PURE__ */ o(mt, { children: /* @__PURE__ */ h(
303
+ "form",
304
+ {
305
+ onSubmit: (x) => {
306
+ x.preventDefault(), i();
307
+ },
308
+ children: [
309
+ /* @__PURE__ */ h(
310
+ E,
311
+ {
312
+ sx: {
313
+ alignItems: "center",
314
+ flexDirection: "row",
315
+ justifyContent: "space-between",
316
+ pb: 12,
317
+ pl: 24,
318
+ position: "relative",
319
+ pr: 16,
320
+ pt: 24
321
+ },
322
+ children: [
323
+ /* @__PURE__ */ o(tt, { id: "modal-title", children: v }),
324
+ /* @__PURE__ */ o(
325
+ ut,
326
+ {
327
+ "aria-label": t,
328
+ onClick: d,
329
+ sx: { minHeight: 24, position: "absolute", right: 8, top: 18 },
330
+ children: /* @__PURE__ */ o(ot, { name: "close", sx: { color: "action.active" } })
331
+ }
332
+ )
333
+ ]
334
+ }
335
+ ),
336
+ /* @__PURE__ */ h(E, { sx: { gap: 24, px: 24 }, children: [
337
+ /* @__PURE__ */ o(et, { variant: "subtitle1", children: n }),
338
+ e && /* @__PURE__ */ o(
339
+ ft,
340
+ {
341
+ InputProps: {
342
+ startAdornment: /* @__PURE__ */ o(gt, { position: "start", children: "$" })
343
+ },
344
+ autoFocus: !0,
345
+ inputMode: "decimal",
346
+ inputProps: {
347
+ "aria-label": e,
348
+ noValidate: !0,
349
+ pattern: "[0-9]*\\.?[0-9]*"
350
+ },
351
+ label: e,
352
+ onChange: ({ target: { value: x } }) => {
353
+ /^\d*\.?\d*$/.test(x) && s?.(x);
354
+ },
355
+ type: "text",
356
+ value: r
357
+ }
358
+ )
359
+ ] }),
360
+ /* @__PURE__ */ h(
361
+ dt,
362
+ {
363
+ sx: {
364
+ justifyContent: "flex-end",
365
+ gap: 16,
366
+ p: 24,
367
+ ">:not(style)~:not(style)": { ml: 0 }
368
+ },
369
+ children: [
370
+ g && /* @__PURE__ */ o(
371
+ b,
372
+ {
373
+ "aria-label": g,
374
+ color: p,
375
+ onClick: l,
376
+ children: g
377
+ }
378
+ ),
379
+ /* @__PURE__ */ o(
380
+ b,
381
+ {
382
+ "aria-label": u,
383
+ color: m,
384
+ disabled: e ? !_ : !1,
385
+ onClick: i,
386
+ variant: "contained",
387
+ children: u
388
+ }
389
+ )
390
+ ]
391
+ }
392
+ )
393
+ ]
394
+ }
395
+ ) })
396
+ }
397
+ );
398
+ }, me = Nt, ue = (t, n) => !!t.find((e) => e.feature_name === n)?.is_enabled, H = (t, n) => !t && !n ? 0 : !t && n ? 101 : n / t * 100, D = (t, n) => {
399
+ const e = {
400
+ background: n.palette.success.main,
401
+ description: t <= 100 ? n.palette.text.secondary : n.palette.error.main,
402
+ text: n.palette.common.white,
403
+ mercury: n.palette.success.lighter
404
+ };
405
+ return t > 100 ? (e.background = n.palette.error.main, e.mercury = n.palette.error.lighter) : t > 80 && (e.background = n.palette.warning.main, e.text = n.palette.grey[900], e.mercury = n.palette.warning.lighter), e;
406
+ }, ge = () => {
407
+ const { detailedBudgets: t } = ht();
408
+ return t.map((e) => {
409
+ const r = e.transaction_total;
410
+ return e.amount - r;
411
+ }).reduce((e, r) => e + r, 0);
412
+ }, fe = (t, n, e, r) => {
413
+ const a = [];
414
+ for (const s of t) {
415
+ const d = xt(n, s.category_guid);
416
+ if (!d) continue;
417
+ const i = d.totalAmount, l = H(s.amount, i), m = s.amount - i;
418
+ a.push({
419
+ ...s,
420
+ budgetColors: D(l, r),
421
+ category: d,
422
+ description: j(
423
+ m < 0 ? e.budget_remaining_over : e.budget_remaining_left,
424
+ O(Math.abs(m), "0,0")
425
+ ),
426
+ percentage: l,
427
+ subBudgets: [],
428
+ transaction_total: i
429
+ });
430
+ }
431
+ for (const s of t) {
432
+ const d = yt(n, s.category_guid);
433
+ if (!d) continue;
434
+ const i = d.currentAmount, l = a.find((p) => p.category_guid === d.parent_guid);
435
+ if (!l) continue;
436
+ const m = s.amount - i, u = H(s.amount, i);
437
+ l && l.subBudgets.push({
438
+ ...s,
439
+ budgetColors: D(u, r),
440
+ category: d,
441
+ description: j(
442
+ m < 0 ? e.budget_remaining_over : e.budget_remaining_left,
443
+ O(Math.abs(m), "0,0")
444
+ ),
445
+ percentage: u,
446
+ subBudgets: [],
447
+ transaction_total: i
448
+ });
449
+ }
450
+ return a;
451
+ }, F = (t, n) => t.find((e) => e.guid === n), pe = (t, n, e) => {
452
+ const r = F(t, e);
453
+ if (r)
454
+ return F(r.subBudgets, n);
455
+ }, he = (t, n) => {
456
+ const e = Math.max(0, n - t), r = n > 0 ? Math.min(100, t / n * 100) : 0;
457
+ let a = "success";
458
+ return r >= 100 ? a = "error" : r >= 50 && (a = "warning"), {
459
+ remainingAmount: e,
460
+ spentPercentage: r,
461
+ iconColor: a
462
+ };
463
+ };
464
+ export {
465
+ me as C,
466
+ de as a,
467
+ St as b,
468
+ pe as c,
469
+ fe as d,
470
+ W as e,
471
+ F as f,
472
+ he as g,
473
+ xt as h,
474
+ ue as i,
475
+ yt as j,
476
+ ce as k,
477
+ le as l,
478
+ ge as u
479
+ };
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as _ } from "react/jsx-runtime";
2
2
  import { observer as p } from "mobx-react-lite";
3
3
  import E from "react";
4
4
  import K from "@mui/material/Stack";
5
- import { G as V, m as f, u as S, g as A, b as U } from "./hooks-zu7yblbi.mjs";
5
+ import { G as V, l as f, u as S, g as A, b as U } from "./hooks-BxkfR-Ff.mjs";
6
6
  import Y from "@mui/material/List";
7
7
  import W from "@mui/material/Paper";
8
8
  import k from "@mui/material/Divider";
@@ -5,7 +5,7 @@ import s from "@mui/material/CircularProgress";
5
5
  import m from "@mui/material/Stack";
6
6
  import { Text as a } from "@mxenabled/mxui";
7
7
  import { M as t } from "./Accounts-CseLC3lL.mjs";
8
- import { u as p } from "./hooks-zu7yblbi.mjs";
8
+ import { u as p } from "./hooks-BxkfR-Ff.mjs";
9
9
  const l = ({ status: r = t.Loading }) => {
10
10
  const { connect: n } = p();
11
11
  return /* @__PURE__ */ o(
@@ -3,9 +3,9 @@ import s from "react";
3
3
  import { observer as _ } from "mobx-react-lite";
4
4
  import g from "@mui/material/styles/useTheme";
5
5
  import { ConnectWidget as x } from "@mxenabled/web-widget-sdk";
6
- import { b as a, a as c } from "./Connect-Df7iVTcV.mjs";
6
+ import { b as a, a as c } from "./Connect-eYIWqCEr.mjs";
7
7
  import { M as i } from "./Accounts-CseLC3lL.mjs";
8
- import { d as D, e as L, u as w } from "./hooks-zu7yblbi.mjs";
8
+ import { d as D, e as L, u as w } from "./hooks-BxkfR-Ff.mjs";
9
9
  import { D as y } from "./Drawer-DV4NTsFg.mjs";
10
10
  const I = ({
11
11
  loadWidgetProps: l,
@@ -3,9 +3,9 @@ import s from "react";
3
3
  import { observer as E } from "mobx-react-lite";
4
4
  import { useTheme as _ } from "@mui/material/styles";
5
5
  import { ConnectionsWidget as b } from "@mxenabled/web-widget-sdk";
6
- import { C as a, a as c } from "./Connect-Df7iVTcV.mjs";
6
+ import { C as a, a as c } from "./Connect-eYIWqCEr.mjs";
7
7
  import { M as i } from "./Accounts-CseLC3lL.mjs";
8
- import { d as D, e as L, u as w } from "./hooks-zu7yblbi.mjs";
8
+ import { d as D, e as L, u as w } from "./hooks-BxkfR-Ff.mjs";
9
9
  import { D as x } from "./Drawer-DV4NTsFg.mjs";
10
10
  const I = ({
11
11
  onClose: l,
@@ -4,7 +4,7 @@ import { css as k } from "@mxenabled/cssinjs";
4
4
  import { v4 as q } from "uuid";
5
5
  import { TextField as B, P as _ } from "@mxenabled/mxui";
6
6
  import { g as L, C as O, f as y, M as C } from "./NumberFormatting-QCaNwbjv.mjs";
7
- import { u as W } from "./hooks-zu7yblbi.mjs";
7
+ import { u as W } from "./hooks-BxkfR-Ff.mjs";
8
8
  import { b, g } from "./Localization-CPkpIwIx.mjs";
9
9
  const j = ({
10
10
  allowDecimals: o = !0,
@@ -1,10 +1,10 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { observer as c } from "mobx-react-lite";
3
3
  import { Icon as i } from "@mxenabled/mxui";
4
- import { e as p } from "./exportTransactionsToCSV-CKHt_UOp.mjs";
5
- import { O as m } from "./Transaction-BR682Yj5.mjs";
4
+ import { e as p } from "./exportTransactionsToCSV-EwhjfqsJ.mjs";
5
+ import { O as m } from "./Transaction-B_2AG36b.mjs";
6
6
  import { R as x } from "./ResponsiveButton-DZFp78fJ.mjs";
7
- import { g as _, h as C, u as l } from "./hooks-zu7yblbi.mjs";
7
+ import { g as _, h as C, u as l } from "./hooks-BxkfR-Ff.mjs";
8
8
  const v = ({ filter: t }) => {
9
9
  const { onEvent: r } = _(), { tags: e, sortedTransactions: s } = C(), { transactions: n } = l(), a = () => {
10
10
  r(m.ON_TRANSACTION_EXPORT_CSV_CLICK), p(t ? s.filter(t) : s, e);
@@ -15,7 +15,7 @@ import y from "@mui/material/ListItem";
15
15
  import _ from "@mui/material/ListItemButton";
16
16
  import E from "@mui/material/ListItemIcon";
17
17
  import v from "@mui/material/ListItemText";
18
- import { b as z, u as M, d as L } from "./hooks-zu7yblbi.mjs";
18
+ import { b as z, u as M, d as L } from "./hooks-BxkfR-Ff.mjs";
19
19
  import { u as H } from "./useScreenSize-B6JyS_Lj.mjs";
20
20
  const N = I(
21
21
  ({ allowedAccountTypes: a }) => {
@@ -7,7 +7,7 @@ import O from "@mui/material/CardHeader";
7
7
  import w from "@mui/material/Stack";
8
8
  import { AccountBalance as L, ChevronRight as S } from "@mxenabled/mx-icons";
9
9
  import { Text as g } from "@mxenabled/mxui";
10
- import { C as y } from "./ConnectDrawer-CVt-8rPJ.mjs";
10
+ import { C as y } from "./ConnectDrawer-CioFo6Wy.mjs";
11
11
  import { makeAutoObservable as b, runInAction as u } from "mobx";
12
12
  import { F as D, A as i } from "./Fetch-B6tMJC1r.mjs";
13
13
  import { fromUnixTime as R } from "date-fns/fromUnixTime";
@@ -13,7 +13,7 @@ import E from "@mui/material/Stack";
13
13
  import { H3 as y, P as H, Icon as X, Text as T, H2 as _t, InstitutionLogo as bt } from "@mxenabled/mxui";
14
14
  import { ExpandMore as ot, ChevronRight as wt } from "@mxenabled/mx-icons";
15
15
  import xt from "@mui/material/Breadcrumbs";
16
- import { u as V, z as tt, d as ft, o as St, b as It, a as Tt } from "./hooks-zu7yblbi.mjs";
16
+ import { u as V, z as tt, d as ft, o as St, b as It, a as Tt } from "./hooks-BxkfR-Ff.mjs";
17
17
  import { useTheme as Z } from "@mui/material/styles";
18
18
  import { b as s } from "./Localization-CPkpIwIx.mjs";
19
19
  import { E as Et, a as Ct, P as At } from "./Help-B8mD4aLJ.mjs";
@@ -13,7 +13,7 @@ import { f as p, c as O } from "./NumberFormatting-QCaNwbjv.mjs";
13
13
  import { observer as At } from "mobx-react-lite";
14
14
  import W from "@mui/material/Stack";
15
15
  import { Text as s } from "@mxenabled/mxui";
16
- import { u as Dt } from "./hooks-zu7yblbi.mjs";
16
+ import { u as Dt } from "./hooks-BxkfR-Ff.mjs";
17
17
  import Tt from "@mui/material/useMediaQuery";
18
18
  import { Stack as b, Box as Rt } from "@mui/material";
19
19
  const z = {
@@ -8,7 +8,7 @@ import L from "@mui/material/Stack";
8
8
  import { ChevronRight as _ } from "@mxenabled/mx-icons";
9
9
  import { Text as m } from "@mxenabled/mxui";
10
10
  import { D as g } from "./Dialog-DdCwLgrl.mjs";
11
- import { u as j } from "./hooks-zu7yblbi.mjs";
11
+ import { u as j } from "./hooks-BxkfR-Ff.mjs";
12
12
  const q = v(
13
13
  ({
14
14
  children: n,