@mx-cartographer/experiences 6.26.18-alpha.mega4 → 6.26.18-alpha.sms2
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/budgets/index.d.ts +1 -0
- package/dist/common/context/hooks.d.ts +13 -13
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/index.d.ts +22 -0
- package/dist/index.es.js +30336 -0
- package/dist/index.es.js.map +1 -0
- package/package.json +3 -155
- package/dist/Account-DM32_5k9.mjs +0 -30
- package/dist/AccountDetailsContent-B_qRSB8l.mjs +0 -677
- package/dist/AccountDetailsHeader-CAm6ADMq.mjs +0 -119
- package/dist/AccountFields-Bb4pds0q.mjs +0 -135
- package/dist/AccountListItem-G7iAesaO.mjs +0 -90
- package/dist/AccountStore-RSanus_m.mjs +0 -230
- package/dist/Accounts-BfAQRG8R.mjs +0 -9
- package/dist/BeatApi-DLu87ijw.mjs +0 -21
- package/dist/BeatStore-By4aGoRM.mjs +0 -81
- package/dist/BudgetUtil-DcqclhiQ.mjs +0 -101
- package/dist/CashflowStore-D9Dpuz7X.mjs +0 -91
- package/dist/Category-5S6uwuXz.mjs +0 -301
- package/dist/CategorySelectorDrawer-DgrePTRg.mjs +0 -397
- package/dist/CategoryStore-B5EW6I1d.mjs +0 -183
- package/dist/CategoryUtil-DRyruNgi.mjs +0 -78
- package/dist/ConnectDrawer-DPnfeIfn.mjs +0 -508
- package/dist/ConnectionsDrawer-BCzpuNsK.mjs +0 -52
- package/dist/CurrencyInput-DzsPiUsU.mjs +0 -83
- package/dist/CurrencyText-YUhH2caW.mjs +0 -20
- package/dist/DateUtil-BcuH7ErC.mjs +0 -48
- package/dist/DebtsStore-C6VcBnpG.mjs +0 -60
- package/dist/Dialog-CWW597AF.mjs +0 -123
- package/dist/Donut-1UMNcG67.mjs +0 -57
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/EmptyState-Dcb-o2tl.mjs +0 -55
- package/dist/Fetch-CkFKy79O.mjs +0 -116
- package/dist/FinstrongStore-mkALvztw.mjs +0 -101
- package/dist/GoalStore-DyCr4wNc.mjs +0 -263
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/Help-DhcC-C05.mjs +0 -320
- package/dist/Help-toqAK5eD.mjs +0 -3173
- package/dist/IconBacking-B9oC6uL2.mjs +0 -39
- package/dist/InvestmentUtil-jOyOgzIB.mjs +0 -134
- package/dist/LineChart-CQWu5KoO.mjs +0 -403
- package/dist/ListItemAction-Df3OPMOW.mjs +0 -69
- package/dist/Loader-Dp1P2gNw.mjs +0 -14
- package/dist/Localization-2MODESHW.mjs +0 -30
- package/dist/ManageIncome-BVt_XQbo.mjs +0 -535
- package/dist/MerchantStore-DVH-QOf0.mjs +0 -37
- package/dist/MicroWidgetContainer-DaLW43tE.mjs +0 -45
- package/dist/MiniWidgetContainer-BcNPxZt2.mjs +0 -39
- package/dist/NetWorthStore-DE8CQBMM.mjs +0 -150
- package/dist/Notification-AMGWM1Al.mjs +0 -78
- package/dist/NotificationSettings-CPZN0l8X.mjs +0 -667
- package/dist/NotificationStore-DHtSGySy.mjs +0 -67
- package/dist/NumberFormatting-CtWHhyBX.mjs +0 -40
- package/dist/OriginalBalanceAction-s9sUxofR.mjs +0 -115
- package/dist/RecurringSettings-DIEsympT.mjs +0 -57
- package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +0 -263
- package/dist/RepeatingTransaction-BPWfaB3f.mjs +0 -282
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/SettingsStore-CE7jDVFL.mjs +0 -265
- package/dist/SingleSegmentDonut-BgbLgwHi.mjs +0 -69
- package/dist/SpendingData-ByFCw95X.mjs +0 -53
- package/dist/StatusBar-BK_uYHAB.mjs +0 -30
- package/dist/TabContentContainer-j01JYR_7.mjs +0 -21
- package/dist/Transaction-C-5-Iuab.mjs +0 -312
- package/dist/TransactionApi-DbbcjI2L.mjs +0 -86
- package/dist/TransactionDetails-B5qfs9Zh.mjs +0 -1283
- package/dist/TransactionStore-BWi6_2Ny.mjs +0 -669
- package/dist/TrendsStore-Borh98aN.mjs +0 -448
- package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +0 -1959
- package/dist/WidgetContainer-CmGNZW0M.mjs +0 -548
- package/dist/accounts/index.es.js +0 -752
- package/dist/analytics/index.es.js +0 -171
- package/dist/budgets/index.es.js +0 -1070
- package/dist/cashflow/index.es.js +0 -1098
- package/dist/categories/index.es.js +0 -9
- package/dist/common/index.es.js +0 -1451
- package/dist/dashboard/index.es.js +0 -181
- package/dist/debts/index.es.js +0 -1460
- package/dist/exportTransactionsToCSV-j4g8bdVZ.mjs +0 -47
- package/dist/finstrong/index.es.js +0 -1455
- package/dist/goals/index.es.js +0 -1209
- package/dist/help/index.es.js +0 -14
- package/dist/hooks-ClhFlg78.mjs +0 -71
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/index.es.js +0 -4
- package/dist/investments/index.es.js +0 -1638
- package/dist/merchants/index.es.js +0 -79
- package/dist/microinsights/index.es.js +0 -16
- package/dist/networth/index.es.js +0 -542
- package/dist/notifications/index.es.js +0 -192
- package/dist/recurringtransactions/index.es.js +0 -879
- package/dist/settings/index.es.js +0 -879
- package/dist/spending/index.es.js +0 -570
- package/dist/transactions/index.es.js +0 -587
- package/dist/trends/index.es.js +0 -1103
- package/dist/useCombineEvents-DaDBSR_1.mjs +0 -92
- package/dist/useDimensions-27p2evRx.mjs +0 -36
- package/dist/useScreenSize-B6JyS_Lj.mjs +0 -36
package/dist/common/index.es.js
DELETED
|
@@ -1,1451 +0,0 @@
|
|
|
1
|
-
import { G as M } from "../useCombineEvents-DaDBSR_1.mjs";
|
|
2
|
-
import { A as ls, a as us, u as hs, b as gs } from "../useCombineEvents-DaDBSR_1.mjs";
|
|
3
|
-
import { F as y, A as l } from "../Fetch-CkFKy79O.mjs";
|
|
4
|
-
import { B as ms } from "../BeatApi-DLu87ijw.mjs";
|
|
5
|
-
import { C as st } from "../CategoryStore-B5EW6I1d.mjs";
|
|
6
|
-
import { a as ys } from "../CategoryStore-B5EW6I1d.mjs";
|
|
7
|
-
import { N as rt } from "../NotificationStore-DHtSGySy.mjs";
|
|
8
|
-
import { a as Ss } from "../NotificationStore-DHtSGySy.mjs";
|
|
9
|
-
import { T as at } from "../Transaction-C-5-Iuab.mjs";
|
|
10
|
-
import { C as ws, b as xs, L as Cs, a as Ds } from "../Transaction-C-5-Iuab.mjs";
|
|
11
|
-
import { H as ot } from "../Help-DhcC-C05.mjs";
|
|
12
|
-
import { E as As } from "../Help-DhcC-C05.mjs";
|
|
13
|
-
import { M as Ts } from "../MicroWidgetContainer-DaLW43tE.mjs";
|
|
14
|
-
import { M as Is } from "../MiniWidgetContainer-BcNPxZt2.mjs";
|
|
15
|
-
import { A as Fs, D as Ms, W as $s } from "../WidgetContainer-CmGNZW0M.mjs";
|
|
16
|
-
import { i as ks, a as Us, e as Os, l as Ls, A as Gs, f as Hs, j as Ps, d as qs, k as Ws, E as Qs, h as Ys, N as zs, g as Xs, P as Ks, m as js, S as Vs } from "../ConnectDrawer-DPnfeIfn.mjs";
|
|
17
|
-
import { C as Js } from "../CurrencyInput-DzsPiUsU.mjs";
|
|
18
|
-
import { L as er } from "../Loader-Dp1P2gNw.mjs";
|
|
19
|
-
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
20
|
-
import Z, { useRef as nt, useEffect as it } from "react";
|
|
21
|
-
import ct from "@mui/material/Button";
|
|
22
|
-
import dt from "@mui/material/IconButton";
|
|
23
|
-
import lt from "@mui/material/Tooltip";
|
|
24
|
-
import ut from "@mui/material/styles/useTheme";
|
|
25
|
-
import { S as rr } from "../SearchBox-B2_zLv8-.mjs";
|
|
26
|
-
import { T as ht } from "../TransactionStore-BWi6_2Ny.mjs";
|
|
27
|
-
import { S as or } from "../TransactionStore-BWi6_2Ny.mjs";
|
|
28
|
-
import { T as ir } from "../TabContentContainer-j01JYR_7.mjs";
|
|
29
|
-
import { I as dr } from "../IconBacking-B9oC6uL2.mjs";
|
|
30
|
-
import { D as ur, F as hr, a as gr, c as pr, R as mr, S as _r } from "../RepeatingTransaction-BPWfaB3f.mjs";
|
|
31
|
-
import { C as gt } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
32
|
-
import { I as fr } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
33
|
-
import { b as pt } from "../GoalStore-DyCr4wNc.mjs";
|
|
34
|
-
import { C as br, G as wr, M as xr, T as Cr } from "../GoalStore-DyCr4wNc.mjs";
|
|
35
|
-
import { C as vr } from "../CurrencyText-YUhH2caW.mjs";
|
|
36
|
-
import { E as Er } from "../EmptyState-Dcb-o2tl.mjs";
|
|
37
|
-
import { L as Br } from "../ListItemAction-Df3OPMOW.mjs";
|
|
38
|
-
import { A as Nr, B as Fr, I as Mr, N as $r, T as Rr, a as kr } from "../Notification-AMGWM1Al.mjs";
|
|
39
|
-
import { css as w, keyframes as mt } from "@mxenabled/cssinjs";
|
|
40
|
-
import { useTokens as x, Text as B } from "@mxenabled/mxui";
|
|
41
|
-
import { D as Or } from "../Donut-1UMNcG67.mjs";
|
|
42
|
-
import { L as Gr } from "../LineChart-CQWu5KoO.mjs";
|
|
43
|
-
import { T as _t } from "../TrendsStore-Borh98aN.mjs";
|
|
44
|
-
import { S as Pr, u as qr } from "../TrendsStore-Borh98aN.mjs";
|
|
45
|
-
import { S as Qr } from "../StatusBar-BK_uYHAB.mjs";
|
|
46
|
-
import { D as zr, a as Xr, O as Kr, b as jr, f as Vr } from "../Dialog-CWW597AF.mjs";
|
|
47
|
-
import { D as yt, a as ft } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
48
|
-
import { S as Jr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
49
|
-
import { D as ea } from "../Drawer-kEE73B87.mjs";
|
|
50
|
-
import { I as ra, P as aa, S as oa } from "../Account-DM32_5k9.mjs";
|
|
51
|
-
import { c as E } from "../Category-5S6uwuXz.mjs";
|
|
52
|
-
import { a as ia, C as ca, b as da, P as la } from "../Category-5S6uwuXz.mjs";
|
|
53
|
-
import { C as ha, f as ga, b as pa, a as ma, g as _a, i as ya } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
54
|
-
import { R as St } from "../RecurringTransactionsStore-BKLD3OWo.mjs";
|
|
55
|
-
import { S as Sa, T as ba } from "../RecurringTransactionsStore-BKLD3OWo.mjs";
|
|
56
|
-
import { G as xa, A as Ca, B as Da, W as va, c as Aa, j as Ea, e as Ta, t as Ba, k as Ia, x as Na, g as Fa, v as Ma, u as $a, l as Ra, a as ka, i as Ua, y as Oa, s as La, b as Ga, q as Ha, m as Pa, z as qa, f as Wa, r as Qa, n as Ya, w as za, o as Xa, p as Ka } from "../hooks-ClhFlg78.mjs";
|
|
57
|
-
import { u as Va } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
58
|
-
import { makeAutoObservable as _, runInAction as p, reaction as bt } from "mobx";
|
|
59
|
-
import { a as wt } from "../AccountStore-RSanus_m.mjs";
|
|
60
|
-
import xt from "posthog-js";
|
|
61
|
-
import { B as Ct } from "../BeatStore-By4aGoRM.mjs";
|
|
62
|
-
import { endOfMonth as J } from "date-fns/endOfMonth";
|
|
63
|
-
import { startOfMonth as tt } from "date-fns/startOfMonth";
|
|
64
|
-
import { startOfToday as O } from "date-fns/startOfToday";
|
|
65
|
-
import { f as Dt, a as vt, b as L } from "../BudgetUtil-DcqclhiQ.mjs";
|
|
66
|
-
import { g as Ja, e as to, c as eo, d as so, i as ro } from "../BudgetUtil-DcqclhiQ.mjs";
|
|
67
|
-
import { a as At } from "../DebtsStore-C6VcBnpG.mjs";
|
|
68
|
-
import { a as Et } from "../FinstrongStore-mkALvztw.mjs";
|
|
69
|
-
import { A as Tt, m as Bt, a as It, b as Nt } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
70
|
-
import { M as Ft } from "../MerchantStore-DVH-QOf0.mjs";
|
|
71
|
-
import { N as Mt } from "../NetWorthStore-DE8CQBMM.mjs";
|
|
72
|
-
import { a as $t } from "../SettingsStore-CE7jDVFL.mjs";
|
|
73
|
-
import { addMonths as Rt } from "date-fns/addMonths";
|
|
74
|
-
import { getMonth as T } from "date-fns/getMonth";
|
|
75
|
-
import { i as oo } from "../DateUtil-BcuH7ErC.mjs";
|
|
76
|
-
import { b as io, a as co, g as lo } from "../Localization-2MODESHW.mjs";
|
|
77
|
-
import { alpha as kt, lighten as G, darken as H } from "@mui/material";
|
|
78
|
-
var Ut = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.EveryWeek = 1] = "EveryWeek", s[s.EveryOtherWeek = 2] = "EveryOtherWeek", s[s.EveryMonth = 3] = "EveryMonth", s[s.EveryOtherMonth = 4] = "EveryOtherMonth", s[s.EveryQuarter = 5] = "EveryQuarter", s[s.EveryOtherQuarter = 6] = "EveryOtherQuarter", s[s.EveryYear = 7] = "EveryYear", s))(Ut || {});
|
|
79
|
-
const Ze = [
|
|
80
|
-
{ id: 0, copy: "frequency_unknown" },
|
|
81
|
-
{ id: 1, copy: "frequency_every_week" },
|
|
82
|
-
{ id: 2, copy: "frequency_every_other_week" },
|
|
83
|
-
{ id: 3, copy: "frequency_every_month" },
|
|
84
|
-
{ id: 4, copy: "frequency_every_other_month" },
|
|
85
|
-
{ id: 5, copy: "frequency_every_quarter" },
|
|
86
|
-
{ id: 6, copy: "frequency_every_other_quarter" },
|
|
87
|
-
{ id: 7, copy: "frequency_every_year" }
|
|
88
|
-
], Je = {
|
|
89
|
-
ERROR: "ERROR",
|
|
90
|
-
LOADING: "LOADING",
|
|
91
|
-
SUCCESS: "SUCCESS"
|
|
92
|
-
};
|
|
93
|
-
var Ot = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))(Ot || {}), Lt = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(Lt || {});
|
|
94
|
-
const ts = (s, t) => {
|
|
95
|
-
const e = s.palette.mode === "dark", r = (d, c) => {
|
|
96
|
-
const i = t?.[d];
|
|
97
|
-
return {
|
|
98
|
-
lighter: i ? G(i, 0.5) : c.lighter,
|
|
99
|
-
light: i ? G(i, 0.25) : c.light,
|
|
100
|
-
main: i || c.main,
|
|
101
|
-
dark: i ? H(i, 0.25) : c.dark,
|
|
102
|
-
darker: i ? H(i, 0.5) : c.darker
|
|
103
|
-
};
|
|
104
|
-
}, a = {
|
|
105
|
-
primary: r(e ? "primary_color_dark" : "primary_color", s.palette.primary),
|
|
106
|
-
secondary: r(e ? "neutral_color_dark" : "neutral_color", s.palette.secondary),
|
|
107
|
-
error: r(e ? "error_color_dark" : "error_color", s.palette.error),
|
|
108
|
-
warning: r(e ? "warning_color_dark" : "warning_color", s.palette.warning),
|
|
109
|
-
info: r(e ? "info_color_dark" : "info_color", s.palette.info),
|
|
110
|
-
success: r(e ? "success_color_dark" : "success_color", s.palette.success)
|
|
111
|
-
}, o = {
|
|
112
|
-
MuiTabs: {
|
|
113
|
-
styleOverrides: {
|
|
114
|
-
indicator: {
|
|
115
|
-
backgroundColor: a.primary.light
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
MuiPickersCalendarHeader: {
|
|
120
|
-
styleOverrides: {
|
|
121
|
-
switchViewButton: {
|
|
122
|
-
color: a.primary.lighter,
|
|
123
|
-
"&:hover": {
|
|
124
|
-
backgroundColor: kt(a.primary.light, 0.1)
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
...t?.button_corner_radius ? {
|
|
130
|
-
MuiButton: {
|
|
131
|
-
styleOverrides: {
|
|
132
|
-
root: {
|
|
133
|
-
borderRadius: `${t.button_corner_radius}px`
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
} : {},
|
|
138
|
-
...t?.card_corner_radius ? {
|
|
139
|
-
MuiCard: {
|
|
140
|
-
styleOverrides: {
|
|
141
|
-
root: {
|
|
142
|
-
borderRadius: `${t.card_corner_radius}px`
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
MuiPaper: {
|
|
147
|
-
styleOverrides: {
|
|
148
|
-
root: {
|
|
149
|
-
borderRadius: `${t.card_corner_radius}px`
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
} : {}
|
|
154
|
-
};
|
|
155
|
-
return {
|
|
156
|
-
typography: {
|
|
157
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily,
|
|
158
|
-
H1: {
|
|
159
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
160
|
-
},
|
|
161
|
-
h1: {
|
|
162
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
163
|
-
},
|
|
164
|
-
H2: {
|
|
165
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
166
|
-
},
|
|
167
|
-
h2: {
|
|
168
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
169
|
-
},
|
|
170
|
-
H3: {
|
|
171
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
172
|
-
},
|
|
173
|
-
h3: {
|
|
174
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
175
|
-
},
|
|
176
|
-
Body: {
|
|
177
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
178
|
-
},
|
|
179
|
-
body1: {
|
|
180
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
181
|
-
},
|
|
182
|
-
Small: {
|
|
183
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
184
|
-
},
|
|
185
|
-
body2: {
|
|
186
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
187
|
-
},
|
|
188
|
-
Button: {
|
|
189
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
190
|
-
},
|
|
191
|
-
button: {
|
|
192
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
193
|
-
},
|
|
194
|
-
XSmall: {
|
|
195
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
196
|
-
},
|
|
197
|
-
caption: {
|
|
198
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
199
|
-
},
|
|
200
|
-
Paragraph: {
|
|
201
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
202
|
-
},
|
|
203
|
-
subtitle1: {
|
|
204
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
205
|
-
},
|
|
206
|
-
ParagraphSmall: {
|
|
207
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
208
|
-
},
|
|
209
|
-
subtitle2: {
|
|
210
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
211
|
-
},
|
|
212
|
-
Tiny: {
|
|
213
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
214
|
-
},
|
|
215
|
-
tiny: {
|
|
216
|
-
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
palette: a,
|
|
220
|
-
components: o,
|
|
221
|
-
shape: {
|
|
222
|
-
borderRadius: t?.button_corner_radius ?? s.shape.borderRadius
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
class P {
|
|
227
|
-
fetchInstance;
|
|
228
|
-
constructor(t) {
|
|
229
|
-
this.fetchInstance = new y(t, "", {
|
|
230
|
-
Accept: "application/json",
|
|
231
|
-
"Content-Type": "application/json"
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
getBanner = async (t) => {
|
|
235
|
-
try {
|
|
236
|
-
const e = `/banner/${t}/account_widget_banner`;
|
|
237
|
-
return this.fetchInstance?.get(e).then((r) => r.banner) ?? {};
|
|
238
|
-
} catch (e) {
|
|
239
|
-
return console.error("Error fetching banner:", e), null;
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
class es {
|
|
244
|
-
fetchInstance;
|
|
245
|
-
constructor(t, e) {
|
|
246
|
-
this.fetchInstance = new y(t, e);
|
|
247
|
-
}
|
|
248
|
-
getLocalizedCopy = async (t) => this.fetchInstance.post(l.LOCALIZED_COPY, t).then((e) => e);
|
|
249
|
-
getLocalizedContent = async (t) => this.fetchInstance.post(`${l.LOCALIZED_CONTENT}/${t}`).then((e) => e);
|
|
250
|
-
}
|
|
251
|
-
class ss {
|
|
252
|
-
fetchInstance;
|
|
253
|
-
constructor(t, e) {
|
|
254
|
-
this.fetchInstance = new y(t, e);
|
|
255
|
-
}
|
|
256
|
-
addScheduledPayment = async (t) => this.fetchInstance.post(l.SCHEDULED_PAYMENTS, {
|
|
257
|
-
...t,
|
|
258
|
-
is_recurring: "true",
|
|
259
|
-
transaction_type: at.DEBIT
|
|
260
|
-
}).then((e) => e.scheduled_payment);
|
|
261
|
-
getScheduledPayments = async () => this.fetchInstance.get(l.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
|
|
262
|
-
updateScheduledPayment = async (t) => this.fetchInstance.put(`${l.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
|
|
263
|
-
deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${l.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
|
|
264
|
-
}
|
|
265
|
-
class $ {
|
|
266
|
-
fetchInstance;
|
|
267
|
-
constructor(t, e) {
|
|
268
|
-
this.fetchInstance = new y(t, e);
|
|
269
|
-
}
|
|
270
|
-
getUserFeatures = async () => this.fetchInstance.get(l.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
|
|
271
|
-
updateUser = async (t) => this.fetchInstance.put(l.USER, t).then((e) => e.user);
|
|
272
|
-
updateUserProfile = async (t) => this.fetchInstance.put(`${l.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
|
|
273
|
-
}
|
|
274
|
-
class q {
|
|
275
|
-
fetchInstance;
|
|
276
|
-
constructor(t, e) {
|
|
277
|
-
this.fetchInstance = new y(t, e);
|
|
278
|
-
}
|
|
279
|
-
requestWidgetUrl = async (t) => this.fetchInstance.post(l.WIDGET_URLS, t).then((e) => e.widget_url);
|
|
280
|
-
}
|
|
281
|
-
const rs = (s) => {
|
|
282
|
-
const t = nt();
|
|
283
|
-
return it(() => {
|
|
284
|
-
t.current = s;
|
|
285
|
-
}, [s]), t.current;
|
|
286
|
-
}, Gt = ({ color: s, labelAverage: t, labelMain: e }) => {
|
|
287
|
-
const r = x(), a = Ht(r, s);
|
|
288
|
-
return /* @__PURE__ */ m("div", { className: `mx-cmn-bar-chart-legend ${a}`, children: [
|
|
289
|
-
/* @__PURE__ */ n("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
|
|
290
|
-
/* @__PURE__ */ n(B, { variant: "XSmall", children: e }),
|
|
291
|
-
/* @__PURE__ */ m("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
|
|
292
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
|
|
293
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
|
|
294
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-dot" })
|
|
295
|
-
] }),
|
|
296
|
-
/* @__PURE__ */ n(B, { variant: "XSmall", children: t })
|
|
297
|
-
] });
|
|
298
|
-
}, Ht = (s, t) => w({
|
|
299
|
-
alignItems: "center",
|
|
300
|
-
display: "flex",
|
|
301
|
-
gap: s.Spacing.XSmall,
|
|
302
|
-
justifyContent: "flex-end",
|
|
303
|
-
marginRight: s.Spacing.XLarge,
|
|
304
|
-
paddingBottom: s.Spacing.XSmall,
|
|
305
|
-
width: "100%",
|
|
306
|
-
"& .mx-cmn-color-square": {
|
|
307
|
-
backgroundColor: t,
|
|
308
|
-
height: 6,
|
|
309
|
-
width: 6
|
|
310
|
-
},
|
|
311
|
-
"& .mx-cmn-triple-dot": {
|
|
312
|
-
display: "flex",
|
|
313
|
-
gap: 1
|
|
314
|
-
},
|
|
315
|
-
"& .mx-cmn-dot": {
|
|
316
|
-
backgroundColor: s.Color.Neutral500,
|
|
317
|
-
height: 3,
|
|
318
|
-
width: 3,
|
|
319
|
-
borderRadius: 1.5
|
|
320
|
-
},
|
|
321
|
-
"& > .kyper-text": {
|
|
322
|
-
marginRight: s.Spacing.XSmall
|
|
323
|
-
}
|
|
324
|
-
}), W = ({
|
|
325
|
-
ariaLabel: s,
|
|
326
|
-
color: t,
|
|
327
|
-
height: e,
|
|
328
|
-
index: r,
|
|
329
|
-
label: a,
|
|
330
|
-
onClick: o,
|
|
331
|
-
selectedIndex: d,
|
|
332
|
-
value: c
|
|
333
|
-
}) => {
|
|
334
|
-
const i = x(), u = Pt(i, t, e), h = (S) => {
|
|
335
|
-
o && (S.key === " " || S.key === "Enter") && o(r);
|
|
336
|
-
}, f = d === void 0 || d === r ? "primary" : "secondary", g = () => /* @__PURE__ */ n(
|
|
337
|
-
B,
|
|
338
|
-
{
|
|
339
|
-
"aria-hidden": !0,
|
|
340
|
-
bold: d === r,
|
|
341
|
-
className: "mx-cmn-bar-text",
|
|
342
|
-
color: f,
|
|
343
|
-
component: "div",
|
|
344
|
-
variant: "Small",
|
|
345
|
-
children: a
|
|
346
|
-
}
|
|
347
|
-
);
|
|
348
|
-
return /* @__PURE__ */ m("div", { className: `mx-cmn-bar-container ${u} ${c < 0 ? "mx-cmn-negative" : ""}`, children: [
|
|
349
|
-
c >= 0 && /* @__PURE__ */ n(g, {}),
|
|
350
|
-
/* @__PURE__ */ n(
|
|
351
|
-
"div",
|
|
352
|
-
{
|
|
353
|
-
"aria-label": s,
|
|
354
|
-
className: `mx-cmn-bar ${o ? "mx-cmn-clickable" : ""} ${c < 0 ? "mx-cmn-bar-negative" : ""}`,
|
|
355
|
-
onClick: o ? () => o?.(r) : void 0,
|
|
356
|
-
onKeyDown: h,
|
|
357
|
-
role: s ? "button" : void 0,
|
|
358
|
-
tabIndex: s ? 0 : void 0
|
|
359
|
-
}
|
|
360
|
-
),
|
|
361
|
-
c < 0 && /* @__PURE__ */ n(g, {})
|
|
362
|
-
] });
|
|
363
|
-
}, Pt = (s, t, e) => {
|
|
364
|
-
const r = `expandBar-${Math.round(e)}`, a = mt(r, { from: { height: 0 }, to: { height: e } });
|
|
365
|
-
return w({
|
|
366
|
-
display: "flex",
|
|
367
|
-
flexDirection: "column",
|
|
368
|
-
justifyContent: "flex-end",
|
|
369
|
-
height: "100%",
|
|
370
|
-
"&.mx-cmn-negative": {
|
|
371
|
-
justifyContent: "flex-start"
|
|
372
|
-
},
|
|
373
|
-
"& .mx-cmn-bar": {
|
|
374
|
-
animationDelay: ".5s",
|
|
375
|
-
animationDuration: "1s",
|
|
376
|
-
animationFillMode: "forwards",
|
|
377
|
-
animationName: a,
|
|
378
|
-
animationTimingFunction: s.Easing.Default,
|
|
379
|
-
backgroundColor: t,
|
|
380
|
-
borderRadius: `${s.BorderRadius.Medium}px ${s.BorderRadius.Medium}px 0 0`,
|
|
381
|
-
maxHeight: e
|
|
382
|
-
},
|
|
383
|
-
"& .mx-cmn-bar-negative": {
|
|
384
|
-
borderRadius: `0 0 ${s.BorderRadius.Medium}px ${s.BorderRadius.Medium}px`,
|
|
385
|
-
marginTop: -s.Spacing.XTiny
|
|
386
|
-
},
|
|
387
|
-
"& .mx-cmn-bar-text": {
|
|
388
|
-
display: "flex",
|
|
389
|
-
justifyContent: "center",
|
|
390
|
-
marginBottom: s.Spacing.Tiny,
|
|
391
|
-
marginTop: s.Spacing.Tiny,
|
|
392
|
-
whiteSpace: "nowrap",
|
|
393
|
-
width: "100%"
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
}, Q = ({
|
|
397
|
-
ariaLabel: s,
|
|
398
|
-
averageLineHeight: t,
|
|
399
|
-
bottomHeight: e,
|
|
400
|
-
color: r,
|
|
401
|
-
index: a = -1,
|
|
402
|
-
onClick: o,
|
|
403
|
-
range: d,
|
|
404
|
-
selectedIndex: c,
|
|
405
|
-
topHeight: i,
|
|
406
|
-
value: u,
|
|
407
|
-
valueLabel: h = "",
|
|
408
|
-
width: f,
|
|
409
|
-
xAxisLabel: g = ""
|
|
410
|
-
}) => {
|
|
411
|
-
const S = x(), C = qt(S, f), D = u / d * i, v = Math.abs(u) / d * e, A = c === void 0 || c === a ? "primary" : "secondary";
|
|
412
|
-
return /* @__PURE__ */ m("div", { className: `mx-cmn-barchart-bar-column ${C}`, children: [
|
|
413
|
-
/* @__PURE__ */ n("div", { style: { height: i }, children: u >= 0 && /* @__PURE__ */ n(
|
|
414
|
-
W,
|
|
415
|
-
{
|
|
416
|
-
ariaLabel: s,
|
|
417
|
-
color: r,
|
|
418
|
-
height: D,
|
|
419
|
-
index: a,
|
|
420
|
-
label: h,
|
|
421
|
-
onClick: o,
|
|
422
|
-
selectedIndex: c,
|
|
423
|
-
value: u
|
|
424
|
-
}
|
|
425
|
-
) }),
|
|
426
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-zero-line" }),
|
|
427
|
-
t !== 0 && /* @__PURE__ */ n("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
|
|
428
|
-
/* @__PURE__ */ n("div", { style: { height: e }, children: u < 0 && /* @__PURE__ */ n(
|
|
429
|
-
W,
|
|
430
|
-
{
|
|
431
|
-
ariaLabel: s,
|
|
432
|
-
color: r,
|
|
433
|
-
height: v,
|
|
434
|
-
index: a,
|
|
435
|
-
label: h,
|
|
436
|
-
onClick: o,
|
|
437
|
-
value: u
|
|
438
|
-
}
|
|
439
|
-
) }),
|
|
440
|
-
/* @__PURE__ */ n(
|
|
441
|
-
"div",
|
|
442
|
-
{
|
|
443
|
-
className: `mx-cmn-bar-label ${o ? "mx-cmn-clickable" : ""}`,
|
|
444
|
-
onClick: o ? () => o(a) : void 0,
|
|
445
|
-
children: /* @__PURE__ */ n(B, { bold: c === a, color: A, variant: "Small", children: g })
|
|
446
|
-
}
|
|
447
|
-
)
|
|
448
|
-
] });
|
|
449
|
-
}, qt = (s, t) => w({
|
|
450
|
-
display: "flex",
|
|
451
|
-
flexDirection: "column",
|
|
452
|
-
flexGrow: t === void 0 ? 1 : 0,
|
|
453
|
-
width: t,
|
|
454
|
-
"& .mx-cmn-chart-average": {
|
|
455
|
-
borderTop: `${s.Spacing.XTiny}px dotted ${s.Color.Neutral500}`,
|
|
456
|
-
position: "relative",
|
|
457
|
-
marginRight: s.Spacing.XTiny
|
|
458
|
-
},
|
|
459
|
-
"& .mx-cmn-zero-line": {
|
|
460
|
-
borderBottom: "1px solid text.primary",
|
|
461
|
-
width: "100%"
|
|
462
|
-
},
|
|
463
|
-
"& .mx-cmn-bar-label": {
|
|
464
|
-
minHeight: s.Spacing.Medium,
|
|
465
|
-
maxHeight: s.Spacing.Medium,
|
|
466
|
-
marginBottom: s.Spacing.XSmall,
|
|
467
|
-
marginTop: s.Spacing.XSmall,
|
|
468
|
-
textAlign: "center",
|
|
469
|
-
width: "100%"
|
|
470
|
-
},
|
|
471
|
-
"& .mx-cmn-clickable": {
|
|
472
|
-
cursor: "pointer"
|
|
473
|
-
}
|
|
474
|
-
}), Wt = (s, t) => s + t, Qt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, Yt = (s, t) => [...s, t.value], Y = (s, t, e) => {
|
|
475
|
-
const r = s && t ? e / 2 : e;
|
|
476
|
-
return s ? r : 0;
|
|
477
|
-
}, zt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Xt = ({
|
|
478
|
-
average: s,
|
|
479
|
-
barWidth: t = "8%",
|
|
480
|
-
color: e,
|
|
481
|
-
data: r,
|
|
482
|
-
height: a,
|
|
483
|
-
legendLabelAverage: o,
|
|
484
|
-
legendLabelMain: d,
|
|
485
|
-
onBarClick: c,
|
|
486
|
-
selectedIndex: i,
|
|
487
|
-
valueFormatter: u = (h) => `${h}`
|
|
488
|
-
}) => {
|
|
489
|
-
const h = x(), f = Kt(h), g = r.reduce(Yt, []), S = s !== void 0 ? s : g.reduce(Wt, 0) / g.length, C = Math.max(...g), D = Math.min(...g), v = g.reduce(Qt, 0), A = C >= 0, R = D < 0, I = Y(A, R, a), N = Y(R, A, a), k = zt(S, C, D, I || N), et = (b) => i === void 0 || b === i ? e : `${e}80`, U = () => /* @__PURE__ */ n(
|
|
490
|
-
Q,
|
|
491
|
-
{
|
|
492
|
-
averageLineHeight: k,
|
|
493
|
-
bottomHeight: N,
|
|
494
|
-
color: "",
|
|
495
|
-
range: v,
|
|
496
|
-
topHeight: I,
|
|
497
|
-
value: 0,
|
|
498
|
-
width: void 0
|
|
499
|
-
}
|
|
500
|
-
);
|
|
501
|
-
return /* @__PURE__ */ m("div", { className: `mx-cmn-bar-chart ${f}`, children: [
|
|
502
|
-
/* @__PURE__ */ m("div", { className: "mx-cmn-chart-container", children: [
|
|
503
|
-
/* @__PURE__ */ n(U, {}),
|
|
504
|
-
r.map((b, F) => /* @__PURE__ */ m(Z.Fragment, { children: [
|
|
505
|
-
/* @__PURE__ */ n(
|
|
506
|
-
Q,
|
|
507
|
-
{
|
|
508
|
-
ariaLabel: b.ariaLabel,
|
|
509
|
-
averageLineHeight: k,
|
|
510
|
-
bottomHeight: N,
|
|
511
|
-
color: et(F),
|
|
512
|
-
index: F,
|
|
513
|
-
onClick: c,
|
|
514
|
-
range: v,
|
|
515
|
-
selectedIndex: i,
|
|
516
|
-
topHeight: I,
|
|
517
|
-
value: b.value,
|
|
518
|
-
valueLabel: u(b.value),
|
|
519
|
-
width: t,
|
|
520
|
-
xAxisLabel: b.label
|
|
521
|
-
}
|
|
522
|
-
),
|
|
523
|
-
/* @__PURE__ */ n(U, {})
|
|
524
|
-
] }, `column-${F}`))
|
|
525
|
-
] }),
|
|
526
|
-
/* @__PURE__ */ n(Gt, { color: e, labelAverage: o, labelMain: d })
|
|
527
|
-
] });
|
|
528
|
-
}, Kt = (s) => w({
|
|
529
|
-
"& .mx-cmn-chart-container": {
|
|
530
|
-
alignItems: "flex-end",
|
|
531
|
-
display: "flex",
|
|
532
|
-
justifyContent: "space-evenly",
|
|
533
|
-
marginTop: s.Spacing.Large,
|
|
534
|
-
marginBottom: s.Spacing.Medium
|
|
535
|
-
}
|
|
536
|
-
}), as = Xt, jt = ({
|
|
537
|
-
hasGap: s = !1,
|
|
538
|
-
segments: t,
|
|
539
|
-
size: e = yt,
|
|
540
|
-
strokeWidth: r = ft,
|
|
541
|
-
children: a
|
|
542
|
-
}) => {
|
|
543
|
-
const o = x(), d = Vt(o, e), c = (e - r) / 2, i = e / 2;
|
|
544
|
-
let u = -90 - (s ? 1 : 0), h = 0;
|
|
545
|
-
return /* @__PURE__ */ m("div", { className: `mx-cmn-multi-segment-donut ${d}`, children: [
|
|
546
|
-
/* @__PURE__ */ m("svg", { height: e, width: e, children: [
|
|
547
|
-
/* @__PURE__ */ n(
|
|
548
|
-
"circle",
|
|
549
|
-
{
|
|
550
|
-
cx: i,
|
|
551
|
-
cy: i,
|
|
552
|
-
fill: "none",
|
|
553
|
-
r: c,
|
|
554
|
-
stroke: o.Color.Neutral300,
|
|
555
|
-
strokeWidth: r
|
|
556
|
-
}
|
|
557
|
-
),
|
|
558
|
-
t.map((f, g) => (u += 360 * h + (s ? 1 : 0), h = (f.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
|
|
559
|
-
"circle",
|
|
560
|
-
{
|
|
561
|
-
cx: i,
|
|
562
|
-
cy: i,
|
|
563
|
-
fill: "none",
|
|
564
|
-
r: c,
|
|
565
|
-
stroke: f.color,
|
|
566
|
-
strokeDasharray: 2 * Math.PI * c,
|
|
567
|
-
strokeDashoffset: 2 * Math.PI * c * (1 - h),
|
|
568
|
-
strokeWidth: r,
|
|
569
|
-
transform: `rotate(${u}, ${i}, ${i})`
|
|
570
|
-
},
|
|
571
|
-
g
|
|
572
|
-
)))
|
|
573
|
-
] }),
|
|
574
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-multi-segment-donut-children", children: a })
|
|
575
|
-
] });
|
|
576
|
-
}, Vt = (s, t) => w({
|
|
577
|
-
height: t,
|
|
578
|
-
marginTop: `-${s.Spacing.XSmall}px`,
|
|
579
|
-
position: "relative",
|
|
580
|
-
width: t,
|
|
581
|
-
"& .mx-cmn-multi-segment-donut-children": {
|
|
582
|
-
left: "50%",
|
|
583
|
-
position: "absolute",
|
|
584
|
-
textAlign: "center",
|
|
585
|
-
top: "50%",
|
|
586
|
-
transform: "translate(-50%, -50%)"
|
|
587
|
-
}
|
|
588
|
-
}), os = jt, Zt = ({
|
|
589
|
-
icon: s,
|
|
590
|
-
label: t,
|
|
591
|
-
onClick: e,
|
|
592
|
-
placement: r = "bottom",
|
|
593
|
-
tooltipText: a,
|
|
594
|
-
variant: o = "text"
|
|
595
|
-
}) => {
|
|
596
|
-
const d = ut();
|
|
597
|
-
return /* @__PURE__ */ m(Z.Fragment, { children: [
|
|
598
|
-
/* @__PURE__ */ n(
|
|
599
|
-
ct,
|
|
600
|
-
{
|
|
601
|
-
onClick: e,
|
|
602
|
-
startIcon: s,
|
|
603
|
-
sx: {
|
|
604
|
-
[d.breakpoints.down("lg")]: { display: "none" },
|
|
605
|
-
[d.breakpoints.up("lg")]: { display: "inline-flex" }
|
|
606
|
-
},
|
|
607
|
-
title: a,
|
|
608
|
-
variant: o,
|
|
609
|
-
children: t
|
|
610
|
-
}
|
|
611
|
-
),
|
|
612
|
-
/* @__PURE__ */ n(
|
|
613
|
-
lt,
|
|
614
|
-
{
|
|
615
|
-
describeChild: !0,
|
|
616
|
-
placement: r,
|
|
617
|
-
sx: { display: { xs: "inline-flex", lg: "none" } },
|
|
618
|
-
title: a,
|
|
619
|
-
children: /* @__PURE__ */ n(dt, { onClick: e, children: s })
|
|
620
|
-
}
|
|
621
|
-
)
|
|
622
|
-
] });
|
|
623
|
-
}, ns = Zt;
|
|
624
|
-
class Jt {
|
|
625
|
-
globalStore;
|
|
626
|
-
api = new M("/", "");
|
|
627
|
-
copy = {};
|
|
628
|
-
featureNamespace = "experiences";
|
|
629
|
-
isInitialized = !1;
|
|
630
|
-
constructor(t) {
|
|
631
|
-
this.globalStore = t, this.api = new M(t.endpoint, t.sessionToken), _(this);
|
|
632
|
-
}
|
|
633
|
-
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
634
|
-
// TODO: Remove this function
|
|
635
|
-
initialize = async (t, e) => {
|
|
636
|
-
this.api = new M(t, e), await this.loadCopy();
|
|
637
|
-
};
|
|
638
|
-
loadCopy = async () => {
|
|
639
|
-
await this.getCopy(this.featureNamespace), p(() => {
|
|
640
|
-
this.isInitialized = !0;
|
|
641
|
-
});
|
|
642
|
-
};
|
|
643
|
-
getCopy = async (t, e = "") => {
|
|
644
|
-
try {
|
|
645
|
-
const r = await this.api.getGlobalCopy(t, e);
|
|
646
|
-
p(() => {
|
|
647
|
-
this.copy = r[t];
|
|
648
|
-
});
|
|
649
|
-
} catch (r) {
|
|
650
|
-
console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${r}`);
|
|
651
|
-
}
|
|
652
|
-
};
|
|
653
|
-
}
|
|
654
|
-
class te {
|
|
655
|
-
globalStore;
|
|
656
|
-
survey = null;
|
|
657
|
-
currentQuestionIndex = 0;
|
|
658
|
-
question = null;
|
|
659
|
-
response = null;
|
|
660
|
-
responses = {};
|
|
661
|
-
constructor(t) {
|
|
662
|
-
this.globalStore = t, _(this);
|
|
663
|
-
}
|
|
664
|
-
get isLastQuestion() {
|
|
665
|
-
return this.currentQuestionIndex === this.surveyQuestions.length - 1;
|
|
666
|
-
}
|
|
667
|
-
get questionCount() {
|
|
668
|
-
return `${this.currentQuestionIndex + 1}/${this.surveyQuestions.length}`;
|
|
669
|
-
}
|
|
670
|
-
get responsePayload() {
|
|
671
|
-
return {
|
|
672
|
-
$survey_id: this.surveyId,
|
|
673
|
-
...this.responses
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
// TODO hardcode elsewhere
|
|
677
|
-
get surveyId() {
|
|
678
|
-
return window.app?.postHogPublicKey === "phc_KclQGnOZEaYCttkpiVpuyOYeBlixGo6xNphYgWV4CXo" ? "0196caa6-9b37-0000-98a7-f04e8d56faf5" : "0196a6b0-ccde-0000-b980-0b84ea2fef4a";
|
|
679
|
-
}
|
|
680
|
-
get surveyQuestions() {
|
|
681
|
-
return this.survey ? this.survey.questions : [];
|
|
682
|
-
}
|
|
683
|
-
loadSurvey = (t = !1) => {
|
|
684
|
-
xt.getActiveMatchingSurveys((e) => {
|
|
685
|
-
p(() => {
|
|
686
|
-
if (e.length > 0) {
|
|
687
|
-
const r = e.find((a) => a.id === this.surveyId);
|
|
688
|
-
r && (this.survey = r, this.currentQuestionIndex = 0, this.question = r.questions[0], this.response = null, this.responses = {});
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
}, t);
|
|
692
|
-
};
|
|
693
|
-
nextQuestion = () => {
|
|
694
|
-
this.currentQuestionIndex < this.surveyQuestions.length - 1 && (this.currentQuestionIndex += 1), this.response = null, this.question = this.surveyQuestions[this.currentQuestionIndex];
|
|
695
|
-
};
|
|
696
|
-
resetStore = () => {
|
|
697
|
-
this.survey = null, this.currentQuestionIndex = 0, this.question = null, this.response = null, this.responses = {};
|
|
698
|
-
};
|
|
699
|
-
setResponse = (t) => {
|
|
700
|
-
this.response = t, this.question && (this.responses[`$survey_response_${this.question.id}`] = t);
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
class z {
|
|
704
|
-
fetchInstance;
|
|
705
|
-
constructor(t, e) {
|
|
706
|
-
this.fetchInstance = new y(t, e);
|
|
707
|
-
}
|
|
708
|
-
addBudget = async (t, e, r = null) => this.fetchInstance.post(l.BUDGETS, {
|
|
709
|
-
amount: e,
|
|
710
|
-
category_guid: t.guid,
|
|
711
|
-
category_name: t.name,
|
|
712
|
-
parent_guid: r
|
|
713
|
-
}).then((a) => a.budget).catch((a) => {
|
|
714
|
-
throw a;
|
|
715
|
-
});
|
|
716
|
-
deleteBudget = async (t) => this.fetchInstance.delete(`${l.BUDGETS}/${t}`).then((e) => e).catch((e) => {
|
|
717
|
-
throw e;
|
|
718
|
-
});
|
|
719
|
-
getBudgets = async () => this.fetchInstance.get(l.BUDGETS).then((t) => t.budgets).catch((t) => t);
|
|
720
|
-
updateBudget = async (t) => this.fetchInstance.put(`${l.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
|
|
721
|
-
throw e;
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
class ee {
|
|
725
|
-
api = new z("/", "");
|
|
726
|
-
globalStore;
|
|
727
|
-
alert = "";
|
|
728
|
-
dateRange = { start: tt(O()), end: J(O()) };
|
|
729
|
-
budgets = [];
|
|
730
|
-
selectedBudget;
|
|
731
|
-
selectedSubBudget;
|
|
732
|
-
isDataLoaded = !1;
|
|
733
|
-
theme = {};
|
|
734
|
-
constructor(t) {
|
|
735
|
-
this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken), _(this);
|
|
736
|
-
}
|
|
737
|
-
loadBudgetData = async () => {
|
|
738
|
-
await this.loadBudgets(), bt(
|
|
739
|
-
() => this.detailedBudgets,
|
|
740
|
-
(t) => {
|
|
741
|
-
if (t) {
|
|
742
|
-
const e = this.selectedBudget;
|
|
743
|
-
e && (this.selectedBudget = Dt(t, e.guid));
|
|
744
|
-
const r = this.selectedSubBudget;
|
|
745
|
-
r && r.parent_guid && (this.selectedSubBudget = vt(
|
|
746
|
-
t,
|
|
747
|
-
r.guid,
|
|
748
|
-
r.parent_guid
|
|
749
|
-
));
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
);
|
|
753
|
-
};
|
|
754
|
-
get detailedBudgets() {
|
|
755
|
-
return L(
|
|
756
|
-
this.budgets.filter(
|
|
757
|
-
(t) => t.category_guid !== E.INCOME && t.category_guid !== E.TRANSFER && t.category_guid !== E.INVESTMENTS
|
|
758
|
-
),
|
|
759
|
-
this.globalStore.categoryStore.detailedCategories,
|
|
760
|
-
this.globalStore.copyStore.copy.budgets,
|
|
761
|
-
this.theme
|
|
762
|
-
).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
|
|
763
|
-
}
|
|
764
|
-
get incomeBudget() {
|
|
765
|
-
return L(
|
|
766
|
-
this.budgets.filter((r) => !r.parent_guid),
|
|
767
|
-
this.globalStore.categoryStore.detailedCategories,
|
|
768
|
-
this.globalStore.copyStore.copy.budgets,
|
|
769
|
-
this.theme
|
|
770
|
-
).reduce(
|
|
771
|
-
(r, a) => a.category_guid !== E.INCOME ? r : !r || a.percentage > r.percentage ? a : r,
|
|
772
|
-
void 0
|
|
773
|
-
)?.amount;
|
|
774
|
-
}
|
|
775
|
-
get unbudgetedCategories() {
|
|
776
|
-
return this.globalStore.categoryStore.spendCategories.filter(
|
|
777
|
-
(t) => !this.detailedBudgets.find((e) => e.category_guid === t.guid)
|
|
778
|
-
);
|
|
779
|
-
}
|
|
780
|
-
get totalBudgeted() {
|
|
781
|
-
return this.detailedBudgets.reduce((t, e) => t + e.amount, 0);
|
|
782
|
-
}
|
|
783
|
-
addBudget = async (t, e, r = null) => {
|
|
784
|
-
try {
|
|
785
|
-
const a = await this.api.addBudget(t, e, r);
|
|
786
|
-
p(() => {
|
|
787
|
-
this.budgets.push(a);
|
|
788
|
-
});
|
|
789
|
-
} catch (a) {
|
|
790
|
-
console.error(`Error adding budget: ${a}`);
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
deleteBudget = async (t) => {
|
|
794
|
-
try {
|
|
795
|
-
await this.api.deleteBudget(t), p(() => {
|
|
796
|
-
const e = this.budgets.findIndex((r) => r.guid === t);
|
|
797
|
-
e >= 0 && this.budgets.splice(e, 1);
|
|
798
|
-
});
|
|
799
|
-
} catch (e) {
|
|
800
|
-
console.error(`Error deleting budget: ${e}`);
|
|
801
|
-
}
|
|
802
|
-
};
|
|
803
|
-
loadBudgets = async () => {
|
|
804
|
-
try {
|
|
805
|
-
const t = await this.api.getBudgets();
|
|
806
|
-
p(() => {
|
|
807
|
-
this.budgets = t, this.isDataLoaded = !0;
|
|
808
|
-
});
|
|
809
|
-
} catch (t) {
|
|
810
|
-
throw console.error(`Error occurred while loading budgets: ${t}`), t;
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
setAlert = (t) => this.alert = t;
|
|
814
|
-
setDateRange = (t) => this.dateRange = t;
|
|
815
|
-
setSelectedBudget = (t) => this.selectedBudget = t;
|
|
816
|
-
setSelectedSubBudget = (t) => this.selectedSubBudget = t;
|
|
817
|
-
setTheme = (t) => this.theme = t;
|
|
818
|
-
/**
|
|
819
|
-
* Recalculate budget by using the average amount from top-level categories
|
|
820
|
-
* @param categories Detailed categories
|
|
821
|
-
*/
|
|
822
|
-
recalculateBudgets = async (t) => {
|
|
823
|
-
try {
|
|
824
|
-
for (const r of t) {
|
|
825
|
-
const a = this.budgets.find((o) => o.category_guid === r.guid);
|
|
826
|
-
a ? await this.api.updateBudget({
|
|
827
|
-
...a,
|
|
828
|
-
amount: r.totalAverageAmount
|
|
829
|
-
}) : await this.api.addBudget(r, r.totalAverageAmount);
|
|
830
|
-
}
|
|
831
|
-
const e = this.budgets.filter(
|
|
832
|
-
(r) => !t.find((a) => a.guid === r.category_guid)
|
|
833
|
-
);
|
|
834
|
-
for (const r of e)
|
|
835
|
-
await this.api.deleteBudget(r.guid);
|
|
836
|
-
return await this.loadBudgets(), { data: this.budgets, isSuccess: !0 };
|
|
837
|
-
} catch (e) {
|
|
838
|
-
return console.error("error recalculating budgets", e), { data: [], isSuccess: !1 };
|
|
839
|
-
}
|
|
840
|
-
};
|
|
841
|
-
updateBudget = async (t) => {
|
|
842
|
-
try {
|
|
843
|
-
const e = await this.api.updateBudget(t);
|
|
844
|
-
p(() => {
|
|
845
|
-
const r = this.budgets.findIndex((a) => a.guid === t.guid);
|
|
846
|
-
r >= 0 && (this.budgets[r] = e);
|
|
847
|
-
});
|
|
848
|
-
} catch (e) {
|
|
849
|
-
console.error(`Error updating budget: ${e}`);
|
|
850
|
-
}
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
var se = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(se || {}), re = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(re || {}), ae = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(ae || {}), oe = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(oe || {});
|
|
854
|
-
class X {
|
|
855
|
-
fetchInstance;
|
|
856
|
-
constructor(t, e) {
|
|
857
|
-
this.fetchInstance = new y(t, e);
|
|
858
|
-
}
|
|
859
|
-
createSupportTicket = async (t) => this.fetchInstance.post(l.SUPPORT_TICKETS, t).then((e) => e);
|
|
860
|
-
}
|
|
861
|
-
const ne = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, ie = (s, t) => {
|
|
862
|
-
const e = [];
|
|
863
|
-
for (const r of ot) {
|
|
864
|
-
const a = t[r.guid];
|
|
865
|
-
if (!a) continue;
|
|
866
|
-
const o = {
|
|
867
|
-
...r,
|
|
868
|
-
title: a.label,
|
|
869
|
-
topics: r.topics.map(({ topicKey: d }, c) => ({
|
|
870
|
-
topicKey: d,
|
|
871
|
-
label: a.topics[c]
|
|
872
|
-
}))
|
|
873
|
-
};
|
|
874
|
-
ne(o, s) && e.push(o);
|
|
875
|
-
}
|
|
876
|
-
return e;
|
|
877
|
-
};
|
|
878
|
-
class ce {
|
|
879
|
-
alert = { message: "", severity: void 0 };
|
|
880
|
-
api = new X("/", "");
|
|
881
|
-
appConfig;
|
|
882
|
-
globalStore;
|
|
883
|
-
isLoading = !1;
|
|
884
|
-
constructor(t) {
|
|
885
|
-
this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken), _(this);
|
|
886
|
-
}
|
|
887
|
-
createSupportTicket = async (t) => {
|
|
888
|
-
try {
|
|
889
|
-
this.isLoading = !0, await this.api.createSupportTicket(t), this.setAlert(this.copy.request_support_submit_success_message, "success");
|
|
890
|
-
} catch (e) {
|
|
891
|
-
this.setAlert(this.copy.request_support_submit_failure_message, "error"), console.error("Error occurred while submitting:", e);
|
|
892
|
-
} finally {
|
|
893
|
-
this.isLoading = !1;
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
setAlert = (t, e = void 0) => this.alert = { message: t, severity: e };
|
|
897
|
-
get copy() {
|
|
898
|
-
return this.globalStore.copyStore.copy.help;
|
|
899
|
-
}
|
|
900
|
-
get helpCategories() {
|
|
901
|
-
const { client_communication_profile: t, client_profile: e } = this.globalStore.appDataStore.appData, {
|
|
902
|
-
help: { category_list: r }
|
|
903
|
-
} = this.globalStore.copyStore.copy;
|
|
904
|
-
return ie(
|
|
905
|
-
{
|
|
906
|
-
...t,
|
|
907
|
-
...e,
|
|
908
|
-
...this.globalStore.appConfig.config
|
|
909
|
-
},
|
|
910
|
-
r
|
|
911
|
-
);
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
class K {
|
|
915
|
-
fetchInstance;
|
|
916
|
-
constructor(t, e) {
|
|
917
|
-
this.fetchInstance = new y(t, e);
|
|
918
|
-
}
|
|
919
|
-
getHoldings = async () => this.fetchInstance.get(l.HOLDINGS).then((t) => t.holdings);
|
|
920
|
-
updateHoldings = async (t) => this.fetchInstance.put(`${l.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
|
|
921
|
-
}
|
|
922
|
-
class de {
|
|
923
|
-
analysisType = Tt.Stocks;
|
|
924
|
-
api = new K("/", "");
|
|
925
|
-
holdings = [];
|
|
926
|
-
holdingsLoaded = !1;
|
|
927
|
-
globalStore;
|
|
928
|
-
showConnectionsWidget = !1;
|
|
929
|
-
constructor(t) {
|
|
930
|
-
this.globalStore = t, this.api = new K(t.endpoint, t.sessionToken), _(this);
|
|
931
|
-
}
|
|
932
|
-
get analysisChartData() {
|
|
933
|
-
return Bt(It(this.visibleHoldings), this.analysisType);
|
|
934
|
-
}
|
|
935
|
-
get analysisDetails() {
|
|
936
|
-
return Nt(this.visibleHoldings)[this.analysisType] || {};
|
|
937
|
-
}
|
|
938
|
-
get visibleHoldings() {
|
|
939
|
-
return this.holdings.filter(
|
|
940
|
-
(t) => this.globalStore.globalUiStore.selectedAccountGuids.includes(t.account_guid)
|
|
941
|
-
);
|
|
942
|
-
}
|
|
943
|
-
setShowConnectionsWidget = (t) => {
|
|
944
|
-
this.showConnectionsWidget = t;
|
|
945
|
-
};
|
|
946
|
-
loadHoldings = async () => {
|
|
947
|
-
try {
|
|
948
|
-
const t = await this.api.getHoldings();
|
|
949
|
-
p(() => {
|
|
950
|
-
this.holdings = [...t], this.holdingsLoaded = !0;
|
|
951
|
-
});
|
|
952
|
-
} catch (t) {
|
|
953
|
-
console.error(`Error occured while getting holdings: ${t}`);
|
|
954
|
-
}
|
|
955
|
-
};
|
|
956
|
-
setAnalysisType = (t) => {
|
|
957
|
-
this.analysisType = t;
|
|
958
|
-
};
|
|
959
|
-
updateHoldings = async (t) => {
|
|
960
|
-
this.holdingsLoaded = !1;
|
|
961
|
-
try {
|
|
962
|
-
const e = await this.api.updateHoldings(t), r = this.holdings.findIndex(({ guid: a }) => a === t.guid);
|
|
963
|
-
if (r >= 0) {
|
|
964
|
-
const a = [...this.holdings];
|
|
965
|
-
a[r] = e, p(() => {
|
|
966
|
-
this.holdings = a, this.holdingsLoaded = !0;
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
} catch (e) {
|
|
970
|
-
console.error(`Error occurred while updating holding: ${e}`);
|
|
971
|
-
}
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
const j = {
|
|
975
|
-
clientConfig: {},
|
|
976
|
-
clientStyleProfile: {},
|
|
977
|
-
config: {
|
|
978
|
-
assets_prefix: "/assets",
|
|
979
|
-
bundle: "widgetLoader",
|
|
980
|
-
client_guid: "",
|
|
981
|
-
dashboard_accounts_index: 6,
|
|
982
|
-
dashboard_accounts_location: 0,
|
|
983
|
-
dashboard_activity_index: 2,
|
|
984
|
-
dashboard_activity_location: 0,
|
|
985
|
-
dashboard_budgets_index: 5,
|
|
986
|
-
dashboard_budgets_location: 1,
|
|
987
|
-
dashboard_cash_flow_index: 0,
|
|
988
|
-
dashboard_cash_flow_location: 0,
|
|
989
|
-
dashboard_connect_index: 7,
|
|
990
|
-
dashboard_connect_location: 1,
|
|
991
|
-
dashboard_insights_index: 3,
|
|
992
|
-
dashboard_insights_location: 1,
|
|
993
|
-
dashboard_spending_index: 1,
|
|
994
|
-
dashboard_spending_location: 1,
|
|
995
|
-
dashboard_trends_index: 4,
|
|
996
|
-
dashboard_trends_location: 0,
|
|
997
|
-
display_account_number_in_accounts: !0,
|
|
998
|
-
display_add_manual_transaction_in_transactions: !0,
|
|
999
|
-
display_available_balance_in_accounts: !0,
|
|
1000
|
-
display_email_edit_field_in_settings: !0,
|
|
1001
|
-
display_mobile_devices_in_settings: !0,
|
|
1002
|
-
display_notification_settings_in_settings: !0,
|
|
1003
|
-
display_only_external_accounts_in_accounts: !1,
|
|
1004
|
-
display_password_options_in_settings: !0,
|
|
1005
|
-
display_sms_edit_field_in_settings: !0,
|
|
1006
|
-
display_terms_and_conditions: !0,
|
|
1007
|
-
display_user_profile_in_settings: !0,
|
|
1008
|
-
display_user_transaction_rules_in_settings: !0,
|
|
1009
|
-
enable_add_account_in_zero_state: !0,
|
|
1010
|
-
enable_aggregation_prompts: !0,
|
|
1011
|
-
enable_external_accounts_in_goals_widget: !0,
|
|
1012
|
-
enable_funds_transfers_in_goals_widget: !1,
|
|
1013
|
-
enable_manual_accounts: !0,
|
|
1014
|
-
enable_mark_account_closed_for_held_accounts: !0,
|
|
1015
|
-
enable_mark_account_duplicate_for_held_accounts: !0,
|
|
1016
|
-
enable_renaming_home_accounts: !0,
|
|
1017
|
-
enable_support_requests: !1,
|
|
1018
|
-
language: "en-US",
|
|
1019
|
-
product_name: "Money Dashboard",
|
|
1020
|
-
session_token: "",
|
|
1021
|
-
show_account_nicknames_in_master: !1,
|
|
1022
|
-
show_accounts_widget_in_master: !0,
|
|
1023
|
-
show_budgets_widget_in_master: !0,
|
|
1024
|
-
show_carousel_card_border_in_pulse_micro_widget: !1,
|
|
1025
|
-
show_cash_flow_widget_in_master: !0,
|
|
1026
|
-
show_connections_widget_in_master: !0,
|
|
1027
|
-
show_cta_colocated_with_text_in_pulse_micro_widget: !0,
|
|
1028
|
-
show_debts_widget_in_master: !0,
|
|
1029
|
-
show_finstrong_widget_in_master: !0,
|
|
1030
|
-
show_full_experience_link_in_pulse_micro_widget: !1,
|
|
1031
|
-
show_full_experience_link_in_pulse_mini_widget: !1,
|
|
1032
|
-
show_goals_widget_in_master: !0,
|
|
1033
|
-
show_help_widget_in_master: !0,
|
|
1034
|
-
show_horizontal_padding_in_pulse_micro_widget: !0,
|
|
1035
|
-
show_icon_in_pulse_micro_widget: !0,
|
|
1036
|
-
show_insights_widget_in_master: !0,
|
|
1037
|
-
show_investments_widget_in_master: !1,
|
|
1038
|
-
show_mx_branding: !0,
|
|
1039
|
-
show_navigation_controls_in_pulse_micro_widget: !0,
|
|
1040
|
-
show_net_worth_widget_in_master: !0,
|
|
1041
|
-
show_notifications_widget_in_master: !0,
|
|
1042
|
-
show_recurring_transactions_widget_in_master: !0,
|
|
1043
|
-
show_settings_widget_in_master: !0,
|
|
1044
|
-
show_spending_plan_widget_in_master: !1,
|
|
1045
|
-
show_spending_widget_in_master: !0,
|
|
1046
|
-
show_transactions_widget_in_master: !0,
|
|
1047
|
-
show_trends_widget_in_master: !0,
|
|
1048
|
-
type: "money-dashboard",
|
|
1049
|
-
websocket: {
|
|
1050
|
-
hmac: "",
|
|
1051
|
-
token: "",
|
|
1052
|
-
url: ""
|
|
1053
|
-
},
|
|
1054
|
-
widgets_display_name: "Money Dashboard "
|
|
1055
|
-
},
|
|
1056
|
-
honeyBadgerPublicKey: "",
|
|
1057
|
-
options: {
|
|
1058
|
-
assets_prefix: "/assets",
|
|
1059
|
-
brokaw_auth: {
|
|
1060
|
-
token: "",
|
|
1061
|
-
hmac: "",
|
|
1062
|
-
url: ""
|
|
1063
|
-
},
|
|
1064
|
-
brokaw_websocket_url: "",
|
|
1065
|
-
bundle: "widgetLoader",
|
|
1066
|
-
custom_copy_namespace: "",
|
|
1067
|
-
language: "en-US",
|
|
1068
|
-
product_name: "Master Widget",
|
|
1069
|
-
session_token: "",
|
|
1070
|
-
subtype: "master",
|
|
1071
|
-
type: "money_dashboard"
|
|
1072
|
-
},
|
|
1073
|
-
postHogPublicKey: "phc_1fVYJICC69TpW4wagp9o2XqQ8E7X98cAmcR5psSpfkE",
|
|
1074
|
-
userFeatures: []
|
|
1075
|
-
};
|
|
1076
|
-
class V {
|
|
1077
|
-
fetchInstance;
|
|
1078
|
-
constructor(t, e) {
|
|
1079
|
-
this.fetchInstance = new y(t, e);
|
|
1080
|
-
}
|
|
1081
|
-
getAppData = async () => this.fetchInstance.get(l.APP_DATA).then((t) => t);
|
|
1082
|
-
}
|
|
1083
|
-
class le {
|
|
1084
|
-
globalStore;
|
|
1085
|
-
api = new V("/", "");
|
|
1086
|
-
bannerApi = new P("/");
|
|
1087
|
-
appData = {};
|
|
1088
|
-
banner = {};
|
|
1089
|
-
constructor(t) {
|
|
1090
|
-
this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken), _(this);
|
|
1091
|
-
}
|
|
1092
|
-
get appConfig() {
|
|
1093
|
-
return this.globalStore.appConfig;
|
|
1094
|
-
}
|
|
1095
|
-
get clientCommunicationProfile() {
|
|
1096
|
-
return this.appData.client_communication_profile;
|
|
1097
|
-
}
|
|
1098
|
-
get clientInsightProfile() {
|
|
1099
|
-
return this.appData.client_insight_profile;
|
|
1100
|
-
}
|
|
1101
|
-
get user() {
|
|
1102
|
-
return this.appData.user;
|
|
1103
|
-
}
|
|
1104
|
-
get userCommunicationProfile() {
|
|
1105
|
-
return this.appData.user_communication_profile;
|
|
1106
|
-
}
|
|
1107
|
-
get userProfile() {
|
|
1108
|
-
return this.appData.user_profile;
|
|
1109
|
-
}
|
|
1110
|
-
loadAppData = async (t) => {
|
|
1111
|
-
try {
|
|
1112
|
-
const e = t || await this.api.getAppData();
|
|
1113
|
-
p(() => {
|
|
1114
|
-
this.appData = e, this.bannerApi = new P(e.address?.bullseye || "/");
|
|
1115
|
-
});
|
|
1116
|
-
} catch (e) {
|
|
1117
|
-
console.error(`Error loading app data: ${e}`);
|
|
1118
|
-
}
|
|
1119
|
-
};
|
|
1120
|
-
loadBanner = async () => {
|
|
1121
|
-
try {
|
|
1122
|
-
const t = this.user?.guid ?? null, e = t ? await this.bannerApi.getBanner(t) : {};
|
|
1123
|
-
p(() => {
|
|
1124
|
-
this.banner = e;
|
|
1125
|
-
});
|
|
1126
|
-
} catch (t) {
|
|
1127
|
-
console.error(`Error loading banner: ${t}`);
|
|
1128
|
-
}
|
|
1129
|
-
};
|
|
1130
|
-
setUser = (t) => this.appData.user = t;
|
|
1131
|
-
setUserCommunicationProfile = (t) => this.appData.user_communication_profile = t;
|
|
1132
|
-
setUserProfile = (t) => this.appData.user_profile = t;
|
|
1133
|
-
}
|
|
1134
|
-
class ue {
|
|
1135
|
-
globalStore;
|
|
1136
|
-
widgetApi = new q("/", "");
|
|
1137
|
-
constructor(t) {
|
|
1138
|
-
this.globalStore = t, this.widgetApi = new q(t.endpoint, t.sessionToken), _(this);
|
|
1139
|
-
}
|
|
1140
|
-
loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
|
|
1141
|
-
widget_url: { widget_type: t, color_scheme: e, ...r }
|
|
1142
|
-
});
|
|
1143
|
-
}
|
|
1144
|
-
class he {
|
|
1145
|
-
globalStore;
|
|
1146
|
-
isInitialized = !1;
|
|
1147
|
-
selectedAccounts = [];
|
|
1148
|
-
selectedAccountGuids = this.selectedAccounts.map((t) => t.guid);
|
|
1149
|
-
displayedDate = /* @__PURE__ */ new Date();
|
|
1150
|
-
displayedDateRange = {
|
|
1151
|
-
start: tt(this.displayedDate),
|
|
1152
|
-
end: J(this.displayedDate)
|
|
1153
|
-
};
|
|
1154
|
-
constructor(t) {
|
|
1155
|
-
_(this), this.globalStore = t;
|
|
1156
|
-
}
|
|
1157
|
-
get isCopyLoaded() {
|
|
1158
|
-
return this.globalStore.copyStore.isInitialized;
|
|
1159
|
-
}
|
|
1160
|
-
setInitialized = (t) => {
|
|
1161
|
-
this.isInitialized = t;
|
|
1162
|
-
};
|
|
1163
|
-
// for the global account filter
|
|
1164
|
-
// if excluded from 1 widget, excluded from all
|
|
1165
|
-
setSelectedAccounts = (t) => {
|
|
1166
|
-
this.selectedAccounts = t.filter(
|
|
1167
|
-
(e) => !(e.is_excluded_from_accounts || e.is_excluded_from_budgets || e.is_excluded_from_cash_flow || e.is_excluded_from_debts || e.is_excluded_from_goals || e.is_excluded_from_investments || e.is_excluded_from_net_worth || e.is_excluded_from_spending || e.is_excluded_from_transactions || e.is_excluded_from_trends)
|
|
1168
|
-
), this.selectedAccountGuids = this.selectedAccounts.map((e) => e.guid);
|
|
1169
|
-
};
|
|
1170
|
-
// Sets an array of selected account guids for the AccountFilter component
|
|
1171
|
-
setSelectedAccountGuids = async (t) => {
|
|
1172
|
-
const e = new Set(this.selectedAccountGuids), r = new Set(t), a = [...r].filter((d) => !e.has(d)), o = [...e].filter((d) => !r.has(d));
|
|
1173
|
-
a.length > 0 && this.globalStore.accountStore.updateAccountFiltering(a, !1), o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !0), this.selectedAccountGuids = t;
|
|
1174
|
-
};
|
|
1175
|
-
setDisplayedDate = (t, e) => {
|
|
1176
|
-
this.displayedDate = e, this.displayedDateRange = {
|
|
1177
|
-
start: t,
|
|
1178
|
-
end: e
|
|
1179
|
-
};
|
|
1180
|
-
};
|
|
1181
|
-
get shouldDisableNextDate() {
|
|
1182
|
-
const t = T(this.displayedDate), e = T(Rt(/* @__PURE__ */ new Date(), 1));
|
|
1183
|
-
return t === e;
|
|
1184
|
-
}
|
|
1185
|
-
get shouldDisablePrevDate() {
|
|
1186
|
-
const t = T(this.displayedDate), e = T(/* @__PURE__ */ new Date());
|
|
1187
|
-
return t === e;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
class ge {
|
|
1191
|
-
globalStore;
|
|
1192
|
-
api = new $("/", "");
|
|
1193
|
-
userFeatures = [];
|
|
1194
|
-
constructor(t) {
|
|
1195
|
-
this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken), _(this);
|
|
1196
|
-
}
|
|
1197
|
-
// DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
|
|
1198
|
-
// TODO: Remove this function
|
|
1199
|
-
initialize = async (t, e) => {
|
|
1200
|
-
this.api = new $(t, e), await this.loadUserFeatures();
|
|
1201
|
-
};
|
|
1202
|
-
get userProfile() {
|
|
1203
|
-
return this.globalStore.appDataStore.userProfile;
|
|
1204
|
-
}
|
|
1205
|
-
get user() {
|
|
1206
|
-
return this.globalStore.appDataStore.user;
|
|
1207
|
-
}
|
|
1208
|
-
loadUserFeatures = async (t) => {
|
|
1209
|
-
try {
|
|
1210
|
-
const e = t || await this.api.getUserFeatures();
|
|
1211
|
-
p(() => {
|
|
1212
|
-
this.userFeatures = e;
|
|
1213
|
-
});
|
|
1214
|
-
} catch (e) {
|
|
1215
|
-
console.error(`Error occurred while loading user features: ${e}`);
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
updateUser = async (t) => {
|
|
1219
|
-
try {
|
|
1220
|
-
const e = await this.api.updateUser(t);
|
|
1221
|
-
this.globalStore.appDataStore.setUser(e);
|
|
1222
|
-
} catch (e) {
|
|
1223
|
-
console.error(`Error updating User: ${e}`);
|
|
1224
|
-
}
|
|
1225
|
-
};
|
|
1226
|
-
updateUserProfile = async (t) => {
|
|
1227
|
-
try {
|
|
1228
|
-
const e = await this.api.updateUserProfile(t);
|
|
1229
|
-
this.globalStore.appDataStore.setUserProfile(e);
|
|
1230
|
-
} catch (e) {
|
|
1231
|
-
console.error(`Error occurred while updating user profile: ${e}`);
|
|
1232
|
-
}
|
|
1233
|
-
};
|
|
1234
|
-
}
|
|
1235
|
-
class is {
|
|
1236
|
-
// Global properties
|
|
1237
|
-
appConfig = j;
|
|
1238
|
-
endpoint = "/";
|
|
1239
|
-
sessionToken = "";
|
|
1240
|
-
// Data Stores
|
|
1241
|
-
accountStore;
|
|
1242
|
-
appDataStore;
|
|
1243
|
-
analyticsStore;
|
|
1244
|
-
beatStore;
|
|
1245
|
-
budgetsStore;
|
|
1246
|
-
cashflowStore;
|
|
1247
|
-
categoryStore;
|
|
1248
|
-
connectStore;
|
|
1249
|
-
copyStore;
|
|
1250
|
-
debtsStore;
|
|
1251
|
-
finstrongStore;
|
|
1252
|
-
goalStore;
|
|
1253
|
-
helpStore;
|
|
1254
|
-
holdingStore;
|
|
1255
|
-
merchantStore;
|
|
1256
|
-
netWorthStore;
|
|
1257
|
-
notificationStore;
|
|
1258
|
-
recurringTransactionsStore;
|
|
1259
|
-
settingsStore;
|
|
1260
|
-
transactionStore;
|
|
1261
|
-
trendsStore;
|
|
1262
|
-
userStore;
|
|
1263
|
-
// UI Stores
|
|
1264
|
-
globalUiStore;
|
|
1265
|
-
constructor(t = j, e = "/") {
|
|
1266
|
-
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.accountStore = new wt(this), this.appDataStore = new le(this), this.analyticsStore = new te(this), this.beatStore = new Ct(this), this.budgetsStore = new ee(this), this.cashflowStore = new gt(this), this.categoryStore = new st(this), this.connectStore = new ue(this), this.copyStore = new Jt(this), this.debtsStore = new At(this), this.finstrongStore = new Et(this), this.goalStore = new pt(this), this.helpStore = new ce(this), this.holdingStore = new de(this), this.merchantStore = new Ft(this), this.netWorthStore = new Mt(this), this.notificationStore = new rt(this), this.recurringTransactionsStore = new St(this), this.settingsStore = new $t(this), this.transactionStore = new ht(this), this.trendsStore = new _t(this), this.userStore = new ge(this), this.globalUiStore = new he(this), _(this);
|
|
1267
|
-
}
|
|
1268
|
-
get isInitialized() {
|
|
1269
|
-
return this.globalUiStore.isInitialized;
|
|
1270
|
-
}
|
|
1271
|
-
loadData = async ({
|
|
1272
|
-
accounts: t,
|
|
1273
|
-
appData: e,
|
|
1274
|
-
associatedBeats: r,
|
|
1275
|
-
categories: a,
|
|
1276
|
-
institutions: o,
|
|
1277
|
-
transactionRules: d,
|
|
1278
|
-
transactions: c,
|
|
1279
|
-
userFeatures: i
|
|
1280
|
-
} = {}) => {
|
|
1281
|
-
await Promise.all([
|
|
1282
|
-
// Load copy, config and quser data
|
|
1283
|
-
this.copyStore.loadCopy(),
|
|
1284
|
-
this.appDataStore.loadAppData(e),
|
|
1285
|
-
this.userStore.loadUserFeatures(i)
|
|
1286
|
-
]), await Promise.all([
|
|
1287
|
-
this.accountStore.loadAccountData({ accounts: t, institutions: o }),
|
|
1288
|
-
this.categoryStore.loadCategories(a),
|
|
1289
|
-
this.transactionStore.loadTransactionData({
|
|
1290
|
-
associatedBeats: r,
|
|
1291
|
-
transactionRules: d,
|
|
1292
|
-
transactions: c
|
|
1293
|
-
})
|
|
1294
|
-
]), this.globalUiStore.setInitialized(!0);
|
|
1295
|
-
};
|
|
1296
|
-
}
|
|
1297
|
-
export {
|
|
1298
|
-
Fs as ANALYTICS_EVENTS,
|
|
1299
|
-
ks as AccountFilter,
|
|
1300
|
-
Us as AccountIcon,
|
|
1301
|
-
Os as AccountIconVariants,
|
|
1302
|
-
Nr as AccountNotificationTypes,
|
|
1303
|
-
Ls as AccountSubType,
|
|
1304
|
-
Gs as AccountType,
|
|
1305
|
-
Hs as AccountTypeName,
|
|
1306
|
-
ls as AnalyticsApi,
|
|
1307
|
-
l as ApiEndpoints,
|
|
1308
|
-
P as BannerApi,
|
|
1309
|
-
as as BarChart,
|
|
1310
|
-
ms as BeatApi,
|
|
1311
|
-
Fr as BudgetNotificationTypes,
|
|
1312
|
-
ws as Calendar,
|
|
1313
|
-
xs as CalendarSelectionTypes,
|
|
1314
|
-
ys as CategoryApi,
|
|
1315
|
-
ia as CategoryColors,
|
|
1316
|
-
ca as CategoryGuidToName,
|
|
1317
|
-
E as CategoryGuids,
|
|
1318
|
-
da as CategoryIcon,
|
|
1319
|
-
br as ConnectCard,
|
|
1320
|
-
Ps as ConnectDrawer,
|
|
1321
|
-
qs as ConnectionStatus,
|
|
1322
|
-
Ws as ConnectionStatusEnums,
|
|
1323
|
-
ha as CurrencyCodes,
|
|
1324
|
-
Js as CurrencyInput,
|
|
1325
|
-
vr as CurrencyText,
|
|
1326
|
-
zr as DATE_FORMATS_INTL,
|
|
1327
|
-
yt as DEFAULT_DONUT_SIZE,
|
|
1328
|
-
ft as DEFAULT_STROKE_WIDTH,
|
|
1329
|
-
ur as DataRow,
|
|
1330
|
-
Ms as DateRangeSelector,
|
|
1331
|
-
Xr as Dialog,
|
|
1332
|
-
Or as Donut,
|
|
1333
|
-
ea as Drawer,
|
|
1334
|
-
Er as EmptyState,
|
|
1335
|
-
As as ErrorBoundary,
|
|
1336
|
-
Qs as ErrorStatuses,
|
|
1337
|
-
re as ExpenseStatus,
|
|
1338
|
-
y as Fetch,
|
|
1339
|
-
hr as Frequency,
|
|
1340
|
-
M as GlobalCopyApi,
|
|
1341
|
-
Jt as GlobalCopyStore,
|
|
1342
|
-
xa as GlobalDataContext,
|
|
1343
|
-
Ca as GlobalDataProvider,
|
|
1344
|
-
is as GlobalStore,
|
|
1345
|
-
wr as GoalType,
|
|
1346
|
-
ra as INCOME_ACCOUNT_TYPES,
|
|
1347
|
-
dr as IconBacking,
|
|
1348
|
-
fr as InformationTooltip,
|
|
1349
|
-
Mr as InsightNotificationTypes,
|
|
1350
|
-
Lt as IterationItemTypes,
|
|
1351
|
-
Je as LOADING_STATUS,
|
|
1352
|
-
Gr as LineChart,
|
|
1353
|
-
Br as ListItemAction,
|
|
1354
|
-
Cs as ListItemWrapper,
|
|
1355
|
-
er as Loader,
|
|
1356
|
-
es as LocalizedCopyApi,
|
|
1357
|
-
xr as MetaType,
|
|
1358
|
-
Ys as MfaStatuses,
|
|
1359
|
-
Ts as MicroWidgetContainer,
|
|
1360
|
-
Is as MiniWidgetContainer,
|
|
1361
|
-
os as MultiSegmentDonut,
|
|
1362
|
-
zs as NonConnectedStatuses,
|
|
1363
|
-
Ss as NotificationApi,
|
|
1364
|
-
$r as NotificationTypes,
|
|
1365
|
-
Kr as ORDINAL_DATE_FORMAT,
|
|
1366
|
-
jr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
|
|
1367
|
-
aa as PAYMENT_ACCOUNT_TYPES,
|
|
1368
|
-
la as PaymentCategories,
|
|
1369
|
-
Ot as PlanTypes,
|
|
1370
|
-
Xs as ProcessingStatuses,
|
|
1371
|
-
Ks as PropertyType,
|
|
1372
|
-
js as PropertyTypeName,
|
|
1373
|
-
Ze as RECURRENCE_COPY,
|
|
1374
|
-
gr as RecurrenceStatus,
|
|
1375
|
-
pr as RecurrenceType,
|
|
1376
|
-
Ut as RecurrenceTypes,
|
|
1377
|
-
mr as RepeatingType,
|
|
1378
|
-
ns as ResponsiveButton,
|
|
1379
|
-
oa as SPENDING_ACCOUNT_TYPES,
|
|
1380
|
-
ae as ScheduledPaymentTypes,
|
|
1381
|
-
ss as ScheduledPaymentsApi,
|
|
1382
|
-
oe as ScreenSize,
|
|
1383
|
-
rr as SearchBox,
|
|
1384
|
-
_r as Select,
|
|
1385
|
-
or as SelectionBox,
|
|
1386
|
-
Jr as SingleSegmentDonut,
|
|
1387
|
-
Sa as Sizes,
|
|
1388
|
-
Pr as StackedLineChart,
|
|
1389
|
-
Qr as StatusBar,
|
|
1390
|
-
Vs as StatusName,
|
|
1391
|
-
ba as TOUCH_TARGET,
|
|
1392
|
-
ir as TabContentContainer,
|
|
1393
|
-
Rr as ToggleButtonListItem,
|
|
1394
|
-
kr as ToggleListItem,
|
|
1395
|
-
Cr as TrackType,
|
|
1396
|
-
Ds as TransactionStatus,
|
|
1397
|
-
at as TransactionType,
|
|
1398
|
-
$ as UserApi,
|
|
1399
|
-
ge as UserStore,
|
|
1400
|
-
se as UserVerification,
|
|
1401
|
-
q as WidgetApi,
|
|
1402
|
-
$s as WidgetContainer,
|
|
1403
|
-
Da as WidgetContainerContext,
|
|
1404
|
-
va as WidgetContainerProvider,
|
|
1405
|
-
us as analyticsSession,
|
|
1406
|
-
io as buildDynamicCopy,
|
|
1407
|
-
co as buildPluralCopy,
|
|
1408
|
-
ga as formatCurrency,
|
|
1409
|
-
Vr as formatDate,
|
|
1410
|
-
pa as formatOrdinal,
|
|
1411
|
-
ma as formatPercentage,
|
|
1412
|
-
oo as fromTimestampToMonthYear,
|
|
1413
|
-
Ja as getCategory,
|
|
1414
|
-
to as getCategoryTotalsByParent,
|
|
1415
|
-
ts as getClientTheme,
|
|
1416
|
-
_a as getCurrencyCodes,
|
|
1417
|
-
eo as getDetailedCategory,
|
|
1418
|
-
so as getDetailedSubCategory,
|
|
1419
|
-
lo as getLocale,
|
|
1420
|
-
ro as isIncome,
|
|
1421
|
-
ya as isValidNumber,
|
|
1422
|
-
Aa as useAccountStore,
|
|
1423
|
-
Ea as useAppConfig,
|
|
1424
|
-
Ta as useBudgetsStore,
|
|
1425
|
-
Ba as useCashflowStore,
|
|
1426
|
-
Ia as useCategoryStore,
|
|
1427
|
-
hs as useCombineEvents,
|
|
1428
|
-
gs as useCombinePageviews,
|
|
1429
|
-
Na as useDebtStore,
|
|
1430
|
-
Fa as useEvent,
|
|
1431
|
-
Ma as useFinstrongStore,
|
|
1432
|
-
$a as useGlobalCopyStore,
|
|
1433
|
-
Ra as useGlobalStore,
|
|
1434
|
-
ka as useGlobalUiStore,
|
|
1435
|
-
Ua as useGoalStore,
|
|
1436
|
-
Oa as useHelpStore,
|
|
1437
|
-
La as useHoldingStore,
|
|
1438
|
-
qr as useInsightsEnabled,
|
|
1439
|
-
Ga as useMerchantStore,
|
|
1440
|
-
Ha as useNetWorthStore,
|
|
1441
|
-
Pa as useNotificationStore,
|
|
1442
|
-
qa as usePageView,
|
|
1443
|
-
rs as usePrevious,
|
|
1444
|
-
Wa as useRecurringTransactionsStore,
|
|
1445
|
-
Va as useScreenSize,
|
|
1446
|
-
Qa as useSettingsStore,
|
|
1447
|
-
Ya as useTransactionStore,
|
|
1448
|
-
za as useTrendsStore,
|
|
1449
|
-
Xa as useUserStore,
|
|
1450
|
-
Ka as useWidgetContainerProvider
|
|
1451
|
-
};
|