@streamlayer/react 0.31.1 → 0.31.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.
@@ -123,11 +123,11 @@ const Ye = /* @__PURE__ */ o("div")({
123
123
  name: "Rts",
124
124
  class: "r2vgnxv",
125
125
  propsAsIs: !1
126
- }), ft = /* @__PURE__ */ o("div")({
126
+ }), gt = /* @__PURE__ */ o("div")({
127
127
  name: "RtsIndicator",
128
128
  class: "roqn06j",
129
129
  propsAsIs: !1
130
- }), gt = /* @__PURE__ */ o("div")({
130
+ }), ft = /* @__PURE__ */ o("div")({
131
131
  name: "RtsLabel",
132
132
  class: "r15adx7c",
133
133
  propsAsIs: !1
@@ -158,9 +158,9 @@ const Ye = /* @__PURE__ */ o("div")({
158
158
  friendsRank: i,
159
159
  rank: r,
160
160
  streak: m,
161
- correct: u,
161
+ correct: c,
162
162
  incorrect: I,
163
- inTop: d,
163
+ inTop: u,
164
164
  successRate: h
165
165
  }) => /* @__PURE__ */ p(ot, { children: [
166
166
  /* @__PURE__ */ s(at, { children: /* @__PURE__ */ p(ct, { children: [
@@ -173,15 +173,15 @@ const Ye = /* @__PURE__ */ o("div")({
173
173
  /* @__PURE__ */ p(mt, { children: [
174
174
  /* @__PURE__ */ p(ht, { children: [
175
175
  /* @__PURE__ */ s(It, { alt: "rank-icon", src: Tt }),
176
- /* @__PURE__ */ p(ft, { children: [
176
+ /* @__PURE__ */ p(gt, { children: [
177
177
  De(n),
178
- /* @__PURE__ */ s(gt, { children: "PTS" })
178
+ /* @__PURE__ */ s(ft, { children: "PTS" })
179
179
  ] })
180
180
  ] }),
181
181
  /* @__PURE__ */ s(Mt, {}),
182
182
  /* @__PURE__ */ p("div", { children: [
183
183
  "TOP ",
184
- d || 0,
184
+ u || 0,
185
185
  "%"
186
186
  ] })
187
187
  ] })
@@ -194,7 +194,7 @@ const Ye = /* @__PURE__ */ o("div")({
194
194
  ] }),
195
195
  /* @__PURE__ */ p(Nt, { children: [
196
196
  /* @__PURE__ */ s(P, { indicator: m || 0, title: "Win streak" }),
197
- /* @__PURE__ */ s(P, { indicator: u || 0, title: "Correct" }),
197
+ /* @__PURE__ */ s(P, { indicator: c || 0, title: "Correct" }),
198
198
  /* @__PURE__ */ s(P, { indicator: I || 0, title: "Incorrect" }),
199
199
  /* @__PURE__ */ s(P, { indicator: `${h || 0}%`, title: "Succ. rate" })
200
200
  ] })
@@ -251,10 +251,10 @@ const Ye = /* @__PURE__ */ o("div")({
251
251
  hasCorrectAnswer: r,
252
252
  questionStatus: m
253
253
  }) => {
254
- const u = n && (i === x.TRIVIA || i === x.PREDICTION);
255
- if (!u && m !== Q.RESOLVED)
254
+ const c = n && (i === x.TRIVIA || i === x.PREDICTION);
255
+ if (!c && m !== Q.RESOLVED)
256
256
  return null;
257
- const I = i === x.PREDICTION && !r, d = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
257
+ const I = i === x.PREDICTION && !r, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
258
258
  return /* @__PURE__ */ p(jt, { "data-isPrediction": I, children: [
259
259
  m === Q.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ p(b, { children: [
260
260
  /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
@@ -263,14 +263,14 @@ const Ye = /* @__PURE__ */ o("div")({
263
263
  /* @__PURE__ */ s(wt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
264
264
  ] })
265
265
  ] }),
266
- u && I && /* @__PURE__ */ p(b, { children: [
266
+ c && I && /* @__PURE__ */ p(b, { children: [
267
267
  /* @__PURE__ */ s(Ct, { name: "icon-prediction" }),
268
268
  /* @__PURE__ */ s(Z, { children: "Stay tuned to see if your prediction was correct." })
269
269
  ] }),
270
- u && r && /* @__PURE__ */ p(b, { children: [
271
- /* @__PURE__ */ s(ae, { "data-feedbackType": d, children: /* @__PURE__ */ s(j, { name: d }) }),
270
+ c && r && /* @__PURE__ */ p(b, { children: [
271
+ /* @__PURE__ */ s(ae, { "data-feedbackType": u, children: /* @__PURE__ */ s(j, { name: u }) }),
272
272
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ p(le, { children: [
273
- /* @__PURE__ */ s(kt, { "data-feedbackType": d, children: h == null ? void 0 : h.title }),
273
+ /* @__PURE__ */ s(kt, { "data-feedbackType": u, children: h == null ? void 0 : h.title }),
274
274
  /* @__PURE__ */ s(Z, { children: h == null ? void 0 : h.description })
275
275
  ] }) })
276
276
  ] })
@@ -370,9 +370,9 @@ const Ye = /* @__PURE__ */ o("div")({
370
370
  text: r,
371
371
  percentageDecimal: m,
372
372
  // extra props
373
- onVote: u,
373
+ onVote: c,
374
374
  youSelected: I,
375
- questionVoted: d,
375
+ questionVoted: u,
376
376
  // ToDo: Figure out why imageMode is not in the response, and delete default value
377
377
  imageMode: h,
378
378
  answerTimeExpired: y,
@@ -381,22 +381,22 @@ const Ye = /* @__PURE__ */ o("div")({
381
381
  questionType: A,
382
382
  correct: T,
383
383
  hasCorrectAnswer: a
384
- } = e, l = Kt(e), c = Xt({ questionType: A, questionVoted: d, correct: T, hasCorrectAnswer: a, questionStatus: D }), f = d || D === Q.RESOLVED && A === x.PREDICTION;
384
+ } = e, l = Kt(e), d = Xt({ questionType: A, questionVoted: u, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = u || D === Q.RESOLVED && A === x.PREDICTION;
385
385
  return /* @__PURE__ */ p(
386
386
  Qt,
387
387
  {
388
388
  value: n,
389
389
  "data-selected": I,
390
390
  "data-answerState": l,
391
- disabled: d || N || y,
392
- onClick: u,
391
+ disabled: u || N || y,
392
+ onClick: c,
393
393
  children: [
394
- f && /* @__PURE__ */ s(Ut, { "data-answerState": l, style: { width: `${m}%` } }),
394
+ g && /* @__PURE__ */ s(Ut, { "data-answerState": l, style: { width: `${m}%` } }),
395
395
  /* @__PURE__ */ p(_t, { children: [
396
396
  i && h && ((t = ce[h]) == null ? void 0 : t.call(ce, i)),
397
397
  /* @__PURE__ */ s(Bt, { children: r }),
398
- f && /* @__PURE__ */ p(Ht, { children: [
399
- c && /* @__PURE__ */ s(Jt, { name: "selected" }),
398
+ g && /* @__PURE__ */ p(Ht, { children: [
399
+ d && /* @__PURE__ */ s(Jt, { name: "selected" }),
400
400
  /* @__PURE__ */ s(Zt, { children: /* @__PURE__ */ s(qe, { value: m, suffix: "%" }) })
401
401
  ] })
402
402
  ] })
@@ -413,13 +413,13 @@ const Ye = /* @__PURE__ */ o("div")({
413
413
  onTimerExpired: n
414
414
  }) => {
415
415
  const [i, r] = R(t > 10 ? rn : de), m = ({
416
- remainingTime: d
416
+ remainingTime: u
417
417
  }) => /* @__PURE__ */ s(sn, {
418
- children: d
419
- }), u = F(() => {
418
+ children: u
419
+ }), c = F(() => {
420
420
  n == null || n(), r(on);
421
- }, [n, r]), I = F((d) => {
422
- d === 10 && r(de);
421
+ }, [n, r]), I = F((u) => {
422
+ u === 10 && r(de);
423
423
  }, [r]);
424
424
  return /* @__PURE__ */ s(Pe, {
425
425
  isPlaying: e,
@@ -430,7 +430,7 @@ const Ye = /* @__PURE__ */ o("div")({
430
430
  strokeWidth: 2,
431
431
  trailStrokeWidth: 2,
432
432
  trailColor: i,
433
- onComplete: u,
433
+ onComplete: c,
434
434
  onUpdate: I,
435
435
  children: m
436
436
  });
@@ -462,17 +462,18 @@ const Ye = /* @__PURE__ */ o("div")({
462
462
  name: "PointsUnits",
463
463
  class: "pe5g05h",
464
464
  propsAsIs: !1
465
- }), fn = ({
465
+ }), gn = ({
466
466
  title: e,
467
467
  points: t,
468
468
  isPlayingTimer: n,
469
469
  isTimer: i,
470
- timerDuration: r,
471
- onTimerExpired: m
470
+ questionType: r,
471
+ timerDuration: m,
472
+ onTimerExpired: c
472
473
  }) => /* @__PURE__ */ p(ln, { children: [
473
474
  /* @__PURE__ */ p(cn, { children: [
474
475
  e && /* @__PURE__ */ s(dn, { children: e }),
475
- t !== void 0 && /* @__PURE__ */ p(b, { children: [
476
+ t !== void 0 && r !== x.POLL && /* @__PURE__ */ p(b, { children: [
476
477
  /* @__PURE__ */ s(pn, { name: "icon-trophy" }),
477
478
  /* @__PURE__ */ p(mn, { children: [
478
479
  /* @__PURE__ */ s(In, { children: t }),
@@ -480,41 +481,41 @@ const Ye = /* @__PURE__ */ o("div")({
480
481
  ] })
481
482
  ] })
482
483
  ] }),
483
- i && /* @__PURE__ */ s(an, { isPlaying: n, onTimerExpired: m, duration: r })
484
- ] }), gn = ({ openedQuestion: e, vote: t, close: n }) => {
484
+ i && /* @__PURE__ */ s(an, { isPlaying: n, onTimerExpired: c, duration: m })
485
+ ] }), fn = ({ openedQuestion: e, vote: t, close: n }) => {
485
486
  var i;
486
- const r = e.subject, m = e.type, u = (i = e.options) == null ? void 0 : i.options, [I, d] = R(!1), [h, y] = R(!1), [D, N] = R(""), A = e == null ? void 0 : e.id, T = F(
487
+ const r = e.subject, m = e.type, c = (i = e.options) == null ? void 0 : i.options, [I, u] = R(!1), [h, y] = R(!1), [D, N] = R(""), A = e == null ? void 0 : e.id, T = F(
487
488
  async (v) => {
488
489
  if (A) {
489
- const g = v.currentTarget.value;
490
- N(g), y(!0), await t(A, g), y(!1);
490
+ const f = v.currentTarget.value;
491
+ N(f), y(!0), await t(A, f), y(!1);
491
492
  }
492
493
  },
493
494
  [A, N, t]
494
495
  ), a = F(() => {
495
- d(!0), setTimeout(n, 3e3);
496
+ u(!0), setTimeout(n, 3e3);
496
497
  }, [n]), l = W(
497
498
  () => e == null ? void 0 : e.answers.find((v) => v.youVoted === !0),
498
499
  [e]
499
- ), c = W(
500
+ ), d = W(
500
501
  () => !!(e != null && e.answers.find((v) => v.correct === !0)),
501
502
  [e]
502
- ), f = W(() => e ? e.answers.map((v) => {
503
- var g;
503
+ ), g = W(() => e ? e.answers.map((v) => {
504
+ var f;
504
505
  return {
505
506
  ...v,
506
507
  questionVoted: !!l,
507
508
  youSelected: D === v.id,
508
509
  isLoading: h,
509
- hasCorrectAnswer: c,
510
+ hasCorrectAnswer: d,
510
511
  questionType: e.type,
511
512
  answerTimeExpired: I,
512
513
  questionStatus: e.status,
513
- imageMode: (g = e.appearance) == null ? void 0 : g.images,
514
+ imageMode: (f = e.appearance) == null ? void 0 : f.images,
514
515
  // ToDo: Figure out why imageMode is not in the response
515
516
  onVote: T
516
517
  };
517
- }) : [], [c, I, h, e, l, T, D]), M = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0;
518
+ }) : [], [d, I, h, e, l, T, D]), M = c && (c.case === "trivia" || c.case === "prediction") ? c.value : void 0;
518
519
  return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(Et, { children: /* @__PURE__ */ p(Lt, { children: [
519
520
  M && /* @__PURE__ */ s(
520
521
  bt,
@@ -523,16 +524,17 @@ const Ye = /* @__PURE__ */ o("div")({
523
524
  questionVoted: !!l,
524
525
  questionVotedCorrectly: l == null ? void 0 : l.correct,
525
526
  questionType: m,
526
- hasCorrectAnswer: c,
527
+ hasCorrectAnswer: d,
527
528
  questionStatus: e.status
528
529
  }
529
530
  ),
530
531
  e.type !== x.PREDICTION && /* @__PURE__ */ s(
531
- fn,
532
+ gn,
532
533
  {
533
- title: I ? "Time expired" : "To win",
534
+ title: I ? "Time expired" : e.type === x.POLL ? "Time remaining" : "To win",
534
535
  points: I ? void 0 : 100,
535
536
  onTimerExpired: a,
537
+ questionType: e.type,
536
538
  isTimer: !0,
537
539
  isPlayingTimer: !l,
538
540
  timerDuration: l ? 0 : 30
@@ -546,7 +548,7 @@ const Ye = /* @__PURE__ */ o("div")({
546
548
  }
547
549
  ) : /* @__PURE__ */ p(b, { children: [
548
550
  /* @__PURE__ */ s($t, { "data-isPrediction": e.type === x.PREDICTION, children: r }),
549
- /* @__PURE__ */ s(Rt, { children: f.map((v) => /* @__PURE__ */ s(en, { ...v }, v.id)) })
551
+ /* @__PURE__ */ s(Rt, { children: g.map((v) => /* @__PURE__ */ s(en, { ...v }, v.id)) })
550
552
  ] })
551
553
  ] }) }) });
552
554
  }, Mn = /* @__PURE__ */ o("div")({
@@ -576,11 +578,11 @@ const Ye = /* @__PURE__ */ o("div")({
576
578
  }), xe = ({ created: e, image: t, title: n, instantView: i }) => {
577
579
  const r = W(() => {
578
580
  if (e) {
579
- const u = new Date(e);
580
- if (Xe(u))
581
+ const c = new Date(e);
582
+ if (Xe(c))
581
583
  return {
582
- date: Je(u),
583
- time: Ke(u)
584
+ date: Je(c),
585
+ time: Ke(c)
584
586
  };
585
587
  }
586
588
  return null;
@@ -633,7 +635,7 @@ const Ye = /* @__PURE__ */ o("div")({
633
635
  loading: i,
634
636
  data: r
635
637
  } = e;
636
- return !i && r ? /* @__PURE__ */ s(gn, {
638
+ return !i && r ? /* @__PURE__ */ s(fn, {
637
639
  vote: t,
638
640
  close: n,
639
641
  openedQuestion: r
@@ -733,12 +735,12 @@ function Qn(e, t) {
733
735
  function G(e, t) {
734
736
  t === void 0 && (t = Qn);
735
737
  var n, i = [], r, m = !1;
736
- function u() {
737
- for (var I = [], d = 0; d < arguments.length; d++)
738
- I[d] = arguments[d];
738
+ function c() {
739
+ for (var I = [], u = 0; u < arguments.length; u++)
740
+ I[u] = arguments[u];
739
741
  return m && n === this && t(I, i) || (r = e.apply(this, I), m = !0, n = this, i = I), r;
740
742
  }
741
- return u;
743
+ return c;
742
744
  }
743
745
  var Un = typeof performance == "object" && typeof performance.now == "function", Ie = Un ? function() {
744
746
  return performance.now();
@@ -759,7 +761,7 @@ function _n(e, t) {
759
761
  return r;
760
762
  }
761
763
  var J = -1;
762
- function fe(e) {
764
+ function ge(e) {
763
765
  if (e === void 0 && (e = !1), J === -1 || e) {
764
766
  var t = document.createElement("div"), n = t.style;
765
767
  n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), J = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
@@ -767,7 +769,7 @@ function fe(e) {
767
769
  return J;
768
770
  }
769
771
  var w = null;
770
- function ge(e) {
772
+ function fe(e) {
771
773
  if (e === void 0 && (e = !1), w === null || e) {
772
774
  var t = document.createElement("div"), n = t.style;
773
775
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
@@ -780,37 +782,37 @@ var qn = 150, Pn = function(t, n) {
780
782
  return t;
781
783
  };
782
784
  function Yn(e) {
783
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, m = e.getOffsetForIndexAndAlignment, u = e.getStartIndexForOffset, I = e.getStopIndexForStartIndex, d = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, y = e.validateProps;
785
+ var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, m = e.getOffsetForIndexAndAlignment, c = e.getStartIndexForOffset, I = e.getStopIndexForStartIndex, u = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, y = e.validateProps;
784
786
  return t = /* @__PURE__ */ function(D) {
785
787
  $n(N, D);
786
788
  function N(T) {
787
789
  var a;
788
- return a = D.call(this, T) || this, a._instanceProps = d(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
790
+ return a = D.call(this, T) || this, a._instanceProps = u(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
789
791
  instance: pe(a),
790
792
  isScrolling: !1,
791
793
  scrollDirection: "forward",
792
794
  scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
793
795
  scrollUpdateWasRequested: !1
794
- }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = G(function(l, c, f, M) {
796
+ }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = G(function(l, d, g, M) {
795
797
  return a.props.onItemsRendered({
796
798
  overscanStartIndex: l,
797
- overscanStopIndex: c,
798
- visibleStartIndex: f,
799
+ overscanStopIndex: d,
800
+ visibleStartIndex: g,
799
801
  visibleStopIndex: M
800
802
  });
801
- }), a._callOnScroll = void 0, a._callOnScroll = G(function(l, c, f) {
803
+ }), a._callOnScroll = void 0, a._callOnScroll = G(function(l, d, g) {
802
804
  return a.props.onScroll({
803
805
  scrollDirection: l,
804
- scrollOffset: c,
805
- scrollUpdateWasRequested: f
806
+ scrollOffset: d,
807
+ scrollUpdateWasRequested: g
806
808
  });
807
809
  }), a._getItemStyle = void 0, a._getItemStyle = function(l) {
808
- var c = a.props, f = c.direction, M = c.itemSize, v = c.layout, g = a._getItemStyleCache(h && M, h && v, h && f), S;
809
- if (g.hasOwnProperty(l))
810
- S = g[l];
810
+ var d = a.props, g = d.direction, M = d.itemSize, v = d.layout, f = a._getItemStyleCache(h && M, h && v, h && g), S;
811
+ if (f.hasOwnProperty(l))
812
+ S = f[l];
811
813
  else {
812
- var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), C = f === "horizontal" || v === "horizontal", U = f === "rtl", _ = C ? z : 0;
813
- g[l] = S = {
814
+ var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), C = g === "horizontal" || v === "horizontal", U = g === "rtl", _ = C ? z : 0;
815
+ f[l] = S = {
814
816
  position: "absolute",
815
817
  left: U ? void 0 : _,
816
818
  right: U ? _ : void 0,
@@ -820,46 +822,46 @@ function Yn(e) {
820
822
  };
821
823
  }
822
824
  return S;
823
- }, a._getItemStyleCache = void 0, a._getItemStyleCache = G(function(l, c, f) {
825
+ }, a._getItemStyleCache = void 0, a._getItemStyleCache = G(function(l, d, g) {
824
826
  return {};
825
827
  }), a._onScrollHorizontal = function(l) {
826
- var c = l.currentTarget, f = c.clientWidth, M = c.scrollLeft, v = c.scrollWidth;
827
- a.setState(function(g) {
828
- if (g.scrollOffset === M)
828
+ var d = l.currentTarget, g = d.clientWidth, M = d.scrollLeft, v = d.scrollWidth;
829
+ a.setState(function(f) {
830
+ if (f.scrollOffset === M)
829
831
  return null;
830
832
  var S = a.props.direction, z = M;
831
833
  if (S === "rtl")
832
- switch (ge()) {
834
+ switch (fe()) {
833
835
  case "negative":
834
836
  z = -M;
835
837
  break;
836
838
  case "positive-descending":
837
- z = v - f - M;
839
+ z = v - g - M;
838
840
  break;
839
841
  }
840
- return z = Math.max(0, Math.min(z, v - f)), {
842
+ return z = Math.max(0, Math.min(z, v - g)), {
841
843
  isScrolling: !0,
842
- scrollDirection: g.scrollOffset < M ? "forward" : "backward",
844
+ scrollDirection: f.scrollOffset < M ? "forward" : "backward",
843
845
  scrollOffset: z,
844
846
  scrollUpdateWasRequested: !1
845
847
  };
846
848
  }, a._resetIsScrollingDebounced);
847
849
  }, a._onScrollVertical = function(l) {
848
- var c = l.currentTarget, f = c.clientHeight, M = c.scrollHeight, v = c.scrollTop;
849
- a.setState(function(g) {
850
- if (g.scrollOffset === v)
850
+ var d = l.currentTarget, g = d.clientHeight, M = d.scrollHeight, v = d.scrollTop;
851
+ a.setState(function(f) {
852
+ if (f.scrollOffset === v)
851
853
  return null;
852
- var S = Math.max(0, Math.min(v, M - f));
854
+ var S = Math.max(0, Math.min(v, M - g));
853
855
  return {
854
856
  isScrolling: !0,
855
- scrollDirection: g.scrollOffset < S ? "forward" : "backward",
857
+ scrollDirection: f.scrollOffset < S ? "forward" : "backward",
856
858
  scrollOffset: S,
857
859
  scrollUpdateWasRequested: !1
858
860
  };
859
861
  }, a._resetIsScrollingDebounced);
860
862
  }, a._outerRefSetter = function(l) {
861
- var c = a.props.outerRef;
862
- a._outerRef = l, typeof c == "function" ? c(l) : c != null && typeof c == "object" && c.hasOwnProperty("current") && (c.current = l);
863
+ var d = a.props.outerRef;
864
+ a._outerRef = l, typeof d == "function" ? d(l) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = l);
863
865
  }, a._resetIsScrollingDebounced = function() {
864
866
  a._resetIsScrollingTimeoutId !== null && he(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = _n(a._resetIsScrolling, qn);
865
867
  }, a._resetIsScrolling = function() {
@@ -884,49 +886,49 @@ function Yn(e) {
884
886
  }, this._resetIsScrollingDebounced);
885
887
  }, A.scrollToItem = function(a, l) {
886
888
  l === void 0 && (l = "auto");
887
- var c = this.props, f = c.itemCount, M = c.layout, v = this.state.scrollOffset;
888
- a = Math.max(0, Math.min(a, f - 1));
889
- var g = 0;
889
+ var d = this.props, g = d.itemCount, M = d.layout, v = this.state.scrollOffset;
890
+ a = Math.max(0, Math.min(a, g - 1));
891
+ var f = 0;
890
892
  if (this._outerRef) {
891
893
  var S = this._outerRef;
892
- M === "vertical" ? g = S.scrollWidth > S.clientWidth ? fe() : 0 : g = S.scrollHeight > S.clientHeight ? fe() : 0;
894
+ M === "vertical" ? f = S.scrollWidth > S.clientWidth ? ge() : 0 : f = S.scrollHeight > S.clientHeight ? ge() : 0;
893
895
  }
894
- this.scrollTo(m(this.props, a, l, v, this._instanceProps, g));
896
+ this.scrollTo(m(this.props, a, l, v, this._instanceProps, f));
895
897
  }, A.componentDidMount = function() {
896
- var a = this.props, l = a.direction, c = a.initialScrollOffset, f = a.layout;
897
- if (typeof c == "number" && this._outerRef != null) {
898
+ var a = this.props, l = a.direction, d = a.initialScrollOffset, g = a.layout;
899
+ if (typeof d == "number" && this._outerRef != null) {
898
900
  var M = this._outerRef;
899
- l === "horizontal" || f === "horizontal" ? M.scrollLeft = c : M.scrollTop = c;
901
+ l === "horizontal" || g === "horizontal" ? M.scrollLeft = d : M.scrollTop = d;
900
902
  }
901
903
  this._callPropsCallbacks();
902
904
  }, A.componentDidUpdate = function() {
903
- var a = this.props, l = a.direction, c = a.layout, f = this.state, M = f.scrollOffset, v = f.scrollUpdateWasRequested;
905
+ var a = this.props, l = a.direction, d = a.layout, g = this.state, M = g.scrollOffset, v = g.scrollUpdateWasRequested;
904
906
  if (v && this._outerRef != null) {
905
- var g = this._outerRef;
906
- if (l === "horizontal" || c === "horizontal")
907
+ var f = this._outerRef;
908
+ if (l === "horizontal" || d === "horizontal")
907
909
  if (l === "rtl")
908
- switch (ge()) {
910
+ switch (fe()) {
909
911
  case "negative":
910
- g.scrollLeft = -M;
912
+ f.scrollLeft = -M;
911
913
  break;
912
914
  case "positive-ascending":
913
- g.scrollLeft = M;
915
+ f.scrollLeft = M;
914
916
  break;
915
917
  default:
916
- var S = g.clientWidth, z = g.scrollWidth;
917
- g.scrollLeft = z - S - M;
918
+ var S = f.clientWidth, z = f.scrollWidth;
919
+ f.scrollLeft = z - S - M;
918
920
  break;
919
921
  }
920
922
  else
921
- g.scrollLeft = M;
923
+ f.scrollLeft = M;
922
924
  else
923
- g.scrollTop = M;
925
+ f.scrollTop = M;
924
926
  }
925
927
  this._callPropsCallbacks();
926
928
  }, A.componentWillUnmount = function() {
927
929
  this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
928
930
  }, A.render = function() {
929
- var a = this.props, l = a.children, c = a.className, f = a.direction, M = a.height, v = a.innerRef, g = a.innerElementType, S = a.innerTagName, z = a.itemCount, O = a.itemData, C = a.itemKey, U = C === void 0 ? Pn : C, _ = a.layout, je = a.outerElementType, Oe = a.outerTagName, Ce = a.style, ke = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = f === "horizontal" || _ === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
931
+ var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, z = a.itemCount, O = a.itemData, C = a.itemKey, U = C === void 0 ? Pn : C, _ = a.layout, je = a.outerElementType, Oe = a.outerTagName, Ce = a.style, ke = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = g === "horizontal" || _ === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
930
932
  if (z > 0)
931
933
  for (var L = Ee; L <= Le; L++)
932
934
  ie.push(H(l, {
@@ -938,7 +940,7 @@ function Yn(e) {
938
940
  }));
939
941
  var re = i(this.props, this._instanceProps);
940
942
  return H(je || Oe || "div", {
941
- className: c,
943
+ className: d,
942
944
  onScroll: be,
943
945
  ref: this._outerRefSetter,
944
946
  style: X({
@@ -948,9 +950,9 @@ function Yn(e) {
948
950
  overflow: "auto",
949
951
  WebkitOverflowScrolling: "touch",
950
952
  willChange: "transform",
951
- direction: f
953
+ direction: g
952
954
  }, Ce)
953
- }, H(g || S || "div", {
955
+ }, H(f || S || "div", {
954
956
  children: ie,
955
957
  ref: v,
956
958
  style: {
@@ -963,19 +965,19 @@ function Yn(e) {
963
965
  if (typeof this.props.onItemsRendered == "function") {
964
966
  var a = this.props.itemCount;
965
967
  if (a > 0) {
966
- var l = this._getRangeToRender(), c = l[0], f = l[1], M = l[2], v = l[3];
967
- this._callOnItemsRendered(c, f, M, v);
968
+ var l = this._getRangeToRender(), d = l[0], g = l[1], M = l[2], v = l[3];
969
+ this._callOnItemsRendered(d, g, M, v);
968
970
  }
969
971
  }
970
972
  if (typeof this.props.onScroll == "function") {
971
- var g = this.state, S = g.scrollDirection, z = g.scrollOffset, O = g.scrollUpdateWasRequested;
973
+ var f = this.state, S = f.scrollDirection, z = f.scrollOffset, O = f.scrollUpdateWasRequested;
972
974
  this._callOnScroll(S, z, O);
973
975
  }
974
976
  }, A._getRangeToRender = function() {
975
- var a = this.props, l = a.itemCount, c = a.overscanCount, f = this.state, M = f.isScrolling, v = f.scrollDirection, g = f.scrollOffset;
977
+ var a = this.props, l = a.itemCount, d = a.overscanCount, g = this.state, M = g.isScrolling, v = g.scrollDirection, f = g.scrollOffset;
976
978
  if (l === 0)
977
979
  return [0, 0, 0, 0];
978
- var S = u(this.props, g, this._instanceProps), z = I(this.props, S, g, this._instanceProps), O = !M || v === "backward" ? Math.max(1, c) : 1, C = !M || v === "forward" ? Math.max(1, c) : 1;
980
+ var S = c(this.props, f, this._instanceProps), z = I(this.props, S, f, this._instanceProps), O = !M || v === "backward" ? Math.max(1, d) : 1, C = !M || v === "forward" ? Math.max(1, d) : 1;
979
981
  return [Math.max(0, S - O), Math.max(0, Math.min(l - 1, z + C)), S, z];
980
982
  }, N;
981
983
  }(ye), t.defaultProps = {
@@ -1001,20 +1003,20 @@ var Wn = function(t, n) {
1001
1003
  var n = t.itemCount, i = t.itemSize;
1002
1004
  return i * n;
1003
1005
  },
1004
- getOffsetForIndexAndAlignment: function(t, n, i, r, m, u) {
1005
- var I = t.direction, d = t.height, h = t.itemCount, y = t.itemSize, D = t.layout, N = t.width, A = I === "horizontal" || D === "horizontal", T = A ? N : d, a = Math.max(0, h * y - T), l = Math.min(a, n * y), c = Math.max(0, n * y - T + y + u);
1006
- switch (i === "smart" && (r >= c - T && r <= l + T ? i = "auto" : i = "center"), i) {
1006
+ getOffsetForIndexAndAlignment: function(t, n, i, r, m, c) {
1007
+ var I = t.direction, u = t.height, h = t.itemCount, y = t.itemSize, D = t.layout, N = t.width, A = I === "horizontal" || D === "horizontal", T = A ? N : u, a = Math.max(0, h * y - T), l = Math.min(a, n * y), d = Math.max(0, n * y - T + y + c);
1008
+ switch (i === "smart" && (r >= d - T && r <= l + T ? i = "auto" : i = "center"), i) {
1007
1009
  case "start":
1008
1010
  return l;
1009
1011
  case "end":
1010
- return c;
1012
+ return d;
1011
1013
  case "center": {
1012
- var f = Math.round(c + (l - c) / 2);
1013
- return f < Math.ceil(T / 2) ? 0 : f > a + Math.floor(T / 2) ? a : f;
1014
+ var g = Math.round(d + (l - d) / 2);
1015
+ return g < Math.ceil(T / 2) ? 0 : g > a + Math.floor(T / 2) ? a : g;
1014
1016
  }
1015
1017
  case "auto":
1016
1018
  default:
1017
- return r >= c && r <= l ? r : r < c ? c : l;
1019
+ return r >= d && r <= l ? r : r < d ? d : l;
1018
1020
  }
1019
1021
  },
1020
1022
  getStartIndexForOffset: function(t, n) {
@@ -1022,9 +1024,9 @@ var Wn = function(t, n) {
1022
1024
  return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
1023
1025
  },
1024
1026
  getStopIndexForStartIndex: function(t, n, i) {
1025
- var r = t.direction, m = t.height, u = t.itemCount, I = t.itemSize, d = t.layout, h = t.width, y = r === "horizontal" || d === "horizontal", D = n * I, N = y ? h : m, A = Math.ceil((N + i - D) / I);
1027
+ var r = t.direction, m = t.height, c = t.itemCount, I = t.itemSize, u = t.layout, h = t.width, y = r === "horizontal" || u === "horizontal", D = n * I, N = y ? h : m, A = Math.ceil((N + i - D) / I);
1026
1028
  return Math.max(0, Math.min(
1027
- u - 1,
1029
+ c - 1,
1028
1030
  n + A - 1
1029
1031
  // -1 is because stop index is inclusive
1030
1032
  ));
@@ -1041,24 +1043,24 @@ function Fn(e) {
1041
1043
  return !(i > n || r < t);
1042
1044
  }
1043
1045
  function Bn(e) {
1044
- for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, m = e.stopIndex, u = [], I = null, d = null, h = r; h <= m; h++) {
1046
+ for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, m = e.stopIndex, c = [], I = null, u = null, h = r; h <= m; h++) {
1045
1047
  var y = t(h);
1046
- y ? d !== null && (u.push(I, d), I = d = null) : (d = h, I === null && (I = h));
1048
+ y ? u !== null && (c.push(I, u), I = u = null) : (u = h, I === null && (I = h));
1047
1049
  }
1048
- if (d !== null) {
1049
- for (var D = Math.min(Math.max(d, I + i - 1), n - 1), N = d + 1; N <= D && !t(N); N++)
1050
- d = N;
1051
- u.push(I, d);
1050
+ if (u !== null) {
1051
+ for (var D = Math.min(Math.max(u, I + i - 1), n - 1), N = u + 1; N <= D && !t(N); N++)
1052
+ u = N;
1053
+ c.push(I, u);
1052
1054
  }
1053
- if (u.length)
1054
- for (; u[1] - u[0] + 1 < i && u[0] > 0; ) {
1055
- var A = u[0] - 1;
1055
+ if (c.length)
1056
+ for (; c[1] - c[0] + 1 < i && c[0] > 0; ) {
1057
+ var A = c[0] - 1;
1056
1058
  if (!t(A))
1057
- u[0] = A;
1059
+ c[0] = A;
1058
1060
  else
1059
1061
  break;
1060
1062
  }
1061
- return u;
1063
+ return c;
1062
1064
  }
1063
1065
  var Hn = function(e, t) {
1064
1066
  if (!(e instanceof t))
@@ -1093,8 +1095,8 @@ var Hn = function(e, t) {
1093
1095
  function t() {
1094
1096
  var n, i, r, m;
1095
1097
  Hn(this, t);
1096
- for (var u = arguments.length, I = Array(u), d = 0; d < u; d++)
1097
- I[d] = arguments[d];
1098
+ for (var c = arguments.length, I = Array(c), u = 0; u < c; u++)
1099
+ I[u] = arguments[u];
1098
1100
  return m = (i = (r = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(I))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(h) {
1099
1101
  var y = h.visibleStartIndex, D = h.visibleStopIndex;
1100
1102
  r._lastRenderedStartIndex = y, r._lastRenderedStopIndex = D, r._ensureRowsLoaded(y, D);
@@ -1124,8 +1126,8 @@ var Hn = function(e, t) {
1124
1126
  }, {
1125
1127
  key: "_ensureRowsLoaded",
1126
1128
  value: function(i, r) {
1127
- var m = this.props, u = m.isItemLoaded, I = m.itemCount, d = m.minimumBatchSize, h = d === void 0 ? 10 : d, y = m.threshold, D = y === void 0 ? 15 : y, N = Bn({
1128
- isItemLoaded: u,
1129
+ var m = this.props, c = m.isItemLoaded, I = m.itemCount, u = m.minimumBatchSize, h = u === void 0 ? 10 : u, y = m.threshold, D = y === void 0 ? 15 : y, N = Bn({
1130
+ isItemLoaded: c,
1129
1131
  itemCount: I,
1130
1132
  minimumBatchSize: h,
1131
1133
  startIndex: Math.max(0, i - D),
@@ -1138,7 +1140,7 @@ var Hn = function(e, t) {
1138
1140
  }, {
1139
1141
  key: "_loadUnloadedRanges",
1140
1142
  value: function(i) {
1141
- for (var r = this, m = this.props.loadMoreItems || this.props.loadMoreRows, u = function(h) {
1143
+ for (var r = this, m = this.props.loadMoreItems || this.props.loadMoreRows, c = function(h) {
1142
1144
  var y = i[h], D = i[h + 1], N = m(y, D);
1143
1145
  N != null && N.then(function() {
1144
1146
  if (Fn({
@@ -1153,7 +1155,7 @@ var Hn = function(e, t) {
1153
1155
  }
1154
1156
  });
1155
1157
  }, I = 0; I < i.length; I += 2)
1156
- u(I);
1158
+ c(I);
1157
1159
  }
1158
1160
  }]), t;
1159
1161
  }(ye);
@@ -1196,8 +1198,8 @@ const Kn = /* @__PURE__ */ o("div")({
1196
1198
  points: i,
1197
1199
  isCurrentUser: r,
1198
1200
  openItemDetail: m,
1199
- style: u
1200
- }) => /* @__PURE__ */ p(Kn, { onClick: m, style: u, children: [
1201
+ style: c
1202
+ }) => /* @__PURE__ */ p(Kn, { onClick: m, style: c, children: [
1201
1203
  /* @__PURE__ */ s(Xn, { children: e || 0 }),
1202
1204
  /* @__PURE__ */ p(ns, { children: [
1203
1205
  t ? /* @__PURE__ */ s(es, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(ts, { children: Te(n || "") }),
@@ -1219,27 +1221,27 @@ const Kn = /* @__PURE__ */ o("div")({
1219
1221
  }) => /* @__PURE__ */ s(Re, { children: ({ width: r, height: m }) => /* @__PURE__ */ s(
1220
1222
  Jn,
1221
1223
  {
1222
- isItemLoaded: (u) => u < e.length,
1224
+ isItemLoaded: (c) => c < e.length,
1223
1225
  itemCount: e.length + 1,
1224
1226
  loadMoreItems: i,
1225
- children: ({ onItemsRendered: u, ref: I }) => /* @__PURE__ */ s(ls, { children: /* @__PURE__ */ s(
1227
+ children: ({ onItemsRendered: c, ref: I }) => /* @__PURE__ */ s(ls, { children: /* @__PURE__ */ s(
1226
1228
  Vn,
1227
1229
  {
1228
1230
  itemSize: 56,
1229
- onItemsRendered: u,
1231
+ onItemsRendered: c,
1230
1232
  ref: I,
1231
1233
  itemCount: e.length,
1232
1234
  width: r,
1233
1235
  height: m,
1234
- children: ({ index: d, style: h }) => /* @__PURE__ */ s(
1236
+ children: ({ index: u, style: h }) => /* @__PURE__ */ s(
1235
1237
  as,
1236
1238
  {
1237
1239
  style: { ...h, maxHeight: 48 },
1238
- ...e[d],
1239
- openItemDetail: () => n(e[d].userId),
1240
- isCurrentUser: !!t && t === e[d].userId
1240
+ ...e[u],
1241
+ openItemDetail: () => n(e[u].userId),
1242
+ isCurrentUser: !!t && t === e[u].userId
1241
1243
  },
1242
- e[d].userId
1244
+ e[u].userId
1243
1245
  )
1244
1246
  }
1245
1247
  ) })
@@ -1293,11 +1295,11 @@ const Kn = /* @__PURE__ */ o("div")({
1293
1295
  name: "QuestionAction",
1294
1296
  class: "q105uluy",
1295
1297
  propsAsIs: !1
1296
- }), fs = () => j, Y = /* @__PURE__ */ o(fs())({
1298
+ }), gs = () => j, Y = /* @__PURE__ */ o(gs())({
1297
1299
  name: "QuestionActionIcon",
1298
1300
  class: "q1fa0b9h",
1299
1301
  propsAsIs: !0
1300
- }), gs = () => j, Ms = /* @__PURE__ */ o(gs())({
1302
+ }), fs = () => j, Ms = /* @__PURE__ */ o(fs())({
1301
1303
  name: "QuestionTypeIcon",
1302
1304
  class: "qxlt78s",
1303
1305
  propsAsIs: !0
@@ -1325,9 +1327,9 @@ const Kn = /* @__PURE__ */ o("div")({
1325
1327
  subject: i,
1326
1328
  openForVoting: r,
1327
1329
  openQuestion: m,
1328
- status: u
1330
+ status: c
1329
1331
  }) => {
1330
- const I = Ne[t], d = As[u];
1332
+ const I = Ne[t], u = As[c];
1331
1333
  return I ? /* @__PURE__ */ p(ps, { onClick: () => m == null ? void 0 : m(e), children: [
1332
1334
  /* @__PURE__ */ p(Ns, { children: [
1333
1335
  /* @__PURE__ */ p(ms, { children: [
@@ -1339,7 +1341,7 @@ const Kn = /* @__PURE__ */ o("div")({
1339
1341
  ] }),
1340
1342
  /* @__PURE__ */ s(Is, { children: i || "" })
1341
1343
  ] }),
1342
- /* @__PURE__ */ s(hs, { children: r ? /* @__PURE__ */ s(ys, { children: "Play" }) : d })
1344
+ /* @__PURE__ */ s(hs, { children: r ? /* @__PURE__ */ s(ys, { children: "Play" }) : u })
1343
1345
  ] }) : null;
1344
1346
  }, Ds = /* @__PURE__ */ o("div")({
1345
1347
  name: "Container",