@mx-cartographer/experiences 9.7.173 → 9.7.175

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 (34) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/core/types/localization/InsightsFeedCopy.d.ts +20 -0
  3. package/dist/core/types/localization/index.d.ts +1 -1
  4. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +11 -0
  5. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +164 -0
  6. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -0
  7. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/index.d.ts +1 -0
  8. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/layout.d.ts +46 -0
  9. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/layout.es.js +58 -0
  10. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/layout.es.js.map +1 -0
  11. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +2 -1
  12. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +72 -56
  13. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  14. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.d.ts +7 -1
  15. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +84 -82
  16. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  17. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +4 -0
  18. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +169 -133
  19. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  20. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +2 -0
  21. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
  22. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +20 -14
  23. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js.map +1 -1
  24. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/QuizStars.es.js +238 -0
  25. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/QuizStars.es.js.map +1 -0
  26. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +3 -1
  27. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +7 -2
  28. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
  29. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
  30. package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
  31. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  32. package/dist/insights-v2/mappings/blocks.es.js +148 -140
  33. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  34. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- import { buildDynamicCopy as h } from "../../../core/utils/Localization.es.js";
2
- import { DATE_FORMATS_INTL as N, formatDate as O } from "../../../core/constants/DateFormats.es.js";
3
- import { TransactionStatus as Y } from "../../../core/types/Transaction.es.js";
1
+ import { buildDynamicCopy as g } from "../../../core/utils/Localization.es.js";
2
+ import { DATE_FORMATS_INTL as b, formatDate as T } from "../../../core/constants/DateFormats.es.js";
3
+ import { TransactionStatus as F } from "../../../core/types/Transaction.es.js";
4
4
  import { fromUnixUTC as L } from "../../../core/utils/DateUtil.es.js";
