@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-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.
Files changed (106) hide show
  1. package/dist/{Account-B4CDD-zq.mjs → Account-BDXA6PWh.mjs} +1 -1
  2. package/dist/AccountDetailsContent-CUztd3-b.mjs +683 -0
  3. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-i3KFhNuo.mjs} +18 -18
  4. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-QZspYAji.mjs} +10 -12
  5. package/dist/AccountListItem-DX5upmCS.mjs +90 -0
  6. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-BcnDpyLL.mjs} +3 -3
  7. package/dist/{Accounts-CRUehOiy.mjs → Accounts-DXfZotRC.mjs} +1 -1
  8. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-Df2nII9u.mjs} +31 -31
  9. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  10. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  11. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +27 -27
  12. package/dist/{CategoryStore-MUwRWH9e.mjs → CategoryStore-DTgyAMM7.mjs} +2 -2
  13. package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-C5cR-nfQ.mjs} +4 -4
  14. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BIbTqYOH.mjs} +47 -48
  15. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +2 -2
  16. package/dist/CurrencyInput-BFKcs-_K.mjs +85 -0
  17. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  18. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-BbJB0nmu.mjs} +3 -3
  19. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  20. package/dist/{Drawer-BF40nbsH.mjs → Drawer-BEtCk82g.mjs} +17 -17
  21. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  22. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  23. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-DpWY3gVb.mjs} +4 -4
  24. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  25. package/dist/{Help-DBfsTkAi.mjs → Help-BnPXM_N2.mjs} +145 -124
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  28. package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
  29. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
  30. package/dist/Loader-DUaFpDGv.mjs +24 -0
  31. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-NpXHhO1n.mjs} +46 -46
  32. package/dist/MicroWidgetContainer-DEiRnYVa.mjs +45 -0
  33. package/dist/MiniWidgetContainer-CmXpTylX.mjs +56 -0
  34. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-lsuhEpn6.mjs} +4 -4
  35. package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-CNmJWVeI.mjs} +77 -77
  36. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +8 -8
  37. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-CqZh1SQa.mjs} +3 -3
  38. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BKcYmpv3.mjs} +77 -77
  39. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +1 -1
  40. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  41. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  42. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  43. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  44. package/dist/{SpendingData-DPQ96k3x.mjs → SpendingData-BuJ03S9d.mjs} +4 -4
  45. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CjX-hX2O.mjs} +12 -12
  46. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  47. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  48. package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
  49. package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-D-Q3BU9Z.mjs} +58 -41
  50. package/dist/{TrendsStore-_mRaFUdf.mjs → TrendsStore-BW9FGQeE.mjs} +37 -37
  51. package/dist/{User-BklmOUSd.mjs → User-wXzDI4M8.mjs} +107 -107
  52. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-C0832BMe.mjs} +233 -231
  53. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-BhQ1Kx2z.mjs} +36 -36
  54. package/dist/accounts/index.es.js +94 -94
  55. package/dist/analytics/index.es.js +27 -27
  56. package/dist/budgets/index.es.js +251 -250
  57. package/dist/cashflow/index.es.js +158 -157
  58. package/dist/categories/index.es.js +2 -2
  59. package/dist/common/components/Loader.d.ts +2 -1
  60. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  61. package/dist/common/components/barchart/Bar.d.ts +25 -0
  62. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  63. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  64. package/dist/common/components/barchart/Legend.d.ts +8 -0
  65. package/dist/common/components/barchart/Util.d.ts +42 -0
  66. package/dist/common/components/barchart/index.d.ts +1 -0
  67. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  68. package/dist/common/components/index.d.ts +1 -0
  69. package/dist/common/index.es.js +660 -395
  70. package/dist/common/utils/Theme.d.ts +3 -1
  71. package/dist/dashboard/index.es.js +21 -21
  72. package/dist/debts/components/DebtsChart.d.ts +2 -1
  73. package/dist/debts/index.es.js +440 -440
  74. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +3 -3
  75. package/dist/finstrong/index.es.js +118 -118
  76. package/dist/goals/index.es.js +380 -386
  77. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  78. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  79. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  80. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  81. package/dist/help/index.es.js +6 -6
  82. package/dist/investments/index.es.js +279 -278
  83. package/dist/merchants/index.es.js +7 -7
  84. package/dist/microinsights/index.es.js +1 -1
  85. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  86. package/dist/networth/index.es.js +185 -191
  87. package/dist/notifications/index.es.js +30 -30
  88. package/dist/recurringtransactions/index.es.js +85 -85
  89. package/dist/settings/index.es.js +270 -270
  90. package/dist/spending/index.es.js +44 -44
  91. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  92. package/dist/transactions/index.es.js +169 -168
  93. package/dist/trends/index.es.js +318 -317
  94. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-CFNF8766.mjs} +1 -1
  95. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  96. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  97. package/package.json +50 -45
  98. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  99. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  100. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  101. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  102. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  103. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  104. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  105. package/dist/SearchBox-B7km148n.mjs +0 -39
  106. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
