@streamlayer/react 0.32.3 → 0.32.4

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.
@@ -1,6 +1,6 @@
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
- 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";
1
+ import { jsxs as f, jsx as s, Fragment as R } from "react/jsx-runtime";
2
+ import { s as a, n as j, Q as x, o as Se, a as b, b as U, d as ze, E as L, r as ie, w as We, u as w, A as Ve, O as Fe, P as V, c as ee, e as Be, f as He } from "./masters.js";
3
+ import P, { useRef as C, useState as _, useCallback as q, useEffect as Ge, useLayoutEffect as Ze, useMemo as $, createElement as Z, PureComponent as xe } from "react";
4
4
  const Je = /* @__PURE__ */ a("div")({
5
5
  name: "Container",
6
6
  class: "c1vwopgc",
@@ -25,15 +25,15 @@ const Je = /* @__PURE__ */ a("div")({
25
25
  name: "CloseIcon",
26
26
  class: "cvsl7l3",
27
27
  propsAsIs: !0
28
- }), je = ({ type: e, close: t, label: i }) => {
28
+ }), Oe = ({ type: e, close: t, label: i }) => {
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
32
  (n == null ? void 0 : n.iconName) && /* @__PURE__ */ s(
33
33
  et,
34
34
  {
35
- "data-type-trivia": e === z.TRIVIA,
36
- "data-type-poll": e === z.POLL,
35
+ "data-type-trivia": e === x.TRIVIA,
36
+ "data-type-poll": e === x.POLL,
37
37
  name: n.iconName
38
38
  }
39
39
  ),
@@ -41,7 +41,7 @@ const Je = /* @__PURE__ */ a("div")({
41
41
  ] }),
42
42
  /* @__PURE__ */ s(nt, { onClick: t, children: /* @__PURE__ */ s(st, { name: "icon-cross" }) })
43
43
  ] });
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", {
44
+ }, je = (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",
46
46
  month: "short",
47
47
  day: "numeric"
@@ -134,11 +134,11 @@ const Je = /* @__PURE__ */ a("div")({
134
134
  name: "Ranks",
135
135
  class: "r55lotb",
136
136
  propsAsIs: !1
137
- }), jt = /* @__PURE__ */ a("div")({
137
+ }), Ot = /* @__PURE__ */ a("div")({
138
138
  name: "Statistics",
139
139
  class: "s1knfgqt",
140
140
  propsAsIs: !1
141
- }), Ot = /* @__PURE__ */ a("div")({
141
+ }), jt = /* @__PURE__ */ a("div")({
142
142
  name: "AvatarPlaceholder",
143
143
  class: "a1mqo824",
144
144
  propsAsIs: !1
@@ -161,7 +161,7 @@ const Je = /* @__PURE__ */ a("div")({
161
161
  /* @__PURE__ */ s(It, { children: /* @__PURE__ */ f(gt, { children: [
162
162
  /* @__PURE__ */ f(kt, { children: [
163
163
  e && /* @__PURE__ */ s(vt, { alt: "avatar", src: e }),
164
- !e && /* @__PURE__ */ s(Ot, { children: Oe(t || "") })
164
+ !e && /* @__PURE__ */ s(jt, { children: je(t || "") })
165
165
  ] }),
166
166
  /* @__PURE__ */ f(Mt, { children: [
167
167
  /* @__PURE__ */ s(yt, { children: t }),
@@ -187,7 +187,7 @@ const Je = /* @__PURE__ */ a("div")({
187
187
  /* @__PURE__ */ s(le, { indicator: n || 0, title: "Friends rank" }),
188
188
  /* @__PURE__ */ s(le, { indicator: r || 0, title: "Global rank" })
189
189
  ] }),
190
- /* @__PURE__ */ f(jt, { children: [
190
+ /* @__PURE__ */ f(Ot, { children: [
191
191
  /* @__PURE__ */ s(F, { indicator: l || 0, title: "Win streak" }),
192
192
  /* @__PURE__ */ s(F, { indicator: c || 0, title: "Correct" }),
193
193
  /* @__PURE__ */ s(F, { indicator: m || 0, title: "Incorrect" }),
@@ -198,12 +198,12 @@ const Je = /* @__PURE__ */ a("div")({
198
198
  name: "SponsorLogoWrap",
199
199
  class: "s8p5v5z",
200
200
  propsAsIs: !1
201
- }), bt = () => j, $t = /* @__PURE__ */ a(bt())({
201
+ }), $t = () => j, Lt = /* @__PURE__ */ a($t())({
202
202
  name: "SponsorLogo",
203
203
  class: "s755yti",
204
204
  propsAsIs: !0
205
- }), Lt = () => /* @__PURE__ */ s(Ct, {
206
- children: /* @__PURE__ */ s($t, {
205
+ }), bt = () => /* @__PURE__ */ s(Ct, {
206
+ children: /* @__PURE__ */ s(Lt, {
207
207
  name: "mastersLogo"
208
208
  })
209
209
  }), Et = /* @__PURE__ */ a("div")({
@@ -250,7 +250,7 @@ const Je = /* @__PURE__ */ a("div")({
250
250
  name: "FeedbackText",
251
251
  class: "fx87qaj",
252
252
  propsAsIs: !1
253
- }), Ft = ({
253
+ }), Vt = ({
254
254
  feedbackMessages: e,
255
255
  questionVotedCorrectly: t,
256
256
  questionVoted: i,
@@ -258,23 +258,23 @@ const Je = /* @__PURE__ */ a("div")({
258
258
  hasCorrectAnswer: r,
259
259
  questionStatus: l
260
260
  }) => {
261
- const c = i && (n === z.TRIVIA || n === z.PREDICTION);
262
- if (!c && l !== L.RESOLVED || l === L.RESOLVED && n === z.PREDICTION && !i)
261
+ const c = i && (n === x.TRIVIA || n === x.PREDICTION);
262
+ if (!c && l !== b.RESOLVED || l === b.RESOLVED && n === x.PREDICTION && !i)
263
263
  return null;
264
- const m = n === z.PREDICTION && !r, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
264
+ const m = n === x.PREDICTION && !r, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
265
265
  return /* @__PURE__ */ f(Pt, { "data-isPrediction": m, children: [
266
- l === L.RESOLVED && n === z.TRIVIA && !i && /* @__PURE__ */ f($, { children: [
266
+ l === b.RESOLVED && n === x.TRIVIA && !i && /* @__PURE__ */ f(R, { children: [
267
267
  /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
268
268
  /* @__PURE__ */ f("div", { children: [
269
269
  /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s(J, { children: "Question Expired" }) }),
270
270
  /* @__PURE__ */ s(Wt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
271
271
  ] })
272
272
  ] }),
273
- c && m && /* @__PURE__ */ f($, { children: [
273
+ c && m && /* @__PURE__ */ f(R, { children: [
274
274
  /* @__PURE__ */ s(qt, { name: "icon-prediction" }),
275
275
  /* @__PURE__ */ s(J, { children: "Stay tuned to see if your prediction was correct." })
276
276
  ] }),
277
- c && r && /* @__PURE__ */ f($, { children: [
277
+ c && r && /* @__PURE__ */ f(R, { children: [
278
278
  /* @__PURE__ */ s(ce, { "data-feedbackType": u, children: /* @__PURE__ */ s(j, { name: u }) }),
279
279
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ f(de, { children: [
280
280
  /* @__PURE__ */ s(Yt, { "data-feedbackType": u, children: h == null ? void 0 : h.title }),
@@ -282,7 +282,7 @@ const Je = /* @__PURE__ */ a("div")({
282
282
  ] }) })
283
283
  ] })
284
284
  ] });
285
- }, Vt = /* @__PURE__ */ a("div")({
285
+ }, Ft = /* @__PURE__ */ a("div")({
286
286
  name: "Container",
287
287
  class: "c14ielyq",
288
288
  propsAsIs: !1
@@ -347,28 +347,28 @@ const Je = /* @__PURE__ */ a("div")({
347
347
  class: "cu9kmlb",
348
348
  propsAsIs: !0
349
349
  }), ue = {
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 }),
353
- [Q.NONE]: () => null,
354
- [Q.UNSET]: () => null
350
+ [U.CENTERED]: (e) => /* @__PURE__ */ s(nn, { alt: "option-icon", src: e }),
351
+ [U.TRANSPARENT]: (e) => /* @__PURE__ */ s(Xt, { children: /* @__PURE__ */ s(en, { style: { backgroundImage: `url(${e})` } }) }),
352
+ [U.ROUNDED]: (e) => /* @__PURE__ */ s(rn, { alt: "option-icon", src: e }),
353
+ [U.NONE]: () => null,
354
+ [U.UNSET]: () => null
355
355
  }, un = ({ questionType: e, hasCorrectAnswer: t, correct: i, youVoted: n, questionVoted: r }) => {
356
- if (e === z.POLL && n)
356
+ if (e === x.POLL && n)
357
357
  return "correct";
358
- if (e === z.PREDICTION) {
358
+ if (e === x.PREDICTION) {
359
359
  if (t && r)
360
360
  return n ? i ? "correct" : "incorrect" : "unset";
361
361
  if (n)
362
362
  return "correct";
363
363
  }
364
- return e === z.TRIVIA && r && n ? i ? "correct" : "incorrect" : "unset";
364
+ return e === x.TRIVIA && r && n ? i ? "correct" : "incorrect" : "unset";
365
365
  }, pn = ({
366
366
  questionType: e,
367
367
  questionVoted: t,
368
368
  correct: i,
369
369
  hasCorrectAnswer: n,
370
370
  questionStatus: r
371
- }) => e === z.TRIVIA ? t && i : e === z.PREDICTION ? t && i && n || r === L.RESOLVED && i : !1, mn = (e) => {
371
+ }) => e === x.TRIVIA ? t && i : e === x.PREDICTION ? t && i && n || r === b.RESOLVED && i : !1, mn = (e) => {
372
372
  var t;
373
373
  const {
374
374
  // option props
@@ -382,20 +382,20 @@ const Je = /* @__PURE__ */ a("div")({
382
382
  questionVoted: u,
383
383
  // ToDo: Figure out why imageMode is not in the response, and delete default value
384
384
  imageMode: h,
385
- answerTimeExpired: T,
385
+ answerTimeExpired: N,
386
386
  questionStatus: M,
387
387
  isLoading: v,
388
- questionType: A,
388
+ questionType: T,
389
389
  correct: D,
390
390
  hasCorrectAnswer: o
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;
391
+ } = e, d = un(e), p = pn({ questionType: T, questionVoted: u, correct: D, hasCorrectAnswer: o, questionStatus: M }), I = M === b.RESOLVED && T === x.PREDICTION, g = u || I;
392
392
  return /* @__PURE__ */ f(
393
393
  Zt,
394
394
  {
395
395
  value: i,
396
396
  "data-selected": m,
397
397
  "data-answerState": d,
398
- disabled: u || v || T || I,
398
+ disabled: u || v || N || I,
399
399
  "data-isNotChecked": u && !m && d !== "incorrect",
400
400
  onClick: c,
401
401
  children: [
@@ -413,34 +413,34 @@ const Je = /* @__PURE__ */ a("div")({
413
413
  );
414
414
  };
415
415
  var pe = typeof window > "u" ? Ge : Ze, hn = ({ isPlaying: e, duration: t, startAt: i = 0, updateInterval: n = 0, onComplete: r, onUpdate: l }) => {
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) => {
416
+ let [c, m] = _(i), u = C(0), h = C(i), N = C(i * -1e3), M = C(null), v = C(null), T = C(null), D = (p) => {
417
417
  let I = p / 1e3;
418
418
  if (v.current === null) {
419
419
  v.current = I, M.current = requestAnimationFrame(D);
420
420
  return;
421
421
  }
422
- let g = I - v.current, N = u.current + g;
423
- v.current = I, u.current = N;
424
- let y = h.current + (n === 0 ? N : (N / n | 0) * n), S = h.current + N, x = typeof t == "number" && S >= t;
425
- m(x ? t : y), x || (M.current = requestAnimationFrame(D));
422
+ let g = I - v.current, S = u.current + g;
423
+ v.current = I, u.current = S;
424
+ let y = h.current + (n === 0 ? S : (S / n | 0) * n), z = h.current + S, A = typeof t == "number" && z >= t;
425
+ m(A ? t : y), A || (M.current = requestAnimationFrame(D));
426
426
  }, o = () => {
427
- M.current && cancelAnimationFrame(M.current), A.current && clearTimeout(A.current), v.current = null;
428
- }, d = _((p) => {
427
+ M.current && cancelAnimationFrame(M.current), T.current && clearTimeout(T.current), v.current = null;
428
+ }, d = q((p) => {
429
429
  o(), u.current = 0;
430
430
  let I = typeof p == "number" ? p : i;
431
431
  h.current = I, m(I), e && (M.current = requestAnimationFrame(D));
432
432
  }, [e, i]);
433
433
  return pe(() => {
434
434
  if (l == null || l(c), t && c >= t) {
435
- T.current += t * 1e3;
436
- let { shouldRepeat: p = !1, delay: I = 0, newStartAt: g } = (r == null ? void 0 : r(T.current / 1e3)) || {};
437
- p && (A.current = setTimeout(() => d(g), I * 1e3));
435
+ N.current += t * 1e3;
436
+ let { shouldRepeat: p = !1, delay: I = 0, newStartAt: g } = (r == null ? void 0 : r(N.current / 1e3)) || {};
437
+ p && (T.current = setTimeout(() => d(g), I * 1e3));
438
438
  }
439
439
  }, [c, t]), pe(() => (e && (M.current = requestAnimationFrame(D)), o), [e, t, n]), { elapsedTime: c, reset: d };
440
440
  }, In = (e, t, i) => {
441
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
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) => {
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%" }, $e = (e, t, i, n, r) => {
444
444
  if (n === 0)
445
445
  return t;
446
446
  let l = (r ? n - e : e) / n;
@@ -453,48 +453,48 @@ var pe = typeof window > "u" ? Ge : Ze, hn = ({ isPlaying: e, duration: t, start
453
453
  let { colors: n, colorsTime: r, isSmoothColorTransition: l = !0 } = e;
454
454
  if (typeof n == "string")
455
455
  return n;
456
- let c = (i = r == null ? void 0 : r.findIndex((v, A) => v >= t && t >= r[A + 1])) != null ? i : -1;
456
+ let c = (i = r == null ? void 0 : r.findIndex((v, T) => v >= t && t >= r[T + 1])) != null ? i : -1;
457
457
  if (!r || c === -1)
458
458
  return n[0];
459
459
  if (!l)
460
460
  return n[c];
461
- let m = r[c] - t, u = r[c] - r[c + 1], h = he(n[c]), T = he(n[c + 1]), M = !!e.isGrowing;
462
- return `rgb(${h.map((v, A) => be(m, v, T[A] - v, u, M) | 0).join(",")})`;
461
+ let m = r[c] - t, u = r[c] - r[c + 1], h = he(n[c]), N = he(n[c + 1]), M = !!e.isGrowing;
462
+ return `rgb(${h.map((v, T) => $e(m, v, N[T] - v, u, M) | 0).join(",")})`;
463
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) => {
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: N, onUpdate: M } = e, v = C(), T = Math.max(l, c ?? 0), { path: D, pathLength: o } = In(r, T, h), { elapsedTime: d } = hn({ isPlaying: m, duration: t, startAt: me(t, i), updateInterval: n, onUpdate: typeof M == "function" ? (I) => {
465
465
  let g = Math.ceil(t - I);
466
466
  g !== v.current && (v.current = g, M(g));
467
- } : void 0, onComplete: typeof T == "function" ? (I) => {
467
+ } : void 0, onComplete: typeof N == "function" ? (I) => {
468
468
  var g;
469
- let { shouldRepeat: N, delay: y, newInitialRemainingTime: S } = (g = T(I)) != null ? g : {};
470
- if (N)
471
- return { shouldRepeat: N, delay: y, newStartAt: me(t, S) };
469
+ let { shouldRepeat: S, delay: y, newInitialRemainingTime: z } = (g = N(I)) != null ? g : {};
470
+ if (S)
471
+ return { shouldRepeat: S, delay: y, newStartAt: me(t, z) };
472
472
  } : void 0 }), p = t - d;
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 };
474
- }, $e = (e) => {
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 })));
473
+ return { elapsedTime: d, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: h, size: r, stroke: vn(e, p), strokeDashoffset: $e(d, 0, o, t, u), strokeWidth: l };
474
+ }, Le = (e) => {
475
+ let { children: t, strokeLinecap: i, trailColor: n, trailStrokeWidth: r } = e, { path: l, pathLength: c, stroke: m, strokeDashoffset: u, remainingTime: h, elapsedTime: N, size: M, strokeWidth: v } = Mn(e);
476
+ return P.createElement("div", { style: fn(M) }, P.createElement("svg", { viewBox: `0 0 ${M} ${M}`, width: M, height: M, xmlns: "http://www.w3.org/2000/svg" }, P.createElement("path", { d: l, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: r ?? v }), P.createElement("path", { d: l, fill: "none", stroke: m, strokeLinecap: i ?? "round", strokeWidth: v, strokeDasharray: c, strokeDashoffset: u })), typeof t == "function" && P.createElement("div", { style: gn }, t({ remainingTime: h, elapsedTime: N, color: m })));
477
477
  };
478
- $e.displayName = "CountdownCircleTimer";
479
- const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10, 0], Tn = /* @__PURE__ */ a("div")({
478
+ Le.displayName = "CountdownCircleTimer";
479
+ const yn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1, L.NEUTRALS_GRAY3], Nn = [10, 10, 1, 0], Tn = /* @__PURE__ */ a("div")({
480
480
  name: "RemainingTime",
481
481
  class: "r165427",
482
482
  propsAsIs: !1
483
- }), An = E.SECONDARY_GREEN6, Ie = E.SECONDARY_RED3, Dn = E.NEUTRALS_GRAY3, Sn = ({
483
+ }), An = L.SECONDARY_GREEN6, Ie = L.SECONDARY_RED3, Dn = L.NEUTRALS_GRAY3, Sn = ({
484
484
  isPlaying: e = !0,
485
485
  duration: t = 30,
486
486
  onTimerExpired: i
487
487
  }) => {
488
- const [n, r] = P(t > 10 ? An : Ie), l = ({
488
+ const [n, r] = _(t > 10 ? An : Ie), l = ({
489
489
  remainingTime: u
490
490
  }) => /* @__PURE__ */ s(Tn, {
491
491
  children: u
492
- }), c = _(() => {
492
+ }), c = q(() => {
493
493
  i == null || i(), r(Dn);
494
- }, [i, r]), m = _((u) => {
494
+ }, [i, r]), m = q((u) => {
495
495
  u === 10 && r(Ie);
496
496
  }, [r]);
497
- return /* @__PURE__ */ s($e, {
497
+ return /* @__PURE__ */ s(Le, {
498
498
  isPlaying: e,
499
499
  duration: t,
500
500
  colors: yn,
@@ -515,11 +515,11 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
515
515
  name: "Content",
516
516
  class: "cgizw4u",
517
517
  propsAsIs: !1
518
- }), jn = /* @__PURE__ */ a("div")({
518
+ }), On = /* @__PURE__ */ a("div")({
519
519
  name: "Title",
520
520
  class: "t1l3ucjp",
521
521
  propsAsIs: !1
522
- }), On = () => j, kn = /* @__PURE__ */ a(On())({
522
+ }), jn = () => j, kn = /* @__PURE__ */ a(jn())({
523
523
  name: "WinIcon",
524
524
  class: "wx7j799",
525
525
  propsAsIs: !0
@@ -531,11 +531,11 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
531
531
  name: "PointsCount",
532
532
  class: "po9i64o",
533
533
  propsAsIs: !1
534
- }), bn = /* @__PURE__ */ a("span")({
534
+ }), $n = /* @__PURE__ */ a("span")({
535
535
  name: "PointsUnits",
536
536
  class: "pe5g05h",
537
537
  propsAsIs: !1
538
- }), $n = ({
538
+ }), Ln = ({
539
539
  title: e,
540
540
  points: t,
541
541
  isPlayingTimer: i,
@@ -545,55 +545,63 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
545
545
  onTimerExpired: c
546
546
  }) => /* @__PURE__ */ f(zn, { children: [
547
547
  /* @__PURE__ */ f(xn, { children: [
548
- e && /* @__PURE__ */ s(jn, { children: e }),
549
- t !== void 0 && r !== z.POLL && /* @__PURE__ */ f($, { children: [
548
+ e && /* @__PURE__ */ s(On, { children: e }),
549
+ t !== void 0 && r !== x.POLL && /* @__PURE__ */ f(R, { children: [
550
550
  /* @__PURE__ */ s(kn, { name: "icon-trophy" }),
551
551
  /* @__PURE__ */ f(wn, { children: [
552
552
  /* @__PURE__ */ s(Cn, { children: /* @__PURE__ */ s(ze, { value: t }) }),
553
- /* @__PURE__ */ s(bn, { children: "PTS" })
553
+ /* @__PURE__ */ s($n, { children: "PTS" })
554
554
  ] })
555
555
  ] })
556
556
  ] }),
557
557
  n && /* @__PURE__ */ s(Sn, { isPlaying: i, onTimerExpired: c, duration: l })
558
- ] }), Ln = ({ openedQuestion: e, isLoading: t, vote: i, close: n }) => {
558
+ ] }), bn = ({ openedQuestion: e, isLoading: t, vote: i, close: n }) => {
559
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 = _(
561
- async (N) => {
562
- if (A) {
563
- const y = N.currentTarget.value;
564
- v(y), await i(A, y);
560
+ const c = e.subject, m = e.type, u = (r = e.options) == null ? void 0 : r.options, [h, N] = _(!1), [M, v] = _(""), T = e == null ? void 0 : e.id, D = q(
561
+ async (A) => {
562
+ if (T) {
563
+ const O = A.currentTarget.value;
564
+ v(O), await i(T, O);
565
565
  }
566
566
  },
567
- [A, v, i]
568
- ), o = _(() => {
569
- T(!0), setTimeout(n, 3e3);
570
- }, [n]), d = B(
571
- () => e == null ? void 0 : e.answers.find((N) => N.youVoted === !0),
567
+ [T, v, i]
568
+ ), o = q(() => {
569
+ N(!0), setTimeout(n, 3e3);
570
+ }, [n]), d = $(
571
+ () => e == null ? void 0 : e.answers.find((A) => A.youVoted === !0),
572
+ [e]
573
+ ), p = $(
574
+ () => !!(e != null && e.answers.find((A) => A.correct === !0)),
572
575
  [e]
573
- ), p = B(
574
- () => !!(e != null && e.answers.find((N) => N.correct === !0)),
576
+ ), I = $(
577
+ () => e == null ? void 0 : e.answers.find((A) => A.correct === !0),
575
578
  [e]
576
- ), I = B(() => e ? e.answers.map((N) => {
577
- var y;
579
+ ), g = $(() => e ? e.answers.map((A) => {
580
+ var O;
578
581
  return {
579
- ...N,
582
+ ...A,
580
583
  questionVoted: !!d,
581
- youSelected: M === N.id,
584
+ youSelected: M === A.id,
582
585
  isLoading: t,
583
586
  hasCorrectAnswer: p,
584
587
  questionType: e.type,
585
588
  answerTimeExpired: h,
586
589
  questionStatus: e.status,
587
- imageMode: (y = e.appearance) == null ? void 0 : y.images,
590
+ imageMode: (O = e.appearance) == null ? void 0 : O.images,
588
591
  // ToDo: Figure out why imageMode is not in the response
589
592
  onVote: D
590
593
  };
591
- }) : [], [p, h, t, e, d, D, M]), g = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0;
592
- return /* @__PURE__ */ s(ie, { "data-question-header": "true", children: /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ f(Bt, { children: [
593
- g && /* @__PURE__ */ s(
594
- Ft,
594
+ }) : [], [p, h, t, e, d, D, M]), S = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, y = $(() => {
595
+ if (e.status === b.RESOLVED)
596
+ return 0;
597
+ if (!h)
598
+ return d ? d.correct ? d.points : 0 : I == null ? void 0 : I.points;
599
+ }, [h, d, I, e.status]), z = $(() => h ? "Time expired" : e.type === x.POLL ? "Time remaining" : d ? "You won" : "To win", [h, e.type, d]);
600
+ return /* @__PURE__ */ s(ie, { "data-question-header": "true", children: /* @__PURE__ */ s(Ft, { children: /* @__PURE__ */ f(Bt, { children: [
601
+ S && /* @__PURE__ */ s(
602
+ Vt,
595
603
  {
596
- feedbackMessages: g,
604
+ feedbackMessages: S,
597
605
  questionVoted: !!d,
598
606
  questionVotedCorrectly: d == null ? void 0 : d.correct,
599
607
  questionType: m,
@@ -601,11 +609,11 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
601
609
  questionStatus: e.status
602
610
  }
603
611
  ),
604
- e.type !== z.PREDICTION && /* @__PURE__ */ s(
605
- $n,
612
+ e.type !== x.PREDICTION && /* @__PURE__ */ s(
613
+ Ln,
606
614
  {
607
- title: h ? "Time expired" : e.type === z.POLL ? "Time remaining" : "To win",
608
- points: h ? void 0 : d != null && d.correct ? d == null ? void 0 : d.points : 0,
615
+ title: z,
616
+ points: y,
609
617
  onTimerExpired: o,
610
618
  questionType: e.type,
611
619
  isTimer: !t,
@@ -619,9 +627,9 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
619
627
  title: "More to come...",
620
628
  description: "Watch for additional enhanced stream interactive experience."
621
629
  }
622
- ) : /* @__PURE__ */ f($, { children: [
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)) })
630
+ ) : /* @__PURE__ */ f(R, { children: [
631
+ /* @__PURE__ */ s(Ht, { "data-isPrediction": e.type === x.PREDICTION, children: c }),
632
+ /* @__PURE__ */ s(Gt, { children: g.map((A) => /* @__PURE__ */ s(mn, { ...A }, A.id)) })
625
633
  ] })
626
634
  ] }) }) });
627
635
  }, En = /* @__PURE__ */ a("div")({
@@ -648,8 +656,8 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
648
656
  name: "Image",
649
657
  class: "i1gfjeu5",
650
658
  propsAsIs: !1
651
- }), Le = ({ created: e, image: t, title: i, instantView: n }) => {
652
- const r = B(() => {
659
+ }), be = ({ created: e, image: t, title: i, instantView: n }) => {
660
+ const r = $(() => {
653
661
  if (e) {
654
662
  const c = new Date(e);
655
663
  if (at(c))
@@ -682,16 +690,16 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
682
690
  class: "w19zie3h",
683
691
  propsAsIs: !1
684
692
  }), Wn = ({ instantView: e, ...t }) => /* @__PURE__ */ f(qn, { children: [
685
- /* @__PURE__ */ s(Le, { instantView: e, ...t }),
693
+ /* @__PURE__ */ s(be, { instantView: e, ...t }),
686
694
  (e == null ? void 0 : e.webLink) && /* @__PURE__ */ f(Yn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
687
695
  "Explore more of the Masters History",
688
696
  /* @__PURE__ */ s(j, { name: "icon-external-link" })
689
697
  ] })
690
- ] }), Fn = /* @__PURE__ */ a("div")({
698
+ ] }), Vn = /* @__PURE__ */ a("div")({
691
699
  name: "QuestionContainer",
692
700
  class: "qdri6g3",
693
701
  propsAsIs: !1
694
- }), Vn = ({
702
+ }), Fn = ({
695
703
  openedQuestion: e
696
704
  }) => {
697
705
  var t;
@@ -708,7 +716,7 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
708
716
  loading: n,
709
717
  data: r
710
718
  } = e;
711
- return r ? /* @__PURE__ */ s(Ln, {
719
+ return r ? /* @__PURE__ */ s(bn, {
712
720
  vote: t,
713
721
  close: i,
714
722
  openedQuestion: r,
@@ -722,17 +730,17 @@ const yn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], Nn = [10, 10,
722
730
  if (!i)
723
731
  return null;
724
732
  const r = i.type;
725
- return /* @__PURE__ */ f(Fn, {
726
- children: [/* @__PURE__ */ s(je, {
733
+ return /* @__PURE__ */ f(Vn, {
734
+ children: [/* @__PURE__ */ s(Oe, {
727
735
  close: e.closeQuestion,
728
- type: ((t = i.attributes) == null ? void 0 : t.type) || z.UNSET
736
+ type: ((t = i.attributes) == null ? void 0 : t.type) || x.UNSET
729
737
  }), r === "question" && /* @__PURE__ */ s(Bn, {
730
738
  vote: e.submitAnswer,
731
739
  close: e.closeQuestion,
732
740
  extendedQuestion: n
733
- }), r !== "question" && /* @__PURE__ */ s(Vn, {
741
+ }), r !== "question" && /* @__PURE__ */ s(Fn, {
734
742
  openedQuestion: i
735
- }), /* @__PURE__ */ s(Lt, {
743
+ }), /* @__PURE__ */ s(bt, {
736
744
  sponsorLogo: ""
737
745
  })]
738
746
  });
@@ -844,21 +852,21 @@ function Ne(e) {
844
852
  }
845
853
  return X;
846
854
  }
847
- var b = null;
855
+ var E = null;
848
856
  function Te(e) {
849
- if (e === void 0 && (e = !1), b === null || e) {
857
+ if (e === void 0 && (e = !1), E === null || e) {
850
858
  var t = document.createElement("div"), i = t.style;
851
859
  i.width = "50px", i.height = "50px", i.overflow = "scroll", i.direction = "rtl";
852
860
  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;
861
+ return r.width = "100px", r.height = "100px", t.appendChild(n), document.body.appendChild(t), t.scrollLeft > 0 ? E = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? E = "negative" : E = "positive-ascending"), document.body.removeChild(t), E;
854
862
  }
855
- return b;
863
+ return E;
856
864
  }
857
865
  var ri = 150, oi = function(t, i) {
858
866
  return t;
859
867
  };
860
868
  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;
869
+ 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, N = e.validateProps;
862
870
  return t = /* @__PURE__ */ function(M) {
863
871
  ei(v, M);
864
872
  function v(D) {
@@ -883,55 +891,55 @@ function ai(e) {
883
891
  scrollUpdateWasRequested: I
884
892
  });
885
893
  }), o._getItemStyle = void 0, o._getItemStyle = function(d) {
886
- var p = o.props, I = p.direction, g = p.itemSize, N = p.layout, y = o._getItemStyleCache(h && g, h && N, h && I), S;
894
+ var p = o.props, I = p.direction, g = p.itemSize, S = p.layout, y = o._getItemStyleCache(h && g, h && S, h && I), z;
887
895
  if (y.hasOwnProperty(d))
888
- S = y[d];
896
+ z = y[d];
889
897
  else {
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;
891
- y[d] = S = {
898
+ var A = i(o.props, d, o._instanceProps), O = r(o.props, d, o._instanceProps), k = I === "horizontal" || S === "horizontal", Y = I === "rtl", W = k ? A : 0;
899
+ y[d] = z = {
892
900
  position: "absolute",
893
- left: q ? void 0 : Y,
894
- right: q ? Y : void 0,
895
- top: k ? 0 : x,
901
+ left: Y ? void 0 : W,
902
+ right: Y ? W : void 0,
903
+ top: k ? 0 : A,
896
904
  height: k ? "100%" : O,
897
905
  width: k ? O : "100%"
898
906
  };
899
907
  }
900
- return S;
908
+ return z;
901
909
  }, o._getItemStyleCache = void 0, o._getItemStyleCache = K(function(d, p, I) {
902
910
  return {};
903
911
  }), o._onScrollHorizontal = function(d) {
904
- var p = d.currentTarget, I = p.clientWidth, g = p.scrollLeft, N = p.scrollWidth;
912
+ var p = d.currentTarget, I = p.clientWidth, g = p.scrollLeft, S = p.scrollWidth;
905
913
  o.setState(function(y) {
906
914
  if (y.scrollOffset === g)
907
915
  return null;
908
- var S = o.props.direction, x = g;
909
- if (S === "rtl")
916
+ var z = o.props.direction, A = g;
917
+ if (z === "rtl")
910
918
  switch (Te()) {
911
919
  case "negative":
912
- x = -g;
920
+ A = -g;
913
921
  break;
914
922
  case "positive-descending":
915
- x = N - I - g;
923
+ A = S - I - g;
916
924
  break;
917
925
  }
918
- return x = Math.max(0, Math.min(x, N - I)), {
926
+ return A = Math.max(0, Math.min(A, S - I)), {
919
927
  isScrolling: !0,
920
928
  scrollDirection: y.scrollOffset < g ? "forward" : "backward",
921
- scrollOffset: x,
929
+ scrollOffset: A,
922
930
  scrollUpdateWasRequested: !1
923
931
  };
924
932
  }, o._resetIsScrollingDebounced);
925
933
  }, o._onScrollVertical = function(d) {
926
- var p = d.currentTarget, I = p.clientHeight, g = p.scrollHeight, N = p.scrollTop;
934
+ var p = d.currentTarget, I = p.clientHeight, g = p.scrollHeight, S = p.scrollTop;
927
935
  o.setState(function(y) {
928
- if (y.scrollOffset === N)
936
+ if (y.scrollOffset === S)
929
937
  return null;
930
- var S = Math.max(0, Math.min(N, g - I));
938
+ var z = Math.max(0, Math.min(S, g - I));
931
939
  return {
932
940
  isScrolling: !0,
933
- scrollDirection: y.scrollOffset < S ? "forward" : "backward",
934
- scrollOffset: S,
941
+ scrollDirection: y.scrollOffset < z ? "forward" : "backward",
942
+ scrollOffset: z,
935
943
  scrollUpdateWasRequested: !1
936
944
  };
937
945
  }, o._resetIsScrollingDebounced);
@@ -949,10 +957,10 @@ function ai(e) {
949
957
  }, o;
950
958
  }
951
959
  v.getDerivedStateFromProps = function(o, d) {
952
- return li(o, d), T(o), null;
960
+ return li(o, d), N(o), null;
953
961
  };
954
- var A = v.prototype;
955
- return A.scrollTo = function(o) {
962
+ var T = v.prototype;
963
+ return T.scrollTo = function(o) {
956
964
  o = Math.max(0, o), this.setState(function(d) {
957
965
  return d.scrollOffset === o ? null : {
958
966
  scrollDirection: d.scrollOffset < o ? "forward" : "backward",
@@ -960,26 +968,26 @@ function ai(e) {
960
968
  scrollUpdateWasRequested: !0
961
969
  };
962
970
  }, this._resetIsScrollingDebounced);
963
- }, A.scrollToItem = function(o, d) {
971
+ }, T.scrollToItem = function(o, d) {
964
972
  d === void 0 && (d = "auto");
965
- var p = this.props, I = p.itemCount, g = p.layout, N = this.state.scrollOffset;
973
+ var p = this.props, I = p.itemCount, g = p.layout, S = this.state.scrollOffset;
966
974
  o = Math.max(0, Math.min(o, I - 1));
967
975
  var y = 0;
968
976
  if (this._outerRef) {
969
- var S = this._outerRef;
970
- g === "vertical" ? y = S.scrollWidth > S.clientWidth ? Ne() : 0 : y = S.scrollHeight > S.clientHeight ? Ne() : 0;
977
+ var z = this._outerRef;
978
+ g === "vertical" ? y = z.scrollWidth > z.clientWidth ? Ne() : 0 : y = z.scrollHeight > z.clientHeight ? Ne() : 0;
971
979
  }
972
- this.scrollTo(l(this.props, o, d, N, this._instanceProps, y));
973
- }, A.componentDidMount = function() {
980
+ this.scrollTo(l(this.props, o, d, S, this._instanceProps, y));
981
+ }, T.componentDidMount = function() {
974
982
  var o = this.props, d = o.direction, p = o.initialScrollOffset, I = o.layout;
975
983
  if (typeof p == "number" && this._outerRef != null) {
976
984
  var g = this._outerRef;
977
985
  d === "horizontal" || I === "horizontal" ? g.scrollLeft = p : g.scrollTop = p;
978
986
  }
979
987
  this._callPropsCallbacks();
980
- }, A.componentDidUpdate = function() {
981
- var o = this.props, d = o.direction, p = o.layout, I = this.state, g = I.scrollOffset, N = I.scrollUpdateWasRequested;
982
- if (N && this._outerRef != null) {
988
+ }, T.componentDidUpdate = function() {
989
+ var o = this.props, d = o.direction, p = o.layout, I = this.state, g = I.scrollOffset, S = I.scrollUpdateWasRequested;
990
+ if (S && this._outerRef != null) {
983
991
  var y = this._outerRef;
984
992
  if (d === "horizontal" || p === "horizontal")
985
993
  if (d === "rtl")
@@ -991,8 +999,8 @@ function ai(e) {
991
999
  y.scrollLeft = g;
992
1000
  break;
993
1001
  default:
994
- var S = y.clientWidth, x = y.scrollWidth;
995
- y.scrollLeft = x - S - g;
1002
+ var z = y.clientWidth, A = y.scrollWidth;
1003
+ y.scrollLeft = A - z - g;
996
1004
  break;
997
1005
  }
998
1006
  else
@@ -1001,18 +1009,18 @@ function ai(e) {
1001
1009
  y.scrollTop = g;
1002
1010
  }
1003
1011
  this._callPropsCallbacks();
1004
- }, A.componentWillUnmount = function() {
1012
+ }, T.componentWillUnmount = function() {
1005
1013
  this._resetIsScrollingTimeoutId !== null && ye(this._resetIsScrollingTimeoutId);
1006
- }, A.render = function() {
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 = [];
1008
- if (x > 0)
1009
- for (var R = qe; R <= Ye; R++)
1014
+ }, T.render = function() {
1015
+ var o = this.props, d = o.children, p = o.className, I = o.direction, g = o.height, S = o.innerRef, y = o.innerElementType, z = o.innerTagName, A = o.itemCount, O = o.itemData, k = o.itemKey, Y = k === void 0 ? oi : k, W = o.layout, Ee = o.outerElementType, Re = o.outerTagName, Qe = o.style, Ue = o.useIsScrolling, Pe = o.width, se = this.state.isScrolling, G = I === "horizontal" || W === "horizontal", _e = G ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), qe = re[0], Ye = re[1], oe = [];
1016
+ if (A > 0)
1017
+ for (var Q = qe; Q <= Ye; Q++)
1010
1018
  oe.push(Z(d, {
1011
1019
  data: O,
1012
- key: q(R, O),
1013
- index: R,
1020
+ key: Y(Q, O),
1021
+ index: Q,
1014
1022
  isScrolling: Ue ? se : void 0,
1015
- style: this._getItemStyle(R)
1023
+ style: this._getItemStyle(Q)
1016
1024
  }));
1017
1025
  var ae = n(this.props, this._instanceProps);
1018
1026
  return Z(Ee || Re || "div", {
@@ -1028,33 +1036,33 @@ function ai(e) {
1028
1036
  willChange: "transform",
1029
1037
  direction: I
1030
1038
  }, Qe)
1031
- }, Z(y || S || "div", {
1039
+ }, Z(y || z || "div", {
1032
1040
  children: oe,
1033
- ref: N,
1041
+ ref: S,
1034
1042
  style: {
1035
1043
  height: G ? "100%" : ae,
1036
1044
  pointerEvents: se ? "none" : void 0,
1037
1045
  width: G ? ae : "100%"
1038
1046
  }
1039
1047
  }));
1040
- }, A._callPropsCallbacks = function() {
1048
+ }, T._callPropsCallbacks = function() {
1041
1049
  if (typeof this.props.onItemsRendered == "function") {
1042
1050
  var o = this.props.itemCount;
1043
1051
  if (o > 0) {
1044
- var d = this._getRangeToRender(), p = d[0], I = d[1], g = d[2], N = d[3];
1045
- this._callOnItemsRendered(p, I, g, N);
1052
+ var d = this._getRangeToRender(), p = d[0], I = d[1], g = d[2], S = d[3];
1053
+ this._callOnItemsRendered(p, I, g, S);
1046
1054
  }
1047
1055
  }
1048
1056
  if (typeof this.props.onScroll == "function") {
1049
- var y = this.state, S = y.scrollDirection, x = y.scrollOffset, O = y.scrollUpdateWasRequested;
1050
- this._callOnScroll(S, x, O);
1057
+ var y = this.state, z = y.scrollDirection, A = y.scrollOffset, O = y.scrollUpdateWasRequested;
1058
+ this._callOnScroll(z, A, O);
1051
1059
  }
1052
- }, A._getRangeToRender = function() {
1053
- var o = this.props, d = o.itemCount, p = o.overscanCount, I = this.state, g = I.isScrolling, N = I.scrollDirection, y = I.scrollOffset;
1060
+ }, T._getRangeToRender = function() {
1061
+ var o = this.props, d = o.itemCount, p = o.overscanCount, I = this.state, g = I.isScrolling, S = I.scrollDirection, y = I.scrollOffset;
1054
1062
  if (d === 0)
1055
1063
  return [0, 0, 0, 0];
1056
- var S = c(this.props, y, this._instanceProps), x = m(this.props, S, y, this._instanceProps), O = !g || N === "backward" ? Math.max(1, p) : 1, k = !g || N === "forward" ? Math.max(1, p) : 1;
1057
- return [Math.max(0, S - O), Math.max(0, Math.min(d - 1, x + k)), S, x];
1064
+ var z = c(this.props, y, this._instanceProps), A = m(this.props, z, y, this._instanceProps), O = !g || S === "backward" ? Math.max(1, p) : 1, k = !g || S === "forward" ? Math.max(1, p) : 1;
1065
+ return [Math.max(0, z - O), Math.max(0, Math.min(d - 1, A + k)), z, A];
1058
1066
  }, v;
1059
1067
  }(xe), t.defaultProps = {
1060
1068
  direction: "ltr",
@@ -1080,7 +1088,7 @@ var li = function(t, i) {
1080
1088
  return n * i;
1081
1089
  },
1082
1090
  getOffsetForIndexAndAlignment: function(t, i, n, r, l, c) {
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);
1091
+ var m = t.direction, u = t.height, h = t.itemCount, N = t.itemSize, M = t.layout, v = t.width, T = m === "horizontal" || M === "horizontal", D = T ? v : u, o = Math.max(0, h * N - D), d = Math.min(o, i * N), p = Math.max(0, i * N - D + N + c);
1084
1092
  switch (n === "smart" && (r >= p - D && r <= d + D ? n = "auto" : n = "center"), n) {
1085
1093
  case "start":
1086
1094
  return d;
@@ -1100,10 +1108,10 @@ var li = function(t, i) {
1100
1108
  return Math.max(0, Math.min(n - 1, Math.floor(i / r)));
1101
1109
  },
1102
1110
  getStopIndexForStartIndex: function(t, i, n) {
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);
1111
+ var r = t.direction, l = t.height, c = t.itemCount, m = t.itemSize, u = t.layout, h = t.width, N = r === "horizontal" || u === "horizontal", M = i * m, v = N ? h : l, T = Math.ceil((v + n - M) / m);
1104
1112
  return Math.max(0, Math.min(
1105
1113
  c - 1,
1106
- i + A - 1
1114
+ i + T - 1
1107
1115
  // -1 is because stop index is inclusive
1108
1116
  ));
1109
1117
  },
@@ -1120,8 +1128,8 @@ function di(e) {
1120
1128
  }
1121
1129
  function ui(e) {
1122
1130
  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++) {
1123
- var T = t(h);
1124
- T ? u !== null && (c.push(m, u), m = u = null) : (u = h, m === null && (m = h));
1131
+ var N = t(h);
1132
+ N ? u !== null && (c.push(m, u), m = u = null) : (u = h, m === null && (m = h));
1125
1133
  }
1126
1134
  if (u !== null) {
1127
1135
  for (var M = Math.min(Math.max(u, m + n - 1), i - 1), v = u + 1; v <= M && !t(v); v++)
@@ -1130,9 +1138,9 @@ function ui(e) {
1130
1138
  }
1131
1139
  if (c.length)
1132
1140
  for (; c[1] - c[0] + 1 < n && c[0] > 0; ) {
1133
- var A = c[0] - 1;
1134
- if (!t(A))
1135
- c[0] = A;
1141
+ var T = c[0] - 1;
1142
+ if (!t(T))
1143
+ c[0] = T;
1136
1144
  else
1137
1145
  break;
1138
1146
  }
@@ -1174,8 +1182,8 @@ var pi = function(e, t) {
1174
1182
  for (var c = arguments.length, m = Array(c), u = 0; u < c; u++)
1175
1183
  m[u] = arguments[u];
1176
1184
  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) {
1177
- var T = h.visibleStartIndex, M = h.visibleStopIndex;
1178
- r._lastRenderedStartIndex = T, r._lastRenderedStopIndex = M, r._ensureRowsLoaded(T, M);
1185
+ var N = h.visibleStartIndex, M = h.visibleStopIndex;
1186
+ r._lastRenderedStartIndex = N, r._lastRenderedStopIndex = M, r._ensureRowsLoaded(N, M);
1179
1187
  }, r._setRef = function(h) {
1180
1188
  r._listRef = h;
1181
1189
  }, n), Ae(r, l);
@@ -1202,32 +1210,32 @@ var pi = function(e, t) {
1202
1210
  }, {
1203
1211
  key: "_ensureRowsLoaded",
1204
1212
  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({
1213
+ var l = this.props, c = l.isItemLoaded, m = l.itemCount, u = l.minimumBatchSize, h = u === void 0 ? 10 : u, N = l.threshold, M = N === void 0 ? 15 : N, v = ui({
1206
1214
  isItemLoaded: c,
1207
1215
  itemCount: m,
1208
1216
  minimumBatchSize: h,
1209
1217
  startIndex: Math.max(0, n - M),
1210
1218
  stopIndex: Math.min(m - 1, r + M)
1211
1219
  });
1212
- (this._memoizedUnloadedRanges.length !== v.length || this._memoizedUnloadedRanges.some(function(A, D) {
1213
- return v[D] !== A;
1220
+ (this._memoizedUnloadedRanges.length !== v.length || this._memoizedUnloadedRanges.some(function(T, D) {
1221
+ return v[D] !== T;
1214
1222
  })) && (this._memoizedUnloadedRanges = v, this._loadUnloadedRanges(v));
1215
1223
  }
1216
1224
  }, {
1217
1225
  key: "_loadUnloadedRanges",
1218
1226
  value: function(n) {
1219
1227
  for (var r = this, l = this.props.loadMoreItems || this.props.loadMoreRows, c = function(h) {
1220
- var T = n[h], M = n[h + 1], v = l(T, M);
1228
+ var N = n[h], M = n[h + 1], v = l(N, M);
1221
1229
  v != null && v.then(function() {
1222
1230
  if (di({
1223
1231
  lastRenderedStartIndex: r._lastRenderedStartIndex,
1224
1232
  lastRenderedStopIndex: r._lastRenderedStopIndex,
1225
- startIndex: T,
1233
+ startIndex: N,
1226
1234
  stopIndex: M
1227
1235
  })) {
1228
1236
  if (r._listRef == null)
1229
1237
  return;
1230
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(T, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1238
+ typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(N, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1231
1239
  }
1232
1240
  });
1233
1241
  }, m = 0; m < n.length; m += 2)
@@ -1278,7 +1286,7 @@ const fi = /* @__PURE__ */ a("div")({
1278
1286
  }) => /* @__PURE__ */ f(fi, { onClick: l, style: c, children: [
1279
1287
  /* @__PURE__ */ s(gi, { children: e || 0 }),
1280
1288
  /* @__PURE__ */ f(yi, { children: [
1281
- t ? /* @__PURE__ */ s(vi, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(Mi, { children: Oe(i || "") }),
1289
+ t ? /* @__PURE__ */ s(vi, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(Mi, { children: je(i || "") }),
1282
1290
  /* @__PURE__ */ f(Ni, { children: [
1283
1291
  /* @__PURE__ */ s(Ti, { children: i || "" }),
1284
1292
  r && /* @__PURE__ */ s(Di, { name: "icon-star" })
@@ -1294,7 +1302,7 @@ const fi = /* @__PURE__ */ a("div")({
1294
1302
  currentUserId: t,
1295
1303
  openItemDetail: i,
1296
1304
  fetchMore: n
1297
- }) => /* @__PURE__ */ s(Fe, { children: ({ width: r, height: l }) => /* @__PURE__ */ s(
1305
+ }) => /* @__PURE__ */ s(Ve, { children: ({ width: r, height: l }) => /* @__PURE__ */ s(
1298
1306
  Ii,
1299
1307
  {
1300
1308
  isItemLoaded: (c) => c < e.length,
@@ -1322,10 +1330,10 @@ const fi = /* @__PURE__ */ a("div")({
1322
1330
  }
1323
1331
  ) })
1324
1332
  }
1325
- ) }), ji = ({ deepLink: e }) => {
1333
+ ) }), Oi = ({ deepLink: e }) => {
1326
1334
  const { data: t } = w(e.$store), i = t == null ? void 0 : t.url, n = e.desktopLink;
1327
1335
  return /* @__PURE__ */ s(
1328
- Ve,
1336
+ Fe,
1329
1337
  {
1330
1338
  inviteLink: i || n,
1331
1339
  socialLinks: [
@@ -1344,7 +1352,7 @@ const fi = /* @__PURE__ */ a("div")({
1344
1352
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1345
1353
  }
1346
1354
  );
1347
- }, Oi = ({ gamification: e }) => {
1355
+ }, ji = ({ gamification: e }) => {
1348
1356
  const { data: t } = w(e.leaderboardList.$store);
1349
1357
  return t != null && t.length ? /* @__PURE__ */ s(
1350
1358
  xi,
@@ -1354,7 +1362,7 @@ const fi = /* @__PURE__ */ a("div")({
1354
1362
  openItemDetail: e.openUser,
1355
1363
  currentUserId: e.currentUserId.get()
1356
1364
  }
1357
- ) : /* @__PURE__ */ s(ji, { deepLink: e.deepLink });
1365
+ ) : /* @__PURE__ */ s(Oi, { deepLink: e.deepLink });
1358
1366
  }, ki = /* @__PURE__ */ a("div")({
1359
1367
  name: "QuestionItem",
1360
1368
  class: "q1w97g3p",
@@ -1367,15 +1375,15 @@ const fi = /* @__PURE__ */ a("div")({
1367
1375
  name: "QuestionBody",
1368
1376
  class: "qd5h0uc",
1369
1377
  propsAsIs: !1
1370
- }), bi = /* @__PURE__ */ a("div")({
1378
+ }), $i = /* @__PURE__ */ a("div")({
1371
1379
  name: "QuestionAction",
1372
1380
  class: "q105uluy",
1373
1381
  propsAsIs: !1
1374
- }), $i = () => j, V = /* @__PURE__ */ a($i())({
1382
+ }), Li = () => j, B = /* @__PURE__ */ a(Li())({
1375
1383
  name: "QuestionActionIcon",
1376
1384
  class: "q1fa0b9h",
1377
1385
  propsAsIs: !0
1378
- }), Li = () => j, Ei = /* @__PURE__ */ a(Li())({
1386
+ }), bi = () => j, Ei = /* @__PURE__ */ a(bi())({
1379
1387
  name: "QuestionTypeIcon",
1380
1388
  class: "qxlt78s",
1381
1389
  propsAsIs: !0
@@ -1392,10 +1400,10 @@ const fi = /* @__PURE__ */ a("div")({
1392
1400
  class: "p1pba9p1",
1393
1401
  propsAsIs: !1
1394
1402
  }), 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" })
1403
+ [V.LOST]: /* @__PURE__ */ s(B, { name: "incorrectVoted" }),
1404
+ [V.WON]: /* @__PURE__ */ s(B, { name: "icon-check" }),
1405
+ [V.UNSET]: /* @__PURE__ */ s(B, { name: "icon-arrow" }),
1406
+ [V.DNP]: /* @__PURE__ */ s(B, { name: "icon-arrow" })
1399
1407
  }, _i = ({
1400
1408
  questionId: e,
1401
1409
  questionType: t,
@@ -1412,19 +1420,19 @@ const fi = /* @__PURE__ */ a("div")({
1412
1420
  /* @__PURE__ */ s(
1413
1421
  Ei,
1414
1422
  {
1415
- "data-type-trivia": t === z.TRIVIA,
1416
- "data-type-poll": t === z.POLL,
1423
+ "data-type-trivia": t === x.TRIVIA,
1424
+ "data-type-poll": t === x.POLL,
1417
1425
  name: m.iconName
1418
1426
  }
1419
1427
  ),
1420
1428
  /* @__PURE__ */ f(Ri, { children: [
1421
1429
  m.label,
1422
- t === z.TRIVIA && i === L.RESOLVED && " • Expired"
1430
+ t === x.TRIVIA && i === b.RESOLVED && " • Expired"
1423
1431
  ] })
1424
1432
  ] }),
1425
1433
  /* @__PURE__ */ s(Ci, { children: n || "" })
1426
1434
  ] }),
1427
- /* @__PURE__ */ s(bi, { children: r ? /* @__PURE__ */ s(Ui, { children: "Play" }) : u })
1435
+ /* @__PURE__ */ s($i, { children: r ? /* @__PURE__ */ s(Ui, { children: "Play" }) : u })
1428
1436
  ] }) : null;
1429
1437
  }, qi = /* @__PURE__ */ a("div")({
1430
1438
  name: "Container",
@@ -1439,13 +1447,13 @@ const fi = /* @__PURE__ */ a("div")({
1439
1447
  questionId: t,
1440
1448
  ...i
1441
1449
  }) => /* @__PURE__ */ f(qi, { children: [
1442
- /* @__PURE__ */ s(Le, { questionId: t, ...i }),
1450
+ /* @__PURE__ */ s(be, { questionId: t, ...i }),
1443
1451
  e && /* @__PURE__ */ s(Yi, { onClick: () => e(t), children: "View Insight" })
1444
- ] }), Fi = /* @__PURE__ */ a("div")({
1452
+ ] }), Vi = /* @__PURE__ */ a("div")({
1445
1453
  name: "QuestionsContainer",
1446
1454
  class: "qvghv3l",
1447
1455
  propsAsIs: !1
1448
- }), Vi = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Fi, { children: e == null ? void 0 : e.map((i) => {
1456
+ }), Fi = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Vi, { children: e == null ? void 0 : e.map((i) => {
1449
1457
  var n, r;
1450
1458
  if (i.type === "question" && ((n = i.attributes) == null ? void 0 : n.attributes.case) === "question") {
1451
1459
  const l = i.attributes.attributes.value;
@@ -1458,7 +1466,7 @@ const fi = /* @__PURE__ */ a("div")({
1458
1466
  return null;
1459
1467
  }) }), Bi = ({ store: e, openQuestion: t }) => {
1460
1468
  const i = w(e);
1461
- return i != null && i.data ? /* @__PURE__ */ s(Vi, { openQuestion: t, questions: i.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1469
+ return i != null && i.data ? /* @__PURE__ */ s(Fi, { openQuestion: t, questions: i.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1462
1470
  }, Hi = ({ userSummary: e }) => {
1463
1471
  var t, i;
1464
1472
  const n = w(e.getStore());
@@ -1466,7 +1474,7 @@ const fi = /* @__PURE__ */ a("div")({
1466
1474
  }, Gi = ({
1467
1475
  gamification: e
1468
1476
  }) => {
1469
- const [t, i] = P(H.HOME);
1477
+ const [t, i] = _(H.HOME);
1470
1478
  return /* @__PURE__ */ f("div", {
1471
1479
  style: {
1472
1480
  height: "100%",
@@ -1498,7 +1506,7 @@ const fi = /* @__PURE__ */ a("div")({
1498
1506
  })]
1499
1507
  }), t === H.LEADERBOARD && /* @__PURE__ */ s("div", {
1500
1508
  className: "c1bp9dj2",
1501
- children: /* @__PURE__ */ s(Oi, {
1509
+ children: /* @__PURE__ */ s(ji, {
1502
1510
  gamification: e
1503
1511
  })
1504
1512
  })]
@@ -1522,7 +1530,7 @@ const fi = /* @__PURE__ */ a("div")({
1522
1530
  className: t
1523
1531
  }) => {
1524
1532
  const i = w(e.openedQuestion.$store), n = w(e.openedUser);
1525
- return /* @__PURE__ */ f($, {
1533
+ return /* @__PURE__ */ f(R, {
1526
1534
  children: [i && /* @__PURE__ */ s(De, {
1527
1535
  className: t,
1528
1536
  children: /* @__PURE__ */ s(Hn, {
@@ -1531,7 +1539,7 @@ const fi = /* @__PURE__ */ a("div")({
1531
1539
  }), n && /* @__PURE__ */ s(De, {
1532
1540
  className: t,
1533
1541
  children: /* @__PURE__ */ f(Ji, {
1534
- children: [/* @__PURE__ */ s(je, {
1542
+ children: [/* @__PURE__ */ s(Oe, {
1535
1543
  label: "Friend's Rank",
1536
1544
  close: e.closeUser
1537
1545
  }), /* @__PURE__ */ s(ee, {