@mx-cartographer/experiences 6.26.26 → 6.26.27-alpha.mega1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/index.es.js +470 -466
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -6,7 +6,7 @@ import P from "@mui/material/Divider";
|
|
6
6
|
import ae from "@mui/material/List";
|
7
7
|
import $t from "@mui/material/ListSubheader";
|
8
8
|
import Me from "@mui/system/Stack";
|
9
|
-
import { AccountsIcon as Ul, P as X, Icon as V, useTokens as At, Text as C, H2 as fn, CategoryIcon as Lt, DialogHeader as Vl, DialogFooter as Kl, Drawer as zl, Footer as Yl, DateRangePicker as sr, H3 as
|
9
|
+
import { AccountsIcon as Ul, P as X, Icon as V, useTokens as At, Text as C, H2 as fn, CategoryIcon as Lt, DialogHeader as Vl, DialogFooter as Kl, Drawer as zl, Footer as Yl, DateRangePicker as sr, H3 as qe, H1 as Qt, TextField as On, IconWeight as It, MerchantLogo as Jt, CategoryIconList as jl, CategoryIconVariants as Bs, InstitutionLogo as Tt, ChevronRightIcon as Hs, THEMES as cr } from "@mxenabled/mxui";
|
10
10
|
import Xl from "bowser";
|
11
11
|
import { getUnixTime as We } from "date-fns/getUnixTime";
|
12
12
|
import { intlFormat as Zl } from "date-fns/intlFormat";
|
@@ -18,7 +18,7 @@ import { getDay as ql } from "date-fns/getDay";
|
|
18
18
|
import { isBefore as ot } from "date-fns/isBefore";
|
19
19
|
import { nextDay as ea } from "date-fns/nextDay";
|
20
20
|
import { setDate as ta } from "date-fns/setDate";
|
21
|
-
import { startOfToday as
|
21
|
+
import { startOfToday as xe } from "date-fns/startOfToday";
|
22
22
|
import { fromUnixTime as Ve } from "date-fns/fromUnixTime";
|
23
23
|
import ja from "numeral";
|
24
24
|
import te from "@mui/material/Button";
|
@@ -38,10 +38,10 @@ import { css as Cn, keyframes as td } from "@mxenabled/cssinjs";
|
|
38
38
|
import { addDays as Fn } from "date-fns/addDays";
|
39
39
|
import { eachDayOfInterval as nd } from "date-fns/eachDayOfInterval";
|
40
40
|
import { eachWeekOfInterval as id } from "date-fns/eachWeekOfInterval";
|
41
|
-
import { endOfMonth as
|
41
|
+
import { endOfMonth as Ze } from "date-fns/endOfMonth";
|
42
42
|
import { format as Ln } from "date-fns/format";
|
43
43
|
import { isSameMonth as ad } from "date-fns/isSameMonth";
|
44
|
-
import { startOfMonth as
|
44
|
+
import { startOfMonth as Ye } from "date-fns/startOfMonth";
|
45
45
|
import { subMonths as Ht } from "date-fns/subMonths";
|
46
46
|
import Nt from "@mui/material/Paper";
|
47
47
|
import { ChevronLeft as Ws, ChevronRight as ze, ArrowBack as od, Icon as pt, AccountBalance as co, ExpandMore as ui, CheckCircle as ma, Edit as rd, Delete as $s, Schedule as sd, MonetizationOn as cd, Cancel as Us, CurrencyExchange as ld, Check as dd, TrendingUp as Vs, ArrowRightAlt as _d, TrendingDown as Ks, Payments as lo, CalendarMonth as ud, CreditCard as zs, Savings as hd, ContentCopy as gd, MultilineChart as Ys, NoteStack as js, Person as Xs, ExpandLess as Zs, AddBox as qs, Trophy as md, Star as pd, Settings as fd } from "@mxenabled/mx-icons";
|
@@ -49,7 +49,7 @@ import { isSameDay as Dt } from "date-fns/isSameDay";
|
|
49
49
|
import { isWithinInterval as _o } from "date-fns/isWithinInterval";
|
50
50
|
import * as Rt from "d3";
|
51
51
|
import { selectAll as Cd, interpolateString as bd, arc as yd } from "d3";
|
52
|
-
import { useTheme as
|
52
|
+
import { useTheme as je, alpha as Dn, keyframes as Sd, ThemeProvider as Ed } from "@mui/material/styles";
|
53
53
|
import { ResponsiveChartContainer as Td, ChartsReferenceLine as Ad, AreaPlot as xd, LinePlot as Id, MarkPlot as wd, BarPlot as vd, ChartsXAxis as Dd, ChartsYAxis as Nd, ChartsAxisHighlight as Rd, LineChart as Qs, PieChart as Od } from "@mui/x-charts";
|
54
54
|
import { ChartsTooltip as Ld } from "@mui/x-charts/ChartsTooltip";
|
55
55
|
import bt from "@mui/material/Card";
|
@@ -80,7 +80,7 @@ import gt from "@mui/material/ListItemIcon";
|
|
80
80
|
import ho from "@mui/material/MenuItem";
|
81
81
|
import it from "@mui/material/TextField";
|
82
82
|
import pa from "@mui/material/Switch";
|
83
|
-
import { makeAutoObservable as Fe, runInAction as
|
83
|
+
import { makeAutoObservable as Fe, runInAction as ee, reaction as Wd, observable as $d } from "mobx";
|
84
84
|
import Ud, { SurveyQuestionType as hr } from "posthog-js";
|
85
85
|
import { formatISO as fa } from "date-fns/formatISO";
|
86
86
|
import { differenceInDays as Vd } from "date-fns/differenceInDays";
|
@@ -867,15 +867,15 @@ const Ii = 44, yr = (e, n) => e.find((i) => i.guid === n), Y_ = (e, n) => e.find
|
|
867
867
|
}, Io = (e) => {
|
868
868
|
const n = ql(e);
|
869
869
|
let i = ea(e, n);
|
870
|
-
for (; ot(i,
|
870
|
+
for (; ot(i, xe()); )
|
871
871
|
i = Ps(i, 1);
|
872
872
|
return i;
|
873
873
|
}, X_ = (e) => {
|
874
874
|
const n = Io(e);
|
875
875
|
return Ps(n, 1);
|
876
876
|
}, Z_ = (e) => {
|
877
|
-
let n = ta(
|
878
|
-
for (; ot(n,
|
877
|
+
let n = ta(xe(), e.getDate());
|
878
|
+
for (; ot(n, xe()); )
|
879
879
|
n = rn(n, 1);
|
880
880
|
return n;
|
881
881
|
}, q_ = (e) => {
|
@@ -883,7 +883,7 @@ const Ii = 44, yr = (e, n) => e.find((i) => i.guid === n), Y_ = (e, n) => e.find
|
|
883
883
|
return rn(n, 1);
|
884
884
|
}, pc = (e) => {
|
885
885
|
let n = Mi(e, 1);
|
886
|
-
for (; ot(n,
|
886
|
+
for (; ot(n, xe()); )
|
887
887
|
n = Mi(n, 1);
|
888
888
|
return n;
|
889
889
|
}, Q_ = (e) => {
|
@@ -1935,7 +1935,7 @@ const cu = (e, n) => {
|
|
1935
1935
|
gap: 4
|
1936
1936
|
}
|
1937
1937
|
}), Eu = ({ beginDate: e, date: n, endDate: i, isInMonth: a, onClick: o }) => {
|
1938
|
-
const r = Te(), s = Tu(r), c = e && i && _o(n, { start: e, end: i }) && !Dt(n, e) && !Dt(n, i), l = e && i && Dt(e, n) && !Dt(e, i), u = i && e && Dt(i, n) && !Dt(e, i), _ = e && Dt(e, n) || i && Dt(i, n), h = Dt(n,
|
1938
|
+
const r = Te(), s = Tu(r), c = e && i && _o(n, { start: e, end: i }) && !Dt(n, e) && !Dt(n, i), l = e && i && Dt(e, n) && !Dt(e, i), u = i && e && Dt(i, n) && !Dt(e, i), _ = e && Dt(e, n) || i && Dt(i, n), h = Dt(n, xe());
|
1939
1939
|
return /* @__PURE__ */ t(
|
1940
1940
|
"div",
|
1941
1941
|
{
|
@@ -2027,12 +2027,12 @@ const xu = ({
|
|
2027
2027
|
selectionType: r = "Single"
|
2028
2028
|
/* Single */
|
2029
2029
|
}) => {
|
2030
|
-
const s = At(), c = Iu(s), [l, u] = g.useState(
|
2030
|
+
const s = At(), c = Iu(s), [l, u] = g.useState(xe), [_, h] = g.useState(n), [m, p] = g.useState(i);
|
2031
2031
|
g.useEffect(() => {
|
2032
2032
|
h(n), p(i), n && u(n);
|
2033
2033
|
}, [n, i]);
|
2034
2034
|
const f = g.useMemo(() => {
|
2035
|
-
const w = id({ start:
|
2035
|
+
const w = id({ start: Ye(l), end: Ze(l) }), v = [];
|
2036
2036
|
for (let N = 0; N < w.length; N++) {
|
2037
2037
|
const R = w[N], M = nd({ start: R, end: Fn(R, 6) }), k = [];
|
2038
2038
|
for (let G = 0; G < M.length; G++)
|
@@ -2049,7 +2049,7 @@ const xu = ({
|
|
2049
2049
|
!_ || m ? (h(w), p(void 0)) : ot(w, _) ? (p(_), h(w), o?.(w, _)) : (p(w), o?.(_, w));
|
2050
2050
|
}
|
2051
2051
|
}, y = () => {
|
2052
|
-
const w =
|
2052
|
+
const w = xe();
|
2053
2053
|
u(w), r !== "None" && (h(w), r === "Single" ? a?.(w) : (p(w), o?.(w, w)));
|
2054
2054
|
}, E = () => {
|
2055
2055
|
u(rn(l, 1));
|
@@ -2171,7 +2171,7 @@ const xu = ({
|
|
2171
2171
|
)
|
2172
2172
|
] });
|
2173
2173
|
}, Nu = (e) => {
|
2174
|
-
const n =
|
2174
|
+
const n = je(), i = e.showLabel, a = e.style, o = Number(e.x), r = Number(e.y), s = e.handlers?.onMarkClick, c = e.handlers?.onMouseEnter, l = e.handlers?.onMouseLeave, u = hn(n.breakpoints.up("sm")), _ = e.valueFormatterString ? H(e.yData[e.dataIndex], e.valueFormatterString) : String(e.yData[e.dataIndex]), h = u ? n.typography.Small?.fontSize : n.typography.XSmall?.fontSize, m = h ? parseFloat(h.toString()) * 0.6 : 8, y = _.length * m + 8 + 8, E = 24, I = o - y / 2, w = r - 30;
|
2175
2175
|
return /* @__PURE__ */ d(Z, { children: [
|
2176
2176
|
i && /* @__PURE__ */ d(Z, { children: [
|
2177
2177
|
e.labelBackgroundColor && /* @__PURE__ */ t(
|
@@ -2469,18 +2469,18 @@ const ni = ({
|
|
2469
2469
|
showYAxisTicks: L = !1,
|
2470
2470
|
title: W,
|
2471
2471
|
useCustomMark: Y = !1,
|
2472
|
-
valueFormatterString:
|
2473
|
-
width:
|
2472
|
+
valueFormatterString: J,
|
2473
|
+
width: he
|
2474
2474
|
}) => {
|
2475
|
-
const _e =
|
2475
|
+
const _e = je(), Le = s.flat().map((fe) => fe.x), Re = s.flat().map((fe) => fe.y), ue = Math.round(Re.reduce((fe, we) => we + fe, 0) / Re.length), me = Math.floor(Math.min(...Re) / 100) * 100, Qe = Math.ceil(Math.max(...Re) / 100) * 100, $ = s.map((fe, we) => ({
|
2476
2476
|
type: w ? "bar" : "line",
|
2477
2477
|
curve: a,
|
2478
|
-
color: w ? _e.palette.chart?.chart6 : i[
|
2478
|
+
color: w ? _e.palette.chart?.chart6 : i[we] ?? _e.palette.primary.main,
|
2479
2479
|
data: fe.map((Ge) => Ge.y),
|
2480
2480
|
area: y,
|
2481
2481
|
baseline: n,
|
2482
2482
|
showMark: !0,
|
2483
|
-
valueFormatter: (Ge) =>
|
2483
|
+
valueFormatter: (Ge) => J ? H(Ge || 0, J) : String(Ge)
|
2484
2484
|
})), be = {
|
2485
2485
|
...{
|
2486
2486
|
top: 60,
|
@@ -2507,22 +2507,22 @@ const ni = ({
|
|
2507
2507
|
opacity: 0.15
|
2508
2508
|
}
|
2509
2509
|
},
|
2510
|
-
width:
|
2510
|
+
width: he,
|
2511
2511
|
xAxis: [{ data: Le, scaleType: w ? "band" : "point" }],
|
2512
2512
|
yAxis: [
|
2513
2513
|
{
|
2514
2514
|
min: l ? -22 : me,
|
2515
|
-
max:
|
2515
|
+
max: Qe || 100,
|
2516
2516
|
colorMap: y && $.length < 2 ? {
|
2517
2517
|
type: "continuous",
|
2518
2518
|
min: me,
|
2519
|
-
max:
|
2519
|
+
max: Qe,
|
2520
2520
|
color: [
|
2521
2521
|
_e.palette.background.paper,
|
2522
2522
|
i[0] ?? _e.palette.primary.main
|
2523
2523
|
]
|
2524
2524
|
} : void 0,
|
2525
|
-
valueFormatter: (fe) =>
|
2525
|
+
valueFormatter: (fe) => J ? H(fe, J) : String(fe)
|
2526
2526
|
}
|
2527
2527
|
],
|
2528
2528
|
children: [
|
@@ -2534,7 +2534,7 @@ const ni = ({
|
|
2534
2534
|
strokeDasharray: "10, 8",
|
2535
2535
|
strokeWidth: 2
|
2536
2536
|
},
|
2537
|
-
y:
|
2537
|
+
y: ue
|
2538
2538
|
}
|
2539
2539
|
),
|
2540
2540
|
/* @__PURE__ */ t(xd, {}),
|
@@ -2565,7 +2565,7 @@ const ni = ({
|
|
2565
2565
|
labelFontSize: m,
|
2566
2566
|
showLabel: N,
|
2567
2567
|
style: S?.(fe.dataIndex) ?? {},
|
2568
|
-
valueFormatterString:
|
2568
|
+
valueFormatterString: J,
|
2569
2569
|
yData: Re,
|
2570
2570
|
...fe
|
2571
2571
|
}
|
@@ -2624,7 +2624,7 @@ const ni = ({
|
|
2624
2624
|
{
|
2625
2625
|
customLabels: r,
|
2626
2626
|
labels: u,
|
2627
|
-
valueFormatterString:
|
2627
|
+
valueFormatterString: J
|
2628
2628
|
}
|
2629
2629
|
)
|
2630
2630
|
]
|
@@ -2633,13 +2633,13 @@ const ni = ({
|
|
2633
2633
|
v && /* @__PURE__ */ t(
|
2634
2634
|
Mu,
|
2635
2635
|
{
|
2636
|
-
average: E ?
|
2636
|
+
average: E ? ue : void 0,
|
2637
2637
|
customLegendVariant: o,
|
2638
2638
|
labels: u,
|
2639
2639
|
series: $,
|
2640
2640
|
style: { position: "absolute", top: 16, left: 16 },
|
2641
2641
|
title: W,
|
2642
|
-
valueFormatterString:
|
2642
|
+
valueFormatterString: J
|
2643
2643
|
}
|
2644
2644
|
)
|
2645
2645
|
] });
|
@@ -2689,7 +2689,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2689
2689
|
),
|
2690
2690
|
/* @__PURE__ */ t(C, { variant: "Body", children: o })
|
2691
2691
|
] });
|
2692
|
-
},
|
2692
|
+
}, Xe = ({
|
2693
2693
|
isIncome: e = !1,
|
2694
2694
|
amount: n = 0,
|
2695
2695
|
bold: i,
|
@@ -2708,7 +2708,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2708
2708
|
cursorPosition: a,
|
2709
2709
|
chartContainerRef: o
|
2710
2710
|
}) => {
|
2711
|
-
const r =
|
2711
|
+
const r = je(), s = Gs(null), [c, l] = xt({ x: a.x, y: a.y });
|
2712
2712
|
if (Pn(() => {
|
2713
2713
|
(() => {
|
2714
2714
|
const h = s.current, m = o.current;
|
@@ -2734,7 +2734,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2734
2734
|
/* @__PURE__ */ d(O, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
2735
2735
|
/* @__PURE__ */ t(Ic, { categoryGuid: e, topLevelCategoryGuid: n }),
|
2736
2736
|
/* @__PURE__ */ t(C, { variant: "Small", children: `${i.length}-month total` }),
|
2737
|
-
/* @__PURE__ */ t(
|
2737
|
+
/* @__PURE__ */ t(Xe, { amount: u, bold: !0, formatString: "0,0", variant: "body2" })
|
2738
2738
|
] }),
|
2739
2739
|
/* @__PURE__ */ t(P, { sx: { my: 16, width: "100%" } }),
|
2740
2740
|
/* @__PURE__ */ t(_t, { container: !0, children: i.map((_, h) => /* @__PURE__ */ d(g.Fragment, { children: [
|
@@ -2742,7 +2742,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2742
2742
|
/* @__PURE__ */ t(_t, { item: !0, xs: 4, children: /* @__PURE__ */ d(O, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
2743
2743
|
/* @__PURE__ */ t(C, { color: r.palette.text.secondary, variant: "XSmall", children: _.x }),
|
2744
2744
|
/* @__PURE__ */ t(
|
2745
|
-
|
2745
|
+
Xe,
|
2746
2746
|
{
|
2747
2747
|
amount: _.y,
|
2748
2748
|
bold: !0,
|
@@ -2765,7 +2765,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2765
2765
|
return s === void 0 || !c ? null : /* @__PURE__ */ t(ga, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ t(Jl, { children: /* @__PURE__ */ d(un, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
2766
2766
|
/* @__PURE__ */ t(Ic, { categoryGuid: e, topLevelCategoryGuid: n }),
|
2767
2767
|
/* @__PURE__ */ t(C, { color: r.palette.text.secondary, variant: "Small", children: de(c, ie.MONTH_SHORT_YEAR) }),
|
2768
|
-
/* @__PURE__ */ t(
|
2768
|
+
/* @__PURE__ */ t(Xe, { amount: String(s), bold: !0, formatString: "0,0", variant: "Body" })
|
2769
2769
|
] }) }) });
|
2770
2770
|
}, Fu = ({
|
2771
2771
|
sx: e,
|
@@ -2835,7 +2835,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2835
2835
|
availableHeight: s = 0,
|
2836
2836
|
minimumHeight: c = 350
|
2837
2837
|
}) => {
|
2838
|
-
const l =
|
2838
|
+
const l = je(), { isMobile: u } = Ce(), [_, { height: h }] = ii(), m = g.useRef(null), [p, f] = g.useState(0);
|
2839
2839
|
g.useEffect(() => {
|
2840
2840
|
const K = Math.max(s - h, c);
|
2841
2841
|
f(K);
|
@@ -2845,11 +2845,11 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2845
2845
|
hoveredAreaData: null,
|
2846
2846
|
isAreaHovered: !1,
|
2847
2847
|
cursorPos: { x: 0, y: 0 }
|
2848
|
-
}), { hoveredSeriesId: w, hoveredAreaData: v, isAreaHovered: N, cursorPos: R } = E, M = N && w && v, k = !M, G = [...o, ...r], L = G[0]?.dataset.length ?? 0, W = G.flatMap((K) => K.dataset.map((He) => He.x)), Y = G.flatMap((K) => K.dataset.map((He) => He.y)),
|
2848
|
+
}), { hoveredSeriesId: w, hoveredAreaData: v, isAreaHovered: N, cursorPos: R } = E, M = N && w && v, k = !M, G = [...o, ...r], L = G[0]?.dataset.length ?? 0, W = G.flatMap((K) => K.dataset.map((He) => He.x)), Y = G.flatMap((K) => K.dataset.map((He) => He.y)), J = o[0]?.dataset?.map(
|
2849
2849
|
(K, He) => o.reduce((st, En) => st + En.dataset[He]?.y || 0, 0)
|
2850
|
-
) ?? [0],
|
2850
|
+
) ?? [0], he = Math.max(...J), _e = Math.max(
|
2851
2851
|
...r.flatMap((K) => K.dataset.map((He) => He.y))
|
2852
|
-
), Le = Math.floor(Math.min(...Y) / 100) * 100, Re = Math.ceil(Math.max(
|
2852
|
+
), Le = Math.floor(Math.min(...Y) / 100) * 100, Re = Math.ceil(Math.max(he, _e) / 100) * 100, ue = o.map((K, He) => ({
|
2853
2853
|
id: `stacked-${He}`,
|
2854
2854
|
guid: K.category_guid,
|
2855
2855
|
top_level_guid: K.top_level_category_guid,
|
@@ -2871,8 +2871,8 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2871
2871
|
label: K.category_name,
|
2872
2872
|
type: "line",
|
2873
2873
|
valueFormatter: (st) => H(st, "0,0")
|
2874
|
-
})),
|
2875
|
-
...
|
2874
|
+
})), Qe = [...ue, ...me], $ = [
|
2875
|
+
...ue.map(({ guid: K, top_level_guid: He }) => ({
|
2876
2876
|
guid: K,
|
2877
2877
|
top_level_guid: He
|
2878
2878
|
})),
|
@@ -2890,11 +2890,11 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2890
2890
|
y(K), i?.(K ?? "");
|
2891
2891
|
}, fe = (K) => {
|
2892
2892
|
a?.(K ?? "");
|
2893
|
-
},
|
2893
|
+
}, we = () => {
|
2894
2894
|
const K = pe(String(w)).guid;
|
2895
2895
|
K && a?.(K);
|
2896
2896
|
}, Ge = (K) => {
|
2897
|
-
const He = String(K?.seriesId), st = pe(He).guid, En =
|
2897
|
+
const He = String(K?.seriesId), st = pe(He).guid, En = Qe.find((xi) => xi.id === He), La = En && K?.dataIndex !== void 0, Ma = En && K?.dataIndex === void 0;
|
2898
2898
|
if (La)
|
2899
2899
|
I({
|
2900
2900
|
hoveredSeriesId: He,
|
@@ -2945,10 +2945,10 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2945
2945
|
'& [class*="MuiLineElement-series-unstacked-"]': {
|
2946
2946
|
strokeWidth: 3
|
2947
2947
|
},
|
2948
|
-
...S &&
|
2948
|
+
...S && ue.reduce((K, He, st) => {
|
2949
2949
|
const En = `.MuiAreaElement-series-stacked-${st}`;
|
2950
2950
|
return K[En] = {
|
2951
|
-
opacity:
|
2951
|
+
opacity: ue[st].guid === S ? 0.9 : 0.2
|
2952
2952
|
}, K;
|
2953
2953
|
}, {})
|
2954
2954
|
};
|
@@ -2964,9 +2964,9 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2964
2964
|
{
|
2965
2965
|
height: p,
|
2966
2966
|
margin: { bottom: 50 },
|
2967
|
-
onAreaClick:
|
2967
|
+
onAreaClick: we,
|
2968
2968
|
onHighlightChange: Ge,
|
2969
|
-
series:
|
2969
|
+
series: Qe,
|
2970
2970
|
skipAnimation: !0,
|
2971
2971
|
slotProps: {
|
2972
2972
|
legend: {
|
@@ -3213,7 +3213,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3213
3213
|
calendarActions: e,
|
3214
3214
|
color: n = "primary",
|
3215
3215
|
copy: i,
|
3216
|
-
range: a = [
|
3216
|
+
range: a = [Ye(xe()), Ze(pn())],
|
3217
3217
|
shouldShrinkToIcon: o = !0,
|
3218
3218
|
variant: r = "outlined"
|
3219
3219
|
}) => {
|
@@ -3232,22 +3232,22 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3232
3232
|
]
|
3233
3233
|
};
|
3234
3234
|
g.useEffect(() => {
|
3235
|
-
p(a);
|
3235
|
+
u(a), p(a);
|
3236
3236
|
}, [a]), g.useEffect(() => {
|
3237
3237
|
(r === "timeframebuttons" || r === "timeframetabs") && e.onRangeChanged(N());
|
3238
3238
|
}, [I]);
|
3239
3239
|
const N = () => {
|
3240
|
-
const G =
|
3241
|
-
return [
|
3240
|
+
const G = Ze(pn());
|
3241
|
+
return [Ze(Ht(G, I)), G];
|
3242
3242
|
}, R = (G) => {
|
3243
|
-
const L = [...l], W = l[0], Y = l[1],
|
3243
|
+
const L = [...l], W = l[0], Y = l[1], J = G === "previous";
|
3244
3244
|
if (_ === i.dateRangePickerCopy.dateRangeThisMonth)
|
3245
|
-
L[0] =
|
3245
|
+
L[0] = J ? Ht(W, 1) : rn(W, 1), L[1] = Ze(J ? Ht(Y, 1) : rn(Y, 1));
|
3246
3246
|
else if (_ === i.dateRangePickerCopy.dateRangeYTD || _ === i.dateRangePickerCopy.dateRangeLastYear)
|
3247
|
-
L[0] =
|
3247
|
+
L[0] = J ? Za(ur(W), 1) : Ji(ur(W), 1), L[1] = J ? Za(_r(W), 1) : Ji(_r(W), 1);
|
3248
3248
|
else {
|
3249
|
-
const
|
3250
|
-
L[
|
3249
|
+
const he = Md(Y, W);
|
3250
|
+
J ? (L[1] = Ot(W, 1), L[0] = Ot(L[1], he)) : (L[0] = Fn(Y, 1), L[1] = Fn(L[0], he));
|
3251
3251
|
}
|
3252
3252
|
u(L), e.onRangeChanged(L);
|
3253
3253
|
}, M = () => {
|
@@ -3389,7 +3389,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3389
3389
|
copy: i.dateRangePickerCopy,
|
3390
3390
|
dateRange: m,
|
3391
3391
|
onRangeChanged: (G, L) => {
|
3392
|
-
p(G), h(L);
|
3392
|
+
G[0] && !G[1] && (G[1] = G[0]), p(G), h(L);
|
3393
3393
|
},
|
3394
3394
|
selectedShortcut: _,
|
3395
3395
|
sx: { p: 16 }
|
@@ -3416,7 +3416,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3416
3416
|
copy: i.dateRangePickerCopy,
|
3417
3417
|
dateRange: m,
|
3418
3418
|
onRangeChanged: (G, L) => {
|
3419
|
-
p(G), h(L);
|
3419
|
+
G[0] && !G[1] && (G[1] = G[0]), p(G), h(L);
|
3420
3420
|
},
|
3421
3421
|
selectedShortcut: _,
|
3422
3422
|
sx: {
|
@@ -3556,7 +3556,7 @@ class Ku extends g.Component {
|
|
3556
3556
|
return { hasError: !0 };
|
3557
3557
|
}
|
3558
3558
|
render() {
|
3559
|
-
return this.state.hasError ? /* @__PURE__ */ t(
|
3559
|
+
return this.state.hasError ? /* @__PURE__ */ t(qe, { sx: { pt: 24 }, children: Vu.text }) : this.props.children;
|
3560
3560
|
}
|
3561
3561
|
}
|
3562
3562
|
const Ea = ({
|
@@ -3585,7 +3585,7 @@ const Ea = ({
|
|
3585
3585
|
),
|
3586
3586
|
subheader: o && /* @__PURE__ */ t(X, { sx: { color: "text.secondary" }, variant: "body2", children: o }),
|
3587
3587
|
sx: { p: 0, pb: 8, width: "calc(100% - 8px)", "& .MuiCardHeader-action": { mt: 0 } },
|
3588
|
-
title: /* @__PURE__ */ t(
|
3588
|
+
title: /* @__PURE__ */ t(qe, { sx: { width: "calc(100% - 10px)" }, children: s })
|
3589
3589
|
}
|
3590
3590
|
),
|
3591
3591
|
/* @__PURE__ */ t(Pt, { ref: l, sx: { p: 0, ":last-child": { pb: 0 } }, children: /* @__PURE__ */ t(wo, { availableHeight: u, availableWidth: _, children: e }) })
|
@@ -3611,7 +3611,7 @@ const Ea = ({
|
|
3611
3611
|
subheader: s || null,
|
3612
3612
|
subheaderTypographyProps: { variant: "Small" },
|
3613
3613
|
sx: { pb: 4 },
|
3614
|
-
title: l ? /* @__PURE__ */ t(
|
3614
|
+
title: l ? /* @__PURE__ */ t(qe, { sx: { pb: 4 }, children: l }) : null
|
3615
3615
|
}
|
3616
3616
|
),
|
3617
3617
|
/* @__PURE__ */ t(Pt, { ref: u, sx: { p: 0 }, children: /* @__PURE__ */ t(wo, { availableHeight: _, availableWidth: h, children: i }) })
|
@@ -3642,7 +3642,7 @@ const Ea = ({
|
|
3642
3642
|
};
|
3643
3643
|
if (!M)
|
3644
3644
|
return /* @__PURE__ */ t(ce, {});
|
3645
|
-
const
|
3645
|
+
const J = {
|
3646
3646
|
accountFilterOptionsCopy: {
|
3647
3647
|
accountTypeAccounts: L.account_filter.account_type_accounts,
|
3648
3648
|
cancelButton: L.cancel_button,
|
@@ -3656,7 +3656,7 @@ const Ea = ({
|
|
3656
3656
|
zeroStateTitle: L.account_filter.zero_state_title
|
3657
3657
|
},
|
3658
3658
|
title: L.account_filter.title
|
3659
|
-
},
|
3659
|
+
}, he = {
|
3660
3660
|
dateRangePickerCopy: {
|
3661
3661
|
dateRangeFrom: L.date_range_picker.from,
|
3662
3662
|
dateRangeTo: L.date_range_picker.to,
|
@@ -3695,7 +3695,7 @@ const Ea = ({
|
|
3695
3695
|
vr,
|
3696
3696
|
{
|
3697
3697
|
calendarActions: i,
|
3698
|
-
copy:
|
3698
|
+
copy: he,
|
3699
3699
|
range: [_e, Le],
|
3700
3700
|
shouldShrinkToIcon: !1,
|
3701
3701
|
variant: r
|
@@ -3705,38 +3705,38 @@ const Ea = ({
|
|
3705
3705
|
Tc,
|
3706
3706
|
{
|
3707
3707
|
accounts: e,
|
3708
|
-
copy:
|
3708
|
+
copy: J,
|
3709
3709
|
onConnectAccountClick: () => f(!0),
|
3710
|
-
onFilterClick: (
|
3711
|
-
G(
|
3710
|
+
onFilterClick: (ue) => {
|
3711
|
+
G(ue), u?.();
|
3712
3712
|
},
|
3713
3713
|
selectedAccountGuids: k,
|
3714
3714
|
showAccountNumbers: !1,
|
3715
3715
|
variant: "text"
|
3716
3716
|
}
|
3717
3717
|
),
|
3718
|
-
n?.map((
|
3719
|
-
if (g.isValidElement(
|
3720
|
-
const { iconName: me, onClick:
|
3718
|
+
n?.map((ue) => {
|
3719
|
+
if (g.isValidElement(ue)) return ue;
|
3720
|
+
const { iconName: me, onClick: Qe, label: $ } = ue;
|
3721
3721
|
return Re ? w || N ? /* @__PURE__ */ t(
|
3722
3722
|
te,
|
3723
3723
|
{
|
3724
|
-
onClick:
|
3724
|
+
onClick: Qe,
|
3725
3725
|
startIcon: /* @__PURE__ */ t(V, { name: me, size: 24 }),
|
3726
3726
|
sx: { my: 4 },
|
3727
3727
|
children: $
|
3728
3728
|
},
|
3729
3729
|
me
|
3730
|
-
) : /* @__PURE__ */ t($e, { "aria-label": $, color: "primary", onClick:
|
3730
|
+
) : /* @__PURE__ */ t($e, { "aria-label": $, color: "primary", onClick: Qe, children: /* @__PURE__ */ t(V, { name: me, size: 24 }) }, me) : w || N ? /* @__PURE__ */ t(
|
3731
3731
|
te,
|
3732
3732
|
{
|
3733
|
-
onClick:
|
3733
|
+
onClick: Qe,
|
3734
3734
|
startIcon: /* @__PURE__ */ t(V, { name: me, size: 24 }),
|
3735
3735
|
sx: { my: 4 },
|
3736
3736
|
children: $
|
3737
3737
|
},
|
3738
3738
|
me
|
3739
|
-
) : /* @__PURE__ */ t($e, { "aria-label": $, color: "primary", onClick:
|
3739
|
+
) : /* @__PURE__ */ t($e, { "aria-label": $, color: "primary", onClick: Qe, children: /* @__PURE__ */ t(V, { name: me, size: 24 }) }, me);
|
3740
3740
|
})
|
3741
3741
|
] }),
|
3742
3742
|
sx: {
|
@@ -3762,7 +3762,7 @@ const Ea = ({
|
|
3762
3762
|
children: /* @__PURE__ */ t(V, { name: "arrow_back", size: 24 })
|
3763
3763
|
}
|
3764
3764
|
),
|
3765
|
-
/* @__PURE__ */ t(
|
3765
|
+
/* @__PURE__ */ t(qe, { children: m })
|
3766
3766
|
] })
|
3767
3767
|
}
|
3768
3768
|
),
|
@@ -3773,7 +3773,7 @@ const Ea = ({
|
|
3773
3773
|
vr,
|
3774
3774
|
{
|
3775
3775
|
calendarActions: i,
|
3776
|
-
copy:
|
3776
|
+
copy: he,
|
3777
3777
|
range: [_e, Le],
|
3778
3778
|
shouldShrinkToIcon: !1,
|
3779
3779
|
variant: r
|
@@ -4393,14 +4393,14 @@ class Qu {
|
|
4393
4393
|
this.api = new Ri(n, i), await this.loadCopy();
|
4394
4394
|
};
|
4395
4395
|
loadCopy = async () => {
|
4396
|
-
await this.getCopy(this.featureNamespace),
|
4396
|
+
await this.getCopy(this.featureNamespace), ee(() => {
|
4397
4397
|
this.isInitialized = !0;
|
4398
4398
|
});
|
4399
4399
|
};
|
4400
4400
|
getCopy = async (n, i = "") => {
|
4401
4401
|
try {
|
4402
4402
|
const a = await this.api.getGlobalCopy(n, i);
|
4403
|
-
|
4403
|
+
ee(() => {
|
4404
4404
|
this.copy = a[n];
|
4405
4405
|
});
|
4406
4406
|
} catch (a) {
|
@@ -4439,7 +4439,7 @@ class Ju {
|
|
4439
4439
|
}
|
4440
4440
|
loadSurvey = (n = !1) => {
|
4441
4441
|
Ud.getActiveMatchingSurveys((i) => {
|
4442
|
-
|
4442
|
+
ee(() => {
|
4443
4443
|
if (i.length > 0) {
|
4444
4444
|
const a = i.find((o) => o.id === this.surveyId);
|
4445
4445
|
a && (this.survey = a, this.currentQuestionIndex = 0, this.question = a.questions[0], this.response = null, this.responses = {});
|
@@ -4515,7 +4515,7 @@ class nh {
|
|
4515
4515
|
loadBeats = async () => {
|
4516
4516
|
this.isLoading = !0;
|
4517
4517
|
const n = await this.api.getBeats(), a = (await this.api.getOffers()).map((o) => th(o));
|
4518
|
-
|
4518
|
+
ee(() => {
|
4519
4519
|
this.beats = eh(n, a, "active_at", "desc"), this.isLoading = !1;
|
4520
4520
|
});
|
4521
4521
|
};
|
@@ -4616,7 +4616,7 @@ class oh {
|
|
4616
4616
|
api = new Or("/", "");
|
4617
4617
|
globalStore;
|
4618
4618
|
alert = "";
|
4619
|
-
dateRange = { start:
|
4619
|
+
dateRange = { start: Ye(xe()), end: Ze(xe()) };
|
4620
4620
|
budgets = [];
|
4621
4621
|
selectedBudget;
|
4622
4622
|
selectedSubBudget;
|
@@ -4674,7 +4674,7 @@ class oh {
|
|
4674
4674
|
addBudget = async (n, i, a = null) => {
|
4675
4675
|
try {
|
4676
4676
|
const o = await this.api.addBudget(n, i, a);
|
4677
|
-
|
4677
|
+
ee(() => {
|
4678
4678
|
this.budgets.push(o);
|
4679
4679
|
});
|
4680
4680
|
} catch (o) {
|
@@ -4683,7 +4683,7 @@ class oh {
|
|
4683
4683
|
};
|
4684
4684
|
deleteBudget = async (n) => {
|
4685
4685
|
try {
|
4686
|
-
await this.api.deleteBudget(n),
|
4686
|
+
await this.api.deleteBudget(n), ee(() => {
|
4687
4687
|
const i = this.budgets.findIndex((a) => a.guid === n);
|
4688
4688
|
i >= 0 && this.budgets.splice(i, 1);
|
4689
4689
|
});
|
@@ -4694,7 +4694,7 @@ class oh {
|
|
4694
4694
|
loadBudgets = async () => {
|
4695
4695
|
try {
|
4696
4696
|
const n = await this.api.getBudgets();
|
4697
|
-
|
4697
|
+
ee(() => {
|
4698
4698
|
this.budgets = n, this.isDataLoaded = !0;
|
4699
4699
|
});
|
4700
4700
|
} catch (n) {
|
@@ -4732,7 +4732,7 @@ class oh {
|
|
4732
4732
|
updateBudget = async (n) => {
|
4733
4733
|
try {
|
4734
4734
|
const i = await this.api.updateBudget(n);
|
4735
|
-
|
4735
|
+
ee(() => {
|
4736
4736
|
const a = this.budgets.findIndex((o) => o.guid === n.guid);
|
4737
4737
|
a >= 0 && (this.budgets[a] = i);
|
4738
4738
|
});
|
@@ -4760,7 +4760,7 @@ const Ei = () => {
|
|
4760
4760
|
}
|
4761
4761
|
),
|
4762
4762
|
/* @__PURE__ */ t(C, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
4763
|
-
/* @__PURE__ */ t(
|
4763
|
+
/* @__PURE__ */ t(Xe, { amount: e, bold: !0, sx: { fontSize: 12 } })
|
4764
4764
|
] });
|
4765
4765
|
}, Mo = x(rh), sh = ({ onAddIncomeClick: e }) => {
|
4766
4766
|
const n = Te(), { availableWidth: i } = $n(), { isMobile: a } = Ce(), { visibleCashAccounts: o, visibleCashBalance: r } = Se(), { selectedAccountGuids: s } = re(), { cashflow: c } = A(), { userProfile: l } = ft(), {
|
@@ -4798,7 +4798,7 @@ const Ei = () => {
|
|
4798
4798
|
px: 24,
|
4799
4799
|
children: [
|
4800
4800
|
/* @__PURE__ */ d(b, { pb: 14, pt: 12, children: [
|
4801
|
-
/* @__PURE__ */ t(
|
4801
|
+
/* @__PURE__ */ t(Xe, { amount: I, variant: "H2" }),
|
4802
4802
|
/* @__PURE__ */ t(X, { variant: "XSmall", whiteSpace: "nowrap", children: T(
|
4803
4803
|
c.total_cash_accounts,
|
4804
4804
|
h.length
|
@@ -4806,12 +4806,12 @@ const Ei = () => {
|
|
4806
4806
|
] }),
|
4807
4807
|
/* @__PURE__ */ t(b, { pt: 18, children: /* @__PURE__ */ t(V, { name: "remove" }) }),
|
4808
4808
|
/* @__PURE__ */ d(b, { pb: 14, pt: 12, children: [
|
4809
|
-
/* @__PURE__ */ t(
|
4809
|
+
/* @__PURE__ */ t(Xe, { amount: w, variant: "H2" }),
|
4810
4810
|
/* @__PURE__ */ t(X, { variant: "XSmall", whiteSpace: "nowrap", children: T(c.expenses_due, _.length) })
|
4811
4811
|
] }),
|
4812
4812
|
/* @__PURE__ */ t(b, { pt: 18, children: /* @__PURE__ */ t(V, { name: "equal" }) }),
|
4813
4813
|
/* @__PURE__ */ d(b, { pb: 14, pr: 24, pt: 12, children: [
|
4814
|
-
/* @__PURE__ */ t(
|
4814
|
+
/* @__PURE__ */ t(Xe, { amount: v, variant: "H2" }),
|
4815
4815
|
/* @__PURE__ */ d(b, { alignItems: "center", direction: "row", gap: 8, children: [
|
4816
4816
|
/* @__PURE__ */ t(X, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
|
4817
4817
|
/* @__PURE__ */ t(Oo, { body: c.tooltip_body, title: c.tooltip_title })
|
@@ -4837,12 +4837,12 @@ const Ei = () => {
|
|
4837
4837
|
c.total_cash_accounts,
|
4838
4838
|
h.length
|
4839
4839
|
) }),
|
4840
|
-
/* @__PURE__ */ t(
|
4840
|
+
/* @__PURE__ */ t(Xe, { amount: r, bold: !0, variant: "XSmall" })
|
4841
4841
|
] }),
|
4842
4842
|
/* @__PURE__ */ t(P, {}),
|
4843
4843
|
/* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
4844
4844
|
/* @__PURE__ */ t(C, { variant: "Small", children: T(c.expenses_due, _.length) }),
|
4845
|
-
/* @__PURE__ */ t(
|
4845
|
+
/* @__PURE__ */ t(Xe, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
|
4846
4846
|
] }),
|
4847
4847
|
/* @__PURE__ */ t(P, {}),
|
4848
4848
|
/* @__PURE__ */ t(
|
@@ -4959,7 +4959,7 @@ const Ei = () => {
|
|
4959
4959
|
const u = e.transactions.find(
|
4960
4960
|
(_) => _.repeating_transaction_guid === e.guid && _.date > We(Ot(l.expectedDate, 5)) && _.date < We(Fn(l.expectedDate, 5))
|
4961
4961
|
);
|
4962
|
-
u ? (l.transaction = u, l.status = et.Paid, l.occurredOnDate = Ve(u.date)) : ot(l.expectedDate, Ot(
|
4962
|
+
u ? (l.transaction = u, l.status = et.Paid, l.occurredOnDate = Ve(u.date)) : ot(l.expectedDate, Ot(xe(), 3)) && (l.status = et.Missed);
|
4963
4963
|
}
|
4964
4964
|
return i;
|
4965
4965
|
}, uh = (e, n, i) => {
|
@@ -5040,7 +5040,7 @@ const Ei = () => {
|
|
5040
5040
|
recurrences: [i]
|
5041
5041
|
}), n;
|
5042
5042
|
}, []), sa = (e, n, i) => {
|
5043
|
-
const a = ea(
|
5043
|
+
const a = ea(xe(), n.recurrence_day), o = ic(xe(), n.recurrence_day), r = ki(n.recurrence_day), s = n.second_recurrence_day ? ki(n.second_recurrence_day) : "";
|
5044
5044
|
let c = i ? T(e.monthly_ordinal, r) : e.monthly;
|
5045
5045
|
switch (n.recurrence_type) {
|
5046
5046
|
case Ee.EveryQuarter:
|
@@ -5587,7 +5587,7 @@ const Dc = (e, n) => {
|
|
5587
5587
|
}, kh = (e, n, i) => {
|
5588
5588
|
const {
|
5589
5589
|
accounts: a = [],
|
5590
|
-
dateRange: o = { start:
|
5590
|
+
dateRange: o = { start: Ye(xe()), end: pn() },
|
5591
5591
|
custom: r = () => !0,
|
5592
5592
|
searchTerm: s = "",
|
5593
5593
|
showSplits: c = !1
|
@@ -5641,8 +5641,8 @@ const Nc = {
|
|
5641
5641
|
tags: []
|
5642
5642
|
};
|
5643
5643
|
let Wh = class {
|
5644
|
-
beginDate =
|
5645
|
-
endDate =
|
5644
|
+
beginDate = Ye(/* @__PURE__ */ new Date());
|
5645
|
+
endDate = Ze(/* @__PURE__ */ new Date());
|
5646
5646
|
expandedSplits = [];
|
5647
5647
|
isInitialized = !1;
|
5648
5648
|
height = 550;
|
@@ -5687,7 +5687,7 @@ class $h {
|
|
5687
5687
|
api = new ca("/", "");
|
5688
5688
|
beatApi = new li("/", "");
|
5689
5689
|
associatedBeats = [];
|
5690
|
-
cachedStartDate = Ot(
|
5690
|
+
cachedStartDate = Ot(xe(), 90);
|
5691
5691
|
filter = {};
|
5692
5692
|
isLoading = !0;
|
5693
5693
|
rawTransactions = [];
|
@@ -5706,13 +5706,13 @@ class $h {
|
|
5706
5706
|
transactions: a
|
5707
5707
|
} = {}) => {
|
5708
5708
|
await Promise.all([
|
5709
|
-
this.loadAssociatedBeats(
|
5709
|
+
this.loadAssociatedBeats(Ye(/* @__PURE__ */ new Date()), n),
|
5710
5710
|
this.loadTags(),
|
5711
5711
|
this.loadTaggings(),
|
5712
5712
|
this.loadTransactionRules(i),
|
5713
5713
|
// By default loads 90 days of transactions
|
5714
5714
|
this.loadTransactions(this.cachedStartDate, pn(), a)
|
5715
|
-
]),
|
5715
|
+
]), ee(() => {
|
5716
5716
|
this.uiStore.setIsInitialized(!0);
|
5717
5717
|
});
|
5718
5718
|
};
|
@@ -5757,7 +5757,7 @@ class $h {
|
|
5757
5757
|
};
|
5758
5758
|
addTransaction = async (n) => {
|
5759
5759
|
const i = await this.api.addTransaction(n);
|
5760
|
-
i &&
|
5760
|
+
i && ee(() => this.rawTransactions = [i, ...this.transactions]);
|
5761
5761
|
};
|
5762
5762
|
augmentTransactions = (n) => xh(
|
5763
5763
|
n,
|
@@ -5768,25 +5768,25 @@ class $h {
|
|
5768
5768
|
getTransactionData = () => ({});
|
5769
5769
|
loadAssociatedBeats = async (n, i) => {
|
5770
5770
|
const a = n ? fa(n, { representation: "date" }) : void 0, o = i ?? await this.beatApi.getBeatsWithAssociatedTransaction(a);
|
5771
|
-
|
5771
|
+
ee(() => this.associatedBeats = o);
|
5772
5772
|
};
|
5773
5773
|
loadTags = async () => {
|
5774
5774
|
const n = await this.api.getTags();
|
5775
|
-
|
5775
|
+
ee(() => this.tags = n);
|
5776
5776
|
};
|
5777
5777
|
loadTaggings = async () => {
|
5778
5778
|
const n = await this.api.getTaggings();
|
5779
|
-
|
5779
|
+
ee(() => this.taggings = n);
|
5780
5780
|
};
|
5781
5781
|
loadTransactionRules = async (n) => {
|
5782
5782
|
const i = n ?? await this.api.getTransactionRules();
|
5783
|
-
|
5783
|
+
ee(() => this.transactionRules = i);
|
5784
5784
|
};
|
5785
5785
|
loadTransactions = async (n = this.cachedStartDate, i = pn(), a) => {
|
5786
5786
|
this.setIsLoading(!0), this.rawTransactions = [];
|
5787
5787
|
try {
|
5788
5788
|
const o = a ?? await this.api.getTransactionsByDateRange(We(n), We(i));
|
5789
|
-
|
5789
|
+
ee(() => {
|
5790
5790
|
this.rawTransactions = o;
|
5791
5791
|
});
|
5792
5792
|
} catch (o) {
|
@@ -5817,7 +5817,7 @@ class $h {
|
|
5817
5817
|
const i = this.transactions.findIndex((a) => a.guid === n);
|
5818
5818
|
if (i >= 0) {
|
5819
5819
|
const a = [...this.transactions];
|
5820
|
-
a.splice(i, 1),
|
5820
|
+
a.splice(i, 1), ee(() => this.rawTransactions = a);
|
5821
5821
|
}
|
5822
5822
|
};
|
5823
5823
|
setFilter = (n) => {
|
@@ -5836,7 +5836,7 @@ class $h {
|
|
5836
5836
|
o.push(c);
|
5837
5837
|
}
|
5838
5838
|
const r = this.transactions.findIndex((s) => s.guid === n.guid);
|
5839
|
-
r >= 0 &&
|
5839
|
+
r >= 0 && ee(
|
5840
5840
|
() => this.rawTransactions = [
|
5841
5841
|
...this.transactions.slice(0, r),
|
5842
5842
|
a,
|
@@ -5854,7 +5854,7 @@ class $h {
|
|
5854
5854
|
c >= 0 && a.splice(c, 1);
|
5855
5855
|
});
|
5856
5856
|
const o = a.findIndex((s) => s.guid === n), r = a[o];
|
5857
|
-
r.has_been_split = !1, o >= 0 &&
|
5857
|
+
r.has_been_split = !1, o >= 0 && ee(
|
5858
5858
|
() => this.rawTransactions = [
|
5859
5859
|
...a.slice(0, o),
|
5860
5860
|
r,
|
@@ -5875,7 +5875,7 @@ class $h {
|
|
5875
5875
|
};
|
5876
5876
|
updateTransaction = async (n) => {
|
5877
5877
|
const i = await this.api.updateTransaction(n), a = this.transactions.findIndex((o) => o.guid === n.guid);
|
5878
|
-
a >= 0 &&
|
5878
|
+
a >= 0 && ee(
|
5879
5879
|
() => this.rawTransactions = [
|
5880
5880
|
...this.transactions.slice(0, a),
|
5881
5881
|
i,
|
@@ -6079,7 +6079,7 @@ const zh = ({ transaction: e, onClick: n }) => {
|
|
6079
6079
|
}
|
6080
6080
|
);
|
6081
6081
|
}, eg = x(Jh), tg = (e) => /* @__PURE__ */ t(C, { tabIndex: e.tabIndex, variant: "Small", children: de(Ve(e.row.date), ie.MONTH_DAY) }), ng = (e) => {
|
6082
|
-
const n =
|
6082
|
+
const n = je(), { transactions: i } = A(), { is_flagged: a, is_hidden: o, has_been_viewed: r, parent_guid: s } = e.row, l = !r && !!!s;
|
6083
6083
|
return /* @__PURE__ */ d(
|
6084
6084
|
O,
|
6085
6085
|
{
|
@@ -6624,9 +6624,9 @@ const sg = ({
|
|
6624
6624
|
)
|
6625
6625
|
);
|
6626
6626
|
}, $r = (e) => {
|
6627
|
-
const n = [], i =
|
6627
|
+
const n = [], i = xe();
|
6628
6628
|
for (let a = 0; a <= Fr; a++) {
|
6629
|
-
const o =
|
6629
|
+
const o = Ye(Ht(i, Fr - a)), s = e.filter(
|
6630
6630
|
(c) => c.year_month === Number(Ln(o, "yyyyMM"))
|
6631
6631
|
).reduce((c, l) => c + l.total, 0);
|
6632
6632
|
n.push({
|
@@ -6708,7 +6708,7 @@ class vg {
|
|
6708
6708
|
loadCategories = async (n) => {
|
6709
6709
|
try {
|
6710
6710
|
const i = n || await this.api.getCategories(), { default_categories: a } = this.globalStore.copyStore.copy.categories;
|
6711
|
-
|
6711
|
+
ee(() => {
|
6712
6712
|
this.categories = i.map((o) => ({
|
6713
6713
|
...o,
|
6714
6714
|
name: a[o.guid] ? a[o.guid].replace(/&/g, "&") : o.name
|
@@ -6726,7 +6726,7 @@ class vg {
|
|
6726
6726
|
We(a),
|
6727
6727
|
n
|
6728
6728
|
);
|
6729
|
-
|
6729
|
+
ee(() => {
|
6730
6730
|
this.dateRangeCategoryTotals = o, this.setIsLoadingCategoryTotals(!1), this.dataRangeTotalsLoaded = !0;
|
6731
6731
|
});
|
6732
6732
|
} catch (o) {
|
@@ -6734,10 +6734,10 @@ class vg {
|
|
6734
6734
|
}
|
6735
6735
|
};
|
6736
6736
|
loadMonthlyCategoryTotals = async (n = this.globalStore.globalUiStore.selectedAccounts, i, a) => {
|
6737
|
-
const o = We(
|
6737
|
+
const o = We(Ye(i ?? Ht(/* @__PURE__ */ new Date(), 11))), r = We(Ze(a ?? /* @__PURE__ */ new Date()));
|
6738
6738
|
try {
|
6739
6739
|
const s = await this.api.getMonthlyCategoryTotals(o, r, n);
|
6740
|
-
|
6740
|
+
ee(() => {
|
6741
6741
|
this.monthlyCategoryTotals = s, this.monthlyTotalsLoaded = !0;
|
6742
6742
|
});
|
6743
6743
|
} catch (s) {
|
@@ -6752,11 +6752,11 @@ class vg {
|
|
6752
6752
|
We(a),
|
6753
6753
|
n
|
6754
6754
|
), r = await this.api.getMonthlyCategoryTotals(
|
6755
|
-
We(
|
6756
|
-
We(
|
6755
|
+
We(Ye(Ht(a, 11))),
|
6756
|
+
We(Ze(a)),
|
6757
6757
|
n
|
6758
6758
|
);
|
6759
|
-
|
6759
|
+
ee(() => {
|
6760
6760
|
this.dateRangeCategoryTotals = o, this.monthlyCategoryTotals = r, this.dataRangeTotalsLoaded = !0, this.monthlyTotalsLoaded = !0, this.setIsLoadingCategoryTotals(!1);
|
6761
6761
|
});
|
6762
6762
|
} catch (o) {
|
@@ -7348,11 +7348,11 @@ const Lc = ({ transaction: e }) => {
|
|
7348
7348
|
}, I = (G, L) => {
|
7349
7349
|
const W = [...f];
|
7350
7350
|
W[G].amount = L, W[0].amount = e.amount - W.reduce(
|
7351
|
-
(Y,
|
7351
|
+
(Y, J, he) => Y + (he !== 0 ? J.amount : 0),
|
7352
7352
|
0
|
7353
7353
|
), S(W);
|
7354
7354
|
}, w = (G, L) => {
|
7355
|
-
const W = [...f], Y = c.find((
|
7355
|
+
const W = [...f], Y = c.find((J) => J.guid === L);
|
7356
7356
|
Y && (W[G] = {
|
7357
7357
|
...W[G],
|
7358
7358
|
category_guid: L,
|
@@ -8016,13 +8016,13 @@ const Lc = ({ transaction: e }) => {
|
|
8016
8016
|
} = ke(), {
|
8017
8017
|
manualTransaction: W,
|
8018
8018
|
isAmountValid: Y,
|
8019
|
-
searchValue:
|
8020
|
-
setSearchValue:
|
8019
|
+
searchValue: J,
|
8020
|
+
setSearchValue: he,
|
8021
8021
|
setShowInsights: _e,
|
8022
8022
|
updateManualTransaction: Le
|
8023
|
-
} = wt(), { userProfile: Re } = ft(), [
|
8023
|
+
} = wt(), { userProfile: Re } = ft(), [ue, me] = g.useState(""), [Qe, $] = g.useState(""), [pe, be] = g.useState(!1), [fe, we] = g.useState(!1), [Ge, St] = g.useState(!1);
|
8024
8024
|
g.useEffect(() => {
|
8025
|
-
const ht = o.filter((ai) => !ai.is_hidden), or =
|
8025
|
+
const ht = o.filter((ai) => !ai.is_hidden), or = Ye(xe()), rr = Ze(xe());
|
8026
8026
|
y(ht), S(or, rr), R({
|
8027
8027
|
accounts: ht.map((ai) => ai.guid),
|
8028
8028
|
custom: (ai) => !ai.accountIsClosed && !ai.accountIsHidden,
|
@@ -8040,10 +8040,10 @@ const Lc = ({ transaction: e }) => {
|
|
8040
8040
|
const Wt = g.useMemo(
|
8041
8041
|
() => o.filter((ht) => ht.is_manual),
|
8042
8042
|
[o]
|
8043
|
-
), K =
|
8043
|
+
), K = Qe ? G.find((ht) => ht.guid === Qe) : void 0, He = Y && !!W.payee && !!W.account_guid && !!W.category_guid, st = (ht) => {
|
8044
8044
|
S(ht[0], ht[1]);
|
8045
8045
|
}, En = (ht) => {
|
8046
|
-
|
8046
|
+
he(ht), R({
|
8047
8047
|
...v,
|
8048
8048
|
searchTerm: ht
|
8049
8049
|
}), l(F.TRANSACTIONS_CLICK_SEARCH, { search_term: ht });
|
@@ -8052,7 +8052,7 @@ const Lc = ({ transaction: e }) => {
|
|
8052
8052
|
}, Ma = () => {
|
8053
8053
|
Wt.length > 0 ? (Le({
|
8054
8054
|
...Nc,
|
8055
|
-
date: We(
|
8055
|
+
date: We(xe()),
|
8056
8056
|
user_guid: Re?.user_guid || ""
|
8057
8057
|
}), me(
|
8058
8058
|
"addTransaction"
|
@@ -8061,9 +8061,9 @@ const Lc = ({ transaction: e }) => {
|
|
8061
8061
|
}, xi = async () => {
|
8062
8062
|
He && await w(W), me("");
|
8063
8063
|
}, ka = () => {
|
8064
|
-
be(!1),
|
8064
|
+
be(!1), we(!0);
|
8065
8065
|
}, Ga = async () => {
|
8066
|
-
|
8066
|
+
we(!1), await r();
|
8067
8067
|
}, Wl = async () => {
|
8068
8068
|
K && !K.has_been_viewed && await L({ ...K, has_been_viewed: !0 }), me("");
|
8069
8069
|
};
|
@@ -8096,7 +8096,7 @@ const Lc = ({ transaction: e }) => {
|
|
8096
8096
|
{
|
8097
8097
|
onChange: En,
|
8098
8098
|
placeholder: _.action_bar_search_placeholder,
|
8099
|
-
searchValue:
|
8099
|
+
searchValue: J
|
8100
8100
|
}
|
8101
8101
|
) }),
|
8102
8102
|
/* @__PURE__ */ t(
|
@@ -8153,13 +8153,13 @@ const Lc = ({ transaction: e }) => {
|
|
8153
8153
|
se,
|
8154
8154
|
{
|
8155
8155
|
ariaLabelClose: u.close_aria,
|
8156
|
-
isOpen:
|
8156
|
+
isOpen: ue === "transaction" && !!K,
|
8157
8157
|
onClose: Wl,
|
8158
8158
|
title: _.details_title,
|
8159
8159
|
children: K && /* @__PURE__ */ t(Ti, { transaction: K })
|
8160
8160
|
}
|
8161
8161
|
),
|
8162
|
-
K &&
|
8162
|
+
K && ue === "category" && /* @__PURE__ */ t(
|
8163
8163
|
sm,
|
8164
8164
|
{
|
8165
8165
|
onClose: () => {
|
@@ -8172,7 +8172,7 @@ const Lc = ({ transaction: e }) => {
|
|
8172
8172
|
se,
|
8173
8173
|
{
|
8174
8174
|
ariaLabelClose: u.close_aria,
|
8175
|
-
isOpen:
|
8175
|
+
isOpen: ue === "addTransaction",
|
8176
8176
|
isPrimaryDisabled: !He,
|
8177
8177
|
onClose: () => me(""),
|
8178
8178
|
onPrimaryAction: xi,
|
@@ -8235,7 +8235,7 @@ const Lc = ({ transaction: e }) => {
|
|
8235
8235
|
label: ki(y + 1)
|
8236
8236
|
}));
|
8237
8237
|
u[30].label += ` (${s.last_day_of_month})`;
|
8238
|
-
const _ = u.slice(0, 15), h = u.slice(14), m = e === Ee.EveryWeek || e === Ee.EveryOtherWeek, p = e === Ee.TwiceAMonth || e === Ee.EveryMonth || e === Ee.EveryOtherMonth || e === Ee.EveryQuarter || e === Ee.EveryOtherQuarter, f = ic(
|
8238
|
+
const _ = u.slice(0, 15), h = u.slice(14), m = e === Ee.EveryWeek || e === Ee.EveryOtherWeek, p = e === Ee.TwiceAMonth || e === Ee.EveryMonth || e === Ee.EveryOtherMonth || e === Ee.EveryQuarter || e === Ee.EveryOtherQuarter, f = ic(xe(), n), S = (y) => {
|
8239
8239
|
y && o(r_(y));
|
8240
8240
|
};
|
8241
8241
|
return /* @__PURE__ */ d(b, { gap: 24, sx: { m: 24 }, children: [
|
@@ -8334,7 +8334,7 @@ const Lc = ({ transaction: e }) => {
|
|
8334
8334
|
g.useEffect(() => {
|
8335
8335
|
s({
|
8336
8336
|
accounts: a,
|
8337
|
-
dateRange: { start: Ot(
|
8337
|
+
dateRange: { start: Ot(xe(), 90), end: Ze(xe()) },
|
8338
8338
|
custom: (w) => w.repeating_transaction_guid === n.guid
|
8339
8339
|
});
|
8340
8340
|
}, [n]);
|
@@ -8823,13 +8823,13 @@ const Lc = ({ transaction: e }) => {
|
|
8823
8823
|
fr(/* @__PURE__ */ new Date()) * Ii + Vr
|
8824
8824
|
), s = (l) => {
|
8825
8825
|
r(fr(l) * Ii + Vr), a({
|
8826
|
-
start:
|
8827
|
-
end:
|
8826
|
+
start: Ye(l),
|
8827
|
+
end: Ze(l)
|
8828
8828
|
}), n(F.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
8829
8829
|
}, c = /* @__PURE__ */ t(
|
8830
8830
|
bo,
|
8831
8831
|
{
|
8832
|
-
minDate:
|
8832
|
+
minDate: Ye(/* @__PURE__ */ new Date()),
|
8833
8833
|
onMonthChange: s,
|
8834
8834
|
showDaysOutsideCurrentMonth: !0,
|
8835
8835
|
slots: {
|
@@ -9117,20 +9117,20 @@ const Lc = ({ transaction: e }) => {
|
|
9117
9117
|
}, G = () => {
|
9118
9118
|
const W = rn(s.start, 1);
|
9119
9119
|
S({
|
9120
|
-
start:
|
9121
|
-
end:
|
9120
|
+
start: Ye(W),
|
9121
|
+
end: Ze(W)
|
9122
9122
|
});
|
9123
9123
|
}, L = () => {
|
9124
9124
|
const W = Ht(s.start, 1);
|
9125
9125
|
S({
|
9126
|
-
start:
|
9127
|
-
end:
|
9126
|
+
start: Ye(W),
|
9127
|
+
end: Ze(W)
|
9128
9128
|
});
|
9129
9129
|
};
|
9130
9130
|
return /* @__PURE__ */ d(vn, { container: !0, sx: { pt: 16, px: 24, spacing: 24 }, children: [
|
9131
9131
|
/* @__PURE__ */ t(vn, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ d(b, { sx: { gap: 16 }, children: [
|
9132
9132
|
/* @__PURE__ */ d(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
9133
|
-
/* @__PURE__ */ t(
|
9133
|
+
/* @__PURE__ */ t(qe, { sx: { px: 24 }, children: T(
|
9134
9134
|
e.header_title,
|
9135
9135
|
de(s.start, ie.MONTH_LONG)
|
9136
9136
|
) }),
|
@@ -9229,9 +9229,9 @@ const Lc = ({ transaction: e }) => {
|
|
9229
9229
|
c(i);
|
9230
9230
|
}, [i]), g.useEffect(() => {
|
9231
9231
|
r && (h({
|
9232
|
-
dateRange: { start: Ot(
|
9232
|
+
dateRange: { start: Ot(xe(), 90), end: pn() },
|
9233
9233
|
accounts: s
|
9234
|
-
}), _({ start:
|
9234
|
+
}), _({ start: Ye(/* @__PURE__ */ new Date()), end: Ze(/* @__PURE__ */ new Date()) }), u().finally());
|
9235
9235
|
}, [r]), o ? /* @__PURE__ */ d(
|
9236
9236
|
Ct,
|
9237
9237
|
{
|
@@ -9295,7 +9295,7 @@ const Lc = ({ transaction: e }) => {
|
|
9295
9295
|
l && u(i);
|
9296
9296
|
}, [l]), g.useEffect(() => {
|
9297
9297
|
_.length > 0 && (o({
|
9298
|
-
dateRange: { start: Ot(
|
9298
|
+
dateRange: { start: Ot(xe(), 90), end: pn() },
|
9299
9299
|
accounts: _
|
9300
9300
|
}), s().finally());
|
9301
9301
|
}, [_]), !c || !l ? /* @__PURE__ */ t(ce, {}) : /* @__PURE__ */ t(
|
@@ -9406,22 +9406,22 @@ const Lc = ({ transaction: e }) => {
|
|
9406
9406
|
h(r);
|
9407
9407
|
}, [r]), g.useEffect(() => {
|
9408
9408
|
u && (N({
|
9409
|
-
dateRange: { start: Ot(
|
9409
|
+
dateRange: { start: Ot(xe(), 90), end: pn() },
|
9410
9410
|
accounts: _
|
9411
|
-
}), I({ start:
|
9411
|
+
}), I({ start: Ye(/* @__PURE__ */ new Date()), end: Ze(/* @__PURE__ */ new Date()) }), m().finally(), i(!0));
|
9412
9412
|
}, [u]), g.useEffect(() => {
|
9413
9413
|
n && a(F.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
9414
9414
|
state: p.length > 0 ? "default" : "zeroState"
|
9415
9415
|
});
|
9416
9416
|
}, [n]);
|
9417
9417
|
const k = c <= 288, G = c >= 450, L = g.useMemo(() => {
|
9418
|
-
const
|
9418
|
+
const ue = [
|
9419
9419
|
{ color: o.palette.success.main, percentage: `${y / f}` }
|
9420
9420
|
];
|
9421
|
-
return S &&
|
9421
|
+
return S && ue.push({
|
9422
9422
|
color: o.palette.error.main,
|
9423
9423
|
percentage: `${S / f}`
|
9424
|
-
}),
|
9424
|
+
}), ue;
|
9425
9425
|
}, [
|
9426
9426
|
y,
|
9427
9427
|
f,
|
@@ -9434,10 +9434,10 @@ const Lc = ({ transaction: e }) => {
|
|
9434
9434
|
), e();
|
9435
9435
|
};
|
9436
9436
|
if (!l || !n || !v) return /* @__PURE__ */ t(ce, { height: 100 });
|
9437
|
-
const
|
9437
|
+
const J = 32, he = p.length > 0, _e = () => he ? k ? /* @__PURE__ */ t(
|
9438
9438
|
bm,
|
9439
9439
|
{
|
9440
|
-
logoSize:
|
9440
|
+
logoSize: J,
|
9441
9441
|
maxLogos: 3,
|
9442
9442
|
upcomingRecurrences: p.slice(0, 3)
|
9443
9443
|
}
|
@@ -9524,14 +9524,14 @@ const Lc = ({ transaction: e }) => {
|
|
9524
9524
|
gap: 16,
|
9525
9525
|
mt: 4
|
9526
9526
|
},
|
9527
|
-
children: Le.map((
|
9527
|
+
children: Le.map((ue, me) => /* @__PURE__ */ t(
|
9528
9528
|
ym,
|
9529
9529
|
{
|
9530
|
-
amount:
|
9531
|
-
bgcolor:
|
9530
|
+
amount: ue.amount,
|
9531
|
+
bgcolor: ue.bgColor,
|
9532
9532
|
isLargeScreen: G,
|
9533
9533
|
isSmallScreen: k,
|
9534
|
-
label:
|
9534
|
+
label: ue.label
|
9535
9535
|
},
|
9536
9536
|
`recurrence-legend-${me}`
|
9537
9537
|
))
|
@@ -9563,7 +9563,7 @@ class Em {
|
|
9563
9563
|
transactions = [];
|
9564
9564
|
repeatingTransactions = [];
|
9565
9565
|
selectedDay;
|
9566
|
-
dateRange = { start:
|
9566
|
+
dateRange = { start: Ye(xe()), end: Ze(xe()) };
|
9567
9567
|
isDataLoaded = !1;
|
9568
9568
|
constructor(n) {
|
9569
9569
|
this.globalStore = n, this.api = new Yr(n.endpoint, n.sessionToken), Fe(this);
|
@@ -9589,7 +9589,7 @@ class Em {
|
|
9589
9589
|
*/
|
9590
9590
|
get upcomingRecurrences() {
|
9591
9591
|
return this.recurrences.filter(
|
9592
|
-
(n) => sn(n.expectedDate, Ot(
|
9592
|
+
(n) => sn(n.expectedDate, Ot(xe(), 3)) && ot(n.expectedDate, this.dateRange.end) && n.status === et.Upcoming
|
9593
9593
|
);
|
9594
9594
|
}
|
9595
9595
|
/**
|
@@ -9625,7 +9625,7 @@ class Em {
|
|
9625
9625
|
);
|
9626
9626
|
}
|
9627
9627
|
get nextIncomeRecurrence() {
|
9628
|
-
return this.upcomingIncome.find((n) => sn(n.expectedDate,
|
9628
|
+
return this.upcomingIncome.find((n) => sn(n.expectedDate, xe()));
|
9629
9629
|
}
|
9630
9630
|
/**
|
9631
9631
|
* Returns the expense recurrences for the current month.
|
@@ -9711,7 +9711,7 @@ class Em {
|
|
9711
9711
|
loadRepeatingTransactions = async () => {
|
9712
9712
|
try {
|
9713
9713
|
const n = await this.api.getRepeatingTransactions();
|
9714
|
-
|
9714
|
+
ee(() => {
|
9715
9715
|
this.repeatingTransactions = Fa(
|
9716
9716
|
this.globalStore.accountStore.visibleAccounts,
|
9717
9717
|
n,
|
@@ -9733,7 +9733,7 @@ class Em {
|
|
9733
9733
|
await this.globalStore.transactionStore.updateTransaction({
|
9734
9734
|
...i,
|
9735
9735
|
repeating_transaction_guid: a.guid
|
9736
|
-
}),
|
9736
|
+
}), ee(() => {
|
9737
9737
|
this.repeatingTransactions = [
|
9738
9738
|
...this.repeatingTransactions,
|
9739
9739
|
...Fa(
|
@@ -9753,7 +9753,7 @@ class Em {
|
|
9753
9753
|
*/
|
9754
9754
|
deleteRepeatingTransaction = async (n) => {
|
9755
9755
|
try {
|
9756
|
-
await this.api.deleteRepeatingTransaction(n),
|
9756
|
+
await this.api.deleteRepeatingTransaction(n), ee(() => {
|
9757
9757
|
this.repeatingTransactions = [
|
9758
9758
|
...this.repeatingTransactions.filter((i) => i.guid !== n)
|
9759
9759
|
];
|
@@ -9772,7 +9772,7 @@ class Em {
|
|
9772
9772
|
(o) => o.guid === i.guid
|
9773
9773
|
);
|
9774
9774
|
if (a < 0) return;
|
9775
|
-
|
9775
|
+
ee(() => {
|
9776
9776
|
this.repeatingTransactions = [
|
9777
9777
|
...this.repeatingTransactions.slice(0, a),
|
9778
9778
|
...Fa(
|
@@ -10005,7 +10005,7 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10005
10005
|
] }),
|
10006
10006
|
/* @__PURE__ */ t(C, { sx: { flexGrow: 1, fontSize: 13 }, children: e.name }),
|
10007
10007
|
/* @__PURE__ */ t(
|
10008
|
-
|
10008
|
+
Xe,
|
10009
10009
|
{
|
10010
10010
|
amount: e.amount,
|
10011
10011
|
bold: !0,
|
@@ -10173,9 +10173,9 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10173
10173
|
}
|
10174
10174
|
], l = g.useMemo(() => s.map((u) => {
|
10175
10175
|
const _ = a.filter(
|
10176
|
-
da(u, { start:
|
10176
|
+
da(u, { start: xe(), end: Fn(xe(), 30) })
|
10177
10177
|
).reduce((p, f) => p + f.amount, 0), h = o.filter(
|
10178
|
-
da(u, { start:
|
10178
|
+
da(u, { start: xe(), end: Fn(xe(), 30) })
|
10179
10179
|
).reduce((p, f) => p + f.amount, 0), m = (u.balance || 0) + h - _;
|
10180
10180
|
return {
|
10181
10181
|
account: u,
|
@@ -10287,7 +10287,7 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10287
10287
|
),
|
10288
10288
|
/* @__PURE__ */ t(C, { variant: "Small", children: `${f} ${p ? `*${p}` : ""}` })
|
10289
10289
|
] }),
|
10290
|
-
/* @__PURE__ */ t(
|
10290
|
+
/* @__PURE__ */ t(Xe, { amount: u.balance, bold: !0, variant: "Small" })
|
10291
10291
|
]
|
10292
10292
|
}
|
10293
10293
|
),
|
@@ -10302,7 +10302,7 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10302
10302
|
py: 12,
|
10303
10303
|
children: [
|
10304
10304
|
/* @__PURE__ */ t(C, { variant: "Small", children: i.projected_income }),
|
10305
|
-
/* @__PURE__ */ t(
|
10305
|
+
/* @__PURE__ */ t(Xe, { amount: u.income, bold: !0, symbol: "+", variant: "Small" })
|
10306
10306
|
]
|
10307
10307
|
}
|
10308
10308
|
),
|
@@ -10317,7 +10317,7 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10317
10317
|
py: 12,
|
10318
10318
|
children: [
|
10319
10319
|
/* @__PURE__ */ t(C, { variant: "Small", children: i.projected_expenses }),
|
10320
|
-
/* @__PURE__ */ t(
|
10320
|
+
/* @__PURE__ */ t(Xe, { amount: u.expenses, bold: !0, symbol: "-", variant: "Small" })
|
10321
10321
|
]
|
10322
10322
|
}
|
10323
10323
|
),
|
@@ -10406,12 +10406,12 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10406
10406
|
padding: n ? "14px 16px" : 0,
|
10407
10407
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
10408
10408
|
children: [
|
10409
|
-
!n && /* @__PURE__ */ t(
|
10409
|
+
!n && /* @__PURE__ */ t(Xe, { amount: e, component: "h2", variant: "H2" }),
|
10410
10410
|
/* @__PURE__ */ d(b, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
10411
10411
|
/* @__PURE__ */ t(C, { bold: i, variant: "Small", children: a }),
|
10412
10412
|
r
|
10413
10413
|
] }),
|
10414
|
-
n && /* @__PURE__ */ t(
|
10414
|
+
n && /* @__PURE__ */ t(Xe, { amount: e, component: "h2", symbol: o, variant: "Small" })
|
10415
10415
|
]
|
10416
10416
|
}
|
10417
10417
|
), qr = (e, n) => (i) => i.accountGuid && e.includes(i.accountGuid) && (So(i.expectedDate) || sn(i.expectedDate, n.start)) && ot(i.expectedDate, n.end), Fm = () => {
|
@@ -10595,28 +10595,28 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10595
10595
|
transform: rotate(360deg);
|
10596
10596
|
}
|
10597
10597
|
`, Ym = () => {
|
10598
|
-
const { addRepeatingTransaction: e, repeatingTransactions: n } = rt(), { cashflow: i, common: a } = A(), { completeOnboarding: o } = Do(), { isDirty: r } = Ei(), { isMobile: s } = Ce(), { isCopyLoaded: c, setDisplayedDate: l } = re(), { filter: u, setFilter: _, transactions: h } = ke(), m = Te(), [p, f] = xt(!0), [S, y] = g.useState(Ee.EveryMonth), [E, I] = g.useState(1), [w, v] = g.useState(15), [N, R] = xt(!1), [M, k] = xt(1), [G, L] = xt([]), [W, Y] = xt(""),
|
10599
|
-
() => h.find((
|
10598
|
+
const { addRepeatingTransaction: e, repeatingTransactions: n } = rt(), { cashflow: i, common: a } = A(), { completeOnboarding: o } = Do(), { isDirty: r } = Ei(), { isMobile: s } = Ce(), { isCopyLoaded: c, setDisplayedDate: l } = re(), { filter: u, setFilter: _, transactions: h } = ke(), m = Te(), [p, f] = xt(!0), [S, y] = g.useState(Ee.EveryMonth), [E, I] = g.useState(1), [w, v] = g.useState(15), [N, R] = xt(!1), [M, k] = xt(1), [G, L] = xt([]), [W, Y] = xt(""), J = g.useMemo(
|
10599
|
+
() => h.find((ue) => ue.guid === W),
|
10600
10600
|
[W, h]
|
10601
|
-
),
|
10602
|
-
(
|
10601
|
+
), he = !!n.filter(
|
10602
|
+
(ue) => ue.repeating_transaction_type === cn.Income
|
10603
10603
|
).length, _e = async () => {
|
10604
10604
|
k(2), l(
|
10605
10605
|
// Beginning of the month, 90 days before today
|
10606
|
-
|
10607
|
-
|
10606
|
+
Ye(Ot(xe(), 90)),
|
10607
|
+
xe()
|
10608
10608
|
), _({ ...u, custom: Gi }), k(3);
|
10609
10609
|
}, Le = async () => {
|
10610
10610
|
if (!(G.length < 1)) {
|
10611
10611
|
R(!0);
|
10612
|
-
for (let
|
10613
|
-
const me = G[
|
10612
|
+
for (let ue = 0; ue < G.length; ue++) {
|
10613
|
+
const me = G[ue], Qe = no(S, Ve(me.date)), $ = {
|
10614
10614
|
account_guid: me.account_guid,
|
10615
10615
|
amount: me.amount,
|
10616
10616
|
merchant_guid: me.merchant_guid,
|
10617
10617
|
description: me.feed_description || me.description,
|
10618
|
-
predicted_occurs_on: fa(
|
10619
|
-
recurrence_day:
|
10618
|
+
predicted_occurs_on: fa(Qe, { representation: "date" }),
|
10619
|
+
recurrence_day: Qe.getDay(),
|
10620
10620
|
recurrence_type: S,
|
10621
10621
|
repeating_transaction_type: cn.Income,
|
10622
10622
|
transaction_type: me.transaction_type
|
@@ -10625,7 +10625,7 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10625
10625
|
}
|
10626
10626
|
await o();
|
10627
10627
|
}
|
10628
|
-
}, Re = !
|
10628
|
+
}, Re = !J && p || !J && G.length < 1;
|
10629
10629
|
return c ? /* @__PURE__ */ d(
|
10630
10630
|
O,
|
10631
10631
|
{
|
@@ -10667,14 +10667,14 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10667
10667
|
children: [
|
10668
10668
|
/* @__PURE__ */ t(Qt, { pb: 12, children: i.add_income_title }),
|
10669
10669
|
/* @__PURE__ */ t(X, { mb: 24, children: i.add_income_description }),
|
10670
|
-
G.length > 0 && !
|
10671
|
-
/* @__PURE__ */ t(ae, { children: G.map((
|
10670
|
+
G.length > 0 && !J && /* @__PURE__ */ d(Z, { children: [
|
10671
|
+
/* @__PURE__ */ t(ae, { children: G.map((ue, me) => /* @__PURE__ */ d(g.Fragment, { children: [
|
10672
10672
|
/* @__PURE__ */ t(Aa, { bgcolor: "background.paper", children: ya(
|
10673
|
-
We(
|
10673
|
+
We(ue.nextDate || ue.date)
|
10674
10674
|
) }),
|
10675
|
-
/* @__PURE__ */ t(Go, { transaction:
|
10675
|
+
/* @__PURE__ */ t(Go, { transaction: ue }),
|
10676
10676
|
me !== G.length - 1 && /* @__PURE__ */ t(P, {})
|
10677
|
-
] },
|
10677
|
+
] }, ue.guid)) }),
|
10678
10678
|
/* @__PURE__ */ d(b, { alignItems: "center", direction: "row", children: [
|
10679
10679
|
/* @__PURE__ */ t(P, { sx: { flexGrow: 1 } }),
|
10680
10680
|
/* @__PURE__ */ t(
|
@@ -10691,17 +10691,17 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10691
10691
|
Wc,
|
10692
10692
|
{
|
10693
10693
|
bgcolor: "background.paper",
|
10694
|
-
onSearch: (
|
10694
|
+
onSearch: (ue) => _({
|
10695
10695
|
...u,
|
10696
|
-
custom: (me) =>
|
10696
|
+
custom: (me) => ue ? Uc(me, ue) : Gi(me)
|
10697
10697
|
}),
|
10698
|
-
onSelected: (
|
10699
|
-
Y(
|
10698
|
+
onSelected: (ue) => {
|
10699
|
+
Y(ue), f(!1);
|
10700
10700
|
}
|
10701
10701
|
}
|
10702
10702
|
),
|
10703
|
-
!
|
10704
|
-
|
10703
|
+
!he && r && /* @__PURE__ */ t(X, { color: "error", mt: 16, children: i.confirm_error }),
|
10704
|
+
J && /* @__PURE__ */ d(Z, { children: [
|
10705
10705
|
/* @__PURE__ */ t(
|
10706
10706
|
$c,
|
10707
10707
|
{
|
@@ -10712,21 +10712,21 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10712
10712
|
onFrequencyChange: y,
|
10713
10713
|
onSecondDayChange: v,
|
10714
10714
|
secondDay: w,
|
10715
|
-
transaction:
|
10715
|
+
transaction: J
|
10716
10716
|
}
|
10717
10717
|
),
|
10718
10718
|
/* @__PURE__ */ d(b, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
10719
10719
|
/* @__PURE__ */ t(
|
10720
10720
|
te,
|
10721
10721
|
{
|
10722
|
-
"aria-disabled": !
|
10722
|
+
"aria-disabled": !J,
|
10723
10723
|
onClick: () => {
|
10724
|
-
const
|
10725
|
-
|
10726
|
-
...
|
10727
|
-
nextDate: no(S, Ve(
|
10724
|
+
const ue = [...G];
|
10725
|
+
ue.push({
|
10726
|
+
...J,
|
10727
|
+
nextDate: no(S, Ve(J.date)),
|
10728
10728
|
frequency: S
|
10729
|
-
}), L(
|
10729
|
+
}), L(ue), Y("");
|
10730
10730
|
},
|
10731
10731
|
variant: "contained",
|
10732
10732
|
children: a.confirm_button
|
@@ -10744,7 +10744,7 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10744
10744
|
)
|
10745
10745
|
] })
|
10746
10746
|
] }),
|
10747
|
-
G.length > 0 && !
|
10747
|
+
G.length > 0 && !J && /* @__PURE__ */ d(b, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
10748
10748
|
/* @__PURE__ */ t(
|
10749
10749
|
te,
|
10750
10750
|
{
|
@@ -10788,7 +10788,7 @@ const Om = ({ recurrence: e }) => /* @__PURE__ */ d(Z, { children: [
|
|
10788
10788
|
(R) => a.includes(R.guid) && v.includes(R.guid)
|
10789
10789
|
);
|
10790
10790
|
m(N), u({
|
10791
|
-
dateRange: { start: Ot(
|
10791
|
+
dateRange: { start: Ot(xe(), 90), end: pn() },
|
10792
10792
|
accounts: N.map((R) => R.guid)
|
10793
10793
|
});
|
10794
10794
|
}, [l, i]), !y || !E ? /* @__PURE__ */ t(ce, {}) : _?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ d(
|
@@ -10864,7 +10864,7 @@ class b2 {
|
|
10864
10864
|
}
|
10865
10865
|
let Zm = class {
|
10866
10866
|
// Cashflow is hard-coded to display 30 days starting from today
|
10867
|
-
dateRange = { start:
|
10867
|
+
dateRange = { start: xe(), end: Fn(xe(), 30) };
|
10868
10868
|
isDirty = !1;
|
10869
10869
|
nextIncome = void 0;
|
10870
10870
|
upcomingExpenses = [];
|
@@ -10874,13 +10874,13 @@ let Zm = class {
|
|
10874
10874
|
}
|
10875
10875
|
// Returns the number of days until the next income activity or 0 if there is no income activity
|
10876
10876
|
get daysUntilNextIncome() {
|
10877
|
-
return this.nextIncome ? Math.abs(Vd(
|
10877
|
+
return this.nextIncome ? Math.abs(Vd(xe(), this.nextIncome.expectedDate)) : 0;
|
10878
10878
|
}
|
10879
10879
|
// Returns the expenses (Activities) until the next income activity or the end of the month
|
10880
10880
|
// if there is no income activity
|
10881
10881
|
get expensesTilNextIncome() {
|
10882
10882
|
return this.upcomingExpenses.filter(
|
10883
|
-
(n) => ot(n.expectedDate, this.nextIncome?.expectedDate ||
|
10883
|
+
(n) => ot(n.expectedDate, this.nextIncome?.expectedDate || Ze(/* @__PURE__ */ new Date()))
|
10884
10884
|
);
|
10885
10885
|
}
|
10886
10886
|
setNextIncome = (n) => {
|
@@ -11381,7 +11381,7 @@ const Sn = () => {
|
|
11381
11381
|
return isNaN(i) ? 0 : i;
|
11382
11382
|
}, Ko = (e, n) => {
|
11383
11383
|
const i = [];
|
11384
|
-
let a =
|
11384
|
+
let a = Ye(n?.start ?? Ht(/* @__PURE__ */ new Date(), 5));
|
11385
11385
|
const o = n?.end ?? /* @__PURE__ */ new Date();
|
11386
11386
|
for (; ot(a, o); )
|
11387
11387
|
i.push({
|
@@ -11402,8 +11402,8 @@ const Sn = () => {
|
|
11402
11402
|
const n = [], i = e.filter(
|
11403
11403
|
(r) => r.top_level_category_guid !== D.INCOME && r.top_level_category_guid !== D.TRANSFER && r.total > 0
|
11404
11404
|
);
|
11405
|
-
let a =
|
11406
|
-
const o =
|
11405
|
+
let a = Ye(Ht(/* @__PURE__ */ new Date(), 5));
|
11406
|
+
const o = Ze(/* @__PURE__ */ new Date());
|
11407
11407
|
for (; ot(a, o); )
|
11408
11408
|
n.push({
|
11409
11409
|
x: de(a, ie.MONTH_SHORT),
|
@@ -11428,7 +11428,7 @@ const Sn = () => {
|
|
11428
11428
|
}
|
11429
11429
|
return c;
|
11430
11430
|
}, dp = () => {
|
11431
|
-
const e =
|
11431
|
+
const e = je(), { selectedAccount: n } = Vt(), { monthlyCategoryTotals: i } = Ue(), { trends: a } = A(), o = [e.palette.chart?.chart1, e.palette.chart?.chart2], r = cp(i, n.account_type), s = lp(r, n.account_type, a), c = [le.LOAN, le.MORTGAGE].includes(n.account_type);
|
11432
11432
|
return /* @__PURE__ */ t("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ t(
|
11433
11433
|
ni,
|
11434
11434
|
{
|
@@ -11462,7 +11462,7 @@ const Sn = () => {
|
|
11462
11462
|
_n,
|
11463
11463
|
{
|
11464
11464
|
sx: { pb: 0 },
|
11465
|
-
title: /* @__PURE__ */ t(
|
11465
|
+
title: /* @__PURE__ */ t(qe, { sx: { pb: 4 }, children: de(/* @__PURE__ */ new Date(), ie.MONTH_LONG) })
|
11466
11466
|
}
|
11467
11467
|
),
|
11468
11468
|
/* @__PURE__ */ t(Pt, { sx: { p: 0 }, children: /* @__PURE__ */ t(_p, {}) })
|
@@ -11520,7 +11520,7 @@ const qc = ({
|
|
11520
11520
|
onClickArea: r,
|
11521
11521
|
onHoverArea: s
|
11522
11522
|
}) => {
|
11523
|
-
const c =
|
11523
|
+
const c = je(), { onEvent: l } = q(), u = a.filter((v) => !v.is_impossible), _ = [
|
11524
11524
|
...new Set(
|
11525
11525
|
u.flatMap((v) => v.dataset.map((N) => new Date(N.x).getTime()))
|
11526
11526
|
)
|
@@ -11645,7 +11645,7 @@ const qc = ({
|
|
11645
11645
|
}
|
11646
11646
|
},
|
11647
11647
|
children: [
|
11648
|
-
/* @__PURE__ */ t(_n, { sx: { pb: 0 }, title: /* @__PURE__ */ t(
|
11648
|
+
/* @__PURE__ */ t(_n, { sx: { pb: 0 }, title: /* @__PURE__ */ t(qe, { sx: { pb: 4 }, children: n.details_chart_title }) }),
|
11649
11649
|
/* @__PURE__ */ t(Pt, { sx: { p: 0 }, children: /* @__PURE__ */ t(qc, { debts: [i], height: 250 }) })
|
11650
11650
|
]
|
11651
11651
|
}
|
@@ -12474,9 +12474,9 @@ const zt = (e) => /* @__PURE__ */ t(C, { fontWeight: 600, variant: "Small", chil
|
|
12474
12474
|
const L = (_e) => u(_e), W = () => {
|
12475
12475
|
const _e = v.find((Re) => Re.guid === l), Le = G.find((Re) => Re.guid === l);
|
12476
12476
|
_e && E(_e), Le && w(Le), a(!0);
|
12477
|
-
}, Y = () => p(F.DEBTS_CLICK_FILTER),
|
12477
|
+
}, Y = () => p(F.DEBTS_CLICK_FILTER), J = () => {
|
12478
12478
|
c(!0), p(F.DEBTS_CLICK_SNOWBALL_CTA);
|
12479
|
-
},
|
12479
|
+
}, he = () => {
|
12480
12480
|
r(!0), p(F.DEBTS_CLICK_PAYDOWN);
|
12481
12481
|
};
|
12482
12482
|
return !N || !f || !S ? /* @__PURE__ */ t(ce, {}) : /* @__PURE__ */ d(
|
@@ -12485,7 +12485,7 @@ const zt = (e) => /* @__PURE__ */ t(C, { fontWeight: 600, variant: "Small", chil
|
|
12485
12485
|
accountOptions: v,
|
12486
12486
|
actions: [
|
12487
12487
|
/* @__PURE__ */ t(Up, {}, "prioritize-debts"),
|
12488
|
-
/* @__PURE__ */ t(Kp, { onClick:
|
12488
|
+
/* @__PURE__ */ t(Kp, { onClick: he }, "extra-paydown")
|
12489
12489
|
],
|
12490
12490
|
onAccountsFilterClick: Y,
|
12491
12491
|
onBackClick: e,
|
@@ -12517,7 +12517,7 @@ const zt = (e) => /* @__PURE__ */ t(C, { fontWeight: 600, variant: "Small", chil
|
|
12517
12517
|
ep,
|
12518
12518
|
{
|
12519
12519
|
debts: G,
|
12520
|
-
onClickCta:
|
12520
|
+
onClickCta: J,
|
12521
12521
|
sx: { mb: h ? "0px" : "64px" }
|
12522
12522
|
}
|
12523
12523
|
)
|
@@ -12742,7 +12742,7 @@ const qp = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(O, { sx: { bgcolor
|
|
12742
12742
|
unitsPerSegment: h,
|
12743
12743
|
isFinacialStrengthGraph: m
|
12744
12744
|
}) => {
|
12745
|
-
const p =
|
12745
|
+
const p = je(), f = [
|
12746
12746
|
{ offset: "13.62%", color: p.palette.chartMono.chartMono2 },
|
12747
12747
|
{ offset: "36.67%", color: p.palette.chartMono.chartMono3 },
|
12748
12748
|
{ offset: "59.72%", color: p.palette.chartMono.chartMono4 },
|
@@ -12796,7 +12796,7 @@ const qp = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(O, { sx: { bgcolor
|
|
12796
12796
|
footerRightContent: _,
|
12797
12797
|
isFinacialStrengthGraph: h = !1
|
12798
12798
|
}) => {
|
12799
|
-
const m =
|
12799
|
+
const m = je(), p = -Math.PI / 1.35, f = Math.PI / 1.35, S = f - p, y = S / (r - o), E = (n - o) * y, I = p + E + 0.02, w = i !== "SM" ? 0.1 : 0.12, v = e, N = e * (1 - w), R = v * 2.5, M = R / 2, k = R / 2, G = (N + v) / 2, L = n !== 25 && n !== 50 && n !== 75 && n !== 100 ? 0 : 0.12, [W, Y] = t1(G, I, L), J = n / 25, he = {
|
12800
12800
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
12801
12801
|
M: { markerSize: 10, healthScoreFontSize: 48 },
|
12802
12802
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
@@ -12847,7 +12847,7 @@ const qp = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(O, { sx: { bgcolor
|
|
12847
12847
|
outterArcRadius: v,
|
12848
12848
|
progressEndAngle: I,
|
12849
12849
|
totalAngularSpan: S,
|
12850
|
-
unitsPerSegment:
|
12850
|
+
unitsPerSegment: J
|
12851
12851
|
}
|
12852
12852
|
)
|
12853
12853
|
},
|
@@ -12863,7 +12863,7 @@ const qp = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(O, { sx: { bgcolor
|
|
12863
12863
|
cx: M + W,
|
12864
12864
|
cy: k + Y,
|
12865
12865
|
fill: m.palette.common.white,
|
12866
|
-
r:
|
12866
|
+
r: he[i].markerSize,
|
12867
12867
|
stroke: h ? "url(#arcGradient)" : s,
|
12868
12868
|
strokeWidth: i !== "SM" ? 3 : 1
|
12869
12869
|
}
|
@@ -12890,7 +12890,7 @@ const qp = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(O, { sx: { bgcolor
|
|
12890
12890
|
X,
|
12891
12891
|
{
|
12892
12892
|
sx: {
|
12893
|
-
fontSize:
|
12893
|
+
fontSize: he[i].healthScoreFontSize,
|
12894
12894
|
lineHeight: i !== "SM" ? "48px" : "100%"
|
12895
12895
|
},
|
12896
12896
|
variant: "H1",
|
@@ -12989,7 +12989,7 @@ const qp = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(O, { sx: { bgcolor
|
|
12989
12989
|
minValue: o = 300,
|
12990
12990
|
footerCenterContent: r
|
12991
12991
|
}) => {
|
12992
|
-
const c =
|
12992
|
+
const c = je().palette.mode === "dark", l = [
|
12993
12993
|
{
|
12994
12994
|
id: 1,
|
12995
12995
|
label: "Poor",
|
@@ -13082,7 +13082,7 @@ class r1 {
|
|
13082
13082
|
let i = 0;
|
13083
13083
|
await this.loadHealthScoreChangeReports();
|
13084
13084
|
const a = n?.health_score || 0, o = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
|
13085
|
-
i = a - o,
|
13085
|
+
i = a - o, ee(() => {
|
13086
13086
|
this.healthScore = n, this.healthScoreChange = i;
|
13087
13087
|
});
|
13088
13088
|
} catch (n) {
|
@@ -13092,7 +13092,7 @@ class r1 {
|
|
13092
13092
|
loadAverageHealthScores = async () => {
|
13093
13093
|
try {
|
13094
13094
|
const n = await this.api.getAverageHealthScores();
|
13095
|
-
|
13095
|
+
ee(() => {
|
13096
13096
|
this.averageHealthScores = n;
|
13097
13097
|
});
|
13098
13098
|
} catch (n) {
|
@@ -13106,7 +13106,7 @@ class r1 {
|
|
13106
13106
|
n,
|
13107
13107
|
i
|
13108
13108
|
);
|
13109
|
-
|
13109
|
+
ee(() => {
|
13110
13110
|
this.healthScoreChangeReports = a;
|
13111
13111
|
});
|
13112
13112
|
} catch (a) {
|
@@ -13117,7 +13117,7 @@ class r1 {
|
|
13117
13117
|
const n = Ln(Ve(this.globalStore.appDataStore.user.birthday), "yyyy");
|
13118
13118
|
try {
|
13119
13119
|
const i = await this.api.getPeerScore(n);
|
13120
|
-
|
13120
|
+
ee(() => {
|
13121
13121
|
this.peerScore = i;
|
13122
13122
|
});
|
13123
13123
|
} catch (i) {
|
@@ -13127,7 +13127,7 @@ class r1 {
|
|
13127
13127
|
loadAugmentedChartData = async () => {
|
13128
13128
|
try {
|
13129
13129
|
const n = await this.api.getAverageHealthScores();
|
13130
|
-
|
13130
|
+
ee(() => {
|
13131
13131
|
this.augmentedChartData = o1(n);
|
13132
13132
|
});
|
13133
13133
|
} catch (n) {
|
@@ -13164,7 +13164,7 @@ const Na = ({
|
|
13164
13164
|
},
|
13165
13165
|
children: [
|
13166
13166
|
n && /* @__PURE__ */ t(co, { sx: { height: 20, width: 20 } }),
|
13167
|
-
/* @__PURE__ */ t(
|
13167
|
+
/* @__PURE__ */ t(qe, { className: "connect-more-accounts-title", sx: { ...e && { fontSize: 15 } }, children: a || u.connect_more_accounts_title })
|
13168
13168
|
]
|
13169
13169
|
}
|
13170
13170
|
),
|
@@ -13199,7 +13199,7 @@ const Na = ({
|
|
13199
13199
|
}
|
13200
13200
|
);
|
13201
13201
|
}, s1 = x(() => {
|
13202
|
-
const e =
|
13202
|
+
const e = je(), [n, { width: i }] = ii(), { finstrong: a } = A(), { isCopyLoaded: o, isInitialized: r } = re(), { healthScore: s, healthScoreChange: c } = bi(), l = e.palette.mode === "dark", u = Xo(s?.health_score, a);
|
13203
13203
|
return !o || !r ? /* @__PURE__ */ t(ce, {}) : /* @__PURE__ */ d(bt, { ref: n, sx: { p: 16 }, children: [
|
13204
13204
|
/* @__PURE__ */ t(
|
13205
13205
|
_n,
|
@@ -13218,7 +13218,7 @@ const Na = ({
|
|
13218
13218
|
children: a.financial_strength_header_action
|
13219
13219
|
}
|
13220
13220
|
),
|
13221
|
-
subheader: /* @__PURE__ */ t(
|
13221
|
+
subheader: /* @__PURE__ */ t(qe, { color: "text.primary", children: a.financial_strength_header }),
|
13222
13222
|
sx: {
|
13223
13223
|
p: 0,
|
13224
13224
|
"& .MuiCardHeader-content": {
|
@@ -13295,7 +13295,7 @@ const Na = ({
|
|
13295
13295
|
title: i
|
13296
13296
|
}) => {
|
13297
13297
|
let a;
|
13298
|
-
const { refreshAccounts: o } = Se(), { loadWidget: r } = bc(), { connect: s } = A(), c =
|
13298
|
+
const { refreshAccounts: o } = Se(), { loadWidget: r } = bc(), { connect: s } = A(), c = je(), [l, u] = g.useState(!1), [_, h] = g.useState(!1);
|
13299
13299
|
return g.useEffect(() => (n ? (u(!0), r({ widget: "connections_widget", mode: c.palette.mode }).then((m) => {
|
13300
13300
|
a = new Hd({
|
13301
13301
|
container: `#${Nr}`,
|
@@ -13368,7 +13368,7 @@ const Na = ({
|
|
13368
13368
|
}
|
13369
13369
|
);
|
13370
13370
|
}, d1 = x(l1), _1 = ({ isOpen: e, onClose: n }) => {
|
13371
|
-
const { finstrong: i } = A(), a =
|
13371
|
+
const { finstrong: i } = A(), a = je(), { updateUser: o, user: r } = ft(), [s, c] = g.useState(r.birthday), l = (_) => {
|
13372
13372
|
c(Math.floor(new Date(_).getTime() / 1e3));
|
13373
13373
|
};
|
13374
13374
|
return /* @__PURE__ */ t(
|
@@ -13479,7 +13479,7 @@ const Na = ({
|
|
13479
13479
|
return /* @__PURE__ */ d(se, { isOpen: e, onClose: n, title: s.financial_profile, children: [
|
13480
13480
|
/* @__PURE__ */ d(b, { sx: { gap: 20, p: 24 }, children: [
|
13481
13481
|
/* @__PURE__ */ d(b, { sx: { gap: 8 }, children: [
|
13482
|
-
/* @__PURE__ */ t(
|
13482
|
+
/* @__PURE__ */ t(qe, { children: s.your_financial_profile }),
|
13483
13483
|
/* @__PURE__ */ t(X, { children: s.financial_profile_description })
|
13484
13484
|
] }),
|
13485
13485
|
/* @__PURE__ */ t(
|
@@ -13812,7 +13812,7 @@ const Na = ({
|
|
13812
13812
|
const { finstrong: u } = A(), { isCopyLoaded: _ } = re();
|
13813
13813
|
return _ ? /* @__PURE__ */ d(se, { isOpen: o, onClose: s, title: a || u.key_indicators, children: [
|
13814
13814
|
(l || i) && /* @__PURE__ */ d(b, { sx: { p: 24, pb: 0, gap: 8, backgroundColor: "background.paper" }, children: [
|
13815
|
-
l && /* @__PURE__ */ t(
|
13815
|
+
l && /* @__PURE__ */ t(qe, { children: l }),
|
13816
13816
|
i && /* @__PURE__ */ t(X, { children: i })
|
13817
13817
|
] }),
|
13818
13818
|
c && /* @__PURE__ */ t(
|
@@ -13931,7 +13931,7 @@ const Na = ({
|
|
13931
13931
|
) })
|
13932
13932
|
] }) });
|
13933
13933
|
}, T1 = x(E1), A1 = ({ isOpen: e, onClose: n }) => {
|
13934
|
-
const i =
|
13934
|
+
const i = je(), { finstrong: a } = A(), { isCopyLoaded: o, isInitialized: r } = re(), { healthScore: s, healthScoreChangeReports: c, augmentedChartData: l } = bi();
|
13935
13935
|
if (!o || !r) return /* @__PURE__ */ t(ce, {});
|
13936
13936
|
const u = Xo(s.health_score || 0, a), _ = c.slice().reverse();
|
13937
13937
|
return /* @__PURE__ */ t(
|
@@ -13987,7 +13987,7 @@ const Na = ({
|
|
13987
13987
|
return i ? /* @__PURE__ */ d(b, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
13988
13988
|
/* @__PURE__ */ t(Ys, { size: 48 }),
|
13989
13989
|
/* @__PURE__ */ d(b, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
13990
|
-
/* @__PURE__ */ t(
|
13990
|
+
/* @__PURE__ */ t(qe, { children: n.missing_data_title }),
|
13991
13991
|
/* @__PURE__ */ t(X, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: n.missing_data_description })
|
13992
13992
|
] }),
|
13993
13993
|
/* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(
|
@@ -14008,7 +14008,7 @@ const Na = ({
|
|
14008
14008
|
) })
|
14009
14009
|
] }) : /* @__PURE__ */ t(ce, {});
|
14010
14010
|
}, w1 = x(I1), v1 = ({ onBackClick: e, sx: n }) => {
|
14011
|
-
const i =
|
14011
|
+
const i = je(), { visibleAccounts: a } = Se(), { dateRange: o, isDataLoaded: r, loadBudgetData: s, setTheme: c } = ut(), { reloadCategoryTotals: l } = Ue(), { augmentedChartData: u, calculateHealthScore: _, healthScore: h, loadAugmentedChartData: m } = bi(), { finstrong: p, connect: f } = A(), { isCopyLoaded: S, isInitialized: y, selectedAccounts: E, setSelectedAccounts: I } = re(), { isMobile: w } = Ce(), [v, N] = g.useState(!1);
|
14012
14012
|
g.useEffect(() => {
|
14013
14013
|
c(i);
|
14014
14014
|
}, []), g.useEffect(() => I(a), [a]), g.useEffect(() => {
|
@@ -14060,7 +14060,7 @@ const Na = ({
|
|
14060
14060
|
] }),
|
14061
14061
|
/* @__PURE__ */ t(b, { sx: { maxWidth: 848, minWidth: 288, width: { md: 720 } }, children: /* @__PURE__ */ d(bt, { sx: { background: i.palette.background.paper, p: 16 }, children: [
|
14062
14062
|
/* @__PURE__ */ d(b, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
14063
|
-
/* @__PURE__ */ t(
|
14063
|
+
/* @__PURE__ */ t(qe, { children: p.key_indicators }),
|
14064
14064
|
/* @__PURE__ */ t(
|
14065
14065
|
te,
|
14066
14066
|
{
|
@@ -14473,7 +14473,7 @@ const N1 = (e, n) => {
|
|
14473
14473
|
title: _,
|
14474
14474
|
children: /* @__PURE__ */ d(b, { children: [
|
14475
14475
|
/* @__PURE__ */ d(b, { m: 24, children: [
|
14476
|
-
/* @__PURE__ */ t(
|
14476
|
+
/* @__PURE__ */ t(qe, { children: h }),
|
14477
14477
|
/* @__PURE__ */ t(X, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: m })
|
14478
14478
|
] }),
|
14479
14479
|
/* @__PURE__ */ t(O1, { trackType: e }),
|
@@ -15042,8 +15042,8 @@ const N1 = (e, n) => {
|
|
15042
15042
|
return n.filter((W) => L.some((Y) => Y.account_guid === W.guid));
|
15043
15043
|
}, [E, n, l, u]), v = g.useMemo(() => {
|
15044
15044
|
if (!_) return !1;
|
15045
|
-
const { account_guid: L, track_type: W, name: Y, amount:
|
15046
|
-
return W === z.SAVINGS_TRACK ? L ? !!Y && !!
|
15045
|
+
const { account_guid: L, track_type: W, name: Y, amount: J, retirement_age: he } = _;
|
15046
|
+
return W === z.SAVINGS_TRACK ? L ? !!Y && !!J : !1 : W === z.RETIREMENT_TRACK ? w.length ? !!Y && !!J && !!he && !!f.birthday : !1 : !0;
|
15047
15047
|
}, [_, w, f.birthday]);
|
15048
15048
|
let N = a.delete_button, R = () => y(!0);
|
15049
15049
|
E ? (R = () => M(), N = a.save_button) : I && (R = () => G(), N = i.mark_as_complete_button);
|
@@ -15112,9 +15112,9 @@ const N1 = (e, n) => {
|
|
15112
15112
|
i(F.GOALS_CLICK_FILTER);
|
15113
15113
|
}, Y = () => {
|
15114
15114
|
v(!0), i(F.GOALS_CLICK_ADD);
|
15115
|
-
},
|
15115
|
+
}, J = (_e) => {
|
15116
15116
|
v(!1), _e === z.SAVINGS_TRACK ? I(0) : _e === z.DEBT_TRACK ? I(1) : _e === z.RETIREMENT_TRACK && I(2);
|
15117
|
-
},
|
15117
|
+
}, he = g.useMemo(
|
15118
15118
|
() => m && (h.length === 0 || h.every(({ track_type: _e }) => !_e) && y.length === 0),
|
15119
15119
|
[h, m, y]
|
15120
15120
|
);
|
@@ -15141,34 +15141,34 @@ const N1 = (e, n) => {
|
|
15141
15141
|
onChange: (_e, Le) => I(Le),
|
15142
15142
|
sx: { bgcolor: "background.paper" },
|
15143
15143
|
textColor: "primary",
|
15144
|
-
value:
|
15144
|
+
value: he ? !1 : E,
|
15145
15145
|
variant: "fullWidth",
|
15146
15146
|
children: [
|
15147
15147
|
/* @__PURE__ */ t(
|
15148
15148
|
tt,
|
15149
15149
|
{
|
15150
|
-
disabled:
|
15150
|
+
disabled: he,
|
15151
15151
|
label: /* @__PURE__ */ t(Wa, { subtitle: k, title: l.tab_saving_title })
|
15152
15152
|
}
|
15153
15153
|
),
|
15154
15154
|
/* @__PURE__ */ t(
|
15155
15155
|
tt,
|
15156
15156
|
{
|
15157
|
-
disabled:
|
15157
|
+
disabled: he,
|
15158
15158
|
label: /* @__PURE__ */ t(Wa, { subtitle: G, title: l.tab_debt_title })
|
15159
15159
|
}
|
15160
15160
|
),
|
15161
15161
|
/* @__PURE__ */ t(
|
15162
15162
|
tt,
|
15163
15163
|
{
|
15164
|
-
disabled:
|
15164
|
+
disabled: he,
|
15165
15165
|
label: /* @__PURE__ */ t(Wa, { subtitle: L, title: l.tab_retirement_title })
|
15166
15166
|
}
|
15167
15167
|
)
|
15168
15168
|
]
|
15169
15169
|
}
|
15170
15170
|
),
|
15171
|
-
|
15171
|
+
he ? /* @__PURE__ */ t(
|
15172
15172
|
jn,
|
15173
15173
|
{
|
15174
15174
|
header: l.create_goals_header,
|
@@ -15189,7 +15189,7 @@ const N1 = (e, n) => {
|
|
15189
15189
|
E === 2 && /* @__PURE__ */ t($a, { onAddGoals: Y, trackType: z.RETIREMENT_TRACK })
|
15190
15190
|
] })
|
15191
15191
|
] }),
|
15192
|
-
/* @__PURE__ */ t(z1, { onClose:
|
15192
|
+
/* @__PURE__ */ t(z1, { onClose: J }),
|
15193
15193
|
/* @__PURE__ */ t(
|
15194
15194
|
se,
|
15195
15195
|
{
|
@@ -15197,7 +15197,7 @@ const N1 = (e, n) => {
|
|
15197
15197
|
isOpen: w,
|
15198
15198
|
onClose: () => v(!1),
|
15199
15199
|
title: l.add_goal_title,
|
15200
|
-
children: /* @__PURE__ */ t(H1, { onClose:
|
15200
|
+
children: /* @__PURE__ */ t(H1, { onClose: J })
|
15201
15201
|
}
|
15202
15202
|
),
|
15203
15203
|
/* @__PURE__ */ t(Wi, { onClose: () => S(""), open: !!_, children: /* @__PURE__ */ t(Mn, { onClose: () => S(""), severity: "success", variant: "filled", children: _ }) })
|
@@ -15246,7 +15246,7 @@ class Y1 {
|
|
15246
15246
|
addGoal = async (n) => {
|
15247
15247
|
try {
|
15248
15248
|
const i = await this.api.addGoal(n);
|
15249
|
-
|
15249
|
+
ee(() => {
|
15250
15250
|
this.goals = [...this.goals, i];
|
15251
15251
|
});
|
15252
15252
|
} catch (i) {
|
@@ -15264,7 +15264,7 @@ class Y1 {
|
|
15264
15264
|
});
|
15265
15265
|
o.push(s);
|
15266
15266
|
}
|
15267
|
-
this.setNewRetirementGoalAccounts([]),
|
15267
|
+
this.setNewRetirementGoalAccounts([]), ee(() => {
|
15268
15268
|
this.goals = [
|
15269
15269
|
...this.goals,
|
15270
15270
|
{
|
@@ -15282,7 +15282,7 @@ class Y1 {
|
|
15282
15282
|
addRetirementGoalAccount = async (n) => {
|
15283
15283
|
try {
|
15284
15284
|
const i = await this.api.addRetirementGoalAccount(n);
|
15285
|
-
|
15285
|
+
ee(() => {
|
15286
15286
|
this.retirementGoalAccounts = [...this.retirementGoalAccounts, i];
|
15287
15287
|
});
|
15288
15288
|
} catch (i) {
|
@@ -15301,7 +15301,7 @@ class Y1 {
|
|
15301
15301
|
track_type: z.RETIREMENT_TRACK
|
15302
15302
|
}))
|
15303
15303
|
];
|
15304
|
-
|
15304
|
+
ee(() => {
|
15305
15305
|
this.goals = s, this.retirementGoalAccounts = o, this.monthlyCashFlowProfile = r, this.goalsLoaded = !0;
|
15306
15306
|
});
|
15307
15307
|
} catch (i) {
|
@@ -15310,7 +15310,7 @@ class Y1 {
|
|
15310
15310
|
};
|
15311
15311
|
deleteGoal = async (n) => {
|
15312
15312
|
try {
|
15313
|
-
await this.api.removeGoal(n),
|
15313
|
+
await this.api.removeGoal(n), ee(() => {
|
15314
15314
|
const i = this.goals.findIndex((a) => a.guid === n);
|
15315
15315
|
i >= 0 && this.goals.splice(i, 1);
|
15316
15316
|
});
|
@@ -15325,7 +15325,7 @@ class Y1 {
|
|
15325
15325
|
);
|
15326
15326
|
for (const a of i)
|
15327
15327
|
await this.deleteRetirementGoalAccount(a.guid);
|
15328
|
-
await this.api.removeRetirementGoal(n.guid),
|
15328
|
+
await this.api.removeRetirementGoal(n.guid), ee(() => {
|
15329
15329
|
const a = this.goals.findIndex((o) => o.guid === n.guid);
|
15330
15330
|
a >= 0 && this.goals.splice(a, 1);
|
15331
15331
|
});
|
@@ -15335,7 +15335,7 @@ class Y1 {
|
|
15335
15335
|
};
|
15336
15336
|
deleteRetirementGoalAccount = async (n) => {
|
15337
15337
|
try {
|
15338
|
-
await this.api.removeRetirementGoalAccount(n),
|
15338
|
+
await this.api.removeRetirementGoalAccount(n), ee(() => {
|
15339
15339
|
const i = this.retirementGoalAccounts.findIndex((a) => a.guid === n);
|
15340
15340
|
i >= 0 && this.retirementGoalAccounts.splice(i, 1);
|
15341
15341
|
});
|
@@ -15346,7 +15346,7 @@ class Y1 {
|
|
15346
15346
|
reorderGoals = async (n) => {
|
15347
15347
|
try {
|
15348
15348
|
const i = await this.api.reorderGoals(n);
|
15349
|
-
|
15349
|
+
ee(() => {
|
15350
15350
|
for (const a of i) {
|
15351
15351
|
const o = this.goals.findIndex((r) => r.guid === a.guid);
|
15352
15352
|
o >= 0 && (this.goals[o].position = a.position);
|
@@ -15364,7 +15364,7 @@ class Y1 {
|
|
15364
15364
|
updateGoal = async (n) => {
|
15365
15365
|
try {
|
15366
15366
|
const i = await this.api.updateGoal(n);
|
15367
|
-
|
15367
|
+
ee(() => {
|
15368
15368
|
const a = this.goals.findIndex((o) => o.guid === n.guid);
|
15369
15369
|
a >= 0 && (this.goals[a] = i), this.selectedGoal?.guid === n.guid && this.setSelectedGoal(i);
|
15370
15370
|
});
|
@@ -15375,7 +15375,7 @@ class Y1 {
|
|
15375
15375
|
updateMonthlyCashFlowProfile = async (n) => {
|
15376
15376
|
try {
|
15377
15377
|
const i = await this.api.updateMonthlyCashFlowProfile(n);
|
15378
|
-
|
15378
|
+
ee(() => {
|
15379
15379
|
this.monthlyCashFlowProfile = i;
|
15380
15380
|
});
|
15381
15381
|
} catch (i) {
|
@@ -15993,7 +15993,7 @@ class gf {
|
|
15993
15993
|
loadHoldings = async () => {
|
15994
15994
|
try {
|
15995
15995
|
const n = await this.api.getHoldings();
|
15996
|
-
|
15996
|
+
ee(() => {
|
15997
15997
|
this.holdings = [...n], this.holdingsLoaded = !0;
|
15998
15998
|
});
|
15999
15999
|
} catch (n) {
|
@@ -16009,7 +16009,7 @@ class gf {
|
|
16009
16009
|
const i = await this.api.updateHoldings(n), a = this.holdings.findIndex(({ guid: o }) => o === n.guid);
|
16010
16010
|
if (a >= 0) {
|
16011
16011
|
const o = [...this.holdings];
|
16012
|
-
o[a] = i,
|
16012
|
+
o[a] = i, ee(() => {
|
16013
16013
|
this.holdings = o, this.holdingsLoaded = !0;
|
16014
16014
|
});
|
16015
16015
|
}
|
@@ -16098,13 +16098,13 @@ class Cf {
|
|
16098
16098
|
loadMerchants = async (n = "") => {
|
16099
16099
|
this.isLoading = !0;
|
16100
16100
|
const i = await this.api.getMerchants([n]);
|
16101
|
-
|
16101
|
+
ee(() => {
|
16102
16102
|
this.merchants = i, this.isLoading = !1;
|
16103
16103
|
});
|
16104
16104
|
};
|
16105
16105
|
loadMerchantByGuid = async (n) => {
|
16106
16106
|
const i = await this.api.getMerchantByGuid(n);
|
16107
|
-
|
16107
|
+
ee(() => this.merchant = i);
|
16108
16108
|
};
|
16109
16109
|
}
|
16110
16110
|
const bf = ({
|
@@ -16115,7 +16115,7 @@ const bf = ({
|
|
16115
16115
|
onMouseLeave: o,
|
16116
16116
|
selectedData: r
|
16117
16117
|
}) => {
|
16118
|
-
const { isMobile: s } = Ce(), { availableWidth: c } = $n(), l =
|
16118
|
+
const { isMobile: s } = Ce(), { availableWidth: c } = $n(), l = je(), u = c - 320, _ = e.map((f) => ({
|
16119
16119
|
x: de(Ve(f.x), ie.MONTH_SHORT),
|
16120
16120
|
y: f.y
|
16121
16121
|
})), h = r ? { index: e.findIndex((f) => f.x === r.x) } : void 0, m = n ? { index: e.findIndex((f) => f.x === n.x) } : void 0, p = (f) => ({
|
@@ -16175,7 +16175,7 @@ const bf = ({
|
|
16175
16175
|
{
|
16176
16176
|
primary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
16177
16177
|
/* @__PURE__ */ t(C, { variant: "Body", children: fc(e.x) }),
|
16178
|
-
/* @__PURE__ */ t(
|
16178
|
+
/* @__PURE__ */ t(Xe, { amount: e.y, sx: { color: "inherit" }, variant: "Body" })
|
16179
16179
|
] })
|
16180
16180
|
}
|
16181
16181
|
)
|
@@ -16194,7 +16194,7 @@ const bf = ({
|
|
16194
16194
|
onMouseLeave: r,
|
16195
16195
|
selectedData: s
|
16196
16196
|
}) => {
|
16197
|
-
const { net_worth: c } = A(), l =
|
16197
|
+
const { net_worth: c } = A(), l = je(), u = (_) => {
|
16198
16198
|
const h = _.x === n?.x, m = _.x === s?.x, p = {
|
16199
16199
|
backgroundColor: "inherit",
|
16200
16200
|
borderBottom: "inherit",
|
@@ -16249,14 +16249,14 @@ const bf = ({
|
|
16249
16249
|
}
|
16250
16250
|
}
|
16251
16251
|
),
|
16252
|
-
/* @__PURE__ */ t(
|
16252
|
+
/* @__PURE__ */ t(Xe, { amount: a.change, color: s, variant: n }),
|
16253
16253
|
/* @__PURE__ */ t(C, { variant: "Small", children: e })
|
16254
16254
|
] });
|
16255
16255
|
}, Jo = x(xf), If = ({ hoveredData: e, selectedData: n }) => {
|
16256
|
-
const { net_worth: i } = A(), a =
|
16256
|
+
const { net_worth: i } = A(), a = je(), o = e || n, r = ec(ci(o.x), "MMMM");
|
16257
16257
|
return /* @__PURE__ */ d(b, { alignItems: "center", direction: "column", m: 24, children: [
|
16258
16258
|
/* @__PURE__ */ t(C, { color: a.palette.secondary.main, variant: "Small", children: `${r} ${i.net_worth}` }),
|
16259
|
-
/* @__PURE__ */ t(
|
16259
|
+
/* @__PURE__ */ t(Xe, { amount: o.y, variant: "H2" }),
|
16260
16260
|
/* @__PURE__ */ t(Jo, { currencyLabel: i.this_month, netWorth: o, theme: a })
|
16261
16261
|
] });
|
16262
16262
|
}, wf = x(If), gl = 13, vf = (e, n) => e.filter((i) => {
|
@@ -16265,7 +16265,7 @@ const bf = ({
|
|
16265
16265
|
}), Df = (e, n) => [...e, ...n], _s = (e) => {
|
16266
16266
|
if (e && e.length > 0)
|
16267
16267
|
return e[e.length - 1];
|
16268
|
-
}, Nf = (e, n) => e.year_month - n.year_month, Rf = () => Array.from({ length: gl }, (e, n) => Math.floor(
|
16268
|
+
}, Nf = (e, n) => e.year_month - n.year_month, Rf = () => Array.from({ length: gl }, (e, n) => Math.floor(Ye(Ht(/* @__PURE__ */ new Date(), n)).getTime() / 1e3)).sort(), Of = (e, n, i) => !e.length || !n.length ? [] : Rf().reduceRight((o, r) => {
|
16269
16269
|
const s = n.filter(
|
16270
16270
|
({ year_month: _ }) => _ === parseInt(Ln(Ve(r), "yyyyMM"))
|
16271
16271
|
), c = e.map((_) => {
|
@@ -16352,7 +16352,7 @@ class kf {
|
|
16352
16352
|
const i = this.globalStore.accountStore.members, a = vf(n, i), r = await (await Promise.all(
|
16353
16353
|
a.map((s) => this.globalStore.accountStore.api.getMonthlyAccountBalances(s.guid))
|
16354
16354
|
)).reduce(Df, []).sort(Nf);
|
16355
|
-
|
16355
|
+
ee(() => {
|
16356
16356
|
this.netWorthData = {
|
16357
16357
|
accounts: a,
|
16358
16358
|
monthlyAccountBalances: r
|
@@ -16365,7 +16365,7 @@ class kf {
|
|
16365
16365
|
loadChartData = async (n) => {
|
16366
16366
|
try {
|
16367
16367
|
const { accounts: i, monthlyAccountBalances: a } = this.netWorthData, o = await Of(i, a, n), r = _s(o);
|
16368
|
-
|
16368
|
+
ee(() => {
|
16369
16369
|
this.netWorthChartData = o, this.selectedData = r;
|
16370
16370
|
});
|
16371
16371
|
} catch (i) {
|
@@ -16388,12 +16388,12 @@ class kf {
|
|
16388
16388
|
};
|
16389
16389
|
}
|
16390
16390
|
setSelectedData = (n) => {
|
16391
|
-
|
16391
|
+
ee(() => {
|
16392
16392
|
this.selectedData = this.netWorthChartData[n];
|
16393
16393
|
});
|
16394
16394
|
};
|
16395
16395
|
setHoveredData = (n) => {
|
16396
|
-
|
16396
|
+
ee(() => {
|
16397
16397
|
this.hoveredData = n !== null ? this.netWorthChartData[n] : void 0;
|
16398
16398
|
});
|
16399
16399
|
};
|
@@ -16477,7 +16477,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16477
16477
|
}
|
16478
16478
|
),
|
16479
16479
|
/* @__PURE__ */ t(
|
16480
|
-
|
16480
|
+
Xe,
|
16481
16481
|
{
|
16482
16482
|
amount: r.balance,
|
16483
16483
|
sx: {
|
@@ -16515,7 +16515,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16515
16515
|
},
|
16516
16516
|
children: [
|
16517
16517
|
/* @__PURE__ */ t(C, { variant: "Body", children: r.current_net_worth }),
|
16518
|
-
/* @__PURE__ */ t(
|
16518
|
+
/* @__PURE__ */ t(Xe, { amount: e?.y ?? 0, variant: "H1" }),
|
16519
16519
|
e && /* @__PURE__ */ t(
|
16520
16520
|
Jo,
|
16521
16521
|
{
|
@@ -16534,7 +16534,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16534
16534
|
{
|
16535
16535
|
primary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", children: [
|
16536
16536
|
/* @__PURE__ */ t(C, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.assets }),
|
16537
|
-
/* @__PURE__ */ t(
|
16537
|
+
/* @__PURE__ */ t(Xe, { amount: a, sx: { fontWeight: 400 }, variant: "XSmall" })
|
16538
16538
|
] })
|
16539
16539
|
}
|
16540
16540
|
) }),
|
@@ -16544,7 +16544,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16544
16544
|
{
|
16545
16545
|
primary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", children: [
|
16546
16546
|
/* @__PURE__ */ t(C, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.liabilities }),
|
16547
|
-
/* @__PURE__ */ t(
|
16547
|
+
/* @__PURE__ */ t(Xe, { amount: o, sx: { fontWeight: 400 }, variant: "XSmall" })
|
16548
16548
|
] })
|
16549
16549
|
}
|
16550
16550
|
) }),
|
@@ -16571,7 +16571,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16571
16571
|
{
|
16572
16572
|
primary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", children: [
|
16573
16573
|
/* @__PURE__ */ t(C, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.gains }),
|
16574
|
-
/* @__PURE__ */ t(
|
16574
|
+
/* @__PURE__ */ t(Xe, { amount: a, sx: { fontWeight: 400 }, variant: "XSmall" })
|
16575
16575
|
] })
|
16576
16576
|
}
|
16577
16577
|
) }),
|
@@ -16582,7 +16582,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16582
16582
|
primary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
16583
16583
|
/* @__PURE__ */ t(C, { variant: "Body", children: c.accountName }),
|
16584
16584
|
/* @__PURE__ */ t(
|
16585
|
-
|
16585
|
+
Xe,
|
16586
16586
|
{
|
16587
16587
|
amount: c.gain,
|
16588
16588
|
sx: { color: s.palette.success.main, fontWeight: 700 },
|
@@ -16600,7 +16600,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16600
16600
|
{
|
16601
16601
|
primary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", children: [
|
16602
16602
|
/* @__PURE__ */ t(C, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.losses }),
|
16603
|
-
/* @__PURE__ */ t(
|
16603
|
+
/* @__PURE__ */ t(Xe, { amount: o, sx: { fontWeight: 400 }, variant: "XSmall" })
|
16604
16604
|
] })
|
16605
16605
|
}
|
16606
16606
|
) }),
|
@@ -16614,7 +16614,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16614
16614
|
{
|
16615
16615
|
primary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
16616
16616
|
/* @__PURE__ */ t(C, { variant: "Body", children: c.accountName }),
|
16617
|
-
/* @__PURE__ */ t(
|
16617
|
+
/* @__PURE__ */ t(Xe, { amount: c.loss, sx: { fontWeight: 700 }, variant: "Body" })
|
16618
16618
|
] }),
|
16619
16619
|
sx: { px: 16 }
|
16620
16620
|
}
|
@@ -16637,7 +16637,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16637
16637
|
selectedData: f,
|
16638
16638
|
setHoveredData: S,
|
16639
16639
|
setSelectedData: y
|
16640
|
-
} = yc(), { isMobile: E } = Ce(), { onEvent: I } = q(), [w, v] = g.useState(!1), [N, R] = g.useState(6), [M, k] = g.useState(!1), [G, L] = g.useState(!1), [W, Y] = g.useState(!1),
|
16640
|
+
} = yc(), { isMobile: E } = Ce(), { onEvent: I } = q(), [w, v] = g.useState(!1), [N, R] = g.useState(6), [M, k] = g.useState(!1), [G, L] = g.useState(!1), [W, Y] = g.useState(!1), J = async () => {
|
16641
16641
|
await m(a), await h(N), v(!0);
|
16642
16642
|
};
|
16643
16643
|
g.useEffect(() => {
|
@@ -16645,11 +16645,11 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16645
16645
|
}, []), g.useEffect(() => {
|
16646
16646
|
o(c);
|
16647
16647
|
}, [c]), g.useEffect(() => {
|
16648
|
-
i &&
|
16648
|
+
i && J().finally();
|
16649
16649
|
}, [i, a]), g.useEffect(() => {
|
16650
16650
|
I(F.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: N + "M" }), h(N).finally();
|
16651
16651
|
}, [N]);
|
16652
|
-
const
|
16652
|
+
const he = ($, pe) => {
|
16653
16653
|
y(pe), $.currentTarget instanceof HTMLDivElement && k(!0);
|
16654
16654
|
}, _e = ($) => {
|
16655
16655
|
S($);
|
@@ -16657,18 +16657,18 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16657
16657
|
S(null);
|
16658
16658
|
}, Re = () => {
|
16659
16659
|
I(F.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), L(!0);
|
16660
|
-
},
|
16660
|
+
}, ue = async ($) => {
|
16661
16661
|
const pe = $[0], be = $[1];
|
16662
16662
|
pe && be && R(Yd(be, pe));
|
16663
16663
|
}, me = {
|
16664
16664
|
chartData: p,
|
16665
16665
|
hoveredData: _,
|
16666
16666
|
onButtonClick: Re,
|
16667
|
-
onDataClick:
|
16667
|
+
onDataClick: he,
|
16668
16668
|
onMouseEnter: _e,
|
16669
16669
|
onMouseLeave: Le,
|
16670
16670
|
selectedData: f
|
16671
|
-
},
|
16671
|
+
}, Qe = () => {
|
16672
16672
|
Y(!0), I(F.ACCOUNTS_CLICK_CONNECT);
|
16673
16673
|
};
|
16674
16674
|
return n ? /* @__PURE__ */ t(
|
@@ -16676,7 +16676,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16676
16676
|
{
|
16677
16677
|
accountOptions: c,
|
16678
16678
|
calendarActions: {
|
16679
|
-
onRangeChanged:
|
16679
|
+
onRangeChanged: ue
|
16680
16680
|
},
|
16681
16681
|
dateRangeVariant: E ? "timeframetabs" : "timeframebuttons",
|
16682
16682
|
onAccountsFilterClick: () => I(F.NET_WORTH_WIDGET_CLICK_FILTER),
|
@@ -16716,7 +16716,7 @@ const Gf = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16716
16716
|
{
|
16717
16717
|
header: s.empty_widget_header,
|
16718
16718
|
icon: "elevation",
|
16719
|
-
onClick:
|
16719
|
+
onClick: Qe,
|
16720
16720
|
primaryButton: s.empty_widget_button,
|
16721
16721
|
subText: s.empty_widget_description,
|
16722
16722
|
sx: {
|
@@ -16806,7 +16806,7 @@ class Kf {
|
|
16806
16806
|
try {
|
16807
16807
|
this.isLoading = !0;
|
16808
16808
|
const n = await this.api.getNotifications();
|
16809
|
-
|
16809
|
+
ee(() => {
|
16810
16810
|
this.notifications = n, this.recentNotifications = Vf(n), this.isLoading = !1;
|
16811
16811
|
});
|
16812
16812
|
} catch (n) {
|
@@ -17045,7 +17045,7 @@ class tC {
|
|
17045
17045
|
try {
|
17046
17046
|
await this.api.deleteDevice(n);
|
17047
17047
|
const i = this.devices.findIndex((a) => a.guid === n);
|
17048
|
-
return i >= 0 &&
|
17048
|
+
return i >= 0 && ee(() => {
|
17049
17049
|
this.devices.splice(i, 1);
|
17050
17050
|
}), { success: !0 };
|
17051
17051
|
} catch {
|
@@ -17069,7 +17069,7 @@ class tC {
|
|
17069
17069
|
loadDevices = async () => {
|
17070
17070
|
try {
|
17071
17071
|
const n = await this.api.getDevices();
|
17072
|
-
|
17072
|
+
ee(() => {
|
17073
17073
|
this.devices = n;
|
17074
17074
|
});
|
17075
17075
|
} catch (n) {
|
@@ -17079,7 +17079,7 @@ class tC {
|
|
17079
17079
|
loadNotificationProfiles = async () => {
|
17080
17080
|
try {
|
17081
17081
|
const n = await this.api.getNotificationProfiles();
|
17082
|
-
|
17082
|
+
ee(() => {
|
17083
17083
|
this.notificationProfiles = n;
|
17084
17084
|
});
|
17085
17085
|
} catch (n) {
|
@@ -17089,7 +17089,7 @@ class tC {
|
|
17089
17089
|
loadTransactionRules = async () => {
|
17090
17090
|
try {
|
17091
17091
|
const n = await this.transactionApi.getTransactionRules();
|
17092
|
-
|
17092
|
+
ee(() => {
|
17093
17093
|
this.transactionRules = n;
|
17094
17094
|
});
|
17095
17095
|
} catch (n) {
|
@@ -17117,7 +17117,7 @@ class tC {
|
|
17117
17117
|
updateDevice = async (n) => {
|
17118
17118
|
try {
|
17119
17119
|
const i = await this.api.updateDevice(n), a = this.devices.findIndex((o) => o.guid === n.guid);
|
17120
|
-
return a >= 0 &&
|
17120
|
+
return a >= 0 && ee(() => {
|
17121
17121
|
this.devices[a] = i;
|
17122
17122
|
}), { success: !0 };
|
17123
17123
|
} catch (i) {
|
@@ -17127,7 +17127,7 @@ class tC {
|
|
17127
17127
|
updateNotificationProfile = async (n) => {
|
17128
17128
|
try {
|
17129
17129
|
const i = await this.api.updateNotificationProfile(n), a = this.notificationProfiles.findIndex((o) => o.guid === n.guid);
|
17130
|
-
a >= 0 &&
|
17130
|
+
a >= 0 && ee(() => {
|
17131
17131
|
this.notificationProfiles[a] = i;
|
17132
17132
|
});
|
17133
17133
|
} catch (i) {
|
@@ -17312,7 +17312,7 @@ const ml = x(() => {
|
|
17312
17312
|
)
|
17313
17313
|
] });
|
17314
17314
|
}), iC = ({ availableWidth: e, handleOnLeavClick: n }) => {
|
17315
|
-
const i =
|
17315
|
+
const i = je(), { common: a, settings: o } = A(), { isDesktop: r, isMobile: s, isSmallMobile: c, isTablet: l } = Ce(e), { config: u } = vt(), { updateUser: _ } = yt(), { user: h } = ft(), [m, p] = g.useState({
|
17316
17316
|
first_name: h.first_name,
|
17317
17317
|
last_name: h.last_name,
|
17318
17318
|
email: h.email,
|
@@ -17333,8 +17333,8 @@ const ml = x(() => {
|
|
17333
17333
|
}, [f]);
|
17334
17334
|
const N = () => {
|
17335
17335
|
if (m.birthday) {
|
17336
|
-
const L = new Date(m.birthday * 1e3), W = L.getUTCFullYear(), Y = L.getUTCMonth(),
|
17337
|
-
return new Date(W, Y,
|
17336
|
+
const L = new Date(m.birthday * 1e3), W = L.getUTCFullYear(), Y = L.getUTCMonth(), J = L.getUTCDate();
|
17337
|
+
return new Date(W, Y, J);
|
17338
17338
|
}
|
17339
17339
|
}, R = async () => {
|
17340
17340
|
await _({ ...h, ...m }), S(!1);
|
@@ -17364,7 +17364,7 @@ const ml = x(() => {
|
|
17364
17364
|
}
|
17365
17365
|
},
|
17366
17366
|
children: [
|
17367
|
-
/* @__PURE__ */ t(
|
17367
|
+
/* @__PURE__ */ t(qe, { children: o.personal_details }),
|
17368
17368
|
/* @__PURE__ */ t(X, { variant: "Body", children: o.update_information }),
|
17369
17369
|
/* @__PURE__ */ d(
|
17370
17370
|
b,
|
@@ -17848,7 +17848,7 @@ const oC = ({
|
|
17848
17848
|
},
|
17849
17849
|
children: [
|
17850
17850
|
/* @__PURE__ */ d(b, { gap: 4, children: [
|
17851
|
-
/* @__PURE__ */ t(
|
17851
|
+
/* @__PURE__ */ t(qe, { children: n.mobile_devices_title }),
|
17852
17852
|
/* @__PURE__ */ t(X, { variant: "Body", children: n.mobile_devices_info })
|
17853
17853
|
] }),
|
17854
17854
|
e ? /* @__PURE__ */ t(
|
@@ -18046,7 +18046,7 @@ const oC = ({
|
|
18046
18046
|
n().finally();
|
18047
18047
|
}, []), /* @__PURE__ */ d(b, { sx: { gap: 24, py: 24 }, children: [
|
18048
18048
|
/* @__PURE__ */ d(b, { sx: { px: 24 }, children: [
|
18049
|
-
/* @__PURE__ */ t(
|
18049
|
+
/* @__PURE__ */ t(qe, { children: e.transaction_rules_label }),
|
18050
18050
|
/* @__PURE__ */ t(X, { variant: "Body", children: e.transaction_rules_description })
|
18051
18051
|
] }),
|
18052
18052
|
/* @__PURE__ */ t(ae, { children: i.map((a, o) => /* @__PURE__ */ t(gC, { rule: a }, o)) })
|
@@ -18098,8 +18098,8 @@ const oC = ({
|
|
18098
18098
|
children: s ? /* @__PURE__ */ t(gi, { dateAdapter: Jn, children: /* @__PURE__ */ t(
|
18099
18099
|
bo,
|
18100
18100
|
{
|
18101
|
-
maxDate:
|
18102
|
-
minDate:
|
18101
|
+
maxDate: Ze(/* @__PURE__ */ new Date()),
|
18102
|
+
minDate: Ye(/* @__PURE__ */ new Date()),
|
18103
18103
|
onChange: (E) => {
|
18104
18104
|
m(E.getDate());
|
18105
18105
|
},
|
@@ -18338,7 +18338,7 @@ const oC = ({
|
|
18338
18338
|
await a(u);
|
18339
18339
|
};
|
18340
18340
|
return /* @__PURE__ */ d(b, { children: [
|
18341
|
-
/* @__PURE__ */ t(
|
18341
|
+
/* @__PURE__ */ t(qe, { sx: { mt: 24 }, children: n.delivery_method_title }),
|
18342
18342
|
i.email_notifications_enabled && /* @__PURE__ */ d(Z, { children: [
|
18343
18343
|
/* @__PURE__ */ t(
|
18344
18344
|
Rn,
|
@@ -18403,7 +18403,7 @@ const oC = ({
|
|
18403
18403
|
return /* @__PURE__ */ d(b, { ref: n, children: [
|
18404
18404
|
/* @__PURE__ */ t(P, {}),
|
18405
18405
|
/* @__PURE__ */ d(b, { sx: { pt: 12 }, children: [
|
18406
|
-
/* @__PURE__ */ t(
|
18406
|
+
/* @__PURE__ */ t(qe, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children: o.personal_details }),
|
18407
18407
|
/* @__PURE__ */ d(b, { sx: { flexDirection: i <= 768 ? "column" : "row", gap: 24, py: 16 }, children: [
|
18408
18408
|
e.display_email_edit_field_in_settings && /* @__PURE__ */ d(b, { sx: { flex: 1, pb: 14 }, children: [
|
18409
18409
|
/* @__PURE__ */ t(
|
@@ -18505,7 +18505,7 @@ const oC = ({
|
|
18505
18505
|
/* @__PURE__ */ t(fC, {}),
|
18506
18506
|
/* @__PURE__ */ t(P, { sx: { my: 24 } })
|
18507
18507
|
] }),
|
18508
|
-
/* @__PURE__ */ t(
|
18508
|
+
/* @__PURE__ */ t(qe, { sx: { mb: 4 }, children: o.notification_types_title })
|
18509
18509
|
] }),
|
18510
18510
|
/* @__PURE__ */ d(ae, { children: [
|
18511
18511
|
e.includes(Mt.Accounts) && /* @__PURE__ */ t(j, { children: /* @__PURE__ */ d(ge, { onClick: () => u(Mt.Accounts), children: [
|
@@ -18559,7 +18559,7 @@ const oC = ({
|
|
18559
18559
|
},
|
18560
18560
|
children: [
|
18561
18561
|
/* @__PURE__ */ d(b, { children: [
|
18562
|
-
/* @__PURE__ */ t(
|
18562
|
+
/* @__PURE__ */ t(qe, { children: o }),
|
18563
18563
|
/* @__PURE__ */ t(X, { variant: "Body", children: a })
|
18564
18564
|
] }),
|
18565
18565
|
n && /* @__PURE__ */ t(
|
@@ -18654,7 +18654,7 @@ const oC = ({
|
|
18654
18654
|
imageLargeBreakPoint: o = 12,
|
18655
18655
|
sx: r
|
18656
18656
|
}) => {
|
18657
|
-
const s =
|
18657
|
+
const s = je();
|
18658
18658
|
return /* @__PURE__ */ d(g.Fragment, { children: [
|
18659
18659
|
/* @__PURE__ */ t(O, { sx: { pb: 48, ...r }, children: /* @__PURE__ */ d(_t, { container: !0, rowSpacing: 24, children: [
|
18660
18660
|
/* @__PURE__ */ t(_t, { item: !0, lg: 12, md: 12, sm: 12, xs: 12, children: n }),
|
@@ -18698,7 +18698,7 @@ const oC = ({
|
|
18698
18698
|
return /* @__PURE__ */ d(g.Fragment, { children: [
|
18699
18699
|
/* @__PURE__ */ d(_t, { container: !0, sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
18700
18700
|
/* @__PURE__ */ d(_t, { item: !0, sm: 6, xs: 12, children: [
|
18701
|
-
/* @__PURE__ */ t(
|
18701
|
+
/* @__PURE__ */ t(qe, { color: "text.primary", children: o }),
|
18702
18702
|
/* @__PURE__ */ d(
|
18703
18703
|
c_,
|
18704
18704
|
{
|
@@ -18745,7 +18745,7 @@ const oC = ({
|
|
18745
18745
|
imageLargeBreakPoint: o = 4,
|
18746
18746
|
sx: r
|
18747
18747
|
}) => {
|
18748
|
-
const s =
|
18748
|
+
const s = je();
|
18749
18749
|
return /* @__PURE__ */ d(g.Fragment, { children: [
|
18750
18750
|
/* @__PURE__ */ t(O, { sx: { pb: 48, ...r }, children: /* @__PURE__ */ d(_t, { container: !0, spacing: 24, sx: { alignItems: "flex-start" }, children: [
|
18751
18751
|
/* @__PURE__ */ t(
|
@@ -18792,7 +18792,7 @@ const oC = ({
|
|
18792
18792
|
imageLargeBreakPoint: o = 4,
|
18793
18793
|
sx: r
|
18794
18794
|
}) => {
|
18795
|
-
const s =
|
18795
|
+
const s = je();
|
18796
18796
|
return /* @__PURE__ */ d(g.Fragment, { children: [
|
18797
18797
|
/* @__PURE__ */ t(O, { sx: { pb: 48, ...r }, children: /* @__PURE__ */ d(_t, { container: !0, spacing: 24, sx: { alignItems: "flex-start" }, children: [
|
18798
18798
|
/* @__PURE__ */ t(_t, { item: !0, lg: 12 - o, md: 12, sm: 12, xs: 12, children: n }),
|
@@ -18830,7 +18830,7 @@ const oC = ({
|
|
18830
18830
|
imageLargeBreakPoint: o = 12,
|
18831
18831
|
sx: r
|
18832
18832
|
}) => {
|
18833
|
-
const s =
|
18833
|
+
const s = je();
|
18834
18834
|
return /* @__PURE__ */ d(g.Fragment, { children: [
|
18835
18835
|
/* @__PURE__ */ t(O, { sx: { pb: 48, ...r }, children: /* @__PURE__ */ d(_t, { container: !0, rowSpacing: 24, children: [
|
18836
18836
|
/* @__PURE__ */ t(
|
@@ -18862,7 +18862,7 @@ const oC = ({
|
|
18862
18862
|
] }) }),
|
18863
18863
|
i && /* @__PURE__ */ t(P, {})
|
18864
18864
|
] });
|
18865
|
-
}, U = ({ content: e, sx: n }) => /* @__PURE__ */ t(X, { sx: { lineHeight: "24px", py: 6, ...n }, children: e }), Ae = ({ content: e, sx: n }) => /* @__PURE__ */ t(
|
18865
|
+
}, U = ({ content: e, sx: n }) => /* @__PURE__ */ t(X, { sx: { lineHeight: "24px", py: 6, ...n }, children: e }), Ae = ({ content: e, sx: n }) => /* @__PURE__ */ t(qe, { color: "text.primary", sx: { py: 12, whiteSpace: { sm: "nowrap", xs: "wrap" }, ...n }, children: e }), ne = ({
|
18866
18866
|
items: e,
|
18867
18867
|
listType: n = "ul",
|
18868
18868
|
subItemPlacement: i,
|
@@ -18874,49 +18874,49 @@ const oC = ({
|
|
18874
18874
|
/* @__PURE__ */ t(U, { content: c, sx: { py: 1 } }),
|
18875
18875
|
i === l ? /* @__PURE__ */ t(s, { ...o === "ol" && { type: "a" }, children: a.map((u, _) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(U, { content: u, sx: { py: 1 } }) }, _)) }) : null
|
18876
18876
|
] }, l)) }) });
|
18877
|
-
},
|
18878
|
-
ACCOUNT_DETAILS: `${
|
18879
|
-
ACCOUNT_OVERVIEW: `${
|
18880
|
-
ACCOUNT_ADD: `${
|
18881
|
-
ACCOUNT_BROKEN_CONNECTION: `${
|
18882
|
-
ACCOUNT_HIDE: `${
|
18883
|
-
ACCOUNT_MANAGE_CONNECTIONS: `${
|
18884
|
-
BUDGETS_ADD_SUB_BUDGET: `${
|
18885
|
-
BUDGETS_WIDGET: `${
|
18886
|
-
BUDGETS_EDIT_INCOME: `${
|
18887
|
-
CASHFLOW_WIDGET: `${
|
18888
|
-
CASHFLOW_EXPENSE_DETAILS: `${
|
18889
|
-
CASHFLOW_MANAGE_EXPENSES: `${
|
18890
|
-
DEBTS_DETAILS: `${
|
18891
|
-
DEBTS_OVERVIEW: `${
|
18892
|
-
DEBTS_PRIORITIZATION: `${
|
18893
|
-
DEBTS_SNOWBALL_METHOD: `${
|
18894
|
-
GENERAL_CATEGORIZE_TRANSACTIONS: `${
|
18895
|
-
GOALS_CREATE_GOAL: `${
|
18896
|
-
GOALS_DEBT_GOALS: `${
|
18897
|
-
GOALS_WIDGET_OVERVIEW: `${
|
18898
|
-
GOALS_MANAGE_GOALS: `${
|
18899
|
-
GOALS_RETIREMENT_GOALS: `${
|
18900
|
-
GOALS_SAVINGS_GOALS: `${
|
18901
|
-
INSIGHTS_CAROUSEL: `${
|
18902
|
-
INSIGHTS_FEED: `${
|
18903
|
-
INVESTMENTS_WIDGET_DETAILS: `${
|
18904
|
-
MOBILE_ADD_MOBILE_DEVICE: `${
|
18905
|
-
NETWORTH_ASSETS_LIABILITIES: `${
|
18906
|
-
NETWORTH_GAINS_LOSSES: `${
|
18907
|
-
NETWORTH_WIDGET: `${
|
18908
|
-
NOTIFICATIONS_MANAGING: `${
|
18909
|
-
NOTIFICATIONS_OVERVIEW: `${
|
18910
|
-
RECURRING_TRANSACTIONS_EXPENSE_DETAILS: `${
|
18911
|
-
RECURRING_TRANSACTIONS_MANAGE_EXPENSES: `${
|
18912
|
-
RECURRING_TRANSACTIONS_OVERVIEW: `${
|
18913
|
-
SPENDING_WIDGET: `${
|
18914
|
-
TRANSACTIONS_CATEGORIZE: `${
|
18915
|
-
TRANSACTIONS_EDIT: `${
|
18916
|
-
TRANSACTIONS_EXPORT: `${
|
18917
|
-
TRANSACTIONS_OVERVIEW: `${
|
18918
|
-
TRANSACTIONS_RULES: `${
|
18919
|
-
TRENDS_WIDGET: `${
|
18877
|
+
}, Ie = "https://content.moneydesktop.com/storage/MD_Assets/md/help", Oe = {
|
18878
|
+
ACCOUNT_DETAILS: `${Ie}/account/AccountDetails.png`,
|
18879
|
+
ACCOUNT_OVERVIEW: `${Ie}/account/AccountsOverview.png`,
|
18880
|
+
ACCOUNT_ADD: `${Ie}/account/AddAccount.png`,
|
18881
|
+
ACCOUNT_BROKEN_CONNECTION: `${Ie}/account/BrokenConnection.png`,
|
18882
|
+
ACCOUNT_HIDE: `${Ie}/account/AccountHide.png`,
|
18883
|
+
ACCOUNT_MANAGE_CONNECTIONS: `${Ie}/account/ManageConnections.png`,
|
18884
|
+
BUDGETS_ADD_SUB_BUDGET: `${Ie}/budgets/AddSubBudget.png`,
|
18885
|
+
BUDGETS_WIDGET: `${Ie}/budgets/BudgetWidget.png`,
|
18886
|
+
BUDGETS_EDIT_INCOME: `${Ie}/budgets/EditIncome.png`,
|
18887
|
+
CASHFLOW_WIDGET: `${Ie}/cashflow/CashFlowWidget.png`,
|
18888
|
+
CASHFLOW_EXPENSE_DETAILS: `${Ie}/cashflow/ExpenseDetailsCurrent.png`,
|
18889
|
+
CASHFLOW_MANAGE_EXPENSES: `${Ie}/cashflow/ManageExpenses.png`,
|
18890
|
+
DEBTS_DETAILS: `${Ie}/debts/DebtDetails.png`,
|
18891
|
+
DEBTS_OVERVIEW: `${Ie}/debts/DebtOverview.png`,
|
18892
|
+
DEBTS_PRIORITIZATION: `${Ie}/debts/DebtPrioritization.png`,
|
18893
|
+
DEBTS_SNOWBALL_METHOD: `${Ie}/debts/SnowballMethod.png`,
|
18894
|
+
GENERAL_CATEGORIZE_TRANSACTIONS: `${Ie}/general/CategorizeTransactions.png`,
|
18895
|
+
GOALS_CREATE_GOAL: `${Ie}/goals/CreateGoal.png`,
|
18896
|
+
GOALS_DEBT_GOALS: `${Ie}/goals/DebtGoals.png`,
|
18897
|
+
GOALS_WIDGET_OVERVIEW: `${Ie}/goals/GoalsWidgetOverview.png`,
|
18898
|
+
GOALS_MANAGE_GOALS: `${Ie}/goals/ManageGoals.png`,
|
18899
|
+
GOALS_RETIREMENT_GOALS: `${Ie}/goals/RetirementGoals.png`,
|
18900
|
+
GOALS_SAVINGS_GOALS: `${Ie}/goals/SavingsGoals.png`,
|
18901
|
+
INSIGHTS_CAROUSEL: `${Ie}/insights/InsightsCarousel.png`,
|
18902
|
+
INSIGHTS_FEED: `${Ie}/insights/InsightsFeed.png`,
|
18903
|
+
INVESTMENTS_WIDGET_DETAILS: `${Ie}/investments/WidgetDetails.png`,
|
18904
|
+
MOBILE_ADD_MOBILE_DEVICE: `${Ie}/mobile/AddMobileDevice.png`,
|
18905
|
+
NETWORTH_ASSETS_LIABILITIES: `${Ie}/networth/AssetsLiabilities.png`,
|
18906
|
+
NETWORTH_GAINS_LOSSES: `${Ie}/networth/GainsLosses.png`,
|
18907
|
+
NETWORTH_WIDGET: `${Ie}/networth/NetWorthWidget.png`,
|
18908
|
+
NOTIFICATIONS_MANAGING: `${Ie}/notifications/ManagingNotifications.png`,
|
18909
|
+
NOTIFICATIONS_OVERVIEW: `${Ie}/notifications/NotificationOverview.png`,
|
18910
|
+
RECURRING_TRANSACTIONS_EXPENSE_DETAILS: `${Ie}/recurringtransactions/expenseDetails.png`,
|
18911
|
+
RECURRING_TRANSACTIONS_MANAGE_EXPENSES: `${Ie}/recurringtransactions/manageExpenses.png`,
|
18912
|
+
RECURRING_TRANSACTIONS_OVERVIEW: `${Ie}/recurringtransactions/overview.png`,
|
18913
|
+
SPENDING_WIDGET: `${Ie}/spending/SpendingWidget.png`,
|
18914
|
+
TRANSACTIONS_CATEGORIZE: `${Ie}/transactions/CategorizeTransactions.png`,
|
18915
|
+
TRANSACTIONS_EDIT: `${Ie}/transactions/EditTransactions.png`,
|
18916
|
+
TRANSACTIONS_EXPORT: `${Ie}/transactions/ExportTransactions.png`,
|
18917
|
+
TRANSACTIONS_OVERVIEW: `${Ie}/transactions/Overview.png`,
|
18918
|
+
TRANSACTIONS_RULES: `${Ie}/transactions/TransactionRules.png`,
|
18919
|
+
TRENDS_WIDGET: `${Ie}/trends/TrendsWidget.png`
|
18920
18920
|
}, EC = ({ copy: e, topicKey: n }) => ({
|
18921
18921
|
"accounts-overview": /* @__PURE__ */ d(g.Fragment, { children: [
|
18922
18922
|
/* @__PURE__ */ t(
|
@@ -22004,7 +22004,7 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22004
22004
|
] });
|
22005
22005
|
}, o0 = (e) => {
|
22006
22006
|
const n = e.row[e.field];
|
22007
|
-
return /* @__PURE__ */ t(b, { alignItems: "flex-end", tabIndex: e.tabIndex, children: /* @__PURE__ */ t(
|
22007
|
+
return /* @__PURE__ */ t(b, { alignItems: "flex-end", tabIndex: e.tabIndex, children: /* @__PURE__ */ t(Xe, { amount: n, variant: "Small" }) });
|
22008
22008
|
}, r0 = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
22009
22009
|
const { categories: i } = A(), a = i.default_categories[e]?.replace(/&/g, "&") ?? ba[e];
|
22010
22010
|
return /* @__PURE__ */ d(b, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
@@ -22142,7 +22142,7 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22142
22142
|
}
|
22143
22143
|
);
|
22144
22144
|
}, _0 = x(d0), u0 = ({ onBackClick: e, sx: n }) => {
|
22145
|
-
const { onEvent: i } = q(), { isDesktop: a, isTablet: o, isMobile: r } = Ce(), { visibleAccounts: s } = Se(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: l, getCategoryName: u } = Ue(), { sortedTransactions: _ } = ke(), { selectedDateRange: h, setSelectedDateRange: m } = Si(), { isCopyLoaded: p, isInitialized: f, selectedAccounts: S, setSelectedAccounts: y } = re(), { trends: E } = A(), [I, w] = g.useState(!1), [v, N] = g.useState(!1), [R, M] = g.useState("Chart"), [k, G] = g.useState(""), [L, W] = g.useState(window.innerHeight),
|
22145
|
+
const { onEvent: i } = q(), { isDesktop: a, isTablet: o, isMobile: r } = Ce(), { visibleAccounts: s } = Se(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: l, getCategoryName: u } = Ue(), { sortedTransactions: _ } = ke(), { selectedDateRange: h, setSelectedDateRange: m } = Si(), { isCopyLoaded: p, isInitialized: f, selectedAccounts: S, setSelectedAccounts: y } = re(), { trends: E } = A(), [I, w] = g.useState(!1), [v, N] = g.useState(!1), [R, M] = g.useState("Chart"), [k, G] = g.useState(""), [L, W] = g.useState(window.innerHeight), J = L - (r ? 315 : 345);
|
22146
22146
|
g.useEffect(() => {
|
22147
22147
|
const be = () => W(window.innerHeight);
|
22148
22148
|
return window.addEventListener("resize", be), () => window.removeEventListener("resize", be);
|
@@ -22157,14 +22157,14 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22157
22157
|
w(!0);
|
22158
22158
|
});
|
22159
22159
|
}, [f, S, h]);
|
22160
|
-
const
|
22160
|
+
const he = g.useMemo(() => {
|
22161
22161
|
if (!I) return { stackedDatasets: [], unstackedDatasets: [] };
|
22162
22162
|
const be = t0(
|
22163
22163
|
l,
|
22164
22164
|
h.start,
|
22165
22165
|
h.end
|
22166
22166
|
), fe = k.length ? be.filter(
|
22167
|
-
(
|
22167
|
+
(we) => we.top_level_category_guid === k || we.category_guid === k
|
22168
22168
|
) : op(be);
|
22169
22169
|
return {
|
22170
22170
|
stackedDatasets: fe.filter(ip),
|
@@ -22173,17 +22173,17 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22173
22173
|
}, [l, k, h]), _e = (be, fe) => {
|
22174
22174
|
M(fe ?? R), i(F.TRENDS_CLICK_TOGGLE);
|
22175
22175
|
}, Le = (be) => {
|
22176
|
-
const fe = mo(be?.[0], 1),
|
22177
|
-
m({ start: fe, end:
|
22176
|
+
const fe = mo(be?.[0], 1), we = be?.[1], Ge = po(we, fe);
|
22177
|
+
m({ start: fe, end: we }), i(F.TRENDS_CLICK_DATE, {
|
22178
22178
|
time_period: Ge + "M"
|
22179
22179
|
});
|
22180
22180
|
}, Re = () => {
|
22181
22181
|
i(F.TRENDS_CLICK_FILTER);
|
22182
|
-
},
|
22182
|
+
}, ue = (be) => {
|
22183
22183
|
G(be);
|
22184
22184
|
}, me = (be) => {
|
22185
22185
|
G(be), i(F.TRENDS_CLICK_LEGEND, { category: u(be) });
|
22186
|
-
},
|
22186
|
+
}, Qe = (be) => {
|
22187
22187
|
i(F.TRENDS_HOVER_LEGEND, { category: u(be) });
|
22188
22188
|
}, $ = (be) => {
|
22189
22189
|
i(F.TRENDS_HOVER_AREA, { category: be });
|
@@ -22239,20 +22239,20 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22239
22239
|
R === "Chart" && /* @__PURE__ */ t(
|
22240
22240
|
Wu,
|
22241
22241
|
{
|
22242
|
-
availableHeight:
|
22242
|
+
availableHeight: J,
|
22243
22243
|
onClickLegend: me,
|
22244
22244
|
onHoverArea: $,
|
22245
|
-
onHoverLegend:
|
22245
|
+
onHoverLegend: Qe,
|
22246
22246
|
onHoverPoint: pe,
|
22247
|
-
stackedDatasets:
|
22248
|
-
unstackedDatasets:
|
22247
|
+
stackedDatasets: he.stackedDatasets,
|
22248
|
+
unstackedDatasets: he.unstackedDatasets
|
22249
22249
|
}
|
22250
22250
|
),
|
22251
22251
|
R === "Table" && /* @__PURE__ */ t(
|
22252
22252
|
Tl,
|
22253
22253
|
{
|
22254
22254
|
monthlyCategoryTotals: l,
|
22255
|
-
onClickRow:
|
22255
|
+
onClickRow: ue,
|
22256
22256
|
selectedCategory: k,
|
22257
22257
|
selectedDateRange: h
|
22258
22258
|
}
|
@@ -22274,7 +22274,7 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22274
22274
|
}
|
22275
22275
|
);
|
22276
22276
|
}, k2 = x(u0), h0 = () => {
|
22277
|
-
const e =
|
22277
|
+
const e = je(), { monthlyCategoryTotals: n } = Ue(), { trends: i } = A(), a = sp(n);
|
22278
22278
|
return /* @__PURE__ */ t(
|
22279
22279
|
ni,
|
22280
22280
|
{
|
@@ -22375,7 +22375,7 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22375
22375
|
{
|
22376
22376
|
ref: c,
|
22377
22377
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
22378
|
-
children: /* @__PURE__ */ t(
|
22378
|
+
children: /* @__PURE__ */ t(qe, { children: _ })
|
22379
22379
|
}
|
22380
22380
|
),
|
22381
22381
|
r && s >= 450 && !y && /* @__PURE__ */ t(
|
@@ -22584,7 +22584,7 @@ const e0 = (e) => e.reduce((i, a) => {
|
|
22584
22584
|
u(!l);
|
22585
22585
|
}, m = a.length + (l ? i.length : 0);
|
22586
22586
|
return /* @__PURE__ */ t(b, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ d(ae, { children: [
|
22587
|
-
/* @__PURE__ */ t(b, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ t(
|
22587
|
+
/* @__PURE__ */ t(b, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ t(qe, { children: c.categories }) }),
|
22588
22588
|
a.map((p, f) => /* @__PURE__ */ t(
|
22589
22589
|
Es,
|
22590
22590
|
{
|
@@ -22632,7 +22632,7 @@ class y0 {
|
|
22632
22632
|
};
|
22633
22633
|
loadCopy = async () => {
|
22634
22634
|
const n = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
22635
|
-
|
22635
|
+
ee(() => {
|
22636
22636
|
this.copyObject = n[this.translationKey];
|
22637
22637
|
});
|
22638
22638
|
};
|
@@ -22833,7 +22833,7 @@ class x0 {
|
|
22833
22833
|
initialize = async (n, i, a) => {
|
22834
22834
|
await this.copyStore.initialize(n, i), await this.insightsMicroWidgetStore.initialize(n, i, a);
|
22835
22835
|
const o = await G_(n, i, "1.0.0", "Micro Insights Carousel");
|
22836
|
-
|
22836
|
+
ee(() => {
|
22837
22837
|
this.session = o, this.isInitialized = !0;
|
22838
22838
|
});
|
22839
22839
|
};
|
@@ -23957,7 +23957,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
23957
23957
|
shouldApplyNewAnimation: c = !1,
|
23958
23958
|
visibleCardsCount: l = 1
|
23959
23959
|
}) => {
|
23960
|
-
const u =
|
23960
|
+
const u = je(), { carouselCopy: _ } = Kn(), h = Math.floor(s) > r || n - l + 1 === 0, m = s < 0 || i - 1 === n, p = u.palette.grey[500], f = e?.primary_300 ?? u.palette.primary.main;
|
23961
23961
|
return /* @__PURE__ */ d(
|
23962
23962
|
b,
|
23963
23963
|
{
|
@@ -24059,8 +24059,8 @@ const Ui = g.createContext(null), I0 = ({
|
|
24059
24059
|
const $ = f.current.offsetWidth, pe = 8;
|
24060
24060
|
let be;
|
24061
24061
|
if (p > 1) {
|
24062
|
-
const
|
24063
|
-
be = ($ -
|
24062
|
+
const we = ($ - (p - 1) * pe) / p / 3;
|
24063
|
+
be = ($ - we - (p - 1) * pe) / p;
|
24064
24064
|
} else
|
24065
24065
|
be = $;
|
24066
24066
|
M(be);
|
@@ -24095,13 +24095,13 @@ const Ui = g.createContext(null), I0 = ({
|
|
24095
24095
|
top: 0,
|
24096
24096
|
behavior: "smooth"
|
24097
24097
|
});
|
24098
|
-
},
|
24098
|
+
}, J = () => {
|
24099
24099
|
W(jt.ON_CAROUSEL_BACK_CLICK), f.current && R && f.current.scrollTo({
|
24100
24100
|
left: Math.max(0, y - (R + 8)),
|
24101
24101
|
top: 0,
|
24102
24102
|
behavior: "smooth"
|
24103
24103
|
});
|
24104
|
-
},
|
24104
|
+
}, he = () => {
|
24105
24105
|
f.current && E(f.current.scrollLeft);
|
24106
24106
|
}, _e = () => {
|
24107
24107
|
if (!v || !I) return;
|
@@ -24110,14 +24110,14 @@ const Ui = g.createContext(null), I0 = ({
|
|
24110
24110
|
w($.targetTouches[0].clientX);
|
24111
24111
|
}, Re = ($) => {
|
24112
24112
|
w(null), N($.targetTouches[0].clientX);
|
24113
|
-
},
|
24113
|
+
}, ue = {
|
24114
24114
|
clientColorScheme: i,
|
24115
24115
|
showCTAColocatedWithText: a,
|
24116
24116
|
heightOverrides: o,
|
24117
24117
|
posthog: s,
|
24118
24118
|
showIcon: u,
|
24119
24119
|
variant: h
|
24120
|
-
}, me = R ? Math.round(y / (R + 8)) : 0,
|
24120
|
+
}, me = R ? Math.round(y / (R + 8)) : 0, Qe = f.current ? f.current.scrollWidth - f.current.offsetWidth : 0;
|
24121
24121
|
return /* @__PURE__ */ d(
|
24122
24122
|
b,
|
24123
24123
|
{
|
@@ -24136,7 +24136,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24136
24136
|
b,
|
24137
24137
|
{
|
24138
24138
|
direction: "row",
|
24139
|
-
onScroll:
|
24139
|
+
onScroll: he,
|
24140
24140
|
onTouchEnd: _e,
|
24141
24141
|
onTouchMove: Le,
|
24142
24142
|
onTouchStart: Re,
|
@@ -24160,7 +24160,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24160
24160
|
},
|
24161
24161
|
children: [
|
24162
24162
|
n.map(($, pe) => {
|
24163
|
-
const be = pe + 1, fe = n.length + 1,
|
24163
|
+
const be = pe + 1, fe = n.length + 1, we = T(
|
24164
24164
|
L.card_position_in_carousel_aria,
|
24165
24165
|
be.toString(),
|
24166
24166
|
fe.toString()
|
@@ -24168,13 +24168,13 @@ const Ui = g.createContext(null), I0 = ({
|
|
24168
24168
|
return /* @__PURE__ */ t(
|
24169
24169
|
B0,
|
24170
24170
|
{
|
24171
|
-
ariaLabel: `${
|
24171
|
+
ariaLabel: `${we}: ${Wt}, ${K}`,
|
24172
24172
|
beat: $,
|
24173
24173
|
index: pe,
|
24174
24174
|
isActiveCard: pe === me,
|
24175
24175
|
onCardClick: r,
|
24176
24176
|
widthOverrides: R || void 0,
|
24177
|
-
...
|
24177
|
+
...ue
|
24178
24178
|
},
|
24179
24179
|
`${$.guid} ${pe}`
|
24180
24180
|
);
|
@@ -24185,7 +24185,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24185
24185
|
isActiveCard: me === n.length,
|
24186
24186
|
onCardClick: r,
|
24187
24187
|
widthOverrides: R || void 0,
|
24188
|
-
...
|
24188
|
+
...ue
|
24189
24189
|
}
|
24190
24190
|
)
|
24191
24191
|
]
|
@@ -24198,8 +24198,8 @@ const Ui = g.createContext(null), I0 = ({
|
|
24198
24198
|
currentBeatIndex: me + p - 1,
|
24199
24199
|
numBeats: n.length + 1,
|
24200
24200
|
onNextClick: Y,
|
24201
|
-
onPreviousClick:
|
24202
|
-
scrollRightBoundary:
|
24201
|
+
onPreviousClick: J,
|
24202
|
+
scrollRightBoundary: Qe,
|
24203
24203
|
scrollX: y,
|
24204
24204
|
shouldApplyNewAnimation: k,
|
24205
24205
|
visibleCardsCount: p
|
@@ -24437,7 +24437,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24437
24437
|
visibleCardsCount: R = 1,
|
24438
24438
|
widthOverrides: M
|
24439
24439
|
}) => {
|
24440
|
-
const k =
|
24440
|
+
const k = je(), [G, L] = xt("STANDARD"), [W, Y] = xt(!1), J = cu([u], Tn), he = lu([_], Tn);
|
24441
24441
|
g.useEffect(() => {
|
24442
24442
|
Tn.isInitialized || Tn.initialize(r, I, c);
|
24443
24443
|
}, [r, I, c, Tn.isInitialized]), g.useEffect(() => {
|
@@ -24464,7 +24464,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24464
24464
|
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
24465
24465
|
/* @__PURE__ */ d(Ed, { theme: k, children: [
|
24466
24466
|
/* @__PURE__ */ t(o_, {}),
|
24467
|
-
/* @__PURE__ */ t(I0, { onEvent:
|
24467
|
+
/* @__PURE__ */ t(I0, { onEvent: J, onPageview: he, store: Tn, children: /* @__PURE__ */ d(U0, { heightOverrides: s, widthOverrides: M, children: [
|
24468
24468
|
(n || !Tn.isInitialized) && /* @__PURE__ */ t(V0, {}),
|
24469
24469
|
W && S && /* @__PURE__ */ t(
|
24470
24470
|
$0,
|
@@ -24744,7 +24744,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24744
24744
|
selectedDateRange: i,
|
24745
24745
|
totals: a
|
24746
24746
|
}) => {
|
24747
|
-
const o =
|
24747
|
+
const o = je(), { trends: r } = A(), { isSmallMobile: s, isMobile: c, isSmallTablet: l, isTablet: u } = Ce(), _ = [o.palette.chart?.chart1, o.palette.chart?.chart2], h = tb(a, i), m = nb(h, r), [p, f] = g.useState(0), S = 458, y = 195, E = 56, I = c || s ? y : l || u ? S : p;
|
24748
24748
|
return g.useEffect(() => {
|
24749
24749
|
const w = Math.max(e - E, n);
|
24750
24750
|
f(w);
|
@@ -24780,7 +24780,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24780
24780
|
selectedAccounts: I,
|
24781
24781
|
selectedAccountGuids: w,
|
24782
24782
|
setSelectedAccounts: v
|
24783
|
-
} = re(), { trends: N } = A(), R = du(), M = r || o, [k, G] = g.useState(!1), [L, W] = g.useState("Chart"), [Y,
|
24783
|
+
} = re(), { trends: N } = A(), R = du(), M = r || o, [k, G] = g.useState(!1), [L, W] = g.useState("Chart"), [Y, J] = g.useState(""), [he, _e] = g.useState(!1), [Le, Re] = g.useState(window.innerHeight), ue = Le - 208, me = Le - (R ? 494 : 266);
|
24784
24784
|
g.useEffect(() => {
|
24785
24785
|
const Ge = () => Re(window.innerHeight);
|
24786
24786
|
return window.addEventListener("resize", Ge), () => window.removeEventListener("resize", Ge);
|
@@ -24810,7 +24810,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24810
24810
|
});
|
24811
24811
|
}
|
24812
24812
|
}, [_]);
|
24813
|
-
const
|
24813
|
+
const Qe = (Ge) => {
|
24814
24814
|
f(Ge), _e(!0);
|
24815
24815
|
}, $ = () => {
|
24816
24816
|
f(null), _e(!1);
|
@@ -24823,8 +24823,8 @@ const Ui = g.createContext(null), I0 = ({
|
|
24823
24823
|
});
|
24824
24824
|
}, fe = () => {
|
24825
24825
|
a(F.TRENDS_CLICK_FILTER);
|
24826
|
-
},
|
24827
|
-
|
24826
|
+
}, we = (Ge) => {
|
24827
|
+
J(Ge);
|
24828
24828
|
};
|
24829
24829
|
return !y || !k ? /* @__PURE__ */ t(ce, {}) : h && _.length === 0 ? /* @__PURE__ */ t(
|
24830
24830
|
jn,
|
@@ -24873,7 +24873,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24873
24873
|
]
|
24874
24874
|
}
|
24875
24875
|
),
|
24876
|
-
/* @__PURE__ */ t(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ t(O, { flexGrow: 1, children: Y && /* @__PURE__ */ d(te, { onClick: () =>
|
24876
|
+
/* @__PURE__ */ t(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ t(O, { flexGrow: 1, children: Y && /* @__PURE__ */ d(te, { onClick: () => J(""), sx: { p: 0, pr: 5 }, children: [
|
24877
24877
|
/* @__PURE__ */ t(V, { name: "arrow_back" }),
|
24878
24878
|
N.all_categories
|
24879
24879
|
] }) }) }),
|
@@ -24882,7 +24882,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24882
24882
|
L === "Chart" && /* @__PURE__ */ t(
|
24883
24883
|
ab,
|
24884
24884
|
{
|
24885
|
-
availableHeight:
|
24885
|
+
availableHeight: ue,
|
24886
24886
|
minHeight: 450,
|
24887
24887
|
selectedDateRange: p,
|
24888
24888
|
totals: _
|
@@ -24893,7 +24893,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24893
24893
|
{
|
24894
24894
|
height: "unset",
|
24895
24895
|
monthlyCategoryTotals: _,
|
24896
|
-
onClickRow:
|
24896
|
+
onClickRow: we,
|
24897
24897
|
selectedCategory: Y,
|
24898
24898
|
selectedDateRange: p
|
24899
24899
|
}
|
@@ -24905,7 +24905,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24905
24905
|
b0,
|
24906
24906
|
{
|
24907
24907
|
availableHeight: me,
|
24908
|
-
onCategoryClick:
|
24908
|
+
onCategoryClick: Qe
|
24909
24909
|
}
|
24910
24910
|
)
|
24911
24911
|
] })
|
@@ -24913,7 +24913,7 @@ const Ui = g.createContext(null), I0 = ({
|
|
24913
24913
|
]
|
24914
24914
|
}
|
24915
24915
|
),
|
24916
|
-
|
24916
|
+
he && /* @__PURE__ */ t(eb, { onClose: $ })
|
24917
24917
|
]
|
24918
24918
|
}
|
24919
24919
|
);
|
@@ -24925,8 +24925,8 @@ class rb {
|
|
24925
24925
|
visibleListLength = 5;
|
24926
24926
|
constructor(n) {
|
24927
24927
|
this.globalStore = n, this.selectedDateRange = {
|
24928
|
-
start: mo(
|
24929
|
-
end:
|
24928
|
+
start: mo(Ze(Ht(/* @__PURE__ */ new Date(), 6)), 1),
|
24929
|
+
end: Ze(/* @__PURE__ */ new Date())
|
24930
24930
|
}, Fe(this);
|
24931
24931
|
}
|
24932
24932
|
setSelectedCategoryData = (n) => {
|
@@ -24998,7 +24998,7 @@ class sb {
|
|
24998
24998
|
loadAppData = async (n) => {
|
24999
24999
|
try {
|
25000
25000
|
const i = n || await this.api.getAppData();
|
25001
|
-
|
25001
|
+
ee(() => {
|
25002
25002
|
this.appData = i, this.bannerApi = new Sr(i.address?.bullseye || "/");
|
25003
25003
|
});
|
25004
25004
|
} catch (i) {
|
@@ -25008,7 +25008,7 @@ class sb {
|
|
25008
25008
|
loadBanner = async () => {
|
25009
25009
|
try {
|
25010
25010
|
const n = this.user?.guid ?? null, i = n ? await this.bannerApi.getBanner(n) : {};
|
25011
|
-
|
25011
|
+
ee(() => {
|
25012
25012
|
this.banner = i;
|
25013
25013
|
});
|
25014
25014
|
} catch (n) {
|
@@ -25036,8 +25036,8 @@ class lb {
|
|
25036
25036
|
selectedAccountGuids = this.selectedAccounts.map((n) => n.guid);
|
25037
25037
|
displayedDate = /* @__PURE__ */ new Date();
|
25038
25038
|
displayedDateRange = {
|
25039
|
-
start:
|
25040
|
-
end:
|
25039
|
+
start: Ye(this.displayedDate),
|
25040
|
+
end: Ze(this.displayedDate)
|
25041
25041
|
};
|
25042
25042
|
constructor(n) {
|
25043
25043
|
Fe(this), this.globalStore = n;
|
@@ -25096,7 +25096,7 @@ class db {
|
|
25096
25096
|
loadUserFeatures = async (n) => {
|
25097
25097
|
try {
|
25098
25098
|
const i = n || await this.api.getUserFeatures();
|
25099
|
-
|
25099
|
+
ee(() => {
|
25100
25100
|
this.userFeatures = i;
|
25101
25101
|
});
|
25102
25102
|
} catch (i) {
|
@@ -26618,7 +26618,7 @@ class Gb {
|
|
26618
26618
|
addAccount = async (n) => {
|
26619
26619
|
try {
|
26620
26620
|
const i = await this.api.createAccount(n);
|
26621
|
-
|
26621
|
+
ee(() => {
|
26622
26622
|
this.accounts = [...this.accounts, i];
|
26623
26623
|
});
|
26624
26624
|
} catch (i) {
|
@@ -26649,7 +26649,7 @@ class Gb {
|
|
26649
26649
|
await this.loadMembers();
|
26650
26650
|
try {
|
26651
26651
|
const i = n || await this.api.getAccounts();
|
26652
|
-
|
26652
|
+
ee(() => {
|
26653
26653
|
this.accounts = this.sortAccounts(this.augmentAccounts(i));
|
26654
26654
|
});
|
26655
26655
|
} catch (i) {
|
@@ -26659,7 +26659,7 @@ class Gb {
|
|
26659
26659
|
loadInstitutions = async (n) => {
|
26660
26660
|
try {
|
26661
26661
|
const i = n || await this.api.getInstitutions();
|
26662
|
-
|
26662
|
+
ee(() => {
|
26663
26663
|
this.institutions = i;
|
26664
26664
|
});
|
26665
26665
|
} catch (i) {
|
@@ -26669,7 +26669,7 @@ class Gb {
|
|
26669
26669
|
loadMembers = async () => {
|
26670
26670
|
try {
|
26671
26671
|
const n = await this.api.getMembers();
|
26672
|
-
|
26672
|
+
ee(() => {
|
26673
26673
|
this.members = n;
|
26674
26674
|
});
|
26675
26675
|
} catch (n) {
|
@@ -26679,7 +26679,7 @@ class Gb {
|
|
26679
26679
|
mergeAccounts = async (n) => {
|
26680
26680
|
try {
|
26681
26681
|
const i = await this.api.mergeAccounts(n), a = i[Object.keys(i)[0]];
|
26682
|
-
|
26682
|
+
ee(() => {
|
26683
26683
|
const o = this.accounts.findIndex((s) => s.guid === n[1]);
|
26684
26684
|
this.accounts.splice(o, 1);
|
26685
26685
|
const r = this.accounts.findIndex((s) => s.guid === n[0]);
|
@@ -26702,7 +26702,7 @@ class Gb {
|
|
26702
26702
|
};
|
26703
26703
|
removeAccount = async (n) => {
|
26704
26704
|
try {
|
26705
|
-
await this.api.deleteAccount(n),
|
26705
|
+
await this.api.deleteAccount(n), ee(() => {
|
26706
26706
|
const i = this.accounts.findIndex((a) => a.guid === n);
|
26707
26707
|
this.accounts.splice(i, 1);
|
26708
26708
|
});
|
@@ -26713,7 +26713,7 @@ class Gb {
|
|
26713
26713
|
updateAccount = async (n) => {
|
26714
26714
|
try {
|
26715
26715
|
const i = await this.api.updateAccount(n);
|
26716
|
-
|
26716
|
+
ee(() => {
|
26717
26717
|
const a = this.accounts.findIndex(
|
26718
26718
|
(o) => o.guid === i.guid
|
26719
26719
|
);
|
@@ -27309,7 +27309,7 @@ const Jb = ({
|
|
27309
27309
|
return g.useEffect(() => {
|
27310
27310
|
s(n);
|
27311
27311
|
}, [n]), g.useEffect(() => {
|
27312
|
-
_ && !o && m(h,
|
27312
|
+
_ && !o && m(h, Ye(/* @__PURE__ */ new Date()), Ze(/* @__PURE__ */ new Date())).then(
|
27313
27313
|
() => {
|
27314
27314
|
r().finally();
|
27315
27315
|
}
|
@@ -27703,7 +27703,7 @@ const Jb = ({
|
|
27703
27703
|
});
|
27704
27704
|
};
|
27705
27705
|
return /* @__PURE__ */ d(bt, { elevation: 2, children: [
|
27706
|
-
/* @__PURE__ */ t(_n, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(
|
27706
|
+
/* @__PURE__ */ t(_n, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(qe, { children: n.budget_categories_title }) }),
|
27707
27707
|
/* @__PURE__ */ t(Pt, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ t(ae, { children: i.map((r) => /* @__PURE__ */ d(g.Fragment, { children: [
|
27708
27708
|
/* @__PURE__ */ t(hy, { budget: r, onClick: o }),
|
27709
27709
|
/* @__PURE__ */ t(P, {})
|
@@ -27746,7 +27746,7 @@ const Jb = ({
|
|
27746
27746
|
}), p(!0), n(F.BUDGETS_CLICK_EDIT_INCOME);
|
27747
27747
|
};
|
27748
27748
|
return /* @__PURE__ */ d(bt, { elevation: 2, sx: { overflow: "visible" }, children: [
|
27749
|
-
/* @__PURE__ */ t(_n, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(
|
27749
|
+
/* @__PURE__ */ t(_n, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(qe, { children: a.overview_title }) }),
|
27750
27750
|
/* @__PURE__ */ t(Pt, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(b, { gap: 24, children: [
|
27751
27751
|
/* @__PURE__ */ d(b, { gap: 8, children: [
|
27752
27752
|
/* @__PURE__ */ t(C, { bold: !0, sx: { mb: 8 }, variant: "Body", children: a.spending_title }),
|
@@ -27804,21 +27804,21 @@ const Jb = ({
|
|
27804
27804
|
detailedBudgets: w
|
27805
27805
|
} = ut(), { loadRepeatingTransactions: v, setDateRange: N } = rt(), { reloadCategoryTotals: R } = Ue(), { isSmallTablet: M, isMobile: k, isSmallMobile: G } = Ce(), L = M || k || G, [W, Y] = g.useState(!1);
|
27806
27806
|
g.useEffect(() => {
|
27807
|
-
I(i), h(o),
|
27807
|
+
I(i), h(o), y({ start: Ye(xe()), end: Ze(xe()) }), a(F.BUDGETS_VIEW);
|
27808
27808
|
}, []), g.useEffect(() => {
|
27809
27809
|
h(o);
|
27810
27810
|
}, [o]), g.useEffect(() => {
|
27811
|
-
l && (R(u, p.start, p.end).finally(), N(p), f || (v().finally(), S().finally()));
|
27811
|
+
l && (_(p.start, p.end), R(u, p.start, p.end).finally(), N(p), f || (v().finally(), S().finally()));
|
27812
27812
|
}, [l, u, p]);
|
27813
|
-
const
|
27814
|
-
y({ start:
|
27815
|
-
},
|
27813
|
+
const J = (ue) => {
|
27814
|
+
y({ start: ue[0] || /* @__PURE__ */ new Date(), end: ue[1] || /* @__PURE__ */ new Date() });
|
27815
|
+
}, he = () => {
|
27816
27816
|
a(F.BUDGETS_CLICK_FILTER);
|
27817
27817
|
}, _e = () => {
|
27818
27818
|
Y(!0), a(F.BUDGETS_CLICK_ADD);
|
27819
27819
|
}, Le = () => {
|
27820
27820
|
Y(!1);
|
27821
|
-
}, Re = sn(p.end,
|
27821
|
+
}, Re = sn(p.end, Ye(/* @__PURE__ */ new Date()));
|
27822
27822
|
return !c || !l || !f ? /* @__PURE__ */ t(ce, {}) : /* @__PURE__ */ d(
|
27823
27823
|
Ct,
|
27824
27824
|
{
|
@@ -27830,8 +27830,12 @@ const Jb = ({
|
|
27830
27830
|
onClick: _e
|
27831
27831
|
}
|
27832
27832
|
],
|
27833
|
-
calendarActions: {
|
27834
|
-
|
27833
|
+
calendarActions: {
|
27834
|
+
onRangeChanged: J,
|
27835
|
+
shouldDisableNext: Re,
|
27836
|
+
shouldDisablePicker: !0
|
27837
|
+
},
|
27838
|
+
onAccountsFilterClick: he,
|
27835
27839
|
onBackClick: e,
|
27836
27840
|
sx: n,
|
27837
27841
|
title: r.budgets_title,
|
@@ -28527,7 +28531,7 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
28527
28531
|
), My = () => {
|
28528
28532
|
const {
|
28529
28533
|
investments: { analysis: e }
|
28530
|
-
} = A(), { analysisChartData: n, analysisDetails: i, analysisType: a, setAnalysisType: o } = Xn(), r = hn("(min-width:320px) and (max-width:375px)"), { isMobile: s } = Ce(), l =
|
28534
|
+
} = A(), { analysisChartData: n, analysisDetails: i, analysisType: a, setAnalysisType: o } = Xn(), r = hn("(min-width:320px) and (max-width:375px)"), { isMobile: s } = Ce(), l = je().palette.mode === "dark", { cellDimension: u, columns: _, rows: h, textVariant: m } = g.useMemo(() => {
|
28531
28535
|
const p = a === Hn.Stocks, f = Object.values(p ? e.stock_column_labels : e.bond_column_labels), S = Object.values(p ? e.stock_row_labels : e.bond_row_labels);
|
28532
28536
|
return { cellDimension: s ? 72 : 100, columns: f, rows: S, textVariant: s ? "XSmall" : "Body" };
|
28533
28537
|
}, [e, s, a]);
|
@@ -29170,10 +29174,10 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29170
29174
|
const be = Number(E);
|
29171
29175
|
if (c({ ...pe, cost_basis: be }), e) {
|
29172
29176
|
const fe = _.holdings.map(
|
29173
|
-
(
|
29177
|
+
(we) => we.id === $ ? { ...we, costBasis: be } : we
|
29174
29178
|
);
|
29175
|
-
h((
|
29176
|
-
...
|
29179
|
+
h((we) => ({
|
29180
|
+
...we,
|
29177
29181
|
holdings: fe
|
29178
29182
|
}));
|
29179
29183
|
}
|
@@ -29183,14 +29187,14 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29183
29187
|
...fe,
|
29184
29188
|
[$]: be
|
29185
29189
|
}));
|
29186
|
-
}, { visibleHoldings:
|
29190
|
+
}, { visibleHoldings: J } = Xn(), { visibleInvestmentAccounts: he } = Se(), _e = he.filter(
|
29187
29191
|
({ guid: $ }) => r.includes($)
|
29188
|
-
), Le = _e.reduce(($, pe) => $ + (pe.balance || 0), 0), Re = _e.map(({ guid: $ }) => $), me =
|
29192
|
+
), Le = _e.reduce(($, pe) => $ + (pe.balance || 0), 0), Re = _e.map(({ guid: $ }) => $), me = J.filter(
|
29189
29193
|
({ account_guid: $ }) => Re.includes($)
|
29190
29194
|
).reduce(($, pe) => {
|
29191
29195
|
const be = pe.market_value ? pe.market_value - (pe.cost_basis || 0) : 0;
|
29192
29196
|
return $ + be;
|
29193
|
-
}, 0),
|
29197
|
+
}, 0), Qe = () => {
|
29194
29198
|
o(!1);
|
29195
29199
|
};
|
29196
29200
|
return f ? /* @__PURE__ */ d(Me, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
|
@@ -29227,7 +29231,7 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29227
29231
|
] })
|
29228
29232
|
] }),
|
29229
29233
|
_e.map(($) => {
|
29230
|
-
const pe =
|
29234
|
+
const pe = J.filter((K) => K.account_guid === $.guid).map((K) => ({
|
29231
29235
|
id: K.guid,
|
29232
29236
|
qty: K.shares || 0,
|
29233
29237
|
holding: K.symbol || K.description || "Unknown",
|
@@ -29235,10 +29239,10 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29235
29239
|
totalGainLoss: K.market_value ? K.market_value - (K.cost_basis || 0) : 0,
|
29236
29240
|
marketValue: K.market_value || 0,
|
29237
29241
|
description: K.description || ""
|
29238
|
-
})), be = pe.length > 0, fe = $.balance,
|
29242
|
+
})), be = pe.length > 0, fe = $.balance, we = pe.reduce(
|
29239
29243
|
(K, He) => He.totalGainLoss + K,
|
29240
29244
|
0
|
29241
|
-
), Ge = fe ?
|
29245
|
+
), Ge = fe ? we / fe * 100 : 0;
|
29242
29246
|
if (e)
|
29243
29247
|
return /* @__PURE__ */ t(
|
29244
29248
|
Nt,
|
@@ -29331,19 +29335,19 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29331
29335
|
justifyContent: "flex-end"
|
29332
29336
|
},
|
29333
29337
|
children: [
|
29334
|
-
|
29338
|
+
we !== 0 && /* @__PURE__ */ t(
|
29335
29339
|
pt,
|
29336
29340
|
{
|
29337
|
-
name:
|
29341
|
+
name: we > 0 ? "trending_up" : "trending_down",
|
29338
29342
|
size: 20,
|
29339
|
-
sx: { color: M(
|
29343
|
+
sx: { color: M(we) }
|
29340
29344
|
}
|
29341
29345
|
),
|
29342
29346
|
/* @__PURE__ */ d(
|
29343
29347
|
C,
|
29344
29348
|
{
|
29345
29349
|
sx: {
|
29346
|
-
color: M(
|
29350
|
+
color: M(we),
|
29347
29351
|
fontWeight: 600
|
29348
29352
|
},
|
29349
29353
|
variant: "Body",
|
@@ -29358,11 +29362,11 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29358
29362
|
C,
|
29359
29363
|
{
|
29360
29364
|
sx: {
|
29361
|
-
color: M(
|
29365
|
+
color: M(we),
|
29362
29366
|
fontWeight: 600
|
29363
29367
|
},
|
29364
29368
|
variant: "Body",
|
29365
|
-
children: Math.abs(
|
29369
|
+
children: Math.abs(we).toLocaleString("en-US", {
|
29366
29370
|
currency: "USD",
|
29367
29371
|
maximumFractionDigits: 2,
|
29368
29372
|
minimumFractionDigits: 2,
|
@@ -29475,19 +29479,19 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29475
29479
|
justifyContent: "flex-end"
|
29476
29480
|
},
|
29477
29481
|
children: [
|
29478
|
-
|
29482
|
+
we !== 0 && /* @__PURE__ */ t(
|
29479
29483
|
pt,
|
29480
29484
|
{
|
29481
|
-
name:
|
29485
|
+
name: we >= 0 ? "trending_up" : "trending_down",
|
29482
29486
|
size: 20,
|
29483
|
-
sx: { color: M(
|
29487
|
+
sx: { color: M(we) }
|
29484
29488
|
}
|
29485
29489
|
),
|
29486
29490
|
/* @__PURE__ */ d(
|
29487
29491
|
C,
|
29488
29492
|
{
|
29489
29493
|
sx: {
|
29490
|
-
color: M(
|
29494
|
+
color: M(we),
|
29491
29495
|
fontWeight: 600
|
29492
29496
|
},
|
29493
29497
|
variant: "Body",
|
@@ -29502,11 +29506,11 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29502
29506
|
C,
|
29503
29507
|
{
|
29504
29508
|
sx: {
|
29505
|
-
color: M(
|
29509
|
+
color: M(we),
|
29506
29510
|
fontWeight: 600
|
29507
29511
|
},
|
29508
29512
|
variant: "Body",
|
29509
|
-
children: Math.abs(
|
29513
|
+
children: Math.abs(we).toLocaleString("en-US", {
|
29510
29514
|
currency: "USD",
|
29511
29515
|
maximumFractionDigits: 2,
|
29512
29516
|
minimumFractionDigits: 2,
|
@@ -29560,7 +29564,7 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29560
29564
|
handleCostBasisClick: k,
|
29561
29565
|
handleCostBasisKeyDown: L,
|
29562
29566
|
isOpen: a,
|
29563
|
-
onClose:
|
29567
|
+
onClose: Qe
|
29564
29568
|
}
|
29565
29569
|
),
|
29566
29570
|
/* @__PURE__ */ t(
|
@@ -29830,8 +29834,8 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
29830
29834
|
g.useEffect(() => {
|
29831
29835
|
c(
|
29832
29836
|
a,
|
29833
|
-
|
29834
|
-
|
29837
|
+
Ye(/* @__PURE__ */ new Date()),
|
29838
|
+
Ze(/* @__PURE__ */ new Date())
|
29835
29839
|
).finally();
|
29836
29840
|
}, [a]);
|
29837
29841
|
const [u, _] = g.useState(""), [h, m] = g.useState(0), p = g.useMemo(
|
@@ -30074,32 +30078,32 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
30074
30078
|
), k = g.useMemo(
|
30075
30079
|
() => h.find((Y) => Y.guid === I),
|
30076
30080
|
[I, h]
|
30077
|
-
), G = (Y,
|
30078
|
-
E(
|
30081
|
+
), G = (Y, J) => {
|
30082
|
+
E(J), S("");
|
30079
30083
|
}, L = (Y) => {
|
30080
30084
|
S(f === Y || Y === "0" ? "" : Y);
|
30081
30085
|
}, W = (Y) => {
|
30082
|
-
const
|
30086
|
+
const J = {
|
30083
30087
|
accounts: m || u,
|
30084
30088
|
dateRange: c
|
30085
30089
|
};
|
30086
30090
|
if (y === 0)
|
30087
30091
|
if (Y === "other") {
|
30088
|
-
const
|
30092
|
+
const he = R.categoryData.find((_e) => _e.guid === "other");
|
30089
30093
|
_({
|
30090
|
-
...
|
30091
|
-
custom: (_e) => !!
|
30094
|
+
...J,
|
30095
|
+
custom: (_e) => !!he?.categoryTotals?.find((Le) => Le.guid === _e.top_level_category_guid)
|
30092
30096
|
});
|
30093
30097
|
} else
|
30094
30098
|
_({
|
30095
|
-
...
|
30096
|
-
custom: (
|
30099
|
+
...J,
|
30100
|
+
custom: (he) => Y ? he.top_level_category_guid === Y : he.top_level_category_guid !== D.INCOME && he.top_level_category_guid !== D.INVESTMENTS && he.top_level_category_guid !== D.TRANSFER,
|
30097
30101
|
showSplits: !!Y
|
30098
30102
|
});
|
30099
30103
|
else
|
30100
30104
|
_({
|
30101
|
-
...
|
30102
|
-
custom: (
|
30105
|
+
...J,
|
30106
|
+
custom: (he) => Y ? he.category_guid === Y : he.category_guid === D.INCOME || he.top_level_category_guid === D.INCOME
|
30103
30107
|
});
|
30104
30108
|
N(!0);
|
30105
30109
|
};
|
@@ -30176,7 +30180,7 @@ const Sy = ({ widgets: e, isLoading: n }) => {
|
|
30176
30180
|
g.useEffect(() => {
|
30177
30181
|
c(i);
|
30178
30182
|
}, [i]), g.useEffect(() => {
|
30179
|
-
_ && Array.isArray(_) && _.length === 2 ? s(_[0], _[1]) : s(
|
30183
|
+
_ && Array.isArray(_) && _.length === 2 ? s(_[0], _[1]) : s(Ye(xe()), Ze(xe())), m(!0), l(F.SPENDING_VIEW);
|
30180
30184
|
}, []);
|
30181
30185
|
const p = (f) => {
|
30182
30186
|
s(f[0], f[1]);
|
@@ -30250,7 +30254,7 @@ export {
|
|
30250
30254
|
E2 as CreditScoreGraph,
|
30251
30255
|
oa as CurrencyCodes,
|
30252
30256
|
en as CurrencyInput,
|
30253
|
-
|
30257
|
+
Xe as CurrencyText,
|
30254
30258
|
ie as DATE_FORMATS_INTL,
|
30255
30259
|
gc as DEFAULT_DONUT_SIZE,
|
30256
30260
|
mc as DEFAULT_STROKE_WIDTH,
|