@@ -1,9 +1,9 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
- import x from "@mui/material/Box";
3
- import P from "@mui/material/FormControlLabel";
4
- import H from "@mui/material/Radio";
5
- import { useTheme as K } from "@mui/material/styles";
6
- import U from "@mui/material/Tooltip";
2
+ import M from "@mui/material/Box";
3
+ import H from "@mui/material/FormControlLabel";
4
+ import P from "@mui/material/Radio";
5
+ import U from "@mui/material/styles/useTheme";
6
+ import K from "@mui/material/Tooltip";
7
7
  import { makeAutoObservable as p } from "mobx";
8
8
  import { endOfToday as f } from "date-fns/endOfToday";
9
9
  import { formatISO as V } from "date-fns/formatISO";
@@ -12,25 +12,25 @@ import { isBefore as v } from "date-fns/isBefore";
12
12
  import { startOfMonth as h } from "date-fns/startOfMonth";
13
13
  import { startOfToday as m } from "date-fns/startOfToday";
14
14
  import { subDays as B } from "date-fns/subDays";
15
- import { O as o, a as y, T as b } from "./User-BklmOUSd.mjs";
16
- import { T as u } from "./TransactionApi-CjBoLleL.mjs";
17
- import { b as Y } from "./Category-Ccoew_sA.mjs";
18
- import { f as F } from "./exportTransactionsToCSV-BgV_wTLT.mjs";
15
+ import { O as o, a as y, T as b } from "./User-wXzDI4M8.mjs";
16
+ import { T as L } from "./TransactionApi-CjBoLleL.mjs";
17
+ import { b as Y } from "./Category-CevNQ03n.mjs";
18
+ import { f as F } from "./exportTransactionsToCSV-Cz2t0lmA.mjs";
19
19
  import { format as W } from "date-fns/format";
20
20
  import { fromUnixTime as $ } from "date-fns/fromUnixTime";
21
- import { f as I, a as C, O as k } from "./Dialog-CDV0kKxj.mjs";
21
+ import { f as I, a as C, O as k } from "./Dialog-BPTr3qHE.mjs";
22
22
  import { endOfMonth as z } from "date-fns/endOfMonth";
