@streamlayer/react 0.33.4 → 0.33.5

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.
@@ -2,13 +2,13 @@ import { jsxs as p, jsx as s, Fragment as L } from "react/jsx-runtime";
2
2
  import { s as o, r as w } from "./index4.js";
3
3
  import { useStore as _ } from "@nanostores/react";
4
4
  import { o as Ee, r as Ie, w as We, u as Le, A as Fe, O as Be, c as He, a as de, n as Ge, f as Ze } from "./masters2.js";
5
- import { QuestionType as y, QuestionStatus as R, QuestionImages as B, PickHistoryStatus as X } from "@streamlayer/sdk-web-types";
6
- import { useState as $, useCallback as q, useEffect as fe, useMemo as E, createElement as oe, PureComponent as $e, useRef as ue, useTransition as Je } from "react";
5
+ import { QuestionType as y, QuestionStatus as $, QuestionImages as B, PickHistoryStatus as X } from "@streamlayer/sdk-web-types";
6
+ import { useState as R, useCallback as q, useEffect as fe, useMemo as E, createElement as oe, PureComponent as Re, useRef as ue, useTransition as Je } from "react";
7
7
  import { d as pe } from "./index3.js";
8
8
  import "react-countup";
9
9
  import { CountdownCircleTimer as Ke } from "react-countdown-circle-timer";
10
10
  import { E as P } from "./index2.js";
11
- import Re from "lodash.throttle";
11
+ import $e from "lodash.throttle";
12
12
  import "@streamlayer/sdk-web-interfaces";
13
13
  import "@streamlayer/sdk-web-notifications";
14
14
  import "./useStreamLayerApp.js";
@@ -53,11 +53,11 @@ const Xe = /* @__PURE__ */ o("div")({
53
53
  ] }),
54
54
  /* @__PURE__ */ s(it, { onClick: t, children: /* @__PURE__ */ s(ot, { name: "icon-cross" }) })
55
55
  ] });
