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.
Files changed (139) hide show
  1. package/Betslip.js +1 -1
  2. package/ChanceGame.js +139 -146
  3. package/ClassicQuizPlay.js +1 -1
  4. package/CollectLead.js +14 -20
  5. package/CompetitionStatistics.js +27 -27
  6. package/CompetitorCard.js +895 -891
  7. package/Discussion.js +1 -1
  8. package/EitherOrPlay.js +1 -1
  9. package/EventCard.js +1494 -1571
  10. package/EventGamePlay.js +1 -1
  11. package/Leaderboard.js +249 -257
  12. package/List.js +319 -436
  13. package/MatchQuizPlay.js +1 -1
  14. package/Odds.js +30 -30
  15. package/PersonalityQuizPlay.js +1 -1
  16. package/PickThePair.js +627 -693
  17. package/PlayerOfTheMatch.js +256 -279
  18. package/PollVote.js +1 -1
  19. package/Predictor.js +19443 -2
  20. package/README.md +2 -1
  21. package/Standings.js +94 -99
  22. package/TopX.js +5871 -6988
  23. package/chunks/ChanceGameEmbedVariant-C3NGwvTF.js +21 -0
  24. package/chunks/OddsSkeleton-Bav8FHHN.js +26 -0
  25. package/chunks/{OddsStrip-B159Nivm.js → OddsStrip-CviVfQI4.js} +51 -53
  26. package/chunks/{PickOneOfX-D9qlxKTD.js → PickOneOfX-a6Dv0-rR.js} +210 -212
  27. package/chunks/index-B1d9q8fX.js +4 -0
  28. package/chunks/index-BP0pvFJ4.js +4 -0
  29. package/chunks/index-CHZyL_g_.js +4 -0
  30. package/chunks/index-CeCUdRmF.js +4 -0
  31. package/chunks/index-Ckyyw-I8.js +4 -0
  32. package/chunks/index-DGvCP5G8.js +4 -0
  33. package/chunks/index-yjMVOgwO.js +4 -0
  34. package/chunks/{main-CcPVuc5G.js → main-CFwRpvUi.js} +219 -238
  35. package/chunks/{main-By2Fg4Us.js → main-D9tFZv2q.js} +272 -309
  36. package/chunks/{main-Db4YC1C9.js → main-Dj4Manb5.js} +386 -407
  37. package/chunks/{main-BhONg691.js → main-DjiQz1dv.js} +764 -1125
  38. package/chunks/{main-BoLNJccN.js → main-Dys2_Jt2.js} +1625 -1954
  39. package/chunks/{main-JAewg2VD.js → main-dwV_55lz.js} +409 -432
  40. package/chunks/main-eAQMCxQ7.js +1949 -0
  41. package/chunks/{main-CWfREbUv.js → main-gexg6lc-.js} +959 -977
  42. package/index.js +40 -44
  43. package/package.json +13 -5
  44. package/chunks/AccessTime-B7Q_InTi.js +0 -10
  45. package/chunks/AlertMessage-CTbc9daZ.js +0 -318
  46. package/chunks/Avatar-Ve0m4ut_.js +0 -353
  47. package/chunks/Button-x1sQVMH2.js +0 -665
  48. package/chunks/Card-DfxnA3Cz.js +0 -196
  49. package/chunks/CardActions-TMBAbk8a.js +0 -140
  50. package/chunks/CardContent-CLQHztIU.js +0 -106
  51. package/chunks/ChanceGameEmbedVariant-C3TKbPI4.js +0 -913
  52. package/chunks/CheckCircle-DW1VzjQO.js +0 -8
  53. package/chunks/Chip-BUoNpinI.js +0 -365
  54. package/chunks/CircularProgress-D88LgW2V.js +0 -317
  55. package/chunks/Close-BxLZcPtb.js +0 -9
  56. package/chunks/Close-DVx6f5-e.js +0 -8
  57. package/chunks/CollectLeadForm-DtUFKk99.js +0 -3419
  58. package/chunks/ConsentsList-BcIMKviP.js +0 -339
  59. package/chunks/DirectionScope-CK0duYt8.js +0 -36
  60. package/chunks/Divider-D_ALv2uC.js +0 -166
  61. package/chunks/Edit-CiKqhDom.js +0 -99
  62. package/chunks/EmojiEvents-BYoxruEl.js +0 -8
  63. package/chunks/FavoriteBorder-YhT6RHv5.js +0 -11
  64. package/chunks/FormControl-BNG04EhC.js +0 -656
  65. package/chunks/FormControlContext-Ct0huDDM.js +0 -6
  66. package/chunks/FormLabel-Bl7hTa8O.js +0 -130
  67. package/chunks/GlobalStyles-PokSS9bO.js +0 -12
  68. package/chunks/InlineSpinner-BhKW6lxZ.js +0 -28
  69. package/chunks/Input-B7kPqO0b.js +0 -391
  70. package/chunks/KeyboardArrowDown-OGGGLEnE.js +0 -8
  71. package/chunks/KeyboardArrowRight-DN7qrp17.js +0 -11
  72. package/chunks/KeyboardArrowUp-jvN5m_A0.js +0 -8
  73. package/chunks/Link-brb09X-6.js +0 -319
  74. package/chunks/ListItemButton-BFG5QJbo.js +0 -1151
  75. package/chunks/ModalClose-D3i-AyMB.js +0 -153
  76. package/chunks/ModalDialog-Be6w76fh.js +0 -880
  77. package/chunks/NotFoundSkeleton-BHRVG8yg.js +0 -83
  78. package/chunks/Notification-CC66HKXb.js +0 -614
  79. package/chunks/OddsSkeleton-BBOVhfsn.js +0 -137
  80. package/chunks/OverlayScoreStateSkeleton-D5rnBJ_w.js +0 -154
  81. package/chunks/OverlayScoreStateWrapperSkeleton-CTXzD0bm.js +0 -81
  82. package/chunks/OverlaySignInSkeleton-T8A_9Tco.js +0 -518
  83. package/chunks/OverlaySkeleton-y02LRXZy.js +0 -1193
  84. package/chunks/Person-BD-IO4aX.js +0 -8
  85. package/chunks/PersonOutline-Nxl_9g9S.js +0 -8
  86. package/chunks/Popper-CGfJHTbM.js +0 -1263
  87. package/chunks/Portal-DQQSLiON.js +0 -74
  88. package/chunks/Portal-X8O64KaQ.js +0 -66
  89. package/chunks/Predictor-BJBBwZ6R.js +0 -19513
  90. package/chunks/PrizeCard-B2tBhY45.js +0 -36400
  91. package/chunks/Search-jaDXe8g7.js +0 -14
  92. package/chunks/Select-CzBMHr7z.js +0 -1165
  93. package/chunks/Sheet-x-YGYOYz.js +0 -132
  94. package/chunks/SignInCta-3NFxIOuf.js +0 -79
  95. package/chunks/Spinner-_5U881sC.js +0 -39
  96. package/chunks/SportsSoccer-DLUgspA-.js +0 -20
  97. package/chunks/Stack-CDpKA1D-.js +0 -169
  98. package/chunks/StandardContentSkeleton-DaZftDxZ.js +0 -57
  99. package/chunks/Table-IJ9-D2DF.js +0 -394
  100. package/chunks/Tabs-iyOvjGfd.js +0 -1084
  101. package/chunks/Textarea-Dv_Z4l5j.js +0 -475
  102. package/chunks/TimerOutlined-jNsK__Zz.js +0 -8
  103. package/chunks/Tooltip-clSjN1oC.js +0 -535
  104. package/chunks/Typography-BsucZNXl.js +0 -775
  105. package/chunks/areArraysEqual-B3mXtHvh.js +0 -6
  106. package/chunks/colorInversionUtils-AoR_6ghW.js +0 -347
  107. package/chunks/createSvgIcon-BWoHeNkc.js +0 -2813
  108. package/chunks/createSvgIcon-DBkOhFdn.js +0 -206
  109. package/chunks/dividerClasses-BkQMLbsL.js +0 -9
  110. package/chunks/elementAcceptingRef-DjUfkpLB.js +0 -25
  111. package/chunks/enums-B1lTCQvC.js +0 -15
  112. package/chunks/formLabelClasses-N0g8NZ67.js +0 -9
  113. package/chunks/getReactElementRef-B3MFPBbS.js +0 -21
  114. package/chunks/helpers-CKFwVhwj.js +0 -558
  115. package/chunks/index-Bg5jypgn.js +0 -11
  116. package/chunks/index-Bnad45hB.js +0 -4
  117. package/chunks/index-C6rtfeRX.js +0 -4
  118. package/chunks/index-CFc0WTOi.js +0 -848
  119. package/chunks/index-C_kf8WZI.js +0 -4
  120. package/chunks/index-CaVpDbdC.js +0 -4
  121. package/chunks/index-DJJVbXn_.js +0 -4
  122. package/chunks/index-DQO7VDRC.js +0 -4
  123. package/chunks/index-Kgehqf8J.js +0 -4
  124. package/chunks/main-W_W6YBtr.js +0 -3280
  125. package/chunks/ownerWindow-PI509BpA.js +0 -7
  126. package/chunks/searchEntities-SJcoznz0.js +0 -38
  127. package/chunks/sportsEvents-CGX-WkNB.js +0 -27
  128. package/chunks/useButton-C9taTgFS.js +0 -106
  129. package/chunks/useConsents-BLhgfEDf.js +0 -1168
  130. package/chunks/useControlled-BYdyS7Pn.js +0 -31
  131. package/chunks/useEmbedCode-DCWnWGak.js +0 -31
  132. package/chunks/useEventCallback-C9W0M_8l.js +0 -14
  133. package/chunks/useForwardedInput-CkAnayh_.js +0 -180
  134. package/chunks/useImageVariant-B62O7iLC.js +0 -15
  135. package/chunks/useInfoPage-BHdgKdme.js +0 -50
  136. package/chunks/useParticipationDraft-Brnd_p3w.js +0 -307
  137. package/chunks/useSwitch-DLSSqtcZ.js +0 -66
  138. package/chunks/variantColorInheritance-DZr7CNx6.js +0 -30
  139. package/chunks/visuallyHidden-B8J7BVSJ.js +0 -14
