@mx-cartographer/experiences 6.2.9-alpha.mega3 → 6.2.9-alpha.mega4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +641 -638
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -6,7 +6,7 @@ import k from "@mui/material/Divider";
|
|
6
6
|
import ne from "@mui/material/List";
|
7
7
|
import Rt from "@mui/material/ListSubheader";
|
8
8
|
import Se from "@mui/system/Stack";
|
9
|
-
import { AccountsIcon as Al, P as Oe, Icon as P, useTokens as ft, Text as p, H2 as Fn, CategoryIcon as kt, DialogHeader as
|
9
|
+
import { AccountsIcon as Al, P as Oe, Icon as P, useTokens as ft, Text as p, H2 as Fn, CategoryIcon as kt, DialogHeader as xl, DialogFooter as Il, Drawer as vl, Footer as wl, DateRangePicker as Jo, H3 as mt, H1 as en, TextField as xn, IconWeight as yt, MerchantLogo as un, CategoryIconVariants as ws, InstitutionLogo as pt, ChevronRightIcon as Nl, THEMES as er } from "@mxenabled/mxui";
|
10
10
|
import Dl from "bowser";
|
11
11
|
import { getUnixTime as ke } from "date-fns/getUnixTime";
|
12
12
|
import { intlFormat as Rl } from "date-fns/intlFormat";
|
@@ -16,7 +16,7 @@ import { addWeeks as Jn } from "date-fns/addWeeks";
|
|
16
16
|
import { addYears as ii } from "date-fns/addYears";
|
17
17
|
import { getDay as ai } from "date-fns/getDay";
|
18
18
|
import { isBefore as we } from "date-fns/isBefore";
|
19
|
-
import { nextDay as
|
19
|
+
import { nextDay as xi } from "date-fns/nextDay";
|
20
20
|
import { setDate as ea } from "date-fns/setDate";
|
21
21
|
import { startOfToday as _e } from "date-fns/startOfToday";
|
22
22
|
import { fromUnixTime as Ge } from "date-fns/fromUnixTime";
|
@@ -57,7 +57,7 @@ import Gt from "@mui/material/Card";
|
|
57
57
|
import Bt from "@mui/material/CardContent";
|
58
58
|
import Qe from "@mui/material/Grid";
|
59
59
|
import { differenceInCalendarDays as id } from "date-fns/differenceInCalendarDays";
|
60
|
-
import { endOfToday as
|
60
|
+
import { endOfToday as In } from "date-fns/endOfToday";
|
61
61
|
import { endOfYear as ir } from "date-fns/endOfYear";
|
62
62
|
import { startOfYear as ar } from "date-fns/startOfYear";
|
63
63
|
import { subDays as _t } from "date-fns/subDays";
|
@@ -82,12 +82,12 @@ import Pe from "@mui/material/ListItemAvatar";
|
|
82
82
|
import Ct from "@mui/material/ListItemIcon";
|
83
83
|
import ma from "@mui/material/Switch";
|
84
84
|
import { makeAutoObservable as He, runInAction as Y, reaction as Td, observable as Ad } from "mobx";
|
85
|
-
import
|
86
|
-
import { differenceInDays as
|
85
|
+
import xd, { SurveyQuestionType as or } from "posthog-js";
|
86
|
+
import { differenceInDays as Id } from "date-fns/differenceInDays";
|
87
87
|
import pa from "@mui/icons-material/ChevronRight";
|
88
88
|
import Ca from "@mui/icons-material/ExpandMore";
|
89
89
|
import { DataGridPro as Xn } from "@mui/x-data-grid-pro";
|
90
|
-
import { intervalToDuration as vd, formatDuration as wd, getDate as rr, fromUnixTime as
|
90
|
+
import { intervalToDuration as vd, formatDuration as wd, getDate as rr, fromUnixTime as Ii, startOfMonth as sr, format as Ln, differenceInMonths as Nd, isSameDay as Dd, subDays as Rd, startOfToday as Od, endOfToday as Ld } from "date-fns";
|
91
91
|
import vn from "@mui/material/Alert";
|
92
92
|
import Li from "@mui/material/Snackbar";
|
93
93
|
import { useVirtualizer as Ms } from "@tanstack/react-virtual";
|
@@ -838,7 +838,7 @@ const hn = 44, hr = (e, n) => e.find((i) => i.guid === n), mu = (e, n) => e.find
|
|
838
838
|
return i ? i.guid === N.INCOME || i.parent_guid === N.INCOME : !1;
|
839
839
|
}, Ta = (e) => {
|
840
840
|
const n = ai(e);
|
841
|
-
let i =
|
841
|
+
let i = xi(e, n);
|
842
842
|
for (; we(i, _e()); )
|
843
843
|
i = Jn(i, 1);
|
844
844
|
return i;
|
@@ -1332,7 +1332,7 @@ const Va = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1332
1332
|
) }),
|
1333
1333
|
sx: { overflow: "auto", width: "100%" },
|
1334
1334
|
children: T.map((v) => {
|
1335
|
-
const
|
1335
|
+
const I = d[v.guid], R = `${v.name}${h && v.accountNumber ? ` *${v.accountNumber.slice(-4)}` : ""}`;
|
1336
1336
|
return /* @__PURE__ */ t(
|
1337
1337
|
j,
|
1338
1338
|
{
|
@@ -1345,8 +1345,8 @@ const Va = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1345
1345
|
control: /* @__PURE__ */ t(
|
1346
1346
|
ta,
|
1347
1347
|
{
|
1348
|
-
checked:
|
1349
|
-
"data-ui-test": `checked-${
|
1348
|
+
checked: I,
|
1349
|
+
"data-ui-test": `checked-${I}`,
|
1350
1350
|
disableRipple: !0,
|
1351
1351
|
id: v.guid,
|
1352
1352
|
onChange: () => {
|
@@ -1501,8 +1501,8 @@ const Tu = (e, n) => {
|
|
1501
1501
|
}
|
1502
1502
|
)
|
1503
1503
|
] });
|
1504
|
-
},
|
1505
|
-
const a = ft(), o =
|
1504
|
+
}, xu = ({ color: e, labelAverage: n, labelMain: i }) => {
|
1505
|
+
const a = ft(), o = Iu(a, e);
|
1506
1506
|
return /* @__PURE__ */ l("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
|
1507
1507
|
/* @__PURE__ */ t("div", { "aria-label": i, className: "mx-cmn-color-square", role: "img" }),
|
1508
1508
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: i }),
|
@@ -1513,7 +1513,7 @@ const Tu = (e, n) => {
|
|
1513
1513
|
] }),
|
1514
1514
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: n })
|
1515
1515
|
] });
|
1516
|
-
},
|
1516
|
+
}, Iu = (e, n) => tn({
|
1517
1517
|
alignItems: "center",
|
1518
1518
|
display: "flex",
|
1519
1519
|
gap: e.Spacing.XSmall,
|
@@ -1704,11 +1704,11 @@ const Tu = (e, n) => {
|
|
1704
1704
|
selectedIndex: d,
|
1705
1705
|
valueFormatter: _ = (u) => `${u}`
|
1706
1706
|
}) => {
|
1707
|
-
const u = ft(), h = Lu(u), m = a.reduce(Ru, []), C = e !== void 0 ? e : m.reduce(Nu, 0) / m.length, f = Math.max(...m), E = Math.min(...m), b = m.reduce(Du, 0), T = f >= 0, w = E < 0, v = Er(T, w, o),
|
1707
|
+
const u = ft(), h = Lu(u), m = a.reduce(Ru, []), C = e !== void 0 ? e : m.reduce(Nu, 0) / m.length, f = Math.max(...m), E = Math.min(...m), b = m.reduce(Du, 0), T = f >= 0, w = E < 0, v = Er(T, w, o), I = Er(w, T, o), R = Ou(C, f, E, v || I), D = (O) => d === void 0 || O === d ? i : `${i}80`, H = () => /* @__PURE__ */ t(
|
1708
1708
|
yr,
|
1709
1709
|
{
|
1710
1710
|
averageLineHeight: R,
|
1711
|
-
bottomHeight:
|
1711
|
+
bottomHeight: I,
|
1712
1712
|
color: "",
|
1713
1713
|
range: b,
|
1714
1714
|
topHeight: v,
|
@@ -1725,7 +1725,7 @@ const Tu = (e, n) => {
|
|
1725
1725
|
{
|
1726
1726
|
ariaLabel: O.ariaLabel,
|
1727
1727
|
averageLineHeight: R,
|
1728
|
-
bottomHeight:
|
1728
|
+
bottomHeight: I,
|
1729
1729
|
color: D(M),
|
1730
1730
|
index: M,
|
1731
1731
|
onClick: c,
|
@@ -1741,7 +1741,7 @@ const Tu = (e, n) => {
|
|
1741
1741
|
/* @__PURE__ */ t(H, {})
|
1742
1742
|
] }, `column-${M}`))
|
1743
1743
|
] }),
|
1744
|
-
/* @__PURE__ */ t(
|
1744
|
+
/* @__PURE__ */ t(xu, { color: i, labelAverage: r, labelMain: s })
|
1745
1745
|
] });
|
1746
1746
|
}, Lu = (e) => tn({
|
1747
1747
|
"& .mx-cmn-chart-container": {
|
@@ -1871,14 +1871,14 @@ const Hu = ({
|
|
1871
1871
|
h(n), C(i), n && _(n);
|
1872
1872
|
}, [n, i]);
|
1873
1873
|
const f = g.useMemo(() => {
|
1874
|
-
const v = Hl({ start: We(d), end: je(d) }),
|
1874
|
+
const v = Hl({ start: We(d), end: je(d) }), I = [];
|
1875
1875
|
for (let R = 0; R < v.length; R++) {
|
1876
1876
|
const D = v[R], H = Pl({ start: D, end: Mt(D, 6) }), O = [];
|
1877
1877
|
for (let M = 0; M < H.length; M++)
|
1878
1878
|
O.push(H[M]);
|
1879
|
-
|
1879
|
+
I.push(O);
|
1880
1880
|
}
|
1881
|
-
return
|
1881
|
+
return I;
|
1882
1882
|
}, [d]), E = (v) => {
|
1883
1883
|
if (r !== "None") {
|
1884
1884
|
if (r === "Single") {
|
@@ -1905,8 +1905,8 @@ const Hu = ({
|
|
1905
1905
|
onPreviousClick: w
|
1906
1906
|
}
|
1907
1907
|
),
|
1908
|
-
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-row", children: f[0].map((v,
|
1909
|
-
f.map((v,
|
1908
|
+
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-row", children: f[0].map((v, I) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ t(p, { bold: !0, variant: "Small", children: wt(v, "EEEEE") }) }, I)) }),
|
1909
|
+
f.map((v, I) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-week", children: v.map((R, D) => /* @__PURE__ */ t(
|
1910
1910
|
Gu,
|
1911
1911
|
{
|
1912
1912
|
beginDate: u,
|
@@ -1916,7 +1916,7 @@ const Hu = ({
|
|
1916
1916
|
onClick: E
|
1917
1917
|
},
|
1918
1918
|
D
|
1919
|
-
)) }, `w-${
|
1919
|
+
)) }, `w-${I}`)),
|
1920
1920
|
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ t(te, { onClick: b, size: "small", variant: "text", children: e.today }) })
|
1921
1921
|
] }) });
|
1922
1922
|
}, $u = (e) => tn({
|
@@ -2071,7 +2071,7 @@ const Hu = ({
|
|
2071
2071
|
average: n,
|
2072
2072
|
style: i
|
2073
2073
|
}) => {
|
2074
|
-
const { common: a } =
|
2074
|
+
const { common: a } = x();
|
2075
2075
|
return /* @__PURE__ */ l(ye, { style: { flexDirection: "row", gap: 25, ...i }, children: [
|
2076
2076
|
e.map((o, r) => /* @__PURE__ */ l(ye, { style: { alignItems: "center", flexDirection: "row" }, children: [
|
2077
2077
|
/* @__PURE__ */ t(
|
@@ -2096,7 +2096,7 @@ const Hu = ({
|
|
2096
2096
|
] })
|
2097
2097
|
] })
|
2098
2098
|
] });
|
2099
|
-
}, Yu = A(zu),
|
2099
|
+
}, Yu = A(zu), xo = ({
|
2100
2100
|
baseline: e = "max",
|
2101
2101
|
colors: n,
|
2102
2102
|
datasets: i,
|
@@ -2113,7 +2113,7 @@ const Hu = ({
|
|
2113
2113
|
valueFormatterString: C = "0,0",
|
2114
2114
|
width: f
|
2115
2115
|
}) => {
|
2116
|
-
const E = tt(), b = i.flat().map((D) => D.x), T = i.flat().map((D) => D.y), w = Math.round(T.reduce((D, H) => H + D, 0) / T.length), v = Math.floor(Math.min(...T) / 100) * 100,
|
2116
|
+
const E = tt(), b = i.flat().map((D) => D.x), T = i.flat().map((D) => D.y), w = Math.round(T.reduce((D, H) => H + D, 0) / T.length), v = Math.floor(Math.min(...T) / 100) * 100, I = Math.ceil(Math.max(...T) / 100) * 100, R = i.map((D, H) => ({
|
2117
2117
|
type: d ? "bar" : "line",
|
2118
2118
|
curve: "linear",
|
2119
2119
|
color: d ? E.palette.chart?.chart6 : n[H] ?? E.palette.primary.main,
|
@@ -2146,11 +2146,11 @@ const Hu = ({
|
|
2146
2146
|
yAxis: [
|
2147
2147
|
{
|
2148
2148
|
min: v,
|
2149
|
-
max:
|
2149
|
+
max: I || 100,
|
2150
2150
|
colorMap: _ ? {
|
2151
2151
|
type: "continuous",
|
2152
2152
|
min: v,
|
2153
|
-
max:
|
2153
|
+
max: I,
|
2154
2154
|
color: [E.palette.background.paper, n[0] ?? E.palette.primary.main]
|
2155
2155
|
} : void 0,
|
2156
2156
|
valueFormatter: (D) => B(D, C)
|
@@ -2259,13 +2259,13 @@ const Hu = ({
|
|
2259
2259
|
if (!n)
|
2260
2260
|
throw new Error(`${e}() must be used within the GlobalDataContext`);
|
2261
2261
|
return n;
|
2262
|
-
}, ve = () => qe("useAccountStore").globalStore.accountStore, Fi = () => qe("useAppConfig").globalStore.appDataStore.appConfig,
|
2262
|
+
}, ve = () => qe("useAccountStore").globalStore.accountStore, Fi = () => qe("useAppConfig").globalStore.appDataStore.appConfig, Io = () => qe("useAnalyticsStore").globalStore.analyticsStore, dt = () => qe("useBudgetsStore").globalStore.budgetsStore, vo = () => qe("useCashflowStore").globalStore.cashflowStore, Ke = () => qe("useCategoryStore").globalStore.categoryStore, rc = () => qe("useConnectStore").globalStore.connectStore, Aa = () => qe("useDebtsStore").globalStore.debtsStore, xa = () => qe("useGlobalStore").globalStore, ue = () => qe("useGlobalUiStore").globalStore.globalUiStore, x = () => qe("globalCopyStore").globalStore.copyStore.copy, rt = () => qe("useGoalStore").globalStore.goalStore, wo = () => qe("useHelpStore").globalStore.helpStore, wi = () => qe("useHoldingStore").globalStore.holdingStore, ju = () => qe("useMerchantStore").globalStore.merchantStore, Xu = () => qe("useNetWorthStore").globalStore.netWorthStore, sc = () => qe("useNotificationStore").globalStore.notificationStore, nt = () => qe("useRecurringActivityStore").globalStore.recurringActivityStore, Pt = () => qe("useRecurringTransactionsStore").globalStore.recurringTransactionsStore, Ht = () => qe("useSettingsStore").globalStore.settingsStore, Te = () => qe("useTransactionStore").globalStore.transactionStore, _n = () => qe("useUserStore").globalStore.userStore, z = () => ({ onEvent: qe().onEvent }), q2 = () => ({ onPageView: qe().onPageView }), qu = (e = "useWidgetContainerContext") => {
|
2263
2263
|
const n = g.useContext(ac);
|
2264
2264
|
if (!n)
|
2265
2265
|
throw new Error(`${e}() must be used within the WidgetContainerContext`);
|
2266
2266
|
return n;
|
2267
2267
|
}, Un = () => qu(), cc = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
2268
|
-
const { categories: i } =
|
2268
|
+
const { categories: i } = x(), { getCategoryName: a } = Ke(), o = a(e);
|
2269
2269
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
2270
2270
|
/* @__PURE__ */ t(
|
2271
2271
|
L,
|
@@ -2417,7 +2417,7 @@ const Hu = ({
|
|
2417
2417
|
hoveredAreaData: null,
|
2418
2418
|
isAreaHovered: !1,
|
2419
2419
|
cursorPos: { x: 0, y: 0 }
|
2420
|
-
}), { hoveredSeriesId: E, hoveredAreaData: b, isAreaHovered: T, cursorPos: w } = C, v = T && E && b,
|
2420
|
+
}), { hoveredSeriesId: E, hoveredAreaData: b, isAreaHovered: T, cursorPos: w } = C, v = T && E && b, I = !v, R = [...o, ...r], D = R[0]?.dataset.length ?? 0, H = R.flatMap((V) => V.dataset.map((pe) => pe.x)), O = R.flatMap((V) => V.dataset.map((pe) => pe.y)), M = o[0]?.dataset?.map(
|
2421
2421
|
(V, pe) => o.reduce((Me, Wt) => Me + Wt.dataset[pe]?.y || 0, 0)
|
2422
2422
|
) ?? [0], Z = Math.max(...M), U = Math.max(
|
2423
2423
|
...r.flatMap((V) => V.dataset.map((pe) => pe.y))
|
@@ -2546,7 +2546,7 @@ const Hu = ({
|
|
2546
2546
|
}
|
2547
2547
|
},
|
2548
2548
|
slots: {
|
2549
|
-
itemContent: (V) =>
|
2549
|
+
itemContent: (V) => I && E ? /* @__PURE__ */ t(
|
2550
2550
|
Ju,
|
2551
2551
|
{
|
2552
2552
|
categoryGuids: me(E),
|
@@ -2557,7 +2557,7 @@ const Hu = ({
|
|
2557
2557
|
},
|
2558
2558
|
sx: Ft,
|
2559
2559
|
tooltip: {
|
2560
|
-
trigger:
|
2560
|
+
trigger: I ? "item" : "none"
|
2561
2561
|
},
|
2562
2562
|
width: c,
|
2563
2563
|
xAxis: [
|
@@ -2662,7 +2662,7 @@ const Hu = ({
|
|
2662
2662
|
...m,
|
2663
2663
|
children: [
|
2664
2664
|
/* @__PURE__ */ t(
|
2665
|
-
|
2665
|
+
xl,
|
2666
2666
|
{
|
2667
2667
|
copy: { title: n.title, close_aria: n.close_aria },
|
2668
2668
|
onClose: o,
|
@@ -2671,7 +2671,7 @@ const Hu = ({
|
|
2671
2671
|
),
|
2672
2672
|
/* @__PURE__ */ t(Rs, { sx: { lineHeight: 1.5 }, children: h }),
|
2673
2673
|
/* @__PURE__ */ t(
|
2674
|
-
|
2674
|
+
Il,
|
2675
2675
|
{
|
2676
2676
|
isPrimaryDisabled: i,
|
2677
2677
|
onPrimaryAction: C,
|
@@ -2792,12 +2792,12 @@ const Hu = ({
|
|
2792
2792
|
calendarActions: e,
|
2793
2793
|
color: n = "primary",
|
2794
2794
|
copy: i,
|
2795
|
-
range: a = [We(_e()), je(
|
2795
|
+
range: a = [We(_e()), je(In())],
|
2796
2796
|
shouldShrinkToIcon: o = !0,
|
2797
2797
|
toolTipContent: r = "",
|
2798
2798
|
variant: s = "outlined"
|
2799
2799
|
}) => {
|
2800
|
-
const c = ge(), d = c.palette.mode === "dark", { isMobile: _ } = Ee(), [u, h] = g.useState(a), [m, C] = g.useState(i.dateRangePickerCopy.dateRangeThisMonth), [f, E] = g.useState(u), [b, T] = g.useState(!1), [w, v] = g.useState(!0), [
|
2800
|
+
const c = ge(), d = c.palette.mode === "dark", { isMobile: _ } = Ee(), [u, h] = g.useState(a), [m, C] = g.useState(i.dateRangePickerCopy.dateRangeThisMonth), [f, E] = g.useState(u), [b, T] = g.useState(!1), [w, v] = g.useState(!0), [I, R] = g.useState(6), D = {
|
2801
2801
|
buttons: [
|
2802
2802
|
{ label: "3M", value: 3 },
|
2803
2803
|
{ label: "6M", value: 6 },
|
@@ -2815,10 +2815,10 @@ const Hu = ({
|
|
2815
2815
|
E(a);
|
2816
2816
|
}, [a]), g.useEffect(() => {
|
2817
2817
|
(s === "timeframebuttons" || s === "timeframetabs") && e.onRangeChanged(H());
|
2818
|
-
}, [
|
2818
|
+
}, [I]);
|
2819
2819
|
const H = () => {
|
2820
|
-
const U = je(
|
2821
|
-
return [je(qt(U,
|
2820
|
+
const U = je(In());
|
2821
|
+
return [je(qt(U, I)), U];
|
2822
2822
|
}, O = (U) => {
|
2823
2823
|
const X = [...u], fe = u[0], $ = u[1], ce = U === "previous";
|
2824
2824
|
if (m === i.dateRangePickerCopy.dateRangeThisMonth)
|
@@ -2935,7 +2935,7 @@ const Hu = ({
|
|
2935
2935
|
color: n,
|
2936
2936
|
exclusive: !0,
|
2937
2937
|
orientation: "horizontal",
|
2938
|
-
value:
|
2938
|
+
value: I,
|
2939
2939
|
children: D.buttons.map((U) => /* @__PURE__ */ t(
|
2940
2940
|
Yn,
|
2941
2941
|
{
|
@@ -2976,7 +2976,7 @@ const Hu = ({
|
|
2976
2976
|
indicatorColor: "primary",
|
2977
2977
|
onChange: (U, X) => Z(X),
|
2978
2978
|
textColor: "primary",
|
2979
|
-
value:
|
2979
|
+
value: I,
|
2980
2980
|
variant: "fullWidth",
|
2981
2981
|
children: D.tabs.map((U) => /* @__PURE__ */ t(
|
2982
2982
|
Ve,
|
@@ -3246,7 +3246,7 @@ const Rn = ({
|
|
3246
3246
|
sx: h = {},
|
3247
3247
|
title: m = ""
|
3248
3248
|
}) => {
|
3249
|
-
const [C, { height: f, width: E }] = dc(), { onEvent: b } = z(), { isDesktop: T, isLargeDesktop: w, isMobile: v, isTablet:
|
3249
|
+
const [C, { height: f, width: E }] = dc(), { onEvent: b } = z(), { isDesktop: T, isLargeDesktop: w, isMobile: v, isTablet: I } = Ee(), { displayedDateRange: R, isCopyLoaded: D, selectedAccountGuids: H, setSelectedAccountGuids: O } = ue(), { common: M } = x(), Z = () => {
|
3250
3250
|
d && (d(), b(W.WIDGET_BACK_CLICK));
|
3251
3251
|
};
|
3252
3252
|
if (!D)
|
@@ -3294,7 +3294,7 @@ const Rn = ({
|
|
3294
3294
|
px: 4
|
3295
3295
|
},
|
3296
3296
|
"& .mx-cmn-date-range-selector": {
|
3297
|
-
...(v ||
|
3297
|
+
...(v || I) && {
|
3298
3298
|
textAlign: "center"
|
3299
3299
|
}
|
3300
3300
|
},
|
@@ -3340,7 +3340,7 @@ const Rn = ({
|
|
3340
3340
|
children: Ye
|
3341
3341
|
},
|
3342
3342
|
oe
|
3343
|
-
) : /* @__PURE__ */ t(Fe, { "aria-label": Ye, color: "primary", onClick: me, children: /* @__PURE__ */ t(P, { name: oe }) }, oe) : T ||
|
3343
|
+
) : /* @__PURE__ */ t(Fe, { "aria-label": Ye, color: "primary", onClick: me, children: /* @__PURE__ */ t(P, { name: oe }) }, oe) : T || I ? /* @__PURE__ */ t(
|
3344
3344
|
te,
|
3345
3345
|
{
|
3346
3346
|
onClick: me,
|
@@ -3355,7 +3355,7 @@ const Rn = ({
|
|
3355
3355
|
sx: {
|
3356
3356
|
"& .MuiCardHeader-action": {
|
3357
3357
|
...i && T && { flexGrow: 1 },
|
3358
|
-
...(v ||
|
3358
|
+
...(v || I) && {
|
3359
3359
|
alignSelf: "center"
|
3360
3360
|
},
|
3361
3361
|
mr: 0
|
@@ -3363,7 +3363,7 @@ const Rn = ({
|
|
3363
3363
|
p: T ? 48 : 24,
|
3364
3364
|
pb: 0
|
3365
3365
|
},
|
3366
|
-
title: T ||
|
3366
|
+
title: T || I ? /* @__PURE__ */ t(en, { children: m }) : /* @__PURE__ */ l(y, { alignItems: "center", flexDirection: "row", children: [
|
3367
3367
|
v && d && /* @__PURE__ */ t(
|
3368
3368
|
Fe,
|
3369
3369
|
{
|
@@ -3378,7 +3378,7 @@ const Rn = ({
|
|
3378
3378
|
}
|
3379
3379
|
),
|
3380
3380
|
c && /* @__PURE__ */ t(k, { sx: { mt: T ? 48 : 24 } }),
|
3381
|
-
i && (v ||
|
3381
|
+
i && (v || I) && /* @__PURE__ */ l(y, { gap: 24, justifyContent: "center", sx: { mt: v ? 0 : 16 }, children: [
|
3382
3382
|
u && /* @__PURE__ */ t(k, {}),
|
3383
3383
|
/* @__PURE__ */ t(
|
3384
3384
|
Sr,
|
@@ -3396,7 +3396,7 @@ const Rn = ({
|
|
3396
3396
|
}
|
3397
3397
|
);
|
3398
3398
|
}, Ot = A(o_), r_ = ({ status: e = Bn.Loading }) => {
|
3399
|
-
const { connect: n } =
|
3399
|
+
const { connect: n } = x();
|
3400
3400
|
return /* @__PURE__ */ t(
|
3401
3401
|
L,
|
3402
3402
|
{
|
@@ -3421,7 +3421,7 @@ const Rn = ({
|
|
3421
3421
|
}
|
3422
3422
|
);
|
3423
3423
|
}, sa = A(r_);
|
3424
|
-
var Bn = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Error = "error", e))(Bn || {}),
|
3424
|
+
var Bn = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Error = "error", e))(Bn || {}), It = /* @__PURE__ */ ((e) => (e.Currency = "currency", e.Date = "date", e.Input = "input", e.Select = "select", e))(It || {});
|
3425
3425
|
const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
3426
3426
|
loadWidgetProps: e,
|
3427
3427
|
onClose: n,
|
@@ -3429,7 +3429,7 @@ const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
|
3429
3429
|
title: a
|
3430
3430
|
}) => {
|
3431
3431
|
let o;
|
3432
|
-
const { refreshAccounts: r } = ve(), { loadWidget: s } = rc(), { connect: c } =
|
3432
|
+
const { refreshAccounts: r } = ve(), { loadWidget: s } = rc(), { connect: c } = x(), [d, _] = g.useState(!1), [u, h] = g.useState(!1), {
|
3433
3433
|
palette: { mode: m }
|
3434
3434
|
} = ge();
|
3435
3435
|
return g.useEffect(() => (i ? (_(!0), s({ mode: m, ...e }).then((C) => {
|
@@ -3480,7 +3480,7 @@ const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
|
3480
3480
|
setHasValidInput: u,
|
3481
3481
|
...h
|
3482
3482
|
}) => {
|
3483
|
-
const [m, C] = g.useState(""), { common: f } =
|
3483
|
+
const [m, C] = g.useState(""), { common: f } = x(), E = o || f.currency_input, b = ft(), T = c_(b), w = /^[0-9]*$/, v = /^(\d)*(\,)?([0-9]{1,2})?$/, I = /^(\d)*(\.)?([0-9]{1,2})?$/;
|
3484
3484
|
let R;
|
3485
3485
|
const D = g.useRef(Ed());
|
3486
3486
|
if (e)
|
@@ -3489,7 +3489,7 @@ const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
|
3489
3489
|
R = v;
|
3490
3490
|
break;
|
3491
3491
|
default:
|
3492
|
-
R =
|
3492
|
+
R = I;
|
3493
3493
|
break;
|
3494
3494
|
}
|
3495
3495
|
else
|
@@ -3511,7 +3511,7 @@ const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
|
3511
3511
|
), u?.(!1)) : O.toString().match(R) ? r() ? (C(""), u?.(!0)) : (C(s), u?.(!1)) : (C(E.error_amount_is_invalid), u?.(!1)), _(O.toString());
|
3512
3512
|
};
|
3513
3513
|
return /* @__PURE__ */ t(
|
3514
|
-
|
3514
|
+
xn,
|
3515
3515
|
{
|
3516
3516
|
InputProps: {
|
3517
3517
|
endAdornment: Hn().includes("fr-ca") ? /* @__PURE__ */ t(Oe, { children: "$" }) : void 0,
|
@@ -3590,7 +3590,7 @@ const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
|
3590
3590
|
}
|
3591
3591
|
);
|
3592
3592
|
return /* @__PURE__ */ t(L, { className: "mx-cmn-search-box", px: r.Spacing.Large, py: r.Spacing.Medium, children: /* @__PURE__ */ t(
|
3593
|
-
|
3593
|
+
xn,
|
3594
3594
|
{
|
3595
3595
|
InputProps: {
|
3596
3596
|
startAdornment: /* @__PURE__ */ t(na, { position: "start", children: /* @__PURE__ */ t(P, { color: "disabled", name: "search", size: 26 }) }),
|
@@ -3604,7 +3604,7 @@ const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
|
3604
3604
|
value: o
|
3605
3605
|
}
|
3606
3606
|
) });
|
3607
|
-
}, Wi = A(l_),
|
3607
|
+
}, Wi = A(l_), xr = ({
|
3608
3608
|
checked: e = !1,
|
3609
3609
|
label: n,
|
3610
3610
|
sx: i = {},
|
@@ -3838,7 +3838,7 @@ const Tr = "connect_widget", Ar = "connections_widget", s_ = ({
|
|
3838
3838
|
secondaryText: c,
|
3839
3839
|
zeroStateText: d
|
3840
3840
|
}) => {
|
3841
|
-
const { common: _ } =
|
3841
|
+
const { common: _ } = x(), [u, h] = g.useState(!1), m = () => {
|
3842
3842
|
h(!1), o?.();
|
3843
3843
|
}, C = () => {
|
3844
3844
|
h(!1), r();
|
@@ -4041,7 +4041,7 @@ class __ {
|
|
4041
4041
|
return this.survey ? this.survey.questions : [];
|
4042
4042
|
}
|
4043
4043
|
loadSurvey = (n = !1) => {
|
4044
|
-
|
4044
|
+
xd.getActiveMatchingSurveys((i) => {
|
4045
4045
|
Y(() => {
|
4046
4046
|
if (i.length > 0) {
|
4047
4047
|
const a = i.find((o) => o.id === this.surveyId);
|
@@ -4121,7 +4121,7 @@ class m_ {
|
|
4121
4121
|
});
|
4122
4122
|
};
|
4123
4123
|
}
|
4124
|
-
class
|
4124
|
+
class Ir {
|
4125
4125
|
fetchInstance;
|
4126
4126
|
constructor(n, i) {
|
4127
4127
|
this.fetchInstance = new ot(n, i);
|
@@ -4201,7 +4201,7 @@ const vr = (e, n) => !e && !n ? 0 : !e && n ? 101 : n / e * 100, wr = (e, n) =>
|
|
4201
4201
|
return so(a.subBudgets, n);
|
4202
4202
|
};
|
4203
4203
|
class b_ {
|
4204
|
-
api = new
|
4204
|
+
api = new Ir("/", "");
|
4205
4205
|
globalStore;
|
4206
4206
|
alert = "";
|
4207
4207
|
dateRange = { start: We(_e()), end: je(_e()) };
|
@@ -4211,7 +4211,7 @@ class b_ {
|
|
4211
4211
|
isDataLoaded = !1;
|
4212
4212
|
theme = {};
|
4213
4213
|
constructor(n) {
|
4214
|
-
this.globalStore = n, this.api = new
|
4214
|
+
this.globalStore = n, this.api = new Ir(n.endpoint, n.sessionToken), He(this);
|
4215
4215
|
}
|
4216
4216
|
loadBudgetData = async () => {
|
4217
4217
|
await this.loadBudgets(), Td(
|
@@ -4323,7 +4323,7 @@ const _i = () => {
|
|
4323
4323
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
4324
4324
|
return vo().uiStore;
|
4325
4325
|
}, y_ = ({ remaining: e }) => {
|
4326
|
-
const { cashflow: n } =
|
4326
|
+
const { cashflow: n } = x();
|
4327
4327
|
return /* @__PURE__ */ l(Q, { children: [
|
4328
4328
|
/* @__PURE__ */ t(
|
4329
4329
|
L,
|
@@ -4340,7 +4340,7 @@ const _i = () => {
|
|
4340
4340
|
/* @__PURE__ */ t(ze, { amount: e, bold: !0, sx: { fontSize: 12 } })
|
4341
4341
|
] });
|
4342
4342
|
}, No = A(y_), E_ = ({ onAddIncomeClick: e }) => {
|
4343
|
-
const n = ge(), { availableWidth: i } = Un(), { isMobile: a } = Ee(), { visibleCashAccounts: o, visibleCashBalance: r } = ve(), { selectedAccountGuids: s } = ue(), { cashflow: c } =
|
4343
|
+
const n = ge(), { availableWidth: i } = Un(), { isMobile: a } = Ee(), { visibleCashAccounts: o, visibleCashBalance: r } = ve(), { selectedAccountGuids: s } = ue(), { cashflow: c } = x(), { userProfile: d } = _n(), {
|
4344
4344
|
daysUntilNextIncome: _,
|
4345
4345
|
expensesTilNextIncome: u,
|
4346
4346
|
selectedCashAccounts: h,
|
@@ -4361,7 +4361,7 @@ const _i = () => {
|
|
4361
4361
|
), v = g.useMemo(
|
4362
4362
|
() => u.filter((D) => s.includes(D.accountGuid || "")).reduce((D, H) => D + H.amount, 0),
|
4363
4363
|
[s, u]
|
4364
|
-
),
|
4364
|
+
), I = g.useMemo(
|
4365
4365
|
() => w - v,
|
4366
4366
|
[w, v]
|
4367
4367
|
), R = d?.has_completed_cash_flow_onboarding && !!e;
|
@@ -4388,7 +4388,7 @@ const _i = () => {
|
|
4388
4388
|
] }),
|
4389
4389
|
/* @__PURE__ */ t(y, { pt: 18, children: /* @__PURE__ */ t(P, { name: "equals" }) }),
|
4390
4390
|
/* @__PURE__ */ l(y, { pb: 14, pr: 24, pt: 12, children: [
|
4391
|
-
/* @__PURE__ */ t(ze, { amount:
|
4391
|
+
/* @__PURE__ */ t(ze, { amount: I, variant: "H2" }),
|
4392
4392
|
/* @__PURE__ */ l(y, { alignItems: "center", direction: "row", gap: 8, children: [
|
4393
4393
|
/* @__PURE__ */ t(Oe, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
|
4394
4394
|
/* @__PURE__ */ t(ca, { body: c.tooltip_body, title: c.tooltip_title })
|
@@ -4433,7 +4433,7 @@ const _i = () => {
|
|
4433
4433
|
justifyContent: "space-between",
|
4434
4434
|
px: 16,
|
4435
4435
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
4436
|
-
children: /* @__PURE__ */ t(No, { remaining:
|
4436
|
+
children: /* @__PURE__ */ t(No, { remaining: I })
|
4437
4437
|
}
|
4438
4438
|
),
|
4439
4439
|
/* @__PURE__ */ t(k, {}),
|
@@ -4465,7 +4465,7 @@ const _i = () => {
|
|
4465
4465
|
)
|
4466
4466
|
] }) }) : /* @__PURE__ */ t(he, { height: a ? 210 : 120 });
|
4467
4467
|
}, S_ = A(E_), T_ = ({ onPrimaryCtaClick: e, sx: n = {} }) => {
|
4468
|
-
const { cashflow: i } =
|
4468
|
+
const { cashflow: i } = x(), { isCopyLoaded: a, isInitialized: o } = ue(), { loadActivity: r } = nt();
|
4469
4469
|
return g.useEffect(() => {
|
4470
4470
|
o && r();
|
4471
4471
|
}, [o]), a ? /* @__PURE__ */ t(
|
@@ -4570,7 +4570,7 @@ const A_ = [
|
|
4570
4570
|
2,
|
4571
4571
|
3
|
4572
4572
|
/* Tags */
|
4573
|
-
],
|
4573
|
+
], x_ = [
|
4574
4574
|
0,
|
4575
4575
|
1,
|
4576
4576
|
2
|
@@ -4631,7 +4631,7 @@ const A_ = [
|
|
4631
4631
|
left: "flex-start",
|
4632
4632
|
right: "flex-end"
|
4633
4633
|
}
|
4634
|
-
},
|
4634
|
+
}, I_ = (e, n, i, a = []) => {
|
4635
4635
|
const o = n.reduce((c, d) => ({ ...c, [d.guid]: d }), {}), r = i.reduce((c, d) => ({ ...c, [d.guid]: d }), {}), s = a.reduce((c, d) => {
|
4636
4636
|
const { transaction_guid: _, tag_guid: u } = d;
|
4637
4637
|
if (!c[_])
|
@@ -4674,11 +4674,11 @@ const A_ = [
|
|
4674
4674
|
SELECT: "Select",
|
4675
4675
|
UNHIDE: "Unhide",
|
4676
4676
|
UNSPLIT: "Unsplit"
|
4677
|
-
},
|
4677
|
+
}, xe = {
|
4678
4678
|
TRANSACTION_DETAILS: "Transaction Details",
|
4679
4679
|
TRANSACTIONS_LIST: "Transactions List",
|
4680
4680
|
TRANSACTIONS_WIDGET: "Transactions Widget"
|
4681
|
-
},
|
4681
|
+
}, Ie = {
|
4682
4682
|
ADD_TRANSACTION: "Manual Transaction",
|
4683
4683
|
CATEGORY: "Category",
|
4684
4684
|
DATE: "Date",
|
@@ -4701,215 +4701,215 @@ const A_ = [
|
|
4701
4701
|
// splits
|
4702
4702
|
[q.ON_TRANSACTION_SPLIT_CLICK]: {
|
4703
4703
|
action: Ae.SELECT,
|
4704
|
-
category:
|
4705
|
-
label:
|
4704
|
+
category: xe.TRANSACTION_DETAILS,
|
4705
|
+
label: Ie.SPLITS
|
4706
4706
|
},
|
4707
4707
|
[q.ON_TRANSACTION_SPLIT_CATEGORY_CLICK]: {
|
4708
4708
|
action: Ae.ADD_CATEGORY,
|
4709
|
-
category:
|
4710
|
-
label:
|
4709
|
+
category: xe.TRANSACTION_DETAILS,
|
4710
|
+
label: Ie.SPLITS
|
4711
4711
|
},
|
4712
4712
|
[q.ON_TRANSACTION_SPLIT_DELETE_CLICK]: {
|
4713
4713
|
action: Ae.DELETE,
|
4714
|
-
category:
|
4715
|
-
label:
|
4714
|
+
category: xe.TRANSACTION_DETAILS,
|
4715
|
+
label: Ie.SPLITS
|
4716
4716
|
},
|
4717
4717
|
[q.ON_TRANSACTION_SPLIT_SAVE_CLICK]: {
|
4718
4718
|
action: Ae.SPLIT,
|
4719
|
-
category:
|
4720
|
-
label:
|
4719
|
+
category: xe.TRANSACTION_DETAILS,
|
4720
|
+
label: Ie.SPLITS
|
4721
4721
|
},
|
4722
4722
|
[q.ON_TRANSACTION_UNSPLIT]: {
|
4723
4723
|
action: Ae.UNSPLIT,
|
4724
|
-
category:
|
4725
|
-
label:
|
4724
|
+
category: xe.TRANSACTION_DETAILS,
|
4725
|
+
label: Ie.SPLITS
|
4726
4726
|
},
|
4727
4727
|
// category
|
4728
4728
|
[q.ON_TRANSACTION_CATEGORY_CLICK]: {
|
4729
4729
|
action: Ae.SELECT,
|
4730
|
-
category:
|
4731
|
-
label:
|
4730
|
+
category: xe.TRANSACTIONS_LIST,
|
4731
|
+
label: Ie.CATEGORY
|
4732
4732
|
},
|
4733
4733
|
[q.ON_TRANSACTION_CATEGORY_CHANGED]: {
|
4734
4734
|
action: Ae.CHANGE_CATEGORY,
|
4735
|
-
category:
|
4736
|
-
label:
|
4735
|
+
category: xe.TRANSACTION_DETAILS,
|
4736
|
+
label: Ie.CATEGORY
|
4737
4737
|
},
|
4738
4738
|
// date
|
4739
4739
|
[q.ON_TRANSACTION_DATE_CHANGED]: {
|
4740
4740
|
action: Ae.SAVE,
|
4741
|
-
category:
|
4742
|
-
label:
|
4741
|
+
category: xe.TRANSACTION_DETAILS,
|
4742
|
+
label: Ie.DATE
|
4743
4743
|
},
|
4744
4744
|
[q.ON_TRANSACTION_DATE_CLICK]: {
|
4745
4745
|
action: Ae.SELECT,
|
4746
|
-
category:
|
4747
|
-
label:
|
4746
|
+
category: xe.TRANSACTION_DETAILS,
|
4747
|
+
label: Ie.DATE
|
4748
4748
|
},
|
4749
4749
|
// merchant logo
|
4750
4750
|
[q.ON_TRANSACTION_DELETE_LOGO_CANCEL]: {
|
4751
4751
|
action: Ae.CLOSE,
|
4752
|
-
category:
|
4753
|
-
label:
|
4752
|
+
category: xe.TRANSACTION_DETAILS,
|
4753
|
+
label: Ie.DELETE_MERCHANT_LOGO
|
4754
4754
|
},
|
4755
4755
|
[q.ON_TRANSACTION_DELETE_LOGO_CLICK]: {
|
4756
4756
|
action: Ae.SELECT,
|
4757
|
-
category:
|
4758
|
-
label:
|
4757
|
+
category: xe.TRANSACTION_DETAILS,
|
4758
|
+
label: Ie.DELETE_MERCHANT_LOGO
|
4759
4759
|
},
|
4760
4760
|
[q.ON_TRANSACTION_DELETE_LOGO_DELETED]: {
|
4761
4761
|
action: Ae.DELETE,
|
4762
|
-
category:
|
4763
|
-
label:
|
4762
|
+
category: xe.TRANSACTION_DETAILS,
|
4763
|
+
label: Ie.DELETE_MERCHANT_LOGO
|
4764
4764
|
},
|
4765
4765
|
// description
|
4766
4766
|
[q.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK]: {
|
4767
4767
|
action: Ae.EDIT,
|
4768
|
-
category:
|
4769
|
-
label:
|
4768
|
+
category: xe.TRANSACTION_DETAILS,
|
4769
|
+
label: Ie.DESCRIPTION
|
4770
4770
|
},
|
4771
4771
|
[q.ON_TRANSACTION_DESCRIPTION_SAVE_CLICK]: {
|
4772
4772
|
action: Ae.SAVE,
|
4773
|
-
category:
|
4774
|
-
label:
|
4773
|
+
category: xe.TRANSACTION_DETAILS,
|
4774
|
+
label: Ie.DESCRIPTION
|
4775
4775
|
},
|
4776
4776
|
// hide transactions
|
4777
4777
|
[q.ON_TRANSACTION_HIDDEN]: {
|
4778
4778
|
action: Ae.SAVE,
|
4779
|
-
category:
|
4780
|
-
label:
|
4779
|
+
category: xe.TRANSACTION_DETAILS,
|
4780
|
+
label: Ie.HIDE_TRANSACTION
|
4781
4781
|
},
|
4782
4782
|
[q.ON_TRANSACTION_HIDE_CLICK]: {
|
4783
4783
|
action: Ae.SELECT,
|
4784
|
-
category:
|
4785
|
-
label:
|
4784
|
+
category: xe.TRANSACTION_DETAILS,
|
4785
|
+
label: Ie.HIDE_TRANSACTION
|
4786
4786
|
},
|
4787
4787
|
[q.ON_TRANSACTION_HIDE_CANCEL_CLICK]: {
|
4788
4788
|
action: Ae.CLOSE,
|
4789
|
-
category:
|
4790
|
-
label:
|
4789
|
+
category: xe.TRANSACTION_DETAILS,
|
4790
|
+
label: Ie.HIDE_TRANSACTION
|
4791
4791
|
},
|
4792
4792
|
// transaction list
|
4793
4793
|
[q.ON_TRANSACTION_LIST_ITEM_CLICK]: {
|
4794
4794
|
action: Ae.SELECT,
|
4795
|
-
category:
|
4796
|
-
label:
|
4795
|
+
category: xe.TRANSACTIONS_LIST,
|
4796
|
+
label: Ie.TRANSACTION
|
4797
4797
|
},
|
4798
4798
|
// memo
|
4799
4799
|
[q.ON_TRANSACTION_MEMO_CHANGED]: {
|
4800
4800
|
action: Ae.SAVE,
|
4801
|
-
category:
|
4802
|
-
label:
|
4801
|
+
category: xe.TRANSACTION_DETAILS,
|
4802
|
+
label: Ie.MEMO
|
4803
4803
|
},
|
4804
4804
|
[q.ON_TRANSACTION_MEMO_CLICK]: {
|
4805
4805
|
action: Ae.SELECT,
|
4806
|
-
category:
|
4807
|
-
label:
|
4806
|
+
category: xe.TRANSACTION_DETAILS,
|
4807
|
+
label: Ie.MEMO
|
4808
4808
|
},
|
4809
4809
|
// tags
|
4810
4810
|
[q.ON_TRANSACTION_TAGS_CHANGED]: {
|
4811
4811
|
action: Ae.SAVE,
|
4812
|
-
category:
|
4813
|
-
label:
|
4812
|
+
category: xe.TRANSACTION_DETAILS,
|
4813
|
+
label: Ie.TAGS
|
4814
4814
|
},
|
4815
4815
|
[q.ON_TRANSACTION_TAGS_CLICK]: {
|
4816
4816
|
action: Ae.SELECT,
|
4817
|
-
category:
|
4818
|
-
label:
|
4817
|
+
category: xe.TRANSACTION_DETAILS,
|
4818
|
+
label: Ie.TAGS
|
4819
4819
|
},
|
4820
4820
|
[q.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK]: {
|
4821
4821
|
action: Ae.CLOSE,
|
4822
|
-
category:
|
4823
|
-
label:
|
4822
|
+
category: xe.TRANSACTION_DETAILS,
|
4823
|
+
label: Ie.TAGS
|
4824
4824
|
},
|
4825
4825
|
[q.ON_TRANSACTION_TAGS_TAG_ADD_CLICK]: {
|
4826
4826
|
action: Ae.ADD,
|
4827
|
-
category:
|
4828
|
-
label:
|
4827
|
+
category: xe.TRANSACTION_DETAILS,
|
4828
|
+
label: Ie.TAG_ADD
|
4829
4829
|
},
|
4830
4830
|
[q.ON_TRANSACTION_TAGS_TAG_ADDED]: {
|
4831
4831
|
action: Ae.SAVE,
|
4832
|
-
category:
|
4833
|
-
label:
|
4832
|
+
category: xe.TRANSACTION_DETAILS,
|
4833
|
+
label: Ie.TAG_ADD
|
4834
4834
|
},
|
4835
4835
|
[q.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK]: {
|
4836
4836
|
action: Ae.SELECT,
|
4837
|
-
category:
|
4838
|
-
label:
|
4837
|
+
category: xe.TRANSACTION_DETAILS,
|
4838
|
+
label: Ie.TAG_DELETE
|
4839
4839
|
},
|
4840
4840
|
[q.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK]: {
|
4841
4841
|
action: Ae.CLOSE,
|
4842
|
-
category:
|
4843
|
-
label:
|
4842
|
+
category: xe.TRANSACTION_DETAILS,
|
4843
|
+
label: Ie.TAG_DELETE
|
4844
4844
|
},
|
4845
4845
|
[q.ON_TRANSACTION_TAGS_TAG_DELETED]: {
|
4846
4846
|
action: Ae.SAVE,
|
4847
|
-
category:
|
4848
|
-
label:
|
4847
|
+
category: xe.TRANSACTION_DETAILS,
|
4848
|
+
label: Ie.TAG_DELETE
|
4849
4849
|
},
|
4850
4850
|
[q.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK]: {
|
4851
4851
|
action: Ae.EDIT,
|
4852
|
-
category:
|
4853
|
-
label:
|
4852
|
+
category: xe.TRANSACTION_DETAILS,
|
4853
|
+
label: Ie.TAG_EDIT
|
4854
4854
|
},
|
4855
4855
|
[q.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED]: {
|
4856
4856
|
action: Ae.SAVE,
|
4857
|
-
category:
|
4858
|
-
label:
|
4857
|
+
category: xe.TRANSACTION_DETAILS,
|
4858
|
+
label: Ie.TAG_EDIT
|
4859
4859
|
},
|
4860
4860
|
// flag
|
4861
4861
|
[q.ON_TRANSACTION_TOGGLE_FLAG_CLICK]: {
|
4862
4862
|
action: Ae.SELECT,
|
4863
|
-
category:
|
4864
|
-
label:
|
4863
|
+
category: xe.TRANSACTION_DETAILS,
|
4864
|
+
label: Ie.FLAG
|
4865
4865
|
},
|
4866
4866
|
// hide
|
4867
4867
|
[q.ON_TRANSACTION_UNHIDDEN]: {
|
4868
4868
|
action: Ae.SAVE,
|
4869
|
-
category:
|
4870
|
-
label:
|
4869
|
+
category: xe.TRANSACTION_DETAILS,
|
4870
|
+
label: Ie.UNHIDE_TRANSACTION
|
4871
4871
|
},
|
4872
4872
|
[q.ON_TRANSACTION_UNHIDE_CLICK]: {
|
4873
4873
|
action: Ae.SELECT,
|
4874
|
-
category:
|
4875
|
-
label:
|
4874
|
+
category: xe.TRANSACTION_DETAILS,
|
4875
|
+
label: Ie.UNHIDE_TRANSACTION
|
4876
4876
|
},
|
4877
4877
|
[q.ON_TRANSACTION_UNHIDE_CANCEL_CLICK]: {
|
4878
4878
|
action: Ae.CLOSE,
|
4879
|
-
category:
|
4880
|
-
label:
|
4879
|
+
category: xe.TRANSACTION_DETAILS,
|
4880
|
+
label: Ie.UNHIDE_TRANSACTION
|
4881
4881
|
},
|
4882
4882
|
// export CSV
|
4883
4883
|
[q.ON_TRANSACTION_EXPORT_CSV_CLICK]: {
|
4884
4884
|
action: Ae.SELECT,
|
4885
|
-
category:
|
4886
|
-
label:
|
4885
|
+
category: xe.TRANSACTIONS_WIDGET,
|
4886
|
+
label: Ie.EXPORT_CSV
|
4887
4887
|
},
|
4888
4888
|
// add transaction
|
4889
4889
|
[q.ON_TRANSACTION_MANUAL_ADD_CLICK]: {
|
4890
4890
|
action: Ae.SELECT,
|
4891
|
-
category:
|
4892
|
-
label:
|
4891
|
+
category: xe.TRANSACTIONS_WIDGET,
|
4892
|
+
label: Ie.ADD_TRANSACTION
|
4893
4893
|
},
|
4894
4894
|
[q.ON_TRANSACTION_MANUAL_ADD_ADDED]: {
|
4895
4895
|
action: Ae.ADD,
|
4896
|
-
category:
|
4897
|
-
label:
|
4896
|
+
category: xe.TRANSACTIONS_WIDGET,
|
4897
|
+
label: Ie.ADD_TRANSACTION
|
4898
4898
|
},
|
4899
4899
|
[q.ON_TRANSACTION_DELETE_CLICK]: {
|
4900
4900
|
action: Ae.SELECT,
|
4901
|
-
category:
|
4902
|
-
label:
|
4901
|
+
category: xe.TRANSACTIONS_WIDGET,
|
4902
|
+
label: Ie.DELETE_TRANSACTION
|
4903
4903
|
},
|
4904
4904
|
[q.ON_TRANSACTION_DELETE_CANCEL]: {
|
4905
4905
|
action: Ae.CLOSE,
|
4906
|
-
category:
|
4907
|
-
label:
|
4906
|
+
category: xe.TRANSACTIONS_WIDGET,
|
4907
|
+
label: Ie.DELETE_TRANSACTION
|
4908
4908
|
},
|
4909
4909
|
[q.ON_TRANSACTION_DELETE_DELETED]: {
|
4910
4910
|
action: Ae.DELETE,
|
4911
|
-
category:
|
4912
|
-
label:
|
4911
|
+
category: xe.TRANSACTIONS_WIDGET,
|
4912
|
+
label: Ie.DELETE_TRANSACTION
|
4913
4913
|
}
|
4914
4914
|
}, v_ = async (e, n) => !n || !Nr[e] ? null : n.sendAnalyticEvent(Nr[e]), co = {
|
4915
4915
|
FLAG: "flag",
|
@@ -4927,7 +4927,7 @@ const A_ = [
|
|
4927
4927
|
}, D_ = (e, n, i) => {
|
4928
4928
|
const {
|
4929
4929
|
accounts: a = [],
|
4930
|
-
dateRange: o = { start: We(_e()), end:
|
4930
|
+
dateRange: o = { start: We(_e()), end: In() },
|
4931
4931
|
custom: r = () => !0,
|
4932
4932
|
searchTerm: s = ""
|
4933
4933
|
} = e;
|
@@ -5087,7 +5087,7 @@ class B_ {
|
|
5087
5087
|
() => this.transactions = this.augmentTransactions([i, ...this.transactions])
|
5088
5088
|
);
|
5089
5089
|
};
|
5090
|
-
augmentTransactions = (n) =>
|
5090
|
+
augmentTransactions = (n) => I_(
|
5091
5091
|
n,
|
5092
5092
|
this.globalStore.accountStore.visibleAccounts,
|
5093
5093
|
this.globalStore.categoryStore.categories,
|
@@ -5109,7 +5109,7 @@ class B_ {
|
|
5109
5109
|
const n = await this.api.getTransactionRules();
|
5110
5110
|
Y(() => this.transactionRules = n);
|
5111
5111
|
};
|
5112
|
-
loadTransactions = async (n = this.cachedStartDate, i =
|
5112
|
+
loadTransactions = async (n = this.cachedStartDate, i = In()) => {
|
5113
5113
|
this.setIsLoading(!0), this.transactions = [];
|
5114
5114
|
try {
|
5115
5115
|
const a = await this.api.getTransactionsByDateRange(
|
@@ -5151,7 +5151,7 @@ class B_ {
|
|
5151
5151
|
}
|
5152
5152
|
};
|
5153
5153
|
setFilter = (n) => {
|
5154
|
-
this.filter = n, n.dateRange && we(n.dateRange.start, this.cachedStartDate) && this.loadTransactions(n.dateRange.start,
|
5154
|
+
this.filter = n, n.dateRange && we(n.dateRange.start, this.cachedStartDate) && this.loadTransactions(n.dateRange.start, In()).then(() => {
|
5155
5155
|
n.dateRange && (this.cachedStartDate = n.dateRange.start);
|
5156
5156
|
});
|
5157
5157
|
};
|
@@ -5217,7 +5217,7 @@ class B_ {
|
|
5217
5217
|
);
|
5218
5218
|
};
|
5219
5219
|
}
|
5220
|
-
const
|
5220
|
+
const xt = () => {
|
5221
5221
|
if (!g.useContext(qn))
|
5222
5222
|
throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
|
5223
5223
|
return Te().uiStore;
|
@@ -5244,7 +5244,7 @@ const It = () => {
|
|
5244
5244
|
let n = e.parent_guid ? "Split: " : "";
|
5245
5245
|
return n += e.is_hidden ? "(Excluded) " : "", n += e.description, n;
|
5246
5246
|
}, F_ = (e, n) => e.tags.map((i) => n.filter((o) => o.guid === i)[0]?.name ?? "").join(" "), W_ = ({ transaction: e, onClick: n }) => {
|
5247
|
-
const { associatedBeats: i } = Te(), { transactions: a } =
|
5247
|
+
const { associatedBeats: i } = Te(), { transactions: a } = x(), { showInsights: o } = xt(), r = e.transaction_type === St.CREDIT, s = g.useMemo(() => i.find((c) => c.associated_transaction_guid === e.guid), [i, e]);
|
5248
5248
|
return /* @__PURE__ */ l(
|
5249
5249
|
d_,
|
5250
5250
|
{
|
@@ -5295,11 +5295,11 @@ const It = () => {
|
|
5295
5295
|
]
|
5296
5296
|
}
|
5297
5297
|
);
|
5298
|
-
},
|
5298
|
+
}, Ia = A(W_), va = ({
|
5299
5299
|
bgcolor: e = "background.default",
|
5300
5300
|
children: n
|
5301
5301
|
}) => /* @__PURE__ */ t(L, { display: "inline-block", pb: 4, pl: 24, pt: 4, sx: { bgcolor: e, width: "100%" }, children: /* @__PURE__ */ t(p, { bold: !0, variant: "XSmall", children: n }) }), U_ = ({ showIcon: e = !0, showSubtitle: n = !0 }) => {
|
5302
|
-
const i = ft(), { transactions: a } =
|
5302
|
+
const i = ft(), { transactions: a } = x();
|
5303
5303
|
return /* @__PURE__ */ l(y, { alignItems: "center", gap: i.Spacing.Small, height: "auto", mt: i.Spacing.Large, children: [
|
5304
5304
|
e && /* @__PURE__ */ t(Fd, { color: "secondary", sx: { fontSize: 32 } }),
|
5305
5305
|
/* @__PURE__ */ t(p, { bold: !0, color: "secondary", variant: "Small", children: a.zero_state_no_transactions }),
|
@@ -5322,8 +5322,8 @@ const It = () => {
|
|
5322
5322
|
width: c = "100%",
|
5323
5323
|
zeroState: d = /* @__PURE__ */ t(V_, {})
|
5324
5324
|
}) => {
|
5325
|
-
const { isLoading: _, sortedTransactions: u } = Te(), h = g.useMemo(() => s ? u : u.filter((w) => !w.is_hidden), [u, s]), { setShowInsights: m, toggleSplit: C } =
|
5326
|
-
const v = h.find((
|
5325
|
+
const { isLoading: _, sortedTransactions: u } = Te(), h = g.useMemo(() => s ? u : u.filter((w) => !w.is_hidden), [u, s]), { setShowInsights: m, toggleSplit: C } = xt(), { onEvent: f } = z(), E = (w) => {
|
5326
|
+
const v = h.find((I) => I.guid === w);
|
5327
5327
|
if (v?.has_been_split) {
|
5328
5328
|
C(v.guid);
|
5329
5329
|
return;
|
@@ -5351,7 +5351,7 @@ const It = () => {
|
|
5351
5351
|
(_ || r) && i,
|
5352
5352
|
!_ && !r && T.getVirtualItems().length === 0 && d,
|
5353
5353
|
!_ && !r && T.getVirtualItems().length > 0 && T.getVirtualItems().map((w) => {
|
5354
|
-
const v = h[w.index],
|
5354
|
+
const v = h[w.index], I = Dr(w.index, h), R = K_(w.index, h), D = Rr + (I ? Or : 0);
|
5355
5355
|
return /* @__PURE__ */ l(
|
5356
5356
|
L,
|
5357
5357
|
{
|
@@ -5362,8 +5362,8 @@ const It = () => {
|
|
5362
5362
|
width: "100%"
|
5363
5363
|
},
|
5364
5364
|
children: [
|
5365
|
-
|
5366
|
-
/* @__PURE__ */ t(
|
5365
|
+
I && /* @__PURE__ */ t(va, { bgcolor: e, children: Hi(v.date) }),
|
5366
|
+
/* @__PURE__ */ t(Ia, { onClick: E, transaction: v }),
|
5367
5367
|
/* @__PURE__ */ t(k, { sx: { ml: R ? 24 : 0 } })
|
5368
5368
|
]
|
5369
5369
|
},
|
@@ -5377,7 +5377,7 @@ const It = () => {
|
|
5377
5377
|
`${e.row.account}`,
|
5378
5378
|
e.row.number && ` | ${e.row.number}`
|
5379
5379
|
] }), j_ = (e) => {
|
5380
|
-
const { associatedBeats: n } = Te(), { showInsights: i } =
|
5380
|
+
const { associatedBeats: n } = Te(), { showInsights: i } = xt(), { amount: a, transaction_type: o } = e.row, r = n.find((c) => c.associated_transaction_guid === e.row.guid), s = o === St.CREDIT;
|
5381
5381
|
return /* @__PURE__ */ l(y, { alignItems: "flex-end", tabIndex: e.tabIndex, children: [
|
5382
5382
|
/* @__PURE__ */ l(p, { color: s ? "success.main" : "text.primary", variant: "Small", children: [
|
5383
5383
|
s ? "+" : "",
|
@@ -5386,7 +5386,7 @@ const It = () => {
|
|
5386
5386
|
r && i && /* @__PURE__ */ t(p, { bold: !0, color: "primary.light", variant: "XSmall", children: r.short_title })
|
5387
5387
|
] });
|
5388
5388
|
}, X_ = (e) => {
|
5389
|
-
const { transactions: n } =
|
5389
|
+
const { transactions: n } = x(), [i, a] = g.useState(!1);
|
5390
5390
|
return /* @__PURE__ */ l(
|
5391
5391
|
y,
|
5392
5392
|
{
|
@@ -5405,7 +5405,7 @@ const It = () => {
|
|
5405
5405
|
}
|
5406
5406
|
);
|
5407
5407
|
}, q_ = A(X_), Z_ = (e) => /* @__PURE__ */ t(p, { tabIndex: e.tabIndex, variant: "Small", children: re(Ge(e.row.date), ie.MONTH_DAY) }), Q_ = (e) => {
|
5408
|
-
const n = tt(), { transactions: i } =
|
5408
|
+
const n = tt(), { transactions: i } = x(), { is_flagged: a, is_hidden: o, has_been_viewed: r, parent_guid: s } = e.row, d = !r && !!!s;
|
5409
5409
|
return /* @__PURE__ */ l(
|
5410
5410
|
L,
|
5411
5411
|
{
|
@@ -5446,7 +5446,7 @@ const It = () => {
|
|
5446
5446
|
onCategoryClick: n,
|
5447
5447
|
onRowClick: i
|
5448
5448
|
}) => {
|
5449
|
-
const { isLoading: a, sortedTransactions: o } = Te(), { transactions: r } =
|
5449
|
+
const { isLoading: a, sortedTransactions: o } = Te(), { transactions: r } = x(), { isCopyLoaded: s } = ue(), c = g.useMemo(
|
5450
5450
|
() => o.map((u) => ({
|
5451
5451
|
id: u.guid,
|
5452
5452
|
isHovering: !1,
|
@@ -5551,7 +5551,7 @@ const ih = ({
|
|
5551
5551
|
isOpen: a,
|
5552
5552
|
type: o
|
5553
5553
|
}) => {
|
5554
|
-
const [r, s] = g.useState(e), { categories: c } =
|
5554
|
+
const [r, s] = g.useState(e), { categories: c } = x(), { setShouldDisableDrawerScroll: d } = pn();
|
5555
5555
|
let _ = "", u = [];
|
5556
5556
|
const h = o === "delete";
|
5557
5557
|
switch (o) {
|
@@ -5583,7 +5583,7 @@ const ih = ({
|
|
5583
5583
|
d(!1), i(r);
|
5584
5584
|
},
|
5585
5585
|
children: /* @__PURE__ */ t(Rs, { children: h ? /* @__PURE__ */ t(p, { children: u }) : /* @__PURE__ */ t(
|
5586
|
-
|
5586
|
+
xn,
|
5587
5587
|
{
|
5588
5588
|
"aria-label": o === "edit" ? c.edit_subcategory_aria : c.add_subcategory_aria,
|
5589
5589
|
name: "modify-subcategory",
|
@@ -5596,7 +5596,7 @@ const ih = ({
|
|
5596
5596
|
}
|
5597
5597
|
);
|
5598
5598
|
}, Ro = A(ih), ah = ({ parentCategory: e }) => {
|
5599
|
-
const [n, i] = g.useState(!1), { addCategory: a } = Ke(), { categories: o } =
|
5599
|
+
const [n, i] = g.useState(!1), { addCategory: a } = Ke(), { categories: o } = x(), { onEvent: r } = z(), { setShouldDisableDrawerScroll: s } = pn(), c = async (u) => {
|
5600
5600
|
await a(u.trim(), e.guid), r(Qt.ON_SUBCATEGORY_ADDED), i(!1);
|
5601
5601
|
}, d = async () => {
|
5602
5602
|
r(Qt.ON_SUBCATEGORY_ADD_CLICK), s(!0), i(!0);
|
@@ -5671,7 +5671,7 @@ const ih = ({
|
|
5671
5671
|
showSelected: s,
|
5672
5672
|
unselectable: c,
|
5673
5673
|
unselectableText: d
|
5674
|
-
} = pn(), { categories: _ } =
|
5674
|
+
} = pn(), { categories: _ } = x(), { onEvent: u } = z(), [h, m] = g.useState(!1), [C, f] = g.useState(!1), E = !!n.revision, b = n.guid === a, T = !c.some((v) => v === n.guid);
|
5675
5675
|
return /* @__PURE__ */ l(
|
5676
5676
|
j,
|
5677
5677
|
{
|
@@ -5803,7 +5803,7 @@ const ih = ({
|
|
5803
5803
|
/* @__PURE__ */ t(hh, { categories: n, parentCategory: e })
|
5804
5804
|
] });
|
5805
5805
|
}, mc = A(gh), mh = () => {
|
5806
|
-
const { categories: e } = Ke(), { searchValue: n } = pn(), { categories: i } =
|
5806
|
+
const { categories: e } = Ke(), { searchValue: n } = pn(), { categories: i } = x(), o = ((r, s = "") => r.reduce((c, d) => {
|
5807
5807
|
if (d.parent_guid === null) {
|
5808
5808
|
const u = [
|
5809
5809
|
{
|
@@ -5835,7 +5835,7 @@ const ih = ({
|
|
5835
5835
|
unselectable: a = [],
|
5836
5836
|
unselectableText: o = "Unselectable"
|
5837
5837
|
}) => {
|
5838
|
-
const { categories: r, loadCategories: s } = Ke(), { common: c } =
|
5838
|
+
const { categories: r, loadCategories: s } = Ke(), { common: c } = x(), { isCopyLoaded: d } = ue(), {
|
5839
5839
|
searchValue: _,
|
5840
5840
|
setOnSelect: u,
|
5841
5841
|
setSearchValue: h,
|
@@ -5870,7 +5870,7 @@ const ih = ({
|
|
5870
5870
|
showDrawer: a,
|
5871
5871
|
...o
|
5872
5872
|
}) => {
|
5873
|
-
const { common: r } =
|
5873
|
+
const { common: r } = x(), { isCopyLoaded: s } = ue();
|
5874
5874
|
return s ? /* @__PURE__ */ t(
|
5875
5875
|
ae,
|
5876
5876
|
{
|
@@ -6079,7 +6079,7 @@ class Th {
|
|
6079
6079
|
getCategoryName = (n) => this.categories.find((a) => a.guid === n)?.name ?? Sa[n];
|
6080
6080
|
}
|
6081
6081
|
const Cc = ({ transaction: e }) => {
|
6082
|
-
const { addOrUpdateTransactionRule: n, updateTransaction: i } = Te(), { categories: a } = Ke(), { onEvent: o } = z(), { setShouldDisableDrawerScroll: r, updateManualTransaction: s } =
|
6082
|
+
const { addOrUpdateTransactionRule: n, updateTransaction: i } = Te(), { categories: a } = Ke(), { onEvent: o } = z(), { setShouldDisableDrawerScroll: r, updateManualTransaction: s } = xt(), { transactions: c } = x(), [d, _] = g.useState(!1), [u, h] = g.useState(""), m = async (b) => {
|
6083
6083
|
await i({ ...e, category_guid: u }), b && await n(u, e), h(""), o(W.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
6084
6084
|
transaction_guid: e.guid
|
6085
6085
|
});
|
@@ -6164,7 +6164,7 @@ const Cc = ({ transaction: e }) => {
|
|
6164
6164
|
)
|
6165
6165
|
] });
|
6166
6166
|
}, fc = ({ transaction: e }) => {
|
6167
|
-
const n = ft(), { onEvent: i } = z(), { updateTransaction: a } = Te(), { updateManualTransaction: o } =
|
6167
|
+
const n = ft(), { onEvent: i } = z(), { updateTransaction: a } = Te(), { updateManualTransaction: o } = xt(), { common: r, transactions: s } = x(), [c, d] = g.useState(!1), [_, u] = g.useState(e.date), h = (C) => {
|
6168
6168
|
u(ke(C));
|
6169
6169
|
}, m = async () => {
|
6170
6170
|
if (e.is_manual && !e.guid) {
|
@@ -6221,7 +6221,7 @@ const Cc = ({ transaction: e }) => {
|
|
6221
6221
|
)
|
6222
6222
|
] });
|
6223
6223
|
}, Ah = ({ transaction: e }) => {
|
6224
|
-
const { onEvent: n } = z(), { removeTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } =
|
6224
|
+
const { onEvent: n } = z(), { removeTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = xt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), d = async () => {
|
6225
6225
|
await i(e.guid), n(q.ON_TRANSACTION_DELETE_DELETED);
|
6226
6226
|
};
|
6227
6227
|
return /* @__PURE__ */ l(L, { className: "mx-txn-delete", children: [
|
@@ -6260,8 +6260,8 @@ const Cc = ({ transaction: e }) => {
|
|
6260
6260
|
}
|
6261
6261
|
)
|
6262
6262
|
] });
|
6263
|
-
},
|
6264
|
-
const { onEvent: n } = z(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } =
|
6263
|
+
}, xh = A(Ah), Ih = ({ transaction: e }) => {
|
6264
|
+
const { onEvent: n } = z(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = xt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), d = async () => {
|
6265
6265
|
await i({ ...e, merchant_guid: "" }), n(W.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
6266
6266
|
transaction_guid: e.guid
|
6267
6267
|
});
|
@@ -6300,8 +6300,8 @@ const Cc = ({ transaction: e }) => {
|
|
6300
6300
|
}
|
6301
6301
|
)
|
6302
6302
|
] });
|
6303
|
-
}, vh = A(
|
6304
|
-
const { onEvent: n } = z(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } =
|
6303
|
+
}, vh = A(Ih), wh = ({ transaction: e }) => {
|
6304
|
+
const { onEvent: n } = z(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = xt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), d = e.is_hidden, _ = async () => {
|
6305
6305
|
await i({ ...e, is_hidden: !e.is_hidden }), n(
|
6306
6306
|
d ? q.ON_TRANSACTION_UNHIDDEN : q.ON_TRANSACTION_HIDDEN
|
6307
6307
|
);
|
@@ -6390,7 +6390,7 @@ const Cc = ({ transaction: e }) => {
|
|
6390
6390
|
] })
|
6391
6391
|
] });
|
6392
6392
|
}, Dh = ({ transaction: e }) => {
|
6393
|
-
const { onEvent: n } = z(), { updateTransaction: i } = Te(), { updateManualTransaction: a } =
|
6393
|
+
const { onEvent: n } = z(), { updateTransaction: i } = Te(), { updateManualTransaction: a } = xt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), [d, _] = g.useState("");
|
6394
6394
|
g.useEffect(() => {
|
6395
6395
|
s && _(e.memo ? e.memo : "");
|
6396
6396
|
}, [s]);
|
@@ -6466,7 +6466,7 @@ const Cc = ({ transaction: e }) => {
|
|
6466
6466
|
onUpdateAmount: a,
|
6467
6467
|
split: o
|
6468
6468
|
}) => {
|
6469
|
-
const r = ft(), { onEvent: s } = z(), { transactions: c } =
|
6469
|
+
const r = ft(), { onEvent: s } = z(), { transactions: c } = x(), [d, _] = g.useState(`${o.amount}`), [u, h] = g.useState(!1), m = e === 0, C = (f) => {
|
6470
6470
|
isNaN(Number(f)) || (_(f), a(e, Number(f)));
|
6471
6471
|
};
|
6472
6472
|
return /* @__PURE__ */ l(
|
@@ -6568,7 +6568,7 @@ const Cc = ({ transaction: e }) => {
|
|
6568
6568
|
splits: o,
|
6569
6569
|
transaction: r
|
6570
6570
|
}) => {
|
6571
|
-
const s = ft(), { transactions: c } =
|
6571
|
+
const s = ft(), { transactions: c } = x(), { onEvent: d } = z(), [_, u] = g.useState("");
|
6572
6572
|
return g.useEffect(() => {
|
6573
6573
|
u(o.length <= 1 ? c.split_transaction_errors_min_splits : ""), u(
|
6574
6574
|
o[0].amount < 0 ? S(
|
@@ -6613,7 +6613,7 @@ const Cc = ({ transaction: e }) => {
|
|
6613
6613
|
) })
|
6614
6614
|
] });
|
6615
6615
|
}, Mh = A(Lh), kh = ({ transaction: e }) => {
|
6616
|
-
const { onEvent: n } = z(), { splitTransaction: i, unSplitTransaction: a } = Te(), { common: o, transactions: r } =
|
6616
|
+
const { onEvent: n } = z(), { splitTransaction: i, unSplitTransaction: a } = Te(), { common: o, transactions: r } = x(), { setShouldDisableDrawerScroll: s } = xt(), { categories: c } = Ke(), d = {
|
6617
6617
|
...e,
|
6618
6618
|
amount: e.amount - 1,
|
6619
6619
|
guid: "",
|
@@ -6650,7 +6650,7 @@ const Cc = ({ transaction: e }) => {
|
|
6650
6650
|
category: X.name,
|
6651
6651
|
top_level_category_guid: X.parent_guid || Z
|
6652
6652
|
}, E(U));
|
6653
|
-
},
|
6653
|
+
}, I = () => {
|
6654
6654
|
if (e.parent_guid || e.has_been_split) {
|
6655
6655
|
C(!0);
|
6656
6656
|
return;
|
@@ -6673,7 +6673,7 @@ const Cc = ({ transaction: e }) => {
|
|
6673
6673
|
return M || Z;
|
6674
6674
|
}, [f]);
|
6675
6675
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
6676
|
-
e && /* @__PURE__ */ t(j, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(de, { onClick:
|
6676
|
+
e && /* @__PURE__ */ t(j, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(de, { onClick: I, children: [
|
6677
6677
|
/* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(P, { name: "call_split", sx: { color: "text.primary" }, weight: yt.Dark }) }) }),
|
6678
6678
|
/* @__PURE__ */ t(
|
6679
6679
|
se,
|
@@ -6733,7 +6733,7 @@ const Cc = ({ transaction: e }) => {
|
|
6733
6733
|
)
|
6734
6734
|
] });
|
6735
6735
|
}, Gh = A(kh), Bh = () => {
|
6736
|
-
const e = ge(), { onEvent: n } = z(), { addTag: i } = Te(), { transactions: a } =
|
6736
|
+
const e = ge(), { onEvent: n } = z(), { addTag: i } = Te(), { transactions: a } = x(), [o, r] = g.useState(!1), [s, c] = g.useState(""), [d, _] = g.useState(""), u = g.useRef(null);
|
6737
6737
|
g.useEffect(() => {
|
6738
6738
|
o && u?.current?.focus();
|
6739
6739
|
}, [o]);
|
@@ -6780,7 +6780,7 @@ const Cc = ({ transaction: e }) => {
|
|
6780
6780
|
onSecondaryAction: () => r(!1),
|
6781
6781
|
children: [
|
6782
6782
|
/* @__PURE__ */ t(
|
6783
|
-
|
6783
|
+
xn,
|
6784
6784
|
{
|
6785
6785
|
"aria-label": a.tags_placeholder,
|
6786
6786
|
name: "add-tag",
|
@@ -6796,7 +6796,7 @@ const Cc = ({ transaction: e }) => {
|
|
6796
6796
|
)
|
6797
6797
|
] });
|
6798
6798
|
}, Ph = A(Bh), Hh = ({ onSearchValueChanged: e, searchValue: n }) => {
|
6799
|
-
const { common: i, transactions: a } =
|
6799
|
+
const { common: i, transactions: a } = x(), o = ft(), r = /* @__PURE__ */ t(
|
6800
6800
|
Fe,
|
6801
6801
|
{
|
6802
6802
|
"aria-label": a.tags_cancel_search || "Search",
|
@@ -6805,7 +6805,7 @@ const Cc = ({ transaction: e }) => {
|
|
6805
6805
|
}
|
6806
6806
|
);
|
6807
6807
|
return /* @__PURE__ */ t(L, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ t(
|
6808
|
-
|
6808
|
+
xn,
|
6809
6809
|
{
|
6810
6810
|
InputProps: {
|
6811
6811
|
startAdornment: /* @__PURE__ */ t(na, { position: "start", children: /* @__PURE__ */ t(Bd, { color: "disabled" }) }),
|
@@ -6820,7 +6820,7 @@ const Cc = ({ transaction: e }) => {
|
|
6820
6820
|
}
|
6821
6821
|
) });
|
6822
6822
|
}, $h = A(Hh), Fh = ({ onTagChecked: e, selectedTags: n, tag: i }) => {
|
6823
|
-
const { onEvent: a } = z(), { removeTag: o, updateTag: r } = Te(), { common: s, transactions: c } =
|
6823
|
+
const { onEvent: a } = z(), { removeTag: o, updateTag: r } = Te(), { common: s, transactions: c } = x(), [d, _] = g.useState(!1), [u, h] = g.useState(!1), [m, C] = g.useState(""), [f, E] = g.useState(""), b = async () => {
|
6824
6824
|
a(q.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await r({ ...i, name: m }), _(!1);
|
6825
6825
|
}, T = async () => {
|
6826
6826
|
a(q.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), h(!1);
|
@@ -6882,12 +6882,12 @@ const Cc = ({ transaction: e }) => {
|
|
6882
6882
|
onSecondaryAction: () => _(!1),
|
6883
6883
|
children: [
|
6884
6884
|
/* @__PURE__ */ t(
|
6885
|
-
|
6885
|
+
xn,
|
6886
6886
|
{
|
6887
6887
|
"aria-describedby": f ? "update-tag-error" : void 0,
|
6888
6888
|
"aria-label": c.tags_update_the_tag_name,
|
6889
6889
|
name: "update-tag",
|
6890
|
-
onChange: (
|
6890
|
+
onChange: (I) => C(I.target.value),
|
6891
6891
|
placeholder: "Tag name",
|
6892
6892
|
sx: { width: "100%" },
|
6893
6893
|
value: m
|
@@ -6932,7 +6932,7 @@ const Cc = ({ transaction: e }) => {
|
|
6932
6932
|
] }, s.guid)) }) })
|
6933
6933
|
] });
|
6934
6934
|
}, Vh = A(Uh), Kh = ({ transaction: e }) => {
|
6935
|
-
const { onEvent: n } = z(), { tags: i, updateTaggings: a, updateTransaction: o } = Te(), { common: r, transactions: s } =
|
6935
|
+
const { onEvent: n } = z(), { tags: i, updateTaggings: a, updateTransaction: o } = Te(), { common: r, transactions: s } = x(), { updateManualTransaction: c } = xt(), [d, _] = g.useState(!1), [u, h] = g.useState(e.tags);
|
6936
6936
|
g.useEffect(() => {
|
6937
6937
|
h(e.tags);
|
6938
6938
|
}, [d, e]);
|
@@ -6987,7 +6987,7 @@ const Cc = ({ transaction: e }) => {
|
|
6987
6987
|
)
|
6988
6988
|
] });
|
6989
6989
|
}, Ec = A(Kh), zh = ({ transaction: e }) => {
|
6990
|
-
const { updateTransaction: n } = Te(), { common: i, transactions: a } =
|
6990
|
+
const { updateTransaction: n } = Te(), { common: i, transactions: a } = x(), { onEvent: o } = z(), [r, s] = g.useState(!1), [c, d] = g.useState(""), _ = g.useRef(null);
|
6991
6991
|
g.useEffect(() => {
|
6992
6992
|
r && (d(e.description), _?.current?.focus());
|
6993
6993
|
}, [r]);
|
@@ -7038,7 +7038,7 @@ const Cc = ({ transaction: e }) => {
|
|
7038
7038
|
)
|
7039
7039
|
] }) });
|
7040
7040
|
}, Yh = A(zh), jh = ({ transaction: e }) => {
|
7041
|
-
const { updateTransaction: n } = Te(), { transactions: i } =
|
7041
|
+
const { updateTransaction: n } = Te(), { transactions: i } = x(), { onEvent: a } = z(), o = ge(), r = async () => {
|
7042
7042
|
a(W.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: e.guid }), await n({ ...e, is_flagged: !e.is_flagged });
|
7043
7043
|
};
|
7044
7044
|
return /* @__PURE__ */ t("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ t(
|
@@ -7070,7 +7070,7 @@ const Cc = ({ transaction: e }) => {
|
|
7070
7070
|
}
|
7071
7071
|
) });
|
7072
7072
|
}, Xh = A(jh), qh = ({
|
7073
|
-
bottomActions: e =
|
7073
|
+
bottomActions: e = x_,
|
7074
7074
|
topActions: n = A_,
|
7075
7075
|
transaction: i
|
7076
7076
|
}) => {
|
@@ -7117,11 +7117,11 @@ const Cc = ({ transaction: e }) => {
|
|
7117
7117
|
s === Zi.MerchantLogo && /* @__PURE__ */ t(vh, { transaction: i }),
|
7118
7118
|
/* @__PURE__ */ t(k, { variant: c < e.length - 1 ? "inset" : "fullWidth" })
|
7119
7119
|
] }, s)),
|
7120
|
-
i.is_manual && /* @__PURE__ */ t(
|
7120
|
+
i.is_manual && /* @__PURE__ */ t(xh, { transaction: i })
|
7121
7121
|
] }) })
|
7122
7122
|
] }) }) : /* @__PURE__ */ t(he, {});
|
7123
7123
|
}, Zn = A(qh), Zh = ({ copy: e, isOpen: n, onClose: i, onPrimaryAction: a }) => {
|
7124
|
-
const { common: o, transactions: r } =
|
7124
|
+
const { common: o, transactions: r } = x(), { isCopyLoaded: s } = ue();
|
7125
7125
|
return s ? /* @__PURE__ */ l(
|
7126
7126
|
Be,
|
7127
7127
|
{
|
@@ -7140,7 +7140,7 @@ const Cc = ({ transaction: e }) => {
|
|
7140
7140
|
}
|
7141
7141
|
) : /* @__PURE__ */ t(he, {});
|
7142
7142
|
}, Qh = A(Zh), Jh = () => {
|
7143
|
-
const { selectedAccounts: e } = ue(), { common: n, transactions: i } =
|
7143
|
+
const { selectedAccounts: e } = ue(), { common: n, transactions: i } = x(), { manualTransaction: a, setIsAmountValid: o, updateManualTransaction: r } = xt(), [s, c] = g.useState(""), [d, _] = g.useState(""), u = g.useMemo(
|
7144
7144
|
() => e.filter((b) => b.is_manual),
|
7145
7145
|
[e]
|
7146
7146
|
).map((b) => ({
|
@@ -7183,7 +7183,7 @@ const Cc = ({ transaction: e }) => {
|
|
7183
7183
|
),
|
7184
7184
|
/* @__PURE__ */ t(kd, { name: "TransactionType", onChange: C, row: !0, children: /* @__PURE__ */ l(y, { alignItems: "center", direction: "row", children: [
|
7185
7185
|
/* @__PURE__ */ t(
|
7186
|
-
|
7186
|
+
xr,
|
7187
7187
|
{
|
7188
7188
|
checked: a.transaction_type === St.CREDIT,
|
7189
7189
|
label: i.manual_transaction_credit_button_label,
|
@@ -7193,7 +7193,7 @@ const Cc = ({ transaction: e }) => {
|
|
7193
7193
|
}
|
7194
7194
|
),
|
7195
7195
|
/* @__PURE__ */ t(
|
7196
|
-
|
7196
|
+
xr,
|
7197
7197
|
{
|
7198
7198
|
checked: a.transaction_type === St.DEBIT,
|
7199
7199
|
label: i.manual_transaction_debit_button_label,
|
@@ -7206,7 +7206,7 @@ const Cc = ({ transaction: e }) => {
|
|
7206
7206
|
}
|
7207
7207
|
),
|
7208
7208
|
/* @__PURE__ */ t(
|
7209
|
-
|
7209
|
+
xn,
|
7210
7210
|
{
|
7211
7211
|
label: i.payee_title,
|
7212
7212
|
name: "payee",
|
@@ -7216,7 +7216,7 @@ const Cc = ({ transaction: e }) => {
|
|
7216
7216
|
}
|
7217
7217
|
),
|
7218
7218
|
/* @__PURE__ */ t(
|
7219
|
-
|
7219
|
+
xn,
|
7220
7220
|
{
|
7221
7221
|
InputLabelProps: { shrink: !0 },
|
7222
7222
|
SelectProps: { defaultValue: -1, IconComponent: Ca },
|
@@ -7238,7 +7238,7 @@ const Cc = ({ transaction: e }) => {
|
|
7238
7238
|
] })
|
7239
7239
|
] });
|
7240
7240
|
}, eg = A(Jh), tg = ({ onClose: e, transaction: n }) => {
|
7241
|
-
const { addOrUpdateTransactionRule: i, updateTransaction: a } = Te(), { transactions: o } =
|
7241
|
+
const { addOrUpdateTransactionRule: i, updateTransaction: a } = Te(), { transactions: o } = x(), { categories: r } = Ke(), [s, c] = g.useState(""), d = g.useMemo(
|
7242
7242
|
() => r.find((u) => u.guid === s),
|
7243
7243
|
[s]
|
7244
7244
|
), _ = async (u) => {
|
@@ -7291,15 +7291,15 @@ const Cc = ({ transaction: e }) => {
|
|
7291
7291
|
setSearchValue: h,
|
7292
7292
|
setShowInsights: m,
|
7293
7293
|
updateManualTransaction: C
|
7294
|
-
} =
|
7294
|
+
} = xt(), {
|
7295
7295
|
addTransaction: f,
|
7296
7296
|
filter: E,
|
7297
7297
|
loadAssociatedBeats: b,
|
7298
7298
|
setFilter: T,
|
7299
7299
|
tags: w,
|
7300
7300
|
transactions: v,
|
7301
|
-
updateTransaction:
|
7302
|
-
} = Te(), { common: R, transactions: D } =
|
7301
|
+
updateTransaction: I
|
7302
|
+
} = Te(), { common: R, transactions: D } = x(), { userProfile: H } = _n(), { onEvent: O } = z(), {
|
7303
7303
|
displayedDateRange: M,
|
7304
7304
|
isCopyLoaded: Z,
|
7305
7305
|
isInitialized: U,
|
@@ -7354,7 +7354,7 @@ const Cc = ({ transaction: e }) => {
|
|
7354
7354
|
}, El = async () => {
|
7355
7355
|
ct(!1), await r();
|
7356
7356
|
}, Sl = async () => {
|
7357
|
-
Me && !Me.has_been_viewed && await
|
7357
|
+
Me && !Me.has_been_viewed && await I({ ...Me, has_been_viewed: !0 }), oe("");
|
7358
7358
|
};
|
7359
7359
|
return !Z || !U || !Ft ? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ l(
|
7360
7360
|
Ot,
|
@@ -7523,7 +7523,7 @@ const Cc = ({ transaction: e }) => {
|
|
7523
7523
|
occurs_on: li(e.expectedDate, { representation: "date" }),
|
7524
7524
|
recurrence_type: e.recurrenceType
|
7525
7525
|
}), ag = ({ activity: e }) => {
|
7526
|
-
const { recurring: n } =
|
7526
|
+
const { recurring: n } = x(), { cashflowSequences: i, scheduledPayments: a, updateCashflowSequence: o, updateScheduledPayment: r } = nt(), { onEvent: s } = z(), [c, d] = g.useState(!1), _ = e.activityType === Ze.Income, u = [
|
7527
7527
|
{ id: J.EveryWeek, label: n.frequency_every_week },
|
7528
7528
|
{ id: J.EveryOtherWeek, label: n.frequency_every_other_week },
|
7529
7529
|
{ id: J.EveryMonth, label: n.frequency_every_month },
|
@@ -7589,7 +7589,7 @@ const Cc = ({ transaction: e }) => {
|
|
7589
7589
|
)
|
7590
7590
|
] });
|
7591
7591
|
}, og = A(ag), rg = ({ activity: e }) => {
|
7592
|
-
const { recurring: n } =
|
7592
|
+
const { recurring: n } = x(), { cashflowSequences: i, scheduledPayments: a, updateCashflowSequence: o, updateScheduledPayment: r } = nt(), { onEvent: s } = z(), [c, d] = g.useState(!1), [_, u] = g.useState(e.expectedDate), h = e.activityType === Ze.Income, m = () => {
|
7593
7593
|
u(e.expectedDate), d(!0), s(
|
7594
7594
|
h ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
7595
7595
|
{
|
@@ -7648,7 +7648,7 @@ const Cc = ({ transaction: e }) => {
|
|
7648
7648
|
)
|
7649
7649
|
] });
|
7650
7650
|
}, sg = A(rg), cg = ({ activity: e, onDeleted: n }) => {
|
7651
|
-
const { recurring: i } =
|
7651
|
+
const { recurring: i } = x(), { categories: a } = Ke(), { deleteCashflowSequence: o, deleteScheduledPayment: r, paidActivities: s } = nt(), { filter: c, setFilter: d, transactions: _ } = Te(), { selectedAccountGuids: u } = ue(), { onEvent: h } = z(), [m, C] = g.useState(!1), [f, E] = g.useState(""), b = a.find((R) => R.guid === e.categoryGuid), T = e.activityType === Ze.Income, w = g.useMemo(
|
7652
7652
|
() => _.find((R) => R.guid === f),
|
7653
7653
|
[f]
|
7654
7654
|
);
|
@@ -7671,7 +7671,7 @@ const Cc = ({ transaction: e }) => {
|
|
7671
7671
|
}, [e]);
|
7672
7672
|
const v = async () => {
|
7673
7673
|
T && e.sequenceGuid ? await o(e.sequenceGuid) : e.scheduledPaymentGuid && await r(e.scheduledPaymentGuid), n();
|
7674
|
-
},
|
7674
|
+
}, I = () => {
|
7675
7675
|
C(!0), h(
|
7676
7676
|
T ? "recurring_transactions_widget_income_details_click_delete" : "recurring_transactions_widget_expense_details_click_delete",
|
7677
7677
|
{
|
@@ -7727,7 +7727,7 @@ const Cc = ({ transaction: e }) => {
|
|
7727
7727
|
te,
|
7728
7728
|
{
|
7729
7729
|
color: "error",
|
7730
|
-
onClick:
|
7730
|
+
onClick: I,
|
7731
7731
|
startIcon: /* @__PURE__ */ t(P, { name: "delete" }),
|
7732
7732
|
sx: { mx: 24, my: 16 },
|
7733
7733
|
variant: "text",
|
@@ -7825,7 +7825,7 @@ const Cc = ({ transaction: e }) => {
|
|
7825
7825
|
},
|
7826
7826
|
showOrdinal: a = !1
|
7827
7827
|
}) => {
|
7828
|
-
const { recurring: o } =
|
7828
|
+
const { recurring: o } = x(), [r, s] = g.useState(""), c = e.activityType === Ze.Income, d = e.activityStatus === et.Paid, _ = e.activityStatus === et.Missed, u = e.activityStatus === et.Upcoming;
|
7829
7829
|
let h = o.paid?.toLowerCase();
|
7830
7830
|
return _ ? h = o.missed?.toLowerCase() : u && (h = Br(a ? {
|
7831
7831
|
copy: o,
|
@@ -7952,7 +7952,7 @@ const Cc = ({ transaction: e }) => {
|
|
7952
7952
|
break;
|
7953
7953
|
}
|
7954
7954
|
return a;
|
7955
|
-
},
|
7955
|
+
}, xc = (e, n) => ({
|
7956
7956
|
amount: n.amount,
|
7957
7957
|
cashflow_sequence_guid: e.guid,
|
7958
7958
|
category_guid: n.category_guid,
|
@@ -7992,7 +7992,7 @@ const Cc = ({ transaction: e }) => {
|
|
7992
7992
|
onSearch: i,
|
7993
7993
|
onSelected: a
|
7994
7994
|
}) => {
|
7995
|
-
const { recurring: o } =
|
7995
|
+
const { recurring: o } = x(), { searchValue: r, setSearchValue: s } = xt();
|
7996
7996
|
return /* @__PURE__ */ l(y, { sx: { bgcolor: e, gap: 16, pt: 8 }, children: [
|
7997
7997
|
n && /* @__PURE__ */ t(Oe, { sx: { mx: 24 }, children: n }),
|
7998
7998
|
/* @__PURE__ */ t(
|
@@ -8009,7 +8009,7 @@ const Cc = ({ transaction: e }) => {
|
|
8009
8009
|
),
|
8010
8010
|
/* @__PURE__ */ t(mn, { bgcolor: e, height: "auto", onClick: a, showLoader: !1 })
|
8011
8011
|
] });
|
8012
|
-
},
|
8012
|
+
}, Ic = A(gg), mg = ({
|
8013
8013
|
bgcolor: e = "background.default",
|
8014
8014
|
frequency: n,
|
8015
8015
|
isIncome: i,
|
@@ -8018,7 +8018,7 @@ const Cc = ({ transaction: e }) => {
|
|
8018
8018
|
onNextDateChange: r,
|
8019
8019
|
transaction: s
|
8020
8020
|
}) => {
|
8021
|
-
const { recurring: c } =
|
8021
|
+
const { recurring: c } = x(), d = [
|
8022
8022
|
{ id: J.EveryWeek, label: c.frequency_every_week },
|
8023
8023
|
{ id: J.EveryOtherWeek, label: c.frequency_every_other_week },
|
8024
8024
|
{ id: J.EveryMonth, label: c.frequency_every_month },
|
@@ -8061,7 +8061,7 @@ const Cc = ({ transaction: e }) => {
|
|
8061
8061
|
return /* @__PURE__ */ l(y, { bgcolor: e, gap: 24, height: "100%", children: [
|
8062
8062
|
/* @__PURE__ */ l(y, { children: [
|
8063
8063
|
/* @__PURE__ */ t(va, { bgcolor: e, children: Hi(s.date) }),
|
8064
|
-
/* @__PURE__ */ t(
|
8064
|
+
/* @__PURE__ */ t(Ia, { transaction: s })
|
8065
8065
|
] }),
|
8066
8066
|
/* @__PURE__ */ t(p, { bold: !0, sx: { mx: 24 }, variant: "Body", children: i ? c.income_schedule : c.expense_schedule }),
|
8067
8067
|
/* @__PURE__ */ t(
|
@@ -8097,12 +8097,12 @@ const Cc = ({ transaction: e }) => {
|
|
8097
8097
|
label: n,
|
8098
8098
|
onAddActivity: i = () => null
|
8099
8099
|
}) => {
|
8100
|
-
const { recurring: a } =
|
8100
|
+
const { recurring: a } = x(), { addCashflowEvent: o, addCashflowSequence: r, addScheduledPayment: s } = nt(), { filter: c, setFilter: d, transactions: _ } = Te(), [u, h] = g.useState(!1), [m, C] = g.useState(""), [f, E] = g.useState(J.EveryMonth), [b, T] = g.useState(null), w = g.useMemo(
|
8101
8101
|
() => _.find((D) => D.guid === m),
|
8102
8102
|
[m]
|
8103
8103
|
), v = () => {
|
8104
8104
|
h(!0), d(e ? { ...c, custom: jn } : { ...c, custom: Ni });
|
8105
|
-
},
|
8105
|
+
}, I = async () => {
|
8106
8106
|
if (i(), !w || !b) {
|
8107
8107
|
R();
|
8108
8108
|
return;
|
@@ -8110,7 +8110,7 @@ const Cc = ({ transaction: e }) => {
|
|
8110
8110
|
if (e) {
|
8111
8111
|
const D = Ac(w, f, b), H = await r(D);
|
8112
8112
|
if (H) {
|
8113
|
-
const O =
|
8113
|
+
const O = xc(H, w);
|
8114
8114
|
await o(O);
|
8115
8115
|
}
|
8116
8116
|
} else {
|
@@ -8138,7 +8138,7 @@ const Cc = ({ transaction: e }) => {
|
|
8138
8138
|
onClose: () => h(!1),
|
8139
8139
|
title: n,
|
8140
8140
|
children: /* @__PURE__ */ t(
|
8141
|
-
|
8141
|
+
Ic,
|
8142
8142
|
{
|
8143
8143
|
description: e ? a.add_income_description : a.add_expense_description,
|
8144
8144
|
onSearch: (D) => {
|
@@ -8158,7 +8158,7 @@ const Cc = ({ transaction: e }) => {
|
|
8158
8158
|
ariaLabelClose: a.close_drawer_aria,
|
8159
8159
|
isOpen: !!m,
|
8160
8160
|
onClose: () => C(""),
|
8161
|
-
onPrimaryAction:
|
8161
|
+
onPrimaryAction: I,
|
8162
8162
|
title: e ? a.income_details : a.expense_details,
|
8163
8163
|
children: w && /* @__PURE__ */ t(
|
8164
8164
|
vc,
|
@@ -8191,7 +8191,7 @@ const Cc = ({ transaction: e }) => {
|
|
8191
8191
|
scheduledPaymentGuid: a.guid
|
8192
8192
|
};
|
8193
8193
|
}), fg = () => {
|
8194
|
-
const { recurring: e } =
|
8194
|
+
const { recurring: e } = x(), { scheduledPayments: n } = nt(), { transactions: i } = Te(), { selectedAccounts: a } = ue(), { onEvent: o } = z(), r = Cg(a, n, i), s = (d) => {
|
8195
8195
|
o(W.RECURRING_ACTIVITY_CLICK_EXPENSE, {
|
8196
8196
|
transaction_guid: d.transactionGuid
|
8197
8197
|
});
|
@@ -8287,11 +8287,11 @@ const Cc = ({ transaction: e }) => {
|
|
8287
8287
|
let m = u;
|
8288
8288
|
switch (n.recurrence_type) {
|
8289
8289
|
case J.EveryWeek:
|
8290
|
-
for (m =
|
8290
|
+
for (m = xi(m, d); we(m, h); )
|
8291
8291
|
a.push({
|
8292
8292
|
...c,
|
8293
8293
|
expectedDate: m
|
8294
|
-
}), m =
|
8294
|
+
}), m = xi(m, d);
|
8295
8295
|
break;
|
8296
8296
|
case J.EveryOtherWeek:
|
8297
8297
|
if (we(s, u))
|
@@ -8386,7 +8386,7 @@ const Cc = ({ transaction: e }) => {
|
|
8386
8386
|
sequenceGuid: r.guid
|
8387
8387
|
};
|
8388
8388
|
}), Tg = () => {
|
8389
|
-
const { recurring: e } =
|
8389
|
+
const { recurring: e } = x(), { selectedAccounts: n } = ue(), { cashflowEvents: i, cashflowSequences: a, projectedEvents: o } = nt(), { transactions: r } = Te(), { onEvent: s } = z(), c = Sg(
|
8390
8390
|
n,
|
8391
8391
|
i,
|
8392
8392
|
o,
|
@@ -8407,7 +8407,7 @@ const Cc = ({ transaction: e }) => {
|
|
8407
8407
|
/* @__PURE__ */ t(Nc, { isIncome: !0, label: e.add_income, onAddActivity: _ })
|
8408
8408
|
] });
|
8409
8409
|
}, Bo = A(Tg), Ag = () => {
|
8410
|
-
const [e, n] = g.useState(0), { onEvent: i } = z(), { recurring: a } =
|
8410
|
+
const [e, n] = g.useState(0), { onEvent: i } = z(), { recurring: a } = x();
|
8411
8411
|
return /* @__PURE__ */ l(L, { bgcolor: "background.default", height: "100%", children: [
|
8412
8412
|
/* @__PURE__ */ l(
|
8413
8413
|
Lt,
|
@@ -8453,8 +8453,8 @@ const Cc = ({ transaction: e }) => {
|
|
8453
8453
|
}) || oi(e.expectedDate, {
|
8454
8454
|
start: We(/* @__PURE__ */ new Date()),
|
8455
8455
|
end: Mt(_e(), 30)
|
8456
|
-
}),
|
8457
|
-
const { recurring: a } =
|
8456
|
+
}), xg = ({ day: e, outsideCurrentMonth: n, ...i }) => {
|
8457
|
+
const { recurring: a } = x(), { selectedAccountGuids: o } = ue(), { activities: r, setSelectedDay: s } = nt(), d = g.useMemo(
|
8458
8458
|
() => r.filter((f) => o.includes(f.accountGuid || "")),
|
8459
8459
|
[o, r]
|
8460
8460
|
).filter(
|
@@ -8506,11 +8506,11 @@ const Cc = ({ transaction: e }) => {
|
|
8506
8506
|
)
|
8507
8507
|
}
|
8508
8508
|
);
|
8509
|
-
},
|
8509
|
+
}, Ig = A(xg), ji = ({ icon: e, label: n }) => /* @__PURE__ */ l(y, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
8510
8510
|
/* @__PURE__ */ t(e, {}),
|
8511
8511
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: n })
|
8512
8512
|
] }), vg = () => {
|
8513
|
-
const { recurring: e } =
|
8513
|
+
const { recurring: e } = x();
|
8514
8514
|
return /* @__PURE__ */ l(
|
8515
8515
|
y,
|
8516
8516
|
{
|
@@ -8541,7 +8541,7 @@ const Cc = ({ transaction: e }) => {
|
|
8541
8541
|
onMonthChange: r,
|
8542
8542
|
showDaysOutsideCurrentMonth: !0,
|
8543
8543
|
slots: {
|
8544
|
-
day:
|
8544
|
+
day: Ig
|
8545
8545
|
},
|
8546
8546
|
sx: {
|
8547
8547
|
"& .MuiButtonBase-root.MuiPickersDay-root": {
|
@@ -8610,7 +8610,7 @@ const Cc = ({ transaction: e }) => {
|
|
8610
8610
|
sx: o = {},
|
8611
8611
|
title: r
|
8612
8612
|
}) => {
|
8613
|
-
const { recurring: s } =
|
8613
|
+
const { recurring: s } = x(), c = Dg(e);
|
8614
8614
|
return /* @__PURE__ */ l(y, { gap: 8, mt: 4, sx: o, children: [
|
8615
8615
|
r && /* @__PURE__ */ l(y, { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24, children: [
|
8616
8616
|
/* @__PURE__ */ t(p, { bold: !0, variant: "Body", children: r }),
|
@@ -8661,7 +8661,7 @@ const Cc = ({ transaction: e }) => {
|
|
8661
8661
|
total: o,
|
8662
8662
|
onNewClick: r
|
8663
8663
|
}) => {
|
8664
|
-
const { recurring: s } =
|
8664
|
+
const { recurring: s } = x(), c = ge(), d = g.useMemo(() => {
|
8665
8665
|
const _ = [{ color: c.palette.success.main, percentage: `${i / n}` }];
|
8666
8666
|
return a && _.push({ color: c.palette.error.main, percentage: `${a / n}` }), _;
|
8667
8667
|
}, [i, n, a]);
|
@@ -8687,7 +8687,7 @@ const Cc = ({ transaction: e }) => {
|
|
8687
8687
|
/* @__PURE__ */ t(si, { data: d })
|
8688
8688
|
] });
|
8689
8689
|
}, Hr = A(Og), Lg = () => {
|
8690
|
-
const { recurring: e } =
|
8690
|
+
const { recurring: e } = x(), { isMobile: n, isSmallTablet: i } = Ee(), {
|
8691
8691
|
activities: a,
|
8692
8692
|
missedActivities: o,
|
8693
8693
|
paidActivities: r,
|
@@ -8695,7 +8695,7 @@ const Cc = ({ transaction: e }) => {
|
|
8695
8695
|
selectedDayActivities: c,
|
8696
8696
|
setSelectedDay: d,
|
8697
8697
|
upcomingActivities: _
|
8698
|
-
} = nt(), [u, h] = g.useState(0), { onEvent: m } = z(), C = a.filter(za), f = r.filter(za), E = o.filter(za), b = C.filter(Yi).reduce(mi, 0), T = f.filter(Yi).reduce(mi, 0), w = E.filter(Yi).reduce(mi, 0), v = C.filter(Yi).length,
|
8698
|
+
} = nt(), [u, h] = g.useState(0), { onEvent: m } = z(), C = a.filter(za), f = r.filter(za), E = o.filter(za), b = C.filter(Yi).reduce(mi, 0), T = f.filter(Yi).reduce(mi, 0), w = E.filter(Yi).reduce(mi, 0), v = C.filter(Yi).length, I = C.filter(Ka).reduce(mi, 0), R = f.filter(Ka).reduce(mi, 0), D = C.filter(Ka).length, H = (Z, U) => {
|
8699
8699
|
h(U);
|
8700
8700
|
}, O = (Z) => {
|
8701
8701
|
m(W.RECURRING_ACTIVITY_CLICK_UPCOMING, {
|
@@ -8721,7 +8721,7 @@ const Cc = ({ transaction: e }) => {
|
|
8721
8721
|
/* @__PURE__ */ t(
|
8722
8722
|
Hr,
|
8723
8723
|
{
|
8724
|
-
expected:
|
8724
|
+
expected: I,
|
8725
8725
|
paid: R,
|
8726
8726
|
title: e.deposits,
|
8727
8727
|
total: D
|
@@ -8777,14 +8777,14 @@ const Cc = ({ transaction: e }) => {
|
|
8777
8777
|
] }) })
|
8778
8778
|
] });
|
8779
8779
|
}, Mg = A(Lg), kg = ({ onBackClick: e, sx: n = {} }) => {
|
8780
|
-
const { visibleAccounts: i } = ve(), { recurring: a } =
|
8780
|
+
const { visibleAccounts: i } = ve(), { recurring: a } = x(), { isCopyLoaded: o, isInitialized: r, selectedAccountGuids: s, setSelectedAccounts: c } = ue(), { setFilter: d } = Te(), { isDataLoaded: _, loadActivity: u } = nt(), { onEvent: h } = z();
|
8781
8781
|
g.useEffect(() => {
|
8782
8782
|
u();
|
8783
8783
|
}, []), g.useEffect(() => {
|
8784
8784
|
c(i);
|
8785
8785
|
}, [i]), g.useEffect(() => {
|
8786
8786
|
r && d({
|
8787
|
-
dateRange: { start: _t(_e(), 90), end:
|
8787
|
+
dateRange: { start: _t(_e(), 90), end: In() },
|
8788
8788
|
accounts: s
|
8789
8789
|
});
|
8790
8790
|
}, [r, s]);
|
@@ -8827,7 +8827,7 @@ const Cc = ({ transaction: e }) => {
|
|
8827
8827
|
}
|
8828
8828
|
) : /* @__PURE__ */ t(he, {});
|
8829
8829
|
}, i4 = A(kg), Gg = () => {
|
8830
|
-
const { recurring: e } =
|
8830
|
+
const { recurring: e } = x(), {
|
8831
8831
|
isDataLoaded: n,
|
8832
8832
|
loadActivity: i,
|
8833
8833
|
selectedDay: a,
|
@@ -8857,12 +8857,12 @@ const Cc = ({ transaction: e }) => {
|
|
8857
8857
|
)
|
8858
8858
|
] }) : /* @__PURE__ */ t(he, {});
|
8859
8859
|
}, Bg = A(Gg), Pg = ({ onPrimaryCtaClick: e, sx: n }) => {
|
8860
|
-
const { accounts: i } = ve(), { recurring: a } =
|
8860
|
+
const { accounts: i } = ve(), { recurring: a } = x(), { isCopyLoaded: o, isInitialized: r, setSelectedAccounts: s, selectedAccountGuids: c } = ue(), { setFilter: d } = Te();
|
8861
8861
|
return g.useEffect(() => {
|
8862
8862
|
r && s(i);
|
8863
8863
|
}, [r]), g.useEffect(() => {
|
8864
8864
|
c.length > 0 && d({
|
8865
|
-
dateRange: { start: _t(_e(), 90), end:
|
8865
|
+
dateRange: { start: _t(_e(), 90), end: In() },
|
8866
8866
|
accounts: c
|
8867
8867
|
});
|
8868
8868
|
}, [c]), !o || !r ? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ t(
|
@@ -9087,7 +9087,7 @@ const $g = {
|
|
9087
9087
|
label: n.account_name,
|
9088
9088
|
name: "user_name",
|
9089
9089
|
placeholder: S(n.enter_value, n.account_name),
|
9090
|
-
type:
|
9090
|
+
type: It.Input,
|
9091
9091
|
validation: (a) => a ? "" : S(n.field_is_required, n.account_name),
|
9092
9092
|
valueFormatter: (a) => a
|
9093
9093
|
}
|
@@ -9097,7 +9097,7 @@ const $g = {
|
|
9097
9097
|
label: n.account_balance,
|
9098
9098
|
name: "balance",
|
9099
9099
|
placeholder: S(n.enter_value, n.account_balance),
|
9100
|
-
type:
|
9100
|
+
type: It.Currency,
|
9101
9101
|
valueFormatter: (o) => B(o, "0,0.00")
|
9102
9102
|
});
|
9103
9103
|
const a = Object.keys(le).filter((o) => Number(o)).map((o) => ({
|
@@ -9110,7 +9110,7 @@ const $g = {
|
|
9110
9110
|
name: "account_type",
|
9111
9111
|
options: a,
|
9112
9112
|
placeholder: S(n.select_value, n.account_type),
|
9113
|
-
type:
|
9113
|
+
type: It.Select,
|
9114
9114
|
valueFormatter: (o) => a.find((r) => r.value === o)?.label
|
9115
9115
|
});
|
9116
9116
|
}
|
@@ -9125,7 +9125,7 @@ const $g = {
|
|
9125
9125
|
name: "property_type",
|
9126
9126
|
options: a,
|
9127
9127
|
placeholder: S(n.select_value, n.property_type),
|
9128
|
-
type:
|
9128
|
+
type: It.Select,
|
9129
9129
|
valueFormatter: (o) => a.find((r) => r.value === o)?.label
|
9130
9130
|
});
|
9131
9131
|
}
|
@@ -9136,7 +9136,7 @@ const $g = {
|
|
9136
9136
|
label: a,
|
9137
9137
|
name: o,
|
9138
9138
|
placeholder: S(n.enter_value, a),
|
9139
|
-
type:
|
9139
|
+
type: It.Input,
|
9140
9140
|
validation: (r) => oo(r) ? "" : n.error_amount_is_invalid,
|
9141
9141
|
valueFormatter: (r) => oo(r) ? $i(r / 100) : r
|
9142
9142
|
});
|
@@ -9145,12 +9145,12 @@ const $g = {
|
|
9145
9145
|
label: n.minimum_payment,
|
9146
9146
|
name: "minimum_payment",
|
9147
9147
|
placeholder: S(n.enter_value, n.minimum_payment),
|
9148
|
-
type:
|
9148
|
+
type: It.Currency,
|
9149
9149
|
valueFormatter: (a) => B(a, "0,0.00")
|
9150
9150
|
}), e.payment_due_at ? i.push({
|
9151
9151
|
label: n.next_payment,
|
9152
9152
|
name: "payment_due_at",
|
9153
|
-
type:
|
9153
|
+
type: It.Date,
|
9154
9154
|
valueFormatter: (a) => {
|
9155
9155
|
const o = typeof a == "number" ? new Date(a * 1e3) : a;
|
9156
9156
|
return re(o, ie.MED_MONTH_SHORT_DAY_FULL_YEAR);
|
@@ -9159,7 +9159,7 @@ const $g = {
|
|
9159
9159
|
label: n.day_payment_due,
|
9160
9160
|
name: "day_payment_is_due",
|
9161
9161
|
placeholder: S(n.enter_value, n.day_payment_due),
|
9162
|
-
type:
|
9162
|
+
type: It.Date,
|
9163
9163
|
valueFormatter: (a) => S(
|
9164
9164
|
n.day_of_every_month,
|
9165
9165
|
Js(a <= 31 ? a : new Date(a).getDate())
|
@@ -9168,14 +9168,14 @@ const $g = {
|
|
9168
9168
|
label: n.credit_limit,
|
9169
9169
|
name: "credit_limit",
|
9170
9170
|
placeholder: S(n.enter_value, n.credit_limit),
|
9171
|
-
type:
|
9171
|
+
type: It.Currency,
|
9172
9172
|
valueFormatter: (a) => B(a, "0,0.00")
|
9173
9173
|
}), Kg(e) && i.push({
|
9174
9174
|
label: n.original_balance,
|
9175
9175
|
minAmount: 1,
|
9176
9176
|
name: "original_balance",
|
9177
9177
|
placeholder: S(n.enter_value, n.original_balance),
|
9178
|
-
type:
|
9178
|
+
type: It.Currency,
|
9179
9179
|
valueFormatter: (a) => B(a, "0,0.00")
|
9180
9180
|
}), i;
|
9181
9181
|
}, Oc = (e, n) => {
|
@@ -9209,7 +9209,7 @@ const $g = {
|
|
9209
9209
|
listItemProps: i,
|
9210
9210
|
shouldShowConnectionStatus: a = !1
|
9211
9211
|
}) => {
|
9212
|
-
const o = ge(), { accounts: r } =
|
9212
|
+
const o = ge(), { accounts: r } = x(), { firstSubtitle: s, firstValue: c, secondSubtitle: d, secondValue: _ } = Oc(
|
9213
9213
|
e,
|
9214
9214
|
r
|
9215
9215
|
);
|
@@ -9303,7 +9303,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9303
9303
|
] }),
|
9304
9304
|
/* @__PURE__ */ t(k, {})
|
9305
9305
|
] }), $r = A(Xg), qg = ({ total: e, type: n }) => {
|
9306
|
-
const { cashflow: i } =
|
9306
|
+
const { cashflow: i } = x();
|
9307
9307
|
return /* @__PURE__ */ l(Q, { children: [
|
9308
9308
|
/* @__PURE__ */ l(
|
9309
9309
|
Rt,
|
@@ -9329,7 +9329,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9329
9329
|
/* @__PURE__ */ t(k, {})
|
9330
9330
|
] });
|
9331
9331
|
}, Fr = A(qg), Wr = (e, n) => (i) => i.accountGuid === e.guid && (bo(i.expectedDate) || Jt(i.expectedDate, n.start)) && we(i.expectedDate, n.end), Zg = () => {
|
9332
|
-
const { availableWidth: e } = Un(), { cashflow: n } =
|
9332
|
+
const { availableWidth: e } = Un(), { cashflow: n } = x(), { upcomingExpenses: i, upcomingIncome: a } = nt(), { dateRange: o, selectedCashAccounts: r } = _i();
|
9333
9333
|
return /* @__PURE__ */ l(y, { children: [
|
9334
9334
|
/* @__PURE__ */ l(y, { direction: e < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
9335
9335
|
/* @__PURE__ */ t(p, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
@@ -9401,7 +9401,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9401
9401
|
}) })
|
9402
9402
|
] });
|
9403
9403
|
}, Qg = A(Zg), Jg = () => {
|
9404
|
-
const { availableWidth: e } = Un(), n = ge(), { cashflow: i } =
|
9404
|
+
const { availableWidth: e } = Un(), n = ge(), { cashflow: i } = x(), { upcomingExpenses: a, upcomingIncome: o } = nt(), { dateRange: r, selectedCashAccounts: s } = _i(), c = [
|
9405
9405
|
{
|
9406
9406
|
field: "account",
|
9407
9407
|
flex: 1.5,
|
@@ -9630,7 +9630,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9630
9630
|
}
|
9631
9631
|
);
|
9632
9632
|
}, em = A(Jg), tm = () => {
|
9633
|
-
const { cashflow: e } =
|
9633
|
+
const { cashflow: e } = x(), { isDesktop: n } = Ee(), { onEvent: i } = z(), [a, o] = g.useState(0), r = (s, c) => {
|
9634
9634
|
o(c);
|
9635
9635
|
};
|
9636
9636
|
return g.useEffect(() => {
|
@@ -9695,7 +9695,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9695
9695
|
]
|
9696
9696
|
}
|
9697
9697
|
), Ur = (e, n) => (i) => i.accountGuid && e.includes(i.accountGuid) && (bo(i.expectedDate) || Jt(i.expectedDate, n.start)) && we(i.expectedDate, n.end), im = () => {
|
9698
|
-
const [e, n] = g.useState(!1), { availableWidth: i } = Un(), { cashflow: a } =
|
9698
|
+
const [e, n] = g.useState(!1), { availableWidth: i } = Un(), { cashflow: a } = x(), { upcomingExpenses: o, upcomingIncome: r } = nt(), { selectedAccountGuids: s } = ue(), { dateRange: c, selectedCashAccounts: d } = _i(), { userProfile: _ } = _n(), u = g.useMemo(
|
9699
9699
|
() => o.filter(Ur(s, c)),
|
9700
9700
|
[c, s, o]
|
9701
9701
|
), h = g.useMemo(
|
@@ -9811,7 +9811,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9811
9811
|
)
|
9812
9812
|
] });
|
9813
9813
|
}, am = A(im), om = ({ handleNextStep: e }) => {
|
9814
|
-
const { completeOnboarding: n } = vo(), { cashflow: i } =
|
9814
|
+
const { completeOnboarding: n } = vo(), { cashflow: i } = x(), a = ge();
|
9815
9815
|
return /* @__PURE__ */ l(y, { children: [
|
9816
9816
|
/* @__PURE__ */ t(en, { pb: 12, children: i.welcome_title }),
|
9817
9817
|
/* @__PURE__ */ t(
|
@@ -9884,7 +9884,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9884
9884
|
CASHFLOW_ONBOARDING: `${Vr}/cashflow-onboarding.png`,
|
9885
9885
|
CASHFLOW_LOADING_ANIMATION: `${Vr}/loading-animation.gif`
|
9886
9886
|
}, sm = () => {
|
9887
|
-
const { cashflow: e } =
|
9887
|
+
const { cashflow: e } = x();
|
9888
9888
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
9889
9889
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("img", { alt: "Loading", src: Lc.CASHFLOW_LOADING_ANIMATION }) }),
|
9890
9890
|
/* @__PURE__ */ t(en, { pb: 12, children: e.loading_title }),
|
@@ -9898,7 +9898,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9898
9898
|
transform: rotate(360deg);
|
9899
9899
|
}
|
9900
9900
|
`, dm = () => {
|
9901
|
-
const { addCashflowEvent: e, addCashflowSequence: n, cashflowSequences: i } = nt(), { cashflow: a, common: o } =
|
9901
|
+
const { addCashflowEvent: e, addCashflowSequence: n, cashflowSequences: i } = nt(), { cashflow: a, common: o } = x(), { completeOnboarding: r } = vo(), { isDirty: s } = _i(), { isMobile: c } = Ee(), { isCopyLoaded: d, setDisplayedDate: _ } = ue(), { filter: u, setFilter: h, transactions: m } = Te(), C = ge(), [f, E] = Et(!0), [b, T] = g.useState(J.EveryMonth), [w, v] = Et(!1), [I, R] = g.useState(null), [D, H] = Et(1), [O, M] = Et([]), [Z, U] = Et(""), X = g.useMemo(
|
9902
9902
|
() => m.find((oe) => oe.guid === Z),
|
9903
9903
|
[Z]
|
9904
9904
|
), fe = !!i.length, $ = async () => {
|
@@ -9917,7 +9917,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9917
9917
|
me.nextDate
|
9918
9918
|
), $e = await n(Ye);
|
9919
9919
|
if ($e) {
|
9920
|
-
const Je =
|
9920
|
+
const Je = xc($e, me);
|
9921
9921
|
await e(Je);
|
9922
9922
|
}
|
9923
9923
|
}
|
@@ -9970,7 +9970,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9970
9970
|
/* @__PURE__ */ t(va, { bgcolor: "background.paper", children: Hi(
|
9971
9971
|
ke(oe.nextDate || oe.date)
|
9972
9972
|
) }),
|
9973
|
-
/* @__PURE__ */ t(
|
9973
|
+
/* @__PURE__ */ t(Ia, { transaction: oe }),
|
9974
9974
|
me !== O.length - 1 && /* @__PURE__ */ t(k, {})
|
9975
9975
|
] }, oe.guid)) }),
|
9976
9976
|
/* @__PURE__ */ l(y, { alignItems: "center", direction: "row", children: [
|
@@ -9986,7 +9986,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
9986
9986
|
] })
|
9987
9987
|
] }),
|
9988
9988
|
Re && /* @__PURE__ */ t(
|
9989
|
-
|
9989
|
+
Ic,
|
9990
9990
|
{
|
9991
9991
|
bgcolor: "background.paper",
|
9992
9992
|
onSearch: (oe) => h({
|
@@ -10006,7 +10006,7 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
10006
10006
|
bgcolor: "background.paper",
|
10007
10007
|
frequency: b,
|
10008
10008
|
isIncome: !0,
|
10009
|
-
nextDate:
|
10009
|
+
nextDate: I,
|
10010
10010
|
onFrequencyChange: T,
|
10011
10011
|
onNextDateChange: R,
|
10012
10012
|
transaction: X
|
@@ -10016,10 +10016,10 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
10016
10016
|
/* @__PURE__ */ t(
|
10017
10017
|
te,
|
10018
10018
|
{
|
10019
|
-
"aria-disabled": !X || !
|
10019
|
+
"aria-disabled": !X || !I,
|
10020
10020
|
onClick: () => {
|
10021
10021
|
const oe = [...O];
|
10022
|
-
oe.push({ ...X, nextDate:
|
10022
|
+
oe.push({ ...X, nextDate: I, frequency: b }), M(oe), U("");
|
10023
10023
|
},
|
10024
10024
|
variant: "contained",
|
10025
10025
|
children: o.confirm_button
|
@@ -10071,16 +10071,16 @@ const Xg = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
10071
10071
|
setSelectedAccounts: o,
|
10072
10072
|
shouldDisableNextDate: r,
|
10073
10073
|
shouldDisablePrevDate: s
|
10074
|
-
} = ue(), { onEvent: c } = z(), { visibleCashAccounts: d } = ve(), { setFilter: _ } = Te(), { userProfile: u } = _n(), { dateRange: h, setSelectedCashAccounts: m } = _i(), { loadActivity: C } = nt(), { cashflow: f } =
|
10074
|
+
} = ue(), { onEvent: c } = z(), { visibleCashAccounts: d } = ve(), { setFilter: _ } = Te(), { userProfile: u } = _n(), { dateRange: h, setSelectedCashAccounts: m } = _i(), { loadActivity: C } = nt(), { cashflow: f } = x(), { isCopyLoaded: E, isInitialized: b } = ue(), [T, w] = g.useState(!1);
|
10075
10075
|
return g.useEffect(() => {
|
10076
10076
|
b && C();
|
10077
10077
|
}, [b]), g.useEffect(() => {
|
10078
10078
|
o(d);
|
10079
10079
|
}, [d]), g.useEffect(() => {
|
10080
|
-
const v = d.map((R) => R.guid),
|
10080
|
+
const v = d.map((R) => R.guid), I = i.filter(
|
10081
10081
|
(R) => a.includes(R.guid) && v.includes(R.guid)
|
10082
10082
|
);
|
10083
|
-
m(
|
10083
|
+
m(I), _({ accounts: I.map((R) => R.guid) });
|
10084
10084
|
}, [d, i]), !E || !b ? /* @__PURE__ */ t(he, {}) : u?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ l(
|
10085
10085
|
Ot,
|
10086
10086
|
{
|
@@ -10164,7 +10164,7 @@ let hm = class {
|
|
10164
10164
|
}
|
10165
10165
|
// Returns the number of days until the next income activity or 0 if there is no income activity
|
10166
10166
|
get daysUntilNextIncome() {
|
10167
|
-
return this.nextIncome ? Math.abs(
|
10167
|
+
return this.nextIncome ? Math.abs(Id(_e(), this.nextIncome.expectedDate)) : 0;
|
10168
10168
|
}
|
10169
10169
|
// Returns the expenses (Activities) until the next income activity or the end of the month
|
10170
10170
|
// if there is no income activity
|
@@ -10248,7 +10248,7 @@ const Cn = () => {
|
|
10248
10248
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
10249
10249
|
return Aa().uiStore;
|
10250
10250
|
}, pm = ({ debts: e, onClickCta: n, sx: i }) => {
|
10251
|
-
const a = wn(), { isMobile: o } = Ee(), { debts: r } =
|
10251
|
+
const a = wn(), { isMobile: o } = Ee(), { debts: r } = x(), { selectedDebtPriority: s } = Cn(), { monthlyCashFlowProfile: c } = rt(), { payoffDate: d, payoffSavings: _, payoffDuration: u } = g.useMemo(() => {
|
10252
10252
|
const h = c?.extra_payment ?? 0;
|
10253
10253
|
return mm(e, s, h);
|
10254
10254
|
}, [e, s, c]);
|
@@ -10300,7 +10300,7 @@ const Cn = () => {
|
|
10300
10300
|
}
|
10301
10301
|
);
|
10302
10302
|
}, Cm = A(pm), fm = ({ isOpen: e, onClose: n, sx: i }) => {
|
10303
|
-
const a = wn(), { debts: o } =
|
10303
|
+
const a = wn(), { debts: o } = x(), [r, s] = g.useState(!1);
|
10304
10304
|
return /* @__PURE__ */ t(
|
10305
10305
|
ae,
|
10306
10306
|
{
|
@@ -10681,10 +10681,10 @@ const Cn = () => {
|
|
10681
10681
|
}, Am = (e, n) => {
|
10682
10682
|
const i = e.filter(kc);
|
10683
10683
|
return Ho(i).map((a) => ({ ...a, y: Math.abs(a.y) }));
|
10684
|
-
},
|
10684
|
+
}, xm = (e, n) => {
|
10685
10685
|
const i = e.filter(Em);
|
10686
10686
|
return Ho(i);
|
10687
|
-
},
|
10687
|
+
}, Im = (e) => {
|
10688
10688
|
const n = [], i = e.filter(
|
10689
10689
|
(r) => r.top_level_category_guid !== N.INCOME && r.top_level_category_guid !== N.TRANSFER && r.total > 0
|
10690
10690
|
);
|
@@ -10697,7 +10697,7 @@ const Cn = () => {
|
|
10697
10697
|
}), a = gt(a, 1);
|
10698
10698
|
return n;
|
10699
10699
|
}, vm = (e, n) => {
|
10700
|
-
const i = Eo.includes(n) ? Tm(e) : [], a = So.includes(n) ? Am(e) : [], o = To.includes(n) ?
|
10700
|
+
const i = Eo.includes(n) ? Tm(e) : [], a = So.includes(n) ? Am(e) : [], o = To.includes(n) ? xm(e) : [];
|
10701
10701
|
return [i, a, o].filter((r) => r.length > 0);
|
10702
10702
|
}, wm = (e, n, i) => {
|
10703
10703
|
const [a, o] = e, r = a, s = o ?? a, c = [];
|
@@ -10714,9 +10714,9 @@ const Cn = () => {
|
|
10714
10714
|
}
|
10715
10715
|
return c;
|
10716
10716
|
}, Nm = () => {
|
10717
|
-
const e = tt(), { selectedAccount: n } = $t(), { monthlyCategoryTotals: i } = Ke(), { trends: a } =
|
10717
|
+
const e = tt(), { selectedAccount: n } = $t(), { monthlyCategoryTotals: i } = Ke(), { trends: a } = x(), o = [e.palette.chart?.chart1, e.palette.chart?.chart2], r = vm(i, n.account_type), s = wm(r, n.account_type, a), c = [le.LOAN, le.MORTGAGE].includes(n.account_type);
|
10718
10718
|
return /* @__PURE__ */ t("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ t(
|
10719
|
-
|
10719
|
+
xo,
|
10720
10720
|
{
|
10721
10721
|
colors: o,
|
10722
10722
|
datasets: r,
|
@@ -10727,7 +10727,7 @@ const Cn = () => {
|
|
10727
10727
|
}
|
10728
10728
|
) });
|
10729
10729
|
}, Dm = A(Nm), Rm = ({ sx: e }) => {
|
10730
|
-
const { loadMonthlyCategoryTotals: n } = Ke(), { isInitialized: i } =
|
10730
|
+
const { loadMonthlyCategoryTotals: n } = Ke(), { isInitialized: i } = xa(), { selectedAccount: a } = $t(), [o, r] = g.useState(!1);
|
10731
10731
|
return g.useEffect(() => {
|
10732
10732
|
i && n([a]).finally(() => {
|
10733
10733
|
r(!0);
|
@@ -10755,7 +10755,7 @@ const Cn = () => {
|
|
10755
10755
|
}
|
10756
10756
|
);
|
10757
10757
|
}, Om = A(Rm), Lm = ({ customDetailsChart: e }) => {
|
10758
|
-
const { institutions: n } = ve(), { selectedAccount: i } = $t(), { accounts: a } =
|
10758
|
+
const { institutions: n } = ve(), { selectedAccount: i } = $t(), { accounts: a } = x(), { firstSubtitle: o, firstValue: r, hasAvailableBalance: s, secondSubtitle: c, secondValue: d } = Oc(i, a), _ = n.find(
|
10759
10759
|
(h) => h.guid === i?.institution_guid
|
10760
10760
|
), u = [
|
10761
10761
|
...Eo,
|
@@ -10805,31 +10805,31 @@ const Bc = ({
|
|
10805
10805
|
onClickArea: r,
|
10806
10806
|
onHoverArea: s
|
10807
10807
|
}) => {
|
10808
|
-
const c = tt(), { onEvent: d } = z(), _ = a.filter((
|
10808
|
+
const c = tt(), { onEvent: d } = z(), _ = a.filter((I) => !I.is_impossible), u = [
|
10809
10809
|
...new Set(
|
10810
|
-
_.flatMap((
|
10810
|
+
_.flatMap((I) => I.dataset.map((R) => new Date(R.x).getTime()))
|
10811
10811
|
)
|
10812
|
-
].sort((
|
10813
|
-
const R = new Map(
|
10812
|
+
].sort((I, R) => I - R).map((I) => new Date(I)), h = _.map((I) => {
|
10813
|
+
const R = new Map(I.dataset.map((O) => [new Date(O.x).getTime(), O.y]));
|
10814
10814
|
let D = R.get(u[0].getTime()) ?? 0;
|
10815
10815
|
const H = u.map((O) => {
|
10816
10816
|
const M = R.get(O.getTime()) ?? D;
|
10817
10817
|
return D = M, { x: O, y: M };
|
10818
10818
|
});
|
10819
|
-
return { ...
|
10819
|
+
return { ...I, dataset: H };
|
10820
10820
|
}), m = h.reduce(
|
10821
|
-
(
|
10821
|
+
(I, R) => I + (R.dataset[0]?.y ?? 0),
|
10822
10822
|
0
|
10823
|
-
), C = u.map((
|
10823
|
+
), C = u.map((I, R) => {
|
10824
10824
|
const D = R / (u.length - 1), H = m * (1 - D);
|
10825
|
-
return { x, y: H };
|
10826
|
-
}), f = Math.ceil(m / 100) * 100, E = u, b = h.map((
|
10825
|
+
return { x: I, y: H };
|
10826
|
+
}), f = Math.ceil(m / 100) * 100, E = u, b = h.map((I, R) => {
|
10827
10827
|
const D = 1 - R / h.length * 0.5, H = km(Mm, D);
|
10828
10828
|
return {
|
10829
10829
|
id: `debt-${R}`,
|
10830
|
-
guid:
|
10831
|
-
label:
|
10832
|
-
data:
|
10830
|
+
guid: I.guid,
|
10831
|
+
label: I.name,
|
10832
|
+
data: I.dataset.map((O) => O.y),
|
10833
10833
|
color: H,
|
10834
10834
|
curve: "linear",
|
10835
10835
|
type: "line",
|
@@ -10841,7 +10841,7 @@ const Bc = ({
|
|
10841
10841
|
b.push({
|
10842
10842
|
id: "payoff-line",
|
10843
10843
|
label: "Payoff Line",
|
10844
|
-
data: C.map((
|
10844
|
+
data: C.map((I) => I.y),
|
10845
10845
|
color: c.palette.grey[700],
|
10846
10846
|
curve: "linear",
|
10847
10847
|
type: "line",
|
@@ -10849,20 +10849,20 @@ const Bc = ({
|
|
10849
10849
|
showMark: !1,
|
10850
10850
|
disableHighlight: !0
|
10851
10851
|
});
|
10852
|
-
const T = (
|
10852
|
+
const T = (I) => b.findIndex((R) => R?.guid === I);
|
10853
10853
|
return /* @__PURE__ */ t(
|
10854
10854
|
Ds,
|
10855
10855
|
{
|
10856
10856
|
axisHighlight: { x: "none" },
|
10857
10857
|
disableLineItemHighlight: !0,
|
10858
10858
|
height: n,
|
10859
|
-
onAreaClick: (
|
10859
|
+
onAreaClick: (I, R) => {
|
10860
10860
|
r?.();
|
10861
10861
|
const D = b.find((H) => H.id === R.seriesId);
|
10862
10862
|
d(W.DEBTS_CLICK_CHART_AREA, { account_guid: D?.guid });
|
10863
10863
|
},
|
10864
|
-
onHighlightChange: (
|
10865
|
-
const R = b.find((D) => D.id ===
|
10864
|
+
onHighlightChange: (I) => {
|
10865
|
+
const R = b.find((D) => D.id === I?.seriesId)?.guid;
|
10866
10866
|
s?.(R ?? "");
|
10867
10867
|
},
|
10868
10868
|
series: b,
|
@@ -10905,7 +10905,7 @@ const Bc = ({
|
|
10905
10905
|
scaleType: "time",
|
10906
10906
|
min: u[0],
|
10907
10907
|
disableTicks: !0,
|
10908
|
-
valueFormatter: (
|
10908
|
+
valueFormatter: (I) => re(I, ie.MONTH_SHORT_YEAR)
|
10909
10909
|
}
|
10910
10910
|
],
|
10911
10911
|
yAxis: [
|
@@ -10913,13 +10913,13 @@ const Bc = ({
|
|
10913
10913
|
min: 0,
|
10914
10914
|
max: f,
|
10915
10915
|
disableTicks: !0,
|
10916
|
-
valueFormatter: (
|
10916
|
+
valueFormatter: (I) => B(I, "0a")
|
10917
10917
|
}
|
10918
10918
|
]
|
10919
10919
|
}
|
10920
10920
|
);
|
10921
10921
|
}, Gm = () => {
|
10922
|
-
const e = wn(), { debts: n } =
|
10922
|
+
const e = wn(), { debts: n } = x(), { selectedDebtChartData: i } = Cn();
|
10923
10923
|
return /* @__PURE__ */ l(Q, { children: [
|
10924
10924
|
/* @__PURE__ */ l(
|
10925
10925
|
Gt,
|
@@ -10947,7 +10947,7 @@ const Bc = ({
|
|
10947
10947
|
)
|
10948
10948
|
] });
|
10949
10949
|
}, Bm = A(Gm), Pm = () => {
|
10950
|
-
const e = wn(), { onEvent: n } = z(), { debts: i } =
|
10950
|
+
const e = wn(), { onEvent: n } = z(), { debts: i } = x(), { selectedDebtChartData: a, showCompleted: o, showError: r } = Cn();
|
10951
10951
|
return g.useEffect(() => n(W.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ t(ne, { children: r || o ? /* @__PURE__ */ t(
|
10952
10952
|
p,
|
10953
10953
|
{
|
@@ -11011,7 +11011,7 @@ const Bc = ({
|
|
11011
11011
|
) })
|
11012
11012
|
] }) });
|
11013
11013
|
}, Hm = A(Pm), Pc = A(({ goal: e }) => {
|
11014
|
-
const { goals: n } =
|
11014
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = rt(), [r, s] = g.useState(e.interest_rate ?? 0), c = !e.guid, d = r < 0, _ = async () => {
|
11015
11015
|
const h = { ...e, interest_rate: r };
|
11016
11016
|
e.interest_rate = r, c ? a(h) : (await o(h), i(n.alert_goal_updated_interest_rate));
|
11017
11017
|
}, u = () => {
|
@@ -11044,7 +11044,7 @@ const Bc = ({
|
|
11044
11044
|
}
|
11045
11045
|
);
|
11046
11046
|
}), Hc = A(({ goal: e }) => {
|
11047
|
-
const { goals: n } =
|
11047
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = rt(), [r, s] = g.useState(e.monthly_payment ?? 0), c = !e.guid, d = r < 0 || r > 9999999999e-2, _ = async () => {
|
11048
11048
|
const h = { ...e, monthly_payment: r };
|
11049
11049
|
e.monthly_payment = r, c ? a(h) : (await o({ ...e, monthly_payment: r }), i(n.alert_goal_updated_payment));
|
11050
11050
|
}, u = () => {
|
@@ -11078,7 +11078,7 @@ const Bc = ({
|
|
11078
11078
|
}
|
11079
11079
|
);
|
11080
11080
|
}), $c = A(({ goal: e }) => {
|
11081
|
-
const { goals: n } =
|
11081
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = rt(), [r, s] = g.useState(e.initial_amount), c = !e.guid, d = r < 0 || r > 9999999999e-2, _ = async () => {
|
11082
11082
|
const h = { ...e, initial_amount: r };
|
11083
11083
|
e.initial_amount = r, c ? a(h) : (await o({ ...e, initial_amount: r }), i(n.alert_goal_updated_balance));
|
11084
11084
|
}, u = () => {
|
@@ -11112,7 +11112,7 @@ const Bc = ({
|
|
11112
11112
|
}
|
11113
11113
|
);
|
11114
11114
|
}), $m = A(({ debt: e }) => {
|
11115
|
-
const { debts: n } =
|
11115
|
+
const { debts: n } = x(), { updateAccount: i } = ve(), { onEvent: a } = z(), [o, r] = g.useState(e.interest_rate ?? 0), s = o < 0, c = async () => {
|
11116
11116
|
await i({ ...e.account, interest_rate: o }), e.interest_rate = o, a(W.DEBTS_SAVE_RATE_ACTION, { account_guid: e.guid });
|
11117
11117
|
}, d = () => {
|
11118
11118
|
setTimeout(() => {
|
@@ -11142,7 +11142,7 @@ const Bc = ({
|
|
11142
11142
|
}
|
11143
11143
|
);
|
11144
11144
|
}), Fm = A(({ debt: e }) => {
|
11145
|
-
const { debts: n } =
|
11145
|
+
const { debts: n } = x(), { updateAccount: i } = ve(), { onEvent: a } = z(), [o, r] = g.useState(e.monthly_payment ?? 0), s = o < 0 || o > 9999999999e-2, c = async () => {
|
11146
11146
|
await i({ ...e.account, minimum_payment: o }), e.monthly_payment = o, a(W.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: e.guid });
|
11147
11147
|
}, d = () => {
|
11148
11148
|
setTimeout(() => {
|
@@ -11174,7 +11174,7 @@ const Bc = ({
|
|
11174
11174
|
}
|
11175
11175
|
);
|
11176
11176
|
}), Wm = A(({ debt: e }) => {
|
11177
|
-
const { debts: n } =
|
11177
|
+
const { debts: n } = x(), { updateAccount: i } = ve(), { onEvent: a } = z(), [o, r] = g.useState(e.original_balance ?? 0), s = o < 0 || o > 9999999999e-2, c = async () => {
|
11178
11178
|
await i({ ...e.account, original_balance: o }), e.original_balance = o, a(W.DEBTS_SAVE_BALANCE_ACTION, { account_guid: e.guid });
|
11179
11179
|
}, d = () => {
|
11180
11180
|
setTimeout(() => {
|
@@ -11226,7 +11226,7 @@ const Bc = ({
|
|
11226
11226
|
] })
|
11227
11227
|
] });
|
11228
11228
|
}, Vm = A(Um), Km = ({ setTabValue: e, sx: n }) => {
|
11229
|
-
const { debts: i } =
|
11229
|
+
const { debts: i } = x(), { showError: a, showCompleted: o } = Cn();
|
11230
11230
|
return g.useEffect(() => {
|
11231
11231
|
a && e(1);
|
11232
11232
|
}, [a]), !a && !o ? /* @__PURE__ */ t(Q, {}) : /* @__PURE__ */ l(ye, { gap: 16, children: [
|
@@ -11271,7 +11271,7 @@ const Bc = ({
|
|
11271
11271
|
) })
|
11272
11272
|
] });
|
11273
11273
|
}, zm = A(Km), Ym = () => {
|
11274
|
-
const { debts: e } =
|
11274
|
+
const { debts: e } = x(), { showError: n, showCompleted: i } = Cn(), [a, o] = g.useState(0);
|
11275
11275
|
return /* @__PURE__ */ l(Q, { children: [
|
11276
11276
|
(n || i) && /* @__PURE__ */ t(zm, { setTabValue: o, sx: { mt: -24 } }),
|
11277
11277
|
/* @__PURE__ */ l(
|
@@ -11308,7 +11308,7 @@ const Bc = ({
|
|
11308
11308
|
/* @__PURE__ */ t(ci, { index: 1, name: "debt-details", value: a, children: /* @__PURE__ */ t(Vm, {}) })
|
11309
11309
|
] });
|
11310
11310
|
}, jm = A(Ym), Xm = ({ isOpen: e, onClose: n, sx: i }) => {
|
11311
|
-
const { debts: a } =
|
11311
|
+
const { debts: a } = x(), { showError: o, showCompleted: r } = Cn(), s = o || r ? /* @__PURE__ */ t(Q, {}) : /* @__PURE__ */ t(Bm, {});
|
11312
11312
|
return /* @__PURE__ */ t(
|
11313
11313
|
ae,
|
11314
11314
|
{
|
@@ -11324,7 +11324,7 @@ const Bc = ({
|
|
11324
11324
|
}
|
11325
11325
|
);
|
11326
11326
|
}, qm = A(() => {
|
11327
|
-
const { debts: e } =
|
11327
|
+
const { debts: e } = x(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: i } = rt(), { onEvent: a } = z(), [o, r] = g.useState(n?.extra_payment ?? 0), s = o < 0 || o > 9999999999e-2, c = async () => {
|
11328
11328
|
n && (await i({ ...n, extra_payment: o }), n.extra_payment = o, a(W.DEBTS_SAVE_PAYDOWN_ACTION, {
|
11329
11329
|
user_guid: n?.user_guid
|
11330
11330
|
}));
|
@@ -11358,7 +11358,7 @@ const Bc = ({
|
|
11358
11358
|
}
|
11359
11359
|
);
|
11360
11360
|
}), Zm = () => {
|
11361
|
-
const { debts: e } =
|
11361
|
+
const { debts: e } = x(), { totalMonthlyPayments: n } = Aa(), { monthlyCashFlowProfile: i } = rt(), a = n + Number(i?.extra_payment);
|
11362
11362
|
return /* @__PURE__ */ l(y, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
11363
11363
|
/* @__PURE__ */ l(y, { p: 24, children: [
|
11364
11364
|
/* @__PURE__ */ l(y, { alignItems: "center", gap: 4, mb: 24, children: [
|
@@ -11378,7 +11378,7 @@ const Bc = ({
|
|
11378
11378
|
] }) })
|
11379
11379
|
] });
|
11380
11380
|
}, Qm = A(Zm), Jm = ({ isOpen: e, onClose: n, sx: i }) => {
|
11381
|
-
const { debts: a } =
|
11381
|
+
const { debts: a } = x();
|
11382
11382
|
return /* @__PURE__ */ t(
|
11383
11383
|
ae,
|
11384
11384
|
{
|
@@ -11449,7 +11449,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11449
11449
|
onHoverRow: a,
|
11450
11450
|
onClickRow: o
|
11451
11451
|
}) => {
|
11452
|
-
const r = wn(), { onEvent: s } = z(), { isMobile: c } = Ee(), { debts: d } =
|
11452
|
+
const r = wn(), { onEvent: s } = z(), { isMobile: c } = Ee(), { debts: d } = x(), [_, u] = g.useState([
|
11453
11453
|
{ field: "priority", sort: "asc" }
|
11454
11454
|
]), h = [
|
11455
11455
|
{
|
@@ -11549,8 +11549,8 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11549
11549
|
id: T,
|
11550
11550
|
priority: tp(b)
|
11551
11551
|
})), [n]), f = (b) => {
|
11552
|
-
const v = b.target.closest("[data-id]")?.getAttribute("data-id"),
|
11553
|
-
a?.(
|
11552
|
+
const v = b.target.closest("[data-id]")?.getAttribute("data-id"), I = n[Number(v)];
|
11553
|
+
a?.(I?.guid ?? "");
|
11554
11554
|
}, E = (b) => C.find((T) => T.guid === b)?.id;
|
11555
11555
|
return /* @__PURE__ */ t(
|
11556
11556
|
L,
|
@@ -11623,7 +11623,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11623
11623
|
}
|
11624
11624
|
);
|
11625
11625
|
}, sp = A(({ buttonEl: e, onClose: n }) => {
|
11626
|
-
const { onEvent: i } = z(), { debts: a } =
|
11626
|
+
const { onEvent: i } = z(), { debts: a } = x(), { selectedDebtPriority: o, setSelectedDebtPriority: r } = Cn(), s = !!e, c = [
|
11627
11627
|
{
|
11628
11628
|
priority: sn.HIGHEST_INTEREST,
|
11629
11629
|
text: a.priority_sort_highest_interest
|
@@ -11682,7 +11682,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11682
11682
|
}
|
11683
11683
|
);
|
11684
11684
|
}), cp = A(() => {
|
11685
|
-
const { onEvent: e } = z(), { debts: n } =
|
11685
|
+
const { onEvent: e } = z(), { debts: n } = x(), { selectedDebtPriority: i } = Cn(), [a, o] = g.useState(null), r = (_) => {
|
11686
11686
|
o(_.currentTarget), e(W.DEBTS_CLICK_PRIORITIZE);
|
11687
11687
|
}, s = () => {
|
11688
11688
|
o(null);
|
@@ -11733,7 +11733,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11733
11733
|
d.priority = !d.is_paid_off && !d.is_impossible ? c++ : void 0;
|
11734
11734
|
}), r;
|
11735
11735
|
}, dp = A(({ onClick: e }) => {
|
11736
|
-
const { debts: n } =
|
11736
|
+
const { debts: n } = x(), { isDesktop: i } = Ee(), { totalMonthlyPayments: a } = Aa(), { monthlyCashFlowProfile: o } = rt(), r = a + Number(o?.extra_payment), s = i ? n.paydown_button_long : n.paydown_button_short;
|
11737
11737
|
return /* @__PURE__ */ t(
|
11738
11738
|
te,
|
11739
11739
|
{
|
@@ -11747,19 +11747,19 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11747
11747
|
}
|
11748
11748
|
);
|
11749
11749
|
}), up = ({ onBackClick: e, sx: n }) => {
|
11750
|
-
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [d, _] = g.useState(""), { isDesktop: u, isMobile: h } = Ee(), { debts: m } =
|
11750
|
+
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [d, _] = g.useState(""), { isDesktop: u, isMobile: h } = Ee(), { debts: m } = x(), { onEvent: C } = z(), { isCopyLoaded: f, isInitialized: E, setSelectedAccounts: b } = ue(), { setSelectedAccount: T } = $t(), { selectedDebtPriority: w, setSelectedDebtChartData: v } = Cn(), { visibleDebtAccounts: I } = ve(), { goalsLoaded: R, loadGoals: D, monthlyCashFlowProfile: H } = rt(), { debts: O } = Aa(), M = g.useMemo(() => {
|
11751
11751
|
const ce = H?.extra_payment ?? 0;
|
11752
11752
|
return lp(O, w, ce);
|
11753
11753
|
}, [O, w, H]);
|
11754
11754
|
g.useEffect(() => {
|
11755
|
-
b(
|
11755
|
+
b(I), C(W.DEBTS_VIEW);
|
11756
11756
|
}, []), g.useEffect(() => {
|
11757
|
-
b(
|
11758
|
-
}, [
|
11757
|
+
b(I);
|
11758
|
+
}, [I]), g.useEffect(() => {
|
11759
11759
|
E && D().finally();
|
11760
11760
|
}, [E]);
|
11761
11761
|
const Z = (ce) => _(ce), U = () => {
|
11762
|
-
const ce =
|
11762
|
+
const ce = I.find((oe) => oe.guid === d), Re = M.find((oe) => oe.guid === d);
|
11763
11763
|
ce && T(ce), Re && v(Re), a(!0);
|
11764
11764
|
}, X = () => C(W.DEBTS_CLICK_FILTER), fe = () => {
|
11765
11765
|
c(!0), C(W.DEBTS_CLICK_SNOWBALL_CTA);
|
@@ -11769,7 +11769,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11769
11769
|
return !R || !f || !E ? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ l(
|
11770
11770
|
Ot,
|
11771
11771
|
{
|
11772
|
-
accountOptions:
|
11772
|
+
accountOptions: I,
|
11773
11773
|
actions: [
|
11774
11774
|
/* @__PURE__ */ t(cp, {}, "prioritize-debts"),
|
11775
11775
|
/* @__PURE__ */ t(dp, { onClick: $ }, "extra-paydown")
|
@@ -11845,10 +11845,10 @@ function hp(e, n) {
|
|
11845
11845
|
function zr(e, n) {
|
11846
11846
|
const i = { account: e, goal: n, guid: e.guid };
|
11847
11847
|
if (n) {
|
11848
|
-
const a = n.payment_due_at ? rr(
|
11848
|
+
const a = n.payment_due_at ? rr(Ii(n.payment_due_at)) : 1, o = sr(/* @__PURE__ */ new Date()).setDate(a);
|
11849
11849
|
i.balance = Math.abs(n.amount - n.current_amount), i.interest_rate = n.interest_rate, i.is_paid_off = n.is_complete, i.monthly_payment = n.monthly_payment, i.name = n.name, i.original_balance = n.initial_amount, i.payment_due_date = o;
|
11850
11850
|
} else {
|
11851
|
-
const a = e.payment_due_at ? rr(
|
11851
|
+
const a = e.payment_due_at ? rr(Ii(e.payment_due_at)) : 1, o = sr(/* @__PURE__ */ new Date()).setDate(a), r = Math.abs(e.available_balance ?? e.balance ?? 0), s = e.minimum_payment ?? void 0, c = e.interest_rate ?? e.apr ?? e.apy;
|
11852
11852
|
i.balance = Math.abs(r), i.interest_rate = c, i.is_paid_off = r === 0, i.monthly_payment = s, i.name = e?.name ?? _p.unnamed_label, i.original_balance = e.original_balance, i.payment_due_date = o;
|
11853
11853
|
}
|
11854
11854
|
return i.is_impossible = !1, i.priority = void 0, i.projected_payoff_date = void 0, i;
|
@@ -12004,7 +12004,7 @@ const fp = (e, n) => {
|
|
12004
12004
|
"$1$2$3"
|
12005
12005
|
) : B(e, "0,0.00"), Fc = A(
|
12006
12006
|
({ goal: e, isInDrawer: n = !1, onClick: i }) => {
|
12007
|
-
const { goals: a } =
|
12007
|
+
const { goals: a } = x(), { isMobile: o, isTablet: r } = Ee(), s = o || r, {
|
12008
12008
|
backgroundColor: c,
|
12009
12009
|
color: d,
|
12010
12010
|
percentage: _,
|
@@ -12039,7 +12039,7 @@ const fp = (e, n) => {
|
|
12039
12039
|
] }) });
|
12040
12040
|
}
|
12041
12041
|
), yp = A(({ trackType: e }) => {
|
12042
|
-
const { goals: n } =
|
12042
|
+
const { goals: n } = x(), { setAlert: i, monthlyCashFlowProfile: a, updateMonthlyCashFlowProfile: o } = rt(), r = g.useMemo(() => {
|
12043
12043
|
let _ = 0;
|
12044
12044
|
return e === K.SAVINGS_TRACK ? _ = a?.amount_allocated_for_savings_goals || 0 : e === K.DEBT_TRACK ? _ = a?.amount_allocated_for_debt_goals || 0 : e === K.RETIREMENT_TRACK && (_ = a?.amount_allocated_for_retirement_goals || 0), _;
|
12045
12045
|
}, [a]), [s, c] = g.useState(r), d = async () => {
|
@@ -12072,7 +12072,7 @@ const fp = (e, n) => {
|
|
12072
12072
|
}
|
12073
12073
|
) });
|
12074
12074
|
}), Ep = ({ goals: e }) => {
|
12075
|
-
const { goals: n, common: i } =
|
12075
|
+
const { goals: n, common: i } = x(), { reorderGoals: a, setAlert: o } = rt(), [r, s] = g.useState(!1), [c, d] = g.useState(e.map((C) => ({ ...C })));
|
12076
12076
|
g.useEffect(() => {
|
12077
12077
|
r && d(e.map((C) => ({ ...C })));
|
12078
12078
|
}, [r]);
|
@@ -12170,7 +12170,7 @@ const fp = (e, n) => {
|
|
12170
12170
|
)
|
12171
12171
|
] });
|
12172
12172
|
}, Sp = ({ goal: e, index: n }) => {
|
12173
|
-
const { goals: i } =
|
12173
|
+
const { goals: i } = x();
|
12174
12174
|
return /* @__PURE__ */ t(j, { children: /* @__PURE__ */ l(de, { children: [
|
12175
12175
|
e.track_type !== K.RETIREMENT_TRACK && /* @__PURE__ */ t(
|
12176
12176
|
Pe,
|
@@ -12199,7 +12199,7 @@ const fp = (e, n) => {
|
|
12199
12199
|
] }) })
|
12200
12200
|
] }) });
|
12201
12201
|
}, Tp = ({ goal: e }) => {
|
12202
|
-
const { goals: n } =
|
12202
|
+
const { goals: n } = x();
|
12203
12203
|
return /* @__PURE__ */ t(j, { children: /* @__PURE__ */ l(de, { children: [
|
12204
12204
|
/* @__PURE__ */ t(Pe, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(ga, { color: "success", filled: !0, size: 20 }) }),
|
12205
12205
|
/* @__PURE__ */ t(se, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
@@ -12217,7 +12217,7 @@ const fp = (e, n) => {
|
|
12217
12217
|
] }) })
|
12218
12218
|
] }) }, e.guid);
|
12219
12219
|
}, Ap = ({ trackType: e }) => {
|
12220
|
-
const { goals: n, common: i } =
|
12220
|
+
const { goals: n, common: i } = x(), { orderedGoals: a } = rt(), o = a.filter((C) => C.track_type === e), r = o.filter(
|
12221
12221
|
(C) => C.track_type === K.SAVINGS_TRACK && !C.has_been_spent || C.track_type !== K.SAVINGS_TRACK && !C.is_complete
|
12222
12222
|
), s = o.filter(
|
12223
12223
|
(C) => C.track_type === K.SAVINGS_TRACK && C.has_been_spent || C.track_type !== K.SAVINGS_TRACK && C.is_complete
|
@@ -12272,7 +12272,7 @@ const fp = (e, n) => {
|
|
12272
12272
|
)
|
12273
12273
|
] });
|
12274
12274
|
}, ja = A(({ trackType: e, onAddGoals: n }) => {
|
12275
|
-
const { isMobile: i } = Ee(), { goals: a } =
|
12275
|
+
const { isMobile: i } = Ee(), { goals: a } = x(), { orderedGoals: o, setSelectedGoal: r } = rt(), s = o.filter((u) => u.track_type === e), c = s.filter(
|
12276
12276
|
(u) => u.track_type === K.SAVINGS_TRACK && !u.has_been_spent || u.track_type !== K.SAVINGS_TRACK && !u.is_complete
|
12277
12277
|
), d = s.filter(
|
12278
12278
|
(u) => u.track_type === K.SAVINGS_TRACK && u.has_been_spent || u.track_type !== K.SAVINGS_TRACK && u.is_complete
|
@@ -12338,8 +12338,8 @@ const fp = (e, n) => {
|
|
12338
12338
|
] }) }) }) }, u.guid))
|
12339
12339
|
] })
|
12340
12340
|
] });
|
12341
|
-
}),
|
12342
|
-
const { goals: i } =
|
12341
|
+
}), xp = ({ goalType: e, onClick: n }) => {
|
12342
|
+
const { goals: i } = x(), { bgcolor: a, icon: o, label: r, description: s, subTypes: c, type: d } = e, [_, u] = g.useState(!1), h = c.length > 0;
|
12343
12343
|
return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ l(ne, { sx: { bgcolor: "background.paper" }, children: [
|
12344
12344
|
/* @__PURE__ */ t(j, { children: /* @__PURE__ */ l(
|
12345
12345
|
de,
|
@@ -12377,7 +12377,7 @@ const fp = (e, n) => {
|
|
12377
12377
|
onSave: a,
|
12378
12378
|
title: o
|
12379
12379
|
}) => {
|
12380
|
-
const { goals: r, common: s } =
|
12380
|
+
const { goals: r, common: s } = x(), [c, d] = g.useState([]), _ = (u) => {
|
12381
12381
|
const h = c.findIndex((C) => C.guid === u.guid), m = [...c];
|
12382
12382
|
h >= 0 ? m.splice(h, 1) : m.push(u), d(m);
|
12383
12383
|
};
|
@@ -12425,8 +12425,8 @@ const fp = (e, n) => {
|
|
12425
12425
|
]
|
12426
12426
|
}
|
12427
12427
|
);
|
12428
|
-
},
|
12429
|
-
const { goals: n } =
|
12428
|
+
}, Ip = ({ onClose: e }) => {
|
12429
|
+
const { goals: n } = x(), { addGoal: i, debtGoals: a, setAlert: o, setSelectedGoal: r } = rt(), { visibleDebtAccounts: s } = ve(), [c, d] = g.useState(!1), _ = Cp(n), u = (m, C, f) => {
|
12430
12430
|
f === K.DEBT_TRACK ? d(!0) : r({
|
12431
12431
|
amount: 0,
|
12432
12432
|
current_amount: 0,
|
@@ -12455,7 +12455,7 @@ const fp = (e, n) => {
|
|
12455
12455
|
d(!1), e?.(K.DEBT_TRACK);
|
12456
12456
|
};
|
12457
12457
|
return /* @__PURE__ */ l(y, { children: [
|
12458
|
-
/* @__PURE__ */ t(ne, { sx: { bgcolor: "background.paper" }, children: _.map((m, C) => /* @__PURE__ */ t(
|
12458
|
+
/* @__PURE__ */ t(ne, { sx: { bgcolor: "background.paper" }, children: _.map((m, C) => /* @__PURE__ */ t(xp, { goalType: m, onClick: u }, C)) }),
|
12459
12459
|
/* @__PURE__ */ t(
|
12460
12460
|
Wc,
|
12461
12461
|
{
|
@@ -12468,7 +12468,7 @@ const fp = (e, n) => {
|
|
12468
12468
|
)
|
12469
12469
|
] });
|
12470
12470
|
}, Uc = ({ account: e }) => {
|
12471
|
-
const { accounts: n } =
|
12471
|
+
const { accounts: n } = x(), { setSelectedAccount: i } = $t(), [a, o] = g.useState(!1);
|
12472
12472
|
return /* @__PURE__ */ l(j, { sx: { bgcolor: "background.paper" }, children: [
|
12473
12473
|
/* @__PURE__ */ l(de, { onClick: () => {
|
12474
12474
|
i(e), o(!0);
|
@@ -12495,7 +12495,7 @@ const fp = (e, n) => {
|
|
12495
12495
|
] }) })
|
12496
12496
|
] });
|
12497
12497
|
}, vp = A(({ goal: e }) => {
|
12498
|
-
const { goals: n } =
|
12498
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = rt(), [r, s] = g.useState(e.amount), c = !e.guid, d = r < 0 || r > 9999999999e-2, _ = e.track_type === K.SAVINGS_TRACK && e.has_been_spent || e.track_type !== K.SAVINGS_TRACK && e.is_complete, u = async () => {
|
12499
12499
|
const m = { ...e, amount: r };
|
12500
12500
|
e.amount = r, c ? a(m) : (await o(m), i(n.alert_goal_updated_amount));
|
12501
12501
|
}, h = () => {
|
@@ -12529,7 +12529,7 @@ const fp = (e, n) => {
|
|
12529
12529
|
}
|
12530
12530
|
);
|
12531
12531
|
}), wp = ({ goal: e }) => {
|
12532
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = ve(), { accounts: a, goals: o } =
|
12532
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = ve(), { accounts: a, goals: o } = x(), { setAlert: r, setSelectedGoal: s, updateGoal: c } = rt(), d = !e.guid && !e.account_guid, [_, u] = g.useState(!1), h = async (m) => {
|
12533
12533
|
const C = { ...e, account_guid: m };
|
12534
12534
|
d ? s(C) : (await c(C), r(o.alert_account_changed)), u(!1);
|
12535
12535
|
};
|
@@ -12600,7 +12600,7 @@ const fp = (e, n) => {
|
|
12600
12600
|
] }) })
|
12601
12601
|
] });
|
12602
12602
|
}, Np = A(({ goal: e }) => {
|
12603
|
-
const { goals: n } =
|
12603
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = rt(), [r, s] = g.useState(e.name), c = !e.guid, d = e.track_type === K.SAVINGS_TRACK && e.has_been_spent || e.track_type !== K.SAVINGS_TRACK && e.is_complete, _ = async () => {
|
12604
12604
|
const h = { ...e, name: r };
|
12605
12605
|
e.name = r, c ? a(h) : (await o(h), i(n.alert_goal_updated_name));
|
12606
12606
|
}, u = () => {
|
@@ -12631,7 +12631,7 @@ const fp = (e, n) => {
|
|
12631
12631
|
}
|
12632
12632
|
);
|
12633
12633
|
}), Dp = ({ goal: e }) => {
|
12634
|
-
const { goals: n } =
|
12634
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = rt(), [r, s] = g.useState(e.retirement_age || 65), c = !e.guid, d = async () => {
|
12635
12635
|
if (!isNaN(r)) {
|
12636
12636
|
const h = { ...e, retirement_age: r };
|
12637
12637
|
e.retirement_age = r, c ? a(h) : (await o(h), i(n.alert_goal_updated_retirement_age));
|
@@ -12665,7 +12665,7 @@ const fp = (e, n) => {
|
|
12665
12665
|
}
|
12666
12666
|
);
|
12667
12667
|
}, Rp = A(({ goal: e }) => {
|
12668
|
-
const { goals: n } =
|
12668
|
+
const { goals: n } = x(), { user: i, updateUser: a } = _n(), { setAlert: o } = rt(), [r, s] = g.useState(Ge(i.birthday ?? 0)), [c, d] = g.useState(null), _ = e.is_complete, u = async () => {
|
12669
12669
|
r && Co(r) && (await a({ ...i, birthday: ke(r) }), o(n.alert_goal_updated_birthday));
|
12670
12670
|
};
|
12671
12671
|
return /* @__PURE__ */ t(
|
@@ -12691,7 +12691,7 @@ const fp = (e, n) => {
|
|
12691
12691
|
}
|
12692
12692
|
);
|
12693
12693
|
}), Op = ({ goal: e }) => {
|
12694
|
-
const { goals: n } =
|
12694
|
+
const { goals: n } = x(), { visibleInvestmentAccounts: i } = ve(), {
|
12695
12695
|
addRetirementGoalAccount: a,
|
12696
12696
|
newRetirementGoalAccounts: o,
|
12697
12697
|
retirementGoalAccounts: r,
|
@@ -12737,7 +12737,7 @@ const fp = (e, n) => {
|
|
12737
12737
|
)
|
12738
12738
|
] });
|
12739
12739
|
}, Lp = A(({ goal: e }) => {
|
12740
|
-
const { goals: n } =
|
12740
|
+
const { goals: n } = x(), { visibleAccounts: i } = ve(), a = g.useMemo(
|
12741
12741
|
() => i.find((s) => s.guid === e.account_guid),
|
12742
12742
|
[i, e]
|
12743
12743
|
), o = e.track_type;
|
@@ -12782,7 +12782,7 @@ const fp = (e, n) => {
|
|
12782
12782
|
e.track_type === K.SAVINGS_TRACK && !e.is_complete && /* @__PURE__ */ t(wp, { goal: e })
|
12783
12783
|
] });
|
12784
12784
|
}), Mp = A(({ onClose: e }) => {
|
12785
|
-
const { goals: n, common: i } =
|
12785
|
+
const { goals: n, common: i } = x(), {
|
12786
12786
|
addGoal: a,
|
12787
12787
|
addRetirementGoal: o,
|
12788
12788
|
deleteGoal: r,
|
@@ -12799,7 +12799,7 @@ const fp = (e, n) => {
|
|
12799
12799
|
const D = c.track_type;
|
12800
12800
|
D !== K.RETIREMENT_TRACK ? await a(c) : D === K.RETIREMENT_TRACK && await o({ ...c, target_amount: c.amount }), d(n.alert_goal_added), _(void 0), D && e?.(D);
|
12801
12801
|
}
|
12802
|
-
},
|
12802
|
+
}, I = async () => {
|
12803
12803
|
c && (c.track_type !== K.RETIREMENT_TRACK ? await r(c.guid) : c.track_type === K.RETIREMENT_TRACK && await s(c), d(n.alert_goal_deleted), _(void 0));
|
12804
12804
|
}, R = async () => {
|
12805
12805
|
const D = {
|
@@ -12832,7 +12832,7 @@ const fp = (e, n) => {
|
|
12832
12832
|
isOpen: m,
|
12833
12833
|
maxWidth: "xs",
|
12834
12834
|
onClose: () => C(!1),
|
12835
|
-
onPrimaryAction:
|
12835
|
+
onPrimaryAction: I,
|
12836
12836
|
primaryColor: "error",
|
12837
12837
|
primaryText: i.delete_button,
|
12838
12838
|
children: /* @__PURE__ */ t(p, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: S(n.delete_description, c?.name || "") })
|
@@ -12840,7 +12840,7 @@ const fp = (e, n) => {
|
|
12840
12840
|
)
|
12841
12841
|
] });
|
12842
12842
|
}), c4 = A(({ onBackClick: e, sx: n }) => {
|
12843
|
-
const { onEvent: i } = z(), { isMobile: a } = Ee(), { visibleAccounts: o } = ve(), { isCopyLoaded: r, isInitialized: s, setSelectedAccounts: c } = ue(), { goals: d, common: _ } =
|
12843
|
+
const { onEvent: i } = z(), { isMobile: a } = Ee(), { visibleAccounts: o } = ve(), { isCopyLoaded: r, isInitialized: s, setSelectedAccounts: c } = ue(), { goals: d, common: _ } = x(), { alert: u, goals: h, goalsLoaded: m, loadGoals: C, monthlyCashFlowProfile: f, setAlert: E, retirmentGoals: b } = rt(), [T, w] = g.useState(0), [v, I] = g.useState(!1), R = f?.amount_allocated_for_savings_goals || 0, D = f?.amount_allocated_for_debt_goals || 0, H = f?.amount_allocated_for_retirement_goals || 0, O = r ? S(
|
12844
12844
|
a ? d.tab_subtitle_mobile : d.tab_subtitle,
|
12845
12845
|
B(R, "0,0")
|
12846
12846
|
) : "", M = r ? S(
|
@@ -12858,9 +12858,9 @@ const fp = (e, n) => {
|
|
12858
12858
|
const U = () => {
|
12859
12859
|
i(W.GOALS_CLICK_FILTER);
|
12860
12860
|
}, X = () => {
|
12861
|
-
|
12861
|
+
I(!0), i(W.GOALS_CLICK_ADD);
|
12862
12862
|
}, fe = (ce) => {
|
12863
|
-
|
12863
|
+
I(!1), ce === K.SAVINGS_TRACK ? w(0) : ce === K.DEBT_TRACK ? w(1) : ce === K.RETIREMENT_TRACK && w(2);
|
12864
12864
|
}, $ = g.useMemo(
|
12865
12865
|
() => m && (h.length === 0 || h.every(({ track_type: ce }) => !ce) && b.length === 0),
|
12866
12866
|
[h, m, b]
|
@@ -12944,9 +12944,9 @@ const fp = (e, n) => {
|
|
12944
12944
|
{
|
12945
12945
|
ariaLabelClose: _.close_aria,
|
12946
12946
|
isOpen: v,
|
12947
|
-
onClose: () =>
|
12947
|
+
onClose: () => I(!1),
|
12948
12948
|
title: d.add_goal_title,
|
12949
|
-
children: /* @__PURE__ */ t(
|
12949
|
+
children: /* @__PURE__ */ t(Ip, { onClose: fe })
|
12950
12950
|
}
|
12951
12951
|
),
|
12952
12952
|
/* @__PURE__ */ t(
|
@@ -13575,7 +13575,7 @@ const jp = /^[ a-zA-ZÀ-ÿ0-9]+$/, Xp = 50, es = 65, qp = ({
|
|
13575
13575
|
height: e = "calc(100dvh - 120px)",
|
13576
13576
|
onSelect: n
|
13577
13577
|
}) => {
|
13578
|
-
const { isLoading: i, merchants: a, loadMerchants: o } = ju(), { common: r } =
|
13578
|
+
const { isLoading: i, merchants: a, loadMerchants: o } = ju(), { common: r } = x(), { isCopyLoaded: s } = ue(), [c, d] = g.useState("");
|
13579
13579
|
g.useEffect(() => {
|
13580
13580
|
o().finally();
|
13581
13581
|
}, [o]);
|
@@ -13816,7 +13816,7 @@ const r1 = ({
|
|
13816
13816
|
stroke: d.palette.success.main
|
13817
13817
|
});
|
13818
13818
|
return /* @__PURE__ */ t(
|
13819
|
-
|
13819
|
+
xo,
|
13820
13820
|
{
|
13821
13821
|
baseline: "min",
|
13822
13822
|
colors: [d.palette.success.main],
|
@@ -13886,7 +13886,7 @@ const r1 = ({
|
|
13886
13886
|
onMouseLeave: r,
|
13887
13887
|
selectedData: s
|
13888
13888
|
}) => {
|
13889
|
-
const { net_worth: c } =
|
13889
|
+
const { net_worth: c } = x(), d = tt(), _ = (u) => {
|
13890
13890
|
const h = u.x === n?.x, m = u.x === s?.x, C = {
|
13891
13891
|
backgroundColor: "inherit",
|
13892
13892
|
borderBottom: "inherit",
|
@@ -13945,7 +13945,7 @@ const r1 = ({
|
|
13945
13945
|
/* @__PURE__ */ t(p, { variant: "Small", children: e })
|
13946
13946
|
] });
|
13947
13947
|
}, Vo = A(_1), h1 = ({ hoveredData: e, selectedData: n }) => {
|
13948
|
-
const { net_worth: i } =
|
13948
|
+
const { net_worth: i } = x(), a = tt(), o = e || n, r = Ln(Ii(o.x), "MMMM");
|
13949
13949
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "column", m: 24, children: [
|
13950
13950
|
/* @__PURE__ */ t(p, { color: a.palette.secondary.main, variant: "Small", children: `${r} ${i.net_worth}` }),
|
13951
13951
|
/* @__PURE__ */ t(ze, { amount: o.y, variant: "H2" }),
|
@@ -13957,7 +13957,7 @@ const r1 = ({
|
|
13957
13957
|
title: i
|
13958
13958
|
}) => {
|
13959
13959
|
let a;
|
13960
|
-
const { refreshAccounts: o } = ve(), { loadWidget: r } = rc(), { connect: s } =
|
13960
|
+
const { refreshAccounts: o } = ve(), { loadWidget: r } = rc(), { connect: s } = x(), c = tt(), [d, _] = g.useState(!1), [u, h] = g.useState(!1);
|
13961
13961
|
return g.useEffect(() => (n ? (_(!0), r({ widget: "connections_widget", mode: c.palette.mode }).then((m) => {
|
13962
13962
|
a = new yd({
|
13963
13963
|
container: `#${Ar}`,
|
@@ -14026,7 +14026,7 @@ const r1 = ({
|
|
14026
14026
|
totalAssets: a,
|
14027
14027
|
totalLiabilities: o
|
14028
14028
|
}) => {
|
14029
|
-
const { net_worth: r } =
|
14029
|
+
const { net_worth: r } = x(), s = ge();
|
14030
14030
|
return /* @__PURE__ */ l(Q, { children: [
|
14031
14031
|
/* @__PURE__ */ l(
|
14032
14032
|
L,
|
@@ -14084,7 +14084,7 @@ const r1 = ({
|
|
14084
14084
|
totalGains: a,
|
14085
14085
|
totalLosses: o
|
14086
14086
|
}) => {
|
14087
|
-
const { net_worth: r } =
|
14087
|
+
const { net_worth: r } = x(), s = ge();
|
14088
14088
|
return /* @__PURE__ */ l(Q, { children: [
|
14089
14089
|
/* @__PURE__ */ l(y, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
|
14090
14090
|
/* @__PURE__ */ t(p, { variant: "Small", children: Qs(e?.x) }),
|
@@ -14153,7 +14153,7 @@ const r1 = ({
|
|
14153
14153
|
] })
|
14154
14154
|
] });
|
14155
14155
|
}, y1 = A(b1), d4 = A(({ onBackClick: e }) => {
|
14156
|
-
const { isCopyLoaded: n, isInitialized: i, selectedAccounts: a, setSelectedAccounts: o } = ue(), { accounts: r, net_worth: s } =
|
14156
|
+
const { isCopyLoaded: n, isInitialized: i, selectedAccounts: a, setSelectedAccounts: o } = ue(), { accounts: r, net_worth: s } = x(), { visibleAccounts: c } = ve(), {
|
14157
14157
|
assetsLiabilities: d,
|
14158
14158
|
gainsLosses: _,
|
14159
14159
|
hoveredData: u,
|
@@ -14163,8 +14163,8 @@ const r1 = ({
|
|
14163
14163
|
selectedData: f,
|
14164
14164
|
setHoveredData: E,
|
14165
14165
|
setSelectedData: b
|
14166
|
-
} = Xu(), { isMobile: T } = Ee(), { onEvent: w } = z(), [v,
|
14167
|
-
await m(a), await h(R),
|
14166
|
+
} = Xu(), { isMobile: T } = Ee(), { onEvent: w } = z(), [v, I] = g.useState(!1), [R, D] = g.useState(6), [H, O] = g.useState(!1), [M, Z] = g.useState(!1), [U, X] = g.useState(!1), fe = async () => {
|
14167
|
+
await m(a), await h(R), I(!0);
|
14168
14168
|
};
|
14169
14169
|
g.useEffect(() => {
|
14170
14170
|
w(W.NET_WORTH_VIEW);
|
@@ -14344,10 +14344,10 @@ class S1 {
|
|
14344
14344
|
};
|
14345
14345
|
}
|
14346
14346
|
const T1 = (e, n) => {
|
14347
|
-
const i =
|
14347
|
+
const i = Ii(n[e].delivered_at), a = Ii(n[e - 1]?.delivered_at);
|
14348
14348
|
return !Dd(i, a);
|
14349
14349
|
}, A1 = ({ notification: e }) => {
|
14350
|
-
const { accounts: n } = ve(), { budgets: i } = dt(), { accounts: a } =
|
14350
|
+
const { accounts: n } = ve(), { budgets: i } = dt(), { accounts: a } = x(), o = n.find((d) => d.guid === e.entity_guid), r = i.find((d) => d.guid === e.entity_guid), s = e.entity_guid.includes("GOL"), c = {
|
14351
14351
|
badge: {
|
14352
14352
|
display: "flex",
|
14353
14353
|
alignItems: "center",
|
@@ -14364,7 +14364,7 @@ const T1 = (e, n) => {
|
|
14364
14364
|
size: 33
|
14365
14365
|
}
|
14366
14366
|
) }) : /* @__PURE__ */ t("div", { style: c.badge, children: /* @__PURE__ */ t(kt, { categoryGuid: r?.category_guid, size: 36 }) });
|
14367
|
-
},
|
14367
|
+
}, x1 = A(A1), I1 = ({ notification: e, onClick: n }) => {
|
14368
14368
|
const { updateNotification: i } = sc(), a = wn(), o = {
|
14369
14369
|
card: {
|
14370
14370
|
alignItems: "center",
|
@@ -14395,11 +14395,11 @@ const T1 = (e, n) => {
|
|
14395
14395
|
n(e), i({ ...e, has_been_viewed: !0 }).finally();
|
14396
14396
|
}, sx: o.card, children: [
|
14397
14397
|
e.has_been_viewed ? null : /* @__PURE__ */ t("div", { "data-testid": "new-message-dot", style: o.dot }),
|
14398
|
-
/* @__PURE__ */ t(
|
14398
|
+
/* @__PURE__ */ t(x1, { notification: e }),
|
14399
14399
|
/* @__PURE__ */ t(p, { bold: !e.has_been_viewed, truncate: !1, variant: "Small", children: e.content })
|
14400
14400
|
] });
|
14401
14401
|
}, v1 = ({ date: e }) => /* @__PURE__ */ t(L, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(p, { bold: !0, variant: "Small", children: Hi(e) }) }), w1 = ({ onClick: e }) => {
|
14402
|
-
const { isLoading: n, loadNotifications: i, recentNotifications: a, markAllAsViewed: o } = sc(), { notifications: r } =
|
14402
|
+
const { isLoading: n, loadNotifications: i, recentNotifications: a, markAllAsViewed: o } = sc(), { notifications: r } = x(), { isCopyLoaded: s } = ue(), c = (d) => {
|
14403
14403
|
e?.(d);
|
14404
14404
|
};
|
14405
14405
|
return zn(() => (i().finally(), () => {
|
@@ -14414,7 +14414,7 @@ const T1 = (e, n) => {
|
|
14414
14414
|
/* @__PURE__ */ t(v1, { date: d.delivered_at }),
|
14415
14415
|
/* @__PURE__ */ t(Gl, {})
|
14416
14416
|
] }),
|
14417
|
-
/* @__PURE__ */ t(
|
14417
|
+
/* @__PURE__ */ t(I1, { notification: d, onClick: c })
|
14418
14418
|
] }, d.guid);
|
14419
14419
|
})
|
14420
14420
|
] });
|
@@ -14678,7 +14678,7 @@ const k1 = ({
|
|
14678
14678
|
title: o,
|
14679
14679
|
topicTitle: r
|
14680
14680
|
}) => {
|
14681
|
-
const { help: s } =
|
14681
|
+
const { help: s } = x();
|
14682
14682
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
14683
14683
|
/* @__PURE__ */ l(Qe, { container: !0, sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
14684
14684
|
/* @__PURE__ */ l(Qe, { item: !0, sm: 6, xs: 12, children: [
|
@@ -17065,7 +17065,7 @@ const k1 = ({
|
|
17065
17065
|
onRequestSupport: a,
|
17066
17066
|
topicInfo: { category: o, pageTitle: r, topicKey: s, guid: c }
|
17067
17067
|
}) => {
|
17068
|
-
const { help: d } =
|
17068
|
+
const { help: d } = x(), _ = Z1[c] || null;
|
17069
17069
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
17070
17070
|
/* @__PURE__ */ t(
|
17071
17071
|
k1,
|
@@ -17121,9 +17121,9 @@ const k1 = ({
|
|
17121
17121
|
{
|
17122
17122
|
disableGutters: !0,
|
17123
17123
|
expanded: v === c,
|
17124
|
-
onChange: (
|
17125
|
-
sx: (
|
17126
|
-
border: `1px solid ${
|
17124
|
+
onChange: (I, R) => d(R ? v : null),
|
17125
|
+
sx: (I) => ({
|
17126
|
+
border: `1px solid ${I.palette.border?.light}`,
|
17127
17127
|
borderRadius: "8px !important",
|
17128
17128
|
"&:before": {
|
17129
17129
|
opacity: 0
|
@@ -17154,12 +17154,12 @@ const k1 = ({
|
|
17154
17154
|
ml: 56,
|
17155
17155
|
p: 0
|
17156
17156
|
},
|
17157
|
-
children: /* @__PURE__ */ t(ne, { disablePadding: !0, children: b.map(({ label:
|
17157
|
+
children: /* @__PURE__ */ t(ne, { disablePadding: !0, children: b.map(({ label: I, topicKey: R }) => /* @__PURE__ */ t(
|
17158
17158
|
de,
|
17159
17159
|
{
|
17160
|
-
"aria-label":
|
17160
|
+
"aria-label": I,
|
17161
17161
|
divider: !0,
|
17162
|
-
onClick: () => s({ guid: f, category: T, pageTitle:
|
17162
|
+
onClick: () => s({ guid: f, category: T, pageTitle: I, topicKey: R }),
|
17163
17163
|
sx: {
|
17164
17164
|
pl: "6px !important",
|
17165
17165
|
borderColor: "border.light",
|
@@ -17168,7 +17168,7 @@ const k1 = ({
|
|
17168
17168
|
borderBottomRightRadius: 7
|
17169
17169
|
}
|
17170
17170
|
},
|
17171
|
-
children: /* @__PURE__ */ t(p, { color: "secondary", variant: "Small", children:
|
17171
|
+
children: /* @__PURE__ */ t(p, { color: "secondary", variant: "Small", children: I })
|
17172
17172
|
},
|
17173
17173
|
R
|
17174
17174
|
)) })
|
@@ -17488,8 +17488,8 @@ const k1 = ({
|
|
17488
17488
|
const E = {};
|
17489
17489
|
let b = !0;
|
17490
17490
|
h.forEach(({ label: T, name: w, required: v }) => {
|
17491
|
-
const
|
17492
|
-
v && !
|
17491
|
+
const I = _[w];
|
17492
|
+
v && !I && (E[w] = `${T} ${e.request_support_required_message}`, b = !1), (w === "institutionWebsite" || w === "institutionLoginPage") && I && !/(.+)\.(.{2,})/g.test(I) && (E[w] = e.request_support_valid_url_message, b = !1);
|
17493
17493
|
}), d(E), b && (a(_), u(Xa));
|
17494
17494
|
},
|
17495
17495
|
secondaryColor: "primary",
|
@@ -17636,7 +17636,7 @@ const k1 = ({
|
|
17636
17636
|
popularTopicsDrawerOnClose: o,
|
17637
17637
|
title: r
|
17638
17638
|
}) => {
|
17639
|
-
const { common: s } =
|
17639
|
+
const { common: s } = x();
|
17640
17640
|
return /* @__PURE__ */ l(ae, { isOpen: i, onClose: a, title: e.request_support, children: [
|
17641
17641
|
/* @__PURE__ */ t(
|
17642
17642
|
Ui,
|
@@ -17697,7 +17697,7 @@ const k1 = ({
|
|
17697
17697
|
onBack: a,
|
17698
17698
|
onClose: o
|
17699
17699
|
}) => {
|
17700
|
-
const { common: r } =
|
17700
|
+
const { common: r } = x();
|
17701
17701
|
return /* @__PURE__ */ t(ae, { isOpen: i, onClose: o, title: e.request_support, children: /* @__PURE__ */ l(L, { sx: { px: 24 }, children: [
|
17702
17702
|
/* @__PURE__ */ t(y, { sx: { alignItems: "center", pb: 24, pt: 80 }, children: /* @__PURE__ */ t(P, { color: "success", fill: !0, name: "check_circle", size: 64 }) }),
|
17703
17703
|
/* @__PURE__ */ l(y, { sx: { alignItems: "center", gap: 16, pb: 48 }, children: [
|
@@ -17726,7 +17726,7 @@ const k1 = ({
|
|
17726
17726
|
type: tC[M].type
|
17727
17727
|
})), v = () => {
|
17728
17728
|
u(""), b({ isOpen: !1, topic: "", type: void 0 });
|
17729
|
-
},
|
17729
|
+
}, I = (O) => {
|
17730
17730
|
c.email && o({
|
17731
17731
|
email: c.email,
|
17732
17732
|
message: _ ? `Institution: ${_}, ${O}` : O,
|
@@ -17813,7 +17813,7 @@ const k1 = ({
|
|
17813
17813
|
onClose: () => {
|
17814
17814
|
m(!1), u("");
|
17815
17815
|
},
|
17816
|
-
onSubmit:
|
17816
|
+
onSubmit: I,
|
17817
17817
|
setAlert: s,
|
17818
17818
|
topic: E.topic || e.contact_support
|
17819
17819
|
}
|
@@ -17865,7 +17865,7 @@ const k1 = ({
|
|
17865
17865
|
] }) });
|
17866
17866
|
}
|
17867
17867
|
), gC = ({ sx: e }) => {
|
17868
|
-
const [n, i] = g.useState(!1), [a, o] = g.useState(null), { help: r } =
|
17868
|
+
const [n, i] = g.useState(!1), [a, o] = g.useState(null), { help: r } = x(), { isCopyLoaded: s, isInitialized: c } = ue(), { helpCategories: d } = wo(), { isMobile: _ } = Ee(), u = window.app?.config, h = () => i(!0), m = (C) => o(C);
|
17869
17869
|
return !s || !c ? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ l(L, { sx: { pt: 24, px: _ ? 24 : 0, ...e }, children: [
|
17870
17870
|
a ? /* @__PURE__ */ t(
|
17871
17871
|
Q1,
|
@@ -17898,7 +17898,7 @@ const k1 = ({
|
|
17898
17898
|
)
|
17899
17899
|
] });
|
17900
17900
|
}, mC = A(gC), pC = A(() => {
|
17901
|
-
const { common: e, settings: n } =
|
17901
|
+
const { common: e, settings: n } = x(), { sendEmailVerification: i } = Ht(), { user: a } = _n(), o = ge(), [r, s] = g.useState(!1), c = () => {
|
17902
17902
|
s(!1);
|
17903
17903
|
}, d = () => {
|
17904
17904
|
s(!0);
|
@@ -17948,7 +17948,7 @@ const k1 = ({
|
|
17948
17948
|
] });
|
17949
17949
|
}), CC = A(
|
17950
17950
|
({ handleClose: e, handleVerify: n, isOpen: i }) => {
|
17951
|
-
const { common: a, settings: o } =
|
17951
|
+
const { common: a, settings: o } = x(), [r, s] = g.useState("");
|
17952
17952
|
return /* @__PURE__ */ t(
|
17953
17953
|
Be,
|
17954
17954
|
{
|
@@ -17972,7 +17972,7 @@ const k1 = ({
|
|
17972
17972
|
);
|
17973
17973
|
}
|
17974
17974
|
), fC = A(() => {
|
17975
|
-
const { common: e, settings: n } =
|
17975
|
+
const { common: e, settings: n } = x(), { sendPhoneVerification: i, verifyPhoneToken: a } = Ht(), { user: o } = _n(), r = ge(), [s, c] = g.useState(!1), [d, _] = g.useState(!1), u = () => {
|
17976
17976
|
c(!1);
|
17977
17977
|
}, h = () => {
|
17978
17978
|
c(!0);
|
@@ -18037,7 +18037,7 @@ const k1 = ({
|
|
18037
18037
|
)
|
18038
18038
|
] });
|
18039
18039
|
}), bC = () => {
|
18040
|
-
const e = tt(), { common: n, settings: i } =
|
18040
|
+
const e = tt(), { common: n, settings: i } = x(), { isDesktop: a, isMobile: o, isSmallMobile: r, isTablet: s } = Ee(), { config: c } = Fi(), { updateUser: d } = Ht(), { user: _ } = _n(), [u, h] = g.useState(_.first_name), [m, C] = g.useState(_.last_name), [f, E] = g.useState(_.email), [b, T] = g.useState(_.phone), [w, v] = g.useState(_.postal_code), [I, R] = g.useState(_.credit_score), [D, H] = g.useState(null), O = f && !_.email_is_verified, M = b && !_.phone_is_verified;
|
18041
18041
|
g.useEffect(() => {
|
18042
18042
|
if (_.birthday) {
|
18043
18043
|
const U = new Date(_.birthday * 1e3), X = U.getUTCFullYear(), fe = U.getUTCMonth(), $ = U.getUTCDate();
|
@@ -18053,7 +18053,7 @@ const k1 = ({
|
|
18053
18053
|
phone: b,
|
18054
18054
|
birthday: D ? ke(D) : null,
|
18055
18055
|
postal_code: w,
|
18056
|
-
credit_score:
|
18056
|
+
credit_score: I
|
18057
18057
|
};
|
18058
18058
|
await d(U);
|
18059
18059
|
};
|
@@ -18166,7 +18166,7 @@ const k1 = ({
|
|
18166
18166
|
/* @__PURE__ */ t(
|
18167
18167
|
it,
|
18168
18168
|
{
|
18169
|
-
defaultValue:
|
18169
|
+
defaultValue: I,
|
18170
18170
|
label: i.credit_score,
|
18171
18171
|
onChange: (U) => R(Number(U.target.value)),
|
18172
18172
|
sx: { mb: 44 }
|
@@ -18184,7 +18184,7 @@ const EC = ({
|
|
18184
18184
|
onClickDeviceEdit: n,
|
18185
18185
|
onClickDeviceDelete: i
|
18186
18186
|
}) => {
|
18187
|
-
const a = ge(), { settings: o } =
|
18187
|
+
const a = ge(), { settings: o } = x(), r = [
|
18188
18188
|
{
|
18189
18189
|
field: "name",
|
18190
18190
|
headerName: o.mobile_devices_column_name,
|
@@ -18299,7 +18299,7 @@ const EC = ({
|
|
18299
18299
|
onClickDeviceEdit: n,
|
18300
18300
|
onClickDeviceDelete: i
|
18301
18301
|
}) => {
|
18302
|
-
const a = ge(), { settings: o } =
|
18302
|
+
const a = ge(), { settings: o } = x(), [r, s] = g.useState(!1), c = (d) => (_, u) => {
|
18303
18303
|
s(u ? d : !1);
|
18304
18304
|
};
|
18305
18305
|
return /* @__PURE__ */ l(y, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
|
@@ -18400,7 +18400,7 @@ const EC = ({
|
|
18400
18400
|
device: a,
|
18401
18401
|
deviceToken: o = ""
|
18402
18402
|
}) => {
|
18403
|
-
const r = ge(), { common: s, settings: c } =
|
18403
|
+
const r = ge(), { common: s, settings: c } = x(), { updateDevice: d, deleteDevice: _, setAlert: u, loadDevices: h } = Ht(), [m, C] = g.useState("");
|
18404
18404
|
g.useEffect(() => {
|
18405
18405
|
a && C(a.name);
|
18406
18406
|
}, [a, e]);
|
@@ -18507,8 +18507,8 @@ const EC = ({
|
|
18507
18507
|
]
|
18508
18508
|
}
|
18509
18509
|
);
|
18510
|
-
}, AC = A(TC),
|
18511
|
-
const { isMobile: e } = Ee(), { settings: n } =
|
18510
|
+
}, AC = A(TC), xC = A(() => {
|
18511
|
+
const { isMobile: e } = Ee(), { settings: n } = x(), { isCopyLoaded: i, isInitialized: a } = ue(), { setAlert: o, devices: r, loadDevices: s, generateDeviceToken: c } = Ht(), [d, _] = g.useState({ open: !1, type: "" }), [u, h] = g.useState(), [m, C] = g.useState("");
|
18512
18512
|
g.useEffect(() => {
|
18513
18513
|
a && s();
|
18514
18514
|
}, [a]);
|
@@ -18576,8 +18576,8 @@ const EC = ({
|
|
18576
18576
|
/* @__PURE__ */ t(Ct, { children: /* @__PURE__ */ t(Nl, {}) })
|
18577
18577
|
] }) });
|
18578
18578
|
}
|
18579
|
-
),
|
18580
|
-
const { settings: e } =
|
18579
|
+
), IC = A(() => {
|
18580
|
+
const { settings: e } = x(), { categories: n } = Ke(), { selectedRule: i, updateRuleCategory: a } = Ht(), [o, r] = g.useState(!1), s = () => {
|
18581
18581
|
r(!1);
|
18582
18582
|
}, c = () => {
|
18583
18583
|
r(!0);
|
@@ -18605,7 +18605,7 @@ const EC = ({
|
|
18605
18605
|
)
|
18606
18606
|
] });
|
18607
18607
|
}), vC = A(() => {
|
18608
|
-
const { common: e, settings: n } =
|
18608
|
+
const { common: e, settings: n } = x(), { selectedRule: i, updateRulePayee: a } = Ht(), o = ge(), [r, s] = g.useState(!1), c = i?.description ? i.description : i?.match_description, [d, _] = g.useState(c || ""), u = () => {
|
18609
18609
|
s(!0);
|
18610
18610
|
}, h = async () => {
|
18611
18611
|
d !== c && i && (i.description = d, await a(i), s(!1));
|
@@ -18645,7 +18645,7 @@ const EC = ({
|
|
18645
18645
|
)
|
18646
18646
|
] });
|
18647
18647
|
}), wC = A(({ onClose: e, onDelete: n, isOpen: i }) => {
|
18648
|
-
const { common: a, settings: o } =
|
18648
|
+
const { common: a, settings: o } = x(), r = ge();
|
18649
18649
|
return /* @__PURE__ */ t(
|
18650
18650
|
Be,
|
18651
18651
|
{
|
@@ -18670,7 +18670,7 @@ const EC = ({
|
|
18670
18670
|
);
|
18671
18671
|
}), NC = A(
|
18672
18672
|
({ isOpen: e, onClose: n, onDelete: i }) => {
|
18673
|
-
const { common: a, settings: o } =
|
18673
|
+
const { common: a, settings: o } = x(), r = ge(), [s, c] = g.useState(!1);
|
18674
18674
|
return /* @__PURE__ */ l(
|
18675
18675
|
ae,
|
18676
18676
|
{
|
@@ -18690,7 +18690,7 @@ const EC = ({
|
|
18690
18690
|
/* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(p, { bold: !0, variant: "XSmall", children: o.details }) }),
|
18691
18691
|
/* @__PURE__ */ t(vC, {}),
|
18692
18692
|
/* @__PURE__ */ t(k, { sx: { ml: 24 } }),
|
18693
|
-
/* @__PURE__ */ t(
|
18693
|
+
/* @__PURE__ */ t(IC, {}),
|
18694
18694
|
/* @__PURE__ */ t(k, { sx: { ml: 24 } }),
|
18695
18695
|
/* @__PURE__ */ t(
|
18696
18696
|
wC,
|
@@ -18726,7 +18726,7 @@ const EC = ({
|
|
18726
18726
|
/* @__PURE__ */ t(NC, { isOpen: c, onClose: _, onDelete: u })
|
18727
18727
|
] });
|
18728
18728
|
}), RC = A(() => {
|
18729
|
-
const { settings: e } =
|
18729
|
+
const { settings: e } = x(), { loadTransactionRules: n, transactionRules: i } = Ht(), { isDesktop: a, isTablet: o } = Ee();
|
18730
18730
|
return g.useEffect(() => {
|
18731
18731
|
n();
|
18732
18732
|
}, []), /* @__PURE__ */ l(y, { spacing: 24, sx: { pb: 48, pt: 24 }, children: [
|
@@ -18737,7 +18737,7 @@ const EC = ({
|
|
18737
18737
|
/* @__PURE__ */ t(ne, { children: i.map((r, s) => /* @__PURE__ */ t(DC, { rule: r }, s)) })
|
18738
18738
|
] });
|
18739
18739
|
}), OC = A(() => {
|
18740
|
-
const { settings: e } =
|
18740
|
+
const { settings: e } = x(), { clientCommunicationProfile: n, updateUserCommunicationsProfile: i, userCommunicationsProfile: a } = Ht(), o = async (r) => {
|
18741
18741
|
await i(r);
|
18742
18742
|
};
|
18743
18743
|
return /* @__PURE__ */ l(y, { children: [
|
@@ -18789,7 +18789,7 @@ const EC = ({
|
|
18789
18789
|
] });
|
18790
18790
|
}), LC = A(
|
18791
18791
|
({ onProfileUpdated: e, profile: n }) => {
|
18792
|
-
const { common: i, settings: a } =
|
18792
|
+
const { common: i, settings: a } = x(), { updateAccount: o } = ve(), r = n.notification_type === Ue.DebtPaymentReminder, [s, c] = g.useState(!1), [d, _] = g.useState(n.threshold || 0), [u, h] = g.useState(
|
18793
18793
|
n.account?.day_payment_is_due || 0
|
18794
18794
|
), m = n.account?.name || n.account?.feed_name || "", C = n.account?.day_payment_is_due ? S(
|
18795
18795
|
a.notification_debt_payment_date,
|
@@ -18858,7 +18858,7 @@ const EC = ({
|
|
18858
18858
|
}
|
18859
18859
|
), MC = A(
|
18860
18860
|
({ onUpdateProfile: e, profile: n }) => {
|
18861
|
-
const { settings: i } =
|
18861
|
+
const { settings: i } = x(), { user: a } = _n(), { clientCommunicationProfile: o, userCommunicationsProfile: r } = Ht(), s = n.notification_type > 2, {
|
18862
18862
|
opted_out_of_email_notifications: c,
|
18863
18863
|
opted_out_of_push_notifications: d,
|
18864
18864
|
opted_out_of_sms_notifications: _
|
@@ -18919,7 +18919,7 @@ const EC = ({
|
|
18919
18919
|
] });
|
18920
18920
|
}
|
18921
18921
|
), Jc = A(() => {
|
18922
|
-
const { common: e, settings: n } =
|
18922
|
+
const { common: e, settings: n } = x(), { isMobile: i } = Ee(), {
|
18923
18923
|
accountProfiles: a,
|
18924
18924
|
budgetProfiles: o,
|
18925
18925
|
clientCommunicationProfile: r,
|
@@ -18985,7 +18985,7 @@ const EC = ({
|
|
18985
18985
|
)
|
18986
18986
|
] });
|
18987
18987
|
}), _4 = A(({ onBackClick: e, sx: n }) => {
|
18988
|
-
const { settings: i } =
|
18988
|
+
const { settings: i } = x(), { isCopyLoaded: a, isInitialized: o } = ue(), { config: r } = Fi(), { alert: s, setAlert: c } = Ht(), { isMobile: d } = Ee(), _ = ge(), {
|
18989
18989
|
display_user_profile_in_settings: u,
|
18990
18990
|
display_mobile_devices_in_settings: h,
|
18991
18991
|
display_notification_settings_in_settings: m,
|
@@ -19008,7 +19008,7 @@ const EC = ({
|
|
19008
19008
|
/* @__PURE__ */ t(
|
19009
19009
|
Lt,
|
19010
19010
|
{
|
19011
|
-
onChange: (v,
|
19011
|
+
onChange: (v, I) => w(I),
|
19012
19012
|
sx: { bgcolor: "background.paper" },
|
19013
19013
|
value: T,
|
19014
19014
|
variant: "scrollable",
|
@@ -19031,7 +19031,7 @@ const EC = ({
|
|
19031
19031
|
),
|
19032
19032
|
/* @__PURE__ */ t(L, { sx: { borderBottom: 2, borderColor: "divider", mt: -2 } }),
|
19033
19033
|
T === 0 && /* @__PURE__ */ t(yC, {}),
|
19034
|
-
T === 1 && /* @__PURE__ */ t(
|
19034
|
+
T === 1 && /* @__PURE__ */ t(xC, {}),
|
19035
19035
|
T === 2 && /* @__PURE__ */ t(Jc, {}),
|
19036
19036
|
T === 3 && /* @__PURE__ */ t(RC, {}),
|
19037
19037
|
T === 4 && /* @__PURE__ */ t(mC, {}),
|
@@ -19060,7 +19060,7 @@ const EC = ({
|
|
19060
19060
|
);
|
19061
19061
|
}), h4 = A(
|
19062
19062
|
({ isOpen: e, onClose: n, onNotificationClick: i }) => {
|
19063
|
-
const { notifications: a } =
|
19063
|
+
const { notifications: a } = x(), { isCopyLoaded: o } = ue(), [r, s] = g.useState(!1);
|
19064
19064
|
return o ? /* @__PURE__ */ l(
|
19065
19065
|
ae,
|
19066
19066
|
{
|
@@ -19258,9 +19258,9 @@ const kC = (e) => {
|
|
19258
19258
|
return n;
|
19259
19259
|
}, BC = (e, n, i) => {
|
19260
19260
|
const a = [];
|
19261
|
-
let o =
|
19261
|
+
let o = xi(n, e.recurrenceDay);
|
19262
19262
|
for (; we(o, i); )
|
19263
|
-
a.push({ ...e, expectedDate: o }), o =
|
19263
|
+
a.push({ ...e, expectedDate: o }), o = xi(o, e.recurrenceDay);
|
19264
19264
|
return a;
|
19265
19265
|
}, PC = (e, n, i) => {
|
19266
19266
|
const a = [], o = e.expectedDate;
|
@@ -19722,7 +19722,7 @@ const Za = ({
|
|
19722
19722
|
(a) => a.member_guid === i.guid && i.successfully_aggregated_at && a.guid !== n.guid
|
19723
19723
|
);
|
19724
19724
|
}, QC = () => {
|
19725
|
-
const [e, n] = g.useState(!1), [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState({}), { selectedAccount: d } = $t(), { mergeAccounts: _, updateAccount: u } = ve(), { accounts: h } =
|
19725
|
+
const [e, n] = g.useState(!1), [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState({}), { selectedAccount: d } = $t(), { mergeAccounts: _, updateAccount: u } = ve(), { accounts: h } = x(), m = ZC(), { onEvent: C } = z(), { modifyTransactionByAccountGuid: f } = Te(), E = async (T) => {
|
19726
19726
|
await u({
|
19727
19727
|
...d,
|
19728
19728
|
...T
|
@@ -19996,7 +19996,7 @@ const Za = ({
|
|
19996
19996
|
}, ef = () => {
|
19997
19997
|
const [e, n] = g.useState(!1), {
|
19998
19998
|
palette: { mode: i }
|
19999
|
-
} = ge(), { selectedMember: a } = $t(), { accounts: o, connect: r } =
|
19999
|
+
} = ge(), { selectedMember: a } = $t(), { accounts: o, connect: r } = x(), s = el(a, r), c = Vs.includes(a.connection_status) ? {
|
20000
20000
|
color: "error.main",
|
20001
20001
|
ctaCopy: s.cta ?? "",
|
20002
20002
|
icon: /* @__PURE__ */ t(Ea, { sx: { ...Qa } }),
|
@@ -20066,11 +20066,11 @@ const Za = ({
|
|
20066
20066
|
)
|
20067
20067
|
] });
|
20068
20068
|
}, tf = A(ef), nf = ({ field: e, isOpen: n, onClose: i }) => {
|
20069
|
-
const { updateAccount: a } = ve(), { selectedAccount: o } = $t(), { accounts: r } =
|
20069
|
+
const { updateAccount: a } = ve(), { selectedAccount: o } = $t(), { accounts: r } = x(), [s, c] = g.useState(o[e.name]), [d, _] = g.useState(""), [u, h] = g.useState(!0), m = () => {
|
20070
20070
|
c(""), _(""), i();
|
20071
20071
|
}, C = () => {
|
20072
20072
|
switch (e.type) {
|
20073
|
-
case
|
20073
|
+
case It.Select:
|
20074
20074
|
return /* @__PURE__ */ l(qd, { fullWidth: !0, children: [
|
20075
20075
|
/* @__PURE__ */ t(Zd, { id: `${e.label}-select-label`, children: e.label }),
|
20076
20076
|
/* @__PURE__ */ t(
|
@@ -20091,7 +20091,7 @@ const Za = ({
|
|
20091
20091
|
}
|
20092
20092
|
)
|
20093
20093
|
] });
|
20094
|
-
case
|
20094
|
+
case It.Currency:
|
20095
20095
|
return /* @__PURE__ */ t(
|
20096
20096
|
an,
|
20097
20097
|
{
|
@@ -20103,7 +20103,7 @@ const Za = ({
|
|
20103
20103
|
setHasValidInput: h
|
20104
20104
|
}
|
20105
20105
|
);
|
20106
|
-
case
|
20106
|
+
case It.Date:
|
20107
20107
|
return /* @__PURE__ */ t(Qd, { dateAdapter: gn, children: /* @__PURE__ */ t(
|
20108
20108
|
di,
|
20109
20109
|
{
|
@@ -20163,7 +20163,7 @@ const Za = ({
|
|
20163
20163
|
}
|
20164
20164
|
);
|
20165
20165
|
}, af = A(nf), of = () => {
|
20166
|
-
const e = window.app?.config, { onEvent: n } = z(), { selectedAccount: i } = $t(), { accounts: a } =
|
20166
|
+
const e = window.app?.config, { onEvent: n } = z(), { selectedAccount: i } = $t(), { accounts: a } = x(), o = zg(i, a), r = i.member_is_managed_by_user || !i.member_is_managed_by_user && e.enable_renaming_home_accounts, [s, c] = g.useState(!1), [d, _] = g.useState(o[0]), u = o.filter(
|
20167
20167
|
(h) => r || i[h.name] || i[h.name] === 0
|
20168
20168
|
);
|
20169
20169
|
return /* @__PURE__ */ l(Q, { children: [
|
@@ -20212,7 +20212,7 @@ const Za = ({
|
|
20212
20212
|
/* @__PURE__ */ t(JC, {})
|
20213
20213
|
] });
|
20214
20214
|
}, cf = A(sf), lf = ({ setTabValue: e }) => {
|
20215
|
-
const [n, i] = g.useState(!1), { selectedMember: a } = $t(), { accounts: o, connect: r } =
|
20215
|
+
const [n, i] = g.useState(!1), { selectedMember: a } = $t(), { accounts: o, connect: r } = x(), s = a.connection_status && Vs.includes(a.connection_status);
|
20216
20216
|
if (g.useEffect(() => {
|
20217
20217
|
s && e(1);
|
20218
20218
|
}, [s]), !s) return;
|
@@ -20268,7 +20268,7 @@ const Za = ({
|
|
20268
20268
|
)
|
20269
20269
|
] });
|
20270
20270
|
}, df = A(lf), uf = () => {
|
20271
|
-
const [e, n] = g.useState(""), { onEvent: i } = z(), { selectedAccount: a } = $t(), { accounts: o } =
|
20271
|
+
const [e, n] = g.useState(""), { onEvent: i } = z(), { selectedAccount: a } = $t(), { accounts: o } = x(), { setFilter: r, sortedTransactions: s } = Te(), c = g.useMemo(() => s.find((d) => d.guid === e), [e]);
|
20272
20272
|
return g.useEffect(() => {
|
20273
20273
|
r({
|
20274
20274
|
dateRange: { start: Rd(Od(), 90), end: Ld() },
|
@@ -20288,7 +20288,7 @@ const Za = ({
|
|
20288
20288
|
)
|
20289
20289
|
] });
|
20290
20290
|
}, _f = A(uf), hf = () => {
|
20291
|
-
const [e, n] = g.useState(0), { accounts: i } =
|
20291
|
+
const [e, n] = g.useState(0), { accounts: i } = x();
|
20292
20292
|
return /* @__PURE__ */ l(Q, { children: [
|
20293
20293
|
/* @__PURE__ */ t(df, { setTabValue: n }),
|
20294
20294
|
/* @__PURE__ */ l(
|
@@ -20325,7 +20325,7 @@ const Za = ({
|
|
20325
20325
|
/* @__PURE__ */ t(ci, { index: 1, name: "account-details", value: e, children: /* @__PURE__ */ t(cf, {}) })
|
20326
20326
|
] });
|
20327
20327
|
}, tl = A(hf), gf = () => {
|
20328
|
-
const [e, n] = g.useState(""), { accounts: i } =
|
20328
|
+
const [e, n] = g.useState(""), { accounts: i } = x(), { selectedAccounts: a } = ue(), { setSelectedAccount: o, setSelectedMember: r } = $t(), { members: s } = ve(), { onEvent: c } = z(), d = [...new Set(a.map((b) => b.account_type))], _ = a.find((b) => e === b.guid), u = g.useMemo(
|
20329
20329
|
() => a.filter((b) => b.is_hidden),
|
20330
20330
|
[a]
|
20331
20331
|
), h = g.useMemo(
|
@@ -20368,14 +20368,14 @@ const Za = ({
|
|
20368
20368
|
]
|
20369
20369
|
}
|
20370
20370
|
) }),
|
20371
|
-
children: /* @__PURE__ */ t(Se, { children: T.map((
|
20371
|
+
children: /* @__PURE__ */ t(Se, { children: T.map((I, R, D) => {
|
20372
20372
|
const H = R === D.length - 1;
|
20373
20373
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
20374
20374
|
/* @__PURE__ */ t(
|
20375
20375
|
Di,
|
20376
20376
|
{
|
20377
|
-
account:
|
20378
|
-
onRowClick: () => f(
|
20377
|
+
account: I,
|
20378
|
+
onRowClick: () => f(I),
|
20379
20379
|
shouldShowConnectionStatus: !0
|
20380
20380
|
}
|
20381
20381
|
),
|
@@ -20396,7 +20396,7 @@ const Za = ({
|
|
20396
20396
|
}
|
20397
20397
|
}
|
20398
20398
|
)
|
20399
|
-
] },
|
20399
|
+
] }, I.guid);
|
20400
20400
|
}) })
|
20401
20401
|
}
|
20402
20402
|
) });
|
@@ -20406,7 +20406,7 @@ const Za = ({
|
|
20406
20406
|
const T = a.filter(
|
20407
20407
|
(v) => v.account_type === b && !v.is_closed && !v.is_hidden
|
20408
20408
|
), w = T.reduce(
|
20409
|
-
(v,
|
20409
|
+
(v, I) => (I.available_balance || I.balance || 0) + v,
|
20410
20410
|
0
|
20411
20411
|
);
|
20412
20412
|
return /* @__PURE__ */ t(
|
@@ -20426,7 +20426,7 @@ const Za = ({
|
|
20426
20426
|
}
|
20427
20427
|
) }),
|
20428
20428
|
children: /* @__PURE__ */ t(Se, { children: T.map((v) => {
|
20429
|
-
const
|
20429
|
+
const I = a.indexOf(v) === a.length - 1, R = T.indexOf(v) === T.length - 1;
|
20430
20430
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
20431
20431
|
/* @__PURE__ */ t(
|
20432
20432
|
Di,
|
@@ -20436,7 +20436,7 @@ const Za = ({
|
|
20436
20436
|
shouldShowConnectionStatus: !0
|
20437
20437
|
}
|
20438
20438
|
),
|
20439
|
-
(!
|
20439
|
+
(!I || h.length > 0 || u.length > 0) && /* @__PURE__ */ t(
|
20440
20440
|
k,
|
20441
20441
|
{
|
20442
20442
|
sx: {
|
@@ -20468,7 +20468,7 @@ const Za = ({
|
|
20468
20468
|
)
|
20469
20469
|
] });
|
20470
20470
|
}, mf = A(gf), pf = ({ onBackClick: e, sx: n = {} }) => {
|
20471
|
-
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), { config: s } = Fi(), { accounts: c, refreshMembers: d } = ve(), { accounts: _ } =
|
20471
|
+
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), { config: s } = Fi(), { accounts: c, refreshMembers: d } = ve(), { accounts: _ } = x(), { isCopyLoaded: u, isInitialized: h, setSelectedAccounts: m, selectedAccountGuids: C } = ue(), { isDesktop: f } = Ee(), { onEvent: E } = z();
|
20472
20472
|
g.useEffect(() => {
|
20473
20473
|
m(c);
|
20474
20474
|
}, [c]);
|
@@ -20516,7 +20516,7 @@ const Za = ({
|
|
20516
20516
|
}
|
20517
20517
|
) : /* @__PURE__ */ t(he, {});
|
20518
20518
|
}, m4 = A(pf), Cf = ({ onPrimaryCtaClick: e, sx: n }) => {
|
20519
|
-
const { visibleAccounts: i } = ve(), { accounts: a } =
|
20519
|
+
const { visibleAccounts: i } = ve(), { accounts: a } = x(), { isCopyLoaded: o, isInitialized: r, selectedAccounts: s, setSelectedAccounts: c } = ue();
|
20520
20520
|
return g.useEffect(() => {
|
20521
20521
|
c(i);
|
20522
20522
|
}, [i]), o ? /* @__PURE__ */ t(
|
@@ -20986,7 +20986,7 @@ const Za = ({
|
|
20986
20986
|
]
|
20987
20987
|
}
|
20988
20988
|
), bf = () => {
|
20989
|
-
const { connect: e } =
|
20989
|
+
const { connect: e } = x();
|
20990
20990
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "column", m: 24, children: [
|
20991
20991
|
/* @__PURE__ */ t(ff, {}),
|
20992
20992
|
/* @__PURE__ */ t(
|
@@ -21007,7 +21007,7 @@ const Za = ({
|
|
21007
21007
|
},
|
21008
21008
|
sx: n
|
21009
21009
|
}) => {
|
21010
|
-
const { isCopyLoaded: i } = ue(), { connect: a } =
|
21010
|
+
const { isCopyLoaded: i } = ue(), { connect: a } = x(), [o, r] = g.useState(!1), s = () => {
|
21011
21011
|
r(!0), e();
|
21012
21012
|
};
|
21013
21013
|
return i ? /* @__PURE__ */ l(
|
@@ -21239,7 +21239,7 @@ class Tf {
|
|
21239
21239
|
};
|
21240
21240
|
}
|
21241
21241
|
const Af = () => {
|
21242
|
-
const { question: e, response: n, setResponse: i } =
|
21242
|
+
const { question: e, response: n, setResponse: i } = Io(), { analytics: a } = x(), o = ge(), r = e, s = (c, d) => {
|
21243
21243
|
i(d);
|
21244
21244
|
};
|
21245
21245
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -21293,10 +21293,10 @@ const Af = () => {
|
|
21293
21293
|
}
|
21294
21294
|
)
|
21295
21295
|
] });
|
21296
|
-
},
|
21297
|
-
const { response: e, setResponse: n } =
|
21296
|
+
}, xf = A(Af), If = () => {
|
21297
|
+
const { response: e, setResponse: n } = Io(), { analytics: i } = x();
|
21298
21298
|
return /* @__PURE__ */ t(
|
21299
|
-
|
21299
|
+
xn,
|
21300
21300
|
{
|
21301
21301
|
label: i.feedback,
|
21302
21302
|
multiline: !0,
|
@@ -21308,7 +21308,7 @@ const Af = () => {
|
|
21308
21308
|
value: e
|
21309
21309
|
}
|
21310
21310
|
);
|
21311
|
-
}, vf = A(
|
21311
|
+
}, vf = A(If), wf = () => {
|
21312
21312
|
const { onEvent: e } = z(), n = ge(), {
|
21313
21313
|
surveyId: i,
|
21314
21314
|
question: a,
|
@@ -21320,7 +21320,7 @@ const Af = () => {
|
|
21320
21320
|
responsePayload: _,
|
21321
21321
|
resetStore: u,
|
21322
21322
|
survey: h
|
21323
|
-
} =
|
21323
|
+
} = Io(), { analytics: m, common: C } = x(), { isCopyLoaded: f, isInitialized: E } = ue(), [b, T] = g.useState(!1);
|
21324
21324
|
g.useEffect(() => {
|
21325
21325
|
E && s();
|
21326
21326
|
}, [E]), g.useEffect(() => {
|
@@ -21334,7 +21334,7 @@ const Af = () => {
|
|
21334
21334
|
}), u(), T(!1);
|
21335
21335
|
}, v = () => {
|
21336
21336
|
r();
|
21337
|
-
},
|
21337
|
+
}, I = () => {
|
21338
21338
|
e("survey sent", _), u(), T(!0);
|
21339
21339
|
};
|
21340
21340
|
return f ? !a && !b ? null : /* @__PURE__ */ l(
|
@@ -21363,14 +21363,14 @@ const Af = () => {
|
|
21363
21363
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: c })
|
21364
21364
|
] }),
|
21365
21365
|
/* @__PURE__ */ l(y, { sx: { gap: 6, px: 24, pb: 8 }, children: [
|
21366
|
-
a.type === or.Rating && /* @__PURE__ */ t(
|
21366
|
+
a.type === or.Rating && /* @__PURE__ */ t(xf, {}),
|
21367
21367
|
a.type === or.Open && /* @__PURE__ */ t(vf, {})
|
21368
21368
|
] }),
|
21369
21369
|
/* @__PURE__ */ t(y, { sx: { px: 24, py: 16 }, children: /* @__PURE__ */ t(
|
21370
21370
|
te,
|
21371
21371
|
{
|
21372
21372
|
disabled: !o && !d,
|
21373
|
-
onClick: o ?
|
21373
|
+
onClick: o ? I : v,
|
21374
21374
|
sx: {
|
21375
21375
|
borderColor: n.palette.border.light,
|
21376
21376
|
"&:hover": {
|
@@ -21575,7 +21575,7 @@ const $f = ({
|
|
21575
21575
|
onConnectAccountsClick: n,
|
21576
21576
|
createBudgetOnClick: i
|
21577
21577
|
}) => {
|
21578
|
-
const { recalculateBudgets: a } = dt(), { spendCategories: o } = Ke(), { budgets: r } =
|
21578
|
+
const { recalculateBudgets: a } = dt(), { spendCategories: o } = Ke(), { budgets: r } = x(), [s, c] = g.useState(!1), [d, _] = g.useState(!1), [u, h] = g.useState(!1), m = g.useMemo(() => [...o.filter((f) => f.totalAverageAmount > 0)], [o]), C = async () => {
|
21579
21579
|
h(!0);
|
21580
21580
|
const { data: f, isSuccess: E } = await a(m);
|
21581
21581
|
h(!1), E ? (f.length === 0 && c(!0), _(!1)) : _(!0);
|
@@ -21654,7 +21654,7 @@ const $f = ({
|
|
21654
21654
|
shouldShowZeroState: o,
|
21655
21655
|
unavailableWidth: r = 24
|
21656
21656
|
}) => {
|
21657
|
-
const { onEvent: s } = z(), { setSelectedBudget: c } = dt(), { isLoadingCategoryTotals: d } = Ke(), { isInitialized: _ } = ue(), { accounts: u } =
|
21657
|
+
const { onEvent: s } = z(), { setSelectedBudget: c } = dt(), { isLoadingCategoryTotals: d } = Ke(), { isInitialized: _ } = ue(), { accounts: u } = x(), { availableWidth: h } = Un(), { isMobile: m } = Ee(), [C, f] = g.useState(!1), E = g.useMemo(() => h - r, [h]), b = (w) => {
|
21658
21658
|
c(w), s(W.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
21659
21659
|
budget_category: w.category.name,
|
21660
21660
|
click_type: "bubble"
|
@@ -21690,7 +21690,7 @@ const $f = ({
|
|
21690
21690
|
] });
|
21691
21691
|
}
|
21692
21692
|
), Uf = (e) => {
|
21693
|
-
const n = ge(), { accounts: i } = ve(), { budgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = dt(), { budgets: c } =
|
21693
|
+
const n = ge(), { accounts: i } = ve(), { budgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = dt(), { budgets: c } = x(), { isCopyLoaded: d, isInitialized: _ } = ue(), { reloadCategoryTotals: u } = Ke(), h = p_(), m = a.length === 0;
|
21694
21694
|
return g.useEffect(() => {
|
21695
21695
|
s(n);
|
21696
21696
|
}, [n]), g.useEffect(() => {
|
@@ -21720,7 +21720,7 @@ const $f = ({
|
|
21720
21720
|
}
|
21721
21721
|
) : /* @__PURE__ */ t(he, {});
|
21722
21722
|
}, b4 = A(Uf), Vf = A(() => {
|
21723
|
-
const { budgets: e } =
|
21723
|
+
const { budgets: e } = x(), { totalBudgeted: n } = dt(), { projectedIncome: i } = nt(), a = i - n;
|
21724
21724
|
return /* @__PURE__ */ l(y, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
21725
21725
|
/* @__PURE__ */ l(y, { alignItems: "center", children: [
|
21726
21726
|
/* @__PURE__ */ t(p, { bold: !0, variant: "Body", children: B(i, "0,0") }),
|
@@ -21739,7 +21739,7 @@ const $f = ({
|
|
21739
21739
|
] });
|
21740
21740
|
}), Kf = A(
|
21741
21741
|
({ category: e }) => {
|
21742
|
-
const { budgets: n } =
|
21742
|
+
const { budgets: n } = x(), { budgets: i } = dt(), a = g.useMemo(() => {
|
21743
21743
|
const o = i.find((c) => c.category_guid === e.guid), r = B(e.totalAverageAmount, "0,0"), s = o ? S(n.recalculate_previous_budget, B(o.amount, "0,0")) : n.recalculate_new_budget;
|
21744
21744
|
return `${r} - ${s}`;
|
21745
21745
|
}, [n, i]);
|
@@ -21752,7 +21752,7 @@ const $f = ({
|
|
21752
21752
|
] }, e.guid);
|
21753
21753
|
}
|
21754
21754
|
), zf = ({ onRecalculateBudgets: e }) => {
|
21755
|
-
const { budgets: n, common: i } =
|
21755
|
+
const { budgets: n, common: i } = x(), { spendCategories: a } = Ke(), { recalculateBudgets: o, setAlert: r } = dt(), [s, c] = g.useState(!1), d = a.filter((u) => u.totalAverageAmount > 0), _ = async () => {
|
21756
21756
|
await o(d), c(!1), r(n.alert_recalculated_budgets), e?.();
|
21757
21757
|
};
|
21758
21758
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -21781,7 +21781,7 @@ const $f = ({
|
|
21781
21781
|
categoryName: n,
|
21782
21782
|
onAmountChanged: i
|
21783
21783
|
}) => {
|
21784
|
-
const { budgets: a } =
|
21784
|
+
const { budgets: a } = x(), { totalBudgeted: o } = dt(), { projectedIncome: r } = nt(), s = r - o;
|
21785
21785
|
return /* @__PURE__ */ l(y, { gap: 16, children: [
|
21786
21786
|
/* @__PURE__ */ l(y, { children: [
|
21787
21787
|
/* @__PURE__ */ t(p, { children: S(
|
@@ -21803,7 +21803,7 @@ const $f = ({
|
|
21803
21803
|
)
|
21804
21804
|
] });
|
21805
21805
|
}, Yf = A(({ category: e, onAddBudget: n }) => {
|
21806
|
-
const { budgets: i, common: a } =
|
21806
|
+
const { budgets: i, common: a } = x(), [o, r] = g.useState(!1), [s, c] = g.useState(
|
21807
21807
|
`${e.totalAmount === 0 ? "" : e.totalAmount}`
|
21808
21808
|
);
|
21809
21809
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -21832,7 +21832,7 @@ const $f = ({
|
|
21832
21832
|
)
|
21833
21833
|
] });
|
21834
21834
|
}), jf = A(({ onRecalculateBudgets: e }) => {
|
21835
|
-
const { budgets: n } =
|
21835
|
+
const { budgets: n } = x(), { addBudget: i, setAlert: a, unbudgetedCategories: o } = dt(), r = async (s, c) => {
|
21836
21836
|
await i(s, c), a(S(n.alert_budget_created, s.name));
|
21837
21837
|
};
|
21838
21838
|
return /* @__PURE__ */ l(y, { children: [
|
@@ -21868,7 +21868,7 @@ const $f = ({
|
|
21868
21868
|
/* @__PURE__ */ t(si, { data: c, height: 10 })
|
21869
21869
|
] }) }) });
|
21870
21870
|
}, Xf = A(() => {
|
21871
|
-
const { budgets: e } =
|
21871
|
+
const { budgets: e } = x();
|
21872
21872
|
return /* @__PURE__ */ l(y, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
21873
21873
|
/* @__PURE__ */ t(P, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
|
21874
21874
|
/* @__PURE__ */ t(p, { bold: !0, color: "secondary", variant: "Small", children: e.zero_state_no_sub_budgets }),
|
@@ -21896,7 +21896,7 @@ const $f = ({
|
|
21896
21896
|
)
|
21897
21897
|
] }) });
|
21898
21898
|
}), Zf = A(({ category: e, parentBudget: n }) => {
|
21899
|
-
const { budgets: i, common: a } =
|
21899
|
+
const { budgets: i, common: a } = x(), { setExpandedGuid: o, setOnSelect: r } = pn(), { addBudget: s } = dt(), [c, d] = g.useState(!1), [_, u] = g.useState(!1), [h, m] = g.useState(""), [C, f] = g.useState(void 0);
|
21900
21900
|
g.useEffect(() => {
|
21901
21901
|
r((T) => {
|
21902
21902
|
const w = e.subCategories.find((v) => v.guid === T);
|
@@ -21948,11 +21948,11 @@ const $f = ({
|
|
21948
21948
|
)
|
21949
21949
|
] });
|
21950
21950
|
}), Qf = A(({ budget: e }) => {
|
21951
|
-
const { category: n, subBudgets: i } = e, { budgets: a, common: o } =
|
21951
|
+
const { category: n, subBudgets: i } = e, { budgets: a, common: o } = x(), { deleteBudget: r, selectedSubBudget: s, setSelectedSubBudget: c, updateBudget: d } = dt(), { filter: _, setFilter: u } = Te(), [h, m] = g.useState(!1), [C, f] = g.useState(!1), [E, b] = g.useState("");
|
21952
21952
|
g.useEffect(() => {
|
21953
21953
|
s && (b(`${s.amount}`), u({
|
21954
21954
|
..._,
|
21955
|
-
custom: (
|
21955
|
+
custom: (I) => I.category_guid === s.category_guid
|
21956
21956
|
}));
|
21957
21957
|
}, [s]);
|
21958
21958
|
const T = async () => {
|
@@ -21965,15 +21965,15 @@ const $f = ({
|
|
21965
21965
|
}, v = () => {
|
21966
21966
|
u({
|
21967
21967
|
..._,
|
21968
|
-
custom: (
|
21968
|
+
custom: (I) => I.category_guid === e.category_guid || I.top_level_category_guid === e.category_guid
|
21969
21969
|
}), c(void 0);
|
21970
21970
|
};
|
21971
21971
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
21972
21972
|
/* @__PURE__ */ l(ne, { sx: { bgcolor: "background.paper" }, children: [
|
21973
|
-
i.length === 0 ? /* @__PURE__ */ t(Xf, {}) : i.map((
|
21974
|
-
/* @__PURE__ */ t(qf, { budget:
|
21973
|
+
i.length === 0 ? /* @__PURE__ */ t(Xf, {}) : i.map((I) => /* @__PURE__ */ l(g.Fragment, { children: [
|
21974
|
+
/* @__PURE__ */ t(qf, { budget: I }),
|
21975
21975
|
/* @__PURE__ */ t(k, {})
|
21976
|
-
] },
|
21976
|
+
] }, I.guid)),
|
21977
21977
|
/* @__PURE__ */ t(Zf, { category: n, parentBudget: e })
|
21978
21978
|
] }),
|
21979
21979
|
/* @__PURE__ */ t(
|
@@ -22029,7 +22029,7 @@ const $f = ({
|
|
22029
22029
|
] })
|
22030
22030
|
] });
|
22031
22031
|
}), Jf = A(({ budget: e }) => {
|
22032
|
-
const { budgets: n, common: i, transactions: a } =
|
22032
|
+
const { budgets: n, common: i, transactions: a } = x(), { setAlert: o } = dt(), { sortedTransactions: r, tags: s } = Te(), [c, d] = g.useState(0), [_, u] = g.useState(""), h = g.useMemo(
|
22033
22033
|
() => r.find((f) => f.guid === _),
|
22034
22034
|
[_]
|
22035
22035
|
), m = (f, E) => {
|
@@ -22091,7 +22091,7 @@ const $f = ({
|
|
22091
22091
|
] })
|
22092
22092
|
] });
|
22093
22093
|
}), e0 = A(() => {
|
22094
|
-
const { selectedAccountGuids: e } = ue(), { budgets: n, common: i } =
|
22094
|
+
const { selectedAccountGuids: e } = ue(), { budgets: n, common: i } = x(), {
|
22095
22095
|
dateRange: a,
|
22096
22096
|
deleteBudget: o,
|
22097
22097
|
selectedBudget: r,
|
@@ -22113,7 +22113,7 @@ const $f = ({
|
|
22113
22113
|
amount: Number(T),
|
22114
22114
|
percentage: r.category.totalAmount / Number(T) * 100
|
22115
22115
|
}), c(S(n.alert_budget_updated, r.category.name)));
|
22116
|
-
},
|
22116
|
+
}, I = async () => {
|
22117
22117
|
r && (await o(r.guid), c(S(n.alert_budget_deleted, r.category.name))), b(!1), R();
|
22118
22118
|
}, R = () => {
|
22119
22119
|
m(!1), setTimeout(() => {
|
@@ -22162,7 +22162,7 @@ const $f = ({
|
|
22162
22162
|
copy: { close_aria: i.close_aria, title: n.delete_title },
|
22163
22163
|
isOpen: E,
|
22164
22164
|
onClose: () => b(!1),
|
22165
|
-
onPrimaryAction:
|
22165
|
+
onPrimaryAction: I,
|
22166
22166
|
primaryColor: "error",
|
22167
22167
|
primaryText: n.details_delete_button,
|
22168
22168
|
secondaryColor: "secondary",
|
@@ -22200,7 +22200,7 @@ const $f = ({
|
|
22200
22200
|
)
|
22201
22201
|
] }) });
|
22202
22202
|
}, n0 = A(() => {
|
22203
|
-
const { onEvent: e } = z(), { budgets: n } =
|
22203
|
+
const { onEvent: e } = z(), { budgets: n } = x(), { detailedBudgets: i, setSelectedBudget: a } = dt(), o = (r) => {
|
22204
22204
|
a(r), e(W.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
22205
22205
|
budget_category: r.category.name,
|
22206
22206
|
click_type: "list"
|
@@ -22214,16 +22214,16 @@ const $f = ({
|
|
22214
22214
|
] }, r.guid)) }) })
|
22215
22215
|
] });
|
22216
22216
|
}), i0 = A(() => {
|
22217
|
-
const e = ge(), { onEvent: n } = z(), { visibleAccounts: i } = ve(), { budgets: a, common: o, recurring: r } =
|
22217
|
+
const e = ge(), { onEvent: n } = z(), { visibleAccounts: i } = ve(), { budgets: a, common: o, recurring: r } = x(), { incomeCategories: s, spendCategories: c } = Ke(), { detailedBudgets: d, totalBudgeted: _ } = dt(), { projectedIncome: u } = nt(), { setFilter: h } = Te(), [m, C] = g.useState(!1), [f, E] = g.useMemo(() => {
|
22218
22218
|
const v = c.reduce((H, O) => H + O.totalAmount, 0);
|
22219
|
-
let
|
22220
|
-
|
22219
|
+
let I = v / _;
|
22220
|
+
I > 1 && (I = 1);
|
22221
22221
|
let R = e.palette.success.main;
|
22222
|
-
|
22222
|
+
I > 0.8 && I < 1 ? R = e.palette.warning.main : I >= 1 && (R = e.palette.error.main);
|
22223
22223
|
const D = [
|
22224
22224
|
{
|
22225
22225
|
color: R,
|
22226
|
-
percentage: `${
|
22226
|
+
percentage: `${I}`
|
22227
22227
|
}
|
22228
22228
|
];
|
22229
22229
|
return [v, D];
|
@@ -22231,12 +22231,12 @@ const $f = ({
|
|
22231
22231
|
const v = Math.abs(
|
22232
22232
|
s.reduce((D, H) => D + H.totalAmount, 0)
|
22233
22233
|
);
|
22234
|
-
let
|
22235
|
-
|
22234
|
+
let I = v / u;
|
22235
|
+
I > 1 && (I = 1);
|
22236
22236
|
const R = [
|
22237
22237
|
{
|
22238
22238
|
color: e.palette.secondary.main,
|
22239
|
-
percentage: `${
|
22239
|
+
percentage: `${I}`
|
22240
22240
|
}
|
22241
22241
|
];
|
22242
22242
|
return [v, R];
|
@@ -22297,7 +22297,7 @@ const $f = ({
|
|
22297
22297
|
)
|
22298
22298
|
] });
|
22299
22299
|
}), ms = 480, y4 = A(({ onBackClick: e, sx: n }) => {
|
22300
|
-
const i = ge(), { onEvent: a } = z(), { visibleAccounts: o } = ve(), { budgets: r, common: s } =
|
22300
|
+
const i = ge(), { onEvent: a } = z(), { visibleAccounts: o } = ve(), { budgets: r, common: s } = x(), { isCopyLoaded: c, isInitialized: d, selectedAccounts: _, setDisplayedDate: u, setSelectedAccounts: h } = ue(), {
|
22301
22301
|
alert: m,
|
22302
22302
|
dateRange: C,
|
22303
22303
|
isDataLoaded: f,
|
@@ -22306,13 +22306,13 @@ const $f = ({
|
|
22306
22306
|
setAlert: T,
|
22307
22307
|
setTheme: w,
|
22308
22308
|
budgets: v
|
22309
|
-
} = dt(), { loadActivity:
|
22309
|
+
} = dt(), { loadActivity: I } = nt(), { isDesktop: R, isTablet: D } = Ee(), { reloadCategoryTotals: H } = Ke(), [O, M] = g.useState(!1);
|
22310
22310
|
g.useEffect(() => {
|
22311
22311
|
w(i), h(o), u(C.start, C.end), a(W.BUDGETS_VIEW);
|
22312
22312
|
}, []), g.useEffect(() => {
|
22313
22313
|
h(o);
|
22314
22314
|
}, [o]), g.useEffect(() => {
|
22315
|
-
d && (H(_, C.start, C.end).finally(), f || (
|
22315
|
+
d && (H(_, C.start, C.end).finally(), f || (I(), E().finally()));
|
22316
22316
|
}, [d, _, C]);
|
22317
22317
|
const Z = (ce) => {
|
22318
22318
|
b({ start: ce[0] || /* @__PURE__ */ new Date(), end: ce[1] || /* @__PURE__ */ new Date() });
|
@@ -22414,7 +22414,7 @@ const $f = ({
|
|
22414
22414
|
}), a0 = A(() => {
|
22415
22415
|
const e = ge(), {
|
22416
22416
|
appDataStore: { banner: n, loadBanner: i, user: a }
|
22417
|
-
} =
|
22417
|
+
} = xa();
|
22418
22418
|
return g.useEffect(() => {
|
22419
22419
|
i().finally();
|
22420
22420
|
}, [a]), n?.image_url ? /* @__PURE__ */ t(
|
@@ -22451,7 +22451,7 @@ const $f = ({
|
|
22451
22451
|
}
|
22452
22452
|
) : null;
|
22453
22453
|
}), o0 = () => {
|
22454
|
-
const { common: e, connect: n } =
|
22454
|
+
const { common: e, connect: n } = x(), i = bn("(max-width: 700px)"), [a, o] = g.useState(!1), r = () => {
|
22455
22455
|
o(!0);
|
22456
22456
|
};
|
22457
22457
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -22494,7 +22494,7 @@ const $f = ({
|
|
22494
22494
|
)
|
22495
22495
|
] });
|
22496
22496
|
}, r0 = A(o0), s0 = () => {
|
22497
|
-
const { visibleAccounts: e } = ve(), { selectedAccountGuids: n, setSelectedAccountGuids: i } = ue(), { common: a } =
|
22497
|
+
const { visibleAccounts: e } = ve(), { selectedAccountGuids: n, setSelectedAccountGuids: i } = ue(), { common: a } = x(), { config: o } = Fi(), { isMobile: r } = Ee(), s = {
|
22498
22498
|
accountFilterOptionsCopy: {
|
22499
22499
|
accountTypeAccounts: a.account_filter.account_type_accounts,
|
22500
22500
|
cancelButton: a.cancel_button,
|
@@ -22540,7 +22540,7 @@ const $f = ({
|
|
22540
22540
|
}, c0 = A(s0);
|
22541
22541
|
var Qi = /* @__PURE__ */ ((e) => (e[e.Main = 0] = "Main", e[e.RightSide = 1] = "RightSide", e[e.Disabled = 2] = "Disabled", e))(Qi || {});
|
22542
22542
|
const l0 = ({ widgets: e, isLoading: n }) => {
|
22543
|
-
const { isDesktop: i, isMobile: a } = Ee(), { copyStore: o } =
|
22543
|
+
const { isDesktop: i, isMobile: a } = Ee(), { copyStore: o } = xa(), { setSelectedAccounts: r } = ue(), { visibleAccounts: s } = ve();
|
22544
22544
|
g.useEffect(() => {
|
22545
22545
|
r(s);
|
22546
22546
|
}, [s]);
|
@@ -22716,7 +22716,7 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
22716
22716
|
b !== null && o(b);
|
22717
22717
|
}, { isMobile: c } = Ee(), {
|
22718
22718
|
investments: { allocation: d }
|
22719
|
-
} =
|
22719
|
+
} = x(), u = ge().palette.mode === "dark", h = u ? "grey.200" : "grey.700", m = u ? "common.white" : "primary.main", C = u ? "primary.light" : "primary.dark", f = u ? "grey.600" : "grey.400";
|
22720
22720
|
return /* @__PURE__ */ l(y, { sx: { mt: 15, width: c ? 250 : 412 }, children: [
|
22721
22721
|
/* @__PURE__ */ l(
|
22722
22722
|
Oi,
|
@@ -22866,7 +22866,7 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
22866
22866
|
[s]
|
22867
22867
|
), {
|
22868
22868
|
investments: { allocation: m }
|
22869
|
-
} =
|
22869
|
+
} = x(), C = g.useMemo(() => e.donutData.length > 0 ? e.donutData : [{ id: "0", color: _.palette.border.light, value: 100 }], [e, _]), f = u ? "#0AC295" : "#09A57F", E = u ? "grey.300" : "grey.700", b = () => h ? m.pie_chart_centered_click_for_details : i ? mo(e.totalGainLossPercentage) : Ai(e.totalGainLoss), T = e.totalGainLoss >= 0 ? f : E;
|
22870
22870
|
return /* @__PURE__ */ t(
|
22871
22871
|
ic,
|
22872
22872
|
{
|
@@ -22909,52 +22909,55 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
22909
22909
|
i !== C ? a(C) : (a(""), r(""));
|
22910
22910
|
}, { holdings: c } = wi(), { visibleInvestmentAccounts: d } = ve(), {
|
22911
22911
|
investments: { allocation: _ }
|
22912
|
-
} =
|
22913
|
-
console.log(_, ":::investments");
|
22912
|
+
} = x();
|
22913
|
+
console.log(_.pie_chart_centered_text, ":::investments");
|
22914
22914
|
const u = h0(d, _, c), { isMobile: h } = Ee(), m = bn("(max-width:768px)");
|
22915
|
-
return /* @__PURE__ */
|
22916
|
-
|
22917
|
-
|
22918
|
-
|
22919
|
-
|
22920
|
-
|
22921
|
-
|
22922
|
-
|
22923
|
-
|
22924
|
-
|
22925
|
-
|
22926
|
-
|
22927
|
-
|
22928
|
-
|
22929
|
-
|
22930
|
-
|
22931
|
-
|
22932
|
-
|
22933
|
-
|
22934
|
-
|
22935
|
-
|
22936
|
-
|
22937
|
-
|
22938
|
-
|
22939
|
-
|
22940
|
-
|
22941
|
-
|
22942
|
-
|
22943
|
-
|
22944
|
-
|
22945
|
-
|
22946
|
-
|
22947
|
-
|
22948
|
-
|
22949
|
-
|
22950
|
-
|
22951
|
-
|
22952
|
-
|
22953
|
-
|
22954
|
-
|
22955
|
-
|
22956
|
-
|
22957
|
-
|
22915
|
+
return /* @__PURE__ */ l(Q, { children: [
|
22916
|
+
/* @__PURE__ */ t(p, { children: _.pie_chart_centered_text }),
|
22917
|
+
/* @__PURE__ */ l(
|
22918
|
+
y,
|
22919
|
+
{
|
22920
|
+
alignItems: m ? "center" : "flex-start",
|
22921
|
+
direction: m ? "column" : "row",
|
22922
|
+
gap: { xs: 16, md: 64, xl: 100 },
|
22923
|
+
sx: {
|
22924
|
+
justifyContent: "center",
|
22925
|
+
mt: 50,
|
22926
|
+
width: "100%"
|
22927
|
+
},
|
22928
|
+
children: [
|
22929
|
+
/* @__PURE__ */ t(
|
22930
|
+
m0,
|
22931
|
+
{
|
22932
|
+
data: u,
|
22933
|
+
hoveredId: o,
|
22934
|
+
isPercentage: e === 1,
|
22935
|
+
onMouseEnter: (C) => {
|
22936
|
+
i ? i === C && r("") : r(C);
|
22937
|
+
},
|
22938
|
+
onMouseLeave: () => {
|
22939
|
+
r("");
|
22940
|
+
},
|
22941
|
+
onSelected: s,
|
22942
|
+
selectedId: i,
|
22943
|
+
size: h ? 280 : 400,
|
22944
|
+
totalLabel: _.pie_chart_centered_text
|
22945
|
+
}
|
22946
|
+
),
|
22947
|
+
/* @__PURE__ */ t(
|
22948
|
+
g0,
|
22949
|
+
{
|
22950
|
+
data: u,
|
22951
|
+
onSelected: s,
|
22952
|
+
selectedId: i,
|
22953
|
+
selectedTabs: e,
|
22954
|
+
setSelectedTabs: n
|
22955
|
+
}
|
22956
|
+
)
|
22957
|
+
]
|
22958
|
+
}
|
22959
|
+
)
|
22960
|
+
] });
|
22958
22961
|
}, C0 = A(p0), f0 = ({
|
22959
22962
|
analysisDetails: e,
|
22960
22963
|
analysisType: n,
|
@@ -23047,7 +23050,7 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
23047
23050
|
), E0 = () => {
|
23048
23051
|
const {
|
23049
23052
|
investments: { analysis: e }
|
23050
|
-
} =
|
23053
|
+
} = x(), { analysisChartData: n, analysisDetails: i, analysisType: a, setAnalysisType: o } = wi(), r = bn("(min-width:320px) and (max-width:375px)"), { isMobile: s } = Ee(), d = tt().palette.mode === "dark", { cellDimension: _, columns: u, rows: h, textVariant: m } = g.useMemo(() => {
|
23051
23054
|
const C = a === Pn.Stocks, f = Object.values(C ? e.stock_column_labels : e.bond_column_labels), E = Object.values(C ? e.stock_row_labels : e.bond_row_labels);
|
23052
23055
|
return { cellDimension: s ? 72 : 100, columns: f, rows: E, textVariant: s ? "XSmall" : "Body" };
|
23053
23056
|
}, [e, s, a]);
|
@@ -23124,16 +23127,16 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
23124
23127
|
}
|
23125
23128
|
),
|
23126
23129
|
n.map((C, f, E) => /* @__PURE__ */ t(y, { sx: { flexDirection: "row", gap: 4 }, children: C.map((b, T) => {
|
23127
|
-
const w = f === 0, v = f === E.length - 1,
|
23130
|
+
const w = f === 0, v = f === E.length - 1, I = T === 0, R = T === C.length - 1, D = Number(b.replace("%", "")) >= 25;
|
23128
23131
|
let H = "grey.200", O = "grey.900";
|
23129
23132
|
return d ? (H = D ? "grey.200" : "grey.700", O = D ? "grey.900" : "common.white") : (H = D ? "grey.700" : "grey.200", O = D ? "common.white" : "grey.900"), /* @__PURE__ */ t(
|
23130
23133
|
y,
|
23131
23134
|
{
|
23132
23135
|
sx: {
|
23133
23136
|
...{
|
23134
|
-
borderBottomLeftRadius: v &&
|
23137
|
+
borderBottomLeftRadius: v && I ? 4 : 0,
|
23135
23138
|
borderBottomRightRadius: v && R ? 4 : 0,
|
23136
|
-
borderTopLeftRadius: w &&
|
23139
|
+
borderTopLeftRadius: w && I ? 4 : 0,
|
23137
23140
|
borderTopRightRadius: w && R ? 4 : 0
|
23138
23141
|
},
|
23139
23142
|
alignItems: "center",
|
@@ -23193,7 +23196,7 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
23193
23196
|
onClose: n,
|
23194
23197
|
accountHoldingsData: i
|
23195
23198
|
}) => {
|
23196
|
-
const { investments: a } =
|
23199
|
+
const { investments: a } = x(), [o, r] = g.useState({}), s = (c) => (d, _) => {
|
23197
23200
|
r((u) => ({
|
23198
23201
|
...u,
|
23199
23202
|
[c]: _
|
@@ -23428,7 +23431,7 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
23428
23431
|
const { isMobile: e } = Ee(), { onEvent: n } = z(), [i, a] = Et({}), [o, r] = Et(!1), { holdings: s, updateHoldings: c, holdingsLoaded: d } = wi(), [_, u] = g.useState(!1), [h, m] = Et({
|
23429
23432
|
accounts: [],
|
23430
23433
|
holdings: []
|
23431
|
-
}), { accounts: C, investments: f } =
|
23434
|
+
}), { accounts: C, investments: f } = x(), b = ge().palette.mode === "dark", T = b ? "#0AC295" : "#09A57F", w = b ? "grey.300" : "grey.700", v = ($, ce = "lesserThan") => ce === "greaterThan" ? $ >= 0 ? T : w : $ <= 0 ? w : T, I = ({ data: $ }) => {
|
23432
23435
|
const { isCopyLoaded: ce } = ue(), [Re, oe] = Et(null), [me, Ye] = Et("");
|
23433
23436
|
if (!ce || !d)
|
23434
23437
|
return /* @__PURE__ */ t(he, {});
|
@@ -23950,7 +23953,7 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
23950
23953
|
]
|
23951
23954
|
}
|
23952
23955
|
),
|
23953
|
-
/* @__PURE__ */ t(Gi, { sx: { background: "background.default", p: 12 }, children: /* @__PURE__ */ t(Tt, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ t(
|
23956
|
+
/* @__PURE__ */ t(Gi, { sx: { background: "background.default", p: 12 }, children: /* @__PURE__ */ t(Tt, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ t(I, { data: ce }) }) })
|
23954
23957
|
]
|
23955
23958
|
},
|
23956
23959
|
$.guid
|
@@ -23980,8 +23983,8 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
23980
23983
|
}
|
23981
23984
|
)
|
23982
23985
|
] });
|
23983
|
-
},
|
23984
|
-
const { onEvent: i } = z(), { isMobile: a } = Ee(), { visibleInvestmentAccounts: o } = ve(), { investments: r } =
|
23986
|
+
}, x0 = A(A0), Ja = ({ title: e }) => /* @__PURE__ */ t(p, { bold: !0, variant: "Body", children: e }), S4 = A(({ onBackClick: e, sx: n }) => {
|
23987
|
+
const { onEvent: i } = z(), { isMobile: a } = Ee(), { visibleInvestmentAccounts: o } = ve(), { investments: r } = x(), { isCopyLoaded: s, isInitialized: c } = ue(), [d, _] = g.useState(0), { loadHoldings: u } = wi();
|
23985
23988
|
g.useEffect(() => {
|
23986
23989
|
c && u().finally();
|
23987
23990
|
}, [c]);
|
@@ -24029,14 +24032,14 @@ const l0 = ({ widgets: e, isLoading: n }) => {
|
|
24029
24032
|
]
|
24030
24033
|
}
|
24031
24034
|
),
|
24032
|
-
d === 0 && /* @__PURE__ */ t(
|
24035
|
+
d === 0 && /* @__PURE__ */ t(x0, {}),
|
24033
24036
|
d === 1 && /* @__PURE__ */ t(C0, {}),
|
24034
24037
|
d === 2 && /* @__PURE__ */ t(S0, {})
|
24035
24038
|
] })
|
24036
24039
|
}
|
24037
24040
|
);
|
24038
24041
|
});
|
24039
|
-
class
|
24042
|
+
class I0 {
|
24040
24043
|
copyApi = new Ei("/", "");
|
24041
24044
|
copyObject = {};
|
24042
24045
|
namespace = "experiences";
|
@@ -24245,7 +24248,7 @@ class R0 {
|
|
24245
24248
|
token = "";
|
24246
24249
|
isInitialized = !1;
|
24247
24250
|
constructor() {
|
24248
|
-
this.copyStore = new
|
24251
|
+
this.copyStore = new I0(), this.insightsMicroWidgetStore = new D0(), He(this);
|
24249
24252
|
}
|
24250
24253
|
initialize = async (n, i, a) => {
|
24251
24254
|
await this.copyStore.initialize(n, i), await this.insightsMicroWidgetStore.initialize(n, i, a);
|
@@ -24279,7 +24282,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
24279
24282
|
variant: f,
|
24280
24283
|
widthOverrides: E
|
24281
24284
|
}, b) {
|
24282
|
-
const [T, w] = g.useState(2), [v,
|
24285
|
+
const [T, w] = g.useState(2), [v, I] = g.useState(!1);
|
24283
24286
|
g.useEffect(() => {
|
24284
24287
|
E && E <= 325 && w(3);
|
24285
24288
|
}, [E]);
|
@@ -24322,8 +24325,8 @@ const Vi = g.createContext(null), O0 = ({
|
|
24322
24325
|
"aria-label": i,
|
24323
24326
|
id: "divButton",
|
24324
24327
|
onClick: () => _(),
|
24325
|
-
onKeyDown: () =>
|
24326
|
-
onKeyUp: () =>
|
24328
|
+
onKeyDown: () => I(!1),
|
24329
|
+
onKeyUp: () => I(!0),
|
24327
24330
|
ref: b,
|
24328
24331
|
role: "button",
|
24329
24332
|
style: {
|
@@ -25300,11 +25303,11 @@ const Vi = g.createContext(null), O0 = ({
|
|
25300
25303
|
}, [f]), zn(() => {
|
25301
25304
|
if (f && i)
|
25302
25305
|
if (i.template === "MarketingOffer") {
|
25303
|
-
const
|
25306
|
+
const I = i;
|
25304
25307
|
_?.capture("viewed_messaging_insight", {
|
25305
25308
|
template: i.template,
|
25306
|
-
campaign_guid:
|
25307
|
-
campaign_name:
|
25309
|
+
campaign_guid: I.campaign_guid,
|
25310
|
+
campaign_name: I.pulse_campaign_name
|
25308
25311
|
});
|
25309
25312
|
} else
|
25310
25313
|
_?.capture("viewed_insight", {
|
@@ -25315,11 +25318,11 @@ const Vi = g.createContext(null), O0 = ({
|
|
25315
25318
|
}, [i, s, f]);
|
25316
25319
|
const v = () => {
|
25317
25320
|
if (d && d(i), b(al(i.template)), i.template === "MarketingOffer") {
|
25318
|
-
const
|
25321
|
+
const I = i;
|
25319
25322
|
_?.capture("clicked_messaging_insight", {
|
25320
25323
|
template: i.template,
|
25321
|
-
campaign_guid:
|
25322
|
-
campaign_name:
|
25324
|
+
campaign_guid: I.campaign_guid,
|
25325
|
+
campaign_name: I.pulse_campaign_name
|
25323
25326
|
});
|
25324
25327
|
} else
|
25325
25328
|
_?.capture("clicked_insight", {
|
@@ -25443,8 +25446,8 @@ const Vi = g.createContext(null), O0 = ({
|
|
25443
25446
|
variant: _,
|
25444
25447
|
widthOverrides: u
|
25445
25448
|
}) => {
|
25446
|
-
const h = j0(a, d, u), m = g.useRef(null), [C, f] = g.useState(0), [E, b] = g.useState(null), [T, w] = g.useState(null), { carouselCopy: v } = Vn(), { onEvent:
|
25447
|
-
|
25449
|
+
const h = j0(a, d, u), m = g.useRef(null), [C, f] = g.useState(0), [E, b] = g.useState(null), [T, w] = g.useState(null), { carouselCopy: v } = Vn(), { onEvent: I } = Ki(), R = () => {
|
25450
|
+
I(Yt.ON_CAROUSEL_FORWARD_CLICK), m.current && m.current.scrollTo({
|
25448
25451
|
left: (
|
25449
25452
|
// Adds the flex gap to the carousel ref's width
|
25450
25453
|
(m.current.offsetWidth + 8) * (Math.floor(C / (m.current.offsetWidth + 8)) + 1)
|
@@ -25453,7 +25456,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25453
25456
|
behavior: "smooth"
|
25454
25457
|
});
|
25455
25458
|
}, D = () => {
|
25456
|
-
|
25459
|
+
I(Yt.ON_CAROUSEL_BACK_CLICK), m.current && m.current.scrollTo({
|
25457
25460
|
left: (m.current.offsetWidth + 8) * (Math.floor(C / (m.current.offsetWidth + 8)) - 1),
|
25458
25461
|
top: 0,
|
25459
25462
|
behavior: "smooth"
|
@@ -25462,7 +25465,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25462
25465
|
m.current && f(m.current.scrollLeft);
|
25463
25466
|
}, O = () => {
|
25464
25467
|
if (!T || !E) return;
|
25465
|
-
T - E > W0 ?
|
25468
|
+
T - E > W0 ? I(Yt.ON_CAROUSEL_FORWARD_SWIPE) : I(Yt.ON_CAROUSEL_BACK_SWIPE);
|
25466
25469
|
}, M = ($) => {
|
25467
25470
|
b($.targetTouches[0].clientX);
|
25468
25471
|
}, Z = ($) => {
|
@@ -25788,7 +25791,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25788
25791
|
useDarkMode: T,
|
25789
25792
|
userHasFullInsightFeedBeats: w,
|
25790
25793
|
variant: v,
|
25791
|
-
widthOverrides:
|
25794
|
+
widthOverrides: I
|
25792
25795
|
}) => {
|
25793
25796
|
const R = tt(), [D, H] = Et("STANDARD"), [O, M] = Et(!1), Z = Tu([d], fn), U = Au([_], fn);
|
25794
25797
|
g.useEffect(() => {
|
@@ -25807,7 +25810,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25807
25810
|
showIcon: f,
|
25808
25811
|
showWithMargin: E,
|
25809
25812
|
useDarkMode: T,
|
25810
|
-
widthOverrides:
|
25813
|
+
widthOverrides: I
|
25811
25814
|
}, fe = {
|
25812
25815
|
carouselSize: D,
|
25813
25816
|
variant: v,
|
@@ -25817,7 +25820,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25817
25820
|
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
25818
25821
|
/* @__PURE__ */ l(Yl, { theme: R, children: [
|
25819
25822
|
/* @__PURE__ */ t(au, {}),
|
25820
|
-
/* @__PURE__ */ t(O0, { onEvent: Z, onPageview: U, store: fn, children: /* @__PURE__ */ l(Z0, { heightOverrides: r, widthOverrides:
|
25823
|
+
/* @__PURE__ */ t(O0, { onEvent: Z, onPageview: U, store: fn, children: /* @__PURE__ */ l(Z0, { heightOverrides: r, widthOverrides: I, children: [
|
25821
25824
|
(e || !fn.isInitialized) && /* @__PURE__ */ t(Q0, {}),
|
25822
25825
|
O && C && /* @__PURE__ */ t(
|
25823
25826
|
q0,
|
@@ -25825,7 +25828,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25825
25828
|
clientColorScheme: i,
|
25826
25829
|
onCardClick: c,
|
25827
25830
|
posthog: u,
|
25828
|
-
widthOverrides:
|
25831
|
+
widthOverrides: I
|
25829
25832
|
}
|
25830
25833
|
),
|
25831
25834
|
O && !!n.length && /* @__PURE__ */ t(
|
@@ -25843,7 +25846,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25843
25846
|
] }) })
|
25844
25847
|
] })
|
25845
25848
|
);
|
25846
|
-
},
|
25849
|
+
}, x4 = A(J0), eb = ({
|
25847
25850
|
isActiveCard: e,
|
25848
25851
|
ariaLabel: n,
|
25849
25852
|
clientColorScheme: i,
|
@@ -25887,7 +25890,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25887
25890
|
}
|
25888
25891
|
);
|
25889
25892
|
}, tb = A(eb), nb = A(({ repeatingTransaction: e }) => {
|
25890
|
-
const { recurring: n } =
|
25893
|
+
const { recurring: n } = x(), { updateRepeatingTransaction: i } = Pt(), { onEvent: a } = z(), [o, r] = g.useState(!1), s = e.repeating_transaction_type === ln.Income, c = [
|
25891
25894
|
{ id: Ne.EveryWeek, label: n.frequency_every_week },
|
25892
25895
|
{ id: Ne.EveryOtherWeek, label: n.frequency_every_other_week },
|
25893
25896
|
{ id: Ne.EveryMonth, label: n.frequency_every_month },
|
@@ -25942,7 +25945,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25942
25945
|
)
|
25943
25946
|
] });
|
25944
25947
|
}), ib = A(({ repeatingTransaction: e }) => {
|
25945
|
-
const { recurring: n } =
|
25948
|
+
const { recurring: n } = x(), { updateRepeatingTransaction: i } = Pt(), { onEvent: a } = z(), o = Mi(e.predicted_occurs_on), [r, s] = g.useState(!1), [c, d] = g.useState(o), _ = e.repeating_transaction_type === ln.Income, u = () => {
|
25946
25949
|
d(o), s(!0), a(
|
25947
25950
|
_ ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
25948
25951
|
{
|
@@ -25986,7 +25989,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
25986
25989
|
] });
|
25987
25990
|
}), gl = A(
|
25988
25991
|
({ onDeleted: e, recurringTransaction: n }) => {
|
25989
|
-
const { recurring: i } =
|
25992
|
+
const { recurring: i } = x(), { selectedAccountGuids: a } = ue(), { onEvent: o } = z(), { deleteRepeatingTransaction: r } = Pt(), { setFilter: s } = Te(), { amount: c, description: d, merchant_guid: _ } = n, [u, h] = g.useState(!1), [m, C] = g.useState("");
|
25990
25993
|
g.useEffect(() => {
|
25991
25994
|
s({
|
25992
25995
|
accounts: a,
|
@@ -26092,7 +26095,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26092
26095
|
), ml = A(
|
26093
26096
|
({ onClick: e = () => {
|
26094
26097
|
}, repeatingTransaction: n }) => {
|
26095
|
-
const { recurring: i } =
|
26098
|
+
const { recurring: i } = x(), [a, o] = g.useState(!1), r = g.useMemo(
|
26096
26099
|
() => n.transactions.length === 0 ? "" : n.transactions[0].category_guid || "",
|
26097
26100
|
[n]
|
26098
26101
|
), s = n.account?.institutionName || "", c = n.repeating_transaction_type === ln.Income, d = go(
|
@@ -26189,7 +26192,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26189
26192
|
onSearch: i,
|
26190
26193
|
onSelected: a
|
26191
26194
|
}) => {
|
26192
|
-
const { recurring: o } =
|
26195
|
+
const { recurring: o } = x(), { searchValue: r, setSearchValue: s } = xt();
|
26193
26196
|
return /* @__PURE__ */ l(y, { sx: { bgcolor: e, gap: 16, pt: 8 }, children: [
|
26194
26197
|
n && /* @__PURE__ */ t(Oe, { sx: { mx: 24 }, children: n }),
|
26195
26198
|
/* @__PURE__ */ t(
|
@@ -26217,7 +26220,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26217
26220
|
onNextDateChange: r,
|
26218
26221
|
transaction: s
|
26219
26222
|
}) => {
|
26220
|
-
const { recurring: c } =
|
26223
|
+
const { recurring: c } = x(), d = [
|
26221
26224
|
{ id: Ne.EveryWeek, label: c.frequency_every_week },
|
26222
26225
|
{ id: Ne.EveryOtherWeek, label: c.frequency_every_other_week },
|
26223
26226
|
{ id: Ne.EveryMonth, label: c.frequency_every_month },
|
@@ -26260,7 +26263,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26260
26263
|
return /* @__PURE__ */ l(y, { bgcolor: e, gap: 24, height: "100%", children: [
|
26261
26264
|
/* @__PURE__ */ l(y, { children: [
|
26262
26265
|
/* @__PURE__ */ t(va, { bgcolor: e, children: Hi(s.date) }),
|
26263
|
-
/* @__PURE__ */ t(
|
26266
|
+
/* @__PURE__ */ t(Ia, { transaction: s })
|
26264
26267
|
] }),
|
26265
26268
|
/* @__PURE__ */ t(p, { bold: !0, sx: { mx: 24 }, variant: "Body", children: i ? c.income_schedule : c.expense_schedule }),
|
26266
26269
|
/* @__PURE__ */ t(
|
@@ -26298,8 +26301,8 @@ const Vi = g.createContext(null), O0 = ({
|
|
26298
26301
|
label: n,
|
26299
26302
|
onAddRecurringTransaction: i = () => null
|
26300
26303
|
}) => {
|
26301
|
-
const { recurring: a } =
|
26302
|
-
() => s.find((
|
26304
|
+
const { recurring: a } = x(), { filter: o, setFilter: r, transactions: s } = Te(), { addRepeatingTransaction: c } = Pt(), [d, _] = g.useState(!1), [u, h] = g.useState(""), [m, C] = g.useState(Ne.EveryMonth), [f, E] = g.useState(null), b = g.useMemo(
|
26305
|
+
() => s.find((I) => I.guid === u),
|
26303
26306
|
[u]
|
26304
26307
|
), T = () => {
|
26305
26308
|
_(!0), r(e ? { ...o, custom: jn } : { ...o, custom: Ni });
|
@@ -26309,7 +26312,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26309
26312
|
return;
|
26310
26313
|
}
|
26311
26314
|
i();
|
26312
|
-
const
|
26315
|
+
const I = {
|
26313
26316
|
account_guid: b.account_guid,
|
26314
26317
|
amount: b.amount,
|
26315
26318
|
merchant_guid: b.merchant_guid,
|
@@ -26320,7 +26323,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26320
26323
|
repeating_transaction_type: e ? ln.Income : ln.Bill,
|
26321
26324
|
transaction_type: b.transaction_type
|
26322
26325
|
};
|
26323
|
-
(m === Ne.EveryWeek || m === Ne.EveryOtherWeek) && (
|
26326
|
+
(m === Ne.EveryWeek || m === Ne.EveryOtherWeek) && (I.recurrence_day = ai(f)), await c(I, b), v();
|
26324
26327
|
}, v = () => {
|
26325
26328
|
h(""), _(!1);
|
26326
26329
|
};
|
@@ -26344,13 +26347,13 @@ const Vi = g.createContext(null), O0 = ({
|
|
26344
26347
|
ab,
|
26345
26348
|
{
|
26346
26349
|
description: e ? a.add_income_description : a.add_expense_description,
|
26347
|
-
onSearch: (
|
26350
|
+
onSearch: (I) => {
|
26348
26351
|
r({
|
26349
26352
|
...o,
|
26350
|
-
custom: (R) => e ?
|
26353
|
+
custom: (R) => e ? I ? Go(R, I) : jn(R) : I ? wc(R, I) : Ni(R)
|
26351
26354
|
});
|
26352
26355
|
},
|
26353
|
-
onSelected: (
|
26356
|
+
onSelected: (I) => h(I)
|
26354
26357
|
}
|
26355
26358
|
)
|
26356
26359
|
}
|
@@ -26379,7 +26382,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26379
26382
|
] });
|
26380
26383
|
}
|
26381
26384
|
), rb = A(() => {
|
26382
|
-
const { recurring: e } =
|
26385
|
+
const { recurring: e } = x(), { repeatingTransactions: n } = Pt(), { onEvent: i } = z(), a = (r) => {
|
26383
26386
|
i(W.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
26384
26387
|
repeating_transaction_guid: r.guid
|
26385
26388
|
});
|
@@ -26394,7 +26397,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26394
26397
|
/* @__PURE__ */ t(pl, { label: e.add_expense, onAddRecurringTransaction: o })
|
26395
26398
|
] });
|
26396
26399
|
}), sb = A(() => {
|
26397
|
-
const { recurring: e } =
|
26400
|
+
const { recurring: e } = x(), { repeatingTransactions: n } = Pt(), { onEvent: i } = z(), a = (r) => {
|
26398
26401
|
i(W.RECURRING_TRANSACTIONS_CLICK_INCOME, {
|
26399
26402
|
repeating_transaction_guid: r.guid
|
26400
26403
|
});
|
@@ -26416,7 +26419,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26416
26419
|
)
|
26417
26420
|
] });
|
26418
26421
|
}), cb = A(() => {
|
26419
|
-
const [e, n] = g.useState(0), { onEvent: i } = z(), { recurring: a } =
|
26422
|
+
const [e, n] = g.useState(0), { onEvent: i } = z(), { recurring: a } = x();
|
26420
26423
|
return /* @__PURE__ */ l(L, { bgcolor: "background.default", height: "100%", children: [
|
26421
26424
|
/* @__PURE__ */ l(
|
26422
26425
|
Lt,
|
@@ -26450,7 +26453,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26450
26453
|
}
|
26451
26454
|
) }), qo = ({ isOffset: e = !1, size: n = 16 }) => /* @__PURE__ */ t(Zt, { size: n, sx: { ...Ba(e) }, children: /* @__PURE__ */ t(Ls, { color: "error", filled: !0, sx: { fontSize: n, ...Ga } }) }), Zo = ({ isOffset: e = !1, size: n = 16 }) => /* @__PURE__ */ t(Zt, { size: n, sx: { ...Ba(e) }, children: /* @__PURE__ */ t(ga, { color: "success", filled: !0, sx: { fontSize: n, ...Ga } }) }), lb = A(
|
26452
26455
|
({ day: e, outsideCurrentMonth: n, ...i }) => {
|
26453
|
-
const { recurring: a } =
|
26456
|
+
const { recurring: a } = x(), { selectedAccountGuids: o } = ue(), { recurrences: r, setSelectedDay: s } = Pt(), d = g.useMemo(
|
26454
26457
|
() => r.filter((f) => o.includes(f.accountGuid)),
|
26455
26458
|
[o, r]
|
26456
26459
|
).filter(
|
@@ -26507,7 +26510,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26507
26510
|
/* @__PURE__ */ t(e, {}),
|
26508
26511
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: n })
|
26509
26512
|
] }), db = A(() => {
|
26510
|
-
const { recurring: e } =
|
26513
|
+
const { recurring: e } = x();
|
26511
26514
|
return /* @__PURE__ */ l(
|
26512
26515
|
y,
|
26513
26516
|
{
|
@@ -26622,7 +26625,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26622
26625
|
},
|
26623
26626
|
showOrdinal: a = !1
|
26624
26627
|
}) => {
|
26625
|
-
const { recurring: o } =
|
26628
|
+
const { recurring: o } = x(), { repeatingTransactions: r } = Pt(), [s, c] = g.useState(!1), d = g.useMemo(
|
26626
26629
|
() => r.find((E) => E.guid === e.repeatingTransactionGuid),
|
26627
26630
|
[e]
|
26628
26631
|
), _ = e.type === Xt.Income, u = e.status === at.Paid, h = e.status === at.Missed, m = e.status === at.Upcoming;
|
@@ -26716,7 +26719,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26716
26719
|
sx: o = {},
|
26717
26720
|
title: r
|
26718
26721
|
}) => {
|
26719
|
-
const { recurring: s } =
|
26722
|
+
const { recurring: s } = x(), c = g.useMemo(() => KC(e), [e]);
|
26720
26723
|
return /* @__PURE__ */ l(y, { sx: { gap: 8, mt: 4, ...o }, children: [
|
26721
26724
|
r && /* @__PURE__ */ l(
|
26722
26725
|
y,
|
@@ -26760,7 +26763,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26760
26763
|
}
|
26761
26764
|
), As = A(
|
26762
26765
|
({ title: e, expected: n, paid: i, missed: a, total: o, onNewClick: r }) => {
|
26763
|
-
const s = ge(), { recurring: c } =
|
26766
|
+
const s = ge(), { recurring: c } = x(), d = g.useMemo(() => {
|
26764
26767
|
const _ = [{ color: s.palette.success.main, percentage: `${i / n}` }];
|
26765
26768
|
return a && _.push({ color: s.palette.error.main, percentage: `${a / n}` }), _;
|
26766
26769
|
}, [i, n, a]);
|
@@ -26787,7 +26790,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26787
26790
|
] });
|
26788
26791
|
}
|
26789
26792
|
), hb = A(() => {
|
26790
|
-
const { recurring: e } =
|
26793
|
+
const { recurring: e } = x(), { isMobile: n, isSmallTablet: i } = Ee(), { onEvent: a } = z(), {
|
26791
26794
|
expenses: o,
|
26792
26795
|
expenseTotal: r,
|
26793
26796
|
income: s,
|
@@ -26799,15 +26802,15 @@ const Vi = g.createContext(null), O0 = ({
|
|
26799
26802
|
selectedDay: m,
|
26800
26803
|
selectedDayRecurrences: C,
|
26801
26804
|
upcomingRecurrences: f
|
26802
|
-
} = Pt(), [E, b] = g.useState(0), T = (
|
26805
|
+
} = Pt(), [E, b] = g.useState(0), T = (I, R) => {
|
26803
26806
|
b(R);
|
26804
|
-
}, w = (
|
26807
|
+
}, w = (I) => {
|
26805
26808
|
a(W.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
26806
|
-
transaction_guid:
|
26809
|
+
transaction_guid: I.transaction?.guid
|
26807
26810
|
});
|
26808
|
-
}, v = (
|
26811
|
+
}, v = (I) => {
|
26809
26812
|
a(W.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
26810
|
-
transaction_guid:
|
26813
|
+
transaction_guid: I.transaction?.guid
|
26811
26814
|
});
|
26812
26815
|
};
|
26813
26816
|
return /* @__PURE__ */ l(jt, { container: !0, sx: { pt: 16, px: 24, spacing: 24 }, children: [
|
@@ -26885,13 +26888,13 @@ const Vi = g.createContext(null), O0 = ({
|
|
26885
26888
|
)
|
26886
26889
|
] }) })
|
26887
26890
|
] });
|
26888
|
-
}),
|
26889
|
-
const { accounts: i } = ve(), { recurring: a } =
|
26891
|
+
}), I4 = A(({ onBackClick: e, sx: n = {} }) => {
|
26892
|
+
const { accounts: i } = ve(), { recurring: a } = x(), { isCopyLoaded: o, isInitialized: r, selectedAccountGuids: s, setSelectedAccounts: c } = ue(), { isDataLoaded: d, loadRepeatingTransactions: _ } = Pt(), { setFilter: u } = Te(), { onEvent: h } = z(), [m, C] = g.useState(!1);
|
26890
26893
|
return g.useEffect(() => {
|
26891
26894
|
c(i);
|
26892
26895
|
}, [i]), g.useEffect(() => {
|
26893
26896
|
r && (u({
|
26894
|
-
dateRange: { start: _t(_e(), 90), end:
|
26897
|
+
dateRange: { start: _t(_e(), 90), end: In() },
|
26895
26898
|
accounts: s
|
26896
26899
|
}), _().finally());
|
26897
26900
|
}, [r]), o ? /* @__PURE__ */ l(
|
@@ -26932,7 +26935,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
26932
26935
|
}
|
26933
26936
|
) : /* @__PURE__ */ t(he, {});
|
26934
26937
|
}), gb = A(() => {
|
26935
|
-
const { recurring: e } =
|
26938
|
+
const { recurring: e } = x(), { availableWidth: n } = Un(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: o, upcomingRecurrences: r } = Pt(), s = n < 750;
|
26936
26939
|
return /* @__PURE__ */ l(y, { flexDirection: s ? "column" : "row", width: "100%", children: [
|
26937
26940
|
/* @__PURE__ */ t(Cl, {}),
|
26938
26941
|
!s && /* @__PURE__ */ t(k, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
@@ -26952,12 +26955,12 @@ const Vi = g.createContext(null), O0 = ({
|
|
26952
26955
|
] });
|
26953
26956
|
}), v4 = A(
|
26954
26957
|
({ onPrimaryCtaClick: e, sx: n }) => {
|
26955
|
-
const { accounts: i } = ve(), { recurring: a } =
|
26958
|
+
const { accounts: i } = ve(), { recurring: a } = x(), { setFilter: o } = Te(), { isDataLoaded: r, loadRepeatingTransactions: s } = Pt(), { isCopyLoaded: c, isInitialized: d, setSelectedAccounts: _, selectedAccountGuids: u } = ue();
|
26956
26959
|
return g.useEffect(() => {
|
26957
26960
|
d && _(i);
|
26958
26961
|
}, [d]), g.useEffect(() => {
|
26959
26962
|
u.length > 0 && (o({
|
26960
|
-
dateRange: { start: _t(_e(), 90), end:
|
26963
|
+
dateRange: { start: _t(_e(), 90), end: In() },
|
26961
26964
|
accounts: u
|
26962
26965
|
}), s().finally());
|
26963
26966
|
}, [u]), !c || !d ? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ t(
|
@@ -27067,7 +27070,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27067
27070
|
totalLabel: s,
|
27068
27071
|
variant: c = "mini"
|
27069
27072
|
}) => {
|
27070
|
-
const { spending: d } =
|
27073
|
+
const { spending: d } = x(), _ = wn(), { isTablet: u } = Ee(), h = g.useMemo(
|
27071
27074
|
() => o ? e.categoryData.find((E) => E.guid === o) : void 0,
|
27072
27075
|
[o]
|
27073
27076
|
), m = g.useMemo(() => e.donutData.length > 0 ? e.donutData : [{ id: "0", color: _.palette.border.light, value: 100 }], [e, _]), C = () => {
|
@@ -27110,7 +27113,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27110
27113
|
}
|
27111
27114
|
)
|
27112
27115
|
] }) }) });
|
27113
|
-
}, _a = A(pb),
|
27116
|
+
}, _a = A(pb), xs = ({ data: e, onSelected: n, selectedId: i }) => /* @__PURE__ */ t(y, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: e.categoryData.map((a) => /* @__PURE__ */ l(
|
27114
27117
|
y,
|
27115
27118
|
{
|
27116
27119
|
alignItems: "center",
|
@@ -27128,7 +27131,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27128
27131
|
},
|
27129
27132
|
a.guid
|
27130
27133
|
)) }), Cb = () => {
|
27131
|
-
const e = ge(), { spending: n } =
|
27134
|
+
const e = ge(), { spending: n } = x(), { selectedAccounts: i } = ue(), {
|
27132
27135
|
categories: a,
|
27133
27136
|
dateRangeCategoryTotals: o,
|
27134
27137
|
dataRangeTotalsLoaded: r,
|
@@ -27202,7 +27205,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27202
27205
|
}
|
27203
27206
|
),
|
27204
27207
|
/* @__PURE__ */ t(
|
27205
|
-
|
27208
|
+
xs,
|
27206
27209
|
{
|
27207
27210
|
data: m,
|
27208
27211
|
onSelected: E,
|
@@ -27221,11 +27224,11 @@ const Vi = g.createContext(null), O0 = ({
|
|
27221
27224
|
totalLabel: n.total_income
|
27222
27225
|
}
|
27223
27226
|
),
|
27224
|
-
/* @__PURE__ */ t(
|
27227
|
+
/* @__PURE__ */ t(xs, { data: C, onSelected: E, selectedId: d })
|
27225
27228
|
] }) })
|
27226
27229
|
] }) : /* @__PURE__ */ t(he, { height: 250 });
|
27227
27230
|
}, fb = A(Cb), bb = ({ onPrimaryCtaClick: e, sx: n = {} }) => {
|
27228
|
-
const { spending: i } =
|
27231
|
+
const { spending: i } = x(), { isCopyLoaded: a } = ue();
|
27229
27232
|
return a ? /* @__PURE__ */ t(
|
27230
27233
|
Rn,
|
27231
27234
|
{
|
@@ -27243,7 +27246,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27243
27246
|
selectedId: i = "",
|
27244
27247
|
title: a
|
27245
27248
|
}) => {
|
27246
|
-
const { spending: o } =
|
27249
|
+
const { spending: o } = x(), r = e.categoryData.find((s) => s.guid === i);
|
27247
27250
|
return /* @__PURE__ */ l(y, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
27248
27251
|
/* @__PURE__ */ t(p, { bold: !0, sx: { py: 12 }, children: `${a} ${o.by_category}` }),
|
27249
27252
|
/* @__PURE__ */ t(k, { "aria-hidden": "true" }),
|
@@ -27323,7 +27326,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27323
27326
|
selectedId: a,
|
27324
27327
|
title: o
|
27325
27328
|
}) => {
|
27326
|
-
const { isDesktop: r, isMobile: s } = Ee(), { isLoadingCategoryTotals: c } = Ke(), { spending: d } =
|
27329
|
+
const { isDesktop: r, isMobile: s } = Ee(), { isLoadingCategoryTotals: c } = Ke(), { spending: d } = x();
|
27327
27330
|
return /* @__PURE__ */ l(
|
27328
27331
|
y,
|
27329
27332
|
{
|
@@ -27366,7 +27369,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27366
27369
|
]
|
27367
27370
|
}
|
27368
27371
|
);
|
27369
|
-
},
|
27372
|
+
}, Is = A(Sb), Tb = (e) => [
|
27370
27373
|
e.palette.chartMono.chartMono5,
|
27371
27374
|
e.palette.chartMono.chartMono4,
|
27372
27375
|
e.palette.chartMono.chartMono3,
|
@@ -27374,7 +27377,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27374
27377
|
e.palette.chartMono.chartMono1,
|
27375
27378
|
e.palette.chartMono.chartMono6
|
27376
27379
|
], Ab = () => {
|
27377
|
-
const e = wn(), { categories: n, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: a } = Ke(), { spending: o } =
|
27380
|
+
const e = wn(), { categories: n, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: a } = Ke(), { spending: o } = x(), { displayedDateRange: r, selectedAccounts: s, selectedAccountGuids: c } = ue(), { setFilter: d, sortedTransactions: _ } = Te(), [u, h] = g.useState(""), [m, C] = g.useState(0), [f, E] = g.useState(""), [b, T] = g.useState(!1);
|
27378
27381
|
g.useEffect(() => {
|
27379
27382
|
a(
|
27380
27383
|
s,
|
@@ -27388,7 +27391,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27388
27391
|
), v = g.useMemo(
|
27389
27392
|
() => bl(n, i, Tb(e)),
|
27390
27393
|
[n, i]
|
27391
|
-
),
|
27394
|
+
), I = g.useMemo(
|
27392
27395
|
() => _.find((O) => O.guid === f),
|
27393
27396
|
[f]
|
27394
27397
|
), R = (O, M) => {
|
@@ -27449,7 +27452,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27449
27452
|
)
|
27450
27453
|
] }),
|
27451
27454
|
m === 0 && /* @__PURE__ */ t(
|
27452
|
-
|
27455
|
+
Is,
|
27453
27456
|
{
|
27454
27457
|
data: w,
|
27455
27458
|
onSelected: D,
|
@@ -27459,7 +27462,7 @@ const Vi = g.createContext(null), O0 = ({
|
|
27459
27462
|
}
|
27460
27463
|
),
|
27461
27464
|
m === 1 && /* @__PURE__ */ t(
|
27462
|
-
|
27465
|
+
Is,
|
27463
27466
|
{
|
27464
27467
|
data: v,
|
27465
27468
|
onSelected: D,
|
@@ -27482,15 +27485,15 @@ const Vi = g.createContext(null), O0 = ({
|
|
27482
27485
|
ae,
|
27483
27486
|
{
|
27484
27487
|
ariaLabelClose: o.close_drawer_aria,
|
27485
|
-
isOpen: !!
|
27488
|
+
isOpen: !!I,
|
27486
27489
|
onClose: () => E(""),
|
27487
27490
|
title: o.transaction_details_drawer_title,
|
27488
|
-
children:
|
27491
|
+
children: I && /* @__PURE__ */ t(Zn, { transaction: I })
|
27489
27492
|
}
|
27490
27493
|
)
|
27491
27494
|
] });
|
27492
|
-
},
|
27493
|
-
const { visibleAccounts: i } = ve(), { spending: a } =
|
27495
|
+
}, xb = A(Ab), Ib = ({ onBackClick: e, sx: n = {} }) => {
|
27496
|
+
const { visibleAccounts: i } = ve(), { spending: a } = x(), { isCopyLoaded: o, isInitialized: r, setDisplayedDate: s, setSelectedAccounts: c } = ue(), { onEvent: d } = z(), [_, u] = g.useState(!1);
|
27494
27497
|
g.useEffect(() => {
|
27495
27498
|
c(i);
|
27496
27499
|
}, [i]), g.useEffect(() => {
|
@@ -27508,10 +27511,10 @@ const Vi = g.createContext(null), O0 = ({
|
|
27508
27511
|
onBackClick: e,
|
27509
27512
|
sx: n,
|
27510
27513
|
title: a.title,
|
27511
|
-
children: /* @__PURE__ */ t(L, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(
|
27514
|
+
children: /* @__PURE__ */ t(L, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(xb, {}) })
|
27512
27515
|
}
|
27513
27516
|
);
|
27514
|
-
}, N4 = A(
|
27517
|
+
}, N4 = A(Ib), vb = (e) => Gn[e] ?? Gn.default, wb = (e) => Sa[e];
|
27515
27518
|
function Nb(e, n) {
|
27516
27519
|
const i = [], a = new Date(e);
|
27517
27520
|
for (; a <= n; ) {
|
@@ -27550,7 +27553,7 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27550
27553
|
const n = e.row[e.field];
|
27551
27554
|
return /* @__PURE__ */ t(y, { alignItems: "flex-end", tabIndex: e.tabIndex, children: /* @__PURE__ */ t(ze, { amount: n, variant: "Small" }) });
|
27552
27555
|
}, Mb = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
27553
|
-
const { categories: i } =
|
27556
|
+
const { categories: i } = x(), a = Sa[e];
|
27554
27557
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
27555
27558
|
/* @__PURE__ */ t(
|
27556
27559
|
L,
|
@@ -27615,7 +27618,7 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27615
27618
|
(E) => E.category_guid === i || E.top_level_category_guid === i
|
27616
27619
|
) : e).reduce(
|
27617
27620
|
(E, b) => {
|
27618
|
-
const { category_guid: T, top_level_category_guid: w, month: v, total:
|
27621
|
+
const { category_guid: T, top_level_category_guid: w, month: v, total: I, year: R } = b, D = i ? T : w;
|
27619
27622
|
E[D] || (E[D] = {
|
27620
27623
|
id: D,
|
27621
27624
|
category: D,
|
@@ -27623,7 +27626,7 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27623
27626
|
top_level_category_guid: w
|
27624
27627
|
});
|
27625
27628
|
const H = re(new Date(R, v - 1), ie.MONTH_SHORT);
|
27626
|
-
return E[D][H] || (E[D][H] = 0), E[D][H] = E[D][H] +
|
27629
|
+
return E[D][H] || (E[D][H] = 0), E[D][H] = E[D][H] + I, E;
|
27627
27630
|
},
|
27628
27631
|
{}
|
27629
27632
|
);
|
@@ -27657,7 +27660,7 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27657
27660
|
isOpen: i,
|
27658
27661
|
onClose: a
|
27659
27662
|
}) => {
|
27660
|
-
const { onEvent: o } = z(), { selectedAccountGuids: r } = ue(), { common: s } =
|
27663
|
+
const { onEvent: o } = z(), { selectedAccountGuids: r } = ue(), { common: s } = x(), { setFilter: c, sortedTransactions: d } = Te(), [_, u] = g.useState(""), h = g.useMemo(() => d.find((C) => C.guid === _), [_]);
|
27661
27664
|
g.useEffect(() => {
|
27662
27665
|
c({
|
27663
27666
|
accounts: r,
|
@@ -27684,7 +27687,7 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27684
27687
|
}, $b = A(Hb), Fb = {
|
27685
27688
|
view_transactions: "View Transactions"
|
27686
27689
|
}, Wb = ({ onBackClick: e, sx: n }) => {
|
27687
|
-
const i = tt(), { onEvent: a } = z(), { isDesktop: o, isTablet: r, isMobile: s } = Ee(), { visibleAccounts: c } = ve(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: _, getCategoryName: u } = Ke(), { sortedTransactions: h } = Te(), { isCopyLoaded: m, isInitialized: C, selectedAccounts: f, setSelectedAccounts: E } = ue(), { trends: b } =
|
27690
|
+
const i = tt(), { onEvent: a } = z(), { isDesktop: o, isTablet: r, isMobile: s } = Ee(), { visibleAccounts: c } = ve(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: _, getCategoryName: u } = Ke(), { sortedTransactions: h } = Te(), { isCopyLoaded: m, isInitialized: C, selectedAccounts: f, setSelectedAccounts: E } = ue(), { trends: b } = x(), T = i.palette.mode === "dark", [w, v] = g.useState(!1), [I, R] = g.useState(!1), [D, H] = g.useState("Chart"), [O, M] = g.useState(""), [Z, U] = g.useState({
|
27688
27691
|
start: dr(je(qt(/* @__PURE__ */ new Date(), 6)), 1),
|
27689
27692
|
end: je(/* @__PURE__ */ new Date())
|
27690
27693
|
});
|
@@ -27864,7 +27867,7 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27864
27867
|
{
|
27865
27868
|
categoryGuid: O,
|
27866
27869
|
dateRange: Z,
|
27867
|
-
isOpen:
|
27870
|
+
isOpen: I,
|
27868
27871
|
onClose: () => R(!1)
|
27869
27872
|
}
|
27870
27873
|
)
|
@@ -27872,9 +27875,9 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27872
27875
|
}
|
27873
27876
|
);
|
27874
27877
|
}, D4 = A(Wb), Ub = () => {
|
27875
|
-
const e = tt(), { monthlyCategoryTotals: n } = Ke(), { trends: i } =
|
27878
|
+
const e = tt(), { monthlyCategoryTotals: n } = Ke(), { trends: i } = x(), a = Im(n);
|
27876
27879
|
return /* @__PURE__ */ t(
|
27877
|
-
|
27880
|
+
xo,
|
27878
27881
|
{
|
27879
27882
|
baseline: "min",
|
27880
27883
|
colors: [e.palette.primary.main],
|
@@ -27888,7 +27891,7 @@ const Db = (e) => e.reduce((i, a) => {
|
|
27888
27891
|
}
|
27889
27892
|
);
|
27890
27893
|
}, Vb = A(Ub), Kb = ({ onPrimaryCtaClick: e, sx: n }) => {
|
27891
|
-
const { loadMonthlyCategoryTotals: i, monthlyTotalsLoaded: a } = Ke(), { isInitialized: o } =
|
27894
|
+
const { loadMonthlyCategoryTotals: i, monthlyTotalsLoaded: a } = Ke(), { isInitialized: o } = xa(), { trends: r } = x(), { isCopyLoaded: s, selectedAccounts: c } = ue();
|
27892
27895
|
return g.useEffect(() => {
|
27893
27896
|
o && i(c).finally();
|
27894
27897
|
}, [o, c]), s ? /* @__PURE__ */ t(
|
@@ -27968,7 +27971,7 @@ export {
|
|
27968
27971
|
mp as DebtsStore,
|
27969
27972
|
op as DebtsTable,
|
27970
27973
|
s4 as DebtsWidget,
|
27971
|
-
|
27974
|
+
xC as DeviceTab,
|
27972
27975
|
Be as Dialog,
|
27973
27976
|
ic as Donut,
|
27974
27977
|
ae as Drawer,
|
@@ -27976,7 +27979,7 @@ export {
|
|
27976
27979
|
Us as ErrorStatuses,
|
27977
27980
|
L_ as ExpenseStatus,
|
27978
27981
|
ot as Fetch,
|
27979
|
-
|
27982
|
+
It as FieldType,
|
27980
27983
|
Ne as Frequency,
|
27981
27984
|
Ei as GlobalCopyApi,
|
27982
27985
|
u_ as GlobalCopyStore,
|
@@ -27993,12 +27996,12 @@ export {
|
|
27993
27996
|
Eo as INCOME_ACCOUNT_TYPES,
|
27994
27997
|
Zt as IconBacking,
|
27995
27998
|
ca as InformationTooltip,
|
27996
|
-
|
27999
|
+
x4 as InsightsMicroWidget,
|
27997
28000
|
O0 as InsightsMicroWidgetDataProvider,
|
27998
28001
|
S4 as InvestmentsWidget,
|
27999
28002
|
hu as IterationItemTypes,
|
28000
28003
|
F2 as LOADING_STATUS,
|
28001
|
-
|
28004
|
+
xo as LineChart,
|
28002
28005
|
on as ListItemAction,
|
28003
28006
|
d_ as ListItemWrapper,
|
28004
28007
|
he as Loader,
|
@@ -28045,7 +28048,7 @@ export {
|
|
28045
28048
|
i4 as RecurringActivityWidget,
|
28046
28049
|
v4 as RecurringTransactionsMiniWidget,
|
28047
28050
|
zC as RecurringTransactionsStore,
|
28048
|
-
|
28051
|
+
I4 as RecurringTransactionsWidget,
|
28049
28052
|
ln as RepeatingType,
|
28050
28053
|
Q2 as ResponsiveButton,
|
28051
28054
|
To as SPENDING_ACCOUNT_TYPES,
|
@@ -28053,7 +28056,7 @@ export {
|
|
28053
28056
|
Cr as ScheduledPaymentsApi,
|
28054
28057
|
k_ as ScreenSize,
|
28055
28058
|
Wi as SearchBox,
|
28056
|
-
|
28059
|
+
xr as SelectionBox,
|
28057
28060
|
os as SettingsApi,
|
28058
28061
|
O1 as SettingsStore,
|
28059
28062
|
_4 as SettingsWidget,
|
@@ -28075,7 +28078,7 @@ export {
|
|
28075
28078
|
la as TransactionApi,
|
28076
28079
|
Zn as TransactionDetails,
|
28077
28080
|
mn as TransactionList,
|
28078
|
-
|
28081
|
+
Ia as TransactionRow,
|
28079
28082
|
RC as TransactionRulesTab,
|
28080
28083
|
Do as TransactionStatus,
|
28081
28084
|
B_ as TransactionStore,
|
@@ -28127,8 +28130,8 @@ export {
|
|
28127
28130
|
Aa as useDebtStore,
|
28128
28131
|
z as useEvent,
|
28129
28132
|
ZC as useGetMergeableAccounts,
|
28130
|
-
|
28131
|
-
|
28133
|
+
x as useGlobalCopyStore,
|
28134
|
+
xa as useGlobalStore,
|
28132
28135
|
ue as useGlobalUiStore,
|
28133
28136
|
rt as useGoalStore,
|
28134
28137
|
wo as useHelpStore,
|
@@ -28143,7 +28146,7 @@ export {
|
|
28143
28146
|
Ee as useScreenSize,
|
28144
28147
|
Ht as useSettingsStore,
|
28145
28148
|
Te as useTransactionStore,
|
28146
|
-
|
28149
|
+
xt as useTransactionsUiStore,
|
28147
28150
|
_n as useUserStore,
|
28148
28151
|
Un as useWidgetContainerProvider
|
28149
28152
|
};
|