@streamlayer/react 0.30.1 → 0.30.3

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
1
  import { jsxs as I, jsx as r, Fragment as E } from "react/jsx-runtime";
2
- import { s as a, i as j, o as De, a as Se, b as ze, Q as x, c as q, d as $, E as L, r as xe, e as Ye, f as We, n as Fe, w as Ve, u as w, A as Be, O as He, P as F, g as Ge, h as ee, j as Ze, k as Je } from "./masters.js";
3
- import U, { useRef as C, useState as R, useCallback as P, useEffect as Ke, useLayoutEffect as Xe, useMemo as B, createElement as G, PureComponent as je } from "react";
2
+ import { s as a, i as j, o as Se, a as ze, b as xe, Q as x, c as _, d as b, E as L, r as se, e as Ye, f as We, n as Fe, w as Ve, u as w, A as Be, O as He, P as W, g as Ge, h as ee, j as Ze, k as Je } from "./masters.js";
3
+ import U, { useRef as C, useState as R, useCallback as q, useEffect as Ke, useLayoutEffect as Xe, useMemo as V, createElement as G, PureComponent as je } from "react";
4
4
  const et = /* @__PURE__ */ a("div")({
5
5
  name: "Container",
6
6
  class: "c1vwopgc",
@@ -26,7 +26,7 @@ const et = /* @__PURE__ */ a("div")({
26
26
  class: "cvsl7l3",
27
27
  propsAsIs: !0
28
28
  }), ke = ({ type: e, close: t, label: n }) => {
29
- const s = e ? De[e] : { label: n, iconName: void 0 };
29
+ const s = e ? Se[e] : { label: n, iconName: void 0 };
30
30
  return /* @__PURE__ */ I(et, { children: [
31
31
  /* @__PURE__ */ I(tt, { children: [
32
32
  (s == null ? void 0 : s.iconName) && /* @__PURE__ */ r(st, { name: s.iconName }),
@@ -46,7 +46,7 @@ const et = /* @__PURE__ */ a("div")({
46
46
  name: "Indicator",
47
47
  class: "i1fbnvpb",
48
48
  propsAsIs: !1
49
- }), ae = ({ indicator: e, title: t }) => /* @__PURE__ */ I(lt, { children: [
49
+ }), le = ({ indicator: e, title: t }) => /* @__PURE__ */ I(lt, { children: [
50
50
  /* @__PURE__ */ r(ct, { children: t }),
51
51
  /* @__PURE__ */ r(dt, { children: e })
52
52
  ] }), ut = /* @__PURE__ */ a("div")({
@@ -61,7 +61,7 @@ const et = /* @__PURE__ */ a("div")({
61
61
  name: "Title",
62
62
  class: "t8s05oq",
63
63
  propsAsIs: !1
64
- }), V = ({ indicator: e, title: t }) => /* @__PURE__ */ I(ut, { children: [
64
+ }), F = ({ indicator: e, title: t }) => /* @__PURE__ */ I(ut, { children: [
65
65
  /* @__PURE__ */ r(pt, { children: e }),
66
66
  /* @__PURE__ */ r(mt, { children: t })
67
67
  ] }), ht = /* @__PURE__ */ a("div")({
@@ -147,7 +147,7 @@ const et = /* @__PURE__ */ a("div")({
147
147
  /* @__PURE__ */ r(It, { children: /* @__PURE__ */ I(gt, { children: [
148
148
  /* @__PURE__ */ I(Ot, { children: [
149
149
  e && /* @__PURE__ */ r(Mt, { alt: "avatar", src: e }),
150
- !e && /* @__PURE__ */ r(kt, { children: Se(t || "") })
150
+ !e && /* @__PURE__ */ r(kt, { children: ze(t || "") })
151
151
  ] }),
152
152
  /* @__PURE__ */ I(vt, { children: [
153
153
  /* @__PURE__ */ r(yt, { children: t }),
@@ -155,7 +155,7 @@ const et = /* @__PURE__ */ a("div")({
155
155
  /* @__PURE__ */ I(Tt, { children: [
156
156
  /* @__PURE__ */ r(At, { alt: "rank-icon", src: wt }),
157
157
  /* @__PURE__ */ I(Dt, { children: [
158
- ze(n),
158
+ xe(n),
159
159
  /* @__PURE__ */ r(St, { children: "PTS" })
160
160
  ] })
161
161
  ] }),
@@ -170,32 +170,32 @@ const et = /* @__PURE__ */ a("div")({
170
170
  ] }) }),
171
171
  /* @__PURE__ */ I(ft, { children: [
172
172
  /* @__PURE__ */ I(xt, { children: [
173
- /* @__PURE__ */ r(ae, { indicator: s || 0, title: "Friends rank" }),
174
- /* @__PURE__ */ r(ae, { indicator: i || 0, title: "Global rank" })
173
+ /* @__PURE__ */ r(le, { indicator: s || 0, title: "Friends rank" }),
174
+ /* @__PURE__ */ r(le, { indicator: i || 0, title: "Global rank" })
175
175
  ] }),
176
176
  /* @__PURE__ */ I(jt, { children: [
177
- /* @__PURE__ */ r(V, { indicator: c || 0, title: "Win streak" }),
178
- /* @__PURE__ */ r(V, { indicator: l || 0, title: "Correct" }),
179
- /* @__PURE__ */ r(V, { indicator: m || 0, title: "Incorrect" }),
180
- /* @__PURE__ */ r(V, { indicator: `${f || 0}%`, title: "Succ. rate" })
177
+ /* @__PURE__ */ r(F, { indicator: c || 0, title: "Win streak" }),
178
+ /* @__PURE__ */ r(F, { indicator: l || 0, title: "Correct" }),
179
+ /* @__PURE__ */ r(F, { indicator: m || 0, title: "Incorrect" }),
180
+ /* @__PURE__ */ r(F, { indicator: `${f || 0}%`, title: "Succ. rate" })
181
181
  ] })
182
182
  ] })
183
183
  ] }), Ct = /* @__PURE__ */ a("div")({
184
184
  name: "Container",
185
185
  class: "c38csyt",
186
186
  propsAsIs: !1
187
- }), bt = /* @__PURE__ */ a("div")({
187
+ }), $t = /* @__PURE__ */ a("div")({
188
188
  name: "Title",
189
189
  class: "ty221rx",
190
190
  propsAsIs: !1
191
- }), $t = /* @__PURE__ */ a("div")({
191
+ }), bt = /* @__PURE__ */ a("div")({
192
192
  name: "Description",
193
193
  class: "dlaj9xp",
194
194
  propsAsIs: !1
195
195
  }), Et = ({ title: e, description: t }) => /* @__PURE__ */ I(Ct, { children: [
196
196
  /* @__PURE__ */ r(j, { name: "icon-check-circle" }),
197
- /* @__PURE__ */ r(bt, { children: e }),
198
- /* @__PURE__ */ r($t, { children: t })
197
+ /* @__PURE__ */ r($t, { children: e }),
198
+ /* @__PURE__ */ r(bt, { children: t })
199
199
  ] }), Lt = /* @__PURE__ */ a("div")({
200
200
  name: "Container",
201
201
  class: "c16sbdnm",
@@ -204,11 +204,11 @@ const et = /* @__PURE__ */ a("div")({
204
204
  name: "IconPrediction",
205
205
  class: "ibhorgl",
206
206
  propsAsIs: !0
207
- }), le = /* @__PURE__ */ a("div")({
207
+ }), ce = /* @__PURE__ */ a("div")({
208
208
  name: "FeedbackIconWrap",
209
209
  class: "f1g20ja7",
210
210
  propsAsIs: !1
211
- }), ce = /* @__PURE__ */ a("div")({
211
+ }), de = /* @__PURE__ */ a("div")({
212
212
  name: "FeedbackHeader",
213
213
  class: "f455ozj",
214
214
  propsAsIs: !1
@@ -233,14 +233,14 @@ const et = /* @__PURE__ */ a("div")({
233
233
  questionStatus: c
234
234
  }) => {
235
235
  const l = n && (s === x.TRIVIA || s === x.PREDICTION);
236
- if (!l && c !== q.RESOLVED)
236
+ if (!l && c !== _.RESOLVED)
237
237
  return null;
238
238
  const m = s === x.PREDICTION && !i, d = t ? "correct" : "incorrect", f = t ? e.correctFeedback : e.incorrectFeedback;
239
239
  return /* @__PURE__ */ I(Lt, { "data-isPrediction": m, children: [
240
- c === q.RESOLVED && s === x.TRIVIA && !n && /* @__PURE__ */ I(E, { children: [
241
- /* @__PURE__ */ r(le, { children: /* @__PURE__ */ r(j, { name: "questionExpired" }) }),
240
+ c === _.RESOLVED && s === x.TRIVIA && !n && /* @__PURE__ */ I(E, { children: [
241
+ /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(j, { name: "questionExpired" }) }),
242
242
  /* @__PURE__ */ I("div", { children: [
243
- /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(Z, { children: "Question Expired" }) }),
243
+ /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Z, { children: "Question Expired" }) }),
244
244
  /* @__PURE__ */ r(_t, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
245
245
  ] })
246
246
  ] }),
@@ -249,8 +249,8 @@ const et = /* @__PURE__ */ a("div")({
249
249
  /* @__PURE__ */ r(Z, { children: "Stay tuned to see if your prediction was correct." })
250
250
  ] }),
251
251
  l && i && /* @__PURE__ */ I(E, { children: [
252
- /* @__PURE__ */ r(le, { "data-feedbackType": d, children: /* @__PURE__ */ r(j, { name: d }) }),
253
- /* @__PURE__ */ r("div", { children: /* @__PURE__ */ I(ce, { children: [
252
+ /* @__PURE__ */ r(ce, { "data-feedbackType": d, children: /* @__PURE__ */ r(j, { name: d }) }),
253
+ /* @__PURE__ */ r("div", { children: /* @__PURE__ */ I(de, { children: [
254
254
  /* @__PURE__ */ r(Ut, { "data-feedbackType": d, children: f == null ? void 0 : f.title }),
255
255
  /* @__PURE__ */ r(Z, { children: f == null ? void 0 : f.description })
256
256
  ] }) })
@@ -320,12 +320,12 @@ const et = /* @__PURE__ */ a("div")({
320
320
  name: "CheckIcon",
321
321
  class: "cu9kmlb",
322
322
  propsAsIs: !0
323
- }), de = {
324
- [$.CENTERED]: (e) => /* @__PURE__ */ r(Kt, { alt: "option-icon", src: e }),
325
- [$.TRANSPARENT]: (e) => /* @__PURE__ */ r(Gt, { children: /* @__PURE__ */ r(Zt, { style: { backgroundImage: `url(${e})` } }) }),
326
- [$.ROUNDED]: (e) => /* @__PURE__ */ r(en, { alt: "option-icon", src: e }),
327
- [$.NONE]: () => null,
328
- [$.UNSET]: () => null
323
+ }), ue = {
324
+ [b.CENTERED]: (e) => /* @__PURE__ */ r(Kt, { alt: "option-icon", src: e }),
325
+ [b.TRANSPARENT]: (e) => /* @__PURE__ */ r(Gt, { children: /* @__PURE__ */ r(Zt, { style: { backgroundImage: `url(${e})` } }) }),
326
+ [b.ROUNDED]: (e) => /* @__PURE__ */ r(en, { alt: "option-icon", src: e }),
327
+ [b.NONE]: () => null,
328
+ [b.UNSET]: () => null
329
329
  }, an = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: s, questionVoted: i }) => {
330
330
  if (e === x.POLL && s)
331
331
  return "correct";
@@ -342,7 +342,7 @@ const et = /* @__PURE__ */ a("div")({
342
342
  correct: n,
343
343
  hasCorrectAnswer: s,
344
344
  questionStatus: i
345
- }) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && s || i === q.RESOLVED && n : !1, cn = (e) => {
345
+ }) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && s || i === _.RESOLVED && n : !1, cn = (e) => {
346
346
  var t;
347
347
  const {
348
348
  // option props
@@ -355,14 +355,14 @@ const et = /* @__PURE__ */ a("div")({
355
355
  youSelected: m,
356
356
  questionVoted: d,
357
357
  // ToDo: Figure out why imageMode is not in the response, and delete default value
358
- imageMode: f = $.ROUNDED,
358
+ imageMode: f = b.ROUNDED,
359
359
  answerTimeExpired: A,
360
360
  questionStatus: v,
361
361
  isLoading: g,
362
362
  questionType: T,
363
363
  correct: D,
364
364
  hasCorrectAnswer: o
365
- } = e, u = an(e), p = ln({ questionType: T, questionVoted: d, correct: D, hasCorrectAnswer: o, questionStatus: v }), h = d || v === q.RESOLVED && T === x.PREDICTION;
365
+ } = e, u = an(e), p = ln({ questionType: T, questionVoted: d, correct: D, hasCorrectAnswer: o, questionStatus: v }), h = d || v === _.RESOLVED && T === x.PREDICTION;
366
366
  return /* @__PURE__ */ I(
367
367
  Vt,
368
368
  {
@@ -374,7 +374,7 @@ const et = /* @__PURE__ */ a("div")({
374
374
  children: [
375
375
  h && /* @__PURE__ */ r(Bt, { "data-answerState": u, style: { width: `${c}%` } }),
376
376
  /* @__PURE__ */ I(Ht, { children: [
377
- s && ((t = de[f]) == null ? void 0 : t.call(de, s)),
377
+ s && ((t = ue[f]) == null ? void 0 : t.call(ue, s)),
378
378
  /* @__PURE__ */ r(tn, { children: i }),
379
379
  h && /* @__PURE__ */ I(nn, { children: [
380
380
  p && /* @__PURE__ */ r(on, { name: "selected" }),
@@ -388,7 +388,7 @@ const et = /* @__PURE__ */ a("div")({
388
388
  }
389
389
  );
390
390
  };
391
- var ue = typeof window > "u" ? Ke : Xe, dn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: s = 0, onComplete: i, onUpdate: c }) => {
391
+ var pe = typeof window > "u" ? Ke : Xe, dn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: s = 0, onComplete: i, onUpdate: c }) => {
392
392
  let [l, m] = R(n), d = C(0), f = C(n), A = C(n * -1e3), v = C(null), g = C(null), T = C(null), D = (p) => {
393
393
  let h = p / 1e3;
394
394
  if (g.current === null) {
@@ -401,27 +401,27 @@ var ue = typeof window > "u" ? Ke : Xe, dn = ({ isPlaying: e, duration: t, start
401
401
  m(z ? t : N), z || (v.current = requestAnimationFrame(D));
402
402
  }, o = () => {
403
403
  v.current && cancelAnimationFrame(v.current), T.current && clearTimeout(T.current), g.current = null;
404
- }, u = P((p) => {
404
+ }, u = q((p) => {
405
405
  o(), d.current = 0;
406
406
  let h = typeof p == "number" ? p : n;
407
407
  f.current = h, m(h), e && (v.current = requestAnimationFrame(D));
408
408
  }, [e, n]);
409
- return ue(() => {
409
+ return pe(() => {
410
410
  if (c == null || c(l), t && l >= t) {
411
411
  A.current += t * 1e3;
412
412
  let { shouldRepeat: p = !1, delay: h = 0, newStartAt: M } = (i == null ? void 0 : i(A.current / 1e3)) || {};
413
413
  p && (T.current = setTimeout(() => u(M), h * 1e3));
414
414
  }
415
- }, [l, t]), ue(() => (e && (v.current = requestAnimationFrame(D)), o), [e, t, s]), { elapsedTime: l, reset: u };
415
+ }, [l, t]), pe(() => (e && (v.current = requestAnimationFrame(D)), o), [e, t, s]), { elapsedTime: l, reset: u };
416
416
  }, un = (e, t, n) => {
417
417
  let s = e / 2, i = t / 2, c = s - i, l = 2 * c, m = n === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * c;
418
418
  return { path: `m ${s},${i} a ${c},${c} 0 ${m} 0,${l} a ${c},${c} 0 ${m} 0,-${l}`, pathLength: d };
419
- }, pe = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, pn = (e) => ({ position: "relative", width: e, height: e }), mn = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Ce = (e, t, n, s, i) => {
419
+ }, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, pn = (e) => ({ position: "relative", width: e, height: e }), mn = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Ce = (e, t, n, s, i) => {
420
420
  if (s === 0)
421
421
  return t;
422
422
  let c = (i ? s - e : e) / s;
423
423
  return t + n * c;
424
- }, me = (e) => {
424
+ }, he = (e) => {
425
425
  var t, n;
426
426
  return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (s, i, c, l) => `#${i}${i}${c}${c}${l}${l}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((s) => parseInt(s, 16))) != null ? n : [];
427
427
  }, hn = (e, t) => {
@@ -434,43 +434,43 @@ var ue = typeof window > "u" ? Ke : Xe, dn = ({ isPlaying: e, duration: t, start
434
434
  return s[0];
435
435
  if (!c)
436
436
  return s[l];
437
- let m = i[l] - t, d = i[l] - i[l + 1], f = me(s[l]), A = me(s[l + 1]), v = !!e.isGrowing;
437
+ let m = i[l] - t, d = i[l] - i[l + 1], f = he(s[l]), A = he(s[l + 1]), v = !!e.isGrowing;
438
438
  return `rgb(${f.map((g, T) => Ce(m, g, A[T] - g, d, v) | 0).join(",")})`;
439
439
  }, In = (e) => {
440
- let { duration: t, initialRemainingTime: n, updateInterval: s, size: i = 180, strokeWidth: c = 12, trailStrokeWidth: l, isPlaying: m = !1, isGrowing: d = !1, rotation: f = "clockwise", onComplete: A, onUpdate: v } = e, g = C(), T = Math.max(c, l ?? 0), { path: D, pathLength: o } = un(i, T, f), { elapsedTime: u } = dn({ isPlaying: m, duration: t, startAt: pe(t, n), updateInterval: s, onUpdate: typeof v == "function" ? (h) => {
440
+ let { duration: t, initialRemainingTime: n, updateInterval: s, size: i = 180, strokeWidth: c = 12, trailStrokeWidth: l, isPlaying: m = !1, isGrowing: d = !1, rotation: f = "clockwise", onComplete: A, onUpdate: v } = e, g = C(), T = Math.max(c, l ?? 0), { path: D, pathLength: o } = un(i, T, f), { elapsedTime: u } = dn({ isPlaying: m, duration: t, startAt: me(t, n), updateInterval: s, onUpdate: typeof v == "function" ? (h) => {
441
441
  let M = Math.ceil(t - h);
442
442
  M !== g.current && (g.current = M, v(M));
443
443
  } : void 0, onComplete: typeof A == "function" ? (h) => {
444
444
  var M;
445
445
  let { shouldRepeat: y, delay: N, newInitialRemainingTime: S } = (M = A(h)) != null ? M : {};
446
446
  if (y)
447
- return { shouldRepeat: y, delay: N, newStartAt: pe(t, S) };
447
+ return { shouldRepeat: y, delay: N, newStartAt: me(t, S) };
448
448
  } : void 0 }), p = t - u;
449
449
  return { elapsedTime: u, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: f, size: i, stroke: hn(e, p), strokeDashoffset: Ce(u, 0, o, t, d), strokeWidth: c };
450
- }, be = (e) => {
450
+ }, $e = (e) => {
451
451
  let { children: t, strokeLinecap: n, trailColor: s, trailStrokeWidth: i } = e, { path: c, pathLength: l, stroke: m, strokeDashoffset: d, remainingTime: f, elapsedTime: A, size: v, strokeWidth: g } = In(e);
452
452
  return U.createElement("div", { style: pn(v) }, U.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, U.createElement("path", { d: c, fill: "none", stroke: s ?? "#d9d9d9", strokeWidth: i ?? g }), U.createElement("path", { d: c, fill: "none", stroke: m, strokeLinecap: n ?? "round", strokeWidth: g, strokeDasharray: l, strokeDashoffset: d })), typeof t == "function" && U.createElement("div", { style: mn }, t({ remainingTime: f, elapsedTime: A, color: m })));
453
453
  };
454
- be.displayName = "CountdownCircleTimer";
454
+ $e.displayName = "CountdownCircleTimer";
455
455
  const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10, 0], Mn = /* @__PURE__ */ a("div")({
456
456
  name: "RemainingTime",
457
457
  class: "r165427",
458
458
  propsAsIs: !1
459
- }), vn = L.SECONDARY_GREEN6, he = L.SECONDARY_RED3, yn = L.NEUTRALS_GRAY3, Nn = ({
459
+ }), vn = L.SECONDARY_GREEN6, Ie = L.SECONDARY_RED3, yn = L.NEUTRALS_GRAY3, Nn = ({
460
460
  isPlaying: e = !0,
461
461
  duration: t = 30,
462
462
  onTimerExpired: n
463
463
  }) => {
464
- const [s, i] = R(t > 10 ? vn : he), c = ({
464
+ const [s, i] = R(t > 10 ? vn : Ie), c = ({
465
465
  remainingTime: d
466
466
  }) => /* @__PURE__ */ r(Mn, {
467
467
  children: d
468
- }), l = P(() => {
468
+ }), l = q(() => {
469
469
  n == null || n(), i(yn);
470
- }, [n, i]), m = P((d) => {
471
- d === 10 && i(he);
470
+ }, [n, i]), m = q((d) => {
471
+ d === 10 && i(Ie);
472
472
  }, [i]);
473
- return /* @__PURE__ */ r(be, {
473
+ return /* @__PURE__ */ r($e, {
474
474
  isPlaying: e,
475
475
  duration: t,
476
476
  colors: fn,
@@ -525,7 +525,7 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
525
525
  s && /* @__PURE__ */ r(Nn, { isPlaying: n, onTimerExpired: i })
526
526
  ] }), wn = ({ openedQuestion: e, vote: t, close: n }) => {
527
527
  var s;
528
- const i = e.subject, c = e.type, l = (s = e.options) == null ? void 0 : s.options, [m, d] = R(!1), [f, A] = R(!1), [v, g] = R(""), T = e == null ? void 0 : e.id, D = P(
528
+ const i = e.subject, c = e.type, l = (s = e.options) == null ? void 0 : s.options, [m, d] = R(!1), [f, A] = R(!1), [v, g] = R(""), T = e == null ? void 0 : e.id, D = q(
529
529
  async (y) => {
530
530
  if (T) {
531
531
  const N = y.currentTarget.value;
@@ -533,15 +533,15 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
533
533
  }
534
534
  },
535
535
  [T, g, t]
536
- ), o = P(() => {
536
+ ), o = q(() => {
537
537
  d(!0), setTimeout(n, 3e3);
538
- }, [n]), u = B(
538
+ }, [n]), u = V(
539
539
  () => e == null ? void 0 : e.answers.find((y) => y.youVoted === !0),
540
540
  [e]
541
- ), p = B(
541
+ ), p = V(
542
542
  () => !!(e != null && e.answers.find((y) => y.correct === !0)),
543
543
  [e]
544
- ), h = B(() => e ? e.answers.map((y) => ({
544
+ ), h = V(() => e ? e.answers.map((y) => ({
545
545
  ...y,
546
546
  questionVoted: !!u,
547
547
  youSelected: v === y.id,
@@ -553,7 +553,7 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
553
553
  // ToDo: Figure out why imageMode is not in the response
554
554
  onVote: D
555
555
  })) : [], [p, m, f, e, u, D, v]), M = l && (l.case === "trivia" || l.case === "prediction") ? l.value : void 0;
556
- return /* @__PURE__ */ r(xe, { "data-question-header": "true", children: /* @__PURE__ */ r(Pt, { children: /* @__PURE__ */ I(Yt, { children: [
556
+ return /* @__PURE__ */ r(se, { "data-question-header": "true", children: /* @__PURE__ */ r(Pt, { children: /* @__PURE__ */ I(Yt, { children: [
557
557
  M && /* @__PURE__ */ r(
558
558
  qt,
559
559
  {
@@ -589,11 +589,11 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
589
589
  name: "Container",
590
590
  class: "cgn5uen",
591
591
  propsAsIs: !1
592
- }), bn = /* @__PURE__ */ a("div")({
592
+ }), $n = /* @__PURE__ */ a("div")({
593
593
  name: "Content",
594
594
  class: "c1px8nt6",
595
595
  propsAsIs: !1
596
- }), $n = /* @__PURE__ */ a("h3")({
596
+ }), bn = /* @__PURE__ */ a("h3")({
597
597
  name: "Title",
598
598
  class: "t5et2jt",
599
599
  propsAsIs: !1
@@ -605,8 +605,8 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
605
605
  name: "DateWrap",
606
606
  class: "dd3lh3p",
607
607
  propsAsIs: !1
608
- }), $e = ({ created: e, title: t, instantView: n }) => {
609
- const s = B(() => {
608
+ }), be = ({ created: e, title: t, instantView: n }) => {
609
+ const s = V(() => {
610
610
  if (e) {
611
611
  const i = new Date(e);
612
612
  if (Ye(i))
@@ -624,8 +624,8 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
624
624
  s.time
625
625
  ] }),
626
626
  (n == null ? void 0 : n.video) && /* @__PURE__ */ r(Ve, { source: n.video.url, poster: n.video.thumbnailUrl }),
627
- /* @__PURE__ */ I(bn, { children: [
628
- /* @__PURE__ */ r($n, { children: (n == null ? void 0 : n.heading) || t }),
627
+ /* @__PURE__ */ I($n, { children: [
628
+ /* @__PURE__ */ r(bn, { children: (n == null ? void 0 : n.heading) || t }),
629
629
  /* @__PURE__ */ r(En, { children: n == null ? void 0 : n.body })
630
630
  ] })
631
631
  ] });
@@ -638,7 +638,7 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
638
638
  class: "w19zie3h",
639
639
  propsAsIs: !1
640
640
  }), Un = ({ instantView: e, ...t }) => /* @__PURE__ */ I(Rn, { children: [
641
- /* @__PURE__ */ r($e, { instantView: e, ...t }),
641
+ /* @__PURE__ */ r(be, { instantView: e, ...t }),
642
642
  (e == null ? void 0 : e.webLink) && /* @__PURE__ */ I(Qn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
643
643
  "Explore more of the Masters History",
644
644
  /* @__PURE__ */ r(j, { name: "icon-external-link" })
@@ -706,14 +706,14 @@ const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10,
706
706
  class: "tspsaas",
707
707
  propsAsIs: !1
708
708
  });
709
- var _ = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(_ || {});
710
- const Ie = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ r(Vn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ r(Bn, { children: e }) }), Hn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ r(Wn, { children: /* @__PURE__ */ I(Fn, { "data-position": e === "home" ? "left" : "right", children: [
711
- /* @__PURE__ */ r(Ie, { title: "Home", active: e === "home", onClick: () => t(
709
+ var B = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(B || {});
710
+ const fe = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ r(Vn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ r(Bn, { children: e }) }), Hn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ r(Wn, { children: /* @__PURE__ */ I(Fn, { "data-position": e === "home" ? "left" : "right", children: [
711
+ /* @__PURE__ */ r(fe, { title: "Home", active: e === "home", onClick: () => t(
712
712
  "home"
713
713
  /* HOME */
714
714
  ) }),
715
715
  /* @__PURE__ */ r(
716
- Ie,
716
+ fe,
717
717
  {
718
718
  title: "Leader Board",
719
719
  active: e === "leaderboard",
@@ -734,7 +734,7 @@ function te() {
734
734
  return e;
735
735
  }, te.apply(this, arguments);
736
736
  }
737
- function fe(e) {
737
+ function ge(e) {
738
738
  if (e === void 0)
739
739
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
740
740
  return e;
@@ -747,11 +747,11 @@ function ne(e, t) {
747
747
  function Gn(e, t) {
748
748
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ne(e, t);
749
749
  }
750
- var ge = Number.isNaN || function(t) {
750
+ var Me = Number.isNaN || function(t) {
751
751
  return typeof t == "number" && t !== t;
752
752
  };
753
753
  function Zn(e, t) {
754
- return !!(e === t || ge(e) && ge(t));
754
+ return !!(e === t || Me(e) && Me(t));
755
755
  }
756
756
  function Jn(e, t) {
757
757
  if (e.length !== t.length)
@@ -771,18 +771,18 @@ function J(e, t) {
771
771
  }
772
772
  return l;
773
773
  }
774
- var Kn = typeof performance == "object" && typeof performance.now == "function", Me = Kn ? function() {
774
+ var Kn = typeof performance == "object" && typeof performance.now == "function", ve = Kn ? function() {
775
775
  return performance.now();
776
776
  } : function() {
777
777
  return Date.now();
778
778
  };
779
- function ve(e) {
779
+ function ye(e) {
780
780
  cancelAnimationFrame(e.id);
781
781
  }
782
782
  function Xn(e, t) {
783
- var n = Me();
783
+ var n = ve();
784
784
  function s() {
785
- Me() - n >= t ? e.call(null) : i.id = requestAnimationFrame(s);
785
+ ve() - n >= t ? e.call(null) : i.id = requestAnimationFrame(s);
786
786
  }
787
787
  var i = {
788
788
  id: requestAnimationFrame(s)
@@ -790,22 +790,22 @@ function Xn(e, t) {
790
790
  return i;
791
791
  }
792
792
  var K = -1;
793
- function ye(e) {
793
+ function Ne(e) {
794
794
  if (e === void 0 && (e = !1), K === -1 || e) {
795
795
  var t = document.createElement("div"), n = t.style;
796
796
  n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), K = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
797
797
  }
798
798
  return K;
799
799
  }
800
- var b = null;
801
- function Ne(e) {
802
- if (e === void 0 && (e = !1), b === null || e) {
800
+ var $ = null;
801
+ function Ae(e) {
802
+ if (e === void 0 && (e = !1), $ === null || e) {
803
803
  var t = document.createElement("div"), n = t.style;
804
804
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
805
805
  var s = document.createElement("div"), i = s.style;
806
- return i.width = "100px", i.height = "100px", t.appendChild(s), 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;
806
+ return i.width = "100px", i.height = "100px", t.appendChild(s), document.body.appendChild(t), t.scrollLeft > 0 ? $ = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? $ = "negative" : $ = "positive-ascending"), document.body.removeChild(t), $;
807
807
  }
808
- return b;
808
+ return $;
809
809
  }
810
810
  var es = 150, ts = function(t, n) {
811
811
  return t;
@@ -816,8 +816,8 @@ function ns(e) {
816
816
  Gn(g, v);
817
817
  function g(D) {
818
818
  var o;
819
- return o = v.call(this, D) || this, o._instanceProps = d(o.props, fe(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
820
- instance: fe(o),
819
+ return o = v.call(this, D) || this, o._instanceProps = d(o.props, ge(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
820
+ instance: ge(o),
821
821
  isScrolling: !1,
822
822
  scrollDirection: "forward",
823
823
  scrollOffset: typeof o.props.initialScrollOffset == "number" ? o.props.initialScrollOffset : 0,
@@ -840,11 +840,11 @@ function ns(e) {
840
840
  if (N.hasOwnProperty(u))
841
841
  S = N[u];
842
842
  else {
843
- var z = n(o.props, u, o._instanceProps), k = i(o.props, u, o._instanceProps), O = h === "horizontal" || y === "horizontal", Y = h === "rtl", W = O ? z : 0;
843
+ var z = n(o.props, u, o._instanceProps), k = i(o.props, u, o._instanceProps), O = h === "horizontal" || y === "horizontal", P = h === "rtl", Y = O ? z : 0;
844
844
  N[u] = S = {
845
845
  position: "absolute",
846
- left: Y ? void 0 : W,
847
- right: Y ? W : void 0,
846
+ left: P ? void 0 : Y,
847
+ right: P ? Y : void 0,
848
848
  top: O ? 0 : z,
849
849
  height: O ? "100%" : k,
850
850
  width: O ? k : "100%"
@@ -860,7 +860,7 @@ function ns(e) {
860
860
  return null;
861
861
  var S = o.props.direction, z = M;
862
862
  if (S === "rtl")
863
- switch (Ne()) {
863
+ switch (Ae()) {
864
864
  case "negative":
865
865
  z = -M;
866
866
  break;
@@ -892,7 +892,7 @@ function ns(e) {
892
892
  var p = o.props.outerRef;
893
893
  o._outerRef = u, typeof p == "function" ? p(u) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = u);
894
894
  }, o._resetIsScrollingDebounced = function() {
895
- o._resetIsScrollingTimeoutId !== null && ve(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Xn(o._resetIsScrolling, es);
895
+ o._resetIsScrollingTimeoutId !== null && ye(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Xn(o._resetIsScrolling, es);
896
896
  }, o._resetIsScrolling = function() {
897
897
  o._resetIsScrollingTimeoutId = null, o.setState({
898
898
  isScrolling: !1
@@ -920,7 +920,7 @@ function ns(e) {
920
920
  var N = 0;
921
921
  if (this._outerRef) {
922
922
  var S = this._outerRef;
923
- M === "vertical" ? N = S.scrollWidth > S.clientWidth ? ye() : 0 : N = S.scrollHeight > S.clientHeight ? ye() : 0;
923
+ M === "vertical" ? N = S.scrollWidth > S.clientWidth ? Ne() : 0 : N = S.scrollHeight > S.clientHeight ? Ne() : 0;
924
924
  }
925
925
  this.scrollTo(c(this.props, o, u, y, this._instanceProps, N));
926
926
  }, T.componentDidMount = function() {
@@ -936,7 +936,7 @@ function ns(e) {
936
936
  var N = this._outerRef;
937
937
  if (u === "horizontal" || p === "horizontal")
938
938
  if (u === "rtl")
939
- switch (Ne()) {
939
+ switch (Ae()) {
940
940
  case "negative":
941
941
  N.scrollLeft = -M;
942
942
  break;
@@ -955,19 +955,19 @@ function ns(e) {
955
955
  }
956
956
  this._callPropsCallbacks();
957
957
  }, T.componentWillUnmount = function() {
958
- this._resetIsScrollingTimeoutId !== null && ve(this._resetIsScrollingTimeoutId);
958
+ this._resetIsScrollingTimeoutId !== null && ye(this._resetIsScrollingTimeoutId);
959
959
  }, T.render = function() {
960
- var o = this.props, u = o.children, p = o.className, h = o.direction, M = o.height, y = o.innerRef, N = o.innerElementType, S = o.innerTagName, z = o.itemCount, k = o.itemData, O = o.itemKey, Y = O === void 0 ? ts : O, W = o.layout, Ee = o.outerElementType, Le = o.outerTagName, Re = o.style, Qe = o.useIsScrolling, Ue = o.width, se = this.state.isScrolling, H = h === "horizontal" || W === "horizontal", _e = H ? this._onScrollHorizontal : this._onScrollVertical, ie = this._getRangeToRender(), qe = ie[0], Pe = ie[1], re = [];
960
+ var o = this.props, u = o.children, p = o.className, h = o.direction, M = o.height, y = o.innerRef, N = o.innerElementType, S = o.innerTagName, z = o.itemCount, k = o.itemData, O = o.itemKey, P = O === void 0 ? ts : O, Y = o.layout, Ee = o.outerElementType, Le = o.outerTagName, Re = o.style, Qe = o.useIsScrolling, Ue = o.width, ie = this.state.isScrolling, H = h === "horizontal" || Y === "horizontal", _e = H ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), qe = re[0], Pe = re[1], oe = [];
961
961
  if (z > 0)
962
962
  for (var Q = qe; Q <= Pe; Q++)
963
- re.push(G(u, {
963
+ oe.push(G(u, {
964
964
  data: k,
965
- key: Y(Q, k),
965
+ key: P(Q, k),
966
966
  index: Q,
967
- isScrolling: Qe ? se : void 0,
967
+ isScrolling: Qe ? ie : void 0,
968
968
  style: this._getItemStyle(Q)
969
969
  }));
970
- var oe = s(this.props, this._instanceProps);
970
+ var ae = s(this.props, this._instanceProps);
971
971
  return G(Ee || Le || "div", {
972
972
  className: p,
973
973
  onScroll: _e,
@@ -982,12 +982,12 @@ function ns(e) {
982
982
  direction: h
983
983
  }, Re)
984
984
  }, G(N || S || "div", {
985
- children: re,
985
+ children: oe,
986
986
  ref: y,
987
987
  style: {
988
- height: H ? "100%" : oe,
989
- pointerEvents: se ? "none" : void 0,
990
- width: H ? oe : "100%"
988
+ height: H ? "100%" : ae,
989
+ pointerEvents: ie ? "none" : void 0,
990
+ width: H ? ae : "100%"
991
991
  }
992
992
  }));
993
993
  }, T._callPropsCallbacks = function() {
@@ -1115,7 +1115,7 @@ var as = function(e, t) {
1115
1115
  configurable: !0
1116
1116
  }
1117
1117
  }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1118
- }, Ae = function(e, t) {
1118
+ }, Te = function(e, t) {
1119
1119
  if (!e)
1120
1120
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1121
1121
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
@@ -1126,12 +1126,12 @@ var as = function(e, t) {
1126
1126
  as(this, t);
1127
1127
  for (var l = arguments.length, m = Array(l), d = 0; d < l; d++)
1128
1128
  m[d] = arguments[d];
1129
- return c = (s = (i = Ae(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(m))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(f) {
1129
+ return c = (s = (i = Te(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(m))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(f) {
1130
1130
  var A = f.visibleStartIndex, v = f.visibleStopIndex;
1131
1131
  i._lastRenderedStartIndex = A, i._lastRenderedStopIndex = v, i._ensureRowsLoaded(A, v);
1132
1132
  }, i._setRef = function(f) {
1133
1133
  i._listRef = f;
1134
- }, s), Ae(i, c);
1134
+ }, s), Te(i, c);
1135
1135
  }
1136
1136
  return ls(t, [{
1137
1137
  key: "resetloadMoreItemsCache",
@@ -1231,14 +1231,18 @@ const us = /* @__PURE__ */ a("div")({
1231
1231
  }) => /* @__PURE__ */ I(us, { onClick: c, style: l, children: [
1232
1232
  /* @__PURE__ */ r(ps, { children: e || 0 }),
1233
1233
  /* @__PURE__ */ I(Is, { children: [
1234
- t ? /* @__PURE__ */ r(ms, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ r(hs, { children: Se(n || "") }),
1234
+ t ? /* @__PURE__ */ r(ms, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ r(hs, { children: ze(n || "") }),
1235
1235
  /* @__PURE__ */ I(fs, { children: [
1236
1236
  /* @__PURE__ */ r(gs, { children: n || "" }),
1237
1237
  i && /* @__PURE__ */ r(vs, { name: "icon-star" })
1238
1238
  ] })
1239
1239
  ] }),
1240
- /* @__PURE__ */ r("div", { children: ze(s) })
1241
- ] }), Ns = ({
1240
+ /* @__PURE__ */ r("div", { children: xe(s) })
1241
+ ] }), Ns = /* @__PURE__ */ a("div")({
1242
+ name: "ScrollContainer",
1243
+ class: "s13d8sg6",
1244
+ propsAsIs: !1
1245
+ }), As = ({
1242
1246
  items: e,
1243
1247
  currentUserId: t,
1244
1248
  openItemDetail: n,
@@ -1249,7 +1253,7 @@ const us = /* @__PURE__ */ a("div")({
1249
1253
  isItemLoaded: (l) => l < e.length,
1250
1254
  itemCount: e.length + 1,
1251
1255
  loadMoreItems: s,
1252
- children: ({ onItemsRendered: l, ref: m }) => /* @__PURE__ */ r(
1256
+ children: ({ onItemsRendered: l, ref: m }) => /* @__PURE__ */ r(Ns, { children: /* @__PURE__ */ r(
1253
1257
  is,
1254
1258
  {
1255
1259
  itemSize: 56,
@@ -1269,9 +1273,9 @@ const us = /* @__PURE__ */ a("div")({
1269
1273
  e[d].userId
1270
1274
  )
1271
1275
  }
1272
- )
1276
+ ) })
1273
1277
  }
1274
- ) }), As = ({ deepLink: e }) => {
1278
+ ) }), Ts = ({ deepLink: e }) => {
1275
1279
  const { data: t } = w(e.$store);
1276
1280
  return /* @__PURE__ */ r(
1277
1281
  He,
@@ -1293,55 +1297,55 @@ const us = /* @__PURE__ */ a("div")({
1293
1297
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1294
1298
  }
1295
1299
  );
1296
- }, Ts = ({ gamification: e }) => {
1300
+ }, Ds = ({ gamification: e }) => {
1297
1301
  const { data: t } = w(e.leaderboardList.$store);
1298
1302
  return t != null && t.length ? /* @__PURE__ */ r(
1299
- Ns,
1303
+ As,
1300
1304
  {
1301
1305
  fetchMore: e.leaderboardList.fetchMore,
1302
1306
  items: t,
1303
1307
  openItemDetail: e.openUser,
1304
1308
  currentUserId: e.currentUserId.get()
1305
1309
  }
1306
- ) : /* @__PURE__ */ r(As, { deepLink: e.deepLink });
1307
- }, Ds = /* @__PURE__ */ a("div")({
1310
+ ) : /* @__PURE__ */ r(Ts, { deepLink: e.deepLink });
1311
+ }, Ss = /* @__PURE__ */ a("div")({
1308
1312
  name: "QuestionItem",
1309
1313
  class: "q1w97g3p",
1310
1314
  propsAsIs: !1
1311
- }), Ss = /* @__PURE__ */ a("div")({
1315
+ }), zs = /* @__PURE__ */ a("div")({
1312
1316
  name: "QuestionCaption",
1313
1317
  class: "q2sl39u",
1314
1318
  propsAsIs: !1
1315
- }), zs = /* @__PURE__ */ a("div")({
1319
+ }), xs = /* @__PURE__ */ a("div")({
1316
1320
  name: "QuestionBody",
1317
1321
  class: "qd5h0uc",
1318
1322
  propsAsIs: !1
1319
- }), xs = /* @__PURE__ */ a("div")({
1323
+ }), js = /* @__PURE__ */ a("div")({
1320
1324
  name: "QuestionAction",
1321
1325
  class: "q105uluy",
1322
1326
  propsAsIs: !1
1323
- }), js = () => j, X = /* @__PURE__ */ a(js())({
1327
+ }), ks = () => j, X = /* @__PURE__ */ a(ks())({
1324
1328
  name: "QuestionActionIcon",
1325
1329
  class: "q1fa0b9h",
1326
1330
  propsAsIs: !0
1327
- }), ks = () => j, Os = /* @__PURE__ */ a(ks())({
1331
+ }), Os = () => j, ws = /* @__PURE__ */ a(Os())({
1328
1332
  name: "QuestionTypeIcon",
1329
1333
  class: "qxlt78s",
1330
1334
  propsAsIs: !0
1331
- }), ws = /* @__PURE__ */ a("div")({
1335
+ }), Cs = /* @__PURE__ */ a("div")({
1332
1336
  name: "QuestionTypeLabel",
1333
1337
  class: "qmg0vkx",
1334
1338
  propsAsIs: !1
1335
- }), Cs = /* @__PURE__ */ a("div")({
1339
+ }), $s = /* @__PURE__ */ a("div")({
1336
1340
  name: "QuestionContent",
1337
1341
  class: "q1uz5j1g",
1338
1342
  propsAsIs: !1
1339
1343
  }), bs = {
1340
- [F.LOST]: /* @__PURE__ */ r(X, { name: "icon-cross" }),
1341
- [F.WON]: /* @__PURE__ */ r(X, { name: "icon-check" }),
1342
- [F.UNSET]: void 0,
1343
- [F.DNP]: /* @__PURE__ */ r(X, { name: "icon-arrow" })
1344
- }, $s = ({
1344
+ [W.LOST]: /* @__PURE__ */ r(X, { name: "icon-cross" }),
1345
+ [W.WON]: /* @__PURE__ */ r(X, { name: "icon-check" }),
1346
+ [W.UNSET]: void 0,
1347
+ [W.DNP]: /* @__PURE__ */ r(X, { name: "icon-arrow" })
1348
+ }, Es = ({
1345
1349
  questionId: e,
1346
1350
  questionType: t,
1347
1351
  questionStatus: n,
@@ -1350,114 +1354,144 @@ const us = /* @__PURE__ */ a("div")({
1350
1354
  openQuestion: c,
1351
1355
  status: l
1352
1356
  }) => {
1353
- const m = De[t], d = bs[l];
1354
- return m ? /* @__PURE__ */ I(Ds, { onClick: () => c == null ? void 0 : c(e), children: [
1355
- /* @__PURE__ */ I(Cs, { children: [
1356
- /* @__PURE__ */ I(Ss, { children: [
1357
- /* @__PURE__ */ r(Os, { name: m.iconName }),
1358
- /* @__PURE__ */ I(ws, { children: [
1357
+ const m = Se[t], d = bs[l];
1358
+ return m ? /* @__PURE__ */ I(Ss, { onClick: () => c == null ? void 0 : c(e), children: [
1359
+ /* @__PURE__ */ I($s, { children: [
1360
+ /* @__PURE__ */ I(zs, { children: [
1361
+ /* @__PURE__ */ r(ws, { name: m.iconName }),
1362
+ /* @__PURE__ */ I(Cs, { children: [
1359
1363
  m.label,
1360
- t === x.TRIVIA && n === q.RESOLVED && " • Expired"
1364
+ t === x.TRIVIA && n === _.RESOLVED && " • Expired"
1361
1365
  ] })
1362
1366
  ] }),
1363
- /* @__PURE__ */ r(zs, { children: s || "" })
1367
+ /* @__PURE__ */ r(xs, { children: s || "" })
1364
1368
  ] }),
1365
- /* @__PURE__ */ r(xs, { children: d || (i ? /* @__PURE__ */ r(Ge, { children: "Play" }) : null) })
1369
+ /* @__PURE__ */ r(js, { children: d || (i ? /* @__PURE__ */ r(Ge, { children: "Play" }) : null) })
1366
1370
  ] }) : null;
1367
- }, Es = /* @__PURE__ */ a("div")({
1371
+ }, Ls = /* @__PURE__ */ a("div")({
1368
1372
  name: "Container",
1369
1373
  class: "cll3md7",
1370
1374
  propsAsIs: !1
1371
- }), Ls = /* @__PURE__ */ a("button")({
1375
+ }), Rs = /* @__PURE__ */ a("button")({
1372
1376
  name: "ActionBtn",
1373
1377
  class: "a10g1iik",
1374
1378
  propsAsIs: !1
1375
- }), Rs = ({
1379
+ }), Qs = ({
1376
1380
  openInsight: e,
1377
1381
  questionId: t,
1378
1382
  ...n
1379
- }) => /* @__PURE__ */ I(Es, { children: [
1380
- /* @__PURE__ */ r($e, { questionId: t, ...n }),
1381
- e && /* @__PURE__ */ r(Ls, { onClick: () => e(t), children: "View Insight" })
1382
- ] }), Qs = /* @__PURE__ */ a("div")({
1383
+ }) => /* @__PURE__ */ I(Ls, { children: [
1384
+ /* @__PURE__ */ r(be, { questionId: t, ...n }),
1385
+ e && /* @__PURE__ */ r(Rs, { onClick: () => e(t), children: "View Insight" })
1386
+ ] }), Us = /* @__PURE__ */ a("div")({
1383
1387
  name: "QuestionsContainer",
1384
1388
  class: "qvghv3l",
1385
1389
  propsAsIs: !1
1386
- }), Us = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ r(Qs, { children: e == null ? void 0 : e.map((n) => {
1390
+ }), _s = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ r(Us, { children: e == null ? void 0 : e.map((n) => {
1387
1391
  var s, i;
1388
1392
  if (n.type === "question" && ((s = n.attributes) == null ? void 0 : s.attributes.case) === "question") {
1389
1393
  const c = n.attributes.attributes.value;
1390
- return /* @__PURE__ */ r($s, { openQuestion: t, ...c }, c.questionId);
1394
+ return /* @__PURE__ */ r(Es, { openQuestion: t, ...c }, c.questionId);
1391
1395
  }
1392
1396
  if (n.type === "insight" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "insight") {
1393
1397
  const c = n.attributes.attributes.value;
1394
- return /* @__PURE__ */ r(Rs, { openInsight: t, ...c }, c.questionId);
1398
+ return /* @__PURE__ */ r(Qs, { openInsight: t, ...c }, c.questionId);
1395
1399
  }
1396
1400
  return null;
1397
- }) }), _s = ({ store: e, openQuestion: t }) => {
1401
+ }) }), qs = ({ store: e, openQuestion: t }) => {
1398
1402
  const n = w(e);
1399
- return n != null && n.data ? /* @__PURE__ */ r(Us, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
1400
- }, qs = ({ userSummary: e }) => {
1403
+ return n != null && n.data ? /* @__PURE__ */ r(_s, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
1404
+ }, Ps = ({ userSummary: e }) => {
1401
1405
  var t, n;
1402
1406
  const s = w(e.getStore());
1403
1407
  return (t = s.data) != null && t.summary ? /* @__PURE__ */ r(Oe, { ...s.data.summary, successRate: (n = s.data.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ r("div", { children: "wait user..." });
1404
- }, Ps = ({ gamification: e }) => {
1405
- const [t, n] = R(_.HOME);
1406
- return /* @__PURE__ */ I("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
1407
- /* @__PURE__ */ I(ee, { children: [
1408
- /* @__PURE__ */ r(Hn, { activePage: t, toggleActivePage: n }),
1409
- t === _.HOME && /* @__PURE__ */ r(qs, { userSummary: e.userSummary })
1410
- ] }),
1411
- t === _.HOME && /* @__PURE__ */ r(Ze, { children: /* @__PURE__ */ r(_s, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) }),
1412
- t === _.LEADERBOARD && /* @__PURE__ */ r(ee, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ r(Ts, { gamification: e }) })
1413
- ] });
1414
- }, Ys = () => Je, Te = /* @__PURE__ */ a(Ys())({
1408
+ }, Ys = ({
1409
+ gamification: e
1410
+ }) => {
1411
+ const [t, n] = R(B.HOME);
1412
+ return /* @__PURE__ */ I("div", {
1413
+ style: {
1414
+ height: "100%",
1415
+ display: "flex",
1416
+ flexDirection: "column",
1417
+ overflow: "hidden"
1418
+ },
1419
+ children: [/* @__PURE__ */ r(ee, {
1420
+ style: {
1421
+ paddingBottom: "4px"
1422
+ },
1423
+ children: /* @__PURE__ */ r(Hn, {
1424
+ activePage: t,
1425
+ toggleActivePage: n
1426
+ })
1427
+ }), t === B.HOME && /* @__PURE__ */ I(se, {
1428
+ children: [/* @__PURE__ */ r(ee, {
1429
+ style: {
1430
+ paddingTop: "12px"
1431
+ },
1432
+ children: /* @__PURE__ */ r(Ps, {
1433
+ userSummary: e.userSummary
1434
+ })
1435
+ }), /* @__PURE__ */ r(Ze, {
1436
+ children: /* @__PURE__ */ r(qs, {
1437
+ openQuestion: e.openQuestion,
1438
+ store: e.feedList.getStore()
1439
+ })
1440
+ })]
1441
+ }), t === B.LEADERBOARD && /* @__PURE__ */ r("div", {
1442
+ className: "c1bp9dj2",
1443
+ children: /* @__PURE__ */ r(Ds, {
1444
+ gamification: e
1445
+ })
1446
+ })]
1447
+ });
1448
+ }, Ws = () => Je, De = /* @__PURE__ */ a(Ws())({
1415
1449
  name: "OpenedContainer",
1416
1450
  class: "oar61gl",
1417
1451
  propsAsIs: !0
1418
- }), Ws = /* @__PURE__ */ a("div")({
1452
+ }), Fs = /* @__PURE__ */ a("div")({
1419
1453
  name: "UserContainer",
1420
1454
  class: "u14zaal4",
1421
1455
  propsAsIs: !1
1422
- }), Fs = ({
1456
+ }), Vs = ({
1423
1457
  correct: e,
1424
1458
  incorrect: t
1425
1459
  }) => {
1426
1460
  const n = e + t;
1427
1461
  return n === 0 ? 0 : Math.round(e / n * 100);
1428
- }, Gs = ({
1462
+ }, Zs = ({
1429
1463
  gamification: e,
1430
1464
  className: t
1431
1465
  }) => {
1432
1466
  const n = w(e.openedQuestion.$store), s = w(e.openedUser);
1433
1467
  return /* @__PURE__ */ I(E, {
1434
- children: [n && /* @__PURE__ */ r(Te, {
1468
+ children: [n && /* @__PURE__ */ r(De, {
1435
1469
  className: t,
1436
1470
  children: /* @__PURE__ */ r(Yn, {
1437
1471
  gamification: e
1438
1472
  })
1439
- }), s && /* @__PURE__ */ r(Te, {
1473
+ }), s && /* @__PURE__ */ r(De, {
1440
1474
  className: t,
1441
- children: /* @__PURE__ */ I(Ws, {
1475
+ children: /* @__PURE__ */ I(Fs, {
1442
1476
  children: [/* @__PURE__ */ r(ke, {
1443
1477
  label: "Friend's Rank",
1444
1478
  close: e.closeUser
1445
1479
  }), /* @__PURE__ */ r(ee, {
1446
1480
  children: /* @__PURE__ */ r(Oe, {
1447
1481
  ...s,
1448
- successRate: Fs(s)
1482
+ successRate: Vs(s)
1449
1483
  })
1450
1484
  })]
1451
1485
  })
1452
- }), /* @__PURE__ */ r(xe, {
1486
+ }), /* @__PURE__ */ r(se, {
1453
1487
  className: t,
1454
1488
  "data-nav": "true",
1455
- children: /* @__PURE__ */ r(Ps, {
1489
+ children: /* @__PURE__ */ r(Ys, {
1456
1490
  gamification: e
1457
1491
  })
1458
1492
  })]
1459
1493
  });
1460
1494
  };
1461
1495
  export {
1462
- Gs as default
1496
+ Zs as default
1463
1497
  };