@mx-cartographer/experiences 8.2.3 → 8.2.4-alpha-ram1-bug-testing

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