@mx-cartographer/experiences 7.2.5-alpha.mm2 → 7.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.2.5] - 11-17-2025
2
+
3
+ - **FIXED** - `MicroInsightCard` content overflowing in some layouts
4
+
1
5
  ## [7.2.4] - 11-14-2025
2
6
 
3
7
  - **UPDATED** - Storybook docs for `InsightsMicroWidget`
@@ -1,15 +1,15 @@
1
1
  import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
- import p, { useState as te, useEffect as oe } from "react";
2
+ import u, { useState as te, useEffect as oe } from "react";
3
3
  import { observer as G } from "mobx-react-lite";
4
4
  import Pe from "@mui/material/Button";
5
5
  import K from "@mui/material/Stack";
6
6
  import Ge from "@mui/material/Typography";
7
- import { ChevronLeft as Ue, ChevronRight as Me } from "@mxenabled/mx-icons";
8
- import { L as be } from "./Loader-DUaFpDGv.mjs";
9
- import b from "@mui/material/Box";
7
+ import { ChevronLeft as be, ChevronRight as Se } from "@mxenabled/mx-icons";
8
+ import { L as Ue } from "./Loader-DUaFpDGv.mjs";
9
+ import U from "@mui/material/Box";
10
10
  import pe from "@mui/material/IconButton";
11
11
  import { useTheme as ze } from "@mui/material/styles";
12
- import { useInView as Se } from "react-intersection-observer";
12
+ import { useInView as Me } from "react-intersection-observer";
13
13
  import { P as Ke, CategoryIcon as $e, useTokens as Ae, MerchantLogo as Ye, Icon as ie } from "@mxenabled/mxui";
14
14
  import se from "@mui/material/styles/useTheme";
15
15
  import { b as je } from "./Category-CevNQ03n.mjs";
@@ -21,8 +21,8 @@ import { G as _e, a as Je, u as et, b as tt } from "./useCombineEvents-BUDIR1ba.
21
21
  import { B as Ce } from "./BeatApi-DhJpgCLz.mjs";
22
22
  import it from "@mui/material/Card";
23
23
  import ot from "@mui/material/CardActions";
24
- import lt from "@mui/material/CardContent";
25
- import rt from "@mui/material/CardHeader";
24
+ import rt from "@mui/material/CardContent";
25
+ import lt from "@mui/material/CardHeader";
26
26
  const fe = {
27
27
  featureVersion: "spendVsIncomeTrends"
28
28
  };
@@ -56,7 +56,7 @@ class nt {
56
56
  return this.copyObject.zero_state;
57
57
  }
58
58
  }
