fansunited-frontend-components 0.0.92 → 0.0.94
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 +1 -1
- package/ChanceGame.js +139 -146
- package/ClassicQuizPlay.js +1 -1
- package/CollectLead.js +14 -20
- package/CompetitionStatistics.js +27 -27
- package/CompetitorCard.js +895 -891
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1 -1
- package/EventCard.js +1494 -1571
- package/EventGamePlay.js +1 -1
- package/Leaderboard.js +249 -257
- package/List.js +319 -436
- package/MatchQuizPlay.js +1 -1
- package/Odds.js +30 -30
- package/PersonalityQuizPlay.js +1 -1
- package/PickThePair.js +627 -693
- package/PlayerOfTheMatch.js +256 -279
- package/PollVote.js +1 -1
- package/Predictor.js +19443 -2
- package/README.md +2 -1
- package/Standings.js +94 -99
- package/TopX.js +5871 -6988
- package/chunks/ChanceGameEmbedVariant-C3NGwvTF.js +21 -0
- package/chunks/OddsSkeleton-Bav8FHHN.js +26 -0
- package/chunks/{OddsStrip-B159Nivm.js → OddsStrip-CviVfQI4.js} +51 -53
- package/chunks/{PickOneOfX-D9qlxKTD.js → PickOneOfX-a6Dv0-rR.js} +210 -212
- package/chunks/index-B1d9q8fX.js +4 -0
- package/chunks/index-BP0pvFJ4.js +4 -0
- package/chunks/index-CHZyL_g_.js +4 -0
- package/chunks/index-CeCUdRmF.js +4 -0
- package/chunks/index-Ckyyw-I8.js +4 -0
- package/chunks/index-DGvCP5G8.js +4 -0
- package/chunks/index-yjMVOgwO.js +4 -0
- package/chunks/{main-CcPVuc5G.js → main-CFwRpvUi.js} +219 -238
- package/chunks/{main-By2Fg4Us.js → main-D9tFZv2q.js} +272 -309
- package/chunks/{main-Db4YC1C9.js → main-Dj4Manb5.js} +386 -407
- package/chunks/{main-BhONg691.js → main-DjiQz1dv.js} +764 -1125
- package/chunks/{main-BoLNJccN.js → main-Dys2_Jt2.js} +1625 -1954
- package/chunks/{main-JAewg2VD.js → main-dwV_55lz.js} +409 -432
- package/chunks/main-eAQMCxQ7.js +1949 -0
- package/chunks/{main-CWfREbUv.js → main-gexg6lc-.js} +959 -977
- package/index.js +40 -44
- package/package.json +13 -5
- package/chunks/AccessTime-B7Q_InTi.js +0 -10
- package/chunks/AlertMessage-CTbc9daZ.js +0 -318
- package/chunks/Avatar-Ve0m4ut_.js +0 -353
- package/chunks/Button-x1sQVMH2.js +0 -665
- package/chunks/Card-DfxnA3Cz.js +0 -196
- package/chunks/CardActions-TMBAbk8a.js +0 -140
- package/chunks/CardContent-CLQHztIU.js +0 -106
- package/chunks/ChanceGameEmbedVariant-C3TKbPI4.js +0 -913
- package/chunks/CheckCircle-DW1VzjQO.js +0 -8
- package/chunks/Chip-BUoNpinI.js +0 -365
- package/chunks/CircularProgress-D88LgW2V.js +0 -317
- package/chunks/Close-BxLZcPtb.js +0 -9
- package/chunks/Close-DVx6f5-e.js +0 -8
- package/chunks/CollectLeadForm-DtUFKk99.js +0 -3419
- package/chunks/ConsentsList-BcIMKviP.js +0 -339
- package/chunks/DirectionScope-CK0duYt8.js +0 -36
- package/chunks/Divider-D_ALv2uC.js +0 -166
- package/chunks/Edit-CiKqhDom.js +0 -99
- package/chunks/EmojiEvents-BYoxruEl.js +0 -8
- package/chunks/FavoriteBorder-YhT6RHv5.js +0 -11
- package/chunks/FormControl-BNG04EhC.js +0 -656
- package/chunks/FormControlContext-Ct0huDDM.js +0 -6
- package/chunks/FormLabel-Bl7hTa8O.js +0 -130
- package/chunks/GlobalStyles-PokSS9bO.js +0 -12
- package/chunks/InlineSpinner-BhKW6lxZ.js +0 -28
- package/chunks/Input-B7kPqO0b.js +0 -391
- package/chunks/KeyboardArrowDown-OGGGLEnE.js +0 -8
- package/chunks/KeyboardArrowRight-DN7qrp17.js +0 -11
- package/chunks/KeyboardArrowUp-jvN5m_A0.js +0 -8
- package/chunks/Link-brb09X-6.js +0 -319
- package/chunks/ListItemButton-BFG5QJbo.js +0 -1151
- package/chunks/ModalClose-D3i-AyMB.js +0 -153
- package/chunks/ModalDialog-Be6w76fh.js +0 -880
- package/chunks/NotFoundSkeleton-BHRVG8yg.js +0 -83
- package/chunks/Notification-CC66HKXb.js +0 -614
- package/chunks/OddsSkeleton-BBOVhfsn.js +0 -137
- package/chunks/OverlayScoreStateSkeleton-D5rnBJ_w.js +0 -154
- package/chunks/OverlayScoreStateWrapperSkeleton-CTXzD0bm.js +0 -81
- package/chunks/OverlaySignInSkeleton-T8A_9Tco.js +0 -518
- package/chunks/OverlaySkeleton-y02LRXZy.js +0 -1193
- package/chunks/Person-BD-IO4aX.js +0 -8
- package/chunks/PersonOutline-Nxl_9g9S.js +0 -8
- package/chunks/Popper-CGfJHTbM.js +0 -1263
- package/chunks/Portal-DQQSLiON.js +0 -74
- package/chunks/Portal-X8O64KaQ.js +0 -66
- package/chunks/Predictor-BJBBwZ6R.js +0 -19513
- package/chunks/PrizeCard-B2tBhY45.js +0 -36400
- package/chunks/Search-jaDXe8g7.js +0 -14
- package/chunks/Select-CzBMHr7z.js +0 -1165
- package/chunks/Sheet-x-YGYOYz.js +0 -132
- package/chunks/SignInCta-3NFxIOuf.js +0 -79
- package/chunks/Spinner-_5U881sC.js +0 -39
- package/chunks/SportsSoccer-DLUgspA-.js +0 -20
- package/chunks/Stack-CDpKA1D-.js +0 -169
- package/chunks/StandardContentSkeleton-DaZftDxZ.js +0 -57
- package/chunks/Table-IJ9-D2DF.js +0 -394
- package/chunks/Tabs-iyOvjGfd.js +0 -1084
- package/chunks/Textarea-Dv_Z4l5j.js +0 -475
- package/chunks/TimerOutlined-jNsK__Zz.js +0 -8
- package/chunks/Tooltip-clSjN1oC.js +0 -535
- package/chunks/Typography-BsucZNXl.js +0 -775
- package/chunks/areArraysEqual-B3mXtHvh.js +0 -6
- package/chunks/colorInversionUtils-AoR_6ghW.js +0 -347
- package/chunks/createSvgIcon-BWoHeNkc.js +0 -2813
- package/chunks/createSvgIcon-DBkOhFdn.js +0 -206
- package/chunks/dividerClasses-BkQMLbsL.js +0 -9
- package/chunks/elementAcceptingRef-DjUfkpLB.js +0 -25
- package/chunks/enums-B1lTCQvC.js +0 -15
- package/chunks/formLabelClasses-N0g8NZ67.js +0 -9
- package/chunks/getReactElementRef-B3MFPBbS.js +0 -21
- package/chunks/helpers-CKFwVhwj.js +0 -558
- package/chunks/index-Bg5jypgn.js +0 -11
- package/chunks/index-Bnad45hB.js +0 -4
- package/chunks/index-C6rtfeRX.js +0 -4
- package/chunks/index-CFc0WTOi.js +0 -848
- package/chunks/index-C_kf8WZI.js +0 -4
- package/chunks/index-CaVpDbdC.js +0 -4
- package/chunks/index-DJJVbXn_.js +0 -4
- package/chunks/index-DQO7VDRC.js +0 -4
- package/chunks/index-Kgehqf8J.js +0 -4
- package/chunks/main-W_W6YBtr.js +0 -3280
- package/chunks/ownerWindow-PI509BpA.js +0 -7
- package/chunks/searchEntities-SJcoznz0.js +0 -38
- package/chunks/sportsEvents-CGX-WkNB.js +0 -27
- package/chunks/useButton-C9taTgFS.js +0 -106
- package/chunks/useConsents-BLhgfEDf.js +0 -1168
- package/chunks/useControlled-BYdyS7Pn.js +0 -31
- package/chunks/useEmbedCode-DCWnWGak.js +0 -31
- package/chunks/useEventCallback-C9W0M_8l.js +0 -14
- package/chunks/useForwardedInput-CkAnayh_.js +0 -180
- package/chunks/useImageVariant-B62O7iLC.js +0 -15
- package/chunks/useInfoPage-BHdgKdme.js +0 -50
- package/chunks/useParticipationDraft-Brnd_p3w.js +0 -307
- package/chunks/useSwitch-DLSSqtcZ.js +0 -66
- package/chunks/variantColorInheritance-DZr7CNx6.js +0 -30
- package/chunks/visuallyHidden-B8J7BVSJ.js +0 -14
package/List.js
CHANGED
|
@@ -1,135 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "react-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { C as bt } from "./chunks/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { W as Ut } from "./chunks/enums-B1lTCQvC.js";
|
|
15
|
-
import { M as Lt, a as Rt } from "./chunks/ModalDialog-Be6w76fh.js";
|
|
16
|
-
import { M as _t } from "./chunks/ModalClose-D3i-AyMB.js";
|
|
17
|
-
import { D as k } from "./chunks/DirectionScope-CK0duYt8.js";
|
|
18
|
-
import { I as G, B as ot } from "./chunks/Button-x1sQVMH2.js";
|
|
19
|
-
import { C as Ft, a as Ot } from "./chunks/chevrons-right-CXSpQt9w.js";
|
|
20
|
-
import { C as zt } from "./chunks/chevron-left-CxfCSZcr.js";
|
|
21
|
-
import { C as At } from "./chunks/chevron-right-BEQMacFn.js";
|
|
22
|
-
function Nt(e) {
|
|
23
|
-
return dt("MuiCardCover", e);
|
|
24
|
-
}
|
|
25
|
-
lt("MuiCardCover", ["root"]);
|
|
26
|
-
const Bt = ["className", "component", "children", "slots", "slotProps"], Qt = () => Pt({
|
|
27
|
-
root: ["root"]
|
|
28
|
-
}, Nt, {}), jt = St("div", {
|
|
29
|
-
name: "JoyCardCover",
|
|
30
|
-
slot: "Root",
|
|
31
|
-
overridesResolver: (e, n) => n.root
|
|
32
|
-
})({
|
|
33
|
-
position: "absolute",
|
|
34
|
-
zIndex: 0,
|
|
35
|
-
top: 0,
|
|
36
|
-
left: 0,
|
|
37
|
-
right: 0,
|
|
38
|
-
bottom: 0,
|
|
39
|
-
borderRadius: "var(--CardCover-radius)",
|
|
40
|
-
// use data-attribute instead of :first-child to support zero config SSR (emotion)
|
|
41
|
-
// use nested selector for integrating with nextjs image `fill` layout (spans are inserted on top of the img)
|
|
42
|
-
"& [data-first-child]": {
|
|
43
|
-
display: "flex",
|
|
44
|
-
justifyContent: "center",
|
|
45
|
-
alignItems: "center",
|
|
46
|
-
width: "100%",
|
|
47
|
-
height: "100%",
|
|
48
|
-
objectFit: "cover",
|
|
49
|
-
boxSizing: "border-box",
|
|
50
|
-
borderRadius: "var(--CardCover-radius)",
|
|
51
|
-
margin: 0,
|
|
52
|
-
padding: 0,
|
|
53
|
-
"& > img": {
|
|
54
|
-
// support art-direction that uses <picture><img /></picture>
|
|
55
|
-
width: "100%",
|
|
56
|
-
height: "100%",
|
|
57
|
-
objectFit: "cover"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}), q = /* @__PURE__ */ D.forwardRef(function(n, t) {
|
|
61
|
-
const d = wt({
|
|
62
|
-
props: n,
|
|
63
|
-
name: "JoyCardCover"
|
|
64
|
-
}), {
|
|
65
|
-
className: l,
|
|
66
|
-
component: a = "div",
|
|
67
|
-
children: r,
|
|
68
|
-
slots: c = {},
|
|
69
|
-
slotProps: C = {}
|
|
70
|
-
} = d, s = pt(d, Bt), E = $({}, d, {
|
|
71
|
-
component: a
|
|
72
|
-
}), M = Qt(), N = $({}, s, {
|
|
73
|
-
component: a,
|
|
74
|
-
slots: c,
|
|
75
|
-
slotProps: C
|
|
76
|
-
}), [U, F] = Tt("root", {
|
|
77
|
-
ref: t,
|
|
78
|
-
className: mt(M.root, l),
|
|
79
|
-
elementType: jt,
|
|
80
|
-
externalForwardedProps: N,
|
|
81
|
-
ownerState: E
|
|
82
|
-
});
|
|
83
|
-
return /* @__PURE__ */ o(U, $({}, F, {
|
|
84
|
-
children: D.Children.map(r, (I, S) => S === 0 && /* @__PURE__ */ D.isValidElement(I) ? /* @__PURE__ */ D.cloneElement(I, {
|
|
85
|
-
"data-first-child": ""
|
|
86
|
-
}) : I)
|
|
87
|
-
}));
|
|
88
|
-
});
|
|
89
|
-
process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
90
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
91
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
92
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
93
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
94
|
-
/**
|
|
95
|
-
* Used to render icon or text elements inside the CardCover if `src` is not set.
|
|
96
|
-
* This can be an element, or just a string.
|
|
97
|
-
*/
|
|
98
|
-
children: g.node,
|
|
99
|
-
/**
|
|
100
|
-
* @ignore
|
|
101
|
-
*/
|
|
102
|
-
className: g.string,
|
|
103
|
-
/**
|
|
104
|
-
* The component used for the root node.
|
|
105
|
-
* Either a string to use a HTML element or a component.
|
|
106
|
-
*/
|
|
107
|
-
component: g.elementType,
|
|
108
|
-
/**
|
|
109
|
-
* The props used for each slot inside.
|
|
110
|
-
* @default {}
|
|
111
|
-
*/
|
|
112
|
-
slotProps: g.shape({
|
|
113
|
-
root: g.oneOfType([g.func, g.object])
|
|
114
|
-
}),
|
|
115
|
-
/**
|
|
116
|
-
* The components used for each slot inside.
|
|
117
|
-
* @default {}
|
|
118
|
-
*/
|
|
119
|
-
slots: g.shape({
|
|
120
|
-
root: g.elementType
|
|
121
|
-
}),
|
|
122
|
-
/**
|
|
123
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
124
|
-
*/
|
|
125
|
-
sx: g.oneOfType([g.arrayOf(g.oneOfType([g.func, g.object, g.bool])), g.func, g.object])
|
|
126
|
-
});
|
|
127
|
-
const rt = (e) => {
|
|
128
|
-
const n = e.entityModel;
|
|
129
|
-
if (!n) return null;
|
|
130
|
-
switch (e.entityType) {
|
|
1
|
+
import { jsxs as T, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useColors as rt, useFontFamily as it, useCornerRadius as st, useSpacingScale as at, isMobile as X, defaultBg as ct, useConstantContext as lt, ConstantsContext as dt, WidgetTemplate as pt, Spinner as J, DirectionalIcon as k, Portal as ut } from "fansunited-frontend-core";
|
|
3
|
+
import { Card as gt, CardCover as $, CardContent as ht, Box as y, Chip as ft, Typography as V, Modal as mt, ModalDialog as yt, ModalClose as xt, IconButton as D, Button as tt } from "@mui/joy";
|
|
4
|
+
import { useState as F, useRef as _, useCallback as W, useEffect as Ct, lazy as H, Suspense as It } from "react";
|
|
5
|
+
import { useTranslation as G } from "react-i18next";
|
|
6
|
+
import { U as St } from "./chunks/users-wbJRbqW8.js";
|
|
7
|
+
import { C as wt, a as Tt } from "./chunks/chevrons-right-CXSpQt9w.js";
|
|
8
|
+
import { C as Pt } from "./chunks/chevron-left-CxfCSZcr.js";
|
|
9
|
+
import { C as bt } from "./chunks/chevron-right-BEQMacFn.js";
|
|
10
|
+
const nt = (n) => {
|
|
11
|
+
const e = n.entityModel;
|
|
12
|
+
if (!e) return null;
|
|
13
|
+
switch (n.entityType) {
|
|
131
14
|
case "CLASSIC_QUIZ": {
|
|
132
|
-
const t =
|
|
15
|
+
const t = e;
|
|
133
16
|
return {
|
|
134
17
|
title: t.title,
|
|
135
18
|
images: t.images,
|
|
@@ -139,7 +22,7 @@ const rt = (e) => {
|
|
|
139
22
|
};
|
|
140
23
|
}
|
|
141
24
|
case "PERSONALITY_QUIZ": {
|
|
142
|
-
const t =
|
|
25
|
+
const t = e;
|
|
143
26
|
return {
|
|
144
27
|
title: t.title,
|
|
145
28
|
images: t.images,
|
|
@@ -149,7 +32,7 @@ const rt = (e) => {
|
|
|
149
32
|
};
|
|
150
33
|
}
|
|
151
34
|
case "POLL": {
|
|
152
|
-
const t =
|
|
35
|
+
const t = e;
|
|
153
36
|
return {
|
|
154
37
|
title: t.title,
|
|
155
38
|
images: t.images,
|
|
@@ -159,7 +42,7 @@ const rt = (e) => {
|
|
|
159
42
|
};
|
|
160
43
|
}
|
|
161
44
|
case "EITHER_OR": {
|
|
162
|
-
const t =
|
|
45
|
+
const t = e;
|
|
163
46
|
return {
|
|
164
47
|
title: t.title,
|
|
165
48
|
images: t.images,
|
|
@@ -169,7 +52,7 @@ const rt = (e) => {
|
|
|
169
52
|
};
|
|
170
53
|
}
|
|
171
54
|
case "MATCH_QUIZ": {
|
|
172
|
-
const t =
|
|
55
|
+
const t = e;
|
|
173
56
|
return {
|
|
174
57
|
title: t.title,
|
|
175
58
|
images: t.images,
|
|
@@ -179,7 +62,7 @@ const rt = (e) => {
|
|
|
179
62
|
};
|
|
180
63
|
}
|
|
181
64
|
case "CUSTOM_EVENT_GAME": {
|
|
182
|
-
const t =
|
|
65
|
+
const t = e;
|
|
183
66
|
return {
|
|
184
67
|
title: t.title,
|
|
185
68
|
images: t.images,
|
|
@@ -190,122 +73,122 @@ const rt = (e) => {
|
|
|
190
73
|
default:
|
|
191
74
|
return null;
|
|
192
75
|
}
|
|
193
|
-
},
|
|
76
|
+
}, Et = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), Lt = (n) => {
|
|
194
77
|
var t;
|
|
195
|
-
const
|
|
196
|
-
return !!(
|
|
197
|
-
},
|
|
198
|
-
const l =
|
|
199
|
-
async (
|
|
200
|
-
var
|
|
201
|
-
const
|
|
202
|
-
limit:
|
|
203
|
-
page:
|
|
204
|
-
}),
|
|
78
|
+
const e = (t = nt(n)) == null ? void 0 : t.status;
|
|
79
|
+
return !!(e && Et.has(e));
|
|
80
|
+
}, Mt = 50, Ut = 3, Rt = (n, e, t, u) => {
|
|
81
|
+
const l = u === "paged", a = u === "limited", [r, c] = F([]), [x, s] = F(!1), [M, z] = F(!1), [Z, A] = F(!l), [N, U] = F(1), [P, O] = F(1), I = _([]), R = _([]), v = _(/* @__PURE__ */ new Set()), C = _(1), b = _(!1), S = _(!1), d = _(null), g = _(0), i = W(
|
|
82
|
+
async (p, f) => {
|
|
83
|
+
var B;
|
|
84
|
+
const h = await n.lists.getListContent(e, {
|
|
85
|
+
limit: f,
|
|
86
|
+
page: p
|
|
87
|
+
}), m = (B = h.meta) == null ? void 0 : B.pagination, L = h.data ?? [];
|
|
205
88
|
return {
|
|
206
|
-
valid:
|
|
207
|
-
rawCount:
|
|
208
|
-
pageCount: (
|
|
89
|
+
valid: L.filter(Lt),
|
|
90
|
+
rawCount: L.length,
|
|
91
|
+
pageCount: (m == null ? void 0 : m.numberOfPages) ?? 1
|
|
209
92
|
};
|
|
210
93
|
},
|
|
211
|
-
[
|
|
212
|
-
),
|
|
213
|
-
if (
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
|
|
94
|
+
[n, e]
|
|
95
|
+
), E = W(async () => {
|
|
96
|
+
if (S.current || !n || !e) return;
|
|
97
|
+
const p = g.current, f = () => p !== g.current, h = a ? t - R.current.length : t;
|
|
98
|
+
if (h <= 0) {
|
|
99
|
+
A(!1);
|
|
217
100
|
return;
|
|
218
101
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
102
|
+
if (I.current.length < h && !b.current) {
|
|
103
|
+
S.current = !0, s(!0);
|
|
221
104
|
try {
|
|
222
|
-
let
|
|
223
|
-
for (;
|
|
105
|
+
let L = 0;
|
|
106
|
+
for (; I.current.length < h && !b.current && L < Ut; ) {
|
|
224
107
|
const {
|
|
225
|
-
valid:
|
|
226
|
-
rawCount:
|
|
227
|
-
pageCount:
|
|
228
|
-
} = await i(
|
|
229
|
-
if (
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
(
|
|
108
|
+
valid: B,
|
|
109
|
+
rawCount: et,
|
|
110
|
+
pageCount: ot
|
|
111
|
+
} = await i(C.current, Mt);
|
|
112
|
+
if (f()) return;
|
|
113
|
+
L += 1;
|
|
114
|
+
const K = B.filter(
|
|
115
|
+
(Y) => !v.current.has(Y.entityId)
|
|
233
116
|
);
|
|
234
|
-
|
|
117
|
+
K.forEach((Y) => v.current.add(Y.entityId)), I.current.push(...K), (et === 0 || C.current >= ot) && (b.current = !0), C.current += 1;
|
|
235
118
|
}
|
|
236
|
-
} catch (
|
|
237
|
-
if (
|
|
238
|
-
console.warn("Error fetching list content:",
|
|
119
|
+
} catch (L) {
|
|
120
|
+
if (f()) return;
|
|
121
|
+
console.warn("Error fetching list content:", L), z(!0);
|
|
239
122
|
return;
|
|
240
123
|
} finally {
|
|
241
|
-
|
|
124
|
+
f() || (S.current = !1, s(!1));
|
|
242
125
|
}
|
|
243
126
|
}
|
|
244
|
-
if (
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
!a && (
|
|
127
|
+
if (f()) return;
|
|
128
|
+
const m = [...R.current, ...I.current.splice(0, h)];
|
|
129
|
+
R.current = m, c(m), A(
|
|
130
|
+
!a && (I.current.length > 0 || !b.current)
|
|
248
131
|
);
|
|
249
|
-
}, [i, a, t,
|
|
250
|
-
(
|
|
251
|
-
const
|
|
252
|
-
c(
|
|
132
|
+
}, [i, a, t, e, n]), w = W(
|
|
133
|
+
(p, f) => {
|
|
134
|
+
const h = Math.max(1, Math.ceil(p.length / t)), m = Math.min(Math.max(f, 1), h);
|
|
135
|
+
c(p.slice((m - 1) * t, m * t)), O(h), U(m);
|
|
253
136
|
},
|
|
254
137
|
[t]
|
|
255
|
-
),
|
|
256
|
-
async (
|
|
257
|
-
if (
|
|
258
|
-
if (
|
|
259
|
-
|
|
138
|
+
), Q = W(
|
|
139
|
+
async (p) => {
|
|
140
|
+
if (p < 1) return;
|
|
141
|
+
if (d.current) {
|
|
142
|
+
w(d.current, p);
|
|
260
143
|
return;
|
|
261
144
|
}
|
|
262
|
-
if (
|
|
263
|
-
const
|
|
264
|
-
|
|
145
|
+
if (S.current || !n || !e) return;
|
|
146
|
+
const f = g.current, h = () => f !== g.current;
|
|
147
|
+
S.current = !0, s(!0);
|
|
265
148
|
try {
|
|
266
149
|
const {
|
|
267
|
-
valid:
|
|
268
|
-
rawCount:
|
|
269
|
-
pageCount:
|
|
270
|
-
} = await i(
|
|
271
|
-
if (
|
|
272
|
-
if (
|
|
273
|
-
|
|
150
|
+
valid: m,
|
|
151
|
+
rawCount: L,
|
|
152
|
+
pageCount: B
|
|
153
|
+
} = await i(p, t);
|
|
154
|
+
if (h()) return;
|
|
155
|
+
if (L > t) {
|
|
156
|
+
d.current = m, w(m, p);
|
|
274
157
|
return;
|
|
275
158
|
}
|
|
276
|
-
c(
|
|
277
|
-
} catch (
|
|
278
|
-
if (
|
|
279
|
-
console.warn("Error fetching list content:",
|
|
159
|
+
c(m), O(B), U(p);
|
|
160
|
+
} catch (m) {
|
|
161
|
+
if (h()) return;
|
|
162
|
+
console.warn("Error fetching list content:", m), z(!0);
|
|
280
163
|
} finally {
|
|
281
|
-
|
|
164
|
+
h() || (S.current = !1, s(!1));
|
|
282
165
|
}
|
|
283
166
|
},
|
|
284
|
-
[i, t,
|
|
167
|
+
[i, t, e, n, w]
|
|
285
168
|
);
|
|
286
|
-
return
|
|
287
|
-
|
|
288
|
-
}, [l,
|
|
169
|
+
return Ct(() => {
|
|
170
|
+
g.current += 1, S.current = !1, I.current = [], R.current = [], v.current = /* @__PURE__ */ new Set(), C.current = 1, b.current = !1, d.current = null, c([]), z(!1), A(!l), U(1), O(1), l ? Q(1) : E();
|
|
171
|
+
}, [l, Q, E]), {
|
|
289
172
|
items: r,
|
|
290
|
-
loading:
|
|
291
|
-
error:
|
|
292
|
-
hasMore:
|
|
293
|
-
loadMore:
|
|
294
|
-
page:
|
|
295
|
-
pageCount:
|
|
296
|
-
goToPage:
|
|
173
|
+
loading: x,
|
|
174
|
+
error: M,
|
|
175
|
+
hasMore: Z,
|
|
176
|
+
loadMore: E,
|
|
177
|
+
page: N,
|
|
178
|
+
pageCount: P,
|
|
179
|
+
goToPage: Q
|
|
297
180
|
};
|
|
298
|
-
},
|
|
299
|
-
const
|
|
181
|
+
}, j = () => {
|
|
182
|
+
const n = rt(), e = it(), t = st(), u = at();
|
|
300
183
|
return {
|
|
301
|
-
fonts:
|
|
302
|
-
spacing:
|
|
184
|
+
fonts: e,
|
|
185
|
+
spacing: u,
|
|
303
186
|
radius: t,
|
|
304
187
|
colors: {
|
|
305
|
-
surface:
|
|
306
|
-
text:
|
|
307
|
-
primary:
|
|
308
|
-
onPrimary:
|
|
188
|
+
surface: n.surface,
|
|
189
|
+
text: n.textPrimary,
|
|
190
|
+
primary: n.palette.primary.plainColor,
|
|
191
|
+
onPrimary: n.palette.primary.onPrimary
|
|
309
192
|
},
|
|
310
193
|
/** Fixed tones for content painted over the card's cover image. */
|
|
311
194
|
onImage: {
|
|
@@ -319,42 +202,42 @@ const rt = (e) => {
|
|
|
319
202
|
labelShadow: "0 1px 2px rgba(0,0,0,0.4)"
|
|
320
203
|
}
|
|
321
204
|
};
|
|
322
|
-
},
|
|
323
|
-
switch (
|
|
205
|
+
}, q = "{CONTENT_ID}", _t = (n, e) => {
|
|
206
|
+
switch (n) {
|
|
324
207
|
case "CLASSIC_QUIZ":
|
|
325
|
-
return
|
|
208
|
+
return e == null ? void 0 : e.classicQuizUrl;
|
|
326
209
|
case "PERSONALITY_QUIZ":
|
|
327
|
-
return
|
|
210
|
+
return e == null ? void 0 : e.personalityQuizUrl;
|
|
328
211
|
case "EITHER_OR":
|
|
329
|
-
return
|
|
212
|
+
return e == null ? void 0 : e.eitherOrUrl;
|
|
330
213
|
case "POLL":
|
|
331
|
-
return
|
|
214
|
+
return e == null ? void 0 : e.pollUrl;
|
|
332
215
|
case "MATCH_QUIZ":
|
|
333
|
-
return
|
|
216
|
+
return e == null ? void 0 : e.matchQuizUrl;
|
|
334
217
|
case "CUSTOM_EVENT_GAME":
|
|
335
|
-
return
|
|
218
|
+
return e == null ? void 0 : e.eventGameUrl;
|
|
336
219
|
default:
|
|
337
220
|
return;
|
|
338
221
|
}
|
|
339
|
-
},
|
|
340
|
-
const t =
|
|
341
|
-
return t ? t.includes(
|
|
342
|
-
},
|
|
343
|
-
const t =
|
|
344
|
-
return t ?
|
|
345
|
-
},
|
|
346
|
-
item:
|
|
347
|
-
entityData:
|
|
222
|
+
}, Ft = (n) => !!(n != null && n.classicQuizUrl || n != null && n.personalityQuizUrl || n != null && n.eitherOrUrl || n != null && n.pollUrl || n != null && n.matchQuizUrl || n != null && n.eventGameUrl), zt = (n, e) => {
|
|
223
|
+
const t = _t(n.entityType, e);
|
|
224
|
+
return t ? t.includes(q) ? t.replace(q, n.entityId) : t : null;
|
|
225
|
+
}, At = (n, e) => {
|
|
226
|
+
const t = n == null ? void 0 : n.images;
|
|
227
|
+
return t ? e ? t.mobileLogo || t.mainLogo || null : t.mainLogo || t.mobileLogo || null : null;
|
|
228
|
+
}, Ot = ({
|
|
229
|
+
item: n,
|
|
230
|
+
entityData: e,
|
|
348
231
|
typeLabel: t,
|
|
349
|
-
imagePlaceholder:
|
|
232
|
+
imagePlaceholder: u,
|
|
350
233
|
onClick: l
|
|
351
234
|
}) => {
|
|
352
|
-
var s,
|
|
353
|
-
const { t: a } =
|
|
354
|
-
return /* @__PURE__ */
|
|
355
|
-
|
|
235
|
+
var s, M;
|
|
236
|
+
const { t: a } = G(), r = j(), c = X(), x = At(e.branding, c);
|
|
237
|
+
return /* @__PURE__ */ T(
|
|
238
|
+
gt,
|
|
356
239
|
{
|
|
357
|
-
onClick: () => l(
|
|
240
|
+
onClick: () => l(n),
|
|
358
241
|
sx: {
|
|
359
242
|
fontSize: "1em",
|
|
360
243
|
fontFamily: r.fonts.secondary,
|
|
@@ -374,19 +257,19 @@ const rt = (e) => {
|
|
|
374
257
|
}
|
|
375
258
|
},
|
|
376
259
|
children: [
|
|
377
|
-
/* @__PURE__ */ o(
|
|
260
|
+
/* @__PURE__ */ o($, { children: /* @__PURE__ */ o(
|
|
378
261
|
"img",
|
|
379
262
|
{
|
|
380
|
-
src: ((s =
|
|
381
|
-
alt:
|
|
263
|
+
src: ((s = e.images) == null ? void 0 : s.cover) || ((M = e.images) == null ? void 0 : M.main) || u || ct,
|
|
264
|
+
alt: e.title,
|
|
382
265
|
loading: "lazy",
|
|
383
266
|
style: { transition: "transform 0.4s ease-out" }
|
|
384
267
|
}
|
|
385
268
|
) }),
|
|
386
|
-
/* @__PURE__ */ o(
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
269
|
+
/* @__PURE__ */ o($, { sx: { background: r.onImage.scrim } }),
|
|
270
|
+
/* @__PURE__ */ T(ht, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
|
|
271
|
+
/* @__PURE__ */ T(
|
|
272
|
+
y,
|
|
390
273
|
{
|
|
391
274
|
sx: {
|
|
392
275
|
display: "flex",
|
|
@@ -395,9 +278,9 @@ const rt = (e) => {
|
|
|
395
278
|
gap: r.spacing.md
|
|
396
279
|
},
|
|
397
280
|
children: [
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
|
|
281
|
+
/* @__PURE__ */ T(y, { children: [
|
|
282
|
+
/* @__PURE__ */ T(
|
|
283
|
+
y,
|
|
401
284
|
{
|
|
402
285
|
sx: {
|
|
403
286
|
display: "flex",
|
|
@@ -407,7 +290,7 @@ const rt = (e) => {
|
|
|
407
290
|
},
|
|
408
291
|
children: [
|
|
409
292
|
t && /* @__PURE__ */ o(
|
|
410
|
-
|
|
293
|
+
ft,
|
|
411
294
|
{
|
|
412
295
|
size: "sm",
|
|
413
296
|
color: "neutral",
|
|
@@ -420,23 +303,23 @@ const rt = (e) => {
|
|
|
420
303
|
children: t
|
|
421
304
|
}
|
|
422
305
|
),
|
|
423
|
-
!!
|
|
424
|
-
|
|
306
|
+
!!e.participationCount && /* @__PURE__ */ o(
|
|
307
|
+
V,
|
|
425
308
|
{
|
|
426
|
-
startDecorator: /* @__PURE__ */ o(
|
|
309
|
+
startDecorator: /* @__PURE__ */ o(St, { size: 16, color: r.onImage.text }),
|
|
427
310
|
sx: {
|
|
428
311
|
fontSize: "0.875em",
|
|
429
312
|
fontFamily: r.fonts.secondary,
|
|
430
313
|
color: r.onImage.text
|
|
431
314
|
},
|
|
432
|
-
children:
|
|
315
|
+
children: e.participationCount
|
|
433
316
|
}
|
|
434
317
|
)
|
|
435
318
|
]
|
|
436
319
|
}
|
|
437
320
|
),
|
|
438
321
|
/* @__PURE__ */ o(
|
|
439
|
-
|
|
322
|
+
V,
|
|
440
323
|
{
|
|
441
324
|
sx: {
|
|
442
325
|
fontSize: "1.5em",
|
|
@@ -450,12 +333,12 @@ const rt = (e) => {
|
|
|
450
333
|
unicodeBidi: "plaintext",
|
|
451
334
|
flex: 1
|
|
452
335
|
},
|
|
453
|
-
children:
|
|
336
|
+
children: e.title
|
|
454
337
|
}
|
|
455
338
|
)
|
|
456
339
|
] }),
|
|
457
|
-
|
|
458
|
-
|
|
340
|
+
x && !c && /* @__PURE__ */ T(
|
|
341
|
+
y,
|
|
459
342
|
{
|
|
460
343
|
sx: {
|
|
461
344
|
display: "flex",
|
|
@@ -467,7 +350,7 @@ const rt = (e) => {
|
|
|
467
350
|
},
|
|
468
351
|
children: [
|
|
469
352
|
/* @__PURE__ */ o(
|
|
470
|
-
|
|
353
|
+
V,
|
|
471
354
|
{
|
|
472
355
|
sx: {
|
|
473
356
|
fontSize: "0.7em",
|
|
@@ -480,7 +363,7 @@ const rt = (e) => {
|
|
|
480
363
|
}
|
|
481
364
|
),
|
|
482
365
|
/* @__PURE__ */ o(
|
|
483
|
-
|
|
366
|
+
y,
|
|
484
367
|
{
|
|
485
368
|
sx: {
|
|
486
369
|
"& img": {
|
|
@@ -489,7 +372,7 @@ const rt = (e) => {
|
|
|
489
372
|
maxWidth: "100%"
|
|
490
373
|
}
|
|
491
374
|
},
|
|
492
|
-
children: /* @__PURE__ */ o("img", { src:
|
|
375
|
+
children: /* @__PURE__ */ o("img", { src: x, alt: a("list.sponsoredBy") })
|
|
493
376
|
}
|
|
494
377
|
)
|
|
495
378
|
]
|
|
@@ -498,8 +381,8 @@ const rt = (e) => {
|
|
|
498
381
|
]
|
|
499
382
|
}
|
|
500
383
|
),
|
|
501
|
-
|
|
502
|
-
|
|
384
|
+
x && c && /* @__PURE__ */ T(
|
|
385
|
+
y,
|
|
503
386
|
{
|
|
504
387
|
sx: {
|
|
505
388
|
display: "flex",
|
|
@@ -513,7 +396,7 @@ const rt = (e) => {
|
|
|
513
396
|
},
|
|
514
397
|
children: [
|
|
515
398
|
/* @__PURE__ */ o(
|
|
516
|
-
|
|
399
|
+
V,
|
|
517
400
|
{
|
|
518
401
|
sx: {
|
|
519
402
|
fontSize: "0.7em",
|
|
@@ -524,7 +407,7 @@ const rt = (e) => {
|
|
|
524
407
|
}
|
|
525
408
|
),
|
|
526
409
|
/* @__PURE__ */ o(
|
|
527
|
-
|
|
410
|
+
y,
|
|
528
411
|
{
|
|
529
412
|
sx: {
|
|
530
413
|
height: "24px",
|
|
@@ -533,7 +416,7 @@ const rt = (e) => {
|
|
|
533
416
|
objectFit: "contain"
|
|
534
417
|
}
|
|
535
418
|
},
|
|
536
|
-
children: /* @__PURE__ */ o("img", { src:
|
|
419
|
+
children: /* @__PURE__ */ o("img", { src: x, alt: a("list.sponsoredBy") })
|
|
537
420
|
}
|
|
538
421
|
)
|
|
539
422
|
]
|
|
@@ -543,61 +426,61 @@ const rt = (e) => {
|
|
|
543
426
|
]
|
|
544
427
|
}
|
|
545
428
|
);
|
|
546
|
-
},
|
|
547
|
-
() => import("./chunks/index-
|
|
548
|
-
),
|
|
549
|
-
item:
|
|
550
|
-
open:
|
|
429
|
+
}, vt = H(() => import("./chunks/index-CHZyL_g_.js")), Qt = H(
|
|
430
|
+
() => import("./chunks/index-DGvCP5G8.js")
|
|
431
|
+
), Nt = H(() => import("./chunks/index-CeCUdRmF.js")), Bt = H(() => import("./chunks/index-BP0pvFJ4.js")), Ht = H(() => import("./chunks/index-B1d9q8fX.js")), Zt = H(() => import("./chunks/index-yjMVOgwO.js")), Vt = ({
|
|
432
|
+
item: n,
|
|
433
|
+
open: e,
|
|
551
434
|
onClose: t,
|
|
552
|
-
listProps:
|
|
435
|
+
listProps: u
|
|
553
436
|
}) => {
|
|
554
|
-
const { t: l } =
|
|
437
|
+
const { t: l } = G(), a = j(), { shadowRootElement: r } = lt(dt), {
|
|
555
438
|
sdk: c,
|
|
556
|
-
language:
|
|
439
|
+
language: x,
|
|
557
440
|
themeOptions: s,
|
|
558
|
-
userIsLoggedIn:
|
|
559
|
-
signInCTA:
|
|
560
|
-
additionalCTA:
|
|
561
|
-
shareCTA:
|
|
562
|
-
rulesDisplay:
|
|
563
|
-
leads:
|
|
564
|
-
consents:
|
|
565
|
-
chanceGameVariant:
|
|
566
|
-
showAnswerExplanations:
|
|
567
|
-
hideCorrectOption:
|
|
568
|
-
aggregateTranslatedVotes:
|
|
569
|
-
optionsLayout:
|
|
570
|
-
imagePosition:
|
|
571
|
-
defaultImagePlaceholderUrl:
|
|
572
|
-
matchQuiz:
|
|
573
|
-
eventGame:
|
|
441
|
+
userIsLoggedIn: M,
|
|
442
|
+
signInCTA: z,
|
|
443
|
+
additionalCTA: Z,
|
|
444
|
+
shareCTA: A,
|
|
445
|
+
rulesDisplay: N,
|
|
446
|
+
leads: U,
|
|
447
|
+
consents: P,
|
|
448
|
+
chanceGameVariant: O,
|
|
449
|
+
showAnswerExplanations: I,
|
|
450
|
+
hideCorrectOption: R,
|
|
451
|
+
aggregateTranslatedVotes: v,
|
|
452
|
+
optionsLayout: C,
|
|
453
|
+
imagePosition: b,
|
|
454
|
+
defaultImagePlaceholderUrl: S,
|
|
455
|
+
matchQuiz: d,
|
|
456
|
+
eventGame: g,
|
|
574
457
|
callbacks: i
|
|
575
|
-
} =
|
|
458
|
+
} = u, E = {
|
|
576
459
|
sdk: c,
|
|
577
|
-
language:
|
|
460
|
+
language: x,
|
|
578
461
|
themeOptions: s,
|
|
579
|
-
leads:
|
|
580
|
-
consents:
|
|
581
|
-
userIsLoggedIn:
|
|
582
|
-
signInCTA:
|
|
583
|
-
additionalCTA:
|
|
584
|
-
rulesDisplay:
|
|
585
|
-
defaultImagePlaceholderUrl:
|
|
586
|
-
template:
|
|
587
|
-
imagePosition:
|
|
588
|
-
},
|
|
589
|
-
if (!
|
|
590
|
-
switch (
|
|
462
|
+
leads: U,
|
|
463
|
+
consents: P,
|
|
464
|
+
userIsLoggedIn: M,
|
|
465
|
+
signInCTA: z,
|
|
466
|
+
additionalCTA: Z,
|
|
467
|
+
rulesDisplay: N,
|
|
468
|
+
defaultImagePlaceholderUrl: S,
|
|
469
|
+
template: pt.STANDARD,
|
|
470
|
+
imagePosition: b
|
|
471
|
+
}, w = { ...E, chanceGameVariant: O }, Q = () => {
|
|
472
|
+
if (!n) return null;
|
|
473
|
+
switch (n.entityType) {
|
|
591
474
|
case "CLASSIC_QUIZ":
|
|
592
475
|
return /* @__PURE__ */ o(
|
|
593
|
-
|
|
476
|
+
vt,
|
|
594
477
|
{
|
|
595
|
-
...
|
|
596
|
-
entityId:
|
|
597
|
-
shareCTA:
|
|
598
|
-
showAnswerExplanations:
|
|
599
|
-
hideCorrectOption:
|
|
600
|
-
optionsLayout:
|
|
478
|
+
...w,
|
|
479
|
+
entityId: n.entityId,
|
|
480
|
+
shareCTA: A,
|
|
481
|
+
showAnswerExplanations: I,
|
|
482
|
+
hideCorrectOption: R,
|
|
483
|
+
optionsLayout: C,
|
|
601
484
|
callbacks: {
|
|
602
485
|
onFinish: i == null ? void 0 : i.onFinish,
|
|
603
486
|
onShare: i == null ? void 0 : i.onShare
|
|
@@ -606,84 +489,84 @@ const rt = (e) => {
|
|
|
606
489
|
);
|
|
607
490
|
case "PERSONALITY_QUIZ":
|
|
608
491
|
return /* @__PURE__ */ o(
|
|
609
|
-
|
|
492
|
+
Qt,
|
|
610
493
|
{
|
|
611
|
-
...
|
|
612
|
-
entityId:
|
|
613
|
-
showAnswerExplanations:
|
|
614
|
-
optionsLayout:
|
|
494
|
+
...w,
|
|
495
|
+
entityId: n.entityId,
|
|
496
|
+
showAnswerExplanations: I,
|
|
497
|
+
optionsLayout: C,
|
|
615
498
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
616
499
|
}
|
|
617
500
|
);
|
|
618
501
|
case "POLL":
|
|
619
502
|
return /* @__PURE__ */ o(
|
|
620
|
-
|
|
503
|
+
Nt,
|
|
621
504
|
{
|
|
622
|
-
...
|
|
623
|
-
entityId:
|
|
624
|
-
optionsLayout:
|
|
625
|
-
aggregateTranslatedVotes:
|
|
505
|
+
...w,
|
|
506
|
+
entityId: n.entityId,
|
|
507
|
+
optionsLayout: C,
|
|
508
|
+
aggregateTranslatedVotes: v,
|
|
626
509
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
627
510
|
}
|
|
628
511
|
);
|
|
629
512
|
case "EITHER_OR":
|
|
630
513
|
return /* @__PURE__ */ o(
|
|
631
|
-
|
|
514
|
+
Bt,
|
|
632
515
|
{
|
|
633
|
-
...
|
|
634
|
-
entityId:
|
|
516
|
+
...E,
|
|
517
|
+
entityId: n.entityId,
|
|
635
518
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
636
519
|
}
|
|
637
520
|
);
|
|
638
521
|
case "MATCH_QUIZ":
|
|
639
522
|
return /* @__PURE__ */ o(
|
|
640
|
-
|
|
523
|
+
Ht,
|
|
641
524
|
{
|
|
642
|
-
...
|
|
643
|
-
entityId:
|
|
644
|
-
showPredictionDetails: (
|
|
645
|
-
showCountdown: (
|
|
646
|
-
showTeamLabels: (
|
|
647
|
-
showPoints: (
|
|
525
|
+
...w,
|
|
526
|
+
entityId: n.entityId,
|
|
527
|
+
showPredictionDetails: (d == null ? void 0 : d.showPredictionDetails) ?? !0,
|
|
528
|
+
showCountdown: (d == null ? void 0 : d.showCountdown) ?? !0,
|
|
529
|
+
showTeamLabels: (d == null ? void 0 : d.showTeamLabels) ?? !0,
|
|
530
|
+
showPoints: (d == null ? void 0 : d.showPoints) ?? !0,
|
|
648
531
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
649
532
|
}
|
|
650
533
|
);
|
|
651
534
|
case "CUSTOM_EVENT_GAME":
|
|
652
535
|
return /* @__PURE__ */ o(
|
|
653
|
-
|
|
536
|
+
Zt,
|
|
654
537
|
{
|
|
655
|
-
...
|
|
656
|
-
entityId:
|
|
657
|
-
optionsLayout:
|
|
658
|
-
showPredictionDetails: (
|
|
659
|
-
showCountdown: (
|
|
660
|
-
showPoints: (
|
|
538
|
+
...w,
|
|
539
|
+
entityId: n.entityId,
|
|
540
|
+
optionsLayout: C,
|
|
541
|
+
showPredictionDetails: (g == null ? void 0 : g.showPredictionDetails) ?? !0,
|
|
542
|
+
showCountdown: (g == null ? void 0 : g.showCountdown) ?? !0,
|
|
543
|
+
showPoints: (g == null ? void 0 : g.showPoints) ?? !0,
|
|
661
544
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
662
545
|
}
|
|
663
546
|
);
|
|
664
547
|
default:
|
|
665
|
-
return /* @__PURE__ */ o(
|
|
666
|
-
|
|
548
|
+
return /* @__PURE__ */ o(y, { sx: { padding: a.spacing.md, textAlign: "center" }, children: /* @__PURE__ */ o(
|
|
549
|
+
V,
|
|
667
550
|
{
|
|
668
551
|
sx: {
|
|
669
552
|
fontSize: "1em",
|
|
670
553
|
fontFamily: a.fonts.secondary,
|
|
671
554
|
color: a.colors.text
|
|
672
555
|
},
|
|
673
|
-
children: l("list.unsupportedContentType", { type:
|
|
556
|
+
children: l("list.unsupportedContentType", { type: n.entityType })
|
|
674
557
|
}
|
|
675
558
|
) });
|
|
676
559
|
}
|
|
677
560
|
};
|
|
678
561
|
return /* @__PURE__ */ o(
|
|
679
|
-
|
|
562
|
+
mt,
|
|
680
563
|
{
|
|
681
|
-
open:
|
|
564
|
+
open: e,
|
|
682
565
|
onClose: t,
|
|
683
566
|
container: r,
|
|
684
567
|
sx: { zIndex: 1300 },
|
|
685
|
-
children: /* @__PURE__ */
|
|
686
|
-
|
|
568
|
+
children: /* @__PURE__ */ T(
|
|
569
|
+
yt,
|
|
687
570
|
{
|
|
688
571
|
sx: {
|
|
689
572
|
fontSize: "1em",
|
|
@@ -698,7 +581,7 @@ const rt = (e) => {
|
|
|
698
581
|
},
|
|
699
582
|
children: [
|
|
700
583
|
/* @__PURE__ */ o(
|
|
701
|
-
|
|
584
|
+
xt,
|
|
702
585
|
{
|
|
703
586
|
sx: {
|
|
704
587
|
zIndex: 1,
|
|
@@ -708,28 +591,28 @@ const rt = (e) => {
|
|
|
708
591
|
}
|
|
709
592
|
}
|
|
710
593
|
),
|
|
711
|
-
/* @__PURE__ */ o(
|
|
594
|
+
/* @__PURE__ */ o(y, { sx: { position: "relative", zIndex: 0, fontSize: "1em" }, children: /* @__PURE__ */ o(It, { fallback: /* @__PURE__ */ o(J, { my: 4 }), children: Q() }) })
|
|
712
595
|
]
|
|
713
596
|
}
|
|
714
597
|
)
|
|
715
598
|
}
|
|
716
599
|
);
|
|
717
|
-
},
|
|
600
|
+
}, kt = (n, e) => {
|
|
718
601
|
const t = [];
|
|
719
|
-
for (let
|
|
602
|
+
for (let u = n; u <= e; u += 1) t.push(u);
|
|
720
603
|
return t;
|
|
721
|
-
},
|
|
722
|
-
if (
|
|
723
|
-
const t = [1],
|
|
724
|
-
return
|
|
725
|
-
},
|
|
726
|
-
page:
|
|
727
|
-
count:
|
|
604
|
+
}, Dt = (n, e) => {
|
|
605
|
+
if (e <= 0) return [];
|
|
606
|
+
const t = [1], u = Math.max(2, n - 1), l = Math.min(e - 1, n + 1);
|
|
607
|
+
return u > 2 && t.push("gap-start"), t.push(...kt(u, l)), l < e - 1 && t.push("gap-end"), e > 1 && t.push(e), t;
|
|
608
|
+
}, Wt = ({
|
|
609
|
+
page: n,
|
|
610
|
+
count: e,
|
|
728
611
|
disabled: t = !1,
|
|
729
|
-
onChange:
|
|
612
|
+
onChange: u
|
|
730
613
|
}) => {
|
|
731
|
-
const l =
|
|
732
|
-
c >= 1 && c <=
|
|
614
|
+
const l = j(), a = (c) => {
|
|
615
|
+
c >= 1 && c <= e && c !== n && u(c);
|
|
733
616
|
}, r = {
|
|
734
617
|
minWidth: "2em",
|
|
735
618
|
minHeight: "2em",
|
|
@@ -738,8 +621,8 @@ const rt = (e) => {
|
|
|
738
621
|
fontSize: "0.875em",
|
|
739
622
|
color: l.colors.text
|
|
740
623
|
};
|
|
741
|
-
return /* @__PURE__ */
|
|
742
|
-
|
|
624
|
+
return /* @__PURE__ */ T(
|
|
625
|
+
y,
|
|
743
626
|
{
|
|
744
627
|
sx: {
|
|
745
628
|
display: "flex",
|
|
@@ -750,31 +633,31 @@ const rt = (e) => {
|
|
|
750
633
|
},
|
|
751
634
|
children: [
|
|
752
635
|
/* @__PURE__ */ o(
|
|
753
|
-
|
|
636
|
+
D,
|
|
754
637
|
{
|
|
755
638
|
variant: "plain",
|
|
756
639
|
color: "neutral",
|
|
757
|
-
disabled: t ||
|
|
640
|
+
disabled: t || n === 1,
|
|
758
641
|
onClick: () => a(1),
|
|
759
642
|
sx: r,
|
|
760
|
-
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(
|
|
643
|
+
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(wt, { size: 18 }) })
|
|
761
644
|
}
|
|
762
645
|
),
|
|
763
646
|
/* @__PURE__ */ o(
|
|
764
|
-
|
|
647
|
+
D,
|
|
765
648
|
{
|
|
766
649
|
variant: "plain",
|
|
767
650
|
color: "neutral",
|
|
768
|
-
disabled: t ||
|
|
769
|
-
onClick: () => a(
|
|
651
|
+
disabled: t || n === 1,
|
|
652
|
+
onClick: () => a(n - 1),
|
|
770
653
|
sx: r,
|
|
771
|
-
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(
|
|
654
|
+
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
|
|
772
655
|
}
|
|
773
656
|
),
|
|
774
|
-
|
|
657
|
+
Dt(n, e).map((c, x) => {
|
|
775
658
|
if (typeof c == "string")
|
|
776
659
|
return /* @__PURE__ */ o(
|
|
777
|
-
|
|
660
|
+
y,
|
|
778
661
|
{
|
|
779
662
|
sx: {
|
|
780
663
|
...r,
|
|
@@ -785,11 +668,11 @@ const rt = (e) => {
|
|
|
785
668
|
},
|
|
786
669
|
children: "…"
|
|
787
670
|
},
|
|
788
|
-
`${c}-${
|
|
671
|
+
`${c}-${x}`
|
|
789
672
|
);
|
|
790
|
-
const s = c ===
|
|
673
|
+
const s = c === n;
|
|
791
674
|
return /* @__PURE__ */ o(
|
|
792
|
-
|
|
675
|
+
tt,
|
|
793
676
|
{
|
|
794
677
|
variant: "plain",
|
|
795
678
|
color: "neutral",
|
|
@@ -810,66 +693,66 @@ const rt = (e) => {
|
|
|
810
693
|
);
|
|
811
694
|
}),
|
|
812
695
|
/* @__PURE__ */ o(
|
|
813
|
-
|
|
696
|
+
D,
|
|
814
697
|
{
|
|
815
698
|
variant: "plain",
|
|
816
699
|
color: "neutral",
|
|
817
|
-
disabled: t ||
|
|
818
|
-
onClick: () => a(
|
|
700
|
+
disabled: t || n === e,
|
|
701
|
+
onClick: () => a(n + 1),
|
|
819
702
|
sx: r,
|
|
820
|
-
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(
|
|
703
|
+
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(bt, { size: 18 }) })
|
|
821
704
|
}
|
|
822
705
|
),
|
|
823
706
|
/* @__PURE__ */ o(
|
|
824
|
-
|
|
707
|
+
D,
|
|
825
708
|
{
|
|
826
709
|
variant: "plain",
|
|
827
710
|
color: "neutral",
|
|
828
|
-
disabled: t ||
|
|
829
|
-
onClick: () => a(
|
|
711
|
+
disabled: t || n === e,
|
|
712
|
+
onClick: () => a(e),
|
|
830
713
|
sx: r,
|
|
831
|
-
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(
|
|
714
|
+
children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Tt, { size: 18 }) })
|
|
832
715
|
}
|
|
833
716
|
)
|
|
834
717
|
]
|
|
835
718
|
}
|
|
836
719
|
);
|
|
837
|
-
},
|
|
720
|
+
}, jt = {
|
|
838
721
|
CLASSIC_QUIZ: "list.types.classicQuiz",
|
|
839
722
|
PERSONALITY_QUIZ: "list.types.personalityQuiz",
|
|
840
723
|
EITHER_OR: "list.types.eitherOr",
|
|
841
724
|
POLL: "list.types.poll",
|
|
842
725
|
MATCH_QUIZ: "list.types.matchQuiz",
|
|
843
726
|
CUSTOM_EVENT_GAME: "list.types.eventGame"
|
|
844
|
-
},
|
|
727
|
+
}, Yt = (n) => {
|
|
845
728
|
const {
|
|
846
|
-
entityId:
|
|
729
|
+
entityId: e,
|
|
847
730
|
sdk: t,
|
|
848
|
-
itemsCount:
|
|
731
|
+
itemsCount: u = 10,
|
|
849
732
|
itemsPerRow: l = 2,
|
|
850
733
|
widgetMode: a = "load-more",
|
|
851
734
|
urls: r,
|
|
852
735
|
defaultImagePlaceholderUrl: c
|
|
853
|
-
} =
|
|
854
|
-
items:
|
|
855
|
-
loading:
|
|
856
|
-
error:
|
|
857
|
-
hasMore:
|
|
858
|
-
loadMore:
|
|
859
|
-
page:
|
|
860
|
-
pageCount:
|
|
861
|
-
goToPage:
|
|
862
|
-
} =
|
|
863
|
-
const
|
|
864
|
-
if (
|
|
865
|
-
window.location.href =
|
|
736
|
+
} = n, { t: x } = G(), s = j(), M = X(), [z, Z] = F(null), [A, N] = F(!1), {
|
|
737
|
+
items: U,
|
|
738
|
+
loading: P,
|
|
739
|
+
error: O,
|
|
740
|
+
hasMore: I,
|
|
741
|
+
loadMore: R,
|
|
742
|
+
page: v,
|
|
743
|
+
pageCount: C,
|
|
744
|
+
goToPage: b
|
|
745
|
+
} = Rt(t, e, u, a), S = Ft(r), d = a === "paged", g = (p) => {
|
|
746
|
+
const f = zt(p, r);
|
|
747
|
+
if (f) {
|
|
748
|
+
window.location.href = f;
|
|
866
749
|
return;
|
|
867
750
|
}
|
|
868
|
-
|
|
869
|
-
}, i =
|
|
870
|
-
return
|
|
871
|
-
|
|
872
|
-
|
|
751
|
+
S || (Z(p), N(!0));
|
|
752
|
+
}, i = M ? 1 : Math.max(1, Math.floor(l)), E = d && C > 1, w = !d && I && !P, Q = !(d && P);
|
|
753
|
+
return O || !P && U.length === 0 && !E ? null : /* @__PURE__ */ T(y, { sx: { fontSize: "1em", fontFamily: s.fonts.secondary }, children: [
|
|
754
|
+
Q && /* @__PURE__ */ o(
|
|
755
|
+
y,
|
|
873
756
|
{
|
|
874
757
|
sx: {
|
|
875
758
|
display: "grid",
|
|
@@ -877,27 +760,27 @@ const rt = (e) => {
|
|
|
877
760
|
gap: s.spacing.xs,
|
|
878
761
|
marginBottom: s.spacing.md
|
|
879
762
|
},
|
|
880
|
-
children:
|
|
881
|
-
const
|
|
882
|
-
if (!
|
|
883
|
-
const
|
|
763
|
+
children: U.map((p) => {
|
|
764
|
+
const f = nt(p);
|
|
765
|
+
if (!f) return null;
|
|
766
|
+
const h = jt[p.entityType];
|
|
884
767
|
return /* @__PURE__ */ o(
|
|
885
|
-
|
|
768
|
+
Ot,
|
|
886
769
|
{
|
|
887
|
-
item:
|
|
888
|
-
entityData:
|
|
889
|
-
typeLabel:
|
|
770
|
+
item: p,
|
|
771
|
+
entityData: f,
|
|
772
|
+
typeLabel: h ? x(h) : "",
|
|
890
773
|
imagePlaceholder: c || "",
|
|
891
|
-
onClick:
|
|
774
|
+
onClick: g
|
|
892
775
|
},
|
|
893
|
-
|
|
776
|
+
p.entityId
|
|
894
777
|
);
|
|
895
778
|
})
|
|
896
779
|
}
|
|
897
780
|
),
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
781
|
+
P && /* @__PURE__ */ o(J, { my: 4 }),
|
|
782
|
+
w && /* @__PURE__ */ o(
|
|
783
|
+
y,
|
|
901
784
|
{
|
|
902
785
|
sx: {
|
|
903
786
|
display: "flex",
|
|
@@ -905,10 +788,10 @@ const rt = (e) => {
|
|
|
905
788
|
marginTop: s.spacing.md
|
|
906
789
|
},
|
|
907
790
|
children: /* @__PURE__ */ o(
|
|
908
|
-
|
|
791
|
+
tt,
|
|
909
792
|
{
|
|
910
793
|
variant: "soft",
|
|
911
|
-
onClick:
|
|
794
|
+
onClick: R,
|
|
912
795
|
sx: {
|
|
913
796
|
borderRadius: s.radius.xl,
|
|
914
797
|
py: "10px",
|
|
@@ -932,31 +815,31 @@ const rt = (e) => {
|
|
|
932
815
|
transform: "scale(0.98)"
|
|
933
816
|
}
|
|
934
817
|
},
|
|
935
|
-
children:
|
|
818
|
+
children: x("list.loadMore")
|
|
936
819
|
}
|
|
937
820
|
)
|
|
938
821
|
}
|
|
939
822
|
),
|
|
940
|
-
|
|
941
|
-
|
|
823
|
+
E && /* @__PURE__ */ o(y, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
|
|
824
|
+
Wt,
|
|
942
825
|
{
|
|
943
|
-
page:
|
|
944
|
-
count:
|
|
945
|
-
disabled:
|
|
946
|
-
onChange:
|
|
826
|
+
page: v,
|
|
827
|
+
count: C,
|
|
828
|
+
disabled: P,
|
|
829
|
+
onChange: b
|
|
947
830
|
}
|
|
948
831
|
) }),
|
|
949
832
|
/* @__PURE__ */ o(
|
|
950
|
-
|
|
833
|
+
Vt,
|
|
951
834
|
{
|
|
952
|
-
item:
|
|
953
|
-
open:
|
|
954
|
-
onClose: () =>
|
|
955
|
-
listProps:
|
|
835
|
+
item: z,
|
|
836
|
+
open: A,
|
|
837
|
+
onClose: () => N(!1),
|
|
838
|
+
listProps: n
|
|
956
839
|
}
|
|
957
840
|
)
|
|
958
841
|
] });
|
|
959
|
-
},
|
|
842
|
+
}, Gt = (n) => /* @__PURE__ */ o(ut, { packageName: "list", ...n, children: /* @__PURE__ */ o(Yt, { ...n }) }), rn = Gt;
|
|
960
843
|
export {
|
|
961
|
-
|
|
844
|
+
rn as List
|
|
962
845
|
};
|