@mx-cartographer/experiences 7.0.6-alpha.al0 → 7.0.6-alpha.mega1

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.
@@ -2,58 +2,51 @@ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import d from "react";
3
3
  import { observer as b } from "mobx-react-lite";
4
4
  import { useVirtualizer as ve } from "@tanstack/react-virtual";
5
- import E from "@mui/material/Box";
5
+ import O from "@mui/material/Box";
6
6
  import ne from "@mui/material/Divider";
7
7
  import ae from "@mui/material/List";
8
- import { MerchantLogo as pe, Icon as f, Text as S, useTokens as J, CategoryIcon as Ce, CategoryIconVariants as we, IconWeight as L, P as ie, H1 as fe, TextField as ge } from "@mxenabled/mxui";
9
- import H from "@mui/material/ListItemAvatar";
8
+ import { MerchantLogo as pe, Icon as f, Text as S, useTokens as J, CategoryIcon as Ce, CategoryIconVariants as we, IconWeight as L, P as se, H1 as fe, TextField as ge } from "@mxenabled/mxui";
9
+ import z from "@mui/material/ListItemAvatar";
10
10
  import $ from "@mui/material/ListItemText";
11
11
  import C from "@mui/material/Stack";
12
12
  import { T as Le, L as Re, O as g, C as ke, b as Pe } from "./Transaction-CyqrHmAA.mjs";
13
- import { G as Ge, f as v, u as x, e as w, l as be, a as Me } from "./hooks-02T565vf.mjs";
13
+ import { G as Ge, f as v, u as I, e as w, l as be, a as Me } from "./hooks-02T565vf.mjs";
14
14
  import { f as Q } from "./NumberFormatting-CtWHhyBX.mjs";
15
- import Ke from "@mui/icons-material/ReceiptOutlined";
15
+ import { Receipt as Ke, Delete as re, ChevronRight as $e, Cancel as oe, Search as Fe, Edit as ze, Flag as Be } from "@mxenabled/mx-icons";
16
16
  import { fromUnixTime as Y } from "date-fns/fromUnixTime";
17
17
  import { isSameDay as Ae } from "date-fns/isSameDay";
18
- import { h as $e } from "./DateUtil-BcuH7ErC.mjs";
19
- import { L as Ie } from "./Loader-Dp1P2gNw.mjs";
18
+ import { h as He } from "./DateUtil-BcuH7ErC.mjs";
19
+ import { L as Ne } from "./Loader-Dp1P2gNw.mjs";
20
20
  import { A as P } from "./WidgetContainer-BG-fdDOf.mjs";
21
21
  import ee from "@mui/material/Paper";
22
- import se from "@mui/material/Button";
23
- import Fe from "@mui/material/FormGroup";
22
+ import le from "@mui/material/Button";
23
+ import Ue from "@mui/material/FormGroup";
24
24
  import Z from "@mui/material/IconButton";
25
- import Ne from "@mui/material/TextField";
26
- import He from "@mui/icons-material/FlagOutlined";
27
- import ze from "@mui/material/ToggleButton";
28
- import xe from "@mui/material/styles/useTheme";
25
+ import xe from "@mui/material/TextField";
26
+ import Xe from "@mui/material/ToggleButton";
27
+ import Ie from "@mui/material/styles/useTheme";
29
28
  import V from "@mui/material/Avatar";
30
- import z from "@mui/material/ListItem";
31
- import B from "@mui/material/ListItemButton";
29
+ import B from "@mui/material/ListItem";
30
+ import H from "@mui/material/ListItemButton";
32
31
  import U from "@mui/material/ListItemIcon";
33
- import { a as Oe } from "./CategorySelectorDrawer-Dyzb3UDU.mjs";
34
- import { a as X, f as Be, D as Ue } from "./Dialog-CWW597AF.mjs";
35
- import { b as re } from "./Localization-2MODESHW.mjs";
36
- import { getUnixTime as Xe } from "date-fns/getUnixTime";
37
- import { D as le } from "./Drawer-kEE73B87.mjs";
38
- import Ve from "@mui/icons-material/HighlightOff";
39
- import We from "@mui/icons-material/Search";
32
+ import { a as De } from "./CategorySelectorDrawer-Dyzb3UDU.mjs";
33
+ import { a as X, f as Ve, D as We } from "./Dialog-CWW597AF.mjs";
34
+ import { b as ie } from "./Localization-2MODESHW.mjs";
35
+ import { getUnixTime as Ye } from "date-fns/getUnixTime";
36
+ import { D as ce } from "./Drawer-kEE73B87.mjs";
40
37
  import he from "@mui/material/InputAdornment";
41
- import oe from "@mui/icons-material/DeleteOutlined";
42
- import Ye from "@mui/icons-material/Edit";
43
38
  import je from "@mui/material/Checkbox";
44
- import me from "@mui/icons-material/Cancel";
45
- import ue from "@mui/material/Grid";
46
- import qe from "@mui/icons-material/ChevronRight";
47
- import { C as Ze } from "./CurrencyInput-CSZjO22Z.mjs";
48
- import Je from "@mui/material/Switch";
39
+ import me from "@mui/material/Grid";
40
+ import { C as qe } from "./CurrencyInput-CSZjO22Z.mjs";
41
+ import Ze from "@mui/material/Switch";
49
42
  var q = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(q || {}), te = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(te || {});