23
- import { B as L } from "./BeatApi-De2IaqH2.mjs";
24
- const Rt = ({
23
+ import { B as u } from "./BeatApi-De2IaqH2.mjs";
24
+ const X = ({
25
25
  checked: l = !1,
26
26
  label: t,
27
27
  sx: a = {},
28
28
  tooltip: e = "",
29
29
  value: A
30
30
  }) => {
31
- const d = K(), s = d.palette.mode === "light" ? d.palette.grey[400] : d.palette.grey[700], c = l ? d.palette.action.active : s;
31
+ const d = U(), s = d.palette.mode === "light" ? d.palette.grey[400] : d.palette.grey[700], c = l ? d.palette.action.active : s;
32
32
  return /* @__PURE__ */ g(
33
- x,
33
+ M,
34
34
  {
35
35
  bgcolor: "background.paper",
36
36
  border: `${l ? 3 : 1}px solid`,
@@ -41,11 +41,11 @@ const Rt = ({
41
41
  pr: 8,
42
42
  py: 4,
43
43
  sx: { "&:hover": { borderColor: d.palette.action.active }, ...a },
44
- children: /* @__PURE__ */ g(U, { title: e, children: /* @__PURE__ */ g(
45
- P,
44
+ children: /* @__PURE__ */ g(K, { title: e, children: /* @__PURE__ */ g(
45
+ H,
46
46
  {
47
47
  control: /* @__PURE__ */ g(
48
- H,
48
+ P,
49
49
  {
50
50
  disableRipple: !0,
51
51
  sx: { "&.Mui-checked": { color: d.palette.action.active } }
@@ -59,19 +59,31 @@ const Rt = ({
59
59
  ) })
60
60
  }
61
61
  );
62
- }, G = {
62
+ }, pt = X, G = {
63
63
  ASC: "ASC",
64
- DESC: "DESC"
64
+ DESC: "DESC",
65
+ DIRECTION: {
66
+ ASC: "ascending",
67
+ DESC: "descending"
68
+ },
69
+ ALIGN: {
70
+ center: "center",
71
+ left: "flex-start",
72
+ right: "flex-end"
73
+ }
65
74
  }, n = {
66
75
  ADD: "Add",
67
76
  ADD_CATEGORY: "Add Category",
68
77
  CHANGE_CATEGORY: "Change Category",
78
+ CHANGE_DATE: "Change Date",
69
79
  CLOSE: "Close",
70
80
  DELETE: "Delete",
71
81
  EDIT: "Edit",
82
+ HIDE: "Hide",
72
83
  SAVE: "Save",
73
84
  SPLIT: "Split",
74
85
  SELECT: "Select",
86
+ UNHIDE: "Unhide",
75
87
  UNSPLIT: "Unsplit"
76
88
  }, T = {
77
89
  TRANSACTION_DETAILS: "Transaction Details",
@@ -94,6 +106,7 @@ const Rt = ({
94
106
  TAG_DELETE: "Delete Tag",
95
107
  TAG_EDIT: "Edit Tag",
96
108
  TRANSACTION: "Transaction",
109
+ TRANSACTIONS_LIST: "Transactions List",
97
110
  UNHIDE_TRANSACTION: "Unhide Transaction"
98
111
  }, R = {
99
112
  // splits
@@ -309,10 +322,14 @@ const Rt = ({
309
322
  category: T.TRANSACTIONS_WIDGET,
310
323
  label: r.DELETE_TRANSACTION
311
324
  }
312
- }, X = async (l, t) => !t || !R[l] ? null : t.sendAnalyticEvent(R[l]), D = {
325
+ }, j = async (l, t) => !t || !R[l] ? null : t.sendAnalyticEvent(R[l]), D = {
326
+ FLAG: "flag",
313
327
  DATE: "date",
328
+ PAYEE: "payee",
329
+ CATEGORY: "category",
330
+ ACCOUNT: "account",
314
331
  AMOUNT: "amount"
315
- }, j = (l, t, a, e = []) => {
332
+ }, Z = (l, t, a, e = []) => {
316
333
  const A = t.reduce((c, i) => ({ ...c, [i.guid]: i }), {}), d = a.reduce((c, i) => ({ ...c, [i.guid]: i }), {}), s = e.reduce((c, i) => {
317
334
  const { transaction_guid: S, tag_guid: E } = i;
318
335
  if (!c[S])
@@ -341,13 +358,13 @@ const Rt = ({
341
358
  tags: E
342
359
  };
343
360
  });
344
- }, Z = "uncategorized", q = (l, t, a, e, A, d) => {
345
- const s = J(l, A, d), c = Q(s, a, e);
361
+ }, q = "uncategorized", J = (l, t, a, e, A, d) => {
362
+ const s = Q(l, A, d), c = tt(s, a, e);
346
363
  return t.forEach((i) => {
347
364
  const S = c.findIndex((N) => N.guid === i), E = d.filter((N) => N.parent_guid === i);
348
365
  c.splice(S + 1, 0, ...E);
349
366
  }), c;
350
- }, J = (l, t, a) => {
367
+ }, Q = (l, t, a) => {
351
368
  const {
352
369
  accounts: e = [],
353
370
  dateRange: A = { start: h(m()), end: f() },
@@ -356,23 +373,23 @@ const Rt = ({
356
373
  showSplits: c = !1
357
374
  } = l;
358
375
  return a.filter((i) => c ? !i.has_been_split : !i.parent_guid).filter((i) => !!e.find((S) => S === i.account_guid)).filter((i) => i.date >= O(A.start) && i.date <= O(A.end)).filter(d).filter((i) => {
359
- if (s === Z && i.has_been_split)
376
+ if (s === q && i.has_been_split)
360
377
  return !1;
361
378
  if (/^spl/i.test(s) && (i.has_been_split || i.parent_guid))
362
379
  return !0;
363
380
  const E = i.tags.some(
364
- (w) => _(s, t.find((M) => M.guid === w)?.name)
381
+ (w) => _(s, t.find((x) => x.guid === w)?.name)
365
382
  ), N = $(i.date);
366
383
  return _(s, i.payee) || _(s, i.feed_description) || _(s, i.category) || _(s, I(N, C.MONTH)) || _(s, I(N, C.DAY)) || _(s, I(N, C.FULL_MONTH_DAY)) || _(s, I(N, C.MONTH_DAY_YEAR)) || _(s, W(N, k)) || _(s, i.account) || _(s, `${i.amount}`) || _(s, i.memo) || E;
367
384
  });
368
- }, Q = (l, t, a) => [...l].sort((e, A) => {
385
+ }, tt = (l, t, a) => [...l].sort((e, A) => {
369
386
  const d = t, s = (e[d] || "") > (A[d] || "");
370
387
  let c = s ? -1 : 1, i = s ? 1 : -1;
371
388
  return (t === D.DATE || t === D.AMOUNT) && (c = s ? 1 : -1, i = s ? -1 : 1), a === G.ASC ? c : i;
372
389
  }), _ = (l, t) => {
373
390
  const a = l.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
374
391
  return a.every((A) => e.indexOf(A) > -1);
375
- }, tt = {
392
+ }, at = {
376
393
  account_guid: "",
377
394
  amount: 0,
378
395
  currency_code: "",
@@ -401,7 +418,7 @@ const Rt = ({
401
418
  memo: void 0,
402
419
  tags: []
403
420
  };
404
- class at {
421
+ class et {
405
422
  beginDate = h(/* @__PURE__ */ new Date());
406
423
  endDate = z(/* @__PURE__ */ new Date());
407
424
  expandedSplits = [];
@@ -410,7 +427,7 @@ class at {
410
427
  shouldDisableDrawerScroll = !1;
411
428
  searchValue = "";
412
429
  selectedAccountGuids = [];
413
- manualTransaction = tt;
430
+ manualTransaction = at;
414
431
  isAmountValid = !1;
415
432
  showInsights = !1;
416
433
  constructor() {
@@ -440,11 +457,11 @@ class at {
440
457
  this.manualTransaction = t;
441
458
  };
442
459
  }
443
- class pt {
460
+ class ft {
444
461
  globalStore;
445
462
  uiStore;
446
- api = new u("/", "");
447
- beatApi = new L("/", "");
463
+ api = new L("/", "");
464
+ beatApi = new u("/", "");
448
465
  associatedBeats = [];
449
466
  associatedBeatsLoaded = !1;
450
467
  transactions = [];
@@ -460,13 +477,13 @@ class pt {
460
477
  isLoading = !0;
461
478
  sortColumn = D.DATE;
462
479
  sortDirection = G.DESC;
463
- onAnalyticEvent = X;
480
+ onAnalyticEvent = j;
464
481
  constructor(t) {
465
- this.globalStore = t, this.uiStore = new at(), this.api = new u(
482
+ this.globalStore = t, this.uiStore = new et(), this.api = new L(
466
483
  t.endpoint,
467
484
  t.sessionToken,
468
485
  t.onError
469
- ), this.beatApi = new L(t.endpoint, t.sessionToken, t.onError), p(this);
486
+ ), this.beatApi = new u(t.endpoint, t.sessionToken, t.onError), p(this);
470
487
  }
471
488
  loadTransactionData = async () => {
472
489
  this.globalStore.accountStore.isAccountDataLoaded || await this.globalStore.accountStore.loadAccountData(), this.globalStore.categoryStore.categoriesLoaded || await this.globalStore.categoryStore.loadCategories(), await Promise.all([
@@ -482,7 +499,7 @@ class pt {
482
499
  return this.associatedBeatsLoaded && this.tagsLoaded && this.taggingsLoaded && this.transactionRulesLoaded && this.transactionsLoaded;
483
500
  }
484
501
  get detailedTransactions() {
485
- return this.isTransactionDataLoaded ? j(
502
+ return this.isTransactionDataLoaded ? Z(
486
503
  this.transactions,
487
504
  this.globalStore.accountStore.visibleAccounts,
488
505
  this.globalStore.categoryStore.categories,
@@ -490,7 +507,7 @@ class pt {
490
507
  ) : [];
491
508
  }
492
509
  get sortedTransactions() {
493
- return q(
510
+ return J(
494
511
  this.filter,
495
512
  this.uiStore.expandedSplits,
496
513
  this.sortColumn,
@@ -665,7 +682,7 @@ class pt {
665
682
  };
666
683
  }
667
684
  export {
668
- tt as D,
669
- Rt as S,
670
- pt as T
685
+ at as D,
686
+ pt as S,
687
+ ft as T
671
688
  };
@@ -11,14 +11,14 @@ import { addSeconds as v } from "date-fns/addSeconds";
11
11
  import { differenceInCalendarMonths as w } from "date-fns/differenceInCalendarMonths";
12
12
  import { endOfMonth as D } from "date-fns/endOfMonth";
13
13
  import { subMonths as I } from "date-fns/subMonths";
14
- import { b as E, a as _, c as O } from "./Category-Ccoew_sA.mjs";
15
- import { f as L, a as T } from "./Dialog-CDV0kKxj.mjs";
16
- const rt = ({
14
+ import { b as E, C as _, c as O } from "./Category-CevNQ03n.mjs";
15
+ import { f as L, a as T } from "./Dialog-BPTr3qHE.mjs";
16
+ const at = ({
17
17
  onClick: e,
18
18
  leftIcon: t,
19
19
  rightIcon: o,
20
- title: a,
21
- subtitle: r,
20
+ title: r,
21
+ subtitle: a,
22
22
  rightContent: n,
23
23
  titleBold: s = !0,
24
24
  rightContentBold: m = !0
@@ -35,8 +35,8 @@ const rt = ({
35
35
  },
36
36
  children: [
37
37
  /* @__PURE__ */ d(h, { sx: { flex: 1, minWidth: 0 }, children: [
38
- /* @__PURE__ */ l(y, { bold: s, variant: "body1", children: a }),
39
- r && /* @__PURE__ */ l(y, { variant: "caption", children: r })
38
+ /* @__PURE__ */ l(y, { bold: s, variant: "body1", children: r }),
39
+ a && /* @__PURE__ */ l(y, { variant: "caption", children: a })
40
40
  ] }),
41
41
  /* @__PURE__ */ d(h, { sx: { flexDirection: "row", alignItems: "center", gap: 1 }, children: [
42
42
  n && /* @__PURE__ */ l(y, { bold: m, display: "flex", variant: "body1", children: n }),
@@ -70,27 +70,27 @@ const rt = ({
70
70
  ) });
71
71
  }, W = (e) => _[e] ?? _.default, F = (e) => O[e];
72
72
  function G(e, t) {
73
- const o = [], a = new Date(e);
74
- for (; a <= t; ) {
75
- const r = a.getFullYear(), n = String(a.getMonth() + 1).padStart(2, "0");
76
- o.push(+`${r}${n}`), a.setMonth(a.getMonth() + 1);
73
+ const o = [], r = new Date(e);
74
+ for (; r <= t; ) {
75
+ const a = r.getFullYear(), n = String(r.getMonth() + 1).padStart(2, "0");
76
+ o.push(+`${a}${n}`), r.setMonth(r.getMonth() + 1);
77
77
  }
78
78
  return o;
79
79
  }
80
- const $ = (e) => e.reduce((o, a) => {
81
- const r = {
82
- top_level_category_guid: a.top_level_category_guid,
83
- category_guid: a.category_guid,
84
- amount: a.total,
85
- year_month: a.year_month
86
- }, { top_level_category_guid: n, category_guid: s } = r;
87
- return o[s] || (o[s] = []), o[s].push(r), n !== s && (o[n] || (o[n] = []), o[n].push(r)), o;
80
+ const $ = (e) => e.reduce((o, r) => {
81
+ const a = {
82
+ top_level_category_guid: r.top_level_category_guid,
83
+ category_guid: r.category_guid,
84
+ amount: r.total,
85
+ year_month: r.year_month
86
+ }, { top_level_category_guid: n, category_guid: s } = a;
87
+ return o[s] || (o[s] = []), o[s].push(a), n !== s && (o[n] || (o[n] = []), o[n].push(a)), o;
88
88
  }, {}), nt = (e, t, o) => {
89
- const a = $(e), r = G(t, o);
90
- return Object.entries(a).map(([s, m]) => {
91
- const c = m[0].top_level_category_guid, b = r.map((i) => {
92
- const g = m.filter((p) => p.year_month === i).reduce((p, C) => p + Math.abs(C.amount), 0), u = Number(String(i).slice(0, 4)), M = Number(String(i).slice(4));
93
- return { x: new Date(u, M - 1), y: g };
89
+ const r = $(e), a = G(t, o);
90
+ return Object.entries(r).map(([s, m]) => {
91
+ const c = m[0].top_level_category_guid, b = a.map((i) => {
92
+ const g = m.filter((p) => p.year_month === i).reduce((p, M) => p + Math.abs(M.amount), 0), u = Number(String(i).slice(0, 4)), C = Number(String(i).slice(4));
93
+ return { x: new Date(u, C - 1), y: g };
94
94
  }).sort((i, g) => i.x.getTime() - g.x.getTime());
95
95
  return {
96
96
  top_level_category_guid: c,
@@ -101,19 +101,19 @@ const $ = (e) => e.reduce((o, a) => {
101
101
  };
102
102
  });
103
103
  }, st = (e, t) => {
104
- const o = typeof e == "string" ? parseFloat(e.replace(/[^0-9.-]+/g, "")) : e, a = typeof t == "string" ? parseFloat(t.replace(/[^0-9.-]+/g, "")) : t;
105
- return (o || 0) - (a || 0);
104
+ const o = typeof e == "string" ? parseFloat(e.replace(/[^0-9.-]+/g, "")) : e, r = typeof t == "string" ? parseFloat(t.replace(/[^0-9.-]+/g, "")) : t;
105
+ return (o || 0) - (r || 0);
106
106
  }, j = (e, t) => {
107
- const o = e.subCategories.filter((n) => n.currentAmount !== 0), a = e.totalMonthlyAmounts.slice(-t), r = (n) => n.substring(0, 3) + " " + n.slice(-4);
108
- return a.map((n) => {
109
- const s = r(n.label), m = o.map((i) => {
110
- const g = i.monthlyAmounts.slice(-t).find((u) => r(u.label) === s);
107
+ const o = e.subCategories.filter((n) => n.currentAmount !== 0), r = e.totalMonthlyAmounts.slice(-t), a = (n) => n.substring(0, 3) + " " + n.slice(-4);
108
+ return r.map((n) => {
109
+ const s = a(n.label), m = o.map((i) => {
110
+ const g = i.monthlyAmounts.slice(-t).find((u) => a(u.label) === s);
111
111
  return {
112
112
  label: i.name,
113
113
  amount: Math.abs(g?.amount || 0),
114
114
  header: s
115
115
  };
116
- }), c = e.monthlyAmounts.slice(-t).find((i) => r(i.label) === s);
116
+ }), c = e.monthlyAmounts.slice(-t).find((i) => a(i.label) === s);
117
117
  return [{
118
118
  label: e.name,
119
119
  amount: Math.abs(c?.amount || 0),
@@ -121,11 +121,11 @@ const $ = (e) => e.reduce((o, a) => {
121
121
  }, ...m].sort((i, g) => g.amount - i.amount);
122
122
  });
123
123
  }, k = (e, t) => {
124
- const o = e ? e.totalMonthlyAmounts.slice(-t).map((r) => ({
125
- x: r.label.substring(0, 3),
126
- y: Math.abs(r.amount)
127
- })) : [], a = e ? j(e, t) : [];
128
- return { monthlyAmounts: o, tooltipLabels: a };
124
+ const o = e ? e.totalMonthlyAmounts.slice(-t).map((a) => ({
125
+ x: a.label.substring(0, 3),
126
+ y: Math.abs(a.amount)
127
+ })) : [], r = e ? j(e, t) : [];
128
+ return { monthlyAmounts: o, tooltipLabels: r };
129
129
  }, H = (e) => e.slice().filter(
130
130
  (t) => t.totalAmount !== 0 && t.isTransfer === !1 && t.guid !== E.INVESTMENTS
131
131
  ).sort((t, o) => Math.abs(o.totalAmount) - Math.abs(t.totalAmount));
@@ -175,7 +175,7 @@ class it {
175
175
  }
176
176
  }
177
177
  export {
178
- rt as L,
178
+ at as L,
179
179
  it as T,
180
180
  st as a,
181
181
  nt as g