5
- import { CURRENCY_FORMAT as F } from "../../../core/utils/NumberFormatting.es.js";
6
- import { getCategoryColor as k } from "../../../core/utils/CategoryUtil.es.js";
7
- import { buildDataSeries as U } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
8
- import { asGuidList as A, asNonEmptyText as l, asNumber as b } from "../../blocks/slotReaders.es.js";
9
- import { getLayoutConfig as T } from "../../blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js";
10
- import V from "../../components/LogoMark.es.js";
11
- import { calendarDateOf as x, toDrillDownSlotData as W } from "./utils.es.js";
12
- import { Icon as B } from "@mxenabled/mx-icons";
13
- import { jsx as c } from "react/jsx-runtime";
14
- import { endOfMonth as M, fromUnixTime as z, isValid as E, parseISO as m, startOfMonth as I } from "date-fns";
5
+ import { CURRENCY_FORMAT as x } from "../../../core/utils/NumberFormatting.es.js";
6
+ import { getCategoryColor as V } from "../../../core/utils/CategoryUtil.es.js";
7
+ import { buildDataSeries as H } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
8
+ import { asGuidList as A, asNonEmptyText as c, asNumber as m } from "../../blocks/slotReaders.es.js";
9
+ import { getLayoutConfig as O } from "../../blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js";
10
+ import B from "../../components/LogoMark.es.js";
11
+ import { calendarDateOf as z, toDrillDownSlotData as W } from "./utils.es.js";
12
+ import { Icon as R } from "@mxenabled/mx-icons";
13
+ import { jsx as i } from "react/jsx-runtime";
14
+ import { endOfMonth as E, fromUnixTime as j, isValid as C, parseISO as h, startOfMonth as D } from "date-fns";
15
15
  var n = {
16
16
  TRANSACTION: "not_standard_amount",
17
17
  CATEGORY_SPEND: "category_spend",
@@ -26,169 +26,181 @@ var n = {
26
26
  DEPOSIT_SUMMARY: "monthly_deposit_summary",
27
27
  LOW_BALANCE: "low_balance",
28
28
  SUBSCRIPTION_AGGREGATE: "monthly_subscription_aggregate",
29
- MERCHANT_BUDGET: "merchant_budget"
30
- }, G = (t) => t.insights_feed?.general?.transaction_history_title ?? "", g = (t, e) => e && k(e, t) || t.palette.primary.main, f = (t) => typeof t == "string" ? m(t) : new Date(t ?? NaN), y = (t) => ({
31
- start: I(f(t)),
32
- end: M(f(t))
33
- }), w = (t) => t?.length ? { accounts: t } : {}, j = ({ beat: t }) => {
29
+ MERCHANT_BUDGET: "merchant_budget",
30
+ TOP_MERCHANT: "top_merchant"
31
+ }, G = (t) => t.insights_feed?.general?.transaction_history_title ?? "", d = (t, e) => e && V(e, t) || t.palette.primary.main, p = (t) => typeof t == "string" ? h(t) : new Date(t ?? NaN), v = (t) => ({
32
+ start: D(p(t)),
33
+ end: E(p(t))
34
+ }), P = (t) => t?.length ? { accounts: t } : {}, K = ({ beat: t }) => {
34
35
  const { account_guid: e, from_date: a, to_date: r } = t.insights_payload?.drilldown_data ?? {};
35
36
  return typeof e != "string" || typeof a != "number" || typeof r != "number" || !Number.isFinite(a) || !Number.isFinite(r) || r <= a ? {
36
37
  accounts: [],
37
38
  custom: () => !1
38
39
  } : {
39
40
  accounts: [e],
40
- custom: (o) => !o.is_hidden && o.feed_status !== Y.PENDING,
41
+ custom: (o) => !o.is_hidden && o.feed_status !== F.PENDING,
41
42
  showSplits: !0,
42
43
  dateRange: {
43
44
  start: L(a),
44
45
  end: L(r - 1)
45
46
  }
46
47
  };
47
- }, K = (t) => {
48
+ }, q = (t) => {
48
49
  const e = t?.drilldown_data ?? {};
49
50
  return {
50
51
  transaction_guids: A(e.transaction_guids),
51
- date: x(e.due_date),
52
- category_guid: l(e.category_guid),
53
- average_amount: b(e.average_amount),
54
- merchant_name: l(e.merchant_name)
52
+ date: z(e.due_date),
53
+ category_guid: c(e.category_guid),
54
+ average_amount: m(e.average_amount),
55
+ merchant_name: c(e.merchant_name)
55
56
  };
56
- }, _ = (t) => {
57
+ }, l = (t) => {
57
58
  const e = t;
58
59
  return Array.isArray(e?.names) && Array.isArray(e?.data) ? e : void 0;
59
- }, q = (t) => {
60
+ }, J = (t) => {
60
61
  const e = t?.drilldown_data ?? {};
61
62
  return {
62
63
  account_guids: A(e.account_guids),
63
- data_series: _(e.data_series),
64
- average_amount: b(e.average_amount)
64
+ data_series: l(e.data_series),
65
+ average_amount: m(e.average_amount)
65
66
  };
66
- }, J = (t) => {
67
+ }, Q = (t) => {
67
68
  const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data, r = t?.instance_slot_data;
68
69
  return {
69
- data_series: _(e.data_series),
70
- average_amount: b(e.average_amount),
71
- merchant_guid: l(a?.merchant_guid) ?? l(r?.merchant_guid),
72
- merchant_name: l(a?.merchant_name) ?? l(r?.merchant_name)
70
+ data_series: l(e.data_series),
71
+ average_amount: m(e.average_amount),
72
+ merchant_guid: c(a?.merchant_guid) ?? c(r?.merchant_guid),
73
+ merchant_name: c(a?.merchant_name) ?? c(r?.merchant_name)
73
74
  };
74
- }, P = ["income", "other"], Q = (t) => {
75
+ }, X = (t, e) => {
76
+ const a = e ?? {};
77
+ return {
78
+ data_series: l(a.data_series),
79
+ average_amount: m(a.average_amount),
80
+ category_guid: c(a.category_guid),
81
+ described_month: c(a.described_month),
82
+ merchant_guid: c(a.merchant_guid),
83
+ merchant_name: c(a.merchant_name),
84
+ rank: m(a.rank)
85
+ };
86
+ }, k = ["income", "other"], Z = (t) => {
75
87
  const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data?.legends?.map(({ label: r }) => r);
76
88
  return {
77
- data_series: _(e.data_series),
78
- average_amount: b(e.average_amount),
89
+ data_series: l(e.data_series),
90
+ average_amount: m(e.average_amount),
79
91
  income_transaction_guids: A(e.income_transaction_guids),
80
- sub_tab_labels: a?.length === P.length ? a : void 0
92
+ sub_tab_labels: a?.length === k.length ? a : void 0
81
93
  };
82
- }, X = 2, H = (t, e) => {
83
- const a = e ?? {}, r = _(a.series), o = Array.isArray(a.labels) ? a.labels.map(l) : [];
84
- return !r || o.length !== X || !o.every((s) => !!s) ? {} : {
94
+ }, $ = 2, Y = (t, e) => {
95
+ const a = e ?? {}, r = l(a.series), o = Array.isArray(a.labels) ? a.labels.map(c) : [];
96
+ return !r || o.length !== $ || !o.every((s) => !!s) ? {} : {
85
97
  data_series: r,
86
98
  legends: o.map((s) => ({
87
99
  label: s,
88
100
  value: 0
89
101
  }))
90
102
  };
91
- }, R = (t, e) => U(_(e?.series)).flatMap((a) => a.aggregated_guids ?? []), Z = (t, e) => {
103
+ }, U = (t, e) => H(l(e?.series)).flatMap((a) => a.aggregated_guids ?? []), tt = (t, e) => {
92
104
  const a = e.transaction_history_block?.monthly_debt_to_income_tip_message, r = e.transaction_history_block?.monthly_debt_to_income_tip_limit;
93
105
  if (!(!a || !r))
94
106
  return {
95
- message: h(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
107
+ message: g(a, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: r })),
96
108
  onDismiss: () => t(!0)
97
109
  };
98
- }, $ = (t, e) => {
99
- const a = H(t, e);
110
+ }, et = (t, e) => {
111
+ const a = Y(t, e);
100
112
  return a.data_series ? a : W(t?.instance_slot?.data ?? {});
101
- }, tt = (t, e) => {
113
+ }, at = (t, e) => {
102
114
  const a = e.transaction_history_block?.savings_to_income_tip_message, r = e.transaction_history_block?.savings_to_income_tip_percentage;
103
115
  if (!(!a || !r))
104
116
  return {
105
- message: h(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
117
+ message: g(a, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: r })),
106
118
  onDismiss: () => t(!0)
107
119
  };
108
- }, et = (t) => U(_(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), at = (t, e, a, r) => {
120
+ }, rt = (t) => H(l(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), ot = (t, e, a, r) => {
109
121
  const o = r?.merchant_name, s = r?.date;
110
122
  if (!o || !s) return;
111
- const i = e.transaction_history_block?.upcoming_bill_tip_message;
112
- if (i)
113
- return { message: h(i, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), o, O(m(s), N.FULL_MONTH_DAY)) };
114
- }, D = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
115
- const r = e[a], o = r?.guid, s = t.find((i) => i.guid === o)?.has_been_split;
123
+ const _ = e.transaction_history_block?.upcoming_bill_tip_message;
124
+ if (_)
125
+ return { message: g(_, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), o, T(h(s), b.FULL_MONTH_DAY)) };
126
+ }, M = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
127
+ const r = e[a], o = r?.guid, s = t.find((_) => _.guid === o)?.has_been_split;
116
128
  return {
117
- custom: (i) => i.guid === o,
118
- dateRange: y(r?.date),
129
+ custom: (_) => _.guid === o,
130
+ dateRange: v(r?.date),
119
131
  showSplits: !s
120
132
  };
