@mx-cartographer/experiences 3.13.4 → 3.13.5-alpha.mm.0

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.
package/dist/index.es.js CHANGED
@@ -29,13 +29,13 @@ import { addDays as me } from "date-fns/addDays";
29
29
  import { addMonths as $A } from "date-fns/addMonths";
30
30
  import { eachDayOfInterval as io } from "date-fns/eachDayOfInterval";
31
31
  import { eachWeekOfInterval as oo } from "date-fns/eachWeekOfInterval";
32
- import { endOfMonth as DA } from "date-fns/endOfMonth";
32
+ import { endOfMonth as TA } from "date-fns/endOfMonth";
33
33
  import { format as kA } from "date-fns/format";
34
34
  import { isBefore as pA } from "date-fns/isBefore";
35
35
  import { isSameMonth as so } from "date-fns/isSameMonth";
36
- import { startOfMonth as vA } from "date-fns/startOfMonth";
36
+ import { startOfMonth as mA } from "date-fns/startOfMonth";
37
37
  import { startOfToday as J } from "date-fns/startOfToday";
38
- import { subMonths as ie } from "date-fns/subMonths";
38
+ import { subMonths as ne } from "date-fns/subMonths";
39
39
  import he from "@mui/material/Paper";
40
40
  import co from "@mui/icons-material/KeyboardArrowLeftRounded";
41
41
  import lo from "@mui/icons-material/KeyboardArrowRightRounded";
@@ -74,7 +74,7 @@ import { makeAutoObservable as bA, runInAction as U, observable as zo } from "mo
74
74
  import { differenceInDays as _o } from "date-fns/differenceInDays";
75
75
  import { getMonth as Ye } from "date-fns/getMonth";
76
76
  import { useVirtualizer as Ia } from "@tanstack/react-virtual";
77
- import { fromUnixTime as TA } from "date-fns/fromUnixTime";
77
+ import { fromUnixTime as IA } from "date-fns/fromUnixTime";
78
78
  import { format as Bo, fromUnixTime as yn, isSameDay as qo, subDays as Ko, startOfToday as ko, endOfToday as Go } from "date-fns";
79
79
  import WA from "@mui/material/Tab";
80
80
  import Xe from "@mui/material/Tabs";
@@ -1149,7 +1149,7 @@ const gn = (A, e) => A.reduce((n, r) => (n[r.guid] = e?.includes(r.guid), n), {}
1149
1149
  ) }),
1150
1150
  sx: { overflow: "auto", width: "100%" },
1151
1151
  children: S.map((L) => {
1152
- const P = c[L.guid], x = `${L.name}${h && L.accountNumber ? ` *${L.accountNumber.slice(-4)}` : ""}`;
1152
+ const P = c[L.guid], O = `${L.name}${h && L.accountNumber ? ` *${L.accountNumber.slice(-4)}` : ""}`;
1153
1153
  return /* @__PURE__ */ t(
1154
1154
  V,
1155
1155
  {
@@ -1178,7 +1178,7 @@ const gn = (A, e) => A.reduce((n, r) => (n[r.guid] = e?.includes(r.guid), n), {}
1178
1178
  }
1179
1179
  }
1180
1180
  ),
1181
- label: x
1181
+ label: O
1182
1182
  }
1183
1183
  )
1184
1184
  },
