@mx-cartographer/experiences 7.2.14-alpha.sms1 → 7.2.15-alpha.sms1

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/{Account-B-CuHOYf.mjs → Account-vp_TAbGt.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-DXVLAjNQ.mjs → AccountDetailsContent-Vj4LO6cx.mjs} +6 -6
  4. package/dist/{AccountDetailsHeader-vcy67tuH.mjs → AccountDetailsHeader-Df1JkzYi.mjs} +4 -4
  5. package/dist/{AccountFields-cUP-9Hm6.mjs → AccountFields-DUToRRqW.mjs} +2 -2
  6. package/dist/{AccountListItem-DChcf3SN.mjs → AccountListItem-CeY_WIpj.mjs} +3 -3
  7. package/dist/{AccountStore-D6KiXA1B.mjs → AccountStore-BkoLK9Tq.mjs} +1 -1
  8. package/dist/{Accounts-IeEtQjzA.mjs → Accounts-C1QxUB-e.mjs} +1 -1
  9. package/dist/{ConnectDrawer-DaFRU5st.mjs → ConnectDrawer-Bw5s6Dw1.mjs} +1 -0
  10. package/dist/{ConnectionsDrawer-DHJ7qdWL.mjs → ConnectionsDrawer-BDvVuJQf.mjs} +13 -12
  11. package/dist/{DebtsStore-z3VARSO6.mjs → DebtsStore-BD_XwsI7.mjs} +1 -1
  12. package/dist/{GoalStore-TD0BfzWX.mjs → GoalStore-DZ_Jvsa_.mjs} +1 -1
  13. package/dist/{ManageIncome-B5zuYyxg.mjs → ManageIncome-B9yGuahc.mjs} +2 -2
  14. package/dist/{NetWorthStore-B_1oulrt.mjs → NetWorthStore-D1NiDUcc.mjs} +2 -2
  15. package/dist/{RecurringSettings-CMwUC_rw.mjs → RecurringSettings-D9GFcsXV.mjs} +2 -2
  16. package/dist/{TransactionDetails-CuqEbcYg.mjs → TransactionDetails-BqCr2FTh.mjs} +42 -42
  17. package/dist/{TransactionStore-B4FCabkO.mjs → TransactionStore-DxPLdF3B.mjs} +31 -34
  18. package/dist/{ViewMoreMicroCard-iInbzbw0.mjs → ViewMoreMicroCard-SCn2wt4i.mjs} +571 -545
  19. package/dist/{WidgetContainer-C88Ecu2W.mjs → WidgetContainer-EbrN1oIo.mjs} +1 -1
  20. package/dist/accounts/index.es.js +11 -11
  21. package/dist/budgets/index.es.js +4 -4
  22. package/dist/cashflow/index.es.js +5 -5
  23. package/dist/common/index.es.js +11 -11
  24. package/dist/dashboard/index.es.js +1 -1
  25. package/dist/debts/index.es.js +5 -5
  26. package/dist/finstrong/index.es.js +4 -4
  27. package/dist/goals/index.es.js +7 -7
  28. package/dist/help/index.es.js +1 -1
  29. package/dist/investments/index.es.js +2 -2
  30. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -0
  31. package/dist/microinsights/cards/MicroInsightCard.d.ts +7 -0
  32. package/dist/microinsights/carousel/CarouselControls.d.ts +2 -0
  33. package/dist/microinsights/carousel/CarouselHeader.d.ts +2 -1
  34. package/dist/microinsights/index.d.ts +1 -1
  35. package/dist/microinsights/index.es.js +1 -1
  36. package/dist/microinsights/interfaces.d.ts +4 -0
  37. package/dist/networth/index.es.js +4 -4
  38. package/dist/recurringtransactions/index.es.js +5 -5
  39. package/dist/settings/index.es.js +1 -1
  40. package/dist/spending/index.es.js +2 -2
  41. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +2 -2
  42. package/dist/transactions/index.es.js +6 -6
  43. package/dist/trends/index.es.js +4 -4
  44. package/dist/{useAccountDisplayName-BcRqfar8.mjs → useAccountDisplayName-jS05A6-6.mjs} +1 -1
  45. package/package.json +1 -1
@@ -1,48 +1,48 @@
1
- import { jsx as e, jsxs as y } from "react/jsx-runtime";
2
- import u, { useState as ee, useEffect as ie } from "react";
3
- import { observer as P } from "mobx-react-lite";
4
- import Ze from "@mui/material/Button";
5
- import z from "@mui/material/Stack";
6
- import Pe from "@mui/material/Typography";
7
- import { ChevronLeft as Ge, ChevronRight as ve } from "@mxenabled/mx-icons";
1
+ import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
+ import u, { useState as te, useEffect as oe } from "react";
3
+ import { observer as G } from "mobx-react-lite";
4
+ import Pe from "@mui/material/Button";
5
+ import K from "@mui/material/Stack";
6
+ import Ge from "@mui/material/Typography";
7
+ import { ChevronLeft as be, ChevronRight as Se } from "@mxenabled/mx-icons";
8
8
  import { L as Ue } from "./Loader-DUaFpDGv.mjs";
9
9
  import U from "@mui/material/Box";
10
- import ue from "@mui/material/IconButton";
11
- import { useTheme as be } from "@mui/material/styles";
12
- import { useInView as Se } from "react-intersection-observer";
13
- import { P as ze, CategoryIcon as Ke, useTokens as Me, MerchantLogo as $e, Icon as te } from "@mxenabled/mxui";
14
- import ce from "@mui/material/styles/useTheme";
15
- import { b as Ye } from "./Category-CevNQ03n.mjs";
16
- import { css as je } from "@mxenabled/cssinjs";
17
- import { b as Xe } from "./Localization-2MODESHW.mjs";
18
- import Qe from "@mui/material/CircularProgress";
19
- import { makeAutoObservable as se, runInAction as Ae } from "mobx";
20
- import { G as pe, a as qe, u as Je, b as et } from "./useCombineEvents-BUDIR1ba.mjs";
21
- import { B as _e } from "./BeatApi-DhJpgCLz.mjs";
22
- import tt from "@mui/material/Card";
23
- import it from "@mui/material/CardActions";
24
- import ot from "@mui/material/CardContent";
10
+ import pe from "@mui/material/IconButton";
11
+ import { useTheme as ze } from "@mui/material/styles";
12
+ import { useInView as Me } from "react-intersection-observer";
13
+ import { P as Ke, CategoryIcon as $e, useTokens as Ae, 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 Oe } from "mobx";
20
+ import { G as _e, a as Je, u as et, b as tt } from "./useCombineEvents-BUDIR1ba.mjs";
21
+ import { B as Ce } from "./BeatApi-DhJpgCLz.mjs";
22
+ import it from "@mui/material/Card";
23
+ import ot from "@mui/material/CardActions";
24
+ import rt from "@mui/material/CardContent";
25
25
  import lt from "@mui/material/CardHeader";
