@streamlayer/react 0.31.12 → 0.32.1
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/lib/app/masters.d.ts +2 -2
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index4.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +13 -13
- package/lib/dist/es/gamification-feature.js +363 -349
- package/lib/dist/es/masters.js +2126 -2120
- package/lib/dist/index.d.ts +4 -3
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +235 -221
- package/lib/es/index4.js +93 -90
- package/lib/es/masters2.js +71 -71
- package/lib/style.css +1 -1
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as f, jsx as
|
|
2
|
-
import { s as a, n as j, Q as z, o as Se, a as
|
|
1
|
+
import { jsxs as f, jsx as s, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { s as a, n as j, Q as z, o as Se, a as L, b as Q, d as ze, E, r as ie, w as We, u as w, A as Fe, O as Ve, P as W, c as ee, e as Be, f as He } from "./masters.js";
|
|
3
3
|
import U, { useRef as C, useState as P, useCallback as _, useEffect as Ge, useLayoutEffect as Ze, useMemo as B, createElement as Z, PureComponent as xe } from "react";
|
|
4
4
|
const Je = /* @__PURE__ */ a("div")({
|
|
5
5
|
name: "Container",
|
|
@@ -29,7 +29,7 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
29
29
|
const n = e ? Se[e] : { label: i, iconName: void 0 };
|
|
30
30
|
return /* @__PURE__ */ f(Je, { children: [
|
|
31
31
|
/* @__PURE__ */ f(Ke, { children: [
|
|
32
|
-
(n == null ? void 0 : n.iconName) && /* @__PURE__ */
|
|
32
|
+
(n == null ? void 0 : n.iconName) && /* @__PURE__ */ s(
|
|
33
33
|
et,
|
|
34
34
|
{
|
|
35
35
|
"data-type-trivia": e === z.TRIVIA,
|
|
@@ -37,9 +37,9 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
37
37
|
name: n.iconName
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
(n == null ? void 0 : n.label) && /* @__PURE__ */
|
|
40
|
+
(n == null ? void 0 : n.label) && /* @__PURE__ */ s(tt, { children: n.label })
|
|
41
41
|
] }),
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ s(nt, { onClick: t, children: /* @__PURE__ */ s(st, { name: "icon-cross" }) })
|
|
43
43
|
] });
|
|
44
44
|
}, Oe = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), ke = (e) => e ? e.toLocaleString("en-US") : "0", rt = (e) => e.toLocaleDateString("en-US", {
|
|
45
45
|
weekday: "short",
|
|
@@ -61,8 +61,8 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
61
61
|
class: "i1fbnvpb",
|
|
62
62
|
propsAsIs: !1
|
|
63
63
|
}), le = ({ indicator: e, title: t }) => /* @__PURE__ */ f(lt, { children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ s(ct, { children: t }),
|
|
65
|
+
/* @__PURE__ */ s(dt, { children: e })
|
|
66
66
|
] }), ut = /* @__PURE__ */ a("div")({
|
|
67
67
|
name: "Container",
|
|
68
68
|
class: "ctmhwyc",
|
|
@@ -75,9 +75,9 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
75
75
|
name: "Title",
|
|
76
76
|
class: "t8s05oq",
|
|
77
77
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
78
|
+
}), F = ({ indicator: e, title: t }) => /* @__PURE__ */ f(ut, { children: [
|
|
79
|
+
/* @__PURE__ */ s(pt, { children: e }),
|
|
80
|
+
/* @__PURE__ */ s(mt, { children: t })
|
|
81
81
|
] }), ht = /* @__PURE__ */ a("div")({
|
|
82
82
|
name: "Container",
|
|
83
83
|
class: "c1yrpn9o",
|
|
@@ -151,29 +151,29 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
151
151
|
name: t,
|
|
152
152
|
points: i,
|
|
153
153
|
friendsRank: n,
|
|
154
|
-
rank:
|
|
154
|
+
rank: r,
|
|
155
155
|
streak: l,
|
|
156
156
|
correct: c,
|
|
157
157
|
incorrect: m,
|
|
158
158
|
inTop: u,
|
|
159
159
|
successRate: h
|
|
160
160
|
}) => /* @__PURE__ */ f(ht, { children: [
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ s(It, { children: /* @__PURE__ */ f(gt, { children: [
|
|
162
162
|
/* @__PURE__ */ f(kt, { children: [
|
|
163
|
-
e && /* @__PURE__ */
|
|
164
|
-
!e && /* @__PURE__ */
|
|
163
|
+
e && /* @__PURE__ */ s(vt, { alt: "avatar", src: e }),
|
|
164
|
+
!e && /* @__PURE__ */ s(Ot, { children: Oe(t || "") })
|
|
165
165
|
] }),
|
|
166
166
|
/* @__PURE__ */ f(Mt, { children: [
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ s(yt, { children: t }),
|
|
168
168
|
/* @__PURE__ */ f(Nt, { children: [
|
|
169
169
|
/* @__PURE__ */ f(At, { children: [
|
|
170
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ s(Tt, { alt: "rank-icon", src: wt }),
|
|
171
171
|
/* @__PURE__ */ f(Dt, { children: [
|
|
172
172
|
ke(i),
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ s(St, { children: "PTS" })
|
|
174
174
|
] })
|
|
175
175
|
] }),
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ s(zt, {}),
|
|
177
177
|
/* @__PURE__ */ f("div", { children: [
|
|
178
178
|
"TOP ",
|
|
179
179
|
u || 0,
|
|
@@ -184,37 +184,49 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
184
184
|
] }) }),
|
|
185
185
|
/* @__PURE__ */ f(ft, { children: [
|
|
186
186
|
/* @__PURE__ */ f(xt, { children: [
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ s(le, { indicator: n || 0, title: "Friends rank" }),
|
|
188
|
+
/* @__PURE__ */ s(le, { indicator: r || 0, title: "Global rank" })
|
|
189
189
|
] }),
|
|
190
190
|
/* @__PURE__ */ f(jt, { children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ s(F, { indicator: l || 0, title: "Win streak" }),
|
|
192
|
+
/* @__PURE__ */ s(F, { indicator: c || 0, title: "Correct" }),
|
|
193
|
+
/* @__PURE__ */ s(F, { indicator: m || 0, title: "Incorrect" }),
|
|
194
|
+
/* @__PURE__ */ s(F, { indicator: `${h || 0}%`, title: "Succ. rate" })
|
|
195
195
|
] })
|
|
196
196
|
] })
|
|
197
197
|
] }), Ct = /* @__PURE__ */ a("div")({
|
|
198
|
+
name: "SponsorLogoWrap",
|
|
199
|
+
class: "s8p5v5z",
|
|
200
|
+
propsAsIs: !1
|
|
201
|
+
}), bt = () => j, $t = /* @__PURE__ */ a(bt())({
|
|
202
|
+
name: "SponsorLogo",
|
|
203
|
+
class: "s755yti",
|
|
204
|
+
propsAsIs: !0
|
|
205
|
+
}), Lt = () => /* @__PURE__ */ s(Ct, {
|
|
206
|
+
children: /* @__PURE__ */ s($t, {
|
|
207
|
+
name: "mastersLogo"
|
|
208
|
+
})
|
|
209
|
+
}), Et = /* @__PURE__ */ a("div")({
|
|
198
210
|
name: "Container",
|
|
199
211
|
class: "c38csyt",
|
|
200
212
|
propsAsIs: !1
|
|
201
|
-
}),
|
|
213
|
+
}), Rt = /* @__PURE__ */ a("div")({
|
|
202
214
|
name: "Title",
|
|
203
215
|
class: "ty221rx",
|
|
204
216
|
propsAsIs: !1
|
|
205
|
-
}),
|
|
217
|
+
}), Qt = /* @__PURE__ */ a("div")({
|
|
206
218
|
name: "Description",
|
|
207
219
|
class: "dlaj9xp",
|
|
208
220
|
propsAsIs: !1
|
|
209
|
-
}),
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
] }),
|
|
221
|
+
}), Ut = ({ title: e, description: t }) => /* @__PURE__ */ f(Et, { children: [
|
|
222
|
+
/* @__PURE__ */ s(j, { name: "icon-check-circle" }),
|
|
223
|
+
/* @__PURE__ */ s(Rt, { children: e }),
|
|
224
|
+
/* @__PURE__ */ s(Qt, { children: t })
|
|
225
|
+
] }), Pt = /* @__PURE__ */ a("div")({
|
|
214
226
|
name: "Container",
|
|
215
227
|
class: "c16sbdnm",
|
|
216
228
|
propsAsIs: !1
|
|
217
|
-
}),
|
|
229
|
+
}), _t = () => j, qt = /* @__PURE__ */ a(_t())({
|
|
218
230
|
name: "IconPrediction",
|
|
219
231
|
class: "ibhorgl",
|
|
220
232
|
propsAsIs: !0
|
|
@@ -226,7 +238,7 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
226
238
|
name: "FeedbackHeader",
|
|
227
239
|
class: "f455ozj",
|
|
228
240
|
propsAsIs: !1
|
|
229
|
-
}),
|
|
241
|
+
}), Yt = /* @__PURE__ */ a("span")({
|
|
230
242
|
name: "FeedbackTitle",
|
|
231
243
|
class: "f1913njx",
|
|
232
244
|
propsAsIs: !1
|
|
@@ -234,75 +246,75 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
234
246
|
name: "FeedbackDescription",
|
|
235
247
|
class: "fzfk69z",
|
|
236
248
|
propsAsIs: !1
|
|
237
|
-
}),
|
|
249
|
+
}), Wt = /* @__PURE__ */ a("div")({
|
|
238
250
|
name: "FeedbackText",
|
|
239
251
|
class: "fx87qaj",
|
|
240
252
|
propsAsIs: !1
|
|
241
|
-
}),
|
|
253
|
+
}), Ft = ({
|
|
242
254
|
feedbackMessages: e,
|
|
243
255
|
questionVotedCorrectly: t,
|
|
244
256
|
questionVoted: i,
|
|
245
257
|
questionType: n,
|
|
246
|
-
hasCorrectAnswer:
|
|
258
|
+
hasCorrectAnswer: r,
|
|
247
259
|
questionStatus: l
|
|
248
260
|
}) => {
|
|
249
261
|
const c = i && (n === z.TRIVIA || n === z.PREDICTION);
|
|
250
|
-
if (!c && l !==
|
|
262
|
+
if (!c && l !== L.RESOLVED || l === L.RESOLVED && n === z.PREDICTION && !i)
|
|
251
263
|
return null;
|
|
252
|
-
const m = n === z.PREDICTION && !
|
|
253
|
-
return /* @__PURE__ */ f(
|
|
254
|
-
l ===
|
|
255
|
-
/* @__PURE__ */
|
|
264
|
+
const m = n === z.PREDICTION && !r, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
|
|
265
|
+
return /* @__PURE__ */ f(Pt, { "data-isPrediction": m, children: [
|
|
266
|
+
l === L.RESOLVED && n === z.TRIVIA && !i && /* @__PURE__ */ f($, { children: [
|
|
267
|
+
/* @__PURE__ */ s(ce, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
|
|
256
268
|
/* @__PURE__ */ f("div", { children: [
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ s(de, { children: /* @__PURE__ */ s(J, { children: "Question Expired" }) }),
|
|
270
|
+
/* @__PURE__ */ s(Wt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
259
271
|
] })
|
|
260
272
|
] }),
|
|
261
273
|
c && m && /* @__PURE__ */ f($, { children: [
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ s(qt, { name: "icon-prediction" }),
|
|
275
|
+
/* @__PURE__ */ s(J, { children: "Stay tuned to see if your prediction was correct." })
|
|
264
276
|
] }),
|
|
265
|
-
c &&
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
277
|
+
c && r && /* @__PURE__ */ f($, { children: [
|
|
278
|
+
/* @__PURE__ */ s(ce, { "data-feedbackType": u, children: /* @__PURE__ */ s(j, { name: u }) }),
|
|
279
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ f(de, { children: [
|
|
280
|
+
/* @__PURE__ */ s(Yt, { "data-feedbackType": u, children: h == null ? void 0 : h.title }),
|
|
281
|
+
/* @__PURE__ */ s(J, { children: h == null ? void 0 : h.description })
|
|
270
282
|
] }) })
|
|
271
283
|
] })
|
|
272
284
|
] });
|
|
273
|
-
},
|
|
285
|
+
}, Vt = /* @__PURE__ */ a("div")({
|
|
274
286
|
name: "Container",
|
|
275
287
|
class: "c14ielyq",
|
|
276
288
|
propsAsIs: !1
|
|
277
|
-
}),
|
|
289
|
+
}), Bt = /* @__PURE__ */ a("div")({
|
|
278
290
|
name: "Content",
|
|
279
291
|
class: "c1tlqx57",
|
|
280
292
|
propsAsIs: !1
|
|
281
|
-
}),
|
|
293
|
+
}), Ht = /* @__PURE__ */ a("div")({
|
|
282
294
|
name: "Title",
|
|
283
295
|
class: "t1hq58md",
|
|
284
296
|
propsAsIs: !1
|
|
285
|
-
}),
|
|
297
|
+
}), Gt = /* @__PURE__ */ a("div")({
|
|
286
298
|
name: "Options",
|
|
287
299
|
class: "o1c8nxcx",
|
|
288
300
|
propsAsIs: !1
|
|
289
|
-
}),
|
|
301
|
+
}), Zt = /* @__PURE__ */ a("button")({
|
|
290
302
|
name: "ButtonContainer",
|
|
291
303
|
class: "b1b6dl8t",
|
|
292
304
|
propsAsIs: !1
|
|
293
|
-
}),
|
|
305
|
+
}), Jt = /* @__PURE__ */ a("div")({
|
|
294
306
|
name: "ButtonPct",
|
|
295
307
|
class: "b4iik8i",
|
|
296
308
|
propsAsIs: !1
|
|
297
|
-
}),
|
|
309
|
+
}), Kt = /* @__PURE__ */ a("span")({
|
|
298
310
|
name: "ButtonBody",
|
|
299
311
|
class: "b1gq1lnf",
|
|
300
312
|
propsAsIs: !1
|
|
301
|
-
}),
|
|
313
|
+
}), Xt = /* @__PURE__ */ a("div")({
|
|
302
314
|
name: "IconContainer",
|
|
303
315
|
class: "i1j65z51",
|
|
304
316
|
propsAsIs: !1
|
|
305
|
-
}),
|
|
317
|
+
}), en = /* @__PURE__ */ a("div")({
|
|
306
318
|
name: "IconWrap",
|
|
307
319
|
class: "i19tpfua",
|
|
308
320
|
propsAsIs: !1
|
|
@@ -310,59 +322,59 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
310
322
|
name: "Icon",
|
|
311
323
|
class: "i1tubmma",
|
|
312
324
|
propsAsIs: !1
|
|
313
|
-
}),
|
|
325
|
+
}), tn = () => Ce, nn = /* @__PURE__ */ a(tn())({
|
|
314
326
|
name: "IconDefault",
|
|
315
327
|
class: "i1grrgwj",
|
|
316
328
|
propsAsIs: !0
|
|
317
|
-
}),
|
|
329
|
+
}), sn = () => Ce, rn = /* @__PURE__ */ a(sn())({
|
|
318
330
|
name: "IconCircle",
|
|
319
331
|
class: "ibemyq8",
|
|
320
332
|
propsAsIs: !0
|
|
321
|
-
}),
|
|
333
|
+
}), on = /* @__PURE__ */ a("span")({
|
|
322
334
|
name: "Title",
|
|
323
335
|
class: "t1dceht",
|
|
324
336
|
propsAsIs: !1
|
|
325
|
-
}),
|
|
337
|
+
}), an = /* @__PURE__ */ a("span")({
|
|
326
338
|
name: "Indicators",
|
|
327
339
|
class: "i116q4vq",
|
|
328
340
|
propsAsIs: !1
|
|
329
|
-
}),
|
|
341
|
+
}), ln = /* @__PURE__ */ a("span")({
|
|
330
342
|
name: "Percentage",
|
|
331
343
|
class: "p17ajcu2",
|
|
332
344
|
propsAsIs: !1
|
|
333
|
-
}),
|
|
345
|
+
}), cn = () => j, dn = /* @__PURE__ */ a(cn())({
|
|
334
346
|
name: "CheckIcon",
|
|
335
347
|
class: "cu9kmlb",
|
|
336
348
|
propsAsIs: !0
|
|
337
349
|
}), ue = {
|
|
338
|
-
[Q.CENTERED]: (e) => /* @__PURE__ */
|
|
339
|
-
[Q.TRANSPARENT]: (e) => /* @__PURE__ */
|
|
340
|
-
[Q.ROUNDED]: (e) => /* @__PURE__ */
|
|
350
|
+
[Q.CENTERED]: (e) => /* @__PURE__ */ s(nn, { alt: "option-icon", src: e }),
|
|
351
|
+
[Q.TRANSPARENT]: (e) => /* @__PURE__ */ s(Xt, { children: /* @__PURE__ */ s(en, { style: { backgroundImage: `url(${e})` } }) }),
|
|
352
|
+
[Q.ROUNDED]: (e) => /* @__PURE__ */ s(rn, { alt: "option-icon", src: e }),
|
|
341
353
|
[Q.NONE]: () => null,
|
|
342
354
|
[Q.UNSET]: () => null
|
|
343
|
-
},
|
|
355
|
+
}, un = ({ questionType: e, hasCorrectAnswer: t, correct: i, youVoted: n, questionVoted: r }) => {
|
|
344
356
|
if (e === z.POLL && n)
|
|
345
357
|
return "correct";
|
|
346
358
|
if (e === z.PREDICTION) {
|
|
347
|
-
if (t &&
|
|
359
|
+
if (t && r)
|
|
348
360
|
return n ? i ? "correct" : "incorrect" : "unset";
|
|
349
361
|
if (n)
|
|
350
362
|
return "correct";
|
|
351
363
|
}
|
|
352
|
-
return e === z.TRIVIA &&
|
|
353
|
-
},
|
|
364
|
+
return e === z.TRIVIA && r && n ? i ? "correct" : "incorrect" : "unset";
|
|
365
|
+
}, pn = ({
|
|
354
366
|
questionType: e,
|
|
355
367
|
questionVoted: t,
|
|
356
368
|
correct: i,
|
|
357
369
|
hasCorrectAnswer: n,
|
|
358
|
-
questionStatus:
|
|
359
|
-
}) => e === z.TRIVIA ? t && i : e === z.PREDICTION ? t && i && n ||
|
|
370
|
+
questionStatus: r
|
|
371
|
+
}) => e === z.TRIVIA ? t && i : e === z.PREDICTION ? t && i && n || r === L.RESOLVED && i : !1, mn = (e) => {
|
|
360
372
|
var t;
|
|
361
373
|
const {
|
|
362
374
|
// option props
|
|
363
375
|
id: i,
|
|
364
376
|
icon: n,
|
|
365
|
-
text:
|
|
377
|
+
text: r,
|
|
366
378
|
percentageDecimal: l,
|
|
367
379
|
// extra props
|
|
368
380
|
onVote: c,
|
|
@@ -376,9 +388,9 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
376
388
|
questionType: A,
|
|
377
389
|
correct: D,
|
|
378
390
|
hasCorrectAnswer: o
|
|
379
|
-
} = e, d =
|
|
391
|
+
} = e, d = un(e), p = pn({ questionType: A, questionVoted: u, correct: D, hasCorrectAnswer: o, questionStatus: M }), I = M === L.RESOLVED && A === z.PREDICTION, g = u || I;
|
|
380
392
|
return /* @__PURE__ */ f(
|
|
381
|
-
|
|
393
|
+
Zt,
|
|
382
394
|
{
|
|
383
395
|
value: i,
|
|
384
396
|
"data-selected": m,
|
|
@@ -387,20 +399,20 @@ const Je = /* @__PURE__ */ a("div")({
|
|
|
387
399
|
"data-isNotChecked": u && !m && d !== "incorrect",
|
|
388
400
|
onClick: c,
|
|
389
401
|
children: [
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */ f(
|
|
402
|
+
/* @__PURE__ */ s(Jt, { "data-answerState": d, style: { width: `${g ? l : 0}%` } }),
|
|
403
|
+
/* @__PURE__ */ f(Kt, { children: [
|
|
392
404
|
n && h && ((t = ue[h]) == null ? void 0 : t.call(ue, n)),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
g && /* @__PURE__ */ f(
|
|
395
|
-
p && /* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ s(on, { children: r }),
|
|
406
|
+
g && /* @__PURE__ */ f(an, { children: [
|
|
407
|
+
p && /* @__PURE__ */ s(dn, { name: "selected" }),
|
|
408
|
+
/* @__PURE__ */ s(ln, { children: /* @__PURE__ */ s(ze, { value: l, suffix: "%" }) })
|
|
397
409
|
] })
|
|
398
410
|
] })
|
|
399
411
|
]
|
|
400
412
|
}
|
|
401
413
|
);
|
|
402
414
|
};
|
|
403
|
-
var pe = typeof window > "u" ? Ge : Ze,
|
|
415
|
+
var pe = typeof window > "u" ? Ge : Ze, hn = ({ isPlaying: e, duration: t, startAt: i = 0, updateInterval: n = 0, onComplete: r, onUpdate: l }) => {
|
|
404
416
|
let [c, m] = P(i), u = C(0), h = C(i), T = C(i * -1e3), M = C(null), v = C(null), A = C(null), D = (p) => {
|
|
405
417
|
let I = p / 1e3;
|
|
406
418
|
if (v.current === null) {
|
|
@@ -421,35 +433,35 @@ var pe = typeof window > "u" ? Ge : Ze, dn = ({ isPlaying: e, duration: t, start
|
|
|
421
433
|
return pe(() => {
|
|
422
434
|
if (l == null || l(c), t && c >= t) {
|
|
423
435
|
T.current += t * 1e3;
|
|
424
|
-
let { shouldRepeat: p = !1, delay: I = 0, newStartAt: g } = (
|
|
436
|
+
let { shouldRepeat: p = !1, delay: I = 0, newStartAt: g } = (r == null ? void 0 : r(T.current / 1e3)) || {};
|
|
425
437
|
p && (A.current = setTimeout(() => d(g), I * 1e3));
|
|
426
438
|
}
|
|
427
439
|
}, [c, t]), pe(() => (e && (M.current = requestAnimationFrame(D)), o), [e, t, n]), { elapsedTime: c, reset: d };
|
|
428
|
-
},
|
|
429
|
-
let n = e / 2,
|
|
430
|
-
return { path: `m ${n},${
|
|
431
|
-
}, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0,
|
|
440
|
+
}, In = (e, t, i) => {
|
|
441
|
+
let n = e / 2, r = t / 2, l = n - r, c = 2 * l, m = i === "clockwise" ? "1,0" : "0,1", u = 2 * Math.PI * l;
|
|
442
|
+
return { path: `m ${n},${r} a ${l},${l} 0 ${m} 0,${c} a ${l},${l} 0 ${m} 0,-${c}`, pathLength: u };
|
|
443
|
+
}, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, fn = (e) => ({ position: "relative", width: e, height: e }), gn = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, be = (e, t, i, n, r) => {
|
|
432
444
|
if (n === 0)
|
|
433
445
|
return t;
|
|
434
|
-
let l = (
|
|
446
|
+
let l = (r ? n - e : e) / n;
|
|
435
447
|
return t + i * l;
|
|
436
448
|
}, he = (e) => {
|
|
437
449
|
var t, i;
|
|
438
|
-
return (i = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n,
|
|
439
|
-
},
|
|
450
|
+
return (i = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, r, l, c) => `#${r}${r}${l}${l}${c}${c}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((n) => parseInt(n, 16))) != null ? i : [];
|
|
451
|
+
}, vn = (e, t) => {
|
|
440
452
|
var i;
|
|
441
|
-
let { colors: n, colorsTime:
|
|
453
|
+
let { colors: n, colorsTime: r, isSmoothColorTransition: l = !0 } = e;
|
|
442
454
|
if (typeof n == "string")
|
|
443
455
|
return n;
|
|
444
|
-
let c = (i =
|
|
445
|
-
if (!
|
|
456
|
+
let c = (i = r == null ? void 0 : r.findIndex((v, A) => v >= t && t >= r[A + 1])) != null ? i : -1;
|
|
457
|
+
if (!r || c === -1)
|
|
446
458
|
return n[0];
|
|
447
459
|
if (!l)
|
|
448
460
|
return n[c];
|
|
449
|
-
let m =
|
|
461
|
+
let m = r[c] - t, u = r[c] - r[c + 1], h = he(n[c]), T = he(n[c + 1]), M = !!e.isGrowing;
|
|
450
462
|
return `rgb(${h.map((v, A) => be(m, v, T[A] - v, u, M) | 0).join(",")})`;
|
|
451
|
-
},
|
|
452
|
-
let { duration: t, initialRemainingTime: i, updateInterval: n, size:
|
|
463
|
+
}, Mn = (e) => {
|
|
464
|
+
let { duration: t, initialRemainingTime: i, updateInterval: n, size: r = 180, strokeWidth: l = 12, trailStrokeWidth: c, isPlaying: m = !1, isGrowing: u = !1, rotation: h = "clockwise", onComplete: T, onUpdate: M } = e, v = C(), A = Math.max(l, c ?? 0), { path: D, pathLength: o } = In(r, A, h), { elapsedTime: d } = hn({ isPlaying: m, duration: t, startAt: me(t, i), updateInterval: n, onUpdate: typeof M == "function" ? (I) => {
|
|
453
465
|
let g = Math.ceil(t - I);
|
|
454
466
|
g !== v.current && (v.current = g, M(g));
|
|
455
467
|
} : void 0, onComplete: typeof T == "function" ? (I) => {
|
|
@@ -458,35 +470,35 @@ var pe = typeof window > "u" ? Ge : Ze, dn = ({ isPlaying: e, duration: t, start
|
|
|
458
470
|
if (N)
|
|
459
471
|
return { shouldRepeat: N, delay: y, newStartAt: me(t, S) };
|
|
460
472
|
} : void 0 }), p = t - d;
|
|
461
|
-
return { elapsedTime: d, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: h, size:
|
|
473
|
+
return { elapsedTime: d, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: h, size: r, stroke: vn(e, p), strokeDashoffset: be(d, 0, o, t, u), strokeWidth: l };
|
|
462
474
|
}, $e = (e) => {
|
|
463
|
-
let { children: t, strokeLinecap: i, trailColor: n, trailStrokeWidth:
|
|
464
|
-
return U.createElement("div", { style:
|
|
475
|
+
let { children: t, strokeLinecap: i, trailColor: n, trailStrokeWidth: r } = e, { path: l, pathLength: c, stroke: m, strokeDashoffset: u, remainingTime: h, elapsedTime: T, size: M, strokeWidth: v } = Mn(e);
|
|
476
|
+
return U.createElement("div", { style: fn(M) }, U.createElement("svg", { viewBox: `0 0 ${M} ${M}`, width: M, height: M, xmlns: "http://www.w3.org/2000/svg" }, U.createElement("path", { d: l, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: r ?? v }), U.createElement("path", { d: l, fill: "none", stroke: m, strokeLinecap: i ?? "round", strokeWidth: v, strokeDasharray: c, strokeDashoffset: u })), typeof t == "function" && U.createElement("div", { style: gn }, t({ remainingTime: h, elapsedTime: T, color: m })));
|
|
465
477
|
};
|
|
466
478
|
$e.displayName = "CountdownCircleTimer";
|
|
467
|
-
const
|
|
479
|
+
const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10, 0], Tn = /* @__PURE__ */ a("div")({
|
|
468
480
|
name: "RemainingTime",
|
|
469
481
|
class: "r165427",
|
|
470
482
|
propsAsIs: !1
|
|
471
|
-
}),
|
|
483
|
+
}), An = E.SECONDARY_GREEN6, Ie = E.SECONDARY_RED3, Dn = E.NEUTRALS_GRAY3, Sn = ({
|
|
472
484
|
isPlaying: e = !0,
|
|
473
485
|
duration: t = 30,
|
|
474
486
|
onTimerExpired: i
|
|
475
487
|
}) => {
|
|
476
|
-
const [n,
|
|
488
|
+
const [n, r] = P(t > 10 ? An : Ie), l = ({
|
|
477
489
|
remainingTime: u
|
|
478
|
-
}) => /* @__PURE__ */
|
|
490
|
+
}) => /* @__PURE__ */ s(Tn, {
|
|
479
491
|
children: u
|
|
480
492
|
}), c = _(() => {
|
|
481
|
-
i == null || i(),
|
|
482
|
-
}, [i,
|
|
483
|
-
u === 10 &&
|
|
484
|
-
}, [
|
|
485
|
-
return /* @__PURE__ */
|
|
493
|
+
i == null || i(), r(Dn);
|
|
494
|
+
}, [i, r]), m = _((u) => {
|
|
495
|
+
u === 10 && r(Ie);
|
|
496
|
+
}, [r]);
|
|
497
|
+
return /* @__PURE__ */ s($e, {
|
|
486
498
|
isPlaying: e,
|
|
487
499
|
duration: t,
|
|
488
|
-
colors:
|
|
489
|
-
colorsTime:
|
|
500
|
+
colors: yn,
|
|
501
|
+
colorsTime: Nn,
|
|
490
502
|
size: 32,
|
|
491
503
|
strokeWidth: 2,
|
|
492
504
|
trailStrokeWidth: 2,
|
|
@@ -495,57 +507,57 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
|
|
|
495
507
|
onUpdate: m,
|
|
496
508
|
children: l
|
|
497
509
|
});
|
|
498
|
-
},
|
|
510
|
+
}, zn = /* @__PURE__ */ a("div")({
|
|
499
511
|
name: "WinBarContainer",
|
|
500
512
|
class: "wie6cqo",
|
|
501
513
|
propsAsIs: !1
|
|
502
|
-
}),
|
|
514
|
+
}), xn = /* @__PURE__ */ a("div")({
|
|
503
515
|
name: "Content",
|
|
504
516
|
class: "cgizw4u",
|
|
505
517
|
propsAsIs: !1
|
|
506
|
-
}),
|
|
518
|
+
}), jn = /* @__PURE__ */ a("div")({
|
|
507
519
|
name: "Title",
|
|
508
520
|
class: "t1l3ucjp",
|
|
509
521
|
propsAsIs: !1
|
|
510
|
-
}),
|
|
522
|
+
}), On = () => j, kn = /* @__PURE__ */ a(On())({
|
|
511
523
|
name: "WinIcon",
|
|
512
524
|
class: "wx7j799",
|
|
513
525
|
propsAsIs: !0
|
|
514
|
-
}),
|
|
526
|
+
}), wn = /* @__PURE__ */ a("div")({
|
|
515
527
|
name: "Points",
|
|
516
528
|
class: "p4lwuj0",
|
|
517
529
|
propsAsIs: !1
|
|
518
|
-
}),
|
|
530
|
+
}), Cn = /* @__PURE__ */ a("span")({
|
|
519
531
|
name: "PointsCount",
|
|
520
532
|
class: "po9i64o",
|
|
521
533
|
propsAsIs: !1
|
|
522
|
-
}),
|
|
534
|
+
}), bn = /* @__PURE__ */ a("span")({
|
|
523
535
|
name: "PointsUnits",
|
|
524
536
|
class: "pe5g05h",
|
|
525
537
|
propsAsIs: !1
|
|
526
|
-
}),
|
|
538
|
+
}), $n = ({
|
|
527
539
|
title: e,
|
|
528
540
|
points: t,
|
|
529
541
|
isPlayingTimer: i,
|
|
530
542
|
isTimer: n,
|
|
531
|
-
questionType:
|
|
543
|
+
questionType: r,
|
|
532
544
|
timerDuration: l,
|
|
533
545
|
onTimerExpired: c
|
|
534
|
-
}) => /* @__PURE__ */ f(
|
|
535
|
-
/* @__PURE__ */ f(
|
|
536
|
-
e && /* @__PURE__ */
|
|
537
|
-
t !== void 0 &&
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */ f(
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */
|
|
546
|
+
}) => /* @__PURE__ */ f(zn, { children: [
|
|
547
|
+
/* @__PURE__ */ f(xn, { children: [
|
|
548
|
+
e && /* @__PURE__ */ s(jn, { children: e }),
|
|
549
|
+
t !== void 0 && r !== z.POLL && /* @__PURE__ */ f($, { children: [
|
|
550
|
+
/* @__PURE__ */ s(kn, { name: "icon-trophy" }),
|
|
551
|
+
/* @__PURE__ */ f(wn, { children: [
|
|
552
|
+
/* @__PURE__ */ s(Cn, { children: /* @__PURE__ */ s(ze, { value: t }) }),
|
|
553
|
+
/* @__PURE__ */ s(bn, { children: "PTS" })
|
|
542
554
|
] })
|
|
543
555
|
] })
|
|
544
556
|
] }),
|
|
545
|
-
n && /* @__PURE__ */
|
|
546
|
-
] }),
|
|
547
|
-
var
|
|
548
|
-
const c = e.subject, m = e.type, u = (
|
|
557
|
+
n && /* @__PURE__ */ s(Sn, { isPlaying: i, onTimerExpired: c, duration: l })
|
|
558
|
+
] }), Ln = ({ openedQuestion: e, isLoading: t, vote: i, close: n }) => {
|
|
559
|
+
var r, l;
|
|
560
|
+
const c = e.subject, m = e.type, u = (r = e.options) == null ? void 0 : r.options, [h, T] = P(!1), [M, v] = P(""), A = e == null ? void 0 : e.id, D = _(
|
|
549
561
|
async (N) => {
|
|
550
562
|
if (A) {
|
|
551
563
|
const y = N.currentTarget.value;
|
|
@@ -577,9 +589,9 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
|
|
|
577
589
|
onVote: D
|
|
578
590
|
};
|
|
579
591
|
}) : [], [p, h, t, e, d, D, M]), g = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0;
|
|
580
|
-
return /* @__PURE__ */
|
|
581
|
-
g && /* @__PURE__ */
|
|
582
|
-
|
|
592
|
+
return /* @__PURE__ */ s(ie, { "data-question-header": "true", children: /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ f(Bt, { children: [
|
|
593
|
+
g && /* @__PURE__ */ s(
|
|
594
|
+
Ft,
|
|
583
595
|
{
|
|
584
596
|
feedbackMessages: g,
|
|
585
597
|
questionVoted: !!d,
|
|
@@ -589,8 +601,8 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
|
|
|
589
601
|
questionStatus: e.status
|
|
590
602
|
}
|
|
591
603
|
),
|
|
592
|
-
e.type !== z.PREDICTION && /* @__PURE__ */
|
|
593
|
-
|
|
604
|
+
e.type !== z.PREDICTION && /* @__PURE__ */ s(
|
|
605
|
+
$n,
|
|
594
606
|
{
|
|
595
607
|
title: h ? "Time expired" : e.type === z.POLL ? "Time remaining" : "To win",
|
|
596
608
|
points: h ? void 0 : d != null && d.correct ? d == null ? void 0 : d.points : 0,
|
|
@@ -601,43 +613,43 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
|
|
|
601
613
|
timerDuration: d ? 0 : Number(((l = e == null ? void 0 : e.appearance) == null ? void 0 : l.autoHideInterval) || "30")
|
|
602
614
|
}
|
|
603
615
|
),
|
|
604
|
-
h ? /* @__PURE__ */
|
|
605
|
-
|
|
616
|
+
h ? /* @__PURE__ */ s(
|
|
617
|
+
Ut,
|
|
606
618
|
{
|
|
607
619
|
title: "More to come...",
|
|
608
620
|
description: "Watch for additional enhanced stream interactive experience."
|
|
609
621
|
}
|
|
610
622
|
) : /* @__PURE__ */ f($, { children: [
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ s(Ht, { "data-isPrediction": e.type === z.PREDICTION, children: c }),
|
|
624
|
+
/* @__PURE__ */ s(Gt, { children: I.map((N) => /* @__PURE__ */ s(mn, { ...N }, N.id)) })
|
|
613
625
|
] })
|
|
614
626
|
] }) }) });
|
|
615
|
-
},
|
|
627
|
+
}, En = /* @__PURE__ */ a("div")({
|
|
616
628
|
name: "Container",
|
|
617
629
|
class: "cgn5uen",
|
|
618
630
|
propsAsIs: !1
|
|
619
|
-
}),
|
|
631
|
+
}), Rn = /* @__PURE__ */ a("div")({
|
|
620
632
|
name: "Content",
|
|
621
633
|
class: "c1px8nt6",
|
|
622
634
|
propsAsIs: !1
|
|
623
|
-
}),
|
|
635
|
+
}), Qn = /* @__PURE__ */ a("h3")({
|
|
624
636
|
name: "Title",
|
|
625
637
|
class: "t5et2jt",
|
|
626
638
|
propsAsIs: !1
|
|
627
|
-
}),
|
|
639
|
+
}), Un = /* @__PURE__ */ a("div")({
|
|
628
640
|
name: "Description",
|
|
629
641
|
class: "d1i2kpk2",
|
|
630
642
|
propsAsIs: !1
|
|
631
|
-
}),
|
|
643
|
+
}), Pn = /* @__PURE__ */ a("div")({
|
|
632
644
|
name: "DateWrap",
|
|
633
645
|
class: "dd3lh3p",
|
|
634
646
|
propsAsIs: !1
|
|
635
|
-
}),
|
|
647
|
+
}), _n = /* @__PURE__ */ a("img")({
|
|
636
648
|
name: "Image",
|
|
637
649
|
class: "i1gfjeu5",
|
|
638
650
|
propsAsIs: !1
|
|
639
|
-
}),
|
|
640
|
-
const
|
|
651
|
+
}), Le = ({ created: e, image: t, title: i, instantView: n }) => {
|
|
652
|
+
const r = B(() => {
|
|
641
653
|
if (e) {
|
|
642
654
|
const c = new Date(e);
|
|
643
655
|
if (at(c))
|
|
@@ -648,104 +660,106 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
|
|
|
648
660
|
}
|
|
649
661
|
return null;
|
|
650
662
|
}, [e]), l = (n == null ? void 0 : n.image) || t;
|
|
651
|
-
return /* @__PURE__ */ f(
|
|
652
|
-
|
|
653
|
-
|
|
663
|
+
return /* @__PURE__ */ f(En, { children: [
|
|
664
|
+
r && /* @__PURE__ */ f(Pn, { children: [
|
|
665
|
+
r.date,
|
|
654
666
|
" · ",
|
|
655
|
-
|
|
667
|
+
r.time
|
|
656
668
|
] }),
|
|
657
|
-
(n == null ? void 0 : n.video) && /* @__PURE__ */
|
|
658
|
-
l && /* @__PURE__ */
|
|
659
|
-
/* @__PURE__ */ f(
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
669
|
+
(n == null ? void 0 : n.video) && /* @__PURE__ */ s(We, { source: n.video.url, poster: n.video.thumbnailUrl }),
|
|
670
|
+
l && /* @__PURE__ */ s(_n, { src: l }),
|
|
671
|
+
/* @__PURE__ */ f(Rn, { children: [
|
|
672
|
+
/* @__PURE__ */ s(Qn, { children: (n == null ? void 0 : n.heading) || i }),
|
|
673
|
+
/* @__PURE__ */ s(Un, { children: n == null ? void 0 : n.body })
|
|
662
674
|
] })
|
|
663
675
|
] });
|
|
664
|
-
},
|
|
676
|
+
}, qn = /* @__PURE__ */ a("div")({
|
|
665
677
|
name: "Container",
|
|
666
678
|
class: "c1euiow",
|
|
667
679
|
propsAsIs: !1
|
|
668
|
-
}),
|
|
680
|
+
}), Yn = /* @__PURE__ */ a("a")({
|
|
669
681
|
name: "WebLinkBtn",
|
|
670
682
|
class: "w19zie3h",
|
|
671
683
|
propsAsIs: !1
|
|
672
|
-
}),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ f(
|
|
684
|
+
}), Wn = ({ instantView: e, ...t }) => /* @__PURE__ */ f(qn, { children: [
|
|
685
|
+
/* @__PURE__ */ s(Le, { instantView: e, ...t }),
|
|
686
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ f(Yn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
675
687
|
"Explore more of the Masters History",
|
|
676
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ s(j, { name: "icon-external-link" })
|
|
677
689
|
] })
|
|
678
|
-
] }),
|
|
690
|
+
] }), Fn = /* @__PURE__ */ a("div")({
|
|
679
691
|
name: "QuestionContainer",
|
|
680
692
|
class: "qdri6g3",
|
|
681
693
|
propsAsIs: !1
|
|
682
|
-
}),
|
|
694
|
+
}), Vn = ({
|
|
683
695
|
openedQuestion: e
|
|
684
696
|
}) => {
|
|
685
697
|
var t;
|
|
686
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */
|
|
698
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(Wn, {
|
|
687
699
|
created: e.attributes.created,
|
|
688
700
|
...e.attributes.attributes.value
|
|
689
701
|
}) : null;
|
|
690
|
-
},
|
|
702
|
+
}, Bn = ({
|
|
691
703
|
extendedQuestion: e,
|
|
692
704
|
vote: t,
|
|
693
705
|
close: i
|
|
694
706
|
}) => {
|
|
695
707
|
const {
|
|
696
708
|
loading: n,
|
|
697
|
-
data:
|
|
709
|
+
data: r
|
|
698
710
|
} = e;
|
|
699
|
-
return
|
|
711
|
+
return r ? /* @__PURE__ */ s(Ln, {
|
|
700
712
|
vote: t,
|
|
701
713
|
close: i,
|
|
702
|
-
openedQuestion:
|
|
714
|
+
openedQuestion: r,
|
|
703
715
|
isLoading: !!n
|
|
704
716
|
}) : null;
|
|
705
|
-
},
|
|
717
|
+
}, Hn = ({
|
|
706
718
|
gamification: e
|
|
707
719
|
}) => {
|
|
708
720
|
var t;
|
|
709
721
|
const i = w(e.openedQuestion.$store), n = w(e.openedQuestion.$extendedStore);
|
|
710
722
|
if (!i)
|
|
711
723
|
return null;
|
|
712
|
-
const
|
|
713
|
-
return /* @__PURE__ */ f(
|
|
714
|
-
children: [/* @__PURE__ */
|
|
724
|
+
const r = i.type;
|
|
725
|
+
return /* @__PURE__ */ f(Fn, {
|
|
726
|
+
children: [/* @__PURE__ */ s(je, {
|
|
715
727
|
close: e.closeQuestion,
|
|
716
728
|
type: ((t = i.attributes) == null ? void 0 : t.type) || z.UNSET
|
|
717
|
-
}),
|
|
729
|
+
}), r === "question" && /* @__PURE__ */ s(Bn, {
|
|
718
730
|
vote: e.submitAnswer,
|
|
719
731
|
close: e.closeQuestion,
|
|
720
732
|
extendedQuestion: n
|
|
721
|
-
}),
|
|
733
|
+
}), r !== "question" && /* @__PURE__ */ s(Vn, {
|
|
722
734
|
openedQuestion: i
|
|
735
|
+
}), /* @__PURE__ */ s(Lt, {
|
|
736
|
+
sponsorLogo: ""
|
|
723
737
|
})]
|
|
724
738
|
});
|
|
725
|
-
},
|
|
739
|
+
}, Gn = /* @__PURE__ */ a("div")({
|
|
726
740
|
name: "Container",
|
|
727
741
|
class: "c115qtkr",
|
|
728
742
|
propsAsIs: !1
|
|
729
|
-
}),
|
|
743
|
+
}), Zn = /* @__PURE__ */ a("div")({
|
|
730
744
|
name: "STabs",
|
|
731
745
|
class: "sxnslc8",
|
|
732
746
|
propsAsIs: !1
|
|
733
|
-
}),
|
|
747
|
+
}), Jn = /* @__PURE__ */ a("button")({
|
|
734
748
|
name: "Button",
|
|
735
749
|
class: "b1umzux0",
|
|
736
750
|
propsAsIs: !1
|
|
737
|
-
}),
|
|
751
|
+
}), Kn = /* @__PURE__ */ a("span")({
|
|
738
752
|
name: "Title",
|
|
739
753
|
class: "tspsaas",
|
|
740
754
|
propsAsIs: !1
|
|
741
755
|
});
|
|
742
756
|
var H = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(H || {});
|
|
743
|
-
const fe = ({ title: e, active: t, onClick: i }) => /* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
757
|
+
const fe = ({ title: e, active: t, onClick: i }) => /* @__PURE__ */ s(Jn, { onClick: i, "data-selected": t, children: /* @__PURE__ */ s(Kn, { children: e }) }), Xn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(Gn, { children: /* @__PURE__ */ f(Zn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
758
|
+
/* @__PURE__ */ s(fe, { title: "Home", active: e === "home", onClick: () => t(
|
|
745
759
|
"home"
|
|
746
760
|
/* HOME */
|
|
747
761
|
) }),
|
|
748
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ s(
|
|
749
763
|
fe,
|
|
750
764
|
{
|
|
751
765
|
title: "Leader Board",
|
|
@@ -773,38 +787,38 @@ function ge(e) {
|
|
|
773
787
|
return e;
|
|
774
788
|
}
|
|
775
789
|
function ne(e, t) {
|
|
776
|
-
return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n,
|
|
777
|
-
return n.__proto__ =
|
|
790
|
+
return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
791
|
+
return n.__proto__ = r, n;
|
|
778
792
|
}, ne(e, t);
|
|
779
793
|
}
|
|
780
|
-
function
|
|
794
|
+
function ei(e, t) {
|
|
781
795
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ne(e, t);
|
|
782
796
|
}
|
|
783
797
|
var ve = Number.isNaN || function(t) {
|
|
784
798
|
return typeof t == "number" && t !== t;
|
|
785
799
|
};
|
|
786
|
-
function
|
|
800
|
+
function ti(e, t) {
|
|
787
801
|
return !!(e === t || ve(e) && ve(t));
|
|
788
802
|
}
|
|
789
|
-
function
|
|
803
|
+
function ni(e, t) {
|
|
790
804
|
if (e.length !== t.length)
|
|
791
805
|
return !1;
|
|
792
806
|
for (var i = 0; i < e.length; i++)
|
|
793
|
-
if (!
|
|
807
|
+
if (!ti(e[i], t[i]))
|
|
794
808
|
return !1;
|
|
795
809
|
return !0;
|
|
796
810
|
}
|
|
797
811
|
function K(e, t) {
|
|
798
|
-
t === void 0 && (t =
|
|
799
|
-
var i, n = [],
|
|
812
|
+
t === void 0 && (t = ni);
|
|
813
|
+
var i, n = [], r, l = !1;
|
|
800
814
|
function c() {
|
|
801
815
|
for (var m = [], u = 0; u < arguments.length; u++)
|
|
802
816
|
m[u] = arguments[u];
|
|
803
|
-
return l && i === this && t(m, n) || (
|
|
817
|
+
return l && i === this && t(m, n) || (r = e.apply(this, m), l = !0, i = this, n = m), r;
|
|
804
818
|
}
|
|
805
819
|
return c;
|
|
806
820
|
}
|
|
807
|
-
var
|
|
821
|
+
var ii = typeof performance == "object" && typeof performance.now == "function", Me = ii ? function() {
|
|
808
822
|
return performance.now();
|
|
809
823
|
} : function() {
|
|
810
824
|
return Date.now();
|
|
@@ -812,15 +826,15 @@ var Xn = typeof performance == "object" && typeof performance.now == "function",
|
|
|
812
826
|
function ye(e) {
|
|
813
827
|
cancelAnimationFrame(e.id);
|
|
814
828
|
}
|
|
815
|
-
function
|
|
829
|
+
function si(e, t) {
|
|
816
830
|
var i = Me();
|
|
817
831
|
function n() {
|
|
818
|
-
Me() - i >= t ? e.call(null) :
|
|
832
|
+
Me() - i >= t ? e.call(null) : r.id = requestAnimationFrame(n);
|
|
819
833
|
}
|
|
820
|
-
var
|
|
834
|
+
var r = {
|
|
821
835
|
id: requestAnimationFrame(n)
|
|
822
836
|
};
|
|
823
|
-
return
|
|
837
|
+
return r;
|
|
824
838
|
}
|
|
825
839
|
var X = -1;
|
|
826
840
|
function Ne(e) {
|
|
@@ -835,18 +849,18 @@ function Te(e) {
|
|
|
835
849
|
if (e === void 0 && (e = !1), b === null || e) {
|
|
836
850
|
var t = document.createElement("div"), i = t.style;
|
|
837
851
|
i.width = "50px", i.height = "50px", i.overflow = "scroll", i.direction = "rtl";
|
|
838
|
-
var n = document.createElement("div"),
|
|
839
|
-
return
|
|
852
|
+
var n = document.createElement("div"), r = n.style;
|
|
853
|
+
return r.width = "100px", r.height = "100px", t.appendChild(n), document.body.appendChild(t), t.scrollLeft > 0 ? b = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? b = "negative" : b = "positive-ascending"), document.body.removeChild(t), b;
|
|
840
854
|
}
|
|
841
855
|
return b;
|
|
842
856
|
}
|
|
843
|
-
var
|
|
857
|
+
var ri = 150, oi = function(t, i) {
|
|
844
858
|
return t;
|
|
845
859
|
};
|
|
846
|
-
function
|
|
847
|
-
var t, i = e.getItemOffset, n = e.getEstimatedTotalSize,
|
|
860
|
+
function ai(e) {
|
|
861
|
+
var t, i = e.getItemOffset, n = e.getEstimatedTotalSize, r = e.getItemSize, l = e.getOffsetForIndexAndAlignment, c = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, u = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, T = e.validateProps;
|
|
848
862
|
return t = /* @__PURE__ */ function(M) {
|
|
849
|
-
|
|
863
|
+
ei(v, M);
|
|
850
864
|
function v(D) {
|
|
851
865
|
var o;
|
|
852
866
|
return o = M.call(this, D) || this, o._instanceProps = u(o.props, ge(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
|
|
@@ -873,7 +887,7 @@ function ii(e) {
|
|
|
873
887
|
if (y.hasOwnProperty(d))
|
|
874
888
|
S = y[d];
|
|
875
889
|
else {
|
|
876
|
-
var x = i(o.props, d, o._instanceProps), O =
|
|
890
|
+
var x = i(o.props, d, o._instanceProps), O = r(o.props, d, o._instanceProps), k = I === "horizontal" || N === "horizontal", q = I === "rtl", Y = k ? x : 0;
|
|
877
891
|
y[d] = S = {
|
|
878
892
|
position: "absolute",
|
|
879
893
|
left: q ? void 0 : Y,
|
|
@@ -925,7 +939,7 @@ function ii(e) {
|
|
|
925
939
|
var p = o.props.outerRef;
|
|
926
940
|
o._outerRef = d, typeof p == "function" ? p(d) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = d);
|
|
927
941
|
}, o._resetIsScrollingDebounced = function() {
|
|
928
|
-
o._resetIsScrollingTimeoutId !== null && ye(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId =
|
|
942
|
+
o._resetIsScrollingTimeoutId !== null && ye(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = si(o._resetIsScrolling, ri);
|
|
929
943
|
}, o._resetIsScrolling = function() {
|
|
930
944
|
o._resetIsScrollingTimeoutId = null, o.setState({
|
|
931
945
|
isScrolling: !1
|
|
@@ -935,7 +949,7 @@ function ii(e) {
|
|
|
935
949
|
}, o;
|
|
936
950
|
}
|
|
937
951
|
v.getDerivedStateFromProps = function(o, d) {
|
|
938
|
-
return
|
|
952
|
+
return li(o, d), T(o), null;
|
|
939
953
|
};
|
|
940
954
|
var A = v.prototype;
|
|
941
955
|
return A.scrollTo = function(o) {
|
|
@@ -990,7 +1004,7 @@ function ii(e) {
|
|
|
990
1004
|
}, A.componentWillUnmount = function() {
|
|
991
1005
|
this._resetIsScrollingTimeoutId !== null && ye(this._resetIsScrollingTimeoutId);
|
|
992
1006
|
}, A.render = function() {
|
|
993
|
-
var o = this.props, d = o.children, p = o.className, I = o.direction, g = o.height, N = o.innerRef, y = o.innerElementType, S = o.innerTagName, x = o.itemCount, O = o.itemData, k = o.itemKey, q = k === void 0 ?
|
|
1007
|
+
var o = this.props, d = o.children, p = o.className, I = o.direction, g = o.height, N = o.innerRef, y = o.innerElementType, S = o.innerTagName, x = o.itemCount, O = o.itemData, k = o.itemKey, q = k === void 0 ? oi : k, Y = o.layout, Ee = o.outerElementType, Re = o.outerTagName, Qe = o.style, Ue = o.useIsScrolling, Pe = o.width, se = this.state.isScrolling, G = I === "horizontal" || Y === "horizontal", _e = G ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), qe = re[0], Ye = re[1], oe = [];
|
|
994
1008
|
if (x > 0)
|
|
995
1009
|
for (var R = qe; R <= Ye; R++)
|
|
996
1010
|
oe.push(Z(d, {
|
|
@@ -1001,7 +1015,7 @@ function ii(e) {
|
|
|
1001
1015
|
style: this._getItemStyle(R)
|
|
1002
1016
|
}));
|
|
1003
1017
|
var ae = n(this.props, this._instanceProps);
|
|
1004
|
-
return Z(
|
|
1018
|
+
return Z(Ee || Re || "div", {
|
|
1005
1019
|
className: p,
|
|
1006
1020
|
onScroll: _e,
|
|
1007
1021
|
ref: this._outerRefSetter,
|
|
@@ -1050,9 +1064,9 @@ function ii(e) {
|
|
|
1050
1064
|
useIsScrolling: !1
|
|
1051
1065
|
}, t;
|
|
1052
1066
|
}
|
|
1053
|
-
var
|
|
1067
|
+
var li = function(t, i) {
|
|
1054
1068
|
t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, i.instance;
|
|
1055
|
-
},
|
|
1069
|
+
}, ci = /* @__PURE__ */ ai({
|
|
1056
1070
|
getItemOffset: function(t, i) {
|
|
1057
1071
|
var n = t.itemSize;
|
|
1058
1072
|
return i * n;
|
|
@@ -1065,9 +1079,9 @@ var si = function(t, i) {
|
|
|
1065
1079
|
var i = t.itemCount, n = t.itemSize;
|
|
1066
1080
|
return n * i;
|
|
1067
1081
|
},
|
|
1068
|
-
getOffsetForIndexAndAlignment: function(t, i, n,
|
|
1082
|
+
getOffsetForIndexAndAlignment: function(t, i, n, r, l, c) {
|
|
1069
1083
|
var m = t.direction, u = t.height, h = t.itemCount, T = t.itemSize, M = t.layout, v = t.width, A = m === "horizontal" || M === "horizontal", D = A ? v : u, o = Math.max(0, h * T - D), d = Math.min(o, i * T), p = Math.max(0, i * T - D + T + c);
|
|
1070
|
-
switch (n === "smart" && (
|
|
1084
|
+
switch (n === "smart" && (r >= p - D && r <= d + D ? n = "auto" : n = "center"), n) {
|
|
1071
1085
|
case "start":
|
|
1072
1086
|
return d;
|
|
1073
1087
|
case "end":
|
|
@@ -1078,15 +1092,15 @@ var si = function(t, i) {
|
|
|
1078
1092
|
}
|
|
1079
1093
|
case "auto":
|
|
1080
1094
|
default:
|
|
1081
|
-
return
|
|
1095
|
+
return r >= p && r <= d ? r : r < p ? p : d;
|
|
1082
1096
|
}
|
|
1083
1097
|
},
|
|
1084
1098
|
getStartIndexForOffset: function(t, i) {
|
|
1085
|
-
var n = t.itemCount,
|
|
1086
|
-
return Math.max(0, Math.min(n - 1, Math.floor(i /
|
|
1099
|
+
var n = t.itemCount, r = t.itemSize;
|
|
1100
|
+
return Math.max(0, Math.min(n - 1, Math.floor(i / r)));
|
|
1087
1101
|
},
|
|
1088
1102
|
getStopIndexForStartIndex: function(t, i, n) {
|
|
1089
|
-
var
|
|
1103
|
+
var r = t.direction, l = t.height, c = t.itemCount, m = t.itemSize, u = t.layout, h = t.width, T = r === "horizontal" || u === "horizontal", M = i * m, v = T ? h : l, A = Math.ceil((v + n - M) / m);
|
|
1090
1104
|
return Math.max(0, Math.min(
|
|
1091
1105
|
c - 1,
|
|
1092
1106
|
i + A - 1
|
|
@@ -1100,12 +1114,12 @@ var si = function(t, i) {
|
|
|
1100
1114
|
t.itemSize;
|
|
1101
1115
|
}
|
|
1102
1116
|
});
|
|
1103
|
-
function
|
|
1104
|
-
var t = e.lastRenderedStartIndex, i = e.lastRenderedStopIndex, n = e.startIndex,
|
|
1105
|
-
return !(n > i ||
|
|
1117
|
+
function di(e) {
|
|
1118
|
+
var t = e.lastRenderedStartIndex, i = e.lastRenderedStopIndex, n = e.startIndex, r = e.stopIndex;
|
|
1119
|
+
return !(n > i || r < t);
|
|
1106
1120
|
}
|
|
1107
|
-
function
|
|
1108
|
-
for (var t = e.isItemLoaded, i = e.itemCount, n = e.minimumBatchSize,
|
|
1121
|
+
function ui(e) {
|
|
1122
|
+
for (var t = e.isItemLoaded, i = e.itemCount, n = e.minimumBatchSize, r = e.startIndex, l = e.stopIndex, c = [], m = null, u = null, h = r; h <= l; h++) {
|
|
1109
1123
|
var T = t(h);
|
|
1110
1124
|
T ? u !== null && (c.push(m, u), m = u = null) : (u = h, m === null && (m = h));
|
|
1111
1125
|
}
|
|
@@ -1124,20 +1138,20 @@ function ai(e) {
|
|
|
1124
1138
|
}
|
|
1125
1139
|
return c;
|
|
1126
1140
|
}
|
|
1127
|
-
var
|
|
1141
|
+
var pi = function(e, t) {
|
|
1128
1142
|
if (!(e instanceof t))
|
|
1129
1143
|
throw new TypeError("Cannot call a class as a function");
|
|
1130
|
-
},
|
|
1144
|
+
}, mi = function() {
|
|
1131
1145
|
function e(t, i) {
|
|
1132
1146
|
for (var n = 0; n < i.length; n++) {
|
|
1133
|
-
var
|
|
1134
|
-
|
|
1147
|
+
var r = i[n];
|
|
1148
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
1135
1149
|
}
|
|
1136
1150
|
}
|
|
1137
1151
|
return function(t, i, n) {
|
|
1138
1152
|
return i && e(t.prototype, i), n && e(t, n), t;
|
|
1139
1153
|
};
|
|
1140
|
-
}(),
|
|
1154
|
+
}(), hi = function(e, t) {
|
|
1141
1155
|
if (typeof t != "function" && t !== null)
|
|
1142
1156
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
1143
1157
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1152,21 +1166,21 @@ var li = function(e, t) {
|
|
|
1152
1166
|
if (!e)
|
|
1153
1167
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1154
1168
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
1155
|
-
},
|
|
1156
|
-
|
|
1169
|
+
}, Ii = function(e) {
|
|
1170
|
+
hi(t, e);
|
|
1157
1171
|
function t() {
|
|
1158
|
-
var i, n,
|
|
1159
|
-
|
|
1172
|
+
var i, n, r, l;
|
|
1173
|
+
pi(this, t);
|
|
1160
1174
|
for (var c = arguments.length, m = Array(c), u = 0; u < c; u++)
|
|
1161
1175
|
m[u] = arguments[u];
|
|
1162
|
-
return l = (n = (
|
|
1176
|
+
return l = (n = (r = Ae(this, (i = t.__proto__ || Object.getPrototypeOf(t)).call.apply(i, [this].concat(m))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(h) {
|
|
1163
1177
|
var T = h.visibleStartIndex, M = h.visibleStopIndex;
|
|
1164
|
-
|
|
1165
|
-
},
|
|
1166
|
-
|
|
1167
|
-
}, n), Ae(
|
|
1178
|
+
r._lastRenderedStartIndex = T, r._lastRenderedStopIndex = M, r._ensureRowsLoaded(T, M);
|
|
1179
|
+
}, r._setRef = function(h) {
|
|
1180
|
+
r._listRef = h;
|
|
1181
|
+
}, n), Ae(r, l);
|
|
1168
1182
|
}
|
|
1169
|
-
return
|
|
1183
|
+
return mi(t, [{
|
|
1170
1184
|
key: "resetloadMoreItemsCache",
|
|
1171
1185
|
value: function() {
|
|
1172
1186
|
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1187,13 +1201,13 @@ var li = function(e, t) {
|
|
|
1187
1201
|
}
|
|
1188
1202
|
}, {
|
|
1189
1203
|
key: "_ensureRowsLoaded",
|
|
1190
|
-
value: function(n,
|
|
1191
|
-
var l = this.props, c = l.isItemLoaded, m = l.itemCount, u = l.minimumBatchSize, h = u === void 0 ? 10 : u, T = l.threshold, M = T === void 0 ? 15 : T, v =
|
|
1204
|
+
value: function(n, r) {
|
|
1205
|
+
var l = this.props, c = l.isItemLoaded, m = l.itemCount, u = l.minimumBatchSize, h = u === void 0 ? 10 : u, T = l.threshold, M = T === void 0 ? 15 : T, v = ui({
|
|
1192
1206
|
isItemLoaded: c,
|
|
1193
1207
|
itemCount: m,
|
|
1194
1208
|
minimumBatchSize: h,
|
|
1195
1209
|
startIndex: Math.max(0, n - M),
|
|
1196
|
-
stopIndex: Math.min(m - 1,
|
|
1210
|
+
stopIndex: Math.min(m - 1, r + M)
|
|
1197
1211
|
});
|
|
1198
1212
|
(this._memoizedUnloadedRanges.length !== v.length || this._memoizedUnloadedRanges.some(function(A, D) {
|
|
1199
1213
|
return v[D] !== A;
|
|
@@ -1202,18 +1216,18 @@ var li = function(e, t) {
|
|
|
1202
1216
|
}, {
|
|
1203
1217
|
key: "_loadUnloadedRanges",
|
|
1204
1218
|
value: function(n) {
|
|
1205
|
-
for (var
|
|
1219
|
+
for (var r = this, l = this.props.loadMoreItems || this.props.loadMoreRows, c = function(h) {
|
|
1206
1220
|
var T = n[h], M = n[h + 1], v = l(T, M);
|
|
1207
1221
|
v != null && v.then(function() {
|
|
1208
|
-
if (
|
|
1209
|
-
lastRenderedStartIndex:
|
|
1210
|
-
lastRenderedStopIndex:
|
|
1222
|
+
if (di({
|
|
1223
|
+
lastRenderedStartIndex: r._lastRenderedStartIndex,
|
|
1224
|
+
lastRenderedStopIndex: r._lastRenderedStopIndex,
|
|
1211
1225
|
startIndex: T,
|
|
1212
1226
|
stopIndex: M
|
|
1213
1227
|
})) {
|
|
1214
|
-
if (
|
|
1228
|
+
if (r._listRef == null)
|
|
1215
1229
|
return;
|
|
1216
|
-
typeof
|
|
1230
|
+
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(T, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
|
|
1217
1231
|
}
|
|
1218
1232
|
});
|
|
1219
1233
|
}, m = 0; m < n.length; m += 2)
|
|
@@ -1221,82 +1235,82 @@ var li = function(e, t) {
|
|
|
1221
1235
|
}
|
|
1222
1236
|
}]), t;
|
|
1223
1237
|
}(xe);
|
|
1224
|
-
const
|
|
1238
|
+
const fi = /* @__PURE__ */ a("div")({
|
|
1225
1239
|
name: "Container",
|
|
1226
1240
|
class: "culdu4a",
|
|
1227
1241
|
propsAsIs: !1
|
|
1228
|
-
}),
|
|
1242
|
+
}), gi = /* @__PURE__ */ a("div")({
|
|
1229
1243
|
name: "Position",
|
|
1230
1244
|
class: "pwf8e69",
|
|
1231
1245
|
propsAsIs: !1
|
|
1232
|
-
}),
|
|
1246
|
+
}), vi = /* @__PURE__ */ a("img")({
|
|
1233
1247
|
name: "Avatar",
|
|
1234
1248
|
class: "atf4yh4",
|
|
1235
1249
|
propsAsIs: !1
|
|
1236
|
-
}),
|
|
1250
|
+
}), Mi = /* @__PURE__ */ a("div")({
|
|
1237
1251
|
name: "AvatarPlaceholder",
|
|
1238
1252
|
class: "a1dg29ja",
|
|
1239
1253
|
propsAsIs: !1
|
|
1240
|
-
}),
|
|
1254
|
+
}), yi = /* @__PURE__ */ a("div")({
|
|
1241
1255
|
name: "Content",
|
|
1242
1256
|
class: "c10a68rc",
|
|
1243
1257
|
propsAsIs: !1
|
|
1244
|
-
}),
|
|
1258
|
+
}), Ni = /* @__PURE__ */ a("div")({
|
|
1245
1259
|
name: "NameContainer",
|
|
1246
1260
|
class: "nc4kck5",
|
|
1247
1261
|
propsAsIs: !1
|
|
1248
|
-
}),
|
|
1262
|
+
}), Ti = /* @__PURE__ */ a("span")({
|
|
1249
1263
|
name: "Name",
|
|
1250
1264
|
class: "njsrqgr",
|
|
1251
1265
|
propsAsIs: !1
|
|
1252
|
-
}),
|
|
1266
|
+
}), Ai = () => j, Di = /* @__PURE__ */ a(Ai())({
|
|
1253
1267
|
name: "CurrentUserBadge",
|
|
1254
1268
|
class: "c17uc4zr",
|
|
1255
1269
|
propsAsIs: !0
|
|
1256
|
-
}),
|
|
1270
|
+
}), Si = ({
|
|
1257
1271
|
rank: e,
|
|
1258
1272
|
avatar: t,
|
|
1259
1273
|
name: i,
|
|
1260
1274
|
points: n,
|
|
1261
|
-
isCurrentUser:
|
|
1275
|
+
isCurrentUser: r,
|
|
1262
1276
|
openItemDetail: l,
|
|
1263
1277
|
style: c
|
|
1264
|
-
}) => /* @__PURE__ */ f(
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */ f(
|
|
1267
|
-
t ? /* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */ f(
|
|
1269
|
-
/* @__PURE__ */
|
|
1270
|
-
|
|
1278
|
+
}) => /* @__PURE__ */ f(fi, { onClick: l, style: c, children: [
|
|
1279
|
+
/* @__PURE__ */ s(gi, { children: e || 0 }),
|
|
1280
|
+
/* @__PURE__ */ f(yi, { children: [
|
|
1281
|
+
t ? /* @__PURE__ */ s(vi, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(Mi, { children: Oe(i || "") }),
|
|
1282
|
+
/* @__PURE__ */ f(Ni, { children: [
|
|
1283
|
+
/* @__PURE__ */ s(Ti, { children: i || "" }),
|
|
1284
|
+
r && /* @__PURE__ */ s(Di, { name: "icon-star" })
|
|
1271
1285
|
] })
|
|
1272
1286
|
] }),
|
|
1273
|
-
/* @__PURE__ */
|
|
1274
|
-
] }),
|
|
1287
|
+
/* @__PURE__ */ s("div", { children: ke(n) })
|
|
1288
|
+
] }), zi = /* @__PURE__ */ a("div")({
|
|
1275
1289
|
name: "ScrollContainer",
|
|
1276
1290
|
class: "s13d8sg6",
|
|
1277
1291
|
propsAsIs: !1
|
|
1278
|
-
}),
|
|
1292
|
+
}), xi = ({
|
|
1279
1293
|
items: e,
|
|
1280
1294
|
currentUserId: t,
|
|
1281
1295
|
openItemDetail: i,
|
|
1282
1296
|
fetchMore: n
|
|
1283
|
-
}) => /* @__PURE__ */
|
|
1284
|
-
|
|
1297
|
+
}) => /* @__PURE__ */ s(Fe, { children: ({ width: r, height: l }) => /* @__PURE__ */ s(
|
|
1298
|
+
Ii,
|
|
1285
1299
|
{
|
|
1286
1300
|
isItemLoaded: (c) => c < e.length,
|
|
1287
1301
|
itemCount: e.length + 1,
|
|
1288
1302
|
loadMoreItems: n,
|
|
1289
|
-
children: ({ onItemsRendered: c, ref: m }) => /* @__PURE__ */
|
|
1290
|
-
|
|
1303
|
+
children: ({ onItemsRendered: c, ref: m }) => /* @__PURE__ */ s(zi, { children: /* @__PURE__ */ s(
|
|
1304
|
+
ci,
|
|
1291
1305
|
{
|
|
1292
1306
|
itemSize: 56,
|
|
1293
1307
|
onItemsRendered: c,
|
|
1294
1308
|
ref: m,
|
|
1295
1309
|
itemCount: e.length,
|
|
1296
|
-
width:
|
|
1310
|
+
width: r,
|
|
1297
1311
|
height: l,
|
|
1298
|
-
children: ({ index: u, style: h }) => /* @__PURE__ */
|
|
1299
|
-
|
|
1312
|
+
children: ({ index: u, style: h }) => /* @__PURE__ */ s(
|
|
1313
|
+
Si,
|
|
1300
1314
|
{
|
|
1301
1315
|
style: { ...h, maxHeight: 48 },
|
|
1302
1316
|
...e[u],
|
|
@@ -1308,12 +1322,12 @@ const pi = /* @__PURE__ */ a("div")({
|
|
|
1308
1322
|
}
|
|
1309
1323
|
) })
|
|
1310
1324
|
}
|
|
1311
|
-
) }),
|
|
1312
|
-
const { data: t } = w(e.$store);
|
|
1313
|
-
return /* @__PURE__ */
|
|
1314
|
-
|
|
1325
|
+
) }), ji = ({ deepLink: e }) => {
|
|
1326
|
+
const { data: t } = w(e.$store), i = t == null ? void 0 : t.url, n = e.desktopLink;
|
|
1327
|
+
return /* @__PURE__ */ s(
|
|
1328
|
+
Ve,
|
|
1315
1329
|
{
|
|
1316
|
-
inviteLink:
|
|
1330
|
+
inviteLink: i || n,
|
|
1317
1331
|
socialLinks: [
|
|
1318
1332
|
{
|
|
1319
1333
|
icon: "icon-facebook",
|
|
@@ -1330,126 +1344,126 @@ const pi = /* @__PURE__ */ a("div")({
|
|
|
1330
1344
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1331
1345
|
}
|
|
1332
1346
|
);
|
|
1333
|
-
},
|
|
1347
|
+
}, Oi = ({ gamification: e }) => {
|
|
1334
1348
|
const { data: t } = w(e.leaderboardList.$store);
|
|
1335
|
-
return t != null && t.length ? /* @__PURE__ */
|
|
1336
|
-
|
|
1349
|
+
return t != null && t.length ? /* @__PURE__ */ s(
|
|
1350
|
+
xi,
|
|
1337
1351
|
{
|
|
1338
1352
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1339
1353
|
items: t,
|
|
1340
1354
|
openItemDetail: e.openUser,
|
|
1341
1355
|
currentUserId: e.currentUserId.get()
|
|
1342
1356
|
}
|
|
1343
|
-
) : /* @__PURE__ */
|
|
1344
|
-
},
|
|
1357
|
+
) : /* @__PURE__ */ s(ji, { deepLink: e.deepLink });
|
|
1358
|
+
}, ki = /* @__PURE__ */ a("div")({
|
|
1345
1359
|
name: "QuestionItem",
|
|
1346
1360
|
class: "q1w97g3p",
|
|
1347
1361
|
propsAsIs: !1
|
|
1348
|
-
}),
|
|
1362
|
+
}), wi = /* @__PURE__ */ a("div")({
|
|
1349
1363
|
name: "QuestionCaption",
|
|
1350
1364
|
class: "q2sl39u",
|
|
1351
1365
|
propsAsIs: !1
|
|
1352
|
-
}),
|
|
1366
|
+
}), Ci = /* @__PURE__ */ a("div")({
|
|
1353
1367
|
name: "QuestionBody",
|
|
1354
1368
|
class: "qd5h0uc",
|
|
1355
1369
|
propsAsIs: !1
|
|
1356
|
-
}),
|
|
1370
|
+
}), bi = /* @__PURE__ */ a("div")({
|
|
1357
1371
|
name: "QuestionAction",
|
|
1358
1372
|
class: "q105uluy",
|
|
1359
1373
|
propsAsIs: !1
|
|
1360
|
-
}),
|
|
1374
|
+
}), $i = () => j, V = /* @__PURE__ */ a($i())({
|
|
1361
1375
|
name: "QuestionActionIcon",
|
|
1362
1376
|
class: "q1fa0b9h",
|
|
1363
1377
|
propsAsIs: !0
|
|
1364
|
-
}),
|
|
1378
|
+
}), Li = () => j, Ei = /* @__PURE__ */ a(Li())({
|
|
1365
1379
|
name: "QuestionTypeIcon",
|
|
1366
1380
|
class: "qxlt78s",
|
|
1367
1381
|
propsAsIs: !0
|
|
1368
|
-
}),
|
|
1382
|
+
}), Ri = /* @__PURE__ */ a("div")({
|
|
1369
1383
|
name: "QuestionTypeLabel",
|
|
1370
1384
|
class: "qmg0vkx",
|
|
1371
1385
|
propsAsIs: !1
|
|
1372
|
-
}),
|
|
1386
|
+
}), Qi = /* @__PURE__ */ a("div")({
|
|
1373
1387
|
name: "QuestionContent",
|
|
1374
1388
|
class: "q1uz5j1g",
|
|
1375
1389
|
propsAsIs: !1
|
|
1376
|
-
}),
|
|
1390
|
+
}), Ui = /* @__PURE__ */ a("button")({
|
|
1377
1391
|
name: "PlayButton",
|
|
1378
1392
|
class: "p1pba9p1",
|
|
1379
1393
|
propsAsIs: !1
|
|
1380
|
-
}),
|
|
1381
|
-
[W.LOST]: /* @__PURE__ */
|
|
1382
|
-
[W.WON]: /* @__PURE__ */
|
|
1383
|
-
[W.UNSET]: /* @__PURE__ */
|
|
1384
|
-
[W.DNP]: /* @__PURE__ */
|
|
1385
|
-
},
|
|
1394
|
+
}), Pi = {
|
|
1395
|
+
[W.LOST]: /* @__PURE__ */ s(V, { name: "incorrectVoted" }),
|
|
1396
|
+
[W.WON]: /* @__PURE__ */ s(V, { name: "icon-check" }),
|
|
1397
|
+
[W.UNSET]: /* @__PURE__ */ s(V, { name: "icon-arrow" }),
|
|
1398
|
+
[W.DNP]: /* @__PURE__ */ s(V, { name: "icon-arrow" })
|
|
1399
|
+
}, _i = ({
|
|
1386
1400
|
questionId: e,
|
|
1387
1401
|
questionType: t,
|
|
1388
1402
|
questionStatus: i,
|
|
1389
1403
|
subject: n,
|
|
1390
|
-
openForVoting:
|
|
1404
|
+
openForVoting: r,
|
|
1391
1405
|
openQuestion: l,
|
|
1392
1406
|
status: c
|
|
1393
1407
|
}) => {
|
|
1394
|
-
const m = Se[t], u =
|
|
1395
|
-
return m ? /* @__PURE__ */ f(
|
|
1396
|
-
/* @__PURE__ */ f(
|
|
1397
|
-
/* @__PURE__ */ f(
|
|
1398
|
-
/* @__PURE__ */
|
|
1399
|
-
|
|
1408
|
+
const m = Se[t], u = Pi[c];
|
|
1409
|
+
return m ? /* @__PURE__ */ f(ki, { onClick: () => l == null ? void 0 : l(e), children: [
|
|
1410
|
+
/* @__PURE__ */ f(Qi, { children: [
|
|
1411
|
+
/* @__PURE__ */ f(wi, { children: [
|
|
1412
|
+
/* @__PURE__ */ s(
|
|
1413
|
+
Ei,
|
|
1400
1414
|
{
|
|
1401
1415
|
"data-type-trivia": t === z.TRIVIA,
|
|
1402
1416
|
"data-type-poll": t === z.POLL,
|
|
1403
1417
|
name: m.iconName
|
|
1404
1418
|
}
|
|
1405
1419
|
),
|
|
1406
|
-
/* @__PURE__ */ f(
|
|
1420
|
+
/* @__PURE__ */ f(Ri, { children: [
|
|
1407
1421
|
m.label,
|
|
1408
|
-
t === z.TRIVIA && i ===
|
|
1422
|
+
t === z.TRIVIA && i === L.RESOLVED && " • Expired"
|
|
1409
1423
|
] })
|
|
1410
1424
|
] }),
|
|
1411
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ s(Ci, { children: n || "" })
|
|
1412
1426
|
] }),
|
|
1413
|
-
/* @__PURE__ */
|
|
1427
|
+
/* @__PURE__ */ s(bi, { children: r ? /* @__PURE__ */ s(Ui, { children: "Play" }) : u })
|
|
1414
1428
|
] }) : null;
|
|
1415
|
-
},
|
|
1429
|
+
}, qi = /* @__PURE__ */ a("div")({
|
|
1416
1430
|
name: "Container",
|
|
1417
1431
|
class: "cll3md7",
|
|
1418
1432
|
propsAsIs: !1
|
|
1419
|
-
}),
|
|
1433
|
+
}), Yi = /* @__PURE__ */ a("button")({
|
|
1420
1434
|
name: "ActionBtn",
|
|
1421
1435
|
class: "a10g1iik",
|
|
1422
1436
|
propsAsIs: !1
|
|
1423
|
-
}),
|
|
1437
|
+
}), Wi = ({
|
|
1424
1438
|
openInsight: e,
|
|
1425
1439
|
questionId: t,
|
|
1426
1440
|
...i
|
|
1427
|
-
}) => /* @__PURE__ */ f(
|
|
1428
|
-
/* @__PURE__ */
|
|
1429
|
-
e && /* @__PURE__ */
|
|
1430
|
-
] }),
|
|
1441
|
+
}) => /* @__PURE__ */ f(qi, { children: [
|
|
1442
|
+
/* @__PURE__ */ s(Le, { questionId: t, ...i }),
|
|
1443
|
+
e && /* @__PURE__ */ s(Yi, { onClick: () => e(t), children: "View Insight" })
|
|
1444
|
+
] }), Fi = /* @__PURE__ */ a("div")({
|
|
1431
1445
|
name: "QuestionsContainer",
|
|
1432
1446
|
class: "qvghv3l",
|
|
1433
1447
|
propsAsIs: !1
|
|
1434
|
-
}),
|
|
1435
|
-
var n,
|
|
1448
|
+
}), Vi = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Fi, { children: e == null ? void 0 : e.map((i) => {
|
|
1449
|
+
var n, r;
|
|
1436
1450
|
if (i.type === "question" && ((n = i.attributes) == null ? void 0 : n.attributes.case) === "question") {
|
|
1437
1451
|
const l = i.attributes.attributes.value;
|
|
1438
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ s(_i, { openQuestion: t, ...l }, l.questionId);
|
|
1439
1453
|
}
|
|
1440
|
-
if (i.type === "insight" && ((
|
|
1454
|
+
if (i.type === "insight" && ((r = i.attributes) == null ? void 0 : r.attributes.case) === "insight") {
|
|
1441
1455
|
const l = i.attributes.attributes.value;
|
|
1442
|
-
return /* @__PURE__ */
|
|
1456
|
+
return /* @__PURE__ */ s(Wi, { openInsight: t, ...l }, l.questionId);
|
|
1443
1457
|
}
|
|
1444
1458
|
return null;
|
|
1445
|
-
}) }),
|
|
1459
|
+
}) }), Bi = ({ store: e, openQuestion: t }) => {
|
|
1446
1460
|
const i = w(e);
|
|
1447
|
-
return i != null && i.data ? /* @__PURE__ */
|
|
1448
|
-
},
|
|
1461
|
+
return i != null && i.data ? /* @__PURE__ */ s(Vi, { openQuestion: t, questions: i.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1462
|
+
}, Hi = ({ userSummary: e }) => {
|
|
1449
1463
|
var t, i;
|
|
1450
1464
|
const n = w(e.getStore());
|
|
1451
|
-
return (t = n.data) != null && t.summary ? /* @__PURE__ */
|
|
1452
|
-
},
|
|
1465
|
+
return (t = n.data) != null && t.summary ? /* @__PURE__ */ s(we, { ...n.data.summary, successRate: (i = n.data.percentage) == null ? void 0 : i.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1466
|
+
}, Gi = ({
|
|
1453
1467
|
gamification: e
|
|
1454
1468
|
}) => {
|
|
1455
1469
|
const [t, i] = P(H.HOME);
|
|
@@ -1460,82 +1474,82 @@ const pi = /* @__PURE__ */ a("div")({
|
|
|
1460
1474
|
flexDirection: "column",
|
|
1461
1475
|
overflow: "hidden"
|
|
1462
1476
|
},
|
|
1463
|
-
children: [/* @__PURE__ */
|
|
1477
|
+
children: [/* @__PURE__ */ s(ee, {
|
|
1464
1478
|
style: {
|
|
1465
1479
|
paddingBottom: "4px"
|
|
1466
1480
|
},
|
|
1467
|
-
children: /* @__PURE__ */
|
|
1481
|
+
children: /* @__PURE__ */ s(Xn, {
|
|
1468
1482
|
activePage: t,
|
|
1469
1483
|
toggleActivePage: i
|
|
1470
1484
|
})
|
|
1471
1485
|
}), t === H.HOME && /* @__PURE__ */ f(ie, {
|
|
1472
|
-
children: [/* @__PURE__ */
|
|
1486
|
+
children: [/* @__PURE__ */ s(ee, {
|
|
1473
1487
|
style: {
|
|
1474
1488
|
paddingTop: "12px"
|
|
1475
1489
|
},
|
|
1476
|
-
children: /* @__PURE__ */
|
|
1490
|
+
children: /* @__PURE__ */ s(Hi, {
|
|
1477
1491
|
userSummary: e.userSummary
|
|
1478
1492
|
})
|
|
1479
|
-
}), /* @__PURE__ */
|
|
1480
|
-
children: /* @__PURE__ */
|
|
1493
|
+
}), /* @__PURE__ */ s(Be, {
|
|
1494
|
+
children: /* @__PURE__ */ s(Bi, {
|
|
1481
1495
|
openQuestion: e.openQuestion,
|
|
1482
1496
|
store: e.feedList.getStore()
|
|
1483
1497
|
})
|
|
1484
1498
|
})]
|
|
1485
|
-
}), t === H.LEADERBOARD && /* @__PURE__ */
|
|
1499
|
+
}), t === H.LEADERBOARD && /* @__PURE__ */ s("div", {
|
|
1486
1500
|
className: "c1bp9dj2",
|
|
1487
|
-
children: /* @__PURE__ */
|
|
1501
|
+
children: /* @__PURE__ */ s(Oi, {
|
|
1488
1502
|
gamification: e
|
|
1489
1503
|
})
|
|
1490
1504
|
})]
|
|
1491
1505
|
});
|
|
1492
|
-
},
|
|
1506
|
+
}, Zi = () => He, De = /* @__PURE__ */ a(Zi())({
|
|
1493
1507
|
name: "OpenedContainer",
|
|
1494
1508
|
class: "oar61gl",
|
|
1495
1509
|
propsAsIs: !0
|
|
1496
|
-
}),
|
|
1510
|
+
}), Ji = /* @__PURE__ */ a("div")({
|
|
1497
1511
|
name: "UserContainer",
|
|
1498
1512
|
class: "u14zaal4",
|
|
1499
1513
|
propsAsIs: !1
|
|
1500
|
-
}),
|
|
1514
|
+
}), Ki = ({
|
|
1501
1515
|
correct: e,
|
|
1502
1516
|
incorrect: t
|
|
1503
1517
|
}) => {
|
|
1504
1518
|
const i = e + t;
|
|
1505
1519
|
return i === 0 ? 0 : Math.round(e / i * 100);
|
|
1506
|
-
},
|
|
1520
|
+
}, ns = ({
|
|
1507
1521
|
gamification: e,
|
|
1508
1522
|
className: t
|
|
1509
1523
|
}) => {
|
|
1510
1524
|
const i = w(e.openedQuestion.$store), n = w(e.openedUser);
|
|
1511
1525
|
return /* @__PURE__ */ f($, {
|
|
1512
|
-
children: [i && /* @__PURE__ */
|
|
1526
|
+
children: [i && /* @__PURE__ */ s(De, {
|
|
1513
1527
|
className: t,
|
|
1514
|
-
children: /* @__PURE__ */
|
|
1528
|
+
children: /* @__PURE__ */ s(Hn, {
|
|
1515
1529
|
gamification: e
|
|
1516
1530
|
})
|
|
1517
|
-
}), n && /* @__PURE__ */
|
|
1531
|
+
}), n && /* @__PURE__ */ s(De, {
|
|
1518
1532
|
className: t,
|
|
1519
|
-
children: /* @__PURE__ */ f(
|
|
1520
|
-
children: [/* @__PURE__ */
|
|
1533
|
+
children: /* @__PURE__ */ f(Ji, {
|
|
1534
|
+
children: [/* @__PURE__ */ s(je, {
|
|
1521
1535
|
label: "Friend's Rank",
|
|
1522
1536
|
close: e.closeUser
|
|
1523
|
-
}), /* @__PURE__ */
|
|
1524
|
-
children: /* @__PURE__ */
|
|
1537
|
+
}), /* @__PURE__ */ s(ee, {
|
|
1538
|
+
children: /* @__PURE__ */ s(we, {
|
|
1525
1539
|
...n,
|
|
1526
|
-
successRate:
|
|
1540
|
+
successRate: Ki(n)
|
|
1527
1541
|
})
|
|
1528
1542
|
})]
|
|
1529
1543
|
})
|
|
1530
|
-
}), /* @__PURE__ */
|
|
1544
|
+
}), /* @__PURE__ */ s(ie, {
|
|
1531
1545
|
className: t,
|
|
1532
1546
|
"data-nav": "true",
|
|
1533
|
-
children: /* @__PURE__ */
|
|
1547
|
+
children: /* @__PURE__ */ s(Gi, {
|
|
1534
1548
|
gamification: e
|
|
1535
1549
|
})
|
|
1536
1550
|
})]
|
|
1537
1551
|
});
|
|
1538
1552
|
};
|
|
1539
1553
|
export {
|
|
1540
|
-
|
|
1554
|
+
ns as default
|
|
1541
1555
|
};
|