@mx-cartographer/experiences 7.0.34 → 7.0.36

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,39 +1,38 @@
1
- import { jsx as e, jsxs as I } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
2
  import u, { useState as te, useEffect as oe } from "react";
3
- import { observer as P } from "mobx-react-lite";
4
- import be from "@mui/material/CssBaseline";
5
- import { useTheme as Me, ThemeProvider as Ue } from "@mui/material/styles";
6
- import ze from "@mui/material/Link";
3
+ import { observer as G } from "mobx-react-lite";
4
+ import Ge from "@mui/material/Link";
7
5
  import K from "@mui/material/Stack";
8
6
  import pe from "@mui/material/Typography";
9
- import { ChevronLeft as Ke, ChevronRight as Ae } from "@mxenabled/mx-icons";
10
- import { L as $e } from "./Loader-DUaFpDGv.mjs";
7
+ import { ChevronLeft as be, ChevronRight as Me } from "@mxenabled/mx-icons";
8
+ import { L as Ue } from "./Loader-DUaFpDGv.mjs";
11
9
  import U from "@mui/material/Box";
12
10
  import _e from "@mui/material/IconButton";
13
- import { useInView as Oe } from "react-intersection-observer";
14
- import { P as Ye, CategoryIcon as je, useTokens as Te, MerchantLogo as Xe, Icon as ie } from "@mxenabled/mxui";
15
- import de from "@mui/material/styles/useTheme";
16
- import { b as Qe } from "./Category-CevNQ03n.mjs";
17
- import { css as qe } from "@mxenabled/cssinjs";
18
- import { b as Je } from "./Localization-2MODESHW.mjs";
19
- import et from "@mui/material/CircularProgress";
20
- import { makeAutoObservable as he, runInAction as We } from "mobx";
21
- import { G as Ce, a as tt, u as it, b as ot } from "./useCombineEvents-BUDIR1ba.mjs";
11
+ import { useTheme as ze } from "@mui/material/styles";
12
+ import { useInView as Ae } from "react-intersection-observer";
13
+ import { P as Ke, CategoryIcon as $e, useTokens as Oe, MerchantLogo as Ye, Icon as ie } from "@mxenabled/mxui";
14
+ import se from "@mui/material/styles/useTheme";
15
+ import { b as je } from "./Category-CevNQ03n.mjs";
16
+ import { css as Xe } from "@mxenabled/cssinjs";
17
+ import { b as Qe } from "./Localization-2MODESHW.mjs";
18
+ import qe from "@mui/material/CircularProgress";
19
+ import { makeAutoObservable as de, runInAction as Te } from "mobx";
20
+ import { G as Ce, a as Je, u as et, b as tt } from "./useCombineEvents-BUDIR1ba.mjs";
22
21
  import { B as fe } from "./BeatApi-DhJpgCLz.mjs";
23
- import rt from "@mui/material/Card";
24
- import lt from "@mui/material/CardActions";
25
- import nt from "@mui/material/CardContent";
26
- import at from "@mui/material/CardHeader";
22
+ import it from "@mui/material/Card";
23
+ import ot from "@mui/material/CardActions";
24
+ import rt from "@mui/material/CardContent";
25
+ import lt from "@mui/material/CardHeader";
27
26
  const me = {
28
27
  featureVersion: "spendVsIncomeTrends"
29
28
  };