@@ -1514,10 +1514,10 @@ const qs = (A, e) => {
1514
1514
  selectedIndex: c,
1515
1515
  valueFormatter: u = (l) => `${l}`
1516
1516
  }) => {
1517
- const l = OA(), h = Ys(l), g = r.reduce(Us, []), m = A !== void 0 ? A : g.reduce(Fs, 0) / g.length, f = Math.max(...g), y = Math.min(...g), p = g.reduce(js, 0), S = f >= 0, I = y < 0, L = Pr(S, I, a), P = Pr(I, S, a), x = Ws(m, f, y, L || P), O = (q) => c === void 0 || q === c ? n : `${n}80`, N = () => /* @__PURE__ */ t(
1517
+ const l = OA(), h = Ys(l), g = r.reduce(Us, []), m = A !== void 0 ? A : g.reduce(Fs, 0) / g.length, f = Math.max(...g), y = Math.min(...g), p = g.reduce(js, 0), S = f >= 0, I = y < 0, L = Pr(S, I, a), P = Pr(I, S, a), O = Ws(m, f, y, L || P), x = (q) => c === void 0 || q === c ? n : `${n}80`, N = () => /* @__PURE__ */ t(
1518
1518
  Or,
1519
1519
  {
1520
- averageLineHeight: x,
1520
+ averageLineHeight: O,
1521
1521
  bottomHeight: P,
1522
1522
  color: "",
1523
1523
  range: p,
@@ -1534,9 +1534,9 @@ const qs = (A, e) => {
1534
1534
  Or,
1535
1535
  {
1536
1536
  ariaLabel: q.ariaLabel,
1537
- averageLineHeight: x,
1537
+ averageLineHeight: O,
1538
1538
  bottomHeight: P,
1539
- color: O(B),
1539
+ color: x(B),
1540
1540
  index: B,
1541
1541
  onClick: s,
1542
1542
  range: p,
@@ -1681,9 +1681,9 @@ const ec = ({
1681
1681
  h(e), m(n), e && u(e);
1682
1682
  }, [e, n]);
1683
1683
  const f = C.useMemo(() => {
1684
- const L = oo({ start: vA(c), end: DA(c) }), P = [];
1685
- for (let x = 0; x < L.length; x++) {
1686
- const O = L[x], N = io({ start: O, end: me(O, 6) }), q = [];
1684
+ const L = oo({ start: mA(c), end: TA(c) }), P = [];
1685
+ for (let O = 0; O < L.length; O++) {
1686
+ const x = L[O], N = io({ start: x, end: me(x, 6) }), q = [];
1687
1687
  for (let B = 0; B < N.length; B++)
1688
1688
  q.push(N[B]);
1689
1689
  P.push(q);
@@ -1703,7 +1703,7 @@ const ec = ({
1703
1703
  }, S = () => {
1704
1704
  u($A(c, 1));
1705
1705
  }, I = () => {
1706
- u(ie(c, 1));
1706
+ u(ne(c, 1));
1707
1707
  };
1708
1708
  return /* @__PURE__ */ t("div", { className: `mx-cmn-calendar ${s}`, children: /* @__PURE__ */ d(he, { sx: { boxShadow: "none" }, children: [
1709
1709
  /* @__PURE__ */ t(
@@ -1716,16 +1716,16 @@ const ec = ({
1716
1716
  }
1717
1717
  ),
1718
1718
  /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-row", children: f[0].map((L, P) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ t(E, { bold: !0, variant: "Small", children: kA(L, "EEEEE") }) }, P)) }),
1719
- f.map((L, P) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-week", children: L.map((x, O) => /* @__PURE__ */ t(
1719
+ f.map((L, P) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-week", children: L.map((O, x) => /* @__PURE__ */ t(
1720
1720
  Zs,
1721
1721
  {
1722
1722
  beginDate: l,
1723
- date: x,
1723
+ date: O,
1724
1724
  endDate: g,
1725
- isInMonth: so(x, c),
1725
+ isInMonth: so(O, c),
1726
1726
  onClick: y
1727
1727
  },
1728
- O
1728
+ x
1729
1729
  )) }, `w-${P}`)),
1730
1730
  /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ t(oA, { onClick: p, size: "small", variant: "text", children: A.today }) })
1731
1731
  ] }) });
@@ -1917,7 +1917,7 @@ const ec = ({
1917
1917
  valueFormatterString: g = "0,0",
1918
1918
  width: m
1919
1919
  }) => {
1920
- const f = qA(), y = n.flat().map((N) => N.x), p = n.flat().map((N) => N.y), S = Math.round(p.reduce((N, q) => q + N, 0) / p.length), I = Math.floor(Math.min(...p) / 100) * 100, L = Math.ceil(Math.max(...p) / 100) * 100, P = I * 0.95, x = L * 2, O = n.map((N, q) => ({
1920
+ const f = qA(), y = n.flat().map((N) => N.x), p = n.flat().map((N) => N.y), S = Math.round(p.reduce((N, q) => q + N, 0) / p.length), I = Math.floor(Math.min(...p) / 100) * 100, L = Math.ceil(Math.max(...p) / 100) * 100, P = I * 0.95, O = L * 2, x = n.map((N, q) => ({
1921
1921
  type: s ? "bar" : "line",
1922
1922
  curve: "linear",
1923
1923
  color: s ? f.palette.chart?.chart6 : e[q] ?? f.palette.primary.main,
@@ -1933,12 +1933,15 @@ const ec = ({
1933
1933
  fo,
1934
1934
  {
1935
1935
  height: r,
1936
- series: O,
1936
+ series: x,
1937
1937
  sx: {
1938
1938
  p: 4,
1939
1939
  "& .MuiBarLabel-root": {
1940
1940
  fontSize: 10,
1941
1941
  fontWeight: 600
1942
+ },
1943
+ "& .MuiMarkElement-root": {
1944
+ stroke: e ?? f.palette.primary.main
1942
1945
  }
1943
1946
  },
1944
1947
  width: m,
@@ -1950,7 +1953,7 @@ const ec = ({
1950
1953
  colorMap: c ? {
1951
1954
  type: "continuous",
1952
1955
  min: P,
1953
- max: x,
1956
+ max: O,
1954
1957
  color: [f.palette.background.paper, e[0] ?? f.palette.primary.main]
1955
1958
  } : void 0,
1956
1959
  valueFormatter: (N) => Q(N, g)
@@ -1961,7 +1964,7 @@ const ec = ({
1961
1964
  /* @__PURE__ */ t(
1962
1965
  po,
1963
1966
  {
1964
- slots: c && O.length < 2 ? {
1967
+ slots: c && x.length < 2 ? {
1965
1968
  line: (N) => /* @__PURE__ */ t(sc, { ...N, lineColor: e[0] ?? f.palette.primary.main })
1966
1969
  } : void 0
1967
1970
  }
@@ -1974,10 +1977,10 @@ const ec = ({
1974
1977
  oc,
1975
1978
  {
1976
1979
  handlers: i,
1977
- showLabel: l,
1978
1980
  style: o?.(N.dataIndex) ?? {},
1979
- yData: p,
1980
- ...N
1981
+ ...N,
1982
+ showLabel: l,
1983
+ yData: p
1981
1984
  }
1982
1985
  )
1983
1986
  } : void 0
@@ -2023,7 +2026,7 @@ const ec = ({
2023
2026
  lc,
2024
2027
  {
2025
2028
  average: S,
2026
- series: O,
2029
+ series: x,
2027
2030
  style: { position: "absolute", top: 16, left: 16 }
2028
2031
  }
2029
2032
  )
@@ -2215,9 +2218,9 @@ const ec = ({
2215
2218
  hoveredAreaData: null,
2216
2219
  isAreaHovered: !1,
2217
2220
  cursorPos: { x: 0, y: 0 }
2218
- }), { hoveredSeriesId: y, hoveredAreaData: p, isAreaHovered: S, cursorPos: I } = m, L = S && y && p, P = !L, x = [...a, ...i], O = x[0].dataset.length, N = x.flatMap((R) => R.dataset.map((AA) => AA.x)), q = x.flatMap((R) => R.dataset.map((AA) => AA.y)), B = a[0].dataset.map(
2219
- (R, AA) => a.reduce((mA, ZA) => mA + ZA.dataset[AA]?.y || 0, 0)
2220
- ), k = Math.max(...B), X = Math.max(
2221
+ }), { hoveredSeriesId: y, hoveredAreaData: p, isAreaHovered: S, cursorPos: I } = m, L = S && y && p, P = !L, O = [...a, ...i], x = O[0].dataset.length, N = O.flatMap((R) => R.dataset.map((AA) => AA.x)), q = O.flatMap((R) => R.dataset.map((AA) => AA.y)), B = a[0]?.dataset.map(
2222
+ (R, AA) => a.reduce((EA, ZA) => EA + (ZA.dataset[AA]?.y ?? 0), 0)
2223
+ ) ?? [0], k = Math.max(...B), X = Math.max(
2221
2224
  ...i.flatMap((R) => R.dataset.map((AA) => AA.y))
2222
2225
  ), F = Math.floor(Math.min(...q) / 100) * 100, aA = Math.ceil(Math.max(k, X) / 100) * 100, iA = a.map((R, AA) => ({
2223
2226
  id: `stacked-${AA}`,
@@ -2225,36 +2228,36 @@ const ec = ({
2225
2228
  top_level_guid: R.top_level_category_guid,
2226
2229
  area: !0,
2227
2230
  color: a[AA].category_color ?? c.palette.primary.main,
2228
- data: R.dataset.map((mA) => mA.y),
2231
+ data: R.dataset.map((EA) => EA.y),
2229
2232
  label: a[AA].category_name,
2230
2233
  stack: "total",
2231
2234
  type: "line",
2232
2235
  highlightScope: { highlight: "item" },
2233
- valueFormatter: (mA) => Q(mA, "0,0")
2234
- })), EA = i.map((R, AA) => ({
2236
+ valueFormatter: (EA) => Q(EA, "0,0")
2237
+ })), vA = i.map((R, AA) => ({
2235
2238
  id: `unstacked-${AA}`,
2236
2239
  guid: R.category_guid,
2237
2240
  top_level_guid: R.top_level_category_guid,
2238
2241
  area: !1,
2239
2242
  color: R.category_color,
2240
- data: R.dataset.map((mA) => mA.y),
2243
+ data: R.dataset.map((EA) => EA.y),
2241
2244
  label: R.category_name,
2242
2245
  type: "line",
2243
- valueFormatter: (mA) => Q(mA, "0,0")
2244
- })), uA = [...iA, ...EA], wA = [
2246
+ valueFormatter: (EA) => Q(EA, "0,0")
2247
+ })), uA = [...iA, ...vA], wA = [
2245
2248
  ...iA.map(({ guid: R, top_level_guid: AA }) => ({
2246
2249
  guid: R,
2247
2250
  top_level_guid: AA
2248
2251
  })),
2249
- ...EA.map(({ guid: R, top_level_guid: AA }) => ({
2252
+ ...vA.map(({ guid: R, top_level_guid: AA }) => ({
2250
2253
  guid: R,
2251
2254
  top_level_guid: AA
2252
2255
  }))
2253
2256
  ], le = (R) => {
2254
- const mA = R.startsWith("stacked-") ? a[parseInt(R.split("-")[1])] : i[parseInt(R.split("-")[1])];
2257
+ const EA = R.startsWith("stacked-") ? a[parseInt(R.split("-")[1])] : i[parseInt(R.split("-")[1])];
2255
2258
  return {
2256
- guid: mA.category_guid,
2257
- topLevelGuid: mA.top_level_category_guid
2259
+ guid: EA.category_guid,
2260
+ topLevelGuid: EA.top_level_category_guid
2258
2261
  };
2259
2262
  }, de = (R) => {
2260
2263
  g(R), n?.(R ?? "");
@@ -2266,8 +2269,8 @@ const ec = ({
2266
2269
  {
2267
2270
  onMouseMove: (R) => {
2268
2271
  const AA = R.currentTarget.getBoundingClientRect();
2269
- f((mA) => ({
2270
- ...mA,
2272
+ f((EA) => ({
2273
+ ...EA,
2271
2274
  cursorPos: {
2272
2275
  x: R.clientX - AA.left,
2273
2276
  y: R.clientY - AA.top
@@ -2289,8 +2292,8 @@ const ec = ({
2289
2292
  height: o || 400,
2290
2293
  margin: { bottom: 50 },
2291
2294
  onHighlightChange: (R) => {
2292
- const AA = R?.seriesId && uA.find((ae) => ae.id === R.seriesId), mA = AA && R?.dataIndex !== void 0, ZA = AA && R?.dataIndex === void 0;
2293
- if (mA)
2295
+ const AA = R?.seriesId && uA.find((ie) => ie.id === R.seriesId), EA = AA && R?.dataIndex !== void 0, ZA = AA && R?.dataIndex === void 0;
2296
+ if (EA)
2294
2297
  f({
2295
2298
  hoveredSeriesId: String(R.seriesId),
2296
2299
  hoveredAreaData: null,
@@ -2298,13 +2301,13 @@ const ec = ({
2298
2301
  cursorPos: I
2299
2302
  }), e?.(le(String(R.seriesId)).guid);
2300
2303
  else if (ZA) {
2301
- const ae = AA?.data.map((Tt, un) => ({
2304
+ const ie = AA?.data.map((Tt, un) => ({
2302
2305
  x: N[un],
2303
2306
  y: Tt
2304
2307
  })) ?? [];
2305
2308
  f({
2306
2309
  hoveredSeriesId: String(R.seriesId),
2307
- hoveredAreaData: ae,
2310
+ hoveredAreaData: ie,
2308
2311
  isAreaHovered: !0,
2309
2312
  cursorPos: I
2310
2313
  }), A?.(le(String(R.seriesId)).guid);
@@ -2348,10 +2351,10 @@ const ec = ({
2348
2351
  '& [class*="MuiLineElement-series-unstacked-"]': {
2349
2352
  strokeWidth: 3
2350
2353
  },
2351
- ...h && iA.reduce((R, AA, mA) => {
2352
- const ZA = `.MuiAreaElement-series-stacked-${mA}`;
2354
+ ...h && iA.reduce((R, AA, EA) => {
2355
+ const ZA = `.MuiAreaElement-series-stacked-${EA}`;
2353
2356
  return R[ZA] = {
2354
- opacity: iA[mA].guid === h ? 0.9 : 0.2
2357
+ opacity: iA[EA].guid === h ? 0.9 : 0.2
2355
2358
  }, R;
2356
2359
  }, {})
2357
2360
  },
@@ -2364,7 +2367,7 @@ const ec = ({
2364
2367
  data: N,
2365
2368
  scaleType: "time",
2366
2369
  valueFormatter: (R) => $(R, Y.MONTH_SHORT_YEAR),
2367
- tickNumber: O
2370
+ tickNumber: x
2368
2371
  // How many ticks to show on the x-axis
2369
2372
  }
2370
2373
  ],
@@ -2559,12 +2562,12 @@ const ec = ({
2559
2562
  calendarActions: A,
2560
2563
  color: e = "primary",
2561
2564
  copy: n,
2562
- range: r = [vA(J()), DA(Me())],
2565
+ range: r = [mA(J()), TA(Me())],
2563
2566
  shouldShrinkToIcon: a = !0,
2564
2567
  toolTipContent: i = "",
2565
2568
  variant: o = "outlined"
2566
2569
  }) => {
2567
- const s = hA(), c = s.palette.mode === "dark", { isDesktop: u, isMobile: l } = KA(), [h, g] = C.useState(r), [m, f] = C.useState(n.dateRangePickerCopy.dateRangeThisMonth), [y, p] = C.useState(h), [S, I] = C.useState(!1), [L, P] = C.useState(!0), [x, O] = C.useState(6), N = [
2570
+ const s = hA(), c = s.palette.mode === "dark", { isDesktop: u, isMobile: l } = KA(), [h, g] = C.useState(r), [m, f] = C.useState(n.dateRangePickerCopy.dateRangeThisMonth), [y, p] = C.useState(h), [S, I] = C.useState(!1), [L, P] = C.useState(!0), [O, x] = C.useState(6), N = [
2568
2571
  { label: "3M", value: 3 },
2569
2572
  { label: "6M", value: 6 },
2570
2573
  { label: "9M", value: 9 },
@@ -2574,19 +2577,19 @@ const ec = ({
2574
2577
  p(r);
2575
2578
  }, [r]), C.useEffect(() => {
2576
2579
  o === "timeframebuttons" && A.onRangeChanged(q());
2577
- }, [x]);
2580
+ }, [O]);
2578
2581
  const q = () => {
2579
- const F = DA(Me());
2580
- return [DA(ie(F, x)), F];
2582
+ const F = TA(Me());
2583
+ return [TA(ne(F, O)), F];
2581
2584
  }, B = (F) => {
2582
- const aA = [...h], iA = h[0], EA = h[1], uA = F === "previous";
2585
+ const aA = [...h], iA = h[0], vA = h[1], uA = F === "previous";
2583
2586
  if (m === n.dateRangePickerCopy.dateRangeThisMonth)
2584
- aA[0] = uA ? ie(iA, 1) : $A(iA, 1), aA[1] = DA(uA ? ie(EA, 1) : $A(EA, 1));
2587
+ aA[0] = uA ? ne(iA, 1) : $A(iA, 1), aA[1] = TA(uA ? ne(vA, 1) : $A(vA, 1));
2585
2588
  else if (m === n.dateRangePickerCopy.dateRangeYTD || m === n.dateRangePickerCopy.dateRangeLastYear)
2586
2589
  aA[0] = uA ? Er(vr(iA), 1) : Ct(vr(iA), 1), aA[1] = uA ? Er(pr(iA), 1) : Ct(pr(iA), 1);
2587
2590
  else {
2588
- const wA = xo(EA, iA);
2589
- aA[0] = F === "previous" ? pe(iA, wA) : me(iA, wA), aA[1] = F === "previous" ? pe(EA, wA) : me(EA, wA);
2591
+ const wA = xo(vA, iA);
2592
+ aA[0] = F === "previous" ? pe(iA, wA) : me(iA, wA), aA[1] = F === "previous" ? pe(vA, wA) : me(vA, wA);
2590
2593
  }
2591
2594
  g(aA), A.onRangeChanged(aA);
2592
2595
  }, k = () => {
@@ -2594,7 +2597,7 @@ const ec = ({
2594
2597
  m === n.dateRangePickerCopy.dateRangeThisMonth || m === n.dateRangePickerCopy.dateRangeLastMonth
2595
2598
  ), A.onRangeChanged(y);
2596
2599
  }, X = (F) => {
2597
- O(F);
2600
+ x(F);
2598
2601
  };
2599
2602
  return /* @__PURE__ */ d(T, { className: "mx-cmn-date-range-selector", m: 4, children: [
2600
2603
  /* @__PURE__ */ t(
@@ -2692,7 +2695,7 @@ const ec = ({
2692
2695
  color: e,
2693
2696
  exclusive: !0,
2694
2697
  orientation: "horizontal",
2695
- value: x,
2698
+ value: O,
2696
2699
  children: N?.map((F) => /* @__PURE__ */ t(
2697
2700
  Nn,
2698
2701
  {
@@ -2975,40 +2978,40 @@ const Fe = ({
2975
2978
  sx: l = {},
2976
2979
  title: h = ""
2977
2980
  }) => {
2978
- const [g, { height: m, width: f }] = $a(), { onEvent: y } = Z(), { isDesktop: p, isMobile: S, isTablet: I } = KA(), { displayedDateRange: L, selectedAccountGuids: P, setSelectedAccountGuids: x } = yA(), { common: O } = D(), N = () => {
2981
+ const [g, { height: m, width: f }] = $a(), { onEvent: y } = Z(), { isDesktop: p, isMobile: S, isTablet: I } = KA(), { displayedDateRange: L, selectedAccountGuids: P, setSelectedAccountGuids: O } = yA(), { common: x } = D(), N = () => {
2979
2982
  c && (c(), y(j.WIDGET_BACK_CLICK));
2980
2983
  }, q = {
2981
2984
  accountFilterOptionsCopy: {
2982
- accountTypeAccounts: O.account_filter.account_type_accounts,
2983
- cancelButton: O.cancel_button,
2984
- filterButton: O.filter_button,
2985
- filterButtonAria: O.account_filter.filter_button_generic_aria,
2986
- selectAllAccounts: O.account_filter.select_all_accounts,
2987
- toggleAccountTypeAccounts: O.account_filter.toggle_account_type_accounts,
2988
- unselectAllAccounts: O.account_filter.unselect_all_accounts,
2989
- zeroStateButton: O.account_filter.zero_state_button,
2990
- zeroStateDescription: O.account_filter.zero_state_description,
2991
- zeroStateTitle: O.account_filter.zero_state_title
2985
+ accountTypeAccounts: x.account_filter.account_type_accounts,
2986
+ cancelButton: x.cancel_button,
2987
+ filterButton: x.filter_button,
2988
+ filterButtonAria: x.account_filter.filter_button_generic_aria,
2989
+ selectAllAccounts: x.account_filter.select_all_accounts,
2990
+ toggleAccountTypeAccounts: x.account_filter.toggle_account_type_accounts,
2991
+ unselectAllAccounts: x.account_filter.unselect_all_accounts,
2992
+ zeroStateButton: x.account_filter.zero_state_button,
2993
+ zeroStateDescription: x.account_filter.zero_state_description,
2994
+ zeroStateTitle: x.account_filter.zero_state_title
2992
2995
  },
2993
- title: O.account_filter.title
2996
+ title: x.account_filter.title
2994
2997
  }, B = {
2995
2998
  dateRangePickerCopy: {
2996
- dateRangeFrom: O.date_range_picker.from,
2997
- dateRangeTo: O.date_range_picker.to,
2998
- dateRangeCustom: O.date_range_picker.custom,
2999
- dateRangeSelectARange: O.date_range_picker.select_range,
3000
- dateRangeThisMonth: O.date_range_picker.this_month,
3001
- dateRangeLastMonth: O.date_range_picker.last_month,
3002
- dateRangeLast30Days: O.date_range_picker.last_30_days,
3003
- dateRangeLast90Days: O.date_range_picker.last_90_days,
3004
- dateRangeYTD: O.date_range_picker.ytd,
3005
- dateRangeLastYear: O.date_range_picker.last_year,
3006
- dateRangeSelect: O.date_range_picker.select
2999
+ dateRangeFrom: x.date_range_picker.from,
3000
+ dateRangeTo: x.date_range_picker.to,
3001
+ dateRangeCustom: x.date_range_picker.custom,
3002
+ dateRangeSelectARange: x.date_range_picker.select_range,
3003
+ dateRangeThisMonth: x.date_range_picker.this_month,
3004
+ dateRangeLastMonth: x.date_range_picker.last_month,
3005
+ dateRangeLast30Days: x.date_range_picker.last_30_days,
3006
+ dateRangeLast90Days: x.date_range_picker.last_90_days,
3007
+ dateRangeYTD: x.date_range_picker.ytd,
3008
+ dateRangeLastYear: x.date_range_picker.last_year,
3009
+ dateRangeSelect: x.date_range_picker.select
3007
3010
  },
3008
- dateRangeEditApply: O.date_range_picker.edit_apply,
3009
- dateRangeEditTitle: O.date_range_picker.edit_title,
3010
- dateRangeNextAria: O.date_range_picker.next_aria,
3011
- dateRangePreviousAria: O.date_range_picker.previous_aria
3011
+ dateRangeEditApply: x.date_range_picker.edit_apply,
3012
+ dateRangeEditTitle: x.date_range_picker.edit_title,
3013
+ dateRangeNextAria: x.date_range_picker.next_aria,
3014
+ dateRangePreviousAria: x.date_range_picker.previous_aria
3012
3015
  }, k = a ? a.start : L.start, X = a ? a.end : L.end;
3013
3016
  return /* @__PURE__ */ d(
3014
3017
  RA,
@@ -3048,7 +3051,7 @@ const Fe = ({
3048
3051
  copy: q,
3049
3052
  onFilterClick: (F) => {
3050
3053
  const aA = A.filter((iA) => F.includes(iA.guid)).map((iA) => iA.guid);
3051
- x(aA), u?.();
3054
+ O(aA), u?.();
3052
3055
  },
3053
3056
  selectedAccountGuids: P,
3054
3057
  showAccountNumbers: !1,
@@ -3091,7 +3094,7 @@ const Fe = ({
3091
3094
  S && c && /* @__PURE__ */ t(
3092
3095
  _A,
3093
3096
  {
3094
- "aria-label": O.back_to_dashboard,
3097
+ "aria-label": x.back_to_dashboard,
3095
3098
  onClick: N,
3096
3099
  sx: { ml: -16, mr: 16 },
3097
3100
  children: /* @__PURE__ */ t(M, { name: "arrow_back" })
@@ -3205,19 +3208,19 @@ const Mr = "connect_widget", Rr = "connections_widget", Sc = ({
3205
3208
  ...h
3206
3209
  }) => {
3207
3210
  const [g, m] = C.useState(""), { common: f } = D(), y = a || f.currency_input, p = OA(), S = bc(p), I = /^[0-9]*$/, L = /^(\d)*(\,)?([0-9]{1,2})?$/, P = /^(\d)*(\.)?([0-9]{1,2})?$/;
3208
- let x;
3209
- const O = C.useRef(Ro());
3211
+ let O;
3212
+ const x = C.useRef(Ro());
3210
3213
  if (A)
3211
3214
  switch (Ns()) {
3212
3215
  case zt.CAD:
3213
- x = L;
3216
+ O = L;
3214
3217
  break;
3215
3218
  default:
3216
- x = P;
3219
+ O = P;
3217
3220
  break;
3218
3221
  }
3219
3222
  else
3220
- x = I;
3223
+ O = I;
3221
3224
  C.useEffect(() => {
3222
3225
  N(n);
3223
3226
  }, [n]);
@@ -3232,7 +3235,7 @@ const Mr = "connect_widget", Rr = "connections_widget", Sc = ({
3232
3235
  y.error_amount_must_be_less_than_or_equal_to,
3233
3236
  Q(Sr, A ? "0,0.00" : "0,0", Math.floor)
3234
3237
  )
3235
- ), l?.(!1)) : q.toString().match(x) ? i() ? (m(""), l?.(!0)) : (m(o), l?.(!1)) : (m(y.error_amount_is_invalid), l?.(!1)), u(q.toString());
3238
+ ), l?.(!1)) : q.toString().match(O) ? i() ? (m(""), l?.(!0)) : (m(o), l?.(!1)) : (m(y.error_amount_is_invalid), l?.(!1)), u(q.toString());
3236
3239
  };
3237
3240
  return /* @__PURE__ */ t(
3238
3241
  Ne,
@@ -3251,7 +3254,7 @@ const Mr = "connect_widget", Rr = "connections_widget", Sc = ({
3251
3254
  pattern: "[0-9]*"
3252
3255
  },
3253
3256
  label: s,
3254
- name: `currency-input-${O.current}`,
3257
+ name: `currency-input-${x.current}`,
3255
3258
  onChange: (q) => N(q.target.value),
3256
3259
  value: n,
3257
3260
  ...h
@@ -3261,7 +3264,7 @@ const Mr = "connect_widget", Rr = "connections_widget", Sc = ({
3261
3264
  "& .MuiInputBase-adornedStart > .p": {
3262
3265
  marginRight: A.Spacing.Tiny
3263
3266
  }
3264
- }), re = ({ label: A = "", size: e = 32 }) => {
3267
+ }), ae = ({ label: A = "", size: e = 32 }) => {
3265
3268
  const n = OA();
3266
3269
  return /* @__PURE__ */ d(w, { alignItems: "center", gap: n.Spacing.XLarge, height: 450, justifyContent: "center", children: [
3267
3270
  /* @__PURE__ */ t(Mn, { size: e }),
@@ -3594,7 +3597,7 @@ class Nc {
3594
3597
  api = new zr("/", "");
3595
3598
  categoryApi = new Bt("/", "");
3596
3599
  globalStore;
3597
- dateRange = { start: vA(J()), end: DA(J()) };
3600
+ dateRange = { start: mA(J()), end: TA(J()) };
3598
3601
  budgets = [];
3599
3602
  categoryTotals = [];
3600
3603
  theme = {};
@@ -3712,10 +3715,10 @@ const tt = () => {
3712
3715
  f && h(f), m(y);
3713
3716
  }, [f, y]);
3714
3717
  const p = C.useMemo(
3715
- () => r.filter((P) => i.includes(P.guid)).reduce((P, x) => P + (x?.balance || 0), 0),
3718
+ () => r.filter((P) => i.includes(P.guid)).reduce((P, O) => P + (O?.balance || 0), 0),
3716
3719
  [i, y]
3717
3720
  ), S = C.useMemo(
3718
- () => u.filter((P) => i.includes(P.accountGuid || "")).reduce((P, x) => P + x.amount, 0),
3721
+ () => u.filter((P) => i.includes(P.accountGuid || "")).reduce((P, O) => P + O.amount, 0),
3719
3722
  [i, u]
3720
3723
  ), I = C.useMemo(
3721
3724
  () => p - S,
@@ -4280,7 +4283,7 @@ const _c = [
4280
4283
  }, Xc = (A, e, n) => {
4281
4284
  const {
4282
4285
  accounts: r = [],
4283
- dateRange: a = { start: vA(J()), end: Me() },
4286
+ dateRange: a = { start: mA(J()), end: Me() },
4284
4287
  custom: i = () => !0,
4285
4288
  searchTerm: o = ""
4286
4289
  } = A;
@@ -4291,7 +4294,7 @@ const _c = [
4291
4294
  return !0;
4292
4295
  const u = s.tags.some(
4293
4296
  (h) => Ae(o, e.find((g) => g.guid === h)?.name)
4294
- ), l = TA(s.date);
4297
+ ), l = IA(s.date);
4295
4298
  return Ae(o, s.payee) || Ae(o, s.feed_description) || Ae(o, s.category) || Ae(o, $(l, Y.MONTH)) || Ae(o, $(l, Y.DAY)) || Ae(o, $(l, Y.FULL_MONTH_DAY)) || Ae(o, $(l, Y.MONTH_DAY_YEAR)) || Ae(o, kA(l, ys)) || Ae(o, s.account) || Ae(o, `${s.amount}`) || Ae(o, s.memo) || u;
4296
4299
  });
4297
4300
  }, Qc = (A, e, n) => [...A].sort((r, a) => {
@@ -4333,8 +4336,8 @@ const ei = {
4333
4336
  tags: []
4334
4337
  };
4335
4338
  let Yc = class {
4336
- beginDate = vA(/* @__PURE__ */ new Date());
4337
- endDate = DA(/* @__PURE__ */ new Date());
4339
+ beginDate = mA(/* @__PURE__ */ new Date());
4340
+ endDate = TA(/* @__PURE__ */ new Date());
4338
4341
  expandedSplits = [];
4339
4342
  isInitialized = !1;
4340
4343
  height = 550;
@@ -4391,7 +4394,7 @@ class Vc {
4391
4394
  }
4392
4395
  initialize = async (e, n) => {
4393
4396
  this.api = new Br(e, n), this.beatApi = new Ze(e, n), Promise.all([
4394
- this.loadAssociatedBeats(vA(/* @__PURE__ */ new Date())),
4397
+ this.loadAssociatedBeats(mA(/* @__PURE__ */ new Date())),
4395
4398
  this.loadTags(),
4396
4399
  this.loadTaggings(),
4397
4400
  this.loadTransactionRules(),
@@ -4479,7 +4482,7 @@ class Vc {
4479
4482
  loadTransactionsByDateRange = async (e, n) => {
4480
4483
  console.warn("DEPRECATED: loadTransactionsByDateRange will be removed"), this.setFilter({
4481
4484
  ...this.filter,
4482
- dateRange: { start: TA(n), end: TA(e) }
4485
+ dateRange: { start: IA(n), end: IA(e) }
4483
4486
  });
4484
4487
  };
4485
4488
  removeTag = async (e) => {
@@ -4621,10 +4624,10 @@ const JA = () => {
4621
4624
  e && /* @__PURE__ */ t(E, { color: "secondary", variant: "XSmall", children: r.zero_state_there_are_no_transactions })
4622
4625
  ] });
4623
4626
  }, $c = b(Zc), Kr = (A, e) => {
4624
- const n = TA(e[A].date), r = TA(e[A - 1]?.date);
4627
+ const n = IA(e[A].date), r = IA(e[A - 1]?.date);
4625
4628
  return !jA(n, r);
4626
4629
  }, Al = (A, e) => {
4627
- const n = TA(e[A].date), r = TA(e[A + 1]?.date);
4630
+ const n = IA(e[A].date), r = IA(e[A + 1]?.date);
4628
4631
  return jA(n, r);
4629
4632
  }, Ar = (A) => {
4630
4633
  const e = mt(A);
@@ -4652,12 +4655,12 @@ const JA = () => {
4652
4655
  const e = ti(A);
4653
4656
  return _e(e, 1);
4654
4657
  }, rl = (A) => Ct(A, 1), gt = (A) => {
4655
- const e = TA(A);
4658
+ const e = IA(A);
4656
4659
  return new Date(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate());
4657
- }, rn = (A) => $(TA(A), Y.DAY_OF_WEEK_MONTH_DAY), Gr = 65, Xr = 34, al = ({
4660
+ }, rn = (A) => $(IA(A), Y.DAY_OF_WEEK_MONTH_DAY), Gr = 65, Xr = 34, al = ({
4658
4661
  bgcolor: A,
4659
4662
  height: e = "calc(100dvh - 36px)",
4660
- loader: n = /* @__PURE__ */ t(re, { label: "Loading", size: 40 }),
4663
+ loader: n = /* @__PURE__ */ t(ae, { label: "Loading", size: 40 }),
4661
4664
  onClick: r,
4662
4665
  showInsights: a = !1,
4663
4666
  showLoader: i = !1,
@@ -4746,7 +4749,7 @@ const JA = () => {
4746
4749
  ]
4747
4750
  }
4748
4751
  );
4749
- }, cl = b(sl), ll = (A) => /* @__PURE__ */ t(E, { tabIndex: A.tabIndex, variant: "Small", children: $(TA(A.row.date), Y.MONTH_DAY) }), dl = (A) => {
4752
+ }, cl = b(sl), ll = (A) => /* @__PURE__ */ t(E, { tabIndex: A.tabIndex, variant: "Small", children: $(IA(A.row.date), Y.MONTH_DAY) }), dl = (A) => {
4750
4753
  const e = qA(), { transactions: n } = D(), { is_flagged: r, is_hidden: a, has_been_viewed: i, parent_guid: o } = A.row, c = !i && !!!o;
4751
4754
  return /* @__PURE__ */ d(
4752
4755
  T,
@@ -4869,7 +4872,7 @@ const JA = () => {
4869
4872
  if (!C.useContext(et))
4870
4873
  throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
4871
4874
  return MA().uiStore;
4872
- }, ne = {
4875
+ }, re = {
4873
4876
  ON_CATEGORY_EXPANDED: "onCategoryExpanded",
4874
4877
  ON_CATEGORY_COLLAPSED: "onCategoryCollapsed",
4875
4878
  ON_CATEGORY_SELECTED: "onCategorySelected",
@@ -4936,11 +4939,11 @@ const fl = ({
4936
4939
  );
4937
4940
  }, er = b(fl), ml = ({ parentCategory: A }) => {
4938
4941
  const [e, n] = C.useState(!1), { addCategory: r } = MA(), { categories: a } = D(), { onEvent: i } = Z(), { setShouldDisableDrawerScroll: o } = je(), s = async (l) => {
4939
- await r(l.trim(), A.guid), i(ne.ON_SUBCATEGORY_ADDED), n(!1);
4942
+ await r(l.trim(), A.guid), i(re.ON_SUBCATEGORY_ADDED), n(!1);
4940
4943
  }, c = async () => {
4941
- i(ne.ON_SUBCATEGORY_ADD_CLICK), o(!0), n(!0);
4944
+ i(re.ON_SUBCATEGORY_ADD_CLICK), o(!0), n(!0);
4942
4945
  }, u = () => {
4943
- n(!1), i(ne.ON_SUBCATEGORY_ADD_CANCEL_CLICK);
4946
+ n(!1), i(re.ON_SUBCATEGORY_ADD_CANCEL_CLICK);
4944
4947
  };
4945
4948
  return /* @__PURE__ */ d(V, { disableGutters: !0, disablePadding: !0, children: [
4946
4949
  /* @__PURE__ */ t(lA, { onClick: c, sx: { ml: 60 }, children: /* @__PURE__ */ t(
@@ -4966,9 +4969,9 @@ const fl = ({
4966
4969
  showRename: n
4967
4970
  }) => {
4968
4971
  const { updateCategory: r } = MA(), { onEvent: a } = Z(), i = async (s) => {
4969
- await r({ ...e, name: s }), a(ne.ON_SUBCATEGORY_SAVED), A(!1);
4972
+ await r({ ...e, name: s }), a(re.ON_SUBCATEGORY_SAVED), A(!1);
4970
4973
  }, o = () => {
4971
- A(!1), a(ne.ON_SUBCATEGORY_EDIT_CANCEL_CLICK);
4974
+ A(!1), a(re.ON_SUBCATEGORY_EDIT_CANCEL_CLICK);
4972
4975
  };
4973
4976
  return /* @__PURE__ */ t(
4974
4977
  er,
@@ -4987,9 +4990,9 @@ const fl = ({
4987
4990
  subCategory: r
4988
4991
  }) => {
4989
4992
  const { onEvent: a } = Z(), { removeCategory: i } = MA(), o = () => {
4990
- n(!1), a(ne.ON_SUBCATEGORY_DELETE_CLICK);
4993
+ n(!1), a(re.ON_SUBCATEGORY_DELETE_CLICK);
4991
4994
  }, s = async () => {
4992
- a(ne.ON_SUBCATEGORY_DELETED), await i(r.guid), n(!1);
4995
+ a(re.ON_SUBCATEGORY_DELETED), await i(r.guid), n(!1);
4993
4996
  };
4994
4997
  return /* @__PURE__ */ t(
4995
4998
  er,
@@ -5025,7 +5028,7 @@ const fl = ({
5025
5028
  "aria-pressed": p,
5026
5029
  color: "secondary",
5027
5030
  onClick: () => {
5028
- S && (a(e.guid), n(e.guid), l(ne.ON_CATEGORY_SELECTED));
5031
+ S && (a(e.guid), n(e.guid), l(re.ON_CATEGORY_SELECTED));
5029
5032
  },
5030
5033
  sx: { height: 44 },
5031
5034
  children: [
@@ -5047,7 +5050,7 @@ const fl = ({
5047
5050
  {
5048
5051
  "aria-label": _(u.edit_subcategory_aria, e.name),
5049
5052
  onClick: () => {
5050
- g(!0), i(!0), l(ne.ON_SUBCATEGORY_EDIT_CLICK);
5053
+ g(!0), i(!0), l(re.ON_SUBCATEGORY_EDIT_CLICK);
5051
5054
  },
5052
5055
  children: /* @__PURE__ */ t(ts, { color: "secondary" })
5053
5056
  }
@@ -5058,7 +5061,7 @@ const fl = ({
5058
5061
  "aria-label": _(u.delete_subcategory_aria, e.name),
5059
5062
  edge: "end",
5060
5063
  onClick: () => {
5061
- f(!0), i(!0), l(ne.ON_SUBCATEGORY_DELETE_CLICK);
5064
+ f(!0), i(!0), l(re.ON_SUBCATEGORY_DELETE_CLICK);
5062
5065
  },
5063
5066
  children: /* @__PURE__ */ t(pt, { color: "secondary" })
5064
5067
  }
@@ -5113,7 +5116,7 @@ const fl = ({
5113
5116
  }, Tl = b(bl), Il = ({ category: A, subCategories: e }) => {
5114
5117
  const { expandedGuid: n, searchValue: r, setExpandedGuid: a } = je(), { onEvent: i } = Z(), o = A.guid === n, s = () => {
5115
5118
  const c = A.guid !== n ? A.guid : null;
5116
- a(c), i(c ? ne.ON_CATEGORY_EXPANDED : ne.ON_CATEGORY_COLLAPSED);
5119
+ a(c), i(c ? re.ON_CATEGORY_EXPANDED : re.ON_CATEGORY_COLLAPSED);
5117
5120
  };
5118
5121
  return /* @__PURE__ */ d(C.Fragment, { children: [
5119
5122
  /* @__PURE__ */ t(V, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
@@ -5270,7 +5273,7 @@ const fl = ({
5270
5273
  }, jr = (A) => {
5271
5274
  const e = [], n = J();
5272
5275
  for (let r = 0; r < Qr; r++) {
5273
- const a = vA(ie(n, Qr - r)), o = A.filter(
5276
+ const a = mA(ne(n, Qr - r)), o = A.filter(
5274
5277
  (s) => s.year_month === Number(kA(a, "yyyyMM"))
5275
5278
  ).reduce((s, c) => s + c.total, 0);
5276
5279
  e.push({
@@ -5371,7 +5374,7 @@ class Bl {
5371
5374
  }
5372
5375
  };
5373
5376
  loadMonthlyCategoryTotals = async (e = this.globalStore.accountStore.accounts, n, r) => {
5374
- const a = fA(vA(n ?? ie(/* @__PURE__ */ new Date(), 11))), i = fA(DA(r ?? /* @__PURE__ */ new Date()));
5377
+ const a = fA(mA(n ?? ne(/* @__PURE__ */ new Date(), 11))), i = fA(TA(r ?? /* @__PURE__ */ new Date()));
5375
5378
  try {
5376
5379
  const o = await this.api.getMonthlyCategoryTotals(a, i, e);
5377
5380
  U(() => {
@@ -5508,7 +5511,7 @@ const ri = ({ transaction: A }) => {
5508
5511
  {
5509
5512
  primary: o.date_title,
5510
5513
  primaryTypographyProps: { variant: "XSmall" },
5511
- secondary: /* @__PURE__ */ t(E, { bold: !0, variant: "Body", children: $(TA(A.date), Y.YEAR_MONTH_DAY) })
5514
+ secondary: /* @__PURE__ */ t(E, { bold: !0, variant: "Body", children: $(IA(A.date), Y.YEAR_MONTH_DAY) })
5512
5515
  }
5513
5516
  ),
5514
5517
  /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t(M, { name: "chevron_right", weight: GA.Dark }) })
@@ -5528,7 +5531,7 @@ const ri = ({ transaction: A }) => {
5528
5531
  children: /* @__PURE__ */ t(w, { alignItems: "center", mt: e.Spacing.XXLarge, children: /* @__PURE__ */ t(
5529
5532
  ec,
5530
5533
  {
5531
- beginDate: TA(u),
5534
+ beginDate: IA(u),
5532
5535
  copy: {
5533
5536
  nextAria: o.date_next_aria,
5534
5537
  prevAria: o.date_prev_aria,
@@ -5970,9 +5973,9 @@ const ri = ({ transaction: A }) => {
5970
5973
  y([{ ...c }, { ...u }]), e(j.TRANSACTION_DETAILS_CLICK_SPLIT, {
5971
5974
  transaction_guid: A.guid
5972
5975
  }), h(!0);
5973
- }, x = async () => {
5974
- e(z.ON_TRANSACTION_SPLIT_SAVE_CLICK), await n({ ...A, has_been_split: !0 }, f), h(!1);
5975
5976
  }, O = async () => {
5977
+ e(z.ON_TRANSACTION_SPLIT_SAVE_CLICK), await n({ ...A, has_been_split: !0 }, f), h(!1);
5978
+ }, x = async () => {
5976
5979
  e(z.ON_TRANSACTION_SPLIT_CANCEL_CLICK), y([{ ...c }, { ...u }]), h(!1);
5977
5980
  }, N = async () => {
5978
5981
  e(j.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
@@ -6002,8 +6005,8 @@ const ri = ({ transaction: A }) => {
6002
6005
  ariaLabelClose: a.close_aria,
6003
6006
  isOpen: l,
6004
6007
  isPrimaryDisabled: q,
6005
- onClose: O,
6006
- onPrimaryAction: x,
6008
+ onClose: x,
6009
+ onPrimaryAction: O,
6007
6010
  primaryText: a.save_button,
6008
6011
  secondaryText: a.cancel_button,
6009
6012
  title: i.split_transaction_title,
@@ -6465,7 +6468,7 @@ const ri = ({ transaction: A }) => {
6465
6468
  a.href = `data:attachment/csv;charset=utf-8,${r}`, a.download = "transactions.csv", document.body.appendChild(a), a.click(), document.body.removeChild(a);
6466
6469
  }, Cd = (A, e) => A.map((n) => ({
6467
6470
  // TODO: Data format should be localized
6468
- Date: kA(TA(n.date), "MM/dd/yy"),
6471
+ Date: kA(IA(n.date), "MM/dd/yy"),
6469
6472
  Description: md(n),
6470
6473
  "Original Description": n.feed_description,
6471
6474
  Amount: `${n.amount}`,
@@ -6642,22 +6645,22 @@ const ri = ({ transaction: A }) => {
6642
6645
  tags: S,
6643
6646
  transactions: I,
6644
6647
  updateTransaction: L
6645
- } = dA(), { common: P, transactions: x } = D(), { userProfile: O } = en(), { onEvent: N } = Z(), {
6648
+ } = dA(), { common: P, transactions: O } = D(), { userProfile: x } = en(), { onEvent: N } = Z(), {
6646
6649
  displayedDateRange: q,
6647
6650
  isInitialized: B,
6648
6651
  selectedAccountGuids: k,
6649
6652
  selectedAccounts: X,
6650
6653
  setDisplayedDate: F,
6651
6654
  setSelectedAccounts: aA
6652
- } = yA(), [iA, EA] = C.useState(""), [uA, wA] = C.useState(""), [le, de] = C.useState(!1), [ze, R] = C.useState(!1), [AA, mA] = C.useState(!1);
6655
+ } = yA(), [iA, vA] = C.useState(""), [uA, wA] = C.useState(""), [le, de] = C.useState(!1), [ze, R] = C.useState(!1), [AA, EA] = C.useState(!1);
6653
6656
  C.useEffect(() => {
6654
6657
  aA(a);
6655
6658
  }, [a]), C.useEffect(() => {
6656
- const IA = vA(J()), hr = DA(J());
6657
- F(IA, hr), p({
6658
- dateRange: { start: IA, end: hr },
6659
+ const DA = mA(J()), hr = TA(J());
6660
+ F(DA, hr), p({
6661
+ dateRange: { start: DA, end: hr },
6659
6662
  accounts: X.map((Ui) => Ui.guid)
6660
- }), mA(!0), N(j.TRANSACTIONS_VIEW);
6663
+ }), EA(!0), N(j.TRANSACTIONS_VIEW);
6661
6664
  }, []), C.useEffect(() => {
6662
6665
  AA && (p({
6663
6666
  ...f,
@@ -6668,46 +6671,46 @@ const ri = ({ transaction: A }) => {
6668
6671
  h(n);
6669
6672
  }, [n]);
6670
6673
  const ZA = C.useMemo(
6671
- () => a.filter((IA) => IA.is_manual),
6674
+ () => a.filter((DA) => DA.is_manual),
6672
6675
  [a]
6673
- ), ae = uA ? I.find((IA) => IA.guid === uA) : void 0, Tt = c && !!s.payee && !!s.account_guid && !!s.category_guid, un = (IA) => {
6674
- F(IA[0], IA[1]);
6675
- }, ki = (IA) => {
6676
- l(IA), p({
6676
+ ), ie = uA ? I.find((DA) => DA.guid === uA) : void 0, Tt = c && !!s.payee && !!s.account_guid && !!s.category_guid, un = (DA) => {
6677
+ F(DA[0], DA[1]);
6678
+ }, ki = (DA) => {
6679
+ l(DA), p({
6677
6680
  ...f,
6678
- searchTerm: IA
6679
- }), N(j.TRANSACTIONS_CLICK_SEARCH, { search_term: IA });
6681
+ searchTerm: DA
6682
+ }), N(j.TRANSACTIONS_CLICK_SEARCH, { search_term: DA });
6680
6683
  }, Gi = () => {
6681
6684
  gd(I, S), N(j.TRANSACTIONS_CLICK_EXPORT);
6682
6685
  }, Xi = () => {
6683
6686
  ZA.length > 0 ? (g({
6684
6687
  ...ei,
6685
6688
  date: fA(J()),
6686
- user_guid: O?.user_guid || ""
6687
- }), EA(
6689
+ user_guid: x?.user_guid || ""
6690
+ }), vA(
6688
6691
  "addTransaction"
6689
6692
  /* AddTransaction */
6690
6693
  ), N(j.TRANSACTIONS_CLICK_ADD)) : (de(!0), N(j.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
6691
6694
  }, Qi = async () => {
6692
- Tt && await m(s), EA("");
6695
+ Tt && await m(s), vA("");
6693
6696
  }, Fi = () => {
6694
6697
  de(!1), R(!0);
6695
6698
  }, ji = () => {
6696
6699
  R(!1), i();
6697
6700
  };
6698
- return !B || !AA ? /* @__PURE__ */ t(re, {}) : /* @__PURE__ */ d(
6701
+ return !B || !AA ? /* @__PURE__ */ t(ae, {}) : /* @__PURE__ */ d(
6699
6702
  Se,
6700
6703
  {
6701
6704
  accountOptions: a,
6702
6705
  actions: [
6703
6706
  {
6704
6707
  iconName: "open_in_new",
6705
- label: x.export_csv_btn,
6708
+ label: O.export_csv_btn,
6706
6709
  onClick: Gi
6707
6710
  },
6708
6711
  {
6709
6712
  iconName: "add",
6710
- label: x.add_transaction_btn,
6713
+ label: O.add_transaction_btn,
6711
6714
  onClick: Xi
6712
6715
  }
6713
6716
  ],
@@ -6717,13 +6720,13 @@ const ri = ({ transaction: A }) => {
6717
6720
  onAccountsFilterClick: () => N(j.ACCOUNTS_CLICK_FILTER),
6718
6721
  onBackClick: A,
6719
6722
  sx: r,
6720
- title: x.transactions_title,
6723
+ title: O.transactions_title,
6721
6724
  children: [
6722
6725
  /* @__PURE__ */ t(T, { mt: 16, children: /* @__PURE__ */ t(
6723
6726
  nn,
6724
6727
  {
6725
6728
  onChange: ki,
6726
- placeholder: x.action_bar_search_placeholder,
6729
+ placeholder: O.action_bar_search_placeholder,
6727
6730
  searchValue: u
6728
6731
  }
6729
6732
  ) }),
@@ -6738,17 +6741,17 @@ const ri = ({ transaction: A }) => {
6738
6741
  Cl,
6739
6742
  {
6740
6743
  height: `calc(${e} - ${Ur}px)`,
6741
- onCategoryClick: (IA) => {
6742
- wA(IA), EA(
6744
+ onCategoryClick: (DA) => {
6745
+ wA(DA), vA(
6743
6746
  "category"
6744
6747
  /* Category */
6745
6748
  );
6746
6749
  },
6747
- onRowClick: (IA) => {
6748
- wA(IA), EA(
6750
+ onRowClick: (DA) => {
6751
+ wA(DA), vA(
6749
6752
  "transaction"
6750
6753
  /* Transaction */
6751
- ), N(j.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: IA });
6754
+ ), N(j.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: DA });
6752
6755
  }
6753
6756
  }
6754
6757
  )
@@ -6765,8 +6768,8 @@ const ri = ({ transaction: A }) => {
6765
6768
  nt,
6766
6769
  {
6767
6770
  height: `calc(${e} - ${Ur}px)`,
6768
- onClick: (IA) => {
6769
- wA(IA), EA(
6771
+ onClick: (DA) => {
6772
+ wA(DA), vA(
6770
6773
  "transaction"
6771
6774
  /* Transaction */
6772
6775
  );
@@ -6782,19 +6785,19 @@ const ri = ({ transaction: A }) => {
6782
6785
  ariaLabelClose: P.close_aria,
6783
6786
  isOpen: iA === "transaction",
6784
6787
  onClose: () => {
6785
- ae && !ae.has_been_viewed && L({ ...ae, has_been_viewed: !0 }), EA("");
6788
+ ie && !ie.has_been_viewed && L({ ...ie, has_been_viewed: !0 }), vA("");
6786
6789
  },
6787
- title: x.details_title,
6788
- children: ae && /* @__PURE__ */ t(Lt, { transaction: ae })
6790
+ title: O.details_title,
6791
+ children: ie && /* @__PURE__ */ t(Lt, { transaction: ie })
6789
6792
  }
6790
6793
  ),
6791
- ae && iA === "category" && /* @__PURE__ */ t(
6794
+ ie && iA === "category" && /* @__PURE__ */ t(
6792
6795
  wd,
6793
6796
  {
6794
6797
  onClose: () => {
6795
- EA(""), wA("");
6798
+ vA(""), wA("");
6796
6799
  },
6797
- transaction: ae
6800
+ transaction: ie
6798
6801
  }
6799
6802
  ),
6800
6803
  /* @__PURE__ */ t(
@@ -6803,16 +6806,16 @@ const ri = ({ transaction: A }) => {
6803
6806
  ariaLabelClose: P.close_aria,
6804
6807
  isOpen: iA === "addTransaction",
6805
6808
  isPrimaryDisabled: !Tt,
6806
- onClose: () => EA(""),
6809
+ onClose: () => vA(""),
6807
6810
  onPrimaryAction: Qi,
6808
- title: x.add_transaction_title,
6811
+ title: O.add_transaction_title,
6809
6812
  children: /* @__PURE__ */ t(Ed, {})
6810
6813
  }
6811
6814
  ),
6812
6815
  /* @__PURE__ */ t(
6813
6816
  hd,
6814
6817
  {
6815
- copy: { title: x.add_manual_account },
6818
+ copy: { title: O.add_manual_account },
6816
6819
  isOpen: le,
6817
6820
  onClose: () => {
6818
6821
  de(!1);
@@ -6825,7 +6828,7 @@ const ri = ({ transaction: A }) => {
6825
6828
  {
6826
6829
  onClose: ji,
6827
6830
  showConnectWidget: ze,
6828
- title: x.add_manual_account
6831
+ title: O.add_manual_account
6829
6832
  }
6830
6833
  )
6831
6834
  ]
@@ -6977,25 +6980,25 @@ const ri = ({ transaction: A }) => {
6977
6980
  )
6978
6981
  ] });
6979
6982
  }, Id = b(Td), Dd = ({ activity: A, onDeleted: e }) => {
6980
- const { recurring: n } = D(), { categories: r } = MA(), { deleteCashflowSequence: a, deleteScheduledPayment: i, paidActivities: o } = HA(), { filter: s, setFilter: c, transactions: u } = dA(), { selectedAccountGuids: l } = yA(), { onEvent: h } = Z(), [g, m] = C.useState(!1), [f, y] = C.useState(""), p = r.find((x) => x.guid === A.categoryGuid), S = A.activityType === LA.Income, I = C.useMemo(
6981
- () => u.find((x) => x.guid === f),
6983
+ const { recurring: n } = D(), { categories: r } = MA(), { deleteCashflowSequence: a, deleteScheduledPayment: i, paidActivities: o } = HA(), { filter: s, setFilter: c, transactions: u } = dA(), { selectedAccountGuids: l } = yA(), { onEvent: h } = Z(), [g, m] = C.useState(!1), [f, y] = C.useState(""), p = r.find((O) => O.guid === A.categoryGuid), S = A.activityType === LA.Income, I = C.useMemo(
6984
+ () => u.find((O) => O.guid === f),
6982
6985
  [f]
6983
6986
  );
6984
6987
  C.useEffect(() => {
6985
6988
  c({
6986
6989
  accounts: l,
6987
- dateRange: { start: pe(J(), 90), end: DA(J()) }
6990
+ dateRange: { start: pe(J(), 90), end: TA(J()) }
6988
6991
  });
6989
6992
  }, []), C.useEffect(() => {
6990
6993
  if (S && A.sequenceGuid) {
6991
- const x = o.filter((O) => O.sequenceGuid === A.sequenceGuid).map((O) => O.transactionGuid);
6994
+ const O = o.filter((x) => x.sequenceGuid === A.sequenceGuid).map((x) => x.transactionGuid);
6992
6995
  c({
6993
6996
  ...s,
6994
- custom: (O) => !!x.find((N) => O.guid === N)
6997
+ custom: (x) => !!O.find((N) => x.guid === N)
6995
6998
  });
6996
6999
  } else !S && A.scheduledPaymentGuid && c({
6997
7000
  ...s,
6998
- custom: (x) => x.scheduled_payment_guid === A.scheduledPaymentGuid
7001
+ custom: (O) => O.scheduled_payment_guid === A.scheduledPaymentGuid
6999
7002
  });
7000
7003
  }, [A]);
7001
7004
  const L = async () => {
@@ -7333,11 +7336,11 @@ const ri = ({ transaction: A }) => {
7333
7336
  { id: K.EveryYear, label: s.frequency_every_year }
7334
7337
  ];
7335
7338
  C.useEffect(() => {
7336
- const l = TA(o.date);
7339
+ const l = IA(o.date);
7337
7340
  i(kr(l)), a(K.EveryMonth);
7338
7341
  }, [o]);
7339
7342
  const u = (l) => {
7340
- const h = TA(o.date);
7343
+ const h = IA(o.date);
7341
7344
  switch (Number(l.target.value)) {
7342
7345
  case K.EveryWeek:
7343
7346
  i(Ar(h));
@@ -7403,27 +7406,27 @@ const ri = ({ transaction: A }) => {
7403
7406
  onAddActivity: n = () => null
7404
7407
  }) => {
7405
7408
  const { recurring: r } = D(), { addCashflowEvent: a, addCashflowSequence: i, addScheduledPayment: o } = HA(), { filter: s, setFilter: c, transactions: u } = dA(), [l, h] = C.useState(!1), [g, m] = C.useState(""), [f, y] = C.useState(K.EveryMonth), [p, S] = C.useState(null), I = C.useMemo(
7406
- () => u.find((O) => O.guid === g),
7409
+ () => u.find((x) => x.guid === g),
7407
7410
  [g]
7408
7411
  ), L = () => {
7409
7412
  h(!0), c(A ? { ...s, custom: vt } : { ...s, custom: Dn });
7410
7413
  }, P = async () => {
7411
7414
  if (n(), !I || !p) {
7412
- x();
7415
+ O();
7413
7416
  return;
7414
7417
  }
7415
7418
  if (A) {
7416
- const O = di(I, f, p), N = await i(O);
7419
+ const x = di(I, f, p), N = await i(x);
7417
7420
  if (N) {
7418
7421
  const q = ui(N, I);
7419
7422
  await a(q);
7420
7423
  }
7421
7424
  } else {
7422
- const O = Md(I, f, p);
7423
- await o(O, I);
7425
+ const x = Md(I, f, p);
7426
+ await o(x, I);
7424
7427
  }
7425
- x();
7426
- }, x = () => {
7428
+ O();
7429
+ }, O = () => {
7427
7430
  m(""), h(!1);
7428
7431
  };
7429
7432
  return /* @__PURE__ */ d(T, { children: [
@@ -7446,13 +7449,13 @@ const ri = ({ transaction: A }) => {
7446
7449
  hi,
7447
7450
  {
7448
7451
  description: A ? r.add_income_description : r.add_expense_description,
7449
- onSearch: (O) => {
7452
+ onSearch: (x) => {
7450
7453
  c({
7451
7454
  ...s,
7452
- custom: (N) => A ? O ? Ci(N, O) : vt(N) : O ? zd(N, O) : Dn(N)
7455
+ custom: (N) => A ? x ? Ci(N, x) : vt(N) : x ? zd(N, x) : Dn(N)
7453
7456
  });
7454
7457
  },
7455
- onSelected: (O) => m(O)
7458
+ onSelected: (x) => m(x)
7456
7459
  }
7457
7460
  )
7458
7461
  }
@@ -7537,8 +7540,8 @@ const ri = ({ transaction: A }) => {
7537
7540
  transactionGuid: l.transaction_guid
7538
7541
  };
7539
7542
  }), s = r.filter(
7540
- (l) => Je(TA(l.expected_date), {
7541
- start: vA(J()),
7543
+ (l) => Je(IA(l.expected_date), {
7544
+ start: mA(J()),
7542
7545
  end: me(J(), 30)
7543
7546
  })
7544
7547
  ).filter((l) => {
@@ -7588,7 +7591,7 @@ const ri = ({ transaction: A }) => {
7588
7591
  recurrenceDay: e.recurrence_day,
7589
7592
  scheduledPaymentGuid: e.guid,
7590
7593
  transactionGuid: ""
7591
- }, c = e.recurrence_day, u = J(), l = vA(J()), h = me(J(), 30);
7594
+ }, c = e.recurrence_day, u = J(), l = mA(J()), h = me(J(), 30);
7592
7595
  let g = l;
7593
7596
  switch (e.recurrence_type) {
7594
7597
  case K.EveryWeek:
@@ -7671,7 +7674,7 @@ const ri = ({ transaction: A }) => {
7671
7674
  const f = n.find(
7672
7675
  (y) => y.scheduled_payment_guid === m.scheduledPaymentGuid && y.date > fA(pe(m.expectedDate, 3)) && y.date < fA(me(m.expectedDate, 3))
7673
7676
  );
7674
- f ? (m.transactionGuid = f.guid, m.occurredOnDate = TA(f.date), m.activityStatus = SA.Paid) : pA(m.expectedDate, pe(u, 3)) && (m.activityStatus = SA.Missed);
7677
+ f ? (m.transactionGuid = f.guid, m.occurredOnDate = IA(f.date), m.activityStatus = SA.Paid) : pA(m.expectedDate, pe(u, 3)) && (m.activityStatus = SA.Missed);
7675
7678
  }), r;
7676
7679
  }, Xd = (A, e, n, r, a) => r.map((i) => {
7677
7680
  const o = e.find((h) => h.cashflow_sequence_guid === i.guid), s = n.find((h) => h.cashflow_sequence_guid === i.guid), c = a.find((h) => h.guid === o?.transaction_guid), u = A.find((h) => h.guid === c?.account_guid);
@@ -7735,16 +7738,16 @@ const ri = ({ transaction: A }) => {
7735
7738
  A === 1 && /* @__PURE__ */ t(mi, {})
7736
7739
  ] });
7737
7740
  }, pi = b(Fd), it = (A, e) => A + e.amount, Cn = (A) => A.activityType === LA.Income && Je(A.expectedDate, {
7738
- start: vA(J()),
7739
- end: DA(J())
7741
+ start: mA(J()),
7742
+ end: TA(J())
7740
7743
  }), xt = (A) => A.activityType === LA.Expense && Je(A.expectedDate, {
7741
- start: vA(J()),
7742
- end: DA(J())
7744
+ start: mA(J()),
7745
+ end: TA(J())
7743
7746
  }), fn = (A) => A.occurredOnDate && Je(A.occurredOnDate, {
7744
- start: vA(/* @__PURE__ */ new Date()),
7747
+ start: mA(/* @__PURE__ */ new Date()),
7745
7748
  end: me(J(), 30)
7746
7749
  }) || Je(A.expectedDate, {
7747
- start: vA(/* @__PURE__ */ new Date()),
7750
+ start: mA(/* @__PURE__ */ new Date()),
7748
7751
  end: me(J(), 30)
7749
7752
  }), jd = ({ day: A, outsideCurrentMonth: e, ...n }) => {
7750
7753
  const { recurring: r } = D(), { selectedAccountGuids: a } = yA(), { activities: i, setSelectedDay: o } = HA(), c = C.useMemo(
@@ -7829,8 +7832,8 @@ const ri = ({ transaction: A }) => {
7829
7832
  }, o = /* @__PURE__ */ t(
7830
7833
  Bn,
7831
7834
  {
7832
- maxDate: DA($A(/* @__PURE__ */ new Date(), 1)),
7833
- minDate: vA(/* @__PURE__ */ new Date()),
7835
+ maxDate: TA($A(/* @__PURE__ */ new Date(), 1)),
7836
+ minDate: mA(/* @__PURE__ */ new Date()),
7834
7837
  onMonthChange: i,
7835
7838
  showDaysOutsideCurrentMonth: !0,
7836
7839
  slots: {
@@ -7979,7 +7982,7 @@ const ri = ({ transaction: A }) => {
7979
7982
  selectedDayActivities: o,
7980
7983
  setSelectedDay: s,
7981
7984
  upcomingActivities: c
7982
- } = HA(), [u, l] = C.useState(0), { onEvent: h } = Z(), g = n.filter(fn), m = a.filter(fn), f = r.filter(fn), y = g.filter(xt).reduce(it, 0), p = m.filter(xt).reduce(it, 0), S = f.filter(xt).reduce(it, 0), I = g.filter(xt).length, L = g.filter(Cn).reduce(it, 0), P = m.filter(Cn).reduce(it, 0), x = g.filter(Cn).length, O = (B, k) => {
7985
+ } = HA(), [u, l] = C.useState(0), { onEvent: h } = Z(), g = n.filter(fn), m = a.filter(fn), f = r.filter(fn), y = g.filter(xt).reduce(it, 0), p = m.filter(xt).reduce(it, 0), S = f.filter(xt).reduce(it, 0), I = g.filter(xt).length, L = g.filter(Cn).reduce(it, 0), P = m.filter(Cn).reduce(it, 0), O = g.filter(Cn).length, x = (B, k) => {
7983
7986
  l(k);
7984
7987
  }, N = (B) => {
7985
7988
  h(j.RECURRING_ACTIVITY_CLICK_UPCOMING, {
@@ -8008,7 +8011,7 @@ const ri = ({ transaction: A }) => {
8008
8011
  expected: L,
8009
8012
  paid: P,
8010
8013
  title: A.deposits,
8011
- total: x
8014
+ total: O
8012
8015
  }
8013
8016
  ),
8014
8017
  !e && /* @__PURE__ */ t(
@@ -8020,7 +8023,7 @@ const ri = ({ transaction: A }) => {
8020
8023
  }
8021
8024
  ),
8022
8025
  e && /* @__PURE__ */ d(T, { children: [
8023
- /* @__PURE__ */ d(Xe, { onChange: O, value: u, variant: "fullWidth", children: [
8026
+ /* @__PURE__ */ d(Xe, { onChange: x, value: u, variant: "fullWidth", children: [
8024
8027
  /* @__PURE__ */ t(
8025
8028
  WA,
8026
8029
  {
@@ -8274,7 +8277,7 @@ class iu {
8274
8277
  loadExpectedEvents = async () => {
8275
8278
  try {
8276
8279
  const e = await this.cashflowApi.getProjectedCashflowEvents(
8277
- vA(J()),
8280
+ mA(J()),
8278
8281
  me(J(), 30)
8279
8282
  );
8280
8283
  U(() => {
@@ -8290,7 +8293,7 @@ class iu {
8290
8293
  try {
8291
8294
  const e = await this.cashflowApi.getCashflowEventsByDateRange(
8292
8295
  pe(J(), 90),
8293
- DA(J())
8296
+ TA(J())
8294
8297
  );
8295
8298
  U(() => {
8296
8299
  this.cashflowEvents = e.filter(
@@ -9126,15 +9129,15 @@ const fu = ({ activity: A }) => /* @__PURE__ */ d(rA, { children: [
9126
9129
  transform: rotate(360deg);
9127
9130
  }
9128
9131
  `, Mu = () => {
9129
- const { addCashflowEvent: A, addCashflowSequence: e, cashflowSequences: n } = HA(), { cashflow: r, common: a } = D(), { completeOnboarding: i } = Wn(), { isDirty: o } = tt(), { isMobile: s } = KA(), { setDisplayedDate: c } = yA(), { filter: u, setFilter: l, transactions: h } = dA(), g = hA(), [m, f] = ue(!0), [y, p] = C.useState(K.EveryMonth), [S, I] = ue(!1), [L, P] = C.useState(null), [x, O] = ue(1), [N, q] = ue([]), [B, k] = ue(""), X = C.useMemo(
9132
+ const { addCashflowEvent: A, addCashflowSequence: e, cashflowSequences: n } = HA(), { cashflow: r, common: a } = D(), { completeOnboarding: i } = Wn(), { isDirty: o } = tt(), { isMobile: s } = KA(), { setDisplayedDate: c } = yA(), { filter: u, setFilter: l, transactions: h } = dA(), g = hA(), [m, f] = ue(!0), [y, p] = C.useState(K.EveryMonth), [S, I] = ue(!1), [L, P] = C.useState(null), [O, x] = ue(1), [N, q] = ue([]), [B, k] = ue(""), X = C.useMemo(
9130
9133
  () => h.find((uA) => uA.guid === B),
9131
9134
  [B]
9132
9135
  ), F = !!n.length, aA = async () => {
9133
- O(2), c(
9136
+ x(2), c(
9134
9137
  // Beginning of the month, 90 days before today
9135
- vA(pe(J(), 90)),
9138
+ mA(pe(J(), 90)),
9136
9139
  J()
9137
- ), l({ ...u, custom: vt }), O(3);
9140
+ ), l({ ...u, custom: vt }), x(3);
9138
9141
  }, iA = async () => {
9139
9142
  if (!(N.length < 1)) {
9140
9143
  I(!0);
@@ -9151,7 +9154,7 @@ const fu = ({ activity: A }) => /* @__PURE__ */ d(rA, { children: [
9151
9154
  }
9152
9155
  i();
9153
9156
  }
9154
- }, EA = !X && m || !X && N.length < 1;
9157
+ }, vA = !X && m || !X && N.length < 1;
9155
9158
  return /* @__PURE__ */ d(
9156
9159
  T,
9157
9160
  {
@@ -9166,7 +9169,7 @@ const fu = ({ activity: A }) => /* @__PURE__ */ d(rA, { children: [
9166
9169
  py: 24
9167
9170
  },
9168
9171
  children: [
9169
- x === 1 && /* @__PURE__ */ t(
9172
+ O === 1 && /* @__PURE__ */ t(
9170
9173
  T,
9171
9174
  {
9172
9175
  sx: {
@@ -9175,7 +9178,7 @@ const fu = ({ activity: A }) => /* @__PURE__ */ d(rA, { children: [
9175
9178
  children: /* @__PURE__ */ t(Iu, { handleNextStep: aA })
9176
9179
  }
9177
9180
  ),
9178
- x === 2 && /* @__PURE__ */ t(
9181
+ O === 2 && /* @__PURE__ */ t(
9179
9182
  T,
9180
9183
  {
9181
9184
  sx: {
@@ -9184,7 +9187,7 @@ const fu = ({ activity: A }) => /* @__PURE__ */ d(rA, { children: [
9184
9187
  children: /* @__PURE__ */ t(Ou, {})
9185
9188
  }
9186
9189
  ),
9187
- x === 3 && /* @__PURE__ */ d(
9190
+ O === 3 && /* @__PURE__ */ d(
9188
9191
  T,
9189
9192
  {
9190
9193
  sx: {
@@ -9213,7 +9216,7 @@ const fu = ({ activity: A }) => /* @__PURE__ */ d(rA, { children: [
9213
9216
  )
9214
9217
  ] })
9215
9218
  ] }),
9216
- EA && /* @__PURE__ */ t(
9219
+ vA && /* @__PURE__ */ t(
9217
9220
  hi,
9218
9221
  {
9219
9222
  bgcolor: "background.paper",
@@ -9396,7 +9399,7 @@ let zu = class {
9396
9399
  // if there is no income activity
9397
9400
  get expensesTilNextIncome() {
9398
9401
  return this.upcomingExpenses.filter(
9399
- (e) => pA(e.expectedDate, this.nextIncome?.expectedDate || DA(/* @__PURE__ */ new Date()))
9402
+ (e) => pA(e.expectedDate, this.nextIncome?.expectedDate || TA(/* @__PURE__ */ new Date()))
9400
9403
  );
9401
9404
  }
9402
9405
  setNextIncome = (e) => {
@@ -9441,8 +9444,8 @@ class qu {
9441
9444
  selectedAccountGuids = this.selectedAccounts.map((e) => e.guid);
9442
9445
  displayedDate = /* @__PURE__ */ new Date();
9443
9446
  displayedDateRange = {
9444
- start: vA(this.displayedDate),
9445
- end: DA(this.displayedDate)
9447
+ start: mA(this.displayedDate),
9448
+ end: TA(this.displayedDate)
9446
9449
  };
9447
9450
  constructor(e) {
9448
9451
  bA(this), this.globalStore = e;
@@ -9505,7 +9508,7 @@ const Ku = /^[ a-zA-ZÀ-ÿ0-9]+$/, ku = 50, ta = 65, Gu = ({
9505
9508
  ),
9506
9509
  /* @__PURE__ */ t(he, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ t(sA, { children: /* @__PURE__ */ d(T, { height: A, overflow: "auto", ref: l, children: [
9507
9510
  /* @__PURE__ */ d(T, { height: h.getTotalSize(), position: "relative", children: [
9508
- n && /* @__PURE__ */ t(re, { label: "Loading...", size: 32 }),
9511
+ n && /* @__PURE__ */ t(ae, { label: "Loading...", size: 32 }),
9509
9512
  !n && h.getVirtualItems().length > 0 && h.getVirtualItems().map((g) => {
9510
9513
  const m = r[g.index];
9511
9514
  return /* @__PURE__ */ d(
@@ -9571,9 +9574,9 @@ const yi = 13, Qu = (A, e) => A.filter((n) => {
9571
9574
  }), Fu = (A, e) => [...A, ...e], ju = (A) => {
9572
9575
  if (A && A.length > 0)
9573
9576
  return A[A.length - 1];
9574
- }, Uu = (A, e) => A.year_month - e.year_month, Wu = () => Array.from({ length: yi }, (A, e) => Math.floor(vA(ie(/* @__PURE__ */ new Date(), e)).getTime() / 1e3)).sort(), Yu = (A, e, n) => !A.length || !e.length ? [] : Wu().reduceRight((a, i) => {
9577
+ }, Uu = (A, e) => A.year_month - e.year_month, Wu = () => Array.from({ length: yi }, (A, e) => Math.floor(mA(ne(/* @__PURE__ */ new Date(), e)).getTime() / 1e3)).sort(), Yu = (A, e, n) => !A.length || !e.length ? [] : Wu().reduceRight((a, i) => {
9575
9578
  const o = e.filter(
9576
- ({ year_month: l }) => l === parseInt(kA(TA(i), "yyyyMM"))
9579
+ ({ year_month: l }) => l === parseInt(kA(IA(i), "yyyyMM"))
9577
9580
  ), s = A.map((l) => {
9578
9581
  const h = o.find((m) => m.account_guid === l.guid), g = {
9579
9582
  change: 0,
@@ -9712,7 +9715,7 @@ const $u = ({
9712
9715
  selectedData: i
9713
9716
  }) => {
9714
9717
  const { isMobile: o } = KA(), s = qA(), c = A.map((g) => ({
9715
- x: kA(TA(g.x), "MMM"),
9718
+ x: kA(IA(g.x), "MMM"),
9716
9719
  y: g.y
9717
9720
  })), u = i ? { index: A.findIndex((g) => g.x === i.x) } : void 0, l = e ? { index: A.findIndex((g) => g.x === e.x) } : void 0, h = (g) => ({
9718
9721
  fill: g === u?.index ? s.palette.success.main : "",
@@ -9767,7 +9770,7 @@ const $u = ({
9767
9770
  cA,
9768
9771
  {
9769
9772
  primary: /* @__PURE__ */ d(w, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
9770
- /* @__PURE__ */ t(E, { variant: "Body", children: kA(TA(A.x), "MMMM yyyy") }),
9773
+ /* @__PURE__ */ t(E, { variant: "Body", children: kA(IA(A.x), "MMMM yyyy") }),
9771
9774
  /* @__PURE__ */ t(NA, { amount: A.y, sx: { color: "inherit" }, variant: "Body" })
9772
9775
  ] })
9773
9776
  }
@@ -9868,7 +9871,7 @@ const $u = ({
9868
9871
  /* @__PURE__ */ t(A1, { ...p }),
9869
9872
  /* @__PURE__ */ t(r1, { ...p })
9870
9873
  ] })
9871
- ] }) }) : /* @__PURE__ */ t(re, {});
9874
+ ] }) }) : /* @__PURE__ */ t(ae, {});
9872
9875
  }), h7 = (A) => {
9873
9876
  switch (A) {
9874
9877
  case 1:
@@ -9989,7 +9992,7 @@ const c1 = (A, e) => {
9989
9992
  return ge(() => () => {
9990
9993
  r().finally();
9991
9994
  }, []), /* @__PURE__ */ d(Io, { sx: { p: 16 }, children: [
9992
- e && /* @__PURE__ */ t(re, { label: a?.loading, size: 40 }),
9995
+ e && /* @__PURE__ */ t(ae, { label: a?.loading, size: 40 }),
9993
9996
  !e && n.length === 0 && /* @__PURE__ */ t(lt, { sx: { p: 16 }, children: /* @__PURE__ */ t(E, { fontStyle: "italic", sx: { textAlign: "center" }, children: a.no_notifications }) }),
9994
9997
  !e && n.slice().sort((o, s) => s.delivered_at - o.delivered_at).map((o, s) => {
9995
9998
  const c = c1(s, n);
@@ -10341,7 +10344,7 @@ const mn = ({
10341
10344
  };
10342
10345
  default: {
10343
10346
  const r = () => {
10344
- const a = A.successfully_aggregated_at ? TA(A.successfully_aggregated_at) : void 0, i = a && $(a, Y.TIME_STAMP_HOUR_MINUTE);
10347
+ const a = A.successfully_aggregated_at ? IA(A.successfully_aggregated_at) : void 0, i = a && $(a, Y.TIME_STAMP_HOUR_MINUTE);
10345
10348
  if (i)
10346
10349
  return kn(a) ? _(e.last_updated_at, e.today, i) : as(a) ? _(e.last_updated_at, e.yesterday, i) : _(
10347
10350
  e.last_updated_at,
@@ -10682,7 +10685,7 @@ const mn = ({
10682
10685
  ] });
10683
10686
  }, N1 = b(P1), ln = (A) => A.top_level_category_guid === v.INCOME || A.category_guid === v.INCOME, M1 = (A) => !ln(A) && !Si(A), Li = (A) => Lr.includes(A.top_level_category_guid) || Lr.includes(A.category_guid), Si = (A) => A.top_level_category_guid === v.TRANSFER || A.category_guid === v.TRANSFER, R1 = (A) => !ln(A) && !Li(A) && !Si(A), H1 = (A) => A.filter((e) => e.category_guid === e.top_level_category_guid), sr = (A, e) => {
10684
10687
  const n = [];
10685
- let r = vA(ie(/* @__PURE__ */ new Date(), 5));
10688
+ let r = mA(ne(/* @__PURE__ */ new Date(), 5));
10686
10689
  const a = /* @__PURE__ */ new Date();
10687
10690
  for (; pA(r, a); )
10688
10691
  n.push({
@@ -10735,7 +10738,7 @@ const mn = ({
10735
10738
  n && e([r]).finally(() => {
10736
10739
  i(!0);
10737
10740
  });
10738
- }, [n, r]), !n || !a ? /* @__PURE__ */ t(re, {}) : /* @__PURE__ */ d(
10741
+ }, [n, r]), !n || !a ? /* @__PURE__ */ t(ae, {}) : /* @__PURE__ */ d(
10739
10742
  RA,
10740
10743
  {
10741
10744
  sx: {
@@ -10937,7 +10940,7 @@ const mn = ({
10937
10940
  onBackClick: A,
10938
10941
  sx: e,
10939
10942
  title: c.title,
10940
- children: a ? /* @__PURE__ */ t(re, {}) : /* @__PURE__ */ d(rA, { children: [
10943
+ children: a ? /* @__PURE__ */ t(ae, {}) : /* @__PURE__ */ d(rA, { children: [
10941
10944
  /* @__PURE__ */ d(T, { sx: { px: h ? 24 : 12 }, children: [
10942
10945
  l.length < 1 && /* @__PURE__ */ t(E, { display: "flex", justifyContent: "center", my: 24, children: c.no_accounts }),
10943
10946
  /* @__PURE__ */ t(W1, {})
@@ -12029,17 +12032,17 @@ const aa = 5, ih = 100, ia = 25, oh = (A) => {
12029
12032
  selectedAccountGuids: s,
12030
12033
  setDisplayedDate: c,
12031
12034
  setSelectedAccounts: u
12032
- } = yA(), { dateRange: l, loadBudgets: h, loadCategoryTotals: g, setDateRange: m, setTheme: f } = Qe(), { loadCashflowSequences: y } = HA(), { isDesktop: p, isTablet: S } = KA(), { setFilter: I } = dA(), [L, P] = C.useState(!1), [x, O] = C.useState(void 0);
12035
+ } = yA(), { dateRange: l, loadBudgets: h, loadCategoryTotals: g, setDateRange: m, setTheme: f } = Qe(), { loadCashflowSequences: y } = HA(), { isDesktop: p, isTablet: S } = KA(), { setFilter: I } = dA(), [L, P] = C.useState(!1), [O, x] = C.useState(void 0);
12033
12036
  C.useEffect(() => {
12034
12037
  f(n), u(r), c(l.start, l.end);
12035
12038
  }, []), C.useEffect(() => {
12036
12039
  i && (g(o, l).finally(), y().finally(), L || h().finally(() => P(!0)));
12037
12040
  }, [i, o, l]);
12038
12041
  const N = (B) => {
12039
- O(B), I({
12042
+ x(B), I({
12040
12043
  accounts: s,
12041
12044
  dateRange: {
12042
- start: vA(/* @__PURE__ */ new Date()),
12045
+ start: mA(/* @__PURE__ */ new Date()),
12043
12046
  end: Me()
12044
12047
  },
12045
12048
  custom: (k) => k.category_guid === B.category_guid || k.top_level_category_guid === B.category_guid
@@ -12057,7 +12060,7 @@ const aa = 5, ih = 100, ia = 25, oh = (A) => {
12057
12060
  sx: e,
12058
12061
  title: a.budgets_title,
12059
12062
  children: [
12060
- (!i || !L) && /* @__PURE__ */ t(re, {}),
12063
+ (!i || !L) && /* @__PURE__ */ t(ae, {}),
12061
12064
  i && L && /* @__PURE__ */ d(
12062
12065
  w,
12063
12066
  {
@@ -12095,16 +12098,16 @@ const aa = 5, ih = 100, ia = 25, oh = (A) => {
12095
12098
  gA,
12096
12099
  {
12097
12100
  ariaLabelClose: "Close",
12098
- isOpen: !!x,
12099
- onClose: () => O(void 0),
12101
+ isOpen: !!O,
12102
+ onClose: () => x(void 0),
12100
12103
  shouldShowHeaderBorders: !1,
12101
12104
  title: "Budget Details",
12102
- children: x && /* @__PURE__ */ t(Eh, { budget: x })
12105
+ children: O && /* @__PURE__ */ t(Eh, { budget: O })
12103
12106
  }
12104
12107
  )
12105
12108
  ]
12106
12109
  }
12107
- ) : /* @__PURE__ */ t(re, {});
12110
+ ) : /* @__PURE__ */ t(ae, {});
12108
12111
  });
12109
12112
  var Pn = /* @__PURE__ */ ((A) => (A[A.Main = 0] = "Main", A[A.RightSide = 1] = "RightSide", A))(Pn || {});
12110
12113
  const Th = () => {
@@ -13161,18 +13164,18 @@ const Oi = ({
13161
13164
  m && !a && l(c);
13162
13165
  }, [m, a, c, l]);
13163
13166
  const f = (L) => {
13164
- const { name: P, checked: x } = L.target;
13165
- l((O) => ({
13166
- ...O,
13167
- [P]: x
13167
+ const { name: P, checked: O } = L.target;
13168
+ l((x) => ({
13169
+ ...x,
13170
+ [P]: O
13168
13171
  }));
13169
13172
  }, y = Object.values(u).filter(Boolean).length, p = () => {
13170
13173
  l(c), i();
13171
13174
  }, S = () => {
13172
13175
  const L = e.reduce(
13173
- (P, x) => ({
13176
+ (P, O) => ({
13174
13177
  ...P,
13175
- [x.name]: y !== e.length
13178
+ [O.name]: y !== e.length
13176
13179
  }),
13177
13180
  {}
13178
13181
  );
@@ -13252,9 +13255,9 @@ const Oi = ({
13252
13255
  /* @__PURE__ */ t(V, { disablePadding: !0, children: /* @__PURE__ */ d(
13253
13256
  lA,
13254
13257
  {
13255
- onClick: () => l((x) => ({
13256
- ...x,
13257
- [L.name]: !x[L.name]
13258
+ onClick: () => l((O) => ({
13259
+ ...O,
13260
+ [L.name]: !O[L.name]
13258
13261
  })),
13259
13262
  children: [
13260
13263
  /* @__PURE__ */ t(
@@ -13402,11 +13405,11 @@ const Oi = ({
13402
13405
  update: r,
13403
13406
  isUpdateError: a,
13404
13407
  isUpdateLoading: i
13405
- } = e, [o, s, c] = Vh(n), { toastState: u, showToast: l, hideToast: h, setMessage: g } = xi(), [m, f] = C.useState(!1), [y, p] = C.useState(!1), [S, I] = C.useState(""), [L, P] = C.useState(""), x = Qa(i);
13408
+ } = e, [o, s, c] = Vh(n), { toastState: u, showToast: l, hideToast: h, setMessage: g } = xi(), [m, f] = C.useState(!1), [y, p] = C.useState(!1), [S, I] = C.useState(""), [L, P] = C.useState(""), O = Qa(i);
13406
13409
  ge(() => {
13407
- x && !i && (a ? l(A.something_went_wrong, "error") : l(void 0, "success"));
13408
- }, [x, a]);
13409
- const O = () => {
13410
+ O && !i && (a ? l(A.something_went_wrong, "error") : l(void 0, "success"));
13411
+ }, [O, a]);
13412
+ const x = () => {
13410
13413
  g(
13411
13414
  n.length > 1 ? A.insights_unhidden : A.insight_unhidden
13412
13415
  ), r(n.map((k) => k.name));
@@ -13486,7 +13489,7 @@ const Oi = ({
13486
13489
  color: "primary",
13487
13490
  fullWidth: !0,
13488
13491
  loading: i,
13489
- onClick: O,
13492
+ onClick: x,
13490
13493
  variant: "contained",
13491
13494
  children: A.show_all_hidden_insights
13492
13495
  }
@@ -14801,7 +14804,7 @@ const St = C.createContext(null), ag = ({
14801
14804
  variant: u,
14802
14805
  widthOverrides: l
14803
14806
  }) => {
14804
- const h = yg(r, c, l), g = C.useRef(null), [m, f] = C.useState(0), [y, p] = C.useState(null), [S, I] = C.useState(null), { carouselCopy: L } = Ue(), { onEvent: P } = bt(), x = () => {
14807
+ const h = yg(r, c, l), g = C.useRef(null), [m, f] = C.useState(0), [y, p] = C.useState(null), [S, I] = C.useState(null), { carouselCopy: L } = Ue(), { onEvent: P } = bt(), O = () => {
14805
14808
  P(te.ON_CAROUSEL_FORWARD_CLICK), g.current && g.current.scrollTo({
14806
14809
  left: (
14807
14810
  // Adds the flex gap to the carousel ulRef's width
@@ -14810,7 +14813,7 @@ const St = C.createContext(null), ag = ({
14810
14813
  top: 0,
14811
14814
  behavior: "smooth"
14812
14815
  });
14813
- }, O = () => {
14816
+ }, x = () => {
14814
14817
  P(te.ON_CAROUSEL_BACK_CLICK), g.current && g.current.scrollTo({
14815
14818
  left: (g.current.offsetWidth + 8) * (Math.floor(m / (g.current.offsetWidth + 8)) - 1),
14816
14819
  top: 0,
@@ -14844,22 +14847,22 @@ const St = C.createContext(null), ag = ({
14844
14847
  onTouchStart: k,
14845
14848
  ref: g,
14846
14849
  children: [
14847
- A.map((iA, EA) => /* @__PURE__ */ t(
14850
+ A.map((iA, vA) => /* @__PURE__ */ t(
14848
14851
  fg,
14849
14852
  {
14850
14853
  ariaLabel: _(
14851
14854
  L.card_position_in_carousel_aria,
14852
- EA + 1,
14855
+ vA + 1,
14853
14856
  A.length + 1
14854
14857
  ),
14855
14858
  beat: iA,
14856
- index: EA,
14857
- isActiveCard: EA === F,
14859
+ index: vA,
14860
+ isActiveCard: vA === F,
14858
14861
  onCardClick: a,
14859
14862
  posthog: i,
14860
14863
  ...X
14861
14864
  },
14862
- `${iA.guid} ${EA}`
14865
+ `${iA.guid} ${vA}`
14863
14866
  )),
14864
14867
  /* @__PURE__ */ t(
14865
14868
  Og,
@@ -14878,8 +14881,8 @@ const St = C.createContext(null), ag = ({
14878
14881
  clientColorScheme: e,
14879
14882
  currentBeatIndex: F,
14880
14883
  numBeats: A.length + 1,
14881
- onNextClick: x,
14882
- onPreviousClick: O,
14884
+ onNextClick: O,
14885
+ onPreviousClick: x,
14883
14886
  scrollRightBoundary: aA,
14884
14887
  scrollX: m
14885
14888
  }
@@ -14933,8 +14936,8 @@ const St = C.createContext(null), ag = ({
14933
14936
  C.useEffect(() => {
14934
14937
  y && y <= 325 && I(3), y && y > 325 && I(2);
14935
14938
  }, [y]);
14936
- const { cardStyle: L, linkTextStyle: P } = h, x = f ? L : { border: "none", boxShadow: "none", ...L }, O = wg(
14937
- x,
14939
+ const { cardStyle: L, linkTextStyle: P } = h, O = f ? L : { border: "none", boxShadow: "none", ...L }, x = wg(
14940
+ O,
14938
14941
  a,
14939
14942
  g,
14940
14943
  S,
@@ -14945,7 +14948,7 @@ const St = C.createContext(null), ag = ({
14945
14948
  "li",
14946
14949
  {
14947
14950
  "aria-hidden": !c,
14948
- className: O,
14951
+ className: x,
14949
14952
  onClick: () => u(),
14950
14953
  ref: p,
14951
14954
  role: "button",
@@ -15143,12 +15146,12 @@ const St = C.createContext(null), ag = ({
15143
15146
  variant: L,
15144
15147
  widthOverrides: P
15145
15148
  }) => {
15146
- const [x, O] = ue("STANDARD"), [N, q] = ue(!1), B = qs([c], ve), k = Ks([u], ve);
15149
+ const [O, x] = ue("STANDARD"), [N, q] = ue(!1), B = qs([c], ve), k = Ks([u], ve);
15147
15150
  C.useEffect(() => {
15148
15151
  ve.isInitialized || ve.initialize(a, p, o);
15149
15152
  }, [a, p, o, ve.isInitialized]), C.useEffect(() => {
15150
15153
  const aA = window.innerHeight;
15151
- aA < 180 ? O("STANDARD") : aA >= 180 && aA < 200 ? O("LARGE") : aA >= 200 && aA < 248 ? O("XLARGE") : aA >= 248 && O("XXLARGE");
15154
+ aA < 180 ? x("STANDARD") : aA >= 180 && aA < 200 ? x("LARGE") : aA >= 200 && aA < 248 ? x("XLARGE") : aA >= 248 && x("XXLARGE");
15152
15155
  }, [window.innerHeight]), C.useEffect(() => {
15153
15156
  q(!A && ve.isInitialized);
15154
15157
  }, [A, ve.isInitialized]);
@@ -15161,7 +15164,7 @@ const St = C.createContext(null), ag = ({
15161
15164
  useDarkMode: S,
15162
15165
  widthOverrides: P
15163
15166
  }, F = {
15164
- carouselSize: x,
15167
+ carouselSize: O,
15165
15168
  posthog: l,
15166
15169
  variant: L,
15167
15170
  ...X
@@ -15519,8 +15522,8 @@ const St = C.createContext(null), ag = ({
15519
15522
  C.useEffect(() => {
15520
15523
  o(
15521
15524
  n,
15522
- vA(/* @__PURE__ */ new Date()),
15523
- DA(/* @__PURE__ */ new Date())
15525
+ mA(/* @__PURE__ */ new Date()),
15526
+ TA(/* @__PURE__ */ new Date())
15524
15527
  ).finally();
15525
15528
  }, [n]);
15526
15529
  const [s, c] = C.useState(""), [u, l] = C.useState(0), h = C.useMemo(
@@ -15761,9 +15764,9 @@ const St = C.createContext(null), ag = ({
15761
15764
  ), P = C.useMemo(
15762
15765
  () => u.find((q) => q.guid === f),
15763
15766
  [f]
15764
- ), x = (q, B) => {
15767
+ ), O = (q, B) => {
15765
15768
  m(B), h("");
15766
- }, O = (q) => {
15769
+ }, x = (q) => {
15767
15770
  h(l === q || q === "0" ? "" : q);
15768
15771
  }, N = (q) => {
15769
15772
  const B = {
@@ -15790,7 +15793,7 @@ const St = C.createContext(null), ag = ({
15790
15793
  S(!0);
15791
15794
  };
15792
15795
  return /* @__PURE__ */ d(T, { children: [
15793
- /* @__PURE__ */ d(Xe, { onChange: x, value: g, variant: "fullWidth", children: [
15796
+ /* @__PURE__ */ d(Xe, { onChange: O, value: g, variant: "fullWidth", children: [
15794
15797
  /* @__PURE__ */ t(
15795
15798
  WA,
15796
15799
  {
@@ -15820,7 +15823,7 @@ const St = C.createContext(null), ag = ({
15820
15823
  va,
15821
15824
  {
15822
15825
  data: I,
15823
- onSelected: O,
15826
+ onSelected: x,
15824
15827
  onViewTransactions: N,
15825
15828
  selectedId: l,
15826
15829
  title: a.spend_tab_title
@@ -15830,7 +15833,7 @@ const St = C.createContext(null), ag = ({
15830
15833
  va,
15831
15834
  {
15832
15835
  data: L,
15833
- onSelected: O,
15836
+ onSelected: x,
15834
15837
  onViewTransactions: N,
15835
15838
  selectedId: l,
15836
15839
  title: a.income_tab_title
@@ -15862,12 +15865,12 @@ const St = C.createContext(null), ag = ({
15862
15865
  C.useEffect(() => {
15863
15866
  o(n);
15864
15867
  }, [n]), C.useEffect(() => {
15865
- i(vA(J()), DA(J())), u(!0), s(j.SPENDING_VIEW);
15868
+ i(mA(J()), TA(J())), u(!0), s(j.SPENDING_VIEW);
15866
15869
  }, []);
15867
15870
  const l = (h) => {
15868
15871
  i(h[0], h[1]);
15869
15872
  };
15870
- return !a || !c ? /* @__PURE__ */ t(re, {}) : /* @__PURE__ */ t(
15873
+ return !a || !c ? /* @__PURE__ */ t(ae, {}) : /* @__PURE__ */ t(
15871
15874
  Se,
15872
15875
  {
15873
15876
  accountOptions: n,
@@ -15880,7 +15883,7 @@ const St = C.createContext(null), ag = ({
15880
15883
  }
15881
15884
  );
15882
15885
  }, M7 = b(Qg), Fg = (A) => xe[A] ?? xe.default, jg = (A) => Ke[A], Ug = (A) => A.reduce((e, n) => {
15883
- const r = vA(new Date(n.year, n.month - 1)), a = {
15886
+ const r = mA(new Date(n.year, n.month - 1)), a = {
15884
15887
  top_level_category_guid: n.top_level_category_guid,
15885
15888
  category_guid: n.category_guid,
15886
15889
  amount: n.total,
@@ -15984,15 +15987,15 @@ const St = C.createContext(null), ag = ({
15984
15987
  (f) => f.category_guid === e || f.top_level_category_guid === e
15985
15988
  ) : A).reduce(
15986
15989
  (f, y) => {
15987
- const { category_guid: p, top_level_category_guid: S, month: I, total: L, year: P } = y, x = e ? p : S;
15988
- f[x] || (f[x] = {
15989
- id: x,
15990
- category: x,
15990
+ const { category_guid: p, top_level_category_guid: S, month: I, total: L, year: P } = y, O = e ? p : S;
15991
+ f[O] || (f[O] = {
15992
+ id: O,
15993
+ category: O,
15991
15994
  category_guid: p,
15992
15995
  top_level_category_guid: S
15993
15996
  });
15994
- const O = $(new Date(P, I, 1), Y.MONTH_SHORT);
15995
- return f[x][O] = L, f;
15997
+ const x = $(new Date(P, I, 1), Y.MONTH_SHORT);
15998
+ return f[O][x] = L, f;
15996
15999
  },
15997
16000
  {}
15998
16001
  );
@@ -16019,31 +16022,28 @@ const St = C.createContext(null), ag = ({
16019
16022
  }
16020
16023
  ) });
16021
16024
  }, A3 = ({ onBackClick: A, sx: e }) => {
16022
- const n = qA(), { onEvent: r } = Z(), { isDesktop: a, isTablet: i, isMobile: o } = KA(), { accounts: s } = PA(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: u } = MA(), { isInitialized: l, selectedAccounts: h, setSelectedAccounts: g } = yA(), { trends: m } = D(), f = n.palette.mode === "dark", [y, p] = C.useState(!1), [S, I] = C.useState("Chart"), [L, P] = C.useState(""), [x, O] = C.useState({
16023
- start: vA(ie(/* @__PURE__ */ new Date(), 5)),
16024
- end: DA(/* @__PURE__ */ new Date())
16025
+ const n = qA(), { onEvent: r } = Z(), { isDesktop: a, isTablet: i, isMobile: o } = KA(), { accounts: s } = PA(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: u } = MA(), { isInitialized: l, selectedAccounts: h, setSelectedAccounts: g } = yA(), { trends: m } = D(), f = n.palette.mode === "dark", [y, p] = C.useState(!1), [S, I] = C.useState("Chart"), [L, P] = C.useState(""), [O, x] = C.useState({
16026
+ start: mA(ne(/* @__PURE__ */ new Date(), 6)),
16027
+ end: TA(/* @__PURE__ */ new Date())
16025
16028
  }), [N, q] = C.useState(6);
16026
16029
  C.useEffect(() => {
16027
16030
  g(s);
16028
16031
  }, [s]), C.useEffect(() => {
16029
16032
  l && c(
16030
16033
  h,
16031
- x.start,
16032
- x.end
16034
+ mA(ne(/* @__PURE__ */ new Date(), 12)),
16035
+ TA(/* @__PURE__ */ new Date())
16033
16036
  ).finally(() => {
16034
- p(!0);
16037
+ h.length && p(!0);
16035
16038
  });
16036
- }, [l, h, x]);
16037
- const B = C.useMemo(
16038
- () => Wg(u),
16039
- [u]
16040
- ), k = C.useMemo(() => {
16039
+ }, [l, h]);
16040
+ const B = C.useMemo(() => u.length ? [] : Wg(u), [u]), k = C.useMemo(() => {
16041
16041
  const R = L.length ? B.filter(
16042
16042
  (ZA) => ZA.top_level_category_guid === L || ZA.category_guid === L
16043
- ) : H1(B), AA = R.filter(M1), mA = R.filter(ln);
16043
+ ) : H1(B), AA = R.filter(M1), EA = R.filter(ln);
16044
16044
  return {
16045
16045
  stackedDatasets: AA,
16046
- unstackedDatasets: mA
16046
+ unstackedDatasets: EA
16047
16047
  };
16048
16048
  }, [B, L]), X = C.useMemo(() => {
16049
16049
  const R = Ea(
@@ -16059,21 +16059,21 @@ const St = C.createContext(null), ag = ({
16059
16059
  };
16060
16060
  }, [k, N]), F = C.useMemo(() => {
16061
16061
  const R = $(
16062
- x.start,
16062
+ O.start,
16063
16063
  o ? Y.MONTH_SHORT_YEAR : Y.MONTH_YEAR
16064
16064
  ), AA = $(
16065
- ie(x.end, 1),
16065
+ ne(O.end, 1),
16066
16066
  o ? Y.MONTH_SHORT_YEAR : Y.MONTH_YEAR
16067
16067
  );
16068
16068
  return `${R} - ${AA}`;
16069
- }, [x, o]), aA = (R, AA) => {
16069
+ }, [O, o]), aA = (R, AA) => {
16070
16070
  I(AA ?? S), r(j.TRENDS_CLICK_TOGGLE);
16071
16071
  }, iA = (R) => {
16072
- const AA = R?.[0], mA = R?.[1], ZA = vs(mA, AA);
16073
- c(h, AA, mA), O({ start: AA, end: mA }), r(j.TRENDS_CLICK_DATE, {
16072
+ const AA = R?.[0], EA = R?.[1], ZA = vs(EA, AA);
16073
+ x({ start: AA, end: EA }), q(ZA), r(j.TRENDS_CLICK_DATE, {
16074
16074
  time_period: ZA + "M"
16075
- }), q(ZA);
16076
- }, EA = () => {
16075
+ });
16076
+ }, vA = () => {
16077
16077
  r(j.TRENDS_CLICK_FILTER);
16078
16078
  }, uA = (R) => {
16079
16079
  P(R);
@@ -16086,14 +16086,14 @@ const St = C.createContext(null), ag = ({
16086
16086
  }, ze = (R) => {
16087
16087
  r(j.TRENDS_HOVER_POINT, { category: R });
16088
16088
  };
16089
- return !l || !y ? /* @__PURE__ */ t(re, {}) : /* @__PURE__ */ t(
16089
+ return !l || !y ? /* @__PURE__ */ t(ae, {}) : /* @__PURE__ */ t(
16090
16090
  Se,
16091
16091
  {
16092
16092
  accountOptions: s,
16093
16093
  calendarActions: { onRangeChanged: iA },
16094
- dateRange: x,
16094
+ dateRange: O,
16095
16095
  dateRangeVariant: "timeframebuttons",
16096
- onAccountsFilterClick: EA,
16096
+ onAccountsFilterClick: vA,
16097
16097
  onBackClick: A,
16098
16098
  sx: e,
16099
16099
  title: m.title,
@@ -16205,8 +16205,8 @@ const St = C.createContext(null), ag = ({
16205
16205
  const e = [], n = A.filter(
16206
16206
  (i) => i.top_level_category_guid !== v.INCOME && i.top_level_category_guid !== v.TRANSFER && i.total > 0
16207
16207
  );
16208
- let r = vA(ie(/* @__PURE__ */ new Date(), 5));
16209
- const a = DA(/* @__PURE__ */ new Date());
16208
+ let r = mA(ne(/* @__PURE__ */ new Date(), 5));
16209
+ const a = TA(/* @__PURE__ */ new Date());
16210
16210
  for (; pA(r, a); )
16211
16211
  e.push({
16212
16212
  x: $(r, Y.MONTH_SHORT),
@@ -16218,7 +16218,6 @@ const St = C.createContext(null), ag = ({
16218
16218
  return /* @__PURE__ */ t(
16219
16219
  Un,
16220
16220
  {
16221
- baseline: "min",
16222
16221
  colors: [A.palette.primary.main],
16223
16222
  datasets: [r],
16224
16223
  height: 300,
@@ -16234,7 +16233,7 @@ const St = C.createContext(null), ag = ({
16234
16233
  r && n(i).finally(() => {
16235
16234
  s(!0);
16236
16235
  });
16237
- }, [r, i]), !r || !o ? /* @__PURE__ */ t(re, {}) : /* @__PURE__ */ t(
16236
+ }, [r, i]), !r || !o ? /* @__PURE__ */ t(ae, {}) : /* @__PURE__ */ t(
16238
16237
  Fe,
16239
16238
  {
16240
16239
  onPrimaryCtaClick: A,
@@ -16323,7 +16322,7 @@ export {
16323
16322
  j8 as LOADING_STATUS,
16324
16323
  Un as LineChart,
16325
16324
  Ic as ListItemWrapper,
16326
- re as Loader,
16325
+ ae as Loader,
16327
16326
  J8 as LocalizedCopyApi,
16328
16327
  D7 as ManageAccountsDrawer,
16329
16328
  mi as ManageIncome,