56
- }, Ue = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Pe = (e) => e ? e.toLocaleString("en-US") : "0", ge = (e) => e.toLocaleDateString("en-US", {
56
+ }, Ue = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Pe = (e) => e ? e.toLocaleString("en-US") : "0", ve = (e) => e.toLocaleDateString("en-US", {
57
57
  weekday: "short",
58
58
  month: "short",
59
59
  day: "numeric"
60
- }), ve = (e) => e.toLocaleTimeString("en-US", {
60
+ }), ge = (e) => e.toLocaleTimeString("en-US", {
61
61
  hour: "2-digit",
62
62
  minute: "2-digit"
63
63
  }), Me = (e) => !isNaN(e.getTime()), at = /* @__PURE__ */ o("div")({
@@ -106,11 +106,11 @@ const Xe = /* @__PURE__ */ o("div")({
106
106
  name: "User",
107
107
  class: "u1g7arbm",
108
108
  propsAsIs: !1
109
- }), gt = /* @__PURE__ */ o("img")({
109
+ }), vt = /* @__PURE__ */ o("img")({
110
110
  name: "Avatar",
111
111
  class: "a1ldeata",
112
112
  propsAsIs: !1
113
- }), vt = /* @__PURE__ */ o("div")({
113
+ }), gt = /* @__PURE__ */ o("div")({
114
114
  name: "UserInfo",
115
115
  class: "u10d4koz",
116
116
  propsAsIs: !1
@@ -164,18 +164,18 @@ const Xe = /* @__PURE__ */ o("div")({
164
164
  points: n,
165
165
  friendsRank: i,
166
166
  rank: r,
167
- streak: c,
168
- correct: m,
167
+ streak: m,
168
+ correct: d,
169
169
  incorrect: l,
170
- inTop: d,
170
+ inTop: c,
171
171
  successRate: I
172
172
  }) => /* @__PURE__ */ p(mt, { children: [
173
173
  /* @__PURE__ */ s(ht, { children: /* @__PURE__ */ p(ft, { children: [
174
174
  /* @__PURE__ */ p(bt, { children: [
175
- e && /* @__PURE__ */ s(gt, { alt: "avatar", src: e }),
175
+ e && /* @__PURE__ */ s(vt, { alt: "avatar", src: e }),
176
176
  !e && /* @__PURE__ */ s(Ot, { children: Ue(t || "") })
177
177
  ] }),
178
- /* @__PURE__ */ p(vt, { children: [
178
+ /* @__PURE__ */ p(gt, { children: [
179
179
  /* @__PURE__ */ s(Mt, { children: t }),
180
180
  /* @__PURE__ */ p(Tt, { children: [
181
181
  /* @__PURE__ */ p(At, { children: [
@@ -188,7 +188,7 @@ const Xe = /* @__PURE__ */ o("div")({
188
188
  /* @__PURE__ */ s(St, {}),
189
189
  /* @__PURE__ */ p("div", { children: [
190
190
  "TOP ",
191
- d || 0,
191
+ c || 0,
192
192
  "%"
193
193
  ] })
194
194
  ] })
@@ -200,8 +200,8 @@ const Xe = /* @__PURE__ */ o("div")({
200
200
  /* @__PURE__ */ s(Ae, { indicator: r || 0, title: "Global rank" })
201
201
  ] }),
202
202
  /* @__PURE__ */ p(xt, { children: [
203
- /* @__PURE__ */ s(ee, { indicator: c || 0, title: "Win streak" }),
204
- /* @__PURE__ */ s(ee, { indicator: m || 0, title: "Correct" }),
203
+ /* @__PURE__ */ s(ee, { indicator: m || 0, title: "Win streak" }),
204
+ /* @__PURE__ */ s(ee, { indicator: d || 0, title: "Correct" }),
205
205
  /* @__PURE__ */ s(ee, { indicator: l || 0, title: "Incorrect" }),
206
206
  /* @__PURE__ */ s(ee, { indicator: `${I || 0}%`, title: "Succ. rate" })
207
207
  ] })
@@ -222,18 +222,18 @@ const Xe = /* @__PURE__ */ o("div")({
222
222
  name: "Container",
223
223
  class: "c38csyt",
224
224
  propsAsIs: !1
225
- }), $t = /* @__PURE__ */ o("div")({
225
+ }), Rt = /* @__PURE__ */ o("div")({
226
226
  name: "Title",
227
227
  class: "ty221rx",
228
228
  propsAsIs: !1
229
- }), Rt = /* @__PURE__ */ o("div")({
229
+ }), $t = /* @__PURE__ */ o("div")({
230
230
  name: "Description",
231
231
  class: "dlaj9xp",
232
232
  propsAsIs: !1
233
233
  }), Qt = ({ title: e, description: t }) => /* @__PURE__ */ p(Lt, { children: [
234
234
  /* @__PURE__ */ s(w, { name: "icon-check-circle" }),
235
- /* @__PURE__ */ s($t, { children: e }),
236
- /* @__PURE__ */ s(Rt, { children: t })
235
+ /* @__PURE__ */ s(Rt, { children: e }),
236
+ /* @__PURE__ */ s($t, { children: t })
237
237
  ] }), Ut = /* @__PURE__ */ o("div")({
238
238
  name: "Container",
239
239
  class: "c16sbdnm",
@@ -268,20 +268,20 @@ const Xe = /* @__PURE__ */ o("div")({
268
268
  questionVoted: n,
269
269
  questionType: i,
270
270
  hasCorrectAnswer: r,
271
- questionStatus: c,
272
- showExpiredNotification: m,
271
+ questionStatus: m,
272
+ showExpiredNotification: d,
273
273
  showClosedNotificationTrivia: l,
274
- votedInCurrentRender: d,
274
+ votedInCurrentRender: c,
275
275
  votedAfterQuestionClosed: I,
276
- enteredAnActiveQuestion: g,
276
+ enteredAnActiveQuestion: v,
277
277
  marketClosed: S
278
278
  }) => {
279
- const v = n && (i === y.TRIVIA || i === y.PREDICTION) && d && c !== R.RESOLVED, N = i === y.PREDICTION && !r, z = S && i === y.PREDICTION && !n && !g || i === y.PREDICTION && I && d && g, a = v && N, h = v && r, u = i === y.PREDICTION && n && d && r, f = n && i === y.POLL && d;
280
- if (!m && !l && !a && !h && !z && !f && !u)
279
+ const g = n && (i === y.TRIVIA || i === y.PREDICTION) && c && m !== $.RESOLVED, N = i === y.PREDICTION && !r, z = S && i === y.PREDICTION && !n && !v || i === y.PREDICTION && I && c && v, a = g && N, h = g && r, u = i === y.PREDICTION && n && c && r, f = n && i === y.POLL && c;
280
+ if (!d && !l && !a && !h && !z && !f && !u)
281
281
  return null;
282
282
  const M = t ? "correct" : "incorrect", D = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
283
283
  return /* @__PURE__ */ p(Ut, { "data-isPrediction": N, children: [
284
- m && /* @__PURE__ */ p(L, { children: [
284
+ d && /* @__PURE__ */ p(L, { children: [
285
285
  /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(w, { name: "questionExpired" }) }),
286
286
  /* @__PURE__ */ p("div", { children: [
287
287
  /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(Y, { children: "Question Expired" }) }),
@@ -408,22 +408,22 @@ const Xe = /* @__PURE__ */ o("div")({
408
408
  correct: n,
409
409
  hasCorrectAnswer: i,
410
410
  questionStatus: r
411
- }) => e === y.TRIVIA ? t && n : e === y.PREDICTION ? t && n && i || r === R.RESOLVED && n : !1, pn = (e) => {
411
+ }) => e === y.TRIVIA ? t && n : e === y.PREDICTION ? t && n && i || r === $.RESOLVED && n : !1, pn = (e) => {
412
412
  var t;
413
413
  const {
414
414
  // option props
415
415
  id: n,
416
416
  icon: i,
417
417
  text: r,
418
- percentageDecimal: c,
419
- points: m,
418
+ percentageDecimal: m,
419
+ points: d,
420
420
  // extra props
421
421
  onVote: l,
422
- markThatVoted: d,
422
+ markThatVoted: c,
423
423
  youSelected: I,
424
- questionVoted: g,
424
+ questionVoted: v,
425
425
  imageMode: S,
426
- answerTimeExpired: v,
426
+ answerTimeExpired: g,
427
427
  questionStatus: N,
428
428
  isLoading: z,
429
429
  questionType: a,
@@ -432,32 +432,32 @@ const Xe = /* @__PURE__ */ o("div")({
432
432
  votedAfterQuestionClosed: f,
433
433
  enteredAnActiveQuestion: M,
434
434
  marketClosed: D
435
- } = e, T = dn(e), x = un({ questionType: a, questionVoted: g, correct: h, hasCorrectAnswer: u, questionStatus: N }), O = D && a === y.PREDICTION, k = g || O, A = a === y.PREDICTION && !g && N !== R.RESOLVED;
435
+ } = e, T = dn(e), x = un({ questionType: a, questionVoted: v, correct: h, hasCorrectAnswer: u, questionStatus: N }), O = D && a === y.PREDICTION, k = v || O, A = a === y.PREDICTION && !v && N !== $.RESOLVED;
436
436
  return /* @__PURE__ */ p(
437
437
  Ht,
438
438
  {
439
439
  value: n,
440
440
  "data-selected": I,
441
441
  "data-answerState": T,
442
- disabled: g || z || v || O && !M || O && M && f,
443
- "data-isNotChecked": g && !I && T !== "incorrect",
442
+ disabled: v || z || g || O && !M || O && M && f,
443
+ "data-isNotChecked": v && !I && T !== "incorrect",
444
444
  onClick: (b) => {
445
- d(
446
- a === y.PREDICTION ? D : N === R.RESOLVED
445
+ c(
446
+ a === y.PREDICTION ? D : N === $.RESOLVED
447
447
  ), l(b);
448
448
  },
449
449
  children: [
450
- /* @__PURE__ */ s(Gt, { "data-answerState": T, style: { width: `${k ? c : 0}%` } }),
450
+ /* @__PURE__ */ s(Gt, { "data-answerState": T, style: { width: `${k ? m : 0}%` } }),
451
451
  /* @__PURE__ */ p(Zt, { children: [
452
452
  i && S && ((t = ye[S]) == null ? void 0 : t.call(ye, i)),
453
453
  /* @__PURE__ */ s(sn, { children: r }),
454
454
  A && /* @__PURE__ */ p("div", { children: [
455
- /* @__PURE__ */ s(pe, { value: m }),
455
+ /* @__PURE__ */ s(pe, { value: d }),
456
456
  /* @__PURE__ */ s(on, { children: "pts" })
457
457
  ] }),
458
458
  k && /* @__PURE__ */ p(rn, { children: [
459
459
  x && /* @__PURE__ */ s(cn, { name: "selected" }),
460
- /* @__PURE__ */ s(an, { children: /* @__PURE__ */ s(pe, { value: c, suffix: "%" }) })
460
+ /* @__PURE__ */ s(an, { children: /* @__PURE__ */ s(pe, { value: m, suffix: "%" }) })
461
461
  ] })
462
462
  ] })
463
463
  ]
@@ -467,19 +467,19 @@ const Xe = /* @__PURE__ */ o("div")({
467
467
  name: "RemainingTime",
468
468
  class: "r165427",
469
469
  propsAsIs: !1
470
- }), fn = P.SECONDARY_GREEN6, De = P.SECONDARY_RED3, gn = P.NEUTRALS_GRAY3, vn = ({
470
+ }), fn = P.SECONDARY_GREEN6, De = P.SECONDARY_RED3, vn = P.NEUTRALS_GRAY3, gn = ({
471
471
  isPlaying: e = !0,
472
472
  duration: t = 30,
473
473
  onTimerExpired: n
474
474
  }) => {
475
- const [i, r] = $(t > 10 ? fn : De), c = ({
476
- remainingTime: d
475
+ const [i, r] = R(t > 10 ? fn : De), m = ({
476
+ remainingTime: c
477
477
  }) => /* @__PURE__ */ s(In, {
478
- children: d
479
- }), m = q(() => {
480
- n == null || n(), r(gn);
481
- }, [n, r]), l = q((d) => {
482
- d === 10 && r(De);
478
+ children: c
479
+ }), d = q(() => {
480
+ n == null || n(), r(vn);
481
+ }, [n, r]), l = q((c) => {
482
+ c === 10 && r(De);
483
483
  }, [r]);
484
484
  return /* @__PURE__ */ s(Ke, {
485
485
  isPlaying: e,
@@ -490,9 +490,9 @@ const Xe = /* @__PURE__ */ o("div")({
490
490
  strokeWidth: 2,
491
491
  trailStrokeWidth: 2,
492
492
  trailColor: i,
493
- onComplete: m,
493
+ onComplete: d,
494
494
  onUpdate: l,
495
- children: c
495
+ children: m
496
496
  });
497
497
  }, Mn = /* @__PURE__ */ o("div")({
498
498
  name: "WinBarContainer",
@@ -528,8 +528,8 @@ const Xe = /* @__PURE__ */ o("div")({
528
528
  isPlayingTimer: n,
529
529
  isTimer: i,
530
530
  questionType: r,
531
- timerDuration: c,
532
- onTimerExpired: m
531
+ timerDuration: m,
532
+ onTimerExpired: d
533
533
  }) => /* @__PURE__ */ p(Mn, { "data-centeredItems": r === y.PREDICTION, children: [
534
534
  /* @__PURE__ */ p(Tn, { children: [
535
535
  e && /* @__PURE__ */ s(Nn, { children: e }),
@@ -541,15 +541,15 @@ const Xe = /* @__PURE__ */ o("div")({
541
541
  ] })
542
542
  ] })
543
543
  ] }),
544
- i && r !== y.PREDICTION && /* @__PURE__ */ s(vn, { isPlaying: n, onTimerExpired: m, duration: c })
544
+ i && r !== y.PREDICTION && /* @__PURE__ */ s(gn, { isPlaying: n, onTimerExpired: d, duration: m })
545
545
  ] }), On = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
546
- var r, c;
547
- const m = e.subject, l = e.type, d = e.status, I = (r = e.options) == null ? void 0 : r.options, g = e.marketClosed, [S, v] = $(!1), [N, z] = $(!1), [a, h] = $(!0), [u, f] = $(!1), [M, D] = $(""), T = e == null ? void 0 : e.id;
546
+ var r, m;
547
+ const d = e.subject, l = e.type, c = e.status, I = (r = e.options) == null ? void 0 : r.options, v = e.marketClosed, [S, g] = R(!1), [N, z] = R(!1), [a, h] = R(!0), [u, f] = R(!1), [M, D] = R(""), T = e == null ? void 0 : e.id;
548
548
  fe(() => {
549
- l === y.PREDICTION ? g && h(!1) : d === R.RESOLVED && h(!1);
549
+ l === y.PREDICTION ? v && h(!1) : c === $.RESOLVED && h(!1);
550
550
  }, []);
551
551
  const x = q((C) => {
552
- z(C), v(!0);
552
+ z(C), g(!0);
553
553
  }, []), O = q(
554
554
  async (C) => {
555
555
  if (T) {
@@ -579,7 +579,7 @@ const Xe = /* @__PURE__ */ o("div")({
579
579
  hasCorrectAnswer: b,
580
580
  questionType: e.type,
581
581
  answerTimeExpired: u,
582
- questionStatus: d,
582
+ questionStatus: c,
583
583
  imageMode: (U = e.appearance) == null ? void 0 : U.images,
584
584
  onVote: O
585
585
  };
@@ -589,23 +589,23 @@ const Xe = /* @__PURE__ */ o("div")({
589
589
  t,
590
590
  e,
591
591
  A,
592
- d,
592
+ c,
593
593
  O,
594
594
  M
595
- ]), ie = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, Q = d === R.RESOLVED && l === y.TRIVIA && !A && !a, Z = l === y.TRIVIA && N && S && a, J = E(() => l === y.PREDICTION ? !!(A && !b || A && b && j != null && j.youVoted) : !0, [l, A, b, j]), K = E(() => {
595
+ ]), ie = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, Q = c === $.RESOLVED && l === y.TRIVIA && !A && !a, Z = l === y.TRIVIA && N && S && a, J = E(() => l === y.PREDICTION ? !!(A && !b || A && b && j != null && j.youVoted) : !0, [l, A, b, j]), K = E(() => {
596
596
  if (l === y.PREDICTION && A && (!b || b && j != null && j.youVoted))
597
597
  return A.points;
598
598
  if (!(Q || u))
599
- return d === R.RESOLVED ? 0 : A ? A.correct ? A.points : 0 : j == null ? void 0 : j.points;
599
+ return c === $.RESOLVED ? 0 : A ? A.correct ? A.points : 0 : j == null ? void 0 : j.points;
600
600
  }, [
601
601
  u,
602
602
  A,
603
603
  j,
604
- d,
604
+ c,
605
605
  Q,
606
606
  l,
607
607
  b
608
- ]), W = E(() => l === y.PREDICTION && A ? b ? b && j != null && j.youVoted ? "You won" : "" : "To win" : Q || u ? "Time expired" : l === y.POLL ? "Time remaining" : A ? "You won" : "To win", [u, l, A, Q, b, j]), re = A || Q || Z || l === y.TRIVIA && d === R.RESOLVED && a;
608
+ ]), W = E(() => l === y.PREDICTION && A ? b ? b && j != null && j.youVoted ? "You won" : "" : "To win" : Q || u ? "Time expired" : l === y.POLL ? "Time remaining" : A ? "You won" : "To win", [u, l, A, Q, b, j]), re = A || Q || Z || l === y.TRIVIA && c === $.RESOLVED && a;
609
609
  return /* @__PURE__ */ s(Ie, { "data-question-header": "true", children: /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ p(Wt, { children: [
610
610
  /* @__PURE__ */ s(
611
611
  Yt,
@@ -615,13 +615,13 @@ const Xe = /* @__PURE__ */ o("div")({
615
615
  questionVotedCorrectly: A == null ? void 0 : A.correct,
616
616
  questionType: l,
617
617
  hasCorrectAnswer: b,
618
- questionStatus: d,
618
+ questionStatus: c,
619
619
  showExpiredNotification: Q,
620
620
  showClosedNotificationTrivia: Z,
621
621
  votedInCurrentRender: S,
622
622
  votedAfterQuestionClosed: N,
623
623
  enteredAnActiveQuestion: a,
624
- marketClosed: g
624
+ marketClosed: v
625
625
  }
626
626
  ),
627
627
  J && /* @__PURE__ */ s(
@@ -633,7 +633,7 @@ const Xe = /* @__PURE__ */ o("div")({
633
633
  questionType: e.type,
634
634
  isTimer: !t,
635
635
  isPlayingTimer: !A,
636
- timerDuration: re ? 0 : Number(((c = e == null ? void 0 : e.appearance) == null ? void 0 : c.autoHideInterval) || "30")
636
+ timerDuration: re ? 0 : Number(((m = e == null ? void 0 : e.appearance) == null ? void 0 : m.autoHideInterval) || "30")
637
637
  }
638
638
  ),
639
639
  u ? /* @__PURE__ */ s(
@@ -643,7 +643,7 @@ const Xe = /* @__PURE__ */ o("div")({
643
643
  description: "Watch for additional enhanced stream interactive experience."
644
644
  }
645
645
  ) : /* @__PURE__ */ p(L, { children: [
646
- /* @__PURE__ */ s(Ft, { "data-withoutWinBar": !J, children: m }),
646
+ /* @__PURE__ */ s(Ft, { "data-withoutWinBar": !J, children: d }),
647
647
  /* @__PURE__ */ s(Bt, { children: se.map((C) => /* @__PURE__ */ s(
648
648
  pn,
649
649
  {
@@ -651,7 +651,7 @@ const Xe = /* @__PURE__ */ o("div")({
651
651
  markThatVoted: x,
652
652
  votedAfterQuestionClosed: N,
653
653
  enteredAnActiveQuestion: a,
654
- marketClosed: g
654
+ marketClosed: v
655
655
  },
656
656
  C.id
657
657
  )) })
@@ -686,43 +686,44 @@ const Xe = /* @__PURE__ */ o("div")({
686
686
  image: t,
687
687
  title: n,
688
688
  isPickHistory: i,
689
- instantView: r
689
+ instantView: r,
690
+ notification: m
690
691
  }) => {
691
- const c = E(() => {
692
+ const d = E(() => {
692
693
  if (e) {
693
- const l = new Date(e);
694
- if (Me(l))
694
+ const c = new Date(e);
695
+ if (Me(c))
695
696
  return {
696
- date: ge(l),
697
- time: ve(l)
697
+ date: ve(c),
698
+ time: ge(c)
698
699
  };
699
700
  }
700
701
  return null;
701
- }, [e]), m = (r == null ? void 0 : r.image) || t;
702
+ }, [e]), l = (r == null ? void 0 : r.image) || t;
702
703
  return /* @__PURE__ */ p(bn, { children: [
703
- c && /* @__PURE__ */ p(kn, { children: [
704
- c.date,
704
+ d && /* @__PURE__ */ p(kn, { children: [
705
+ d.date,
705
706
  " · ",
706
- c.time
707
+ d.time
707
708
  ] }),
708
709
  (r == null ? void 0 : r.video) && /* @__PURE__ */ s(We, { source: r.video.url, poster: r.video.thumbnailUrl }),
709
- m && !(r != null && r.video) && /* @__PURE__ */ s(En, { src: m }),
710
+ l && !(r != null && r.video) && /* @__PURE__ */ s(En, { src: l }),
710
711
  /* @__PURE__ */ p(Cn, { children: [
711
712
  /* @__PURE__ */ s(jn, { children: i ? n : r == null ? void 0 : r.heading }),
712
- !i && /* @__PURE__ */ s(wn, { children: r == null ? void 0 : r.body })
713
+ /* @__PURE__ */ s(wn, { children: i ? m == null ? void 0 : m.body : r == null ? void 0 : r.body })
713
714
  ] })
714
715
  ] });
715
716
  }, Ln = /* @__PURE__ */ o("div")({
716
717
  name: "Container",
717
718
  class: "c1euiow",
718
719
  propsAsIs: !1
719
- }), $n = /* @__PURE__ */ o("a")({
720
+ }), Rn = /* @__PURE__ */ o("a")({
720
721
  name: "WebLinkBtn",
721
722
  class: "w19zie3h",
722
723
  propsAsIs: !1
723
- }), Rn = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Ln, { children: [
724
+ }), $n = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Ln, { children: [
724
725
  /* @__PURE__ */ s(Ye, { instantView: e, ...t }),
725
- (e == null ? void 0 : e.webLink) && /* @__PURE__ */ p($n, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
726
+ (e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(Rn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
726
727
  e == null ? void 0 : e.webLink.label,
727
728
  /* @__PURE__ */ s(w, { name: "icon-external-link" })
728
729
  ] })
@@ -744,8 +745,8 @@ const Xe = /* @__PURE__ */ o("div")({
744
745
  const i = new Date(e);
745
746
  if (Me(i))
746
747
  return {
747
- date: ge(i),
748
- time: ve(i)
748
+ date: ve(i),
749
+ time: ge(i)
749
750
  };
750
751
  }
751
752
  return null;
@@ -767,7 +768,7 @@ const Xe = /* @__PURE__ */ o("div")({
767
768
  openedQuestion: e
768
769
  }) => {
769
770
  var t, n;
770
- return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(Rn, {
771
+ return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s($n, {
771
772
  created: e.attributes.created,
772
773
  ...e.attributes.attributes.value
773
774
  }) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(qn, {
@@ -885,13 +886,13 @@ function Xn(e, t) {
885
886
  }
886
887
  function le(e, t) {
887
888
  t === void 0 && (t = Xn);
888
- var n, i = [], r, c = !1;
889
- function m() {
890
- for (var l = [], d = 0; d < arguments.length; d++)
891
- l[d] = arguments[d];
892
- return c && n === this && t(l, i) || (r = e.apply(this, l), c = !0, n = this, i = l), r;
889
+ var n, i = [], r, m = !1;
890
+ function d() {
891
+ for (var l = [], c = 0; c < arguments.length; c++)
892
+ l[c] = arguments[c];
893
+ return m && n === this && t(l, i) || (r = e.apply(this, l), m = !0, n = this, i = l), r;
893
894
  }
894
- return m;
895
+ return d;
895
896
  }
896
897
  var es = typeof performance == "object" && typeof performance.now == "function", Oe = es ? function() {
897
898
  return performance.now();
@@ -933,12 +934,12 @@ var ns = 150, ss = function(t, n) {
933
934
  return t;
934
935
  };
935
936
  function is(e) {
936
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, c = e.getOffsetForIndexAndAlignment, m = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, d = e.initInstanceProps, I = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
937
+ var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, m = e.getOffsetForIndexAndAlignment, d = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, c = e.initInstanceProps, I = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
937
938
  return t = /* @__PURE__ */ function(S) {
938
- Jn(v, S);
939
- function v(z) {
939
+ Jn(g, S);
940
+ function g(z) {
940
941
  var a;
941
- return a = S.call(this, z) || this, a._instanceProps = d(a.props, ze(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
942
+ return a = S.call(this, z) || this, a._instanceProps = c(a.props, ze(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
942
943
  instance: ze(a),
943
944
  isScrolling: !1,
944
945
  scrollDirection: "forward",
@@ -1023,10 +1024,10 @@ function is(e) {
1023
1024
  });
1024
1025
  }, a;
1025
1026
  }
1026
- v.getDerivedStateFromProps = function(a, h) {
1027
- return rs(a, h), g(a), null;
1027
+ g.getDerivedStateFromProps = function(a, h) {
1028
+ return rs(a, h), v(a), null;
1028
1029
  };
1029
- var N = v.prototype;
1030
+ var N = g.prototype;
1030
1031
  return N.scrollTo = function(a) {
1031
1032
  a = Math.max(0, a), this.setState(function(h) {
1032
1033
  return h.scrollOffset === a ? null : {
@@ -1044,7 +1045,7 @@ function is(e) {
1044
1045
  var x = this._outerRef;
1045
1046
  M === "vertical" ? T = x.scrollWidth > x.clientWidth ? Ce() : 0 : T = x.scrollHeight > x.clientHeight ? Ce() : 0;
1046
1047
  }
1047
- this.scrollTo(c(this.props, a, h, D, this._instanceProps, T));
1048
+ this.scrollTo(m(this.props, a, h, D, this._instanceProps, T));
1048
1049
  }, N.componentDidMount = function() {
1049
1050
  var a = this.props, h = a.direction, u = a.initialScrollOffset, f = a.layout;
1050
1051
  if (typeof u == "number" && this._outerRef != null) {
@@ -1128,10 +1129,10 @@ function is(e) {
1128
1129
  var a = this.props, h = a.itemCount, u = a.overscanCount, f = this.state, M = f.isScrolling, D = f.scrollDirection, T = f.scrollOffset;
1129
1130
  if (h === 0)
1130
1131
  return [0, 0, 0, 0];
1131
- var x = m(this.props, T, this._instanceProps), O = l(this.props, x, T, this._instanceProps), k = !M || D === "backward" ? Math.max(1, u) : 1, A = !M || D === "forward" ? Math.max(1, u) : 1;
1132
+ var x = d(this.props, T, this._instanceProps), O = l(this.props, x, T, this._instanceProps), k = !M || D === "backward" ? Math.max(1, u) : 1, A = !M || D === "forward" ? Math.max(1, u) : 1;
1132
1133
  return [Math.max(0, x - k), Math.max(0, Math.min(h - 1, O + A)), x, O];
1133
- }, v;
1134
- }($e), t.defaultProps = {
1134
+ }, g;
1135
+ }(Re), t.defaultProps = {
1135
1136
  direction: "ltr",
1136
1137
  itemData: void 0,
1137
1138
  layout: "vertical",
@@ -1154,8 +1155,8 @@ var rs = function(t, n) {
1154
1155
  var n = t.itemCount, i = t.itemSize;
1155
1156
  return i * n;
1156
1157
  },
1157
- getOffsetForIndexAndAlignment: function(t, n, i, r, c, m) {
1158
- var l = t.direction, d = t.height, I = t.itemCount, g = t.itemSize, S = t.layout, v = t.width, N = l === "horizontal" || S === "horizontal", z = N ? v : d, a = Math.max(0, I * g - z), h = Math.min(a, n * g), u = Math.max(0, n * g - z + g + m);
1158
+ getOffsetForIndexAndAlignment: function(t, n, i, r, m, d) {
1159
+ var l = t.direction, c = t.height, I = t.itemCount, v = t.itemSize, S = t.layout, g = t.width, N = l === "horizontal" || S === "horizontal", z = N ? g : c, a = Math.max(0, I * v - z), h = Math.min(a, n * v), u = Math.max(0, n * v - z + v + d);
1159
1160
  switch (i === "smart" && (r >= u - z && r <= h + z ? i = "auto" : i = "center"), i) {
1160
1161
  case "start":
1161
1162
  return h;
@@ -1175,9 +1176,9 @@ var rs = function(t, n) {
1175
1176
  return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
1176
1177
  },
1177
1178
  getStopIndexForStartIndex: function(t, n, i) {
1178
- var r = t.direction, c = t.height, m = t.itemCount, l = t.itemSize, d = t.layout, I = t.width, g = r === "horizontal" || d === "horizontal", S = n * l, v = g ? I : c, N = Math.ceil((v + i - S) / l);
1179
+ var r = t.direction, m = t.height, d = t.itemCount, l = t.itemSize, c = t.layout, I = t.width, v = r === "horizontal" || c === "horizontal", S = n * l, g = v ? I : m, N = Math.ceil((g + i - S) / l);
1179
1180
  return Math.max(0, Math.min(
1180
- m - 1,
1181
+ d - 1,
1181
1182
  n + N - 1
1182
1183
  // -1 is because stop index is inclusive
1183
1184
  ));
@@ -1194,24 +1195,24 @@ function as(e) {
1194
1195
  return !(i > n || r < t);
1195
1196
  }
1196
1197
  function ls(e) {
1197
- for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, c = e.stopIndex, m = [], l = null, d = null, I = r; I <= c; I++) {
1198
- var g = t(I);
1199
- g ? d !== null && (m.push(l, d), l = d = null) : (d = I, l === null && (l = I));
1198
+ for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, m = e.stopIndex, d = [], l = null, c = null, I = r; I <= m; I++) {
1199
+ var v = t(I);
1200
+ v ? c !== null && (d.push(l, c), l = c = null) : (c = I, l === null && (l = I));
1200
1201
  }
1201
- if (d !== null) {
1202
- for (var S = Math.min(Math.max(d, l + i - 1), n - 1), v = d + 1; v <= S && !t(v); v++)
1203
- d = v;
1204
- m.push(l, d);
1202
+ if (c !== null) {
1203
+ for (var S = Math.min(Math.max(c, l + i - 1), n - 1), g = c + 1; g <= S && !t(g); g++)
1204
+ c = g;
1205
+ d.push(l, c);
1205
1206
  }
1206
- if (m.length)
1207
- for (; m[1] - m[0] + 1 < i && m[0] > 0; ) {
1208
- var N = m[0] - 1;
1207
+ if (d.length)
1208
+ for (; d[1] - d[0] + 1 < i && d[0] > 0; ) {
1209
+ var N = d[0] - 1;
1209
1210
  if (!t(N))
1210
- m[0] = N;
1211
+ d[0] = N;
1211
1212
  else
1212
1213
  break;
1213
1214
  }
1214
- return m;
1215
+ return d;
1215
1216
  }
1216
1217
  var cs = function(e, t) {
1217
1218
  if (!(e instanceof t))
@@ -1244,16 +1245,16 @@ var cs = function(e, t) {
1244
1245
  }, ps = function(e) {
1245
1246
  us(t, e);
1246
1247
  function t() {
1247
- var n, i, r, c;
1248
+ var n, i, r, m;
1248
1249
  cs(this, t);
1249
- for (var m = arguments.length, l = Array(m), d = 0; d < m; d++)
1250
- l[d] = arguments[d];
1251
- return c = (i = (r = we(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(I) {
1252
- var g = I.visibleStartIndex, S = I.visibleStopIndex;
1253
- r._lastRenderedStartIndex = g, r._lastRenderedStopIndex = S, r._ensureRowsLoaded(g, S);
1250
+ for (var d = arguments.length, l = Array(d), c = 0; c < d; c++)
1251
+ l[c] = arguments[c];
1252
+ return m = (i = (r = we(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(I) {
1253
+ var v = I.visibleStartIndex, S = I.visibleStopIndex;
1254
+ r._lastRenderedStartIndex = v, r._lastRenderedStopIndex = S, r._ensureRowsLoaded(v, S);
1254
1255
  }, r._setRef = function(I) {
1255
1256
  r._listRef = I;
1256
- }, i), we(r, c);
1257
+ }, i), we(r, m);
1257
1258
  }
1258
1259
  return ds(t, [{
1259
1260
  key: "resetloadMoreItemsCache",
@@ -1277,39 +1278,39 @@ var cs = function(e, t) {
1277
1278
  }, {
1278
1279
  key: "_ensureRowsLoaded",
1279
1280
  value: function(i, r) {
1280
- var c = this.props, m = c.isItemLoaded, l = c.itemCount, d = c.minimumBatchSize, I = d === void 0 ? 10 : d, g = c.threshold, S = g === void 0 ? 15 : g, v = ls({
1281
- isItemLoaded: m,
1281
+ var m = this.props, d = m.isItemLoaded, l = m.itemCount, c = m.minimumBatchSize, I = c === void 0 ? 10 : c, v = m.threshold, S = v === void 0 ? 15 : v, g = ls({
1282
+ isItemLoaded: d,
1282
1283
  itemCount: l,
1283
1284
  minimumBatchSize: I,
1284
1285
  startIndex: Math.max(0, i - S),
1285
1286
  stopIndex: Math.min(l - 1, r + S)
1286
1287
  });
1287
- (this._memoizedUnloadedRanges.length !== v.length || this._memoizedUnloadedRanges.some(function(N, z) {
1288
- return v[z] !== N;
1289
- })) && (this._memoizedUnloadedRanges = v, this._loadUnloadedRanges(v));
1288
+ (this._memoizedUnloadedRanges.length !== g.length || this._memoizedUnloadedRanges.some(function(N, z) {
1289
+ return g[z] !== N;
1290
+ })) && (this._memoizedUnloadedRanges = g, this._loadUnloadedRanges(g));
1290
1291
  }
1291
1292
  }, {
1292
1293
  key: "_loadUnloadedRanges",
1293
1294
  value: function(i) {
1294
- for (var r = this, c = this.props.loadMoreItems || this.props.loadMoreRows, m = function(I) {
1295
- var g = i[I], S = i[I + 1], v = c(g, S);
1296
- v != null && v.then(function() {
1295
+ for (var r = this, m = this.props.loadMoreItems || this.props.loadMoreRows, d = function(I) {
1296
+ var v = i[I], S = i[I + 1], g = m(v, S);
1297
+ g != null && g.then(function() {
1297
1298
  if (as({
1298
1299
  lastRenderedStartIndex: r._lastRenderedStartIndex,
1299
1300
  lastRenderedStopIndex: r._lastRenderedStopIndex,
1300
- startIndex: g,
1301
+ startIndex: v,
1301
1302
  stopIndex: S
1302
1303
  })) {
1303
1304
  if (r._listRef == null)
1304
1305
  return;
1305
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(g, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1306
+ typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(v, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1306
1307
  }
1307
1308
  });
1308
1309
  }, l = 0; l < i.length; l += 2)
1309
- m(l);
1310
+ d(l);
1310
1311
  }
1311
1312
  }]), t;
1312
- }($e);
1313
+ }(Re);
1313
1314
  const ms = /* @__PURE__ */ o("div")({
1314
1315
  name: "Container",
1315
1316
  class: "culdu4a",
@@ -1326,11 +1327,11 @@ const ms = /* @__PURE__ */ o("div")({
1326
1327
  name: "AvatarPlaceholder",
1327
1328
  class: "a1dg29ja",
1328
1329
  propsAsIs: !1
1329
- }), gs = /* @__PURE__ */ o("div")({
1330
+ }), vs = /* @__PURE__ */ o("div")({
1330
1331
  name: "Content",
1331
1332
  class: "c10a68rc",
1332
1333
  propsAsIs: !1
1333
- }), vs = /* @__PURE__ */ o("div")({
1334
+ }), gs = /* @__PURE__ */ o("div")({
1334
1335
  name: "NameContainer",
1335
1336
  class: "nc4kck5",
1336
1337
  propsAsIs: !1
@@ -1348,13 +1349,13 @@ const ms = /* @__PURE__ */ o("div")({
1348
1349
  name: n,
1349
1350
  points: i,
1350
1351
  isCurrentUser: r,
1351
- openItemDetail: c,
1352
- style: m
1353
- }) => /* @__PURE__ */ p(ms, { onClick: c, style: m, children: [
1352
+ openItemDetail: m,
1353
+ style: d
1354
+ }) => /* @__PURE__ */ p(ms, { onClick: m, style: d, children: [
1354
1355
  /* @__PURE__ */ s(hs, { children: e || 0 }),
1355
- /* @__PURE__ */ p(gs, { children: [
1356
+ /* @__PURE__ */ p(vs, { children: [
1356
1357
  t ? /* @__PURE__ */ s(Is, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(fs, { children: Ue(n || "") }),
1357
- /* @__PURE__ */ p(vs, { children: [
1358
+ /* @__PURE__ */ p(gs, { children: [
1358
1359
  /* @__PURE__ */ s(Ms, { children: n || "" }),
1359
1360
  r && /* @__PURE__ */ s(Ns, { name: "icon-star" })
1360
1361
  ] })
@@ -1370,26 +1371,26 @@ const ms = /* @__PURE__ */ o("div")({
1370
1371
  openItemDetail: n,
1371
1372
  fetchMore: i,
1372
1373
  onScroll: r
1373
- }) => /* @__PURE__ */ s(Fe, { children: ({ width: c, height: m }) => /* @__PURE__ */ s(
1374
+ }) => /* @__PURE__ */ s(Fe, { children: ({ width: m, height: d }) => /* @__PURE__ */ s(
1374
1375
  ps,
1375
1376
  {
1376
1377
  isItemLoaded: (l) => l < e.length,
1377
1378
  itemCount: e.length + 1,
1378
1379
  loadMoreItems: i,
1379
- children: ({ onItemsRendered: l, ref: d }) => /* @__PURE__ */ s(ys, { children: /* @__PURE__ */ s(
1380
+ children: ({ onItemsRendered: l, ref: c }) => /* @__PURE__ */ s(ys, { children: /* @__PURE__ */ s(
1380
1381
  os,
1381
1382
  {
1382
1383
  itemSize: 56,
1383
1384
  onScroll: r,
1384
1385
  onItemsRendered: l,
1385
- ref: d,
1386
+ ref: c,
1386
1387
  itemCount: e.length,
1387
- width: c,
1388
- height: m,
1389
- children: ({ index: I, style: g }) => /* @__PURE__ */ s(
1388
+ width: m,
1389
+ height: d,
1390
+ children: ({ index: I, style: v }) => /* @__PURE__ */ s(
1390
1391
  As,
1391
1392
  {
1392
- style: { ...g, maxHeight: 48 },
1393
+ style: { ...v, maxHeight: 48 },
1393
1394
  ...e[I],
1394
1395
  openItemDetail: () => n(e[I].userId),
1395
1396
  isCurrentUser: !!t && t === e[I].userId
@@ -1423,8 +1424,8 @@ const ms = /* @__PURE__ */ o("div")({
1423
1424
  );
1424
1425
  }, zs = ({ gamification: e, hideTabs: t }) => {
1425
1426
  const { data: n } = _(e.leaderboardList.$store), i = ue(0), r = q(
1426
- Re((c) => {
1427
- Math.abs(i.current - c.scrollOffset) < 112 || (i.current = c.scrollOffset, t(c.scrollOffset !== 0 && c.scrollDirection === "forward"));
1427
+ $e((m) => {
1428
+ Math.abs(i.current - m.scrollOffset) < 112 || (i.current = m.scrollOffset, t(m.scrollOffset !== 0 && m.scrollDirection === "forward"));
1428
1429
  }, 200),
1429
1430
  [t]
1430
1431
  );
@@ -1470,11 +1471,11 @@ const ms = /* @__PURE__ */ o("div")({
1470
1471
  name: "QuestionContent",
1471
1472
  class: "q1uz5j1g",
1472
1473
  propsAsIs: !1
1473
- }), $s = /* @__PURE__ */ o("button")({
1474
+ }), Rs = /* @__PURE__ */ o("button")({
1474
1475
  name: "PlayButton",
1475
1476
  class: "p1pba9p1",
1476
1477
  propsAsIs: !1
1477
- }), Rs = {
1478
+ }), $s = {
1478
1479
  [X.LOST]: /* @__PURE__ */ s(ne, { name: "incorrectVoted" }),
1479
1480
  [X.WON]: /* @__PURE__ */ s(ne, { name: "icon-check" }),
1480
1481
  [X.UNSET]: /* @__PURE__ */ s(ne, { name: "icon-arrow" }),
@@ -1485,11 +1486,11 @@ const ms = /* @__PURE__ */ o("div")({
1485
1486
  questionStatus: n,
1486
1487
  subject: i,
1487
1488
  openForVoting: r,
1488
- openQuestion: c,
1489
- status: m
1489
+ openQuestion: m,
1490
+ status: d
1490
1491
  }) => {
1491
- const l = Ee[t], d = Rs[m];
1492
- return l ? /* @__PURE__ */ p(xs, { onClick: () => c == null ? void 0 : c(e), children: [
1492
+ const l = Ee[t], c = $s[d];
1493
+ return l ? /* @__PURE__ */ p(xs, { onClick: () => m == null ? void 0 : m(e), children: [
1493
1494
  /* @__PURE__ */ p(Ls, { children: [
1494
1495
  /* @__PURE__ */ p(Os, { children: [
1495
1496
  /* @__PURE__ */ s(
@@ -1502,12 +1503,12 @@ const ms = /* @__PURE__ */ o("div")({
1502
1503
  ),
1503
1504
  /* @__PURE__ */ p(Es, { children: [
1504
1505
  l.label,
1505
- t === y.TRIVIA && n === R.RESOLVED && " • Expired"
1506
+ t === y.TRIVIA && n === $.RESOLVED && " • Expired"
1506
1507
  ] })
1507
1508
  ] }),
1508
1509
  /* @__PURE__ */ s(bs, { children: i || "" })
1509
1510
  ] }),
1510
- /* @__PURE__ */ s(Cs, { children: r ? /* @__PURE__ */ s($s, { children: "Play" }) : d })
1511
+ /* @__PURE__ */ s(Cs, { children: r ? /* @__PURE__ */ s(Rs, { children: "Play" }) : c })
1511
1512
  ] }) : null;
1512
1513
  }, Us = /* @__PURE__ */ o("div")({
1513
1514
  name: "Container",
@@ -1550,8 +1551,8 @@ const ms = /* @__PURE__ */ o("div")({
1550
1551
  const r = new Date(t);
1551
1552
  if (Me(r))
1552
1553
  return {
1553
- date: ge(r),
1554
- time: ve(r)
1554
+ date: ve(r),
1555
+ time: ge(r)
1555
1556
  };
1556
1557
  }
1557
1558
  return null;
@@ -1571,18 +1572,18 @@ const ms = /* @__PURE__ */ o("div")({
1571
1572
  class: "qvghv3l",
1572
1573
  propsAsIs: !1
1573
1574
  }), Gs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Hs, { children: e == null ? void 0 : e.map((n) => {
1574
- var i, r, c;
1575
+ var i, r, m;
1575
1576
  if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1576
- const m = n.attributes.attributes.value;
1577
- return /* @__PURE__ */ s(Qs, { openQuestion: t, ...m }, m.questionId);
1577
+ const d = n.attributes.attributes.value;
1578
+ return /* @__PURE__ */ s(Qs, { openQuestion: t, ...d }, d.questionId);
1578
1579
  }
1579
1580
  if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1580
- const m = n.attributes.attributes.value, l = n.attributes.created;
1581
- return /* @__PURE__ */ s(qs, { openInsight: t, ...m, created: l }, m.questionId);
1581
+ const d = n.attributes.attributes.value, l = n.attributes.created;
1582
+ return /* @__PURE__ */ s(qs, { openInsight: t, ...d, created: l }, d.questionId);
1582
1583
  }
1583
- if (n.type === "tweet" && ((c = n.attributes) == null ? void 0 : c.attributes.case) === "tweet") {
1584
- const m = n.attributes.attributes.value, l = n.attributes.id, d = n.attributes.created;
1585
- return /* @__PURE__ */ s(Bs, { openTweet: t, ...m, tweetId: l, created: d }, l);
1584
+ if (n.type === "tweet" && ((m = n.attributes) == null ? void 0 : m.attributes.case) === "tweet") {
1585
+ const d = n.attributes.attributes.value, l = n.attributes.id, c = n.attributes.created;
1586
+ return /* @__PURE__ */ s(Bs, { openTweet: t, ...d, tweetId: l, created: c }, l);
1586
1587
  }
1587
1588
  return null;
1588
1589
  }) }), Zs = ({ store: e, openQuestion: t }) => {
@@ -1590,10 +1591,10 @@ const ms = /* @__PURE__ */ o("div")({
1590
1591
  return n != null && n.data ? /* @__PURE__ */ s(Gs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1591
1592
  }, Js = ({ userSummary: e }) => {
1592
1593
  var t;
1593
- const [n, i] = $(void 0);
1594
+ const [n, i] = R(void 0);
1594
1595
  return fe(() => {
1595
- const r = e.subscribe((c) => {
1596
- c != null && c.data && i(c.data);
1596
+ const r = e.subscribe((m) => {
1597
+ m != null && m.data && i(m.data);
1597
1598
  });
1598
1599
  return () => {
1599
1600
  r();
@@ -1602,30 +1603,30 @@ const ms = /* @__PURE__ */ o("div")({
1602
1603
  }, Ks = ({
1603
1604
  gamification: e
1604
1605
  }) => {
1605
- const [t, n] = $(!1), [i, r] = $(G.HOME), c = ue(null), m = ue(0), [l, d] = Je(), I = (v) => {
1606
- d(() => r(v));
1607
- }, g = (v) => {
1608
- d(() => n(v));
1609
- }, S = q(Re(() => {
1610
- const v = c.current;
1611
- if (!v)
1606
+ const [t, n] = R(!1), [i, r] = R(G.HOME), m = ue(null), d = ue(0), [l, c] = Je(), I = (g) => {
1607
+ c(() => r(g));
1608
+ }, v = (g) => {
1609
+ c(() => n(g));
1610
+ }, S = q($e(() => {
1611
+ const g = m.current;
1612
+ if (!g)
1612
1613
  return;
1613
1614
  const {
1614
1615
  scrollTop: N
1615
- } = v;
1616
+ } = g;
1616
1617
  if (N === 0) {
1617
- m.current = 0, g(!1);
1618
+ d.current = 0, v(!1);
1618
1619
  return;
1619
1620
  }
1620
- if (Math.abs(m.current - N) < 112)
1621
+ if (Math.abs(d.current - N) < 112)
1621
1622
  return;
1622
- const z = m.current < N ? "forward" : "backward";
1623
- m.current = N, g(z === "forward");
1623
+ const z = d.current < N ? "forward" : "backward";
1624
+ d.current = N, v(z === "forward");
1624
1625
  }, 200), []);
1625
1626
  return fe(() => {
1626
- const v = c.current;
1627
- return v ? (i === G.HOME && v.addEventListener("scroll", S), () => {
1628
- v.removeEventListener("scroll", S);
1627
+ const g = m.current;
1628
+ return g ? (i === G.HOME && g.addEventListener("scroll", S), () => {
1629
+ g.removeEventListener("scroll", S);
1629
1630
  }) : () => {
1630
1631
  };
1631
1632
  }, [i, S]), /* @__PURE__ */ p("div", {
@@ -1646,7 +1647,7 @@ const ms = /* @__PURE__ */ o("div")({
1646
1647
  toggleActivePage: I
1647
1648
  })
1648
1649
  }), i === G.HOME && /* @__PURE__ */ p(Ie, {
1649
- ref: c,
1650
+ ref: m,
1650
1651
  children: [/* @__PURE__ */ s(de, {
1651
1652
  style: {
1652
1653
  paddingTop: "12px"
@@ -1664,7 +1665,7 @@ const ms = /* @__PURE__ */ o("div")({
1664
1665
  className: "c1bp9dj2",
1665
1666
  children: /* @__PURE__ */ s(zs, {
1666
1667
  gamification: e,
1667
- hideTabs: g
1668
+ hideTabs: v
1668
1669
  })
1669
1670
  })]
1670
1671
  });
@@ -1682,7 +1683,7 @@ const ms = /* @__PURE__ */ o("div")({
1682
1683
  }) => {
1683
1684
  const n = e + t;
1684
1685
  return n === 0 ? 0 : Math.round(e / n * 100);
1685
- }, gi = ({
1686
+ }, vi = ({
1686
1687
  gamification: e,
1687
1688
  className: t
1688
1689
  }) => {
@@ -1716,5 +1717,5 @@ const ms = /* @__PURE__ */ o("div")({
1716
1717
  });
1717
1718
  };
1718
1719
  export {
1719
- gi as default
1720
+ vi as default
1720
1721
  };