30
- class ct {
29
+ class nt {
31
30
  copyApi = new Ce("/", "");
32
31
  copyObject = {};
33
32
  namespace = "experiences";
34
33
  translationKey = "micro_insights";
35
34
  constructor() {
36
- he(this);
35
+ de(this);
37
36
  }
38
37
  // NOTE: Not sure if this is special case, but other stores have this deprecation todo
39
38
  // DEPRECATED: Initialize api in constructor and use loadCopy instead
@@ -43,7 +42,7 @@ class ct {
43
42
  };
44
43
  loadCopy = async () => {
45
44
  const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
46
- We(() => {
45
+ Te(() => {
47
46
  this.copyObject = o[this.translationKey];
48
47
  });
49
48
  };
@@ -57,7 +56,7 @@ class ct {
57
56
  return this.copyObject.zero_state;
58
57
  }
59
58
  }
60
- const Ee = {
59
+ const he = {
61
60
  BillAmountNotStandard: "BillAmountNotStandard",
62
61
  CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
63
62
  DuplicatePaymentV2: "DuplicatePaymentV2",
@@ -76,45 +75,45 @@ const Ee = {
76
75
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
77
76
  }, S = window?.app?.clientConfig?.microwidget_instance_id || "", ge = {
78
77
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
79
- }, we = (i) => `on${i}Click`, xe = (i) => `on${i}View`, De = (i) => `on${i}ViewFirstTime`, ue = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), st = () => Object.values(Ee).reduce(
78
+ }, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`, Ee = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(he).reduce(
80
79
  (i, o) => ({
81
80
  ...i,
82
- [we(o)]: {
83
- action: x.MICRO_BEAT_CLICKED,
84
- category: w.BEAT_INTERACTION,
85
- label: ue(o),
81
+ [We(o)]: {
82
+ action: w.MICRO_BEAT_CLICKED,
83
+ category: W.BEAT_INTERACTION,
84
+ label: Ee(o),
86
85
  value: S
87
86
  }
88
87
  }),
89
88
  {}
90
- ), dt = () => Object.values(Ee).reduce(
89
+ ), ct = () => Object.values(he).reduce(
91
90
  (i, o) => ({
92
91
  ...i,
93
- [xe(o)]: {
94
- action: x.MICRO_BEAT_DISPLAYED,
95
- category: w.BEAT_INTERACTION,
96
- label: ue(o),
92
+ [we(o)]: {
93
+ action: w.MICRO_BEAT_DISPLAYED,
94
+ category: W.BEAT_INTERACTION,
95
+ label: Ee(o),
97
96
  value: S
98
97
  }
99
98
  }),
100
99
  {}
101
- ), ht = () => Object.values(Ee).reduce(
100
+ ), st = () => Object.values(he).reduce(
102
101
  (i, o) => ({
103
102
  ...i,
104
- [De(o)]: {
105
- action: x.MICRO_BEAT_DISPLAYED_FIRST_TIME,
106
- category: w.BEAT_INTERACTION,
107
- label: ue(o),
103
+ [xe(o)]: {
104
+ action: w.MICRO_BEAT_DISPLAYED_FIRST_TIME,
105
+ category: W.BEAT_INTERACTION,
106
+ label: Ee(o),
108
107
  value: S
109
108
  }
110
109
  }),
111
110
  {}
112
- ), W = {
111
+ ), T = {
113
112
  CARD: "Card",
114
113
  CAROUSEL_CONTROL: "Carousel Control",
115
114
  MICRO_WIDGET: "Micro Widget",
116
115
  VIEW_MORE: "View More"
117
- }, w = {
116
+ }, W = {
118
117
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
119
118
  BEAT_INTERACTION: "Beat Interaction"
120
119
  }, M = {
@@ -124,9 +123,9 @@ const Ee = {
124
123
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
125
124
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
126
125
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
127
- }, Le = {
126
+ }, De = {
128
127
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
129
- }, x = {
128
+ }, w = {
130
129
  CONTROL_BACKWARD: "Control Backward",
131
130
  CONTROL_FORWARD: "Control Forward",
132
131
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -134,84 +133,84 @@ const Ee = {
134
133
  MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
135
134
  SWIPE_BACKWARD: "Swipe Backward",
136
135
  SWIPE_FORWARD: "Swipe Forward"
137
- }, k = {
136
+ }, H = {
138
137
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
139
138
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
140
139
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
141
140
  }, Re = {
142
- [k.MICRO_WIDGET_CAROUSEL]: {
143
- label: W.MICRO_WIDGET,
144
- name: k.MICRO_WIDGET_CAROUSEL,
141
+ [H.MICRO_WIDGET_CAROUSEL]: {
142
+ label: T.MICRO_WIDGET,
143
+ name: H.MICRO_WIDGET_CAROUSEL,
145
144
  path: ge.INSIGHTS_MICRO_WIDGET,
146
145
  value: S
147
146
  },
148
147
  // zero state
149
- [k.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
150
- label: W.MICRO_WIDGET,
151
- name: k.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
148
+ [H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
149
+ label: T.MICRO_WIDGET,
150
+ name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
152
151
  path: ge.INSIGHTS_MICRO_WIDGET,
153
152
  value: S
154
153
  },
155
154
  // no relevant cards
156
- [k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
157
- label: W.MICRO_WIDGET,
158
- name: k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
155
+ [H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
156
+ label: T.MICRO_WIDGET,
157
+ name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
159
158
  path: "/micro-widget",
160
159
  value: S
161
160
  }
162
161
  }, Ie = {
163
162
  // carousel control interaction events - clicks and swipes
164
163
  [M.ON_CAROUSEL_BACK_CLICK]: {
165
- action: x.CONTROL_BACKWARD,
166
- category: w.MICRO_WIDGET_INTERACTION,
167
- label: W.CAROUSEL_CONTROL,
164
+ action: w.CONTROL_BACKWARD,
165
+ category: W.MICRO_WIDGET_INTERACTION,
166
+ label: T.CAROUSEL_CONTROL,
168
167
  value: S
169
168
  },
170
169
  [M.ON_CAROUSEL_FORWARD_CLICK]: {
171
- action: x.CONTROL_FORWARD,
172
- category: w.MICRO_WIDGET_INTERACTION,
173
- label: W.CAROUSEL_CONTROL,
170
+ action: w.CONTROL_FORWARD,
171
+ category: W.MICRO_WIDGET_INTERACTION,
172
+ label: T.CAROUSEL_CONTROL,
174
173
  value: S
175
174
  },
176
175
  [M.ON_CAROUSEL_BACK_SWIPE]: {
177
- action: x.SWIPE_BACKWARD,
178
- category: w.MICRO_WIDGET_INTERACTION,
179
- label: W.CAROUSEL_CONTROL,
176
+ action: w.SWIPE_BACKWARD,
177
+ category: W.MICRO_WIDGET_INTERACTION,
178
+ label: T.CAROUSEL_CONTROL,
180
179
  value: S
181
180
  },
182
181
  [M.ON_CAROUSEL_FORWARD_SWIPE]: {
183
- action: x.SWIPE_FORWARD,
184
- category: w.MICRO_WIDGET_INTERACTION,
185
- label: W.CAROUSEL_CONTROL,
182
+ action: w.SWIPE_FORWARD,
183
+ category: W.MICRO_WIDGET_INTERACTION,
184
+ label: T.CAROUSEL_CONTROL,
186
185
  value: S
187
186
  },
188
187
  // read more card events
189
188
  [M.ON_VIEW_MORE_CLICKED]: {
190
- action: x.MICRO_BEAT_CLICKED,
191
- category: w.BEAT_INTERACTION,
192
- label: W.VIEW_MORE,
189
+ action: w.MICRO_BEAT_CLICKED,
190
+ category: W.BEAT_INTERACTION,
191
+ label: T.VIEW_MORE,
193
192
  value: S
194
193
  },
195
- [Le.ON_VIEW_MORE_VIEWED]: {
196
- action: x.MICRO_BEAT_DISPLAYED,
197
- category: w.BEAT_INTERACTION,
198
- label: W.VIEW_MORE,
194
+ [De.ON_VIEW_MORE_VIEWED]: {
195
+ action: w.MICRO_BEAT_DISPLAYED,
196
+ category: W.BEAT_INTERACTION,
197
+ label: T.VIEW_MORE,
199
198
  value: S
200
199
  },
201
- ...st(),
202
- ...dt(),
203
- ...ht()
200
+ ...at(),
201
+ ...ct(),
202
+ ...st()
204
203
  }, ye = async (i, o) => !o || !Ie[i] ? null : o.sendAnalyticEvent(Ie[i]).then((t) => t).catch((t) => {
205
204
  throw t;
206
205
  }), ve = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
207
206
  throw t;
208
207
  });
209
- class Et {
208
+ class dt {
210
209
  onAnalyticEvent = ye;
211
210
  onAnalyticPageView = ve;
212
211
  beatApi = new fe("/", "");
213
212
  constructor() {
214
- he(this);
213
+ de(this);
215
214
  }
216
215
  initialize = async (o, t, r) => {
217
216
  this.onAnalyticEvent = (l, n) => {
@@ -231,7 +230,7 @@ class Et {
231
230
  this.beatApi.updateOffer(o);
232
231
  };
233
232
  }
234
- class ut {
233
+ class ht {
235
234
  copyStore;
236
235
  endpoint = "/";
237
236
  insightsMicroWidgetStore;
@@ -239,17 +238,17 @@ class ut {
239
238
  token = "";
240
239
  isInitialized = !1;
241
240
  constructor() {
242
- this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(), he(this);
241
+ this.copyStore = new nt(), this.insightsMicroWidgetStore = new dt(), de(this);
243
242
  }
244
243
  initialize = async (o, t, r) => {
245
244
  await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
246
- const l = await tt(o, t, "1.0.0", "Micro Insights Carousel");
247
- We(() => {
245
+ const l = await Je(o, t, "1.0.0", "Micro Insights Carousel");
246
+ Te(() => {
248
247
  this.session = l, this.isInitialized = !0;
249
248
  });
250
249
  };
251
250
  }
252
- const $ = u.createContext(null), pt = ({
251
+ const $ = u.createContext(null), Et = ({
253
252
  onEvent: i,
254
253
  onPageview: o,
255
254
  store: t,
@@ -273,8 +272,8 @@ const $ = u.createContext(null), pt = ({
273
272
  variant: c,
274
273
  widthOverrides: E
275
274
  }, g) {
276
- const y = de(), [D, O] = u.useState(!1), { cardStyle: v, linkTextStyle: B } = f, z = c ? v : { border: "none", boxShadow: "none", ...v }, R = /* @__PURE__ */ e(
277
- Ye,
275
+ const I = se(), [x, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, R = /* @__PURE__ */ e(
276
+ Ke,
278
277
  {
279
278
  className: "mx-micro-card-description",
280
279
  color: h.textColor ? "undefined" : "text.primary",
@@ -294,7 +293,7 @@ const $ = u.createContext(null), pt = ({
294
293
  "span",
295
294
  {
296
295
  dangerouslySetInnerHTML: { __html: l },
297
- style: { fontFamily: y.typography.fontFamily }
296
+ style: { fontFamily: I.typography.fontFamily }
298
297
  }
299
298
  )
300
299
  }
@@ -311,7 +310,7 @@ const $ = u.createContext(null), pt = ({
311
310
  sx: {
312
311
  height: "100%",
313
312
  minWidth: E ? `${E}px` : "100%",
314
- fontFamily: y.typography.fontFamily
313
+ fontFamily: I.typography.fontFamily
315
314
  },
316
315
  children: /* @__PURE__ */ e(
317
316
  U,
@@ -325,13 +324,13 @@ const $ = u.createContext(null), pt = ({
325
324
  ref: g,
326
325
  role: "button",
327
326
  sx: {
328
- border: D ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
327
+ border: x ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
329
328
  borderRadius: "8px",
330
329
  height: "100%"
331
330
  },
332
331
  tabIndex: d ? 0 : -1,
333
332
  children: /* @__PURE__ */ e(
334
- rt,
333
+ it,
335
334
  {
336
335
  "aria-roledescription": "slide",
337
336
  className: "mx-micro-card",
@@ -348,7 +347,7 @@ const $ = u.createContext(null), pt = ({
348
347
  }
349
348
  },
350
349
  variant: c,
351
- children: /* @__PURE__ */ I(
350
+ children: /* @__PURE__ */ v(
352
351
  K,
353
352
  {
354
353
  sx: {
@@ -357,7 +356,7 @@ const $ = u.createContext(null), pt = ({
357
356
  },
358
357
  children: [
359
358
  /* @__PURE__ */ e(
360
- at,
359
+ lt,
361
360
  {
362
361
  avatar: C && a,
363
362
  subheader: p && R,
@@ -366,9 +365,9 @@ const $ = u.createContext(null), pt = ({
366
365
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
367
366
  }
368
367
  ),
369
- /* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p && R }),
368
+ /* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && R }),
370
369
  !!o && /* @__PURE__ */ e(
371
- lt,
370
+ ot,
372
371
  {
373
372
  sx: {
374
373
  mt: "auto",
@@ -377,13 +376,13 @@ const $ = u.createContext(null), pt = ({
377
376
  children: /* @__PURE__ */ e(
378
377
  U,
379
378
  {
380
- sx: (L) => ({
381
- color: h.buttonColor ? h.buttonColor : L.palette.primary.main,
379
+ sx: (D) => ({
380
+ color: h.buttonColor ? h.buttonColor : D.palette.primary.main,
382
381
  fontSize: 14,
383
382
  fontWeight: "bold",
384
383
  px: 28,
385
- fontFamily: L.typography.fontFamily,
386
- ...B
384
+ fontFamily: D.typography.fontFamily,
385
+ ...F
387
386
  }),
388
387
  children: o
389
388
  }
@@ -400,15 +399,15 @@ const $ = u.createContext(null), pt = ({
400
399
  }
401
400
  );
402
401
  }
403
- ), _t = ({ beat: i }) => {
404
- const [o, t] = te(Qe.UNCATEGORIZED);
402
+ ), ut = ({ beat: i }) => {
403
+ const [o, t] = te(je.UNCATEGORIZED);
405
404
  return oe(() => {
406
405
  i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
407
- }, []), /* @__PURE__ */ e(je, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
408
- }, Ct = ({ beat: i }) => {
409
- const o = Te(), t = ft(o);
406
+ }, []), /* @__PURE__ */ e($e, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
407
+ }, pt = ({ beat: i }) => {
408
+ const o = Oe(), t = _t(o);
410
409
  return /* @__PURE__ */ e(
411
- Xe,
410
+ Ye,
412
411
  {
413
412
  categoryGuid: i.primary_category_guid || i.category_guids && i.category_guids[0] || "",
414
413
  className: t,
@@ -416,12 +415,12 @@ const $ = u.createContext(null), pt = ({
416
415
  size: 16
417
416
  }
418
417
  );
419
- }, ft = (i) => qe({
418
+ }, _t = (i) => Xe({
420
419
  marginTop: i.Spacing.XTiny,
421
420
  "& .kyper-categoryicon": {
422
421
  display: "flex"
423
422
  }
424
- }), mt = P(Ct), gt = ({
423
+ }), Ct = G(pt), ft = ({
425
424
  color: i = "currentColor",
426
425
  height: o,
427
426
  size: t = 16,
@@ -447,18 +446,18 @@ const $ = u.createContext(null), pt = ({
447
446
  }
448
447
  )
449
448
  }
450
- ), Rt = (i) => i ? i.data ? i.data.map((o) => {
449
+ ), mt = (i) => i ? i.data ? i.data.map((o) => {
451
450
  const t = {};
452
451
  return i.names?.map((r, l) => {
453
452
  t[r] = o[l];
454
453
  }), t;
455
- }) : [] : [], It = (i, o) => {
456
- const t = Rt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
454
+ }) : [] : [], gt = (i, o) => {
455
+ const t = mt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
457
456
  return !l.length || !n.length ? o.Color.Primary300 : l[0].amount > n[0].amount ? o.Color.Error300 : l[0].amount < n[0].amount ? o.Color.Success300 : o.Color.Primary300;
458
- }, yt = ({ beat: i }) => {
459
- const o = Te(), t = It(i.data_series, o);
457
+ }, Rt = ({ beat: i }) => {
458
+ const o = Oe(), t = gt(i.data_series, o);
460
459
  return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
461
- }, Ne = () => /* @__PURE__ */ I("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
460
+ }, Le = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
462
461
  /* @__PURE__ */ e(
463
462
  "path",
464
463
  {
@@ -702,7 +701,7 @@ const $ = u.createContext(null), pt = ({
702
701
  fillRule: "evenodd"
703
702
  }
704
703
  ),
705
- /* @__PURE__ */ I("g", { filter: "url(#filter0_d_1565_98011)", children: [
704
+ /* @__PURE__ */ v("g", { filter: "url(#filter0_d_1565_98011)", children: [
706
705
  /* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
707
706
  "path",
708
707
  {
@@ -958,10 +957,10 @@ const $ = u.createContext(null), pt = ({
958
957
  ),
959
958
  /* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
960
959
  ] }),
961
- /* @__PURE__ */ I("g", { filter: "url(#filter1_d_1565_98011)", children: [
960
+ /* @__PURE__ */ v("g", { filter: "url(#filter1_d_1565_98011)", children: [
962
961
  /* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
963
962
  /* @__PURE__ */ e("mask", { height: "30", id: "mask2_1565_98011", maskUnits: "userSpaceOnUse", width: "30", x: "0", y: "1", children: /* @__PURE__ */ e("circle", { cx: "15.0435", cy: "16.0445", fill: "#F8F9FB", r: "14.3951" }) }),
964
- /* @__PURE__ */ I("g", { mask: "url(#mask2_1565_98011)", children: [
963
+ /* @__PURE__ */ v("g", { mask: "url(#mask2_1565_98011)", children: [
965
964
  /* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
966
965
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
967
966
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
@@ -1151,8 +1150,8 @@ const $ = u.createContext(null), pt = ({
1151
1150
  fill: "#CDD3DD"
1152
1151
  }
1153
1152
  ),
1154
- /* @__PURE__ */ I("defs", { children: [
1155
- /* @__PURE__ */ I(
1153
+ /* @__PURE__ */ v("defs", { children: [
1154
+ /* @__PURE__ */ v(
1156
1155
  "filter",
1157
1156
  {
1158
1157
  colorInterpolationFilters: "sRGB",
@@ -1195,7 +1194,7 @@ const $ = u.createContext(null), pt = ({
1195
1194
  ]
1196
1195
  }
1197
1196
  ),
1198
- /* @__PURE__ */ I(
1197
+ /* @__PURE__ */ v(
1199
1198
  "filter",
1200
1199
  {
1201
1200
  colorInterpolationFilters: "sRGB",
@@ -1240,8 +1239,8 @@ const $ = u.createContext(null), pt = ({
1240
1239
  )
1241
1240
  ] })
1242
1241
  ] }), Se = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1243
- const l = de(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
1244
- return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(_t, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(mt, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(yt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
1242
+ const l = se(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
1243
+ return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(ut, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(Ct, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(Rt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
1245
1244
  ie,
1246
1245
  {
1247
1246
  fill: !0,
@@ -1251,12 +1250,12 @@ const $ = u.createContext(null), pt = ({
1251
1250
  }
1252
1251
  }
1253
1252
  );
1254
- }, F = () => {
1253
+ }, k = () => {
1255
1254
  const i = u.useContext($);
1256
1255
  if (!i)
1257
1256
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
1258
1257
  return i.store.copyStore;
1259
- }, vt = () => {
1258
+ }, It = () => {
1260
1259
  const i = u.useContext($);
1261
1260
  if (!i?.store?.insightsMicroWidgetStore)
1262
1261
  throw new Error(
@@ -1268,17 +1267,17 @@ const $ = u.createContext(null), pt = ({
1268
1267
  if (!i)
1269
1268
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
1270
1269
  return { onEvent: i.onEvent };
1271
- }, Ve = () => {
1270
+ }, Ne = () => {
1272
1271
  const i = u.useContext($);
1273
1272
  if (!i)
1274
1273
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1275
1274
  return { onPageview: i.onPageview };
1276
- }, He = {
1275
+ }, Ve = {
1277
1276
  LARGE: 180,
1278
1277
  STANDARD: 154,
1279
1278
  XLARGE: 200,
1280
1279
  XXLARGE: 248
1281
- }, St = 50, ke = 1, Mt = ({
1280
+ }, yt = 50, He = 1, vt = ({
1282
1281
  ariaLabel: i,
1283
1282
  backgroundColor: o,
1284
1283
  beat: t,
@@ -1293,25 +1292,25 @@ const $ = u.createContext(null), pt = ({
1293
1292
  variant: f,
1294
1293
  widthOverrides: h
1295
1294
  }) => {
1296
- const { ref: m, inView: c } = Oe({
1297
- threshold: ke
1298
- }), { cardsCopy: E } = F(), { onEvent: g } = Y(), { updateBeat: y, updateOffer: D } = vt();
1295
+ const { ref: m, inView: c } = Ae({
1296
+ threshold: He
1297
+ }), { cardsCopy: E } = k(), { onEvent: g } = Y(), { updateBeat: I, updateOffer: x } = It();
1299
1298
  oe(() => {
1300
- c && (t.has_been_displayed ? g(xe(t.template)) : (t.guid.startsWith("OFR") ? D({
1299
+ c && (t.has_been_displayed ? g(we(t.template)) : (t.guid.startsWith("OFR") ? x({
1301
1300
  ...t,
1302
1301
  has_been_displayed: !0
1303
- }) : y({
1302
+ }) : I({
1304
1303
  ...t,
1305
1304
  has_been_displayed: !0
1306
- }), g(De(t.template))));
1305
+ }), g(xe(t.template))));
1307
1306
  }, [c]), oe(() => {
1308
1307
  if (c && t)
1309
1308
  if (t.template === "MarketingOffer") {
1310
- const v = t;
1309
+ const y = t;
1311
1310
  _?.capture("viewed_messaging_insight", {
1312
1311
  template: t.template,
1313
- campaign_guid: v.campaign_guid,
1314
- campaign_name: v.pulse_campaign_name
1312
+ campaign_guid: y.campaign_guid,
1313
+ campaign_name: y.pulse_campaign_name
1315
1314
  });
1316
1315
  } else
1317
1316
  _?.capture("viewed_insight", {
@@ -1321,12 +1320,12 @@ const $ = u.createContext(null), pt = ({
1321
1320
  });
1322
1321
  }, [t, a, c]);
1323
1322
  const O = () => {
1324
- if (p && p(t), g(we(t.template)), t.template === "MarketingOffer") {
1325
- const v = t;
1323
+ if (p && p(t), g(We(t.template)), t.template === "MarketingOffer") {
1324
+ const y = t;
1326
1325
  _?.capture("clicked_messaging_insight", {
1327
1326
  template: t.template,
1328
- campaign_guid: v.campaign_guid,
1329
- campaign_name: v.pulse_campaign_name
1327
+ campaign_guid: y.campaign_guid,
1328
+ campaign_name: y.pulse_campaign_name
1330
1329
  });
1331
1330
  } else
1332
1331
  _?.capture("clicked_insight", {
@@ -1364,7 +1363,7 @@ const $ = u.createContext(null), pt = ({
1364
1363
  widthOverrides: h
1365
1364
  }
1366
1365
  );
1367
- }, At = ({
1366
+ }, St = ({
1368
1367
  clientColorScheme: i,
1369
1368
  currentBeatIndex: o,
1370
1369
  numBeats: t,
@@ -1375,8 +1374,8 @@ const $ = u.createContext(null), pt = ({
1375
1374
  shouldApplyNewAnimation: d = !1,
1376
1375
  visibleCardsCount: p = 1
1377
1376
  }) => {
1378
- const _ = Me(), { carouselCopy: C } = F(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
1379
- return /* @__PURE__ */ I(
1377
+ const _ = ze(), { carouselCopy: C } = k(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
1378
+ return /* @__PURE__ */ v(
1380
1379
  K,
1381
1380
  {
1382
1381
  direction: "row",
@@ -1399,7 +1398,7 @@ const $ = u.createContext(null), pt = ({
1399
1398
  disabled: f,
1400
1399
  onClick: l,
1401
1400
  children: /* @__PURE__ */ e(
1402
- Ke,
1401
+ be,
1403
1402
  {
1404
1403
  style: {
1405
1404
  color: f ? m : c
@@ -1409,13 +1408,13 @@ const $ = u.createContext(null), pt = ({
1409
1408
  }
1410
1409
  ),
1411
1410
  Array.from({ length: t }).map((E, g) => {
1412
- const y = g === o;
1411
+ const I = g === o;
1413
1412
  return /* @__PURE__ */ e(
1414
1413
  U,
1415
1414
  {
1416
1415
  className: "mx-insights-micro-carousel-dots",
1417
1416
  sx: {
1418
- bgcolor: y ? c : m,
1417
+ bgcolor: I ? c : m,
1419
1418
  height: 8,
1420
1419
  mr: 8,
1421
1420
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
@@ -1428,7 +1427,7 @@ const $ = u.createContext(null), pt = ({
1428
1427
  borderRadius: "50%",
1429
1428
  p: 0
1430
1429
  },
1431
- width: y && d ? 24 : 8
1430
+ width: I && d ? 24 : 8
1432
1431
  }
1433
1432
  },
1434
1433
  `carousel-button-${g}`
@@ -1442,7 +1441,7 @@ const $ = u.createContext(null), pt = ({
1442
1441
  disabled: h,
1443
1442
  onClick: r,
1444
1443
  children: /* @__PURE__ */ e(
1445
- Ae,
1444
+ Me,
1446
1445
  {
1447
1446
  style: {
1448
1447
  color: h ? m : c
@@ -1454,7 +1453,7 @@ const $ = u.createContext(null), pt = ({
1454
1453
  ]
1455
1454
  }
1456
1455
  );
1457
- }, Ot = ({
1456
+ }, Mt = ({
1458
1457
  analyticsMetadata: i,
1459
1458
  allowSingleCardPeeking: o = !1,
1460
1459
  beats: t = [],
@@ -1472,75 +1471,75 @@ const $ = u.createContext(null), pt = ({
1472
1471
  visibleCardsCount: c = 1
1473
1472
  // Default to 1 card visible
1474
1473
  }) => {
1475
- const E = u.useRef(null), g = u.useRef(null), [y, D] = u.useState(0), [O, v] = u.useState(null), [B, z] = u.useState(null), [R, L] = u.useState(null), [le, G] = u.useState(p), { carouselCopy: N } = F(), { onEvent: b } = Y();
1474
+ const E = u.useRef(null), g = u.useRef(null), [I, x] = u.useState(0), [O, y] = u.useState(null), [F, z] = u.useState(null), [R, D] = u.useState(null), [b, B] = u.useState(p), { carouselCopy: j } = k(), { onEvent: Z } = Y();
1476
1475
  u.useEffect(() => {
1477
1476
  if (E.current && !o) {
1478
1477
  const s = E.current.offsetWidth, A = 8;
1479
- let V;
1478
+ let N;
1480
1479
  if (c > 1) {
1481
1480
  const J = (s - (c - 1) * A) / c / 3;
1482
- V = (s - J - (c - 1) * A) / c;
1481
+ N = (s - J - (c - 1) * A) / c;
1483
1482
  } else
1484
- V = s;
1485
- L(V);
1483
+ N = s;
1484
+ D(N);
1486
1485
  }
1487
1486
  }, [c, E.current?.offsetWidth]), u.useEffect(() => {
1488
1487
  const s = g.current?.offsetWidth;
1489
1488
  if (typeof s == "number" && o) {
1490
- const A = (Z) => {
1491
- G(!0);
1489
+ const A = (P) => {
1490
+ B(!0);
1492
1491
  const ee = [
1493
1492
  { maxWidth: 375, cardWidth: 268 },
1494
1493
  { maxWidth: 444, cardWidth: 300 },
1495
1494
  { maxWidth: 599, cardWidth: 350 },
1496
1495
  { maxWidth: 749, cardWidth: 450 },
1497
1496
  { maxWidth: 900, cardWidth: 600 }
1498
- ].find((se) => Z <= se.maxWidth);
1497
+ ].find((ce) => P <= ce.maxWidth);
1499
1498
  return ee ? ee.cardWidth : 750;
1500
1499
  };
1501
- L(A(s));
1502
- const V = () => {
1503
- const Z = g.current?.offsetWidth;
1504
- typeof Z == "number" && L(A(Z));
1500
+ D(A(s));
1501
+ const N = () => {
1502
+ const P = g.current?.offsetWidth;
1503
+ typeof P == "number" && D(A(P));
1505
1504
  };
1506
- return window.addEventListener("resize", V), () => {
1507
- window.removeEventListener("resize", V);
1505
+ return window.addEventListener("resize", N), () => {
1506
+ window.removeEventListener("resize", N);
1508
1507
  };
1509
1508
  }
1510
1509
  }, [o, g]);
1511
- const j = () => {
1512
- b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
1513
- left: y + R + 8,
1510
+ const X = () => {
1511
+ Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
1512
+ left: I + R + 8,
1514
1513
  top: 0,
1515
1514
  behavior: "smooth"
1516
1515
  });
1517
- }, X = () => {
1518
- b(M.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
1519
- left: Math.max(0, y - (R + 8)),
1516
+ }, le = () => {
1517
+ Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
1518
+ left: Math.max(0, I - (R + 8)),
1520
1519
  top: 0,
1521
1520
  behavior: "smooth"
1522
1521
  });
1523
1522
  }, ne = () => {
1524
- E.current && D(E.current.scrollLeft);
1525
- }, ae = () => {
1526
- if (!B || !O) return;
1527
- B - O > St ? b(M.ON_CAROUSEL_FORWARD_SWIPE, i) : b(M.ON_CAROUSEL_BACK_SWIPE, i);
1528
- }, Q = (s) => {
1529
- v(s.targetTouches[0].clientX);
1523
+ E.current && x(E.current.scrollLeft);
1524
+ }, Q = () => {
1525
+ if (!F || !O) return;
1526
+ F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
1530
1527
  }, q = (s) => {
1531
- v(null), z(s.targetTouches[0].clientX);
1532
- }, T = {
1528
+ y(s.targetTouches[0].clientX);
1529
+ }, L = (s) => {
1530
+ y(null), z(s.targetTouches[0].clientX);
1531
+ }, ue = {
1533
1532
  clientColorScheme: r,
1534
1533
  showCTAColocatedWithText: l,
1535
1534
  heightOverrides: n,
1536
1535
  posthog: d,
1537
1536
  showIcon: C,
1538
1537
  variant: h
1539
- }, ce = R ? Math.round(y / (R + 8)) : 0, Ze = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1540
- return /* @__PURE__ */ I(
1538
+ }, ae = R ? Math.round(I / (R + 8)) : 0, Be = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1539
+ return /* @__PURE__ */ v(
1541
1540
  K,
1542
1541
  {
1543
- "aria-label": N.carousel_title,
1542
+ "aria-label": j.carousel_title,
1544
1543
  "aria-roledescription": "carousel",
1545
1544
  ref: g,
1546
1545
  role: "group/region",
@@ -1551,14 +1550,14 @@ const $ = u.createContext(null), pt = ({
1551
1550
  width: m || "100%"
1552
1551
  },
1553
1552
  children: [
1554
- /* @__PURE__ */ I(
1553
+ /* @__PURE__ */ v(
1555
1554
  K,
1556
1555
  {
1557
1556
  direction: "row",
1558
1557
  onScroll: ne,
1559
- onTouchEnd: ae,
1560
- onTouchMove: Q,
1561
- onTouchStart: q,
1558
+ onTouchEnd: Q,
1559
+ onTouchMove: q,
1560
+ onTouchStart: L,
1562
1561
  ref: E,
1563
1562
  sx: {
1564
1563
  alignItems: "center",
@@ -1579,65 +1578,65 @@ const $ = u.createContext(null), pt = ({
1579
1578
  },
1580
1579
  children: [
1581
1580
  t.map((s, A) => {
1582
- const V = A + 1, Z = t.length + 1, J = Je(
1583
- N.card_position_in_carousel_aria,
1584
- V.toString(),
1585
- Z.toString()
1586
- ), ee = s.micro_title && s.micro_title.length > 0, se = s.micro_description && s.micro_description.length > 0, Pe = ee ? s.micro_title : s.title, Ge = se ? s.micro_description : s.description;
1581
+ const N = A + 1, P = t.length + 1, J = Qe(
1582
+ j.card_position_in_carousel_aria,
1583
+ N.toString(),
1584
+ P.toString()
1585
+ ), ee = s.micro_title && s.micro_title.length > 0, ce = s.micro_description && s.micro_description.length > 0, Ze = ee ? s.micro_title : s.title, Pe = ce ? s.micro_description : s.description;
1587
1586
  return /* @__PURE__ */ e(
1588
- Mt,
1587
+ vt,
1589
1588
  {
1590
- ariaLabel: `${J}: ${Pe}, ${Ge}`,
1589
+ ariaLabel: `${J}: ${Ze}, ${Pe}`,
1591
1590
  beat: s,
1592
1591
  index: A,
1593
- isActiveCard: A === ce,
1592
+ isActiveCard: A === ae,
1594
1593
  onCardClick: a,
1595
1594
  widthOverrides: R || void 0,
1596
- ...T
1595
+ ...ue
1597
1596
  },
1598
1597
  `${s.guid} ${A}`
1599
1598
  );
1600
1599
  }),
1601
1600
  /* @__PURE__ */ e(
1602
- Vt,
1601
+ Lt,
1603
1602
  {
1604
- isActiveCard: ce === t.length,
1603
+ isActiveCard: ae === t.length,
1605
1604
  onCardClick: a,
1606
1605
  widthOverrides: R || void 0,
1607
- ...T
1606
+ ...ue
1608
1607
  }
1609
1608
  )
1610
1609
  ]
1611
1610
  }
1612
1611
  ),
1613
1612
  _ && /* @__PURE__ */ e(
1614
- At,
1613
+ St,
1615
1614
  {
1616
1615
  clientColorScheme: r,
1617
- currentBeatIndex: ce + c - 1,
1616
+ currentBeatIndex: ae + c - 1,
1618
1617
  numBeats: t.length + 1,
1619
- onNextClick: j,
1620
- onPreviousClick: X,
1621
- scrollRightBoundary: Ze,
1622
- scrollX: y,
1623
- shouldApplyNewAnimation: le,
1618
+ onNextClick: X,
1619
+ onPreviousClick: le,
1620
+ scrollRightBoundary: Be,
1621
+ scrollX: I,
1622
+ shouldApplyNewAnimation: b,
1624
1623
  visibleCardsCount: c
1625
1624
  }
1626
1625
  )
1627
1626
  ]
1628
1627
  }
1629
1628
  );
1630
- }, Tt = P(Ot), Wt = ({
1629
+ }, At = G(Mt), Ot = ({
1631
1630
  analyticsMetadata: i,
1632
1631
  clientColorScheme: o,
1633
1632
  onCardClick: t,
1634
1633
  posthog: r,
1635
1634
  widthOverrides: l
1636
1635
  }) => {
1637
- const { carouselCopy: n } = F(), { onEvent: a } = Y(), d = () => {
1636
+ const { carouselCopy: n } = k(), { onEvent: a } = Y(), d = () => {
1638
1637
  a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1639
1638
  };
1640
- return n ? /* @__PURE__ */ I(
1639
+ return n ? /* @__PURE__ */ v(
1641
1640
  K,
1642
1641
  {
1643
1642
  alignItems: "center",
@@ -1661,8 +1660,8 @@ const $ = u.createContext(null), pt = ({
1661
1660
  children: n.carousel_title
1662
1661
  }
1663
1662
  ),
1664
- /* @__PURE__ */ I(
1665
- ze,
1663
+ /* @__PURE__ */ v(
1664
+ Ge,
1666
1665
  {
1667
1666
  onClick: d,
1668
1667
  sx: {
@@ -1690,19 +1689,19 @@ const $ = u.createContext(null), pt = ({
1690
1689
  children: n.view_all_insights_in_full_feed_cta_aria
1691
1690
  }
1692
1691
  ),
1693
- /* @__PURE__ */ e(Ae, { sx: { color: o?.primary_300, ml: "8px" } })
1692
+ /* @__PURE__ */ e(Me, { sx: { color: o?.primary_300, ml: "8px" } })
1694
1693
  ]
1695
1694
  }
1696
1695
  )
1697
1696
  ]
1698
1697
  }
1699
- ) : /* @__PURE__ */ e($e, {});
1700
- }, wt = P(Wt), xt = ({
1698
+ ) : /* @__PURE__ */ e(Ue, {});
1699
+ }, Tt = G(Ot), Wt = ({
1701
1700
  heightOverrides: i,
1702
1701
  widthOverrides: o,
1703
1702
  children: t
1704
1703
  }) => {
1705
- const { carouselCopy: r } = F();
1704
+ const { carouselCopy: r } = k();
1706
1705
  return /* @__PURE__ */ e(
1707
1706
  U,
1708
1707
  {
@@ -1718,7 +1717,7 @@ const $ = u.createContext(null), pt = ({
1718
1717
  children: t
1719
1718
  }
1720
1719
  );
1721
- }, Fe = ({
1720
+ }, ke = ({
1722
1721
  ariaLabel: i,
1723
1722
  carouselSize: o,
1724
1723
  clientColorScheme: t,
@@ -1730,9 +1729,9 @@ const $ = u.createContext(null), pt = ({
1730
1729
  variant: p,
1731
1730
  widthOverrides: _
1732
1731
  }) => {
1733
- const { cardsCopy: C } = F(), { onEvent: f } = Y(), { onPageview: h } = Ve();
1732
+ const { cardsCopy: C } = k(), { onEvent: f } = Y(), { onPageview: h } = Ne();
1734
1733
  u.useEffect(() => {
1735
- h(k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1734
+ h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1736
1735
  }, []);
1737
1736
  const m = () => {
1738
1737
  l && l(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
@@ -1747,7 +1746,7 @@ const $ = u.createContext(null), pt = ({
1747
1746
  description: C.no_relevant_insights_card_description,
1748
1747
  fontColors: { buttonColor: t?.primary_300 },
1749
1748
  heightOverrides: r,
1750
- icon: /* @__PURE__ */ e(Ne, {}),
1749
+ icon: /* @__PURE__ */ e(Le, {}),
1751
1750
  isZeroState: !0,
1752
1751
  onCardClick: m,
1753
1752
  posthog: n,
@@ -1755,7 +1754,7 @@ const $ = u.createContext(null), pt = ({
1755
1754
  style: {
1756
1755
  cardStyle: {
1757
1756
  card: {
1758
- height: `calc(${He[o]}px - 44px)`,
1757
+ height: `calc(${Ve[o]}px - 44px)`,
1759
1758
  m: "0 auto",
1760
1759
  width: d ? "calc(100% - 32px)" : "100%"
1761
1760
  },
@@ -1772,7 +1771,7 @@ const $ = u.createContext(null), pt = ({
1772
1771
  widthOverrides: _
1773
1772
  }
1774
1773
  );
1775
- }, ci = P(Fe), Be = ({
1774
+ }, li = G(ke), Fe = ({
1776
1775
  ariaLabel: i,
1777
1776
  carouselSize: o,
1778
1777
  heightOverrides: t,
@@ -1783,16 +1782,16 @@ const $ = u.createContext(null), pt = ({
1783
1782
  variant: d,
1784
1783
  widthOverrides: p
1785
1784
  }) => {
1786
- const { onPageview: _ } = Ve(), { zeroStateCopy: C } = F();
1785
+ const { onPageview: _ } = Ne(), { zeroStateCopy: C } = k();
1787
1786
  return u.useEffect(() => {
1788
- _(k.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1787
+ _(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1789
1788
  }, []), /* @__PURE__ */ e(
1790
1789
  re,
1791
1790
  {
1792
1791
  ariaLabel: i,
1793
1792
  description: C.carousel_zero_state_description,
1794
1793
  heightOverrides: t,
1795
- icon: /* @__PURE__ */ e(Ne, {}),
1794
+ icon: /* @__PURE__ */ e(Le, {}),
1796
1795
  isZeroState: !0,
1797
1796
  onCardClick: r,
1798
1797
  posthog: l,
@@ -1800,7 +1799,7 @@ const $ = u.createContext(null), pt = ({
1800
1799
  style: {
1801
1800
  cardStyle: {
1802
1801
  card: {
1803
- height: `calc(${He[o]}px - 44px)`,
1802
+ height: `calc(${Ve[o]}px - 44px)`,
1804
1803
  m: "0 auto",
1805
1804
  width: a ? "calc(100% - 32px)" : "100%"
1806
1805
  },
@@ -1814,7 +1813,7 @@ const $ = u.createContext(null), pt = ({
1814
1813
  widthOverrides: p
1815
1814
  }
1816
1815
  );
1817
- }, si = P(Be), Dt = () => /* @__PURE__ */ e(
1816
+ }, ni = G(Fe), wt = () => /* @__PURE__ */ e(
1818
1817
  U,
1819
1818
  {
1820
1819
  sx: {
@@ -1824,9 +1823,9 @@ const $ = u.createContext(null), pt = ({
1824
1823
  justifyContent: "center",
1825
1824
  width: "100%"
1826
1825
  },
1827
- children: /* @__PURE__ */ e(et, {})
1826
+ children: /* @__PURE__ */ e(qe, {})
1828
1827
  }
1829
- ), H = new ut(), Lt = ({
1828
+ ), V = new ht(), xt = ({
1830
1829
  allowSingleCardPeeking: i,
1831
1830
  areBeatsLoading: o,
1832
1831
  beats: t = [],
@@ -1849,73 +1848,67 @@ const $ = u.createContext(null), pt = ({
1849
1848
  showCarouselControls: c,
1850
1849
  showHeader: E,
1851
1850
  showIcon: g,
1852
- showWithMargin: y = !0,
1853
- token: D = "",
1851
+ showWithMargin: I = !0,
1852
+ token: x = "",
1854
1853
  useDarkMode: O,
1855
- userHasFullInsightFeedBeats: v,
1856
- variant: B,
1854
+ userHasFullInsightFeedBeats: y,
1855
+ variant: F,
1857
1856
  visibleCardsCount: z = 1,
1858
1857
  widthOverrides: R
1859
1858
  }) => {
1860
- const L = Me(), [le, G] = te("STANDARD"), [N, b] = te(!1), [j, X] = te(!1), ne = it([_], H), ae = ot([C], H);
1859
+ const [D, b] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
1861
1860
  u.useEffect(() => {
1862
- !H.isInitialized && !j && (H.initialize(n, D, d).catch(() => X(!1)), X(!0));
1863
- }, [n, D, d, H.isInitialized, j]), u.useEffect(() => {
1864
- const T = window.innerHeight;
1865
- T < 180 ? G("STANDARD") : T >= 180 && T < 200 ? G("LARGE") : T >= 200 && T < 248 ? G("XLARGE") : T >= 248 && G("XXLARGE");
1861
+ !V.isInitialized && !Z && (V.initialize(n, x, d).catch(() => X(!1)), X(!0));
1862
+ }, [n, x, d, V.isInitialized, Z]), u.useEffect(() => {
1863
+ const L = window.innerHeight;
1864
+ L < 180 ? b("STANDARD") : L >= 180 && L < 200 ? b("LARGE") : L >= 200 && L < 248 ? b("XLARGE") : L >= 248 && b("XXLARGE");
1866
1865
  }, [window.innerHeight]), u.useEffect(() => {
1867
- b(!o && H.isInitialized);
1868
- }, [o, H.isInitialized]);
1866
+ j(!o && V.isInitialized);
1867
+ }, [o, V.isInitialized]);
1869
1868
  const Q = {
1870
1869
  showCTAColocatedWithText: l,
1871
1870
  heightOverrides: a,
1872
1871
  onCardClick: p,
1873
1872
  posthog: f,
1874
1873
  showIcon: g,
1875
- showWithMargin: y,
1874
+ showWithMargin: I,
1876
1875
  useDarkMode: O,
1877
1876
  widthOverrides: R
1878
1877
  }, q = {
1879
- carouselSize: le,
1880
- variant: B,
1878
+ carouselSize: D,
1879
+ variant: F,
1881
1880
  ...Q
1882
1881
  };
1883
- return (
1884
- // The Theme provider must wrap the component so that the styles don't break when imported into other applications.
1885
- /* @__PURE__ */ I(Ue, { theme: L, children: [
1886
- /* @__PURE__ */ e(be, {}),
1887
- /* @__PURE__ */ e(pt, { onEvent: ne, onPageview: ae, store: H, children: /* @__PURE__ */ I(xt, { heightOverrides: a, widthOverrides: R, children: [
1888
- !N && /* @__PURE__ */ e(Dt, {}),
1889
- N && E && /* @__PURE__ */ e(
1890
- wt,
1891
- {
1892
- analyticsMetadata: me,
1893
- clientColorScheme: r,
1894
- onCardClick: p,
1895
- posthog: f,
1896
- widthOverrides: R
1897
- }
1898
- ),
1899
- N && !!t.length && /* @__PURE__ */ e(
1900
- Tt,
1901
- {
1902
- allowSingleCardPeeking: i,
1903
- analyticsMetadata: me,
1904
- beats: t,
1905
- clientColorScheme: r,
1906
- shouldApplyNewAnimation: h,
1907
- showCarouselControls: c,
1908
- variant: m ? B : void 0,
1909
- visibleCardsCount: z,
1910
- ...Q
1911
- }
1912
- ),
1913
- N && !t.length && v && /* @__PURE__ */ e(Fe, { clientColorScheme: r, ...q }),
1914
- N && !t.length && !v && /* @__PURE__ */ e(Be, { ...q })
1915
- ] }) })
1916
- ] })
1917
- );
1918
- }, di = P(Lt), Nt = ({
1882
+ return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: R, children: [
1883
+ !B && /* @__PURE__ */ e(wt, {}),
1884
+ B && E && /* @__PURE__ */ e(
1885
+ Tt,
1886
+ {
1887
+ analyticsMetadata: me,
1888
+ clientColorScheme: r,
1889
+ onCardClick: p,
1890
+ posthog: f,
1891
+ widthOverrides: R
1892
+ }
1893
+ ),
1894
+ B && !!t.length && /* @__PURE__ */ e(
1895
+ At,
1896
+ {
1897
+ allowSingleCardPeeking: i,
1898
+ analyticsMetadata: me,
1899
+ beats: t,
1900
+ clientColorScheme: r,
1901
+ shouldApplyNewAnimation: h,
1902
+ showCarouselControls: c,
1903
+ variant: m ? F : void 0,
1904
+ visibleCardsCount: z,
1905
+ ...Q
1906
+ }
1907
+ ),
1908
+ B && !t.length && y && /* @__PURE__ */ e(ke, { clientColorScheme: r, ...q }),
1909
+ B && !t.length && !y && /* @__PURE__ */ e(Fe, { ...q })
1910
+ ] }) });
1911
+ }, ai = G(xt), Dt = ({
1919
1912
  isActiveCard: i,
1920
1913
  ariaLabel: o,
1921
1914
  clientColorScheme: t,
@@ -1926,11 +1919,11 @@ const $ = u.createContext(null), pt = ({
1926
1919
  variant: d,
1927
1920
  widthOverrides: p
1928
1921
  }) => {
1929
- const _ = de(), { ref: C, inView: f } = Oe({
1930
- threshold: ke
1931
- }), { cardsCopy: h } = F(), { onEvent: m } = Y();
1922
+ const _ = se(), { ref: C, inView: f } = Ae({
1923
+ threshold: He
1924
+ }), { cardsCopy: h } = k(), { onEvent: m } = Y();
1932
1925
  oe(() => {
1933
- f && (m(Le.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1926
+ f && (m(De.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1934
1927
  template: "view_more_card"
1935
1928
  }));
1936
1929
  }, [f]);
@@ -1947,7 +1940,7 @@ const $ = u.createContext(null), pt = ({
1947
1940
  description: h.view_more_card_description,
1948
1941
  fontColors: { buttonColor: t?.primary_300 },
1949
1942
  heightOverrides: r,
1950
- icon: /* @__PURE__ */ e(gt, { color: t?.primary_300 ?? _.palette.primary.main }),
1943
+ icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? _.palette.primary.main }),
1951
1944
  isActiveCard: i,
1952
1945
  onCardClick: c,
1953
1946
  posthog: n,
@@ -1958,20 +1951,20 @@ const $ = u.createContext(null), pt = ({
1958
1951
  widthOverrides: p
1959
1952
  }
1960
1953
  );
1961
- }, Vt = P(Nt);
1954
+ }, Lt = G(Dt);
1962
1955
  export {
1963
- ut as A,
1964
- Mt as B,
1965
- wt as C,
1966
- pt as I,
1967
- Tt as M,
1968
- ci as N,
1956
+ ht as A,
1957
+ vt as B,
1958
+ Tt as C,
1959
+ Et as I,
1960
+ At as M,
1961
+ li as N,
1969
1962
  me as T,
1970
- Vt as V,
1971
- si as Z,
1963
+ Lt as V,
1964
+ ni as Z,
1972
1965
  re as a,
1973
- di as b,
1974
- gt as c,
1975
- yt as d,
1976
- Ne as e
1966
+ ai as b,
1967
+ ft as c,
1968
+ Rt as d,
1969
+ Le as e
1977
1970
  };