50
- const Qe = [
43
+ const Je = [
51
44
  0,
52
45
  1,
53
46
  2,
54
47
  3
55
48
  /* Tags */
56
- ], et = [
49
+ ], Qe = [
57
50
  0,
58
51
  1,
59
52
  2
@@ -63,22 +56,22 @@ const Qe = [
63
56
  throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
64
57
  return v().uiStore;
65
58
  };
66
- function tt() {
59
+ function et() {
67
60
  return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
68
61
  }
69
- function nt(t) {
70
- const r = tt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), n = window.parent || window.opener || !1;
62
+ function tt(t) {
63
+ const r = et().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), n = window.parent || window.opener || !1;
71
64
  return n && n.postMessage && r ? (n.postMessage(t, r), !0) : !1;
72
65
  }
73
- function at(t) {
74
- return nt({
66
+ function nt(t) {
67
+ return tt({
75
68
  metadata: { beat_guid: t },
76
69
  mx: !0,
77
70
  type: "mx/moneyDashboard/insightOnTransaction"
78
71
  });
79
72
  }
80
- const rt = ({ transaction: t, onClick: r }) => {
81
- const { associatedBeats: n } = v(), { expandedSplits: s } = G(), { transactions: o } = x(), { showInsights: a } = G(), i = t.transaction_type === Le.CREDIT, l = d.useMemo(() => n.find((_) => _.associated_transaction_guid === t.guid), [n, t]);
73
+ const at = ({ transaction: t, onClick: r }) => {
74
+ const { associatedBeats: n } = v(), { expandedSplits: s } = G(), { transactions: o } = I(), { showInsights: a } = G(), i = t.transaction_type === Le.CREDIT, l = d.useMemo(() => n.find((_) => _.associated_transaction_guid === t.guid), [n, t]);
82
75
  return (
83
76
  //TODO: implement common/components/ListItemRow.tsx
84
77
  /* @__PURE__ */ c(
@@ -87,7 +80,7 @@ const rt = ({ transaction: t, onClick: r }) => {
87
80
  clickEventName: g.ON_TRANSACTION_LIST_ITEM_CLICK,
88
81
  onClick: r ? () => r(t.guid) : void 0,
89
82
  children: [
90
- /* @__PURE__ */ e(H, { children: t.parent_guid && s.includes(t.parent_guid) ? /* @__PURE__ */ e(d.Fragment, {}) : /* @__PURE__ */ e(
83
+ /* @__PURE__ */ e(z, { children: t.parent_guid && s.includes(t.parent_guid) ? /* @__PURE__ */ e(d.Fragment, {}) : /* @__PURE__ */ e(
91
84
  pe,
92
85
  {
93
86
  categoryGuid: t.top_level_category_guid || "",
@@ -111,7 +104,7 @@ const rt = ({ transaction: t, onClick: r }) => {
111
104
  bold: !0,
112
105
  color: "action.active",
113
106
  onClick: (_) => {
114
- _.stopPropagation(), _.preventDefault(), at(l.guid);
107
+ _.stopPropagation(), _.preventDefault(), nt(l.guid);
115
108
  },
116
109
  variant: "XSmall",
117
110
  children: l.short_title
@@ -143,55 +136,55 @@ const rt = ({ transaction: t, onClick: r }) => {
143
136
  }
144
137
  )
145
138
  );
146
- }, ot = b(rt), it = ({
139
+ }, rt = b(at), ot = ({
147
140
  bgcolor: t = "background.default",
148
141
  children: r
149
- }) => /* @__PURE__ */ e(E, { display: "inline-block", pb: 4, pl: 24, pt: 4, sx: { bgcolor: t }, children: /* @__PURE__ */ e(S, { bold: !0, variant: "XSmall", children: r }) }), st = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
150
- const n = J(), { transactions: s } = x();
142
+ }) => /* @__PURE__ */ e(O, { display: "inline-block", pb: 4, pl: 24, pt: 4, sx: { bgcolor: t }, children: /* @__PURE__ */ e(S, { bold: !0, variant: "XSmall", children: r }) }), it = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
143
+ const n = J(), { transactions: s } = I();
151
144
  return /* @__PURE__ */ c(C, { alignItems: "center", gap: n.Spacing.Small, height: "auto", mt: n.Spacing.Large, children: [
152
145
  t && /* @__PURE__ */ e(Ke, { color: "secondary", sx: { fontSize: 32 } }),
153
146
  /* @__PURE__ */ e(S, { bold: !0, color: "secondary", variant: "Small", children: s.zero_state_no_transactions }),
154
147
  r && /* @__PURE__ */ e(S, { color: "secondary", variant: "XSmall", children: s.zero_state_there_are_no_transactions })
155
148
  ] });
156
- }, lt = b(st), Te = (t, r) => {
149
+ }, st = b(it), Te = (t, r) => {
157
150
  const n = Y(r[t].date), s = Y(r[t - 1]?.date);
158
151
  return !Ae(n, s);
159
- }, ct = (t, r) => {
152
+ }, lt = (t, r) => {
160
153
  const n = Y(r[t].date), s = Y(r[t + 1]?.date);
161
154
  return Ae(n, s);
162
- }, Se = 65, ye = 34, dt = ({
155
+ }, Se = 65, ye = 34, ct = ({
163
156
  bgcolor: t,
164
157
  filter: r,
165
158
  height: n = "calc(100dvh - 36px)",
166
- loader: s = /* @__PURE__ */ e(Ie, { label: "Loading", size: 40 }),
159
+ loader: s = /* @__PURE__ */ e(Ne, { label: "Loading", size: 40 }),
167
160
  onClick: o,
168
161
  showInsights: a = !1,
169
162
  showLoader: i = !1,
170
163
  showHiddenTransactions: l = !1,
171
164
  width: _ = "100%",
172
- zeroState: u = /* @__PURE__ */ e(lt, {})
165
+ zeroState: u = /* @__PURE__ */ e(st, {})
173
166
  }) => {
174
167
  const { isLoading: m, sortedTransactions: p } = v(), h = d.useMemo(() => {
175
- const N = r ? p.filter(r) : p;
176
- return l ? N : N.filter((k) => !k.is_hidden);
177
- }, [p, l]), { clearExpandedSplits: A, setShowInsights: T, toggleSplit: I } = G(), { onEvent: y } = w(), R = (N) => {
178
- const k = h.find((W) => W.guid === N);
168
+ const x = r ? p.filter(r) : p;
169
+ return l ? x : x.filter((k) => !k.is_hidden);
170
+ }, [p, l]), { clearExpandedSplits: A, setShowInsights: T, toggleSplit: N } = G(), { onEvent: y } = w(), R = (x) => {
171
+ const k = h.find((W) => W.guid === x);
179
172
  if (k?.has_been_split) {
180
- I(k.guid);
173
+ N(k.guid);
181
174
  return;
182
175
  }
183
176
  y(P.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
184
177
  account_guid: k?.account_guid,
185
- transaction_guid: N
186
- }), o?.(N);
178
+ transaction_guid: x
179
+ }), o?.(x);
187
180
  }, M = d.useRef(null), K = ve({
188
181
  count: h.length,
189
182
  getScrollElement: () => M.current,
190
- estimateSize: (N) => Se + (Te(N, h) ? ye : 0),
183
+ estimateSize: (x) => Se + (Te(x, h) ? ye : 0),
191
184
  overscan: 5
192
185
  });
193
- return d.useEffect(() => K.measure(), [h]), d.useEffect(() => T(a), [a]), d.useEffect(() => () => A(), []), /* @__PURE__ */ e(ae, { sx: { width: _ }, children: /* @__PURE__ */ e(E, { height: n, overflow: "auto", ref: M, width: _, children: /* @__PURE__ */ c(
194
- E,
186
+ return d.useEffect(() => K.measure(), [h]), d.useEffect(() => T(a), [a]), d.useEffect(() => () => A(), []), /* @__PURE__ */ e(ae, { sx: { width: _ }, children: /* @__PURE__ */ e(O, { height: n, overflow: "auto", ref: M, width: _, children: /* @__PURE__ */ c(
187
+ O,
195
188
  {
196
189
  height: (
197
190
  // set the height to auto when there are no transactions so the zero state isn't set to 0
@@ -202,21 +195,21 @@ const rt = ({ transaction: t, onClick: r }) => {
202
195
  children: [
203
196
  (m || i) && s,
204
197
  !m && !i && K.getVirtualItems().length === 0 && u,
205
- !m && !i && K.getVirtualItems().length > 0 && K.getVirtualItems().map((N) => {
206
- const k = h[N.index], W = Te(N.index, h), ce = ct(N.index, h), de = Se + (W ? ye : 0);
198
+ !m && !i && K.getVirtualItems().length > 0 && K.getVirtualItems().map((x) => {
199
+ const k = h[x.index], W = Te(x.index, h), de = lt(x.index, h), _e = Se + (W ? ye : 0);
207
200
  return /* @__PURE__ */ c(
208
- E,
201
+ O,
209
202
  {
210
203
  sx: {
211
- height: de,
204
+ height: _e,
212
205
  position: "absolute",
213
- transform: `translateY(${N.start}px)`,
206
+ transform: `translateY(${x.start}px)`,
214
207
  width: "100%"
215
208
  },
216
209
  children: [
217
- W && /* @__PURE__ */ e(it, { bgcolor: t, children: $e(k.date) }),
218
- /* @__PURE__ */ e(ot, { onClick: R, transaction: k }),
219
- /* @__PURE__ */ e(ne, { sx: { ml: ce ? 24 : 0 } })
210
+ W && /* @__PURE__ */ e(ot, { bgcolor: t, children: He(k.date) }),
211
+ /* @__PURE__ */ e(rt, { onClick: R, transaction: k }),
212
+ /* @__PURE__ */ e(ne, { sx: { ml: de ? 24 : 0 } })
220
213
  ]
221
214
  },
222
215
  k.guid
@@ -225,8 +218,8 @@ const rt = ({ transaction: t, onClick: r }) => {
225
218
  ]
226
219
  }
227
220
  ) }) });
228
- }, Mn = b(dt), _t = ({ transaction: t }) => {
229
- const { addOrUpdateTransactionRule: r, updateTransaction: n } = v(), { categories: s } = be(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: a, updateManualTransaction: i } = G(), { transactions: l } = x(), [_, u] = d.useState(!1), [m, p] = d.useState(""), h = async (y) => {
221
+ }, On = b(ct), dt = ({ transaction: t }) => {
222
+ const { addOrUpdateTransactionRule: r, updateTransaction: n } = v(), { categories: s } = be(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: a, updateManualTransaction: i } = G(), { transactions: l } = I(), [_, u] = d.useState(!1), [m, p] = d.useState(""), h = async (y) => {
230
223
  await n({ ...t, category_guid: m }), y && await r(m, t), p(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
231
224
  transaction_guid: t.guid
232
225
  });
@@ -244,19 +237,19 @@ const rt = ({ transaction: t, onClick: r }) => {
244
237
  T();
245
238
  }, T = () => {
246
239
  u(!1), a(!1);
247
- }, I = d.useMemo(
240
+ }, N = d.useMemo(
248
241
  () => s.find((y) => y.guid === m),
249
242
  [m]
250
243
  );
251
244
  return /* @__PURE__ */ c(d.Fragment, { children: [
252
- /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
253
- B,
245
+ /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
246
+ H,
254
247
  {
255
248
  onClick: () => {
256
249
  o(g.ON_TRANSACTION_CATEGORY_CLICK), u(!0);
257
250
  },
258
251
  children: [
259
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
252
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
260
253
  Ce,
261
254
  {
262
255
  categoryGuid: t.top_level_category_guid,
@@ -278,7 +271,7 @@ const rt = ({ transaction: t, onClick: r }) => {
278
271
  }
279
272
  ) }),
280
273
  /* @__PURE__ */ e(
281
- Oe,
274
+ De,
282
275
  {
283
276
  initialSelected: t.category_guid,
284
277
  onClose: T,
@@ -291,7 +284,7 @@ const rt = ({ transaction: t, onClick: r }) => {
291
284
  X,
292
285
  {
293
286
  copy: {
294
- title: re(
287
+ title: ie(
295
288
  l.actions_apply_to_all_transaction_types,
296
289
  t.description
297
290
  )
@@ -302,17 +295,17 @@ const rt = ({ transaction: t, onClick: r }) => {
302
295
  onSecondaryAction: () => h(!1),
303
296
  primaryText: l.actions_apply_to_all,
304
297
  secondaryText: l.actions_this_time_only,
305
- children: /* @__PURE__ */ e(ie, { variant: "Paragraph", children: re(
298
+ children: /* @__PURE__ */ e(se, { variant: "Paragraph", children: ie(
306
299
  l.actions_all_past_and_future,
307
300
  t.description,
308
- I?.name
301
+ N?.name
309
302
  ) })
310
303
  }
311
304
  )
312
305
  ] });
313
- }, ut = ({ transaction: t }) => {
314
- const r = J(), { onEvent: n } = w(), { updateTransaction: s } = v(), { updateManualTransaction: o } = G(), { common: a, transactions: i } = x(), [l, _] = d.useState(!1), [u, m] = d.useState(t.date), p = (A) => {
315
- m(Xe(A));
306
+ }, _t = ({ transaction: t }) => {
307
+ const r = J(), { onEvent: n } = w(), { updateTransaction: s } = v(), { updateManualTransaction: o } = G(), { common: a, transactions: i } = I(), [l, _] = d.useState(!1), [u, m] = d.useState(t.date), p = (A) => {
308
+ m(Ye(A));
316
309
  }, h = async () => {
317
310
  if (t.is_manual && !t.guid) {
318
311
  o({ ...t, date: u }), _(!1);
@@ -320,21 +313,21 @@ const rt = ({ transaction: t, onClick: r }) => {
320
313
  }
321
314
  await s({ ...t, date: u }), n(P.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), _(!1);
322
315
  };
323
- return /* @__PURE__ */ c(E, { className: "mx-txn-date-action", children: [
324
- /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
325
- B,
316
+ return /* @__PURE__ */ c(O, { className: "mx-txn-date-action", children: [
317
+ /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
318
+ H,
326
319
  {
327
320
  onClick: () => {
328
321
  n(g.ON_TRANSACTION_DATE_CLICK), _(!0);
329
322
  },
330
323
  children: [
331
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "calendar_month", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
324
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "calendar_month", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
332
325
  /* @__PURE__ */ e(
333
326
  $,
334
327
  {
335
328
  primary: i.date_title,
336
329
  primaryTypographyProps: { variant: "XSmall" },
337
- secondary: /* @__PURE__ */ e(S, { bold: !0, variant: "Body", children: Be(Y(t.date), Ue.YEAR_MONTH_DAY) })
330
+ secondary: /* @__PURE__ */ e(S, { bold: !0, variant: "Body", children: Ve(Y(t.date), We.YEAR_MONTH_DAY) })
338
331
  }
339
332
  ),
340
333
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(f, { name: "chevron_right", weight: L.Dark }) })
@@ -342,7 +335,7 @@ const rt = ({ transaction: t, onClick: r }) => {
342
335
  }
343
336
  ) }),
344
337
  /* @__PURE__ */ e(
345
- le,
338
+ ce,
346
339
  {
347
340
  ariaLabelClose: a.close_aria,
348
341
  isOpen: l,
@@ -367,19 +360,19 @@ const rt = ({ transaction: t, onClick: r }) => {
367
360
  }
368
361
  )
369
362
  ] });
370
- }, mt = ({ transaction: t }) => {
371
- const { onEvent: r } = w(), { removeTransaction: n } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: a } = x(), [i, l] = d.useState(!1), _ = async () => {
363
+ }, ut = ({ transaction: t }) => {
364
+ const { onEvent: r } = w(), { removeTransaction: n } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: a } = I(), [i, l] = d.useState(!1), _ = async () => {
372
365
  await n(t.guid), r(g.ON_TRANSACTION_DELETE_DELETED);
373
366
  };
374
- return /* @__PURE__ */ c(E, { className: "mx-txn-delete", children: [
375
- t && /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
376
- B,
367
+ return /* @__PURE__ */ c(O, { className: "mx-txn-delete", children: [
368
+ t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
369
+ H,
377
370
  {
378
371
  onClick: () => {
379
372
  r(g.ON_TRANSACTION_DELETE_CLICK), s(!0), l(!0);
380
373
  },
381
374
  children: [
382
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { variant: "rounded", children: /* @__PURE__ */ e(oe, { color: "secondary", fontSize: "small" }) }) }),
375
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { variant: "rounded", children: /* @__PURE__ */ e(re, { color: "secondary", fontSize: "small" }) }) }),
383
376
  /* @__PURE__ */ e(
384
377
  $,
385
378
  {
@@ -387,7 +380,7 @@ const rt = ({ transaction: t, onClick: r }) => {
387
380
  secondary: a.manual_transaction_delete_subtitle
388
381
  }
389
382
  ),
390
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(oe, {}) })
383
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(re, {}) })
391
384
  ]
392
385
  }
393
386
  ) }),
@@ -407,21 +400,21 @@ const rt = ({ transaction: t, onClick: r }) => {
407
400
  }
408
401
  )
409
402
  ] });
410
- }, pt = b(mt), gt = ({ transaction: t }) => {
411
- const { onEvent: r } = w(), { updateTransaction: n } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: a } = x(), [i, l] = d.useState(!1), _ = async () => {
403
+ }, mt = b(ut), pt = ({ transaction: t }) => {
404
+ const { onEvent: r } = w(), { updateTransaction: n } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: a } = I(), [i, l] = d.useState(!1), _ = async () => {
412
405
  await n({ ...t, merchant_guid: "" }), r(P.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
413
406
  transaction_guid: t.guid
414
407
  });
415
408
  };
416
- return /* @__PURE__ */ c(E, { className: "mx-txn-delete-logo", children: [
417
- t && /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
418
- B,
409
+ return /* @__PURE__ */ c(O, { className: "mx-txn-delete-logo", children: [
410
+ t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
411
+ H,
419
412
  {
420
413
  onClick: () => {
421
414
  r(g.ON_TRANSACTION_DELETE_LOGO_CLICK), l(!0);
422
415
  },
423
416
  children: [
424
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "delete", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
417
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "delete", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
425
418
  /* @__PURE__ */ e($, { primary: a.merchant_logo_title, secondary: a.merchant_logo_desc }),
426
419
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(f, { name: "chevron_right", weight: L.Dark }) })
427
420
  ]
@@ -447,15 +440,15 @@ const rt = ({ transaction: t, onClick: r }) => {
447
440
  }
448
441
  )
449
442
  ] });
450
- }, ht = b(gt), Tt = ({ transaction: t }) => {
451
- const { onEvent: r } = w(), { updateTransaction: n } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: a } = x(), [i, l] = d.useState(!1), _ = t.is_hidden, u = async () => {
443
+ }, gt = b(pt), ht = ({ transaction: t }) => {
444
+ const { onEvent: r } = w(), { updateTransaction: n } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: a } = I(), [i, l] = d.useState(!1), _ = t.is_hidden, u = async () => {
452
445
  await n({ ...t, is_hidden: !t.is_hidden }), r(
453
446
  _ ? g.ON_TRANSACTION_UNHIDDEN : g.ON_TRANSACTION_HIDDEN
454
447
  );
455
448
  };
456
- return /* @__PURE__ */ c(E, { className: "mx-txn-hide-transaction", children: [
457
- t && /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
458
- B,
449
+ return /* @__PURE__ */ c(O, { className: "mx-txn-hide-transaction", children: [
450
+ t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
451
+ H,
459
452
  {
460
453
  "aria-checked": _,
461
454
  onClick: () => {
@@ -470,7 +463,7 @@ const rt = ({ transaction: t, onClick: r }) => {
470
463
  },
471
464
  role: "switch",
472
465
  children: [
473
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: _ ? /* @__PURE__ */ e(
466
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: _ ? /* @__PURE__ */ e(
474
467
  f,
475
468
  {
476
469
  name: "visibilityOff",
@@ -486,7 +479,7 @@ const rt = ({ transaction: t, onClick: r }) => {
486
479
  }
487
480
  ),
488
481
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
489
- Je,
482
+ Ze,
490
483
  {
491
484
  checked: _,
492
485
  id: "hide-transaction",
@@ -517,7 +510,7 @@ const rt = ({ transaction: t, onClick: r }) => {
517
510
  }
518
511
  )
519
512
  ] });
520
- }, St = b(Tt), De = ({ transaction: t }) => {
513
+ }, Tt = b(ht), Ee = ({ transaction: t }) => {
521
514
  const { amount: r, description: n, isIncome: s, merchant_guid: o, payee: a, top_level_category_guid: i } = t;
522
515
  return /* @__PURE__ */ c(C, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
523
516
  /* @__PURE__ */ e(
@@ -536,8 +529,8 @@ const rt = ({ transaction: t, onClick: r }) => {
536
529
  ] })
537
530
  ] })
538
531
  ] });
539
- }, yt = ({ transaction: t }) => {
540
- const { onEvent: r } = w(), { updateTransaction: n } = v(), { updateManualTransaction: s } = G(), { common: o, transactions: a } = x(), [i, l] = d.useState(!1), [_, u] = d.useState("");
532
+ }, St = ({ transaction: t }) => {
533
+ const { onEvent: r } = w(), { updateTransaction: n } = v(), { updateManualTransaction: s } = G(), { common: o, transactions: a } = I(), [i, l] = d.useState(!1), [_, u] = d.useState("");
541
534
  d.useEffect(() => {
542
535
  i && u(t.memo ? t.memo : "");
543
536
  }, [i]);
@@ -549,14 +542,14 @@ const rt = ({ transaction: t, onClick: r }) => {
549
542
  await n({ ...t, memo: _ }), r(P.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), l(!1);
550
543
  };
551
544
  return /* @__PURE__ */ c("div", { className: "mx-txn-memo-action", children: [
552
- /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
553
- B,
545
+ /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
546
+ H,
554
547
  {
555
548
  onClick: () => {
556
549
  r(g.ON_TRANSACTION_MEMO_CLICK), l(!0);
557
550
  },
558
551
  children: [
559
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "article", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
552
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "article", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
560
553
  /* @__PURE__ */ e(
561
554
  $,
562
555
  {
@@ -578,7 +571,7 @@ const rt = ({ transaction: t, onClick: r }) => {
578
571
  }
579
572
  ) }),
580
573
  /* @__PURE__ */ c(
581
- le,
574
+ ce,
582
575
  {
583
576
  ariaLabelClose: o.close_aria,
584
577
  isOpen: i,
@@ -586,9 +579,9 @@ const rt = ({ transaction: t, onClick: r }) => {
586
579
  onPrimaryAction: m,
587
580
  title: a.memo_title,
588
581
  children: [
589
- /* @__PURE__ */ e(De, { transaction: t }),
582
+ /* @__PURE__ */ e(Ee, { transaction: t }),
590
583
  /* @__PURE__ */ e(
591
- Ne,
584
+ xe,
592
585
  {
593
586
  "aria-label": a.memo_desc_aria,
594
587
  focused: !0,
@@ -606,37 +599,37 @@ const rt = ({ transaction: t, onClick: r }) => {
606
599
  }
607
600
  )
608
601
  ] });
609
- }, Ct = b(yt), ft = ({
602
+ }, yt = b(St), Ct = ({
610
603
  index: t,
611
604
  onDeleteRow: r,
612
605
  onCategoryChanged: n,
613
606
  onUpdateAmount: s,
614
607
  split: o
615
608
  }) => {
616
- const a = J(), { onEvent: i } = w(), { transactions: l } = x(), [_, u] = d.useState(`${o.amount}`), [m, p] = d.useState(!1), h = t === 0, A = (T) => {
609
+ const a = J(), { onEvent: i } = w(), { transactions: l } = I(), [_, u] = d.useState(`${o.amount}`), [m, p] = d.useState(!1), h = t === 0, A = (T) => {
617
610
  isNaN(Number(T)) || (u(T), s(t, Number(T)));
618
611
  };
619
612
  return /* @__PURE__ */ c(
620
- E,
613
+ O,
621
614
  {
622
615
  bgcolor: "background.paper",
623
616
  className: "mx-txn-split-manager-row",
624
617
  pb: a.Spacing.Tiny,
625
618
  px: a.Spacing.XSmall,
626
619
  children: [
627
- /* @__PURE__ */ c(ue, { alignItems: h ? "center" : "start", container: !0, children: [
628
- /* @__PURE__ */ e(ue, { item: !0, xs: 7, children: /* @__PURE__ */ c(C, { alignItems: "start", children: [
620
+ /* @__PURE__ */ c(me, { alignItems: h ? "center" : "start", container: !0, children: [
621
+ /* @__PURE__ */ e(me, { item: !0, xs: 7, children: /* @__PURE__ */ c(C, { alignItems: "start", children: [
629
622
  /* @__PURE__ */ e(
630
- se,
623
+ le,
631
624
  {
632
- endIcon: /* @__PURE__ */ e(qe, {}),
625
+ endIcon: /* @__PURE__ */ e($e, {}),
633
626
  onClick: () => p(!0),
634
627
  startIcon: /* @__PURE__ */ e(Ce, { categoryGuid: o.top_level_category_guid }),
635
628
  sx: { px: a.Spacing.Small, py: a.Spacing.XSmall },
636
629
  children: o.category
637
630
  }
638
631
  ),
639
- /* @__PURE__ */ e(E, { children: !o.category_guid && /* @__PURE__ */ c(
632
+ /* @__PURE__ */ e(O, { children: !o.category_guid && /* @__PURE__ */ c(
640
633
  C,
641
634
  {
642
635
  color: "error.main",
@@ -644,16 +637,16 @@ const rt = ({ transaction: t, onClick: r }) => {
644
637
  gap: a.Spacing.XSmall,
645
638
  p: a.Spacing.Small,
646
639
  children: [
647
- /* @__PURE__ */ e(me, { sx: { fontSize: a.FontSize.Body } }),
640
+ /* @__PURE__ */ e(oe, { sx: { fontSize: a.FontSize.Body } }),
648
641
  /* @__PURE__ */ e(S, { variant: "Small", children: l.split_transaction_errors_select_category })
649
642
  ]
650
643
  }
651
644
  ) })
652
645
  ] }) }),
653
- /* @__PURE__ */ e(ue, { item: !0, xs: 5, children: h ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(S, { children: Q(o.amount, "0,0.00") }) }) : /* @__PURE__ */ c(C, { alignItems: "start", children: [
646
+ /* @__PURE__ */ e(me, { item: !0, xs: 5, children: h ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(S, { children: Q(o.amount, "0,0.00") }) }) : /* @__PURE__ */ c(C, { alignItems: "start", children: [
654
647
  /* @__PURE__ */ c(C, { alignItems: "start", direction: "row", gap: a.Spacing.XSmall, children: [
655
648
  /* @__PURE__ */ e(
656
- Ze,
649
+ qe,
657
650
  {
658
651
  amount: _,
659
652
  "aria-label": l.split_transaction_edit_split_amount,
@@ -677,7 +670,7 @@ const rt = ({ transaction: t, onClick: r }) => {
677
670
  i(g.ON_TRANSACTION_SPLIT_DELETE_CLICK), r(t);
678
671
  },
679
672
  sx: { w: 44, h: 44 },
680
- children: /* @__PURE__ */ e(oe, {})
673
+ children: /* @__PURE__ */ e(re, {})
681
674
  }
682
675
  )
683
676
  ] }),
@@ -689,7 +682,7 @@ const rt = ({ transaction: t, onClick: r }) => {
689
682
  gap: a.Spacing.XSmall,
690
683
  py: a.Spacing.Small,
691
684
  children: [
692
- /* @__PURE__ */ e(me, { sx: { fontSize: a.FontSize.Body } }),
685
+ /* @__PURE__ */ e(oe, { sx: { fontSize: a.FontSize.Body } }),
693
686
  /* @__PURE__ */ e(S, { variant: "Small", children: l.split_transaction_errors_enter_an_amount })
694
687
  ]
695
688
  }
@@ -697,7 +690,7 @@ const rt = ({ transaction: t, onClick: r }) => {
697
690
  ] }) })
698
691
  ] }),
699
692
  /* @__PURE__ */ e(
700
- Oe,
693
+ De,
701
694
  {
702
695
  initialSelected: o.category_guid,
703
696
  onClose: () => p(!1),
@@ -711,7 +704,7 @@ const rt = ({ transaction: t, onClick: r }) => {
711
704
  ]
712
705
  }
713
706
  );
714
- }, bt = b(ft), At = ({
707
+ }, ft = b(Ct), bt = ({
715
708
  onAddSplit: t,
716
709
  onCategoryChanged: r,
717
710
  onDeleteSplit: n,
@@ -719,17 +712,17 @@ const rt = ({ transaction: t, onClick: r }) => {
719
712
  splits: o,
720
713
  transaction: a
721
714
  }) => {
722
- const i = J(), { transactions: l } = x(), { onEvent: _ } = w(), [u, m] = d.useState("");
715
+ const i = J(), { transactions: l } = I(), { onEvent: _ } = w(), [u, m] = d.useState("");
723
716
  return d.useEffect(() => {
724
717
  m(o.length <= 1 ? l.split_transaction_errors_min_splits : ""), m(
725
- o[0].amount < 0 ? re(
718
+ o[0].amount < 0 ? ie(
726
719
  l.split_transaction_errors_totals_must_equal_amount,
727
720
  Q(a.amount, "0,0.00")
728
721
  ) : ""
729
722
  );
730
- }, [o]), /* @__PURE__ */ c(E, { className: "mx-txn-split-manager", children: [
723
+ }, [o]), /* @__PURE__ */ c(O, { className: "mx-txn-split-manager", children: [
731
724
  o.map((p, h) => /* @__PURE__ */ e(
732
- bt,
725
+ ft,
733
726
  {
734
727
  index: h,
735
728
  onCategoryChanged: r,
@@ -747,13 +740,13 @@ const rt = ({ transaction: t, onClick: r }) => {
747
740
  gap: i.Spacing.XSmall,
748
741
  p: i.Spacing.Medium,
749
742
  children: [
750
- /* @__PURE__ */ e(me, { sx: { fontSize: i.FontSize.Body } }),
743
+ /* @__PURE__ */ e(oe, { sx: { fontSize: i.FontSize.Body } }),
751
744
  /* @__PURE__ */ e(S, { variant: "Small", children: u })
752
745
  ]
753
746
  }
754
747
  ),
755
- /* @__PURE__ */ e(E, { p: i.Spacing.Medium, children: /* @__PURE__ */ e(
756
- se,
748
+ /* @__PURE__ */ e(O, { p: i.Spacing.Medium, children: /* @__PURE__ */ e(
749
+ le,
757
750
  {
758
751
  "aria-label": l.split_transaction_add_split_btn,
759
752
  onClick: () => {
@@ -763,8 +756,8 @@ const rt = ({ transaction: t, onClick: r }) => {
763
756
  }
764
757
  ) })
765
758
  ] });
766
- }, It = b(At), Nt = ({ transaction: t }) => {
767
- const { onEvent: r } = w(), { splitTransaction: n, unSplitTransaction: s } = v(), { common: o, transactions: a } = x(), { setShouldDisableDrawerScroll: i } = G(), { categories: l } = be(), _ = {
759
+ }, At = b(bt), Nt = ({ transaction: t }) => {
760
+ const { onEvent: r } = w(), { splitTransaction: n, unSplitTransaction: s } = v(), { common: o, transactions: a } = I(), { setShouldDisableDrawerScroll: i } = G(), { categories: l } = be(), _ = {
768
761
  ...t,
769
762
  amount: t.amount - 1,
770
763
  guid: "",
@@ -779,53 +772,53 @@ const rt = ({ transaction: t, onClick: r }) => {
779
772
  has_been_split: !1,
780
773
  parent_guid: t.guid,
781
774
  top_level_category_guid: void 0
782
- }, [m, p] = d.useState(!1), [h, A] = d.useState(!1), [T, I] = d.useState([]), y = () => {
783
- const O = [...T];
784
- O.push({ ...u }), O[0].amount -= 1, I(O);
785
- }, R = (O) => {
786
- if (O > 0) {
787
- const F = T[O], D = [...T];
788
- D.splice(O, 1), D[0].amount += F.amount, I(D);
789
- }
790
- }, M = (O, F) => {
775
+ }, [m, p] = d.useState(!1), [h, A] = d.useState(!1), [T, N] = d.useState([]), y = () => {
791
776
  const D = [...T];
792
- D[O].amount = F, D[0].amount = t.amount - D.reduce(
793
- (j, _e, Ee) => j + (Ee !== 0 ? _e.amount : 0),
777
+ D.push({ ...u }), D[0].amount -= 1, N(D);
778
+ }, R = (D) => {
779
+ if (D > 0) {
780
+ const F = T[D], E = [...T];
781
+ E.splice(D, 1), E[0].amount += F.amount, N(E);
782
+ }
783
+ }, M = (D, F) => {
784
+ const E = [...T];
785
+ E[D].amount = F, E[0].amount = t.amount - E.reduce(
786
+ (j, ue, Oe) => j + (Oe !== 0 ? ue.amount : 0),
794
787
  0
795
- ), I(D);
796
- }, K = (O, F) => {
797
- const D = [...T], j = l.find((_e) => _e.guid === F);
798
- j && (D[O] = {
799
- ...D[O],
788
+ ), N(E);
789
+ }, K = (D, F) => {
790
+ const E = [...T], j = l.find((ue) => ue.guid === F);
791
+ j && (E[D] = {
792
+ ...E[D],
800
793
  category_guid: F,
801
794
  category: j.name,
802
795
  top_level_category_guid: j.parent_guid || F
803
- }, I(D));
804
- }, N = () => {
796
+ }, N(E));
797
+ }, x = () => {
805
798
  if (t.parent_guid || t.has_been_split) {
806
799
  A(!0);
807
800
  return;
808
801
  }
809
- I([{ ..._ }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
802
+ N([{ ..._ }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
810
803
  transaction_guid: t.guid
811
804
  }), p(!0);
812
805
  }, k = async () => {
813
806
  r(g.ON_TRANSACTION_SPLIT_SAVE_CLICK), await n({ ...t, has_been_split: !0 }, T), p(!1);
814
807
  }, W = async () => {
815
- r(g.ON_TRANSACTION_SPLIT_CANCEL_CLICK), I([{ ..._ }, { ...u }]), p(!1);
816
- }, ce = async () => {
808
+ r(g.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ..._ }, { ...u }]), p(!1);
809
+ }, de = async () => {
817
810
  r(P.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
818
811
  transaction_guid: t.guid
819
812
  });
820
- const O = t.parent_guid ?? t.guid;
821
- await s(O);
822
- }, de = d.useMemo(() => {
823
- const O = T.some((D) => !D.category_guid), F = T.some((D) => D.amount <= 0);
824
- return O || F;
813
+ const D = t.parent_guid ?? t.guid;
814
+ await s(D);
815
+ }, _e = d.useMemo(() => {
816
+ const D = T.some((E) => !E.category_guid), F = T.some((E) => E.amount <= 0);
817
+ return D || F;
825
818
  }, [T]);
826
819
  return /* @__PURE__ */ c(d.Fragment, { children: [
827
- t && /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(B, { onClick: N, children: [
828
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "call_split", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
820
+ t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(H, { onClick: x, children: [
821
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "call_split", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
829
822
  /* @__PURE__ */ e(
830
823
  $,
831
824
  {
@@ -836,20 +829,20 @@ const rt = ({ transaction: t, onClick: r }) => {
836
829
  /* @__PURE__ */ e(U, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(f, { name: "delete", weight: L.Dark }) : /* @__PURE__ */ e(f, { name: "chevron_right", weight: L.Dark }) })
837
830
  ] }) }),
838
831
  /* @__PURE__ */ c(
839
- le,
832
+ ce,
840
833
  {
841
834
  ariaLabelClose: o.close_aria,
842
835
  isOpen: m,
843
- isPrimaryDisabled: de,
836
+ isPrimaryDisabled: _e,
844
837
  onClose: W,
845
838
  onPrimaryAction: k,
846
839
  primaryText: o.save_button,
847
840
  secondaryText: o.cancel_button,
848
841
  title: a.split_transaction_title,
849
842
  children: [
850
- /* @__PURE__ */ e(De, { transaction: t }),
843
+ /* @__PURE__ */ e(Ee, { transaction: t }),
851
844
  /* @__PURE__ */ e(
852
- It,
845
+ At,
853
846
  {
854
847
  onAddSplit: y,
855
848
  onCategoryChanged: K,
@@ -870,21 +863,21 @@ const rt = ({ transaction: t, onClick: r }) => {
870
863
  onClose: () => {
871
864
  i(!1), A(!1);
872
865
  },
873
- onPrimaryAction: ce,
866
+ onPrimaryAction: de,
874
867
  onSecondaryAction: () => {
875
868
  r(g.ON_TRANSACTION_UNSPLIT_CANCEL);
876
869
  },
877
870
  primaryText: o.delete_button,
878
871
  secondaryText: o.cancel_button,
879
- children: /* @__PURE__ */ e(ie, { variant: "Paragraph", children: re(
872
+ children: /* @__PURE__ */ e(se, { variant: "Paragraph", children: ie(
880
873
  a.split_transaction_unsplit_description,
881
874
  t.description
882
875
  ) })
883
876
  }
884
877
  )
885
878
  ] });
886
- }, xt = b(Nt), Ot = () => {
887
- const t = xe(), { onEvent: r } = w(), { addTag: n } = v(), { transactions: s } = x(), [o, a] = d.useState(!1), [i, l] = d.useState(""), [_, u] = d.useState(""), m = d.useRef(null);
879
+ }, xt = b(Nt), It = () => {
880
+ const t = Ie(), { onEvent: r } = w(), { addTag: n } = v(), { transactions: s } = I(), [o, a] = d.useState(!1), [i, l] = d.useState(""), [_, u] = d.useState(""), m = d.useRef(null);
888
881
  d.useEffect(() => {
889
882
  o && m?.current?.focus();
890
883
  }, [o]);
@@ -897,7 +890,7 @@ const rt = ({ transaction: t, onClick: r }) => {
897
890
  };
898
891
  return d.useEffect(() => {
899
892
  u(i.length > 40 ? s.tags_error_name_must_be_40_chars : "");
900
- }, [i]), /* @__PURE__ */ c(E, { className: "mx-txn-tag-manager-header", children: [
893
+ }, [i]), /* @__PURE__ */ c(O, { className: "mx-txn-tag-manager-header", children: [
901
894
  /* @__PURE__ */ c(
902
895
  C,
903
896
  {
@@ -910,7 +903,7 @@ const rt = ({ transaction: t, onClick: r }) => {
910
903
  children: [
911
904
  /* @__PURE__ */ e(S, { bold: !0, children: s.tags_your_tags }),
912
905
  /* @__PURE__ */ e(
913
- se,
906
+ le,
914
907
  {
915
908
  "aria-expanded": o,
916
909
  "aria-label": s.tags_add_tag_btn_aria,
@@ -941,25 +934,25 @@ const rt = ({ transaction: t, onClick: r }) => {
941
934
  value: i
942
935
  }
943
936
  ),
944
- /* @__PURE__ */ e(ie, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: _ })
937
+ /* @__PURE__ */ e(se, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: _ })
945
938
  ]
946
939
  }
947
940
  )
948
941
  ] });
949
- }, Dt = b(Ot), Et = ({ onSearchValueChanged: t, searchValue: r }) => {
950
- const { common: n, transactions: s } = x(), o = J(), a = /* @__PURE__ */ e(
942
+ }, Dt = b(It), Et = ({ onSearchValueChanged: t, searchValue: r }) => {
943
+ const { common: n, transactions: s } = I(), o = J(), a = /* @__PURE__ */ e(
951
944
  Z,
952
945
  {
953
946
  "aria-label": s.tags_cancel_search || "Search",
954
947
  onClick: () => t(""),
955
- children: /* @__PURE__ */ e(Ve, {})
948
+ children: /* @__PURE__ */ e(oe, {})
956
949
  }
957
950
  );
958
- return /* @__PURE__ */ e(E, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ e(
951
+ return /* @__PURE__ */ e(O, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ e(
959
952
  ge,
960
953
  {
961
954
  InputProps: {
962
- startAdornment: /* @__PURE__ */ e(he, { position: "start", children: /* @__PURE__ */ e(We, { color: "disabled" }) }),
955
+ startAdornment: /* @__PURE__ */ e(he, { position: "start", children: /* @__PURE__ */ e(Fe, { color: "disabled" }) }),
963
956
  endAdornment: /* @__PURE__ */ e(he, { position: "end", sx: { padding: 0 }, children: r ? a : null })
964
957
  },
965
958
  "aria-label": n.search_aria,
@@ -970,14 +963,14 @@ const rt = ({ transaction: t, onClick: r }) => {
970
963
  value: r
971
964
  }
972
965
  ) });
973
- }, vt = b(Et), wt = ({ onTagChecked: t, selectedTags: r, tag: n }) => {
974
- const { onEvent: s } = w(), { removeTag: o, updateTag: a } = v(), { common: i, transactions: l } = x(), [_, u] = d.useState(!1), [m, p] = d.useState(!1), [h, A] = d.useState(""), [T, I] = d.useState(""), y = async () => {
966
+ }, Ot = b(Et), vt = ({ onTagChecked: t, selectedTags: r, tag: n }) => {
967
+ const { onEvent: s } = w(), { removeTag: o, updateTag: a } = v(), { common: i, transactions: l } = I(), [_, u] = d.useState(!1), [m, p] = d.useState(!1), [h, A] = d.useState(""), [T, N] = d.useState(""), y = async () => {
975
968
  s(g.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), n && await a({ ...n, name: h }), u(!1);
976
969
  }, R = async () => {
977
970
  s(g.ON_TRANSACTION_TAGS_TAG_DELETED), await o(n.guid), p(!1);
978
971
  };
979
972
  d.useEffect(() => {
980
- I(h.length > 40 ? l.tags_error_name_must_be_40_chars : "");
973
+ N(h.length > 40 ? l.tags_error_name_must_be_40_chars : "");
981
974
  }, [h]);
982
975
  const M = () => {
983
976
  s(g.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), A(n.name), u(!0);
@@ -985,7 +978,7 @@ const rt = ({ transaction: t, onClick: r }) => {
985
978
  s(g.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
986
979
  };
987
980
  return /* @__PURE__ */ c(
988
- z,
981
+ B,
989
982
  {
990
983
  className: "mx-txn-transaction-manager-row",
991
984
  disableGutters: !0,
@@ -997,7 +990,7 @@ const rt = ({ transaction: t, onClick: r }) => {
997
990
  "aria-label": `Edit ${n.name} tag`,
998
991
  color: "secondary",
999
992
  onClick: M,
1000
- children: /* @__PURE__ */ e(Ye, { color: "secondary" })
993
+ children: /* @__PURE__ */ e(ze, { color: "secondary" })
1001
994
  }
1002
995
  ),
1003
996
  /* @__PURE__ */ e(
@@ -1006,13 +999,13 @@ const rt = ({ transaction: t, onClick: r }) => {
1006
999
  "aria-label": `Delete ${n.name} tag`,
1007
1000
  color: "secondary",
1008
1001
  onClick: K,
1009
- children: /* @__PURE__ */ e(oe, { color: "secondary" })
1002
+ children: /* @__PURE__ */ e(re, { color: "secondary" })
1010
1003
  }
1011
1004
  )
1012
1005
  ] }),
1013
1006
  children: [
1014
1007
  /* @__PURE__ */ c(
1015
- B,
1008
+ H,
1016
1009
  {
1017
1010
  "aria-checked": r.includes(n.guid),
1018
1011
  onClick: () => t(n.guid),
@@ -1038,13 +1031,13 @@ const rt = ({ transaction: t, onClick: r }) => {
1038
1031
  "aria-describedby": T ? "update-tag-error" : void 0,
1039
1032
  "aria-label": l.tags_update_the_tag_name,
1040
1033
  name: "update-tag",
1041
- onChange: (N) => A(N.target.value),
1034
+ onChange: (x) => A(x.target.value),
1042
1035
  placeholder: "Tag name",
1043
1036
  sx: { width: "100%" },
1044
1037
  value: h
1045
1038
  }
1046
1039
  ),
1047
- /* @__PURE__ */ e(ie, { id: "update-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: T })
1040
+ /* @__PURE__ */ e(se, { id: "update-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: T })
1048
1041
  ]
1049
1042
  }
1050
1043
  ),
@@ -1064,13 +1057,13 @@ const rt = ({ transaction: t, onClick: r }) => {
1064
1057
  ]
1065
1058
  }
1066
1059
  );
1067
- }, Lt = b(wt), Rt = ({ selectedTags: t, onTagChecked: r }) => {
1060
+ }, wt = b(vt), Lt = ({ selectedTags: t, onTagChecked: r }) => {
1068
1061
  const { tags: n } = v(), [s, o] = d.useState(""), a = n.filter(
1069
1062
  (i) => i.name.toLowerCase().includes(s.toLowerCase())
1070
1063
  );
1071
1064
  return /* @__PURE__ */ c("div", { className: "mx-txn-tag-manager", children: [
1072
1065
  /* @__PURE__ */ e(
1073
- vt,
1066
+ Ot,
1074
1067
  {
1075
1068
  onSearchValueChanged: (i) => o(i),
1076
1069
  searchValue: s
@@ -1078,18 +1071,18 @@ const rt = ({ transaction: t, onClick: r }) => {
1078
1071
  ),
1079
1072
  /* @__PURE__ */ e(Dt, {}),
1080
1073
  /* @__PURE__ */ e(ee, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(ae, { children: a.map((i) => /* @__PURE__ */ c(d.Fragment, { children: [
1081
- /* @__PURE__ */ e(Lt, { onTagChecked: r, selectedTags: t, tag: i }),
1074
+ /* @__PURE__ */ e(wt, { onTagChecked: r, selectedTags: t, tag: i }),
1082
1075
  /* @__PURE__ */ e(ne, { sx: { ml: 24 } })
1083
1076
  ] }, i.guid)) }) })
1084
1077
  ] });
1085
- }, kt = b(Rt), Pt = ({ transaction: t }) => {
1086
- const { onEvent: r } = w(), { tags: n, updateTaggings: s, updateTransaction: o } = v(), { common: a, transactions: i } = x(), { updateManualTransaction: l } = G(), [_, u] = d.useState(!1), [m, p] = d.useState(t.tags);
1078
+ }, Rt = b(Lt), kt = ({ transaction: t }) => {
1079
+ const { onEvent: r } = w(), { tags: n, updateTaggings: s, updateTransaction: o } = v(), { common: a, transactions: i } = I(), { updateManualTransaction: l } = G(), [_, u] = d.useState(!1), [m, p] = d.useState(t.tags);
1087
1080
  d.useEffect(() => {
1088
1081
  p(t.tags);
1089
1082
  }, [_, t]);
1090
- const h = (I) => {
1091
- const y = [...m], R = m.indexOf(I);
1092
- R >= 0 ? y.splice(R, 1) : y.push(I), p(y);
1083
+ const h = (N) => {
1084
+ const y = [...m], R = m.indexOf(N);
1085
+ R >= 0 ? y.splice(R, 1) : y.push(N), p(y);
1093
1086
  }, A = async () => {
1094
1087
  if (t.is_manual && !t.guid) {
1095
1088
  l({ ...t, tags: m }), u(!1);
@@ -1098,19 +1091,19 @@ const rt = ({ transaction: t, onClick: r }) => {
1098
1091
  await s(m, t.guid), await o({ ...t, tags: m }), r(P.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
1099
1092
  }, T = d.useMemo(
1100
1093
  () => t.tags.map(
1101
- (I, y, R) => `${n.find((M) => M.guid === I)?.name}${y < R.length - 1 ? " / " : ""}`
1094
+ (N, y, R) => `${n.find((M) => M.guid === N)?.name}${y < R.length - 1 ? " / " : ""}`
1102
1095
  ),
1103
1096
  [n, t]
1104
1097
  );
1105
1098
  return /* @__PURE__ */ c(d.Fragment, { children: [
1106
- /* @__PURE__ */ e(z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
1107
- B,
1099
+ /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
1100
+ H,
1108
1101
  {
1109
1102
  onClick: () => {
1110
1103
  r(g.ON_TRANSACTION_TAGS_CLICK), u(!0);
1111
1104
  },
1112
1105
  children: [
1113
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "local_offer", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
1106
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(f, { name: "local_offer", sx: { color: "text.primary" }, weight: L.Dark }) }) }),
1114
1107
  /* @__PURE__ */ e(
1115
1108
  $,
1116
1109
  {
@@ -1124,7 +1117,7 @@ const rt = ({ transaction: t, onClick: r }) => {
1124
1117
  }
1125
1118
  ) }),
1126
1119
  /* @__PURE__ */ e(
1127
- le,
1120
+ ce,
1128
1121
  {
1129
1122
  ariaLabelClose: a.close_aria,
1130
1123
  isOpen: _,
@@ -1133,12 +1126,12 @@ const rt = ({ transaction: t, onClick: r }) => {
1133
1126
  primaryText: a.save_button,
1134
1127
  secondaryText: a.cancel_button,
1135
1128
  title: i.tags_title,
1136
- children: /* @__PURE__ */ e(kt, { onTagChecked: h, selectedTags: m })
1129
+ children: /* @__PURE__ */ e(Rt, { onTagChecked: h, selectedTags: m })
1137
1130
  }
1138
1131
  )
1139
1132
  ] });
1140
- }, Gt = b(Pt), Mt = ({ transaction: t }) => {
1141
- const { updateTransaction: r } = v(), { common: n, transactions: s } = x(), { onEvent: o } = w(), [a, i] = d.useState(!1), [l, _] = d.useState(""), u = d.useRef(null);
1133
+ }, Pt = b(kt), Gt = ({ transaction: t }) => {
1134
+ const { updateTransaction: r } = v(), { common: n, transactions: s } = I(), { onEvent: o } = w(), [a, i] = d.useState(!1), [l, _] = d.useState(""), u = d.useRef(null);
1142
1135
  d.useEffect(() => {
1143
1136
  a && (_(t.description), u?.current?.focus());
1144
1137
  }, [a]);
@@ -1147,9 +1140,9 @@ const rt = ({ transaction: t, onClick: r }) => {
1147
1140
  transaction_guid: t.guid
1148
1141
  }), await r({ ...t, description: l }), i(!1);
1149
1142
  };
1150
- return /* @__PURE__ */ e(E, { className: "mx-txn-transaction-description", children: a ? /* @__PURE__ */ c(Fe, { row: !0, children: [
1143
+ return /* @__PURE__ */ e(O, { className: "mx-txn-transaction-description", children: a ? /* @__PURE__ */ c(Ue, { row: !0, children: [
1151
1144
  /* @__PURE__ */ e(
1152
- Ne,
1145
+ xe,
1153
1146
  {
1154
1147
  "aria-label": s.description_add_a_subcategory,
1155
1148
  name: "add-subcategory",
@@ -1165,7 +1158,7 @@ const rt = ({ transaction: t, onClick: r }) => {
1165
1158
  }
1166
1159
  ),
1167
1160
  /* @__PURE__ */ e(
1168
- se,
1161
+ le,
1169
1162
  {
1170
1163
  disabled: !l,
1171
1164
  onClick: m,
@@ -1188,12 +1181,12 @@ const rt = ({ transaction: t, onClick: r }) => {
1188
1181
  }
1189
1182
  )
1190
1183
  ] }) });
1191
- }, Kt = b(Mt), $t = ({ transaction: t }) => {
1192
- const { updateTransaction: r } = v(), { transactions: n } = x(), { onEvent: s } = w(), o = xe(), a = async () => {
1184
+ }, Mt = b(Gt), Kt = ({ transaction: t }) => {
1185
+ const { updateTransaction: r } = v(), { transactions: n } = I(), { onEvent: s } = w(), o = Ie(), a = async () => {
1193
1186
  s(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
1194
1187
  };
1195
1188
  return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
1196
- ze,
1189
+ Xe,
1197
1190
  {
1198
1191
  "aria-label": n.flag_btn_aria,
1199
1192
  "aria-pressed": t.is_flagged,
@@ -1217,19 +1210,19 @@ const rt = ({ transaction: t, onClick: r }) => {
1217
1210
  }
1218
1211
  },
1219
1212
  value: "flagged",
1220
- children: /* @__PURE__ */ e(He, { color: "inherit" })
1213
+ children: /* @__PURE__ */ e(Be, { color: "inherit" })
1221
1214
  }
1222
1215
  ) });
1223
- }, Ft = b($t), Ht = ({
1224
- bottomActions: t = et,
1225
- topActions: r = Qe,
1216
+ }, $t = b(Kt), Ft = ({
1217
+ bottomActions: t = Qe,
1218
+ topActions: r = Je,
1226
1219
  transaction: n
1227
1220
  }) => {
1228
1221
  const { isCopyLoaded: s } = Me(), o = n?.number && n.number.length > 4, { onEvent: a } = w();
1229
1222
  return d.useEffect(
1230
1223
  () => a(P.TRANSACTION_DETAILS_VIEW, { transaction_guid: n.guid }),
1231
1224
  []
1232
- ), s ? /* @__PURE__ */ e(E, { className: "mx-txn-transaction-details", width: "100%", children: n && /* @__PURE__ */ c(C, { children: [
1225
+ ), s ? /* @__PURE__ */ e(O, { className: "mx-txn-transaction-details", width: "100%", children: n && /* @__PURE__ */ c(C, { children: [
1233
1226
  /* @__PURE__ */ c(C, { gap: 12, p: 24, children: [
1234
1227
  /* @__PURE__ */ e(ee, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
1235
1228
  pe,
@@ -1239,13 +1232,13 @@ const rt = ({ transaction: t, onClick: r }) => {
1239
1232
  size: 64
1240
1233
  }
1241
1234
  ) }),
1242
- /* @__PURE__ */ e(Kt, { transaction: n }),
1235
+ /* @__PURE__ */ e(Mt, { transaction: n }),
1243
1236
  /* @__PURE__ */ c(C, { direction: "row", justifyContent: "space-between", children: [
1244
1237
  /* @__PURE__ */ c(fe, { color: n.isIncome ? "success.main" : "text.primary", children: [
1245
1238
  n.isIncome ? "+" : "",
1246
1239
  Q(n.amount, "0,0.00")
1247
1240
  ] }),
1248
- /* @__PURE__ */ e(Ft, { transaction: n })
1241
+ /* @__PURE__ */ e($t, { transaction: n })
1249
1242
  ] }),
1250
1243
  /* @__PURE__ */ c(C, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
1251
1244
  /* @__PURE__ */ e(S, { bold: !0, children: `${n.account}
@@ -1254,34 +1247,34 @@ const rt = ({ transaction: t, onClick: r }) => {
1254
1247
  ] })
1255
1248
  ] }),
1256
1249
  /* @__PURE__ */ e(ee, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(ae, { children: r.map((i, l) => /* @__PURE__ */ c(d.Fragment, { children: [
1257
- i === q.Category && /* @__PURE__ */ e(_t, { transaction: n }),
1258
- i === q.Date && /* @__PURE__ */ e(ut, { transaction: n }),
1259
- i === q.Memo && /* @__PURE__ */ e(Ct, { transaction: n }),
1260
- i === q.Tags && /* @__PURE__ */ e(Gt, { transaction: n }),
1250
+ i === q.Category && /* @__PURE__ */ e(dt, { transaction: n }),
1251
+ i === q.Date && /* @__PURE__ */ e(_t, { transaction: n }),
1252
+ i === q.Memo && /* @__PURE__ */ e(yt, { transaction: n }),
1253
+ i === q.Tags && /* @__PURE__ */ e(Pt, { transaction: n }),
1261
1254
  /* @__PURE__ */ e(ne, { variant: l < r.length - 1 ? "inset" : "fullWidth" })
1262
1255
  ] }, i)) }) }),
1263
1256
  /* @__PURE__ */ e(S, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
1264
1257
  /* @__PURE__ */ e(ee, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ c(ae, { children: [
1265
1258
  t.map((i, l) => /* @__PURE__ */ c(d.Fragment, { children: [
1266
1259
  i === te.SplitTransaction && /* @__PURE__ */ e(xt, { transaction: n }),
1267
- i === te.HideTransaction && /* @__PURE__ */ e(St, { transaction: n }),
1268
- i === te.MerchantLogo && /* @__PURE__ */ e(ht, { transaction: n }),
1260
+ i === te.HideTransaction && /* @__PURE__ */ e(Tt, { transaction: n }),
1261
+ i === te.MerchantLogo && /* @__PURE__ */ e(gt, { transaction: n }),
1269
1262
  /* @__PURE__ */ e(ne, { variant: l < t.length - 1 ? "inset" : "fullWidth" })
1270
1263
  ] }, i)),
1271
- n.is_manual && !n.parent_guid && !n.has_been_split && /* @__PURE__ */ e(pt, { transaction: n })
1264
+ n.is_manual && !n.parent_guid && !n.has_been_split && /* @__PURE__ */ e(mt, { transaction: n })
1272
1265
  ] }) })
1273
- ] }) }) : /* @__PURE__ */ e(Ie, {});
1274
- }, Kn = b(Ht);
1266
+ ] }) }) : /* @__PURE__ */ e(Ne, {});
1267
+ }, vn = b(Ft);
1275
1268
  export {
1276
1269
  te as B,
1277
- _t as C,
1278
- ut as D,
1279
- Ct as M,
1280
- it as S,
1281
- Mn as T,
1282
- Kn as a,
1283
- ot as b,
1284
- Gt as c,
1270
+ dt as C,
1271
+ _t as D,
1272
+ yt as M,
1273
+ ot as S,
1274
+ On as T,
1275
+ vn as a,
1276
+ rt as b,
1277
+ Pt as c,
1285
1278
  q as d,
1286
1279
  G as u
1287
1280
  };