fansunited-frontend-components 0.0.98 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/Betslip.js +2 -2
  2. package/ChanceGame.js +952 -1467
  3. package/ClassicQuizPlay.js +2 -2
  4. package/CollectLead.js +405 -1163
  5. package/CompetitionStatistics.js +2042 -2215
  6. package/CompetitorCard.js +4251 -5085
  7. package/Discussion.js +2 -2
  8. package/EitherOrPlay.js +2 -2
  9. package/EventCard.js +6062 -7544
  10. package/EventGamePlay.js +2 -2
  11. package/Leaderboard.js +556 -849
  12. package/List.js +689 -718
  13. package/MatchQuizPlay.js +2 -2
  14. package/Odds.js +50 -42
  15. package/PersonalityQuizPlay.js +2 -2
  16. package/PickThePair.js +925 -1824
  17. package/PlayerOfTheMatch.js +2106 -2207
  18. package/PollVote.js +2 -2
  19. package/Predictor.js +4208 -18675
  20. package/README.md +1 -1
  21. package/Standings.js +1014 -1336
  22. package/TopX.js +3223 -17005
  23. package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-z8XYzgDW.js} +2 -2
  24. package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
  25. package/chunks/PickOneOfX-IvE4OvyT.js +3146 -0
  26. package/chunks/index-BNl8scz6.js +4 -0
  27. package/chunks/index-CSa2JU4m.js +4 -0
  28. package/chunks/index-CVRI82Gb.js +4 -0
  29. package/chunks/index-Cd1dg0KI.js +4 -0
  30. package/chunks/index-Cei2fzi7.js +4 -0
  31. package/chunks/index-Cxb4wEJU.js +4 -0
  32. package/chunks/index-w1LGN5dz.js +4 -0
  33. package/chunks/main-07vzblS8.js +2091 -0
  34. package/chunks/main-C7X4dM_P.js +4827 -0
  35. package/chunks/main-D_QDfmAw.js +6417 -0
  36. package/chunks/main-DdL0UekL.js +4775 -0
  37. package/chunks/main-DmBfwyb4.js +2992 -0
  38. package/chunks/main-LEE8n2cG.js +3117 -0
  39. package/chunks/main-P2WNvBZE.js +1804 -0
  40. package/chunks/main-gV165E-A.js +1928 -0
  41. package/chunks/predictionsHelpers-fwXaMadu.js +10063 -0
  42. package/chunks/{withVersionStamp-T8seRk9h.js → withVersionStamp-CPDfSE5H.js} +1 -1
  43. package/package.json +2 -6
  44. package/withVersionStamp.d.ts.map +1 -1
  45. package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
  46. package/chunks/OddsStrip-BnSp5TXa.js +0 -383
  47. package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
  48. package/chunks/chevron-left-CxfCSZcr.js +0 -13
  49. package/chunks/chevron-right-BEQMacFn.js +0 -13
  50. package/chunks/chevrons-right-CXSpQt9w.js +0 -25
  51. package/chunks/createLucideIcon-YBRjY5Kl.js +0 -79
  52. package/chunks/index-Aq5MbUB9.js +0 -4
  53. package/chunks/index-BBQm_8LD.js +0 -4
  54. package/chunks/index-BC_sWWgc.js +0 -4
  55. package/chunks/index-DXKDJ1Vp.js +0 -4
  56. package/chunks/index-DjT5NrbA.js +0 -4
  57. package/chunks/index-DvLRehH6.js +0 -4
  58. package/chunks/index-aIMaxR-p.js +0 -4
  59. package/chunks/main-52Wff7qC.js +0 -11441
  60. package/chunks/main-65WcUqAl.js +0 -4013
  61. package/chunks/main-B58mi9jx.js +0 -5622
  62. package/chunks/main-BIdXUTZS.js +0 -7308
  63. package/chunks/main-DD-NEzC7.js +0 -8241
  64. package/chunks/main-DUnfJPzY.js +0 -3608
  65. package/chunks/main-DpCBqqg_.js +0 -1950
  66. package/chunks/main-Drznt1ak.js +0 -1790
  67. package/chunks/users-wbJRbqW8.js +0 -16
  68. package/chunks/x-CK4GYo7T.js +0 -14