59
- const Ee = {
59
+ const he = {
60
60
  BillAmountNotStandard: "BillAmountNotStandard",
61
61
  CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
62
62
  DuplicatePaymentV2: "DuplicatePaymentV2",
@@ -73,38 +73,38 @@ const Ee = {
73
73
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
74
74
  MonthlySpendComparison: "MonthlySpendComparison",
75
75
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
76
- }, M = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
76
+ }, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
77
77
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
78
- }, Te = (i) => `on${i}Click`, We = (i) => `on${i}View`, we = (i) => `on${i}ViewFirstTime`, he = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(Ee).reduce(
78
+ }, Te = (i) => `on${i}Click`, We = (i) => `on${i}View`, we = (i) => `on${i}ViewFirstTime`, Ee = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(he).reduce(
79
79
  (i, o) => ({
80
80
  ...i,
81
81
  [Te(o)]: {
82
82
  action: w.MICRO_BEAT_CLICKED,
83
83
  category: W.BEAT_INTERACTION,
84
- label: he(o),
85
- value: M
84
+ label: Ee(o),
85
+ value: S
86
86
  }
87
87
  }),
88
88
  {}
89
- ), ct = () => Object.values(Ee).reduce(
89
+ ), ct = () => Object.values(he).reduce(
90
90
  (i, o) => ({
91
91
  ...i,
92
92
  [We(o)]: {
93
93
  action: w.MICRO_BEAT_DISPLAYED,
94
94
  category: W.BEAT_INTERACTION,
95
- label: he(o),
96
- value: M
95
+ label: Ee(o),
96
+ value: S
97
97
  }
98
98
  }),
99
99
  {}
100
- ), st = () => Object.values(Ee).reduce(
100
+ ), st = () => Object.values(he).reduce(
101
101
  (i, o) => ({
102
102
  ...i,
103
103
  [we(o)]: {
104
104
  action: w.MICRO_BEAT_DISPLAYED_FIRST_TIME,
105
105
  category: W.BEAT_INTERACTION,
106
- label: he(o),
107
- value: M
106
+ label: Ee(o),
107
+ value: S
108
108
  }
109
109
  }),
110
110
  {}
@@ -116,7 +116,7 @@ const Ee = {
116
116
  }, W = {
117
117
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
118
118
  BEAT_INTERACTION: "Beat Interaction"
119
- }, S = {
119
+ }, M = {
120
120
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
121
121
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
122
122
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
@@ -137,72 +137,72 @@ const Ee = {
137
137
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
138
138
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
139
139
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
140
- }, ge = {
140
+ }, Re = {
141
141
  [H.MICRO_WIDGET_CAROUSEL]: {
142
142
  label: T.MICRO_WIDGET,
143
143
  name: H.MICRO_WIDGET_CAROUSEL,
144
144
  path: me.INSIGHTS_MICRO_WIDGET,
145
- value: M
145
+ value: S
146
146
  },
147
147
  // zero state
148
148
  [H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
149
149
  label: T.MICRO_WIDGET,
150
150
  name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
151
151
  path: me.INSIGHTS_MICRO_WIDGET,
152
- value: M
152
+ value: S
153
153
  },
154
154
  // no relevant cards
155
155
  [H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
156
156
  label: T.MICRO_WIDGET,
157
157
  name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
158
158
  path: "/micro-widget",
159
- value: M
159
+ value: S
160
160
  }
161
- }, Re = {
161
+ }, ge = {
162
162
  // carousel control interaction events - clicks and swipes
163
- [S.ON_CAROUSEL_BACK_CLICK]: {
163
+ [M.ON_CAROUSEL_BACK_CLICK]: {
164
164
  action: w.CONTROL_BACKWARD,
165
165
  category: W.MICRO_WIDGET_INTERACTION,
166
166
  label: T.CAROUSEL_CONTROL,
167
- value: M
167
+ value: S
168
168
  },
169
- [S.ON_CAROUSEL_FORWARD_CLICK]: {
169
+ [M.ON_CAROUSEL_FORWARD_CLICK]: {
170
170
  action: w.CONTROL_FORWARD,
171
171
  category: W.MICRO_WIDGET_INTERACTION,
172
172
  label: T.CAROUSEL_CONTROL,
173
- value: M
173
+ value: S
174
174
  },
175
- [S.ON_CAROUSEL_BACK_SWIPE]: {
175
+ [M.ON_CAROUSEL_BACK_SWIPE]: {
176
176
  action: w.SWIPE_BACKWARD,
177
177
  category: W.MICRO_WIDGET_INTERACTION,
178
178
  label: T.CAROUSEL_CONTROL,
179
- value: M
179
+ value: S
180
180
  },
181
- [S.ON_CAROUSEL_FORWARD_SWIPE]: {
181
+ [M.ON_CAROUSEL_FORWARD_SWIPE]: {
182
182
  action: w.SWIPE_FORWARD,
183
183
  category: W.MICRO_WIDGET_INTERACTION,
184
184
  label: T.CAROUSEL_CONTROL,
185
- value: M
185
+ value: S
186
186
  },
187
187
  // read more card events
188
- [S.ON_VIEW_MORE_CLICKED]: {
188
+ [M.ON_VIEW_MORE_CLICKED]: {
189
189
  action: w.MICRO_BEAT_CLICKED,
190
190
  category: W.BEAT_INTERACTION,
191
191
  label: T.VIEW_MORE,
192
- value: M
192
+ value: S
193
193
  },
194
194
  [xe.ON_VIEW_MORE_VIEWED]: {
195
195
  action: w.MICRO_BEAT_DISPLAYED,
196
196
  category: W.BEAT_INTERACTION,
197
197
  label: T.VIEW_MORE,
198
- value: M
198
+ value: S
199
199
  },
200
200
  ...at(),
201
201
  ...ct(),
202
202
  ...st()
203
- }, Ie = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticEvent(Re[i]).then((t) => t).catch((t) => {
203
+ }, Ie = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticEvent(ge[i]).then((t) => t).catch((t) => {
204
204
  throw t;
205
- }), ye = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticsPageview(ge[i]).then((t) => t).catch((t) => {
205
+ }), ye = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
206
206
  throw t;
207
207
  });
208
208
  class dt {
@@ -212,14 +212,14 @@ class dt {
212
212
  constructor() {
213
213
  de(this);
214
214
  }
215
- initialize = async (o, t, l) => {
216
- this.onAnalyticEvent = (n, r) => {
217
- Ie(n, r).then((a) => a).catch((a) => {
218
- throw a.status === 401 && l(), a;
215
+ initialize = async (o, t, r) => {
216
+ this.onAnalyticEvent = (n, l) => {
217
+ Ie(n, l).then((a) => a).catch((a) => {
218
+ throw a.status === 401 && r(), a;
219
219
  });
220
- }, this.onAnalyticPageView = (n, r) => {
221
- ye(n, r).then((a) => a).catch((a) => {
222
- throw a.status === 401 && l(), a;
220
+ }, this.onAnalyticPageView = (n, l) => {
221
+ ye(n, l).then((a) => a).catch((a) => {
222
+ throw a.status === 401 && r(), a;
223
223
  });
224
224
  }, this.beatApi = new Ce(o, t);
225
225
  };
@@ -230,7 +230,7 @@ class dt {
230
230
  this.beatApi.updateOffer(o);
231
231
  };
232
232
  }
233
- class Et {
233
+ class ht {
234
234
  copyStore;
235
235
  endpoint = "/";
236
236
  insightsMicroWidgetStore;
@@ -240,40 +240,39 @@ class Et {
240
240
  constructor() {
241
241
  this.copyStore = new nt(), this.insightsMicroWidgetStore = new dt(), de(this);
242
242
  }
243
- initialize = async (o, t, l) => {
244
- await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
243
+ initialize = async (o, t, r) => {
244
+ await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
245
245
  const n = await Je(o, t, "1.0.0", "Micro Insights Carousel");
246
246
  Oe(() => {
247
247
  this.session = n, this.isInitialized = !0;
248
248
  });
249
249
  };
250
250
  }
251
- const $ = p.createContext(null), ht = ({
251
+ const $ = u.createContext(null), Et = ({
252
252
  onEvent: i,
253
253
  onPageview: o,
254
254
  store: t,
255
- children: l
256
- }) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), le = p.forwardRef(
255
+ children: r
256
+ }) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), re = u.forwardRef(
257
257
  function({
258
258
  actionText: o,
259
259
  ariaLabel: t,
260
- backgroundColor: l,
260
+ backgroundColor: r,
261
261
  description: n,
262
- heightOverrides: r,
262
+ heightOverrides: l,
263
263
  icon: a,
264
264
  isActiveCard: d,
265
- isZeroState: _,
266
- onCardClick: E = () => {
265
+ isZeroState: p,
266
+ onCardClick: _ = () => {
267
267
  },
268
268
  showIcon: C,
269
269
  style: f = {},
270
270
  fontColors: h = {},
271
271
  title: m,
272
272
  variant: c,
273
- widthOverrides: u
274
- }, g) {
275
- console.log("MicroInsightCard", { heightOverrides: r });
276
- const I = se(), [x, O] = p.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, R = /* @__PURE__ */ e(
273
+ widthOverrides: E
274
+ }, R) {
275
+ const I = se(), [x, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, g = /* @__PURE__ */ e(
277
276
  Ke,
278
277
  {
279
278
  className: "mx-micro-card-description",
@@ -284,8 +283,8 @@ const $ = p.createContext(null), ht = ({
284
283
  letterSpacing: 0.48,
285
284
  lineHeight: "20px",
286
285
  overflow: "hidden",
287
- pl: _ ? 0 : 28,
288
- pr: _ ? 0 : 8,
286
+ pl: p ? 0 : 28,
287
+ pr: p ? 0 : 8,
289
288
  WebkitBoxOrient: "vertical",
290
289
  WebkitLineClamp: 2,
291
290
  wordWrap: "break-word"
@@ -300,29 +299,29 @@ const $ = p.createContext(null), ht = ({
300
299
  }
301
300
  );
302
301
  return /* @__PURE__ */ e(
303
- b,
302
+ U,
304
303
  {
305
304
  "aria-hidden": !d,
306
305
  "aria-label": t,
307
306
  "aria-labelledby": "divButton",
308
307
  "aria-roledescription": "slide",
309
- ref: g,
308
+ ref: R,
310
309
  role: "group",
311
310
  sx: {
312
311
  height: "100%",
313
- minWidth: u ? `${u}px` : "100%",
312
+ minWidth: E ? `${E}px` : "100%",
314
313
  fontFamily: I.typography.fontFamily
315
314
  },
316
315
  children: /* @__PURE__ */ e(
317
- b,
316
+ U,
318
317
  {
319
318
  "aria-hidden": !d,
320
319
  "aria-label": t,
321
320
  id: "divButton",
322
- onClick: () => E(),
321
+ onClick: () => _(),
323
322
  onKeyDown: () => O(!1),
324
323
  onKeyUp: () => O(!0),
325
- ref: g,
324
+ ref: R,
326
325
  role: "button",
327
326
  sx: {
328
327
  border: x ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
@@ -335,12 +334,12 @@ const $ = p.createContext(null), ht = ({
335
334
  {
336
335
  "aria-roledescription": "slide",
337
336
  className: "mx-micro-card",
338
- id: "MicroInsightCard",
339
337
  role: "group",
340
338
  sx: {
341
- backgroundColor: l,
339
+ backgroundColor: r,
340
+ boxSizing: "border-box",
342
341
  cursor: "pointer",
343
- height: r ? "100%" : 124,
342
+ height: l ? "100%" : 124,
344
343
  p: 16,
345
344
  ...z,
346
345
  "& .MuiCardHeader-avatar": {
@@ -358,16 +357,16 @@ const $ = p.createContext(null), ht = ({
358
357
  },
359
358
  children: [
360
359
  /* @__PURE__ */ e(
361
- rt,
360
+ lt,
362
361
  {
363
362
  avatar: C && a,
364
- subheader: _ && R,
363
+ subheader: p && g,
365
364
  sx: { color: h.headerColor, p: 0 },
366
365
  title: m,
367
366
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
368
367
  }
369
368
  ),
370
- /* @__PURE__ */ e(lt, { sx: { p: 0 }, children: !_ && R }),
369
+ /* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && g }),
371
370
  !!o && /* @__PURE__ */ e(
372
371
  ot,
373
372
  {
@@ -376,7 +375,7 @@ const $ = p.createContext(null), ht = ({
376
375
  p: 0
377
376
  },
378
377
  children: /* @__PURE__ */ e(
379
- b,
378
+ U,
380
379
  {
381
380
  sx: (D) => ({
382
381
  color: h.buttonColor ? h.buttonColor : D.palette.primary.main,
@@ -426,9 +425,9 @@ const $ = p.createContext(null), ht = ({
426
425
  color: i = "currentColor",
427
426
  height: o,
428
427
  size: t = 16,
429
- styles: l,
428
+ styles: r,
430
429
  viewBox: n = "0 0 16 16",
431
- width: r
430
+ width: l
432
431
  }) => /* @__PURE__ */ e(
433
432
  "svg",
434
433
  {
@@ -436,9 +435,9 @@ const $ = p.createContext(null), ht = ({
436
435
  className: "kyper-icon",
437
436
  focusable: !1,
438
437
  height: o || t,
439
- style: l,
438
+ style: r,
440
439
  viewBox: n,
441
- width: r || t,
440
+ width: l || t,
442
441
  xmlns: "http://www.w3.org/2000/svg",
443
442
  children: /* @__PURE__ */ e(
444
443
  "path",
@@ -450,14 +449,14 @@ const $ = p.createContext(null), ht = ({
450
449
  }
451
450
  ), mt = (i) => i ? i.data ? i.data.map((o) => {
452
451
  const t = {};
453
- return i.names?.map((l, n) => {
454
- t[l] = o[n];
452
+ return i.names?.map((r, n) => {
453
+ t[r] = o[n];
455
454
  }), t;
456
- }) : [] : [], gt = (i, o) => {
457
- const t = mt(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
458
- return !n.length || !r.length ? o.Color.Primary300 : n[0].amount > r[0].amount ? o.Color.Error300 : n[0].amount < r[0].amount ? o.Color.Success300 : o.Color.Primary300;
459
- }, Rt = ({ beat: i }) => {
460
- const o = Ae(), t = gt(i.data_series, o);
455
+ }) : [] : [], Rt = (i, o) => {
456
+ const t = mt(i), r = t.length / 2, n = t.slice(0, r), l = t.slice(r);
457
+ return !n.length || !l.length ? o.Color.Primary300 : n[0].amount > l[0].amount ? o.Color.Error300 : n[0].amount < l[0].amount ? o.Color.Success300 : o.Color.Primary300;
458
+ }, gt = ({ beat: i }) => {
459
+ const o = Ae(), t = Rt(i.data_series, o);
461
460
  return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
462
461
  }, De = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
463
462
  /* @__PURE__ */ e(
@@ -1240,37 +1239,37 @@ const $ = p.createContext(null), ht = ({
1240
1239
  }
1241
1240
  )
1242
1241
  ] })
1243
- ] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: l }) => {
1244
- const n = se(), r = o?.primary_300 ? o.primary_300 : n.palette.primary.main;
1245
- return l === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || r } }) : l === 1 && i ? /* @__PURE__ */ e(ut, { beat: i }) : l === 2 && i ? /* @__PURE__ */ e(Ct, { beat: i }) : l === 3 && i ? /* @__PURE__ */ e(Rt, { beat: i }) : l === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
1242
+ ] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1243
+ const n = se(), l = o?.primary_300 ? o.primary_300 : n.palette.primary.main;
1244
+ return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || l } }) : r === 1 && i ? /* @__PURE__ */ e(ut, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(Ct, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(gt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
1246
1245
  ie,
1247
1246
  {
1248
1247
  fill: !0,
1249
1248
  name: "info",
1250
1249
  sx: {
1251
- color: r
1250
+ color: l
1252
1251
  }
1253
1252
  }
1254
1253
  );
1255
1254
  }, k = () => {
1256
- const i = p.useContext($);
1255
+ const i = u.useContext($);
1257
1256
  if (!i)
1258
1257
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
1259
1258
  return i.store.copyStore;
1260
1259
  }, It = () => {
1261
- const i = p.useContext($);
1260
+ const i = u.useContext($);
1262
1261
  if (!i?.store?.insightsMicroWidgetStore)
1263
1262
  throw new Error(
1264
1263
  "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
1265
1264
  );
1266
1265
  return i.store.insightsMicroWidgetStore;
1267
1266
  }, Y = () => {
1268
- const i = p.useContext($);
1267
+ const i = u.useContext($);
1269
1268
  if (!i)
1270
1269
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
1271
1270
  return { onEvent: i.onEvent };
1272
1271
  }, Le = () => {
1273
- const i = p.useContext($);
1272
+ const i = u.useContext($);
1274
1273
  if (!i)
1275
1274
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1276
1275
  return { onPageview: i.onPageview };
@@ -1283,81 +1282,80 @@ const $ = p.createContext(null), ht = ({
1283
1282
  ariaLabel: i,
1284
1283
  backgroundColor: o,
1285
1284
  beat: t,
1286
- clientColorScheme: l,
1285
+ clientColorScheme: r,
1287
1286
  showCTAColocatedWithText: n = !0,
1288
- heightOverrides: r,
1287
+ heightOverrides: l,
1289
1288
  index: a,
1290
1289
  isActiveCard: d,
1291
- onCardClick: _,
1292
- posthog: E,
1290
+ onCardClick: p,
1291
+ posthog: _,
1293
1292
  showIcon: C,
1294
1293
  variant: f,
1295
1294
  widthOverrides: h
1296
1295
  }) => {
1297
- console.log("BeatCard", { heightOverrides: r });
1298
- const { ref: m, inView: c } = Se({
1296
+ const { ref: m, inView: c } = Me({
1299
1297
  threshold: Ve
1300
- }), { cardsCopy: u } = k(), { onEvent: g } = Y(), { updateBeat: I, updateOffer: x } = It();
1298
+ }), { cardsCopy: E } = k(), { onEvent: R } = Y(), { updateBeat: I, updateOffer: x } = It();
1301
1299
  oe(() => {
1302
- c && (t.has_been_displayed ? g(We(t.template)) : (t.guid.startsWith("OFR") ? x({
1300
+ c && (t.has_been_displayed ? R(We(t.template)) : (t.guid.startsWith("OFR") ? x({
1303
1301
  ...t,
1304
1302
  has_been_displayed: !0
1305
1303
  }) : I({
1306
1304
  ...t,
1307
1305
  has_been_displayed: !0
1308
- }), g(we(t.template))));
1306
+ }), R(we(t.template))));
1309
1307
  }, [c]), oe(() => {
1310
1308
  if (c && t)
1311
1309
  if (t.template === "MarketingOffer") {
1312
1310
  const y = t;
1313
- E?.capture("viewed_messaging_insight", {
1311
+ _?.capture("viewed_messaging_insight", {
1314
1312
  template: t.template,
1315
1313
  campaign_guid: y.campaign_guid,
1316
1314
  campaign_name: y.pulse_campaign_name
1317
1315
  });
1318
1316
  } else
1319
- E?.capture("viewed_insight", {
1317
+ _?.capture("viewed_insight", {
1320
1318
  beat_guid: t.guid,
1321
1319
  template: t.template,
1322
1320
  position: a
1323
1321
  });
1324
1322
  }, [t, a, c]);
1325
1323
  const O = () => {
1326
- if (_ && _(t), g(Te(t.template)), t.template === "MarketingOffer") {
1324
+ if (p && p(t), R(Te(t.template)), t.template === "MarketingOffer") {
1327
1325
  const y = t;
1328
- E?.capture("clicked_messaging_insight", {
1326
+ _?.capture("clicked_messaging_insight", {
1329
1327
  template: t.template,
1330
1328
  campaign_guid: y.campaign_guid,
1331
1329
  campaign_name: y.pulse_campaign_name
1332
1330
  });
1333
1331
  } else
1334
- E?.capture("clicked_insight", {
1332
+ _?.capture("clicked_insight", {
1335
1333
  beat_guid: t.guid,
1336
1334
  template: t.template,
1337
1335
  position: a
1338
1336
  });
1339
1337
  };
1340
1338
  return /* @__PURE__ */ e(
1341
- le,
1339
+ re,
1342
1340
  {
1343
- actionText: t.micro_call_to_action || u.micro_card_cta,
1341
+ actionText: t.micro_call_to_action || E.micro_card_cta,
1344
1342
  ariaLabel: i,
1345
1343
  backgroundColor: o,
1346
1344
  description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
1347
- fontColors: { buttonColor: l?.primary_300 },
1348
- heightOverrides: r,
1345
+ fontColors: { buttonColor: r?.primary_300 },
1346
+ heightOverrides: l,
1349
1347
  icon: ve && /* @__PURE__ */ e(
1350
1348
  ve,
1351
1349
  {
1352
1350
  beat: t,
1353
- clientColorScheme: l,
1351
+ clientColorScheme: r,
1354
1352
  color: t?.icon_color,
1355
1353
  type: t?.icon_type
1356
1354
  }
1357
1355
  ),
1358
1356
  isActiveCard: d,
1359
1357
  onCardClick: O,
1360
- posthog: E,
1358
+ posthog: _,
1361
1359
  ref: m,
1362
1360
  showCTAColocatedWithText: n,
1363
1361
  showIcon: C,
@@ -1366,18 +1364,18 @@ const $ = p.createContext(null), ht = ({
1366
1364
  widthOverrides: h
1367
1365
  }
1368
1366
  );
1369
- }, Mt = ({
1367
+ }, St = ({
1370
1368
  clientColorScheme: i,
1371
1369
  currentBeatIndex: o,
1372
1370
  numBeats: t,
1373
- onNextClick: l,
1371
+ onNextClick: r,
1374
1372
  onPreviousClick: n,
1375
- scrollRightBoundary: r,
1373
+ scrollRightBoundary: l,
1376
1374
  scrollX: a,
1377
1375
  shouldApplyNewAnimation: d = !1,
1378
- visibleCardsCount: _ = 1
1376
+ visibleCardsCount: p = 1
1379
1377
  }) => {
1380
- const E = ze(), { carouselCopy: C } = k(), f = Math.floor(a) > r || o - _ + 1 === 0, h = a < 0 || t - 1 === o, m = E.palette.grey[500], c = i?.primary_300 ?? E.palette.primary.main;
1378
+ const _ = ze(), { carouselCopy: C } = k(), f = Math.floor(a) > l || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
1381
1379
  return /* @__PURE__ */ v(
1382
1380
  K,
1383
1381
  {
@@ -1401,7 +1399,7 @@ const $ = p.createContext(null), ht = ({
1401
1399
  disabled: f,
1402
1400
  onClick: n,
1403
1401
  children: /* @__PURE__ */ e(
1404
- Ue,
1402
+ be,
1405
1403
  {
1406
1404
  style: {
1407
1405
  color: f ? m : c
@@ -1410,10 +1408,10 @@ const $ = p.createContext(null), ht = ({
1410
1408
  )
1411
1409
  }
1412
1410
  ),
1413
- Array.from({ length: t }).map((u, g) => {
1414
- const I = g === o;
1411
+ Array.from({ length: t }).map((E, R) => {
1412
+ const I = R === o;
1415
1413
  return /* @__PURE__ */ e(
1416
- b,
1414
+ U,
1417
1415
  {
1418
1416
  className: "mx-insights-micro-carousel-dots",
1419
1417
  sx: {
@@ -1433,7 +1431,7 @@ const $ = p.createContext(null), ht = ({
1433
1431
  width: I && d ? 24 : 8
1434
1432
  }
1435
1433
  },
1436
- `carousel-button-${g}`
1434
+ `carousel-button-${R}`
1437
1435
  );
1438
1436
  }),
1439
1437
  /* @__PURE__ */ e(
@@ -1442,9 +1440,9 @@ const $ = p.createContext(null), ht = ({
1442
1440
  "aria-disabled": h,
1443
1441
  "aria-label": C.next_insight_cta_aria,
1444
1442
  disabled: h,
1445
- onClick: l,
1443
+ onClick: r,
1446
1444
  children: /* @__PURE__ */ e(
1447
- Me,
1445
+ Se,
1448
1446
  {
1449
1447
  style: {
1450
1448
  color: h ? m : c
@@ -1456,17 +1454,17 @@ const $ = p.createContext(null), ht = ({
1456
1454
  ]
1457
1455
  }
1458
1456
  );
1459
- }, St = ({
1457
+ }, Mt = ({
1460
1458
  analyticsMetadata: i,
1461
1459
  allowSingleCardPeeking: o = !1,
1462
1460
  beats: t = [],
1463
- clientColorScheme: l,
1461
+ clientColorScheme: r,
1464
1462
  showCTAColocatedWithText: n,
1465
- heightOverrides: r,
1463
+ heightOverrides: l,
1466
1464
  onCardClick: a,
1467
1465
  posthog: d,
1468
- shouldApplyNewAnimation: _ = !1,
1469
- showCarouselControls: E,
1466
+ shouldApplyNewAnimation: p = !1,
1467
+ showCarouselControls: _,
1470
1468
  showIcon: C,
1471
1469
  showWithMargin: f = !0,
1472
1470
  variant: h,
@@ -1474,11 +1472,10 @@ const $ = p.createContext(null), ht = ({
1474
1472
  visibleCardsCount: c = 1
1475
1473
  // Default to 1 card visible
1476
1474
  }) => {
1477
- console.log("MicroBeatCarousel", { heightOverrides: r });
1478
- const u = p.useRef(null), g = p.useRef(null), [I, x] = p.useState(0), [O, y] = p.useState(null), [F, z] = p.useState(null), [R, D] = p.useState(null), [U, B] = p.useState(_), { carouselCopy: j } = k(), { onEvent: Z } = Y();
1479
- p.useEffect(() => {
1480
- if (u.current && !o) {
1481
- const s = u.current.offsetWidth, A = 8;
1475
+ const E = u.useRef(null), R = u.useRef(null), [I, x] = u.useState(0), [O, y] = u.useState(null), [F, z] = u.useState(null), [g, D] = u.useState(null), [b, B] = u.useState(p), { carouselCopy: j } = k(), { onEvent: Z } = Y();
1476
+ u.useEffect(() => {
1477
+ if (E.current && !o) {
1478
+ const s = E.current.offsetWidth, A = 8;
1482
1479
  let N;
1483
1480
  if (c > 1) {
1484
1481
  const J = (s - (c - 1) * A) / c / 3;
@@ -1487,8 +1484,8 @@ const $ = p.createContext(null), ht = ({
1487
1484
  N = s;
1488
1485
  D(N);
1489
1486
  }
1490
- }, [c, u.current?.offsetWidth]), p.useEffect(() => {
1491
- const s = g.current?.offsetWidth;
1487
+ }, [c, E.current?.offsetWidth]), u.useEffect(() => {
1488
+ const s = R.current?.offsetWidth;
1492
1489
  if (typeof s == "number" && o) {
1493
1490
  const A = (P) => {
1494
1491
  B(!0);
@@ -1503,55 +1500,54 @@ const $ = p.createContext(null), ht = ({
1503
1500
  };
1504
1501
  D(A(s));
1505
1502
  const N = () => {
1506
- const P = g.current?.offsetWidth;
1503
+ const P = R.current?.offsetWidth;
1507
1504
  typeof P == "number" && D(A(P));
1508
1505
  };
1509
1506
  return window.addEventListener("resize", N), () => {
1510
1507
  window.removeEventListener("resize", N);
1511
1508
  };
1512
1509
  }
1513
- }, [o, g]);
1510
+ }, [o, R]);
1514
1511
  const X = () => {
1515
- Z(S.ON_CAROUSEL_FORWARD_CLICK, i), u.current && R && u.current.scrollTo({
1516
- left: I + R + 8,
1512
+ Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && g && E.current.scrollTo({
1513
+ left: I + g + 8,
1517
1514
  top: 0,
1518
1515
  behavior: "smooth"
1519
1516
  });
1520
- }, re = () => {
1521
- Z(S.ON_CAROUSEL_BACK_CLICK, i), u.current && R && u.current.scrollTo({
1522
- left: Math.max(0, I - (R + 8)),
1517
+ }, le = () => {
1518
+ Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && g && E.current.scrollTo({
1519
+ left: Math.max(0, I - (g + 8)),
1523
1520
  top: 0,
1524
1521
  behavior: "smooth"
1525
1522
  });
1526
1523
  }, ne = () => {
1527
- u.current && x(u.current.scrollLeft);
1524
+ E.current && x(E.current.scrollLeft);
1528
1525
  }, Q = () => {
1529
1526
  if (!F || !O) return;
1530
- F - O > yt ? Z(S.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(S.ON_CAROUSEL_BACK_SWIPE, i);
1527
+ F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
1531
1528
  }, q = (s) => {
1532
1529
  y(s.targetTouches[0].clientX);
1533
1530
  }, L = (s) => {
1534
1531
  y(null), z(s.targetTouches[0].clientX);
1535
1532
  }, ue = {
1536
- clientColorScheme: l,
1533
+ clientColorScheme: r,
1537
1534
  showCTAColocatedWithText: n,
1538
- heightOverrides: r,
1535
+ heightOverrides: l,
1539
1536
  posthog: d,
1540
1537
  showIcon: C,
1541
1538
  variant: h
1542
- }, ae = R ? Math.round(I / (R + 8)) : 0, Fe = u.current ? u.current.scrollWidth - u.current.offsetWidth : 0;
1539
+ }, ae = g ? Math.round(I / (g + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1543
1540
  return /* @__PURE__ */ v(
1544
1541
  K,
1545
1542
  {
1546
1543
  "aria-label": j.carousel_title,
1547
1544
  "aria-roledescription": "carousel",
1548
- id: "MicroBeatCarousel",
1549
- ref: g,
1545
+ ref: R,
1550
1546
  role: "group/region",
1551
1547
  sx: {
1552
1548
  alignItems: "center",
1553
1549
  boxSizing: "border-box",
1554
- height: r,
1550
+ height: l,
1555
1551
  width: m || "100%"
1556
1552
  },
1557
1553
  children: [
@@ -1563,13 +1559,10 @@ const $ = p.createContext(null), ht = ({
1563
1559
  onTouchEnd: Q,
1564
1560
  onTouchMove: q,
1565
1561
  onTouchStart: L,
1566
- ref: u,
1562
+ ref: E,
1567
1563
  sx: {
1568
1564
  alignItems: "center",
1569
- height: (
1570
- // eslint-disable-next-line no-nested-ternary
1571
- r && E ? "calc(100% - 48px)" : r ? "100%" : void 0
1572
- ),
1565
+ height: l && "100%",
1573
1566
  gap: 8,
1574
1567
  listStyleType: "none",
1575
1568
  m: 0,
@@ -1599,7 +1592,7 @@ const $ = p.createContext(null), ht = ({
1599
1592
  index: A,
1600
1593
  isActiveCard: A === ae,
1601
1594
  onCardClick: a,
1602
- widthOverrides: R || void 0,
1595
+ widthOverrides: g || void 0,
1603
1596
  ...ue
1604
1597
  },
1605
1598
  `${s.guid} ${A}`
@@ -1610,41 +1603,41 @@ const $ = p.createContext(null), ht = ({
1610
1603
  {
1611
1604
  isActiveCard: ae === t.length,
1612
1605
  onCardClick: a,
1613
- widthOverrides: R || void 0,
1606
+ widthOverrides: g || void 0,
1614
1607
  ...ue
1615
1608
  }
1616
1609
  )
1617
1610
  ]
1618
1611
  }
1619
1612
  ),
1620
- E && /* @__PURE__ */ e(
1621
- Mt,
1613
+ _ && /* @__PURE__ */ e(
1614
+ St,
1622
1615
  {
1623
- clientColorScheme: l,
1616
+ clientColorScheme: r,
1624
1617
  currentBeatIndex: ae + c - 1,
1625
1618
  numBeats: t.length + 1,
1626
1619
  onNextClick: X,
1627
- onPreviousClick: re,
1620
+ onPreviousClick: le,
1628
1621
  scrollRightBoundary: Fe,
1629
1622
  scrollX: I,
1630
- shouldApplyNewAnimation: U,
1623
+ shouldApplyNewAnimation: b,
1631
1624
  visibleCardsCount: c
1632
1625
  }
1633
1626
  )
1634
1627
  ]
1635
1628
  }
1636
1629
  );
1637
- }, At = G(St), Ot = ({
1630
+ }, At = G(Mt), Ot = ({
1638
1631
  analyticsMetadata: i,
1639
1632
  clientColorScheme: o,
1640
1633
  onCardClick: t,
1641
- posthog: l,
1634
+ posthog: r,
1642
1635
  widthOverrides: n
1643
1636
  }) => {
1644
- const { carouselCopy: r } = k(), { onEvent: a } = Y(), d = () => {
1645
- a && (a(S.ON_VIEW_MORE_CLICKED, i), t(), l?.capture("clicked_view_more"));
1637
+ const { carouselCopy: l } = k(), { onEvent: a } = Y(), d = () => {
1638
+ a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1646
1639
  };
1647
- return r ? /* @__PURE__ */ v(
1640
+ return l ? /* @__PURE__ */ v(
1648
1641
  K,
1649
1642
  {
1650
1643
  alignItems: "center",
@@ -1666,37 +1659,35 @@ const $ = p.createContext(null), ht = ({
1666
1659
  lineHeight: "24px"
1667
1660
  },
1668
1661
  variant: "h3",
1669
- children: r.carousel_title
1662
+ children: l.carousel_title
1670
1663
  }
1671
1664
  ),
1672
1665
  /* @__PURE__ */ e(
1673
1666
  Pe,
1674
1667
  {
1675
- endIcon: /* @__PURE__ */ e(Me, { size: 20 }),
1668
+ endIcon: /* @__PURE__ */ e(Se, { size: 20 }),
1676
1669
  onClick: d,
1677
1670
  size: "small",
1678
1671
  sx: {
1679
1672
  color: o?.primary_300
1680
1673
  },
1681
1674
  variant: "text",
1682
- children: r.view_all_insights_in_full_feed_cta_aria
1675
+ children: l.view_all_insights_in_full_feed_cta_aria
1683
1676
  }
1684
1677
  )
1685
1678
  ]
1686
1679
  }
1687
- ) : /* @__PURE__ */ e(be, {});
1680
+ ) : /* @__PURE__ */ e(Ue, {});
1688
1681
  }, Tt = G(Ot), Wt = ({
1689
1682
  heightOverrides: i,
1690
1683
  widthOverrides: o,
1691
1684
  children: t
1692
1685
  }) => {
1693
- console.log("MicroWidgetContainer", { heightOverrides: i });
1694
- const { carouselCopy: l } = k();
1686
+ const { carouselCopy: r } = k();
1695
1687
  return /* @__PURE__ */ e(
1696
- b,
1688
+ U,
1697
1689
  {
1698
- id: "MicroWidgetContainer",
1699
- "aria-label": l?.carousel_title,
1690
+ "aria-label": r?.carousel_title,
1700
1691
  "aria-roledescription": "carousel",
1701
1692
  role: "group",
1702
1693
  sx: {
@@ -1712,35 +1703,35 @@ const $ = p.createContext(null), ht = ({
1712
1703
  ariaLabel: i,
1713
1704
  carouselSize: o,
1714
1705
  clientColorScheme: t,
1715
- heightOverrides: l,
1706
+ heightOverrides: r,
1716
1707
  onCardClick: n,
1717
- posthog: r,
1708
+ posthog: l,
1718
1709
  showIcon: a,
1719
1710
  showWithMargin: d,
1720
- variant: _,
1721
- widthOverrides: E
1711
+ variant: p,
1712
+ widthOverrides: _
1722
1713
  }) => {
1723
1714
  const { cardsCopy: C } = k(), { onEvent: f } = Y(), { onPageview: h } = Le();
1724
- p.useEffect(() => {
1715
+ u.useEffect(() => {
1725
1716
  h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1726
1717
  }, []);
1727
1718
  const m = () => {
1728
- n && n(), f(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), r?.capture("clicked_insight", {
1719
+ n && n(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1729
1720
  template: "no_relevant_insights"
1730
1721
  });
1731
1722
  };
1732
1723
  return /* @__PURE__ */ e(
1733
- le,
1724
+ re,
1734
1725
  {
1735
1726
  actionText: C.micro_card_cta,
1736
1727
  ariaLabel: i,
1737
1728
  description: C.no_relevant_insights_card_description,
1738
1729
  fontColors: { buttonColor: t?.primary_300 },
1739
- heightOverrides: l,
1730
+ heightOverrides: r,
1740
1731
  icon: /* @__PURE__ */ e(De, {}),
1741
1732
  isZeroState: !0,
1742
1733
  onCardClick: m,
1743
- posthog: r,
1734
+ posthog: l,
1744
1735
  showIcon: a,
1745
1736
  style: {
1746
1737
  cardStyle: {
@@ -1758,35 +1749,35 @@ const $ = p.createContext(null), ht = ({
1758
1749
  }
1759
1750
  },
1760
1751
  title: C.no_relevant_insights_card_title,
1761
- variant: _,
1762
- widthOverrides: E
1752
+ variant: p,
1753
+ widthOverrides: _
1763
1754
  }
1764
1755
  );
1765
- }, ri = G(He), ke = ({
1756
+ }, li = G(He), ke = ({
1766
1757
  ariaLabel: i,
1767
1758
  carouselSize: o,
1768
1759
  heightOverrides: t,
1769
- onCardClick: l,
1760
+ onCardClick: r,
1770
1761
  posthog: n,
1771
- showIcon: r,
1762
+ showIcon: l,
1772
1763
  showWithMargin: a,
1773
1764
  variant: d,
1774
- widthOverrides: _
1765
+ widthOverrides: p
1775
1766
  }) => {
1776
- const { onPageview: E } = Le(), { zeroStateCopy: C } = k();
1777
- return p.useEffect(() => {
1778
- E(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1767
+ const { onPageview: _ } = Le(), { zeroStateCopy: C } = k();
1768
+ return u.useEffect(() => {
1769
+ _(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1779
1770
  }, []), /* @__PURE__ */ e(
1780
- le,
1771
+ re,
1781
1772
  {
1782
1773
  ariaLabel: i,
1783
1774
  description: C.carousel_zero_state_description,
1784
1775
  heightOverrides: t,
1785
1776
  icon: /* @__PURE__ */ e(De, {}),
1786
1777
  isZeroState: !0,
1787
- onCardClick: l,
1778
+ onCardClick: r,
1788
1779
  posthog: n,
1789
- showIcon: r,
1780
+ showIcon: l,
1790
1781
  style: {
1791
1782
  cardStyle: {
1792
1783
  card: {
@@ -1801,11 +1792,11 @@ const $ = p.createContext(null), ht = ({
1801
1792
  },
1802
1793
  title: C.carousel_zero_state_title,
1803
1794
  variant: d,
1804
- widthOverrides: _
1795
+ widthOverrides: p
1805
1796
  }
1806
1797
  );
1807
1798
  }, ni = G(ke), wt = () => /* @__PURE__ */ e(
1808
- b,
1799
+ U,
1809
1800
  {
1810
1801
  sx: {
1811
1802
  alignItems: "center",
@@ -1816,20 +1807,20 @@ const $ = p.createContext(null), ht = ({
1816
1807
  },
1817
1808
  children: /* @__PURE__ */ e(qe, {})
1818
1809
  }
1819
- ), V = new Et(), xt = ({
1810
+ ), V = new ht(), xt = ({
1820
1811
  allowSingleCardPeeking: i,
1821
1812
  areBeatsLoading: o,
1822
1813
  beats: t = [],
1823
1814
  // This also determines the length of the carousel controls (beat.length + 1)
1824
- clientColorScheme: l,
1815
+ clientColorScheme: r,
1825
1816
  // Allows certain icons, view all and read more button to reflect the clients color scheme. Currently only supports primary_300
1826
1817
  showCTAColocatedWithText: n = !0,
1827
- endpoint: r = "/",
1818
+ endpoint: l = "/",
1828
1819
  heightOverrides: a,
1829
1820
  logOutUser: d,
1830
- onCardClick: _ = () => {
1821
+ onCardClick: p = () => {
1831
1822
  },
1832
- onEvent: E = () => {
1823
+ onEvent: _ = () => {
1833
1824
  },
1834
1825
  onPageview: C = () => {
1835
1826
  },
@@ -1837,50 +1828,49 @@ const $ = p.createContext(null), ht = ({
1837
1828
  shouldApplyNewAnimation: h = !1,
1838
1829
  showBorder: m = !0,
1839
1830
  showCarouselControls: c,
1840
- showHeader: u,
1841
- showIcon: g,
1831
+ showHeader: E,
1832
+ showIcon: R,
1842
1833
  showWithMargin: I = !0,
1843
1834
  token: x = "",
1844
1835
  useDarkMode: O,
1845
1836
  userHasFullInsightFeedBeats: y,
1846
1837
  variant: F,
1847
1838
  visibleCardsCount: z = 1,
1848
- widthOverrides: R
1839
+ widthOverrides: g
1849
1840
  }) => {
1850
- console.log("InsightsMicroWidget", { heightOverrides: a });
1851
- const [D, U] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), re = et([E], V), ne = tt([C], V);
1852
- p.useEffect(() => {
1853
- !V.isInitialized && !Z && (V.initialize(r, x, d).catch(() => X(!1)), X(!0));
1854
- }, [r, x, d, V.isInitialized, Z]), p.useEffect(() => {
1841
+ const [D, b] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
1842
+ u.useEffect(() => {
1843
+ !V.isInitialized && !Z && (V.initialize(l, x, d).catch(() => X(!1)), X(!0));
1844
+ }, [l, x, d, V.isInitialized, Z]), u.useEffect(() => {
1855
1845
  const L = window.innerHeight;
1856
- L < 180 ? U("STANDARD") : L >= 180 && L < 200 ? U("LARGE") : L >= 200 && L < 248 ? U("XLARGE") : L >= 248 && U("XXLARGE");
1857
- }, [window.innerHeight]), p.useEffect(() => {
1846
+ L < 180 ? b("STANDARD") : L >= 180 && L < 200 ? b("LARGE") : L >= 200 && L < 248 ? b("XLARGE") : L >= 248 && b("XXLARGE");
1847
+ }, [window.innerHeight]), u.useEffect(() => {
1858
1848
  j(!o && V.isInitialized);
1859
1849
  }, [o, V.isInitialized]);
1860
1850
  const Q = {
1861
1851
  showCTAColocatedWithText: n,
1862
1852
  heightOverrides: a,
1863
- onCardClick: _,
1853
+ onCardClick: p,
1864
1854
  posthog: f,
1865
- showIcon: g,
1855
+ showIcon: R,
1866
1856
  showWithMargin: I,
1867
1857
  useDarkMode: O,
1868
- widthOverrides: R
1858
+ widthOverrides: g
1869
1859
  }, q = {
1870
1860
  carouselSize: D,
1871
1861
  variant: F,
1872
1862
  ...Q
1873
1863
  };
1874
- return /* @__PURE__ */ e(ht, { onEvent: re, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: R, children: [
1864
+ return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: g, children: [
1875
1865
  !B && /* @__PURE__ */ e(wt, {}),
1876
- B && u && /* @__PURE__ */ e(
1866
+ B && E && /* @__PURE__ */ e(
1877
1867
  Tt,
1878
1868
  {
1879
1869
  analyticsMetadata: fe,
1880
- clientColorScheme: l,
1881
- onCardClick: _,
1870
+ clientColorScheme: r,
1871
+ onCardClick: p,
1882
1872
  posthog: f,
1883
- widthOverrides: R
1873
+ widthOverrides: g
1884
1874
  }
1885
1875
  ),
1886
1876
  B && !!t.length && /* @__PURE__ */ e(
@@ -1889,7 +1879,7 @@ const $ = p.createContext(null), ht = ({
1889
1879
  allowSingleCardPeeking: i,
1890
1880
  analyticsMetadata: fe,
1891
1881
  beats: t,
1892
- clientColorScheme: l,
1882
+ clientColorScheme: r,
1893
1883
  shouldApplyNewAnimation: h,
1894
1884
  showCarouselControls: c,
1895
1885
  variant: m ? F : void 0,
@@ -1897,66 +1887,66 @@ const $ = p.createContext(null), ht = ({
1897
1887
  ...Q
1898
1888
  }
1899
1889
  ),
1900
- B && !t.length && y && /* @__PURE__ */ e(He, { clientColorScheme: l, ...q }),
1890
+ B && !t.length && y && /* @__PURE__ */ e(He, { clientColorScheme: r, ...q }),
1901
1891
  B && !t.length && !y && /* @__PURE__ */ e(ke, { ...q })
1902
1892
  ] }) });
1903
1893
  }, ai = G(xt), Dt = ({
1904
1894
  isActiveCard: i,
1905
1895
  ariaLabel: o,
1906
1896
  clientColorScheme: t,
1907
- heightOverrides: l,
1897
+ heightOverrides: r,
1908
1898
  onCardClick: n,
1909
- posthog: r,
1899
+ posthog: l,
1910
1900
  showIcon: a,
1911
1901
  variant: d,
1912
- widthOverrides: _
1902
+ widthOverrides: p
1913
1903
  }) => {
1914
- const E = se(), { ref: C, inView: f } = Se({
1904
+ const _ = se(), { ref: C, inView: f } = Me({
1915
1905
  threshold: Ve
1916
1906
  }), { cardsCopy: h } = k(), { onEvent: m } = Y();
1917
1907
  oe(() => {
1918
- f && (m(xe.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1908
+ f && (m(xe.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
1919
1909
  template: "view_more_card"
1920
1910
  }));
1921
1911
  }, [f]);
1922
1912
  const c = () => {
1923
- n && n(), m(S.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1913
+ n && n(), m(M.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1924
1914
  template: "view_more_card"
1925
1915
  });
1926
1916
  };
1927
1917
  return /* @__PURE__ */ e(
1928
- le,
1918
+ re,
1929
1919
  {
1930
1920
  actionText: h.micro_card_cta,
1931
1921
  ariaLabel: o,
1932
1922
  description: h.view_more_card_description,
1933
1923
  fontColors: { buttonColor: t?.primary_300 },
1934
- heightOverrides: l,
1935
- icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? E.palette.primary.main }),
1924
+ heightOverrides: r,
1925
+ icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? _.palette.primary.main }),
1936
1926
  isActiveCard: i,
1937
1927
  onCardClick: c,
1938
- posthog: r,
1928
+ posthog: l,
1939
1929
  ref: C,
1940
1930
  showIcon: a,
1941
1931
  title: h.view_more_card_title,
1942
1932
  variant: d,
1943
- widthOverrides: _
1933
+ widthOverrides: p
1944
1934
  }
1945
1935
  );
1946
1936
  }, Lt = G(Dt);
1947
1937
  export {
1948
- Et as A,
1938
+ ht as A,
1949
1939
  vt as B,
1950
1940
  Tt as C,
1951
- ht as I,
1941
+ Et as I,
1952
1942
  At as M,
1953
- ri as N,
1943
+ li as N,
1954
1944
  fe as T,
1955
1945
  Lt as V,
1956
1946
  ni as Z,
1957
- le as a,
1947
+ re as a,
1958
1948
  ai as b,
1959
1949
  ft as c,
1960
- Rt as d,
1950
+ gt as d,
1961
1951
  De as e
1962
1952
  };
@@ -1,4 +1,4 @@
1
- import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-vWvKWBNw.mjs";
1
+ import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-SCn2wt4i.mjs";
2
2
  export {
3
3
  s as AppStore,
4
4
  e as BeatCard,
@@ -19,7 +19,7 @@ import { DataGridPro as mt } from "@mui/x-data-grid-pro";
19
19
  import { C as pt } from "../CurrencyText-kyC1aseI.mjs";
20
20
  import { b as Ct } from "../Localization-2MODESHW.mjs";
21
21
  import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
22
- import { T as M, b as ft } from "../ViewMoreMicroCard-vWvKWBNw.mjs";
22
+ import { T as M, b as ft } from "../ViewMoreMicroCard-SCn2wt4i.mjs";
23
23
  import { A as _, W as ke } from "../WidgetContainer-C88Ecu2W.mjs";
24
24
  import { c as Tt } from "../Category-CevNQ03n.mjs";
25
25
  import { a as Ne, T as He } from "../TransactionDetails-BWffqew4.mjs";
@@ -663,7 +663,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
663
663
  const n = Ht(), { onEvent: s } = H(), { isMobile: r, isDesktop: l, isLargeDesktop: d } = $(), { beatStore: h, endpoint: c, sessionToken: u } = Te(), f = n.palette.mode === "dark", g = l || d, T = g || r ? 1 : 2, m = () => null, a = (R) => {
664
664
  o?.(R), s(_.TRENDS_CLICK_INSIGHT, M);
665
665
  }, y = g ? 200 : 170, p = g ? 170 : 124, E = g ? 56 : 0, w = t.length > 0 ? y + E : p, D = g && t.length > 0 ? y : void 0;
666
- return console.log("TrendsInsights", { containerHeight: w, heightOverrides: D }), /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
666
+ return /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
667
667
  ft,
668
668
  {
669
669
  areBeatsLoading: h.isLoading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.5-alpha.mm2",
3
+ "version": "7.2.5",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",