fansunited-frontend-components 0.0.98 → 0.0.99
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/Betslip.js +2 -2
- package/ChanceGame.js +958 -1464
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +2042 -2215
- package/CompetitorCard.js +4225 -5079
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +6010 -7547
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +546 -849
- package/List.js +227 -218
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +50 -42
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +2 -2
- package/PlayerOfTheMatch.js +285 -269
- package/PollVote.js +2 -2
- package/Predictor.js +80 -127
- package/README.md +1 -1
- package/Standings.js +991 -1324
- package/TopX.js +1120 -1167
- package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
- package/chunks/CheckCircle-I1FktW5Y.js +13 -0
- package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
- package/chunks/Person-CXRqyF4E.js +11 -0
- package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
- package/chunks/Search-CIXthh0D.js +17 -0
- package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
- package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
- package/chunks/index-BENM3N_w.js +4 -0
- package/chunks/index-BRxAV693.js +4 -0
- package/chunks/index-BXYTsvIX.js +4 -0
- package/chunks/index-C0ilols1.js +4 -0
- package/chunks/index-D7VhczXH.js +4 -0
- package/chunks/index-DKwvdw9t.js +4 -0
- package/chunks/index-DZN-AITW.js +4 -0
- package/chunks/main-B2sDRFF4.js +2184 -0
- package/chunks/main-CzfWaEQP.js +4869 -0
- package/chunks/main-DFNl3g_U.js +4910 -0
- package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
- package/chunks/main-DiBlJBNb.js +1956 -0
- package/chunks/main-DxvBjXsd.js +1775 -0
- package/chunks/main-S8_NDSiY.js +3209 -0
- package/chunks/main-lBgr8Liq.js +6571 -0
- package/chunks/{withVersionStamp-T8seRk9h.js → withVersionStamp-BsLyhvNA.js} +1 -1
- package/package.json +2 -2
- package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
- package/chunks/OddsStrip-BnSp5TXa.js +0 -383
- package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
- package/chunks/chevron-left-CxfCSZcr.js +0 -13
- package/chunks/chevron-right-BEQMacFn.js +0 -13
- package/chunks/index-Aq5MbUB9.js +0 -4
- package/chunks/index-BBQm_8LD.js +0 -4
- package/chunks/index-BC_sWWgc.js +0 -4
- package/chunks/index-DXKDJ1Vp.js +0 -4
- package/chunks/index-DjT5NrbA.js +0 -4
- package/chunks/index-DvLRehH6.js +0 -4
- package/chunks/index-aIMaxR-p.js +0 -4
- package/chunks/main-52Wff7qC.js +0 -11441
- package/chunks/main-B58mi9jx.js +0 -5622
- package/chunks/main-BIdXUTZS.js +0 -7308
- package/chunks/main-DD-NEzC7.js +0 -8241
- package/chunks/main-DUnfJPzY.js +0 -3608
- package/chunks/main-DpCBqqg_.js +0 -1950
- package/chunks/main-Drznt1ak.js +0 -1790
- package/chunks/users-wbJRbqW8.js +0 -16
- package/chunks/x-CK4GYo7T.js +0 -14
|
@@ -0,0 +1,3209 @@
|
|
|
1
|
+
import { jsx as t, jsxs as x, Fragment as He } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useDisableCache as gi, useInternalTheme as te, useColors as ae, useImageUrl as it, isMobile as N, getBrandingClickUrl as mi, useConstantContext as qt, ConstantsContext as Lt, isLarge as Dt, extractBrandingModelProperties as _e, defaultBgVertical as Qe, defaultBg as Pe, useImageVariant as xe, WidgetTemplate as j, DirectionalIcon as Rt, isExtraSmall as fi, hexToRgb as Ye, useIsRtl as at, stripHtmlTags as yi, useImageBackgroundGradient as Vn, sanitizeBackgroundUrl as jn, useSignInGate as hi, useConsents as bi, useParticipationDraft as pi, getRelatedInfoPageId as xi, initializeI18n as vi, ChanceGameEmbed as Kt, extractSdkError as Ci } from "fansunited-frontend-core";
|
|
3
|
+
import { C as Xt } from "./ChanceGameEmbedVariant-DM9eLG5s.js";
|
|
4
|
+
import rt, { useState as U, useEffect as me, useRef as ke, useId as ot, useMemo as pt } from "react";
|
|
5
|
+
import { PersonalityQuizFullModel as Ii, PersonalityQuizParticipationModel as Gn } from "fansunited-sdk-esm/models";
|
|
6
|
+
import { AspectRatio as lt, useBreakpointUp as de, CollectLeadForm as Si, joyButton as pe, ButtonSpinner as Nn, joyBody as ye, OverlaySkeleton as zi, ConsentPanel as Me, ConsentCta as st, StandardSkeleton as wi, SplitSkeleton as ki, StandardContentSkeleton as Ai, AdditionalCTA as Tt, AlertMessage as Ut, SplitScoreStateSkeleton as Qi, OverlayScoreStateWrapperSkeleton as Pi, NotFound as qi, OverlayApiErrorSkeleton as _n, SplitApiErrorSkeleton as Yn, StandardApiErrorSkeleton as Zn, StandardSignInSkeleton as Li, SignInCta as $t, SplitSignInSkeleton as Di, OverlaySignInSkeleton as Ri, StandardLeadAfterCollection as Bt, SignInGatePanel as Ft, SplitLeadAfterCollection as Ht, OverlayLeadAfterCollection as Mt, Spinner as Jt, WidgetPortal as Ti } from "fansunited-frontend-core/ui/emotion";
|
|
7
|
+
import { css as n } from "@emotion/react";
|
|
8
|
+
import { ArrowRightAltIcon as Et, ReplayIcon as Wt } from "fansunited-frontend-core/ui/icons";
|
|
9
|
+
import { useTranslation as E } from "react-i18next";
|
|
10
|
+
const Ui = (e, i) => {
|
|
11
|
+
const [r, o] = U(null), s = gi(), a = async () => {
|
|
12
|
+
try {
|
|
13
|
+
const l = await i.miniGames.getPersonalityQuizById(e, s);
|
|
14
|
+
o(l);
|
|
15
|
+
} catch (l) {
|
|
16
|
+
console.error(l), o(new Ii());
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return me(() => (a(), () => o(null)), [e, i, s]), r;
|
|
20
|
+
}, $i = (e, i, r, o = !1, s = !1) => {
|
|
21
|
+
const [a, l] = U(null), [u, h] = U(!1), [f, d] = U(!1), [m, y] = U(""), [g, b] = U(r);
|
|
22
|
+
r !== g && (b(r), l(null));
|
|
23
|
+
const P = async () => {
|
|
24
|
+
try {
|
|
25
|
+
const S = await i.miniGames.getMyPersonalityQuizParticipations({
|
|
26
|
+
personalityQuizIds: [e]
|
|
27
|
+
});
|
|
28
|
+
l(S.data);
|
|
29
|
+
} catch (S) {
|
|
30
|
+
if (l([new Gn()]), i.helpers.getSDKConfiguration().errorHandlingMode === "standard") {
|
|
31
|
+
const A = S;
|
|
32
|
+
if (A.error.code === 401 || A.error.code === 403) {
|
|
33
|
+
o || h(!0);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
d(!0), y(A.error.message || "");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const v = S;
|
|
40
|
+
if (v.data.error.code === 401 || v.data.error.code === 403) {
|
|
41
|
+
o || h(!0);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
d(!0), y(v.data.error.message || "");
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return me(() => (P(), () => l((S) => S === null ? null : [])), [e, i, r, o, s]), {
|
|
48
|
+
myParticipation: a,
|
|
49
|
+
isUnauthorized: u,
|
|
50
|
+
isApiError: f,
|
|
51
|
+
apiMessage: m,
|
|
52
|
+
setIsUnauthorized: h,
|
|
53
|
+
setIsApiError: d,
|
|
54
|
+
setApiMessage: y
|
|
55
|
+
};
|
|
56
|
+
}, en = {
|
|
57
|
+
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
58
|
+
flex: 1,
|
|
59
|
+
padding: "var(--fu-ucrc-space-xs)",
|
|
60
|
+
gap: "var(--fu-ucrc-space-xs)",
|
|
61
|
+
backgroundColor: "#FFFFFF",
|
|
62
|
+
boxShadow: "none",
|
|
63
|
+
cursor: "pointer",
|
|
64
|
+
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
65
|
+
transform: "scale(1)",
|
|
66
|
+
display: "flex",
|
|
67
|
+
flexDirection: "column",
|
|
68
|
+
"--fu-ucrc-pq-option-text": "var(--fu-ucrc-pq-light-text)",
|
|
69
|
+
"&:hover": { transform: "scale(1.02)" },
|
|
70
|
+
"&:active": { transform: "scale(0.98)" }
|
|
71
|
+
}, tn = {
|
|
72
|
+
margin: 0,
|
|
73
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
74
|
+
fontWeight: 500,
|
|
75
|
+
fontSize: "0.935em",
|
|
76
|
+
letterSpacing: "0.46px",
|
|
77
|
+
textAlign: "center",
|
|
78
|
+
color: "var(--fu-ucrc-pq-option-text)",
|
|
79
|
+
paddingInline: "var(--fu-ucrc-space-2xs)"
|
|
80
|
+
}, Ue = {
|
|
81
|
+
idle: n(en),
|
|
82
|
+
selected: n(en, {
|
|
83
|
+
backgroundColor: "var(--fu-ucrc-pq-primary)",
|
|
84
|
+
boxShadow: "inset 0 0 0 var(--fu-ucrc-border-size) var(--fu-ucrc-pq-primary)",
|
|
85
|
+
"--fu-ucrc-pq-option-text": "var(--fu-ucrc-primary-on-primary)"
|
|
86
|
+
}),
|
|
87
|
+
media: n({ borderRadius: "var(--fu-ucrc-radius-xs)", overflow: "hidden", flexGrow: 1 }),
|
|
88
|
+
img: n({ width: "100%", height: "100%", objectFit: "cover" }),
|
|
89
|
+
mediaTitle: n({ ...tn, lineHeight: "24px" }),
|
|
90
|
+
title: n({ ...tn, lineHeight: "16px", marginBlock: "auto" })
|
|
91
|
+
}, Bi = (e) => {
|
|
92
|
+
var l;
|
|
93
|
+
const i = te(), r = ae(), o = it(e.option.images), s = e.questionImage ? null : o, a = {
|
|
94
|
+
"--fu-ucrc-pq-primary": ((l = e.brandingColors) == null ? void 0 : l.primaryColor) || r.palette.primary.plainColor,
|
|
95
|
+
// The card is white, so its text keeps the light scheme's colour in either mode.
|
|
96
|
+
"--fu-ucrc-pq-light-text": i.colorSchemes.light.textColor
|
|
97
|
+
};
|
|
98
|
+
return /* @__PURE__ */ t(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
css: e.selectedOption === e.option.optionId ? Ue.selected : Ue.idle,
|
|
102
|
+
style: a,
|
|
103
|
+
onClick: () => e.answerQuestion(e.option.optionId),
|
|
104
|
+
children: s ? /* @__PURE__ */ x(He, { children: [
|
|
105
|
+
/* @__PURE__ */ t("div", { css: Ue.media, children: /* @__PURE__ */ t(lt, { ratio: "16/9", radius: "var(--fu-ucrc-radius-xs)", children: /* @__PURE__ */ t("img", { src: s, alt: "Option illustration", css: Ue.img }) }) }),
|
|
106
|
+
/* @__PURE__ */ t("p", { css: Ue.mediaTitle, children: e.option.option })
|
|
107
|
+
] }) : /* @__PURE__ */ t("p", { css: Ue.title, children: e.option.option })
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}, nn = { display: "flex", flexDirection: "column", gap: "16px" }, $e = {
|
|
111
|
+
list: n({ ...nn, paddingBlock: "16px" }),
|
|
112
|
+
row: n({ display: "flex", flexDirection: "row", gap: "16px" }),
|
|
113
|
+
column: n(nn),
|
|
114
|
+
wrapRow: n({ display: "flex", flexWrap: "wrap", flexDirection: "row", gap: "16px", paddingBlock: "16px" }),
|
|
115
|
+
wrapColumn: n({ display: "flex", flexWrap: "wrap", flexDirection: "column", gap: "16px", paddingBlock: "16px" })
|
|
116
|
+
}, Fi = (e) => {
|
|
117
|
+
const i = [];
|
|
118
|
+
for (let r = 0; r < e.length; r += 2) i.push(e.slice(r, r + 2));
|
|
119
|
+
return i;
|
|
120
|
+
}, Ot = (e) => {
|
|
121
|
+
const i = de("md"), r = (o) => /* @__PURE__ */ t(
|
|
122
|
+
Bi,
|
|
123
|
+
{
|
|
124
|
+
option: o,
|
|
125
|
+
questionImage: e.questionImage,
|
|
126
|
+
selectedOption: e.selectedOption,
|
|
127
|
+
answerQuestion: e.answerQuestion,
|
|
128
|
+
brandingColors: e.brandingColors
|
|
129
|
+
},
|
|
130
|
+
o.optionId
|
|
131
|
+
);
|
|
132
|
+
return e.optionsLayout === "twoByTwo" ? /* @__PURE__ */ t("div", { css: $e.list, children: Fi(e.options).map((o, s) => /* @__PURE__ */ t("div", { css: i ? $e.row : $e.column, children: o.map(r) }, `row-${s}`)) }) : e.optionsLayout === "column" ? /* @__PURE__ */ t("div", { css: $e.list, children: e.options.map(r) }) : /* @__PURE__ */ t("div", { css: i ? $e.wrapRow : $e.wrapColumn, children: e.options.map(r) });
|
|
133
|
+
}, an = { minWidth: "180px", display: "flex", gap: "8px", alignItems: "center", fontSize: "1em" }, je = {
|
|
134
|
+
centered: n({ ...an, flexDirection: "column", zIndex: 1 }),
|
|
135
|
+
inline: n({ ...an, zIndex: 10 }),
|
|
136
|
+
label: n({
|
|
137
|
+
margin: 0,
|
|
138
|
+
fontWeight: 400,
|
|
139
|
+
lineHeight: "166%",
|
|
140
|
+
letterSpacing: "0.4px",
|
|
141
|
+
fontSize: "1em",
|
|
142
|
+
// Joy body-sm painted text.tertiary when no colour was passed.
|
|
143
|
+
color: "var(--fu-ucrc-pq-presented-by, var(--fu-ucrc-joy-text-tertiary))",
|
|
144
|
+
textAlign: "right",
|
|
145
|
+
fontFamily: "var(--fu-ucrc-font-secondary)"
|
|
146
|
+
}),
|
|
147
|
+
link: n({ cursor: "pointer", textDecoration: "none", display: "inline-flex" }),
|
|
148
|
+
clickable: n({ cursor: "pointer", display: "inline-flex" })
|
|
149
|
+
}, O = (e) => {
|
|
150
|
+
const i = N(), r = mi(e.primaryUrl, e.secondaryUrl, "logo");
|
|
151
|
+
if (!e.brandingLogo) return null;
|
|
152
|
+
const o = /* @__PURE__ */ t("img", { src: e.brandingLogo, alt: "branding-logo", style: { maxHeight: "50px", maxWidth: "100px" } }), s = r ? typeof window > "u" ? /* @__PURE__ */ t("a", { css: je.link, href: r, target: "_blank", rel: "noopener noreferrer", children: o }) : /* @__PURE__ */ t("div", { css: je.clickable, onClick: () => window.open(r, "_blank", "noopener,noreferrer"), children: o }) : o;
|
|
153
|
+
return /* @__PURE__ */ x(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
css: i ? je.centered : je.inline,
|
|
157
|
+
style: e.textColor ? { "--fu-ucrc-pq-presented-by": e.textColor } : void 0,
|
|
158
|
+
children: [
|
|
159
|
+
e.label && /* @__PURE__ */ t("p", { css: je.label, children: e.label }),
|
|
160
|
+
s
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}, Ee = ({
|
|
165
|
+
sdk: e,
|
|
166
|
+
contentId: i,
|
|
167
|
+
contentName: r,
|
|
168
|
+
brandingColors: o,
|
|
169
|
+
brandingUrls: s,
|
|
170
|
+
campaignId: a,
|
|
171
|
+
campaignName: l,
|
|
172
|
+
startGame: u,
|
|
173
|
+
fields: h = ["fullName", "email"],
|
|
174
|
+
leadTitle: f,
|
|
175
|
+
leadDescription: d,
|
|
176
|
+
leadCta: m,
|
|
177
|
+
leadSuccessTitle: y,
|
|
178
|
+
leadSuccessDescription: g,
|
|
179
|
+
syncWithProfile: b = !1,
|
|
180
|
+
consents: P,
|
|
181
|
+
isAfterPosition: S = !1,
|
|
182
|
+
isSubmittingParticipation: q = !1
|
|
183
|
+
}) => {
|
|
184
|
+
const { t: v } = E(), A = f ?? v("leads.header.title"), C = d ?? v("leads.header.description"), R = m ?? v("leads.buttons.submit"), F = y ?? v("leads.success.title"), w = g ?? v("leads.success.description"), I = {
|
|
185
|
+
defaultLabel: v(S ? "personalityQuiz.buttons.finish" : "personalityQuiz.buttons.start"),
|
|
186
|
+
onClick: u
|
|
187
|
+
};
|
|
188
|
+
return /* @__PURE__ */ t(
|
|
189
|
+
Si,
|
|
190
|
+
{
|
|
191
|
+
sdk: e,
|
|
192
|
+
content: {
|
|
193
|
+
id: i,
|
|
194
|
+
type: "personality-quiz",
|
|
195
|
+
name: r
|
|
196
|
+
},
|
|
197
|
+
onSuccessCta: I,
|
|
198
|
+
branding: {
|
|
199
|
+
colors: o,
|
|
200
|
+
urls: s
|
|
201
|
+
},
|
|
202
|
+
campaign: {
|
|
203
|
+
id: a,
|
|
204
|
+
name: l
|
|
205
|
+
},
|
|
206
|
+
fields: h,
|
|
207
|
+
labels: {
|
|
208
|
+
title: A,
|
|
209
|
+
description: C,
|
|
210
|
+
submitButtonLabel: R,
|
|
211
|
+
successTitle: F,
|
|
212
|
+
successDescription: w
|
|
213
|
+
},
|
|
214
|
+
syncWithProfile: b,
|
|
215
|
+
consents: P,
|
|
216
|
+
isSubmittingParticipation: q
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
}, rn = {
|
|
220
|
+
paddingBlock: "10px",
|
|
221
|
+
paddingRight: "12px",
|
|
222
|
+
paddingLeft: "16px",
|
|
223
|
+
borderRadius: "var(--fu-ucrc-radius-xl)",
|
|
224
|
+
fontSize: "0.9375em",
|
|
225
|
+
backgroundColor: "var(--fu-ucrc-pq-next)",
|
|
226
|
+
color: "var(--fu-ucrc-primary-on-primary)",
|
|
227
|
+
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
228
|
+
transform: "scale(1)",
|
|
229
|
+
"&:hover": { transform: "scale(1.02)" },
|
|
230
|
+
"&:active": { transform: "scale(0.98)" },
|
|
231
|
+
"&:disabled": { opacity: "34%" }
|
|
232
|
+
}, Je = {
|
|
233
|
+
root: n(pe, rn),
|
|
234
|
+
// Joy's `ml: { md: "auto" }`.
|
|
235
|
+
rootEnd: n(pe, rn, { marginLeft: "auto" }),
|
|
236
|
+
label: n({
|
|
237
|
+
margin: 0,
|
|
238
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
239
|
+
fontWeight: 500,
|
|
240
|
+
fontSize: "0.9375em",
|
|
241
|
+
lineHeight: "24px",
|
|
242
|
+
letterSpacing: "0.46px",
|
|
243
|
+
textTransform: "uppercase",
|
|
244
|
+
color: "var(--fu-ucrc-primary-on-primary)",
|
|
245
|
+
gap: "8px",
|
|
246
|
+
display: "flex",
|
|
247
|
+
alignItems: "center"
|
|
248
|
+
}),
|
|
249
|
+
// Joy's endDecorator: an 8px gap; icons sized and coloured like the label.
|
|
250
|
+
decorator: n({
|
|
251
|
+
display: "flex",
|
|
252
|
+
marginLeft: "8px",
|
|
253
|
+
"--Icon-fontSize": "1em",
|
|
254
|
+
"--Icon-color": "var(--fu-ucrc-primary-on-primary)"
|
|
255
|
+
})
|
|
256
|
+
}, Hi = { "--Icon-margin": "0 -4px 0 0" }, Mi = (e) => /* @__PURE__ */ x(
|
|
257
|
+
"button",
|
|
258
|
+
{
|
|
259
|
+
type: "button",
|
|
260
|
+
css: e.pushToEnd ? Je.rootEnd : Je.root,
|
|
261
|
+
style: {
|
|
262
|
+
"--fu-ucrc-pq-next": e.primaryColor,
|
|
263
|
+
"--fu-ucrc-primary-on-primary": e.onPrimaryColor,
|
|
264
|
+
"--fu-ucrc-radius-xl": e.radius
|
|
265
|
+
},
|
|
266
|
+
disabled: e.isLoading || e.disabled,
|
|
267
|
+
onClick: e.onClick,
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ t("p", { css: Je.label, children: e.label }),
|
|
270
|
+
/* @__PURE__ */ t("span", { css: Je.decorator, style: Hi, children: e.endDecorator }),
|
|
271
|
+
e.isLoading && /* @__PURE__ */ t(Nn, { size: 20, thickness: 3 })
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
), It = (e) => `var(--fu-ucrc-space-${e})`, on = { display: "flex", alignItems: "center", gap: It("md") }, ln = { gap: "8px", alignItems: "flex-start", justifyContent: "center" }, sn = {
|
|
275
|
+
...ye,
|
|
276
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
277
|
+
lineHeight: "150%",
|
|
278
|
+
letterSpacing: "0.15px",
|
|
279
|
+
fontWeight: 500,
|
|
280
|
+
fontSize: "1.25em",
|
|
281
|
+
textAlign: "center",
|
|
282
|
+
color: "var(--fu-ucrc-pq-ovl-text)"
|
|
283
|
+
}, Ie = {
|
|
284
|
+
// A blurred panel over the artwork, tinted by the content background at half opacity.
|
|
285
|
+
content: n({
|
|
286
|
+
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
287
|
+
padding: It("md"),
|
|
288
|
+
display: "flex",
|
|
289
|
+
flexDirection: "column",
|
|
290
|
+
gap: It("md"),
|
|
291
|
+
backdropFilter: "blur(4px)",
|
|
292
|
+
position: "relative",
|
|
293
|
+
"&::before": {
|
|
294
|
+
content: '""',
|
|
295
|
+
position: "absolute",
|
|
296
|
+
top: 0,
|
|
297
|
+
left: 0,
|
|
298
|
+
right: 0,
|
|
299
|
+
bottom: 0,
|
|
300
|
+
backgroundColor: "var(--fu-ucrc-pq-ovl-content-bg)",
|
|
301
|
+
opacity: 0.5,
|
|
302
|
+
borderRadius: "inherit",
|
|
303
|
+
zIndex: 0
|
|
304
|
+
},
|
|
305
|
+
"& > *": { position: "relative", zIndex: 1 }
|
|
306
|
+
}),
|
|
307
|
+
imageBox: n({ borderRadius: "var(--fu-ucrc-radius-sm)", overflow: "hidden" }),
|
|
308
|
+
question: n(ln, { display: "flex" }),
|
|
309
|
+
questionBlock: n(ln, { display: "block" }),
|
|
310
|
+
steps: n(sn, { opacity: "70%" }),
|
|
311
|
+
questionText: n(sn),
|
|
312
|
+
footer: n(on, { justifyContent: "space-between", flexDirection: "row" }),
|
|
313
|
+
footerMobile: n(on, { justifyContent: "center", flexDirection: "column-reverse" })
|
|
314
|
+
}, Ei = { width: "100%", height: "100%", objectFit: "cover" }, Wi = (e) => {
|
|
315
|
+
var F, w, I, D, z, k, L, G, c, Q, $, B, J, K, ee, oe, le, ge, ie, _;
|
|
316
|
+
const [i, r] = rt.useState(
|
|
317
|
+
((F = e.leads) == null ? void 0 : F.position) === "before" && e.personalityQuiz.authRequirement === "LEAD"
|
|
318
|
+
), { optionsLayout: o } = qt(Lt), s = te(), a = it(e.question.images), { t: l } = E(), u = N(), h = Dt(), f = de("md"), { brandingImage: d, brandingColors: m, brandingLogo: y } = _e(
|
|
319
|
+
e.personalityQuiz.branding || null
|
|
320
|
+
), g = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : u ? Qe : Pe, b = xe(
|
|
321
|
+
{ images: e.personalityQuiz.images, imagePlaceholder: g },
|
|
322
|
+
j.OVERLAY
|
|
323
|
+
), P = d || b, S = e.currentQuestion === e.personalityQuiz.questions.length && (((w = e.leads) == null ? void 0 : w.position) === "after" || e.hasAfterConsents) ? l("personalityQuiz.buttons.continue") : e.currentQuestion === e.personalityQuiz.questions.length ? l("personalityQuiz.buttons.finish") : l("personalityQuiz.buttons.next"), q = s.colorSchemes.dark, v = s.colorSchemes.light, A = (m == null ? void 0 : m.primaryColor) || v.palette.primary.plainColor, C = {
|
|
324
|
+
"--fu-ucrc-pq-ovl-content-bg": (m == null ? void 0 : m.backgroundColor) || q.surfaceVariant,
|
|
325
|
+
"--fu-ucrc-pq-ovl-text": q.textColor
|
|
326
|
+
}, R = () => {
|
|
327
|
+
r(!1);
|
|
328
|
+
};
|
|
329
|
+
return /* @__PURE__ */ x(
|
|
330
|
+
zi,
|
|
331
|
+
{
|
|
332
|
+
entity: e.personalityQuiz,
|
|
333
|
+
headline: l("personalityQuiz.headline"),
|
|
334
|
+
finalImage: P,
|
|
335
|
+
rulesDisplay: e.rulesDisplay,
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ t("div", { css: Ie.content, style: C, children: e.applyConsentGate ? /* @__PURE__ */ t(
|
|
338
|
+
Me,
|
|
339
|
+
{
|
|
340
|
+
consents: e.consents,
|
|
341
|
+
primaryColor: A,
|
|
342
|
+
textColor: (m == null ? void 0 : m.contentColor) || q.textColor,
|
|
343
|
+
brandingUrls: (I = e.personalityQuiz.branding) == null ? void 0 : I.urls
|
|
344
|
+
}
|
|
345
|
+
) : i ? /* @__PURE__ */ t(
|
|
346
|
+
Ee,
|
|
347
|
+
{
|
|
348
|
+
sdk: e.sdk,
|
|
349
|
+
startGame: R,
|
|
350
|
+
contentId: e.personalityQuiz.id,
|
|
351
|
+
contentName: e.personalityQuiz.title,
|
|
352
|
+
brandingColors: (D = e.personalityQuiz.branding) == null ? void 0 : D.colors,
|
|
353
|
+
brandingUrls: (z = e.personalityQuiz.branding) == null ? void 0 : z.urls,
|
|
354
|
+
campaignId: (k = e.leads) == null ? void 0 : k.campaignId,
|
|
355
|
+
campaignName: (L = e.leads) == null ? void 0 : L.campaignName,
|
|
356
|
+
fields: (G = e.leads) == null ? void 0 : G.fields,
|
|
357
|
+
leadTitle: (c = e.personalityQuiz.labels) == null ? void 0 : c.leadTitle,
|
|
358
|
+
leadDescription: (Q = e.personalityQuiz.labels) == null ? void 0 : Q.leadDescription,
|
|
359
|
+
leadCta: ($ = e.personalityQuiz.labels) == null ? void 0 : $.leadCta,
|
|
360
|
+
leadSuccessTitle: (B = e.personalityQuiz.labels) == null ? void 0 : B.leadSuccessTitle,
|
|
361
|
+
leadSuccessDescription: (J = e.personalityQuiz.labels) == null ? void 0 : J.leadSuccessDescription,
|
|
362
|
+
consents: e.leadConsents
|
|
363
|
+
}
|
|
364
|
+
) : /* @__PURE__ */ x(He, { children: [
|
|
365
|
+
a && /* @__PURE__ */ t(lt, { ratio: "16/9", radius: "var(--fu-ucrc-radius-sm)", children: /* @__PURE__ */ t("div", { css: Ie.imageBox, children: /* @__PURE__ */ t("img", { src: a, alt: "Question illustration", style: Ei }) }) }),
|
|
366
|
+
/* @__PURE__ */ x("div", { css: h ? Ie.questionBlock : Ie.question, children: [
|
|
367
|
+
/* @__PURE__ */ x("p", { css: Ie.steps, children: [
|
|
368
|
+
e.currentQuestion,
|
|
369
|
+
"/",
|
|
370
|
+
e.personalityQuiz.questions.length
|
|
371
|
+
] }),
|
|
372
|
+
/* @__PURE__ */ t("p", { css: Ie.questionText, children: e.question.question })
|
|
373
|
+
] }),
|
|
374
|
+
/* @__PURE__ */ t(
|
|
375
|
+
Ot,
|
|
376
|
+
{
|
|
377
|
+
options: e.question.options || [],
|
|
378
|
+
answerQuestion: e.answerQuestion,
|
|
379
|
+
selectedOption: e.selectedOption,
|
|
380
|
+
optionsLayout: h ? "column" : o ?? "row",
|
|
381
|
+
questionImage: a,
|
|
382
|
+
brandingColors: m
|
|
383
|
+
}
|
|
384
|
+
)
|
|
385
|
+
] }) }),
|
|
386
|
+
/* @__PURE__ */ x("div", { css: u ? Ie.footerMobile : Ie.footer, children: [
|
|
387
|
+
/* @__PURE__ */ t(
|
|
388
|
+
O,
|
|
389
|
+
{
|
|
390
|
+
brandingLogo: y,
|
|
391
|
+
textColor: q.textColor,
|
|
392
|
+
label: ((K = e.personalityQuiz.labels) == null ? void 0 : K.sponsor) || null,
|
|
393
|
+
primaryUrl: (oe = (ee = e.personalityQuiz.branding) == null ? void 0 : ee.urls) == null ? void 0 : oe.primaryUrl,
|
|
394
|
+
secondaryUrl: (ge = (le = e.personalityQuiz.branding) == null ? void 0 : le.urls) == null ? void 0 : ge.secondaryUrl
|
|
395
|
+
}
|
|
396
|
+
),
|
|
397
|
+
e.applyConsentGate ? /* @__PURE__ */ t(
|
|
398
|
+
st,
|
|
399
|
+
{
|
|
400
|
+
onClick: e.startPlaying,
|
|
401
|
+
label: ((_ = (ie = e.consents) == null ? void 0 : ie.labels) == null ? void 0 : _.ctaLabel) || l("personalityQuiz.buttons.start"),
|
|
402
|
+
isSubmitting: e.isSubmitting,
|
|
403
|
+
primaryColor: A,
|
|
404
|
+
showArrow: !0
|
|
405
|
+
}
|
|
406
|
+
) : !i && /* @__PURE__ */ t(
|
|
407
|
+
Mi,
|
|
408
|
+
{
|
|
409
|
+
label: S,
|
|
410
|
+
primaryColor: A,
|
|
411
|
+
onPrimaryColor: v.palette.primary.onPrimary,
|
|
412
|
+
radius: s.customRadius.light.xl,
|
|
413
|
+
pushToEnd: !u && f,
|
|
414
|
+
disabled: e.selectedOption === null,
|
|
415
|
+
isLoading: e.isLoading,
|
|
416
|
+
onClick: e.handleNext,
|
|
417
|
+
endDecorator: /* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(Et, {}) })
|
|
418
|
+
}
|
|
419
|
+
)
|
|
420
|
+
] })
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
}, xt = {
|
|
425
|
+
root: n(pe, {
|
|
426
|
+
alignSelf: "center",
|
|
427
|
+
paddingBlock: "10px",
|
|
428
|
+
paddingRight: "12px",
|
|
429
|
+
paddingLeft: "16px",
|
|
430
|
+
borderRadius: "var(--fu-ucrc-radius-xl)",
|
|
431
|
+
fontSize: "0.9375em",
|
|
432
|
+
backgroundColor: "var(--fu-ucrc-pq-button)",
|
|
433
|
+
color: "var(--fu-ucrc-primary-on-primary)",
|
|
434
|
+
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
435
|
+
transform: "scale(1)",
|
|
436
|
+
"&:hover": { transform: "scale(1.02)" },
|
|
437
|
+
"&:active": { transform: "scale(0.98)" },
|
|
438
|
+
"&:disabled": { opacity: "12%" }
|
|
439
|
+
}),
|
|
440
|
+
label: n({
|
|
441
|
+
margin: 0,
|
|
442
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
443
|
+
fontWeight: 500,
|
|
444
|
+
fontSize: "0.9375em",
|
|
445
|
+
lineHeight: "24px",
|
|
446
|
+
letterSpacing: "0.46px",
|
|
447
|
+
textTransform: "uppercase",
|
|
448
|
+
color: "var(--fu-ucrc-primary-on-primary)",
|
|
449
|
+
gap: "8px",
|
|
450
|
+
display: "flex",
|
|
451
|
+
alignItems: "center"
|
|
452
|
+
}),
|
|
453
|
+
// Joy's endDecorator: an 8px gap; icons sized and coloured like the label.
|
|
454
|
+
decorator: n({
|
|
455
|
+
display: "flex",
|
|
456
|
+
marginLeft: "8px",
|
|
457
|
+
"--Icon-fontSize": "1em",
|
|
458
|
+
"--Icon-color": "var(--fu-ucrc-primary-on-primary)"
|
|
459
|
+
})
|
|
460
|
+
}, Oi = { "--Icon-margin": "0 -4px 0 0" }, Kn = (e) => /* @__PURE__ */ x(
|
|
461
|
+
"button",
|
|
462
|
+
{
|
|
463
|
+
type: "button",
|
|
464
|
+
css: xt.root,
|
|
465
|
+
style: { "--fu-ucrc-pq-button": e.buttonColor },
|
|
466
|
+
disabled: e.isLoading || e.selectedOption === null,
|
|
467
|
+
onClick: e.onClick,
|
|
468
|
+
children: [
|
|
469
|
+
/* @__PURE__ */ t("p", { css: xt.label, children: e.label }),
|
|
470
|
+
e.endDecorator && /* @__PURE__ */ t("span", { css: xt.decorator, style: Oi, children: e.endDecorator }),
|
|
471
|
+
e.isLoading && /* @__PURE__ */ t(Nn, { size: 20, thickness: 3 })
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
), cn = {
|
|
475
|
+
root: n({ display: "flex", justifyContent: "center", gap: "8px", paddingBlock: "var(--fu-ucrc-space-xs)" }),
|
|
476
|
+
step: n({
|
|
477
|
+
maxWidth: "82.67px",
|
|
478
|
+
width: "100%",
|
|
479
|
+
height: "8px",
|
|
480
|
+
borderRadius: "var(--fu-ucrc-pq-step-radius)",
|
|
481
|
+
borderWidth: "1px",
|
|
482
|
+
borderStyle: "solid",
|
|
483
|
+
transition: "background-color 0.3s ease"
|
|
484
|
+
})
|
|
485
|
+
}, Vi = (e) => {
|
|
486
|
+
const i = te(), r = i.colorSchemes.light, o = (s) => {
|
|
487
|
+
const a = s + 1;
|
|
488
|
+
return a < e.currentQuestion ? [r.palette.success.plainColor, r.palette.success.outlinedBorder] : a === e.currentQuestion ? [
|
|
489
|
+
e.brandingPrimaryColor || r.palette.primary.plainColor,
|
|
490
|
+
e.brandingPrimaryColor || r.palette.primary.outlinedBorder
|
|
491
|
+
] : [r.secondaryContainer, r.outlineEnabledBorder];
|
|
492
|
+
};
|
|
493
|
+
return /* @__PURE__ */ t("div", { css: cn.root, style: { "--fu-ucrc-pq-step-radius": i.customRadius.light.full }, children: Array.from({ length: e.personalityQuiz.questions.length }, (s, a) => {
|
|
494
|
+
const [l, u] = o(a);
|
|
495
|
+
return /* @__PURE__ */ t("div", { css: cn.step, style: { backgroundColor: l, borderColor: u } }, `step-${a + 1}`);
|
|
496
|
+
}) });
|
|
497
|
+
}, un = {
|
|
498
|
+
display: "flex",
|
|
499
|
+
width: "100%",
|
|
500
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
501
|
+
border: "var(--fu-ucrc-border-size) solid var(--fu-ucrc-pq-card-border, var(--fu-ucrc-secondary-container))",
|
|
502
|
+
overflow: "hidden",
|
|
503
|
+
background: "var(--fu-ucrc-surface)",
|
|
504
|
+
minHeight: "250px"
|
|
505
|
+
}, dn = {
|
|
506
|
+
row: n({ ...un, flexDirection: "row" }),
|
|
507
|
+
column: n({ ...un, flexDirection: "column" })
|
|
508
|
+
}, Z = ({ children: e, brandingBorderColor: i }) => {
|
|
509
|
+
const r = N();
|
|
510
|
+
return /* @__PURE__ */ t(
|
|
511
|
+
"div",
|
|
512
|
+
{
|
|
513
|
+
css: r ? dn.column : dn.row,
|
|
514
|
+
style: i ? { "--fu-ucrc-pq-card-border": i } : void 0,
|
|
515
|
+
children: e
|
|
516
|
+
}
|
|
517
|
+
);
|
|
518
|
+
}, ue = (e) => `var(--fu-ucrc-space-${e})`, Ge = { display: "flex", flexDirection: "column" }, et = {
|
|
519
|
+
display: "flex",
|
|
520
|
+
alignItems: "center",
|
|
521
|
+
gap: ue("lg")
|
|
522
|
+
}, H = {
|
|
523
|
+
pagination: n({ ...Ge, gap: ue("md"), paddingInline: ue("md") }),
|
|
524
|
+
area: n({ ...Ge, padding: ue("md") }),
|
|
525
|
+
question: n({ ...Ge, gap: ue("md") }),
|
|
526
|
+
questionNarrow: n({ ...Ge, gap: ue("lg") }),
|
|
527
|
+
content: n({
|
|
528
|
+
...Ge,
|
|
529
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
530
|
+
paddingInline: ue("md"),
|
|
531
|
+
paddingTop: ue("md"),
|
|
532
|
+
paddingBottom: ue("lg"),
|
|
533
|
+
gap: ue("md"),
|
|
534
|
+
backgroundColor: "var(--fu-ucrc-pq-content-bg)",
|
|
535
|
+
backdropFilter: "blur(4px)"
|
|
536
|
+
}),
|
|
537
|
+
imageBox: n({
|
|
538
|
+
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
539
|
+
overflow: "hidden"
|
|
540
|
+
}),
|
|
541
|
+
textRow: n({ gap: "8px", display: "flex", justifyContent: "center" }),
|
|
542
|
+
text: n({
|
|
543
|
+
...ye,
|
|
544
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
545
|
+
lineHeight: "150%",
|
|
546
|
+
letterSpacing: "0.15px",
|
|
547
|
+
fontWeight: 500,
|
|
548
|
+
fontSize: "1.25em",
|
|
549
|
+
textAlign: "center",
|
|
550
|
+
color: "var(--fu-ucrc-pq-text)"
|
|
551
|
+
}),
|
|
552
|
+
footer: n({ ...et, justifyContent: "space-between" }),
|
|
553
|
+
footerEnd: n({ ...et, justifyContent: "flex-end" }),
|
|
554
|
+
footerColumn: n({
|
|
555
|
+
...et,
|
|
556
|
+
flexDirection: "column",
|
|
557
|
+
justifyContent: "space-between"
|
|
558
|
+
}),
|
|
559
|
+
footerColumnEnd: n({
|
|
560
|
+
...et,
|
|
561
|
+
flexDirection: "column",
|
|
562
|
+
justifyContent: "flex-end"
|
|
563
|
+
}),
|
|
564
|
+
navigation: n({
|
|
565
|
+
display: "flex",
|
|
566
|
+
gap: ue("md"),
|
|
567
|
+
justifyContent: "center",
|
|
568
|
+
alignItems: "center"
|
|
569
|
+
})
|
|
570
|
+
}, ji = {
|
|
571
|
+
width: "100%",
|
|
572
|
+
height: "100%",
|
|
573
|
+
objectFit: "cover"
|
|
574
|
+
}, Gi = (e) => {
|
|
575
|
+
var D, z, k, L, G, c;
|
|
576
|
+
const [i, r] = rt.useState(
|
|
577
|
+
((D = e.leads) == null ? void 0 : D.position) === "before" && e.personalityQuiz.authRequirement === "LEAD"
|
|
578
|
+
), { optionsLayout: o } = qt(Lt), s = it(e.question.images), { t: a } = E(), l = N(), u = fi(), h = de("md"), f = ae(), d = ((z = e.personalityQuiz.branding) == null ? void 0 : z.colors) || null, m = l ? ((k = e.personalityQuiz.branding) == null ? void 0 : k.images.mobileLogo) || ((L = e.personalityQuiz.branding) == null ? void 0 : L.images.mainLogo) || "" : ((G = e.personalityQuiz.branding) == null ? void 0 : G.images.mainLogo) || "", y = e.imagePosition || "left", g = xe(
|
|
579
|
+
{
|
|
580
|
+
images: e.personalityQuiz.images,
|
|
581
|
+
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
582
|
+
},
|
|
583
|
+
j.STANDARD
|
|
584
|
+
), b = e.currentQuestion === e.personalityQuiz.questions.length && (((c = e.leads) == null ? void 0 : c.position) === "after" || e.hasAfterConsents) ? a("personalityQuiz.buttons.continue") : e.currentQuestion === e.personalityQuiz.questions.length ? a("personalityQuiz.buttons.finish") : a("personalityQuiz.buttons.next"), P = u || l && !!g, S = (d == null ? void 0 : d.contentColor) || f.textColor, q = Ye(
|
|
585
|
+
(d == null ? void 0 : d.backgroundColor) || f.surfaceVariant || ""
|
|
586
|
+
), v = (d == null ? void 0 : d.primaryColor) || f.palette.primary.plainColor, A = {
|
|
587
|
+
"--fu-ucrc-pq-text": S,
|
|
588
|
+
"--fu-ucrc-pq-content-bg": `rgba(${q ? q.replace(/[^\d,]/g, "") : ""}, 0.5)`
|
|
589
|
+
}, C = () => {
|
|
590
|
+
r(!1);
|
|
591
|
+
}, R = (Q) => {
|
|
592
|
+
var $, B, J, K, ee;
|
|
593
|
+
return /* @__PURE__ */ t(
|
|
594
|
+
O,
|
|
595
|
+
{
|
|
596
|
+
brandingLogo: m,
|
|
597
|
+
textColor: Q,
|
|
598
|
+
label: (($ = e.personalityQuiz.labels) == null ? void 0 : $.sponsor) || null,
|
|
599
|
+
primaryUrl: (J = (B = e.personalityQuiz.branding) == null ? void 0 : B.urls) == null ? void 0 : J.primaryUrl,
|
|
600
|
+
secondaryUrl: (ee = (K = e.personalityQuiz.branding) == null ? void 0 : K.urls) == null ? void 0 : ee.secondaryUrl
|
|
601
|
+
}
|
|
602
|
+
);
|
|
603
|
+
}, F = () => {
|
|
604
|
+
var Q, $, B;
|
|
605
|
+
return /* @__PURE__ */ t("div", { css: H.area, style: A, children: /* @__PURE__ */ x("div", { css: h ? H.question : H.questionNarrow, children: [
|
|
606
|
+
/* @__PURE__ */ t("div", { css: H.content, children: /* @__PURE__ */ t(
|
|
607
|
+
Me,
|
|
608
|
+
{
|
|
609
|
+
consents: e.consents,
|
|
610
|
+
primaryColor: v,
|
|
611
|
+
textColor: S,
|
|
612
|
+
brandingUrls: (Q = e.personalityQuiz.branding) == null ? void 0 : Q.urls,
|
|
613
|
+
align: "center"
|
|
614
|
+
}
|
|
615
|
+
) }),
|
|
616
|
+
/* @__PURE__ */ x(
|
|
617
|
+
"div",
|
|
618
|
+
{
|
|
619
|
+
css: P ? m ? H.footerColumn : H.footerColumnEnd : m ? H.footer : H.footerEnd,
|
|
620
|
+
children: [
|
|
621
|
+
m && !P && R(S),
|
|
622
|
+
/* @__PURE__ */ t("div", { css: H.navigation, children: /* @__PURE__ */ t(
|
|
623
|
+
st,
|
|
624
|
+
{
|
|
625
|
+
onClick: e.startPlaying,
|
|
626
|
+
label: ((B = ($ = e.consents) == null ? void 0 : $.labels) == null ? void 0 : B.ctaLabel) || a("personalityQuiz.buttons.start"),
|
|
627
|
+
isSubmitting: e.isSubmitting,
|
|
628
|
+
primaryColor: v,
|
|
629
|
+
showArrow: !0
|
|
630
|
+
}
|
|
631
|
+
) })
|
|
632
|
+
]
|
|
633
|
+
}
|
|
634
|
+
),
|
|
635
|
+
m && P && R(S)
|
|
636
|
+
] }) });
|
|
637
|
+
}, w = () => {
|
|
638
|
+
var Q, $, B, J, K, ee, oe, le, ge, ie, _;
|
|
639
|
+
return /* @__PURE__ */ t("div", { css: H.area, style: A, children: /* @__PURE__ */ x("div", { css: h ? H.question : H.questionNarrow, children: [
|
|
640
|
+
/* @__PURE__ */ t("div", { css: H.content, children: /* @__PURE__ */ t(
|
|
641
|
+
Ee,
|
|
642
|
+
{
|
|
643
|
+
sdk: e.sdk,
|
|
644
|
+
startGame: C,
|
|
645
|
+
contentId: e.personalityQuiz.id,
|
|
646
|
+
contentName: e.personalityQuiz.title,
|
|
647
|
+
brandingColors: (Q = e.personalityQuiz.branding) == null ? void 0 : Q.colors,
|
|
648
|
+
brandingUrls: ($ = e.personalityQuiz.branding) == null ? void 0 : $.urls,
|
|
649
|
+
campaignId: (B = e.leads) == null ? void 0 : B.campaignId,
|
|
650
|
+
campaignName: (J = e.leads) == null ? void 0 : J.campaignName,
|
|
651
|
+
fields: (K = e.leads) == null ? void 0 : K.fields,
|
|
652
|
+
leadTitle: (ee = e.personalityQuiz.labels) == null ? void 0 : ee.leadTitle,
|
|
653
|
+
leadDescription: (oe = e.personalityQuiz.labels) == null ? void 0 : oe.leadDescription,
|
|
654
|
+
leadCta: (le = e.personalityQuiz.labels) == null ? void 0 : le.leadCta,
|
|
655
|
+
leadSuccessTitle: (ge = e.personalityQuiz.labels) == null ? void 0 : ge.leadSuccessTitle,
|
|
656
|
+
leadSuccessDescription: (ie = e.personalityQuiz.labels) == null ? void 0 : ie.leadSuccessDescription,
|
|
657
|
+
syncWithProfile: (_ = e.leads) == null ? void 0 : _.syncWithProfile,
|
|
658
|
+
consents: e.leadConsents
|
|
659
|
+
}
|
|
660
|
+
) }),
|
|
661
|
+
R(S)
|
|
662
|
+
] }) });
|
|
663
|
+
}, I = () => /* @__PURE__ */ x(He, { children: [
|
|
664
|
+
/* @__PURE__ */ t("div", { css: H.pagination, children: /* @__PURE__ */ t(
|
|
665
|
+
Vi,
|
|
666
|
+
{
|
|
667
|
+
personalityQuiz: e.personalityQuiz,
|
|
668
|
+
currentQuestion: e.currentQuestion,
|
|
669
|
+
userParticipation: e.userParticipation,
|
|
670
|
+
brandingPrimaryColor: d == null ? void 0 : d.primaryColor
|
|
671
|
+
}
|
|
672
|
+
) }),
|
|
673
|
+
/* @__PURE__ */ t("div", { css: H.area, style: A, children: /* @__PURE__ */ x("div", { css: h ? H.question : H.questionNarrow, children: [
|
|
674
|
+
/* @__PURE__ */ x("div", { css: H.content, children: [
|
|
675
|
+
s && /* @__PURE__ */ t(lt, { ratio: "16/9", radius: "var(--fu-ucrc-radius-sm)", children: /* @__PURE__ */ t("div", { css: H.imageBox, children: /* @__PURE__ */ t(
|
|
676
|
+
"img",
|
|
677
|
+
{
|
|
678
|
+
src: s,
|
|
679
|
+
alt: "Question illustration",
|
|
680
|
+
style: ji
|
|
681
|
+
}
|
|
682
|
+
) }) }),
|
|
683
|
+
/* @__PURE__ */ t("div", { css: H.textRow, children: /* @__PURE__ */ t("p", { css: H.text, children: e.question.question }) }),
|
|
684
|
+
/* @__PURE__ */ t(
|
|
685
|
+
Ot,
|
|
686
|
+
{
|
|
687
|
+
options: e.question.options || [],
|
|
688
|
+
answerQuestion: e.answerQuestion,
|
|
689
|
+
selectedOption: e.selectedOption,
|
|
690
|
+
optionsLayout: o ?? "twoByTwo",
|
|
691
|
+
questionImage: s,
|
|
692
|
+
brandingColors: d
|
|
693
|
+
}
|
|
694
|
+
)
|
|
695
|
+
] }),
|
|
696
|
+
/* @__PURE__ */ x(
|
|
697
|
+
"div",
|
|
698
|
+
{
|
|
699
|
+
css: P ? m ? H.footerColumn : H.footerColumnEnd : m ? H.footer : H.footerEnd,
|
|
700
|
+
children: [
|
|
701
|
+
m && !P && R(S),
|
|
702
|
+
/* @__PURE__ */ t("div", { css: H.navigation, children: /* @__PURE__ */ t(
|
|
703
|
+
Kn,
|
|
704
|
+
{
|
|
705
|
+
selectedOption: e.selectedOption,
|
|
706
|
+
endDecorator: /* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(Et, {}) }),
|
|
707
|
+
label: b,
|
|
708
|
+
buttonColor: v,
|
|
709
|
+
onClick: e.handleNext,
|
|
710
|
+
isLoading: e.isLoading
|
|
711
|
+
}
|
|
712
|
+
) })
|
|
713
|
+
]
|
|
714
|
+
}
|
|
715
|
+
),
|
|
716
|
+
m && P && R(S)
|
|
717
|
+
] }) })
|
|
718
|
+
] });
|
|
719
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ t(
|
|
720
|
+
wi,
|
|
721
|
+
{
|
|
722
|
+
entity: e.personalityQuiz,
|
|
723
|
+
headline: a("personalityQuiz.headline"),
|
|
724
|
+
finalImage: g,
|
|
725
|
+
imagePosition: y,
|
|
726
|
+
rulesDisplay: e.rulesDisplay,
|
|
727
|
+
children: e.applyConsentGate ? F() : i ? w() : I()
|
|
728
|
+
}
|
|
729
|
+
) });
|
|
730
|
+
}, Se = (e) => `var(--fu-ucrc-space-${e})`, St = "var(--fu-ucrc-radius-sm)", gn = {
|
|
731
|
+
margin: 0,
|
|
732
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
733
|
+
lineHeight: "150%",
|
|
734
|
+
letterSpacing: "0.15px",
|
|
735
|
+
fontWeight: 500,
|
|
736
|
+
fontSize: "1.25em",
|
|
737
|
+
textAlign: "center"
|
|
738
|
+
}, se = {
|
|
739
|
+
questionArea: n({ width: "100%", justifyContent: "center", display: "flex", flexDirection: "column" }),
|
|
740
|
+
questionAreaContent: n({
|
|
741
|
+
padding: Se("md"),
|
|
742
|
+
display: "flex",
|
|
743
|
+
flexDirection: "column",
|
|
744
|
+
justifyContent: "center",
|
|
745
|
+
gap: Se("md")
|
|
746
|
+
}),
|
|
747
|
+
// Translucent panel over the card, from the branding background: `--fu-ucrc-pq-split-bg`.
|
|
748
|
+
panel: n({
|
|
749
|
+
padding: Se("md"),
|
|
750
|
+
gap: Se("md"),
|
|
751
|
+
display: "flex",
|
|
752
|
+
flexDirection: "column",
|
|
753
|
+
backdropFilter: "blur(4px)",
|
|
754
|
+
backgroundColor: "var(--fu-ucrc-pq-split-bg)",
|
|
755
|
+
borderRadius: St
|
|
756
|
+
}),
|
|
757
|
+
// Joy's `height: auto` lost to the AspectRatio's child rule.
|
|
758
|
+
questionImage: n({ borderRadius: St, overflow: "hidden" }),
|
|
759
|
+
questionSection: n({ gap: Se("2xs"), display: "flex", flexDirection: "column", justifyContent: "center" }),
|
|
760
|
+
questionSteps: n(gn, { color: "var(--fu-ucrc-pq-split-secondary)", opacity: "60%" }),
|
|
761
|
+
questionText: n(gn, { color: "var(--fu-ucrc-text-color)" }),
|
|
762
|
+
buttonFooter: n({ display: "flex", flexDirection: "column", gap: Se("lg") }),
|
|
763
|
+
presentedBy: n({ marginBottom: Se("lg"), paddingInline: Se("lg") })
|
|
764
|
+
}, Ni = { width: "100%", height: "100%", objectFit: "cover" }, _i = (e) => {
|
|
765
|
+
var w, I, D, z, k, L, G, c, Q, $, B, J, K, ee, oe, le, ge, ie, _;
|
|
766
|
+
const [i, r] = rt.useState(
|
|
767
|
+
((w = e.leads) == null ? void 0 : w.position) === "before" && e.personalityQuiz.authRequirement === "LEAD"
|
|
768
|
+
), { optionsLayout: o } = qt(Lt), s = te(), a = ae(), l = N(), u = Dt(), h = de("md"), f = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : l ? Qe : Pe, d = xe(
|
|
769
|
+
{
|
|
770
|
+
images: e.personalityQuiz.images,
|
|
771
|
+
imagePlaceholder: f
|
|
772
|
+
},
|
|
773
|
+
j.SPLIT
|
|
774
|
+
), m = it(e.question.images), { t: y } = E(), g = ((I = e.personalityQuiz.branding) == null ? void 0 : I.colors) || null, b = l ? ((D = e.personalityQuiz.branding) == null ? void 0 : D.images.mobileLogo) || ((z = e.personalityQuiz.branding) == null ? void 0 : z.images.mainLogo) || "" : ((k = e.personalityQuiz.branding) == null ? void 0 : k.images.mainLogo) || "", P = e.currentQuestion === e.personalityQuiz.questions.length && (((L = e.leads) == null ? void 0 : L.position) === "after" || e.hasAfterConsents) ? y("personalityQuiz.buttons.continue") : e.currentQuestion === e.personalityQuiz.questions.length ? y("personalityQuiz.buttons.finish") : y("personalityQuiz.buttons.next"), S = a.textColor, q = (g == null ? void 0 : g.primaryColor) || ((c = (G = a.palette) == null ? void 0 : G.primary) == null ? void 0 : c.plainColor), v = Ye((g == null ? void 0 : g.backgroundColor) || a.surfaceVariant || ""), A = {
|
|
775
|
+
"--fu-ucrc-pq-split-secondary": (g == null ? void 0 : g.contentColor) || S,
|
|
776
|
+
"--fu-ucrc-pq-split-bg": `rgba(${v ? v.replace(/[^\d,]/g, "") : ""}, 0.5)`
|
|
777
|
+
}, C = () => {
|
|
778
|
+
r(!1);
|
|
779
|
+
}, R = (ve) => {
|
|
780
|
+
var We, Oe, qe, ct, he;
|
|
781
|
+
return /* @__PURE__ */ t(
|
|
782
|
+
O,
|
|
783
|
+
{
|
|
784
|
+
brandingLogo: b,
|
|
785
|
+
textColor: ve,
|
|
786
|
+
label: ((We = e.personalityQuiz.labels) == null ? void 0 : We.sponsor) || null,
|
|
787
|
+
primaryUrl: (qe = (Oe = e.personalityQuiz.branding) == null ? void 0 : Oe.urls) == null ? void 0 : qe.primaryUrl,
|
|
788
|
+
secondaryUrl: (he = (ct = e.personalityQuiz.branding) == null ? void 0 : ct.urls) == null ? void 0 : he.secondaryUrl
|
|
789
|
+
}
|
|
790
|
+
);
|
|
791
|
+
}, F = () => {
|
|
792
|
+
var ve;
|
|
793
|
+
return /* @__PURE__ */ t("div", { css: se.panel, children: /* @__PURE__ */ t(
|
|
794
|
+
Me,
|
|
795
|
+
{
|
|
796
|
+
consents: e.consents,
|
|
797
|
+
primaryColor: q,
|
|
798
|
+
textColor: S,
|
|
799
|
+
brandingUrls: (ve = e.personalityQuiz.branding) == null ? void 0 : ve.urls,
|
|
800
|
+
onSubmit: e.startPlaying,
|
|
801
|
+
isSubmitting: e.isSubmitting,
|
|
802
|
+
ctaLabel: y("personalityQuiz.buttons.start"),
|
|
803
|
+
align: "center",
|
|
804
|
+
showArrow: !0
|
|
805
|
+
}
|
|
806
|
+
) });
|
|
807
|
+
};
|
|
808
|
+
return /* @__PURE__ */ x(Z, { brandingBorderColor: (g == null ? void 0 : g.borderColor) || null, children: [
|
|
809
|
+
/* @__PURE__ */ t(
|
|
810
|
+
ki,
|
|
811
|
+
{
|
|
812
|
+
entity: e.personalityQuiz,
|
|
813
|
+
headline: y("personalityQuiz.headline"),
|
|
814
|
+
finalImage: d,
|
|
815
|
+
brandingLogo: b,
|
|
816
|
+
renderPresentedBy: R,
|
|
817
|
+
rulesDisplay: e.rulesDisplay,
|
|
818
|
+
children: /* @__PURE__ */ t("div", { css: se.questionArea, style: A, children: /* @__PURE__ */ x("div", { css: se.questionAreaContent, children: [
|
|
819
|
+
e.applyConsentGate ? F() : i ? /* @__PURE__ */ t("div", { css: se.panel, children: /* @__PURE__ */ t(
|
|
820
|
+
Ee,
|
|
821
|
+
{
|
|
822
|
+
sdk: e.sdk,
|
|
823
|
+
startGame: C,
|
|
824
|
+
contentId: e.personalityQuiz.id,
|
|
825
|
+
contentName: e.personalityQuiz.title,
|
|
826
|
+
brandingColors: (Q = e.personalityQuiz.branding) == null ? void 0 : Q.colors,
|
|
827
|
+
brandingUrls: ($ = e.personalityQuiz.branding) == null ? void 0 : $.urls,
|
|
828
|
+
campaignId: (B = e.leads) == null ? void 0 : B.campaignId,
|
|
829
|
+
campaignName: (J = e.leads) == null ? void 0 : J.campaignName,
|
|
830
|
+
fields: (K = e.leads) == null ? void 0 : K.fields,
|
|
831
|
+
leadTitle: (ee = e.personalityQuiz.labels) == null ? void 0 : ee.leadTitle,
|
|
832
|
+
leadDescription: (oe = e.personalityQuiz.labels) == null ? void 0 : oe.leadDescription,
|
|
833
|
+
leadCta: (le = e.personalityQuiz.labels) == null ? void 0 : le.leadCta,
|
|
834
|
+
leadSuccessTitle: (ge = e.personalityQuiz.labels) == null ? void 0 : ge.leadSuccessTitle,
|
|
835
|
+
leadSuccessDescription: (ie = e.personalityQuiz.labels) == null ? void 0 : ie.leadSuccessDescription,
|
|
836
|
+
syncWithProfile: (_ = e.leads) == null ? void 0 : _.syncWithProfile,
|
|
837
|
+
consents: e.leadConsents
|
|
838
|
+
}
|
|
839
|
+
) }) : /* @__PURE__ */ x("div", { css: se.panel, children: [
|
|
840
|
+
m && /* @__PURE__ */ t(lt, { ratio: "16/9", radius: St, children: /* @__PURE__ */ t("div", { css: se.questionImage, children: /* @__PURE__ */ t("img", { src: m, alt: "Question illustration", style: Ni }) }) }),
|
|
841
|
+
/* @__PURE__ */ x("div", { css: se.questionSection, children: [
|
|
842
|
+
/* @__PURE__ */ x("p", { css: se.questionSteps, children: [
|
|
843
|
+
e.currentQuestion,
|
|
844
|
+
"/",
|
|
845
|
+
e.personalityQuiz.questions.length
|
|
846
|
+
] }),
|
|
847
|
+
/* @__PURE__ */ t("p", { css: se.questionText, children: e.question.question })
|
|
848
|
+
] }),
|
|
849
|
+
/* @__PURE__ */ t(
|
|
850
|
+
Ot,
|
|
851
|
+
{
|
|
852
|
+
options: e.question.options || [],
|
|
853
|
+
answerQuestion: e.answerQuestion,
|
|
854
|
+
selectedOption: e.selectedOption,
|
|
855
|
+
optionsLayout: u ? "column" : o ?? "twoByTwo",
|
|
856
|
+
questionImage: m,
|
|
857
|
+
brandingColors: g
|
|
858
|
+
}
|
|
859
|
+
),
|
|
860
|
+
/* @__PURE__ */ x("div", { css: se.buttonFooter, children: [
|
|
861
|
+
/* @__PURE__ */ t(
|
|
862
|
+
Kn,
|
|
863
|
+
{
|
|
864
|
+
selectedOption: e.selectedOption,
|
|
865
|
+
endDecorator: /* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(Et, {}) }),
|
|
866
|
+
label: P,
|
|
867
|
+
buttonColor: q,
|
|
868
|
+
onClick: e.handleNext,
|
|
869
|
+
isLoading: e.isLoading
|
|
870
|
+
}
|
|
871
|
+
),
|
|
872
|
+
b && !u && !h && /* @__PURE__ */ t("div", { children: R((g == null ? void 0 : g.contentColor) || S) })
|
|
873
|
+
] })
|
|
874
|
+
] }),
|
|
875
|
+
i && b && l ? R((g == null ? void 0 : g.contentColor) || s.colorSchemes.dark.textColor) : null
|
|
876
|
+
] }) })
|
|
877
|
+
}
|
|
878
|
+
),
|
|
879
|
+
b && u && /* @__PURE__ */ t("div", { css: se.presentedBy, children: R((g == null ? void 0 : g.contentColor) || s.colorSchemes.dark.textColor) })
|
|
880
|
+
] });
|
|
881
|
+
}, Yi = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_929_1048'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='24'%20height='24'%3e%3crect%20width='24'%20height='24'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_929_1048)'%3e%3cpath%20d='M12%2020.6254L5.20005%2016.9254V11.1254L1.36255%209.01289L12%203.21289L22.65%209.01464V16.7504H20.775V10.0504L18.8%2011.1254V16.9254L12%2020.6254ZM12%2012.6754L18.75%209.01289L12%205.36289L5.26255%209.01289L12%2012.6754ZM12%2018.4879L16.925%2015.8296V12.1129L12%2014.8254L7.07505%2012.1129V15.8296L12%2018.4879Z'%20fill='%23212121'/%3e%3c/g%3e%3c/svg%3e", Zi = "data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_929_504'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='25'%20height='24'%3e%3crect%20x='0.5'%20width='24'%20height='24'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_929_504)'%3e%3cpath%20d='M9.6875%206H11.5625V4.125H9.6875V6ZM13.4375%206V4.125H15.3125V6H13.4375ZM9.6875%2013.5V11.625H11.5625V13.5H9.6875ZM17.1875%209.75V7.875H19.0625V9.75H17.1875ZM17.1875%2013.5V11.625H19.0625V13.5H17.1875ZM13.4375%2013.5V11.625H15.3125V13.5H13.4375ZM17.1875%206V4.125H19.0625V6H17.1875ZM11.5625%207.875V6H13.4375V7.875H11.5625ZM5.9375%2019.825V4.125H7.8125V6H9.6875V7.875H7.8125V9.75H9.6875V11.625H7.8125V19.825H5.9375ZM15.3125%2011.625V9.75H17.1875V11.625H15.3125ZM11.5625%2011.625V9.75H13.4375V11.625H11.5625ZM9.6875%209.75V7.875H11.5625V9.75H9.6875ZM13.4375%209.75V7.875H15.3125V9.75H13.4375ZM15.3125%207.875V6H17.1875V7.875H15.3125Z'%20fill='%23212121'/%3e%3c/g%3e%3c/svg%3e", Ki = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_929_360'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='20'%3e%3crect%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_929_360)'%3e%3cpath%20d='M9.22917%2014.0625H10.7917V9.1875H9.22917V14.0625ZM9.99771%207.58333C10.2215%207.58333%2010.4097%207.50771%2010.5625%207.35646C10.7153%207.20507%2010.7917%207.01757%2010.7917%206.79396C10.7917%206.57021%2010.716%206.38194%2010.5648%206.22917C10.4134%206.07639%2010.2259%206%2010.0023%206C9.77854%206%209.59028%206.07563%209.4375%206.22688C9.28472%206.37826%209.20833%206.56576%209.20833%206.78938C9.20833%207.01313%209.28396%207.20139%209.43521%207.35417C9.5866%207.50694%209.7741%207.58333%209.99771%207.58333ZM10%2018.125C8.87625%2018.125%207.82021%2017.9114%206.83187%2017.4842C5.84368%2017.0568%204.98403%2016.4769%204.25292%2015.7446C3.52181%2015.0121%202.94271%2014.1522%202.51562%2013.1648C2.08854%2012.1776%201.875%2011.1226%201.875%2010C1.875%208.87625%202.08861%207.82021%202.51583%206.83187C2.94319%205.84368%203.52306%204.98403%204.25542%204.25292C4.98792%203.52181%205.84785%202.94271%206.83521%202.51562C7.82243%202.08854%208.87736%201.875%2010%201.875C11.1237%201.875%2012.1798%202.08861%2013.1681%202.51583C14.1563%202.94319%2015.016%203.52306%2015.7471%204.25542C16.4782%204.98792%2017.0573%205.84785%2017.4844%206.83521C17.9115%207.82243%2018.125%208.87736%2018.125%2010C18.125%2011.1237%2017.9114%2012.1798%2017.4842%2013.1681C17.0568%2014.1563%2016.4769%2015.016%2015.7446%2015.7471C15.0121%2016.4782%2014.1522%2017.0573%2013.1648%2017.4844C12.1776%2017.9115%2011.1226%2018.125%2010%2018.125ZM10%2016.5625C11.8264%2016.5625%2013.3767%2015.9253%2014.651%2014.651C15.9253%2013.3767%2016.5625%2011.8264%2016.5625%2010C16.5625%208.17361%2015.9253%206.62326%2014.651%205.34896C13.3767%204.07465%2011.8264%203.4375%2010%203.4375C8.17361%203.4375%206.62326%204.07465%205.34896%205.34896C4.07465%206.62326%203.4375%208.17361%203.4375%2010C3.4375%2011.8264%204.07465%2013.3767%205.34896%2014.651C6.62326%2015.9253%208.17361%2016.5625%2010%2016.5625Z'%20fill='%23212121'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e", mn = {
|
|
882
|
+
position: "relative",
|
|
883
|
+
boxSizing: "border-box",
|
|
884
|
+
display: "flex",
|
|
885
|
+
flexDirection: "column",
|
|
886
|
+
justifyContent: "center",
|
|
887
|
+
alignItems: "center",
|
|
888
|
+
flex: 1,
|
|
889
|
+
gap: "6px",
|
|
890
|
+
minWidth: 0,
|
|
891
|
+
minHeight: "36px",
|
|
892
|
+
margin: 0,
|
|
893
|
+
paddingBlock: "4px",
|
|
894
|
+
paddingInline: "16px",
|
|
895
|
+
border: "1px solid transparent",
|
|
896
|
+
borderBottom: "1px solid var(--fu-ucrc-secondary-container)",
|
|
897
|
+
borderRadius: 0,
|
|
898
|
+
backgroundColor: "transparent",
|
|
899
|
+
color: "inherit",
|
|
900
|
+
font: "inherit",
|
|
901
|
+
textAlign: "start",
|
|
902
|
+
cursor: "pointer",
|
|
903
|
+
opacity: "60%",
|
|
904
|
+
WebkitTapHighlightColor: "transparent",
|
|
905
|
+
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px" }
|
|
906
|
+
}, fn = (e) => ({
|
|
907
|
+
off: n(mn, { "&:hover": { backgroundColor: e } }),
|
|
908
|
+
on: n(mn, {
|
|
909
|
+
backgroundColor: e,
|
|
910
|
+
borderBottom: "3px solid var(--fu-ucrc-pq-ssw-primary)",
|
|
911
|
+
opacity: "100%",
|
|
912
|
+
marginBottom: "-1px",
|
|
913
|
+
zIndex: 1
|
|
914
|
+
})
|
|
915
|
+
}), yn = { margin: 0, alignSelf: "stretch", fontStyle: "normal" }, zt = { display: "flex", width: "24px", height: "24px", justifyContent: "center", alignItems: "center" }, hn = { ...zt, width: "20px", height: "20px" }, bn = { filter: "brightness(0) invert(1)" }, pn = {
|
|
916
|
+
position: "relative",
|
|
917
|
+
zIndex: 1,
|
|
918
|
+
boxSizing: "border-box",
|
|
919
|
+
display: "flex",
|
|
920
|
+
paddingBottom: "1px",
|
|
921
|
+
fontSize: "1em",
|
|
922
|
+
// Joy's divider: the neutral channel at 20% (16% in dark mode).
|
|
923
|
+
boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.2)",
|
|
924
|
+
".dark &": { boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)" }
|
|
925
|
+
}, vt = { flexGrow: 1, fontSize: "1em", padding: 0 }, xn = { flexGrow: 1, overflowY: "auto", fontSize: "1em", padding: "16px" }, W = {
|
|
926
|
+
root: n({ width: "100%" }),
|
|
927
|
+
// Joy's Tabs: it set the body font, 1.5 line height and neutral colour the panels inherit.
|
|
928
|
+
tabs: n({
|
|
929
|
+
position: "relative",
|
|
930
|
+
display: "flex",
|
|
931
|
+
flexDirection: "column",
|
|
932
|
+
minWidth: 0,
|
|
933
|
+
width: "100%",
|
|
934
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
935
|
+
backgroundColor: "transparent",
|
|
936
|
+
fontFamily: "var(--fu-ucrc-font-body)",
|
|
937
|
+
lineHeight: 1.5,
|
|
938
|
+
color: "var(--fu-ucrc-neutral-plain-color)"
|
|
939
|
+
}),
|
|
940
|
+
list: n(pn, { flexDirection: "row" }),
|
|
941
|
+
listMobile: n(pn, { flexDirection: "column" }),
|
|
942
|
+
tab: { plain: fn("#2121210A"), overlay: fn("#FAFAFA14") },
|
|
943
|
+
// Full width plus padding, so it overflows the tab's padding and is centred over it.
|
|
944
|
+
tabContent: n({
|
|
945
|
+
display: "flex",
|
|
946
|
+
paddingBlock: "12px",
|
|
947
|
+
paddingInline: "16px",
|
|
948
|
+
justifyContent: "center",
|
|
949
|
+
alignItems: "center",
|
|
950
|
+
gap: "8px",
|
|
951
|
+
width: "100%"
|
|
952
|
+
}),
|
|
953
|
+
tabIcon: n(zt),
|
|
954
|
+
tabIconInverted: n(zt, bn),
|
|
955
|
+
tabLabel: n({
|
|
956
|
+
margin: 0,
|
|
957
|
+
color: "var(--fu-ucrc-text-secondary)",
|
|
958
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
959
|
+
fontSize: "1em",
|
|
960
|
+
fontStyle: "normal",
|
|
961
|
+
fontWeight: 500,
|
|
962
|
+
lineHeight: "24px",
|
|
963
|
+
letterSpacing: "0.4px",
|
|
964
|
+
textTransform: "uppercase"
|
|
965
|
+
}),
|
|
966
|
+
results: {
|
|
967
|
+
column: n(vt, { display: "flex", flexDirection: "column" }),
|
|
968
|
+
row: n(vt, { display: "flex", flexDirection: "row" }),
|
|
969
|
+
block: n(vt)
|
|
970
|
+
},
|
|
971
|
+
answersPanel: n(xn),
|
|
972
|
+
answersPanelMd: n(xn, { maxHeight: "450px" }),
|
|
973
|
+
answers: n({
|
|
974
|
+
display: "flex",
|
|
975
|
+
flexDirection: "column",
|
|
976
|
+
justifyContent: "center",
|
|
977
|
+
alignItems: "center",
|
|
978
|
+
gap: "16px",
|
|
979
|
+
alignSelf: "stretch"
|
|
980
|
+
}),
|
|
981
|
+
answer: n({
|
|
982
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
983
|
+
padding: "var(--fu-ucrc-space-md)",
|
|
984
|
+
display: "flex",
|
|
985
|
+
flexDirection: "column",
|
|
986
|
+
alignItems: "center",
|
|
987
|
+
alignSelf: "stretch",
|
|
988
|
+
gap: "var(--fu-ucrc-space-md)",
|
|
989
|
+
backdropFilter: "blur(4px)",
|
|
990
|
+
position: "relative",
|
|
991
|
+
"&::before": {
|
|
992
|
+
content: '""',
|
|
993
|
+
position: "absolute",
|
|
994
|
+
top: 0,
|
|
995
|
+
left: 0,
|
|
996
|
+
right: 0,
|
|
997
|
+
bottom: 0,
|
|
998
|
+
backgroundColor: "var(--fu-ucrc-pq-ssw-content-bg)",
|
|
999
|
+
opacity: 0.5,
|
|
1000
|
+
borderRadius: "inherit",
|
|
1001
|
+
zIndex: 0,
|
|
1002
|
+
backdropFilter: "blur(4px)"
|
|
1003
|
+
},
|
|
1004
|
+
"& > *": { position: "relative", zIndex: 1 }
|
|
1005
|
+
}),
|
|
1006
|
+
single: n({ display: "flex", flexDirection: "column", alignItems: "flex-start", gap: "12px", alignSelf: "stretch" }),
|
|
1007
|
+
question: n({ display: "flex", flexDirection: "column", alignItems: "flex-start", alignSelf: "stretch" }),
|
|
1008
|
+
questionNumber: n(yn, {
|
|
1009
|
+
color: "var(--fu-ucrc-text-secondary)",
|
|
1010
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1011
|
+
fontSize: "0.75em",
|
|
1012
|
+
fontWeight: 500,
|
|
1013
|
+
lineHeight: "166%",
|
|
1014
|
+
letterSpacing: "1px",
|
|
1015
|
+
textTransform: "uppercase"
|
|
1016
|
+
}),
|
|
1017
|
+
questionText: n(yn, {
|
|
1018
|
+
color: "var(--fu-ucrc-text-primary)",
|
|
1019
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
1020
|
+
fontSize: "1.25em",
|
|
1021
|
+
fontWeight: 500,
|
|
1022
|
+
lineHeight: "120%",
|
|
1023
|
+
letterSpacing: "0.15px"
|
|
1024
|
+
}),
|
|
1025
|
+
outcome: n({ alignSelf: "stretch" }),
|
|
1026
|
+
yourAnswer: n({
|
|
1027
|
+
margin: 0,
|
|
1028
|
+
color: "var(--fu-ucrc-text-primary)",
|
|
1029
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1030
|
+
fontSize: "1em",
|
|
1031
|
+
fontStyle: "normal",
|
|
1032
|
+
fontWeight: 700,
|
|
1033
|
+
lineHeight: "20px",
|
|
1034
|
+
letterSpacing: "0.15px"
|
|
1035
|
+
}),
|
|
1036
|
+
explanation: n({
|
|
1037
|
+
display: "flex",
|
|
1038
|
+
paddingBlock: "4px",
|
|
1039
|
+
paddingRight: "16px",
|
|
1040
|
+
paddingLeft: "0px",
|
|
1041
|
+
justifyContent: "center",
|
|
1042
|
+
gap: "10px",
|
|
1043
|
+
alignItems: "flex-start",
|
|
1044
|
+
alignSelf: "stretch"
|
|
1045
|
+
}),
|
|
1046
|
+
explanationIcon: n(hn),
|
|
1047
|
+
explanationIconInverted: n(hn, bn),
|
|
1048
|
+
explanationText: n({
|
|
1049
|
+
margin: 0,
|
|
1050
|
+
flex: "1 0 0",
|
|
1051
|
+
color: "var(--fu-ucrc-text-primary)",
|
|
1052
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1053
|
+
fontSize: "0.875em",
|
|
1054
|
+
fontStyle: "normal",
|
|
1055
|
+
fontWeight: 400,
|
|
1056
|
+
lineHeight: "143%",
|
|
1057
|
+
letterSpacing: "0.17px"
|
|
1058
|
+
})
|
|
1059
|
+
}, Vt = ({
|
|
1060
|
+
questions: e,
|
|
1061
|
+
userParticipation: i,
|
|
1062
|
+
resultsLayout: r,
|
|
1063
|
+
isOverlayVariant: o,
|
|
1064
|
+
children: s,
|
|
1065
|
+
brandingColors: a
|
|
1066
|
+
}) => {
|
|
1067
|
+
const [l, u] = U(0), [h, f] = U(0), d = ke([]), m = ot(), y = at(), g = te(), { t: b } = E(), P = N(), S = de("md"), q = o || g.mode == "dark", v = o ? "overlay" : "plain", A = {
|
|
1068
|
+
"--fu-ucrc-pq-ssw-primary": (a == null ? void 0 : a.primaryColor) || "var(--fu-ucrc-text-primary)",
|
|
1069
|
+
// Kept as it was: any branding background picks the dark scheme's surface.
|
|
1070
|
+
"--fu-ucrc-pq-ssw-content-bg": a != null && a.backgroundColor || o ? g.colorSchemes.dark.surfaceVariant : "var(--fu-ucrc-surface-variant)"
|
|
1071
|
+
}, C = [
|
|
1072
|
+
{ icon: Zi, label: b("classicQuiz.results") },
|
|
1073
|
+
{ icon: Yi, label: b("classicQuiz.answers") }
|
|
1074
|
+
], R = (z) => {
|
|
1075
|
+
var L;
|
|
1076
|
+
const k = (z + C.length) % C.length;
|
|
1077
|
+
f(k), (L = d.current[k]) == null || L.focus();
|
|
1078
|
+
}, F = (z) => {
|
|
1079
|
+
const k = y ? "ArrowLeft" : "ArrowRight", L = y ? "ArrowRight" : "ArrowLeft", G = { [k]: h + 1, [L]: h - 1, Home: 0, End: C.length - 1 }[z.key];
|
|
1080
|
+
G !== void 0 && (z.preventDefault(), R(G));
|
|
1081
|
+
}, w = (z) => {
|
|
1082
|
+
var k;
|
|
1083
|
+
u(z), f(z), (k = d.current[z]) == null || k.focus();
|
|
1084
|
+
}, I = r === "responsive" ? S ? "row" : "column" : r, D = (z, k) => {
|
|
1085
|
+
var c;
|
|
1086
|
+
const L = e.find((Q) => Q.questionId === z.questionId), G = (c = L == null ? void 0 : L.options.find((Q) => Q.optionId === z.optionId)) == null ? void 0 : c.option;
|
|
1087
|
+
return /* @__PURE__ */ t("div", { css: W.answer, children: /* @__PURE__ */ x("div", { css: W.single, children: [
|
|
1088
|
+
/* @__PURE__ */ x("div", { css: W.question, children: [
|
|
1089
|
+
/* @__PURE__ */ x("p", { css: W.questionNumber, children: [
|
|
1090
|
+
b("classicQuiz.question"),
|
|
1091
|
+
" ",
|
|
1092
|
+
k + 1
|
|
1093
|
+
] }),
|
|
1094
|
+
/* @__PURE__ */ t("p", { css: W.questionText, children: L == null ? void 0 : L.question })
|
|
1095
|
+
] }),
|
|
1096
|
+
/* @__PURE__ */ t("div", { css: W.outcome, children: /* @__PURE__ */ x("p", { css: W.yourAnswer, children: [
|
|
1097
|
+
b("classicQuiz.yourAnswer"),
|
|
1098
|
+
" ",
|
|
1099
|
+
G
|
|
1100
|
+
] }) }),
|
|
1101
|
+
(L == null ? void 0 : L.explanation) && /* @__PURE__ */ x("div", { css: W.explanation, children: [
|
|
1102
|
+
/* @__PURE__ */ t(
|
|
1103
|
+
"img",
|
|
1104
|
+
{
|
|
1105
|
+
src: Ki,
|
|
1106
|
+
alt: "explanation-icon",
|
|
1107
|
+
css: o ? W.explanationIconInverted : W.explanationIcon
|
|
1108
|
+
}
|
|
1109
|
+
),
|
|
1110
|
+
/* @__PURE__ */ t("p", { css: W.explanationText, children: yi(L.explanation) })
|
|
1111
|
+
] })
|
|
1112
|
+
] }) }, `user-answer-${z.questionId}`);
|
|
1113
|
+
};
|
|
1114
|
+
return /* @__PURE__ */ t("div", { css: W.root, style: A, children: /* @__PURE__ */ x("div", { css: W.tabs, children: [
|
|
1115
|
+
/* @__PURE__ */ t(
|
|
1116
|
+
"div",
|
|
1117
|
+
{
|
|
1118
|
+
role: "tablist",
|
|
1119
|
+
"aria-orientation": "horizontal",
|
|
1120
|
+
css: P ? W.listMobile : W.list,
|
|
1121
|
+
onKeyDown: F,
|
|
1122
|
+
children: C.map((z, k) => /* @__PURE__ */ t(
|
|
1123
|
+
"button",
|
|
1124
|
+
{
|
|
1125
|
+
ref: (L) => {
|
|
1126
|
+
d.current[k] = L;
|
|
1127
|
+
},
|
|
1128
|
+
type: "button",
|
|
1129
|
+
role: "tab",
|
|
1130
|
+
id: `${m}-tab-${k}`,
|
|
1131
|
+
"aria-selected": k === l,
|
|
1132
|
+
"aria-controls": k === l ? `${m}-panel` : void 0,
|
|
1133
|
+
tabIndex: k === h ? 0 : -1,
|
|
1134
|
+
css: W.tab[v][k === l ? "on" : "off"],
|
|
1135
|
+
onClick: () => w(k),
|
|
1136
|
+
onFocus: () => f(k),
|
|
1137
|
+
children: /* @__PURE__ */ x("div", { css: W.tabContent, children: [
|
|
1138
|
+
/* @__PURE__ */ t("img", { src: z.icon, alt: "answers-icon", css: q ? W.tabIconInverted : W.tabIcon }),
|
|
1139
|
+
/* @__PURE__ */ t("p", { css: W.tabLabel, children: z.label })
|
|
1140
|
+
] })
|
|
1141
|
+
},
|
|
1142
|
+
k
|
|
1143
|
+
))
|
|
1144
|
+
}
|
|
1145
|
+
),
|
|
1146
|
+
/* @__PURE__ */ t(
|
|
1147
|
+
"div",
|
|
1148
|
+
{
|
|
1149
|
+
role: "tabpanel",
|
|
1150
|
+
id: `${m}-panel`,
|
|
1151
|
+
"aria-labelledby": `${m}-tab-${l}`,
|
|
1152
|
+
css: l === 0 ? W.results[I] : S ? W.answersPanelMd : W.answersPanel,
|
|
1153
|
+
children: l === 0 ? s : /* @__PURE__ */ t("div", { css: W.answers, children: i.map((z, k) => D(z, k)) })
|
|
1154
|
+
}
|
|
1155
|
+
)
|
|
1156
|
+
] }) });
|
|
1157
|
+
}, jt = (e, i) => !i.personas || !e.personaResults ? [] : i.personas.map((o) => {
|
|
1158
|
+
const s = e.personaResults.find(
|
|
1159
|
+
(a) => a.personaId === o.personaId
|
|
1160
|
+
);
|
|
1161
|
+
return s ? {
|
|
1162
|
+
...s,
|
|
1163
|
+
percent: o.percent
|
|
1164
|
+
} : null;
|
|
1165
|
+
}).filter(
|
|
1166
|
+
(o) => o !== null && o.percent > 0
|
|
1167
|
+
).sort((o, s) => s.percent - o.percent), fe = (e) => `var(--fu-ucrc-space-${e})`, wt = "var(--fu-ucrc-pq-rt-primary)", Xn = "var(--fu-ucrc-pq-rt-surface)", vn = {
|
|
1168
|
+
fontFamily: "var(--fu-ucrc-font-body)",
|
|
1169
|
+
fontSize: "1em",
|
|
1170
|
+
lineHeight: 1.5,
|
|
1171
|
+
color: "var(--fu-ucrc-neutral-plain-color)"
|
|
1172
|
+
}, Jn = {
|
|
1173
|
+
position: "relative",
|
|
1174
|
+
boxSizing: "border-box",
|
|
1175
|
+
display: "flex",
|
|
1176
|
+
alignItems: "center",
|
|
1177
|
+
alignSelf: "stretch",
|
|
1178
|
+
justifyContent: "center",
|
|
1179
|
+
flex: "initial",
|
|
1180
|
+
gap: "6px",
|
|
1181
|
+
width: "var(--fu-ucrc-pq-rt-tab-width)",
|
|
1182
|
+
minWidth: 0,
|
|
1183
|
+
minHeight: "auto",
|
|
1184
|
+
margin: 0,
|
|
1185
|
+
paddingBlock: fe("sm"),
|
|
1186
|
+
paddingInline: fe("md"),
|
|
1187
|
+
border: "none",
|
|
1188
|
+
borderBottom: "2px solid transparent",
|
|
1189
|
+
borderRadius: 0,
|
|
1190
|
+
backgroundColor: "transparent",
|
|
1191
|
+
color: "var(--fu-ucrc-text-color)",
|
|
1192
|
+
font: "inherit",
|
|
1193
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
1194
|
+
fontWeight: 500,
|
|
1195
|
+
fontSize: "var(--fu-ucrc-pq-rt-tab-size)",
|
|
1196
|
+
textAlign: "start",
|
|
1197
|
+
textDecoration: "none",
|
|
1198
|
+
cursor: "pointer",
|
|
1199
|
+
transition: "all 0.2s ease",
|
|
1200
|
+
WebkitTapHighlightColor: "transparent",
|
|
1201
|
+
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px", zIndex: 1 },
|
|
1202
|
+
"&:hover": { backgroundColor: "var(--fu-ucrc-surface-variant)", borderBottom: "2px solid var(--fu-ucrc-pq-rt-primary-25)" }
|
|
1203
|
+
}, Cn = {
|
|
1204
|
+
borderTopLeftRadius: "var(--fu-ucrc-radius-md)",
|
|
1205
|
+
borderTopRightRadius: "var(--fu-ucrc-pq-rt-first-end-radius)"
|
|
1206
|
+
}, In = n(Jn, { "&:hover": { color: "var(--fu-ucrc-neutral-plain-hover-color)" } }), Sn = n(Jn, {
|
|
1207
|
+
zIndex: 1,
|
|
1208
|
+
backgroundColor: "var(--fu-ucrc-surface-variant)",
|
|
1209
|
+
borderBottom: `2px solid ${wt}`,
|
|
1210
|
+
"&:hover": { borderBottom: `2px solid ${wt}` }
|
|
1211
|
+
}), zn = {
|
|
1212
|
+
backgroundColor: Xn,
|
|
1213
|
+
borderBottomLeftRadius: "var(--fu-ucrc-radius-md)",
|
|
1214
|
+
borderBottomRightRadius: "var(--fu-ucrc-radius-md)",
|
|
1215
|
+
backdropFilter: "blur(4px)",
|
|
1216
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
1217
|
+
borderTop: "none",
|
|
1218
|
+
minHeight: "200px"
|
|
1219
|
+
}, wn = { display: "flex", gap: fe("lg") }, kn = {
|
|
1220
|
+
width: "100%",
|
|
1221
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1222
|
+
backgroundSize: "cover",
|
|
1223
|
+
backgroundPosition: "center",
|
|
1224
|
+
backgroundRepeat: "no-repeat",
|
|
1225
|
+
border: "1px solid rgba(255, 255, 255, 0.1)"
|
|
1226
|
+
}, An = {
|
|
1227
|
+
backgroundSize: "cover",
|
|
1228
|
+
backgroundPosition: "center",
|
|
1229
|
+
backgroundRepeat: "no-repeat",
|
|
1230
|
+
borderRadius: "var(--fu-ucrc-radius-xs)",
|
|
1231
|
+
border: "1px solid rgba(0, 0, 0, 0.2)",
|
|
1232
|
+
flexShrink: 0
|
|
1233
|
+
}, M = {
|
|
1234
|
+
wrapper: n({
|
|
1235
|
+
display: "flex",
|
|
1236
|
+
flexDirection: "column",
|
|
1237
|
+
justifyContent: "flex-start",
|
|
1238
|
+
alignItems: "stretch",
|
|
1239
|
+
alignSelf: "stretch",
|
|
1240
|
+
width: "100%"
|
|
1241
|
+
}),
|
|
1242
|
+
container: n({ padding: fe("md"), marginTop: fe("md") }),
|
|
1243
|
+
// Joy's Tabs: the body font and neutral colour the panels inherit.
|
|
1244
|
+
tabs: n({
|
|
1245
|
+
...vn,
|
|
1246
|
+
position: "relative",
|
|
1247
|
+
display: "flex",
|
|
1248
|
+
flexDirection: "column",
|
|
1249
|
+
width: "100%",
|
|
1250
|
+
backgroundColor: Xn,
|
|
1251
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1252
|
+
// Keeps the tab underline and the selected tab indicator from overshooting the rounded corners
|
|
1253
|
+
overflow: "hidden"
|
|
1254
|
+
}),
|
|
1255
|
+
list: n({
|
|
1256
|
+
position: "relative",
|
|
1257
|
+
zIndex: 1,
|
|
1258
|
+
boxSizing: "border-box",
|
|
1259
|
+
display: "flex",
|
|
1260
|
+
flexWrap: "wrap",
|
|
1261
|
+
margin: 0,
|
|
1262
|
+
padding: 0,
|
|
1263
|
+
gap: 0,
|
|
1264
|
+
listStyle: "none",
|
|
1265
|
+
fontFamily: "var(--fu-ucrc-font-body)",
|
|
1266
|
+
fontSize: "1em",
|
|
1267
|
+
lineHeight: 1.5,
|
|
1268
|
+
color: "var(--fu-ucrc-neutral-plain-color)",
|
|
1269
|
+
borderBottom: "1px solid var(--fu-ucrc-pq-rt-primary-25)",
|
|
1270
|
+
// Joy's divider: the neutral channel at 20% (16% in dark mode).
|
|
1271
|
+
boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.2)",
|
|
1272
|
+
".dark &": { boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)" }
|
|
1273
|
+
}),
|
|
1274
|
+
tab: {
|
|
1275
|
+
off: In,
|
|
1276
|
+
on: Sn,
|
|
1277
|
+
firstOff: n(In, { "&:hover": Cn }),
|
|
1278
|
+
firstOn: n(Sn, Cn)
|
|
1279
|
+
},
|
|
1280
|
+
labelRow: n({
|
|
1281
|
+
display: "flex",
|
|
1282
|
+
justifyContent: "space-between",
|
|
1283
|
+
alignItems: "center",
|
|
1284
|
+
width: "100%",
|
|
1285
|
+
gap: fe("sm")
|
|
1286
|
+
}),
|
|
1287
|
+
logo: n(An, { width: "24px", height: "24px" }),
|
|
1288
|
+
logoMobile: n(An, { width: "20px", height: "20px" }),
|
|
1289
|
+
label: n({
|
|
1290
|
+
...ye,
|
|
1291
|
+
fontSize: "inherit",
|
|
1292
|
+
fontWeight: "inherit",
|
|
1293
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1294
|
+
color: "inherit",
|
|
1295
|
+
textAlign: "left",
|
|
1296
|
+
flex: 1
|
|
1297
|
+
}),
|
|
1298
|
+
percentage: n({
|
|
1299
|
+
margin: 0,
|
|
1300
|
+
backgroundColor: wt,
|
|
1301
|
+
color: "var(--fu-ucrc-pq-rt-on-primary)",
|
|
1302
|
+
paddingInline: fe("xs"),
|
|
1303
|
+
paddingBlock: fe("3xs"),
|
|
1304
|
+
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
1305
|
+
fontSize: "0.75em",
|
|
1306
|
+
fontWeight: 600,
|
|
1307
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1308
|
+
minWidth: "auto",
|
|
1309
|
+
lineHeight: 1.2
|
|
1310
|
+
}),
|
|
1311
|
+
panel: n({ ...vn, flexGrow: 1, padding: 0 }),
|
|
1312
|
+
// Square top, no top border: the panel butts against the tab list underline.
|
|
1313
|
+
content: n(zn, { padding: fe("lg") }),
|
|
1314
|
+
contentMobile: n(zn, { padding: fe("md") }),
|
|
1315
|
+
withImageRow: n(wn, { flexDirection: "row", alignItems: "flex-start" }),
|
|
1316
|
+
withImageColumn: n(wn, { flexDirection: "column", alignItems: "center" }),
|
|
1317
|
+
imageSection: n({ flexShrink: 0, width: "200px", maxWidth: "300px" }),
|
|
1318
|
+
imageSectionFull: n({ flexShrink: 0, width: "100%", maxWidth: "300px" }),
|
|
1319
|
+
personaImage: n(kn, { height: "200px" }),
|
|
1320
|
+
personaImageShort: n(kn, { height: "150px" }),
|
|
1321
|
+
descriptionSection: n({ flex: 1, minWidth: 0 }),
|
|
1322
|
+
descriptionOnly: n({ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "150px" }),
|
|
1323
|
+
description: n({
|
|
1324
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1325
|
+
color: "var(--fu-ucrc-text-color)",
|
|
1326
|
+
lineHeight: 1.6,
|
|
1327
|
+
fontSize: "0.95em",
|
|
1328
|
+
opacity: 0.9
|
|
1329
|
+
})
|
|
1330
|
+
}, Xi = ({ personas: e }) => {
|
|
1331
|
+
const [i, r] = U(0), [o, s] = U(0), a = ke([]), l = ot(), u = at(), h = te(), f = ae(), d = N(), m = de("sm"), y = de("md");
|
|
1332
|
+
if (!e || e.length === 0)
|
|
1333
|
+
return null;
|
|
1334
|
+
const g = f.palette.primary.plainColor, b = {
|
|
1335
|
+
"--fu-ucrc-pq-rt-primary": g,
|
|
1336
|
+
"--fu-ucrc-pq-rt-primary-25": `${g}40`,
|
|
1337
|
+
"--fu-ucrc-pq-rt-surface": `rgba(${Ye(f.surfaceVariant || "")}, 0.5)`,
|
|
1338
|
+
// Joy read the light scheme's on-primary here, in both modes.
|
|
1339
|
+
"--fu-ucrc-pq-rt-on-primary": h.colorSchemes.light.palette.primary.onPrimary
|
|
1340
|
+
}, P = {
|
|
1341
|
+
"--fu-ucrc-pq-rt-tab-width": y ? "auto" : "100%",
|
|
1342
|
+
"--fu-ucrc-pq-rt-tab-size": m ? "0.9em" : "0.85em",
|
|
1343
|
+
"--fu-ucrc-pq-rt-first-end-radius": y ? "0px" : "var(--fu-ucrc-radius-md)"
|
|
1344
|
+
}, S = (w) => w && (d && w.mobile || w.main) || null, q = (w) => {
|
|
1345
|
+
var D;
|
|
1346
|
+
const I = (w + e.length) % e.length;
|
|
1347
|
+
s(I), (D = a.current[I]) == null || D.focus();
|
|
1348
|
+
}, v = (w) => {
|
|
1349
|
+
const I = u ? "ArrowLeft" : "ArrowRight", D = u ? "ArrowRight" : "ArrowLeft", z = { [I]: o + 1, [D]: o - 1, Home: 0, End: e.length - 1 }[w.key];
|
|
1350
|
+
z !== void 0 && (w.preventDefault(), q(z));
|
|
1351
|
+
}, A = (w) => {
|
|
1352
|
+
var I;
|
|
1353
|
+
r(w), s(w), (I = a.current[w]) == null || I.focus();
|
|
1354
|
+
}, C = e[i], R = C ? S(C.images) : null, F = (w) => /* @__PURE__ */ t("span", { css: M.description, dangerouslySetInnerHTML: { __html: w } });
|
|
1355
|
+
return /* @__PURE__ */ t("div", { css: M.wrapper, children: /* @__PURE__ */ t("div", { css: M.container, children: /* @__PURE__ */ x("div", { css: M.tabs, style: b, children: [
|
|
1356
|
+
/* @__PURE__ */ t(
|
|
1357
|
+
"div",
|
|
1358
|
+
{
|
|
1359
|
+
role: "tablist",
|
|
1360
|
+
"aria-orientation": "horizontal",
|
|
1361
|
+
css: M.list,
|
|
1362
|
+
style: P,
|
|
1363
|
+
onKeyDown: v,
|
|
1364
|
+
children: e.map((w, I) => {
|
|
1365
|
+
var Q, $;
|
|
1366
|
+
const D = I === 0, z = I === i, k = S(w.images), L = ((Q = w.images) == null ? void 0 : Q.mobile) || (($ = w.images) == null ? void 0 : $.main), G = d ? !!L : !!k && !w.description, c = d ? L : k;
|
|
1367
|
+
return /* @__PURE__ */ t(
|
|
1368
|
+
"button",
|
|
1369
|
+
{
|
|
1370
|
+
ref: (B) => {
|
|
1371
|
+
a.current[I] = B;
|
|
1372
|
+
},
|
|
1373
|
+
type: "button",
|
|
1374
|
+
role: "tab",
|
|
1375
|
+
id: `${l}-tab-${I}`,
|
|
1376
|
+
"aria-selected": z,
|
|
1377
|
+
"aria-controls": z && w.description ? `${l}-panel` : void 0,
|
|
1378
|
+
tabIndex: I === o ? 0 : -1,
|
|
1379
|
+
css: D ? z ? M.tab.firstOn : M.tab.firstOff : z ? M.tab.on : M.tab.off,
|
|
1380
|
+
onClick: () => A(I),
|
|
1381
|
+
onFocus: () => s(I),
|
|
1382
|
+
children: /* @__PURE__ */ x("div", { css: M.labelRow, children: [
|
|
1383
|
+
G && c && /* @__PURE__ */ t(
|
|
1384
|
+
"div",
|
|
1385
|
+
{
|
|
1386
|
+
css: d ? M.logoMobile : M.logo,
|
|
1387
|
+
style: { backgroundImage: `url("${c}")` }
|
|
1388
|
+
}
|
|
1389
|
+
),
|
|
1390
|
+
/* @__PURE__ */ t("p", { css: M.label, children: w.title }),
|
|
1391
|
+
/* @__PURE__ */ x("p", { css: M.percentage, children: [
|
|
1392
|
+
w.percent,
|
|
1393
|
+
"%"
|
|
1394
|
+
] })
|
|
1395
|
+
] })
|
|
1396
|
+
},
|
|
1397
|
+
w.personaId
|
|
1398
|
+
);
|
|
1399
|
+
})
|
|
1400
|
+
}
|
|
1401
|
+
),
|
|
1402
|
+
(C == null ? void 0 : C.description) && /* @__PURE__ */ t("div", { role: "tabpanel", id: `${l}-panel`, "aria-labelledby": `${l}-tab-${i}`, css: M.panel, children: /* @__PURE__ */ t("div", { css: d ? M.contentMobile : M.content, children: R && !d ? /* @__PURE__ */ x("div", { css: y ? M.withImageRow : M.withImageColumn, children: [
|
|
1403
|
+
/* @__PURE__ */ t("div", { css: y ? M.imageSection : M.imageSectionFull, children: /* @__PURE__ */ t(
|
|
1404
|
+
"div",
|
|
1405
|
+
{
|
|
1406
|
+
css: y ? M.personaImage : M.personaImageShort,
|
|
1407
|
+
style: { backgroundImage: `url("${R}")` }
|
|
1408
|
+
}
|
|
1409
|
+
) }),
|
|
1410
|
+
/* @__PURE__ */ t("div", { css: M.descriptionSection, children: F(C.description) })
|
|
1411
|
+
] }) : /* @__PURE__ */ t("div", { css: M.descriptionOnly, children: F(C.description) }) }) })
|
|
1412
|
+
] }) }) });
|
|
1413
|
+
}, Ae = (e) => `var(--fu-ucrc-space-${e})`, ei = "var(--fu-ucrc-text-primary)", kt = { display: "flex", justifyContent: "center", alignItems: "center" }, Qn = {
|
|
1414
|
+
...ye,
|
|
1415
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
1416
|
+
fontSize: "0.8125em",
|
|
1417
|
+
fontStyle: "normal",
|
|
1418
|
+
fontWeight: 500,
|
|
1419
|
+
lineHeight: "22px",
|
|
1420
|
+
letterSpacing: "0.46px",
|
|
1421
|
+
textTransform: "uppercase"
|
|
1422
|
+
}, Pn = {
|
|
1423
|
+
...kt,
|
|
1424
|
+
flexDirection: "column",
|
|
1425
|
+
paddingBlock: Ae("xs"),
|
|
1426
|
+
paddingInline: Ae("md"),
|
|
1427
|
+
gap: "8px",
|
|
1428
|
+
borderRadius: "var(--fu-ucrc-radius-xl)",
|
|
1429
|
+
// Joy's solidColor (common.white) is not in the theme snapshot.
|
|
1430
|
+
color: "var(--fu-ucrc-primary-solid-color, #fff)",
|
|
1431
|
+
fontSize: "0.8125em"
|
|
1432
|
+
}, ti = { display: "flex", alignItems: "center", paddingInline: Ae("md") }, qn = { ...ti, justifyContent: "space-between", gap: Ae("lg") }, Ln = { ...ti, gap: Ae("md") }, re = {
|
|
1433
|
+
main: n({ flex: "1", display: "flex", flexDirection: "column", padding: Ae("md"), gap: Ae("md") }),
|
|
1434
|
+
chanceGame: n({ padding: Ae("md") }),
|
|
1435
|
+
buttonsRow: n(qn, { flexDirection: "row" }),
|
|
1436
|
+
buttonsColumn: n(qn, { flexDirection: "column-reverse" }),
|
|
1437
|
+
buttonsEnd: n(Ln, { justifyContent: "flex-end" }),
|
|
1438
|
+
buttonsCenter: n(Ln, { justifyContent: "center" }),
|
|
1439
|
+
playAgain: n(pe, Pn, {
|
|
1440
|
+
border: "var(--fu-ucrc-border-size) solid var(--fu-ucrc-pq-ss-primary)",
|
|
1441
|
+
backgroundColor: "var(--fu-ucrc-pq-ss-bg)",
|
|
1442
|
+
"&:hover": { backgroundColor: "var(--fu-ucrc-on-surface)", borderColor: "var(--fu-ucrc-pq-ss-primary)" }
|
|
1443
|
+
}),
|
|
1444
|
+
playAgainContent: n({ ...kt, gap: "8px", alignSelf: "stretch" }),
|
|
1445
|
+
playAgainText: n({ ...Qn, textAlign: "center", color: ei }),
|
|
1446
|
+
additionalCta: n(pe, Pn, {
|
|
1447
|
+
border: "var(--fu-ucrc-border-size) solid var(--fu-ucrc-secondary-container)",
|
|
1448
|
+
backgroundColor: "var(--fu-ucrc-secondary-container)",
|
|
1449
|
+
"&:hover": { opacity: 0.9 },
|
|
1450
|
+
"& > div": { ...kt, gap: "8px" },
|
|
1451
|
+
"& p": { ...Qn, color: "var(--fu-ucrc-pq-ss-secondary)" }
|
|
1452
|
+
}),
|
|
1453
|
+
wrapperRow: n({ display: "flex", flexDirection: "row", width: "100%" }),
|
|
1454
|
+
wrapperColumn: n({ display: "flex", flexDirection: "column", width: "100%" })
|
|
1455
|
+
}, Ji = {
|
|
1456
|
+
display: "flex",
|
|
1457
|
+
width: "16px",
|
|
1458
|
+
height: "16px",
|
|
1459
|
+
justifyContent: "flex-end",
|
|
1460
|
+
alignItems: "center",
|
|
1461
|
+
color: ei
|
|
1462
|
+
}, ea = (e) => {
|
|
1463
|
+
var g, b, P, S, q;
|
|
1464
|
+
const i = ae(), r = xe(
|
|
1465
|
+
{
|
|
1466
|
+
images: e.personalityQuiz.images,
|
|
1467
|
+
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
1468
|
+
},
|
|
1469
|
+
j.STANDARD
|
|
1470
|
+
), { t: o } = E(), s = de("md"), a = ((g = e.personalityQuiz.branding) == null ? void 0 : g.colors) || null, l = N() ? ((b = e.personalityQuiz.branding) == null ? void 0 : b.images.mobileLogo) || ((P = e.personalityQuiz.branding) == null ? void 0 : P.images.mainLogo) || "" : ((S = e.personalityQuiz.branding) == null ? void 0 : S.images.mainLogo) || "", u = e.imagePosition || "left", h = (a == null ? void 0 : a.contentColor) || i.textColor, f = {
|
|
1471
|
+
"--fu-ucrc-pq-ss-primary": (a == null ? void 0 : a.primaryColor) || i.palette.primary.plainColor,
|
|
1472
|
+
"--fu-ucrc-pq-ss-secondary": (a == null ? void 0 : a.secondaryColor) || i.textSecondary,
|
|
1473
|
+
"--fu-ucrc-pq-ss-bg": (a == null ? void 0 : a.backgroundColor) || i.surface
|
|
1474
|
+
}, d = jt(e.personalityQuiz, e.summary), y = /* @__PURE__ */ t(Ai, { finalImage: r, imagePosition: u, children: (() => {
|
|
1475
|
+
var v, A;
|
|
1476
|
+
return /* @__PURE__ */ t("div", { css: re.main, style: f, children: e.summary.personalityQuizId ? /* @__PURE__ */ x(He, { children: [
|
|
1477
|
+
/* @__PURE__ */ t(Xi, { personas: d }),
|
|
1478
|
+
e.chanceGameContent && /* @__PURE__ */ t("div", { css: re.chanceGame, children: e.chanceGameContent }),
|
|
1479
|
+
(l || e.additionalCTA !== void 0 || !e.maxAttemptsReached) && /* @__PURE__ */ x(
|
|
1480
|
+
"div",
|
|
1481
|
+
{
|
|
1482
|
+
css: l ? s ? re.buttonsRow : re.buttonsColumn : s ? re.buttonsEnd : re.buttonsCenter,
|
|
1483
|
+
children: [
|
|
1484
|
+
l && /* @__PURE__ */ t(
|
|
1485
|
+
O,
|
|
1486
|
+
{
|
|
1487
|
+
brandingLogo: l,
|
|
1488
|
+
textColor: h,
|
|
1489
|
+
label: ((v = e.personalityQuiz.labels) == null ? void 0 : v.sponsor) || null
|
|
1490
|
+
}
|
|
1491
|
+
),
|
|
1492
|
+
/* @__PURE__ */ t(Tt, { additionalCTA: e.additionalCTA, css: re.additionalCta }),
|
|
1493
|
+
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css: re.playAgain, onClick: e.playAgain, children: /* @__PURE__ */ x("div", { css: re.playAgainContent, children: [
|
|
1494
|
+
/* @__PURE__ */ t(Wt, { style: Ji }),
|
|
1495
|
+
/* @__PURE__ */ t("p", { css: re.playAgainText, children: o("personalityQuiz.buttons.playAgain") })
|
|
1496
|
+
] }) })
|
|
1497
|
+
]
|
|
1498
|
+
}
|
|
1499
|
+
)
|
|
1500
|
+
] }) : /* @__PURE__ */ x(He, { children: [
|
|
1501
|
+
/* @__PURE__ */ t(
|
|
1502
|
+
Ut,
|
|
1503
|
+
{
|
|
1504
|
+
variant: "error",
|
|
1505
|
+
title: o("common.authentication.accessRequired"),
|
|
1506
|
+
message: o("common.authentication.invalidOrMissingAuth")
|
|
1507
|
+
}
|
|
1508
|
+
),
|
|
1509
|
+
l ? /* @__PURE__ */ t(
|
|
1510
|
+
O,
|
|
1511
|
+
{
|
|
1512
|
+
brandingLogo: l,
|
|
1513
|
+
textColor: h,
|
|
1514
|
+
label: ((A = e.personalityQuiz.labels) == null ? void 0 : A.sponsor) || null
|
|
1515
|
+
}
|
|
1516
|
+
) : null
|
|
1517
|
+
] }) });
|
|
1518
|
+
})() });
|
|
1519
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: (a == null ? void 0 : a.borderColor) || null, children: e.showAnswerExplanations ? /* @__PURE__ */ t(
|
|
1520
|
+
Vt,
|
|
1521
|
+
{
|
|
1522
|
+
questions: e.personalityQuiz.questions,
|
|
1523
|
+
userParticipation: e.summary.questions,
|
|
1524
|
+
brandingColors: (q = e.personalityQuiz.branding) == null ? void 0 : q.colors,
|
|
1525
|
+
resultsLayout: "responsive",
|
|
1526
|
+
children: /* @__PURE__ */ t("div", { css: s ? re.wrapperRow : re.wrapperColumn, children: y })
|
|
1527
|
+
}
|
|
1528
|
+
) : y });
|
|
1529
|
+
}, Fe = (e) => `var(--fu-ucrc-space-${e})`, At = "var(--fu-ucrc-pq-srt-surface)", ta = "var(--fu-ucrc-pq-srt-primary)", ni = {
|
|
1530
|
+
position: "relative",
|
|
1531
|
+
boxSizing: "border-box",
|
|
1532
|
+
display: "flex",
|
|
1533
|
+
flexDirection: "row",
|
|
1534
|
+
alignItems: "center",
|
|
1535
|
+
alignSelf: "stretch",
|
|
1536
|
+
justifyContent: "flex-start",
|
|
1537
|
+
gap: "6px",
|
|
1538
|
+
width: "100%",
|
|
1539
|
+
flex: "none",
|
|
1540
|
+
minWidth: 0,
|
|
1541
|
+
minHeight: "auto",
|
|
1542
|
+
margin: 0,
|
|
1543
|
+
paddingBlock: Fe("sm"),
|
|
1544
|
+
paddingInline: Fe("md"),
|
|
1545
|
+
font: "inherit",
|
|
1546
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
1547
|
+
fontWeight: 500,
|
|
1548
|
+
fontSize: "0.9em",
|
|
1549
|
+
color: "var(--fu-ucrc-text-color)",
|
|
1550
|
+
textAlign: "start",
|
|
1551
|
+
textDecoration: "none",
|
|
1552
|
+
backgroundColor: "transparent",
|
|
1553
|
+
border: "none",
|
|
1554
|
+
borderBottom: "1px solid var(--fu-ucrc-pq-srt-line)",
|
|
1555
|
+
borderRight: "2px solid transparent",
|
|
1556
|
+
borderRadius: 0,
|
|
1557
|
+
transition: "all 0.2s ease",
|
|
1558
|
+
cursor: "pointer",
|
|
1559
|
+
WebkitTapHighlightColor: "transparent",
|
|
1560
|
+
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px", zIndex: 1 }
|
|
1561
|
+
}, Dn = {
|
|
1562
|
+
...ni,
|
|
1563
|
+
"&:hover": {
|
|
1564
|
+
backgroundColor: "var(--fu-ucrc-neutral-plain-hover-bg)",
|
|
1565
|
+
color: "var(--fu-ucrc-neutral-plain-hover-color)",
|
|
1566
|
+
borderRight: "2px solid var(--fu-ucrc-pq-srt-hover-edge)"
|
|
1567
|
+
},
|
|
1568
|
+
"&:active": { backgroundColor: "var(--fu-ucrc-neutral-plain-active-bg)" }
|
|
1569
|
+
}, Rn = {
|
|
1570
|
+
...ni,
|
|
1571
|
+
zIndex: 1,
|
|
1572
|
+
backgroundColor: At,
|
|
1573
|
+
borderRight: "2px solid var(--fu-ucrc-pq-srt-edge)",
|
|
1574
|
+
borderBottom: "2px solid var(--fu-ucrc-pq-srt-edge)",
|
|
1575
|
+
color: "var(--fu-ucrc-text-primary)",
|
|
1576
|
+
fontWeight: 600
|
|
1577
|
+
}, na = { "&:hover": { borderTopLeftRadius: "var(--fu-ucrc-radius-sm)" } }, Tn = {
|
|
1578
|
+
backgroundSize: "cover",
|
|
1579
|
+
backgroundPosition: "center",
|
|
1580
|
+
backgroundRepeat: "no-repeat",
|
|
1581
|
+
borderRadius: "var(--fu-ucrc-radius-xs)",
|
|
1582
|
+
border: "1px solid rgba(0, 0, 0, 0.2)",
|
|
1583
|
+
flexShrink: 0
|
|
1584
|
+
}, X = {
|
|
1585
|
+
contentWrapper: n({
|
|
1586
|
+
display: "flex",
|
|
1587
|
+
flexDirection: "column",
|
|
1588
|
+
justifyContent: "flex-start",
|
|
1589
|
+
alignItems: "stretch",
|
|
1590
|
+
alignSelf: "stretch",
|
|
1591
|
+
width: "100%"
|
|
1592
|
+
}),
|
|
1593
|
+
// Joy's Tabs: body font, 1.5 line height and the neutral colour the panel inherits.
|
|
1594
|
+
tabs: n({
|
|
1595
|
+
position: "relative",
|
|
1596
|
+
display: "flex",
|
|
1597
|
+
flexDirection: "column",
|
|
1598
|
+
width: "100%",
|
|
1599
|
+
backgroundColor: At,
|
|
1600
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1601
|
+
fontFamily: "var(--fu-ucrc-font-body)",
|
|
1602
|
+
fontSize: "1em",
|
|
1603
|
+
lineHeight: 1.5,
|
|
1604
|
+
color: "var(--fu-ucrc-neutral-plain-color)"
|
|
1605
|
+
}),
|
|
1606
|
+
list: n({
|
|
1607
|
+
position: "relative",
|
|
1608
|
+
zIndex: 1,
|
|
1609
|
+
boxSizing: "border-box",
|
|
1610
|
+
display: "flex",
|
|
1611
|
+
flexDirection: "column",
|
|
1612
|
+
alignItems: "stretch",
|
|
1613
|
+
gap: 0,
|
|
1614
|
+
margin: 0,
|
|
1615
|
+
padding: 0,
|
|
1616
|
+
fontSize: "1em",
|
|
1617
|
+
// Joy's divider: the neutral channel at 20% (16% in dark mode).
|
|
1618
|
+
boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.2)",
|
|
1619
|
+
".dark &": { boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)" }
|
|
1620
|
+
}),
|
|
1621
|
+
tab: {
|
|
1622
|
+
off: n(Dn),
|
|
1623
|
+
on: n(Rn),
|
|
1624
|
+
firstOff: n(Dn, na),
|
|
1625
|
+
firstOn: n(Rn, { borderTopLeftRadius: "var(--fu-ucrc-radius-sm)" })
|
|
1626
|
+
},
|
|
1627
|
+
labelRow: n({
|
|
1628
|
+
display: "flex",
|
|
1629
|
+
justifyContent: "space-between",
|
|
1630
|
+
alignItems: "center",
|
|
1631
|
+
width: "100%",
|
|
1632
|
+
gap: Fe("sm")
|
|
1633
|
+
}),
|
|
1634
|
+
logo: n(Tn, { width: "24px", height: "24px" }),
|
|
1635
|
+
logoMobile: n(Tn, { width: "20px", height: "20px" }),
|
|
1636
|
+
label: n(ye, {
|
|
1637
|
+
fontSize: "inherit",
|
|
1638
|
+
fontWeight: "inherit",
|
|
1639
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1640
|
+
color: "inherit",
|
|
1641
|
+
textAlign: "left",
|
|
1642
|
+
flex: 1
|
|
1643
|
+
}),
|
|
1644
|
+
// Always the light scheme's on-primary, as before.
|
|
1645
|
+
percentage: n(ye, {
|
|
1646
|
+
backgroundColor: ta,
|
|
1647
|
+
color: "var(--fu-ucrc-pq-srt-on-primary)",
|
|
1648
|
+
paddingInline: Fe("xs"),
|
|
1649
|
+
paddingBlock: Fe("3xs"),
|
|
1650
|
+
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
1651
|
+
fontSize: "0.75em",
|
|
1652
|
+
fontWeight: 600,
|
|
1653
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
1654
|
+
minWidth: "auto",
|
|
1655
|
+
lineHeight: 1.2
|
|
1656
|
+
}),
|
|
1657
|
+
panel: n({ flexGrow: 1, fontSize: "1em", padding: 0 }),
|
|
1658
|
+
content: n({
|
|
1659
|
+
backgroundColor: At,
|
|
1660
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1661
|
+
padding: Fe("lg"),
|
|
1662
|
+
backdropFilter: "blur(4px)",
|
|
1663
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
1664
|
+
minHeight: "200px"
|
|
1665
|
+
}),
|
|
1666
|
+
descriptionOnly: n({ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "150px" }),
|
|
1667
|
+
description: n({ color: "var(--fu-ucrc-text-color)", fontFamily: "var(--fu-ucrc-font-primary)", lineHeight: 1.6 })
|
|
1668
|
+
}, ia = ({ personas: e, brandingColors: i }) => {
|
|
1669
|
+
const [r, o] = U(0), [s, a] = U(0), l = ke([]), u = ot(), h = at(), f = te(), d = ae(), m = N();
|
|
1670
|
+
if (!e || e.length === 0)
|
|
1671
|
+
return null;
|
|
1672
|
+
const y = (i == null ? void 0 : i.primaryColor) || d.palette.primary.plainColor, g = {
|
|
1673
|
+
"--fu-ucrc-pq-srt-surface": `rgba(${Ye(d.surfaceVariant || "")}, 0.5)`,
|
|
1674
|
+
"--fu-ucrc-pq-srt-primary": y,
|
|
1675
|
+
"--fu-ucrc-pq-srt-on-primary": f.colorSchemes.light.palette.primary.onPrimary,
|
|
1676
|
+
// Hex alpha suffixes on the primary, as before.
|
|
1677
|
+
"--fu-ucrc-pq-srt-line": `${y}20`,
|
|
1678
|
+
"--fu-ucrc-pq-srt-hover-edge": `${y}40`,
|
|
1679
|
+
"--fu-ucrc-pq-srt-edge": `${y}80`
|
|
1680
|
+
}, b = (q) => {
|
|
1681
|
+
var A;
|
|
1682
|
+
const v = (q + e.length) % e.length;
|
|
1683
|
+
a(v), (A = l.current[v]) == null || A.focus();
|
|
1684
|
+
}, P = (q) => {
|
|
1685
|
+
const v = h ? "ArrowLeft" : "ArrowRight", A = h ? "ArrowRight" : "ArrowLeft", C = { [v]: s + 1, [A]: s - 1, Home: 0, End: e.length - 1 }[q.key];
|
|
1686
|
+
C !== void 0 && (q.preventDefault(), b(C));
|
|
1687
|
+
}, S = e[r];
|
|
1688
|
+
return /* @__PURE__ */ t("div", { css: X.contentWrapper, style: g, children: /* @__PURE__ */ x("div", { css: X.tabs, children: [
|
|
1689
|
+
/* @__PURE__ */ t("div", { role: "tablist", "aria-orientation": "horizontal", css: X.list, onKeyDown: P, children: e.map((q, v) => {
|
|
1690
|
+
const A = v === r, C = q.images, R = m && (C == null ? void 0 : C.mobile) || (C == null ? void 0 : C.main), F = (C == null ? void 0 : C.mobile) || R;
|
|
1691
|
+
return /* @__PURE__ */ t(
|
|
1692
|
+
"button",
|
|
1693
|
+
{
|
|
1694
|
+
ref: (w) => {
|
|
1695
|
+
l.current[v] = w;
|
|
1696
|
+
},
|
|
1697
|
+
type: "button",
|
|
1698
|
+
role: "tab",
|
|
1699
|
+
id: `${u}-tab-${v}`,
|
|
1700
|
+
"aria-selected": A,
|
|
1701
|
+
"aria-controls": A && q.description ? `${u}-panel` : void 0,
|
|
1702
|
+
tabIndex: v === s ? 0 : -1,
|
|
1703
|
+
css: v === 0 ? A ? X.tab.firstOn : X.tab.firstOff : A ? X.tab.on : X.tab.off,
|
|
1704
|
+
onClick: () => {
|
|
1705
|
+
o(v), a(v);
|
|
1706
|
+
},
|
|
1707
|
+
onFocus: () => a(v),
|
|
1708
|
+
children: /* @__PURE__ */ x("div", { css: X.labelRow, children: [
|
|
1709
|
+
R && F && /* @__PURE__ */ t(
|
|
1710
|
+
"div",
|
|
1711
|
+
{
|
|
1712
|
+
css: m ? X.logoMobile : X.logo,
|
|
1713
|
+
style: { backgroundImage: `url("${F}")` }
|
|
1714
|
+
}
|
|
1715
|
+
),
|
|
1716
|
+
/* @__PURE__ */ t("p", { css: X.label, children: q.title }),
|
|
1717
|
+
/* @__PURE__ */ x("p", { css: X.percentage, children: [
|
|
1718
|
+
q.percent,
|
|
1719
|
+
"%"
|
|
1720
|
+
] })
|
|
1721
|
+
] })
|
|
1722
|
+
},
|
|
1723
|
+
q.personaId
|
|
1724
|
+
);
|
|
1725
|
+
}) }),
|
|
1726
|
+
(S == null ? void 0 : S.description) && /* @__PURE__ */ t("div", { role: "tabpanel", id: `${u}-panel`, "aria-labelledby": `${u}-tab-${r}`, css: X.panel, children: /* @__PURE__ */ t("div", { css: X.content, children: /* @__PURE__ */ t("div", { css: X.descriptionOnly, children: /* @__PURE__ */ t("span", { css: X.description, dangerouslySetInnerHTML: { __html: S.description } }) }) }) })
|
|
1727
|
+
] }) });
|
|
1728
|
+
}, we = (e) => `var(--fu-ucrc-space-${e})`, tt = "var(--fu-ucrc-text-primary)", ii = "var(--fu-ucrc-font-primary)", Un = {
|
|
1729
|
+
margin: 0,
|
|
1730
|
+
fontFamily: ii,
|
|
1731
|
+
fontSize: "0.9375em",
|
|
1732
|
+
fontStyle: "normal",
|
|
1733
|
+
fontWeight: 500,
|
|
1734
|
+
lineHeight: "22px",
|
|
1735
|
+
letterSpacing: "0.46px",
|
|
1736
|
+
textTransform: "uppercase"
|
|
1737
|
+
}, $n = {
|
|
1738
|
+
display: "flex",
|
|
1739
|
+
paddingBlock: we("xs"),
|
|
1740
|
+
flexDirection: "column",
|
|
1741
|
+
justifyContent: "center",
|
|
1742
|
+
alignItems: "center",
|
|
1743
|
+
gap: "8px",
|
|
1744
|
+
borderRadius: "var(--fu-ucrc-radius-xl)",
|
|
1745
|
+
fontSize: "0.9375em"
|
|
1746
|
+
}, Bn = {
|
|
1747
|
+
display: "flex",
|
|
1748
|
+
flexDirection: "column",
|
|
1749
|
+
justifyContent: "center",
|
|
1750
|
+
alignItems: "center"
|
|
1751
|
+
}, Fn = { display: "flex", flexDirection: "column", justifyContent: "center" }, ne = {
|
|
1752
|
+
questionAreaContent: n({
|
|
1753
|
+
padding: we("lg"),
|
|
1754
|
+
display: "flex",
|
|
1755
|
+
flexDirection: "column",
|
|
1756
|
+
justifyContent: "center",
|
|
1757
|
+
gap: we("lg"),
|
|
1758
|
+
flex: 1,
|
|
1759
|
+
height: "100%"
|
|
1760
|
+
}),
|
|
1761
|
+
// Translucent panel, from the branding background: `--fu-ucrc-pq-split-bg` on the root.
|
|
1762
|
+
ctaPanel: n({
|
|
1763
|
+
padding: we("lg"),
|
|
1764
|
+
gap: we("lg"),
|
|
1765
|
+
display: "flex",
|
|
1766
|
+
flexDirection: "column",
|
|
1767
|
+
backdropFilter: "blur(4px)",
|
|
1768
|
+
backgroundColor: "var(--fu-ucrc-pq-split-bg)",
|
|
1769
|
+
borderRadius: "var(--fu-ucrc-radius-sm)"
|
|
1770
|
+
}),
|
|
1771
|
+
ctaContainer: n({ display: "flex", flexDirection: "column", alignItems: "center" }),
|
|
1772
|
+
ctaContentWrapper: n(Bn, { gap: we("lg") }),
|
|
1773
|
+
ctaContentWrapperTight: n(Bn, { gap: 0 }),
|
|
1774
|
+
thanks: n({
|
|
1775
|
+
margin: 0,
|
|
1776
|
+
color: tt,
|
|
1777
|
+
textAlign: "center",
|
|
1778
|
+
fontFamily: ii,
|
|
1779
|
+
fontSize: "1.25em",
|
|
1780
|
+
fontStyle: "normal",
|
|
1781
|
+
fontWeight: 500,
|
|
1782
|
+
lineHeight: "120%",
|
|
1783
|
+
letterSpacing: "0.15px"
|
|
1784
|
+
}),
|
|
1785
|
+
buttons: n({ display: "flex", flexDirection: "column", gap: "16px" }),
|
|
1786
|
+
playAgain: n(pe, $n, {
|
|
1787
|
+
paddingInline: "16px",
|
|
1788
|
+
color: tt,
|
|
1789
|
+
backgroundColor: "var(--fu-ucrc-surface)",
|
|
1790
|
+
"&:hover": { backgroundColor: "var(--fu-ucrc-on-surface)" }
|
|
1791
|
+
}),
|
|
1792
|
+
playAgainContent: n({
|
|
1793
|
+
display: "flex",
|
|
1794
|
+
justifyContent: "center",
|
|
1795
|
+
alignItems: "center",
|
|
1796
|
+
gap: "8px",
|
|
1797
|
+
alignSelf: "stretch"
|
|
1798
|
+
}),
|
|
1799
|
+
playAgainLabel: n(Un, { color: tt, textAlign: "center" }),
|
|
1800
|
+
// Joy's solid colour (common.white) stays on the button; the label takes the secondary colour.
|
|
1801
|
+
additional: n(pe, $n, {
|
|
1802
|
+
paddingInline: we("md"),
|
|
1803
|
+
color: "#fff",
|
|
1804
|
+
backgroundColor: "var(--fu-ucrc-secondary-container)",
|
|
1805
|
+
"&:hover": { opacity: 0.9 },
|
|
1806
|
+
"& > div": { display: "flex", justifyContent: "center", alignItems: "center", gap: "8px" },
|
|
1807
|
+
"& p": { ...Un, color: "var(--fu-ucrc-pq-split-secondary)" }
|
|
1808
|
+
}),
|
|
1809
|
+
alertArea: {
|
|
1810
|
+
stacked: n(Fn, { flex: "1", width: "100%", minWidth: "100%", maxWidth: "100%" }),
|
|
1811
|
+
side: n(Fn, { flex: "0 0 50%", width: "50%", minWidth: "50%", maxWidth: "50%" })
|
|
1812
|
+
},
|
|
1813
|
+
alertWrapper: n({ padding: we("lg") })
|
|
1814
|
+
}, aa = {
|
|
1815
|
+
display: "flex",
|
|
1816
|
+
width: "16px",
|
|
1817
|
+
height: "16px",
|
|
1818
|
+
justifyContent: "flex-end",
|
|
1819
|
+
alignItems: "center",
|
|
1820
|
+
color: tt
|
|
1821
|
+
}, ra = (e) => {
|
|
1822
|
+
var q, v, A, C, R, F;
|
|
1823
|
+
const i = te(), r = ae(), { t: o } = E(), s = N(), a = Dt(), l = de("lg"), u = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : s ? Qe : Pe, h = xe(
|
|
1824
|
+
{
|
|
1825
|
+
images: e.personalityQuiz.images,
|
|
1826
|
+
imagePlaceholder: u
|
|
1827
|
+
},
|
|
1828
|
+
j.SPLIT
|
|
1829
|
+
), f = ((q = e.personalityQuiz.branding) == null ? void 0 : q.colors) || null, d = (f == null ? void 0 : f.backgroundColor) || r.surfaceVariant, m = r.textColor, y = s ? ((v = e.personalityQuiz.branding) == null ? void 0 : v.images.mobileLogo) || ((A = e.personalityQuiz.branding) == null ? void 0 : A.images.mainLogo) || "" : ((C = e.personalityQuiz.branding) == null ? void 0 : C.images.mainLogo) || "", g = {
|
|
1830
|
+
"--fu-ucrc-pq-split-bg": `rgba(${d ? Ye(d || "").replace(/[^\d,]/g, "") : ""}, 0.5)`,
|
|
1831
|
+
"--fu-ucrc-pq-split-secondary": (f == null ? void 0 : f.secondaryColor) || r.textSecondary
|
|
1832
|
+
}, b = jt(e.personalityQuiz, e.summary), P = !a && y ? /* @__PURE__ */ t(
|
|
1833
|
+
O,
|
|
1834
|
+
{
|
|
1835
|
+
brandingLogo: y,
|
|
1836
|
+
textColor: (f == null ? void 0 : f.contentColor) || i.colorSchemes.dark.textColor,
|
|
1837
|
+
label: ((R = e.personalityQuiz.labels) == null ? void 0 : R.sponsor) || null
|
|
1838
|
+
}
|
|
1839
|
+
) : null, S = (w) => {
|
|
1840
|
+
var I;
|
|
1841
|
+
return /* @__PURE__ */ t(
|
|
1842
|
+
Qi,
|
|
1843
|
+
{
|
|
1844
|
+
entity: e.personalityQuiz,
|
|
1845
|
+
headline: o("personalityQuiz.headline"),
|
|
1846
|
+
finalImage: h,
|
|
1847
|
+
brandingContent: P,
|
|
1848
|
+
isTabulated: w,
|
|
1849
|
+
alwaysShowImage: !1,
|
|
1850
|
+
children: e.summary.personalityQuizId ? /* @__PURE__ */ x("div", { css: ne.questionAreaContent, style: g, children: [
|
|
1851
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(ia, { personas: b, brandingColors: f }) }),
|
|
1852
|
+
(!e.maxAttemptsReached || e.additionalCTA !== void 0) && /* @__PURE__ */ t("div", { id: "desktop-thanks", css: ne.ctaPanel, children: /* @__PURE__ */ t("div", { css: ne.ctaContainer, children: /* @__PURE__ */ x("div", { css: e.maxAttemptsReached ? ne.ctaContentWrapperTight : ne.ctaContentWrapper, children: [
|
|
1853
|
+
/* @__PURE__ */ t("p", { css: ne.thanks, children: o("classicQuiz.thanksForPlaying") }),
|
|
1854
|
+
/* @__PURE__ */ x("div", { css: ne.buttons, children: [
|
|
1855
|
+
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css: ne.playAgain, onClick: e.playAgain, children: /* @__PURE__ */ x("div", { css: ne.playAgainContent, children: [
|
|
1856
|
+
/* @__PURE__ */ t(Wt, { style: aa }),
|
|
1857
|
+
/* @__PURE__ */ t("p", { css: ne.playAgainLabel, children: o("classicQuiz.buttons.playAgain") })
|
|
1858
|
+
] }) }),
|
|
1859
|
+
/* @__PURE__ */ t(Tt, { additionalCTA: e.additionalCTA, css: ne.additional })
|
|
1860
|
+
] })
|
|
1861
|
+
] }) }) }),
|
|
1862
|
+
e.chanceGameContent,
|
|
1863
|
+
a && y && /* @__PURE__ */ t(
|
|
1864
|
+
O,
|
|
1865
|
+
{
|
|
1866
|
+
brandingLogo: y,
|
|
1867
|
+
textColor: (f == null ? void 0 : f.contentColor) || m,
|
|
1868
|
+
label: ((I = e.personalityQuiz.labels) == null ? void 0 : I.sponsor) || null
|
|
1869
|
+
}
|
|
1870
|
+
)
|
|
1871
|
+
] }) : /* @__PURE__ */ t("div", { css: l ? ne.alertArea.side : ne.alertArea.stacked, children: /* @__PURE__ */ t("div", { css: ne.alertWrapper, children: /* @__PURE__ */ t(
|
|
1872
|
+
Ut,
|
|
1873
|
+
{
|
|
1874
|
+
variant: "error",
|
|
1875
|
+
title: o("common.authentication.accessRequired"),
|
|
1876
|
+
message: o("common.authentication.invalidOrMissingAuth")
|
|
1877
|
+
}
|
|
1878
|
+
) }) })
|
|
1879
|
+
}
|
|
1880
|
+
);
|
|
1881
|
+
};
|
|
1882
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: (f == null ? void 0 : f.borderColor) || null, children: e.showAnswerExplanations ? /* @__PURE__ */ t(
|
|
1883
|
+
Vt,
|
|
1884
|
+
{
|
|
1885
|
+
questions: e.personalityQuiz.questions,
|
|
1886
|
+
userParticipation: e.summary.questions,
|
|
1887
|
+
brandingColors: (F = e.personalityQuiz.branding) == null ? void 0 : F.colors,
|
|
1888
|
+
resultsLayout: s ? "column" : "row",
|
|
1889
|
+
children: S(!0)
|
|
1890
|
+
}
|
|
1891
|
+
) : S(!1) });
|
|
1892
|
+
}, be = (e) => `var(--fu-ucrc-space-${e})`, Qt = "var(--fu-ucrc-pq-ort-primary)", ai = "var(--fu-ucrc-pq-ort-primary-25)", Ct = {
|
|
1893
|
+
backdropFilter: "blur(4px)",
|
|
1894
|
+
position: "relative",
|
|
1895
|
+
"&::before": {
|
|
1896
|
+
content: '""',
|
|
1897
|
+
position: "absolute",
|
|
1898
|
+
top: 0,
|
|
1899
|
+
left: 0,
|
|
1900
|
+
right: 0,
|
|
1901
|
+
bottom: 0,
|
|
1902
|
+
backgroundColor: "var(--fu-ucrc-pq-ort-content-bg)",
|
|
1903
|
+
opacity: 0.5,
|
|
1904
|
+
borderRadius: "inherit",
|
|
1905
|
+
zIndex: 0
|
|
1906
|
+
},
|
|
1907
|
+
"& > *": { position: "relative", zIndex: 1 }
|
|
1908
|
+
}, nt = {
|
|
1909
|
+
position: "relative",
|
|
1910
|
+
boxSizing: "border-box",
|
|
1911
|
+
display: "flex",
|
|
1912
|
+
alignItems: "center",
|
|
1913
|
+
alignSelf: "stretch",
|
|
1914
|
+
justifyContent: "center",
|
|
1915
|
+
flex: "initial",
|
|
1916
|
+
gap: "6px",
|
|
1917
|
+
width: "var(--fu-ucrc-pq-ort-tab-width)",
|
|
1918
|
+
minWidth: 0,
|
|
1919
|
+
minHeight: "auto",
|
|
1920
|
+
margin: 0,
|
|
1921
|
+
paddingBlock: be("sm"),
|
|
1922
|
+
paddingInline: be("md"),
|
|
1923
|
+
border: "none",
|
|
1924
|
+
borderBottom: "2px solid transparent",
|
|
1925
|
+
borderRadius: 0,
|
|
1926
|
+
backgroundColor: "transparent",
|
|
1927
|
+
color: "var(--fu-ucrc-pq-ort-text)",
|
|
1928
|
+
font: "inherit",
|
|
1929
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
1930
|
+
fontWeight: 500,
|
|
1931
|
+
fontSize: "var(--fu-ucrc-pq-ort-tab-size)",
|
|
1932
|
+
textAlign: "start",
|
|
1933
|
+
textDecoration: "none",
|
|
1934
|
+
cursor: "pointer",
|
|
1935
|
+
transition: "all 0.2s ease",
|
|
1936
|
+
WebkitTapHighlightColor: "transparent",
|
|
1937
|
+
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px", zIndex: 1 },
|
|
1938
|
+
"&:hover": {
|
|
1939
|
+
backgroundColor: "var(--fu-ucrc-pq-ort-hover-bg)",
|
|
1940
|
+
borderBottom: `2px solid ${ai}`,
|
|
1941
|
+
color: "#ffffff"
|
|
1942
|
+
}
|
|
1943
|
+
}, Hn = {
|
|
1944
|
+
...nt,
|
|
1945
|
+
zIndex: 1,
|
|
1946
|
+
fontWeight: 600,
|
|
1947
|
+
color: "#ffffff",
|
|
1948
|
+
borderBottom: `2px solid ${Qt}`,
|
|
1949
|
+
"&:hover": { ...nt["&:hover"], borderBottom: `2px solid ${Qt}` }
|
|
1950
|
+
}, Mn = { borderTopLeftRadius: "var(--fu-ucrc-radius-md)" }, En = {
|
|
1951
|
+
backgroundSize: "cover",
|
|
1952
|
+
backgroundPosition: "center",
|
|
1953
|
+
backgroundRepeat: "no-repeat",
|
|
1954
|
+
borderRadius: "var(--fu-ucrc-radius-xs)",
|
|
1955
|
+
border: "1px solid rgba(255, 255, 255, 0.3)",
|
|
1956
|
+
flexShrink: 0
|
|
1957
|
+
}, oa = {
|
|
1958
|
+
flex: "none",
|
|
1959
|
+
textAlign: "center",
|
|
1960
|
+
maxWidth: "100%"
|
|
1961
|
+
}, V = {
|
|
1962
|
+
wrapper: n({
|
|
1963
|
+
display: "flex",
|
|
1964
|
+
flexDirection: "column",
|
|
1965
|
+
justifyContent: "flex-start",
|
|
1966
|
+
alignItems: "stretch",
|
|
1967
|
+
alignSelf: "stretch",
|
|
1968
|
+
width: "100%"
|
|
1969
|
+
}),
|
|
1970
|
+
container: n({ marginTop: be("md"), width: "100%" }),
|
|
1971
|
+
// Joy's Tabs: the body font, 1.5 line height and neutral colour the panels inherit.
|
|
1972
|
+
tabs: n(Ct, {
|
|
1973
|
+
display: "flex",
|
|
1974
|
+
flexDirection: "column",
|
|
1975
|
+
width: "100%",
|
|
1976
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1977
|
+
overflow: "hidden",
|
|
1978
|
+
fontFamily: "var(--fu-ucrc-font-body)",
|
|
1979
|
+
fontSize: "1em",
|
|
1980
|
+
lineHeight: 1.5,
|
|
1981
|
+
color: "var(--fu-ucrc-neutral-plain-color)"
|
|
1982
|
+
}),
|
|
1983
|
+
list: n({
|
|
1984
|
+
boxSizing: "border-box",
|
|
1985
|
+
display: "flex",
|
|
1986
|
+
flexDirection: "var(--fu-ucrc-pq-ort-list-direction)",
|
|
1987
|
+
flexWrap: "var(--fu-ucrc-pq-ort-list-wrap)",
|
|
1988
|
+
margin: 0,
|
|
1989
|
+
padding: 0,
|
|
1990
|
+
gap: 0,
|
|
1991
|
+
fontSize: "1em",
|
|
1992
|
+
borderBottom: `1px solid ${ai}`,
|
|
1993
|
+
// Joy's divider: the neutral channel at 16% (the overlay is always dark).
|
|
1994
|
+
boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)"
|
|
1995
|
+
}),
|
|
1996
|
+
tab: {
|
|
1997
|
+
off: n(nt),
|
|
1998
|
+
on: n(Hn),
|
|
1999
|
+
firstOff: n(nt, { "&:hover": Mn }),
|
|
2000
|
+
firstOn: n(Hn, Mn)
|
|
2001
|
+
},
|
|
2002
|
+
labelRow: n({
|
|
2003
|
+
display: "flex",
|
|
2004
|
+
justifyContent: "space-between",
|
|
2005
|
+
alignItems: "center",
|
|
2006
|
+
width: "100%",
|
|
2007
|
+
gap: be("sm")
|
|
2008
|
+
}),
|
|
2009
|
+
logo: n(En, { width: "24px", height: "24px" }),
|
|
2010
|
+
logoMobile: n(En, { width: "20px", height: "20px" }),
|
|
2011
|
+
label: n(ye, {
|
|
2012
|
+
fontSize: "inherit",
|
|
2013
|
+
fontWeight: "inherit",
|
|
2014
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
2015
|
+
color: "inherit",
|
|
2016
|
+
textAlign: "left",
|
|
2017
|
+
flex: 1
|
|
2018
|
+
}),
|
|
2019
|
+
percentage: n(ye, {
|
|
2020
|
+
backgroundColor: Qt,
|
|
2021
|
+
color: "var(--fu-ucrc-pq-ort-on-primary)",
|
|
2022
|
+
paddingInline: be("xs"),
|
|
2023
|
+
paddingBlock: be("3xs"),
|
|
2024
|
+
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
2025
|
+
fontSize: "0.75em",
|
|
2026
|
+
fontWeight: 600,
|
|
2027
|
+
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
2028
|
+
minWidth: "auto",
|
|
2029
|
+
lineHeight: 1.2
|
|
2030
|
+
}),
|
|
2031
|
+
panel: n({ flexGrow: 1, fontSize: "1em", padding: 0 }),
|
|
2032
|
+
content: n(Ct, { padding: be("lg"), minHeight: "200px" }),
|
|
2033
|
+
contentMobile: n(Ct, { padding: be("md"), minHeight: "200px" }),
|
|
2034
|
+
// Rendered on desktop only, so always a row.
|
|
2035
|
+
withImage: n({ display: "flex", flexDirection: "row", alignItems: "flex-start", gap: be("lg") }),
|
|
2036
|
+
imageSection: n({ display: "flex", justifyContent: "center", alignItems: "center", flex: "0 0 auto" }),
|
|
2037
|
+
personaImage: n({
|
|
2038
|
+
width: "250px",
|
|
2039
|
+
height: "180px",
|
|
2040
|
+
backgroundSize: "cover",
|
|
2041
|
+
backgroundPosition: "center",
|
|
2042
|
+
backgroundRepeat: "no-repeat",
|
|
2043
|
+
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
2044
|
+
border: "1px solid rgba(255, 255, 255, 0.2)"
|
|
2045
|
+
}),
|
|
2046
|
+
descriptionSection: n(oa),
|
|
2047
|
+
descriptionSectionWide: n({ flex: "1", textAlign: "left", maxWidth: "60%" }),
|
|
2048
|
+
descriptionOnly: n({ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "150px" }),
|
|
2049
|
+
description: n({ color: "var(--fu-ucrc-pq-ort-text)", fontFamily: "var(--fu-ucrc-font-primary)", lineHeight: 1.6 })
|
|
2050
|
+
}, la = ({
|
|
2051
|
+
personas: e,
|
|
2052
|
+
brandingColors: i,
|
|
2053
|
+
contentBgColor: r
|
|
2054
|
+
}) => {
|
|
2055
|
+
var w;
|
|
2056
|
+
const [o, s] = U(0), [a, l] = U(0), u = ke([]), h = ot(), f = at(), d = te(), m = N(), y = de("sm"), g = de("md");
|
|
2057
|
+
if (!e || e.length === 0)
|
|
2058
|
+
return null;
|
|
2059
|
+
const b = d.colorSchemes.dark, P = (i == null ? void 0 : i.primaryColor) || b.palette.primary.plainColor, S = {
|
|
2060
|
+
"--fu-ucrc-pq-ort-primary": P,
|
|
2061
|
+
"--fu-ucrc-pq-ort-primary-25": `${P}40`,
|
|
2062
|
+
"--fu-ucrc-pq-ort-content-bg": r,
|
|
2063
|
+
"--fu-ucrc-pq-ort-text": b.textColor,
|
|
2064
|
+
"--fu-ucrc-pq-ort-hover-bg": b.surface,
|
|
2065
|
+
"--fu-ucrc-pq-ort-on-primary": b.palette.primary.onPrimary
|
|
2066
|
+
}, q = {
|
|
2067
|
+
"--fu-ucrc-pq-ort-list-direction": m ? "column" : "row",
|
|
2068
|
+
"--fu-ucrc-pq-ort-list-wrap": m ? "nowrap" : "wrap",
|
|
2069
|
+
"--fu-ucrc-pq-ort-tab-width": m ? "100%" : "auto",
|
|
2070
|
+
"--fu-ucrc-pq-ort-tab-size": y ? "0.9em" : "0.85em"
|
|
2071
|
+
}, v = (I) => {
|
|
2072
|
+
var z;
|
|
2073
|
+
const D = (I + e.length) % e.length;
|
|
2074
|
+
l(D), (z = u.current[D]) == null || z.focus();
|
|
2075
|
+
}, A = (I) => {
|
|
2076
|
+
const D = f ? "ArrowLeft" : "ArrowRight", z = f ? "ArrowRight" : "ArrowLeft", k = { [D]: a + 1, [z]: a - 1, Home: 0, End: e.length - 1 }[I.key];
|
|
2077
|
+
k !== void 0 && (I.preventDefault(), v(k));
|
|
2078
|
+
}, C = e[o], R = ((w = C == null ? void 0 : C.images) == null ? void 0 : w.main) || null, F = (I) => /* @__PURE__ */ t("span", { css: V.description, dangerouslySetInnerHTML: { __html: I } });
|
|
2079
|
+
return /* @__PURE__ */ t("div", { css: V.wrapper, style: S, children: /* @__PURE__ */ t("div", { css: V.container, children: /* @__PURE__ */ x("div", { css: V.tabs, children: [
|
|
2080
|
+
/* @__PURE__ */ t(
|
|
2081
|
+
"div",
|
|
2082
|
+
{
|
|
2083
|
+
role: "tablist",
|
|
2084
|
+
"aria-orientation": "horizontal",
|
|
2085
|
+
css: V.list,
|
|
2086
|
+
style: q,
|
|
2087
|
+
onKeyDown: A,
|
|
2088
|
+
children: e.map((I, D) => {
|
|
2089
|
+
var Q, $, B;
|
|
2090
|
+
const z = D === o, k = ((Q = I.images) == null ? void 0 : Q.main) || null, L = (($ = I.images) == null ? void 0 : $.mobile) || ((B = I.images) == null ? void 0 : B.main) || null, G = m ? !!L : !!k && !I.description, c = m ? L : k;
|
|
2091
|
+
return /* @__PURE__ */ t(
|
|
2092
|
+
"button",
|
|
2093
|
+
{
|
|
2094
|
+
ref: (J) => {
|
|
2095
|
+
u.current[D] = J;
|
|
2096
|
+
},
|
|
2097
|
+
type: "button",
|
|
2098
|
+
role: "tab",
|
|
2099
|
+
id: `${h}-tab-${D}`,
|
|
2100
|
+
"aria-selected": z,
|
|
2101
|
+
"aria-controls": z && I.description ? `${h}-panel` : void 0,
|
|
2102
|
+
tabIndex: D === a ? 0 : -1,
|
|
2103
|
+
css: D === 0 ? z ? V.tab.firstOn : V.tab.firstOff : z ? V.tab.on : V.tab.off,
|
|
2104
|
+
onClick: () => {
|
|
2105
|
+
s(D), l(D);
|
|
2106
|
+
},
|
|
2107
|
+
onFocus: () => l(D),
|
|
2108
|
+
children: /* @__PURE__ */ x("div", { css: V.labelRow, children: [
|
|
2109
|
+
G && c && /* @__PURE__ */ t(
|
|
2110
|
+
"div",
|
|
2111
|
+
{
|
|
2112
|
+
css: m ? V.logoMobile : V.logo,
|
|
2113
|
+
style: { backgroundImage: `url("${c}")` }
|
|
2114
|
+
}
|
|
2115
|
+
),
|
|
2116
|
+
/* @__PURE__ */ t("p", { css: V.label, children: I.title }),
|
|
2117
|
+
/* @__PURE__ */ x("p", { css: V.percentage, children: [
|
|
2118
|
+
I.percent,
|
|
2119
|
+
"%"
|
|
2120
|
+
] })
|
|
2121
|
+
] })
|
|
2122
|
+
},
|
|
2123
|
+
I.personaId
|
|
2124
|
+
);
|
|
2125
|
+
})
|
|
2126
|
+
}
|
|
2127
|
+
),
|
|
2128
|
+
(C == null ? void 0 : C.description) && /* @__PURE__ */ t("div", { role: "tabpanel", id: `${h}-panel`, "aria-labelledby": `${h}-tab-${o}`, css: V.panel, children: /* @__PURE__ */ t("div", { css: m ? V.contentMobile : V.content, children: R && !m ? /* @__PURE__ */ x("div", { css: V.withImage, children: [
|
|
2129
|
+
/* @__PURE__ */ t("div", { css: V.imageSection, children: /* @__PURE__ */ t("div", { css: V.personaImage, style: { backgroundImage: `url("${R}")` } }) }),
|
|
2130
|
+
/* @__PURE__ */ t("div", { css: g ? V.descriptionSectionWide : V.descriptionSection, children: F(C.description) })
|
|
2131
|
+
] }) : /* @__PURE__ */ t("div", { css: V.descriptionOnly, children: F(C.description) }) }) })
|
|
2132
|
+
] }) }) });
|
|
2133
|
+
}, Be = (e) => `var(--fu-ucrc-space-${e})`, Pt = "var(--fu-ucrc-pq-oss-text-primary)", Ne = { display: "flex", justifyContent: "center", alignItems: "center" }, Wn = {
|
|
2134
|
+
...ye,
|
|
2135
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
2136
|
+
fontSize: "0.9375em",
|
|
2137
|
+
fontStyle: "normal",
|
|
2138
|
+
fontWeight: 500,
|
|
2139
|
+
lineHeight: "24px",
|
|
2140
|
+
textTransform: "uppercase"
|
|
2141
|
+
}, On = {
|
|
2142
|
+
...Ne,
|
|
2143
|
+
flexDirection: "column",
|
|
2144
|
+
gap: "8px",
|
|
2145
|
+
borderRadius: "var(--fu-ucrc-pq-oss-radius-xl)",
|
|
2146
|
+
color: "#fff",
|
|
2147
|
+
fontSize: "0.9375em"
|
|
2148
|
+
}, ce = {
|
|
2149
|
+
wrapperContent: n({ display: "flex", flexDirection: "column", gap: "40px", padding: Be("xl") }),
|
|
2150
|
+
main: n({ display: "flex", flexDirection: "column", gap: "24px", zIndex: 10 }),
|
|
2151
|
+
results: n({ display: "flex", flexDirection: "column", alignSelf: "stretch" }),
|
|
2152
|
+
cta: n({ ...Ne, paddingBlock: Be("xs"), gap: "24px", flex: "1 0 0" }),
|
|
2153
|
+
ctaContent: n({ ...Ne, flexDirection: "column", gap: Be("md"), flex: "1 0 0" }),
|
|
2154
|
+
thanks: n({
|
|
2155
|
+
...ye,
|
|
2156
|
+
color: Pt,
|
|
2157
|
+
textAlign: "center",
|
|
2158
|
+
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
2159
|
+
fontSize: "1.25em",
|
|
2160
|
+
fontStyle: "normal",
|
|
2161
|
+
fontWeight: 500,
|
|
2162
|
+
lineHeight: "120%",
|
|
2163
|
+
letterSpacing: "0.15px"
|
|
2164
|
+
}),
|
|
2165
|
+
buttons: n({ display: "flex", flexDirection: "column", gap: Be("md") }),
|
|
2166
|
+
playAgain: n(pe, On, {
|
|
2167
|
+
minHeight: "48px",
|
|
2168
|
+
paddingBlock: "12px",
|
|
2169
|
+
paddingRight: "24px",
|
|
2170
|
+
paddingLeft: "16px",
|
|
2171
|
+
backgroundColor: "var(--fu-ucrc-pq-oss-play-bg)",
|
|
2172
|
+
"&:hover": { backgroundColor: "var(--fu-ucrc-pq-oss-play-hover)" }
|
|
2173
|
+
}),
|
|
2174
|
+
playAgainContent: n({ ...Ne, gap: "8px", alignSelf: "stretch" }),
|
|
2175
|
+
playAgainText: n({ ...Wn, letterSpacing: "0.46px", textAlign: "center", color: Pt }),
|
|
2176
|
+
additionalCta: n(pe, On, {
|
|
2177
|
+
paddingBlock: Be("sm"),
|
|
2178
|
+
paddingInline: Be("md"),
|
|
2179
|
+
backgroundColor: "var(--fu-ucrc-pq-oss-secondary-container)",
|
|
2180
|
+
"&:hover": { opacity: 0.9 },
|
|
2181
|
+
"& > div": { ...Ne, gap: "8px" },
|
|
2182
|
+
"& p": { ...Wn, letterSpacing: "0.40px", color: "var(--fu-ucrc-pq-oss-secondary)" }
|
|
2183
|
+
})
|
|
2184
|
+
}, sa = {
|
|
2185
|
+
display: "flex",
|
|
2186
|
+
width: "24px",
|
|
2187
|
+
height: "24px",
|
|
2188
|
+
justifyContent: "center",
|
|
2189
|
+
alignItems: "center",
|
|
2190
|
+
color: Pt
|
|
2191
|
+
}, ca = (e) => {
|
|
2192
|
+
var P;
|
|
2193
|
+
const i = te(), { t: r } = E(), o = Vn(j.OVERLAY), s = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : N() ? Qe : Pe, { brandingImage: a, brandingColors: l, brandingLogo: u } = _e(
|
|
2194
|
+
e.personalityQuiz.branding || null
|
|
2195
|
+
), h = xe(
|
|
2196
|
+
{ images: e.personalityQuiz.images, imagePlaceholder: s },
|
|
2197
|
+
j.OVERLAY
|
|
2198
|
+
), f = a || h, d = i.colorSchemes.dark, m = (l == null ? void 0 : l.backgroundColor) || d.onSurface, y = {
|
|
2199
|
+
"--fu-ucrc-pq-oss-text-primary": d.textPrimary,
|
|
2200
|
+
"--fu-ucrc-pq-oss-secondary": (l == null ? void 0 : l.secondaryColor) || d.textSecondary,
|
|
2201
|
+
"--fu-ucrc-pq-oss-secondary-container": d.secondaryContainer,
|
|
2202
|
+
"--fu-ucrc-pq-oss-play-bg": d.onSurface,
|
|
2203
|
+
"--fu-ucrc-pq-oss-play-hover": d.surfaceVariant,
|
|
2204
|
+
"--fu-ucrc-pq-oss-radius-xl": i.customRadius.light.xl
|
|
2205
|
+
}, g = jt(e.personalityQuiz, e.summary), b = () => {
|
|
2206
|
+
var S;
|
|
2207
|
+
return /* @__PURE__ */ x("div", { css: ce.main, style: y, children: [
|
|
2208
|
+
e.summary.personalityQuizId ? /* @__PURE__ */ x(He, { children: [
|
|
2209
|
+
/* @__PURE__ */ t("div", { css: ce.results, children: /* @__PURE__ */ t(
|
|
2210
|
+
la,
|
|
2211
|
+
{
|
|
2212
|
+
personas: g,
|
|
2213
|
+
brandingColors: l,
|
|
2214
|
+
contentBgColor: m
|
|
2215
|
+
}
|
|
2216
|
+
) }),
|
|
2217
|
+
(!e.maxAttemptsReached || e.additionalCTA !== void 0) && /* @__PURE__ */ t("div", { css: ce.cta, children: /* @__PURE__ */ x("div", { css: ce.ctaContent, children: [
|
|
2218
|
+
/* @__PURE__ */ t("p", { css: ce.thanks, children: r("personalityQuiz.thanksForPlaying") }),
|
|
2219
|
+
/* @__PURE__ */ x("div", { css: ce.buttons, children: [
|
|
2220
|
+
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css: ce.playAgain, onClick: e.playAgain, children: /* @__PURE__ */ x("div", { css: ce.playAgainContent, children: [
|
|
2221
|
+
/* @__PURE__ */ t(Wt, { style: sa }),
|
|
2222
|
+
/* @__PURE__ */ t("p", { css: ce.playAgainText, children: r("personalityQuiz.buttons.playAgain") })
|
|
2223
|
+
] }) }),
|
|
2224
|
+
/* @__PURE__ */ t(Tt, { additionalCTA: e.additionalCTA, css: ce.additionalCta })
|
|
2225
|
+
] })
|
|
2226
|
+
] }) }),
|
|
2227
|
+
e.chanceGameContent
|
|
2228
|
+
] }) : /* @__PURE__ */ t(
|
|
2229
|
+
Ut,
|
|
2230
|
+
{
|
|
2231
|
+
variant: "error",
|
|
2232
|
+
title: r("common.authentication.accessRequired"),
|
|
2233
|
+
message: r("common.authentication.invalidOrMissingAuth")
|
|
2234
|
+
}
|
|
2235
|
+
),
|
|
2236
|
+
/* @__PURE__ */ t(
|
|
2237
|
+
O,
|
|
2238
|
+
{
|
|
2239
|
+
brandingLogo: u,
|
|
2240
|
+
textColor: d.textColor,
|
|
2241
|
+
label: ((S = e.personalityQuiz.labels) == null ? void 0 : S.sponsor) || null
|
|
2242
|
+
}
|
|
2243
|
+
)
|
|
2244
|
+
] });
|
|
2245
|
+
};
|
|
2246
|
+
return /* @__PURE__ */ t(
|
|
2247
|
+
Pi,
|
|
2248
|
+
{
|
|
2249
|
+
entity: e.personalityQuiz,
|
|
2250
|
+
backgroundImage: jn(f),
|
|
2251
|
+
imageBackgroundGradient: o,
|
|
2252
|
+
isWrappedWithScoreStateWrapper: e.showAnswerExplanations,
|
|
2253
|
+
children: e.showAnswerExplanations ? /* @__PURE__ */ t(
|
|
2254
|
+
Vt,
|
|
2255
|
+
{
|
|
2256
|
+
questions: e.personalityQuiz.questions,
|
|
2257
|
+
userParticipation: e.summary.questions,
|
|
2258
|
+
resultsLayout: "block",
|
|
2259
|
+
isOverlayVariant: !0,
|
|
2260
|
+
brandingColors: (P = e.personalityQuiz.branding) == null ? void 0 : P.colors,
|
|
2261
|
+
children: /* @__PURE__ */ t("div", { css: ce.wrapperContent, children: b() })
|
|
2262
|
+
}
|
|
2263
|
+
) : b()
|
|
2264
|
+
}
|
|
2265
|
+
);
|
|
2266
|
+
}, ua = () => {
|
|
2267
|
+
const { t: e } = E();
|
|
2268
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: null, children: /* @__PURE__ */ t(qi, { title: e("personalityQuiz.quizNotFound"), message: e("personalityQuiz.quizNotFoundDescription") }) });
|
|
2269
|
+
}, da = ({
|
|
2270
|
+
personalityQuiz: e,
|
|
2271
|
+
template: i,
|
|
2272
|
+
imagePosition: r,
|
|
2273
|
+
defaultImagePlaceholderUrl: o,
|
|
2274
|
+
rulesDisplay: s
|
|
2275
|
+
}) => {
|
|
2276
|
+
var m;
|
|
2277
|
+
const { t: a } = E(), l = N(), u = ((m = e.branding) == null ? void 0 : m.colors) || null, { brandingLogo: h } = _e(
|
|
2278
|
+
e.branding || null
|
|
2279
|
+
), f = (y) => {
|
|
2280
|
+
var g;
|
|
2281
|
+
return /* @__PURE__ */ t(
|
|
2282
|
+
O,
|
|
2283
|
+
{
|
|
2284
|
+
brandingLogo: h,
|
|
2285
|
+
textColor: y,
|
|
2286
|
+
label: ((g = e.labels) == null ? void 0 : g.sponsor) || null
|
|
2287
|
+
}
|
|
2288
|
+
);
|
|
2289
|
+
}, d = {
|
|
2290
|
+
entity: e,
|
|
2291
|
+
headline: a("personalityQuiz.headline"),
|
|
2292
|
+
tryAgainButtonText: "",
|
|
2293
|
+
isApiError: !1,
|
|
2294
|
+
alertVariant: "neutral",
|
|
2295
|
+
customAlertTitle: a("personalityQuiz.gameNotAvailable"),
|
|
2296
|
+
customAlertMessage: a("personalityQuiz.gameNotAvailableDescription"),
|
|
2297
|
+
renderPresentedBy: f,
|
|
2298
|
+
rulesDisplay: s
|
|
2299
|
+
};
|
|
2300
|
+
return i === j.OVERLAY ? /* @__PURE__ */ t(
|
|
2301
|
+
_n,
|
|
2302
|
+
{
|
|
2303
|
+
...d,
|
|
2304
|
+
defaultImagePlaceholderUrl: o || (l ? Qe : Pe)
|
|
2305
|
+
}
|
|
2306
|
+
) : i === j.SPLIT ? /* @__PURE__ */ t(Z, { brandingBorderColor: (u == null ? void 0 : u.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2307
|
+
Yn,
|
|
2308
|
+
{
|
|
2309
|
+
...d,
|
|
2310
|
+
defaultImagePlaceholderUrl: o
|
|
2311
|
+
}
|
|
2312
|
+
) }) : /* @__PURE__ */ t(Z, { brandingBorderColor: (u == null ? void 0 : u.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2313
|
+
Zn,
|
|
2314
|
+
{
|
|
2315
|
+
...d,
|
|
2316
|
+
imagePosition: r || "left",
|
|
2317
|
+
defaultImagePlaceholderUrl: o
|
|
2318
|
+
}
|
|
2319
|
+
) });
|
|
2320
|
+
}, ga = (e) => {
|
|
2321
|
+
var s, a, l, u;
|
|
2322
|
+
const i = ((s = e.personalityQuiz.branding) == null ? void 0 : s.colors) || null, r = N() ? ((a = e.personalityQuiz.branding) == null ? void 0 : a.images.mobileLogo) || ((l = e.personalityQuiz.branding) == null ? void 0 : l.images.mainLogo) || "" : ((u = e.personalityQuiz.branding) == null ? void 0 : u.images.mainLogo) || "", { t: o } = E();
|
|
2323
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: (i == null ? void 0 : i.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2324
|
+
Zn,
|
|
2325
|
+
{
|
|
2326
|
+
entity: e.personalityQuiz,
|
|
2327
|
+
headline: o("personalityQuiz.headline"),
|
|
2328
|
+
tryAgainButtonText: o("personalityQuiz.buttons.tryAgain"),
|
|
2329
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2330
|
+
imagePosition: e.imagePosition || "left",
|
|
2331
|
+
isApiError: e.isApiError,
|
|
2332
|
+
toggleTryAgain: e.toggleTryAgain,
|
|
2333
|
+
apiErrorMessage: e.apiErrorMessage,
|
|
2334
|
+
rulesDisplay: e.rulesDisplay,
|
|
2335
|
+
renderPresentedBy: (h) => {
|
|
2336
|
+
var f;
|
|
2337
|
+
return /* @__PURE__ */ t(
|
|
2338
|
+
O,
|
|
2339
|
+
{
|
|
2340
|
+
brandingLogo: r,
|
|
2341
|
+
textColor: h,
|
|
2342
|
+
label: ((f = e.personalityQuiz.labels) == null ? void 0 : f.sponsor) || null
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
) });
|
|
2348
|
+
}, ma = (e) => {
|
|
2349
|
+
var a, l, u, h;
|
|
2350
|
+
const i = N(), { t: r } = E(), o = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, s = i ? ((l = e.personalityQuiz.branding) == null ? void 0 : l.images.mobileLogo) || ((u = e.personalityQuiz.branding) == null ? void 0 : u.images.mainLogo) || "" : ((h = e.personalityQuiz.branding) == null ? void 0 : h.images.mainLogo) || "";
|
|
2351
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: (o == null ? void 0 : o.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2352
|
+
Yn,
|
|
2353
|
+
{
|
|
2354
|
+
entity: e.personalityQuiz,
|
|
2355
|
+
headline: r("personalityQuiz.headline"),
|
|
2356
|
+
tryAgainButtonText: r("personalityQuiz.buttons.tryAgain"),
|
|
2357
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2358
|
+
isApiError: e.isApiError,
|
|
2359
|
+
toggleTryAgain: e.toggleTryAgain,
|
|
2360
|
+
apiErrorMessage: e.apiErrorMessage,
|
|
2361
|
+
rulesDisplay: e.rulesDisplay,
|
|
2362
|
+
renderPresentedBy: (f) => {
|
|
2363
|
+
var d;
|
|
2364
|
+
return /* @__PURE__ */ t(
|
|
2365
|
+
O,
|
|
2366
|
+
{
|
|
2367
|
+
brandingLogo: s,
|
|
2368
|
+
textColor: f,
|
|
2369
|
+
label: ((d = e.personalityQuiz.labels) == null ? void 0 : d.sponsor) || null
|
|
2370
|
+
}
|
|
2371
|
+
);
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
) });
|
|
2375
|
+
}, fa = (e) => {
|
|
2376
|
+
const { t: i } = E(), r = N(), o = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : r ? Qe : Pe, { brandingLogo: s } = _e(e.personalityQuiz.branding || null);
|
|
2377
|
+
return /* @__PURE__ */ t(
|
|
2378
|
+
_n,
|
|
2379
|
+
{
|
|
2380
|
+
entity: e.personalityQuiz,
|
|
2381
|
+
headline: i("personalityQuiz.headline"),
|
|
2382
|
+
tryAgainButtonText: i("personalityQuiz.buttons.tryAgain"),
|
|
2383
|
+
defaultImagePlaceholderUrl: o,
|
|
2384
|
+
isApiError: e.isApiError,
|
|
2385
|
+
toggleTryAgain: e.toggleTryAgain,
|
|
2386
|
+
apiErrorMessage: e.apiErrorMessage,
|
|
2387
|
+
rulesDisplay: e.rulesDisplay,
|
|
2388
|
+
renderPresentedBy: (a) => {
|
|
2389
|
+
var l;
|
|
2390
|
+
return /* @__PURE__ */ t(
|
|
2391
|
+
O,
|
|
2392
|
+
{
|
|
2393
|
+
brandingLogo: s,
|
|
2394
|
+
textColor: a,
|
|
2395
|
+
label: ((l = e.personalityQuiz.labels) == null ? void 0 : l.sponsor) || null
|
|
2396
|
+
}
|
|
2397
|
+
);
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
);
|
|
2401
|
+
}, ya = (e) => {
|
|
2402
|
+
var m, y, g, b, P;
|
|
2403
|
+
const i = ((m = e.personalityQuiz.branding) == null ? void 0 : m.colors) || null, r = N(), o = te(), s = ae(), a = xe(
|
|
2404
|
+
{
|
|
2405
|
+
images: e.personalityQuiz.images,
|
|
2406
|
+
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
2407
|
+
},
|
|
2408
|
+
j.STANDARD
|
|
2409
|
+
), l = (i == null ? void 0 : i.primaryColor) || s.palette.primary.plainColor, u = (i == null ? void 0 : i.contentColor) || s.textColor, h = r ? ((y = e.personalityQuiz.branding) == null ? void 0 : y.images.mobileLogo) || ((g = e.personalityQuiz.branding) == null ? void 0 : g.images.mainLogo) || "" : ((b = e.personalityQuiz.branding) == null ? void 0 : b.images.mainLogo) || "", { t: f } = E(), d = e.imagePosition || "left";
|
|
2410
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: (i == null ? void 0 : i.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2411
|
+
Li,
|
|
2412
|
+
{
|
|
2413
|
+
entity: e.personalityQuiz,
|
|
2414
|
+
headline: f("personalityQuiz.headline"),
|
|
2415
|
+
finalImage: a,
|
|
2416
|
+
imagePosition: d,
|
|
2417
|
+
signInContent: /* @__PURE__ */ t($t, { signInCTA: e.signInCTA, primaryColor: l, pulse: !0 }),
|
|
2418
|
+
brandingContent: /* @__PURE__ */ t(
|
|
2419
|
+
O,
|
|
2420
|
+
{
|
|
2421
|
+
brandingLogo: h,
|
|
2422
|
+
textColor: r && a ? (i == null ? void 0 : i.contentColor) || o.colorSchemes.dark.textColor : u,
|
|
2423
|
+
label: ((P = e.personalityQuiz.labels) == null ? void 0 : P.sponsor) || null
|
|
2424
|
+
}
|
|
2425
|
+
),
|
|
2426
|
+
rulesDisplay: e.rulesDisplay
|
|
2427
|
+
}
|
|
2428
|
+
) });
|
|
2429
|
+
}, ha = (e) => {
|
|
2430
|
+
var d, m, y, g, b;
|
|
2431
|
+
const i = te(), r = ae(), o = N(), s = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : o ? Qe : Pe, a = xe(
|
|
2432
|
+
{
|
|
2433
|
+
images: e.personalityQuiz.images,
|
|
2434
|
+
imagePlaceholder: s
|
|
2435
|
+
},
|
|
2436
|
+
j.SPLIT
|
|
2437
|
+
), { t: l } = E(), u = ((d = e.personalityQuiz.branding) == null ? void 0 : d.colors) || null, h = o ? ((m = e.personalityQuiz.branding) == null ? void 0 : m.images.mobileLogo) || ((y = e.personalityQuiz.branding) == null ? void 0 : y.images.mainLogo) || "" : ((g = e.personalityQuiz.branding) == null ? void 0 : g.images.mainLogo) || "", f = (u == null ? void 0 : u.primaryColor) || r.palette.primary.plainColor;
|
|
2438
|
+
return /* @__PURE__ */ t(Z, { brandingBorderColor: (u == null ? void 0 : u.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2439
|
+
Di,
|
|
2440
|
+
{
|
|
2441
|
+
entity: e.personalityQuiz,
|
|
2442
|
+
headline: l("personalityQuiz.headline"),
|
|
2443
|
+
finalImage: a,
|
|
2444
|
+
signInContent: /* @__PURE__ */ t($t, { signInCTA: e.signInCTA, primaryColor: f, pulse: !0 }),
|
|
2445
|
+
brandingContent: /* @__PURE__ */ t(
|
|
2446
|
+
O,
|
|
2447
|
+
{
|
|
2448
|
+
brandingLogo: h,
|
|
2449
|
+
textColor: (u == null ? void 0 : u.contentColor) || i.colorSchemes.dark.textColor,
|
|
2450
|
+
label: ((b = e.personalityQuiz.labels) == null ? void 0 : b.sponsor) || null
|
|
2451
|
+
}
|
|
2452
|
+
),
|
|
2453
|
+
rulesDisplay: e.rulesDisplay
|
|
2454
|
+
}
|
|
2455
|
+
) });
|
|
2456
|
+
}, ba = n({ display: "contents" }), pa = (e) => {
|
|
2457
|
+
var b;
|
|
2458
|
+
const i = te(), { t: r } = E(), o = N(), s = Vn(j.OVERLAY), { brandingImage: a, brandingColors: l, brandingLogo: u } = _e(
|
|
2459
|
+
e.personalityQuiz.branding || null
|
|
2460
|
+
), h = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : o ? Qe : Pe, f = xe({ images: e.personalityQuiz.images, imagePlaceholder: h }, j.OVERLAY), d = a || f, m = i.colorSchemes.light, y = (l == null ? void 0 : l.primaryColor) || m.palette.primary.plainColor, g = {
|
|
2461
|
+
"--fu-ucrc-primary-on-primary": m.palette.primary.onPrimary,
|
|
2462
|
+
"--fu-ucrc-radius-xl": i.customRadius.light.xl
|
|
2463
|
+
};
|
|
2464
|
+
return /* @__PURE__ */ t(
|
|
2465
|
+
Ri,
|
|
2466
|
+
{
|
|
2467
|
+
entity: e.personalityQuiz,
|
|
2468
|
+
headline: r("personalityQuiz.headline"),
|
|
2469
|
+
backgroundImage: jn(d),
|
|
2470
|
+
imageBackgroundGradient: s,
|
|
2471
|
+
signInContent: /* @__PURE__ */ t("div", { css: ba, style: g, children: /* @__PURE__ */ t($t, { signInCTA: e.signInCTA, primaryColor: y, pulse: !0 }) }),
|
|
2472
|
+
brandingContent: /* @__PURE__ */ t(
|
|
2473
|
+
O,
|
|
2474
|
+
{
|
|
2475
|
+
brandingLogo: u,
|
|
2476
|
+
textColor: i.colorSchemes.dark.textColor,
|
|
2477
|
+
label: ((b = e.personalityQuiz.labels) == null ? void 0 : b.sponsor) || null
|
|
2478
|
+
}
|
|
2479
|
+
),
|
|
2480
|
+
rulesDisplay: e.rulesDisplay
|
|
2481
|
+
}
|
|
2482
|
+
);
|
|
2483
|
+
}, xa = (e) => {
|
|
2484
|
+
var s, a, l;
|
|
2485
|
+
const { t: i } = E(), r = ((s = e.personalityQuiz.branding) == null ? void 0 : s.colors) || null, o = (r == null ? void 0 : r.primaryColor) || ae().palette.primary.plainColor;
|
|
2486
|
+
return /* @__PURE__ */ t(
|
|
2487
|
+
Bt,
|
|
2488
|
+
{
|
|
2489
|
+
entity: e.personalityQuiz,
|
|
2490
|
+
headline: i("personalityQuiz.headline"),
|
|
2491
|
+
sdk: e.sdk,
|
|
2492
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2493
|
+
imagePosition: e.imagePosition,
|
|
2494
|
+
onLeadSubmitted: () => {
|
|
2495
|
+
},
|
|
2496
|
+
MainCard: Z,
|
|
2497
|
+
PresentedBy: O,
|
|
2498
|
+
rulesDisplay: e.rulesDisplay,
|
|
2499
|
+
content: /* @__PURE__ */ t(
|
|
2500
|
+
Ft,
|
|
2501
|
+
{
|
|
2502
|
+
signInCTA: e.signInCTA,
|
|
2503
|
+
labels: (l = (a = e.signInCTA) == null ? void 0 : a.gate) == null ? void 0 : l.labels,
|
|
2504
|
+
primaryColor: o,
|
|
2505
|
+
textColor: (r == null ? void 0 : r.contentColor) || void 0,
|
|
2506
|
+
align: "center"
|
|
2507
|
+
}
|
|
2508
|
+
)
|
|
2509
|
+
}
|
|
2510
|
+
);
|
|
2511
|
+
}, va = (e) => {
|
|
2512
|
+
var s, a, l;
|
|
2513
|
+
const { t: i } = E(), r = ((s = e.personalityQuiz.branding) == null ? void 0 : s.colors) || null, o = (r == null ? void 0 : r.primaryColor) || ae().palette.primary.plainColor;
|
|
2514
|
+
return /* @__PURE__ */ t(
|
|
2515
|
+
Ht,
|
|
2516
|
+
{
|
|
2517
|
+
entity: e.personalityQuiz,
|
|
2518
|
+
headline: i("personalityQuiz.headline"),
|
|
2519
|
+
sdk: e.sdk,
|
|
2520
|
+
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2521
|
+
onLeadSubmitted: () => {
|
|
2522
|
+
},
|
|
2523
|
+
MainCard: Z,
|
|
2524
|
+
PresentedBy: O,
|
|
2525
|
+
rulesDisplay: e.rulesDisplay,
|
|
2526
|
+
content: /* @__PURE__ */ t(
|
|
2527
|
+
Ft,
|
|
2528
|
+
{
|
|
2529
|
+
signInCTA: e.signInCTA,
|
|
2530
|
+
labels: (l = (a = e.signInCTA) == null ? void 0 : a.gate) == null ? void 0 : l.labels,
|
|
2531
|
+
primaryColor: o,
|
|
2532
|
+
textColor: (r == null ? void 0 : r.contentColor) || void 0,
|
|
2533
|
+
align: "center"
|
|
2534
|
+
}
|
|
2535
|
+
)
|
|
2536
|
+
}
|
|
2537
|
+
);
|
|
2538
|
+
}, Ca = (e) => {
|
|
2539
|
+
var a, l, u;
|
|
2540
|
+
const { t: i } = E(), r = te(), o = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, s = (o == null ? void 0 : o.primaryColor) || r.colorSchemes.dark.palette.primary.plainColor;
|
|
2541
|
+
return /* @__PURE__ */ t(
|
|
2542
|
+
Mt,
|
|
2543
|
+
{
|
|
2544
|
+
entity: e.personalityQuiz,
|
|
2545
|
+
headline: i("personalityQuiz.headline"),
|
|
2546
|
+
sdk: e.sdk,
|
|
2547
|
+
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2548
|
+
onLeadSubmitted: () => {
|
|
2549
|
+
},
|
|
2550
|
+
PresentedBy: O,
|
|
2551
|
+
rulesDisplay: e.rulesDisplay,
|
|
2552
|
+
content: /* @__PURE__ */ t(
|
|
2553
|
+
Ft,
|
|
2554
|
+
{
|
|
2555
|
+
signInCTA: e.signInCTA,
|
|
2556
|
+
labels: (u = (l = e.signInCTA) == null ? void 0 : l.gate) == null ? void 0 : u.labels,
|
|
2557
|
+
primaryColor: s,
|
|
2558
|
+
textColor: (o == null ? void 0 : o.contentColor) || r.colorSchemes.dark.textColor,
|
|
2559
|
+
align: "center"
|
|
2560
|
+
}
|
|
2561
|
+
)
|
|
2562
|
+
}
|
|
2563
|
+
);
|
|
2564
|
+
}, Ia = (e) => {
|
|
2565
|
+
const { t: i } = E();
|
|
2566
|
+
return /* @__PURE__ */ t(
|
|
2567
|
+
Bt,
|
|
2568
|
+
{
|
|
2569
|
+
entity: e.personalityQuiz,
|
|
2570
|
+
headline: i("personalityQuiz.headline"),
|
|
2571
|
+
sdk: e.sdk,
|
|
2572
|
+
leads: e.leads,
|
|
2573
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2574
|
+
imagePosition: e.imagePosition,
|
|
2575
|
+
onLeadSubmitted: e.onLeadSubmitted,
|
|
2576
|
+
isSubmitting: e.isSubmitting,
|
|
2577
|
+
MainCard: Z,
|
|
2578
|
+
PresentedBy: O,
|
|
2579
|
+
CollectLeadWrapper: Ee,
|
|
2580
|
+
consents: e.consents
|
|
2581
|
+
}
|
|
2582
|
+
);
|
|
2583
|
+
}, Sa = (e) => {
|
|
2584
|
+
var s, a, l;
|
|
2585
|
+
const { t: i } = E(), r = ((s = e.personalityQuiz.branding) == null ? void 0 : s.colors) || null, o = (r == null ? void 0 : r.primaryColor) || ae().palette.primary.plainColor;
|
|
2586
|
+
return /* @__PURE__ */ t(
|
|
2587
|
+
Bt,
|
|
2588
|
+
{
|
|
2589
|
+
entity: e.personalityQuiz,
|
|
2590
|
+
headline: i("personalityQuiz.headline"),
|
|
2591
|
+
sdk: e.sdk,
|
|
2592
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2593
|
+
imagePosition: e.imagePosition,
|
|
2594
|
+
onLeadSubmitted: e.onSubmit,
|
|
2595
|
+
isSubmitting: e.isSubmitting,
|
|
2596
|
+
MainCard: Z,
|
|
2597
|
+
PresentedBy: O,
|
|
2598
|
+
rulesDisplay: e.rulesDisplay,
|
|
2599
|
+
content: /* @__PURE__ */ t(
|
|
2600
|
+
Me,
|
|
2601
|
+
{
|
|
2602
|
+
consents: e.consents,
|
|
2603
|
+
primaryColor: o,
|
|
2604
|
+
brandingUrls: (a = e.personalityQuiz.branding) == null ? void 0 : a.urls,
|
|
2605
|
+
align: "center"
|
|
2606
|
+
}
|
|
2607
|
+
),
|
|
2608
|
+
footerAction: /* @__PURE__ */ t(
|
|
2609
|
+
st,
|
|
2610
|
+
{
|
|
2611
|
+
onClick: e.onSubmit,
|
|
2612
|
+
label: ((l = e.consents.labels) == null ? void 0 : l.ctaLabel) || i("personalityQuiz.buttons.finish"),
|
|
2613
|
+
isSubmitting: e.isSubmitting,
|
|
2614
|
+
primaryColor: o,
|
|
2615
|
+
showArrow: !0
|
|
2616
|
+
}
|
|
2617
|
+
)
|
|
2618
|
+
}
|
|
2619
|
+
);
|
|
2620
|
+
}, za = (e) => {
|
|
2621
|
+
var s, a;
|
|
2622
|
+
const { t: i } = E(), r = ((s = e.personalityQuiz.branding) == null ? void 0 : s.colors) || null, o = (r == null ? void 0 : r.primaryColor) || ae().palette.primary.plainColor;
|
|
2623
|
+
return /* @__PURE__ */ t(
|
|
2624
|
+
Ht,
|
|
2625
|
+
{
|
|
2626
|
+
entity: e.personalityQuiz,
|
|
2627
|
+
headline: i("personalityQuiz.headline"),
|
|
2628
|
+
sdk: e.sdk,
|
|
2629
|
+
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2630
|
+
onLeadSubmitted: e.onSubmit,
|
|
2631
|
+
isSubmitting: e.isSubmitting,
|
|
2632
|
+
MainCard: Z,
|
|
2633
|
+
PresentedBy: O,
|
|
2634
|
+
rulesDisplay: e.rulesDisplay,
|
|
2635
|
+
content: (
|
|
2636
|
+
// This template keeps its CTA inside the content frame
|
|
2637
|
+
/* @__PURE__ */ t(
|
|
2638
|
+
Me,
|
|
2639
|
+
{
|
|
2640
|
+
consents: e.consents,
|
|
2641
|
+
primaryColor: o,
|
|
2642
|
+
brandingUrls: (a = e.personalityQuiz.branding) == null ? void 0 : a.urls,
|
|
2643
|
+
onSubmit: e.onSubmit,
|
|
2644
|
+
isSubmitting: e.isSubmitting,
|
|
2645
|
+
ctaLabel: i("personalityQuiz.buttons.finish"),
|
|
2646
|
+
align: "center",
|
|
2647
|
+
showArrow: !0
|
|
2648
|
+
}
|
|
2649
|
+
)
|
|
2650
|
+
)
|
|
2651
|
+
}
|
|
2652
|
+
);
|
|
2653
|
+
}, wa = (e) => {
|
|
2654
|
+
var a, l, u;
|
|
2655
|
+
const { t: i } = E(), r = te(), o = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, s = (o == null ? void 0 : o.primaryColor) || r.colorSchemes.dark.palette.primary.plainColor;
|
|
2656
|
+
return /* @__PURE__ */ t(
|
|
2657
|
+
Mt,
|
|
2658
|
+
{
|
|
2659
|
+
entity: e.personalityQuiz,
|
|
2660
|
+
headline: i("personalityQuiz.headline"),
|
|
2661
|
+
sdk: e.sdk,
|
|
2662
|
+
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2663
|
+
onLeadSubmitted: e.onSubmit,
|
|
2664
|
+
isSubmitting: e.isSubmitting,
|
|
2665
|
+
PresentedBy: O,
|
|
2666
|
+
rulesDisplay: e.rulesDisplay,
|
|
2667
|
+
content: /* @__PURE__ */ t(
|
|
2668
|
+
Me,
|
|
2669
|
+
{
|
|
2670
|
+
consents: e.consents,
|
|
2671
|
+
primaryColor: s,
|
|
2672
|
+
textColor: (o == null ? void 0 : o.contentColor) || r.colorSchemes.dark.textColor,
|
|
2673
|
+
brandingUrls: (l = e.personalityQuiz.branding) == null ? void 0 : l.urls
|
|
2674
|
+
}
|
|
2675
|
+
),
|
|
2676
|
+
footerAction: /* @__PURE__ */ t(
|
|
2677
|
+
st,
|
|
2678
|
+
{
|
|
2679
|
+
onClick: e.onSubmit,
|
|
2680
|
+
label: ((u = e.consents.labels) == null ? void 0 : u.ctaLabel) || i("personalityQuiz.buttons.finish"),
|
|
2681
|
+
isSubmitting: e.isSubmitting,
|
|
2682
|
+
primaryColor: s,
|
|
2683
|
+
showArrow: !0
|
|
2684
|
+
}
|
|
2685
|
+
)
|
|
2686
|
+
}
|
|
2687
|
+
);
|
|
2688
|
+
}, ka = (e) => {
|
|
2689
|
+
const { t: i } = E();
|
|
2690
|
+
return /* @__PURE__ */ t(
|
|
2691
|
+
Ht,
|
|
2692
|
+
{
|
|
2693
|
+
entity: e.personalityQuiz,
|
|
2694
|
+
headline: i("personalityQuiz.headline"),
|
|
2695
|
+
sdk: e.sdk,
|
|
2696
|
+
leads: e.leads,
|
|
2697
|
+
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2698
|
+
onLeadSubmitted: e.onLeadSubmitted,
|
|
2699
|
+
isSubmitting: e.isSubmitting,
|
|
2700
|
+
MainCard: Z,
|
|
2701
|
+
PresentedBy: O,
|
|
2702
|
+
CollectLeadWrapper: Ee,
|
|
2703
|
+
consents: e.consents
|
|
2704
|
+
}
|
|
2705
|
+
);
|
|
2706
|
+
}, Aa = (e) => {
|
|
2707
|
+
const { t: i } = E();
|
|
2708
|
+
return /* @__PURE__ */ t(
|
|
2709
|
+
Mt,
|
|
2710
|
+
{
|
|
2711
|
+
entity: e.personalityQuiz,
|
|
2712
|
+
headline: i("personalityQuiz.headline"),
|
|
2713
|
+
sdk: e.sdk,
|
|
2714
|
+
leads: e.leads,
|
|
2715
|
+
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2716
|
+
onLeadSubmitted: e.onLeadSubmitted,
|
|
2717
|
+
isSubmitting: e.isSubmitting,
|
|
2718
|
+
PresentedBy: O,
|
|
2719
|
+
CollectLeadWrapper: Ee,
|
|
2720
|
+
consents: e.consents
|
|
2721
|
+
}
|
|
2722
|
+
);
|
|
2723
|
+
};
|
|
2724
|
+
function ze(e) {
|
|
2725
|
+
return e.template === j.STANDARD;
|
|
2726
|
+
}
|
|
2727
|
+
const Qa = (e) => {
|
|
2728
|
+
var Nt, _t, Yt, Zt;
|
|
2729
|
+
const [i, r] = U(1), [o, s] = U(null), [a, l] = U([]), [u, h] = U([]), [f, d] = U(!1), [m, y] = U(!1), [g, b] = U(!1), [P, S] = U(!1), [q, v] = U(!1), [A, C] = U(!1), [R, F] = U(!1), [w, I] = U(!1), [D, z] = U(!1), [k, L] = U(!1), G = ke(!1), c = Ui(e.entityId, e.sdk), Q = hi({
|
|
2730
|
+
signInCTA: e.signInCTA,
|
|
2731
|
+
authRequired: (c == null ? void 0 : c.authRequirement) === "REGISTERED",
|
|
2732
|
+
userIsLoggedIn: e.userIsLoggedIn,
|
|
2733
|
+
totalSteps: ((Nt = c == null ? void 0 : c.questions) == null ? void 0 : Nt.length) ?? 0
|
|
2734
|
+
}), $ = Q.isDeferred && Q.isPending, {
|
|
2735
|
+
myParticipation: B,
|
|
2736
|
+
isUnauthorized: J,
|
|
2737
|
+
isApiError: K,
|
|
2738
|
+
apiMessage: ee,
|
|
2739
|
+
setIsUnauthorized: oe,
|
|
2740
|
+
setIsApiError: le,
|
|
2741
|
+
setApiMessage: ge
|
|
2742
|
+
} = $i(
|
|
2743
|
+
e.entityId,
|
|
2744
|
+
e.sdk,
|
|
2745
|
+
m,
|
|
2746
|
+
$,
|
|
2747
|
+
Q.isSignedIn
|
|
2748
|
+
), {
|
|
2749
|
+
loading: ie,
|
|
2750
|
+
pending: _,
|
|
2751
|
+
checked: ve,
|
|
2752
|
+
setChecked: We,
|
|
2753
|
+
allRequiredChecked: Oe,
|
|
2754
|
+
submit: qe
|
|
2755
|
+
} = bi({
|
|
2756
|
+
sdk: e.sdk,
|
|
2757
|
+
consents: (_t = e.consents) == null ? void 0 : _t.items,
|
|
2758
|
+
entityId: e.entityId,
|
|
2759
|
+
entityType: "personality_quiz"
|
|
2760
|
+
}), he = !!((c == null ? void 0 : c.authRequirement) === "LEAD" ? (Yt = e.leads) == null ? void 0 : Yt.position : void 0) && _.length > 0, Le = he ? [] : _.filter((p) => p.position !== "after"), De = he ? [] : _.filter((p) => p.position === "after"), ri = (p) => {
|
|
2761
|
+
We(p), L(!1);
|
|
2762
|
+
}, Gt = (p) => {
|
|
2763
|
+
var T;
|
|
2764
|
+
return {
|
|
2765
|
+
items: p,
|
|
2766
|
+
checked: ve,
|
|
2767
|
+
onChange: ri,
|
|
2768
|
+
labels: (T = e.consents) == null ? void 0 : T.labels,
|
|
2769
|
+
showError: k
|
|
2770
|
+
};
|
|
2771
|
+
}, oi = pt(() => {
|
|
2772
|
+
var T;
|
|
2773
|
+
if (!c) return "";
|
|
2774
|
+
const p = (c.questions || []).map((Y) => Y.questionId).join(",");
|
|
2775
|
+
return `${((T = c.questions) == null ? void 0 : T.length) ?? 0}:${p}`;
|
|
2776
|
+
}, [c]), {
|
|
2777
|
+
read: li,
|
|
2778
|
+
save: si,
|
|
2779
|
+
clear: ut
|
|
2780
|
+
} = pi({
|
|
2781
|
+
namespace: "personality-quiz",
|
|
2782
|
+
entityId: e.entityId,
|
|
2783
|
+
fingerprint: oi
|
|
2784
|
+
}), Te = ke([]), dt = ke(!1);
|
|
2785
|
+
me(() => {
|
|
2786
|
+
var T;
|
|
2787
|
+
if (ie || G.current) return;
|
|
2788
|
+
const p = (c == null ? void 0 : c.authRequirement) === "LEAD" && ((T = e.leads) == null ? void 0 : T.position) === "before";
|
|
2789
|
+
F(!p && Le.length > 0);
|
|
2790
|
+
}, [
|
|
2791
|
+
ie,
|
|
2792
|
+
Le.length,
|
|
2793
|
+
c == null ? void 0 : c.authRequirement
|
|
2794
|
+
]);
|
|
2795
|
+
const Ve = (Zt = u[0]) != null && Zt.personalityQuizId ? u[0] : B == null ? void 0 : B[0], Ce = pt(() => !c || !(Ve != null && Ve.personalityQuizId) || !c.maxAttempts ? !1 : c.maxAttempts <= Ve.attempts, [c, Ve]), Ze = pt(() => c ? xi(c.related) : null, [c]);
|
|
2796
|
+
me(() => {
|
|
2797
|
+
vi(e.language || "en");
|
|
2798
|
+
}, [e.language]), me(() => {
|
|
2799
|
+
var p, T, Y;
|
|
2800
|
+
(p = u[0]) != null && p.personalityQuizId && ((Y = (T = e.callbacks) == null ? void 0 : T.onFinish) == null || Y.call(T, u[0]));
|
|
2801
|
+
}, [u]), me(() => {
|
|
2802
|
+
if (dt.current || !(c != null && c.id) || !B || ie || !Q.isDeferred || !Q.isSignedIn) return;
|
|
2803
|
+
if (a.length) {
|
|
2804
|
+
dt.current = !0;
|
|
2805
|
+
return;
|
|
2806
|
+
}
|
|
2807
|
+
dt.current = !0;
|
|
2808
|
+
const p = li();
|
|
2809
|
+
if (!p) return;
|
|
2810
|
+
if (Ce) {
|
|
2811
|
+
ut();
|
|
2812
|
+
return;
|
|
2813
|
+
}
|
|
2814
|
+
const T = p.answers || [];
|
|
2815
|
+
l(T), r(
|
|
2816
|
+
Math.min(T.length + 1, c.questions.length)
|
|
2817
|
+
), p.checkedConsents && We(p.checkedConsents), Te.current = p.heldConsentIds || [], G.current = !0, F(!1);
|
|
2818
|
+
}, [
|
|
2819
|
+
c,
|
|
2820
|
+
B,
|
|
2821
|
+
ie,
|
|
2822
|
+
Q.isDeferred,
|
|
2823
|
+
Q.isSignedIn,
|
|
2824
|
+
Ce,
|
|
2825
|
+
a.length
|
|
2826
|
+
]), me(() => {
|
|
2827
|
+
!$ || !(c != null && c.id) || a.length && si({
|
|
2828
|
+
answers: a,
|
|
2829
|
+
checkedConsents: ve,
|
|
2830
|
+
heldConsentIds: Te.current
|
|
2831
|
+
});
|
|
2832
|
+
}, [$, c, a, ve]), me(() => {
|
|
2833
|
+
Ce && ut();
|
|
2834
|
+
}, [Ce]);
|
|
2835
|
+
const Ke = ke(null);
|
|
2836
|
+
if (me(() => {
|
|
2837
|
+
var p;
|
|
2838
|
+
Q.isPending || !A || (C(!1), (p = Ke.current) == null || p.call(Ke));
|
|
2839
|
+
}, [Q.isPending, A]), me(() => {
|
|
2840
|
+
if (Q.isPending || !Te.current.length) return;
|
|
2841
|
+
const p = _.filter(
|
|
2842
|
+
(T) => Te.current.includes(T.consentId)
|
|
2843
|
+
);
|
|
2844
|
+
Te.current = [], p.length && qe(p);
|
|
2845
|
+
}, [Q.isPending, _, qe]), !c || !B)
|
|
2846
|
+
return /* @__PURE__ */ t(Jt, { marginBlock: "160px" });
|
|
2847
|
+
if (!c.id)
|
|
2848
|
+
return /* @__PURE__ */ t(ua, {});
|
|
2849
|
+
if (c.status !== "ACTIVE")
|
|
2850
|
+
return /* @__PURE__ */ t(
|
|
2851
|
+
da,
|
|
2852
|
+
{
|
|
2853
|
+
personalityQuiz: c,
|
|
2854
|
+
template: e.template,
|
|
2855
|
+
imagePosition: ze(e) ? e.imagePosition : void 0,
|
|
2856
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2857
|
+
rulesDisplay: e.rulesDisplay
|
|
2858
|
+
}
|
|
2859
|
+
);
|
|
2860
|
+
if (Q.isPending && Q.position === "before")
|
|
2861
|
+
return ze(e) ? /* @__PURE__ */ t(
|
|
2862
|
+
ya,
|
|
2863
|
+
{
|
|
2864
|
+
personalityQuiz: c,
|
|
2865
|
+
imagePosition: e.imagePosition,
|
|
2866
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2867
|
+
signInCTA: e.signInCTA
|
|
2868
|
+
}
|
|
2869
|
+
) : e.template === j.OVERLAY ? /* @__PURE__ */ t(
|
|
2870
|
+
pa,
|
|
2871
|
+
{
|
|
2872
|
+
personalityQuiz: c,
|
|
2873
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2874
|
+
signInCTA: e.signInCTA
|
|
2875
|
+
}
|
|
2876
|
+
) : /* @__PURE__ */ t(
|
|
2877
|
+
ha,
|
|
2878
|
+
{
|
|
2879
|
+
personalityQuiz: c,
|
|
2880
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2881
|
+
signInCTA: e.signInCTA
|
|
2882
|
+
}
|
|
2883
|
+
);
|
|
2884
|
+
const gt = () => {
|
|
2885
|
+
le(!1), oe(!1), h([]), r(1), s(null), l([]), d(!1), b(!1), S(!1), v(!1), y(!m);
|
|
2886
|
+
};
|
|
2887
|
+
if (J || K)
|
|
2888
|
+
return ze(e) ? /* @__PURE__ */ t(
|
|
2889
|
+
ga,
|
|
2890
|
+
{
|
|
2891
|
+
personalityQuiz: c,
|
|
2892
|
+
imagePosition: e.imagePosition,
|
|
2893
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2894
|
+
apiErrorMessage: ee,
|
|
2895
|
+
isApiError: K,
|
|
2896
|
+
rulesDisplay: e.rulesDisplay,
|
|
2897
|
+
toggleTryAgain: gt
|
|
2898
|
+
}
|
|
2899
|
+
) : e.template === j.OVERLAY ? /* @__PURE__ */ t(
|
|
2900
|
+
fa,
|
|
2901
|
+
{
|
|
2902
|
+
personalityQuiz: c,
|
|
2903
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2904
|
+
apiErrorMessage: ee,
|
|
2905
|
+
isApiError: K,
|
|
2906
|
+
rulesDisplay: e.rulesDisplay,
|
|
2907
|
+
toggleTryAgain: gt
|
|
2908
|
+
}
|
|
2909
|
+
) : /* @__PURE__ */ t(
|
|
2910
|
+
ma,
|
|
2911
|
+
{
|
|
2912
|
+
personalityQuiz: c,
|
|
2913
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2914
|
+
apiErrorMessage: ee,
|
|
2915
|
+
isApiError: K,
|
|
2916
|
+
rulesDisplay: e.rulesDisplay,
|
|
2917
|
+
toggleTryAgain: gt
|
|
2918
|
+
}
|
|
2919
|
+
);
|
|
2920
|
+
const mt = async () => {
|
|
2921
|
+
var Y;
|
|
2922
|
+
const p = c.questions[i - 1], T = [
|
|
2923
|
+
...a,
|
|
2924
|
+
{
|
|
2925
|
+
questionId: p.questionId,
|
|
2926
|
+
optionId: o
|
|
2927
|
+
}
|
|
2928
|
+
];
|
|
2929
|
+
if (l(T), i < c.questions.length) {
|
|
2930
|
+
r((Re) => Re + 1), s(null);
|
|
2931
|
+
return;
|
|
2932
|
+
}
|
|
2933
|
+
if (i === c.questions.length) {
|
|
2934
|
+
if ($) {
|
|
2935
|
+
C(!0);
|
|
2936
|
+
return;
|
|
2937
|
+
}
|
|
2938
|
+
if (De.length > 0 && !D) {
|
|
2939
|
+
I(!0);
|
|
2940
|
+
return;
|
|
2941
|
+
}
|
|
2942
|
+
if (((Y = e.leads) == null ? void 0 : Y.position) === "after" && c.authRequirement === "LEAD" && !P) {
|
|
2943
|
+
v(!0);
|
|
2944
|
+
return;
|
|
2945
|
+
}
|
|
2946
|
+
await Xe(T);
|
|
2947
|
+
}
|
|
2948
|
+
}, Xe = async (p) => {
|
|
2949
|
+
try {
|
|
2950
|
+
d(!0);
|
|
2951
|
+
const T = await e.sdk.miniGames.participateInPersonalityQuiz(
|
|
2952
|
+
e.entityId,
|
|
2953
|
+
p
|
|
2954
|
+
);
|
|
2955
|
+
d(!1), h([T]), s(null), ut();
|
|
2956
|
+
} catch (T) {
|
|
2957
|
+
d(!1), h([new Gn()]), console.error("[personality-quiz-play] participation failed", T);
|
|
2958
|
+
const { code: Y, message: Re } = Ci(T, e.sdk);
|
|
2959
|
+
Y === 401 || Y === 403 ? oe(!0) : (le(!0), ge(Re || ""));
|
|
2960
|
+
}
|
|
2961
|
+
}, ci = async () => {
|
|
2962
|
+
var p;
|
|
2963
|
+
if (De.length > 0 && !D) {
|
|
2964
|
+
I(!0);
|
|
2965
|
+
return;
|
|
2966
|
+
}
|
|
2967
|
+
if (((p = e.leads) == null ? void 0 : p.position) === "after" && c.authRequirement === "LEAD" && !P) {
|
|
2968
|
+
v(!0);
|
|
2969
|
+
return;
|
|
2970
|
+
}
|
|
2971
|
+
await Xe(a);
|
|
2972
|
+
};
|
|
2973
|
+
Ke.current = ci;
|
|
2974
|
+
const ft = async () => {
|
|
2975
|
+
if (Le.length > 0) {
|
|
2976
|
+
if (g) return;
|
|
2977
|
+
if (!Oe(Le)) {
|
|
2978
|
+
L(!0);
|
|
2979
|
+
return;
|
|
2980
|
+
}
|
|
2981
|
+
$ ? Te.current = Le.map(
|
|
2982
|
+
(p) => p.consentId
|
|
2983
|
+
) : (b(!0), await qe(Le), b(!1));
|
|
2984
|
+
}
|
|
2985
|
+
G.current = !0, F(!1);
|
|
2986
|
+
}, ui = async () => {
|
|
2987
|
+
if (!Oe(De)) {
|
|
2988
|
+
L(!0);
|
|
2989
|
+
return;
|
|
2990
|
+
}
|
|
2991
|
+
b(!0), await qe(De), z(!0), await Xe(a), b(!1), I(!1);
|
|
2992
|
+
}, yt = async () => {
|
|
2993
|
+
b(!0), await Xe(a), b(!1), S(!0);
|
|
2994
|
+
}, ht = (p) => {
|
|
2995
|
+
s(p);
|
|
2996
|
+
}, bt = () => {
|
|
2997
|
+
r(1), s(null), l([]), h([]), b(!1), S(!1), v(!1), I(!1), L(!1);
|
|
2998
|
+
}, di = () => {
|
|
2999
|
+
const p = Gt(Le), T = he ? _ : void 0, Y = De.length > 0 && !D;
|
|
3000
|
+
return e.template === j.OVERLAY ? /* @__PURE__ */ t(
|
|
3001
|
+
Wi,
|
|
3002
|
+
{
|
|
3003
|
+
sdk: e.sdk,
|
|
3004
|
+
leads: e.leads,
|
|
3005
|
+
personalityQuiz: c,
|
|
3006
|
+
question: c.questions[i - 1],
|
|
3007
|
+
selectedOption: o,
|
|
3008
|
+
currentQuestion: i,
|
|
3009
|
+
answerQuestion: ht,
|
|
3010
|
+
handleNext: mt,
|
|
3011
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3012
|
+
rulesDisplay: e.rulesDisplay,
|
|
3013
|
+
isLoading: f,
|
|
3014
|
+
consents: p,
|
|
3015
|
+
leadConsents: T,
|
|
3016
|
+
applyConsentGate: R,
|
|
3017
|
+
hasAfterConsents: Y,
|
|
3018
|
+
isSubmitting: g,
|
|
3019
|
+
startPlaying: ft
|
|
3020
|
+
}
|
|
3021
|
+
) : ze(e) ? /* @__PURE__ */ t(
|
|
3022
|
+
Gi,
|
|
3023
|
+
{
|
|
3024
|
+
sdk: e.sdk,
|
|
3025
|
+
leads: e.leads,
|
|
3026
|
+
personalityQuiz: c,
|
|
3027
|
+
question: c.questions[i - 1],
|
|
3028
|
+
selectedOption: o,
|
|
3029
|
+
currentQuestion: i,
|
|
3030
|
+
answerQuestion: ht,
|
|
3031
|
+
handleNext: mt,
|
|
3032
|
+
imagePosition: e.imagePosition,
|
|
3033
|
+
userParticipation: a,
|
|
3034
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3035
|
+
rulesDisplay: e.rulesDisplay,
|
|
3036
|
+
isLoading: f,
|
|
3037
|
+
consents: p,
|
|
3038
|
+
leadConsents: T,
|
|
3039
|
+
applyConsentGate: R,
|
|
3040
|
+
hasAfterConsents: Y,
|
|
3041
|
+
isSubmitting: g,
|
|
3042
|
+
startPlaying: ft
|
|
3043
|
+
}
|
|
3044
|
+
) : /* @__PURE__ */ t(
|
|
3045
|
+
_i,
|
|
3046
|
+
{
|
|
3047
|
+
sdk: e.sdk,
|
|
3048
|
+
leads: e.leads,
|
|
3049
|
+
personalityQuiz: c,
|
|
3050
|
+
question: c.questions[i - 1],
|
|
3051
|
+
selectedOption: o,
|
|
3052
|
+
currentQuestion: i,
|
|
3053
|
+
answerQuestion: ht,
|
|
3054
|
+
handleNext: mt,
|
|
3055
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3056
|
+
rulesDisplay: e.rulesDisplay,
|
|
3057
|
+
isLoading: f,
|
|
3058
|
+
consents: p,
|
|
3059
|
+
leadConsents: T,
|
|
3060
|
+
applyConsentGate: R,
|
|
3061
|
+
hasAfterConsents: Y,
|
|
3062
|
+
isSubmitting: g,
|
|
3063
|
+
startPlaying: ft
|
|
3064
|
+
}
|
|
3065
|
+
);
|
|
3066
|
+
};
|
|
3067
|
+
if ($ && (A || Q.position === "step" && i > Q.afterStep)) {
|
|
3068
|
+
const p = {
|
|
3069
|
+
personalityQuiz: c,
|
|
3070
|
+
sdk: e.sdk,
|
|
3071
|
+
signInCTA: e.signInCTA,
|
|
3072
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3073
|
+
rulesDisplay: e.rulesDisplay
|
|
3074
|
+
};
|
|
3075
|
+
return ze(e) ? /* @__PURE__ */ t(
|
|
3076
|
+
xa,
|
|
3077
|
+
{
|
|
3078
|
+
...p,
|
|
3079
|
+
imagePosition: e.imagePosition
|
|
3080
|
+
}
|
|
3081
|
+
) : e.template === j.OVERLAY ? /* @__PURE__ */ t(Ca, { ...p }) : /* @__PURE__ */ t(va, { ...p });
|
|
3082
|
+
}
|
|
3083
|
+
if (w && De.length > 0) {
|
|
3084
|
+
const p = {
|
|
3085
|
+
personalityQuiz: c,
|
|
3086
|
+
sdk: e.sdk,
|
|
3087
|
+
consents: Gt(De),
|
|
3088
|
+
onSubmit: ui,
|
|
3089
|
+
isSubmitting: g,
|
|
3090
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3091
|
+
rulesDisplay: e.rulesDisplay
|
|
3092
|
+
};
|
|
3093
|
+
return ze(e) ? /* @__PURE__ */ t(
|
|
3094
|
+
Sa,
|
|
3095
|
+
{
|
|
3096
|
+
...p,
|
|
3097
|
+
imagePosition: e.imagePosition
|
|
3098
|
+
}
|
|
3099
|
+
) : e.template === j.OVERLAY ? /* @__PURE__ */ t(wa, { ...p }) : /* @__PURE__ */ t(za, { ...p });
|
|
3100
|
+
}
|
|
3101
|
+
if (q && !P)
|
|
3102
|
+
return ze(e) ? /* @__PURE__ */ t(
|
|
3103
|
+
Ia,
|
|
3104
|
+
{
|
|
3105
|
+
personalityQuiz: c,
|
|
3106
|
+
sdk: e.sdk,
|
|
3107
|
+
leads: e.leads,
|
|
3108
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3109
|
+
imagePosition: e.imagePosition,
|
|
3110
|
+
onLeadSubmitted: yt,
|
|
3111
|
+
isSubmitting: g,
|
|
3112
|
+
consents: he ? _ : void 0
|
|
3113
|
+
}
|
|
3114
|
+
) : e.template === j.SPLIT ? /* @__PURE__ */ t(
|
|
3115
|
+
ka,
|
|
3116
|
+
{
|
|
3117
|
+
personalityQuiz: c,
|
|
3118
|
+
sdk: e.sdk,
|
|
3119
|
+
leads: e.leads,
|
|
3120
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3121
|
+
onLeadSubmitted: yt,
|
|
3122
|
+
isSubmitting: g,
|
|
3123
|
+
consents: he ? _ : void 0
|
|
3124
|
+
}
|
|
3125
|
+
) : e.template === j.OVERLAY ? /* @__PURE__ */ t(
|
|
3126
|
+
Aa,
|
|
3127
|
+
{
|
|
3128
|
+
personalityQuiz: c,
|
|
3129
|
+
sdk: e.sdk,
|
|
3130
|
+
leads: e.leads,
|
|
3131
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3132
|
+
onLeadSubmitted: yt,
|
|
3133
|
+
isSubmitting: g,
|
|
3134
|
+
consents: he ? _ : void 0
|
|
3135
|
+
}
|
|
3136
|
+
) : /* @__PURE__ */ t(Jt, { marginBlock: "160px" });
|
|
3137
|
+
if (u.length || Ce) {
|
|
3138
|
+
const p = u[0] ?? B[0], T = Ze ? /* @__PURE__ */ t(Kt, { entityId: Ze, sdk: e.sdk, children: (Re) => /* @__PURE__ */ t(Xt, { infoPage: Re, variant: e.chanceGameVariant }) }) : void 0, Y = Ze ? /* @__PURE__ */ t(Kt, { entityId: Ze, sdk: e.sdk, children: (Re) => /* @__PURE__ */ t(Xt, { infoPage: Re, variant: e.chanceGameVariant, forceMobile: !0 }) }) : void 0;
|
|
3139
|
+
return e.template === j.OVERLAY ? /* @__PURE__ */ t(
|
|
3140
|
+
ca,
|
|
3141
|
+
{
|
|
3142
|
+
summary: p,
|
|
3143
|
+
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
3144
|
+
personalityQuiz: c,
|
|
3145
|
+
maxAttemptsReached: Ce,
|
|
3146
|
+
playAgain: bt,
|
|
3147
|
+
sdk: e.sdk,
|
|
3148
|
+
leads: e.leads,
|
|
3149
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3150
|
+
rulesDisplay: e.rulesDisplay,
|
|
3151
|
+
additionalCTA: e.additionalCTA,
|
|
3152
|
+
chanceGameContent: T
|
|
3153
|
+
}
|
|
3154
|
+
) : ze(e) ? /* @__PURE__ */ t(
|
|
3155
|
+
ea,
|
|
3156
|
+
{
|
|
3157
|
+
imagePosition: e.imagePosition || "left",
|
|
3158
|
+
summary: p,
|
|
3159
|
+
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
3160
|
+
personalityQuiz: c,
|
|
3161
|
+
maxAttemptsReached: Ce,
|
|
3162
|
+
sdk: e.sdk,
|
|
3163
|
+
leads: e.leads,
|
|
3164
|
+
playAgain: bt,
|
|
3165
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3166
|
+
rulesDisplay: e.rulesDisplay,
|
|
3167
|
+
additionalCTA: e.additionalCTA,
|
|
3168
|
+
chanceGameContent: Y
|
|
3169
|
+
}
|
|
3170
|
+
) : /* @__PURE__ */ t(
|
|
3171
|
+
ra,
|
|
3172
|
+
{
|
|
3173
|
+
summary: p,
|
|
3174
|
+
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
3175
|
+
personalityQuiz: c,
|
|
3176
|
+
maxAttemptsReached: Ce,
|
|
3177
|
+
playAgain: bt,
|
|
3178
|
+
sdk: e.sdk,
|
|
3179
|
+
leads: e.leads,
|
|
3180
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3181
|
+
rulesDisplay: e.rulesDisplay,
|
|
3182
|
+
additionalCTA: e.additionalCTA,
|
|
3183
|
+
chanceGameContent: Y
|
|
3184
|
+
}
|
|
3185
|
+
);
|
|
3186
|
+
}
|
|
3187
|
+
return di();
|
|
3188
|
+
}, Pa = (e) => {
|
|
3189
|
+
var r;
|
|
3190
|
+
const i = rt.useMemo(
|
|
3191
|
+
() => e.template === j.OVERLAY ? { ...e.themeOptions, mode: "dark" } : e.themeOptions,
|
|
3192
|
+
[e.template, e.themeOptions]
|
|
3193
|
+
);
|
|
3194
|
+
return /* @__PURE__ */ t(
|
|
3195
|
+
Ti,
|
|
3196
|
+
{
|
|
3197
|
+
packageName: "personality-quiz-play",
|
|
3198
|
+
language: e.language,
|
|
3199
|
+
themeOptions: i,
|
|
3200
|
+
disableCache: e.disableCache,
|
|
3201
|
+
optionsLayout: e.optionsLayout,
|
|
3202
|
+
leadPhoneCountryCode: (r = e.leads) == null ? void 0 : r.phoneCountryCode,
|
|
3203
|
+
children: e.children
|
|
3204
|
+
}
|
|
3205
|
+
);
|
|
3206
|
+
}, Ma = (e) => /* @__PURE__ */ t(Pa, { ...e, children: /* @__PURE__ */ t(Qa, { ...e }) });
|
|
3207
|
+
export {
|
|
3208
|
+
Ma as M
|
|
3209
|
+
};
|