package/ChanceGame.js CHANGED
@@ -1,679 +1,482 @@
1
- import { jsx as t, jsxs as w, Fragment as re } from "react/jsx-runtime";
2
- import { isMobile as J, isLarge as Ke, useCornerRadius as ve, useColors as le, useBorderSize as Se, NotFoundSkeleton as Je, ChanceGameTemplate as he, useFontFamily as we, useSpacingScale as xe, hexToRgb as Ce, useCurrentThemeMode as Te, useImageVariant as fe, WidgetTemplate as pe, StandardSkeleton as $e, useInternalTheme as Ae, OverlaySkeleton as Ie, defaultBgVertical as Ge, defaultBg as Ee, isTablet as qe, getBrandingClickUrl as Qe, useInfoPage as Ze, initializeI18n as et, Spinner as tt, ChanceGameVariant as ne, languageToCountryCode as ot, getLanguageDirection as nt, applyDirectionToMount as rt, widgetCacheKey as it, createWidgetCache as lt, ContainerProvider as at, ThemeProvider as st, ConstantsProvider as ct } from "fansunited-frontend-core";
3
- import Z, { useState as dt, useEffect as mt } from "react";
4
- import { useTranslation as se } from "react-i18next";
5
- import { Box as d, Typography as B, Button as ue } from "@mui/joy";
6
- import { u as ht, S as ie, c as Ve, D as He, C as ut, W as xt, d as ft, e as pt, f as gt, O as yt, F as bt, b as be, a as vt, P as St } from "./chunks/PickOneOfX-DaJtkbCw.js";
7
- import { CacheProvider as wt } from "@emotion/react";
8
- import { createPortal as kt } from "react-dom";
9
- import { w as Rt } from "./chunks/withVersionStamp-T8seRk9h.js";
10
- const ke = ({
11
- children: e,
12
- brandingBorderColor: c,
13
- state: a
14
- }) => {
15
- const n = J(), g = Ke(), o = a === "play" ? g : n, h = ve().md, i = c || le().secondaryContainer, s = Se().size + " solid " + i;
16
- return /* @__PURE__ */ t(
17
- d,
18
- {
19
- sx: {
20
- display: "flex",
21
- flexDirection: o ? "column" : "row",
22
- width: "100%",
23
- borderRadius: h,
24
- boxShadow: "md",
25
- border: s,
26
- overflow: "hidden",
27
- background: le().surface,
28
- minHeight: "250px"
29
- },
30
- children: e
31
- }
32
- );
33
- }, zt = ({
34
- template: e
35
- }) => {
36
- const { t: c } = se(), a = /* @__PURE__ */ t(
37
- Je,
1
+ import { jsx as o, jsxs as v, Fragment as de } from "@emotion/react/jsx-runtime";
2
+ import { useIsMobile as te, ChanceGameTemplate as xe, useBorderSize as Ue, hexToRgb as Ye, useColors as Be, useCurrentThemeMode as Je, useImageVariant as ye, WidgetTemplate as ve, useInternalTheme as Ke, defaultBgVertical as qe, defaultBg as Qe, useInfoPage as gt, initializeI18n as ft, ChanceGameVariant as ne, languageToCountryCode as bt } from "fansunited-frontend-core";
3
+ import xt, { useState as yt, useEffect as vt } from "react";
4
+ import { NotFound as wt, StandardSkeleton as Ze, OverlaySkeleton as et, PresentedBy as kt, Spinner as St, WidgetPortal as Ot } from "fansunited-frontend-core/ui/emotion";
5
+ import { useTranslation as ue } from "react-i18next";
6
+ import { css as n, keyframes as tt } from "@emotion/react";
7
+ import { c as re, V as e, h as ze, d as ke, o as se, u as ot, e as zt, S as ce, f as nt, D as it, C as Bt, W as Rt, g as Mt, i as _t, j as $t, O as Wt, F as Ft, b as Se, a as Ct, P as Dt } from "./chunks/PickOneOfX-IvE4OvyT.js";
8
+ import { w as Tt } from "./chunks/withVersionStamp-CPDfSE5H.js";
9
+ const Ge = {
10
+ display: "flex",
11
+ width: "100%",
12
+ borderRadius: "var(--fu-ucrc-radius-md)",
13
+ border: "var(--fu-ucrc-border-size) solid var(--fu-ucrc-cg-card-border, var(--fu-ucrc-secondary-container))",
14
+ overflow: "hidden",
15
+ background: "var(--fu-ucrc-surface)",
16
+ minHeight: "250px"
17
+ }, Le = {
18
+ row: n({ ...Ge, flexDirection: "row" }),
19
+ column: n({ ...Ge, flexDirection: "column" })
20
+ }, Re = ({ children: t, brandingBorderColor: s }) => /* @__PURE__ */ o(
21
+ "div",
22
+ {
23
+ css: te() ? Le.column : Le.row,
24
+ style: s ? { "--fu-ucrc-cg-card-border": s } : void 0,
25
+ children: t
26
+ }
27
+ ), It = ({ template: t }) => {
28
+ const { t: s } = ue(), b = /* @__PURE__ */ o(
29
+ wt,
38
30
  {
39
- notFoundTitle: c("chanceGame.chanceGameNotFound"),
40
- notFoundMessage: c("chanceGame.chanceGameNotFoundDescription")
31
+ title: s("chanceGame.chanceGameNotFound"),
32
+ message: s("chanceGame.chanceGameNotFoundDescription")
41
33
  }
42
34
  );
43
- return e === he.EMBED ? a : /* @__PURE__ */ t(ke, { brandingBorderColor: null, children: a });
44
- }, Me = ({
45
- infoPage: e,
46
- enableReset: c = !1,
47
- contentColor: a,
48
- primaryColor: n,
49
- secondaryColor: g,
50
- onPrimaryColor: o,
51
- backgroundColor: h,
35
+ return t === xe.EMBED ? b : /* @__PURE__ */ o(Re, { brandingBorderColor: null, children: b });
36
+ }, l = (t) => `var(--fu-ucrc-cg-wheel-${t})`, At = tt({
37
+ "0%, 100%": { transform: "translateX(0)" },
38
+ "10%, 30%, 50%, 70%, 90%": { transform: "translateX(-8px)" },
39
+ "20%, 40%, 60%, 80%": { transform: "translateX(8px)" }
40
+ }), Gt = tt({
41
+ "0%, 100%": { boxShadow: `0 4px 14px 0 ${l("p40")}, 0 0 20px ${l("p15")}` },
42
+ "50%": { boxShadow: `0 6px 24px 0 ${l("p60")}, 0 0 35px ${l("p25")}` }
43
+ }), le = { ...re, fontWeight: 400, fontSize: l("text"), color: e.content, unicodeBidi: "plaintext" }, Xe = {
44
+ position: "relative",
45
+ width: "100%",
46
+ maxWidth: l("max"),
47
+ aspectRatio: "1",
48
+ marginTop: l("wheel-mt"),
49
+ display: "flex",
50
+ alignItems: "center",
51
+ justifyContent: "center",
52
+ userSelect: "none",
53
+ zIndex: 1,
54
+ transition: "opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",
55
+ "&[data-shake]": { animation: `${At} ${l("shake")} ease-in-out 2` }
56
+ }, Oe = {
57
+ borderRadius: e.radiusXl,
58
+ paddingBlock: l("btn-py"),
59
+ paddingInline: l("btn-px"),
60
+ backgroundColor: e.primary,
61
+ color: e.onPrimary,
62
+ fontSize: l("btn-font"),
63
+ fontWeight: 700,
64
+ fontFamily: e.fontPrimary,
65
+ textTransform: "uppercase",
66
+ letterSpacing: "0.5px",
67
+ minWidth: l("btn-min"),
68
+ zIndex: 1,
69
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
70
+ transform: "scale(1)",
71
+ "&:active": { transform: "scale(0.95)" },
72
+ "&:disabled": { opacity: 0.5, animation: "none" },
73
+ unicodeBidi: "plaintext"
74
+ }, Lt = {
75
+ ...re,
76
+ fontFamily: e.fontSecondary,
77
+ fontWeight: 400,
78
+ fontSize: l("disclaimer"),
79
+ color: e.content,
80
+ opacity: 0.7,
81
+ textAlign: "center",
82
+ maxWidth: "900px",
83
+ lineHeight: 1.4,
84
+ unicodeBidi: "plaintext"
85
+ }, p = {
86
+ titleBlock: n({
87
+ display: "flex",
88
+ flexDirection: "column",
89
+ gap: e.spaceXs,
90
+ alignItems: "center",
91
+ textAlign: "center",
92
+ width: "100%",
93
+ zIndex: 1
94
+ }),
95
+ title: n(ze, {
96
+ fontFamily: e.fontPrimary,
97
+ fontWeight: 700,
98
+ fontSize: l("title"),
99
+ color: e.content,
100
+ lineHeight: 1.2,
101
+ unicodeBidi: "plaintext"
102
+ }),
103
+ titleGlow: n(ze, {
104
+ fontFamily: e.fontPrimary,
105
+ fontWeight: 700,
106
+ fontSize: l("title"),
107
+ color: e.content,
108
+ lineHeight: 1.2,
109
+ textShadow: `0 0 20px ${l("dc20")}, 0 0 40px ${l("dc10")}`,
110
+ unicodeBidi: "plaintext"
111
+ }),
112
+ underline: n({ display: "flex", alignItems: "center", gap: e.spaceXs, marginTop: e.space2xs }),
113
+ underlineStart: n({
114
+ width: l("line"),
115
+ height: "1px",
116
+ background: `linear-gradient(90deg, transparent, ${l("dc40")})`
117
+ }),
118
+ underlineGem: n({ width: "6px", height: "6px", transform: "rotate(45deg)", background: l("dc50") }),
119
+ underlineEnd: n({
120
+ width: l("line"),
121
+ height: "1px",
122
+ background: `linear-gradient(90deg, ${l("dc40")}, transparent)`
123
+ }),
124
+ subtitle: n(le, { fontFamily: e.fontSecondary, opacity: 0.8 }),
125
+ welcome: n(le, { fontFamily: e.fontPrimary, textAlign: "center", marginBottom: e.spaceMd, zIndex: 1 }),
126
+ welcomeOverlay: n(le, { fontFamily: e.fontPrimary, textAlign: "center", marginBottom: 0, zIndex: 1 }),
127
+ instructions: n(le, {
128
+ fontFamily: e.fontSecondary,
129
+ opacity: 0.7,
130
+ textAlign: "center",
131
+ maxWidth: l("instructions"),
132
+ zIndex: 1
133
+ }),
134
+ wheel: n(Xe),
135
+ wheelGlow: n(Xe, { filter: `drop-shadow(0 0 ${l("glow1")} ${l("dc20")}) drop-shadow(0 0 ${l("glow2")} ${l("dc10")})` }),
136
+ logo: n({
137
+ position: "absolute",
138
+ top: "50%",
139
+ left: "50%",
140
+ transform: "translate(-50%, -50%)",
141
+ width: "15%",
142
+ height: "15%",
143
+ objectFit: "contain",
144
+ borderRadius: "50%",
145
+ zIndex: 3,
146
+ pointerEvents: "none",
147
+ filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
148
+ }),
149
+ spin: n(ke, Oe, {
150
+ boxShadow: "0 4px 14px 0 rgba(0,0,0,0.15)",
151
+ "&:hover": { transform: "scale(1.05)", boxShadow: "0 6px 20px 0 rgba(0,0,0,0.2)" }
152
+ }),
153
+ spinDecorated: n(ke, Oe, {
154
+ boxShadow: `0 4px 14px 0 ${l("p40")}, 0 0 20px ${l("p15")}`,
155
+ "&:hover": { transform: "scale(1.05)", boxShadow: `0 6px 20px 0 ${l("p50")}, 0 0 30px ${l("p20")}` }
156
+ }),
157
+ spinPulsing: n(ke, Oe, {
158
+ boxShadow: `0 4px 14px 0 ${l("p40")}, 0 0 20px ${l("p15")}`,
159
+ animation: `${Gt} 2.5s ease-in-out infinite`,
160
+ "&:hover": { transform: "scale(1.05)", boxShadow: `0 6px 20px 0 ${l("p50")}, 0 0 30px ${l("p20")}` }
161
+ }),
162
+ reset: n(se, {
163
+ borderRadius: e.radiusXl,
164
+ paddingBlock: e.spaceSm,
165
+ paddingInline: e.spaceLg,
166
+ borderColor: e.outline,
167
+ color: e.content,
168
+ fontSize: l("reset-font"),
169
+ fontWeight: 700,
170
+ fontFamily: e.fontPrimary,
171
+ textTransform: "uppercase",
172
+ zIndex: 1,
173
+ "&:hover": { borderColor: e.primary, backgroundColor: "transparent", color: e.primary }
174
+ }),
175
+ standard: n({
176
+ display: "flex",
177
+ flexDirection: "column",
178
+ width: "100%",
179
+ height: "100%",
180
+ gap: e.spaceLg,
181
+ alignItems: "center",
182
+ position: "relative",
183
+ overflow: "auto",
184
+ boxSizing: "border-box"
185
+ }),
186
+ standardWelcome: n(le, { fontFamily: e.fontPrimary, textAlign: "center", paddingInline: e.spaceMd }),
187
+ standardArea: n({
188
+ display: "flex",
189
+ flexDirection: "column",
190
+ paddingInline: e.spaceMd,
191
+ width: "100%",
192
+ boxSizing: "border-box"
193
+ }),
194
+ standardStack: n({ display: "flex", flexDirection: "column", gap: l("stack-gap") }),
195
+ box: n({
196
+ borderRadius: e.radiusMd,
197
+ paddingInline: e.spaceSm,
198
+ paddingTop: e.spaceSm,
199
+ paddingBottom: e.spaceMd,
200
+ gap: e.spaceMd,
201
+ backgroundColor: l("box-bg"),
202
+ display: "flex",
203
+ flexDirection: "column",
204
+ alignItems: "center",
205
+ backdropFilter: "blur(4px)",
206
+ position: "relative",
207
+ overflow: "hidden"
208
+ }),
209
+ boxDecorated: n({
210
+ borderRadius: e.radiusMd,
211
+ paddingInline: e.spaceSm,
212
+ paddingTop: e.spaceSm,
213
+ paddingBottom: e.spaceMd,
214
+ gap: e.spaceMd,
215
+ backgroundColor: l("box-bg"),
216
+ display: "flex",
217
+ flexDirection: "column",
218
+ alignItems: "center",
219
+ backdropFilter: "blur(4px)",
220
+ position: "relative",
221
+ overflow: "hidden",
222
+ border: l("box-border")
223
+ }),
224
+ footer: n({ display: "flex", flexDirection: "column", alignItems: "center", gap: e.spaceMd }),
225
+ disclaimer: n(Lt),
226
+ embed: n({
227
+ display: "flex",
228
+ flexDirection: "column",
229
+ width: "100%",
230
+ padding: l("pad"),
231
+ gap: e.spaceLg,
232
+ alignItems: "center",
233
+ position: "relative",
234
+ overflow: "hidden",
235
+ boxSizing: "border-box"
236
+ })
237
+ }, ct = ({
238
+ infoPage: t,
239
+ enableReset: s = !1,
240
+ contentColor: b,
241
+ primaryColor: m,
242
+ secondaryColor: O,
243
+ onPrimaryColor: u,
244
+ backgroundColor: r,
52
245
  dangerColor: i,
53
- brandingLogo: r,
54
- isDark: s = !1,
55
- showTitleBlock: k = !1,
56
- variant: z
246
+ brandingLogo: $,
247
+ isDark: a = !1,
248
+ showTitleBlock: _ = !1,
249
+ variant: W
57
250
  }) => {
58
- var E, q, M;
59
- const x = J(), b = le(), p = ve(), l = we(), m = xe(), O = Se(), v = z === "standard", u = z === "overlay", C = v || u, G = JSON.parse(e.body), L = G.segments || [], f = e.labels || {}, N = G.mode || ((E = G.config) == null ? void 0 : E.mode) || "fair", V = ((q = G.config) == null ? void 0 : q.pace) || "normal", _ = ((M = G.config) == null ? void 0 : M.decorations) ?? !1, D = Ve(n, s), {
60
- isSpinning: T,
251
+ var E, me, pe;
252
+ const g = te(), y = ot(), f = Ue(), c = W === "standard", z = W === "overlay", w = c || z, T = JSON.parse(t.body), V = T.segments || [], x = t.labels || {}, M = T.mode || ((E = T.config) == null ? void 0 : E.mode) || "fair", N = ((me = T.config) == null ? void 0 : me.pace) || "normal", B = ((pe = T.config) == null ? void 0 : pe.decorations) ?? !1, C = nt(m, a), {
253
+ isSpinning: I,
61
254
  finalRotation: H,
62
- selectedSegment: y,
63
- showShakeAnimation: X,
64
- showResultScreen: F,
65
- showInlineResult: R,
66
- hasEntered: $,
67
- confettiActive: W,
68
- spinDuration: P,
255
+ selectedSegment: h,
256
+ showShakeAnimation: j,
257
+ showResultScreen: D,
258
+ showInlineResult: k,
259
+ hasEntered: F,
260
+ confettiActive: A,
261
+ spinDuration: R,
69
262
  shakeAnimationDuration: U,
70
- confettiVelocityMultiplier: j,
71
- confettiGravity: A,
72
- handleSpin: I,
73
- handleReset: S,
74
- onConfettiComplete: ee
75
- } = ht({ segments: L, mode: N, pace: V }), te = C ? x ? "260px" : "340px" : x ? "320px" : "450px", Y = () => /* @__PURE__ */ w(re, { children: [
76
- _ && /* @__PURE__ */ t(
77
- He,
263
+ confettiVelocityMultiplier: Y,
264
+ confettiGravity: J,
265
+ handleSpin: L,
266
+ handleReset: X,
267
+ onConfettiComplete: S
268
+ } = zt({ segments: V, mode: M, pace: N }), Z = Ye(r), oe = Z ? Z.replace(/[^\d,]/g, "") : "", K = {
269
+ ...y,
270
+ "--fu-ucrc-cg-content": b,
271
+ "--fu-ucrc-cg-primary": m,
272
+ "--fu-ucrc-cg-on-primary": u,
273
+ "--fu-ucrc-cg-wheel-dc10": C("10"),
274
+ "--fu-ucrc-cg-wheel-dc20": C("20"),
275
+ "--fu-ucrc-cg-wheel-dc40": C("40"),
276
+ "--fu-ucrc-cg-wheel-dc50": C("50"),
277
+ "--fu-ucrc-cg-wheel-p15": `${m}15`,
278
+ "--fu-ucrc-cg-wheel-p20": `${m}20`,
279
+ "--fu-ucrc-cg-wheel-p25": `${m}25`,
280
+ "--fu-ucrc-cg-wheel-p40": `${m}40`,
281
+ "--fu-ucrc-cg-wheel-p50": `${m}50`,
282
+ "--fu-ucrc-cg-wheel-p60": `${m}60`,
283
+ // Wheel dimensions — compact for Standard and Overlay
284
+ "--fu-ucrc-cg-wheel-max": w ? g ? "260px" : "340px" : g ? "320px" : "450px",
285
+ "--fu-ucrc-cg-wheel-wheel-mt": w ? e.spaceMd : "0px",
286
+ "--fu-ucrc-cg-wheel-shake": `${U / 2}ms`,
287
+ "--fu-ucrc-cg-wheel-glow1": g ? "15px" : "25px",
288
+ "--fu-ucrc-cg-wheel-glow2": g ? "40px" : "60px",
289
+ "--fu-ucrc-cg-wheel-title": g ? "1.5rem" : "2rem",
290
+ "--fu-ucrc-cg-wheel-text": g ? "0.875rem" : "1rem",
291
+ "--fu-ucrc-cg-wheel-line": g ? "40px" : "60px",
292
+ "--fu-ucrc-cg-wheel-instructions": c ? "400px" : "600px",
293
+ "--fu-ucrc-cg-wheel-btn-py": w ? e.spaceSm : e.spaceMd,
294
+ "--fu-ucrc-cg-wheel-btn-px": w ? e.spaceLg : e.spaceXl,
295
+ "--fu-ucrc-cg-wheel-btn-font": w ? g ? "0.75rem" : "0.875rem" : g ? "1rem" : "1.125rem",
296
+ "--fu-ucrc-cg-wheel-btn-min": w ? "auto" : g ? "200px" : "250px",
297
+ "--fu-ucrc-cg-wheel-reset-font": g ? "0.75rem" : "0.875rem",
298
+ "--fu-ucrc-cg-wheel-disclaimer": g ? "0.625rem" : "0.75rem",
299
+ "--fu-ucrc-cg-wheel-stack-gap": g ? e.spaceLg : e.spaceMd,
300
+ "--fu-ucrc-cg-wheel-box-bg": `rgba(${oe}, 0.5)`,
301
+ "--fu-ucrc-cg-wheel-box-border": `${f.size} solid ${C("15")}`,
302
+ "--fu-ucrc-cg-wheel-pad": g ? e.spaceLg : e.spaceXl
303
+ }, P = I || A || !D && !k && h !== null, ee = () => /* @__PURE__ */ v(de, { children: [
304
+ B && /* @__PURE__ */ o(it, { primaryColor: m, isDark: a, animationPrefix: "wheel" }),
305
+ /* @__PURE__ */ o(
306
+ Bt,
78
307
  {
79
- primaryColor: n,
80
- isDark: s,
81
- animationPrefix: "wheel"
308
+ active: A,
309
+ primaryColor: m,
310
+ velocityMultiplier: Y,
311
+ gravity: J,
312
+ onComplete: S
82
313
  }
83
314
  ),
84
- /* @__PURE__ */ t(
85
- ut,
315
+ D && (h == null ? void 0 : h.results) && /* @__PURE__ */ o(
316
+ ce,
86
317
  {
87
- active: W,
88
- primaryColor: n,
89
- velocityMultiplier: j,
90
- gravity: A,
91
- onComplete: ee
92
- }
93
- ),
94
- F && (y == null ? void 0 : y.results) && /* @__PURE__ */ t(
95
- ie,
96
- {
97
- result: y.results,
98
- variant: z || "embed",
318
+ result: h.results,
319
+ variant: W || "embed",
99
320
  mode: "screen",
100
- contentColor: a,
101
- primaryColor: n,
102
- onPrimaryColor: o,
103
- disclaimer: v ? void 0 : f.disclaimer,
104
- enableReset: c,
105
- onReset: S
321
+ contentColor: b,
322
+ primaryColor: m,
323
+ onPrimaryColor: u,
324
+ disclaimer: c ? void 0 : x.disclaimer,
325
+ enableReset: s,
326
+ onReset: X
106
327
  }
107
328
  ),
108
- !F && /* @__PURE__ */ w(re, { children: [
109
- k && (e.title || e.subtitle) && /* @__PURE__ */ w(
110
- d,
111
- {
112
- sx: {
113
- display: "flex",
114
- flexDirection: "column",
115
- gap: m.xs,
116
- alignItems: "center",
117
- textAlign: "center",
118
- width: "100%",
119
- zIndex: 1
120
- },
121
- children: [
122
- e.title && /* @__PURE__ */ w(re, { children: [
123
- /* @__PURE__ */ t(
124
- B,
125
- {
126
- level: "h2",
127
- sx: {
128
- fontFamily: l.primary,
129
- fontWeight: 700,
130
- fontSize: x ? "1.5rem" : "2rem",
131
- color: a,
132
- lineHeight: 1.2,
133
- ..._ && {
134
- textShadow: `0 0 20px ${D("20")}, 0 0 40px ${D("10")}`
135
- }
136
- },
137
- children: e.title
138
- }
139
- ),
140
- _ && /* @__PURE__ */ w(
141
- d,
142
- {
143
- sx: {
144
- display: "flex",
145
- alignItems: "center",
146
- gap: m.xs,
147
- mt: m["2xs"]
148
- },
149
- children: [
150
- /* @__PURE__ */ t(
151
- d,
152
- {
153
- sx: {
154
- width: x ? "40px" : "60px",
155
- height: "1px",
156
- background: `linear-gradient(90deg, transparent, ${D("40")})`
157
- }
158
- }
159
- ),
160
- /* @__PURE__ */ t(
161
- d,
162
- {
163
- sx: {
164
- width: "6px",
165
- height: "6px",
166
- transform: "rotate(45deg)",
167
- background: D("50")
168
- }
169
- }
170
- ),
171
- /* @__PURE__ */ t(
172
- d,
173
- {
174
- sx: {
175
- width: x ? "40px" : "60px",
176
- height: "1px",
177
- background: `linear-gradient(90deg, ${D("40")}, transparent)`
178
- }
179
- }
180
- )
181
- ]
182
- }
183
- )
184
- ] }),
185
- e.subtitle && /* @__PURE__ */ t(
186
- B,
187
- {
188
- level: "body-md",
189
- sx: {
190
- fontFamily: l.secondary,
191
- fontWeight: 400,
192
- fontSize: x ? "0.875rem" : "1rem",
193
- color: a,
194
- opacity: 0.8
195
- },
196
- children: e.subtitle
197
- }
198
- )
199
- ]
200
- }
201
- ),
202
- /* @__PURE__ */ w(d, { children: [
203
- !v && f.welcome && /* @__PURE__ */ t(
204
- B,
205
- {
206
- level: "body-md",
207
- sx: {
208
- fontFamily: l.primary,
209
- fontWeight: 400,
210
- fontSize: x ? "0.875rem" : "1rem",
211
- color: a,
212
- textAlign: "center",
213
- mb: u ? 0 : m.md,
214
- zIndex: 1
215
- },
216
- children: f.welcome
217
- }
218
- ),
219
- (v || u) && !R && f.instructions && /* @__PURE__ */ t(
220
- B,
221
- {
222
- level: v ? "body-sm" : "body-md",
223
- sx: {
224
- fontFamily: l.secondary,
225
- fontWeight: 400,
226
- fontSize: x ? "0.875rem" : "1rem",
227
- color: a,
228
- opacity: 0.7,
229
- textAlign: "center",
230
- maxWidth: v ? "400px" : "600px",
231
- zIndex: 1
232
- },
233
- children: f.instructions
234
- }
235
- )
329
+ !D && /* @__PURE__ */ v(de, { children: [
330
+ _ && (t.title || t.subtitle) && /* @__PURE__ */ v("div", { css: p.titleBlock, children: [
331
+ t.title && /* @__PURE__ */ v(de, { children: [
332
+ /* @__PURE__ */ o("h2", { css: B ? p.titleGlow : p.title, children: t.title }),
333
+ B && /* @__PURE__ */ v("div", { css: p.underline, children: [
334
+ /* @__PURE__ */ o("div", { css: p.underlineStart }),
335
+ /* @__PURE__ */ o("div", { css: p.underlineGem }),
336
+ /* @__PURE__ */ o("div", { css: p.underlineEnd })
337
+ ] })
338
+ ] }),
339
+ t.subtitle && /* @__PURE__ */ o("p", { css: p.subtitle, children: t.subtitle })
340
+ ] }),
341
+ /* @__PURE__ */ v("div", { children: [
342
+ !c && x.welcome && /* @__PURE__ */ o("p", { css: z ? p.welcomeOverlay : p.welcome, children: x.welcome }),
343
+ (c || z) && !k && x.instructions && /* @__PURE__ */ o("p", { css: p.instructions, children: x.instructions })
236
344
  ] }),
237
- /* @__PURE__ */ w(
238
- d,
345
+ /* @__PURE__ */ v(
346
+ "div",
239
347
  {
240
- onClick: I,
241
- sx: {
242
- position: "relative",
243
- width: "100%",
244
- maxWidth: te,
245
- aspectRatio: "1",
246
- mt: C ? m.md : 0,
247
- display: "flex",
248
- alignItems: "center",
249
- justifyContent: "center",
250
- cursor: T || W || R || !F && !R && y !== null ? "default" : "pointer",
251
- userSelect: "none",
252
- zIndex: 1,
348
+ onClick: L,
349
+ css: B ? p.wheelGlow : p.wheel,
350
+ "data-shake": j || void 0,
351
+ style: {
352
+ cursor: P || k ? "default" : "pointer",
253
353
  // Entrance animation
254
- opacity: $ ? 1 : 0,
255
- transform: $ ? "scale(1)" : "scale(0.85)",
256
- transition: "opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",
257
- // Shake animation
258
- animation: X ? `wheelShake ${U / 2}ms ease-in-out 2` : "none",
259
- "@keyframes wheelShake": {
260
- "0%, 100%": { transform: "translateX(0)" },
261
- "10%, 30%, 50%, 70%, 90%": { transform: "translateX(-8px)" },
262
- "20%, 40%, 60%, 80%": { transform: "translateX(8px)" }
263
- },
264
- // Wheel glow effect (decorations only)
265
- ..._ && {
266
- filter: `drop-shadow(0 0 ${x ? "15px" : "25px"} ${D("20")}) drop-shadow(0 0 ${x ? "40px" : "60px"} ${D("10")})`
267
- }
354
+ opacity: F ? 1 : 0,
355
+ transform: F ? "scale(1)" : "scale(0.85)"
268
356
  },
269
357
  children: [
270
- /* @__PURE__ */ t(
271
- xt,
358
+ /* @__PURE__ */ o(Rt, { segmentCount: V.length, decorations: B, primaryColor: m }),
359
+ /* @__PURE__ */ o(
360
+ Mt,
272
361
  {
273
- segmentCount: L.length,
274
- decorations: _,
275
- primaryColor: n
276
- }
277
- ),
278
- /* @__PURE__ */ t(
279
- ft,
280
- {
281
- segments: L,
282
- secondaryColor: g,
283
- primaryColor: n,
284
- onPrimaryColor: o,
285
- decorations: _,
286
- isStandard: v,
362
+ segments: V,
363
+ secondaryColor: O,
364
+ primaryColor: m,
365
+ onPrimaryColor: u,
366
+ decorations: B,
367
+ isStandard: c,
287
368
  rotation: H,
288
- isSpinning: T,
289
- spinDuration: P
290
- }
291
- ),
292
- !v && !u && r && /* @__PURE__ */ t(
293
- d,
294
- {
295
- component: "img",
296
- src: r,
297
- alt: "Logo",
298
- sx: {
299
- position: "absolute",
300
- top: "50%",
301
- left: "50%",
302
- transform: "translate(-50%, -50%)",
303
- width: "15%",
304
- height: "15%",
305
- objectFit: "contain",
306
- borderRadius: "50%",
307
- zIndex: 3,
308
- pointerEvents: "none",
309
- filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
310
- }
369
+ isSpinning: I,
370
+ spinDuration: R
311
371
  }
312
372
  ),
313
- /* @__PURE__ */ t(
314
- pt,
315
- {
316
- primaryColor: n,
317
- dangerColor: i,
318
- decorations: _
319
- }
320
- )
373
+ !c && !z && $ && /* @__PURE__ */ o("img", { src: $, alt: "Logo", css: p.logo }),
374
+ /* @__PURE__ */ o(_t, { primaryColor: m, dangerColor: i, decorations: B })
321
375
  ]
322
376
  }
323
377
  ),
324
- !v && !u && !R && f.instructions && /* @__PURE__ */ t(
325
- B,
326
- {
327
- level: "body-sm",
328
- sx: {
329
- fontFamily: l.secondary,
330
- fontWeight: 400,
331
- fontSize: x ? "0.875rem" : "1rem",
332
- color: a,
333
- opacity: 0.7,
334
- textAlign: "center",
335
- maxWidth: "400px",
336
- zIndex: 1
337
- },
338
- children: f.instructions
339
- }
340
- ),
341
- !v && R && (y == null ? void 0 : y.results) && /* @__PURE__ */ t(
342
- ie,
378
+ !c && !z && !k && x.instructions && /* @__PURE__ */ o("p", { css: p.instructions, children: x.instructions }),
379
+ !c && k && (h == null ? void 0 : h.results) && /* @__PURE__ */ o(
380
+ ce,
343
381
  {
344
- result: y.results,
382
+ result: h.results,
345
383
  variant: "embed",
346
384
  mode: "inline",
347
- contentColor: a,
348
- primaryColor: n,
349
- onPrimaryColor: o,
350
- enableReset: c,
351
- onReset: S,
385
+ contentColor: b,
386
+ primaryColor: m,
387
+ onPrimaryColor: u,
388
+ enableReset: s,
389
+ onReset: X,
352
390
  showResetButton: !0,
353
- sx: { zIndex: 1 }
391
+ raised: !0
354
392
  }
355
393
  ),
356
- f.buttonLabel && !(R && y && !y.isWinning) && /* @__PURE__ */ t(
357
- ue,
394
+ x.buttonLabel && !(k && h && !h.isWinning) && /* @__PURE__ */ o(
395
+ "button",
358
396
  {
359
- variant: "soft",
360
- disabled: T || W || !F && !R && y !== null,
361
- onClick: I,
362
- sx: {
363
- borderRadius: p.xl,
364
- py: C ? m.sm : m.md,
365
- px: C ? m.lg : m.xl,
366
- "--variant-softBg": n,
367
- "--variant-softColor": o,
368
- "--variant-softHoverBg": n,
369
- bgcolor: n,
370
- color: o,
371
- fontSize: C ? x ? "0.75rem" : "0.875rem" : x ? "1rem" : "1.125rem",
372
- fontWeight: 700,
373
- fontFamily: l.primary,
374
- textTransform: "uppercase",
375
- letterSpacing: "0.5px",
376
- minWidth: C ? void 0 : x ? "200px" : "250px",
377
- zIndex: 1,
378
- transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
379
- transform: "scale(1)",
380
- ..._ && {
381
- boxShadow: `0 4px 14px 0 ${n}40, 0 0 20px ${n}15`,
382
- animation: !T && !y ? "wheelBtnPulse 2.5s ease-in-out infinite" : "none",
383
- "@keyframes wheelBtnPulse": {
384
- "0%, 100%": {
385
- boxShadow: `0 4px 14px 0 ${n}40, 0 0 20px ${n}15`
386
- },
387
- "50%": {
388
- boxShadow: `0 6px 24px 0 ${n}60, 0 0 35px ${n}25`
389
- }
390
- }
391
- },
392
- ...!_ && {
393
- boxShadow: "0 4px 14px 0 rgba(0,0,0,0.15)"
394
- },
395
- "&:hover": {
396
- bgcolor: n,
397
- transform: "scale(1.05)",
398
- boxShadow: _ ? `0 6px 20px 0 ${n}50, 0 0 30px ${n}20` : "0 6px 20px 0 rgba(0,0,0,0.2)"
399
- },
400
- "&:active": {
401
- transform: "scale(0.95)",
402
- color: o
403
- },
404
- "&:disabled": {
405
- "--variant-softDisabledBg": n,
406
- "--variant-softDisabledColor": o,
407
- bgcolor: n,
408
- color: o,
409
- opacity: 0.5,
410
- animation: "none"
411
- }
412
- },
413
- slotProps: {
414
- loadingIndicatorCenter: {
415
- sx: {
416
- "& .MuiCircularProgress-track": {
417
- stroke: o
418
- }
419
- }
420
- }
421
- },
422
- children: f.buttonLabel
397
+ type: "button",
398
+ disabled: P,
399
+ onClick: L,
400
+ css: B ? !I && !h ? p.spinPulsing : p.spinDecorated : p.spin,
401
+ children: x.buttonLabel
423
402
  }
424
403
  ),
425
- v && R && y && !y.isWinning && /* @__PURE__ */ t(
426
- ue,
427
- {
428
- variant: "outlined",
429
- onClick: S,
430
- sx: {
431
- borderRadius: p.xl,
432
- py: m.sm,
433
- px: m.lg,
434
- borderColor: b.outlineEnabledBorder,
435
- color: a,
436
- fontSize: x ? "0.75rem" : "0.875rem",
437
- fontWeight: 700,
438
- fontFamily: l.primary,
439
- textTransform: "uppercase",
440
- zIndex: 1,
441
- "&:hover": {
442
- borderColor: n,
443
- bgcolor: "transparent",
444
- color: n
445
- }
446
- },
447
- children: "Reset Game"
448
- }
449
- )
404
+ c && k && h && !h.isWinning && /* @__PURE__ */ o("button", { type: "button", onClick: X, css: p.reset, children: "Reset Game" })
450
405
  ] })
451
406
  ] });
452
- if (v) {
453
- const Q = Ce(h), oe = Q ? Q.replace(/[^\d,]/g, "") : "";
454
- return /* @__PURE__ */ w(
455
- d,
456
- {
457
- sx: {
458
- display: "flex",
459
- flexDirection: "column",
460
- width: "100%",
461
- height: "100%",
462
- gap: m.lg,
463
- alignItems: "center",
464
- position: "relative",
465
- overflow: "auto",
466
- boxSizing: "border-box"
467
- },
468
- children: [
469
- !F && f.welcome && /* @__PURE__ */ t(
470
- B,
471
- {
472
- level: "body-md",
473
- sx: {
474
- fontFamily: l.primary,
475
- fontWeight: 400,
476
- fontSize: x ? "0.875rem" : "1rem",
477
- color: a,
478
- textAlign: "center",
479
- px: m.md
480
- },
481
- children: f.welcome
482
- }
483
- ),
484
- /* @__PURE__ */ t(
485
- d,
486
- {
487
- sx: {
488
- display: "flex",
489
- flexDirection: "column",
490
- px: m.md,
491
- width: "100%",
492
- boxSizing: "border-box"
493
- },
494
- children: /* @__PURE__ */ w(
495
- d,
496
- {
497
- sx: {
498
- display: "flex",
499
- flexDirection: "column",
500
- gap: x ? m.lg : m.md
501
- },
502
- children: [
503
- /* @__PURE__ */ t(
504
- d,
505
- {
506
- sx: {
507
- borderRadius: p.md,
508
- px: m.sm,
509
- pt: m.sm,
510
- pb: m.md,
511
- gap: m.md,
512
- bgcolor: `rgba(${oe}, 0.5)`,
513
- display: "flex",
514
- flexDirection: "column",
515
- alignItems: "center",
516
- backdropFilter: "blur(4px)",
517
- position: "relative",
518
- overflow: "hidden",
519
- ..._ && {
520
- border: `${O.size} solid ${D("15")}`
521
- }
522
- },
523
- children: Y()
524
- }
525
- ),
526
- R && (y == null ? void 0 : y.results) && /* @__PURE__ */ t(
527
- ie,
528
- {
529
- result: y.results,
530
- variant: "standard",
531
- mode: "inline",
532
- contentColor: a,
533
- primaryColor: n,
534
- onPrimaryColor: o,
535
- showResetButton: !1,
536
- sx: { mb: m.md }
537
- }
538
- ),
539
- (r || f.disclaimer) && /* @__PURE__ */ w(
540
- d,
541
- {
542
- sx: {
543
- display: "flex",
544
- flexDirection: "column",
545
- alignItems: "center",
546
- gap: m.md
547
- },
548
- children: [
549
- f.disclaimer && /* @__PURE__ */ t(
550
- B,
551
- {
552
- level: "body-sm",
553
- sx: {
554
- fontFamily: l.secondary,
555
- fontWeight: 400,
556
- fontSize: x ? "0.625rem" : "0.75rem",
557
- color: a,
558
- opacity: 0.7,
559
- textAlign: "center",
560
- maxWidth: "900px",
561
- lineHeight: 1.4
562
- },
563
- children: f.disclaimer
564
- }
565
- ),
566
- r && /* @__PURE__ */ t(
567
- "img",
568
- {
569
- src: r,
570
- alt: "Brand Logo",
571
- style: {
572
- height: "auto",
573
- maxHeight: "60px",
574
- maxWidth: "180px"
575
- }
576
- }
577
- )
578
- ]
579
- }
580
- )
581
- ]
582
- }
583
- )
584
- }
585
- )
586
- ]
587
- }
588
- );
589
- }
590
- return /* @__PURE__ */ w(
591
- d,
592
- {
593
- sx: {
594
- display: "flex",
595
- flexDirection: "column",
596
- width: "100%",
597
- p: x ? m.lg : m.xl,
598
- gap: m.lg,
599
- alignItems: "center",
600
- position: "relative",
601
- overflow: "hidden",
602
- boxSizing: "border-box"
603
- },
604
- children: [
605
- Y(),
606
- !F && f.disclaimer && /* @__PURE__ */ t(
607
- d,
407
+ return c ? /* @__PURE__ */ v("div", { css: p.standard, style: K, children: [
408
+ !D && x.welcome && /* @__PURE__ */ o("p", { css: p.standardWelcome, children: x.welcome }),
409
+ /* @__PURE__ */ o("div", { css: p.standardArea, children: /* @__PURE__ */ v("div", { css: p.standardStack, children: [
410
+ /* @__PURE__ */ o("div", { css: B ? p.boxDecorated : p.box, children: ee() }),
411
+ k && (h == null ? void 0 : h.results) && /* @__PURE__ */ o(
412
+ ce,
413
+ {
414
+ result: h.results,
415
+ variant: "standard",
416
+ mode: "inline",
417
+ contentColor: b,
418
+ primaryColor: m,
419
+ onPrimaryColor: u,
420
+ showResetButton: !1,
421
+ spaced: !0
422
+ }
423
+ ),
424
+ ($ || x.disclaimer) && /* @__PURE__ */ v("div", { css: p.footer, children: [
425
+ x.disclaimer && /* @__PURE__ */ o("p", { css: p.disclaimer, children: x.disclaimer }),
426
+ $ && /* @__PURE__ */ o(
427
+ "img",
608
428
  {
609
- sx: {
610
- display: "flex",
611
- flexDirection: "column",
612
- alignItems: "center",
613
- gap: m.md
614
- },
615
- children: /* @__PURE__ */ t(
616
- B,
617
- {
618
- level: "body-sm",
619
- sx: {
620
- fontFamily: l.secondary,
621
- fontWeight: 400,
622
- fontSize: x ? "0.625rem" : "0.75rem",
623
- color: a,
624
- opacity: 0.7,
625
- textAlign: "center",
626
- maxWidth: "900px",
627
- lineHeight: 1.4
628
- },
629
- children: f.disclaimer
630
- }
631
- )
429
+ src: $,
430
+ alt: "Brand Logo",
431
+ style: { height: "auto", maxHeight: "60px", maxWidth: "180px" }
632
432
  }
633
433
  )
634
- ]
635
- }
636
- );
637
- }, Ft = ({
638
- infoPage: e,
639
- enableReset: c = !1,
640
- imagePosition: a = "left",
641
- defaultImagePlaceholderUrl: n
434
+ ] })
435
+ ] }) })
436
+ ] }) : /* @__PURE__ */ v("div", { css: p.embed, style: K, children: [
437
+ ee(),
438
+ !D && x.disclaimer && /* @__PURE__ */ o("div", { css: p.footer, children: /* @__PURE__ */ o("p", { css: p.disclaimer, children: x.disclaimer }) })
439
+ ] });
440
+ }, Xt = ({
441
+ infoPage: t,
442
+ enableReset: s = !1,
443
+ imagePosition: b = "left",
444
+ defaultImagePlaceholderUrl: m
642
445
  }) => {
643
- var m, O;
644
- const { t: g } = se(), o = J(), h = le(), i = Te() === "dark", r = fe(
446
+ var z, w;
447
+ const { t: O } = ue(), u = te(), r = Be(), i = Je() === "dark", $ = ye(
645
448
  {
646
- images: e.images,
647
- imagePlaceholder: n || ""
449
+ images: t.images,
450
+ imagePlaceholder: m || ""
648
451
  },
649
- pe.STANDARD
650
- ), s = (m = e.branding) == null ? void 0 : m.colors, k = (s == null ? void 0 : s.primary_color) || h.palette.primary.plainColor, z = (s == null ? void 0 : s.secondary_color) || h.palette.danger.plainColor, x = (s == null ? void 0 : s.border_color) || null, b = (s == null ? void 0 : s.background_color) || h.surfaceVariant || "", p = (O = e.branding) == null ? void 0 : O.images, l = o ? (p == null ? void 0 : p.mobile_logo) || (p == null ? void 0 : p.main_logo) || "" : (p == null ? void 0 : p.main_logo) || "";
651
- return /* @__PURE__ */ t(ke, { brandingBorderColor: x, children: /* @__PURE__ */ t(
652
- $e,
452
+ ve.STANDARD
453
+ ), a = (z = t.branding) == null ? void 0 : z.colors, _ = (a == null ? void 0 : a.primary_color) || r.palette.primary.plainColor, W = (a == null ? void 0 : a.secondary_color) || r.palette.danger.plainColor, g = (a == null ? void 0 : a.border_color) || null, y = (a == null ? void 0 : a.background_color) || r.surfaceVariant || "", f = (w = t.branding) == null ? void 0 : w.images, c = u ? (f == null ? void 0 : f.mobile_logo) || (f == null ? void 0 : f.main_logo) || "" : (f == null ? void 0 : f.main_logo) || "";
454
+ return /* @__PURE__ */ o(Re, { brandingBorderColor: g, children: /* @__PURE__ */ o(
455
+ Ze,
653
456
  {
654
457
  entity: {
655
- ...e,
458
+ ...t,
656
459
  type: "chance-game",
657
- description: e.subtitle || "",
460
+ description: t.subtitle || "",
658
461
  rules: null
659
462
  },
660
- headline: g("chanceGame.headlinePrizeWheel"),
661
- finalImage: r,
662
- imagePosition: a,
663
- children: /* @__PURE__ */ t(
664
- Me,
463
+ headline: O("chanceGame.headlinePrizeWheel"),
464
+ finalImage: $,
465
+ imagePosition: b,
466
+ children: /* @__PURE__ */ o(
467
+ ct,
665
468
  {
666
- infoPage: e,
667
- enableReset: c,
668
- contentColor: (s == null ? void 0 : s.content_color) || h.textColor,
669
- primaryColor: k,
670
- secondaryColor: z,
671
- onPrimaryColor: h.palette.primary.onPrimary,
672
- borderColor: x || void 0,
673
- backgroundColor: b,
674
- dangerColor: h.palette.danger.plainColor,
675
- shimmerColor: k,
676
- brandingLogo: l,
469
+ infoPage: t,
470
+ enableReset: s,
471
+ contentColor: (a == null ? void 0 : a.content_color) || r.textColor,
472
+ primaryColor: _,
473
+ secondaryColor: W,
474
+ onPrimaryColor: r.palette.primary.onPrimary,
475
+ borderColor: g || void 0,
476
+ backgroundColor: y,
477
+ dangerColor: r.palette.danger.plainColor,
478
+ shimmerColor: _,
479
+ brandingLogo: c,
677
480
  isDark: i,
678
481
  showTitleBlock: !1,
679
482
  variant: "standard"
@@ -681,309 +484,316 @@ const ke = ({
681
484
  )
682
485
  }
683
486
  ) });
684
- }, Le = ({
685
- infoPage: e,
686
- enableReset: c = !1,
687
- contentColor: a,
688
- primaryColor: n,
689
- onPrimaryColor: g,
690
- borderColor: o,
691
- backgroundColor: h,
487
+ }, G = (t) => `var(--fu-ucrc-cg-pick-${t})`, Q = { display: "flex", flexDirection: "column" }, fe = { flex: 1, height: "1px" }, Pe = {
488
+ ...ze,
489
+ fontFamily: e.fontPrimary,
490
+ fontWeight: 700,
491
+ color: e.content,
492
+ lineHeight: 1.2,
493
+ textShadow: G("title-shadow"),
494
+ unicodeBidi: "plaintext"
495
+ }, Ee = {
496
+ ...re,
497
+ fontFamily: e.fontSecondary,
498
+ fontWeight: 400,
499
+ color: e.content,
500
+ opacity: 0.8,
501
+ unicodeBidi: "plaintext"
502
+ }, ie = {
503
+ ...re,
504
+ fontFamily: e.fontPrimary,
505
+ fontWeight: 400,
506
+ color: e.content,
507
+ textAlign: "center",
508
+ unicodeBidi: "plaintext"
509
+ }, be = {
510
+ ...re,
511
+ fontFamily: e.fontSecondary,
512
+ fontWeight: 400,
513
+ color: e.content,
514
+ textAlign: "center",
515
+ opacity: 0.7,
516
+ unicodeBidi: "plaintext"
517
+ }, Ve = { display: "flex", alignItems: "center", gap: e.spaceSm, marginBlock: e.spaceXs }, Ne = {
518
+ ...re,
519
+ fontFamily: e.fontSecondary,
520
+ fontWeight: 400,
521
+ color: e.content,
522
+ opacity: 0.7,
523
+ textAlign: "center",
524
+ maxWidth: "900px",
525
+ lineHeight: 1.4,
526
+ unicodeBidi: "plaintext"
527
+ }, rt = { "&:hover": { borderColor: e.primary, backgroundColor: "transparent", color: e.primary } }, He = {
528
+ marginTop: e.spaceMd,
529
+ paddingInline: e.spaceLg,
530
+ paddingBlock: e.spaceSm,
531
+ fontFamily: e.fontSecondary,
532
+ fontWeight: 600,
533
+ textTransform: "uppercase",
534
+ borderRadius: e.radiusMd,
535
+ borderColor: e.border,
536
+ color: e.content,
537
+ ...rt
538
+ }, je = {
539
+ borderRadius: e.radiusXl,
540
+ paddingBlock: e.spaceSm,
541
+ paddingInline: e.spaceLg,
542
+ borderColor: G("outline"),
543
+ color: e.content,
544
+ fontWeight: 700,
545
+ fontFamily: e.fontPrimary,
546
+ textTransform: "uppercase",
547
+ ...rt
548
+ }, d = {
549
+ titleBlock: n({ ...Q, gap: e.spaceXs, alignItems: "center", textAlign: "center", width: "100%" }),
550
+ title: n({ ...Pe, fontSize: "2rem" }),
551
+ titleMobile: n({ ...Pe, fontSize: "1.5rem" }),
552
+ underline: n({ display: "flex", alignItems: "center", gap: e.spaceSm, marginTop: e.spaceXs, width: "40%" }),
553
+ underlineMobile: n({ display: "flex", alignItems: "center", gap: e.spaceSm, marginTop: e.spaceXs, width: "60%" }),
554
+ lineIn: n({ ...fe, background: `linear-gradient(to right, transparent, ${G("dc-40")})` }),
555
+ lineOut: n({ ...fe, background: `linear-gradient(to left, transparent, ${G("dc-40")})` }),
556
+ underlineDiamond: n({
557
+ width: "8px",
558
+ height: "8px",
559
+ transform: "rotate(45deg)",
560
+ border: `${G("border-size")} solid ${G("dc-50")}`,
561
+ background: G("dc-15")
562
+ }),
563
+ subtitle: n({ ...Ee, fontSize: "1rem" }),
564
+ subtitleMobile: n({ ...Ee, fontSize: "0.875rem" }),
565
+ welcome: n({ ...ie, fontSize: "1rem", marginBottom: e.spaceMd }),
566
+ welcomeMobile: n({ ...ie, fontSize: "0.875rem", marginBottom: e.spaceMd }),
567
+ welcomeOverlay: n({ ...ie, fontSize: "1rem", marginBottom: 0 }),
568
+ welcomeOverlayMobile: n({ ...ie, fontSize: "0.875rem", marginBottom: 0 }),
569
+ instructions: n({ ...be, fontSize: "1rem", maxWidth: "600px" }),
570
+ instructionsMobile: n({ ...be, fontSize: "0.875rem", maxWidth: "600px" }),
571
+ instructionsStandard: n({ ...be, fontSize: "1rem", maxWidth: "400px" }),
572
+ instructionsStandardMobile: n({ ...be, fontSize: "0.875rem", maxWidth: "400px" }),
573
+ divider: n({ ...Ve, width: "25%" }),
574
+ dividerMobile: n({ ...Ve, width: "40%" }),
575
+ dividerIn: n({ ...fe, background: `linear-gradient(to right, transparent, ${G("dc-25")})` }),
576
+ dividerOut: n({ ...fe, background: `linear-gradient(to left, transparent, ${G("dc-25")})` }),
577
+ dividerDot: n({ width: "4px", height: "4px", borderRadius: "50%", background: G("dc-35") }),
578
+ grid: n({
579
+ marginTop: e.spaceLg,
580
+ marginInline: "auto",
581
+ display: "grid",
582
+ justifyContent: "center",
583
+ marginBottom: e.spaceLg,
584
+ position: "relative",
585
+ perspective: "1200px"
586
+ }),
587
+ cell: n({ display: "flex", justifyContent: "center", alignItems: "center" }),
588
+ embedReset: n(se, He, { fontSize: "1rem", minWidth: "180px" }),
589
+ embedResetMobile: n(se, He, { fontSize: "0.875rem", minWidth: "150px" }),
590
+ standardReset: n(se, je, { fontSize: "0.875rem" }),
591
+ standardResetMobile: n(se, je, { fontSize: "0.75rem" }),
592
+ standard: n({
593
+ ...Q,
594
+ width: "100%",
595
+ height: "100%",
596
+ gap: e.spaceLg,
597
+ alignItems: "center",
598
+ position: "relative",
599
+ overflow: "auto",
600
+ boxSizing: "border-box"
601
+ }),
602
+ standardWelcome: n({ ...ie, fontSize: "1rem", paddingInline: e.spaceMd }),
603
+ standardWelcomeMobile: n({ ...ie, fontSize: "0.875rem", paddingInline: e.spaceMd }),
604
+ standardArea: n({ ...Q, paddingInline: e.spaceMd, width: "100%", boxSizing: "border-box" }),
605
+ standardStack: n({ ...Q, gap: e.spaceMd }),
606
+ standardStackMobile: n({ ...Q, gap: e.spaceLg }),
607
+ gameBox: n({
608
+ borderRadius: e.radiusMd,
609
+ paddingInline: e.spaceSm,
610
+ paddingTop: e.spaceSm,
611
+ paddingBottom: e.spaceMd,
612
+ gap: e.spaceMd,
613
+ backgroundColor: G("box-bg"),
614
+ ...Q,
615
+ alignItems: "center",
616
+ backdropFilter: "blur(4px)",
617
+ position: "relative",
618
+ overflow: "hidden"
619
+ }),
620
+ footer: n({ ...Q, alignItems: "center", gap: e.spaceMd }),
621
+ disclaimer: n({ ...Ne, fontSize: "0.75rem" }),
622
+ disclaimerMobile: n({ ...Ne, fontSize: "0.625rem" }),
623
+ embed: n({
624
+ ...Q,
625
+ width: "100%",
626
+ height: "100%",
627
+ padding: e.spaceLg,
628
+ gap: e.spaceLg,
629
+ alignItems: "center",
630
+ position: "relative",
631
+ overflow: "auto",
632
+ boxSizing: "border-box"
633
+ })
634
+ }, at = ({
635
+ infoPage: t,
636
+ enableReset: s = !1,
637
+ contentColor: b,
638
+ primaryColor: m,
639
+ onPrimaryColor: O,
640
+ borderColor: u,
641
+ backgroundColor: r,
692
642
  dangerColor: i,
693
- cardBaseColor: r,
694
- shimmerColor: s,
695
- brandingLogo: k = "",
696
- isDark: z = !1,
697
- showTitleBlock: x = !1,
698
- variant: b,
699
- compactCards: p = !1
643
+ cardBaseColor: $,
644
+ shimmerColor: a,
645
+ brandingLogo: _ = "",
646
+ isDark: W = !1,
647
+ showTitleBlock: g = !1,
648
+ variant: y,
649
+ compactCards: f = !1
700
650
  }) => {
701
- var Fe, We, _e, Oe;
702
- const l = J(), m = le(), O = ve(), v = we(), u = xe(), C = Se(), G = r || h, L = s || n, f = b === "standard", N = b === "overlay", V = f ? Ce(h) : "", _ = V ? V.replace(/[^\d,]/g, "") : "", D = p ? l ? 80 : 110 : l ? 100 : 140, T = p ? l ? 104 : 143 : l ? 130 : 180, H = p ? l ? 90 : 130 : l ? 120 : 180, y = p ? l ? "16px" : "32px" : l ? "24px" : "48px", X = p ? l ? "12px" : "32px" : l ? "16px" : "48px", F = Ve(n, z), R = JSON.parse(e.body), $ = R.segments || [], W = e.labels || {}, P = R.mode || ((Fe = R.config) == null ? void 0 : Fe.mode) || "fair", U = ((We = R.config) == null ? void 0 : We.pace) || "normal", j = ((_e = R.config) == null ? void 0 : _e.revealAll) ?? !1, A = ((Oe = R.config) == null ? void 0 : Oe.decorations) ?? !1, I = $.some((ae) => {
703
- var K;
704
- return (K = ae.images) == null ? void 0 : K.idle;
651
+ var Fe, Ce, De, Te;
652
+ const c = te(), z = Be(), w = Ue(), T = ot(), V = $ || r, x = a || m, M = y === "standard", N = y === "overlay", B = M ? Ye(r) : "", C = B ? B.replace(/[^\d,]/g, "") : "", I = f ? c ? 80 : 110 : c ? 100 : 140, H = f ? c ? 104 : 143 : c ? 130 : 180, h = f ? c ? 90 : 130 : c ? 120 : 180, j = f ? c ? "16px" : "32px" : c ? "24px" : "48px", D = f ? c ? "12px" : "32px" : c ? "16px" : "48px", k = nt(m, W), F = JSON.parse(t.body), A = F.segments || [], R = t.labels || {}, U = F.mode || ((Fe = F.config) == null ? void 0 : Fe.mode) || "fair", Y = ((Ce = F.config) == null ? void 0 : Ce.pace) || "normal", J = ((De = F.config) == null ? void 0 : De.revealAll) ?? !1, L = ((Te = F.config) == null ? void 0 : Te.decorations) ?? !1, X = A.some((ae) => {
653
+ var q;
654
+ return (q = ae.images) == null ? void 0 : q.idle;
705
655
  }), {
706
656
  selectedSegment: S,
707
- displaySegments: ee,
708
- revealResult: te,
709
- showResultScreen: Y,
710
- showInlineResult: E,
711
- showLoseAnimation: q,
712
- hasEntered: M,
713
- flippedCards: Q,
714
- crossfadedCards: oe,
715
- revealedOtherCards: ce,
716
- flipDuration: Xe,
717
- crossfadeDuration: Pe,
718
- loseAnimationDuration: Ue,
719
- handlePick: Re,
720
- handleReset: ge
721
- } = gt({ segments: $, mode: P, pace: U, revealAll: j }), ze = () => /* @__PURE__ */ w(re, { children: [
722
- A && /* @__PURE__ */ t(
723
- He,
724
- {
725
- primaryColor: n,
726
- isDark: z,
727
- animationPrefix: "casino"
728
- }
729
- ),
730
- Y && (S == null ? void 0 : S.results) && /* @__PURE__ */ t(
731
- ie,
657
+ displaySegments: Z,
658
+ revealResult: oe,
659
+ showResultScreen: K,
660
+ showInlineResult: P,
661
+ showLoseAnimation: ee,
662
+ hasEntered: E,
663
+ flippedCards: me,
664
+ crossfadedCards: pe,
665
+ revealedOtherCards: st,
666
+ flipDuration: dt,
667
+ crossfadeDuration: ut,
668
+ loseAnimationDuration: mt,
669
+ handlePick: Me,
670
+ handleReset: _e
671
+ } = $t({ segments: A, mode: U, pace: Y, revealAll: J }), $e = {
672
+ ...T,
673
+ "--fu-ucrc-cg-content": b,
674
+ "--fu-ucrc-cg-primary": m,
675
+ "--fu-ucrc-cg-border": u || z.outlineEnabledBorder,
676
+ "--fu-ucrc-cg-pick-outline": z.outlineEnabledBorder,
677
+ "--fu-ucrc-cg-pick-border-size": w.size,
678
+ "--fu-ucrc-cg-pick-title-shadow": L ? `0 0 20px ${m}20` : "none",
679
+ "--fu-ucrc-cg-pick-dc-15": k("15"),
680
+ "--fu-ucrc-cg-pick-dc-25": k("25"),
681
+ "--fu-ucrc-cg-pick-dc-35": k("35"),
682
+ "--fu-ucrc-cg-pick-dc-40": k("40"),
683
+ "--fu-ucrc-cg-pick-dc-50": k("50"),
684
+ "--fu-ucrc-cg-pick-box-bg": `rgba(${C}, 0.5)`
685
+ }, We = () => /* @__PURE__ */ v(de, { children: [
686
+ L && /* @__PURE__ */ o(it, { primaryColor: m, isDark: W, animationPrefix: "casino" }),
687
+ K && (S == null ? void 0 : S.results) && /* @__PURE__ */ o(
688
+ ce,
732
689
  {
733
690
  result: S.results,
734
- variant: b || "embed",
691
+ variant: y || "embed",
735
692
  mode: "screen",
736
- contentColor: a,
737
- primaryColor: n,
738
- onPrimaryColor: g,
739
- borderColor: o,
740
- disclaimer: f ? void 0 : W.disclaimer,
741
- enableReset: c,
742
- onReset: ge
693
+ contentColor: b,
694
+ primaryColor: m,
695
+ onPrimaryColor: O,
696
+ borderColor: u,
697
+ disclaimer: M ? void 0 : R.disclaimer,
698
+ enableReset: s,
699
+ onReset: _e
743
700
  }
744
701
  ),
745
- !Y && /* @__PURE__ */ w(re, { children: [
746
- !f && x && (e.title || e.subtitle) && /* @__PURE__ */ w(
747
- d,
748
- {
749
- sx: {
750
- display: "flex",
751
- flexDirection: "column",
752
- gap: u.xs,
753
- alignItems: "center",
754
- textAlign: "center",
755
- width: "100%"
756
- },
757
- children: [
758
- e.title && /* @__PURE__ */ t(
759
- B,
760
- {
761
- level: "h2",
762
- sx: {
763
- fontFamily: v.primary,
764
- fontWeight: 700,
765
- fontSize: l ? "1.5rem" : "2rem",
766
- color: a,
767
- lineHeight: 1.2,
768
- textShadow: A ? `0 0 20px ${n}20` : "none"
769
- },
770
- children: e.title
771
- }
772
- ),
773
- A && e.title && /* @__PURE__ */ w(
774
- d,
775
- {
776
- sx: {
777
- display: "flex",
778
- alignItems: "center",
779
- gap: u.sm,
780
- mt: u.xs,
781
- width: l ? "60%" : "40%"
782
- },
783
- children: [
784
- /* @__PURE__ */ t(
785
- d,
786
- {
787
- sx: {
788
- flex: 1,
789
- height: "1px",
790
- background: `linear-gradient(to right, transparent, ${F("40")})`
791
- }
792
- }
793
- ),
794
- /* @__PURE__ */ t(
795
- d,
796
- {
797
- sx: {
798
- width: "8px",
799
- height: "8px",
800
- transform: "rotate(45deg)",
801
- border: `${C.size} solid ${F("50")}`,
802
- background: `${F("15")}`
803
- }
804
- }
805
- ),
806
- /* @__PURE__ */ t(
807
- d,
808
- {
809
- sx: {
810
- flex: 1,
811
- height: "1px",
812
- background: `linear-gradient(to left, transparent, ${F("40")})`
813
- }
814
- }
815
- )
816
- ]
817
- }
818
- ),
819
- e.subtitle && /* @__PURE__ */ t(
820
- B,
821
- {
822
- level: "body-md",
823
- sx: {
824
- fontFamily: v.secondary,
825
- fontWeight: 400,
826
- fontSize: l ? "0.875rem" : "1rem",
827
- color: a,
828
- opacity: 0.8
829
- },
830
- children: e.subtitle
831
- }
832
- )
833
- ]
834
- }
835
- ),
836
- /* @__PURE__ */ w(d, { children: [
837
- !f && W.welcome && /* @__PURE__ */ t(
838
- B,
702
+ !K && /* @__PURE__ */ v(de, { children: [
703
+ !M && g && (t.title || t.subtitle) && /* @__PURE__ */ v("div", { css: d.titleBlock, children: [
704
+ t.title && /* @__PURE__ */ o("h2", { css: c ? d.titleMobile : d.title, children: t.title }),
705
+ L && t.title && /* @__PURE__ */ v("div", { css: c ? d.underlineMobile : d.underline, children: [
706
+ /* @__PURE__ */ o("div", { css: d.lineIn }),
707
+ /* @__PURE__ */ o("div", { css: d.underlineDiamond }),
708
+ /* @__PURE__ */ o("div", { css: d.lineOut })
709
+ ] }),
710
+ t.subtitle && /* @__PURE__ */ o("p", { css: c ? d.subtitleMobile : d.subtitle, children: t.subtitle })
711
+ ] }),
712
+ /* @__PURE__ */ v("div", { children: [
713
+ !M && R.welcome && /* @__PURE__ */ o(
714
+ "p",
839
715
  {
840
- level: "body-md",
841
- sx: {
842
- fontFamily: v.primary,
843
- fontWeight: 400,
844
- fontSize: l ? "0.875rem" : "1rem",
845
- color: a,
846
- textAlign: "center",
847
- mb: N ? 0 : u.md
848
- },
849
- children: W.welcome
716
+ css: N ? c ? d.welcomeOverlayMobile : d.welcomeOverlay : c ? d.welcomeMobile : d.welcome,
717
+ children: R.welcome
850
718
  }
851
719
  ),
852
- W.instructions && !E && /* @__PURE__ */ t(
853
- B,
720
+ R.instructions && !P && /* @__PURE__ */ o(
721
+ "p",
854
722
  {
855
- level: f ? "body-sm" : "body-md",
856
- sx: {
857
- fontFamily: v.secondary,
858
- fontWeight: 400,
859
- fontSize: l ? "0.875rem" : "1rem",
860
- color: a,
861
- textAlign: "center",
862
- opacity: 0.7,
863
- maxWidth: f ? "400px" : "600px"
864
- },
865
- children: W.instructions
723
+ css: M ? c ? d.instructionsStandardMobile : d.instructionsStandard : c ? d.instructionsMobile : d.instructions,
724
+ children: R.instructions
866
725
  }
867
726
  )
868
727
  ] }),
869
- A && /* @__PURE__ */ w(
870
- d,
871
- {
872
- sx: {
873
- display: "flex",
874
- alignItems: "center",
875
- gap: u.sm,
876
- width: l ? "40%" : "25%",
877
- my: u.xs
878
- },
879
- children: [
880
- /* @__PURE__ */ t(
881
- d,
882
- {
883
- sx: {
884
- flex: 1,
885
- height: "1px",
886
- background: `linear-gradient(to right, transparent, ${F("25")})`
887
- }
888
- }
889
- ),
890
- /* @__PURE__ */ t(
891
- d,
892
- {
893
- sx: {
894
- width: "4px",
895
- height: "4px",
896
- borderRadius: "50%",
897
- background: `${F("35")}`
898
- }
899
- }
900
- ),
901
- /* @__PURE__ */ t(
902
- d,
903
- {
904
- sx: {
905
- flex: 1,
906
- height: "1px",
907
- background: `linear-gradient(to left, transparent, ${F("25")})`
908
- }
909
- }
910
- )
911
- ]
912
- }
913
- ),
914
- /* @__PURE__ */ t(
915
- d,
728
+ L && /* @__PURE__ */ v("div", { css: c ? d.dividerMobile : d.divider, children: [
729
+ /* @__PURE__ */ o("div", { css: d.dividerIn }),
730
+ /* @__PURE__ */ o("div", { css: d.dividerDot }),
731
+ /* @__PURE__ */ o("div", { css: d.dividerOut })
732
+ ] }),
733
+ /* @__PURE__ */ o(
734
+ "div",
916
735
  {
917
- sx: {
918
- mt: u.lg,
919
- mx: "auto",
920
- display: "grid",
921
- gridTemplateColumns: I ? `repeat(3, ${H}px)` : `repeat(3, ${D}px)`,
922
- rowGap: y,
923
- columnGap: X,
924
- justifyContent: "center",
925
- mb: u.lg,
926
- position: "relative",
927
- perspective: "1200px"
736
+ css: d.grid,
737
+ style: {
738
+ gridTemplateColumns: `repeat(3, ${X ? h : I}px)`,
739
+ rowGap: j,
740
+ columnGap: D
928
741
  },
929
- children: (ee ?? $).map((ae, K) => {
930
- const ye = `card-${K}`, de = S !== null, De = Q.has(ye), me = ce.has(ye), je = de && !De && !me, Be = oe.has(ye), Ye = de && !Be && !me;
931
- return /* @__PURE__ */ t(
932
- d,
742
+ children: (Z ?? A).map((ae, q) => {
743
+ const we = `card-${q}`, he = S !== null, Ie = me.has(we), ge = st.has(we), pt = he && !Ie && !ge, Ae = pe.has(we), ht = he && !Ae && !ge;
744
+ return /* @__PURE__ */ o(
745
+ "div",
933
746
  {
934
- sx: {
935
- display: "flex",
936
- justifyContent: "center",
937
- alignItems: "center",
938
- // Staggered deal-in entrance
939
- opacity: M ? 1 : 0,
940
- transform: M ? "translateY(0) scale(1) rotateX(0deg)" : "translateY(30px) scale(0.9) rotateX(10deg)",
941
- transition: `all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${K * 100}ms`
747
+ css: d.cell,
748
+ style: {
749
+ opacity: E ? 1 : 0,
750
+ transform: E ? "translateY(0) scale(1) rotateX(0deg)" : "translateY(30px) scale(0.9) rotateX(10deg)",
751
+ transition: `all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${q * 100}ms`
942
752
  },
943
- children: I ? /* @__PURE__ */ t(
944
- yt,
753
+ children: X ? /* @__PURE__ */ o(
754
+ Wt,
945
755
  {
946
756
  segment: ae,
947
- index: K,
757
+ index: q,
948
758
  selectedSegment: S,
949
- revealResult: te,
950
- isCrossfaded: Be,
951
- isOtherRevealed: me,
952
- shouldDim: Ye,
953
- isRevealed: de,
954
- hasEntered: M,
955
- objectSize: H,
956
- crossfadeDuration: Pe,
957
- isStandard: f,
958
- primaryColor: n,
759
+ revealResult: oe,
760
+ isCrossfaded: Ae,
761
+ isOtherRevealed: ge,
762
+ shouldDim: ht,
763
+ isRevealed: he,
764
+ hasEntered: E,
765
+ objectSize: h,
766
+ crossfadeDuration: ut,
767
+ isStandard: M,
768
+ primaryColor: m,
959
769
  dangerColor: i,
960
- onPick: () => Re(K, !0)
770
+ onPick: () => Me(q, !0)
961
771
  }
962
- ) : /* @__PURE__ */ t(
963
- bt,
772
+ ) : /* @__PURE__ */ o(
773
+ Ft,
964
774
  {
965
775
  segment: ae,
966
- index: K,
776
+ index: q,
967
777
  selectedSegment: S,
968
- isFlipped: De,
969
- isOtherRevealed: me,
970
- shouldDim: je,
971
- isRevealed: de,
972
- showLoseAnimation: q,
973
- hasEntered: M,
974
- cardWidth: D,
975
- cardHeight: T,
976
- flipDuration: Xe,
977
- loseAnimationDuration: Ue,
978
- cardBaseColor: G,
979
- shimmerColor: L,
980
- primaryColor: n,
981
- contentColor: a,
778
+ isFlipped: Ie,
779
+ isOtherRevealed: ge,
780
+ shouldDim: pt,
781
+ isRevealed: he,
782
+ showLoseAnimation: ee,
783
+ hasEntered: E,
784
+ cardWidth: I,
785
+ cardHeight: H,
786
+ flipDuration: dt,
787
+ loseAnimationDuration: mt,
788
+ cardBaseColor: V,
789
+ shimmerColor: x,
790
+ primaryColor: m,
791
+ contentColor: b,
982
792
  dangerColor: i,
983
- borderColor: o,
984
- brandingLogo: k,
985
- compactCards: p,
986
- onPick: () => Re(K, !1)
793
+ borderColor: u,
794
+ brandingLogo: _,
795
+ compactCards: f,
796
+ onPick: () => Me(q, !1)
987
797
  }
988
798
  )
989
799
  },
@@ -992,262 +802,102 @@ const ke = ({
992
802
  })
993
803
  }
994
804
  ),
995
- !f && E && (S == null ? void 0 : S.results) && /* @__PURE__ */ t(
996
- ie,
805
+ !M && P && (S == null ? void 0 : S.results) && /* @__PURE__ */ o(
806
+ ce,
997
807
  {
998
808
  result: S.results,
999
809
  variant: "embed",
1000
810
  mode: "inline",
1001
- contentColor: a,
1002
- primaryColor: n,
1003
- onPrimaryColor: g,
1004
- borderColor: o,
811
+ contentColor: b,
812
+ primaryColor: m,
813
+ onPrimaryColor: O,
814
+ borderColor: u,
1005
815
  showResetButton: !1
1006
816
  }
1007
817
  ),
1008
- !f && c && E && /* @__PURE__ */ t(
1009
- ue,
1010
- {
1011
- onClick: ge,
1012
- variant: "outlined",
1013
- sx: {
1014
- mt: u.md,
1015
- px: u.lg,
1016
- py: u.sm,
1017
- fontFamily: v.secondary,
1018
- fontWeight: 600,
1019
- fontSize: l ? "0.875rem" : "1rem",
1020
- textTransform: "uppercase",
1021
- borderRadius: O.md,
1022
- borderColor: o || m.outlineEnabledBorder,
1023
- color: a,
1024
- minWidth: l ? "150px" : "180px",
1025
- "&:hover": {
1026
- borderColor: n,
1027
- bgcolor: "transparent",
1028
- color: n
1029
- }
1030
- },
1031
- children: "Reset Game"
1032
- }
1033
- ),
1034
- f && c && E && /* @__PURE__ */ t(
1035
- ue,
818
+ s && P && /* @__PURE__ */ o(
819
+ "button",
1036
820
  {
1037
- onClick: ge,
1038
- variant: "outlined",
1039
- sx: {
1040
- borderRadius: O.xl,
1041
- py: u.sm,
1042
- px: u.lg,
1043
- borderColor: m.outlineEnabledBorder,
1044
- color: a,
1045
- fontSize: l ? "0.75rem" : "0.875rem",
1046
- fontWeight: 700,
1047
- fontFamily: v.primary,
1048
- textTransform: "uppercase",
1049
- "&:hover": {
1050
- borderColor: n,
1051
- bgcolor: "transparent",
1052
- color: n
1053
- }
1054
- },
821
+ type: "button",
822
+ css: M ? c ? d.standardResetMobile : d.standardReset : c ? d.embedResetMobile : d.embedReset,
823
+ onClick: _e,
1055
824
  children: "Reset Game"
1056
825
  }
1057
826
  )
1058
827
  ] })
1059
828
  ] });
1060
- return f ? /* @__PURE__ */ w(
1061
- d,
1062
- {
1063
- sx: {
1064
- display: "flex",
1065
- flexDirection: "column",
1066
- width: "100%",
1067
- height: "100%",
1068
- gap: u.lg,
1069
- alignItems: "center",
1070
- position: "relative",
1071
- overflow: "auto",
1072
- boxSizing: "border-box"
1073
- },
1074
- children: [
1075
- !Y && W.welcome && /* @__PURE__ */ t(
1076
- B,
1077
- {
1078
- level: "body-md",
1079
- sx: {
1080
- fontFamily: v.primary,
1081
- fontWeight: 400,
1082
- fontSize: l ? "0.875rem" : "1rem",
1083
- color: a,
1084
- textAlign: "center",
1085
- px: u.md
1086
- },
1087
- children: W.welcome
1088
- }
1089
- ),
1090
- /* @__PURE__ */ t(
1091
- d,
829
+ return M ? /* @__PURE__ */ v("div", { css: d.standard, style: $e, children: [
830
+ !K && R.welcome && /* @__PURE__ */ o("p", { css: c ? d.standardWelcomeMobile : d.standardWelcome, children: R.welcome }),
831
+ /* @__PURE__ */ o("div", { css: d.standardArea, children: /* @__PURE__ */ v("div", { css: c ? d.standardStackMobile : d.standardStack, children: [
832
+ /* @__PURE__ */ o("div", { css: d.gameBox, children: We() }),
833
+ P && (S == null ? void 0 : S.results) && /* @__PURE__ */ o(
834
+ ce,
835
+ {
836
+ result: S.results,
837
+ variant: "standard",
838
+ mode: "inline",
839
+ contentColor: b,
840
+ primaryColor: m,
841
+ onPrimaryColor: O,
842
+ showResetButton: !1,
843
+ spaced: !0
844
+ }
845
+ ),
846
+ (_ || R.disclaimer) && /* @__PURE__ */ v("div", { css: d.footer, children: [
847
+ R.disclaimer && /* @__PURE__ */ o("p", { css: c ? d.disclaimerMobile : d.disclaimer, children: R.disclaimer }),
848
+ _ && X && /* @__PURE__ */ o(
849
+ "img",
1092
850
  {
1093
- sx: {
1094
- display: "flex",
1095
- flexDirection: "column",
1096
- px: u.md,
1097
- width: "100%",
1098
- boxSizing: "border-box"
1099
- },
1100
- children: /* @__PURE__ */ w(
1101
- d,
1102
- {
1103
- sx: {
1104
- display: "flex",
1105
- flexDirection: "column",
1106
- gap: l ? u.lg : u.md
1107
- },
1108
- children: [
1109
- /* @__PURE__ */ t(
1110
- d,
1111
- {
1112
- sx: {
1113
- borderRadius: O.md,
1114
- px: u.sm,
1115
- pt: u.sm,
1116
- pb: u.md,
1117
- gap: u.md,
1118
- bgcolor: `rgba(${_}, 0.5)`,
1119
- display: "flex",
1120
- flexDirection: "column",
1121
- alignItems: "center",
1122
- backdropFilter: "blur(4px)",
1123
- position: "relative",
1124
- overflow: "hidden"
1125
- },
1126
- children: ze()
1127
- }
1128
- ),
1129
- E && (S == null ? void 0 : S.results) && /* @__PURE__ */ t(
1130
- ie,
1131
- {
1132
- result: S.results,
1133
- variant: "standard",
1134
- mode: "inline",
1135
- contentColor: a,
1136
- primaryColor: n,
1137
- onPrimaryColor: g,
1138
- showResetButton: !1,
1139
- sx: { mb: u.md }
1140
- }
1141
- ),
1142
- (k || W.disclaimer) && /* @__PURE__ */ w(
1143
- d,
1144
- {
1145
- sx: {
1146
- display: "flex",
1147
- flexDirection: "column",
1148
- alignItems: "center",
1149
- gap: u.md
1150
- },
1151
- children: [
1152
- W.disclaimer && /* @__PURE__ */ t(
1153
- B,
1154
- {
1155
- level: "body-sm",
1156
- sx: {
1157
- fontFamily: v.secondary,
1158
- fontWeight: 400,
1159
- fontSize: l ? "0.625rem" : "0.75rem",
1160
- color: a,
1161
- opacity: 0.7,
1162
- textAlign: "center",
1163
- maxWidth: "900px",
1164
- lineHeight: 1.4
1165
- },
1166
- children: W.disclaimer
1167
- }
1168
- ),
1169
- k && I && /* @__PURE__ */ t(
1170
- "img",
1171
- {
1172
- src: k,
1173
- alt: "Brand Logo",
1174
- style: {
1175
- height: "auto",
1176
- maxHeight: "60px",
1177
- maxWidth: "180px"
1178
- }
1179
- }
1180
- )
1181
- ]
1182
- }
1183
- )
1184
- ]
1185
- }
1186
- )
851
+ src: _,
852
+ alt: "Brand Logo",
853
+ style: { height: "auto", maxHeight: "60px", maxWidth: "180px" }
1187
854
  }
1188
855
  )
1189
- ]
1190
- }
1191
- ) : /* @__PURE__ */ t(
1192
- d,
1193
- {
1194
- sx: {
1195
- display: "flex",
1196
- flexDirection: "column",
1197
- width: "100%",
1198
- height: "100%",
1199
- p: u.lg,
1200
- gap: u.lg,
1201
- alignItems: "center",
1202
- position: "relative",
1203
- overflow: "auto",
1204
- boxSizing: "border-box"
1205
- },
1206
- children: ze()
1207
- }
1208
- );
1209
- }, Wt = ({
1210
- infoPage: e,
1211
- enableReset: c = !1,
1212
- imagePosition: a = "left",
1213
- defaultImagePlaceholderUrl: n
856
+ ] })
857
+ ] }) })
858
+ ] }) : /* @__PURE__ */ o("div", { css: d.embed, style: $e, children: We() });
859
+ }, Pt = ({
860
+ infoPage: t,
861
+ enableReset: s = !1,
862
+ imagePosition: b = "left",
863
+ defaultImagePlaceholderUrl: m
1214
864
  }) => {
1215
- var l, m, O;
1216
- const { t: g } = se(), o = J(), h = le(), i = Te() === "dark", r = fe(
865
+ var c, z, w;
866
+ const { t: O } = ue(), u = te(), r = Be(), i = Je() === "dark", $ = ye(
1217
867
  {
1218
- images: e.images,
1219
- imagePlaceholder: n || ""
868
+ images: t.images,
869
+ imagePlaceholder: m || ""
1220
870
  },
1221
- pe.STANDARD
1222
- ), s = (l = e.branding) == null ? void 0 : l.colors, k = (s == null ? void 0 : s.primary_color) || h.palette.primary.plainColor, z = (s == null ? void 0 : s.border_color) || null, x = (s == null ? void 0 : s.background_color) || h.surfaceVariant || "", b = (m = e.branding) == null ? void 0 : m.images, p = o ? (b == null ? void 0 : b.mobile_logo) || (b == null ? void 0 : b.main_logo) || "" : (b == null ? void 0 : b.main_logo) || "";
1223
- return /* @__PURE__ */ t(ke, { brandingBorderColor: z, children: /* @__PURE__ */ t(
1224
- $e,
871
+ ve.STANDARD
872
+ ), a = (c = t.branding) == null ? void 0 : c.colors, _ = (a == null ? void 0 : a.primary_color) || r.palette.primary.plainColor, W = (a == null ? void 0 : a.border_color) || null, g = (a == null ? void 0 : a.background_color) || r.surfaceVariant || "", y = (z = t.branding) == null ? void 0 : z.images, f = u ? (y == null ? void 0 : y.mobile_logo) || (y == null ? void 0 : y.main_logo) || "" : (y == null ? void 0 : y.main_logo) || "";
873
+ return /* @__PURE__ */ o(Re, { brandingBorderColor: W, children: /* @__PURE__ */ o(
874
+ Ze,
1225
875
  {
1226
876
  entity: {
1227
- ...e,
877
+ ...t,
1228
878
  type: "chance-game",
1229
- description: e.subtitle || "",
879
+ description: t.subtitle || "",
1230
880
  rules: null
1231
881
  },
1232
- headline: g("chanceGame.headlinePickOneOfX", {
1233
- count: ((O = JSON.parse(e.body).segments) == null ? void 0 : O.length) || 0
882
+ headline: O("chanceGame.headlinePickOneOfX", {
883
+ count: ((w = JSON.parse(t.body).segments) == null ? void 0 : w.length) || 0
1234
884
  }),
1235
- finalImage: r,
1236
- imagePosition: a,
1237
- children: /* @__PURE__ */ t(
1238
- Le,
885
+ finalImage: $,
886
+ imagePosition: b,
887
+ children: /* @__PURE__ */ o(
888
+ at,
1239
889
  {
1240
- infoPage: e,
1241
- enableReset: c,
1242
- contentColor: (s == null ? void 0 : s.content_color) || h.textPrimary,
1243
- primaryColor: k,
1244
- onPrimaryColor: (s == null ? void 0 : s.content_color) || h.palette.primary.onPrimary || h.surface,
1245
- borderColor: z || void 0,
1246
- backgroundColor: x,
1247
- dangerColor: h.palette.danger.plainColor,
1248
- cardBaseColor: x,
1249
- shimmerColor: k,
1250
- brandingLogo: p,
890
+ infoPage: t,
891
+ enableReset: s,
892
+ contentColor: (a == null ? void 0 : a.content_color) || r.textPrimary,
893
+ primaryColor: _,
894
+ onPrimaryColor: (a == null ? void 0 : a.content_color) || r.palette.primary.onPrimary || r.surface,
895
+ borderColor: W || void 0,
896
+ backgroundColor: g,
897
+ dangerColor: r.palette.danger.plainColor,
898
+ cardBaseColor: g,
899
+ shimmerColor: _,
900
+ brandingLogo: f,
1251
901
  isDark: i,
1252
902
  showTitleBlock: !1,
1253
903
  variant: "standard",
@@ -1256,387 +906,222 @@ const ke = ({
1256
906
  )
1257
907
  }
1258
908
  ) });
1259
- }, Ne = (e) => ({
1260
- contentContainerWithBackdrop: {
1261
- borderRadius: e.mdBorderRadius,
1262
- display: "flex",
1263
- flexDirection: "column",
1264
- backdropFilter: "blur(4px)",
1265
- position: "relative",
1266
- overflow: "hidden",
1267
- "&::before": {
1268
- content: '""',
1269
- position: "absolute",
1270
- top: 0,
1271
- left: 0,
1272
- right: 0,
1273
- bottom: 0,
1274
- backgroundColor: e.contentBgColor,
1275
- opacity: 0.5,
1276
- borderRadius: "inherit",
1277
- zIndex: 0
1278
- },
1279
- "& > *": {
1280
- position: "relative",
1281
- zIndex: 1
1282
- },
1283
- zIndex: 2
1284
- },
1285
- bottomFooterContainer: {
1286
- display: "flex",
1287
- alignItems: "center",
1288
- justifyContent: e.isMobile ? "center" : "space-between",
1289
- flexDirection: e.isMobile ? "column-reverse" : "row",
1290
- gap: e.spacingScale.md
909
+ }, lt = n({
910
+ borderRadius: "var(--fu-ucrc-cg-backdrop-radius)",
911
+ display: "flex",
912
+ flexDirection: "column",
913
+ backdropFilter: "blur(4px)",
914
+ position: "relative",
915
+ overflow: "hidden",
916
+ zIndex: 2,
917
+ "&::before": {
918
+ content: '""',
919
+ position: "absolute",
920
+ top: 0,
921
+ left: 0,
922
+ right: 0,
923
+ bottom: 0,
924
+ backgroundColor: "var(--fu-ucrc-cg-backdrop-bg)",
925
+ opacity: 0.5,
926
+ borderRadius: "inherit",
927
+ zIndex: 0
1291
928
  },
1292
- welcome: {
1293
- fontFamily: e.fontFamilyPrimary,
1294
- color: e.textColor,
1295
- fontSize: "1em",
1296
- fontWeight: 400,
1297
- lineHeight: 1.5,
1298
- maxWidth: "800px",
1299
- margin: "0 auto",
1300
- opacity: 0.9
929
+ "& > *": {
930
+ position: "relative",
931
+ zIndex: 1
1301
932
  }
1302
- }), _t = ({
1303
- infoPage: e,
1304
- enableReset: c = !1,
1305
- defaultImagePlaceholderUrl: a
933
+ }), Et = ({
934
+ infoPage: t,
935
+ enableReset: s = !1,
936
+ defaultImagePlaceholderUrl: b
1306
937
  }) => {
1307
- var f, N, V, _, D, T, H, y, X, F, R, $, W, P, U, j, A, I, S;
1308
- const { t: n } = se(), g = J(), o = Ae(), h = xe(), i = ((f = e.branding) == null ? void 0 : f.colors) || null, r = (N = e.branding) == null ? void 0 : N.images, s = g ? (r == null ? void 0 : r.mobile_background_image) || (r == null ? void 0 : r.background_image) || "" : (r == null ? void 0 : r.background_image) || "", k = g ? (r == null ? void 0 : r.mobile_logo) || (r == null ? void 0 : r.main_logo) || "" : (r == null ? void 0 : r.main_logo) || "", z = a || (g ? Ge : Ee), x = s || fe(
938
+ var x, M, N, B, C, I, H, h, j, D, k, F, A, R, U, Y, J;
939
+ const { t: m } = ue(), O = te(), u = Ke(), r = ((x = t.branding) == null ? void 0 : x.colors) || null, i = (M = t.branding) == null ? void 0 : M.images, $ = O ? (i == null ? void 0 : i.mobile_background_image) || (i == null ? void 0 : i.background_image) || "" : (i == null ? void 0 : i.background_image) || "", a = O ? (i == null ? void 0 : i.mobile_logo) || (i == null ? void 0 : i.main_logo) || "" : (i == null ? void 0 : i.main_logo) || "", _ = b || (O ? qe : Qe), W = ye(
1309
940
  {
1310
- images: e.images,
1311
- imagePlaceholder: z
941
+ images: t.images,
942
+ imagePlaceholder: _
1312
943
  },
1313
- pe.OVERLAY
1314
- ), b = o.colorSchemes.dark.textColor, p = (i == null ? void 0 : i.content_color) || b, l = (i == null ? void 0 : i.primary_color) || ((T = (D = (_ = (V = o.colorSchemes) == null ? void 0 : V.light) == null ? void 0 : _.palette) == null ? void 0 : D.primary) == null ? void 0 : T.plainColor), m = (F = (X = (y = (H = o.colorSchemes) == null ? void 0 : H.light) == null ? void 0 : y.palette) == null ? void 0 : X.primary) == null ? void 0 : F.onPrimary, O = (i == null ? void 0 : i.background_color) || (($ = (R = o.colorSchemes) == null ? void 0 : R.dark) == null ? void 0 : $.surfaceVariant), v = (j = (U = (P = (W = o.colorSchemes) == null ? void 0 : W.light) == null ? void 0 : P.palette) == null ? void 0 : U.danger) == null ? void 0 : j.plainColor, u = o.customFontFamily.dark.primary, C = o.customRadius.dark.md, G = (I = (A = o.customRadius) == null ? void 0 : A.light) == null ? void 0 : I.xl, L = Ne({
1315
- spacingScale: h,
1316
- mdBorderRadius: C,
1317
- contentBgColor: O,
1318
- buttonRadius: G,
1319
- primaryColor: l,
1320
- onPrimaryColor: m,
1321
- fontFamilyPrimary: u,
1322
- darkTextColor: b,
1323
- isMobile: g,
1324
- textColor: p
1325
- });
1326
- return /* @__PURE__ */ t(
1327
- Ie,
944
+ ve.OVERLAY
945
+ ), g = $ || W, y = u.colorSchemes.dark.textColor, f = (r == null ? void 0 : r.content_color) || y, c = (r == null ? void 0 : r.primary_color) || ((I = (C = (B = (N = u.colorSchemes) == null ? void 0 : N.light) == null ? void 0 : B.palette) == null ? void 0 : C.primary) == null ? void 0 : I.plainColor), z = (D = (j = (h = (H = u.colorSchemes) == null ? void 0 : H.light) == null ? void 0 : h.palette) == null ? void 0 : j.primary) == null ? void 0 : D.onPrimary, w = (r == null ? void 0 : r.background_color) || ((F = (k = u.colorSchemes) == null ? void 0 : k.dark) == null ? void 0 : F.surfaceVariant), T = (Y = (U = (R = (A = u.colorSchemes) == null ? void 0 : A.light) == null ? void 0 : R.palette) == null ? void 0 : U.danger) == null ? void 0 : Y.plainColor, V = u.customRadius.dark.md;
946
+ return /* @__PURE__ */ o(
947
+ et,
1328
948
  {
1329
949
  entity: {
1330
- ...e,
950
+ ...t,
1331
951
  type: "chance-game",
1332
- description: e.subtitle || "",
952
+ description: t.subtitle || "",
1333
953
  rules: null
1334
954
  },
1335
- headline: n("chanceGame.headlinePickOneOfX", {
1336
- count: ((S = JSON.parse(e.body).segments) == null ? void 0 : S.length) || 0
955
+ headline: m("chanceGame.headlinePickOneOfX", {
956
+ count: ((J = JSON.parse(t.body).segments) == null ? void 0 : J.length) || 0
1337
957
  }),
1338
- finalImage: x,
1339
- children: /* @__PURE__ */ t(d, { sx: L.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
1340
- Le,
958
+ finalImage: g,
959
+ children: /* @__PURE__ */ o(
960
+ "div",
1341
961
  {
1342
- infoPage: e,
1343
- enableReset: c,
1344
- contentColor: p,
1345
- primaryColor: l,
1346
- onPrimaryColor: m || "#FFFFFF",
1347
- backgroundColor: O,
1348
- dangerColor: v,
1349
- cardBaseColor: O,
1350
- shimmerColor: l,
1351
- brandingLogo: k,
1352
- isDark: !0,
1353
- showTitleBlock: !1,
1354
- variant: "overlay",
1355
- compactCards: !0
962
+ css: lt,
963
+ style: {
964
+ "--fu-ucrc-cg-backdrop-radius": V,
965
+ "--fu-ucrc-cg-backdrop-bg": w
966
+ },
967
+ children: /* @__PURE__ */ o(
968
+ at,
969
+ {
970
+ infoPage: t,
971
+ enableReset: s,
972
+ contentColor: f,
973
+ primaryColor: c,
974
+ onPrimaryColor: z || "#FFFFFF",
975
+ backgroundColor: w,
976
+ dangerColor: T,
977
+ cardBaseColor: w,
978
+ shimmerColor: c,
979
+ brandingLogo: a,
980
+ isDark: !0,
981
+ showTitleBlock: !1,
982
+ variant: "overlay",
983
+ compactCards: !0
984
+ }
985
+ )
1356
986
  }
1357
- ) })
1358
- }
1359
- );
1360
- }, Ot = (e) => {
1361
- const c = we().secondary, a = qe(), n = e.isSplitVariant && a, g = J(), o = Qe(e.primaryUrl, e.secondaryUrl, "logo");
1362
- if (!e.brandingLogo)
1363
- return null;
1364
- const h = () => {
1365
- o && window.open(o, "_blank", "noopener,noreferrer");
1366
- }, i = /* @__PURE__ */ t(
1367
- "img",
1368
- {
1369
- src: e.brandingLogo,
1370
- alt: "branding-logo",
1371
- style: {
1372
- maxHeight: "50px",
1373
- maxWidth: "100px"
1374
- }
1375
- }
1376
- ), r = o ? typeof window > "u" ? /* @__PURE__ */ t(
1377
- d,
1378
- {
1379
- component: "a",
1380
- href: o,
1381
- target: "_blank",
1382
- rel: "noopener noreferrer",
1383
- sx: {
1384
- cursor: "pointer",
1385
- textDecoration: "none",
1386
- display: "inline-flex"
1387
- },
1388
- children: i
1389
- }
1390
- ) : /* @__PURE__ */ t(
1391
- d,
1392
- {
1393
- onClick: h,
1394
- sx: {
1395
- cursor: "pointer",
1396
- display: "inline-flex"
1397
- },
1398
- children: i
1399
- }
1400
- ) : i;
1401
- return e.isCentered || n || g ? /* @__PURE__ */ w(
1402
- d,
1403
- {
1404
- sx: {
1405
- display: "flex",
1406
- flexDirection: "column",
1407
- gap: "8px",
1408
- alignItems: "center",
1409
- minWidth: "180px",
1410
- fontSize: "1em",
1411
- zIndex: 1
1412
- },
1413
- children: [
1414
- e.label && /* @__PURE__ */ t(
1415
- B,
1416
- {
1417
- level: "body-sm",
1418
- sx: {
1419
- fontWeight: 400,
1420
- lineHeight: "166%",
1421
- letterSpacing: "0.4px",
1422
- fontSize: "1em",
1423
- color: e.textColor,
1424
- textAlign: "right",
1425
- fontFamily: c
1426
- },
1427
- children: e.label
1428
- }
1429
- ),
1430
- r
1431
- ]
1432
- }
1433
- ) : /* @__PURE__ */ w(
1434
- d,
1435
- {
1436
- sx: {
1437
- minWidth: "180px",
1438
- display: "flex",
1439
- gap: "8px",
1440
- alignItems: "center",
1441
- zIndex: 10,
1442
- fontSize: "1em"
1443
- },
1444
- children: [
1445
- e.label && /* @__PURE__ */ t(
1446
- B,
1447
- {
1448
- level: "body-sm",
1449
- sx: {
1450
- fontWeight: 400,
1451
- lineHeight: "166%",
1452
- letterSpacing: "0.4px",
1453
- textAlign: "right",
1454
- fontSize: "1em",
1455
- color: e.textColor,
1456
- fontFamily: c
1457
- },
1458
- children: e.label
1459
- }
1460
- ),
1461
- r
1462
- ]
987
+ )
1463
988
  }
1464
989
  );
1465
- }, Dt = ({
1466
- infoPage: e,
1467
- enableReset: c = !1,
1468
- defaultImagePlaceholderUrl: a
990
+ }, Vt = (t) => /* @__PURE__ */ o(kt, { inheritColor: !0, ...t }), Nt = ({
991
+ infoPage: t,
992
+ enableReset: s = !1,
993
+ defaultImagePlaceholderUrl: b
1469
994
  }) => {
1470
- var N, V, _, D, T, H, y, X, F, R, $, W, P, U, j, A, I, S, ee, te, Y, E, q, M, Q, oe, ce;
1471
- const { t: n } = se(), g = J(), o = Ae(), h = xe(), i = ((N = e.branding) == null ? void 0 : N.colors) || null, r = (V = e.branding) == null ? void 0 : V.images, s = g ? (r == null ? void 0 : r.mobile_background_image) || (r == null ? void 0 : r.background_image) || "" : (r == null ? void 0 : r.background_image) || "", k = g ? (r == null ? void 0 : r.mobile_logo) || (r == null ? void 0 : r.main_logo) || "" : (r == null ? void 0 : r.main_logo) || "", z = a || (g ? Ge : Ee), x = s || fe(
995
+ var M, N, B, C, I, H, h, j, D, k, F, A, R, U, Y, J, L, X, S, Z, oe, K, P, ee, E;
996
+ const { t: m } = ue(), O = te(), u = Ke(), r = ((M = t.branding) == null ? void 0 : M.colors) || null, i = (N = t.branding) == null ? void 0 : N.images, $ = O ? (i == null ? void 0 : i.mobile_background_image) || (i == null ? void 0 : i.background_image) || "" : (i == null ? void 0 : i.background_image) || "", a = O ? (i == null ? void 0 : i.mobile_logo) || (i == null ? void 0 : i.main_logo) || "" : (i == null ? void 0 : i.main_logo) || "", _ = b || (O ? qe : Qe), W = ye(
1472
997
  {
1473
- images: e.images,
1474
- imagePlaceholder: z
998
+ images: t.images,
999
+ imagePlaceholder: _
1475
1000
  },
1476
- pe.OVERLAY
1477
- ), b = o.colorSchemes.dark.textColor, p = (i == null ? void 0 : i.content_color) || b, l = (i == null ? void 0 : i.primary_color) || ((H = (T = (D = (_ = o.colorSchemes) == null ? void 0 : _.light) == null ? void 0 : D.palette) == null ? void 0 : T.primary) == null ? void 0 : H.plainColor), m = (i == null ? void 0 : i.secondary_color) || ((R = (F = (X = (y = o.colorSchemes) == null ? void 0 : y.light) == null ? void 0 : X.palette) == null ? void 0 : F.danger) == null ? void 0 : R.plainColor), O = (U = (P = (W = ($ = o.colorSchemes) == null ? void 0 : $.light) == null ? void 0 : W.palette) == null ? void 0 : P.primary) == null ? void 0 : U.onPrimary, v = (i == null ? void 0 : i.background_color) || ((A = (j = o.colorSchemes) == null ? void 0 : j.dark) == null ? void 0 : A.surfaceVariant), u = (te = (ee = (S = (I = o.colorSchemes) == null ? void 0 : I.light) == null ? void 0 : S.palette) == null ? void 0 : ee.danger) == null ? void 0 : te.plainColor, C = o.customFontFamily.dark.primary, G = o.customRadius.dark.md, L = (E = (Y = o.customRadius) == null ? void 0 : Y.light) == null ? void 0 : E.xl, f = Ne({
1478
- spacingScale: h,
1479
- mdBorderRadius: G,
1480
- contentBgColor: v,
1481
- buttonRadius: L,
1482
- primaryColor: l,
1483
- onPrimaryColor: O,
1484
- fontFamilyPrimary: C,
1485
- darkTextColor: b,
1486
- isMobile: g,
1487
- textColor: p
1488
- });
1489
- return /* @__PURE__ */ w(
1490
- Ie,
1001
+ ve.OVERLAY
1002
+ ), g = $ || W, y = u.colorSchemes.dark.textColor, f = (r == null ? void 0 : r.content_color) || y, c = (r == null ? void 0 : r.primary_color) || ((H = (I = (C = (B = u.colorSchemes) == null ? void 0 : B.light) == null ? void 0 : C.palette) == null ? void 0 : I.primary) == null ? void 0 : H.plainColor), z = (r == null ? void 0 : r.secondary_color) || ((k = (D = (j = (h = u.colorSchemes) == null ? void 0 : h.light) == null ? void 0 : j.palette) == null ? void 0 : D.danger) == null ? void 0 : k.plainColor), w = (U = (R = (A = (F = u.colorSchemes) == null ? void 0 : F.light) == null ? void 0 : A.palette) == null ? void 0 : R.primary) == null ? void 0 : U.onPrimary, T = (r == null ? void 0 : r.background_color) || ((J = (Y = u.colorSchemes) == null ? void 0 : Y.dark) == null ? void 0 : J.surfaceVariant), V = (Z = (S = (X = (L = u.colorSchemes) == null ? void 0 : L.light) == null ? void 0 : X.palette) == null ? void 0 : S.danger) == null ? void 0 : Z.plainColor, x = u.customRadius.dark.md;
1003
+ return /* @__PURE__ */ v(
1004
+ et,
1491
1005
  {
1492
1006
  entity: {
1493
- ...e,
1007
+ ...t,
1494
1008
  type: "chance-game",
1495
- description: e.subtitle || "",
1009
+ description: t.subtitle || "",
1496
1010
  rules: null
1497
1011
  },
1498
- headline: n("chanceGame.headlinePrizeWheel"),
1499
- finalImage: x,
1012
+ headline: m("chanceGame.headlinePrizeWheel"),
1013
+ finalImage: g,
1500
1014
  children: [
1501
- /* @__PURE__ */ t(d, { sx: f.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
1502
- Me,
1015
+ /* @__PURE__ */ o(
1016
+ "div",
1503
1017
  {
1504
- infoPage: e,
1505
- enableReset: c,
1506
- contentColor: p,
1507
- primaryColor: l,
1508
- secondaryColor: m,
1509
- onPrimaryColor: O || "#FFFFFF",
1510
- backgroundColor: v,
1511
- dangerColor: u,
1512
- shimmerColor: l,
1513
- brandingLogo: k,
1514
- isDark: !0,
1515
- showTitleBlock: !1,
1516
- variant: "overlay"
1018
+ css: lt,
1019
+ style: {
1020
+ "--fu-ucrc-cg-backdrop-radius": x,
1021
+ "--fu-ucrc-cg-backdrop-bg": T
1022
+ },
1023
+ children: /* @__PURE__ */ o(
1024
+ ct,
1025
+ {
1026
+ infoPage: t,
1027
+ enableReset: s,
1028
+ contentColor: f,
1029
+ primaryColor: c,
1030
+ secondaryColor: z,
1031
+ onPrimaryColor: w || "#FFFFFF",
1032
+ backgroundColor: T,
1033
+ dangerColor: V,
1034
+ shimmerColor: c,
1035
+ brandingLogo: a,
1036
+ isDark: !0,
1037
+ showTitleBlock: !1,
1038
+ variant: "overlay"
1039
+ }
1040
+ )
1517
1041
  }
1518
- ) }),
1519
- /* @__PURE__ */ t(
1520
- Ot,
1042
+ ),
1043
+ /* @__PURE__ */ o(
1044
+ Vt,
1521
1045
  {
1522
- brandingLogo: k,
1523
- textColor: b,
1524
- label: ((q = e.labels) == null ? void 0 : q.sponsor) || null,
1525
- primaryUrl: (Q = (M = e.branding) == null ? void 0 : M.urls) == null ? void 0 : Q.primary_url,
1526
- secondaryUrl: (ce = (oe = e.branding) == null ? void 0 : oe.urls) == null ? void 0 : ce.secondary_url
1046
+ brandingLogo: a,
1047
+ textColor: y,
1048
+ label: ((oe = t.labels) == null ? void 0 : oe.sponsor) || null,
1049
+ primaryUrl: (P = (K = t.branding) == null ? void 0 : K.urls) == null ? void 0 : P.primary_url,
1050
+ secondaryUrl: (E = (ee = t.branding) == null ? void 0 : ee.urls) == null ? void 0 : E.secondary_url
1527
1051
  }
1528
1052
  )
1529
1053
  ]
1530
1054
  }
1531
1055
  );
1532
- }, Bt = (e) => {
1533
- const { infoPage: c } = Ze(e.entityId, "chance-game", e.sdk), a = () => {
1534
- if (c && c.id !== "not-found") {
1535
- const o = Object.keys(ot);
1536
- if (c.language && o.includes(c.language))
1537
- return c.language;
1538
- if (c.language)
1056
+ }, Ht = (t) => {
1057
+ const { infoPage: s } = gt(t.entityId, "chance-game", t.sdk), b = () => {
1058
+ if (s && s.id !== "not-found") {
1059
+ const u = Object.keys(bt);
1060
+ if (s.language && u.includes(s.language))
1061
+ return s.language;
1062
+ if (s.language)
1539
1063
  return "en";
1540
1064
  }
1541
- return e.language || "en";
1542
- }, [n, g] = dt(!1);
1543
- if (mt(() => {
1544
- const o = a();
1545
- et(o).then(() => g(!0));
1546
- }, [e.language, c]), !c || !n)
1547
- return /* @__PURE__ */ t(tt, { my: 20 });
1548
- if (c.id === "not-found")
1549
- return /* @__PURE__ */ t(zt, { template: e.template });
1550
- if (e.template === he.STANDARD) {
1551
- const o = e.imagePosition, h = e.defaultImagePlaceholderUrl;
1552
- return e.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ t(be, { infoPage: c }) : e.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ t(
1553
- Wt,
1065
+ return t.language || "en";
1066
+ }, [m, O] = yt(!1);
1067
+ if (vt(() => {
1068
+ const u = b();
1069
+ ft(u).then(() => O(!0));
1070
+ }, [t.language, s]), !s || !m)
1071
+ return /* @__PURE__ */ o(St, { marginBlock: "160px" });
1072
+ if (s.id === "not-found")
1073
+ return /* @__PURE__ */ o(It, { template: t.template });
1074
+ if (t.template === xe.STANDARD) {
1075
+ const u = t.imagePosition, r = t.defaultImagePlaceholderUrl;
1076
+ return t.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ o(Se, { infoPage: s }) : t.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ o(
1077
+ Pt,
1554
1078
  {
1555
- infoPage: c,
1556
- imagePosition: o,
1557
- defaultImagePlaceholderUrl: h
1079
+ infoPage: s,
1080
+ imagePosition: u,
1081
+ defaultImagePlaceholderUrl: r
1558
1082
  }
1559
- ) : /* @__PURE__ */ t(
1560
- Ft,
1083
+ ) : /* @__PURE__ */ o(
1084
+ Xt,
1561
1085
  {
1562
- infoPage: c,
1563
- imagePosition: o,
1564
- defaultImagePlaceholderUrl: h
1086
+ infoPage: s,
1087
+ imagePosition: u,
1088
+ defaultImagePlaceholderUrl: r
1565
1089
  }
1566
1090
  );
1567
1091
  }
1568
- if (e.template === he.OVERLAY) {
1569
- const o = e.defaultImagePlaceholderUrl;
1570
- return e.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ t(be, { infoPage: c }) : e.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ t(
1571
- _t,
1092
+ if (t.template === xe.OVERLAY) {
1093
+ const u = t.defaultImagePlaceholderUrl;
1094
+ return t.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ o(Se, { infoPage: s }) : t.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ o(
1095
+ Et,
1572
1096
  {
1573
- infoPage: c,
1574
- defaultImagePlaceholderUrl: o
1097
+ infoPage: s,
1098
+ defaultImagePlaceholderUrl: u
1575
1099
  }
1576
- ) : /* @__PURE__ */ t(
1577
- Dt,
1100
+ ) : /* @__PURE__ */ o(
1101
+ Nt,
1578
1102
  {
1579
- infoPage: c,
1580
- defaultImagePlaceholderUrl: o
1103
+ infoPage: s,
1104
+ defaultImagePlaceholderUrl: u
1581
1105
  }
1582
1106
  );
1583
1107
  }
1584
- return e.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ t(be, { infoPage: c }) : e.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ t(vt, { infoPage: c }) : /* @__PURE__ */ t(St, { infoPage: c });
1585
- }, Ct = (e) => {
1586
- const [c, a] = Z.useState(!1), n = nt(e.language), g = Z.useRef(
1587
- `chance-game-shadow-root-${Math.random().toString(36).substring(2, 11)}`
1588
- ), o = Z.useRef(null), h = Z.useRef(null), i = Z.useRef(null), [r, s] = Z.useState(null);
1589
- Z.useEffect(() => {
1590
- if (!o.current) return;
1591
- o.current.shadowRoot ? (h.current = o.current.shadowRoot, i.current = h.current.getElementById(
1592
- g.current
1593
- ), i.current || (i.current = document.createElement("div"), i.current.id = g.current, h.current.appendChild(i.current))) : (h.current = o.current.attachShadow({ mode: "open" }), i.current = document.createElement("div"), i.current.id = g.current, h.current.appendChild(i.current)), rt(i.current, n);
1594
- const p = it("chance-game", n);
1595
- return s(
1596
- (l) => (l == null ? void 0 : l.key) === p ? l : lt(
1597
- "chance-game",
1598
- h.current,
1599
- n
1600
- )
1601
- ), a(!0), () => {
1602
- a(!1);
1603
- };
1604
- }, [n]);
1605
- const k = e.themeOptions, z = {
1606
- ...k,
1607
- mode: e.template === he.OVERLAY ? "dark" : k == null ? void 0 : k.mode
1608
- }, x = /* @__PURE__ */ t(d, { ref: o, lang: e.language || "en" }), b = c && o.current && i.current && r ? kt(
1609
- // Keyed on the cache, not on `direction`: it must change in the same
1610
- // render that adopts the new cache, or CssVarsProvider writes its CSS
1611
- // variables into the outgoing cache and never repeats.
1612
- /* @__PURE__ */ t(wt, { value: r, children: /* @__PURE__ */ t(at, { containerRef: o, children: /* @__PURE__ */ t(
1613
- st,
1614
- {
1615
- customTheme: z,
1616
- mode: z == null ? void 0 : z.mode,
1617
- shadowRootElement: i.current,
1618
- direction: n,
1619
- children: /* @__PURE__ */ t(
1620
- ct,
1621
- {
1622
- shadowRootElement: i.current,
1623
- leadPhoneCountryCode: null,
1624
- language: null,
1625
- optionsLayout: null,
1626
- direction: n,
1627
- disableCache: e.disableCache ?? !1,
1628
- children: e.children
1629
- }
1630
- )
1631
- }
1632
- ) }) }, r.key),
1633
- i.current
1634
- ) : null;
1635
- return /* @__PURE__ */ w(re, { children: [
1636
- x,
1637
- b
1638
- ] });
1639
- }, Tt = (e) => /* @__PURE__ */ t(Ct, { ...e, children: /* @__PURE__ */ t(Bt, { ...e }) }), Nt = Rt(Tt);
1108
+ return t.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ o(Se, { infoPage: s }) : t.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ o(Ct, { infoPage: s }) : /* @__PURE__ */ o(Dt, { infoPage: s });
1109
+ }, jt = (t) => {
1110
+ const s = xt.useMemo(
1111
+ () => t.template === xe.OVERLAY ? { ...t.themeOptions, mode: "dark" } : t.themeOptions,
1112
+ [t.template, t.themeOptions]
1113
+ );
1114
+ return /* @__PURE__ */ o(
1115
+ Ot,
1116
+ {
1117
+ packageName: "chance-game",
1118
+ language: t.language,
1119
+ themeOptions: s,
1120
+ disableCache: t.disableCache,
1121
+ children: t.children
1122
+ }
1123
+ );
1124
+ }, Ut = (t) => /* @__PURE__ */ o(jt, { ...t, children: /* @__PURE__ */ o(Ht, { ...t }) }), oo = Tt(Ut);
1640
1125
  export {
1641
- Nt as ChanceGame
1126
+ oo as ChanceGame
1642
1127
  };