@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.
@@ -1,46 +1,46 @@
1
- import { jsx as o, jsxs as M, Fragment as Te } from "react/jsx-runtime";
2
- import h, { useEffect as ie, useState as re } from "react";
3
- import { observer as z } from "mobx-react-lite";
4
- import W from "@mui/material/Stack";
5
- import ae from "@mui/material/Button";
6
- import { CategoryIcon as ke, MerchantLogo as Ue, InstitutionLogo as ze, P as ue, Text as Ce, H3 as Ke } from "@mxenabled/mxui";
7
- import { Icon as Fe, Close as $e, ChevronLeft as He, ChevronRight as Re } from "@mxenabled/mx-icons";
8
- import { L as je } from "./Loader-D3rjKx72.mjs";
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 se from "@mui/material/IconButton";
11
- import { alpha as c, useTheme as j } from "@mui/material/styles";
12
- import { useInView as Oe } from "react-intersection-observer";
13
- import { b as Ye } from "./Category-CevNQ03n.mjs";
14
- import ce from "@mui/material/styles/useTheme";
15
- import { b as Xe } from "./Localization-CPkpIwIx.mjs";
16
- import Ze from "@mui/material/CircularProgress";
17
- import { makeAutoObservable as le, runInAction as We } from "mobx";
18
- import { G as he, b as Qe, u as qe, a as Je } from "./useCombineEvents-Bqojlv8q.mjs";
19
- import { B as ge } from "./BeatApi-EFHXULDx.mjs";
20
- import { u as et } from "./useWidgetLoadTimer-DgN1bTyu.mjs";
21
- import tt from "@mui/material/Card";
22
- import ot from "@mui/material/CardActionArea";
23
- import nt from "@mui/material/Avatar";
24
- const Ee = {
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 rt {
28
- copyApi = new he("/", "");
27
+ class nt {
28
+ copyApi = new Ce("/", "");
29
29
  copyObject = {};
30
30
  namespace = "experiences";
31
31
  translationKey = "micro_insights";
32
32
  constructor() {
33
- le(this);
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 he(e, n), await this.loadCopy();
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
- We(() => {
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 de = {
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
- }, T = window?.app?.clientConfig?.microwidget_instance_id || "", Ie = {
74
+ }, R = window?.app?.clientConfig?.microwidget_instance_id || "", Ee = {
75
75
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
76
- }, Me = (t) => `on${t}Click`, Ne = (t) => `on${t}View`, we = (t) => `on${t}ViewFirstTime`, _e = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), it = () => Object.values(de).reduce(
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
- [Me(e)]: {
79
+ [We(e)]: {
80
80
  action: D.MICRO_BEAT_CLICKED,
81
81
  category: L.BEAT_INTERACTION,
82
- label: _e(e),
83
- value: T
82
+ label: de(e),
83
+ value: R
84
84
  }
85
85
  }),
86
86
  {}
87
- ), at = () => Object.values(de).reduce(
87
+ ), it = () => Object.values(le).reduce(
88
88
  (t, e) => ({
89
89
  ...t,
90
- [Ne(e)]: {
90
+ [we(e)]: {
91
91
  action: D.MICRO_BEAT_DISPLAYED,
92
92
  category: L.BEAT_INTERACTION,
93
- label: _e(e),
94
- value: T
93
+ label: de(e),
94
+ value: R
95
95
  }
96
96
  }),
97
97
  {}
98
- ), st = () => Object.values(de).reduce(
98
+ ), at = () => Object.values(le).reduce(
99
99
  (t, e) => ({
100
100
  ...t,
101
- [we(e)]: {
101
+ [Me(e)]: {
102
102
  action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
103
103
  category: L.BEAT_INTERACTION,
104
- label: _e(e),
105
- value: T
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
- }, R = {
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
- }, be = {
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
- }, fe = {
138
+ }, Ie = {
139
139
  [G.MICRO_WIDGET_CAROUSEL]: {
140
140
  label: b.MICRO_WIDGET,
141
141
  name: G.MICRO_WIDGET_CAROUSEL,
142
- path: Ie.INSIGHTS_MICRO_WIDGET,
143
- value: T
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: Ie.INSIGHTS_MICRO_WIDGET,
150
- value: T
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: T
157
+ value: R
158
158
  }
159
- }, ye = {
159
+ }, fe = {
160
160
  // carousel control interaction events - clicks and swipes
161
- [R.ON_CAROUSEL_BACK_CLICK]: {
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: T
165
+ value: R
166
166
  },
167
- [R.ON_CAROUSEL_FORWARD_CLICK]: {
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: T
171
+ value: R
172
172
  },
173
- [R.ON_CAROUSEL_BACK_SWIPE]: {
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: T
177
+ value: R
178
178
  },
179
- [R.ON_CAROUSEL_FORWARD_SWIPE]: {
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: T
183
+ value: R
184
184
  },
185
185
  // read more card events
186
- [R.ON_VIEW_MORE_CLICKED]: {
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: T
190
+ value: R
191
191
  },
192
- [be.ON_VIEW_MORE_VIEWED]: {
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: T
196
+ value: R
197
197
  },
198
+ ...rt(),
198
199
  ...it(),
199
- ...at(),
200
- ...st()
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
- }), Se = async (t, e) => !e || !fe[t] ? null : e.sendAnalyticsPageview(fe[t]).then((n) => n).catch((n) => {
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 ct {
207
- onAnalyticEvent = Ae;
208
- onAnalyticPageView = Se;
209
- beatApi = new ge("/", "");
206
+ class st {
207
+ onAnalyticEvent = ye;
208
+ onAnalyticPageView = Ae;
209
+ beatApi = new he("/", "");
210
210
  constructor() {
211
- le(this);
211
+ ce(this);
212
212
  }
213
213
  initialize = async (e, n, r) => {
214
- this.onAnalyticEvent = (i, a) => {
215
- Ae(i, a).then((s) => s).catch((s) => {
216
- throw s.status === 401 && r(), s;
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, a) => {
219
- Se(i, a).then((s) => s).catch((s) => {
220
- throw s.status === 401 && r(), s;
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 ge(e, n);
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 lt {
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 rt(), this.insightsMicroWidgetStore = new ct(), le(this);
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 Qe(e, n, "1.0.0", "Micro Insights Carousel");
244
- We(() => {
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), dt = ({
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 }), _t = ({ beat: t }) => {
255
- const { primary_category_guid: e, category_guids: n } = t, r = e || n?.[0] || Ye.UNCATEGORIZED;
256
- return /* @__PURE__ */ o(ke, { categoryGuid: r, size: 32, sx: { minWidth: 32 } });
257
- }, pt = ({
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: a
263
+ sx: l
264
264
  }) => /* @__PURE__ */ o(
265
- nt,
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(Fe, { color: r, fill: i, name: n, size: 20, sx: a })
274
+ children: /* @__PURE__ */ o(Ke, { color: r, fill: i, name: n, size: 20, sx: l })
275
275
  }
276
- ), l = pt, mt = ({ beat: t }) => {
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
- Ue,
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
- }, ut = (t) => t ? t.data ? t.data.map((e) => {
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", Le = "success", De = "error", xe = (t) => {
297
- const e = ut(t), n = Math.floor(e.length / 2);
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 ? De : r < i ? Le : q;
301
- }, Ct = (t, e) => t < e ? Le : t > e ? De : q, ht = ({ beat: t }) => {
302
- const e = ce(), n = xe(t.data_series), r = e.palette[n].main;
303
- return /* @__PURE__ */ o(l, { bgColor: c(r, 0.15), iconColor: n, name: "bar_chart" });
304
- }, gt = ({ beat: t }) => {
305
- const e = ce(), n = t.payload?.average_spend || 0;
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 s = (t.data_series.names || []).indexOf("amount");
309
- s !== -1 && (r = t.data_series.data[0][s] || 0);
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 = Ct(r, n);
311
+ const i = ut(r, n);
312
312
  return /* @__PURE__ */ o(
313
- l,
313
+ c,
314
314
  {
315
- bgColor: c(e.palette[i].main, 0.15),
315
+ bgColor: s(e.palette[i].main, 0.15),
316
316
  iconColor: i,
317
317
  name: "timeline"
318
318
  }
319
319
  );
320
- }, Et = ({ beat: t }) => {
321
- const e = ce(), n = xe(t.data_series), r = e.palette[n].main;
320
+ }, gt = ({ beat: t }) => {
321
+ const e = se(), n = De(t.data_series), r = e.palette[n].main;
322
322
  return /* @__PURE__ */ o(
323
- l,
323
+ c,
324
324
  {
325
- bgColor: c(r, 0.15),
325
+ bgColor: s(r, 0.15),
326
326
  fill: !1,
327
327
  iconColor: n,
328
328
  name: "area_chart"
329
329
  }
330
330
  );
331
- }, It = ({ beat: t }) => /* @__PURE__ */ o(ze, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), ft = {
332
- 0: (t, e) => /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "error" }),
333
- 1: (t) => /* @__PURE__ */ o(_t, { beat: t }),
334
- 2: (t) => /* @__PURE__ */ o(mt, { beat: t }),
335
- 3: (t) => /* @__PURE__ */ o(ht, { beat: t }),
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
- l,
337
+ c,
338
338
  {
339
- bgColor: c(e.palette.secondary.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "campaign" }),
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
- l,
346
+ c,
347
347
  {
348
- bgColor: c(e.palette.success.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "today" }),
354
- 8: (t, e) => /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "calendar_clock" }),
355
- 9: (t, e) => /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "celebration" }),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "problem" }),
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
- l,
359
+ c,
360
360
  {
361
361
  avatarSx: { border: `1px solid ${e.palette.secondary.main}` },
362
- bgColor: c(e.palette.secondary.main, 0.15),
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(Et, { beat: t }),
368
+ 12: (t) => /* @__PURE__ */ o(gt, { beat: t }),
369
369
  13: () => /* @__PURE__ */ o(
370
- l,
370
+ c,
371
371
  {
372
372
  avatarSx: { border: "1px solid #EB00D0" },
373
- bgColor: c("#EB00D0", 0.25),
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
- l,
380
+ c,
381
381
  {
382
- bgColor: c(e.palette.secondary.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "payment_arrow_down" }),
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
- l,
390
+ c,
391
391
  {
392
- bgColor: c(e.palette.success.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "savings" }),
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
- l,
399
+ c,
400
400
  {
401
- bgColor: t.payload.projected_overdraft_amount < 0 ? c(e.palette.warning.main, 0.15) : c(e.palette.error.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "finance_mode" }),
407
- 20: (t, e) => /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "tips_and_updates" }),
408
- 21: (t, e) => /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "currency_exchange" }),
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
- l,
410
+ c,
411
411
  {
412
- bgColor: c(e.palette.warning.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "thumb_up" }),
417
+ 23: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "thumb_up" }),
418
418
  24: () => /* @__PURE__ */ o(
419
- l,
419
+ c,
420
420
  {
421
- bgColor: c("#EB00D0", 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "note_stack" }),
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
- l,
428
+ c,
429
429
  {
430
- bgColor: c(e.palette.primary.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "directions_car" }),
436
- 28: (t, e) => /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "contract" }),
437
- 29: (t) => /* @__PURE__ */ o(gt, { beat: t }),
438
- 30: (t, e) => /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "calendar_month" }),
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
- l,
440
+ c,
441
441
  {
442
- bgColor: c(e.palette.warning.main, 0.15),
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(l, { bgColor: c(e.palette.primary.main, 0.15), name: "help" }),
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
- l,
449
+ c,
450
450
  {
451
- bgColor: c(e.palette.primary.main, 0.15),
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(It, { beat: t })
457
- }, yt = ({ beat: t }) => {
458
- const e = j(), { icon_type: n } = t, r = n != null ? ft[n] : null;
459
- return r ? r(t, e) : /* @__PURE__ */ o(l, { bgColor: c(e.palette.primary.main, 0.15), name: "error" });
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
- }, At = () => {
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
- }, ve = () => {
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
- }, St = {
482
+ }, At = {
483
483
  LARGE: 180,
484
484
  STANDARD: 154,
485
485
  XLARGE: 200,
486
486
  XXLARGE: 248
487
- }, Tt = 50, Pe = 1, Rt = h.forwardRef(
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: a,
494
- isActiveCard: s,
495
- hasCardEffect: C = !1,
496
- heightOverrides: g,
497
- onClose: E,
498
- onCardClick: u,
499
- onPrimaryAction: d,
500
- onSecondaryAction: m,
501
- primaryActionText: _,
502
- secondaryActionText: A,
503
- title: I,
504
- variant: S,
505
- widthOverrides: f,
506
- ...v
507
- }, N) {
508
- const k = !!(d && _), y = !!(m && A), P = C ? tt : H, w = /* @__PURE__ */ M(Te, { children: [
509
- E && /* @__PURE__ */ o(
510
- se,
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: (p) => {
514
- p.stopPropagation(), E?.();
513
+ onClick: (C) => {
514
+ C.stopPropagation(), g?.();
515
515
  },
516
- onMouseDown: (p) => {
517
- p.stopPropagation();
516
+ onMouseDown: (C) => {
517
+ C.stopPropagation();
518
518
  },
519
- onTouchStart: (p) => {
520
- p.stopPropagation();
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($e, {})
523
+ children: /* @__PURE__ */ o(Fe, {})
524
524
  }
525
525
  ),
526
- /* @__PURE__ */ M(W, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
527
- /* @__PURE__ */ M(W, { sx: { flexDirection: "row", gap: 12 }, children: [
528
- a && a,
529
- /* @__PURE__ */ M(W, { sx: { gap: 6 }, children: [
530
- /* @__PURE__ */ o(W, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(ue, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: I }) }),
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
- ue,
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: k ? 2 : 3,
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
- k && /* @__PURE__ */ M(
552
- W,
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: a ? 36 : 0
559
+ pl: l ? 36 : 0
560
560
  },
561
561
  children: [
562
- k && /* @__PURE__ */ o(
563
- ae,
562
+ E && /* @__PURE__ */ o(
563
+ ie,
564
564
  {
565
- onClick: (p) => {
566
- p.stopPropagation(), d?.();
565
+ onClick: (C) => {
566
+ C.stopPropagation(), _?.();
567
567
  },
568
- onMouseDown: (p) => {
569
- p.stopPropagation();
568
+ onMouseDown: (C) => {
569
+ C.stopPropagation();
570
570
  },
571
- onTouchStart: (p) => {
572
- p.stopPropagation();
571
+ onTouchStart: (C) => {
572
+ C.stopPropagation();
573
573
  },
574
574
  size: "small",
575
- sx: { px: 8, ml: a ? 0 : -8 },
575
+ sx: { px: 8, ml: l ? 0 : -8 },
576
576
  variant: "text",
577
- children: /* @__PURE__ */ o(Ce, { bold: !0, variant: "body2", children: _ })
577
+ children: /* @__PURE__ */ o(ue, { bold: !0, variant: "body2", children: m })
578
578
  }
579
579
  ),
580
- y && /* @__PURE__ */ o(
581
- ae,
580
+ v && /* @__PURE__ */ o(
581
+ ie,
582
582
  {
583
- onClick: (p) => {
584
- p.stopPropagation(), m?.();
583
+ onClick: (C) => {
584
+ C.stopPropagation(), p?.();
585
585
  },
586
- onMouseDown: (p) => {
587
- p.stopPropagation();
586
+ onMouseDown: (C) => {
587
+ C.stopPropagation();
588
588
  },
589
- onTouchStart: (p) => {
590
- p.stopPropagation();
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(Ce, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: A })
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": !s,
606
+ "aria-hidden": !a,
607
607
  "aria-label": e,
608
- ref: N,
608
+ ref: z,
609
609
  role: "group",
610
610
  sx: {
611
611
  backgroundColor: "background.paper",
612
- height: g ? "100%" : 120,
613
- minWidth: f ? `${f}px` : "100%",
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: u || !s ? -1 : 0,
619
- variant: S,
620
- ...v,
621
- children: u ? /* @__PURE__ */ o(
622
- ot,
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: u,
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: w
632
+ children: T
633
633
  }
634
- ) : /* @__PURE__ */ o(H, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: w })
634
+ ) : /* @__PURE__ */ o(H, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: T })
635
635
  }
636
636
  );
637
637
  }
638
- ), J = Rt, Ot = ({
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: a,
645
- widthOverrides: s,
646
- variant: C,
647
- showIcon: g,
648
- heightOverrides: E
644
+ posthog: l,
645
+ widthOverrides: a,
646
+ variant: u,
647
+ showIcon: I,
648
+ heightOverrides: g
649
649
  }) => {
650
- const { ref: u, inView: d } = Oe({
651
- threshold: Pe
652
- }), { cardsCopy: m } = x(), { onEvent: _ } = X(), { updateBeat: A, updateOffer: I } = At();
653
- ie(() => {
654
- d && (e.has_been_displayed ? _(Ne(e.template)) : (e.guid.startsWith("OFR") ? I({
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
- }) : A({
657
+ }) : f({
658
658
  ...e,
659
659
  has_been_displayed: !0
660
- }), _(we(e.template))));
661
- }, [d]), ie(() => {
662
- if (d && e)
660
+ }), m(Me(e.template))));
661
+ }, [_]), re(() => {
662
+ if (_ && e)
663
663
  if (e.template === "MarketingOffer") {
664
- const f = e;
665
- a?.capture("viewed_messaging_insight", {
664
+ const A = e;
665
+ l?.capture("viewed_messaging_insight", {
666
666
  template: e.template,
667
- campaign_guid: f.campaign_guid,
668
- campaign_name: f.pulse_campaign_name
667
+ campaign_guid: A.campaign_guid,
668
+ campaign_name: A.pulse_campaign_name
669
669
  });
670
670
  } else
671
- a?.capture("viewed_insight", {
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, d]);
677
- const S = () => {
678
- if (i && i(e), _(Me(e.template)), e.template === "MarketingOffer") {
679
- const f = e;
680
- a?.capture("clicked_messaging_insight", {
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: f.campaign_guid,
683
- campaign_name: f.pulse_campaign_name
682
+ campaign_guid: A.campaign_guid,
683
+ campaign_name: A.pulse_campaign_name
684
684
  });
685
685
  } else
686
- a?.capture("clicked_insight", {
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: E,
703
- icon: g && /* @__PURE__ */ o(yt, { beat: e }),
702
+ heightOverrides: g,
703
+ icon: I && /* @__PURE__ */ o(ft, { beat: e }),
704
704
  isActiveCard: r,
705
- onCardClick: S,
706
- onPrimaryAction: S,
707
- primaryActionText: e.micro_call_to_action || m?.micro_card_cta,
708
- ref: u,
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: C,
711
- widthOverrides: s
710
+ variant: u,
711
+ widthOverrides: a
712
712
  }
713
713
  );
714
- }, Wt = ({
714
+ }, Ot = ({
715
715
  currentBeatIndex: t,
716
716
  numBeats: e,
717
717
  onNextClick: n,
718
718
  onPreviousClick: r,
719
719
  scrollRightBoundary: i,
720
- scrollX: a,
721
- shouldApplyDotAnimation: s = !1,
722
- visibleCardsCount: C = 1
720
+ scrollX: l,
721
+ shouldApplyDotAnimation: a = !1,
722
+ visibleCardsCount: u = 1
723
723
  }) => {
724
- const g = j(), { carouselCopy: E } = x(), u = Math.floor(a) > i || t - C + 1 === 0, d = a < 0 || e - 1 === t, m = g.palette.grey[500], _ = g.palette.primary.main;
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
- W,
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
- se,
741
+ ae,
742
742
  {
743
- "aria-disabled": u,
744
- "aria-label": E?.previous_insight_cta_aria,
745
- disabled: u,
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
- He,
748
+ $e,
749
749
  {
750
750
  style: {
751
- color: u ? m : _
751
+ color: d ? p : m
752
752
  }
753
753
  }
754
754
  )
755
755
  }
756
756
  ),
757
- Array.from({ length: e }).map((A, I) => {
758
- const S = I === t;
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: S ? _ : m,
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
- ...s ? {
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: S && s ? 24 : 8
777
+ width: y && a ? 24 : 8
778
778
  }
779
779
  },
780
- `carousel-button-${I}`
780
+ `carousel-button-${S}`
781
781
  );
782
782
  }),
783
783
  /* @__PURE__ */ o(
784
- se,
784
+ ae,
785
785
  {
786
- "aria-disabled": d,
787
- "aria-label": E?.next_insight_cta_aria,
788
- disabled: d,
786
+ "aria-disabled": _,
787
+ "aria-label": g?.next_insight_cta_aria,
788
+ disabled: _,
789
789
  onClick: n,
790
790
  children: /* @__PURE__ */ o(
791
- Re,
791
+ Te,
792
792
  {
793
793
  style: {
794
- color: d ? m : _
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
- }, Mt = ({
803
+ }, Wt = ({
804
804
  activeCardIndex: t,
805
805
  beats: e,
806
806
  cardWidth: n,
807
- showCTAColocatedWithText: r,
808
- heightOverrides: i,
809
- onCardClick: a,
810
- posthog: s,
811
- showIcon: C,
812
- variant: g
807
+ heightOverrides: r,
808
+ onCardClick: i,
809
+ posthog: l,
810
+ showIcon: a,
811
+ variant: u
813
812
  }) => {
814
- const { carouselCopy: E } = x(), u = {
815
- showCTAColocatedWithText: r,
816
- heightOverrides: i,
817
- posthog: s,
818
- showIcon: C,
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(Te, { children: [
822
- e.map((d, m) => {
823
- const _ = m + 1, A = e.length + 1, I = Xe(
824
- E?.card_position_in_carousel_aria,
825
- _.toString(),
826
- A.toString()
827
- ), S = d.micro_title && d.micro_title.length > 0, f = d.micro_description && d.micro_description.length > 0, v = S ? d.micro_title : d.title, N = f ? d.micro_description : d.description;
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
- Ot,
827
+ Rt,
830
828
  {
831
- ariaLabel: `${I}: ${v}, ${N}`,
829
+ ariaLabel: `${f}: ${A}, ${N}`,
832
830
  beat: d,
833
- index: m,
834
- isActiveCard: m === t,
835
- onCardClick: a,
831
+ index: _,
832
+ isActiveCard: _ === t,
833
+ onCardClick: i,
836
834
  widthOverrides: n || void 0,
837
- ...u
835
+ ...g
838
836
  },
839
- `${d.guid} ${m}`
837
+ `${d.guid} ${_}`
840
838
  );
841
839
  }),
842
840
  /* @__PURE__ */ o(
843
- Bt,
841
+ Pt,
844
842
  {
845
843
  isActiveCard: t === e.length,
846
- onCardClick: a,
844
+ onCardClick: i,
847
845
  widthOverrides: n || void 0,
848
- ...u
846
+ ...g
849
847
  }
850
848
  )
851
849
  ] });
852
- }, Nt = ({
850
+ }, wt = ({
853
851
  analyticsMetadata: t,
854
852
  allowSingleCardPeeking: e = !1,
855
853
  beats: n = [],
856
- showCTAColocatedWithText: r,
857
- heightOverrides: i,
858
- onCardClick: a,
859
- posthog: s,
860
- showCarouselControls: C,
861
- showIcon: g,
862
- showWithMargin: E = !0,
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: m = 1
862
+ visibleCardsCount: _ = 1
866
863
  // Default to 1 card visible
867
864
  }) => {
868
- const _ = h.useRef(null), A = h.useRef(null), [I, S] = h.useState(0), [f, v] = h.useState(null), [N, k] = h.useState(null), [y, P] = h.useState(null), { carouselCopy: w } = x(), { onEvent: p } = X();
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 (_.current && !e) {
871
- const O = _.current.offsetWidth, F = 8;
872
- let U;
873
- if (m > 1) {
874
- const pe = (O - (m - 1) * F) / m / 3;
875
- U = (O - pe - (m - 1) * F) / m;
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
- U = O;
878
- P(U);
874
+ k = W;
875
+ v(k);
879
876
  }
880
- }, [m, _.current?.offsetWidth]), h.useEffect(() => {
881
- const O = A.current?.offsetWidth;
882
- if (typeof O == "number" && e) {
877
+ }, [_, p.current?.offsetWidth]), h.useEffect(() => {
878
+ const W = m.current?.offsetWidth;
879
+ if (typeof W == "number" && e) {
883
880
  const F = ($) => {
884
- const me = [
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((Ge) => $ <= Ge.maxWidth);
891
- return me ? me.cardWidth : 750;
887
+ ].find((Ve) => $ <= Ve.maxWidth);
888
+ return pe ? pe.cardWidth : 750;
892
889
  };
893
- P(F(O));
894
- const U = () => {
895
- const $ = A.current?.offsetWidth;
896
- typeof $ == "number" && P(F($));
890
+ v(F(W));
891
+ const k = () => {
892
+ const $ = m.current?.offsetWidth;
893
+ typeof $ == "number" && v(F($));
897
894
  };
898
- return window.addEventListener("resize", U), () => {
899
- window.removeEventListener("resize", U);
895
+ return window.addEventListener("resize", k), () => {
896
+ window.removeEventListener("resize", k);
900
897
  };
901
898
  }
902
- }, [e, A]);
903
- const ee = () => {
904
- p(R.ON_CAROUSEL_FORWARD_CLICK, t), _.current && y && _.current.scrollTo({
905
- left: I + y + 8,
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
- p(R.ON_CAROUSEL_BACK_CLICK, t), _.current && y && _.current.scrollTo({
911
- left: Math.max(0, I - (y + 8)),
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
- _.current && S(_.current.scrollLeft);
917
- }, te = () => {
918
- if (!N || !f) return;
919
- N - f > Tt ? p(R.ON_CAROUSEL_FORWARD_SWIPE, t) : p(R.ON_CAROUSEL_BACK_SWIPE, t);
920
- }, oe = (O) => {
921
- v(O.targetTouches[0].clientX);
922
- }, ne = (O) => {
923
- v(null), k(O.targetTouches[0].clientX);
924
- }, K = y ? Math.round(I / (y + 8)) : 0, B = _.current ? _.current.scrollWidth - _.current.offsetWidth : 0;
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
- W,
923
+ w,
927
924
  {
928
- "aria-label": w?.carousel_title,
925
+ "aria-label": P?.carousel_title,
929
926
  "aria-roledescription": "carousel",
930
- ref: A,
927
+ ref: m,
931
928
  role: "region",
932
929
  sx: {
933
930
  alignItems: "center",
934
931
  boxSizing: "border-box",
935
- height: i,
932
+ height: r,
936
933
  width: d || "100%"
937
934
  },
938
935
  children: [
939
936
  /* @__PURE__ */ o(
940
- W,
937
+ w,
941
938
  {
942
939
  direction: "row",
943
940
  onScroll: Q,
944
- onTouchEnd: te,
945
- onTouchMove: oe,
946
- onTouchStart: ne,
947
- ref: _,
941
+ onTouchEnd: ee,
942
+ onTouchMove: te,
943
+ onTouchStart: oe,
944
+ ref: p,
948
945
  sx: {
949
946
  alignItems: "center",
950
- height: i && "100%",
947
+ height: r && "100%",
951
948
  gap: 8,
952
949
  listStyleType: "none",
953
950
  m: 0,
954
- maxWidth: E ? "calc(100% - 32px)" : "100%",
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
- Mt,
963
+ Wt,
967
964
  {
968
965
  activeCardIndex: K,
969
966
  beats: n,
970
- cardWidth: y,
971
- heightOverrides: i,
972
- onCardClick: a,
973
- posthog: s,
974
- showCTAColocatedWithText: r,
975
- showIcon: g,
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
- C && /* @__PURE__ */ o(
982
- Wt,
977
+ a && /* @__PURE__ */ o(
978
+ Ot,
983
979
  {
984
- currentBeatIndex: K + m - 1,
980
+ currentBeatIndex: K + _ - 1,
985
981
  numBeats: n.length + 1,
986
- onNextClick: ee,
982
+ onNextClick: C,
987
983
  onPreviousClick: Z,
988
984
  scrollRightBoundary: B,
989
- scrollX: I,
985
+ scrollX: f,
990
986
  shouldApplyDotAnimation: e,
991
- visibleCardsCount: m
987
+ visibleCardsCount: _
992
988
  }
993
989
  )
994
990
  ]
995
991
  }
996
992
  );
997
- }, wt = z(Nt), bt = ({
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: a } = x(), { onEvent: s } = X(), C = () => {
1005
- s && (s(R.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
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 a ? /* @__PURE__ */ M(
1008
- W,
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(Ke, { children: a.carousel_title }),
1017
+ /* @__PURE__ */ o(ze, { children: l.carousel_title }),
1022
1018
  /* @__PURE__ */ o(
1023
- ae,
1019
+ ie,
1024
1020
  {
1025
- endIcon: /* @__PURE__ */ o(Re, { size: 20 }),
1026
- onClick: C,
1021
+ endIcon: /* @__PURE__ */ o(Te, { size: 20 }),
1022
+ onClick: u,
1027
1023
  size: "small",
1028
1024
  variant: "text",
1029
- children: a.view_all_insights_in_full_feed_cta_aria
1025
+ children: l.view_all_insights_in_full_feed_cta_aria
1030
1026
  }
1031
1027
  )
1032
1028
  ]
1033
1029
  }
1034
- ) : /* @__PURE__ */ o(je, {});
1035
- }, Lt = z(bt), Dt = ({
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
- }, Be = ({
1052
+ }, Pe = ({
1057
1053
  ariaLabel: t,
1058
1054
  heightOverrides: e,
1059
1055
  onCardClick: n,
1060
1056
  posthog: r,
1061
1057
  showIcon: i,
1062
- variant: a
1058
+ variant: l
1063
1059
  }) => {
1064
- const { cardsCopy: s } = x(), C = j(), { onEvent: g } = X(), { onPageview: E } = ve();
1060
+ const { cardsCopy: a } = x(), u = j(), { onEvent: I } = X(), { onPageview: g } = xe();
1065
1061
  h.useEffect(() => {
1066
- E(G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1062
+ g(G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1067
1063
  }, []);
1068
- const u = () => {
1069
- n && n(), g(R.ON_NO_RELEVANT_INSIGHTS_CLICKED), r?.capture("clicked_insight", {
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: s.no_relevant_insights_card_description,
1076
+ description: a.no_relevant_insights_card_description,
1081
1077
  hasCardEffect: !0,
1082
1078
  heightOverrides: e,
1083
- icon: i && /* @__PURE__ */ o(l, { bgColor: c(C.palette.primary.main, 0.15), name: "lightbulb" }),
1084
- onCardClick: u,
1085
- onPrimaryAction: u,
1086
- primaryActionText: s.micro_card_cta,
1087
- title: s.no_relevant_insights_card_title,
1088
- variant: a
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
- }, so = z(Be), Ve = ({
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: a } = ve(), { zeroStateCopy: s } = x(), C = j();
1094
+ const { onPageview: l } = xe(), { zeroStateCopy: a } = x(), u = j();
1099
1095
  return h.useEffect(() => {
1100
- a(G.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
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: s.carousel_zero_state_description,
1104
+ description: a.carousel_zero_state_description,
1109
1105
  hasCardEffect: !0,
1110
1106
  heightOverrides: e,
1111
- icon: r && /* @__PURE__ */ o(l, { bgColor: c(C.palette.primary.main, 0.15), name: "lightbulb" }),
1107
+ icon: r && /* @__PURE__ */ o(c, { bgColor: s(u.palette.primary.main, 0.15), name: "lightbulb" }),
1112
1108
  onCardClick: n,
1113
- title: s.carousel_zero_state_title,
1109
+ title: a.carousel_zero_state_title,
1114
1110
  variant: i
1115
1111
  }
1116
1112
  );
1117
- }, co = z(Ve), xt = () => /* @__PURE__ */ o(
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(Ze, {})
1123
+ children: /* @__PURE__ */ o(Xe, {})
1128
1124
  }
1129
- ), V = new lt(), vt = ({
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
- showCTAColocatedWithText: r = !0,
1135
- endpoint: i = "/",
1136
- heightOverrides: a,
1137
- headerSx: s,
1138
- logOutUser: C,
1139
- onCardClick: g = () => {
1130
+ endpoint: r = "/",
1131
+ heightOverrides: i,
1132
+ headerSx: l,
1133
+ logOutUser: a,
1134
+ onCardClick: u = () => {
1140
1135
  },
1141
- onEvent: E = () => {
1136
+ onEvent: I = () => {
1142
1137
  },
1143
- onPageview: u = () => {
1138
+ onPageview: g = () => {
1144
1139
  },
1145
1140
  posthog: d,
1146
- showBorder: m = !0,
1147
- showCarouselControls: _,
1148
- showHeader: A,
1149
- showIcon: I,
1141
+ showBorder: _ = !0,
1142
+ showCarouselControls: p,
1143
+ showHeader: m,
1144
+ showIcon: f,
1150
1145
  showWithMargin: S = !0,
1151
- token: f = "",
1152
- userHasFullInsightFeedBeats: v,
1146
+ token: y = "",
1147
+ userHasFullInsightFeedBeats: A,
1153
1148
  variant: N,
1154
- visibleCardsCount: k = 1,
1155
- widthOverrides: y
1149
+ visibleCardsCount: z = 1,
1150
+ widthOverrides: E
1156
1151
  }) => {
1157
- const [P, w] = re("STANDARD"), [p, ee] = re(!1), [Z, Q] = re(!1), te = qe([E], V), oe = Je([u], V);
1158
- et({
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: p
1155
+ isLoaded: T
1161
1156
  }), h.useEffect(() => {
1162
- !V.isInitialized && !Z && (V.initialize(i, f, C).catch(() => Q(!1)), Q(!0));
1163
- }, [i, f, C, V.isInitialized, Z]), h.useEffect(() => {
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 ? w("STANDARD") : B >= 180 && B < 200 ? w("LARGE") : B >= 200 && B < 248 ? w("XLARGE") : B >= 248 && w("XXLARGE");
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
- ee(!e && V.isInitialized);
1162
+ C(!e && V.isInitialized);
1168
1163
  }, [e, V.isInitialized]);
1169
- const ne = {
1170
- showCTAColocatedWithText: r,
1171
- heightOverrides: a,
1172
- onCardClick: g,
1164
+ const oe = {
1165
+ heightOverrides: i,
1166
+ onCardClick: u,
1173
1167
  posthog: d,
1174
- showIcon: I,
1168
+ showIcon: f,
1175
1169
  showWithMargin: S,
1176
- widthOverrides: y
1170
+ widthOverrides: E
1177
1171
  }, K = {
1178
- carouselSize: P,
1172
+ carouselSize: v,
1179
1173
  variant: N,
1180
- showCTAColocatedWithText: r,
1181
- heightOverrides: a,
1182
- onCardClick: g,
1174
+ heightOverrides: i,
1175
+ onCardClick: u,
1183
1176
  posthog: d,
1184
- showIcon: I
1177
+ showIcon: f
1185
1178
  };
1186
- return /* @__PURE__ */ o(dt, { onEvent: te, onPageview: oe, store: V, children: /* @__PURE__ */ M(Dt, { heightOverrides: a, widthOverrides: y, children: [
1187
- !p && /* @__PURE__ */ o(xt, {}),
1188
- p && A && /* @__PURE__ */ o(
1189
- Lt,
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: Ee,
1192
- headerSx: s,
1193
- onCardClick: g,
1184
+ analyticsMetadata: ge,
1185
+ headerSx: l,
1186
+ onCardClick: u,
1194
1187
  posthog: d,
1195
- widthOverrides: y
1188
+ widthOverrides: E
1196
1189
  }
1197
1190
  ),
1198
- p && !!n.length && /* @__PURE__ */ o(
1199
- wt,
1191
+ T && !!n.length && /* @__PURE__ */ o(
1192
+ Mt,
1200
1193
  {
1201
1194
  allowSingleCardPeeking: t,
1202
- analyticsMetadata: Ee,
1195
+ analyticsMetadata: ge,
1203
1196
  beats: n,
1204
- showCarouselControls: _,
1205
- variant: m ? N : void 0,
1206
- visibleCardsCount: k,
1207
- ...ne
1197
+ showCarouselControls: p,
1198
+ variant: _ ? N : void 0,
1199
+ visibleCardsCount: z,
1200
+ ...oe
1208
1201
  }
1209
1202
  ),
1210
- p && !n.length && /* @__PURE__ */ o(
1211
- W,
1203
+ T && !n.length && /* @__PURE__ */ o(
1204
+ w,
1212
1205
  {
1213
1206
  sx: {
1214
1207
  alignItems: "center",
1215
- height: a,
1216
- width: y || "100%"
1208
+ height: i,
1209
+ width: E || "100%"
1217
1210
  },
1218
1211
  children: /* @__PURE__ */ o(
1219
- W,
1212
+ w,
1220
1213
  {
1221
1214
  sx: {
1222
- height: `calc(${St[P]}px - 44px)`,
1223
- width: S ? `calc(${y}px - 32px)` : "100%"
1215
+ height: `calc(${At[v]}px - 44px)`,
1216
+ width: S ? `calc(${E}px - 32px)` : "100%"
1224
1217
  },
1225
- children: v ? /* @__PURE__ */ o(Be, { ...K }) : /* @__PURE__ */ o(Ve, { ...K })
1218
+ children: A ? /* @__PURE__ */ o(Pe, { ...K }) : /* @__PURE__ */ o(Be, { ...K })
1226
1219
  }
1227
1220
  )
1228
1221
  }
1229
1222
  )
1230
1223
  ] }) });
1231
- }, lo = z(vt), Pt = ({
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: a,
1238
- showIcon: s,
1239
- variant: C
1230
+ widthOverrides: l,
1231
+ showIcon: a,
1232
+ variant: u
1240
1233
  }) => {
1241
- const g = j(), { ref: E, inView: u } = Oe({
1242
- threshold: Pe
1243
- }), { cardsCopy: d } = x(), { onEvent: m } = X();
1244
- ie(() => {
1245
- u && (m(be.ON_VIEW_MORE_VIEWED), i?.capture("viewed_insight", {
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
- }, [u]);
1249
- const _ = () => {
1250
- r && r(), m(R.ON_VIEW_MORE_CLICKED), i?.capture("clicked_insight", {
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: d?.view_more_card_description,
1255
+ description: _?.view_more_card_description,
1263
1256
  hasCardEffect: !0,
1264
1257
  heightOverrides: e,
1265
- icon: s && /* @__PURE__ */ o(l, { bgColor: c(g.palette.primary.main, 0.15), name: "show_chart" }),
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: d?.micro_card_cta,
1270
- ref: E,
1271
- title: d?.view_more_card_title,
1272
- variant: C,
1273
- widthOverrides: a
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
- }, Bt = z(Pt);
1269
+ }, Pt = U(vt);
1277
1270
  export {
1278
- lt as A,
1279
- l as B,
1280
- Lt as C,
1281
- dt as I,
1282
- wt as M,
1283
- so as N,
1284
- Ee as T,
1285
- Bt as V,
1286
- co as Z,
1287
- Ot as a,
1288
- lo as b,
1289
- ht as c,
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
  };