121
- }, rt = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
133
+ }, st = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
122
134
  const r = t[e], o = a.category_guid ?? r?.guid;
123
135
  return {
124
136
  custom: (s) => s.category_guid === o || s.top_level_category_guid === o,
125
- dateRange: y(r?.date)
137
+ dateRange: v(r?.date)
126
138
  };
127
- }, ot = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: r }) => {
139
+ }, nt = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: r }) => {
128
140
  const o = t[e];
129
141
  return {
130
142
  custom: (s) => !!s.top_level_category_guid && a.includes(s.top_level_category_guid),
131
- dateRange: y(o?.date),
132
- ...w(r.account_guids)
143
+ dateRange: v(o?.date),
144
+ ...P(r.account_guids)
133
145
  };
134
- }, st = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
135
- const r = a.merchant_guid, o = m(t[e]?.date ?? "");
136
- return !r || !E(o) ? {
146
+ }, w = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
147
+ const r = a.merchant_guid, o = h(t[e]?.date ?? "");
148
+ return !r || !C(o) ? {
137
149
  accounts: [],
138
150
  custom: () => !1
139
151
  } : {
140
152
  custom: (s) => s.merchant_guid === r && !s.is_hidden,
141
153
  dateRange: {
142
- start: I(o),
143
- end: M(o)
154
+ start: D(o),
155
+ end: E(o)
144
156
  }
145
157
  };
