@mx-cartographer/experiences 8.0.12 → 8.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/{ManageIncome-HM5-RrJO.mjs → ManageIncome-C_XOG9CZ.mjs} +1 -1
- package/dist/{RecurringSettings-CC1uVzua.mjs → RecurringSettings-Bt-zMwCB.mjs} +1 -1
- package/dist/{TransactionDetails-6QV_e5YL.mjs → TransactionDetails-DA6tdnu0.mjs} +437 -430
- package/dist/{TransactionStore-Bx9euVrY.mjs → TransactionStore-CbZfz7-2.mjs} +75 -70
- package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BJOZcYnB.mjs} +511 -518
- package/dist/accounts/index.es.js +1 -1
- package/dist/budgets/index.es.js +2 -2
- package/dist/cashflow/index.es.js +2 -2
- package/dist/common/index.es.js +2 -3
- package/dist/core/types/AppData.d.ts +0 -1
- package/dist/finstrong/index.es.js +2 -2
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +0 -1
- package/dist/recurringtransactions/index.es.js +4 -4
- package/dist/spending/index.es.js +1 -1
- package/dist/transactions/index.es.js +4 -4
- package/dist/trends/index.es.js +2 -3
- package/package.json +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { jsx as o, jsxs as M, Fragment as
|
|
2
|
-
import h, { useEffect as
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { CategoryIcon as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { L as
|
|
1
|
+
import { jsx as o, jsxs as M, Fragment as Se } from "react/jsx-runtime";
|
|
2
|
+
import h, { useEffect as re, useState as ne } from "react";
|
|
3
|
+
import { observer as U } from "mobx-react-lite";
|
|
4
|
+
import w from "@mui/material/Stack";
|
|
5
|
+
import ie from "@mui/material/Button";
|
|
6
|
+
import { CategoryIcon as Ge, MerchantLogo as ke, InstitutionLogo as Ue, P as me, Text as ue, H3 as ze } from "@mxenabled/mxui";
|
|
7
|
+
import { Icon as Ke, Close as Fe, ChevronLeft as $e, ChevronRight as Te } from "@mxenabled/mx-icons";
|
|
8
|
+
import { L as He } from "./Loader-D3rjKx72.mjs";
|
|
9
9
|
import H from "@mui/material/Box";
|
|
10
|
-
import
|
|
11
|
-
import { alpha as
|
|
12
|
-
import { useInView as
|
|
13
|
-
import { b as
|
|
14
|
-
import
|
|
15
|
-
import { b as
|
|
16
|
-
import
|
|
17
|
-
import { makeAutoObservable as
|
|
18
|
-
import { G as
|
|
19
|
-
import { B as
|
|
20
|
-
import { u as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
const
|
|
10
|
+
import ae from "@mui/material/IconButton";
|
|
11
|
+
import { alpha as s, useTheme as j } from "@mui/material/styles";
|
|
12
|
+
import { useInView as Re } from "react-intersection-observer";
|
|
13
|
+
import { b as je } from "./Category-CevNQ03n.mjs";
|
|
14
|
+
import se from "@mui/material/styles/useTheme";
|
|
15
|
+
import { b as Ye } from "./Localization-CPkpIwIx.mjs";
|
|
16
|
+
import Xe from "@mui/material/CircularProgress";
|
|
17
|
+
import { makeAutoObservable as ce, runInAction as Oe } from "mobx";
|
|
18
|
+
import { G as Ce, b as Ze, u as Qe, a as qe } from "./useCombineEvents-Bqojlv8q.mjs";
|
|
19
|
+
import { B as he } from "./BeatApi-EFHXULDx.mjs";
|
|
20
|
+
import { u as Je } from "./useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
21
|
+
import et from "@mui/material/Card";
|
|
22
|
+
import tt from "@mui/material/CardActionArea";
|
|
23
|
+
import ot from "@mui/material/Avatar";
|
|
24
|
+
const ge = {
|
|
25
25
|
featureVersion: "spendVsIncomeTrends"
|
|
26
26
|
};
|
|
27
|
-
class
|
|
28
|
-
copyApi = new
|
|
27
|
+
class nt {
|
|
28
|
+
copyApi = new Ce("/", "");
|
|
29
29
|
copyObject = {};
|
|
30
30
|
namespace = "experiences";
|
|
31
31
|
translationKey = "micro_insights";
|
|
32
32
|
constructor() {
|
|
33
|
-
|
|
33
|
+
ce(this);
|
|
34
34
|
}
|
|
35
35
|
// NOTE: Not sure if this is special case, but other stores have this deprecation todo
|
|
36
36
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
37
37
|
// TODO: Remove this function
|
|
38
38
|
initialize = async (e, n) => {
|
|
39
|
-
this.copyApi = new
|
|
39
|
+
this.copyApi = new Ce(e, n), await this.loadCopy();
|
|
40
40
|
};
|
|
41
41
|
loadCopy = async () => {
|
|
42
42
|
const e = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
43
|
-
|
|
43
|
+
Oe(() => {
|
|
44
44
|
this.copyObject = e[this.translationKey];
|
|
45
45
|
});
|
|
46
46
|
};
|
|
@@ -54,7 +54,7 @@ class rt {
|
|
|
54
54
|
return this.copyObject.zero_state;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const le = {
|
|
58
58
|
BillAmountNotStandard: "BillAmountNotStandard",
|
|
59
59
|
CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
|
|
60
60
|
DuplicatePaymentV2: "DuplicatePaymentV2",
|
|
@@ -71,38 +71,38 @@ const de = {
|
|
|
71
71
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
72
72
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
73
73
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
74
|
-
},
|
|
74
|
+
}, R = window?.app?.clientConfig?.microwidget_instance_id || "", Ee = {
|
|
75
75
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
76
|
-
},
|
|
76
|
+
}, We = (t) => `on${t}Click`, we = (t) => `on${t}View`, Me = (t) => `on${t}ViewFirstTime`, de = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), rt = () => Object.values(le).reduce(
|
|
77
77
|
(t, e) => ({
|
|
78
78
|
...t,
|
|
79
|
-
[
|
|
79
|
+
[We(e)]: {
|
|
80
80
|
action: D.MICRO_BEAT_CLICKED,
|
|
81
81
|
category: L.BEAT_INTERACTION,
|
|
82
|
-
label:
|
|
83
|
-
value:
|
|
82
|
+
label: de(e),
|
|
83
|
+
value: R
|
|
84
84
|
}
|
|
85
85
|
}),
|
|
86
86
|
{}
|
|
87
|
-
),
|
|
87
|
+
), it = () => Object.values(le).reduce(
|
|
88
88
|
(t, e) => ({
|
|
89
89
|
...t,
|
|
90
|
-
[
|
|
90
|
+
[we(e)]: {
|
|
91
91
|
action: D.MICRO_BEAT_DISPLAYED,
|
|
92
92
|
category: L.BEAT_INTERACTION,
|
|
93
|
-
label:
|
|
94
|
-
value:
|
|
93
|
+
label: de(e),
|
|
94
|
+
value: R
|
|
95
95
|
}
|
|
96
96
|
}),
|
|
97
97
|
{}
|
|
98
|
-
),
|
|
98
|
+
), at = () => Object.values(le).reduce(
|
|
99
99
|
(t, e) => ({
|
|
100
100
|
...t,
|
|
101
|
-
[
|
|
101
|
+
[Me(e)]: {
|
|
102
102
|
action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
103
103
|
category: L.BEAT_INTERACTION,
|
|
104
|
-
label:
|
|
105
|
-
value:
|
|
104
|
+
label: de(e),
|
|
105
|
+
value: R
|
|
106
106
|
}
|
|
107
107
|
}),
|
|
108
108
|
{}
|
|
@@ -114,14 +114,14 @@ const de = {
|
|
|
114
114
|
}, L = {
|
|
115
115
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
116
116
|
BEAT_INTERACTION: "Beat Interaction"
|
|
117
|
-
},
|
|
117
|
+
}, O = {
|
|
118
118
|
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
|
119
119
|
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
|
120
120
|
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
|
121
121
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
122
122
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
123
123
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
124
|
-
},
|
|
124
|
+
}, Ne = {
|
|
125
125
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
126
126
|
}, D = {
|
|
127
127
|
CONTROL_BACKWARD: "Control Backward",
|
|
@@ -135,91 +135,91 @@ const de = {
|
|
|
135
135
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
136
136
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
137
137
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
138
|
-
},
|
|
138
|
+
}, Ie = {
|
|
139
139
|
[G.MICRO_WIDGET_CAROUSEL]: {
|
|
140
140
|
label: b.MICRO_WIDGET,
|
|
141
141
|
name: G.MICRO_WIDGET_CAROUSEL,
|
|
142
|
-
path:
|
|
143
|
-
value:
|
|
142
|
+
path: Ee.INSIGHTS_MICRO_WIDGET,
|
|
143
|
+
value: R
|
|
144
144
|
},
|
|
145
145
|
// zero state
|
|
146
146
|
[G.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
147
147
|
label: b.MICRO_WIDGET,
|
|
148
148
|
name: G.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
149
|
-
path:
|
|
150
|
-
value:
|
|
149
|
+
path: Ee.INSIGHTS_MICRO_WIDGET,
|
|
150
|
+
value: R
|
|
151
151
|
},
|
|
152
152
|
// no relevant cards
|
|
153
153
|
[G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
154
154
|
label: b.MICRO_WIDGET,
|
|
155
155
|
name: G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
156
156
|
path: "/micro-widget",
|
|
157
|
-
value:
|
|
157
|
+
value: R
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, fe = {
|
|
160
160
|
// carousel control interaction events - clicks and swipes
|
|
161
|
-
[
|
|
161
|
+
[O.ON_CAROUSEL_BACK_CLICK]: {
|
|
162
162
|
action: D.CONTROL_BACKWARD,
|
|
163
163
|
category: L.MICRO_WIDGET_INTERACTION,
|
|
164
164
|
label: b.CAROUSEL_CONTROL,
|
|
165
|
-
value:
|
|
165
|
+
value: R
|
|
166
166
|
},
|
|
167
|
-
[
|
|
167
|
+
[O.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
168
168
|
action: D.CONTROL_FORWARD,
|
|
169
169
|
category: L.MICRO_WIDGET_INTERACTION,
|
|
170
170
|
label: b.CAROUSEL_CONTROL,
|
|
171
|
-
value:
|
|
171
|
+
value: R
|
|
172
172
|
},
|
|
173
|
-
[
|
|
173
|
+
[O.ON_CAROUSEL_BACK_SWIPE]: {
|
|
174
174
|
action: D.SWIPE_BACKWARD,
|
|
175
175
|
category: L.MICRO_WIDGET_INTERACTION,
|
|
176
176
|
label: b.CAROUSEL_CONTROL,
|
|
177
|
-
value:
|
|
177
|
+
value: R
|
|
178
178
|
},
|
|
179
|
-
[
|
|
179
|
+
[O.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
180
180
|
action: D.SWIPE_FORWARD,
|
|
181
181
|
category: L.MICRO_WIDGET_INTERACTION,
|
|
182
182
|
label: b.CAROUSEL_CONTROL,
|
|
183
|
-
value:
|
|
183
|
+
value: R
|
|
184
184
|
},
|
|
185
185
|
// read more card events
|
|
186
|
-
[
|
|
186
|
+
[O.ON_VIEW_MORE_CLICKED]: {
|
|
187
187
|
action: D.MICRO_BEAT_CLICKED,
|
|
188
188
|
category: L.BEAT_INTERACTION,
|
|
189
189
|
label: b.VIEW_MORE,
|
|
190
|
-
value:
|
|
190
|
+
value: R
|
|
191
191
|
},
|
|
192
|
-
[
|
|
192
|
+
[Ne.ON_VIEW_MORE_VIEWED]: {
|
|
193
193
|
action: D.MICRO_BEAT_DISPLAYED,
|
|
194
194
|
category: L.BEAT_INTERACTION,
|
|
195
195
|
label: b.VIEW_MORE,
|
|
196
|
-
value:
|
|
196
|
+
value: R
|
|
197
197
|
},
|
|
198
|
+
...rt(),
|
|
198
199
|
...it(),
|
|
199
|
-
...at()
|
|
200
|
-
|
|
201
|
-
}, Ae = async (t, e) => !e || !ye[t] ? null : e.sendAnalyticEvent(ye[t]).then((n) => n).catch((n) => {
|
|
200
|
+
...at()
|
|
201
|
+
}, ye = async (t, e) => !e || !fe[t] ? null : e.sendAnalyticEvent(fe[t]).then((n) => n).catch((n) => {
|
|
202
202
|
throw n;
|
|
203
|
-
}),
|
|
203
|
+
}), Ae = async (t, e) => !e || !Ie[t] ? null : e.sendAnalyticsPageview(Ie[t]).then((n) => n).catch((n) => {
|
|
204
204
|
throw n;
|
|
205
205
|
});
|
|
206
|
-
class
|
|
207
|
-
onAnalyticEvent =
|
|
208
|
-
onAnalyticPageView =
|
|
209
|
-
beatApi = new
|
|
206
|
+
class st {
|
|
207
|
+
onAnalyticEvent = ye;
|
|
208
|
+
onAnalyticPageView = Ae;
|
|
209
|
+
beatApi = new he("/", "");
|
|
210
210
|
constructor() {
|
|
211
|
-
|
|
211
|
+
ce(this);
|
|
212
212
|
}
|
|
213
213
|
initialize = async (e, n, r) => {
|
|
214
|
-
this.onAnalyticEvent = (i,
|
|
215
|
-
|
|
216
|
-
throw
|
|
214
|
+
this.onAnalyticEvent = (i, l) => {
|
|
215
|
+
ye(i, l).then((a) => a).catch((a) => {
|
|
216
|
+
throw a.status === 401 && r(), a;
|
|
217
217
|
});
|
|
218
|
-
}, this.onAnalyticPageView = (i,
|
|
219
|
-
|
|
220
|
-
throw
|
|
218
|
+
}, this.onAnalyticPageView = (i, l) => {
|
|
219
|
+
Ae(i, l).then((a) => a).catch((a) => {
|
|
220
|
+
throw a.status === 401 && r(), a;
|
|
221
221
|
});
|
|
222
|
-
}, this.beatApi = new
|
|
222
|
+
}, this.beatApi = new he(e, n);
|
|
223
223
|
};
|
|
224
224
|
updateBeat = async (e) => {
|
|
225
225
|
this.beatApi.updateBeat(e);
|
|
@@ -228,7 +228,7 @@ class ct {
|
|
|
228
228
|
this.beatApi.updateOffer(e);
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
|
-
class
|
|
231
|
+
class ct {
|
|
232
232
|
copyStore;
|
|
233
233
|
endpoint = "/";
|
|
234
234
|
insightsMicroWidgetStore;
|
|
@@ -236,33 +236,33 @@ class lt {
|
|
|
236
236
|
token = "";
|
|
237
237
|
isInitialized = !1;
|
|
238
238
|
constructor() {
|
|
239
|
-
this.copyStore = new
|
|
239
|
+
this.copyStore = new nt(), this.insightsMicroWidgetStore = new st(), ce(this);
|
|
240
240
|
}
|
|
241
241
|
initialize = async (e, n, r) => {
|
|
242
242
|
await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n, r);
|
|
243
|
-
const i = await
|
|
244
|
-
|
|
243
|
+
const i = await Ze(e, n, "1.0.0", "Micro Insights Carousel");
|
|
244
|
+
Oe(() => {
|
|
245
245
|
this.session = i, this.isInitialized = !0;
|
|
246
246
|
});
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
const Y = h.createContext(null),
|
|
249
|
+
const Y = h.createContext(null), lt = ({
|
|
250
250
|
onEvent: t,
|
|
251
251
|
onPageview: e,
|
|
252
252
|
store: n,
|
|
253
253
|
children: r
|
|
254
|
-
}) => /* @__PURE__ */ o(Y.Provider, { value: { onEvent: t, onPageview: e, store: n, children: r }, children: r }),
|
|
255
|
-
const { primary_category_guid: e, category_guids: n } = t, r = e || n?.[0] ||
|
|
256
|
-
return /* @__PURE__ */ o(
|
|
257
|
-
},
|
|
254
|
+
}) => /* @__PURE__ */ o(Y.Provider, { value: { onEvent: t, onPageview: e, store: n, children: r }, children: r }), dt = ({ beat: t }) => {
|
|
255
|
+
const { primary_category_guid: e, category_guids: n } = t, r = e || n?.[0] || je.UNCATEGORIZED;
|
|
256
|
+
return /* @__PURE__ */ o(Ge, { categoryGuid: r, size: 32, sx: { minWidth: 32 } });
|
|
257
|
+
}, _t = ({
|
|
258
258
|
avatarSx: t,
|
|
259
259
|
bgColor: e,
|
|
260
260
|
name: n,
|
|
261
261
|
iconColor: r = "primary",
|
|
262
262
|
fill: i = !0,
|
|
263
|
-
sx:
|
|
263
|
+
sx: l
|
|
264
264
|
}) => /* @__PURE__ */ o(
|
|
265
|
-
|
|
265
|
+
ot,
|
|
266
266
|
{
|
|
267
267
|
sx: {
|
|
268
268
|
bgcolor: e,
|
|
@@ -271,12 +271,12 @@ const Y = h.createContext(null), dt = ({
|
|
|
271
271
|
...t
|
|
272
272
|
},
|
|
273
273
|
variant: "rounded",
|
|
274
|
-
children: /* @__PURE__ */ o(
|
|
274
|
+
children: /* @__PURE__ */ o(Ke, { color: r, fill: i, name: n, size: 20, sx: l })
|
|
275
275
|
}
|
|
276
|
-
),
|
|
276
|
+
), c = _t, pt = ({ beat: t }) => {
|
|
277
277
|
const { category_guids: e, merchant_guids: n, primary_category_guid: r, primary_merchant_guid: i } = t;
|
|
278
278
|
return /* @__PURE__ */ o(
|
|
279
|
-
|
|
279
|
+
ke,
|
|
280
280
|
{
|
|
281
281
|
categoryGuid: r || e && e[0] || "",
|
|
282
282
|
merchantGuid: i || n[0],
|
|
@@ -288,181 +288,181 @@ const Y = h.createContext(null), dt = ({
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
);
|
|
291
|
-
},
|
|
291
|
+
}, mt = (t) => t ? t.data ? t.data.map((e) => {
|
|
292
292
|
const n = {};
|
|
293
293
|
return t.names?.map((r, i) => {
|
|
294
294
|
n[r] = e[i];
|
|
295
295
|
}), n;
|
|
296
|
-
}) : [] : [], q = "primary",
|
|
297
|
-
const e =
|
|
296
|
+
}) : [] : [], q = "primary", be = "success", Le = "error", De = (t) => {
|
|
297
|
+
const e = mt(t), n = Math.floor(e.length / 2);
|
|
298
298
|
if (n === 0 || n === e.length) return q;
|
|
299
299
|
const r = e[0]?.amount, i = e[n]?.amount;
|
|
300
|
-
return r == null || i == null ? q : r > i ?
|
|
301
|
-
},
|
|
302
|
-
const e =
|
|
303
|
-
return /* @__PURE__ */ o(
|
|
304
|
-
},
|
|
305
|
-
const e =
|
|
300
|
+
return r == null || i == null ? q : r > i ? Le : r < i ? be : q;
|
|
301
|
+
}, ut = (t, e) => t < e ? be : t > e ? Le : q, Ct = ({ beat: t }) => {
|
|
302
|
+
const e = se(), n = De(t.data_series), r = e.palette[n].main;
|
|
303
|
+
return /* @__PURE__ */ o(c, { bgColor: s(r, 0.15), iconColor: n, name: "bar_chart" });
|
|
304
|
+
}, ht = ({ beat: t }) => {
|
|
305
|
+
const e = se(), n = t.payload?.average_spend || 0;
|
|
306
306
|
let r = 0;
|
|
307
307
|
if (t.data_series?.data && t.data_series.data.length > 0) {
|
|
308
|
-
const
|
|
309
|
-
|
|
308
|
+
const a = (t.data_series.names || []).indexOf("amount");
|
|
309
|
+
a !== -1 && (r = t.data_series.data[0][a] || 0);
|
|
310
310
|
}
|
|
311
|
-
const i =
|
|
311
|
+
const i = ut(r, n);
|
|
312
312
|
return /* @__PURE__ */ o(
|
|
313
|
-
|
|
313
|
+
c,
|
|
314
314
|
{
|
|
315
|
-
bgColor:
|
|
315
|
+
bgColor: s(e.palette[i].main, 0.15),
|
|
316
316
|
iconColor: i,
|
|
317
317
|
name: "timeline"
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
|
-
},
|
|
321
|
-
const e =
|
|
320
|
+
}, gt = ({ beat: t }) => {
|
|
321
|
+
const e = se(), n = De(t.data_series), r = e.palette[n].main;
|
|
322
322
|
return /* @__PURE__ */ o(
|
|
323
|
-
|
|
323
|
+
c,
|
|
324
324
|
{
|
|
325
|
-
bgColor:
|
|
325
|
+
bgColor: s(r, 0.15),
|
|
326
326
|
fill: !1,
|
|
327
327
|
iconColor: n,
|
|
328
328
|
name: "area_chart"
|
|
329
329
|
}
|
|
330
330
|
);
|
|
331
|
-
},
|
|
332
|
-
0: (t, e) => /* @__PURE__ */ o(
|
|
333
|
-
1: (t) => /* @__PURE__ */ o(
|
|
334
|
-
2: (t) => /* @__PURE__ */ o(
|
|
335
|
-
3: (t) => /* @__PURE__ */ o(
|
|
331
|
+
}, Et = ({ beat: t }) => /* @__PURE__ */ o(Ue, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), It = {
|
|
332
|
+
0: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" }),
|
|
333
|
+
1: (t) => /* @__PURE__ */ o(dt, { beat: t }),
|
|
334
|
+
2: (t) => /* @__PURE__ */ o(pt, { beat: t }),
|
|
335
|
+
3: (t) => /* @__PURE__ */ o(Ct, { beat: t }),
|
|
336
336
|
4: (t, e) => /* @__PURE__ */ o(
|
|
337
|
-
|
|
337
|
+
c,
|
|
338
338
|
{
|
|
339
|
-
bgColor:
|
|
339
|
+
bgColor: s(e.palette.secondary.main, 0.15),
|
|
340
340
|
iconColor: "secondary",
|
|
341
341
|
name: "info"
|
|
342
342
|
}
|
|
343
343
|
),
|
|
344
|
-
5: (t, e) => /* @__PURE__ */ o(
|
|
344
|
+
5: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "campaign" }),
|
|
345
345
|
6: (t, e) => /* @__PURE__ */ o(
|
|
346
|
-
|
|
346
|
+
c,
|
|
347
347
|
{
|
|
348
|
-
bgColor:
|
|
348
|
+
bgColor: s(e.palette.success.main, 0.15),
|
|
349
349
|
iconColor: "success",
|
|
350
350
|
name: "check_circle"
|
|
351
351
|
}
|
|
352
352
|
),
|
|
353
|
-
7: (t, e) => /* @__PURE__ */ o(
|
|
354
|
-
8: (t, e) => /* @__PURE__ */ o(
|
|
355
|
-
9: (t, e) => /* @__PURE__ */ o(
|
|
353
|
+
7: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "today" }),
|
|
354
|
+
8: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_clock" }),
|
|
355
|
+
9: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "celebration" }),
|
|
356
356
|
// TODO: Waiting for the backend to accommodate the below icon types
|
|
357
|
-
10: (t, e) => /* @__PURE__ */ o(
|
|
357
|
+
10: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "problem" }),
|
|
358
358
|
11: (t, e) => /* @__PURE__ */ o(
|
|
359
|
-
|
|
359
|
+
c,
|
|
360
360
|
{
|
|
361
361
|
avatarSx: { border: `1px solid ${e.palette.secondary.main}` },
|
|
362
|
-
bgColor:
|
|
362
|
+
bgColor: s(e.palette.secondary.main, 0.15),
|
|
363
363
|
fill: !1,
|
|
364
364
|
name: "category",
|
|
365
365
|
sx: { color: "text.primary" }
|
|
366
366
|
}
|
|
367
367
|
),
|
|
368
|
-
12: (t) => /* @__PURE__ */ o(
|
|
368
|
+
12: (t) => /* @__PURE__ */ o(gt, { beat: t }),
|
|
369
369
|
13: () => /* @__PURE__ */ o(
|
|
370
|
-
|
|
370
|
+
c,
|
|
371
371
|
{
|
|
372
372
|
avatarSx: { border: "1px solid #EB00D0" },
|
|
373
|
-
bgColor:
|
|
373
|
+
bgColor: s("#EB00D0", 0.25),
|
|
374
374
|
fill: !1,
|
|
375
375
|
name: "money_bag",
|
|
376
376
|
sx: { color: "text.primary" }
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
379
|
14: (t, e) => /* @__PURE__ */ o(
|
|
380
|
-
|
|
380
|
+
c,
|
|
381
381
|
{
|
|
382
|
-
bgColor:
|
|
382
|
+
bgColor: s(e.palette.secondary.main, 0.15),
|
|
383
383
|
fill: !1,
|
|
384
384
|
iconColor: "secondary",
|
|
385
385
|
name: "person"
|
|
386
386
|
}
|
|
387
387
|
),
|
|
388
|
-
15: (t, e) => /* @__PURE__ */ o(
|
|
388
|
+
15: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "payment_arrow_down" }),
|
|
389
389
|
16: (t, e) => /* @__PURE__ */ o(
|
|
390
|
-
|
|
390
|
+
c,
|
|
391
391
|
{
|
|
392
|
-
bgColor:
|
|
392
|
+
bgColor: s(e.palette.success.main, 0.15),
|
|
393
393
|
name: "beenhere",
|
|
394
394
|
sx: { color: "success.main" }
|
|
395
395
|
}
|
|
396
396
|
),
|
|
397
|
-
17: (t, e) => /* @__PURE__ */ o(
|
|
397
|
+
17: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "savings" }),
|
|
398
398
|
18: (t, e) => /* @__PURE__ */ o(
|
|
399
|
-
|
|
399
|
+
c,
|
|
400
400
|
{
|
|
401
|
-
bgColor: t.payload.projected_overdraft_amount < 0 ?
|
|
401
|
+
bgColor: t.payload.projected_overdraft_amount < 0 ? s(e.palette.warning.main, 0.15) : s(e.palette.error.main, 0.15),
|
|
402
402
|
iconColor: t?.payload?.projected_overdraft_amount < 0 ? "warning" : "error",
|
|
403
403
|
name: "error"
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
|
-
19: (t, e) => /* @__PURE__ */ o(
|
|
407
|
-
20: (t, e) => /* @__PURE__ */ o(
|
|
408
|
-
21: (t, e) => /* @__PURE__ */ o(
|
|
406
|
+
19: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "finance_mode" }),
|
|
407
|
+
20: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "tips_and_updates" }),
|
|
408
|
+
21: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "currency_exchange" }),
|
|
409
409
|
22: (t, e) => /* @__PURE__ */ o(
|
|
410
|
-
|
|
410
|
+
c,
|
|
411
411
|
{
|
|
412
|
-
bgColor:
|
|
412
|
+
bgColor: s(e.palette.warning.main, 0.15),
|
|
413
413
|
name: "flag",
|
|
414
414
|
sx: { color: "warning.main" }
|
|
415
415
|
}
|
|
416
416
|
),
|
|
417
|
-
23: (t, e) => /* @__PURE__ */ o(
|
|
417
|
+
23: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "thumb_up" }),
|
|
418
418
|
24: () => /* @__PURE__ */ o(
|
|
419
|
-
|
|
419
|
+
c,
|
|
420
420
|
{
|
|
421
|
-
bgColor:
|
|
421
|
+
bgColor: s("#EB00D0", 0.15),
|
|
422
422
|
name: "attach_money",
|
|
423
423
|
sx: { color: "#EB00D0" }
|
|
424
424
|
}
|
|
425
425
|
),
|
|
426
|
-
25: (t, e) => /* @__PURE__ */ o(
|
|
426
|
+
25: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "note_stack" }),
|
|
427
427
|
26: (t, e) => /* @__PURE__ */ o(
|
|
428
|
-
|
|
428
|
+
c,
|
|
429
429
|
{
|
|
430
|
-
bgColor:
|
|
430
|
+
bgColor: s(e.palette.primary.main, 0.15),
|
|
431
431
|
fill: !1,
|
|
432
432
|
name: "price_change"
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
|
-
27: (t, e) => /* @__PURE__ */ o(
|
|
436
|
-
28: (t, e) => /* @__PURE__ */ o(
|
|
437
|
-
29: (t) => /* @__PURE__ */ o(
|
|
438
|
-
30: (t, e) => /* @__PURE__ */ o(
|
|
435
|
+
27: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "directions_car" }),
|
|
436
|
+
28: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "contract" }),
|
|
437
|
+
29: (t) => /* @__PURE__ */ o(ht, { beat: t }),
|
|
438
|
+
30: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_month" }),
|
|
439
439
|
31: (t, e) => /* @__PURE__ */ o(
|
|
440
|
-
|
|
440
|
+
c,
|
|
441
441
|
{
|
|
442
|
-
bgColor:
|
|
442
|
+
bgColor: s(e.palette.warning.main, 0.15),
|
|
443
443
|
name: "star_rate",
|
|
444
444
|
sx: { color: "warning.400" }
|
|
445
445
|
}
|
|
446
446
|
),
|
|
447
|
-
32: (t, e) => /* @__PURE__ */ o(
|
|
447
|
+
32: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "help" }),
|
|
448
448
|
33: (t, e) => /* @__PURE__ */ o(
|
|
449
|
-
|
|
449
|
+
c,
|
|
450
450
|
{
|
|
451
|
-
bgColor:
|
|
451
|
+
bgColor: s(e.palette.primary.main, 0.15),
|
|
452
452
|
fill: !1,
|
|
453
453
|
name: "storefront"
|
|
454
454
|
}
|
|
455
455
|
),
|
|
456
|
-
34: (t) => /* @__PURE__ */ o(
|
|
457
|
-
},
|
|
458
|
-
const e = j(), { icon_type: n } = t, r = n != null ?
|
|
459
|
-
return r ? r(t, e) : /* @__PURE__ */ o(
|
|
456
|
+
34: (t) => /* @__PURE__ */ o(Et, { beat: t })
|
|
457
|
+
}, ft = ({ beat: t }) => {
|
|
458
|
+
const e = j(), { icon_type: n } = t, r = n != null ? It[n] : null;
|
|
459
|
+
return r ? r(t, e) : /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" });
|
|
460
460
|
}, x = () => {
|
|
461
461
|
const t = h.useContext(Y);
|
|
462
462
|
if (!t)
|
|
463
463
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
464
464
|
return t.store.copyStore;
|
|
465
|
-
},
|
|
465
|
+
}, yt = () => {
|
|
466
466
|
const t = h.useContext(Y);
|
|
467
467
|
if (!t?.store?.insightsMicroWidgetStore)
|
|
468
468
|
throw new Error(
|
|
@@ -474,62 +474,62 @@ const Y = h.createContext(null), dt = ({
|
|
|
474
474
|
if (!t)
|
|
475
475
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
476
476
|
return { onEvent: t.onEvent };
|
|
477
|
-
},
|
|
477
|
+
}, xe = () => {
|
|
478
478
|
const t = h.useContext(Y);
|
|
479
479
|
if (!t)
|
|
480
480
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
481
481
|
return { onPageview: t.onPageview };
|
|
482
|
-
},
|
|
482
|
+
}, At = {
|
|
483
483
|
LARGE: 180,
|
|
484
484
|
STANDARD: 154,
|
|
485
485
|
XLARGE: 200,
|
|
486
486
|
XXLARGE: 248
|
|
487
|
-
},
|
|
487
|
+
}, St = 50, ve = 1, Tt = h.forwardRef(
|
|
488
488
|
function({
|
|
489
489
|
ariaLabel: e,
|
|
490
490
|
cardSx: n,
|
|
491
491
|
closeAriaLabel: r,
|
|
492
492
|
description: i,
|
|
493
|
-
icon:
|
|
494
|
-
isActiveCard:
|
|
495
|
-
hasCardEffect:
|
|
496
|
-
heightOverrides:
|
|
497
|
-
onClose:
|
|
498
|
-
onCardClick:
|
|
499
|
-
onPrimaryAction:
|
|
500
|
-
onSecondaryAction:
|
|
501
|
-
primaryActionText:
|
|
502
|
-
secondaryActionText:
|
|
503
|
-
title:
|
|
504
|
-
variant:
|
|
505
|
-
widthOverrides:
|
|
506
|
-
...
|
|
507
|
-
},
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
|
|
493
|
+
icon: l,
|
|
494
|
+
isActiveCard: a,
|
|
495
|
+
hasCardEffect: u = !1,
|
|
496
|
+
heightOverrides: I,
|
|
497
|
+
onClose: g,
|
|
498
|
+
onCardClick: d,
|
|
499
|
+
onPrimaryAction: _,
|
|
500
|
+
onSecondaryAction: p,
|
|
501
|
+
primaryActionText: m,
|
|
502
|
+
secondaryActionText: f,
|
|
503
|
+
title: S,
|
|
504
|
+
variant: y,
|
|
505
|
+
widthOverrides: A,
|
|
506
|
+
...N
|
|
507
|
+
}, z) {
|
|
508
|
+
const E = !!(_ && m), v = !!(p && f), P = u ? et : H, T = /* @__PURE__ */ M(Se, { children: [
|
|
509
|
+
g && /* @__PURE__ */ o(
|
|
510
|
+
ae,
|
|
511
511
|
{
|
|
512
512
|
"aria-label": r,
|
|
513
|
-
onClick: (
|
|
514
|
-
|
|
513
|
+
onClick: (C) => {
|
|
514
|
+
C.stopPropagation(), g?.();
|
|
515
515
|
},
|
|
516
|
-
onMouseDown: (
|
|
517
|
-
|
|
516
|
+
onMouseDown: (C) => {
|
|
517
|
+
C.stopPropagation();
|
|
518
518
|
},
|
|
519
|
-
onTouchStart: (
|
|
520
|
-
|
|
519
|
+
onTouchStart: (C) => {
|
|
520
|
+
C.stopPropagation();
|
|
521
521
|
},
|
|
522
522
|
sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
|
|
523
|
-
children: /* @__PURE__ */ o(
|
|
523
|
+
children: /* @__PURE__ */ o(Fe, {})
|
|
524
524
|
}
|
|
525
525
|
),
|
|
526
|
-
/* @__PURE__ */ M(
|
|
527
|
-
/* @__PURE__ */ M(
|
|
528
|
-
|
|
529
|
-
/* @__PURE__ */ M(
|
|
530
|
-
/* @__PURE__ */ o(
|
|
526
|
+
/* @__PURE__ */ M(w, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
|
|
527
|
+
/* @__PURE__ */ M(w, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
528
|
+
l && l,
|
|
529
|
+
/* @__PURE__ */ M(w, { sx: { gap: 6 }, children: [
|
|
530
|
+
/* @__PURE__ */ o(w, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(me, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: S }) }),
|
|
531
531
|
/* @__PURE__ */ o(
|
|
532
|
-
|
|
532
|
+
me,
|
|
533
533
|
{
|
|
534
534
|
dangerouslySetInnerHTML: { __html: i },
|
|
535
535
|
sx: {
|
|
@@ -537,7 +537,7 @@ const Y = h.createContext(null), dt = ({
|
|
|
537
537
|
overflow: "hidden",
|
|
538
538
|
textOverflow: "ellipsis",
|
|
539
539
|
WebkitBoxOrient: "vertical",
|
|
540
|
-
WebkitLineClamp:
|
|
540
|
+
WebkitLineClamp: E ? 2 : 3,
|
|
541
541
|
"& .bold-copy": {
|
|
542
542
|
fontWeight: "bold",
|
|
543
543
|
fontFamily: "inherit"
|
|
@@ -548,51 +548,51 @@ const Y = h.createContext(null), dt = ({
|
|
|
548
548
|
)
|
|
549
549
|
] })
|
|
550
550
|
] }),
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
E && /* @__PURE__ */ M(
|
|
552
|
+
w,
|
|
553
553
|
{
|
|
554
554
|
sx: {
|
|
555
555
|
alignItems: "center",
|
|
556
556
|
flexDirection: "row",
|
|
557
557
|
height: 28,
|
|
558
558
|
pb: 4,
|
|
559
|
-
pl:
|
|
559
|
+
pl: l ? 36 : 0
|
|
560
560
|
},
|
|
561
561
|
children: [
|
|
562
|
-
|
|
563
|
-
|
|
562
|
+
E && /* @__PURE__ */ o(
|
|
563
|
+
ie,
|
|
564
564
|
{
|
|
565
|
-
onClick: (
|
|
566
|
-
|
|
565
|
+
onClick: (C) => {
|
|
566
|
+
C.stopPropagation(), _?.();
|
|
567
567
|
},
|
|
568
|
-
onMouseDown: (
|
|
569
|
-
|
|
568
|
+
onMouseDown: (C) => {
|
|
569
|
+
C.stopPropagation();
|
|
570
570
|
},
|
|
571
|
-
onTouchStart: (
|
|
572
|
-
|
|
571
|
+
onTouchStart: (C) => {
|
|
572
|
+
C.stopPropagation();
|
|
573
573
|
},
|
|
574
574
|
size: "small",
|
|
575
|
-
sx: { px: 8, ml:
|
|
575
|
+
sx: { px: 8, ml: l ? 0 : -8 },
|
|
576
576
|
variant: "text",
|
|
577
|
-
children: /* @__PURE__ */ o(
|
|
577
|
+
children: /* @__PURE__ */ o(ue, { bold: !0, variant: "body2", children: m })
|
|
578
578
|
}
|
|
579
579
|
),
|
|
580
|
-
|
|
581
|
-
|
|
580
|
+
v && /* @__PURE__ */ o(
|
|
581
|
+
ie,
|
|
582
582
|
{
|
|
583
|
-
onClick: (
|
|
584
|
-
|
|
583
|
+
onClick: (C) => {
|
|
584
|
+
C.stopPropagation(), p?.();
|
|
585
585
|
},
|
|
586
|
-
onMouseDown: (
|
|
587
|
-
|
|
586
|
+
onMouseDown: (C) => {
|
|
587
|
+
C.stopPropagation();
|
|
588
588
|
},
|
|
589
|
-
onTouchStart: (
|
|
590
|
-
|
|
589
|
+
onTouchStart: (C) => {
|
|
590
|
+
C.stopPropagation();
|
|
591
591
|
},
|
|
592
592
|
size: "small",
|
|
593
593
|
sx: { px: 8 },
|
|
594
594
|
variant: "text",
|
|
595
|
-
children: /* @__PURE__ */ o(
|
|
595
|
+
children: /* @__PURE__ */ o(ue, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: f })
|
|
596
596
|
}
|
|
597
597
|
)
|
|
598
598
|
]
|
|
@@ -603,87 +603,87 @@ const Y = h.createContext(null), dt = ({
|
|
|
603
603
|
return /* @__PURE__ */ o(
|
|
604
604
|
P,
|
|
605
605
|
{
|
|
606
|
-
"aria-hidden": !
|
|
606
|
+
"aria-hidden": !a,
|
|
607
607
|
"aria-label": e,
|
|
608
|
-
ref:
|
|
608
|
+
ref: z,
|
|
609
609
|
role: "group",
|
|
610
610
|
sx: {
|
|
611
611
|
backgroundColor: "background.paper",
|
|
612
|
-
height:
|
|
613
|
-
minWidth:
|
|
612
|
+
height: I ? "100%" : 120,
|
|
613
|
+
minWidth: A ? `${A}px` : "100%",
|
|
614
614
|
position: "relative",
|
|
615
615
|
my: 1,
|
|
616
616
|
...n
|
|
617
617
|
},
|
|
618
|
-
tabIndex:
|
|
619
|
-
variant:
|
|
620
|
-
...
|
|
621
|
-
children:
|
|
622
|
-
|
|
618
|
+
tabIndex: d || !a ? -1 : 0,
|
|
619
|
+
variant: y,
|
|
620
|
+
...N,
|
|
621
|
+
children: d ? /* @__PURE__ */ o(
|
|
622
|
+
tt,
|
|
623
623
|
{
|
|
624
624
|
component: "div",
|
|
625
|
-
onClick:
|
|
625
|
+
onClick: d,
|
|
626
626
|
sx: {
|
|
627
627
|
pb: 8,
|
|
628
628
|
pt: 16,
|
|
629
629
|
px: 16,
|
|
630
630
|
height: "100%"
|
|
631
631
|
},
|
|
632
|
-
children:
|
|
632
|
+
children: T
|
|
633
633
|
}
|
|
634
|
-
) : /* @__PURE__ */ o(H, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children:
|
|
634
|
+
) : /* @__PURE__ */ o(H, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: T })
|
|
635
635
|
}
|
|
636
636
|
);
|
|
637
637
|
}
|
|
638
|
-
), J =
|
|
638
|
+
), J = Tt, Rt = ({
|
|
639
639
|
ariaLabel: t,
|
|
640
640
|
beat: e,
|
|
641
641
|
index: n,
|
|
642
642
|
isActiveCard: r,
|
|
643
643
|
onCardClick: i,
|
|
644
|
-
posthog:
|
|
645
|
-
widthOverrides:
|
|
646
|
-
variant:
|
|
647
|
-
showIcon:
|
|
648
|
-
heightOverrides:
|
|
644
|
+
posthog: l,
|
|
645
|
+
widthOverrides: a,
|
|
646
|
+
variant: u,
|
|
647
|
+
showIcon: I,
|
|
648
|
+
heightOverrides: g
|
|
649
649
|
}) => {
|
|
650
|
-
const { ref:
|
|
651
|
-
threshold:
|
|
652
|
-
}), { cardsCopy:
|
|
653
|
-
|
|
654
|
-
|
|
650
|
+
const { ref: d, inView: _ } = Re({
|
|
651
|
+
threshold: ve
|
|
652
|
+
}), { cardsCopy: p } = x(), { onEvent: m } = X(), { updateBeat: f, updateOffer: S } = yt();
|
|
653
|
+
re(() => {
|
|
654
|
+
_ && (e.has_been_displayed ? m(we(e.template)) : (e.guid.startsWith("OFR") ? S({
|
|
655
655
|
...e,
|
|
656
656
|
has_been_displayed: !0
|
|
657
|
-
}) :
|
|
657
|
+
}) : f({
|
|
658
658
|
...e,
|
|
659
659
|
has_been_displayed: !0
|
|
660
|
-
}),
|
|
661
|
-
}, [
|
|
662
|
-
if (
|
|
660
|
+
}), m(Me(e.template))));
|
|
661
|
+
}, [_]), re(() => {
|
|
662
|
+
if (_ && e)
|
|
663
663
|
if (e.template === "MarketingOffer") {
|
|
664
|
-
const
|
|
665
|
-
|
|
664
|
+
const A = e;
|
|
665
|
+
l?.capture("viewed_messaging_insight", {
|
|
666
666
|
template: e.template,
|
|
667
|
-
campaign_guid:
|
|
668
|
-
campaign_name:
|
|
667
|
+
campaign_guid: A.campaign_guid,
|
|
668
|
+
campaign_name: A.pulse_campaign_name
|
|
669
669
|
});
|
|
670
670
|
} else
|
|
671
|
-
|
|
671
|
+
l?.capture("viewed_insight", {
|
|
672
672
|
beat_guid: e.guid,
|
|
673
673
|
template: e.template,
|
|
674
674
|
position: n
|
|
675
675
|
});
|
|
676
|
-
}, [e, n,
|
|
677
|
-
const
|
|
678
|
-
if (i && i(e),
|
|
679
|
-
const
|
|
680
|
-
|
|
676
|
+
}, [e, n, _]);
|
|
677
|
+
const y = () => {
|
|
678
|
+
if (i && i(e), m(We(e.template)), e.template === "MarketingOffer") {
|
|
679
|
+
const A = e;
|
|
680
|
+
l?.capture("clicked_messaging_insight", {
|
|
681
681
|
template: e.template,
|
|
682
|
-
campaign_guid:
|
|
683
|
-
campaign_name:
|
|
682
|
+
campaign_guid: A.campaign_guid,
|
|
683
|
+
campaign_name: A.pulse_campaign_name
|
|
684
684
|
});
|
|
685
685
|
} else
|
|
686
|
-
|
|
686
|
+
l?.capture("clicked_insight", {
|
|
687
687
|
beat_guid: e.guid,
|
|
688
688
|
template: e.template,
|
|
689
689
|
position: n
|
|
@@ -699,31 +699,31 @@ const Y = h.createContext(null), dt = ({
|
|
|
699
699
|
},
|
|
700
700
|
description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
|
|
701
701
|
hasCardEffect: !0,
|
|
702
|
-
heightOverrides:
|
|
703
|
-
icon:
|
|
702
|
+
heightOverrides: g,
|
|
703
|
+
icon: I && /* @__PURE__ */ o(ft, { beat: e }),
|
|
704
704
|
isActiveCard: r,
|
|
705
|
-
onCardClick:
|
|
706
|
-
onPrimaryAction:
|
|
707
|
-
primaryActionText: e.micro_call_to_action ||
|
|
708
|
-
ref:
|
|
705
|
+
onCardClick: y,
|
|
706
|
+
onPrimaryAction: y,
|
|
707
|
+
primaryActionText: e.micro_call_to_action || p?.micro_card_cta,
|
|
708
|
+
ref: d,
|
|
709
709
|
title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
|
|
710
|
-
variant:
|
|
711
|
-
widthOverrides:
|
|
710
|
+
variant: u,
|
|
711
|
+
widthOverrides: a
|
|
712
712
|
}
|
|
713
713
|
);
|
|
714
|
-
},
|
|
714
|
+
}, Ot = ({
|
|
715
715
|
currentBeatIndex: t,
|
|
716
716
|
numBeats: e,
|
|
717
717
|
onNextClick: n,
|
|
718
718
|
onPreviousClick: r,
|
|
719
719
|
scrollRightBoundary: i,
|
|
720
|
-
scrollX:
|
|
721
|
-
shouldApplyDotAnimation:
|
|
722
|
-
visibleCardsCount:
|
|
720
|
+
scrollX: l,
|
|
721
|
+
shouldApplyDotAnimation: a = !1,
|
|
722
|
+
visibleCardsCount: u = 1
|
|
723
723
|
}) => {
|
|
724
|
-
const
|
|
724
|
+
const I = j(), { carouselCopy: g } = x(), d = Math.floor(l) > i || t - u + 1 === 0, _ = l < 0 || e - 1 === t, p = I.palette.grey[500], m = I.palette.primary.main;
|
|
725
725
|
return /* @__PURE__ */ M(
|
|
726
|
-
|
|
726
|
+
w,
|
|
727
727
|
{
|
|
728
728
|
direction: "row",
|
|
729
729
|
sx: {
|
|
@@ -738,34 +738,34 @@ const Y = h.createContext(null), dt = ({
|
|
|
738
738
|
},
|
|
739
739
|
children: [
|
|
740
740
|
/* @__PURE__ */ o(
|
|
741
|
-
|
|
741
|
+
ae,
|
|
742
742
|
{
|
|
743
|
-
"aria-disabled":
|
|
744
|
-
"aria-label":
|
|
745
|
-
disabled:
|
|
743
|
+
"aria-disabled": d,
|
|
744
|
+
"aria-label": g?.previous_insight_cta_aria,
|
|
745
|
+
disabled: d,
|
|
746
746
|
onClick: r,
|
|
747
747
|
children: /* @__PURE__ */ o(
|
|
748
|
-
|
|
748
|
+
$e,
|
|
749
749
|
{
|
|
750
750
|
style: {
|
|
751
|
-
color:
|
|
751
|
+
color: d ? p : m
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
)
|
|
755
755
|
}
|
|
756
756
|
),
|
|
757
|
-
Array.from({ length: e }).map((
|
|
758
|
-
const
|
|
757
|
+
Array.from({ length: e }).map((f, S) => {
|
|
758
|
+
const y = S === t;
|
|
759
759
|
return /* @__PURE__ */ o(
|
|
760
760
|
H,
|
|
761
761
|
{
|
|
762
762
|
className: "mx-insights-micro-carousel-dots",
|
|
763
763
|
sx: {
|
|
764
|
-
bgcolor:
|
|
764
|
+
bgcolor: y ? m : p,
|
|
765
765
|
height: 8,
|
|
766
766
|
mr: 8,
|
|
767
767
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
768
|
-
...
|
|
768
|
+
...a ? {
|
|
769
769
|
borderRadius: "4px",
|
|
770
770
|
transformOrigin: "center",
|
|
771
771
|
transition: "all 0.5s ease-out",
|
|
@@ -774,24 +774,24 @@ const Y = h.createContext(null), dt = ({
|
|
|
774
774
|
borderRadius: "50%",
|
|
775
775
|
p: 0
|
|
776
776
|
},
|
|
777
|
-
width:
|
|
777
|
+
width: y && a ? 24 : 8
|
|
778
778
|
}
|
|
779
779
|
},
|
|
780
|
-
`carousel-button-${
|
|
780
|
+
`carousel-button-${S}`
|
|
781
781
|
);
|
|
782
782
|
}),
|
|
783
783
|
/* @__PURE__ */ o(
|
|
784
|
-
|
|
784
|
+
ae,
|
|
785
785
|
{
|
|
786
|
-
"aria-disabled":
|
|
787
|
-
"aria-label":
|
|
788
|
-
disabled:
|
|
786
|
+
"aria-disabled": _,
|
|
787
|
+
"aria-label": g?.next_insight_cta_aria,
|
|
788
|
+
disabled: _,
|
|
789
789
|
onClick: n,
|
|
790
790
|
children: /* @__PURE__ */ o(
|
|
791
|
-
|
|
791
|
+
Te,
|
|
792
792
|
{
|
|
793
793
|
style: {
|
|
794
|
-
color:
|
|
794
|
+
color: _ ? p : m
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
)
|
|
@@ -800,158 +800,155 @@ const Y = h.createContext(null), dt = ({
|
|
|
800
800
|
]
|
|
801
801
|
}
|
|
802
802
|
);
|
|
803
|
-
},
|
|
803
|
+
}, Wt = ({
|
|
804
804
|
activeCardIndex: t,
|
|
805
805
|
beats: e,
|
|
806
806
|
cardWidth: n,
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
variant: g
|
|
807
|
+
heightOverrides: r,
|
|
808
|
+
onCardClick: i,
|
|
809
|
+
posthog: l,
|
|
810
|
+
showIcon: a,
|
|
811
|
+
variant: u
|
|
813
812
|
}) => {
|
|
814
|
-
const { carouselCopy:
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
variant: g
|
|
813
|
+
const { carouselCopy: I } = x(), g = {
|
|
814
|
+
heightOverrides: r,
|
|
815
|
+
posthog: l,
|
|
816
|
+
showIcon: a,
|
|
817
|
+
variant: u
|
|
820
818
|
};
|
|
821
|
-
return /* @__PURE__ */ M(
|
|
822
|
-
e.map((d,
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
), S = d.micro_title && d.micro_title.length > 0,
|
|
819
|
+
return /* @__PURE__ */ M(Se, { children: [
|
|
820
|
+
e.map((d, _) => {
|
|
821
|
+
const p = _ + 1, m = e.length + 1, f = Ye(
|
|
822
|
+
I?.card_position_in_carousel_aria,
|
|
823
|
+
p.toString(),
|
|
824
|
+
m.toString()
|
|
825
|
+
), S = d.micro_title && d.micro_title.length > 0, y = d.micro_description && d.micro_description.length > 0, A = S ? d.micro_title : d.title, N = y ? d.micro_description : d.description;
|
|
828
826
|
return /* @__PURE__ */ o(
|
|
829
|
-
|
|
827
|
+
Rt,
|
|
830
828
|
{
|
|
831
|
-
ariaLabel: `${
|
|
829
|
+
ariaLabel: `${f}: ${A}, ${N}`,
|
|
832
830
|
beat: d,
|
|
833
|
-
index:
|
|
834
|
-
isActiveCard:
|
|
835
|
-
onCardClick:
|
|
831
|
+
index: _,
|
|
832
|
+
isActiveCard: _ === t,
|
|
833
|
+
onCardClick: i,
|
|
836
834
|
widthOverrides: n || void 0,
|
|
837
|
-
...
|
|
835
|
+
...g
|
|
838
836
|
},
|
|
839
|
-
`${d.guid} ${
|
|
837
|
+
`${d.guid} ${_}`
|
|
840
838
|
);
|
|
841
839
|
}),
|
|
842
840
|
/* @__PURE__ */ o(
|
|
843
|
-
|
|
841
|
+
Pt,
|
|
844
842
|
{
|
|
845
843
|
isActiveCard: t === e.length,
|
|
846
|
-
onCardClick:
|
|
844
|
+
onCardClick: i,
|
|
847
845
|
widthOverrides: n || void 0,
|
|
848
|
-
...
|
|
846
|
+
...g
|
|
849
847
|
}
|
|
850
848
|
)
|
|
851
849
|
] });
|
|
852
|
-
},
|
|
850
|
+
}, wt = ({
|
|
853
851
|
analyticsMetadata: t,
|
|
854
852
|
allowSingleCardPeeking: e = !1,
|
|
855
853
|
beats: n = [],
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
variant: u,
|
|
854
|
+
heightOverrides: r,
|
|
855
|
+
onCardClick: i,
|
|
856
|
+
posthog: l,
|
|
857
|
+
showCarouselControls: a,
|
|
858
|
+
showIcon: u,
|
|
859
|
+
showWithMargin: I = !0,
|
|
860
|
+
variant: g,
|
|
864
861
|
widthOverrides: d,
|
|
865
|
-
visibleCardsCount:
|
|
862
|
+
visibleCardsCount: _ = 1
|
|
866
863
|
// Default to 1 card visible
|
|
867
864
|
}) => {
|
|
868
|
-
const
|
|
865
|
+
const p = h.useRef(null), m = h.useRef(null), [f, S] = h.useState(0), [y, A] = h.useState(null), [N, z] = h.useState(null), [E, v] = h.useState(null), { carouselCopy: P } = x(), { onEvent: T } = X();
|
|
869
866
|
h.useEffect(() => {
|
|
870
|
-
if (
|
|
871
|
-
const
|
|
872
|
-
let
|
|
873
|
-
if (
|
|
874
|
-
const
|
|
875
|
-
|
|
867
|
+
if (p.current && !e) {
|
|
868
|
+
const W = p.current.offsetWidth, F = 8;
|
|
869
|
+
let k;
|
|
870
|
+
if (_ > 1) {
|
|
871
|
+
const _e = (W - (_ - 1) * F) / _ / 3;
|
|
872
|
+
k = (W - _e - (_ - 1) * F) / _;
|
|
876
873
|
} else
|
|
877
|
-
|
|
878
|
-
|
|
874
|
+
k = W;
|
|
875
|
+
v(k);
|
|
879
876
|
}
|
|
880
|
-
}, [
|
|
881
|
-
const
|
|
882
|
-
if (typeof
|
|
877
|
+
}, [_, p.current?.offsetWidth]), h.useEffect(() => {
|
|
878
|
+
const W = m.current?.offsetWidth;
|
|
879
|
+
if (typeof W == "number" && e) {
|
|
883
880
|
const F = ($) => {
|
|
884
|
-
const
|
|
881
|
+
const pe = [
|
|
885
882
|
{ maxWidth: 375, cardWidth: 268 },
|
|
886
883
|
{ maxWidth: 444, cardWidth: 300 },
|
|
887
884
|
{ maxWidth: 599, cardWidth: 350 },
|
|
888
885
|
{ maxWidth: 749, cardWidth: 450 },
|
|
889
886
|
{ maxWidth: 900, cardWidth: 600 }
|
|
890
|
-
].find((
|
|
891
|
-
return
|
|
887
|
+
].find((Ve) => $ <= Ve.maxWidth);
|
|
888
|
+
return pe ? pe.cardWidth : 750;
|
|
892
889
|
};
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
const $ =
|
|
896
|
-
typeof $ == "number" &&
|
|
890
|
+
v(F(W));
|
|
891
|
+
const k = () => {
|
|
892
|
+
const $ = m.current?.offsetWidth;
|
|
893
|
+
typeof $ == "number" && v(F($));
|
|
897
894
|
};
|
|
898
|
-
return window.addEventListener("resize",
|
|
899
|
-
window.removeEventListener("resize",
|
|
895
|
+
return window.addEventListener("resize", k), () => {
|
|
896
|
+
window.removeEventListener("resize", k);
|
|
900
897
|
};
|
|
901
898
|
}
|
|
902
|
-
}, [e,
|
|
903
|
-
const
|
|
904
|
-
|
|
905
|
-
left:
|
|
899
|
+
}, [e, m]);
|
|
900
|
+
const C = () => {
|
|
901
|
+
T(O.ON_CAROUSEL_FORWARD_CLICK, t), p.current && E && p.current.scrollTo({
|
|
902
|
+
left: f + E + 8,
|
|
906
903
|
top: 0,
|
|
907
904
|
behavior: "smooth"
|
|
908
905
|
});
|
|
909
906
|
}, Z = () => {
|
|
910
|
-
|
|
911
|
-
left: Math.max(0,
|
|
907
|
+
T(O.ON_CAROUSEL_BACK_CLICK, t), p.current && E && p.current.scrollTo({
|
|
908
|
+
left: Math.max(0, f - (E + 8)),
|
|
912
909
|
top: 0,
|
|
913
910
|
behavior: "smooth"
|
|
914
911
|
});
|
|
915
912
|
}, Q = () => {
|
|
916
|
-
|
|
917
|
-
},
|
|
918
|
-
if (!N || !
|
|
919
|
-
N -
|
|
920
|
-
},
|
|
921
|
-
|
|
922
|
-
},
|
|
923
|
-
|
|
924
|
-
}, K =
|
|
913
|
+
p.current && S(p.current.scrollLeft);
|
|
914
|
+
}, ee = () => {
|
|
915
|
+
if (!N || !y) return;
|
|
916
|
+
N - y > St ? T(O.ON_CAROUSEL_FORWARD_SWIPE, t) : T(O.ON_CAROUSEL_BACK_SWIPE, t);
|
|
917
|
+
}, te = (W) => {
|
|
918
|
+
A(W.targetTouches[0].clientX);
|
|
919
|
+
}, oe = (W) => {
|
|
920
|
+
A(null), z(W.targetTouches[0].clientX);
|
|
921
|
+
}, K = E ? Math.round(f / (E + 8)) : 0, B = p.current ? p.current.scrollWidth - p.current.offsetWidth : 0;
|
|
925
922
|
return /* @__PURE__ */ M(
|
|
926
|
-
|
|
923
|
+
w,
|
|
927
924
|
{
|
|
928
|
-
"aria-label":
|
|
925
|
+
"aria-label": P?.carousel_title,
|
|
929
926
|
"aria-roledescription": "carousel",
|
|
930
|
-
ref:
|
|
927
|
+
ref: m,
|
|
931
928
|
role: "region",
|
|
932
929
|
sx: {
|
|
933
930
|
alignItems: "center",
|
|
934
931
|
boxSizing: "border-box",
|
|
935
|
-
height:
|
|
932
|
+
height: r,
|
|
936
933
|
width: d || "100%"
|
|
937
934
|
},
|
|
938
935
|
children: [
|
|
939
936
|
/* @__PURE__ */ o(
|
|
940
|
-
|
|
937
|
+
w,
|
|
941
938
|
{
|
|
942
939
|
direction: "row",
|
|
943
940
|
onScroll: Q,
|
|
944
|
-
onTouchEnd:
|
|
945
|
-
onTouchMove:
|
|
946
|
-
onTouchStart:
|
|
947
|
-
ref:
|
|
941
|
+
onTouchEnd: ee,
|
|
942
|
+
onTouchMove: te,
|
|
943
|
+
onTouchStart: oe,
|
|
944
|
+
ref: p,
|
|
948
945
|
sx: {
|
|
949
946
|
alignItems: "center",
|
|
950
|
-
height:
|
|
947
|
+
height: r && "100%",
|
|
951
948
|
gap: 8,
|
|
952
949
|
listStyleType: "none",
|
|
953
950
|
m: 0,
|
|
954
|
-
maxWidth:
|
|
951
|
+
maxWidth: I ? "calc(100% - 32px)" : "100%",
|
|
955
952
|
overflowX: "auto",
|
|
956
953
|
overflowY: "hidden",
|
|
957
954
|
p: 0,
|
|
@@ -963,49 +960,48 @@ const Y = h.createContext(null), dt = ({
|
|
|
963
960
|
}
|
|
964
961
|
},
|
|
965
962
|
children: /* @__PURE__ */ o(
|
|
966
|
-
|
|
963
|
+
Wt,
|
|
967
964
|
{
|
|
968
965
|
activeCardIndex: K,
|
|
969
966
|
beats: n,
|
|
970
|
-
cardWidth:
|
|
971
|
-
heightOverrides:
|
|
972
|
-
onCardClick:
|
|
973
|
-
posthog:
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
variant: u
|
|
967
|
+
cardWidth: E,
|
|
968
|
+
heightOverrides: r,
|
|
969
|
+
onCardClick: i,
|
|
970
|
+
posthog: l,
|
|
971
|
+
showIcon: u,
|
|
972
|
+
variant: g
|
|
977
973
|
}
|
|
978
974
|
)
|
|
979
975
|
}
|
|
980
976
|
),
|
|
981
|
-
|
|
982
|
-
|
|
977
|
+
a && /* @__PURE__ */ o(
|
|
978
|
+
Ot,
|
|
983
979
|
{
|
|
984
|
-
currentBeatIndex: K +
|
|
980
|
+
currentBeatIndex: K + _ - 1,
|
|
985
981
|
numBeats: n.length + 1,
|
|
986
|
-
onNextClick:
|
|
982
|
+
onNextClick: C,
|
|
987
983
|
onPreviousClick: Z,
|
|
988
984
|
scrollRightBoundary: B,
|
|
989
|
-
scrollX:
|
|
985
|
+
scrollX: f,
|
|
990
986
|
shouldApplyDotAnimation: e,
|
|
991
|
-
visibleCardsCount:
|
|
987
|
+
visibleCardsCount: _
|
|
992
988
|
}
|
|
993
989
|
)
|
|
994
990
|
]
|
|
995
991
|
}
|
|
996
992
|
);
|
|
997
|
-
},
|
|
993
|
+
}, Mt = U(wt), Nt = ({
|
|
998
994
|
analyticsMetadata: t,
|
|
999
995
|
onCardClick: e,
|
|
1000
996
|
posthog: n,
|
|
1001
997
|
widthOverrides: r,
|
|
1002
998
|
headerSx: i
|
|
1003
999
|
}) => {
|
|
1004
|
-
const { carouselCopy:
|
|
1005
|
-
|
|
1000
|
+
const { carouselCopy: l } = x(), { onEvent: a } = X(), u = () => {
|
|
1001
|
+
a && (a(O.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
|
|
1006
1002
|
};
|
|
1007
|
-
return
|
|
1008
|
-
|
|
1003
|
+
return l ? /* @__PURE__ */ M(
|
|
1004
|
+
w,
|
|
1009
1005
|
{
|
|
1010
1006
|
alignItems: "center",
|
|
1011
1007
|
direction: "row",
|
|
@@ -1018,21 +1014,21 @@ const Y = h.createContext(null), dt = ({
|
|
|
1018
1014
|
...i
|
|
1019
1015
|
},
|
|
1020
1016
|
children: [
|
|
1021
|
-
/* @__PURE__ */ o(
|
|
1017
|
+
/* @__PURE__ */ o(ze, { children: l.carousel_title }),
|
|
1022
1018
|
/* @__PURE__ */ o(
|
|
1023
|
-
|
|
1019
|
+
ie,
|
|
1024
1020
|
{
|
|
1025
|
-
endIcon: /* @__PURE__ */ o(
|
|
1026
|
-
onClick:
|
|
1021
|
+
endIcon: /* @__PURE__ */ o(Te, { size: 20 }),
|
|
1022
|
+
onClick: u,
|
|
1027
1023
|
size: "small",
|
|
1028
1024
|
variant: "text",
|
|
1029
|
-
children:
|
|
1025
|
+
children: l.view_all_insights_in_full_feed_cta_aria
|
|
1030
1026
|
}
|
|
1031
1027
|
)
|
|
1032
1028
|
]
|
|
1033
1029
|
}
|
|
1034
|
-
) : /* @__PURE__ */ o(
|
|
1035
|
-
},
|
|
1030
|
+
) : /* @__PURE__ */ o(He, {});
|
|
1031
|
+
}, bt = U(Nt), Lt = ({
|
|
1036
1032
|
heightOverrides: t,
|
|
1037
1033
|
widthOverrides: e,
|
|
1038
1034
|
children: n
|
|
@@ -1053,20 +1049,20 @@ const Y = h.createContext(null), dt = ({
|
|
|
1053
1049
|
children: n
|
|
1054
1050
|
}
|
|
1055
1051
|
);
|
|
1056
|
-
},
|
|
1052
|
+
}, Pe = ({
|
|
1057
1053
|
ariaLabel: t,
|
|
1058
1054
|
heightOverrides: e,
|
|
1059
1055
|
onCardClick: n,
|
|
1060
1056
|
posthog: r,
|
|
1061
1057
|
showIcon: i,
|
|
1062
|
-
variant:
|
|
1058
|
+
variant: l
|
|
1063
1059
|
}) => {
|
|
1064
|
-
const { cardsCopy:
|
|
1060
|
+
const { cardsCopy: a } = x(), u = j(), { onEvent: I } = X(), { onPageview: g } = xe();
|
|
1065
1061
|
h.useEffect(() => {
|
|
1066
|
-
|
|
1062
|
+
g(G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1067
1063
|
}, []);
|
|
1068
|
-
const
|
|
1069
|
-
n && n(),
|
|
1064
|
+
const d = () => {
|
|
1065
|
+
n && n(), I(O.ON_NO_RELEVANT_INSIGHTS_CLICKED), r?.capture("clicked_insight", {
|
|
1070
1066
|
template: "no_relevant_insights"
|
|
1071
1067
|
});
|
|
1072
1068
|
};
|
|
@@ -1077,27 +1073,27 @@ const Y = h.createContext(null), dt = ({
|
|
|
1077
1073
|
cardSx: {
|
|
1078
1074
|
borderRadius: 2
|
|
1079
1075
|
},
|
|
1080
|
-
description:
|
|
1076
|
+
description: a.no_relevant_insights_card_description,
|
|
1081
1077
|
hasCardEffect: !0,
|
|
1082
1078
|
heightOverrides: e,
|
|
1083
|
-
icon: i && /* @__PURE__ */ o(
|
|
1084
|
-
onCardClick:
|
|
1085
|
-
onPrimaryAction:
|
|
1086
|
-
primaryActionText:
|
|
1087
|
-
title:
|
|
1088
|
-
variant:
|
|
1079
|
+
icon: i && /* @__PURE__ */ o(c, { bgColor: s(u.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1080
|
+
onCardClick: d,
|
|
1081
|
+
onPrimaryAction: d,
|
|
1082
|
+
primaryActionText: a.micro_card_cta,
|
|
1083
|
+
title: a.no_relevant_insights_card_title,
|
|
1084
|
+
variant: l
|
|
1089
1085
|
}
|
|
1090
1086
|
);
|
|
1091
|
-
},
|
|
1087
|
+
}, ao = U(Pe), Be = ({
|
|
1092
1088
|
ariaLabel: t,
|
|
1093
1089
|
heightOverrides: e,
|
|
1094
1090
|
onCardClick: n,
|
|
1095
1091
|
showIcon: r,
|
|
1096
1092
|
variant: i
|
|
1097
1093
|
}) => {
|
|
1098
|
-
const { onPageview:
|
|
1094
|
+
const { onPageview: l } = xe(), { zeroStateCopy: a } = x(), u = j();
|
|
1099
1095
|
return h.useEffect(() => {
|
|
1100
|
-
|
|
1096
|
+
l(G.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1101
1097
|
}, []), /* @__PURE__ */ o(
|
|
1102
1098
|
J,
|
|
1103
1099
|
{
|
|
@@ -1105,16 +1101,16 @@ const Y = h.createContext(null), dt = ({
|
|
|
1105
1101
|
cardSx: {
|
|
1106
1102
|
borderRadius: 2
|
|
1107
1103
|
},
|
|
1108
|
-
description:
|
|
1104
|
+
description: a.carousel_zero_state_description,
|
|
1109
1105
|
hasCardEffect: !0,
|
|
1110
1106
|
heightOverrides: e,
|
|
1111
|
-
icon: r && /* @__PURE__ */ o(
|
|
1107
|
+
icon: r && /* @__PURE__ */ o(c, { bgColor: s(u.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1112
1108
|
onCardClick: n,
|
|
1113
|
-
title:
|
|
1109
|
+
title: a.carousel_zero_state_title,
|
|
1114
1110
|
variant: i
|
|
1115
1111
|
}
|
|
1116
1112
|
);
|
|
1117
|
-
},
|
|
1113
|
+
}, so = U(Be), Dt = () => /* @__PURE__ */ o(
|
|
1118
1114
|
H,
|
|
1119
1115
|
{
|
|
1120
1116
|
sx: {
|
|
@@ -1124,130 +1120,127 @@ const Y = h.createContext(null), dt = ({
|
|
|
1124
1120
|
justifyContent: "center",
|
|
1125
1121
|
width: "100%"
|
|
1126
1122
|
},
|
|
1127
|
-
children: /* @__PURE__ */ o(
|
|
1123
|
+
children: /* @__PURE__ */ o(Xe, {})
|
|
1128
1124
|
}
|
|
1129
|
-
), V = new
|
|
1125
|
+
), V = new ct(), xt = ({
|
|
1130
1126
|
allowSingleCardPeeking: t,
|
|
1131
1127
|
areBeatsLoading: e,
|
|
1132
1128
|
beats: n = [],
|
|
1133
1129
|
// This also determines the length of the carousel controls (beat.length + 1)
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
onCardClick: g = () => {
|
|
1130
|
+
endpoint: r = "/",
|
|
1131
|
+
heightOverrides: i,
|
|
1132
|
+
headerSx: l,
|
|
1133
|
+
logOutUser: a,
|
|
1134
|
+
onCardClick: u = () => {
|
|
1140
1135
|
},
|
|
1141
|
-
onEvent:
|
|
1136
|
+
onEvent: I = () => {
|
|
1142
1137
|
},
|
|
1143
|
-
onPageview:
|
|
1138
|
+
onPageview: g = () => {
|
|
1144
1139
|
},
|
|
1145
1140
|
posthog: d,
|
|
1146
|
-
showBorder:
|
|
1147
|
-
showCarouselControls:
|
|
1148
|
-
showHeader:
|
|
1149
|
-
showIcon:
|
|
1141
|
+
showBorder: _ = !0,
|
|
1142
|
+
showCarouselControls: p,
|
|
1143
|
+
showHeader: m,
|
|
1144
|
+
showIcon: f,
|
|
1150
1145
|
showWithMargin: S = !0,
|
|
1151
|
-
token:
|
|
1152
|
-
userHasFullInsightFeedBeats:
|
|
1146
|
+
token: y = "",
|
|
1147
|
+
userHasFullInsightFeedBeats: A,
|
|
1153
1148
|
variant: N,
|
|
1154
|
-
visibleCardsCount:
|
|
1155
|
-
widthOverrides:
|
|
1149
|
+
visibleCardsCount: z = 1,
|
|
1150
|
+
widthOverrides: E
|
|
1156
1151
|
}) => {
|
|
1157
|
-
const [
|
|
1158
|
-
|
|
1152
|
+
const [v, P] = ne("STANDARD"), [T, C] = ne(!1), [Z, Q] = ne(!1), ee = Qe([I], V), te = qe([g], V);
|
|
1153
|
+
Je({
|
|
1159
1154
|
widgetName: "InsightsMicroWidget",
|
|
1160
|
-
isLoaded:
|
|
1155
|
+
isLoaded: T
|
|
1161
1156
|
}), h.useEffect(() => {
|
|
1162
|
-
!V.isInitialized && !Z && (V.initialize(
|
|
1163
|
-
}, [
|
|
1157
|
+
!V.isInitialized && !Z && (V.initialize(r, y, a).catch(() => Q(!1)), Q(!0));
|
|
1158
|
+
}, [r, y, a, V.isInitialized, Z]), h.useEffect(() => {
|
|
1164
1159
|
const B = window.innerHeight;
|
|
1165
|
-
B < 180 ?
|
|
1160
|
+
B < 180 ? P("STANDARD") : B >= 180 && B < 200 ? P("LARGE") : B >= 200 && B < 248 ? P("XLARGE") : B >= 248 && P("XXLARGE");
|
|
1166
1161
|
}, [window.innerHeight]), h.useEffect(() => {
|
|
1167
|
-
|
|
1162
|
+
C(!e && V.isInitialized);
|
|
1168
1163
|
}, [e, V.isInitialized]);
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
onCardClick: g,
|
|
1164
|
+
const oe = {
|
|
1165
|
+
heightOverrides: i,
|
|
1166
|
+
onCardClick: u,
|
|
1173
1167
|
posthog: d,
|
|
1174
|
-
showIcon:
|
|
1168
|
+
showIcon: f,
|
|
1175
1169
|
showWithMargin: S,
|
|
1176
|
-
widthOverrides:
|
|
1170
|
+
widthOverrides: E
|
|
1177
1171
|
}, K = {
|
|
1178
|
-
carouselSize:
|
|
1172
|
+
carouselSize: v,
|
|
1179
1173
|
variant: N,
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
onCardClick: g,
|
|
1174
|
+
heightOverrides: i,
|
|
1175
|
+
onCardClick: u,
|
|
1183
1176
|
posthog: d,
|
|
1184
|
-
showIcon:
|
|
1177
|
+
showIcon: f
|
|
1185
1178
|
};
|
|
1186
|
-
return /* @__PURE__ */ o(
|
|
1187
|
-
!
|
|
1188
|
-
|
|
1189
|
-
|
|
1179
|
+
return /* @__PURE__ */ o(lt, { onEvent: ee, onPageview: te, store: V, children: /* @__PURE__ */ M(Lt, { heightOverrides: i, widthOverrides: E, children: [
|
|
1180
|
+
!T && /* @__PURE__ */ o(Dt, {}),
|
|
1181
|
+
T && m && /* @__PURE__ */ o(
|
|
1182
|
+
bt,
|
|
1190
1183
|
{
|
|
1191
|
-
analyticsMetadata:
|
|
1192
|
-
headerSx:
|
|
1193
|
-
onCardClick:
|
|
1184
|
+
analyticsMetadata: ge,
|
|
1185
|
+
headerSx: l,
|
|
1186
|
+
onCardClick: u,
|
|
1194
1187
|
posthog: d,
|
|
1195
|
-
widthOverrides:
|
|
1188
|
+
widthOverrides: E
|
|
1196
1189
|
}
|
|
1197
1190
|
),
|
|
1198
|
-
|
|
1199
|
-
|
|
1191
|
+
T && !!n.length && /* @__PURE__ */ o(
|
|
1192
|
+
Mt,
|
|
1200
1193
|
{
|
|
1201
1194
|
allowSingleCardPeeking: t,
|
|
1202
|
-
analyticsMetadata:
|
|
1195
|
+
analyticsMetadata: ge,
|
|
1203
1196
|
beats: n,
|
|
1204
|
-
showCarouselControls:
|
|
1205
|
-
variant:
|
|
1206
|
-
visibleCardsCount:
|
|
1207
|
-
...
|
|
1197
|
+
showCarouselControls: p,
|
|
1198
|
+
variant: _ ? N : void 0,
|
|
1199
|
+
visibleCardsCount: z,
|
|
1200
|
+
...oe
|
|
1208
1201
|
}
|
|
1209
1202
|
),
|
|
1210
|
-
|
|
1211
|
-
|
|
1203
|
+
T && !n.length && /* @__PURE__ */ o(
|
|
1204
|
+
w,
|
|
1212
1205
|
{
|
|
1213
1206
|
sx: {
|
|
1214
1207
|
alignItems: "center",
|
|
1215
|
-
height:
|
|
1216
|
-
width:
|
|
1208
|
+
height: i,
|
|
1209
|
+
width: E || "100%"
|
|
1217
1210
|
},
|
|
1218
1211
|
children: /* @__PURE__ */ o(
|
|
1219
|
-
|
|
1212
|
+
w,
|
|
1220
1213
|
{
|
|
1221
1214
|
sx: {
|
|
1222
|
-
height: `calc(${
|
|
1223
|
-
width: S ? `calc(${
|
|
1215
|
+
height: `calc(${At[v]}px - 44px)`,
|
|
1216
|
+
width: S ? `calc(${E}px - 32px)` : "100%"
|
|
1224
1217
|
},
|
|
1225
|
-
children:
|
|
1218
|
+
children: A ? /* @__PURE__ */ o(Pe, { ...K }) : /* @__PURE__ */ o(Be, { ...K })
|
|
1226
1219
|
}
|
|
1227
1220
|
)
|
|
1228
1221
|
}
|
|
1229
1222
|
)
|
|
1230
1223
|
] }) });
|
|
1231
|
-
},
|
|
1224
|
+
}, co = U(xt), vt = ({
|
|
1232
1225
|
ariaLabel: t,
|
|
1233
1226
|
heightOverrides: e,
|
|
1234
1227
|
isActiveCard: n,
|
|
1235
1228
|
onCardClick: r,
|
|
1236
1229
|
posthog: i,
|
|
1237
|
-
widthOverrides:
|
|
1238
|
-
showIcon:
|
|
1239
|
-
variant:
|
|
1230
|
+
widthOverrides: l,
|
|
1231
|
+
showIcon: a,
|
|
1232
|
+
variant: u
|
|
1240
1233
|
}) => {
|
|
1241
|
-
const
|
|
1242
|
-
threshold:
|
|
1243
|
-
}), { cardsCopy:
|
|
1244
|
-
|
|
1245
|
-
|
|
1234
|
+
const I = j(), { ref: g, inView: d } = Re({
|
|
1235
|
+
threshold: ve
|
|
1236
|
+
}), { cardsCopy: _ } = x(), { onEvent: p } = X();
|
|
1237
|
+
re(() => {
|
|
1238
|
+
d && (p(Ne.ON_VIEW_MORE_VIEWED), i?.capture("viewed_insight", {
|
|
1246
1239
|
template: "view_more_card"
|
|
1247
1240
|
}));
|
|
1248
|
-
}, [
|
|
1249
|
-
const
|
|
1250
|
-
r && r(),
|
|
1241
|
+
}, [d]);
|
|
1242
|
+
const m = () => {
|
|
1243
|
+
r && r(), p(O.ON_VIEW_MORE_CLICKED), i?.capture("clicked_insight", {
|
|
1251
1244
|
template: "view_more_card"
|
|
1252
1245
|
});
|
|
1253
1246
|
};
|
|
@@ -1259,33 +1252,33 @@ const Y = h.createContext(null), dt = ({
|
|
|
1259
1252
|
cardSx: {
|
|
1260
1253
|
borderRadius: 2
|
|
1261
1254
|
},
|
|
1262
|
-
description:
|
|
1255
|
+
description: _?.view_more_card_description,
|
|
1263
1256
|
hasCardEffect: !0,
|
|
1264
1257
|
heightOverrides: e,
|
|
1265
|
-
icon:
|
|
1258
|
+
icon: a && /* @__PURE__ */ o(c, { bgColor: s(I.palette.primary.main, 0.15), name: "show_chart" }),
|
|
1266
1259
|
isActiveCard: n,
|
|
1267
|
-
onCardClick:
|
|
1268
|
-
onPrimaryAction:
|
|
1269
|
-
primaryActionText:
|
|
1270
|
-
ref:
|
|
1271
|
-
title:
|
|
1272
|
-
variant:
|
|
1273
|
-
widthOverrides:
|
|
1260
|
+
onCardClick: m,
|
|
1261
|
+
onPrimaryAction: m,
|
|
1262
|
+
primaryActionText: _?.micro_card_cta,
|
|
1263
|
+
ref: g,
|
|
1264
|
+
title: _?.view_more_card_title,
|
|
1265
|
+
variant: u,
|
|
1266
|
+
widthOverrides: l
|
|
1274
1267
|
}
|
|
1275
1268
|
);
|
|
1276
|
-
},
|
|
1269
|
+
}, Pt = U(vt);
|
|
1277
1270
|
export {
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1271
|
+
ct as A,
|
|
1272
|
+
c as B,
|
|
1273
|
+
bt as C,
|
|
1274
|
+
lt as I,
|
|
1275
|
+
Mt as M,
|
|
1276
|
+
ao as N,
|
|
1277
|
+
ge as T,
|
|
1278
|
+
Pt as V,
|
|
1279
|
+
so as Z,
|
|
1280
|
+
Rt as a,
|
|
1281
|
+
co as b,
|
|
1282
|
+
Ct as c,
|
|
1290
1283
|
J as d
|
|
1291
1284
|
};
|