package/List.js CHANGED
@@ -1,135 +1,18 @@
1
- import { jsx as o, jsxs as v } from "react/jsx-runtime";
2
- import * as D from "react";
3
- import { useState as A, useRef as z, useCallback as W, useEffect as at, lazy as V, Suspense as ct } from "react";
4
- import { F as lt, G as dt, H as pt, _ as $, I as mt, P as g, g as ut, u as ft, f as gt, d as ht, a as J, i as et, B as x, b as yt, v as Ct } from "./chunks/PrizeCard-B2tBhY45.js";
5
- import "react-dom";
6
- import { P as xt } from "./chunks/Portal-X8O64KaQ.js";
7
- import { S as nt } from "./chunks/Spinner-_5U881sC.js";
8
- import { a as It } from "./chunks/index-Bg5jypgn.js";
9
- import { C as bt } from "./chunks/Card-DfxnA3Cz.js";
10
- import { s as St, a as wt, b as Tt, c as Pt, T as Z } from "./chunks/Typography-BsucZNXl.js";
11
- import { C as Et } from "./chunks/CardContent-CLQHztIU.js";
12
- import { C as vt } from "./chunks/Chip-BUoNpinI.js";
13
- import { U as Mt } from "./chunks/users-wbJRbqW8.js";
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 = n;
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 = n;
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 = n;
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 = n;
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 = n;
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 = n;
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
- }, Ht = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), Vt = (e) => {
76
+ }, Et = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), Lt = (n) => {
194
77
  var t;
195
- const n = (t = rt(e)) == null ? void 0 : t.status;
196
- return !!(n && Ht.has(n));
197
- }, Zt = 50, Dt = 3, Wt = (e, n, t, d) => {
198
- const l = d === "paged", a = d === "limited", [r, c] = A([]), [C, s] = A(!1), [E, M] = A(!1), [N, U] = A(!l), [F, I] = A(1), [S, B] = A(1), w = z([]), O = z([]), Q = z(/* @__PURE__ */ new Set()), b = z(1), L = z(!1), T = z(!1), p = z(null), u = z(0), i = W(
199
- async (m, h) => {
200
- var H;
201
- const f = await e.lists.getListContent(n, {
202
- limit: h,
203
- page: m
204
- }), y = (H = f.meta) == null ? void 0 : H.pagination, _ = f.data ?? [];
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: _.filter(Vt),
207
- rawCount: _.length,
208
- pageCount: (y == null ? void 0 : y.numberOfPages) ?? 1
89
+ valid: L.filter(Lt),
90
+ rawCount: L.length,
91
+ pageCount: (m == null ? void 0 : m.numberOfPages) ?? 1
209
92
  };
210
93
  },
211
- [e, n]
212
- ), R = W(async () => {
213
- if (T.current || !e || !n) return;
214
- const m = u.current, h = () => m !== u.current, f = a ? t - O.current.length : t;
215
- if (f <= 0) {
216
- U(!1);
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 (w.current.length < f && !L.current) {
220
- T.current = !0, s(!0);
102
+ if (I.current.length < h && !b.current) {
103
+ S.current = !0, s(!0);
221
104
  try {
222
- let _ = 0;
223
- for (; w.current.length < f && !L.current && _ < Dt; ) {
105
+ let L = 0;
106
+ for (; I.current.length < h && !b.current && L < Ut; ) {
224
107
  const {
225
- valid: H,
226
- rawCount: st,
227
- pageCount: it
228
- } = await i(b.current, Zt);
229
- if (h()) return;
230
- _ += 1;
231
- const X = H.filter(
232
- (K) => !Q.current.has(K.entityId)
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
- X.forEach((K) => Q.current.add(K.entityId)), w.current.push(...X), (st === 0 || b.current >= it) && (L.current = !0), b.current += 1;
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 (h()) return;
238
- console.warn("Error fetching list content:", _), M(!0);
119
+ } catch (L) {
120
+ if (f()) return;
121
+ console.warn("Error fetching list content:", L), z(!0);
239
122
  return;
240
123
  } finally {
241
- h() || (T.current = !1, s(!1));
124
+ f() || (S.current = !1, s(!1));
242
125
  }
243
126
  }
244
- if (h()) return;
245
- const y = [...O.current, ...w.current.splice(0, f)];
246
- O.current = y, c(y), U(
247
- !a && (w.current.length > 0 || !L.current)
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, n, e]), P = W(
250
- (m, h) => {
251
- const f = Math.max(1, Math.ceil(m.length / t)), y = Math.min(Math.max(h, 1), f);
252
- c(m.slice((y - 1) * t, y * t)), B(f), I(y);
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
- ), j = W(
256
- async (m) => {
257
- if (m < 1) return;
258
- if (p.current) {
259
- P(p.current, m);
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 (T.current || !e || !n) return;
263
- const h = u.current, f = () => h !== u.current;
264
- T.current = !0, s(!0);
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: y,
268
- rawCount: _,
269
- pageCount: H
270
- } = await i(m, t);
271
- if (f()) return;
272
- if (_ > t) {
273
- p.current = y, P(y, m);
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(y), B(H), I(m);
277
- } catch (y) {
278
- if (f()) return;
279
- console.warn("Error fetching list content:", y), M(!0);
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
- f() || (T.current = !1, s(!1));
164
+ h() || (S.current = !1, s(!1));
282
165
  }
283
166
  },
284
- [i, t, n, e, P]
167
+ [i, t, e, n, w]
285
168
  );
286
- return at(() => {
287
- u.current += 1, T.current = !1, w.current = [], O.current = [], Q.current = /* @__PURE__ */ new Set(), b.current = 1, L.current = !1, p.current = null, c([]), M(!1), U(!l), I(1), B(1), l ? j(1) : R();
288
- }, [l, j, R]), {
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: C,
291
- error: E,
292
- hasMore: N,
293
- loadMore: R,
294
- page: F,
295
- pageCount: S,
296
- goToPage: j
173
+ loading: x,
174
+ error: M,
175
+ hasMore: Z,
176
+ loadMore: E,
177
+ page: N,
178
+ pageCount: P,
179
+ goToPage: Q
297
180
  };
298
- }, Y = () => {
299
- const e = ut(), n = ft(), t = gt(), d = ht();
181
+ }, j = () => {
182
+ const n = rt(), e = it(), t = st(), u = at();
300
183
  return {
301
- fonts: n,
302
- spacing: d,
184
+ fonts: e,
185
+ spacing: u,
303
186
  radius: t,
304
187
  colors: {
305
- surface: e.surface,
306
- text: e.textPrimary,
307
- primary: e.palette.primary.plainColor,
308
- onPrimary: e.palette.primary.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
- }, tt = "{CONTENT_ID}", kt = (e, n) => {
323
- switch (e) {
205
+ }, q = "{CONTENT_ID}", _t = (n, e) => {
206
+ switch (n) {
324
207
  case "CLASSIC_QUIZ":
325
- return n == null ? void 0 : n.classicQuizUrl;
208
+ return e == null ? void 0 : e.classicQuizUrl;
326
209
  case "PERSONALITY_QUIZ":
327
- return n == null ? void 0 : n.personalityQuizUrl;
210
+ return e == null ? void 0 : e.personalityQuizUrl;
328
211
  case "EITHER_OR":
329
- return n == null ? void 0 : n.eitherOrUrl;
212
+ return e == null ? void 0 : e.eitherOrUrl;
330
213
  case "POLL":
331
- return n == null ? void 0 : n.pollUrl;
214
+ return e == null ? void 0 : e.pollUrl;
332
215
  case "MATCH_QUIZ":
333
- return n == null ? void 0 : n.matchQuizUrl;
216
+ return e == null ? void 0 : e.matchQuizUrl;
334
217
  case "CUSTOM_EVENT_GAME":
335
- return n == null ? void 0 : n.eventGameUrl;
218
+ return e == null ? void 0 : e.eventGameUrl;
336
219
  default:
337
220
  return;
338
221
  }
339
- }, Gt = (e) => !!(e != null && e.classicQuizUrl || e != null && e.personalityQuizUrl || e != null && e.eitherOrUrl || e != null && e.pollUrl || e != null && e.matchQuizUrl || e != null && e.eventGameUrl), Yt = (e, n) => {
340
- const t = kt(e.entityType, n);
341
- return t ? t.includes(tt) ? t.replace(tt, e.entityId) : t : null;
342
- }, Kt = (e, n) => {
343
- const t = e == null ? void 0 : e.images;
344
- return t ? n ? t.mobileLogo || t.mainLogo || null : t.mainLogo || t.mobileLogo || null : null;
345
- }, $t = ({
346
- item: e,
347
- entityData: n,
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: d,
232
+ imagePlaceholder: u,
350
233
  onClick: l
351
234
  }) => {
352
- var s, E;
353
- const { t: a } = J(), r = Y(), c = et(), C = Kt(n.branding, c);
354
- return /* @__PURE__ */ v(
355
- bt,
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(e),
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(q, { children: /* @__PURE__ */ o(
260
+ /* @__PURE__ */ o($, { children: /* @__PURE__ */ o(
378
261
  "img",
379
262
  {
380
- src: ((s = n.images) == null ? void 0 : s.cover) || ((E = n.images) == null ? void 0 : E.main) || d || It,
381
- alt: n.title,
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(q, { sx: { background: r.onImage.scrim } }),
387
- /* @__PURE__ */ v(Et, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
388
- /* @__PURE__ */ v(
389
- x,
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__ */ v(x, { children: [
399
- /* @__PURE__ */ v(
400
- x,
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
- vt,
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
- !!n.participationCount && /* @__PURE__ */ o(
424
- Z,
306
+ !!e.participationCount && /* @__PURE__ */ o(
307
+ V,
425
308
  {
426
- startDecorator: /* @__PURE__ */ o(Mt, { size: 16, color: r.onImage.text }),
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: n.participationCount
315
+ children: e.participationCount
433
316
  }
434
317
  )
435
318
  ]
436
319
  }
437
320
  ),
438
321
  /* @__PURE__ */ o(
439
- Z,
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: n.title
336
+ children: e.title
454
337
  }
455
338
  )
456
339
  ] }),
457
- C && !c && /* @__PURE__ */ v(
458
- x,
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
- Z,
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
- x,
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: C, alt: a("list.sponsoredBy") })
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
- C && c && /* @__PURE__ */ v(
502
- x,
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
- Z,
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
- x,
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: C, alt: a("list.sponsoredBy") })
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
- }, qt = V(() => import("./chunks/index-CaVpDbdC.js")), Jt = V(
547
- () => import("./chunks/index-C_kf8WZI.js")
548
- ), Xt = V(() => import("./chunks/index-DQO7VDRC.js")), te = V(() => import("./chunks/index-C6rtfeRX.js")), ee = V(() => import("./chunks/index-DJJVbXn_.js")), ne = V(() => import("./chunks/index-Kgehqf8J.js")), oe = ({
549
- item: e,
550
- open: n,
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: d
435
+ listProps: u
553
436
  }) => {
554
- const { t: l } = J(), a = Y(), { shadowRootElement: r } = yt(Ct), {
437
+ const { t: l } = G(), a = j(), { shadowRootElement: r } = lt(dt), {
555
438
  sdk: c,
556
- language: C,
439
+ language: x,
557
440
  themeOptions: s,
558
- userIsLoggedIn: E,
559
- signInCTA: M,
560
- additionalCTA: N,
561
- shareCTA: U,
562
- rulesDisplay: F,
563
- leads: I,
564
- consents: S,
565
- chanceGameVariant: B,
566
- showAnswerExplanations: w,
567
- hideCorrectOption: O,
568
- aggregateTranslatedVotes: Q,
569
- optionsLayout: b,
570
- imagePosition: L,
571
- defaultImagePlaceholderUrl: T,
572
- matchQuiz: p,
573
- eventGame: u,
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
- } = d, R = {
458
+ } = u, E = {
576
459
  sdk: c,
577
- language: C,
460
+ language: x,
578
461
  themeOptions: s,
579
- leads: I,
580
- consents: S,
581
- userIsLoggedIn: E,
582
- signInCTA: M,
583
- additionalCTA: N,
584
- rulesDisplay: F,
585
- defaultImagePlaceholderUrl: T,
586
- template: Ut.STANDARD,
587
- imagePosition: L
588
- }, P = { ...R, chanceGameVariant: B }, j = () => {
589
- if (!e) return null;
590
- switch (e.entityType) {
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
- qt,
476
+ vt,
594
477
  {
595
- ...P,
596
- entityId: e.entityId,
597
- shareCTA: U,
598
- showAnswerExplanations: w,
599
- hideCorrectOption: O,
600
- optionsLayout: b,
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
- Jt,
492
+ Qt,
610
493
  {
611
- ...P,
612
- entityId: e.entityId,
613
- showAnswerExplanations: w,
614
- optionsLayout: b,
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
- Xt,
503
+ Nt,
621
504
  {
622
- ...P,
623
- entityId: e.entityId,
624
- optionsLayout: b,
625
- aggregateTranslatedVotes: Q,
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
- te,
514
+ Bt,
632
515
  {
633
- ...R,
634
- entityId: e.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
- ee,
523
+ Ht,
641
524
  {
642
- ...P,
643
- entityId: e.entityId,
644
- showPredictionDetails: (p == null ? void 0 : p.showPredictionDetails) ?? !0,
645
- showCountdown: (p == null ? void 0 : p.showCountdown) ?? !0,
646
- showTeamLabels: (p == null ? void 0 : p.showTeamLabels) ?? !0,
647
- showPoints: (p == null ? void 0 : p.showPoints) ?? !0,
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
- ne,
536
+ Zt,
654
537
  {
655
- ...P,
656
- entityId: e.entityId,
657
- optionsLayout: b,
658
- showPredictionDetails: (u == null ? void 0 : u.showPredictionDetails) ?? !0,
659
- showCountdown: (u == null ? void 0 : u.showCountdown) ?? !0,
660
- showPoints: (u == null ? void 0 : u.showPoints) ?? !0,
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(x, { sx: { padding: a.spacing.md, textAlign: "center" }, children: /* @__PURE__ */ o(
666
- Z,
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: e.entityType })
556
+ children: l("list.unsupportedContentType", { type: n.entityType })
674
557
  }
675
558
  ) });
676
559
  }
677
560
  };
678
561
  return /* @__PURE__ */ o(
679
- Lt,
562
+ mt,
680
563
  {
681
- open: n,
564
+ open: e,
682
565
  onClose: t,
683
566
  container: r,
684
567
  sx: { zIndex: 1300 },
685
- children: /* @__PURE__ */ v(
686
- Rt,
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
- _t,
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(x, { sx: { position: "relative", zIndex: 0, fontSize: "1em" }, children: /* @__PURE__ */ o(ct, { fallback: /* @__PURE__ */ o(nt, { my: 4 }), children: j() }) })
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
- }, re = (e, n) => {
600
+ }, kt = (n, e) => {
718
601
  const t = [];
719
- for (let d = e; d <= n; d += 1) t.push(d);
602
+ for (let u = n; u <= e; u += 1) t.push(u);
720
603
  return t;
721
- }, se = (e, n) => {
722
- if (n <= 0) return [];
723
- const t = [1], d = Math.max(2, e - 1), l = Math.min(n - 1, e + 1);
724
- return d > 2 && t.push("gap-start"), t.push(...re(d, l)), l < n - 1 && t.push("gap-end"), n > 1 && t.push(n), t;
725
- }, ie = ({
726
- page: e,
727
- count: n,
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: d
612
+ onChange: u
730
613
  }) => {
731
- const l = Y(), a = (c) => {
732
- c >= 1 && c <= n && c !== e && d(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__ */ v(
742
- x,
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
- G,
636
+ D,
754
637
  {
755
638
  variant: "plain",
756
639
  color: "neutral",
757
- disabled: t || e === 1,
640
+ disabled: t || n === 1,
758
641
  onClick: () => a(1),
759
642
  sx: r,
760
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Ft, { size: 18 }) })
643
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(wt, { size: 18 }) })
761
644
  }
762
645
  ),
763
646
  /* @__PURE__ */ o(
764
- G,
647
+ D,
765
648
  {
766
649
  variant: "plain",
767
650
  color: "neutral",
768
- disabled: t || e === 1,
769
- onClick: () => a(e - 1),
651
+ disabled: t || n === 1,
652
+ onClick: () => a(n - 1),
770
653
  sx: r,
771
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(zt, { size: 18 }) })
654
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
772
655
  }
773
656
  ),
774
- se(e, n).map((c, C) => {
657
+ Dt(n, e).map((c, x) => {
775
658
  if (typeof c == "string")
776
659
  return /* @__PURE__ */ o(
777
- x,
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}-${C}`
671
+ `${c}-${x}`
789
672
  );
790
- const s = c === e;
673
+ const s = c === n;
791
674
  return /* @__PURE__ */ o(
792
- ot,
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
- G,
696
+ D,
814
697
  {
815
698
  variant: "plain",
816
699
  color: "neutral",
817
- disabled: t || e === n,
818
- onClick: () => a(e + 1),
700
+ disabled: t || n === e,
701
+ onClick: () => a(n + 1),
819
702
  sx: r,
820
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(At, { size: 18 }) })
703
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(bt, { size: 18 }) })
821
704
  }
822
705
  ),
823
706
  /* @__PURE__ */ o(
824
- G,
707
+ D,
825
708
  {
826
709
  variant: "plain",
827
710
  color: "neutral",
828
- disabled: t || e === n,
829
- onClick: () => a(n),
711
+ disabled: t || n === e,
712
+ onClick: () => a(e),
830
713
  sx: r,
831
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Ot, { size: 18 }) })
714
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Tt, { size: 18 }) })
832
715
  }
833
716
  )
834
717
  ]
835
718
  }
836
719
  );
837
- }, ae = {
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
- }, ce = (e) => {
727
+ }, Yt = (n) => {
845
728
  const {
846
- entityId: n,
729
+ entityId: e,
847
730
  sdk: t,
848
- itemsCount: d = 10,
731
+ itemsCount: u = 10,
849
732
  itemsPerRow: l = 2,
850
733
  widgetMode: a = "load-more",
851
734
  urls: r,
852
735
  defaultImagePlaceholderUrl: c
853
- } = e, { t: C } = J(), s = Y(), E = et(), [M, N] = A(null), [U, F] = A(!1), {
854
- items: I,
855
- loading: S,
856
- error: B,
857
- hasMore: w,
858
- loadMore: O,
859
- page: Q,
860
- pageCount: b,
861
- goToPage: L
862
- } = Wt(t, n, d, a), T = Gt(r), p = a === "paged", u = (m) => {
863
- const h = Yt(m, r);
864
- if (h) {
865
- window.location.href = h;
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
- T || (N(m), F(!0));
869
- }, i = E ? 1 : Math.max(1, Math.floor(l)), R = p && b > 1, P = !p && w && !S, j = !(p && S);
870
- return B || !S && I.length === 0 && !R ? null : /* @__PURE__ */ v(x, { sx: { fontSize: "1em", fontFamily: s.fonts.secondary }, children: [
871
- j && /* @__PURE__ */ o(
872
- x,
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: I.map((m) => {
881
- const h = rt(m);
882
- if (!h) return null;
883
- const f = ae[m.entityType];
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
- $t,
768
+ Ot,
886
769
  {
887
- item: m,
888
- entityData: h,
889
- typeLabel: f ? C(f) : "",
770
+ item: p,
771
+ entityData: f,
772
+ typeLabel: h ? x(h) : "",
890
773
  imagePlaceholder: c || "",
891
- onClick: u
774
+ onClick: g
892
775
  },
893
- m.entityId
776
+ p.entityId
894
777
  );
895
778
  })
896
779
  }
897
780
  ),
898
- S && /* @__PURE__ */ o(nt, { my: 4 }),
899
- P && /* @__PURE__ */ o(
900
- x,
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
- ot,
791
+ tt,
909
792
  {
910
793
  variant: "soft",
911
- onClick: O,
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: C("list.loadMore")
818
+ children: x("list.loadMore")
936
819
  }
937
820
  )
938
821
  }
939
822
  ),
940
- R && /* @__PURE__ */ o(x, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
941
- ie,
823
+ E && /* @__PURE__ */ o(y, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
824
+ Wt,
942
825
  {
943
- page: Q,
944
- count: b,
945
- disabled: S,
946
- onChange: L
826
+ page: v,
827
+ count: C,
828
+ disabled: P,
829
+ onChange: b
947
830
  }
948
831
  ) }),
949
832
  /* @__PURE__ */ o(
950
- oe,
833
+ Vt,
951
834
  {
952
- item: M,
953
- open: U,
954
- onClose: () => F(!1),
955
- listProps: e
835
+ item: z,
836
+ open: A,
837
+ onClose: () => N(!1),
838
+ listProps: n
956
839
  }
957
840
  )
958
841
  ] });
959
- }, le = (e) => /* @__PURE__ */ o(xt, { packageName: "list", ...e, children: /* @__PURE__ */ o(ce, { ...e }) }), Le = le;
842
+ }, Gt = (n) => /* @__PURE__ */ o(ut, { packageName: "list", ...n, children: /* @__PURE__ */ o(Yt, { ...n }) }), rn = Gt;
960
843
  export {
961
- Le as List
844
+ rn as List
962
845
  };