146
- }, nt = (t) => typeof t == "number" ? z(t) : m(t ?? ""), it = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: r, instanceSlotData: o }) => {
147
- const s = e[a], { start: i, end: u } = y(s?.date), d = nt(t.created_at), p = o.account_guids, C = {
148
- start: i,
149
- end: r && E(d) && d < u ? d : u
158
+ }, it = (t) => typeof t == "number" ? j(t) : h(t ?? ""), ct = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: r, instanceSlotData: o }) => {
159
+ const s = e[a], { start: _, end: S } = v(s?.date), u = it(t.created_at), f = o.account_guids, I = {
160
+ start: _,
161
+ end: r && C(u) && u < S ? u : S
150
162
  };
151
- return p?.length ? {
152
- dateRange: C,
153
- accounts: p
163
+ return f?.length ? {
164
+ dateRange: I,
165
+ accounts: f
154
166
  } : {
155
- dateRange: C,
167
+ dateRange: I,
156
168
  accounts: [],
157
169
  custom: () => !1
158
170
  };
159
- }, v = (t, e, a) => {
160
- const r = new Set(t), o = m(e ?? "");
161
- return !r.size || !E(o) ? {
171
+ }, N = (t, e, a) => {
172
+ const r = new Set(t), o = h(e ?? "");
173
+ return !r.size || !C(o) ? {
162
174
  accounts: [],
163
175
  custom: () => !1
164
176
  } : {
165
177
  custom: (s) => r.has(s.guid),
166
178
  dateRange: {
167
- start: I(o),
168
- end: M(o)
179
+ start: D(o),
180
+ end: E(o)
169
181
  },
170
- ...w(a)
182
+ ...P(a)
171
183
  };
172
- }, ct = ({ beat: t, dataSeries: e, selectedIndex: a }) => v(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), S = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
184
+ }, _t = ({ beat: t, dataSeries: e, selectedIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), y = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
173
185
  const o = e[a];
174
- return v(r === 1 ? o?.comparisonGuids : o?.mainGuids, o?.date, t.account_guids);
175
- }, lt = ({ beat: t, dataSeries: e, subIndex: a }) => v(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), _t = (t) => {
176
- const { dataSeries: e, selectedIndex: a, subIndex: r, instanceSlotData: o } = t, s = e[a], i = new Set(o.income_transaction_guids), u = P[r] === "income", d = o.sub_tab_labels ? s?.aggregated_guids?.filter((p) => i.has(p) === u) : s?.aggregated_guids;
177
- return v(d, s?.date);
178
- }, Dt = {
186
+ return N(r === 1 ? o?.comparisonGuids : o?.mainGuids, o?.date, t.account_guids);
187
+ }, lt = ({ beat: t, dataSeries: e, subIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), dt = (t) => {
188
+ const { dataSeries: e, selectedIndex: a, subIndex: r, instanceSlotData: o } = t, s = e[a], _ = new Set(o.income_transaction_guids), S = k[r] === "income", u = o.sub_tab_labels ? s?.aggregated_guids?.filter((f) => _.has(f) === S) : s?.aggregated_guids;
189
+ return N(u, s?.date);
190
+ }, At = {
179
191
  [n.TRANSACTION]: {
180
192
  title: G,
181
193
  top: "singleBar",
182
194
  scope: "store",
183
195
  filterMode: "store",
184
- filterStrategy: D,
185
- colors: (t, e) => [g(t, e)],
196
+ filterStrategy: M,
197
+ colors: (t, e) => [d(t, e)],
186
198
  header: (t) => {
187
199
  const { title: e, subHeader: a } = t;
188
200
  return {
189
201
  heading: e,
190
202
  subHeadingText: a?.text || void 0,
191
- icon: /* @__PURE__ */ c(V, {
203
+ icon: /* @__PURE__ */ i(B, {
192
204
  logo: {
193
205
  ...a?.logo,
194
206
  merchant_name: a?.text ?? a?.logo?.merchant_name
@@ -198,21 +210,21 @@ var n = {
198
210
  };
199
211
  },
200
212
  tipSection: (t, e, a = "") => ({
201
- message: h(e.general.tip_section_message, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: a })),
213
+ message: g(e.general.tip_section_message, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: a })),
202
214
  onDismiss: () => t(!0)
203
215
  })
204
216
  },
205
217
  [n.CATEGORY_SPEND]: {
206
218
  top: "singleBar",
207
- averageFormat: F.whole,
208
- filterStrategy: rt,
219
+ averageFormat: x.whole,
220
+ filterStrategy: st,
209
221
  scope: "store",
210
222
  filterMode: "store",
211
- colors: (t, e) => [g(t, e)],
223
+ colors: (t, e) => [d(t, e)],
212
224
  header: (t) => ({
213
225
  heading: t.categoryName,
214
- subHeadingText: t.selectedDate && O(f(t.selectedDate), N.MONTH_LONG) || "",
215
- icon: /* @__PURE__ */ c(B, {
226
+ subHeadingText: t.selectedDate && T(p(t.selectedDate), b.MONTH_LONG) || "",
227
+ icon: /* @__PURE__ */ i(R, {
216
228
  color: "primary",
217
229
  name: "calendar_month",
218
230
  size: 16
@@ -221,7 +233,7 @@ var n = {
221
233
  },
222
234
  [n.MONTHLY_SPEND]: {
223
235
  top: "singleBar",
224
- filterStrategy: ot,
236
+ filterStrategy: nt,
225
237
  scope: "store",
226
238
  filterMode: "store",
227
239
  colors: (t) => [t.palette.chart.chart2 ?? t.palette.primary.main]
@@ -229,104 +241,127 @@ var n = {
229
241
  [n.ACCOUNT_BALANCE]: {
230
242
  title: (t, e) => e?.insights_payload?.title || void 0,
231
243
  top: "singleBar",
232
- filterStrategy: it,
233
- slotData: q,
244
+ filterStrategy: ct,
245
+ slotData: J,
234
246
  scope: "store",
235
247
  filterMode: "store",
236
248
  colors: (t) => [t.palette.success.main]
237
249
  },
238
250
  [n.UPCOMING_BILL]: {
239
251
  top: "upcomingBill",
240
- filterStrategy: D,
252
+ filterStrategy: M,
241
253
  scope: "beat",
242
254
  filterMode: "local",
243
- colors: (t, e) => [g(t, e)],
244
- slotData: K,
255
+ colors: (t, e) => [d(t, e)],
256
+ slotData: q,
245
257
  fetchMissingTransactions: (t) => t.insights_payload?.drilldown_data?.transaction_guids,
246
- tipSection: at
258
+ tipSection: ot
247
259
  },
248
260
  [n.DEPOSIT_SUMMARY]: {
249
261
  top: "singleBar",
250
- filterStrategy: _t,
262
+ filterStrategy: dt,
251
263
  scope: "store",
252
264
  filterMode: "store",
253
265
  colors: (t) => [t.palette.success.main],
254
- slotData: Q,
255
- fetchMissingTransactions: et,
266
+ slotData: Z,
267
+ fetchMissingTransactions: rt,
256
268
  subTabs: ({ instanceSlotData: t }) => t.sub_tab_labels ?? []
257
269
  },
258
270
  [n.LOW_BALANCE]: {
259
271
  top: "list",
260
- filterStrategy: j,
272
+ filterStrategy: K,
261
273
  scope: "store",
262
274
  filterMode: "store",
263
275
  colors: (t) => [t.palette.primary.main]
264
276
  },
265
277
  [n.SUBSCRIPTION_AGGREGATE]: {
266
278
  top: "monthTabs",
267
- filterStrategy: ct,
279
+ filterStrategy: _t,
268
280
  scope: "store",
269
281
  filterMode: "store",
270
282
  colors: (t) => [t.palette.primary.main]
271
283
  },
272
284
  [n.MERCHANT_BUDGET]: {
273
285
  top: "singleBar",
274
- filterStrategy: st,
275
- slotData: J,
286
+ filterStrategy: w,
287
+ slotData: Q,
276
288
  scope: "store",
277
289
  filterMode: "store",
278
290
  colors: (t) => [t.palette.chart.chart1 ?? t.palette.primary.main],
279
291
  header: (t) => ({
280
292
  heading: t.slotData?.merchant_name ?? t.title,
281
- subHeadingText: t.selectedDate && O(f(t.selectedDate), N.MONTH_LONG) || "",
282
- icon: /* @__PURE__ */ c(B, {
293
+ subHeadingText: t.selectedDate && T(p(t.selectedDate), b.MONTH_LONG) || "",
294
+ icon: /* @__PURE__ */ i(R, {
283
295
  color: "primary",
284
296
  name: "calendar_month",
285
297
  size: 16
286
298
  })
287
299
  })
288
300
  },
301
+ [n.TOP_MERCHANT]: {
302
+ top: "singleBar",
303
+ filterStrategy: w,
304
+ slotData: X,
305
+ scope: "store",
306
+ filterMode: "store",
307
+ colors: (t, e) => [d(t, e)],
308
+ header: ({ copy: t, slotData: e, title: a }) => {
309
+ const r = e?.merchant_name, o = t?.top_merchants, s = e?.described_month && T(p(e.described_month), b.MONTH_SHORT_YEAR) || "";
310
+ return {
311
+ heading: r && o?.merchant_spending ? g(o.merchant_spending, r) : r ?? a,
312
+ subHeadingText: e?.rank && o?.most_visited_merchant ? g(o.most_visited_merchant, String(e.rank), s) : s,
313
+ logo: e?.merchant_guid ? /* @__PURE__ */ i(B, {
314
+ logo: {
315
+ category_guid: e.category_guid,
316
+ merchant_guid: e.merchant_guid,
317
+ merchant_name: r
318
+ },
319
+ size: 40
320
+ }) : void 0
321
+ };
322
+ }
323
+ },
289
324
  [n.SPEND_TO_INCOME]: {
290
325
  top: "doubleBar",
291
- filterStrategy: S,
326
+ filterStrategy: y,
292
327
  scope: "store",
293
328
  filterMode: "store",
294
- colors: (t) => T(t, "spend_to_income")?.color ?? [],
329
+ colors: (t) => O(t, "spend_to_income")?.color ?? [],
295
330
  boldLabel: !0,
296
331
  subTabAriaLabels: (t) => [t.general.spend_transactions, t.general.income_transactions]
297
332
  },
298
333
  [n.COST_OF_LIVING]: {
299
334
  top: "doubleBar",
300
- filterStrategy: S,
335
+ filterStrategy: y,
301
336
  scope: "store",
302
337
  filterMode: "store",
303
- colors: (t, e) => [g(t, e), t.palette.chart.chart4 ?? t.palette.primary.main],
338
+ colors: (t, e) => [d(t, e), t.palette.chart.chart4 ?? t.palette.primary.main],
304
339
  subTabAriaLabels: (t) => [void 0, t.general.income_transactions]
305
340
  },
306
341
  [n.DEBT_TO_INCOME]: {
307
342
  title: (t) => t.insights_feed?.transaction_history_block?.monthly_debt_to_income_drawer_title ?? G(t),
308
343
  top: "doubleBar",
309
- filterStrategy: S,
344
+ filterStrategy: y,
310
345
  scope: "store",
311
346
  filterMode: "store",
312
- colors: (t) => T(t, "debt_to_income")?.color ?? [],
347
+ colors: (t) => O(t, "debt_to_income")?.color ?? [],
313
348
  boldLabel: !0,
314
349
  subTabAriaLabels: (t) => [void 0, t.general.income_transactions],
315
- slotData: H,
316
- fetchMissingTransactions: R,
317
- tipSection: Z
350
+ slotData: Y,
351
+ fetchMissingTransactions: U,
352
+ tipSection: tt
318
353
  },
319
354
  [n.SAVINGS_TO_INCOME]: {
320
355
  top: "doubleBar",
321
- filterStrategy: S,
356
+ filterStrategy: y,
322
357
  scope: "store",
323
358
  filterMode: "store",
324
- colors: (t) => T(t, "savings_to_income")?.color ?? [],
359
+ colors: (t) => O(t, "savings_to_income")?.color ?? [],
325
360
  boldLabel: !0,
326
361
  subTabAriaLabels: (t) => [t.general.savings_transactions, t.general.income_transactions],
327
- slotData: $,
328
- fetchMissingTransactions: R,
329
- tipSection: tt
362
+ slotData: et,
363
+ fetchMissingTransactions: U,
364
+ tipSection: at
330
365
  },
331
366
  [n.NON_ESSENTIAL_CATEGORY]: {
332
367
  top: "tabsOnly",
@@ -335,22 +370,23 @@ var n = {
335
370
  filterMode: "store",
336
371
  colors: (t) => [t.palette.primary.main]
337
372
  }
338
- }, At = {
373
+ }, Et = {
339
374
  top: "singleBar",
340
- filterStrategy: D,
375
+ filterStrategy: M,
341
376
  scope: "store",
342
377
  filterMode: "store",
343
- colors: (t, e) => [g(t, e)]
378
+ colors: (t, e) => [d(t, e)]
344
379
  };
345
380
  export {
346
381
  n as DRILLDOWN_VARIANTS,
347
- At as FALLBACK,
348
- Dt as layout,
349
- H as resolveDebtToIncomeSlotData,
350
- Q as resolveDepositSummarySlotData,
351
- J as resolveMerchantBudgetSlotData,
352
- q as resolveSavingsContributionsSlotData,
353
- K as resolveUpcomingBillSlotData
382
+ Et as FALLBACK,
383
+ At as layout,
384
+ Y as resolveDebtToIncomeSlotData,
385
+ Z as resolveDepositSummarySlotData,
386
+ Q as resolveMerchantBudgetSlotData,
387
+ J as resolveSavingsContributionsSlotData,
388
+ X as resolveTopMerchantSlotData,
389
+ q as resolveUpcomingBillSlotData
354
390
  };
355
391
 
356
392
  //# sourceMappingURL=layout.es.js.map