@mx-cartographer/experiences 9.7.143 → 9.7.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +31 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +9 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +42 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.d.ts +13 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js +339 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/index.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.d.ts +41 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js +61 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/usePayoffStrategiesPrepare.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/usePayoffStrategiesPrepare.es.js +14 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/usePayoffStrategiesPrepare.es.js.map +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +47 -40
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
interface DynamicKeyValue {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
interface GeneralInsightsFeedCopy {
|
|
5
|
+
export interface GeneralInsightsFeedCopy {
|
|
6
6
|
decreased_text: string;
|
|
7
7
|
dismiss: string;
|
|
8
8
|
embedded_description: string;
|
|
@@ -51,6 +51,36 @@ interface GeneralInsightsFeedCopy {
|
|
|
51
51
|
subscribed?: string;
|
|
52
52
|
not_subscribed?: string;
|
|
53
53
|
undo?: string;
|
|
54
|
+
/** Debt Payoff Strategies drawer words (the pulse drawer's keys); optional until mrs_content ships them to every host. */
|
|
55
|
+
avalanche?: string;
|
|
56
|
+
snowball?: string;
|
|
57
|
+
debt_payoff_strategies?: string;
|
|
58
|
+
the_strategy?: string;
|
|
59
|
+
pros?: string;
|
|
60
|
+
cons?: string;
|
|
61
|
+
pay_off_debts_with_high_interest_rates_first?: string;
|
|
62
|
+
pay_off_debts_with_low_balances_first?: string;
|
|
63
|
+
fastest_way_to_eliminate_debt?: string;
|
|
64
|
+
costs_less_in_interest?: string;
|
|
65
|
+
takes_time_to_see_results?: string;
|
|
66
|
+
requires_patience_and_discipline?: string;
|
|
67
|
+
provides_small_wins_quickly?: string;
|
|
68
|
+
builds_momentum_to_pay_off_debts?: string;
|
|
69
|
+
takes_longer_to_pay_off_all_debts?: string;
|
|
70
|
+
may_cost_more_in_interest?: string;
|
|
71
|
+
how_to_get_started?: string;
|
|
72
|
+
step_one?: string;
|
|
73
|
+
step_two?: string;
|
|
74
|
+
step_three?: string;
|
|
75
|
+
make_minimum_monthly_payments_on_all_debt_accounts?: string;
|
|
76
|
+
when_possible_pay_extra_on_the_account_with_the_highest_interest_rate?: string;
|
|
77
|
+
when_possible_pay_extra_on_the_account_with_the_lowest_balance?: string;
|
|
78
|
+
when_paid_off_move_to_the_next_debt_with_the_highest?: string;
|
|
79
|
+
when_paid_off_move_to_the_next_debt_with_the_lowest?: string;
|
|
80
|
+
highest_to_lowest_rate?: string;
|
|
81
|
+
lowest_to_highest_balance?: string;
|
|
82
|
+
balance?: string;
|
|
83
|
+
interest_rate?: string;
|
|
54
84
|
}
|
|
55
85
|
interface SettingsMenuCopy {
|
|
56
86
|
close: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionBlockProps } from '../../mappings/blocks';
|
|
2
|
+
/**
|
|
3
|
+
* Debt Payoff Strategies drawer: Avalanche / Snowball tabs, each with the strategy's words and the
|
|
4
|
+
* beat's debt accounts in that strategy's order. A tapped account opens its Account Details (the
|
|
5
|
+
* shared AccountDetailsBlock) in a nested drawer.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PayoffStrategiesBlock: (({ beat, }: ActionBlockProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useAccountStore as d, useGlobalCopyStore as g, useGlobalStore as y } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import S from "../../../common/components/drawer/Drawer.es.js";
|
|
3
|
+
import i from "../../../common/components/Loader.es.js";
|
|
4
|
+
import { AccountDetailsBlock as A } from "../AccountDetailsBlock/AccountDetailsBlock.es.js";
|
|
5
|
+
import { buildStrategies as _, resolveStrategyAccounts as C, toPayoffAccountRow as h } from "./layout.es.js";
|
|
6
|
+
import b from "./PayoffStrategiesContent.es.js";
|
|
7
|
+
import { useState as k } from "react";
|
|
8
|
+
import { observer as v } from "mobx-react-lite";
|
|
9
|
+
import w from "@mui/material/Stack";
|
|
10
|
+
import { Text as x } from "@mxenabled/mxui";
|
|
11
|
+
import { Fragment as G, jsx as o, jsxs as P } from "react/jsx-runtime";
|
|
12
|
+
var E = v(function({ beat: r }) {
|
|
13
|
+
const [t, c] = k(null), { copyStore: s } = y(), { accounts: n, common: a, insights_feed: l } = g(), { accountsLoaded: m, visibleAccounts: u } = d(), e = l?.general;
|
|
14
|
+
if (!s.isInitialized) return /* @__PURE__ */ o(i, {});
|
|
15
|
+
if (!e) return /* @__PURE__ */ o(w, {
|
|
16
|
+
sx: { p: 24 },
|
|
17
|
+
children: /* @__PURE__ */ o(x, { children: a?.error_message ?? "Something went wrong." })
|
|
18
|
+
});
|
|
19
|
+
if (!m) return /* @__PURE__ */ o(i, {});
|
|
20
|
+
const p = C(r, u).map(h), f = () => c(null);
|
|
21
|
+
return /* @__PURE__ */ P(G, { children: [/* @__PURE__ */ o(b, {
|
|
22
|
+
accounts: p,
|
|
23
|
+
copy: e,
|
|
24
|
+
onAccountClick: c,
|
|
25
|
+
strategies: _(e)
|
|
26
|
+
}), /* @__PURE__ */ o(S, {
|
|
27
|
+
ariaLabelClose: n?.close_account_details_aria,
|
|
28
|
+
isOpen: t !== null,
|
|
29
|
+
onClose: f,
|
|
30
|
+
title: n?.account_details,
|
|
31
|
+
children: t && /* @__PURE__ */ o(A, { beat: {
|
|
32
|
+
...r,
|
|
33
|
+
primary_account: void 0,
|
|
34
|
+
primary_account_guid: t
|
|
35
|
+
} })
|
|
36
|
+
})] });
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
E as PayoffStrategiesBlock
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=PayoffStrategiesBlock.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayoffStrategiesBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n Loader,\n useAccountStore,\n useGlobalCopyStore,\n useGlobalStore,\n} from '../../../common'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { AccountDetailsBlock } from '../AccountDetailsBlock'\n\nimport PayoffStrategiesContent from './PayoffStrategiesContent'\nimport { buildStrategies, resolveStrategyAccounts, toPayoffAccountRow } from './layout'\n\n/**\n * Debt Payoff Strategies drawer: Avalanche / Snowball tabs, each with the strategy's words and the\n * beat's debt accounts in that strategy's order. A tapped account opens its Account Details (the\n * shared AccountDetailsBlock) in a nested drawer.\n */\nexport const PayoffStrategiesBlock = observer(function PayoffStrategiesBlock({\n beat,\n}: ActionBlockProps) {\n const [tappedAccountGuid, setTappedAccountGuid] = useState<string | null>(null)\n const { copyStore } = useGlobalStore()\n const {\n accounts: accountsCopy,\n common: commonCopy,\n insights_feed: insightsFeedCopy,\n } = useGlobalCopyStore()\n const { accountsLoaded, visibleAccounts } = useAccountStore()\n const copy = insightsFeedCopy?.general\n\n if (!copyStore.isInitialized) return <Loader />\n\n // Copy loads once at app start, so a retry cannot clear a missing namespace: a plain message.\n if (!copy) {\n return (\n <Stack sx={{ p: 24 }}>\n <Text>{commonCopy?.error_message ?? 'Something went wrong.'}</Text>\n </Stack>\n )\n }\n\n if (!accountsLoaded) return <Loader />\n\n const rows = resolveStrategyAccounts(beat, visibleAccounts).map(toPayoffAccountRow)\n const closeAccountDetails = () => setTappedAccountGuid(null)\n\n return (\n <>\n <PayoffStrategiesContent\n accounts={rows}\n copy={copy}\n onAccountClick={setTappedAccountGuid}\n strategies={buildStrategies(copy)}\n />\n <Drawer\n ariaLabelClose={accountsCopy?.close_account_details_aria}\n isOpen={tappedAccountGuid !== null}\n onClose={closeAccountDetails}\n title={accountsCopy?.account_details}\n >\n {tappedAccountGuid && (\n // The shared block shows the beat's account, so hand it the tapped one instead.\n <AccountDetailsBlock\n beat={{ ...beat, primary_account: undefined, primary_account_guid: tappedAccountGuid }}\n />\n )}\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;AAyBA,IAAa,IAAwB,EAAS,SAA+B,EAC3E,MAAA,EAAA,GACmB;AACnB,QAAM,CAAC,GAAmB,CAAA,IAAwB,EAAwB,IAAI,GACxE,EAAE,WAAA,EAAA,IAAc,EAAe,GAC/B,EACJ,UAAU,GACV,QAAQ,GACR,eAAe,EAAA,IACb,EAAmB,GACjB,EAAE,gBAAA,GAAgB,iBAAA,EAAA,IAAoB,EAAgB,GACtD,IAAO,GAAkB;AAE/B,MAAI,CAAC,EAAU,cAAe,QAAO,gBAAA,EAAC,GAAD,CAAS,CAAA;AAG9C,MAAI,CAAC,EACH,QACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,GAAG,GAAG;AAAA,IACjB,UAAA,gBAAA,EAAC,GAAD,EAAA,UAAO,GAAY,iBAAiB,wBAA8B,CAAA;AAAA,EAC7D,CAAA;AAIX,MAAI,CAAC,EAAgB,QAAO,gBAAA,EAAC,GAAD,CAAS,CAAA;AAErC,QAAM,IAAO,EAAwB,GAAM,CAAe,EAAE,IAAI,CAAkB,GAC5E,IAAA,MAA4B,EAAqB,IAAI;AAE3D,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,UAAU;AAAA,IACJ,MAAA;AAAA,IACN,gBAAgB;AAAA,IAChB,YAAY,EAAgB,CAAI;AAAA,EACjC,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,GAAc;AAAA,IAC9B,QAAQ,MAAsB;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO,GAAc;AAAA,IAEpB,UAAA,KAEC,gBAAA,EAAC,GAAD,EACE,MAAM;AAAA,MAAE,GAAG;AAAA,MAAM,iBAAiB;AAAA,MAAW,sBAAsB;AAAA,IAAkB,EACtF,CAAA;AAAA,EAEG,CAAA,CACR,EAAA,CAAA;AAEN,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GeneralInsightsFeedCopy } from '../../../core/types/localization/InsightsFeedCopy';
|
|
2
|
+
import { PayoffAccountRow, PayoffStrategy } from './layout';
|
|
3
|
+
export interface PayoffStrategiesContentProps {
|
|
4
|
+
copy: GeneralInsightsFeedCopy;
|
|
5
|
+
strategies: PayoffStrategy[];
|
|
6
|
+
/** The beat's debt accounts, unordered; each tab orders them its own way. */
|
|
7
|
+
accounts: PayoffAccountRow[];
|
|
8
|
+
/** Tapping an account row opens its Account Details; rows are static without it. */
|
|
9
|
+
onAccountClick?: (accountGuid: string) => void;
|
|
10
|
+
}
|
|
11
|
+
/** Presentational body of the Debt Payoff Strategies drawer, minus the drawer header. */
|
|
12
|
+
declare const PayoffStrategiesContent: ({ accounts, copy, onAccountClick, strategies, }: PayoffStrategiesContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export default PayoffStrategiesContent;
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { DEFAULT_INSTITUTION_LOGO_URL as T } from "../../../core/constants/InstitutionLogo.es.js";
|
|
2
|
+
import { formatCurrency as I } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { SubTabs as k, subTabPanelProps as D } from "../../components/SubTabs.es.js";
|
|
4
|
+
import { orderAccounts as w } from "./layout.es.js";
|
|
5
|
+
import { useRef as C, useState as S } from "react";
|
|
6
|
+
import o from "@mui/material/Stack";
|
|
7
|
+
import { InstitutionLogo as R, Text as d } from "@mxenabled/mxui";
|
|
8
|
+
import { Icon as u } from "@mxenabled/mx-icons";
|
|
9
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
10
|
+
import x from "@mui/material/Box";
|
|
11
|
+
import f from "@mui/material/IconButton";
|
|
12
|
+
import L from "@mui/material/Divider";
|
|
13
|
+
import A from "@mui/material/ButtonBase";
|
|
14
|
+
var _ = {
|
|
15
|
+
bgcolor: "background.paper",
|
|
16
|
+
border: "1px solid",
|
|
17
|
+
borderColor: "divider",
|
|
18
|
+
borderRadius: 1
|
|
19
|
+
}, g = ({ children: l }) => /* @__PURE__ */ e(d, {
|
|
20
|
+
color: "text.secondary",
|
|
21
|
+
component: "h3",
|
|
22
|
+
sx: {
|
|
23
|
+
letterSpacing: 0.5,
|
|
24
|
+
textTransform: "uppercase"
|
|
25
|
+
},
|
|
26
|
+
variant: "caption",
|
|
27
|
+
children: l
|
|
28
|
+
}), v = ({ items: l, kind: t, title: s }) => /* @__PURE__ */ n(o, {
|
|
29
|
+
component: "section",
|
|
30
|
+
sx: {
|
|
31
|
+
..._,
|
|
32
|
+
flex: 1,
|
|
33
|
+
gap: 12,
|
|
34
|
+
p: 16
|
|
35
|
+
},
|
|
36
|
+
children: [/* @__PURE__ */ e(d, {
|
|
37
|
+
bold: !0,
|
|
38
|
+
component: "h4",
|
|
39
|
+
variant: "body1",
|
|
40
|
+
children: s
|
|
41
|
+
}), /* @__PURE__ */ e(o, {
|
|
42
|
+
component: "ul",
|
|
43
|
+
sx: {
|
|
44
|
+
gap: 12,
|
|
45
|
+
listStyle: "none",
|
|
46
|
+
m: 0,
|
|
47
|
+
p: 0
|
|
48
|
+
},
|
|
49
|
+
children: l.map((c) => /* @__PURE__ */ n(o, {
|
|
50
|
+
component: "li",
|
|
51
|
+
sx: {
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
gap: 6
|
|
54
|
+
},
|
|
55
|
+
children: [/* @__PURE__ */ e(u, {
|
|
56
|
+
color: t === "pros" ? "success" : "error",
|
|
57
|
+
name: t === "pros" ? "check_circle" : "cancel",
|
|
58
|
+
size: 16,
|
|
59
|
+
sx: {
|
|
60
|
+
flexShrink: 0,
|
|
61
|
+
mt: 2
|
|
62
|
+
}
|
|
63
|
+
}), /* @__PURE__ */ e(d, {
|
|
64
|
+
variant: "body2",
|
|
65
|
+
children: c
|
|
66
|
+
})]
|
|
67
|
+
}, c))
|
|
68
|
+
})]
|
|
69
|
+
}), G = 172, y = "—", P = ({ steps: l }) => {
|
|
70
|
+
const [t, s] = S(0), c = C(null), i = (a) => {
|
|
71
|
+
const r = Math.min(Math.max(a, 0), l.length - 1);
|
|
72
|
+
s(r), c.current?.scrollTo({
|
|
73
|
+
behavior: "smooth",
|
|
74
|
+
left: r * 184
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
return l.length ? /* @__PURE__ */ n(o, {
|
|
78
|
+
sx: { gap: 16 },
|
|
79
|
+
children: [/* @__PURE__ */ e(x, {
|
|
80
|
+
component: "ol",
|
|
81
|
+
ref: c,
|
|
82
|
+
sx: {
|
|
83
|
+
display: "flex",
|
|
84
|
+
flexDirection: "row",
|
|
85
|
+
gap: 12,
|
|
86
|
+
listStyle: "none",
|
|
87
|
+
m: 0,
|
|
88
|
+
overflowX: "auto",
|
|
89
|
+
p: 0,
|
|
90
|
+
scrollSnapType: "x mandatory",
|
|
91
|
+
scrollbarWidth: "none",
|
|
92
|
+
"&::-webkit-scrollbar": { display: "none" }
|
|
93
|
+
},
|
|
94
|
+
children: l.map((a) => /* @__PURE__ */ n(o, {
|
|
95
|
+
component: "li",
|
|
96
|
+
sx: {
|
|
97
|
+
..._,
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
flexShrink: 0,
|
|
100
|
+
gap: 16,
|
|
101
|
+
p: 16,
|
|
102
|
+
scrollSnapAlign: "start",
|
|
103
|
+
textAlign: "center",
|
|
104
|
+
width: G
|
|
105
|
+
},
|
|
106
|
+
children: [/* @__PURE__ */ e(u, {
|
|
107
|
+
color: "action",
|
|
108
|
+
name: a.icon,
|
|
109
|
+
size: 48
|
|
110
|
+
}), /* @__PURE__ */ n(o, {
|
|
111
|
+
sx: { gap: 4 },
|
|
112
|
+
children: [/* @__PURE__ */ e(d, {
|
|
113
|
+
bold: !0,
|
|
114
|
+
sx: { textTransform: "uppercase" },
|
|
115
|
+
variant: "caption",
|
|
116
|
+
children: a.caption
|
|
117
|
+
}), /* @__PURE__ */ e(d, {
|
|
118
|
+
color: "text.secondary",
|
|
119
|
+
variant: "body2",
|
|
120
|
+
children: a.text
|
|
121
|
+
})]
|
|
122
|
+
})]
|
|
123
|
+
}, a.caption + a.text))
|
|
124
|
+
}), /* @__PURE__ */ n(o, {
|
|
125
|
+
sx: {
|
|
126
|
+
alignItems: "center",
|
|
127
|
+
flexDirection: "row",
|
|
128
|
+
gap: 16,
|
|
129
|
+
justifyContent: "center"
|
|
130
|
+
},
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ e(f, {
|
|
133
|
+
"aria-label": "previous",
|
|
134
|
+
disabled: t === 0,
|
|
135
|
+
onClick: () => i(t - 1),
|
|
136
|
+
children: /* @__PURE__ */ e(u, {
|
|
137
|
+
name: "chevron_left",
|
|
138
|
+
size: 20
|
|
139
|
+
})
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ e(o, {
|
|
142
|
+
"aria-hidden": "true",
|
|
143
|
+
sx: {
|
|
144
|
+
alignItems: "center",
|
|
145
|
+
flexDirection: "row",
|
|
146
|
+
gap: 4
|
|
147
|
+
},
|
|
148
|
+
children: l.map((a, r) => /* @__PURE__ */ e(x, { sx: {
|
|
149
|
+
bgcolor: r === t ? "primary.main" : "action.disabled",
|
|
150
|
+
borderRadius: 3,
|
|
151
|
+
height: 6,
|
|
152
|
+
width: r === t ? 20 : 6
|
|
153
|
+
} }, a.caption + a.text))
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ e(f, {
|
|
156
|
+
"aria-label": "next",
|
|
157
|
+
disabled: t === l.length - 1,
|
|
158
|
+
onClick: () => i(t + 1),
|
|
159
|
+
children: /* @__PURE__ */ e(u, {
|
|
160
|
+
color: "primary",
|
|
161
|
+
name: "chevron_right",
|
|
162
|
+
size: 20
|
|
163
|
+
})
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
})]
|
|
167
|
+
}) : null;
|
|
168
|
+
}, z = ({ balanceLabel: l, isLast: t, onClick: s, rateLabel: c, row: i, sortKey: a }) => {
|
|
169
|
+
const r = {
|
|
170
|
+
label: c,
|
|
171
|
+
value: i.interestRate === null ? y : `${i.interestRate}%`
|
|
172
|
+
}, m = {
|
|
173
|
+
label: l,
|
|
174
|
+
value: i.balance === null ? y : I(i.balance, "0,0.00")
|
|
175
|
+
}, p = a === "rate" ? [r, m] : [m, r];
|
|
176
|
+
return /* @__PURE__ */ n(x, {
|
|
177
|
+
component: "li",
|
|
178
|
+
sx: { position: "relative" },
|
|
179
|
+
children: [/* @__PURE__ */ n(o, {
|
|
180
|
+
component: s ? A : "div",
|
|
181
|
+
onClick: s,
|
|
182
|
+
sx: {
|
|
183
|
+
alignItems: "flex-start",
|
|
184
|
+
flexDirection: "row",
|
|
185
|
+
gap: 12,
|
|
186
|
+
px: 24,
|
|
187
|
+
py: 16,
|
|
188
|
+
textAlign: "left",
|
|
189
|
+
width: "100%",
|
|
190
|
+
...s && {
|
|
191
|
+
"&:hover": { bgcolor: "action.hover" },
|
|
192
|
+
"&.Mui-focusVisible": { bgcolor: "action.focus" }
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
children: [/* @__PURE__ */ e(x, {
|
|
196
|
+
sx: {
|
|
197
|
+
display: "flex",
|
|
198
|
+
flexShrink: 0,
|
|
199
|
+
height: 32,
|
|
200
|
+
width: 32
|
|
201
|
+
},
|
|
202
|
+
children: /* @__PURE__ */ e(R, {
|
|
203
|
+
alt: "",
|
|
204
|
+
institutionGuid: i.institutionGuid,
|
|
205
|
+
logoUrl: i.institutionGuid ? void 0 : T,
|
|
206
|
+
size: 32
|
|
207
|
+
})
|
|
208
|
+
}), /* @__PURE__ */ n(o, {
|
|
209
|
+
sx: {
|
|
210
|
+
flexGrow: 1,
|
|
211
|
+
gap: 4,
|
|
212
|
+
minWidth: 0
|
|
213
|
+
},
|
|
214
|
+
children: [/* @__PURE__ */ e(d, {
|
|
215
|
+
bold: !0,
|
|
216
|
+
truncate: !0,
|
|
217
|
+
variant: "body1",
|
|
218
|
+
children: i.name
|
|
219
|
+
}), p.map((h, b) => /* @__PURE__ */ n(o, {
|
|
220
|
+
sx: {
|
|
221
|
+
flexDirection: "row",
|
|
222
|
+
gap: 12,
|
|
223
|
+
justifyContent: "space-between"
|
|
224
|
+
},
|
|
225
|
+
children: [/* @__PURE__ */ e(d, {
|
|
226
|
+
color: "text.secondary",
|
|
227
|
+
variant: "caption",
|
|
228
|
+
children: h.label
|
|
229
|
+
}), /* @__PURE__ */ e(d, {
|
|
230
|
+
bold: b === 0,
|
|
231
|
+
color: b === 0 ? "text.primary" : "text.secondary",
|
|
232
|
+
sx: { fontVariantNumeric: "tabular-nums" },
|
|
233
|
+
variant: "caption",
|
|
234
|
+
children: h.value
|
|
235
|
+
})]
|
|
236
|
+
}, h.label))]
|
|
237
|
+
})]
|
|
238
|
+
}), /* @__PURE__ */ e(L, { sx: {
|
|
239
|
+
bottom: 0,
|
|
240
|
+
left: t ? 0 : 68,
|
|
241
|
+
position: "absolute",
|
|
242
|
+
right: 0
|
|
243
|
+
} })]
|
|
244
|
+
});
|
|
245
|
+
}, $ = ({ accounts: l, copy: t, onAccountClick: s, strategies: c }) => {
|
|
246
|
+
const [i, a] = S(0), r = c[i] ?? c[0];
|
|
247
|
+
if (!r) return null;
|
|
248
|
+
const m = w(l, r.sortKey);
|
|
249
|
+
return /* @__PURE__ */ n(o, {
|
|
250
|
+
sx: {
|
|
251
|
+
bgcolor: "background.default",
|
|
252
|
+
pb: 24
|
|
253
|
+
},
|
|
254
|
+
children: [/* @__PURE__ */ e(k, {
|
|
255
|
+
id: "payoff-strategies",
|
|
256
|
+
isTypeFilter: !1,
|
|
257
|
+
onChange: a,
|
|
258
|
+
selectedIndex: i,
|
|
259
|
+
tabs: c.map(({ label: p }) => ({ label: p }))
|
|
260
|
+
}), /* @__PURE__ */ n(o, {
|
|
261
|
+
...D("payoff-strategies", i),
|
|
262
|
+
sx: { gap: 12 },
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ n(o, {
|
|
265
|
+
component: "section",
|
|
266
|
+
sx: {
|
|
267
|
+
bgcolor: "background.paper",
|
|
268
|
+
gap: 16,
|
|
269
|
+
p: 24
|
|
270
|
+
},
|
|
271
|
+
children: [/* @__PURE__ */ n(o, {
|
|
272
|
+
sx: { gap: 4 },
|
|
273
|
+
children: [t.the_strategy && /* @__PURE__ */ e(g, { children: t.the_strategy }), /* @__PURE__ */ e(d, {
|
|
274
|
+
component: "p",
|
|
275
|
+
variant: "body1",
|
|
276
|
+
children: r.description
|
|
277
|
+
})]
|
|
278
|
+
}), /* @__PURE__ */ n(o, {
|
|
279
|
+
sx: {
|
|
280
|
+
flexDirection: "row",
|
|
281
|
+
gap: 12
|
|
282
|
+
},
|
|
283
|
+
children: [/* @__PURE__ */ e(v, {
|
|
284
|
+
items: r.pros,
|
|
285
|
+
kind: "pros",
|
|
286
|
+
title: t.pros ?? ""
|
|
287
|
+
}), /* @__PURE__ */ e(v, {
|
|
288
|
+
items: r.cons,
|
|
289
|
+
kind: "cons",
|
|
290
|
+
title: t.cons ?? ""
|
|
291
|
+
})]
|
|
292
|
+
})]
|
|
293
|
+
}),
|
|
294
|
+
r.steps.length > 0 && /* @__PURE__ */ n(o, {
|
|
295
|
+
component: "section",
|
|
296
|
+
sx: {
|
|
297
|
+
gap: 16,
|
|
298
|
+
px: 24,
|
|
299
|
+
py: 24
|
|
300
|
+
},
|
|
301
|
+
children: [t.how_to_get_started && /* @__PURE__ */ e(g, { children: t.how_to_get_started }), /* @__PURE__ */ e(P, { steps: r.steps }, r.key)]
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ n(o, {
|
|
304
|
+
component: "section",
|
|
305
|
+
sx: {
|
|
306
|
+
gap: 16,
|
|
307
|
+
pt: 12
|
|
308
|
+
},
|
|
309
|
+
children: [/* @__PURE__ */ e(x, {
|
|
310
|
+
sx: { px: 24 },
|
|
311
|
+
children: /* @__PURE__ */ e(g, { children: r.orderHeader })
|
|
312
|
+
}), /* @__PURE__ */ e(o, {
|
|
313
|
+
"aria-label": r.orderHeader,
|
|
314
|
+
component: "ul",
|
|
315
|
+
sx: {
|
|
316
|
+
bgcolor: "background.paper",
|
|
317
|
+
listStyle: "none",
|
|
318
|
+
m: 0,
|
|
319
|
+
p: 0
|
|
320
|
+
},
|
|
321
|
+
children: m.map((p, h) => /* @__PURE__ */ e(z, {
|
|
322
|
+
balanceLabel: t.balance ?? "",
|
|
323
|
+
isLast: h === m.length - 1,
|
|
324
|
+
onClick: s ? () => s(p.guid) : void 0,
|
|
325
|
+
rateLabel: t.interest_rate ?? "",
|
|
326
|
+
row: p,
|
|
327
|
+
sortKey: r.sortKey
|
|
328
|
+
}, p.guid))
|
|
329
|
+
})]
|
|
330
|
+
})
|
|
331
|
+
]
|
|
332
|
+
})]
|
|
333
|
+
});
|
|
334
|
+
};
|
|
335
|
+
export {
|
|
336
|
+
$ as default
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
//# sourceMappingURL=PayoffStrategiesContent.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayoffStrategiesContent.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.tsx"],"sourcesContent":["import { useRef, useState } from 'react'\n\nimport Box from '@mui/material/Box'\nimport ButtonBase from '@mui/material/ButtonBase'\nimport Divider from '@mui/material/Divider'\nimport IconButton from '@mui/material/IconButton'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport { DEFAULT_INSTITUTION_LOGO_URL } from '../../../core/constants/InstitutionLogo'\nimport type { GeneralInsightsFeedCopy } from '../../../core/types/localization/InsightsFeedCopy'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { SubTabs, subTabPanelProps } from '../../components/SubTabs'\n\nimport type { PayoffAccountRow, PayoffStep, PayoffStrategy } from './layout'\nimport { orderAccounts } from './layout'\n\nexport interface PayoffStrategiesContentProps {\n copy: GeneralInsightsFeedCopy\n strategies: PayoffStrategy[]\n /** The beat's debt accounts, unordered; each tab orders them its own way. */\n accounts: PayoffAccountRow[]\n /** Tapping an account row opens its Account Details; rows are static without it. */\n onAccountClick?: (accountGuid: string) => void\n}\n\nconst CARD_SX = {\n bgcolor: 'background.paper',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 1,\n} as const\n\n/** The small uppercase section label (STRATEGY, HOW TO GET STARTED, HIGHEST TO LOWEST RATE). */\nconst SectionLabel = ({ children }: { children: string }) => (\n <Text\n color=\"text.secondary\"\n component=\"h3\"\n sx={{ letterSpacing: 0.5, textTransform: 'uppercase' }}\n variant=\"caption\"\n >\n {children}\n </Text>\n)\n\nconst ProsConsCard = ({\n items,\n kind,\n title,\n}: {\n items: string[]\n kind: 'pros' | 'cons'\n title: string\n}) => (\n <Stack component=\"section\" sx={{ ...CARD_SX, flex: 1, gap: 12, p: 16 }}>\n <Text bold={true} component=\"h4\" variant=\"body1\">\n {title}\n </Text>\n <Stack component=\"ul\" sx={{ gap: 12, listStyle: 'none', m: 0, p: 0 }}>\n {items.map((item) => (\n <Stack component=\"li\" key={item} sx={{ flexDirection: 'row', gap: 6 }}>\n <Icon\n color={kind === 'pros' ? 'success' : 'error'}\n name={kind === 'pros' ? 'check_circle' : 'cancel'}\n size={16}\n sx={{ flexShrink: 0, mt: 2 }}\n />\n <Text variant=\"body2\">{item}</Text>\n </Stack>\n ))}\n </Stack>\n </Stack>\n)\n\nconst STEP_CARD_WIDTH = 172\nconst MISSING_VALUE = '—'\n\n/** The three step cards in a scroll-snap row, paged by the arrows and the dots under it. */\nconst StepsCarousel = ({ steps }: { steps: PayoffStep[] }) => {\n const [page, setPage] = useState(0)\n const rowRef = useRef<HTMLOListElement>(null)\n\n const goTo = (next: number) => {\n const index = Math.min(Math.max(next, 0), steps.length - 1)\n setPage(index)\n rowRef.current?.scrollTo({ behavior: 'smooth', left: index * (STEP_CARD_WIDTH + 12) })\n }\n\n if (!steps.length) return null\n\n return (\n <Stack sx={{ gap: 16 }}>\n <Box\n component=\"ol\"\n ref={rowRef}\n sx={{\n display: 'flex',\n flexDirection: 'row',\n gap: 12,\n listStyle: 'none',\n m: 0,\n overflowX: 'auto',\n p: 0,\n scrollSnapType: 'x mandatory',\n scrollbarWidth: 'none',\n '&::-webkit-scrollbar': { display: 'none' },\n }}\n >\n {steps.map((step) => (\n <Stack\n component=\"li\"\n key={step.caption + step.text}\n sx={{\n ...CARD_SX,\n alignItems: 'center',\n flexShrink: 0,\n gap: 16,\n p: 16,\n scrollSnapAlign: 'start',\n textAlign: 'center',\n width: STEP_CARD_WIDTH,\n }}\n >\n <Icon color=\"action\" name={step.icon} size={48} />\n <Stack sx={{ gap: 4 }}>\n <Text bold={true} sx={{ textTransform: 'uppercase' }} variant=\"caption\">\n {step.caption}\n </Text>\n <Text color=\"text.secondary\" variant=\"body2\">\n {step.text}\n </Text>\n </Stack>\n </Stack>\n ))}\n </Box>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, justifyContent: 'center' }}>\n <IconButton aria-label=\"previous\" disabled={page === 0} onClick={() => goTo(page - 1)}>\n <Icon name=\"chevron_left\" size={20} />\n </IconButton>\n <Stack aria-hidden=\"true\" sx={{ alignItems: 'center', flexDirection: 'row', gap: 4 }}>\n {steps.map((step, index) => (\n <Box\n key={step.caption + step.text}\n sx={{\n bgcolor: index === page ? 'primary.main' : 'action.disabled',\n borderRadius: 3,\n height: 6,\n width: index === page ? 20 : 6,\n }}\n />\n ))}\n </Stack>\n <IconButton\n aria-label=\"next\"\n disabled={page === steps.length - 1}\n onClick={() => goTo(page + 1)}\n >\n <Icon color=\"primary\" name=\"chevron_right\" size={20} />\n </IconButton>\n </Stack>\n </Stack>\n )\n}\n\nconst AccountRow = ({\n balanceLabel,\n isLast,\n onClick,\n rateLabel,\n row,\n sortKey,\n}: {\n balanceLabel: string\n isLast: boolean\n onClick?: () => void\n rateLabel: string\n row: PayoffAccountRow\n sortKey: PayoffStrategy['sortKey']\n}) => {\n const rate = {\n label: rateLabel,\n value: row.interestRate === null ? MISSING_VALUE : `${row.interestRate}%`,\n }\n const balance = {\n label: balanceLabel,\n value: row.balance === null ? MISSING_VALUE : formatCurrency(row.balance, '0,0.00'),\n }\n const lines = sortKey === 'rate' ? [rate, balance] : [balance, rate]\n\n return (\n <Box component=\"li\" sx={{ position: 'relative' }}>\n <Stack\n component={onClick ? ButtonBase : 'div'}\n onClick={onClick}\n sx={{\n alignItems: 'flex-start',\n flexDirection: 'row',\n gap: 12,\n px: 24,\n py: 16,\n textAlign: 'left',\n width: '100%',\n ...(onClick && {\n '&:hover': { bgcolor: 'action.hover' },\n '&.Mui-focusVisible': { bgcolor: 'action.focus' },\n }),\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0, height: 32, width: 32 }}>\n <InstitutionLogo\n alt=\"\"\n institutionGuid={row.institutionGuid}\n logoUrl={row.institutionGuid ? undefined : DEFAULT_INSTITUTION_LOGO_URL}\n size={32}\n />\n </Box>\n <Stack sx={{ flexGrow: 1, gap: 4, minWidth: 0 }}>\n <Text bold={true} truncate={true} variant=\"body1\">\n {row.name}\n </Text>\n {lines.map((line, index) => (\n <Stack\n key={line.label}\n sx={{ flexDirection: 'row', gap: 12, justifyContent: 'space-between' }}\n >\n <Text color=\"text.secondary\" variant=\"caption\">\n {line.label}\n </Text>\n <Text\n bold={index === 0}\n color={index === 0 ? 'text.primary' : 'text.secondary'}\n sx={{ fontVariantNumeric: 'tabular-nums' }}\n variant=\"caption\"\n >\n {line.value}\n </Text>\n </Stack>\n ))}\n </Stack>\n </Stack>\n <Divider sx={{ bottom: 0, left: isLast ? 0 : 68, position: 'absolute', right: 0 }} />\n </Box>\n )\n}\n\n/** Presentational body of the Debt Payoff Strategies drawer, minus the drawer header. */\nconst PayoffStrategiesContent = ({\n accounts,\n copy,\n onAccountClick,\n strategies,\n}: PayoffStrategiesContentProps) => {\n const [tab, setTab] = useState(0)\n const strategy = strategies[tab] ?? strategies[0]\n\n if (!strategy) return null\n\n const ordered = orderAccounts(accounts, strategy.sortKey)\n\n return (\n <Stack sx={{ bgcolor: 'background.default', pb: 24 }}>\n <SubTabs\n id=\"payoff-strategies\"\n isTypeFilter={false}\n onChange={setTab}\n selectedIndex={tab}\n tabs={strategies.map(({ label }) => ({ label }))}\n />\n <Stack {...subTabPanelProps('payoff-strategies', tab)} sx={{ gap: 12 }}>\n <Stack component=\"section\" sx={{ bgcolor: 'background.paper', gap: 16, p: 24 }}>\n <Stack sx={{ gap: 4 }}>\n {copy.the_strategy && <SectionLabel>{copy.the_strategy}</SectionLabel>}\n <Text component=\"p\" variant=\"body1\">\n {strategy.description}\n </Text>\n </Stack>\n <Stack sx={{ flexDirection: 'row', gap: 12 }}>\n <ProsConsCard items={strategy.pros} kind=\"pros\" title={copy.pros ?? ''} />\n <ProsConsCard items={strategy.cons} kind=\"cons\" title={copy.cons ?? ''} />\n </Stack>\n </Stack>\n {strategy.steps.length > 0 && (\n <Stack component=\"section\" sx={{ gap: 16, px: 24, py: 24 }}>\n {copy.how_to_get_started && <SectionLabel>{copy.how_to_get_started}</SectionLabel>}\n <StepsCarousel key={strategy.key} steps={strategy.steps} />\n </Stack>\n )}\n <Stack component=\"section\" sx={{ gap: 16, pt: 12 }}>\n <Box sx={{ px: 24 }}>\n <SectionLabel>{strategy.orderHeader}</SectionLabel>\n </Box>\n <Stack\n aria-label={strategy.orderHeader}\n component=\"ul\"\n sx={{ bgcolor: 'background.paper', listStyle: 'none', m: 0, p: 0 }}\n >\n {ordered.map((row, index) => (\n <AccountRow\n balanceLabel={copy.balance ?? ''}\n isLast={index === ordered.length - 1}\n key={row.guid}\n onClick={onAccountClick ? () => onAccountClick(row.guid) : undefined}\n rateLabel={copy.interest_rate ?? ''}\n row={row}\n sortKey={strategy.sortKey}\n />\n ))}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default PayoffStrategiesContent\n"],"mappings":";;;;;;;;;;;;;AA4BA,IAAM,IAAU;AAAA,EACd,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,cAAc;AAChB,GAGM,IAAA,CAAgB,EAAE,UAAA,EAAA,MACtB,gBAAA,EAAC,GAAD;AAAA,EACE,OAAM;AAAA,EACN,WAAU;AAAA,EACV,IAAI;AAAA,IAAE,eAAe;AAAA,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,UAAzD,UAAA,CACG,EAAK,sBAAsB,gBAAA,EAAC,GAAD,EAAA,UAAe,EAAK,mBAAiC,CAAA,GACjF,gBAAA,EAAC,GAAD,EAAkC,OAAO,EAAS,MAAQ,GAAtC,EAAS,GAA6B,CACrD;AAAA;QAET,gBAAA,EAAC,GAAD;AAAA,UAAO,WAAU;AAAA,UAAU,IAAI;AAAA,YAAE,KAAK;AAAA,YAAI,IAAI;AAAA,UAAG;AAAA,UAAjD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,YAAK,IAAI,EAAE,IAAI,GAAG;AAAA,YAChB,UAAA,gBAAA,EAAC,GAAD,EAAA,UAAe,EAAS,YAA0B,CAAA;AAAA,UAC/C,CAAA,GACL,gBAAA,EAAC,GAAD;AAAA,YACE,cAAY,EAAS;AAAA,YACrB,WAAU;AAAA,YACV,IAAI;AAAA,cAAE,SAAS;AAAA,cAAoB,WAAW;AAAA,cAAQ,GAAG;AAAA,cAAG,GAAG;AAAA,YAAE;AAAA,YAEhE,UAAA,EAAQ,IAAA,CAAK,GAAK,MACjB,gBAAA,EAAC,GAAD;AAAA,cACE,cAAc,EAAK,WAAW;AAAA,cAC9B,QAAQ,MAAU,EAAQ,SAAS;AAAA,cAEnC,SAAS,IAAA,MAAuB,EAAe,EAAI,IAAI,IAAI;AAAA,cAC3D,WAAW,EAAK,iBAAiB;AAAA,cAC5B,KAAA;AAAA,cACL,SAAS,EAAS;AAAA,YACnB,GALM,EAAI,IAKV,CACF;AAAA,UACI,CAAA,CACF;AAAA;MACF;AAAA,IACF,CAAA,CAAA;AAAA;AAEX"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Account, Beat } from '../../../core';
|
|
2
|
+
import { GeneralInsightsFeedCopy } from '../../../core/types/localization/InsightsFeedCopy';
|
|
3
|
+
export type PayoffStrategyKey = 'avalanche' | 'snowball';
|
|
4
|
+
/** Which figure a strategy orders by; it is also the row's first label / value line. */
|
|
5
|
+
export type PayoffSortKey = 'rate' | 'balance';
|
|
6
|
+
export interface PayoffStep {
|
|
7
|
+
caption: string;
|
|
8
|
+
text: string;
|
|
9
|
+
/** mx-icons ligature name. */
|
|
10
|
+
icon: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PayoffStrategy {
|
|
13
|
+
key: PayoffStrategyKey;
|
|
14
|
+
label: string;
|
|
15
|
+
description: string;
|
|
16
|
+
pros: string[];
|
|
17
|
+
cons: string[];
|
|
18
|
+
steps: PayoffStep[];
|
|
19
|
+
/** The header above the ordered accounts ("Highest to lowest rate"). */
|
|
20
|
+
orderHeader: string;
|
|
21
|
+
sortKey: PayoffSortKey;
|
|
22
|
+
}
|
|
23
|
+
/** The two strategies as the pulse drawer worded them, from `insights_feed.general`; a missing word is dropped. */
|
|
24
|
+
export declare const buildStrategies: (copy: GeneralInsightsFeedCopy) => PayoffStrategy[];
|
|
25
|
+
export interface PayoffAccountRow {
|
|
26
|
+
guid: string;
|
|
27
|
+
name: string;
|
|
28
|
+
/** Empty when no institution is known: the default logo is shown. */
|
|
29
|
+
institutionGuid: string;
|
|
30
|
+
/** `null` when the account carries no balance: shown as a dash and sorted last. */
|
|
31
|
+
balance: number | null;
|
|
32
|
+
/** `null` when the account carries no interest rate: shown as a dash and sorted last. */
|
|
33
|
+
interestRate: number | null;
|
|
34
|
+
}
|
|
35
|
+
/** The last four digits of the account number, or `0000` when the account has none (WEC-1471). */
|
|
36
|
+
export declare const maskedNumber: (account: Pick<Account, "account_number">) => string;
|
|
37
|
+
/** The beat's `account_guids` among the visible accounts, in the beat's order; an unknown, hidden or closed guid is skipped. */
|
|
38
|
+
export declare const resolveStrategyAccounts: (beat: Beat, visibleAccounts: Account[]) => Account[];
|
|
39
|
+
export declare const toPayoffAccountRow: (account: Account) => PayoffAccountRow;
|
|
40
|
+
/** Avalanche: interest rate, highest first. Snowball: balance, lowest first. A missing value sorts last. A new array; the input is untouched. */
|
|
41
|
+
export declare const orderAccounts: (rows: PayoffAccountRow[], sortKey: PayoffSortKey) => PayoffAccountRow[];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import l from "../../../common/utils/AccountDisplayName.es.js";
|
|
2
|
+
var o = [
|
|
3
|
+
"request_quote",
|
|
4
|
+
"payments",
|
|
5
|
+
"price_check"
|
|
6
|
+
], n = (...e) => e.filter((t) => !!t?.trim()), r = (e, t) => [
|
|
7
|
+
e.step_one,
|
|
8
|
+
e.step_two,
|
|
9
|
+
e.step_three
|
|
10
|
+
].map((_, a) => ({
|
|
11
|
+
caption: _ ?? "",
|
|
12
|
+
icon: o[a],
|
|
13
|
+
text: t[a] ?? ""
|
|
14
|
+
})).filter((_) => _.text.trim() !== ""), d = (e) => [{
|
|
15
|
+
cons: n(e.takes_time_to_see_results, e.requires_patience_and_discipline),
|
|
16
|
+
description: e.pay_off_debts_with_high_interest_rates_first ?? "",
|
|
17
|
+
key: "avalanche",
|
|
18
|
+
label: e.avalanche ?? "",
|
|
19
|
+
orderHeader: e.highest_to_lowest_rate ?? "",
|
|
20
|
+
pros: n(e.fastest_way_to_eliminate_debt, e.costs_less_in_interest),
|
|
21
|
+
sortKey: "rate",
|
|
22
|
+
steps: r(e, [
|
|
23
|
+
e.make_minimum_monthly_payments_on_all_debt_accounts,
|
|
24
|
+
e.when_possible_pay_extra_on_the_account_with_the_highest_interest_rate,
|
|
25
|
+
e.when_paid_off_move_to_the_next_debt_with_the_highest
|
|
26
|
+
])
|
|
27
|
+
}, {
|
|
28
|
+
cons: n(e.takes_longer_to_pay_off_all_debts, e.may_cost_more_in_interest),
|
|
29
|
+
description: e.pay_off_debts_with_low_balances_first ?? "",
|
|
30
|
+
key: "snowball",
|
|
31
|
+
label: e.snowball ?? "",
|
|
32
|
+
orderHeader: e.lowest_to_highest_balance ?? "",
|
|
33
|
+
pros: n(e.provides_small_wins_quickly, e.builds_momentum_to_pay_off_debts),
|
|
34
|
+
sortKey: "balance",
|
|
35
|
+
steps: r(e, [
|
|
36
|
+
e.make_minimum_monthly_payments_on_all_debt_accounts,
|
|
37
|
+
e.when_possible_pay_extra_on_the_account_with_the_lowest_balance,
|
|
38
|
+
e.when_paid_off_move_to_the_next_debt_with_the_lowest
|
|
39
|
+
])
|
|
40
|
+
}], m = "0000", h = (e) => {
|
|
41
|
+
const t = e.account_number?.trim();
|
|
42
|
+
return t ? t.slice(-4) : m;
|
|
43
|
+
}, b = (e, t) => (e.account_guids ?? []).map((_) => t.find((a) => a.guid === _)).filter((_) => _ !== void 0), f = (e) => ({
|
|
44
|
+
balance: e.balance ?? null,
|
|
45
|
+
guid: e.guid,
|
|
46
|
+
institutionGuid: e.institution_guid ?? "",
|
|
47
|
+
interestRate: e.interest_rate ?? null,
|
|
48
|
+
name: `${l(e)} *${h(e)}`
|
|
49
|
+
}), w = (e, t) => [...e].sort((_, a) => {
|
|
50
|
+
const [s, i] = t === "rate" ? [_.interestRate, a.interestRate] : [_.balance, a.balance];
|
|
51
|
+
return s === null || i === null ? s === null ? i === null ? 0 : 1 : -1 : t === "rate" ? i - s : s - i;
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
d as buildStrategies,
|
|
55
|
+
h as maskedNumber,
|
|
56
|
+
w as orderAccounts,
|
|
57
|
+
b as resolveStrategyAccounts,
|
|
58
|
+
f as toPayoffAccountRow
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=layout.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.ts"],"sourcesContent":["import getAccountDisplayName from '../../../common/utils/AccountDisplayName'\nimport type { Account, Beat } from '../../../core'\nimport type { GeneralInsightsFeedCopy } from '../../../core/types/localization/InsightsFeedCopy'\n\nexport type PayoffStrategyKey = 'avalanche' | 'snowball'\n\n/** Which figure a strategy orders by; it is also the row's first label / value line. */\nexport type PayoffSortKey = 'rate' | 'balance'\n\nexport interface PayoffStep {\n caption: string\n text: string\n /** mx-icons ligature name. */\n icon: string\n}\n\nexport interface PayoffStrategy {\n key: PayoffStrategyKey\n label: string\n description: string\n pros: string[]\n cons: string[]\n steps: PayoffStep[]\n /** The header above the ordered accounts (\"Highest to lowest rate\"). */\n orderHeader: string\n sortKey: PayoffSortKey\n}\n\nconst STEP_ICONS = ['request_quote', 'payments', 'price_check'] as const\n\nconst words = (...values: (string | undefined)[]) =>\n values.filter((value): value is string => Boolean(value?.trim()))\n\nconst steps = (copy: GeneralInsightsFeedCopy, texts: (string | undefined)[]): PayoffStep[] =>\n [copy.step_one, copy.step_two, copy.step_three]\n .map((caption, index) => ({\n caption: caption ?? '',\n icon: STEP_ICONS[index],\n text: texts[index] ?? '',\n }))\n .filter((step) => step.text.trim() !== '')\n\n/** The two strategies as the pulse drawer worded them, from `insights_feed.general`; a missing word is dropped. */\nexport const buildStrategies = (copy: GeneralInsightsFeedCopy): PayoffStrategy[] => [\n {\n cons: words(copy.takes_time_to_see_results, copy.requires_patience_and_discipline),\n description: copy.pay_off_debts_with_high_interest_rates_first ?? '',\n key: 'avalanche',\n label: copy.avalanche ?? '',\n orderHeader: copy.highest_to_lowest_rate ?? '',\n pros: words(copy.fastest_way_to_eliminate_debt, copy.costs_less_in_interest),\n sortKey: 'rate',\n steps: steps(copy, [\n copy.make_minimum_monthly_payments_on_all_debt_accounts,\n copy.when_possible_pay_extra_on_the_account_with_the_highest_interest_rate,\n copy.when_paid_off_move_to_the_next_debt_with_the_highest,\n ]),\n },\n {\n cons: words(copy.takes_longer_to_pay_off_all_debts, copy.may_cost_more_in_interest),\n description: copy.pay_off_debts_with_low_balances_first ?? '',\n key: 'snowball',\n label: copy.snowball ?? '',\n orderHeader: copy.lowest_to_highest_balance ?? '',\n pros: words(copy.provides_small_wins_quickly, copy.builds_momentum_to_pay_off_debts),\n sortKey: 'balance',\n steps: steps(copy, [\n copy.make_minimum_monthly_payments_on_all_debt_accounts,\n copy.when_possible_pay_extra_on_the_account_with_the_lowest_balance,\n copy.when_paid_off_move_to_the_next_debt_with_the_lowest,\n ]),\n },\n]\n\nexport interface PayoffAccountRow {\n guid: string\n name: string\n /** Empty when no institution is known: the default logo is shown. */\n institutionGuid: string\n /** `null` when the account carries no balance: shown as a dash and sorted last. */\n balance: number | null\n /** `null` when the account carries no interest rate: shown as a dash and sorted last. */\n interestRate: number | null\n}\n\nconst FALLBACK_NUMBER = '0000'\n\n/** The last four digits of the account number, or `0000` when the account has none (WEC-1471). */\nexport const maskedNumber = (account: Pick<Account, 'account_number'>): string => {\n const digits = account.account_number?.trim()\n\n return digits ? digits.slice(-4) : FALLBACK_NUMBER\n}\n\n/** The beat's `account_guids` among the visible accounts, in the beat's order; an unknown, hidden or closed guid is skipped. */\nexport const resolveStrategyAccounts = (beat: Beat, visibleAccounts: Account[]): Account[] =>\n (beat.account_guids ?? [])\n .map((guid) => visibleAccounts.find((account) => account.guid === guid))\n .filter((account): account is Account => account !== undefined)\n\nexport const toPayoffAccountRow = (account: Account): PayoffAccountRow => ({\n balance: account.balance ?? null,\n guid: account.guid,\n institutionGuid: account.institution_guid ?? '',\n interestRate: account.interest_rate ?? null,\n name: `${getAccountDisplayName(account)} *${maskedNumber(account)}`,\n})\n\n/** Avalanche: interest rate, highest first. Snowball: balance, lowest first. A missing value sorts last. A new array; the input is untouched. */\nexport const orderAccounts = (\n rows: PayoffAccountRow[],\n sortKey: PayoffSortKey,\n): PayoffAccountRow[] =>\n [...rows].sort((a, b) => {\n const [x, y] = sortKey === 'rate' ? [a.interestRate, b.interestRate] : [a.balance, b.balance]\n\n if (x === null || y === null) return x === null ? (y === null ? 0 : 1) : -1\n\n return sortKey === 'rate' ? y - x : x - y\n })\n"],"mappings":";AA4BA,IAAM,IAAa;AAAA,EAAC;AAAA,EAAiB;AAAA,EAAY;AAAa,GAExD,IAAA,IAAY,MAChB,EAAO,OAAA,CAAQ,MAA2B,EAAQ,GAAO,KAAK,CAAE,GAE5D,IAAA,CAAS,GAA+B,MAC5C;AAAA,EAAC,EAAK;AAAA,EAAU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S,GAErD,IAAA,CAAsB,OAAwC;AAAA,EACzE,SAAS,EAAQ,WAAW;AAAA,EAC5B,MAAM,EAAQ;AAAA,EACd,iBAAiB,EAAQ,oBAAoB;AAAA,EAC7C,cAAc,EAAQ,iBAAiB;AAAA,EACvC,MAAM,GAAG,EAAsB,CAAO,CAAA,KAAM,EAAa,CAAO,CAAA;AAClE,IAGa,IAAA,CACX,GACA,MAEA,CAAC,GAAG,CAAI,EAAE,KAAA,CAAM,GAAG,MAAM;AACvB,QAAM,CAAC,GAAG,CAAA,IAAK,MAAY,SAAS,CAAC,EAAE,cAAc,EAAE,YAAY,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO;AAE5F,SAAI,MAAM,QAAQ,MAAM,OAAa,MAAM,OAAQ,MAAM,OAAO,IAAI,IAAK,KAElE,MAAY,SAAS,IAAI,IAAI,IAAI;AAC1C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useAccountStore as t } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import { useAccountDetailsPrepare as r } from "../AccountDetailsBlock/useAccountDetailsPrepare.es.js";
|
|
3
|
+
import c from "react";
|
|
4
|
+
var u = () => {
|
|
5
|
+
const { accountsLoaded: e, loadAccounts: o } = t();
|
|
6
|
+
c.useEffect(() => {
|
|
7
|
+
e || o();
|
|
8
|
+
}, [e, o]), r();
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
u as usePayoffStrategiesPrepare
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=usePayoffStrategiesPrepare.es.js.map
|
package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/usePayoffStrategiesPrepare.es.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePayoffStrategiesPrepare.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/PayoffStrategiesBlock/usePayoffStrategiesPrepare.ts"],"sourcesContent":["import React from 'react'\n\nimport { useAccountStore } from '../../../common'\nimport { useAccountDetailsPrepare } from '../AccountDetailsBlock'\n\n/** Loads the accounts the strategies order, and what a tapped account's Account Details needs. */\nexport const usePayoffStrategiesPrepare = () => {\n const { accountsLoaded, loadAccounts } = useAccountStore()\n\n React.useEffect(() => {\n if (!accountsLoaded) void loadAccounts()\n }, [accountsLoaded, loadAccounts])\n\n // Members and institutions for the nested Account Details (also loads accounts, once).\n useAccountDetailsPrepare()\n}\n"],"mappings":";;;AAMA,IAAa,IAAA,MAAmC;AAC9C,QAAM,EAAE,gBAAA,GAAgB,cAAA,EAAA,IAAiB,EAAgB;AAEzD,EAAA,EAAM,UAAA,MAAgB;AACpB,IAAK,KAAgB,EAAkB;AAAA,EACzC,GAAG,CAAC,GAAgB,CAAY,CAAC,GAGjC,EAAyB;AAC3B"}
|
|
@@ -22,6 +22,7 @@ var _ = {
|
|
|
22
22
|
ACCOUNT_DETAILS_ACTION_BLOCK: "account_details_block",
|
|
23
23
|
ACCOUNT_LIST_ACTION_BLOCK: "account_list_block",
|
|
24
24
|
HELP_ACTION_BLOCK: "help_block",
|
|
25
|
+
PAYOFF_STRATEGIES_ACTION_BLOCK: "payoff_strategies_block",
|
|
25
26
|
QUIZ_MERCHANT_ACTION_BLOCK: "quiz_merchant_block"
|
|
26
27
|
};
|
|
27
28
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`, `make_transfer_block`).\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'placeholder_block',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer_block',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n FEEDBACK_MODAL_ACTION_BLOCK: 'feedback_modal_block',\n CONNECTION_DETAIL_ACTION_BLOCK: 'connection_detail_block',\n CONNECT_WIDGET_ACTION_BLOCK: 'connect_widget_block',\n SURVEY_MODAL_ACTION_BLOCK: 'survey_modal_block',\n SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK: 'subscription_status_modal_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n SAFETY_NET_ACTION_BLOCK: 'safety_net_block',\n OVERDRAFT_ACTION_BLOCK: 'transparent_overdraft_block',\n CREDIT_UTILIZATION_ACTION_BLOCK: 'credit_utilization_block',\n EMERGENCY_SAVINGS_ACTION_BLOCK: 'emergency_savings_block',\n PAYOFF_CALCULATOR_ACTION_BLOCK: 'payoff_calculator_block',\n BUDGET_DETAILS_ACTION_BLOCK: 'budget_details_block',\n ACCOUNT_DETAILS_ACTION_BLOCK: 'account_details_block',\n ACCOUNT_LIST_ACTION_BLOCK: 'account_list_block',\n HELP_ACTION_BLOCK: 'help_block',\n QUIZ_MERCHANT_ACTION_BLOCK: 'quiz_merchant_block',\n}\n"],"mappings":"AAgBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,wCAAwC;AAAA,EACxC,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,yBAAyB;AAAA,EACzB,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,2BAA2B;AAAA,EAC3B,mBAAmB;AAAA,EACnB,4BAA4B;AAC9B"}
|
|
1
|
+
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`, `make_transfer_block`).\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'placeholder_block',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer_block',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n FEEDBACK_MODAL_ACTION_BLOCK: 'feedback_modal_block',\n CONNECTION_DETAIL_ACTION_BLOCK: 'connection_detail_block',\n CONNECT_WIDGET_ACTION_BLOCK: 'connect_widget_block',\n SURVEY_MODAL_ACTION_BLOCK: 'survey_modal_block',\n SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK: 'subscription_status_modal_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n SAFETY_NET_ACTION_BLOCK: 'safety_net_block',\n OVERDRAFT_ACTION_BLOCK: 'transparent_overdraft_block',\n CREDIT_UTILIZATION_ACTION_BLOCK: 'credit_utilization_block',\n EMERGENCY_SAVINGS_ACTION_BLOCK: 'emergency_savings_block',\n PAYOFF_CALCULATOR_ACTION_BLOCK: 'payoff_calculator_block',\n BUDGET_DETAILS_ACTION_BLOCK: 'budget_details_block',\n ACCOUNT_DETAILS_ACTION_BLOCK: 'account_details_block',\n ACCOUNT_LIST_ACTION_BLOCK: 'account_list_block',\n HELP_ACTION_BLOCK: 'help_block',\n PAYOFF_STRATEGIES_ACTION_BLOCK: 'payoff_strategies_block',\n QUIZ_MERCHANT_ACTION_BLOCK: 'quiz_merchant_block',\n}\n"],"mappings":"AAgBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,wCAAwC;AAAA,EACxC,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,yBAAyB;AAAA,EACzB,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,2BAA2B;AAAA,EAC3B,mBAAmB;AAAA,EACnB,gCAAgC;AAAA,EAChC,4BAA4B;AAC9B"}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { buildDynamicCopy as _ } from "../../core/utils/Localization.es.js";
|
|
2
2
|
import { ContactSupportActionBlock as s } from "../actionBlocks/ContactSupportActionBlock.es.js";
|
|
3
3
|
import { resolveBudgetSubject as C } from "../actionBlocks/BudgetDetailsBlock/layout.es.js";
|
|
4
|
-
import { hasDrawerBlock as
|
|
4
|
+
import { hasDrawerBlock as go } from "./hasDrawerBlock.es.js";
|
|
5
5
|
import { actionBlocksKey as t } from "./actionBlocksKey.es.js";
|
|
6
6
|
import { BarchartBlock as u } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
7
|
-
import { DoubleBarChartBlock as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import { DoubleBarChartBlock as f } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
8
|
+
import B from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
9
|
+
import k from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
10
10
|
import A from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
11
11
|
import T from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
|
|
12
12
|
import O from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
13
13
|
import d from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
14
|
-
import { BudgetBlock as
|
|
14
|
+
import { BudgetBlock as g } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
15
15
|
import I from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
16
|
-
import
|
|
16
|
+
import N from "../blocks/ComponentBlocks/GasPurchaseBlock/GasPurchaseBlock.es.js";
|
|
17
17
|
import P from "../blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
|
|
18
18
|
import b from "../blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js";
|
|
19
19
|
import L from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
|
|
20
20
|
import S from "../blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js";
|
|
21
|
-
import
|
|
21
|
+
import l from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
22
22
|
import h from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
23
23
|
import D from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
24
24
|
import E from "../blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js";
|
|
25
25
|
import { TransactionBlock as K } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
26
|
+
import y from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
27
|
+
import v from "../blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js";
|
|
28
|
+
import R from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
29
29
|
import M from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
30
30
|
import { SVGImageBlock as U } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
31
31
|
import { FeedbackModalActionBlock as w } from "../actionBlocks/FeedbackModalActionBlock.es.js";
|
|
32
32
|
import { ConnectionDetailActionBlock as G } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
|
|
33
|
-
import { ConnectWidgetActionBlock as
|
|
34
|
-
import { getDrawerHeaderTitle as
|
|
35
|
-
import { SurveyModalActionBlock as
|
|
33
|
+
import { ConnectWidgetActionBlock as F } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
|
|
34
|
+
import { getDrawerHeaderTitle as H } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
35
|
+
import { SurveyModalActionBlock as z } from "../actionBlocks/SurveyModalActionBlock.es.js";
|
|
36
36
|
import { SubscriptionStatusModalBlock as Y } from "../actionBlocks/SubscriptionStatusModalBlock.es.js";
|
|
37
37
|
import { PlaceholderActionBlock as x } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
38
38
|
import { getMakeTransferDrawerTitle as V } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
@@ -41,7 +41,7 @@ import { TransactionDetailsBlock as q } from "../actionBlocks/TransactionDetails
|
|
|
41
41
|
import { useTransactionDetailsPrepare as n } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
42
42
|
import { TransactionHistoryBlock as Q } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
43
43
|
import { useTransactionHistoryPrepare as j } from "../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js";
|
|
44
|
-
import { useRecurringTransactionPrepare as
|
|
44
|
+
import { useRecurringTransactionPrepare as c } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
|
|
45
45
|
import { RecurringTransactionBlock as Z } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
|
|
46
46
|
import { HelpBlock as J } from "../actionBlocks/HelpBlock/HelpBlock.es.js";
|
|
47
47
|
import { getTransactionListDrawerTitle as X } from "../actionBlocks/TransactionListBlock/layout.es.js";
|
|
@@ -54,12 +54,14 @@ import { useAccountDetailsPrepare as io } from "../actionBlocks/AccountDetailsBl
|
|
|
54
54
|
import { AccountListBlock as ao } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
|
|
55
55
|
import { useAccountListPrepare as no } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
|
|
56
56
|
import { EmergencySavingsBlock as mo } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
|
|
57
|
-
import { CreditUtilizationBlock as
|
|
58
|
-
import { useCreditUtilizationPrepare as
|
|
57
|
+
import { CreditUtilizationBlock as lo } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
|
|
58
|
+
import { useCreditUtilizationPrepare as co } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
|
|
59
59
|
import { PayoffCalculatorBlock as po, usePayoffCalculatorPrepare as _o } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
|
|
60
60
|
import { BudgetDetailsBlock as so } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
|
|
61
61
|
import { useBudgetDetailsPrepare as Co } from "../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare.es.js";
|
|
62
|
-
import {
|
|
62
|
+
import { PayoffStrategiesBlock as uo } from "../actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js";
|
|
63
|
+
import { usePayoffStrategiesPrepare as fo } from "../actionBlocks/PayoffStrategiesBlock/usePayoffStrategiesPrepare.es.js";
|
|
64
|
+
import { QuizMerchantBlock as Bo } from "../actionBlocks/QuizMerchantBlock/QuizMerchantBlock.es.js";
|
|
63
65
|
var i = (e) => {
|
|
64
66
|
}, r = (e) => ({
|
|
65
67
|
get Component() {
|
|
@@ -77,7 +79,7 @@ var i = (e) => {
|
|
|
77
79
|
get headerAction() {
|
|
78
80
|
return e().headerAction;
|
|
79
81
|
}
|
|
80
|
-
}),
|
|
82
|
+
}), ht = {
|
|
81
83
|
[t.PLACEHOLDER_ACTION_BLOCK]: r(() => ({
|
|
82
84
|
Component: x,
|
|
83
85
|
usePrepare: i,
|
|
@@ -91,7 +93,7 @@ var i = (e) => {
|
|
|
91
93
|
[t.TRANSCATION_HISTORY_ACTION_BLOCK]: r(() => ({
|
|
92
94
|
Component: Q,
|
|
93
95
|
usePrepare: j,
|
|
94
|
-
title:
|
|
96
|
+
title: H
|
|
95
97
|
})),
|
|
96
98
|
[t.TRANSACTION_DETAILS_ACTION_BLOCK]: r(() => ({
|
|
97
99
|
Component: q,
|
|
@@ -100,12 +102,12 @@ var i = (e) => {
|
|
|
100
102
|
})),
|
|
101
103
|
[t.RECURRING_TRANSACTION_ACTION_BLOCK]: r(() => ({
|
|
102
104
|
Component: Z,
|
|
103
|
-
usePrepare:
|
|
105
|
+
usePrepare: c,
|
|
104
106
|
title: (e, o) => o.recurring?.expense_details ?? ""
|
|
105
107
|
})),
|
|
106
108
|
[t.REMAINING_CASH_ACTION_BLOCK]: r(() => ({
|
|
107
109
|
Component: oo,
|
|
108
|
-
usePrepare:
|
|
110
|
+
usePrepare: c,
|
|
109
111
|
title: (e, o) => o.insights_feed?.remaining_cash?.title ?? ""
|
|
110
112
|
})),
|
|
111
113
|
[t.CONTACT_SUPPORT_ACTION_BLOCK]: r(() => ({
|
|
@@ -124,11 +126,11 @@ var i = (e) => {
|
|
|
124
126
|
title: (e, o) => o.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
|
|
125
127
|
})),
|
|
126
128
|
[t.CONNECT_WIDGET_ACTION_BLOCK]: r(() => ({
|
|
127
|
-
Component:
|
|
129
|
+
Component: F,
|
|
128
130
|
usePrepare: i
|
|
129
131
|
})),
|
|
130
132
|
[t.SURVEY_MODAL_ACTION_BLOCK]: r(() => ({
|
|
131
|
-
Component:
|
|
133
|
+
Component: z,
|
|
132
134
|
usePrepare: i,
|
|
133
135
|
presentation: "modal"
|
|
134
136
|
})),
|
|
@@ -158,8 +160,8 @@ var i = (e) => {
|
|
|
158
160
|
title: (e, o, a) => a?.insights_payload?.title ?? ""
|
|
159
161
|
})),
|
|
160
162
|
[t.CREDIT_UTILIZATION_ACTION_BLOCK]: r(() => ({
|
|
161
|
-
Component:
|
|
162
|
-
usePrepare:
|
|
163
|
+
Component: lo,
|
|
164
|
+
usePrepare: co,
|
|
163
165
|
title: (e, o) => o.insights_feed?.credit_utilization?.title ?? ""
|
|
164
166
|
})),
|
|
165
167
|
[t.EMERGENCY_SAVINGS_ACTION_BLOCK]: r(() => ({
|
|
@@ -195,43 +197,48 @@ var i = (e) => {
|
|
|
195
197
|
Component: J,
|
|
196
198
|
usePrepare: i
|
|
197
199
|
})),
|
|
198
|
-
[t.
|
|
200
|
+
[t.PAYOFF_STRATEGIES_ACTION_BLOCK]: r(() => ({
|
|
199
201
|
Component: uo,
|
|
202
|
+
usePrepare: fo,
|
|
203
|
+
title: (e, o) => o.insights_feed?.general?.debt_payoff_strategies ?? ""
|
|
204
|
+
})),
|
|
205
|
+
[t.QUIZ_MERCHANT_ACTION_BLOCK]: r(() => ({
|
|
206
|
+
Component: Bo,
|
|
200
207
|
usePrepare: n,
|
|
201
208
|
title: (e, o) => o.insights_feed?.quiz_block?.drawer_title ?? ""
|
|
202
209
|
}))
|
|
203
|
-
},
|
|
210
|
+
}, Dt = {
|
|
204
211
|
account_block: O,
|
|
205
212
|
account_switch_block: d,
|
|
206
213
|
direct_deposit_block: T,
|
|
207
214
|
bar_chart_block: u,
|
|
208
|
-
budget_block:
|
|
215
|
+
budget_block: g,
|
|
209
216
|
debts_block: I,
|
|
210
|
-
donut_chart_block:
|
|
211
|
-
double_bar_chart_block:
|
|
217
|
+
donut_chart_block: k,
|
|
218
|
+
double_bar_chart_block: f,
|
|
212
219
|
double_progress_bar_block: A,
|
|
213
|
-
gas_purchase_block:
|
|
220
|
+
gas_purchase_block: N,
|
|
214
221
|
goals_block: P,
|
|
215
222
|
image_block: M,
|
|
216
223
|
merchant_block: b,
|
|
217
224
|
no_spend_days_block: L,
|
|
218
225
|
quiz_block: S,
|
|
219
|
-
repeating_transaction_block:
|
|
226
|
+
repeating_transaction_block: l,
|
|
220
227
|
save_extra_block: h,
|
|
221
228
|
savings_amount_block: D,
|
|
222
229
|
savings_summary_block: E,
|
|
223
|
-
step_chart_block:
|
|
230
|
+
step_chart_block: B,
|
|
224
231
|
svg_image_block: U,
|
|
225
|
-
upcoming_bill_block:
|
|
226
|
-
upcoming_subscription_block:
|
|
227
|
-
weekly_small_purchases_block:
|
|
228
|
-
withdrawal_block:
|
|
232
|
+
upcoming_bill_block: l,
|
|
233
|
+
upcoming_subscription_block: y,
|
|
234
|
+
weekly_small_purchases_block: v,
|
|
235
|
+
withdrawal_block: R,
|
|
229
236
|
transaction_block: K
|
|
230
237
|
};
|
|
231
238
|
export {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
239
|
+
ht as actionBlocks,
|
|
240
|
+
Dt as blocks,
|
|
241
|
+
go as hasDrawerBlock
|
|
235
242
|
};
|
|
236
243
|
|
|
237
244
|
//# sourceMappingURL=blocks.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GasPurchaseBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n QuizBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SavingsSummaryBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WeeklySmallPurchasesBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { SubscriptionStatusModalBlock } from '../actionBlocks/SubscriptionStatusModalBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { AccountListBlock, useAccountListPrepare } from '../actionBlocks/AccountListBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\nimport { useBudgetDetailsPrepare } from '../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare'\nimport { resolveBudgetSubject } from '../actionBlocks/BudgetDetailsBlock/layout'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\nimport { HelpBlock } from '../actionBlocks/HelpBlock'\nimport { QuizMerchantBlock } from '../actionBlocks/QuizMerchantBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Drawer title from the CTA's variant and copy; falls back to the CTA label when empty.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n // The drawer header's close control: 'back' (default, arrow on the left) or 'close' (X on the right).\n headerAction?: 'back' | 'close'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * Reads its imports on access, not at load: some blocks import this registry back through\n * `ActionBlockLayer`, so a value copied at load would still be `undefined`.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n get headerAction() {\n return resolve().headerAction\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: useTransactionHistoryPrepare,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n // Unexpected Subscription Payment's Subscription Status modal.\n [actionBlocksKey.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SubscriptionStatusModalBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: getTransactionListDrawerTitle,\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n // Savings Opportunity's safety net: `safety_net_block` opens the amount-input modal.\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n // Figma's Budget Details: a close X on the right, not the back arrow.\n headerAction: 'close',\n // Loads the budget data and points the transaction store at the budget month, as pulse did.\n usePrepare: useBudgetDetailsPrepare,\n // \"{subject} Budget\" (subject by the CTA variant), else the card's title.\n title: (variant, copy, beat) => {\n const subject = beat ? resolveBudgetSubject(variant, beat, copy) : undefined\n if (subject && copy.budgets?.details_type_title) {\n return buildDynamicCopy(copy.budgets.details_type_title, subject) as string\n }\n\n return beat?.insights_payload?.title || copy.budgets?.details_title || ''\n },\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n usePrepare: useAccountListPrepare,\n title: (_variant, copy) => copy.insights_feed?.account_list?.title ?? '',\n })),\n // A beat's \"Learn More\": its pre-localized help title and body from the payload's\n // `drilldown_data`. The drawer title is the CTA label.\n [actionBlocksKey.HELP_ACTION_BLOCK]: liveEntry(() => ({\n Component: HelpBlock,\n usePrepare: noop,\n })),\n // A Monthly Top Transacted Merchant result row: that merchant's rank, totals and transactions.\n [actionBlocksKey.QUIZ_MERCHANT_ACTION_BLOCK]: liveEntry(() => ({\n Component: QuizMerchantBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, copy) => copy.insights_feed?.quiz_block?.drawer_title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n gas_purchase_block: GasPurchaseBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n quiz_block: QuizBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_block: SavingsOpportunityBlock,\n savings_summary_block: SavingsSummaryBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n weekly_small_purchases_block: WeeklySmallPurchasesBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAuBjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI,YAAY;AACd,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,aAAa;AACf,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AACF,IAEa,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B,EAAA,OAAiB;AAAA,IAC3D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf,EAAE;AAAA,EACD,CAAA,EAAgB,0BAAA,GAA6B,EAAA,OAAiB;AAAA,IAC7D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE;AAAA,EACD,CAAA,EAAgB,gCAAA,GAAmC,EAAA,OAAiB;AAAA,IACnE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE;AAAA,EACD,CAA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BAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
|
|
1
|
+
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GasPurchaseBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n QuizBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SavingsSummaryBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WeeklySmallPurchasesBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { SubscriptionStatusModalBlock } from '../actionBlocks/SubscriptionStatusModalBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { AccountListBlock, useAccountListPrepare } from '../actionBlocks/AccountListBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\nimport { useBudgetDetailsPrepare } from '../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare'\nimport { resolveBudgetSubject } from '../actionBlocks/BudgetDetailsBlock/layout'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\nimport { HelpBlock } from '../actionBlocks/HelpBlock'\nimport {\n PayoffStrategiesBlock,\n usePayoffStrategiesPrepare,\n} from '../actionBlocks/PayoffStrategiesBlock'\nimport { QuizMerchantBlock } from '../actionBlocks/QuizMerchantBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Drawer title from the CTA's variant and copy; falls back to the CTA label when empty.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n // The drawer header's close control: 'back' (default, arrow on the left) or 'close' (X on the right).\n headerAction?: 'back' | 'close'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * Reads its imports on access, not at load: some blocks import this registry back through\n * `ActionBlockLayer`, so a value copied at load would still be `undefined`.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n get headerAction() {\n return resolve().headerAction\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: useTransactionHistoryPrepare,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n // Unexpected Subscription Payment's Subscription Status modal.\n [actionBlocksKey.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SubscriptionStatusModalBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: getTransactionListDrawerTitle,\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n // Savings Opportunity's safety net: `safety_net_block` opens the amount-input modal.\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n // Figma's Budget Details: a close X on the right, not the back arrow.\n headerAction: 'close',\n // Loads the budget data and points the transaction store at the budget month, as pulse did.\n usePrepare: useBudgetDetailsPrepare,\n // \"{subject} Budget\" (subject by the CTA variant), else the card's title.\n title: (variant, copy, beat) => {\n const subject = beat ? resolveBudgetSubject(variant, beat, copy) : undefined\n if (subject && copy.budgets?.details_type_title) {\n return buildDynamicCopy(copy.budgets.details_type_title, subject) as string\n }\n\n return beat?.insights_payload?.title || copy.budgets?.details_title || ''\n },\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n usePrepare: useAccountListPrepare,\n title: (_variant, copy) => copy.insights_feed?.account_list?.title ?? '',\n })),\n // A beat's \"Learn More\": its pre-localized help title and body from the payload's\n // `drilldown_data`. The drawer title is the CTA label.\n [actionBlocksKey.HELP_ACTION_BLOCK]: liveEntry(() => ({\n Component: HelpBlock,\n usePrepare: noop,\n })),\n // Debt Payoff Strategies' \"Learn more\": Avalanche / Snowball tabs over the beat's debt accounts.\n [actionBlocksKey.PAYOFF_STRATEGIES_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffStrategiesBlock,\n usePrepare: usePayoffStrategiesPrepare,\n title: (_variant, copy) => copy.insights_feed?.general?.debt_payoff_strategies ?? '',\n })),\n // A Monthly Top Transacted Merchant result row: that merchant's rank, totals and transactions.\n [actionBlocksKey.QUIZ_MERCHANT_ACTION_BLOCK]: liveEntry(() => ({\n Component: QuizMerchantBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, copy) => copy.insights_feed?.quiz_block?.drawer_title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n gas_purchase_block: GasPurchaseBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n quiz_block: QuizBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_block: SavingsOpportunityBlock,\n savings_summary_block: SavingsSummaryBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n weekly_small_purchases_block: WeeklySmallPurchasesBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAuBjC,IAAA,CAAa,OAAuD;AAAA,EAC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