26
- const Ce = {
26
+ const fe = {
27
27
  featureVersion: "spendVsIncomeTrends"
28
28
  };
29
- class rt {
30
- copyApi = new pe("/", "");
29
+ class nt {
30
+ copyApi = new _e("/", "");
31
31
  copyObject = {};
32
32
  namespace = "experiences";
33
33
  translationKey = "micro_insights";
34
34
  constructor() {
35
- se(this);
35
+ de(this);
36
36
  }
37
37
  // NOTE: Not sure if this is special case, but other stores have this deprecation todo
38
38
  // DEPRECATED: Initialize api in constructor and use loadCopy instead
39
39
  // TODO: Remove this function
40
40
  initialize = async (o, t) => {
41
- this.copyApi = new pe(o, t), await this.loadCopy();
41
+ this.copyApi = new _e(o, t), await this.loadCopy();
42
42
  };
43
43
  loadCopy = async () => {
44
44
  const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
45
- Ae(() => {
45
+ Oe(() => {
46
46
  this.copyObject = o[this.translationKey];
47
47
  });
48
48
  };
@@ -56,7 +56,7 @@ class rt {
56
56
  return this.copyObject.zero_state;
57
57
  }
58
58
  }
59
- const de = {
59
+ const he = {
60
60
  BillAmountNotStandard: "BillAmountNotStandard",
61
61
  CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
62
62
  DuplicatePaymentV2: "DuplicatePaymentV2",
@@ -73,59 +73,59 @@ const de = {
73
73
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
74
74
  MonthlySpendComparison: "MonthlySpendComparison",
75
75
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
76
- }, v = window?.app?.clientConfig?.microwidget_instance_id || "", fe = {
76
+ }, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
77
77
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
78
- }, Oe = (i) => `on${i}Click`, Te = (i) => `on${i}View`, We = (i) => `on${i}ViewFirstTime`, he = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), nt = () => Object.values(de).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
- [Oe(o)]: {
82
- action: W.MICRO_BEAT_CLICKED,
83
- category: T.BEAT_INTERACTION,
84
- label: he(o),
85
- value: v
81
+ [Te(o)]: {
82
+ action: w.MICRO_BEAT_CLICKED,
83
+ category: W.BEAT_INTERACTION,
84
+ label: Ee(o),
85
+ value: S
86
86
  }
87
87
  }),
88
88
  {}
89
- ), at = () => Object.values(de).reduce(
89
+ ), ct = () => Object.values(he).reduce(
90
90
  (i, o) => ({
91
91
  ...i,
92
- [Te(o)]: {
93
- action: W.MICRO_BEAT_DISPLAYED,
94
- category: T.BEAT_INTERACTION,
95
- label: he(o),
96
- value: v
92
+ [We(o)]: {
93
+ action: w.MICRO_BEAT_DISPLAYED,
94
+ category: W.BEAT_INTERACTION,
95
+ label: Ee(o),
96
+ value: S
97
97
  }
98
98
  }),
99
99
  {}
100
- ), ct = () => Object.values(de).reduce(
100
+ ), st = () => Object.values(he).reduce(
101
101
  (i, o) => ({
102
102
  ...i,
103
- [We(o)]: {
104
- action: W.MICRO_BEAT_DISPLAYED_FIRST_TIME,
105
- category: T.BEAT_INTERACTION,
106
- label: he(o),
107
- value: v
103
+ [we(o)]: {
104
+ action: w.MICRO_BEAT_DISPLAYED_FIRST_TIME,
105
+ category: W.BEAT_INTERACTION,
106
+ label: Ee(o),
107
+ value: S
108
108
  }
109
109
  }),
110
110
  {}
111
- ), O = {
111
+ ), T = {
112
112
  CARD: "Card",
113
113
  CAROUSEL_CONTROL: "Carousel Control",
114
114
  MICRO_WIDGET: "Micro Widget",
115
115
  VIEW_MORE: "View More"
116
- }, T = {
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",
123
123
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
124
124
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
125
125
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
126
- }, we = {
126
+ }, xe = {
127
127
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
128
- }, W = {
128
+ }, w = {
129
129
  CONTROL_BACKWARD: "Control Backward",
130
130
  CONTROL_FORWARD: "Control Forward",
131
131
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -133,95 +133,95 @@ const de = {
133
133
  MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
134
134
  SWIPE_BACKWARD: "Swipe Backward",
135
135
  SWIPE_FORWARD: "Swipe Forward"
136
- }, V = {
136
+ }, H = {
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
- }, me = {
141
- [V.MICRO_WIDGET_CAROUSEL]: {
142
- label: O.MICRO_WIDGET,
143
- name: V.MICRO_WIDGET_CAROUSEL,
144
- path: fe.INSIGHTS_MICRO_WIDGET,
145
- value: v
140
+ }, Re = {
141
+ [H.MICRO_WIDGET_CAROUSEL]: {
142
+ label: T.MICRO_WIDGET,
143
+ name: H.MICRO_WIDGET_CAROUSEL,
144
+ path: me.INSIGHTS_MICRO_WIDGET,
145
+ value: S
146
146
  },
147
147
  // zero state
148
- [V.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
149
- label: O.MICRO_WIDGET,
150
- name: V.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
151
- path: fe.INSIGHTS_MICRO_WIDGET,
152
- value: v
148
+ [H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
149
+ label: T.MICRO_WIDGET,
150
+ name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
151
+ path: me.INSIGHTS_MICRO_WIDGET,
152
+ value: S
153
153
  },
154
154
  // no relevant cards
155
- [V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
156
- label: O.MICRO_WIDGET,
157
- name: V.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,
158
158
  path: "/micro-widget",
159
- value: v
159
+ value: S
160
160
  }
161
- }, Re = {
161
+ }, ge = {
162
162
  // carousel control interaction events - clicks and swipes
163
- [S.ON_CAROUSEL_BACK_CLICK]: {
164
- action: W.CONTROL_BACKWARD,
165
- category: T.MICRO_WIDGET_INTERACTION,
166
- label: O.CAROUSEL_CONTROL,
167
- value: v
163
+ [M.ON_CAROUSEL_BACK_CLICK]: {
164
+ action: w.CONTROL_BACKWARD,
165
+ category: W.MICRO_WIDGET_INTERACTION,
166
+ label: T.CAROUSEL_CONTROL,
167
+ value: S
168
168
  },
169
- [S.ON_CAROUSEL_FORWARD_CLICK]: {
170
- action: W.CONTROL_FORWARD,
171
- category: T.MICRO_WIDGET_INTERACTION,
172
- label: O.CAROUSEL_CONTROL,
173
- value: v
169
+ [M.ON_CAROUSEL_FORWARD_CLICK]: {
170
+ action: w.CONTROL_FORWARD,
171
+ category: W.MICRO_WIDGET_INTERACTION,
172
+ label: T.CAROUSEL_CONTROL,
173
+ value: S
174
174
  },
175
- [S.ON_CAROUSEL_BACK_SWIPE]: {
176
- action: W.SWIPE_BACKWARD,
177
- category: T.MICRO_WIDGET_INTERACTION,
178
- label: O.CAROUSEL_CONTROL,
179
- value: v
175
+ [M.ON_CAROUSEL_BACK_SWIPE]: {
176
+ action: w.SWIPE_BACKWARD,
177
+ category: W.MICRO_WIDGET_INTERACTION,
178
+ label: T.CAROUSEL_CONTROL,
179
+ value: S
180
180
  },
181
- [S.ON_CAROUSEL_FORWARD_SWIPE]: {
182
- action: W.SWIPE_FORWARD,
183
- category: T.MICRO_WIDGET_INTERACTION,
184
- label: O.CAROUSEL_CONTROL,
185
- value: v
181
+ [M.ON_CAROUSEL_FORWARD_SWIPE]: {
182
+ action: w.SWIPE_FORWARD,
183
+ category: W.MICRO_WIDGET_INTERACTION,
184
+ label: T.CAROUSEL_CONTROL,
185
+ value: S
186
186
  },
187
187
  // read more card events
188
- [S.ON_VIEW_MORE_CLICKED]: {
189
- action: W.MICRO_BEAT_CLICKED,
190
- category: T.BEAT_INTERACTION,
191
- label: O.VIEW_MORE,
192
- value: v
188
+ [M.ON_VIEW_MORE_CLICKED]: {
189
+ action: w.MICRO_BEAT_CLICKED,
190
+ category: W.BEAT_INTERACTION,
191
+ label: T.VIEW_MORE,
192
+ value: S
193
193
  },
194
- [we.ON_VIEW_MORE_VIEWED]: {
195
- action: W.MICRO_BEAT_DISPLAYED,
196
- category: T.BEAT_INTERACTION,
197
- label: O.VIEW_MORE,
198
- value: v
194
+ [xe.ON_VIEW_MORE_VIEWED]: {
195
+ action: w.MICRO_BEAT_DISPLAYED,
196
+ category: W.BEAT_INTERACTION,
197
+ label: T.VIEW_MORE,
198
+ value: S
199
199
  },
200
- ...nt(),
201
200
  ...at(),
202
- ...ct()
203
- }, ge = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticEvent(Re[i]).then((t) => t).catch((t) => {
201
+ ...ct(),
202
+ ...st()
203
+ }, Ie = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticEvent(ge[i]).then((t) => t).catch((t) => {
204
204
  throw t;
205
- }), Ie = async (i, o) => !o || !me[i] ? null : o.sendAnalyticsPageview(me[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
- class st {
209
- onAnalyticEvent = ge;
210
- onAnalyticPageView = Ie;
211
- beatApi = new _e("/", "");
208
+ class dt {
209
+ onAnalyticEvent = Ie;
210
+ onAnalyticPageView = ye;
211
+ beatApi = new Ce("/", "");
212
212
  constructor() {
213
- se(this);
213
+ de(this);
214
214
  }
215
- initialize = async (o, t, l) => {
216
- this.onAnalyticEvent = (r, n) => {
217
- ge(r, n).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 = (r, n) => {
221
- Ie(r, n).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
- }, this.beatApi = new _e(o, t);
224
+ }, this.beatApi = new Ce(o, t);
225
225
  };
226
226
  updateBeat = async (o) => {
227
227
  this.beatApi.updateBeat(o);
@@ -230,7 +230,7 @@ class st {
230
230
  this.beatApi.updateOffer(o);
231
231
  };
232
232
  }
233
- class dt {
233
+ class ht {
234
234
  copyStore;
235
235
  endpoint = "/";
236
236
  insightsMicroWidgetStore;
@@ -238,61 +238,62 @@ class dt {
238
238
  token = "";
239
239
  isInitialized = !1;
240
240
  constructor() {
241
- this.copyStore = new rt(), this.insightsMicroWidgetStore = new st(), se(this);
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);
245
- const r = await qe(o, t, "1.0.0", "Micro Insights Carousel");
246
- Ae(() => {
247
- this.session = r, this.isInitialized = !0;
243
+ initialize = async (o, t, r) => {
244
+ await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
245
+ const n = await Je(o, t, "1.0.0", "Micro Insights Carousel");
246
+ Oe(() => {
247
+ this.session = n, this.isInitialized = !0;
248
248
  });
249
249
  };
250
250
  }
251
- const K = u.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(K.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), oe = u.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,
261
- description: r,
262
- heightOverrides: n,
260
+ backgroundColor: r,
261
+ description: n,
262
+ heightOverrides: l,
263
263
  icon: a,
264
- isActiveCard: h,
265
- isZeroState: s,
264
+ isActiveCard: d,
265
+ isZeroState: p,
266
266
  onCardClick: _ = () => {
267
267
  },
268
- showIcon: p,
269
- style: C = {},
270
- title: f,
268
+ showIcon: C,
269
+ style: f = {},
270
+ fontColors: h = {},
271
+ title: m,
271
272
  variant: c,
272
273
  widthOverrides: E
273
- }, m) {
274
- const g = ce(), [w, A] = u.useState(!1), { cardStyle: I, linkTextStyle: k } = C, b = c ? I : { border: "none", boxShadow: "none", ...I }, R = /* @__PURE__ */ e(
275
- ze,
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(
276
+ Ke,
276
277
  {
277
278
  className: "mx-micro-card-description",
278
- color: "text.primary",
279
+ color: h.textColor ? "undefined" : "text.primary",
279
280
  sx: {
280
281
  display: "-webkit-box",
281
282
  fontSize: 13,
282
283
  letterSpacing: 0.48,
283
284
  lineHeight: "20px",
284
285
  overflow: "hidden",
285
- pl: s ? 0 : 28,
286
- pr: s ? 0 : 8,
286
+ pl: p ? 0 : 28,
287
+ pr: p ? 0 : 8,
287
288
  WebkitBoxOrient: "vertical",
288
289
  WebkitLineClamp: 2,
289
290
  wordWrap: "break-word"
290
291
  },
291
- children: r && /* @__PURE__ */ e(
292
+ children: n && /* @__PURE__ */ e(
292
293
  "span",
293
294
  {
294
- dangerouslySetInnerHTML: { __html: r },
295
- style: { fontFamily: g.typography.fontFamily }
295
+ dangerouslySetInnerHTML: { __html: n },
296
+ style: { fontFamily: I.typography.fontFamily }
296
297
  }
297
298
  )
298
299
  }
@@ -300,54 +301,55 @@ const K = u.createContext(null), ht = ({
300
301
  return /* @__PURE__ */ e(
301
302
  U,
302
303
  {
303
- "aria-hidden": !h,
304
+ "aria-hidden": !d,
304
305
  "aria-label": t,
305
306
  "aria-labelledby": "divButton",
306
307
  "aria-roledescription": "slide",
307
- ref: m,
308
+ ref: R,
308
309
  role: "group",
309
310
  sx: {
310
311
  height: "100%",
311
312
  minWidth: E ? `${E}px` : "100%",
312
- fontFamily: g.typography.fontFamily
313
+ fontFamily: I.typography.fontFamily
313
314
  },
314
315
  children: /* @__PURE__ */ e(
315
316
  U,
316
317
  {
317
- "aria-hidden": !h,
318
+ "aria-hidden": !d,
318
319
  "aria-label": t,
319
320
  id: "divButton",
320
321
  onClick: () => _(),
321
- onKeyDown: () => A(!1),
322
- onKeyUp: () => A(!0),
323
- ref: m,
322
+ onKeyDown: () => O(!1),
323
+ onKeyUp: () => O(!0),
324
+ ref: R,
324
325
  role: "button",
325
326
  sx: {
326
- border: w ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
327
+ border: x ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
327
328
  borderRadius: "8px",
328
329
  height: "100%"
329
330
  },
330
- tabIndex: h ? 0 : -1,
331
+ tabIndex: d ? 0 : -1,
331
332
  children: /* @__PURE__ */ e(
332
- tt,
333
+ it,
333
334
  {
334
335
  "aria-roledescription": "slide",
335
336
  className: "mx-micro-card",
336
337
  role: "group",
337
338
  sx: {
338
- backgroundColor: l,
339
+ backgroundColor: r,
339
340
  boxSizing: "border-box",
340
341
  cursor: "pointer",
341
- height: n ? "100%" : 124,
342
+ height: l ? "100%" : 124,
342
343
  p: 16,
343
- ...b,
344
+ ...z,
344
345
  "& .MuiCardHeader-avatar": {
346
+ color: h.iconColor,
345
347
  mr: "8px"
346
348
  }
347
349
  },
348
350
  variant: c,
349
- children: /* @__PURE__ */ y(
350
- z,
351
+ children: /* @__PURE__ */ v(
352
+ K,
351
353
  {
352
354
  sx: {
353
355
  alignItems: "space-between",
@@ -357,16 +359,16 @@ const K = u.createContext(null), ht = ({
357
359
  /* @__PURE__ */ e(
358
360
  lt,
359
361
  {
360
- avatar: p && a,
361
- subheader: s && R,
362
- sx: { p: 0 },
363
- title: f,
362
+ avatar: C && a,
363
+ subheader: p && g,
364
+ sx: { color: h.headerColor, p: 0 },
365
+ title: m,
364
366
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
365
367
  }
366
368
  ),
367
- /* @__PURE__ */ e(ot, { sx: { p: 0 }, children: !s && R }),
369
+ /* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && g }),
368
370
  !!o && /* @__PURE__ */ e(
369
- it,
371
+ ot,
370
372
  {
371
373
  sx: {
372
374
  mt: "auto",
@@ -375,13 +377,13 @@ const K = u.createContext(null), ht = ({
375
377
  children: /* @__PURE__ */ e(
376
378
  U,
377
379
  {
378
- sx: (x) => ({
379
- color: x.palette.primary.main,
380
+ sx: (D) => ({
381
+ color: h.buttonColor ? h.buttonColor : D.palette.primary.main,
380
382
  fontSize: 14,
381
383
  fontWeight: "bold",
382
384
  px: 28,
383
- fontFamily: x.typography.fontFamily,
384
- ...k
385
+ fontFamily: D.typography.fontFamily,
386
+ ...F
385
387
  }),
386
388
  children: o
387
389
  }
@@ -398,15 +400,15 @@ const K = u.createContext(null), ht = ({
398
400
  }
399
401
  );
400
402
  }
401
- ), Et = ({ beat: i }) => {
402
- const [o, t] = ee(Ye.UNCATEGORIZED);
403
- return ie(() => {
403
+ ), ut = ({ beat: i }) => {
404
+ const [o, t] = te(je.UNCATEGORIZED);
405
+ return oe(() => {
404
406
  i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
405
- }, []), /* @__PURE__ */ e(Ke, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
406
- }, ut = ({ beat: i }) => {
407
- const o = Me(), t = pt(o);
407
+ }, []), /* @__PURE__ */ e($e, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
408
+ }, pt = ({ beat: i }) => {
409
+ const o = Ae(), t = _t(o);
408
410
  return /* @__PURE__ */ e(
409
- $e,
411
+ Ye,
410
412
  {
411
413
  categoryGuid: i.primary_category_guid || i.category_guids && i.category_guids[0] || "",
412
414
  className: t,
@@ -414,18 +416,18 @@ const K = u.createContext(null), ht = ({
414
416
  size: 16
415
417
  }
416
418
  );
417
- }, pt = (i) => je({
419
+ }, _t = (i) => Xe({
418
420
  marginTop: i.Spacing.XTiny,
419
421
  "& .kyper-categoryicon": {
420
422
  display: "flex"
421
423
  }
422
- }), _t = P(ut), Ct = ({
424
+ }), Ct = G(pt), ft = ({
423
425
  color: i = "currentColor",
424
426
  height: o,
425
427
  size: t = 16,
426
- styles: l,
427
- viewBox: r = "0 0 16 16",
428
- width: n
428
+ styles: r,
429
+ viewBox: n = "0 0 16 16",
430
+ width: l
429
431
  }) => /* @__PURE__ */ e(
430
432
  "svg",
431
433
  {
@@ -433,9 +435,9 @@ const K = u.createContext(null), ht = ({
433
435
  className: "kyper-icon",
434
436
  focusable: !1,
435
437
  height: o || t,
436
- style: l,
437
- viewBox: r,
438
- width: n || t,
438
+ style: r,
439
+ viewBox: n,
440
+ width: l || t,
439
441
  xmlns: "http://www.w3.org/2000/svg",
440
442
  children: /* @__PURE__ */ e(
441
443
  "path",
@@ -445,18 +447,18 @@ const K = u.createContext(null), ht = ({
445
447
  }
446
448
  )
447
449
  }
448
- ), ft = (i) => i ? i.data ? i.data.map((o) => {
450
+ ), mt = (i) => i ? i.data ? i.data.map((o) => {
449
451
  const t = {};
450
- return i.names?.map((l, r) => {
451
- t[l] = o[r];
452
+ return i.names?.map((r, n) => {
453
+ t[r] = o[n];
452
454
  }), t;
453
- }) : [] : [], mt = (i, o) => {
454
- const t = ft(i), l = t.length / 2, r = t.slice(0, l), n = t.slice(l);
455
- return !r.length || !n.length ? o.Color.Primary300 : r[0].amount > n[0].amount ? o.Color.Error300 : r[0].amount < n[0].amount ? o.Color.Success300 : o.Color.Primary300;
456
- }, Rt = ({ beat: i }) => {
457
- const o = Me(), t = mt(i.data_series, o);
458
- return /* @__PURE__ */ e(te, { name: "bar_chart", sx: { color: t } });
459
- }, xe = () => /* @__PURE__ */ y("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
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);
460
+ return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
461
+ }, De = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
460
462
  /* @__PURE__ */ e(
461
463
  "path",
462
464
  {
@@ -700,7 +702,7 @@ const K = u.createContext(null), ht = ({
700
702
  fillRule: "evenodd"
701
703
  }
702
704
  ),
703
- /* @__PURE__ */ y("g", { filter: "url(#filter0_d_1565_98011)", children: [
705
+ /* @__PURE__ */ v("g", { filter: "url(#filter0_d_1565_98011)", children: [
704
706
  /* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
705
707
  "path",
706
708
  {
@@ -956,10 +958,10 @@ const K = u.createContext(null), ht = ({
956
958
  ),
957
959
  /* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
958
960
  ] }),
959
- /* @__PURE__ */ y("g", { filter: "url(#filter1_d_1565_98011)", children: [
961
+ /* @__PURE__ */ v("g", { filter: "url(#filter1_d_1565_98011)", children: [
960
962
  /* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
961
963
  /* @__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" }) }),
962
- /* @__PURE__ */ y("g", { mask: "url(#mask2_1565_98011)", children: [
964
+ /* @__PURE__ */ v("g", { mask: "url(#mask2_1565_98011)", children: [
963
965
  /* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
964
966
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
965
967
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
@@ -1149,8 +1151,8 @@ const K = u.createContext(null), ht = ({
1149
1151
  fill: "#CDD3DD"
1150
1152
  }
1151
1153
  ),
1152
- /* @__PURE__ */ y("defs", { children: [
1153
- /* @__PURE__ */ y(
1154
+ /* @__PURE__ */ v("defs", { children: [
1155
+ /* @__PURE__ */ v(
1154
1156
  "filter",
1155
1157
  {
1156
1158
  colorInterpolationFilters: "sRGB",
@@ -1193,7 +1195,7 @@ const K = u.createContext(null), ht = ({
1193
1195
  ]
1194
1196
  }
1195
1197
  ),
1196
- /* @__PURE__ */ y(
1198
+ /* @__PURE__ */ v(
1197
1199
  "filter",
1198
1200
  {
1199
1201
  colorInterpolationFilters: "sRGB",
@@ -1237,134 +1239,145 @@ const K = u.createContext(null), ht = ({
1237
1239
  }
1238
1240
  )
1239
1241
  ] })
1240
- ] }), ye = ({ beat: i, color: o, type: t }) => {
1241
- const l = ce();
1242
- return t === 0 ? /* @__PURE__ */ e(te, { fill: !0, name: "error", sx: { color: o || l.palette.primary.main } }) : t === 1 && i ? /* @__PURE__ */ e(Et, { beat: i }) : t === 2 && i ? /* @__PURE__ */ e(_t, { beat: i }) : t === 3 && i ? /* @__PURE__ */ e(Rt, { beat: i }) : t === 5 && i ? /* @__PURE__ */ e(te, { name: "campaign" }) : /* @__PURE__ */ e(
1243
- te,
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(
1245
+ ie,
1244
1246
  {
1245
1247
  fill: !0,
1246
1248
  name: "info",
1247
1249
  sx: {
1248
- color: l.palette.primary.main
1250
+ color: l
1249
1251
  }
1250
1252
  }
1251
1253
  );
1252
- }, H = () => {
1253
- const i = u.useContext(K);
1254
+ }, k = () => {
1255
+ const i = u.useContext($);
1254
1256
  if (!i)
1255
1257
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
1256
1258
  return i.store.copyStore;
1257
- }, gt = () => {
1258
- const i = u.useContext(K);
1259
+ }, It = () => {
1260
+ const i = u.useContext($);
1259
1261
  if (!i?.store?.insightsMicroWidgetStore)
1260
1262
  throw new Error(
1261
1263
  "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
1262
1264
  );
1263
1265
  return i.store.insightsMicroWidgetStore;
1264
- }, $ = () => {
1265
- const i = u.useContext(K);
1266
+ }, Y = () => {
1267
+ const i = u.useContext($);
1266
1268
  if (!i)
1267
1269
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
1268
1270
  return { onEvent: i.onEvent };
1269
- }, De = () => {
1270
- const i = u.useContext(K);
1271
+ }, Le = () => {
1272
+ const i = u.useContext($);
1271
1273
  if (!i)
1272
1274
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1273
1275
  return { onPageview: i.onPageview };
1274
- }, Le = {
1276
+ }, Ne = {
1275
1277
  LARGE: 180,
1276
1278
  STANDARD: 154,
1277
1279
  XLARGE: 200,
1278
1280
  XXLARGE: 248
1279
- }, It = 50, Ne = 1, yt = ({
1281
+ }, yt = 50, Ve = 1, vt = ({
1280
1282
  ariaLabel: i,
1281
1283
  backgroundColor: o,
1282
1284
  beat: t,
1283
- showCTAColocatedWithText: l = !0,
1284
- heightOverrides: r,
1285
- index: n,
1286
- isActiveCard: a,
1287
- onCardClick: h,
1288
- posthog: s,
1289
- showIcon: _,
1290
- variant: p,
1291
- widthOverrides: C
1285
+ clientColorScheme: r,
1286
+ showCTAColocatedWithText: n = !0,
1287
+ heightOverrides: l,
1288
+ index: a,
1289
+ isActiveCard: d,
1290
+ onCardClick: p,
1291
+ posthog: _,
1292
+ showIcon: C,
1293
+ variant: f,
1294
+ widthOverrides: h
1292
1295
  }) => {
1293
- const { ref: f, inView: c } = Se({
1294
- threshold: Ne
1295
- }), { cardsCopy: E } = H(), { onEvent: m } = $(), { updateBeat: g, updateOffer: w } = gt();
1296
- ie(() => {
1297
- c && (t.has_been_displayed ? m(Te(t.template)) : (t.guid.startsWith("OFR") ? w({
1296
+ const { ref: m, inView: c } = Me({
1297
+ threshold: Ve
1298
+ }), { cardsCopy: E } = k(), { onEvent: R } = Y(), { updateBeat: I, updateOffer: x } = It();
1299
+ oe(() => {
1300
+ c && (t.has_been_displayed ? R(We(t.template)) : (t.guid.startsWith("OFR") ? x({
1298
1301
  ...t,
1299
1302
  has_been_displayed: !0
1300
- }) : g({
1303
+ }) : I({
1301
1304
  ...t,
1302
1305
  has_been_displayed: !0
1303
- }), m(We(t.template))));
1304
- }, [c]), ie(() => {
1306
+ }), R(we(t.template))));
1307
+ }, [c]), oe(() => {
1305
1308
  if (c && t)
1306
1309
  if (t.template === "MarketingOffer") {
1307
- const I = t;
1308
- s?.capture("viewed_messaging_insight", {
1310
+ const y = t;
1311
+ _?.capture("viewed_messaging_insight", {
1309
1312
  template: t.template,
1310
- campaign_guid: I.campaign_guid,
1311
- campaign_name: I.pulse_campaign_name
1313
+ campaign_guid: y.campaign_guid,
1314
+ campaign_name: y.pulse_campaign_name
1312
1315
  });
1313
1316
  } else
1314
- s?.capture("viewed_insight", {
1317
+ _?.capture("viewed_insight", {
1315
1318
  beat_guid: t.guid,
1316
1319
  template: t.template,
1317
- position: n
1320
+ position: a
1318
1321
  });
1319
- }, [t, n, c]);
1320
- const A = () => {
1321
- if (h && h(t), m(Oe(t.template)), t.template === "MarketingOffer") {
1322
- const I = t;
1323
- s?.capture("clicked_messaging_insight", {
1322
+ }, [t, a, c]);
1323
+ const O = () => {
1324
+ if (p && p(t), R(Te(t.template)), t.template === "MarketingOffer") {
1325
+ const y = t;
1326
+ _?.capture("clicked_messaging_insight", {
1324
1327
  template: t.template,
1325
- campaign_guid: I.campaign_guid,
1326
- campaign_name: I.pulse_campaign_name
1328
+ campaign_guid: y.campaign_guid,
1329
+ campaign_name: y.pulse_campaign_name
1327
1330
  });
1328
1331
  } else
1329
- s?.capture("clicked_insight", {
1332
+ _?.capture("clicked_insight", {
1330
1333
  beat_guid: t.guid,
1331
1334
  template: t.template,
1332
- position: n
1335
+ position: a
1333
1336
  });
1334
1337
  };
1335
1338
  return /* @__PURE__ */ e(
1336
- oe,
1339
+ re,
1337
1340
  {
1338
1341
  actionText: t.micro_call_to_action || E.micro_card_cta,
1339
1342
  ariaLabel: i,
1340
1343
  backgroundColor: o,
1341
1344
  description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
1342
- heightOverrides: r,
1343
- icon: ye && /* @__PURE__ */ e(ye, { beat: t, color: t?.icon_color, type: t?.icon_type }),
1344
- isActiveCard: a,
1345
- onCardClick: A,
1346
- posthog: s,
1347
- ref: f,
1348
- showCTAColocatedWithText: l,
1349
- showIcon: _,
1345
+ fontColors: { buttonColor: r?.primary_300 },
1346
+ heightOverrides: l,
1347
+ icon: ve && /* @__PURE__ */ e(
1348
+ ve,
1349
+ {
1350
+ beat: t,
1351
+ clientColorScheme: r,
1352
+ color: t?.icon_color,
1353
+ type: t?.icon_type
1354
+ }
1355
+ ),
1356
+ isActiveCard: d,
1357
+ onCardClick: O,
1358
+ posthog: _,
1359
+ ref: m,
1360
+ showCTAColocatedWithText: n,
1361
+ showIcon: C,
1350
1362
  title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
1351
- variant: p,
1352
- widthOverrides: C
1363
+ variant: f,
1364
+ widthOverrides: h
1353
1365
  }
1354
1366
  );
1355
- }, vt = ({
1356
- currentBeatIndex: i,
1357
- numBeats: o,
1358
- onNextClick: t,
1359
- onPreviousClick: l,
1360
- scrollRightBoundary: r,
1361
- scrollX: n,
1362
- shouldApplyNewAnimation: a = !1,
1363
- visibleCardsCount: h = 1
1367
+ }, St = ({
1368
+ clientColorScheme: i,
1369
+ currentBeatIndex: o,
1370
+ numBeats: t,
1371
+ onNextClick: r,
1372
+ onPreviousClick: n,
1373
+ scrollRightBoundary: l,
1374
+ scrollX: a,
1375
+ shouldApplyNewAnimation: d = !1,
1376
+ visibleCardsCount: p = 1
1364
1377
  }) => {
1365
- const s = be(), { carouselCopy: _ } = H(), p = Math.floor(n) > r || i - h + 1 === 0, C = n < 0 || o - 1 === i, f = s.palette.grey[500], c = s.palette.primary.main;
1366
- return /* @__PURE__ */ y(
1367
- z,
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;
1379
+ return /* @__PURE__ */ v(
1380
+ K,
1368
1381
  {
1369
1382
  direction: "row",
1370
1383
  sx: {
@@ -1379,34 +1392,34 @@ const K = u.createContext(null), ht = ({
1379
1392
  },
1380
1393
  children: [
1381
1394
  /* @__PURE__ */ e(
1382
- ue,
1395
+ pe,
1383
1396
  {
1384
- "aria-disabled": p,
1385
- "aria-label": _.previous_insight_cta_aria,
1386
- disabled: p,
1387
- onClick: l,
1397
+ "aria-disabled": f,
1398
+ "aria-label": C.previous_insight_cta_aria,
1399
+ disabled: f,
1400
+ onClick: n,
1388
1401
  children: /* @__PURE__ */ e(
1389
- Ge,
1402
+ be,
1390
1403
  {
1391
1404
  style: {
1392
- color: p ? f : c
1405
+ color: f ? m : c
1393
1406
  }
1394
1407
  }
1395
1408
  )
1396
1409
  }
1397
1410
  ),
1398
- Array.from({ length: o }).map((E, m) => {
1399
- const g = m === i;
1411
+ Array.from({ length: t }).map((E, R) => {
1412
+ const I = R === o;
1400
1413
  return /* @__PURE__ */ e(
1401
1414
  U,
1402
1415
  {
1403
1416
  className: "mx-insights-micro-carousel-dots",
1404
1417
  sx: {
1405
- bgcolor: g ? c : f,
1418
+ bgcolor: I ? c : m,
1406
1419
  height: 8,
1407
1420
  mr: 8,
1408
1421
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
1409
- ...a ? {
1422
+ ...d ? {
1410
1423
  borderRadius: "4px",
1411
1424
  transformOrigin: "center",
1412
1425
  transition: "all 0.5s ease-out",
@@ -1415,24 +1428,24 @@ const K = u.createContext(null), ht = ({
1415
1428
  borderRadius: "50%",
1416
1429
  p: 0
1417
1430
  },
1418
- width: g && a ? 24 : 8
1431
+ width: I && d ? 24 : 8
1419
1432
  }
1420
1433
  },
1421
- `carousel-button-${m}`
1434
+ `carousel-button-${R}`
1422
1435
  );
1423
1436
  }),
1424
1437
  /* @__PURE__ */ e(
1425
- ue,
1438
+ pe,
1426
1439
  {
1427
- "aria-disabled": C,
1428
- "aria-label": _.next_insight_cta_aria,
1429
- disabled: C,
1430
- onClick: t,
1440
+ "aria-disabled": h,
1441
+ "aria-label": C.next_insight_cta_aria,
1442
+ disabled: h,
1443
+ onClick: r,
1431
1444
  children: /* @__PURE__ */ e(
1432
- ve,
1445
+ Se,
1433
1446
  {
1434
1447
  style: {
1435
- color: C ? f : c
1448
+ color: h ? m : c
1436
1449
  }
1437
1450
  }
1438
1451
  )
@@ -1441,117 +1454,119 @@ const K = u.createContext(null), ht = ({
1441
1454
  ]
1442
1455
  }
1443
1456
  );
1444
- }, St = ({
1457
+ }, Mt = ({
1445
1458
  analyticsMetadata: i,
1446
1459
  allowSingleCardPeeking: o = !1,
1447
1460
  beats: t = [],
1448
- showCTAColocatedWithText: l,
1449
- heightOverrides: r,
1450
- onCardClick: n,
1451
- posthog: a,
1452
- shouldApplyNewAnimation: h = !1,
1453
- showCarouselControls: s,
1454
- showIcon: _,
1455
- showWithMargin: p = !0,
1456
- variant: C,
1457
- widthOverrides: f,
1461
+ clientColorScheme: r,
1462
+ showCTAColocatedWithText: n,
1463
+ heightOverrides: l,
1464
+ onCardClick: a,
1465
+ posthog: d,
1466
+ shouldApplyNewAnimation: p = !1,
1467
+ showCarouselControls: _,
1468
+ showIcon: C,
1469
+ showWithMargin: f = !0,
1470
+ variant: h,
1471
+ widthOverrides: m,
1458
1472
  visibleCardsCount: c = 1
1459
1473
  // Default to 1 card visible
1460
1474
  }) => {
1461
- const E = u.useRef(null), m = u.useRef(null), [g, w] = u.useState(0), [A, I] = u.useState(null), [k, b] = u.useState(null), [R, x] = u.useState(null), [G, F] = u.useState(h), { carouselCopy: Y } = H(), { onEvent: B } = $();
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();
1462
1476
  u.useEffect(() => {
1463
1477
  if (E.current && !o) {
1464
- const d = E.current.offsetWidth, M = 8;
1465
- let L;
1478
+ const s = E.current.offsetWidth, A = 8;
1479
+ let N;
1466
1480
  if (c > 1) {
1467
- const q = (d - (c - 1) * M) / c / 3;
1468
- L = (d - q - (c - 1) * M) / c;
1481
+ const J = (s - (c - 1) * A) / c / 3;
1482
+ N = (s - J - (c - 1) * A) / c;
1469
1483
  } else
1470
- L = d;
1471
- x(L);
1484
+ N = s;
1485
+ D(N);
1472
1486
  }
1473
1487
  }, [c, E.current?.offsetWidth]), u.useEffect(() => {
1474
- const d = m.current?.offsetWidth;
1475
- if (typeof d == "number" && o) {
1476
- const M = (Z) => {
1477
- F(!0);
1478
- const J = [
1488
+ const s = R.current?.offsetWidth;
1489
+ if (typeof s == "number" && o) {
1490
+ const A = (P) => {
1491
+ B(!0);
1492
+ const ee = [
1479
1493
  { maxWidth: 375, cardWidth: 268 },
1480
1494
  { maxWidth: 444, cardWidth: 300 },
1481
1495
  { maxWidth: 599, cardWidth: 350 },
1482
1496
  { maxWidth: 749, cardWidth: 450 },
1483
1497
  { maxWidth: 900, cardWidth: 600 }
1484
- ].find((ae) => Z <= ae.maxWidth);
1485
- return J ? J.cardWidth : 750;
1498
+ ].find((ce) => P <= ce.maxWidth);
1499
+ return ee ? ee.cardWidth : 750;
1486
1500
  };
1487
- x(M(d));
1488
- const L = () => {
1489
- const Z = m.current?.offsetWidth;
1490
- typeof Z == "number" && x(M(Z));
1501
+ D(A(s));
1502
+ const N = () => {
1503
+ const P = R.current?.offsetWidth;
1504
+ typeof P == "number" && D(A(P));
1491
1505
  };
1492
- return window.addEventListener("resize", L), () => {
1493
- window.removeEventListener("resize", L);
1506
+ return window.addEventListener("resize", N), () => {
1507
+ window.removeEventListener("resize", N);
1494
1508
  };
1495
1509
  }
1496
- }, [o, m]);
1497
- const j = () => {
1498
- B(S.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
1499
- left: g + R + 8,
1510
+ }, [o, R]);
1511
+ const X = () => {
1512
+ Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && g && E.current.scrollTo({
1513
+ left: I + g + 8,
1500
1514
  top: 0,
1501
1515
  behavior: "smooth"
1502
1516
  });
1503
1517
  }, le = () => {
1504
- B(S.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
1505
- left: Math.max(0, g - (R + 8)),
1518
+ Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && g && E.current.scrollTo({
1519
+ left: Math.max(0, I - (g + 8)),
1506
1520
  top: 0,
1507
1521
  behavior: "smooth"
1508
1522
  });
1509
- }, re = () => {
1510
- E.current && w(E.current.scrollLeft);
1511
- }, X = () => {
1512
- if (!k || !A) return;
1513
- k - A > It ? B(S.ON_CAROUSEL_FORWARD_SWIPE, i) : B(S.ON_CAROUSEL_BACK_SWIPE, i);
1514
- }, Q = (d) => {
1515
- I(d.targetTouches[0].clientX);
1516
- }, D = (d) => {
1517
- I(null), b(d.targetTouches[0].clientX);
1518
- }, Ee = {
1519
- showCTAColocatedWithText: l,
1520
- heightOverrides: r,
1521
- posthog: a,
1522
- showIcon: _,
1523
- variant: C
1524
- }, ne = R ? Math.round(g / (R + 8)) : 0, ke = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1525
- return /* @__PURE__ */ y(
1526
- z,
1523
+ }, ne = () => {
1524
+ E.current && x(E.current.scrollLeft);
1525
+ }, Q = () => {
1526
+ if (!F || !O) return;
1527
+ F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
1528
+ }, q = (s) => {
1529
+ y(s.targetTouches[0].clientX);
1530
+ }, L = (s) => {
1531
+ y(null), z(s.targetTouches[0].clientX);
1532
+ }, ue = {
1533
+ clientColorScheme: r,
1534
+ showCTAColocatedWithText: n,
1535
+ heightOverrides: l,
1536
+ posthog: d,
1537
+ showIcon: C,
1538
+ variant: h
1539
+ }, ae = g ? Math.round(I / (g + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1540
+ return /* @__PURE__ */ v(
1541
+ K,
1527
1542
  {
1528
- "aria-label": Y.carousel_title,
1543
+ "aria-label": j.carousel_title,
1529
1544
  "aria-roledescription": "carousel",
1530
- ref: m,
1545
+ ref: R,
1531
1546
  role: "group/region",
1532
1547
  sx: {
1533
1548
  alignItems: "center",
1534
1549
  boxSizing: "border-box",
1535
- height: r,
1536
- width: f || "100%"
1550
+ height: l,
1551
+ width: m || "100%"
1537
1552
  },
1538
1553
  children: [
1539
- /* @__PURE__ */ y(
1540
- z,
1554
+ /* @__PURE__ */ v(
1555
+ K,
1541
1556
  {
1542
1557
  direction: "row",
1543
- onScroll: re,
1544
- onTouchEnd: X,
1545
- onTouchMove: Q,
1546
- onTouchStart: D,
1558
+ onScroll: ne,
1559
+ onTouchEnd: Q,
1560
+ onTouchMove: q,
1561
+ onTouchStart: L,
1547
1562
  ref: E,
1548
1563
  sx: {
1549
1564
  alignItems: "center",
1550
- height: r && "100%",
1565
+ height: l && "100%",
1551
1566
  gap: 8,
1552
1567
  listStyleType: "none",
1553
1568
  m: 0,
1554
- maxWidth: p ? "calc(100% - 32px)" : "100%",
1569
+ maxWidth: f ? "calc(100% - 32px)" : "100%",
1555
1570
  overflowX: "auto",
1556
1571
  overflowY: "hidden",
1557
1572
  p: 0,
@@ -1563,65 +1578,67 @@ const K = u.createContext(null), ht = ({
1563
1578
  }
1564
1579
  },
1565
1580
  children: [
1566
- t.map((d, M) => {
1567
- const L = M + 1, Z = t.length + 1, q = Xe(
1568
- Y.card_position_in_carousel_aria,
1569
- L.toString(),
1570
- Z.toString()
1571
- ), J = d.micro_title && d.micro_title.length > 0, ae = d.micro_description && d.micro_description.length > 0, Fe = J ? d.micro_title : d.title, Be = ae ? d.micro_description : d.description;
1581
+ t.map((s, A) => {
1582
+ const N = A + 1, P = t.length + 1, J = Qe(
1583
+ j.card_position_in_carousel_aria,
1584
+ N.toString(),
1585
+ P.toString()
1586
+ ), ee = s.micro_title && s.micro_title.length > 0, ce = s.micro_description && s.micro_description.length > 0, Be = ee ? s.micro_title : s.title, Ze = ce ? s.micro_description : s.description;
1572
1587
  return /* @__PURE__ */ e(
1573
- yt,
1588
+ vt,
1574
1589
  {
1575
- ariaLabel: `${q}: ${Fe}, ${Be}`,
1576
- beat: d,
1577
- index: M,
1578
- isActiveCard: M === ne,
1579
- onCardClick: n,
1580
- widthOverrides: R || void 0,
1581
- ...Ee
1590
+ ariaLabel: `${J}: ${Be}, ${Ze}`,
1591
+ beat: s,
1592
+ index: A,
1593
+ isActiveCard: A === ae,
1594
+ onCardClick: a,
1595
+ widthOverrides: g || void 0,
1596
+ ...ue
1582
1597
  },
1583
- `${d.guid} ${M}`
1598
+ `${s.guid} ${A}`
1584
1599
  );
1585
1600
  }),
1586
1601
  /* @__PURE__ */ e(
1587
- Dt,
1602
+ Lt,
1588
1603
  {
1589
- isActiveCard: ne === t.length,
1590
- onCardClick: n,
1591
- widthOverrides: R || void 0,
1592
- ...Ee
1604
+ isActiveCard: ae === t.length,
1605
+ onCardClick: a,
1606
+ widthOverrides: g || void 0,
1607
+ ...ue
1593
1608
  }
1594
1609
  )
1595
1610
  ]
1596
1611
  }
1597
1612
  ),
1598
- s && /* @__PURE__ */ e(
1599
- vt,
1613
+ _ && /* @__PURE__ */ e(
1614
+ St,
1600
1615
  {
1601
- currentBeatIndex: ne + c - 1,
1616
+ clientColorScheme: r,
1617
+ currentBeatIndex: ae + c - 1,
1602
1618
  numBeats: t.length + 1,
1603
- onNextClick: j,
1619
+ onNextClick: X,
1604
1620
  onPreviousClick: le,
1605
- scrollRightBoundary: ke,
1606
- scrollX: g,
1607
- shouldApplyNewAnimation: G,
1621
+ scrollRightBoundary: Fe,
1622
+ scrollX: I,
1623
+ shouldApplyNewAnimation: b,
1608
1624
  visibleCardsCount: c
1609
1625
  }
1610
1626
  )
1611
1627
  ]
1612
1628
  }
1613
1629
  );
1614
- }, Mt = P(St), At = ({
1630
+ }, At = G(Mt), Ot = ({
1615
1631
  analyticsMetadata: i,
1616
- onCardClick: o,
1617
- posthog: t,
1618
- widthOverrides: l
1632
+ clientColorScheme: o,
1633
+ onCardClick: t,
1634
+ posthog: r,
1635
+ widthOverrides: n
1619
1636
  }) => {
1620
- const { carouselCopy: r } = H(), { onEvent: n } = $(), a = () => {
1621
- n && (n(S.ON_VIEW_MORE_CLICKED, i), o(), t?.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"));
1622
1639
  };
1623
- return r ? /* @__PURE__ */ y(
1624
- z,
1640
+ return l ? /* @__PURE__ */ v(
1641
+ K,
1625
1642
  {
1626
1643
  alignItems: "center",
1627
1644
  direction: "row",
@@ -1629,47 +1646,48 @@ const K = u.createContext(null), ht = ({
1629
1646
  spacing: 2,
1630
1647
  sx: {
1631
1648
  padding: 16,
1632
- width: l || void 0
1649
+ width: n || void 0
1633
1650
  },
1634
1651
  children: [
1635
1652
  /* @__PURE__ */ e(
1636
- Pe,
1653
+ Ge,
1637
1654
  {
1638
1655
  sx: {
1656
+ color: o?.primary_300,
1639
1657
  fontSize: 18,
1640
1658
  fontWeight: 700,
1641
1659
  lineHeight: "24px"
1642
1660
  },
1643
1661
  variant: "h3",
1644
- children: r.carousel_title
1662
+ children: l.carousel_title
1645
1663
  }
1646
1664
  ),
1647
1665
  /* @__PURE__ */ e(
1648
- Ze,
1666
+ Pe,
1649
1667
  {
1650
- endIcon: /* @__PURE__ */ e(ve, { size: 20 }),
1651
- onClick: a,
1668
+ endIcon: /* @__PURE__ */ e(Se, { size: 20 }),
1669
+ onClick: d,
1652
1670
  size: "small",
1653
- sx: (h) => ({
1654
- color: h.palette.primary.main
1655
- }),
1671
+ sx: {
1672
+ color: o?.primary_300
1673
+ },
1656
1674
  variant: "text",
1657
- children: r.view_all_insights_in_full_feed_cta_aria
1675
+ children: l.view_all_insights_in_full_feed_cta_aria
1658
1676
  }
1659
1677
  )
1660
1678
  ]
1661
1679
  }
1662
1680
  ) : /* @__PURE__ */ e(Ue, {});
1663
- }, Ot = P(At), Tt = ({
1681
+ }, Tt = G(Ot), Wt = ({
1664
1682
  heightOverrides: i,
1665
1683
  widthOverrides: o,
1666
1684
  children: t
1667
1685
  }) => {
1668
- const { carouselCopy: l } = H();
1686
+ const { carouselCopy: r } = k();
1669
1687
  return /* @__PURE__ */ e(
1670
1688
  U,
1671
1689
  {
1672
- "aria-label": l?.carousel_title,
1690
+ "aria-label": r?.carousel_title,
1673
1691
  "aria-roledescription": "carousel",
1674
1692
  role: "group",
1675
1693
  sx: {
@@ -1681,44 +1699,46 @@ const K = u.createContext(null), ht = ({
1681
1699
  children: t
1682
1700
  }
1683
1701
  );
1684
- }, Ve = ({
1702
+ }, He = ({
1685
1703
  ariaLabel: i,
1686
1704
  carouselSize: o,
1687
- heightOverrides: t,
1688
- onCardClick: l,
1689
- posthog: r,
1690
- showIcon: n,
1691
- showWithMargin: a,
1692
- variant: h,
1693
- widthOverrides: s
1705
+ clientColorScheme: t,
1706
+ heightOverrides: r,
1707
+ onCardClick: n,
1708
+ posthog: l,
1709
+ showIcon: a,
1710
+ showWithMargin: d,
1711
+ variant: p,
1712
+ widthOverrides: _
1694
1713
  }) => {
1695
- const { cardsCopy: _ } = H(), { onEvent: p } = $(), { onPageview: C } = De();
1714
+ const { cardsCopy: C } = k(), { onEvent: f } = Y(), { onPageview: h } = Le();
1696
1715
  u.useEffect(() => {
1697
- C(V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1716
+ h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1698
1717
  }, []);
1699
- const f = () => {
1700
- l && l(), p(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), r?.capture("clicked_insight", {
1718
+ const m = () => {
1719
+ n && n(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1701
1720
  template: "no_relevant_insights"
1702
1721
  });
1703
1722
  };
1704
1723
  return /* @__PURE__ */ e(
1705
- oe,
1724
+ re,
1706
1725
  {
1707
- actionText: _.micro_card_cta,
1726
+ actionText: C.micro_card_cta,
1708
1727
  ariaLabel: i,
1709
- description: _.no_relevant_insights_card_description,
1710
- heightOverrides: t,
1711
- icon: /* @__PURE__ */ e(xe, {}),
1728
+ description: C.no_relevant_insights_card_description,
1729
+ fontColors: { buttonColor: t?.primary_300 },
1730
+ heightOverrides: r,
1731
+ icon: /* @__PURE__ */ e(De, {}),
1712
1732
  isZeroState: !0,
1713
- onCardClick: f,
1714
- posthog: r,
1715
- showIcon: n,
1733
+ onCardClick: m,
1734
+ posthog: l,
1735
+ showIcon: a,
1716
1736
  style: {
1717
1737
  cardStyle: {
1718
1738
  card: {
1719
- height: `calc(${Le[o]}px - 44px)`,
1739
+ height: `calc(${Ne[o]}px - 44px)`,
1720
1740
  m: "0 auto",
1721
- width: a ? "calc(100% - 32px)" : "100%"
1741
+ width: d ? "calc(100% - 32px)" : "100%"
1722
1742
  },
1723
1743
  description: {
1724
1744
  WebkitLineClamp: 4
@@ -1728,40 +1748,40 @@ const K = u.createContext(null), ht = ({
1728
1748
  ml: 48
1729
1749
  }
1730
1750
  },
1731
- title: _.no_relevant_insights_card_title,
1732
- variant: h,
1733
- widthOverrides: s
1751
+ title: C.no_relevant_insights_card_title,
1752
+ variant: p,
1753
+ widthOverrides: _
1734
1754
  }
1735
1755
  );
1736
- }, li = P(Ve), He = ({
1756
+ }, li = G(He), ke = ({
1737
1757
  ariaLabel: i,
1738
1758
  carouselSize: o,
1739
1759
  heightOverrides: t,
1740
- onCardClick: l,
1741
- posthog: r,
1742
- showIcon: n,
1760
+ onCardClick: r,
1761
+ posthog: n,
1762
+ showIcon: l,
1743
1763
  showWithMargin: a,
1744
- variant: h,
1745
- widthOverrides: s
1764
+ variant: d,
1765
+ widthOverrides: p
1746
1766
  }) => {
1747
- const { onPageview: _ } = De(), { zeroStateCopy: p } = H();
1767
+ const { onPageview: _ } = Le(), { zeroStateCopy: C } = k();
1748
1768
  return u.useEffect(() => {
1749
- _(V.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1769
+ _(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1750
1770
  }, []), /* @__PURE__ */ e(
1751
- oe,
1771
+ re,
1752
1772
  {
1753
1773
  ariaLabel: i,
1754
- description: p.carousel_zero_state_description,
1774
+ description: C.carousel_zero_state_description,
1755
1775
  heightOverrides: t,
1756
- icon: /* @__PURE__ */ e(xe, {}),
1776
+ icon: /* @__PURE__ */ e(De, {}),
1757
1777
  isZeroState: !0,
1758
- onCardClick: l,
1759
- posthog: r,
1760
- showIcon: n,
1778
+ onCardClick: r,
1779
+ posthog: n,
1780
+ showIcon: l,
1761
1781
  style: {
1762
1782
  cardStyle: {
1763
1783
  card: {
1764
- height: `calc(${Le[o]}px - 44px)`,
1784
+ height: `calc(${Ne[o]}px - 44px)`,
1765
1785
  m: "0 auto",
1766
1786
  width: a ? "calc(100% - 32px)" : "100%"
1767
1787
  },
@@ -1770,12 +1790,12 @@ const K = u.createContext(null), ht = ({
1770
1790
  }
1771
1791
  }
1772
1792
  },
1773
- title: p.carousel_zero_state_title,
1774
- variant: h,
1775
- widthOverrides: s
1793
+ title: C.carousel_zero_state_title,
1794
+ variant: d,
1795
+ widthOverrides: p
1776
1796
  }
1777
1797
  );
1778
- }, ri = P(He), Wt = () => /* @__PURE__ */ e(
1798
+ }, ni = G(ke), wt = () => /* @__PURE__ */ e(
1779
1799
  U,
1780
1800
  {
1781
1801
  sx: {
@@ -1785,142 +1805,148 @@ const K = u.createContext(null), ht = ({
1785
1805
  justifyContent: "center",
1786
1806
  width: "100%"
1787
1807
  },
1788
- children: /* @__PURE__ */ e(Qe, {})
1808
+ children: /* @__PURE__ */ e(qe, {})
1789
1809
  }
1790
- ), N = new dt(), wt = ({
1810
+ ), V = new ht(), xt = ({
1791
1811
  allowSingleCardPeeking: i,
1792
1812
  areBeatsLoading: o,
1793
1813
  beats: t = [],
1794
1814
  // This also determines the length of the carousel controls (beat.length + 1)
1795
- showCTAColocatedWithText: l = !0,
1796
- endpoint: r = "/",
1797
- heightOverrides: n,
1798
- logOutUser: a,
1799
- onCardClick: h = () => {
1815
+ clientColorScheme: r,
1816
+ // Allows certain icons, view all and read more button to reflect the clients color scheme. Currently only supports primary_300
1817
+ showCTAColocatedWithText: n = !0,
1818
+ endpoint: l = "/",
1819
+ heightOverrides: a,
1820
+ logOutUser: d,
1821
+ onCardClick: p = () => {
1800
1822
  },
1801
- onEvent: s = () => {
1823
+ onEvent: _ = () => {
1802
1824
  },
1803
- onPageview: _ = () => {
1825
+ onPageview: C = () => {
1804
1826
  },
1805
- posthog: p,
1806
- shouldApplyNewAnimation: C = !1,
1807
- showBorder: f = !0,
1827
+ posthog: f,
1828
+ shouldApplyNewAnimation: h = !1,
1829
+ showBorder: m = !0,
1808
1830
  showCarouselControls: c,
1809
1831
  showHeader: E,
1810
- showIcon: m,
1811
- showWithMargin: g = !0,
1812
- token: w = "",
1813
- useDarkMode: A,
1814
- userHasFullInsightFeedBeats: I,
1815
- variant: k,
1816
- visibleCardsCount: b = 1,
1817
- widthOverrides: R
1832
+ showIcon: R,
1833
+ showWithMargin: I = !0,
1834
+ token: x = "",
1835
+ useDarkMode: O,
1836
+ userHasFullInsightFeedBeats: y,
1837
+ variant: F,
1838
+ visibleCardsCount: z = 1,
1839
+ widthOverrides: g
1818
1840
  }) => {
1819
- const [x, G] = ee("STANDARD"), [F, Y] = ee(!1), [B, j] = ee(!1), le = Je([s], N), re = et([_], N);
1841
+ const [D, b] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
1820
1842
  u.useEffect(() => {
1821
- !N.isInitialized && !B && (N.initialize(r, w, a).catch(() => j(!1)), j(!0));
1822
- }, [r, w, a, N.isInitialized, B]), u.useEffect(() => {
1823
- const D = window.innerHeight;
1824
- D < 180 ? G("STANDARD") : D >= 180 && D < 200 ? G("LARGE") : D >= 200 && D < 248 ? G("XLARGE") : D >= 248 && G("XXLARGE");
1843
+ !V.isInitialized && !Z && (V.initialize(l, x, d).catch(() => X(!1)), X(!0));
1844
+ }, [l, x, d, V.isInitialized, Z]), u.useEffect(() => {
1845
+ const L = window.innerHeight;
1846
+ L < 180 ? b("STANDARD") : L >= 180 && L < 200 ? b("LARGE") : L >= 200 && L < 248 ? b("XLARGE") : L >= 248 && b("XXLARGE");
1825
1847
  }, [window.innerHeight]), u.useEffect(() => {
1826
- Y(!o && N.isInitialized);
1827
- }, [o, N.isInitialized]);
1828
- const X = {
1829
- showCTAColocatedWithText: l,
1830
- heightOverrides: n,
1831
- onCardClick: h,
1832
- posthog: p,
1833
- showIcon: m,
1834
- showWithMargin: g,
1835
- useDarkMode: A,
1836
- widthOverrides: R
1837
- }, Q = {
1838
- carouselSize: x,
1839
- variant: k,
1840
- ...X
1848
+ j(!o && V.isInitialized);
1849
+ }, [o, V.isInitialized]);
1850
+ const Q = {
1851
+ showCTAColocatedWithText: n,
1852
+ heightOverrides: a,
1853
+ onCardClick: p,
1854
+ posthog: f,
1855
+ showIcon: R,
1856
+ showWithMargin: I,
1857
+ useDarkMode: O,
1858
+ widthOverrides: g
1859
+ }, q = {
1860
+ carouselSize: D,
1861
+ variant: F,
1862
+ ...Q
1841
1863
  };
1842
- return /* @__PURE__ */ e(ht, { onEvent: le, onPageview: re, store: N, children: /* @__PURE__ */ y(Tt, { heightOverrides: n, widthOverrides: R, children: [
1843
- !F && /* @__PURE__ */ e(Wt, {}),
1844
- F && E && /* @__PURE__ */ e(
1845
- Ot,
1864
+ return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: g, children: [
1865
+ !B && /* @__PURE__ */ e(wt, {}),
1866
+ B && E && /* @__PURE__ */ e(
1867
+ Tt,
1846
1868
  {
1847
- analyticsMetadata: Ce,
1848
- onCardClick: h,
1849
- posthog: p,
1850
- widthOverrides: R
1869
+ analyticsMetadata: fe,
1870
+ clientColorScheme: r,
1871
+ onCardClick: p,
1872
+ posthog: f,
1873
+ widthOverrides: g
1851
1874
  }
1852
1875
  ),
1853
- F && !!t.length && /* @__PURE__ */ e(
1854
- Mt,
1876
+ B && !!t.length && /* @__PURE__ */ e(
1877
+ At,
1855
1878
  {
1856
1879
  allowSingleCardPeeking: i,
1857
- analyticsMetadata: Ce,
1880
+ analyticsMetadata: fe,
1858
1881
  beats: t,
1859
- shouldApplyNewAnimation: C,
1882
+ clientColorScheme: r,
1883
+ shouldApplyNewAnimation: h,
1860
1884
  showCarouselControls: c,
1861
- variant: f ? k : void 0,
1862
- visibleCardsCount: b,
1863
- ...X
1885
+ variant: m ? F : void 0,
1886
+ visibleCardsCount: z,
1887
+ ...Q
1864
1888
  }
1865
1889
  ),
1866
- F && !t.length && I && /* @__PURE__ */ e(Ve, { ...Q }),
1867
- F && !t.length && !I && /* @__PURE__ */ e(He, { ...Q })
1890
+ B && !t.length && y && /* @__PURE__ */ e(He, { clientColorScheme: r, ...q }),
1891
+ B && !t.length && !y && /* @__PURE__ */ e(ke, { ...q })
1868
1892
  ] }) });
1869
- }, ni = P(wt), xt = ({
1893
+ }, ai = G(xt), Dt = ({
1870
1894
  isActiveCard: i,
1871
1895
  ariaLabel: o,
1872
- heightOverrides: t,
1873
- onCardClick: l,
1874
- posthog: r,
1875
- showIcon: n,
1876
- variant: a,
1877
- widthOverrides: h
1896
+ clientColorScheme: t,
1897
+ heightOverrides: r,
1898
+ onCardClick: n,
1899
+ posthog: l,
1900
+ showIcon: a,
1901
+ variant: d,
1902
+ widthOverrides: p
1878
1903
  }) => {
1879
- const s = ce(), { ref: _, inView: p } = Se({
1880
- threshold: Ne
1881
- }), { cardsCopy: C } = H(), { onEvent: f } = $();
1882
- ie(() => {
1883
- p && (f(we.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1904
+ const _ = se(), { ref: C, inView: f } = Me({
1905
+ threshold: Ve
1906
+ }), { cardsCopy: h } = k(), { onEvent: m } = Y();
1907
+ oe(() => {
1908
+ f && (m(xe.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
1884
1909
  template: "view_more_card"
1885
1910
  }));
1886
- }, [p]);
1911
+ }, [f]);
1887
1912
  const c = () => {
1888
- l && l(), f(S.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1913
+ n && n(), m(M.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1889
1914
  template: "view_more_card"
1890
1915
  });
1891
1916
  };
1892
1917
  return /* @__PURE__ */ e(
1893
- oe,
1918
+ re,
1894
1919
  {
1895
- actionText: C.micro_card_cta,
1920
+ actionText: h.micro_card_cta,
1896
1921
  ariaLabel: o,
1897
- description: C.view_more_card_description,
1898
- heightOverrides: t,
1899
- icon: /* @__PURE__ */ e(Ct, { color: s.palette.primary.main }),
1922
+ description: h.view_more_card_description,
1923
+ fontColors: { buttonColor: t?.primary_300 },
1924
+ heightOverrides: r,
1925
+ icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? _.palette.primary.main }),
1900
1926
  isActiveCard: i,
1901
1927
  onCardClick: c,
1902
- posthog: r,
1903
- ref: _,
1904
- showIcon: n,
1905
- title: C.view_more_card_title,
1906
- variant: a,
1907
- widthOverrides: h
1928
+ posthog: l,
1929
+ ref: C,
1930
+ showIcon: a,
1931
+ title: h.view_more_card_title,
1932
+ variant: d,
1933
+ widthOverrides: p
1908
1934
  }
1909
1935
  );
1910
- }, Dt = P(xt);
1936
+ }, Lt = G(Dt);
1911
1937
  export {
1912
- dt as A,
1913
- yt as B,
1914
- Ot as C,
1915
- ht as I,
1916
- Mt as M,
1938
+ ht as A,
1939
+ vt as B,
1940
+ Tt as C,
1941
+ Et as I,
1942
+ At as M,
1917
1943
  li as N,
1918
- Ce as T,
1919
- Dt as V,
1920
- ri as Z,
1921
- oe as a,
1922
- ni as b,
1923
- Ct as c,
1924
- Rt as d,
1925
- xe as e
1944
+ fe as T,
1945
+ Lt as V,
1946
+ ni as Z,
1947
+ re as a,
1948
+ ai as b,
1949
+ ft as c,
1950
+ gt as d,
1951
+ De as e
1926
1952
  };