@streamlayer/react 0.33.1 → 0.33.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as I, jsx as s, Fragment as
|
|
2
|
-
import { s as a, r as
|
|
3
|
-
import G, { useRef as
|
|
1
|
+
import { jsxs as I, jsx as s, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { s as a, r as C, Q as b, o as Ye, a as Q, b as H, d as fe, E as _, c as Te, w as it, u as We, e as Y, f as te, g as rt, A as st, O as ot, P as ne, h as at, i as ge, n as lt, j as ct } from "./masters.js";
|
|
3
|
+
import G, { useRef as $, useState as L, useCallback as P, useEffect as ae, useLayoutEffect as dt, useMemo as E, createElement as ue, PureComponent as Ve, useTransition as ut } from "react";
|
|
4
4
|
const pt = /* @__PURE__ */ a("div")({
|
|
5
5
|
name: "Container",
|
|
6
6
|
class: "c1vwopgc",
|
|
@@ -9,11 +9,11 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
9
9
|
name: "QuestionTypeWrap",
|
|
10
10
|
class: "qyktpt0",
|
|
11
11
|
propsAsIs: !1
|
|
12
|
-
}), ht = () =>
|
|
12
|
+
}), ht = () => C, It = /* @__PURE__ */ a(ht())({
|
|
13
13
|
name: "QuestionTypeIcon",
|
|
14
14
|
class: "q951jdx",
|
|
15
15
|
propsAsIs: !0
|
|
16
|
-
}),
|
|
16
|
+
}), ft = /* @__PURE__ */ a("span")({
|
|
17
17
|
name: "QuestionTypeTitle",
|
|
18
18
|
class: "qss5f0e",
|
|
19
19
|
propsAsIs: !1
|
|
@@ -21,38 +21,38 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
21
21
|
name: "CloseButton",
|
|
22
22
|
class: "c1ao1jtv",
|
|
23
23
|
propsAsIs: !1
|
|
24
|
-
}), vt = () =>
|
|
24
|
+
}), vt = () => C, Mt = /* @__PURE__ */ a(vt())({
|
|
25
25
|
name: "CloseIcon",
|
|
26
26
|
class: "cvsl7l3",
|
|
27
27
|
propsAsIs: !0
|
|
28
28
|
}), Fe = ({ type: e, close: t, label: n }) => {
|
|
29
|
-
const i = e ?
|
|
29
|
+
const i = e ? Ye[e] : { label: n, iconName: void 0 };
|
|
30
30
|
return /* @__PURE__ */ I(pt, { children: [
|
|
31
31
|
/* @__PURE__ */ I(mt, { children: [
|
|
32
32
|
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
|
|
33
|
-
|
|
33
|
+
It,
|
|
34
34
|
{
|
|
35
|
-
"data-type-trivia": e ===
|
|
36
|
-
"data-type-poll": e ===
|
|
35
|
+
"data-type-trivia": e === b.TRIVIA,
|
|
36
|
+
"data-type-poll": e === b.POLL,
|
|
37
37
|
name: i.iconName
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
(i == null ? void 0 : i.label) && /* @__PURE__ */ s(
|
|
40
|
+
(i == null ? void 0 : i.label) && /* @__PURE__ */ s(ft, { children: i.label })
|
|
41
41
|
] }),
|
|
42
42
|
/* @__PURE__ */ s(gt, { onClick: t, children: /* @__PURE__ */ s(Mt, { name: "icon-cross" }) })
|
|
43
43
|
] });
|
|
44
|
-
},
|
|
44
|
+
}, Be = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), He = (e) => e ? e.toLocaleString("en-US") : "0", ye = (e) => e.toLocaleDateString("en-US", {
|
|
45
45
|
weekday: "short",
|
|
46
46
|
month: "short",
|
|
47
47
|
day: "numeric"
|
|
48
|
-
}),
|
|
48
|
+
}), Ae = (e) => e.toLocaleTimeString("en-US", {
|
|
49
49
|
hour: "2-digit",
|
|
50
50
|
minute: "2-digit"
|
|
51
|
-
}),
|
|
51
|
+
}), Ne = (e) => !isNaN(e.getTime()), Tt = /* @__PURE__ */ a("div")({
|
|
52
52
|
name: "Container",
|
|
53
53
|
class: "c1zy8a",
|
|
54
54
|
propsAsIs: !1
|
|
55
|
-
}),
|
|
55
|
+
}), yt = /* @__PURE__ */ a("div")({
|
|
56
56
|
name: "Title",
|
|
57
57
|
class: "t1vih9p5",
|
|
58
58
|
propsAsIs: !1
|
|
@@ -60,8 +60,8 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
60
60
|
name: "Indicator",
|
|
61
61
|
class: "i1fbnvpb",
|
|
62
62
|
propsAsIs: !1
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ s(
|
|
63
|
+
}), xe = ({ indicator: e, title: t }) => /* @__PURE__ */ I(Tt, { children: [
|
|
64
|
+
/* @__PURE__ */ s(yt, { children: t }),
|
|
65
65
|
/* @__PURE__ */ s(At, { children: e })
|
|
66
66
|
] }), Nt = /* @__PURE__ */ a("div")({
|
|
67
67
|
name: "Container",
|
|
@@ -75,7 +75,7 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
75
75
|
name: "Title",
|
|
76
76
|
class: "t8s05oq",
|
|
77
77
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
78
|
+
}), ie = ({ indicator: e, title: t }) => /* @__PURE__ */ I(Nt, { children: [
|
|
79
79
|
/* @__PURE__ */ s(Dt, { children: e }),
|
|
80
80
|
/* @__PURE__ */ s(St, { children: t })
|
|
81
81
|
] }), xt = /* @__PURE__ */ a("div")({
|
|
@@ -102,11 +102,11 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
102
102
|
name: "UserInfo",
|
|
103
103
|
class: "u10d4koz",
|
|
104
104
|
propsAsIs: !1
|
|
105
|
-
}),
|
|
105
|
+
}), wt = /* @__PURE__ */ a("div")({
|
|
106
106
|
name: "UserName",
|
|
107
107
|
class: "u1q6roj0",
|
|
108
108
|
propsAsIs: !1
|
|
109
|
-
}),
|
|
109
|
+
}), Ct = /* @__PURE__ */ a("div")({
|
|
110
110
|
name: "UserRating",
|
|
111
111
|
class: "ui0m425",
|
|
112
112
|
propsAsIs: !1
|
|
@@ -146,30 +146,30 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
146
146
|
name: "UserAccountBtn",
|
|
147
147
|
class: "uxareh6",
|
|
148
148
|
propsAsIs: !1
|
|
149
|
-
}), Yt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=",
|
|
149
|
+
}), Yt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Ge = ({
|
|
150
150
|
avatar: e,
|
|
151
151
|
name: t,
|
|
152
152
|
points: n,
|
|
153
153
|
friendsRank: i,
|
|
154
154
|
rank: r,
|
|
155
|
-
streak:
|
|
156
|
-
correct:
|
|
157
|
-
incorrect:
|
|
155
|
+
streak: d,
|
|
156
|
+
correct: c,
|
|
157
|
+
incorrect: l,
|
|
158
158
|
inTop: u,
|
|
159
|
-
successRate:
|
|
159
|
+
successRate: f
|
|
160
160
|
}) => /* @__PURE__ */ I(xt, { children: [
|
|
161
161
|
/* @__PURE__ */ s(zt, { children: /* @__PURE__ */ I(Ot, { children: [
|
|
162
162
|
/* @__PURE__ */ I(_t, { children: [
|
|
163
163
|
e && /* @__PURE__ */ s(kt, { alt: "avatar", src: e }),
|
|
164
|
-
!e && /* @__PURE__ */ s(qt, { children:
|
|
164
|
+
!e && /* @__PURE__ */ s(qt, { children: Be(t || "") })
|
|
165
165
|
] }),
|
|
166
166
|
/* @__PURE__ */ I(jt, { children: [
|
|
167
|
-
/* @__PURE__ */ s(
|
|
168
|
-
/* @__PURE__ */ I(
|
|
167
|
+
/* @__PURE__ */ s(wt, { children: t }),
|
|
168
|
+
/* @__PURE__ */ I(Ct, { children: [
|
|
169
169
|
/* @__PURE__ */ I($t, { children: [
|
|
170
170
|
/* @__PURE__ */ s(Et, { alt: "rank-icon", src: Yt }),
|
|
171
171
|
/* @__PURE__ */ I(Lt, { children: [
|
|
172
|
-
|
|
172
|
+
He(n),
|
|
173
173
|
/* @__PURE__ */ s(Rt, { children: "PTS" })
|
|
174
174
|
] })
|
|
175
175
|
] }),
|
|
@@ -184,26 +184,26 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
184
184
|
] }) }),
|
|
185
185
|
/* @__PURE__ */ I(bt, { children: [
|
|
186
186
|
/* @__PURE__ */ I(Ut, { children: [
|
|
187
|
-
/* @__PURE__ */ s(
|
|
188
|
-
/* @__PURE__ */ s(
|
|
187
|
+
/* @__PURE__ */ s(xe, { indicator: i || 0, title: "Friends rank" }),
|
|
188
|
+
/* @__PURE__ */ s(xe, { indicator: r || 0, title: "Global rank" })
|
|
189
189
|
] }),
|
|
190
190
|
/* @__PURE__ */ I(Pt, { children: [
|
|
191
|
-
/* @__PURE__ */ s(
|
|
192
|
-
/* @__PURE__ */ s(
|
|
193
|
-
/* @__PURE__ */ s(
|
|
194
|
-
/* @__PURE__ */ s(
|
|
191
|
+
/* @__PURE__ */ s(ie, { indicator: d || 0, title: "Win streak" }),
|
|
192
|
+
/* @__PURE__ */ s(ie, { indicator: c || 0, title: "Correct" }),
|
|
193
|
+
/* @__PURE__ */ s(ie, { indicator: l || 0, title: "Incorrect" }),
|
|
194
|
+
/* @__PURE__ */ s(ie, { indicator: `${f || 0}%`, title: "Succ. rate" })
|
|
195
195
|
] })
|
|
196
196
|
] })
|
|
197
197
|
] }), Wt = /* @__PURE__ */ a("div")({
|
|
198
198
|
name: "SponsorLogoWrap",
|
|
199
199
|
class: "s8p5v5z",
|
|
200
200
|
propsAsIs: !1
|
|
201
|
-
}),
|
|
201
|
+
}), Vt = () => C, Ft = /* @__PURE__ */ a(Vt())({
|
|
202
202
|
name: "SponsorLogo",
|
|
203
203
|
class: "s755yti",
|
|
204
204
|
propsAsIs: !0
|
|
205
205
|
}), Bt = () => /* @__PURE__ */ s(Wt, {
|
|
206
|
-
children: /* @__PURE__ */ s(
|
|
206
|
+
children: /* @__PURE__ */ s(Ft, {
|
|
207
207
|
name: "mastersLogo"
|
|
208
208
|
})
|
|
209
209
|
}), Ht = /* @__PURE__ */ a("div")({
|
|
@@ -219,14 +219,14 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
219
219
|
class: "dlaj9xp",
|
|
220
220
|
propsAsIs: !1
|
|
221
221
|
}), Jt = ({ title: e, description: t }) => /* @__PURE__ */ I(Ht, { children: [
|
|
222
|
-
/* @__PURE__ */ s(
|
|
222
|
+
/* @__PURE__ */ s(C, { name: "icon-check-circle" }),
|
|
223
223
|
/* @__PURE__ */ s(Gt, { children: e }),
|
|
224
224
|
/* @__PURE__ */ s(Zt, { children: t })
|
|
225
225
|
] }), Kt = /* @__PURE__ */ a("div")({
|
|
226
226
|
name: "Container",
|
|
227
227
|
class: "c16sbdnm",
|
|
228
228
|
propsAsIs: !1
|
|
229
|
-
}), Xt = () =>
|
|
229
|
+
}), Xt = () => C, en = /* @__PURE__ */ a(Xt())({
|
|
230
230
|
name: "IconPrediction",
|
|
231
231
|
class: "ibhorgl",
|
|
232
232
|
propsAsIs: !0
|
|
@@ -234,7 +234,7 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
234
234
|
name: "FeedbackIconWrap",
|
|
235
235
|
class: "f1g20ja7",
|
|
236
236
|
propsAsIs: !1
|
|
237
|
-
}),
|
|
237
|
+
}), re = /* @__PURE__ */ a("div")({
|
|
238
238
|
name: "FeedbackHeader",
|
|
239
239
|
class: "f455ozj",
|
|
240
240
|
propsAsIs: !1
|
|
@@ -246,7 +246,7 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
246
246
|
name: "FeedbackDescription",
|
|
247
247
|
class: "fzfk69z",
|
|
248
248
|
propsAsIs: !1
|
|
249
|
-
}),
|
|
249
|
+
}), pe = /* @__PURE__ */ a("div")({
|
|
250
250
|
name: "FeedbackText",
|
|
251
251
|
class: "fx87qaj",
|
|
252
252
|
propsAsIs: !1
|
|
@@ -256,52 +256,52 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
256
256
|
questionVoted: n,
|
|
257
257
|
questionType: i,
|
|
258
258
|
hasCorrectAnswer: r,
|
|
259
|
-
questionStatus:
|
|
260
|
-
showExpiredNotification:
|
|
261
|
-
showClosedNotificationTrivia:
|
|
259
|
+
questionStatus: d,
|
|
260
|
+
showExpiredNotification: c,
|
|
261
|
+
showClosedNotificationTrivia: l,
|
|
262
262
|
votedInCurrentRender: u,
|
|
263
|
-
votedAfterQuestionClosed:
|
|
264
|
-
enteredAnActiveQuestion:
|
|
265
|
-
marketClosed:
|
|
263
|
+
votedAfterQuestionClosed: f,
|
|
264
|
+
enteredAnActiveQuestion: M,
|
|
265
|
+
marketClosed: v
|
|
266
266
|
}) => {
|
|
267
|
-
const
|
|
268
|
-
if (!
|
|
267
|
+
const h = n && (i === b.TRIVIA || i === b.PREDICTION) && u && d !== Q.RESOLVED, A = i === b.PREDICTION && !r, S = v && i === b.PREDICTION && !n && !M || i === b.PREDICTION && f && u && M, o = h && A, m = h && r, p = i === b.PREDICTION && n && u && r, g = n && i === b.POLL && u;
|
|
268
|
+
if (!c && !l && !o && !m && !S && !g && !p)
|
|
269
269
|
return null;
|
|
270
|
-
const
|
|
270
|
+
const T = t ? "correct" : "incorrect", D = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
271
271
|
return /* @__PURE__ */ I(Kt, { "data-isPrediction": A, children: [
|
|
272
|
-
|
|
273
|
-
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(
|
|
272
|
+
c && /* @__PURE__ */ I(R, { children: [
|
|
273
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
|
|
274
274
|
/* @__PURE__ */ I("div", { children: [
|
|
275
|
-
/* @__PURE__ */ s(
|
|
276
|
-
/* @__PURE__ */ s(
|
|
275
|
+
/* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(W, { children: "Question Expired" }) }),
|
|
276
|
+
/* @__PURE__ */ s(pe, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
277
277
|
] })
|
|
278
278
|
] }),
|
|
279
|
-
|
|
280
|
-
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(
|
|
279
|
+
l && /* @__PURE__ */ I(R, { children: [
|
|
280
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
|
|
281
281
|
/* @__PURE__ */ I("div", { children: [
|
|
282
|
-
/* @__PURE__ */ s(
|
|
283
|
-
/* @__PURE__ */ s(
|
|
282
|
+
/* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(W, { children: "Question Closed" }) }),
|
|
283
|
+
/* @__PURE__ */ s(pe, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
284
284
|
] })
|
|
285
285
|
] }),
|
|
286
|
-
S && /* @__PURE__ */ I(
|
|
287
|
-
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(
|
|
286
|
+
S && /* @__PURE__ */ I(R, { children: [
|
|
287
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
|
|
288
288
|
/* @__PURE__ */ I("div", { children: [
|
|
289
|
-
/* @__PURE__ */ s(
|
|
290
|
-
/* @__PURE__ */ s(
|
|
289
|
+
/* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(W, { children: "Question Closed" }) }),
|
|
290
|
+
/* @__PURE__ */ s(pe, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
291
291
|
] })
|
|
292
292
|
] }),
|
|
293
|
-
o && /* @__PURE__ */ I(
|
|
293
|
+
o && /* @__PURE__ */ I(R, { children: [
|
|
294
294
|
/* @__PURE__ */ s(en, { name: "icon-prediction" }),
|
|
295
295
|
/* @__PURE__ */ s(W, { children: "Stay tuned to see if your prediction was correct." })
|
|
296
296
|
] }),
|
|
297
|
-
g && /* @__PURE__ */ I(
|
|
298
|
-
/* @__PURE__ */ s(Z, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(
|
|
297
|
+
g && /* @__PURE__ */ I(R, { children: [
|
|
298
|
+
/* @__PURE__ */ s(Z, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(C, { name: "correct" }) }),
|
|
299
299
|
/* @__PURE__ */ s(W, { children: "That's for answering. Please stay tuned for the next question." })
|
|
300
300
|
] }),
|
|
301
|
-
(m || p) && /* @__PURE__ */ I(
|
|
302
|
-
/* @__PURE__ */ s(Z, { "data-feedbackType":
|
|
303
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ I(
|
|
304
|
-
/* @__PURE__ */ s(tn, { "data-feedbackType":
|
|
301
|
+
(m || p) && /* @__PURE__ */ I(R, { children: [
|
|
302
|
+
/* @__PURE__ */ s(Z, { "data-feedbackType": T, children: /* @__PURE__ */ s(C, { name: T }) }),
|
|
303
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ I(re, { children: [
|
|
304
|
+
/* @__PURE__ */ s(tn, { "data-feedbackType": T, children: D == null ? void 0 : D.title }),
|
|
305
305
|
/* @__PURE__ */ s(W, { children: D == null ? void 0 : D.description })
|
|
306
306
|
] }) })
|
|
307
307
|
] })
|
|
@@ -342,15 +342,15 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
342
342
|
name: "IconWrap",
|
|
343
343
|
class: "i19tpfua",
|
|
344
344
|
propsAsIs: !1
|
|
345
|
-
}),
|
|
345
|
+
}), Ze = /* @__PURE__ */ a("img")({
|
|
346
346
|
name: "Icon",
|
|
347
347
|
class: "i1tubmma",
|
|
348
348
|
propsAsIs: !1
|
|
349
|
-
}), mn = () =>
|
|
349
|
+
}), mn = () => Ze, hn = /* @__PURE__ */ a(mn())({
|
|
350
350
|
name: "IconDefault",
|
|
351
351
|
class: "i1grrgwj",
|
|
352
352
|
propsAsIs: !0
|
|
353
|
-
}),
|
|
353
|
+
}), In = () => Ze, fn = /* @__PURE__ */ a(In())({
|
|
354
354
|
name: "IconCircle",
|
|
355
355
|
class: "ibemyq8",
|
|
356
356
|
propsAsIs: !0
|
|
@@ -363,207 +363,215 @@ const pt = /* @__PURE__ */ a("div")({
|
|
|
363
363
|
class: "i116q4vq",
|
|
364
364
|
propsAsIs: !1
|
|
365
365
|
}), Mn = /* @__PURE__ */ a("span")({
|
|
366
|
-
name: "
|
|
366
|
+
name: "Pts",
|
|
367
367
|
class: "p17ajcu2",
|
|
368
368
|
propsAsIs: !1
|
|
369
|
-
}),
|
|
369
|
+
}), Tn = /* @__PURE__ */ a("span")({
|
|
370
|
+
name: "Percentage",
|
|
371
|
+
class: "pu9kmlb",
|
|
372
|
+
propsAsIs: !1
|
|
373
|
+
}), yn = () => C, An = /* @__PURE__ */ a(yn())({
|
|
370
374
|
name: "CheckIcon",
|
|
371
|
-
class: "
|
|
375
|
+
class: "c1j2j0s0",
|
|
372
376
|
propsAsIs: !0
|
|
373
|
-
}),
|
|
377
|
+
}), ze = {
|
|
374
378
|
[H.CENTERED]: (e) => /* @__PURE__ */ s(hn, { alt: "option-icon", src: e }),
|
|
375
379
|
[H.TRANSPARENT]: (e) => /* @__PURE__ */ s(un, { children: /* @__PURE__ */ s(pn, { style: { backgroundImage: `url(${e})` } }) }),
|
|
376
|
-
[H.ROUNDED]: (e) => /* @__PURE__ */ s(
|
|
380
|
+
[H.ROUNDED]: (e) => /* @__PURE__ */ s(fn, { alt: "option-icon", src: e }),
|
|
377
381
|
[H.NONE]: () => null,
|
|
378
382
|
[H.UNSET]: () => null
|
|
379
|
-
},
|
|
380
|
-
if (e ===
|
|
383
|
+
}, Nn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
|
|
384
|
+
if (e === b.POLL && i)
|
|
381
385
|
return "correct";
|
|
382
|
-
if (e ===
|
|
386
|
+
if (e === b.PREDICTION) {
|
|
383
387
|
if (t && r)
|
|
384
388
|
return i ? n ? "correct" : "incorrect" : "unset";
|
|
385
389
|
if (i)
|
|
386
390
|
return "correct";
|
|
387
391
|
}
|
|
388
|
-
return e ===
|
|
389
|
-
},
|
|
392
|
+
return e === b.TRIVIA && r && i ? n ? "correct" : "incorrect" : "unset";
|
|
393
|
+
}, Dn = ({
|
|
390
394
|
questionType: e,
|
|
391
395
|
questionVoted: t,
|
|
392
396
|
correct: n,
|
|
393
397
|
hasCorrectAnswer: i,
|
|
394
398
|
questionStatus: r
|
|
395
|
-
}) => e ===
|
|
399
|
+
}) => e === b.TRIVIA ? t && n : e === b.PREDICTION ? t && n && i || r === Q.RESOLVED && n : !1, Sn = (e) => {
|
|
396
400
|
var t;
|
|
397
401
|
const {
|
|
398
402
|
// option props
|
|
399
403
|
id: n,
|
|
400
404
|
icon: i,
|
|
401
405
|
text: r,
|
|
402
|
-
percentageDecimal:
|
|
406
|
+
percentageDecimal: d,
|
|
407
|
+
points: c,
|
|
403
408
|
// extra props
|
|
404
409
|
onVote: l,
|
|
405
|
-
markThatVoted:
|
|
406
|
-
youSelected:
|
|
407
|
-
questionVoted:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
} = e, D = An(e), N = Nn({ questionType: S, questionVoted: h, correct: o, hasCorrectAnswer: m, questionStatus: f }), v = y && S === z.PREDICTION, x = h || v;
|
|
410
|
+
markThatVoted: u,
|
|
411
|
+
youSelected: f,
|
|
412
|
+
questionVoted: M,
|
|
413
|
+
imageMode: v,
|
|
414
|
+
answerTimeExpired: h,
|
|
415
|
+
questionStatus: A,
|
|
416
|
+
isLoading: S,
|
|
417
|
+
questionType: o,
|
|
418
|
+
correct: m,
|
|
419
|
+
hasCorrectAnswer: p,
|
|
420
|
+
votedAfterQuestionClosed: g,
|
|
421
|
+
enteredAnActiveQuestion: T,
|
|
422
|
+
marketClosed: D
|
|
423
|
+
} = e, N = Nn(e), y = Dn({ questionType: o, questionVoted: M, correct: m, hasCorrectAnswer: p, questionStatus: A }), x = D && o === b.PREDICTION, O = M || x, z = o === b.PREDICTION && !M && A !== Q.RESOLVED;
|
|
420
424
|
return /* @__PURE__ */ I(
|
|
421
425
|
ln,
|
|
422
426
|
{
|
|
423
427
|
value: n,
|
|
424
|
-
"data-selected":
|
|
425
|
-
"data-answerState":
|
|
426
|
-
disabled:
|
|
427
|
-
"data-isNotChecked":
|
|
428
|
-
onClick: (
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
), l(
|
|
428
|
+
"data-selected": f,
|
|
429
|
+
"data-answerState": N,
|
|
430
|
+
disabled: M || S || h || x && !T || x && T && g,
|
|
431
|
+
"data-isNotChecked": M && !f && N !== "incorrect",
|
|
432
|
+
onClick: (k) => {
|
|
433
|
+
u(
|
|
434
|
+
o === b.PREDICTION ? D : A === Q.RESOLVED
|
|
435
|
+
), l(k);
|
|
432
436
|
},
|
|
433
437
|
children: [
|
|
434
|
-
/* @__PURE__ */ s(cn, { "data-answerState":
|
|
438
|
+
/* @__PURE__ */ s(cn, { "data-answerState": N, style: { width: `${O ? d : 0}%` } }),
|
|
435
439
|
/* @__PURE__ */ I(dn, { children: [
|
|
436
|
-
i &&
|
|
440
|
+
i && v && ((t = ze[v]) == null ? void 0 : t.call(ze, i)),
|
|
437
441
|
/* @__PURE__ */ s(gn, { children: r }),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
/* @__PURE__ */ s(Mn, { children:
|
|
442
|
+
z && /* @__PURE__ */ I("div", { children: [
|
|
443
|
+
/* @__PURE__ */ s(fe, { value: c }),
|
|
444
|
+
/* @__PURE__ */ s(Mn, { children: "pts" })
|
|
445
|
+
] }),
|
|
446
|
+
O && /* @__PURE__ */ I(vn, { children: [
|
|
447
|
+
y && /* @__PURE__ */ s(An, { name: "selected" }),
|
|
448
|
+
/* @__PURE__ */ s(Tn, { children: /* @__PURE__ */ s(fe, { value: d, suffix: "%" }) })
|
|
441
449
|
] })
|
|
442
450
|
] })
|
|
443
451
|
]
|
|
444
452
|
}
|
|
445
453
|
);
|
|
446
454
|
};
|
|
447
|
-
var
|
|
448
|
-
let [
|
|
455
|
+
var be = typeof window > "u" ? ae : dt, xn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: i = 0, onComplete: r, onUpdate: d }) => {
|
|
456
|
+
let [c, l] = L(n), u = $(0), f = $(n), M = $(n * -1e3), v = $(null), h = $(null), A = $(null), S = (p) => {
|
|
449
457
|
let g = p / 1e3;
|
|
450
|
-
if (
|
|
451
|
-
|
|
458
|
+
if (h.current === null) {
|
|
459
|
+
h.current = g, v.current = requestAnimationFrame(S);
|
|
452
460
|
return;
|
|
453
461
|
}
|
|
454
|
-
let
|
|
455
|
-
|
|
456
|
-
let N =
|
|
457
|
-
|
|
462
|
+
let T = g - h.current, D = u.current + T;
|
|
463
|
+
h.current = g, u.current = D;
|
|
464
|
+
let N = f.current + (i === 0 ? D : (D / i | 0) * i), y = f.current + D, x = typeof t == "number" && y >= t;
|
|
465
|
+
l(x ? t : N), x || (v.current = requestAnimationFrame(S));
|
|
458
466
|
}, o = () => {
|
|
459
|
-
|
|
460
|
-
}, m =
|
|
467
|
+
v.current && cancelAnimationFrame(v.current), A.current && clearTimeout(A.current), h.current = null;
|
|
468
|
+
}, m = P((p) => {
|
|
461
469
|
o(), u.current = 0;
|
|
462
470
|
let g = typeof p == "number" ? p : n;
|
|
463
|
-
|
|
471
|
+
f.current = g, l(g), e && (v.current = requestAnimationFrame(S));
|
|
464
472
|
}, [e, n]);
|
|
465
|
-
return
|
|
466
|
-
if (
|
|
467
|
-
|
|
468
|
-
let { shouldRepeat: p = !1, delay: g = 0, newStartAt:
|
|
469
|
-
p && (A.current = setTimeout(() => m(
|
|
473
|
+
return be(() => {
|
|
474
|
+
if (d == null || d(c), t && c >= t) {
|
|
475
|
+
M.current += t * 1e3;
|
|
476
|
+
let { shouldRepeat: p = !1, delay: g = 0, newStartAt: T } = (r == null ? void 0 : r(M.current / 1e3)) || {};
|
|
477
|
+
p && (A.current = setTimeout(() => m(T), g * 1e3));
|
|
470
478
|
}
|
|
471
|
-
}, [
|
|
472
|
-
},
|
|
473
|
-
let i = e / 2, r = t / 2,
|
|
474
|
-
return { path: `m ${i},${r} a ${
|
|
475
|
-
},
|
|
479
|
+
}, [c, t]), be(() => (e && (v.current = requestAnimationFrame(S)), o), [e, t, i]), { elapsedTime: c, reset: m };
|
|
480
|
+
}, zn = (e, t, n) => {
|
|
481
|
+
let i = e / 2, r = t / 2, d = i - r, c = 2 * d, l = n === "clockwise" ? "1,0" : "0,1", u = 2 * Math.PI * d;
|
|
482
|
+
return { path: `m ${i},${r} a ${d},${d} 0 ${l} 0,${c} a ${d},${d} 0 ${l} 0,-${c}`, pathLength: u };
|
|
483
|
+
}, Oe = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, bn = (e) => ({ position: "relative", width: e, height: e }), On = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Je = (e, t, n, i, r) => {
|
|
476
484
|
if (i === 0)
|
|
477
485
|
return t;
|
|
478
|
-
let
|
|
479
|
-
return t + n *
|
|
480
|
-
},
|
|
486
|
+
let d = (r ? i - e : e) / i;
|
|
487
|
+
return t + n * d;
|
|
488
|
+
}, ke = (e) => {
|
|
481
489
|
var t, n;
|
|
482
|
-
return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i, r,
|
|
483
|
-
},
|
|
490
|
+
return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i, r, d, c) => `#${r}${r}${d}${d}${c}${c}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((i) => parseInt(i, 16))) != null ? n : [];
|
|
491
|
+
}, kn = (e, t) => {
|
|
484
492
|
var n;
|
|
485
|
-
let { colors: i, colorsTime: r, isSmoothColorTransition:
|
|
493
|
+
let { colors: i, colorsTime: r, isSmoothColorTransition: d = !0 } = e;
|
|
486
494
|
if (typeof i == "string")
|
|
487
495
|
return i;
|
|
488
|
-
let
|
|
489
|
-
if (!r ||
|
|
496
|
+
let c = (n = r == null ? void 0 : r.findIndex((h, A) => h >= t && t >= r[A + 1])) != null ? n : -1;
|
|
497
|
+
if (!r || c === -1)
|
|
490
498
|
return i[0];
|
|
491
|
-
if (!
|
|
492
|
-
return i[
|
|
493
|
-
let
|
|
494
|
-
return `rgb(${
|
|
495
|
-
},
|
|
496
|
-
let { duration: t, initialRemainingTime: n, updateInterval: i, size: r = 180, strokeWidth:
|
|
497
|
-
let
|
|
498
|
-
|
|
499
|
-
} : void 0, onComplete: typeof
|
|
500
|
-
var
|
|
501
|
-
let { shouldRepeat: D, delay: N, newInitialRemainingTime:
|
|
499
|
+
if (!d)
|
|
500
|
+
return i[c];
|
|
501
|
+
let l = r[c] - t, u = r[c] - r[c + 1], f = ke(i[c]), M = ke(i[c + 1]), v = !!e.isGrowing;
|
|
502
|
+
return `rgb(${f.map((h, A) => Je(l, h, M[A] - h, u, v) | 0).join(",")})`;
|
|
503
|
+
}, jn = (e) => {
|
|
504
|
+
let { duration: t, initialRemainingTime: n, updateInterval: i, size: r = 180, strokeWidth: d = 12, trailStrokeWidth: c, isPlaying: l = !1, isGrowing: u = !1, rotation: f = "clockwise", onComplete: M, onUpdate: v } = e, h = $(), A = Math.max(d, c ?? 0), { path: S, pathLength: o } = zn(r, A, f), { elapsedTime: m } = xn({ isPlaying: l, duration: t, startAt: Oe(t, n), updateInterval: i, onUpdate: typeof v == "function" ? (g) => {
|
|
505
|
+
let T = Math.ceil(t - g);
|
|
506
|
+
T !== h.current && (h.current = T, v(T));
|
|
507
|
+
} : void 0, onComplete: typeof M == "function" ? (g) => {
|
|
508
|
+
var T;
|
|
509
|
+
let { shouldRepeat: D, delay: N, newInitialRemainingTime: y } = (T = M(g)) != null ? T : {};
|
|
502
510
|
if (D)
|
|
503
|
-
return { shouldRepeat: D, delay: N, newStartAt:
|
|
511
|
+
return { shouldRepeat: D, delay: N, newStartAt: Oe(t, y) };
|
|
504
512
|
} : void 0 }), p = t - m;
|
|
505
|
-
return { elapsedTime: m, path: S, pathLength: o, remainingTime: Math.ceil(p), rotation:
|
|
506
|
-
},
|
|
507
|
-
let { children: t, strokeLinecap: n, trailColor: i, trailStrokeWidth: r } = e, { path:
|
|
508
|
-
return G.createElement("div", { style:
|
|
513
|
+
return { elapsedTime: m, path: S, pathLength: o, remainingTime: Math.ceil(p), rotation: f, size: r, stroke: kn(e, p), strokeDashoffset: Je(m, 0, o, t, u), strokeWidth: d };
|
|
514
|
+
}, Ke = (e) => {
|
|
515
|
+
let { children: t, strokeLinecap: n, trailColor: i, trailStrokeWidth: r } = e, { path: d, pathLength: c, stroke: l, strokeDashoffset: u, remainingTime: f, elapsedTime: M, size: v, strokeWidth: h } = jn(e);
|
|
516
|
+
return G.createElement("div", { style: bn(v) }, G.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, G.createElement("path", { d, fill: "none", stroke: i ?? "#d9d9d9", strokeWidth: r ?? h }), G.createElement("path", { d, fill: "none", stroke: l, strokeLinecap: n ?? "round", strokeWidth: h, strokeDasharray: c, strokeDashoffset: u })), typeof t == "function" && G.createElement("div", { style: On }, t({ remainingTime: f, elapsedTime: M, color: l })));
|
|
509
517
|
};
|
|
510
|
-
|
|
511
|
-
const
|
|
518
|
+
Ke.displayName = "CountdownCircleTimer";
|
|
519
|
+
const wn = [_.PRIMARY_GREEN1, _.SECONDARY_RED1, _.SECONDARY_RED1, _.NEUTRALS_GRAY3], Cn = [10, 10, 1, 0], En = /* @__PURE__ */ a("div")({
|
|
512
520
|
name: "RemainingTime",
|
|
513
521
|
class: "r165427",
|
|
514
522
|
propsAsIs: !1
|
|
515
|
-
}),
|
|
523
|
+
}), $n = _.SECONDARY_GREEN6, je = _.SECONDARY_RED3, Ln = _.NEUTRALS_GRAY3, Rn = ({
|
|
516
524
|
isPlaying: e = !0,
|
|
517
525
|
duration: t = 30,
|
|
518
526
|
onTimerExpired: n
|
|
519
527
|
}) => {
|
|
520
|
-
const [i, r] =
|
|
528
|
+
const [i, r] = L(t > 10 ? $n : je), d = ({
|
|
521
529
|
remainingTime: u
|
|
522
|
-
}) => /* @__PURE__ */ s(
|
|
530
|
+
}) => /* @__PURE__ */ s(En, {
|
|
523
531
|
children: u
|
|
524
|
-
}),
|
|
525
|
-
n == null || n(), r(
|
|
526
|
-
}, [n, r]),
|
|
527
|
-
u === 10 && r(
|
|
532
|
+
}), c = P(() => {
|
|
533
|
+
n == null || n(), r(Ln);
|
|
534
|
+
}, [n, r]), l = P((u) => {
|
|
535
|
+
u === 10 && r(je);
|
|
528
536
|
}, [r]);
|
|
529
|
-
return /* @__PURE__ */ s(
|
|
537
|
+
return /* @__PURE__ */ s(Ke, {
|
|
530
538
|
isPlaying: e,
|
|
531
539
|
duration: t,
|
|
532
|
-
colors:
|
|
540
|
+
colors: wn,
|
|
533
541
|
colorsTime: Cn,
|
|
534
542
|
size: 32,
|
|
535
543
|
strokeWidth: 2,
|
|
536
544
|
trailStrokeWidth: 2,
|
|
537
545
|
trailColor: i,
|
|
538
|
-
onComplete:
|
|
539
|
-
onUpdate:
|
|
540
|
-
children:
|
|
546
|
+
onComplete: c,
|
|
547
|
+
onUpdate: l,
|
|
548
|
+
children: d
|
|
541
549
|
});
|
|
542
|
-
},
|
|
550
|
+
}, Qn = /* @__PURE__ */ a("div")({
|
|
543
551
|
name: "WinBarContainer",
|
|
544
552
|
class: "wie6cqo",
|
|
545
553
|
propsAsIs: !1
|
|
546
|
-
}),
|
|
554
|
+
}), Un = /* @__PURE__ */ a("div")({
|
|
547
555
|
name: "Content",
|
|
548
556
|
class: "cgizw4u",
|
|
549
557
|
propsAsIs: !1
|
|
550
|
-
}),
|
|
558
|
+
}), Pn = /* @__PURE__ */ a("div")({
|
|
551
559
|
name: "Title",
|
|
552
560
|
class: "t1l3ucjp",
|
|
553
561
|
propsAsIs: !1
|
|
554
|
-
}),
|
|
562
|
+
}), qn = () => C, _n = /* @__PURE__ */ a(qn())({
|
|
555
563
|
name: "WinIcon",
|
|
556
564
|
class: "wx7j799",
|
|
557
565
|
propsAsIs: !0
|
|
558
|
-
}),
|
|
566
|
+
}), Yn = /* @__PURE__ */ a("div")({
|
|
559
567
|
name: "Points",
|
|
560
568
|
class: "p4lwuj0",
|
|
561
569
|
propsAsIs: !1
|
|
562
|
-
}),
|
|
570
|
+
}), Wn = /* @__PURE__ */ a("span")({
|
|
563
571
|
name: "PointsCount",
|
|
564
572
|
class: "po9i64o",
|
|
565
573
|
propsAsIs: !1
|
|
566
|
-
}),
|
|
574
|
+
}), Vn = /* @__PURE__ */ a("span")({
|
|
567
575
|
name: "PointsUnits",
|
|
568
576
|
class: "pe5g05h",
|
|
569
577
|
propsAsIs: !1
|
|
@@ -573,102 +581,112 @@ const jn = [_.PRIMARY_GREEN1, _.SECONDARY_RED1, _.SECONDARY_RED1, _.NEUTRALS_GRA
|
|
|
573
581
|
isPlayingTimer: n,
|
|
574
582
|
isTimer: i,
|
|
575
583
|
questionType: r,
|
|
576
|
-
timerDuration:
|
|
577
|
-
onTimerExpired:
|
|
578
|
-
}) => /* @__PURE__ */ I(
|
|
579
|
-
/* @__PURE__ */ I(
|
|
580
|
-
e && /* @__PURE__ */ s(
|
|
581
|
-
t !== void 0 && r !==
|
|
582
|
-
/* @__PURE__ */ s(
|
|
583
|
-
/* @__PURE__ */ I(
|
|
584
|
-
/* @__PURE__ */ s(
|
|
585
|
-
/* @__PURE__ */ s(
|
|
584
|
+
timerDuration: d,
|
|
585
|
+
onTimerExpired: c
|
|
586
|
+
}) => /* @__PURE__ */ I(Qn, { "data-centeredItems": r === b.PREDICTION, children: [
|
|
587
|
+
/* @__PURE__ */ I(Un, { children: [
|
|
588
|
+
e && /* @__PURE__ */ s(Pn, { children: e }),
|
|
589
|
+
t !== void 0 && r !== b.POLL && /* @__PURE__ */ I(R, { children: [
|
|
590
|
+
/* @__PURE__ */ s(_n, { name: "icon-trophy" }),
|
|
591
|
+
/* @__PURE__ */ I(Yn, { children: [
|
|
592
|
+
/* @__PURE__ */ s(Wn, { children: /* @__PURE__ */ s(fe, { value: t }) }),
|
|
593
|
+
/* @__PURE__ */ s(Vn, { children: "PTS" })
|
|
586
594
|
] })
|
|
587
595
|
] })
|
|
588
596
|
] }),
|
|
589
|
-
i && /* @__PURE__ */ s(
|
|
590
|
-
] }),
|
|
591
|
-
var r,
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
|
|
597
|
+
i && r !== b.PREDICTION && /* @__PURE__ */ s(Rn, { isPlaying: n, onTimerExpired: c, duration: d })
|
|
598
|
+
] }), Bn = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
|
|
599
|
+
var r, d;
|
|
600
|
+
const c = e.subject, l = e.type, u = e.status, f = (r = e.options) == null ? void 0 : r.options, M = e.marketClosed, [v, h] = L(!1), [A, S] = L(!1), [o, m] = L(!0), [p, g] = L(!1), [T, D] = L(""), N = e == null ? void 0 : e.id;
|
|
601
|
+
ae(() => {
|
|
602
|
+
l === b.PREDICTION ? M && m(!1) : u === Q.RESOLVED && m(!1);
|
|
595
603
|
}, []);
|
|
596
|
-
const
|
|
597
|
-
S(
|
|
598
|
-
}, []), x =
|
|
599
|
-
async (
|
|
604
|
+
const y = P((j) => {
|
|
605
|
+
S(j), h(!0);
|
|
606
|
+
}, []), x = P(
|
|
607
|
+
async (j) => {
|
|
600
608
|
if (N) {
|
|
601
|
-
const
|
|
602
|
-
D(
|
|
609
|
+
const q = j.currentTarget.value;
|
|
610
|
+
D(q), await n(N, q);
|
|
603
611
|
}
|
|
604
612
|
},
|
|
605
613
|
[N, D, n]
|
|
606
|
-
), O =
|
|
614
|
+
), O = P(() => {
|
|
607
615
|
g(!0), setTimeout(i, 3e3);
|
|
608
|
-
}, [i]),
|
|
609
|
-
() => e == null ? void 0 : e.answers.find((
|
|
616
|
+
}, [i]), z = E(
|
|
617
|
+
() => e == null ? void 0 : e.answers.find((j) => j.youVoted === !0),
|
|
610
618
|
[e]
|
|
611
|
-
),
|
|
612
|
-
() => !!(e != null && e.answers.find((
|
|
619
|
+
), k = E(
|
|
620
|
+
() => !!(e != null && e.answers.find((j) => j.correct === !0)),
|
|
613
621
|
[e]
|
|
614
|
-
),
|
|
615
|
-
() => e == null ? void 0 : e.answers.find((
|
|
622
|
+
), w = E(
|
|
623
|
+
() => e == null ? void 0 : e.answers.find((j) => j.correct === !0),
|
|
616
624
|
[e]
|
|
617
|
-
),
|
|
618
|
-
var
|
|
625
|
+
), le = E(() => e ? e.answers.map((j) => {
|
|
626
|
+
var q;
|
|
619
627
|
return {
|
|
620
|
-
...
|
|
621
|
-
questionVoted: !!
|
|
622
|
-
youSelected:
|
|
628
|
+
...j,
|
|
629
|
+
questionVoted: !!z,
|
|
630
|
+
youSelected: T === j.id,
|
|
623
631
|
isLoading: t,
|
|
624
|
-
hasCorrectAnswer:
|
|
632
|
+
hasCorrectAnswer: k,
|
|
625
633
|
questionType: e.type,
|
|
626
634
|
answerTimeExpired: p,
|
|
627
635
|
questionStatus: u,
|
|
628
|
-
imageMode: (
|
|
636
|
+
imageMode: (q = e.appearance) == null ? void 0 : q.images,
|
|
629
637
|
onVote: x
|
|
630
638
|
};
|
|
631
639
|
}) : [], [
|
|
632
|
-
|
|
640
|
+
k,
|
|
633
641
|
p,
|
|
634
642
|
t,
|
|
635
643
|
e,
|
|
636
|
-
|
|
644
|
+
z,
|
|
637
645
|
u,
|
|
638
646
|
x,
|
|
639
|
-
|
|
640
|
-
]),
|
|
641
|
-
if (!
|
|
642
|
-
return
|
|
643
|
-
|
|
644
|
-
|
|
647
|
+
T
|
|
648
|
+
]), ce = f && (f.case === "trivia" || f.case === "prediction") ? f.value : void 0, U = u === Q.RESOLVED && l === b.TRIVIA && !z && !o, K = l === b.TRIVIA && A && v && o, X = E(() => l === b.PREDICTION ? !!(z && !k || z && k && w != null && w.youVoted) : !0, [l, z, k, w]), ee = E(() => {
|
|
649
|
+
if (l === b.PREDICTION && z && (!k || k && w != null && w.youVoted))
|
|
650
|
+
return z.points;
|
|
651
|
+
if (!(U || p))
|
|
652
|
+
return u === Q.RESOLVED ? 0 : z ? z.correct ? z.points : 0 : w == null ? void 0 : w.points;
|
|
653
|
+
}, [
|
|
654
|
+
p,
|
|
655
|
+
z,
|
|
656
|
+
w,
|
|
657
|
+
u,
|
|
658
|
+
U,
|
|
659
|
+
l,
|
|
660
|
+
k
|
|
661
|
+
]), F = E(() => l === b.PREDICTION && z ? k ? k && w != null && w.youVoted ? "You won" : "" : "To win" : U || p ? "Time expired" : l === b.POLL ? "Time remaining" : z ? "You won" : "To win", [p, l, z, U, k, w]), de = z || U || K || l === b.TRIVIA && u === Q.RESOLVED && o;
|
|
662
|
+
return /* @__PURE__ */ s(Te, { "data-question-header": "true", children: /* @__PURE__ */ s(rn, { children: /* @__PURE__ */ I(sn, { children: [
|
|
645
663
|
/* @__PURE__ */ s(
|
|
646
664
|
nn,
|
|
647
665
|
{
|
|
648
|
-
feedbackMessages:
|
|
649
|
-
questionVoted: !!
|
|
650
|
-
questionVotedCorrectly:
|
|
651
|
-
questionType:
|
|
652
|
-
hasCorrectAnswer:
|
|
666
|
+
feedbackMessages: ce,
|
|
667
|
+
questionVoted: !!z,
|
|
668
|
+
questionVotedCorrectly: z == null ? void 0 : z.correct,
|
|
669
|
+
questionType: l,
|
|
670
|
+
hasCorrectAnswer: k,
|
|
653
671
|
questionStatus: u,
|
|
654
|
-
showExpiredNotification:
|
|
672
|
+
showExpiredNotification: U,
|
|
655
673
|
showClosedNotificationTrivia: K,
|
|
656
|
-
votedInCurrentRender:
|
|
674
|
+
votedInCurrentRender: v,
|
|
657
675
|
votedAfterQuestionClosed: A,
|
|
658
676
|
enteredAnActiveQuestion: o,
|
|
659
|
-
marketClosed:
|
|
677
|
+
marketClosed: M
|
|
660
678
|
}
|
|
661
679
|
),
|
|
662
|
-
|
|
680
|
+
X && /* @__PURE__ */ s(
|
|
663
681
|
Fn,
|
|
664
682
|
{
|
|
665
|
-
title:
|
|
666
|
-
points:
|
|
683
|
+
title: F,
|
|
684
|
+
points: ee,
|
|
667
685
|
onTimerExpired: O,
|
|
668
686
|
questionType: e.type,
|
|
669
687
|
isTimer: !t,
|
|
670
|
-
isPlayingTimer: !
|
|
671
|
-
timerDuration:
|
|
688
|
+
isPlayingTimer: !z,
|
|
689
|
+
timerDuration: de ? 0 : Number(((d = e == null ? void 0 : e.appearance) == null ? void 0 : d.autoHideInterval) || "30")
|
|
672
690
|
}
|
|
673
691
|
),
|
|
674
692
|
p ? /* @__PURE__ */ s(
|
|
@@ -677,139 +695,139 @@ const jn = [_.PRIMARY_GREEN1, _.SECONDARY_RED1, _.SECONDARY_RED1, _.NEUTRALS_GRA
|
|
|
677
695
|
title: "More to come...",
|
|
678
696
|
description: "Watch for additional enhanced stream interactive experience."
|
|
679
697
|
}
|
|
680
|
-
) : /* @__PURE__ */ I(
|
|
681
|
-
/* @__PURE__ */ s(on, { "data-
|
|
682
|
-
/* @__PURE__ */ s(an, { children:
|
|
683
|
-
|
|
698
|
+
) : /* @__PURE__ */ I(R, { children: [
|
|
699
|
+
/* @__PURE__ */ s(on, { "data-withoutWinBar": !X, children: c }),
|
|
700
|
+
/* @__PURE__ */ s(an, { children: le.map((j) => /* @__PURE__ */ s(
|
|
701
|
+
Sn,
|
|
684
702
|
{
|
|
685
|
-
...
|
|
686
|
-
markThatVoted:
|
|
703
|
+
...j,
|
|
704
|
+
markThatVoted: y,
|
|
687
705
|
votedAfterQuestionClosed: A,
|
|
688
706
|
enteredAnActiveQuestion: o,
|
|
689
|
-
marketClosed:
|
|
707
|
+
marketClosed: M
|
|
690
708
|
},
|
|
691
|
-
|
|
709
|
+
j.id
|
|
692
710
|
)) })
|
|
693
711
|
] })
|
|
694
712
|
] }) }) });
|
|
695
|
-
},
|
|
713
|
+
}, Hn = /* @__PURE__ */ a("div")({
|
|
696
714
|
name: "Container",
|
|
697
715
|
class: "cgn5uen",
|
|
698
716
|
propsAsIs: !1
|
|
699
|
-
}),
|
|
717
|
+
}), Gn = /* @__PURE__ */ a("div")({
|
|
700
718
|
name: "Content",
|
|
701
719
|
class: "c1px8nt6",
|
|
702
720
|
propsAsIs: !1
|
|
703
|
-
}),
|
|
721
|
+
}), Zn = /* @__PURE__ */ a("h3")({
|
|
704
722
|
name: "Title",
|
|
705
723
|
class: "t5et2jt",
|
|
706
724
|
propsAsIs: !1
|
|
707
|
-
}),
|
|
725
|
+
}), Jn = /* @__PURE__ */ a("div")({
|
|
708
726
|
name: "Description",
|
|
709
727
|
class: "d1i2kpk2",
|
|
710
728
|
propsAsIs: !1
|
|
711
|
-
}),
|
|
729
|
+
}), Kn = /* @__PURE__ */ a("div")({
|
|
712
730
|
name: "DateWrap",
|
|
713
731
|
class: "dd3lh3p",
|
|
714
732
|
propsAsIs: !1
|
|
715
|
-
}),
|
|
733
|
+
}), Xn = /* @__PURE__ */ a("img")({
|
|
716
734
|
name: "Image",
|
|
717
735
|
class: "i1gfjeu5",
|
|
718
736
|
propsAsIs: !1
|
|
719
|
-
}),
|
|
737
|
+
}), Xe = ({
|
|
720
738
|
created: e,
|
|
721
739
|
image: t,
|
|
722
740
|
title: n,
|
|
723
741
|
isPickHistory: i,
|
|
724
742
|
instantView: r
|
|
725
743
|
}) => {
|
|
726
|
-
const
|
|
744
|
+
const d = E(() => {
|
|
727
745
|
if (e) {
|
|
728
|
-
const
|
|
729
|
-
if (
|
|
746
|
+
const l = new Date(e);
|
|
747
|
+
if (Ne(l))
|
|
730
748
|
return {
|
|
731
|
-
date:
|
|
732
|
-
time:
|
|
749
|
+
date: ye(l),
|
|
750
|
+
time: Ae(l)
|
|
733
751
|
};
|
|
734
752
|
}
|
|
735
753
|
return null;
|
|
736
|
-
}, [e]),
|
|
737
|
-
return /* @__PURE__ */ I(
|
|
738
|
-
|
|
739
|
-
|
|
754
|
+
}, [e]), c = (r == null ? void 0 : r.image) || t;
|
|
755
|
+
return /* @__PURE__ */ I(Hn, { children: [
|
|
756
|
+
d && /* @__PURE__ */ I(Kn, { children: [
|
|
757
|
+
d.date,
|
|
740
758
|
" · ",
|
|
741
|
-
|
|
759
|
+
d.time
|
|
742
760
|
] }),
|
|
743
761
|
(r == null ? void 0 : r.video) && /* @__PURE__ */ s(it, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
744
|
-
|
|
745
|
-
/* @__PURE__ */ I(
|
|
746
|
-
/* @__PURE__ */ s(
|
|
747
|
-
!i && /* @__PURE__ */ s(
|
|
762
|
+
c && !(r != null && r.video) && /* @__PURE__ */ s(Xn, { src: c }),
|
|
763
|
+
/* @__PURE__ */ I(Gn, { children: [
|
|
764
|
+
/* @__PURE__ */ s(Zn, { children: i ? n : r == null ? void 0 : r.heading }),
|
|
765
|
+
!i && /* @__PURE__ */ s(Jn, { children: r == null ? void 0 : r.body })
|
|
748
766
|
] })
|
|
749
767
|
] });
|
|
750
|
-
},
|
|
768
|
+
}, ei = /* @__PURE__ */ a("div")({
|
|
751
769
|
name: "Container",
|
|
752
770
|
class: "c1euiow",
|
|
753
771
|
propsAsIs: !1
|
|
754
|
-
}),
|
|
772
|
+
}), ti = /* @__PURE__ */ a("a")({
|
|
755
773
|
name: "WebLinkBtn",
|
|
756
774
|
class: "w19zie3h",
|
|
757
775
|
propsAsIs: !1
|
|
758
|
-
}),
|
|
759
|
-
/* @__PURE__ */ s(
|
|
760
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ I(
|
|
776
|
+
}), ni = ({ instantView: e, ...t }) => /* @__PURE__ */ I(ei, { children: [
|
|
777
|
+
/* @__PURE__ */ s(Xe, { instantView: e, ...t }),
|
|
778
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ I(ti, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
761
779
|
e == null ? void 0 : e.webLink.label,
|
|
762
|
-
/* @__PURE__ */ s(
|
|
780
|
+
/* @__PURE__ */ s(C, { name: "icon-external-link" })
|
|
763
781
|
] })
|
|
764
|
-
] }),
|
|
782
|
+
] }), ii = /* @__PURE__ */ a("div")({
|
|
765
783
|
name: "Container",
|
|
766
784
|
class: "c1dcxmvf",
|
|
767
785
|
propsAsIs: !1
|
|
768
|
-
}),
|
|
786
|
+
}), ri = /* @__PURE__ */ a("div")({
|
|
769
787
|
name: "DateTime",
|
|
770
788
|
class: "db4q22c",
|
|
771
789
|
propsAsIs: !1
|
|
772
|
-
}),
|
|
790
|
+
}), si = /* @__PURE__ */ a("blockquote")({
|
|
773
791
|
name: "Quote",
|
|
774
792
|
class: "q111mmic",
|
|
775
793
|
propsAsIs: !1
|
|
776
|
-
}),
|
|
777
|
-
const n =
|
|
794
|
+
}), oi = ({ created: e, ...t }) => {
|
|
795
|
+
const n = E(() => {
|
|
778
796
|
if (e) {
|
|
779
797
|
const i = new Date(e);
|
|
780
|
-
if (
|
|
798
|
+
if (Ne(i))
|
|
781
799
|
return {
|
|
782
|
-
date:
|
|
783
|
-
time:
|
|
800
|
+
date: ye(i),
|
|
801
|
+
time: Ae(i)
|
|
784
802
|
};
|
|
785
803
|
}
|
|
786
804
|
return null;
|
|
787
805
|
}, [e]);
|
|
788
|
-
return /* @__PURE__ */ I(
|
|
789
|
-
n && /* @__PURE__ */ I(
|
|
806
|
+
return /* @__PURE__ */ I(ii, { children: [
|
|
807
|
+
n && /* @__PURE__ */ I(ri, { children: [
|
|
790
808
|
n.date,
|
|
791
809
|
" · ",
|
|
792
810
|
n.time
|
|
793
811
|
] }),
|
|
794
|
-
t.title && /* @__PURE__ */ s(
|
|
795
|
-
/* @__PURE__ */ s(
|
|
812
|
+
t.title && /* @__PURE__ */ s(si, { children: t.title }),
|
|
813
|
+
/* @__PURE__ */ s(We, { ...t })
|
|
796
814
|
] });
|
|
797
|
-
},
|
|
815
|
+
}, ai = /* @__PURE__ */ a("div")({
|
|
798
816
|
name: "QuestionContainer",
|
|
799
817
|
class: "qdri6g3",
|
|
800
818
|
propsAsIs: !1
|
|
801
|
-
}),
|
|
819
|
+
}), li = ({
|
|
802
820
|
openedQuestion: e
|
|
803
821
|
}) => {
|
|
804
822
|
var t, n;
|
|
805
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(
|
|
823
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(ni, {
|
|
806
824
|
created: e.attributes.created,
|
|
807
825
|
...e.attributes.attributes.value
|
|
808
|
-
}) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(
|
|
826
|
+
}) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(oi, {
|
|
809
827
|
created: e.attributes.created,
|
|
810
828
|
...e.attributes.attributes.value
|
|
811
829
|
}) : null;
|
|
812
|
-
},
|
|
830
|
+
}, ci = ({
|
|
813
831
|
extendedQuestion: e,
|
|
814
832
|
vote: t,
|
|
815
833
|
close: n
|
|
@@ -818,13 +836,13 @@ const jn = [_.PRIMARY_GREEN1, _.SECONDARY_RED1, _.SECONDARY_RED1, _.NEUTRALS_GRA
|
|
|
818
836
|
loading: i,
|
|
819
837
|
data: r
|
|
820
838
|
} = e;
|
|
821
|
-
return r ? /* @__PURE__ */ s(
|
|
839
|
+
return r ? /* @__PURE__ */ s(Bn, {
|
|
822
840
|
vote: t,
|
|
823
841
|
close: n,
|
|
824
842
|
openedQuestion: r,
|
|
825
843
|
isLoading: !!i
|
|
826
844
|
}) : null;
|
|
827
|
-
},
|
|
845
|
+
}, di = ({
|
|
828
846
|
gamification: e
|
|
829
847
|
}) => {
|
|
830
848
|
var t;
|
|
@@ -832,132 +850,132 @@ const jn = [_.PRIMARY_GREEN1, _.SECONDARY_RED1, _.SECONDARY_RED1, _.NEUTRALS_GRA
|
|
|
832
850
|
if (!n)
|
|
833
851
|
return null;
|
|
834
852
|
const r = n.type;
|
|
835
|
-
return /* @__PURE__ */ I(
|
|
853
|
+
return /* @__PURE__ */ I(ai, {
|
|
836
854
|
children: [/* @__PURE__ */ s(Fe, {
|
|
837
855
|
close: e.closeQuestion,
|
|
838
|
-
type: ((t = n.attributes) == null ? void 0 : t.type) ||
|
|
839
|
-
}), r === "question" && /* @__PURE__ */ s(
|
|
856
|
+
type: ((t = n.attributes) == null ? void 0 : t.type) || b.UNSET
|
|
857
|
+
}), r === "question" && /* @__PURE__ */ s(ci, {
|
|
840
858
|
vote: e.submitAnswer,
|
|
841
859
|
close: e.closeQuestion,
|
|
842
860
|
extendedQuestion: i
|
|
843
|
-
}), r !== "question" && /* @__PURE__ */ s(
|
|
861
|
+
}), r !== "question" && /* @__PURE__ */ s(li, {
|
|
844
862
|
openedQuestion: n
|
|
845
863
|
}), /* @__PURE__ */ s(Bt, {
|
|
846
864
|
sponsorLogo: ""
|
|
847
865
|
})]
|
|
848
866
|
});
|
|
849
867
|
};
|
|
850
|
-
var
|
|
851
|
-
return
|
|
868
|
+
var et = "Expected a function", we = 0 / 0, ui = "[object Symbol]", pi = /^\s+|\s+$/g, mi = /^[-+]0x[0-9a-f]+$/i, hi = /^0b[01]+$/i, Ii = /^0o[0-7]+$/i, fi = parseInt, gi = typeof te == "object" && te && te.Object === Object && te, vi = typeof self == "object" && self && self.Object === Object && self, Mi = gi || vi || Function("return this")(), Ti = Object.prototype, yi = Ti.toString, Ai = Math.max, Ni = Math.min, me = function() {
|
|
869
|
+
return Mi.Date.now();
|
|
852
870
|
};
|
|
853
|
-
function
|
|
854
|
-
var i, r, c, l,
|
|
871
|
+
function Di(e, t, n) {
|
|
872
|
+
var i, r, d, c, l, u, f = 0, M = !1, v = !1, h = !0;
|
|
855
873
|
if (typeof e != "function")
|
|
856
|
-
throw new TypeError(
|
|
857
|
-
t =
|
|
858
|
-
function A(
|
|
874
|
+
throw new TypeError(et);
|
|
875
|
+
t = Ce(t) || 0, oe(n) && (M = !!n.leading, v = "maxWait" in n, d = v ? Ai(Ce(n.maxWait) || 0, t) : d, h = "trailing" in n ? !!n.trailing : h);
|
|
876
|
+
function A(y) {
|
|
859
877
|
var x = i, O = r;
|
|
860
|
-
return i = r = void 0,
|
|
878
|
+
return i = r = void 0, f = y, c = e.apply(O, x), c;
|
|
861
879
|
}
|
|
862
|
-
function S(
|
|
863
|
-
return
|
|
880
|
+
function S(y) {
|
|
881
|
+
return f = y, l = setTimeout(p, t), M ? A(y) : c;
|
|
864
882
|
}
|
|
865
|
-
function o(
|
|
866
|
-
var x =
|
|
867
|
-
return
|
|
883
|
+
function o(y) {
|
|
884
|
+
var x = y - u, O = y - f, z = t - x;
|
|
885
|
+
return v ? Ni(z, d - O) : z;
|
|
868
886
|
}
|
|
869
|
-
function m(
|
|
870
|
-
var x =
|
|
871
|
-
return u === void 0 || x >= t || x < 0 ||
|
|
887
|
+
function m(y) {
|
|
888
|
+
var x = y - u, O = y - f;
|
|
889
|
+
return u === void 0 || x >= t || x < 0 || v && O >= d;
|
|
872
890
|
}
|
|
873
891
|
function p() {
|
|
874
|
-
var
|
|
875
|
-
if (m(
|
|
876
|
-
return g(
|
|
877
|
-
|
|
892
|
+
var y = me();
|
|
893
|
+
if (m(y))
|
|
894
|
+
return g(y);
|
|
895
|
+
l = setTimeout(p, o(y));
|
|
878
896
|
}
|
|
879
|
-
function g(
|
|
880
|
-
return
|
|
897
|
+
function g(y) {
|
|
898
|
+
return l = void 0, h && i ? A(y) : (i = r = void 0, c);
|
|
881
899
|
}
|
|
882
|
-
function
|
|
883
|
-
|
|
900
|
+
function T() {
|
|
901
|
+
l !== void 0 && clearTimeout(l), f = 0, i = u = r = l = void 0;
|
|
884
902
|
}
|
|
885
903
|
function D() {
|
|
886
|
-
return
|
|
904
|
+
return l === void 0 ? c : g(me());
|
|
887
905
|
}
|
|
888
906
|
function N() {
|
|
889
|
-
var
|
|
890
|
-
if (i = arguments, r = this, u =
|
|
891
|
-
if (
|
|
907
|
+
var y = me(), x = m(y);
|
|
908
|
+
if (i = arguments, r = this, u = y, x) {
|
|
909
|
+
if (l === void 0)
|
|
892
910
|
return S(u);
|
|
893
|
-
if (
|
|
894
|
-
return
|
|
911
|
+
if (v)
|
|
912
|
+
return l = setTimeout(p, t), A(u);
|
|
895
913
|
}
|
|
896
|
-
return
|
|
914
|
+
return l === void 0 && (l = setTimeout(p, t)), c;
|
|
897
915
|
}
|
|
898
|
-
return N.cancel =
|
|
916
|
+
return N.cancel = T, N.flush = D, N;
|
|
899
917
|
}
|
|
900
|
-
function
|
|
918
|
+
function Si(e, t, n) {
|
|
901
919
|
var i = !0, r = !0;
|
|
902
920
|
if (typeof e != "function")
|
|
903
|
-
throw new TypeError(
|
|
904
|
-
return
|
|
921
|
+
throw new TypeError(et);
|
|
922
|
+
return oe(n) && (i = "leading" in n ? !!n.leading : i, r = "trailing" in n ? !!n.trailing : r), Di(e, t, {
|
|
905
923
|
leading: i,
|
|
906
924
|
maxWait: t,
|
|
907
925
|
trailing: r
|
|
908
926
|
});
|
|
909
927
|
}
|
|
910
|
-
function
|
|
928
|
+
function oe(e) {
|
|
911
929
|
var t = typeof e;
|
|
912
930
|
return !!e && (t == "object" || t == "function");
|
|
913
931
|
}
|
|
914
|
-
function
|
|
932
|
+
function xi(e) {
|
|
915
933
|
return !!e && typeof e == "object";
|
|
916
934
|
}
|
|
917
|
-
function
|
|
918
|
-
return typeof e == "symbol" ||
|
|
935
|
+
function zi(e) {
|
|
936
|
+
return typeof e == "symbol" || xi(e) && yi.call(e) == ui;
|
|
919
937
|
}
|
|
920
|
-
function
|
|
938
|
+
function Ce(e) {
|
|
921
939
|
if (typeof e == "number")
|
|
922
940
|
return e;
|
|
923
|
-
if (
|
|
924
|
-
return
|
|
925
|
-
if (
|
|
941
|
+
if (zi(e))
|
|
942
|
+
return we;
|
|
943
|
+
if (oe(e)) {
|
|
926
944
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
927
|
-
e =
|
|
945
|
+
e = oe(t) ? t + "" : t;
|
|
928
946
|
}
|
|
929
947
|
if (typeof e != "string")
|
|
930
948
|
return e === 0 ? e : +e;
|
|
931
|
-
e = e.replace(
|
|
932
|
-
var n =
|
|
933
|
-
return n ||
|
|
949
|
+
e = e.replace(pi, "");
|
|
950
|
+
var n = hi.test(e);
|
|
951
|
+
return n || Ii.test(e) ? fi(e.slice(2), n ? 2 : 8) : mi.test(e) ? we : +e;
|
|
934
952
|
}
|
|
935
|
-
var
|
|
936
|
-
const
|
|
953
|
+
var bi = Si;
|
|
954
|
+
const tt = /* @__PURE__ */ rt(bi), Oi = /* @__PURE__ */ a("div")({
|
|
937
955
|
name: "Container",
|
|
938
956
|
class: "c115qtkr",
|
|
939
957
|
propsAsIs: !1
|
|
940
|
-
}),
|
|
958
|
+
}), ki = /* @__PURE__ */ a("div")({
|
|
941
959
|
name: "STabs",
|
|
942
960
|
class: "sxnslc8",
|
|
943
961
|
propsAsIs: !1
|
|
944
|
-
}),
|
|
962
|
+
}), ji = /* @__PURE__ */ a("button")({
|
|
945
963
|
name: "Button",
|
|
946
964
|
class: "b1umzux0",
|
|
947
965
|
propsAsIs: !1
|
|
948
|
-
}),
|
|
966
|
+
}), wi = /* @__PURE__ */ a("span")({
|
|
949
967
|
name: "Title",
|
|
950
968
|
class: "tspsaas",
|
|
951
969
|
propsAsIs: !1
|
|
952
970
|
});
|
|
953
971
|
var J = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(J || {});
|
|
954
|
-
const
|
|
955
|
-
/* @__PURE__ */ s(
|
|
972
|
+
const Ee = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(ji, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(wi, { children: e }) }), Ci = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(Oi, { children: /* @__PURE__ */ I(ki, { "data-position": e === "home" ? "left" : "right", children: [
|
|
973
|
+
/* @__PURE__ */ s(Ee, { title: "Home", active: e === "home", onClick: () => t(
|
|
956
974
|
"home"
|
|
957
975
|
/* HOME */
|
|
958
976
|
) }),
|
|
959
977
|
/* @__PURE__ */ s(
|
|
960
|
-
|
|
978
|
+
Ee,
|
|
961
979
|
{
|
|
962
980
|
title: "Friends",
|
|
963
981
|
active: e === "leaderboard",
|
|
@@ -968,167 +986,167 @@ const Ce = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(ki, { onCl
|
|
|
968
986
|
}
|
|
969
987
|
)
|
|
970
988
|
] }) });
|
|
971
|
-
function
|
|
972
|
-
return
|
|
989
|
+
function ve() {
|
|
990
|
+
return ve = Object.assign ? Object.assign.bind() : function(e) {
|
|
973
991
|
for (var t = 1; t < arguments.length; t++) {
|
|
974
992
|
var n = arguments[t];
|
|
975
993
|
for (var i in n)
|
|
976
994
|
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
977
995
|
}
|
|
978
996
|
return e;
|
|
979
|
-
},
|
|
997
|
+
}, ve.apply(this, arguments);
|
|
980
998
|
}
|
|
981
|
-
function
|
|
999
|
+
function $e(e) {
|
|
982
1000
|
if (e === void 0)
|
|
983
1001
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
984
1002
|
return e;
|
|
985
1003
|
}
|
|
986
|
-
function
|
|
987
|
-
return
|
|
1004
|
+
function Me(e, t) {
|
|
1005
|
+
return Me = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
|
|
988
1006
|
return i.__proto__ = r, i;
|
|
989
|
-
},
|
|
1007
|
+
}, Me(e, t);
|
|
990
1008
|
}
|
|
991
|
-
function
|
|
992
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
1009
|
+
function Ei(e, t) {
|
|
1010
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Me(e, t);
|
|
993
1011
|
}
|
|
994
|
-
var
|
|
1012
|
+
var Le = Number.isNaN || function(t) {
|
|
995
1013
|
return typeof t == "number" && t !== t;
|
|
996
1014
|
};
|
|
997
|
-
function Ei(e, t) {
|
|
998
|
-
return !!(e === t || Ee(e) && Ee(t));
|
|
999
|
-
}
|
|
1000
1015
|
function $i(e, t) {
|
|
1016
|
+
return !!(e === t || Le(e) && Le(t));
|
|
1017
|
+
}
|
|
1018
|
+
function Li(e, t) {
|
|
1001
1019
|
if (e.length !== t.length)
|
|
1002
1020
|
return !1;
|
|
1003
1021
|
for (var n = 0; n < e.length; n++)
|
|
1004
|
-
if (
|
|
1022
|
+
if (!$i(e[n], t[n]))
|
|
1005
1023
|
return !1;
|
|
1006
1024
|
return !0;
|
|
1007
1025
|
}
|
|
1008
|
-
function
|
|
1009
|
-
t === void 0 && (t =
|
|
1010
|
-
var n, i = [], r,
|
|
1011
|
-
function
|
|
1012
|
-
for (var
|
|
1013
|
-
|
|
1014
|
-
return
|
|
1026
|
+
function he(e, t) {
|
|
1027
|
+
t === void 0 && (t = Li);
|
|
1028
|
+
var n, i = [], r, d = !1;
|
|
1029
|
+
function c() {
|
|
1030
|
+
for (var l = [], u = 0; u < arguments.length; u++)
|
|
1031
|
+
l[u] = arguments[u];
|
|
1032
|
+
return d && n === this && t(l, i) || (r = e.apply(this, l), d = !0, n = this, i = l), r;
|
|
1015
1033
|
}
|
|
1016
|
-
return
|
|
1034
|
+
return c;
|
|
1017
1035
|
}
|
|
1018
|
-
var
|
|
1036
|
+
var Ri = typeof performance == "object" && typeof performance.now == "function", Re = Ri ? function() {
|
|
1019
1037
|
return performance.now();
|
|
1020
1038
|
} : function() {
|
|
1021
1039
|
return Date.now();
|
|
1022
1040
|
};
|
|
1023
|
-
function
|
|
1041
|
+
function Qe(e) {
|
|
1024
1042
|
cancelAnimationFrame(e.id);
|
|
1025
1043
|
}
|
|
1026
|
-
function
|
|
1027
|
-
var n =
|
|
1044
|
+
function Qi(e, t) {
|
|
1045
|
+
var n = Re();
|
|
1028
1046
|
function i() {
|
|
1029
|
-
|
|
1047
|
+
Re() - n >= t ? e.call(null) : r.id = requestAnimationFrame(i);
|
|
1030
1048
|
}
|
|
1031
1049
|
var r = {
|
|
1032
1050
|
id: requestAnimationFrame(i)
|
|
1033
1051
|
};
|
|
1034
1052
|
return r;
|
|
1035
1053
|
}
|
|
1036
|
-
var
|
|
1037
|
-
function
|
|
1038
|
-
if (e === void 0 && (e = !1),
|
|
1054
|
+
var Ie = -1;
|
|
1055
|
+
function Ue(e) {
|
|
1056
|
+
if (e === void 0 && (e = !1), Ie === -1 || e) {
|
|
1039
1057
|
var t = document.createElement("div"), n = t.style;
|
|
1040
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t),
|
|
1058
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), Ie = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
1041
1059
|
}
|
|
1042
|
-
return
|
|
1060
|
+
return Ie;
|
|
1043
1061
|
}
|
|
1044
|
-
var
|
|
1045
|
-
function
|
|
1046
|
-
if (e === void 0 && (e = !1),
|
|
1062
|
+
var V = null;
|
|
1063
|
+
function Pe(e) {
|
|
1064
|
+
if (e === void 0 && (e = !1), V === null || e) {
|
|
1047
1065
|
var t = document.createElement("div"), n = t.style;
|
|
1048
1066
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1049
1067
|
var i = document.createElement("div"), r = i.style;
|
|
1050
|
-
return r.width = "100px", r.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ?
|
|
1068
|
+
return r.width = "100px", r.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? V = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? V = "negative" : V = "positive-ascending"), document.body.removeChild(t), V;
|
|
1051
1069
|
}
|
|
1052
|
-
return
|
|
1070
|
+
return V;
|
|
1053
1071
|
}
|
|
1054
|
-
var
|
|
1072
|
+
var Ui = 150, Pi = function(t, n) {
|
|
1055
1073
|
return t;
|
|
1056
1074
|
};
|
|
1057
|
-
function
|
|
1058
|
-
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize,
|
|
1059
|
-
return t = /* @__PURE__ */ function(
|
|
1060
|
-
|
|
1061
|
-
function
|
|
1075
|
+
function qi(e) {
|
|
1076
|
+
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, d = e.getOffsetForIndexAndAlignment, c = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, u = e.initInstanceProps, f = e.shouldResetStyleCacheOnItemSizeChange, M = e.validateProps;
|
|
1077
|
+
return t = /* @__PURE__ */ function(v) {
|
|
1078
|
+
Ei(h, v);
|
|
1079
|
+
function h(S) {
|
|
1062
1080
|
var o;
|
|
1063
|
-
return o =
|
|
1064
|
-
instance:
|
|
1081
|
+
return o = v.call(this, S) || this, o._instanceProps = u(o.props, $e(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
|
|
1082
|
+
instance: $e(o),
|
|
1065
1083
|
isScrolling: !1,
|
|
1066
1084
|
scrollDirection: "forward",
|
|
1067
1085
|
scrollOffset: typeof o.props.initialScrollOffset == "number" ? o.props.initialScrollOffset : 0,
|
|
1068
1086
|
scrollUpdateWasRequested: !1
|
|
1069
|
-
}, o._callOnItemsRendered = void 0, o._callOnItemsRendered =
|
|
1087
|
+
}, o._callOnItemsRendered = void 0, o._callOnItemsRendered = he(function(m, p, g, T) {
|
|
1070
1088
|
return o.props.onItemsRendered({
|
|
1071
1089
|
overscanStartIndex: m,
|
|
1072
1090
|
overscanStopIndex: p,
|
|
1073
1091
|
visibleStartIndex: g,
|
|
1074
|
-
visibleStopIndex:
|
|
1092
|
+
visibleStopIndex: T
|
|
1075
1093
|
});
|
|
1076
|
-
}), o._callOnScroll = void 0, o._callOnScroll =
|
|
1094
|
+
}), o._callOnScroll = void 0, o._callOnScroll = he(function(m, p, g) {
|
|
1077
1095
|
return o.props.onScroll({
|
|
1078
1096
|
scrollDirection: m,
|
|
1079
1097
|
scrollOffset: p,
|
|
1080
1098
|
scrollUpdateWasRequested: g
|
|
1081
1099
|
});
|
|
1082
1100
|
}), o._getItemStyle = void 0, o._getItemStyle = function(m) {
|
|
1083
|
-
var p = o.props, g = p.direction,
|
|
1101
|
+
var p = o.props, g = p.direction, T = p.itemSize, D = p.layout, N = o._getItemStyleCache(f && T, f && D, f && g), y;
|
|
1084
1102
|
if (N.hasOwnProperty(m))
|
|
1085
|
-
|
|
1103
|
+
y = N[m];
|
|
1086
1104
|
else {
|
|
1087
|
-
var x = n(o.props, m, o._instanceProps), O = r(o.props, m, o._instanceProps),
|
|
1088
|
-
N[m] =
|
|
1105
|
+
var x = n(o.props, m, o._instanceProps), O = r(o.props, m, o._instanceProps), z = g === "horizontal" || D === "horizontal", k = g === "rtl", w = z ? x : 0;
|
|
1106
|
+
N[m] = y = {
|
|
1089
1107
|
position: "absolute",
|
|
1090
|
-
left:
|
|
1091
|
-
right:
|
|
1092
|
-
top:
|
|
1093
|
-
height:
|
|
1094
|
-
width:
|
|
1108
|
+
left: k ? void 0 : w,
|
|
1109
|
+
right: k ? w : void 0,
|
|
1110
|
+
top: z ? 0 : x,
|
|
1111
|
+
height: z ? "100%" : O,
|
|
1112
|
+
width: z ? O : "100%"
|
|
1095
1113
|
};
|
|
1096
1114
|
}
|
|
1097
|
-
return
|
|
1098
|
-
}, o._getItemStyleCache = void 0, o._getItemStyleCache =
|
|
1115
|
+
return y;
|
|
1116
|
+
}, o._getItemStyleCache = void 0, o._getItemStyleCache = he(function(m, p, g) {
|
|
1099
1117
|
return {};
|
|
1100
1118
|
}), o._onScrollHorizontal = function(m) {
|
|
1101
|
-
var p = m.currentTarget, g = p.clientWidth,
|
|
1119
|
+
var p = m.currentTarget, g = p.clientWidth, T = p.scrollLeft, D = p.scrollWidth;
|
|
1102
1120
|
o.setState(function(N) {
|
|
1103
|
-
if (N.scrollOffset ===
|
|
1121
|
+
if (N.scrollOffset === T)
|
|
1104
1122
|
return null;
|
|
1105
|
-
var
|
|
1106
|
-
if (
|
|
1107
|
-
switch (
|
|
1123
|
+
var y = o.props.direction, x = T;
|
|
1124
|
+
if (y === "rtl")
|
|
1125
|
+
switch (Pe()) {
|
|
1108
1126
|
case "negative":
|
|
1109
|
-
x = -
|
|
1127
|
+
x = -T;
|
|
1110
1128
|
break;
|
|
1111
1129
|
case "positive-descending":
|
|
1112
|
-
x = D - g -
|
|
1130
|
+
x = D - g - T;
|
|
1113
1131
|
break;
|
|
1114
1132
|
}
|
|
1115
1133
|
return x = Math.max(0, Math.min(x, D - g)), {
|
|
1116
1134
|
isScrolling: !0,
|
|
1117
|
-
scrollDirection: N.scrollOffset <
|
|
1135
|
+
scrollDirection: N.scrollOffset < T ? "forward" : "backward",
|
|
1118
1136
|
scrollOffset: x,
|
|
1119
1137
|
scrollUpdateWasRequested: !1
|
|
1120
1138
|
};
|
|
1121
1139
|
}, o._resetIsScrollingDebounced);
|
|
1122
1140
|
}, o._onScrollVertical = function(m) {
|
|
1123
|
-
var p = m.currentTarget, g = p.clientHeight,
|
|
1141
|
+
var p = m.currentTarget, g = p.clientHeight, T = p.scrollHeight, D = p.scrollTop;
|
|
1124
1142
|
o.setState(function(N) {
|
|
1125
1143
|
if (N.scrollOffset === D)
|
|
1126
1144
|
return null;
|
|
1127
|
-
var
|
|
1145
|
+
var y = Math.max(0, Math.min(D, T - g));
|
|
1128
1146
|
return {
|
|
1129
1147
|
isScrolling: !0,
|
|
1130
|
-
scrollDirection: N.scrollOffset <
|
|
1131
|
-
scrollOffset:
|
|
1148
|
+
scrollDirection: N.scrollOffset < y ? "forward" : "backward",
|
|
1149
|
+
scrollOffset: y,
|
|
1132
1150
|
scrollUpdateWasRequested: !1
|
|
1133
1151
|
};
|
|
1134
1152
|
}, o._resetIsScrollingDebounced);
|
|
@@ -1136,7 +1154,7 @@ function Pi(e) {
|
|
|
1136
1154
|
var p = o.props.outerRef;
|
|
1137
1155
|
o._outerRef = m, typeof p == "function" ? p(m) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = m);
|
|
1138
1156
|
}, o._resetIsScrollingDebounced = function() {
|
|
1139
|
-
o._resetIsScrollingTimeoutId !== null &&
|
|
1157
|
+
o._resetIsScrollingTimeoutId !== null && Qe(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Qi(o._resetIsScrolling, Ui);
|
|
1140
1158
|
}, o._resetIsScrolling = function() {
|
|
1141
1159
|
o._resetIsScrollingTimeoutId = null, o.setState({
|
|
1142
1160
|
isScrolling: !1
|
|
@@ -1145,10 +1163,10 @@ function Pi(e) {
|
|
|
1145
1163
|
});
|
|
1146
1164
|
}, o;
|
|
1147
1165
|
}
|
|
1148
|
-
|
|
1149
|
-
return
|
|
1166
|
+
h.getDerivedStateFromProps = function(o, m) {
|
|
1167
|
+
return _i(o, m), M(o), null;
|
|
1150
1168
|
};
|
|
1151
|
-
var A =
|
|
1169
|
+
var A = h.prototype;
|
|
1152
1170
|
return A.scrollTo = function(o) {
|
|
1153
1171
|
o = Math.max(0, o), this.setState(function(m) {
|
|
1154
1172
|
return m.scrollOffset === o ? null : {
|
|
@@ -1159,101 +1177,101 @@ function Pi(e) {
|
|
|
1159
1177
|
}, this._resetIsScrollingDebounced);
|
|
1160
1178
|
}, A.scrollToItem = function(o, m) {
|
|
1161
1179
|
m === void 0 && (m = "auto");
|
|
1162
|
-
var p = this.props, g = p.itemCount,
|
|
1180
|
+
var p = this.props, g = p.itemCount, T = p.layout, D = this.state.scrollOffset;
|
|
1163
1181
|
o = Math.max(0, Math.min(o, g - 1));
|
|
1164
1182
|
var N = 0;
|
|
1165
1183
|
if (this._outerRef) {
|
|
1166
|
-
var
|
|
1167
|
-
|
|
1184
|
+
var y = this._outerRef;
|
|
1185
|
+
T === "vertical" ? N = y.scrollWidth > y.clientWidth ? Ue() : 0 : N = y.scrollHeight > y.clientHeight ? Ue() : 0;
|
|
1168
1186
|
}
|
|
1169
|
-
this.scrollTo(
|
|
1187
|
+
this.scrollTo(d(this.props, o, m, D, this._instanceProps, N));
|
|
1170
1188
|
}, A.componentDidMount = function() {
|
|
1171
1189
|
var o = this.props, m = o.direction, p = o.initialScrollOffset, g = o.layout;
|
|
1172
1190
|
if (typeof p == "number" && this._outerRef != null) {
|
|
1173
|
-
var
|
|
1174
|
-
m === "horizontal" || g === "horizontal" ?
|
|
1191
|
+
var T = this._outerRef;
|
|
1192
|
+
m === "horizontal" || g === "horizontal" ? T.scrollLeft = p : T.scrollTop = p;
|
|
1175
1193
|
}
|
|
1176
1194
|
this._callPropsCallbacks();
|
|
1177
1195
|
}, A.componentDidUpdate = function() {
|
|
1178
|
-
var o = this.props, m = o.direction, p = o.layout, g = this.state,
|
|
1196
|
+
var o = this.props, m = o.direction, p = o.layout, g = this.state, T = g.scrollOffset, D = g.scrollUpdateWasRequested;
|
|
1179
1197
|
if (D && this._outerRef != null) {
|
|
1180
1198
|
var N = this._outerRef;
|
|
1181
1199
|
if (m === "horizontal" || p === "horizontal")
|
|
1182
1200
|
if (m === "rtl")
|
|
1183
|
-
switch (
|
|
1201
|
+
switch (Pe()) {
|
|
1184
1202
|
case "negative":
|
|
1185
|
-
N.scrollLeft = -
|
|
1203
|
+
N.scrollLeft = -T;
|
|
1186
1204
|
break;
|
|
1187
1205
|
case "positive-ascending":
|
|
1188
|
-
N.scrollLeft =
|
|
1206
|
+
N.scrollLeft = T;
|
|
1189
1207
|
break;
|
|
1190
1208
|
default:
|
|
1191
|
-
var
|
|
1192
|
-
N.scrollLeft = x -
|
|
1209
|
+
var y = N.clientWidth, x = N.scrollWidth;
|
|
1210
|
+
N.scrollLeft = x - y - T;
|
|
1193
1211
|
break;
|
|
1194
1212
|
}
|
|
1195
1213
|
else
|
|
1196
|
-
N.scrollLeft =
|
|
1214
|
+
N.scrollLeft = T;
|
|
1197
1215
|
else
|
|
1198
|
-
N.scrollTop =
|
|
1216
|
+
N.scrollTop = T;
|
|
1199
1217
|
}
|
|
1200
1218
|
this._callPropsCallbacks();
|
|
1201
1219
|
}, A.componentWillUnmount = function() {
|
|
1202
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1220
|
+
this._resetIsScrollingTimeoutId !== null && Qe(this._resetIsScrollingTimeoutId);
|
|
1203
1221
|
}, A.render = function() {
|
|
1204
|
-
var o = this.props, m = o.children, p = o.className, g = o.direction,
|
|
1222
|
+
var o = this.props, m = o.children, p = o.className, g = o.direction, T = o.height, D = o.innerRef, N = o.innerElementType, y = o.innerTagName, x = o.itemCount, O = o.itemData, z = o.itemKey, k = z === void 0 ? Pi : z, w = o.layout, le = o.outerElementType, ce = o.outerTagName, U = o.style, K = o.useIsScrolling, X = o.width, ee = this.state.isScrolling, F = g === "horizontal" || w === "horizontal", de = F ? this._onScrollHorizontal : this._onScrollVertical, j = this._getRangeToRender(), q = j[0], nt = j[1], De = [];
|
|
1205
1223
|
if (x > 0)
|
|
1206
|
-
for (var B =
|
|
1207
|
-
|
|
1224
|
+
for (var B = q; B <= nt; B++)
|
|
1225
|
+
De.push(ue(m, {
|
|
1208
1226
|
data: O,
|
|
1209
|
-
key:
|
|
1227
|
+
key: k(B, O),
|
|
1210
1228
|
index: B,
|
|
1211
|
-
isScrolling: K ?
|
|
1229
|
+
isScrolling: K ? ee : void 0,
|
|
1212
1230
|
style: this._getItemStyle(B)
|
|
1213
1231
|
}));
|
|
1214
|
-
var
|
|
1215
|
-
return
|
|
1232
|
+
var Se = i(this.props, this._instanceProps);
|
|
1233
|
+
return ue(le || ce || "div", {
|
|
1216
1234
|
className: p,
|
|
1217
|
-
onScroll:
|
|
1235
|
+
onScroll: de,
|
|
1218
1236
|
ref: this._outerRefSetter,
|
|
1219
|
-
style:
|
|
1237
|
+
style: ve({
|
|
1220
1238
|
position: "relative",
|
|
1221
|
-
height:
|
|
1222
|
-
width:
|
|
1239
|
+
height: T,
|
|
1240
|
+
width: X,
|
|
1223
1241
|
overflow: "auto",
|
|
1224
1242
|
WebkitOverflowScrolling: "touch",
|
|
1225
1243
|
willChange: "transform",
|
|
1226
1244
|
direction: g
|
|
1227
|
-
},
|
|
1228
|
-
},
|
|
1229
|
-
children:
|
|
1245
|
+
}, U)
|
|
1246
|
+
}, ue(N || y || "div", {
|
|
1247
|
+
children: De,
|
|
1230
1248
|
ref: D,
|
|
1231
1249
|
style: {
|
|
1232
|
-
height:
|
|
1233
|
-
pointerEvents:
|
|
1234
|
-
width:
|
|
1250
|
+
height: F ? "100%" : Se,
|
|
1251
|
+
pointerEvents: ee ? "none" : void 0,
|
|
1252
|
+
width: F ? Se : "100%"
|
|
1235
1253
|
}
|
|
1236
1254
|
}));
|
|
1237
1255
|
}, A._callPropsCallbacks = function() {
|
|
1238
1256
|
if (typeof this.props.onItemsRendered == "function") {
|
|
1239
1257
|
var o = this.props.itemCount;
|
|
1240
1258
|
if (o > 0) {
|
|
1241
|
-
var m = this._getRangeToRender(), p = m[0], g = m[1],
|
|
1242
|
-
this._callOnItemsRendered(p, g,
|
|
1259
|
+
var m = this._getRangeToRender(), p = m[0], g = m[1], T = m[2], D = m[3];
|
|
1260
|
+
this._callOnItemsRendered(p, g, T, D);
|
|
1243
1261
|
}
|
|
1244
1262
|
}
|
|
1245
1263
|
if (typeof this.props.onScroll == "function") {
|
|
1246
|
-
var N = this.state,
|
|
1247
|
-
this._callOnScroll(
|
|
1264
|
+
var N = this.state, y = N.scrollDirection, x = N.scrollOffset, O = N.scrollUpdateWasRequested;
|
|
1265
|
+
this._callOnScroll(y, x, O);
|
|
1248
1266
|
}
|
|
1249
1267
|
}, A._getRangeToRender = function() {
|
|
1250
|
-
var o = this.props, m = o.itemCount, p = o.overscanCount, g = this.state,
|
|
1268
|
+
var o = this.props, m = o.itemCount, p = o.overscanCount, g = this.state, T = g.isScrolling, D = g.scrollDirection, N = g.scrollOffset;
|
|
1251
1269
|
if (m === 0)
|
|
1252
1270
|
return [0, 0, 0, 0];
|
|
1253
|
-
var
|
|
1254
|
-
return [Math.max(0,
|
|
1255
|
-
},
|
|
1256
|
-
}(
|
|
1271
|
+
var y = c(this.props, N, this._instanceProps), x = l(this.props, y, N, this._instanceProps), O = !T || D === "backward" ? Math.max(1, p) : 1, z = !T || D === "forward" ? Math.max(1, p) : 1;
|
|
1272
|
+
return [Math.max(0, y - O), Math.max(0, Math.min(m - 1, x + z)), y, x];
|
|
1273
|
+
}, h;
|
|
1274
|
+
}(Ve), t.defaultProps = {
|
|
1257
1275
|
direction: "ltr",
|
|
1258
1276
|
itemData: void 0,
|
|
1259
1277
|
layout: "vertical",
|
|
@@ -1261,9 +1279,9 @@ function Pi(e) {
|
|
|
1261
1279
|
useIsScrolling: !1
|
|
1262
1280
|
}, t;
|
|
1263
1281
|
}
|
|
1264
|
-
var
|
|
1282
|
+
var _i = function(t, n) {
|
|
1265
1283
|
t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
|
|
1266
|
-
},
|
|
1284
|
+
}, Yi = /* @__PURE__ */ qi({
|
|
1267
1285
|
getItemOffset: function(t, n) {
|
|
1268
1286
|
var i = t.itemSize;
|
|
1269
1287
|
return n * i;
|
|
@@ -1276,8 +1294,8 @@ var qi = function(t, n) {
|
|
|
1276
1294
|
var n = t.itemCount, i = t.itemSize;
|
|
1277
1295
|
return i * n;
|
|
1278
1296
|
},
|
|
1279
|
-
getOffsetForIndexAndAlignment: function(t, n, i, r,
|
|
1280
|
-
var
|
|
1297
|
+
getOffsetForIndexAndAlignment: function(t, n, i, r, d, c) {
|
|
1298
|
+
var l = t.direction, u = t.height, f = t.itemCount, M = t.itemSize, v = t.layout, h = t.width, A = l === "horizontal" || v === "horizontal", S = A ? h : u, o = Math.max(0, f * M - S), m = Math.min(o, n * M), p = Math.max(0, n * M - S + M + c);
|
|
1281
1299
|
switch (i === "smart" && (r >= p - S && r <= m + S ? i = "auto" : i = "center"), i) {
|
|
1282
1300
|
case "start":
|
|
1283
1301
|
return m;
|
|
@@ -1297,9 +1315,9 @@ var qi = function(t, n) {
|
|
|
1297
1315
|
return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
|
|
1298
1316
|
},
|
|
1299
1317
|
getStopIndexForStartIndex: function(t, n, i) {
|
|
1300
|
-
var r = t.direction,
|
|
1318
|
+
var r = t.direction, d = t.height, c = t.itemCount, l = t.itemSize, u = t.layout, f = t.width, M = r === "horizontal" || u === "horizontal", v = n * l, h = M ? f : d, A = Math.ceil((h + i - v) / l);
|
|
1301
1319
|
return Math.max(0, Math.min(
|
|
1302
|
-
|
|
1320
|
+
c - 1,
|
|
1303
1321
|
n + A - 1
|
|
1304
1322
|
// -1 is because stop index is inclusive
|
|
1305
1323
|
));
|
|
@@ -1311,34 +1329,34 @@ var qi = function(t, n) {
|
|
|
1311
1329
|
t.itemSize;
|
|
1312
1330
|
}
|
|
1313
1331
|
});
|
|
1314
|
-
function
|
|
1332
|
+
function Wi(e) {
|
|
1315
1333
|
var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
|
|
1316
1334
|
return !(i > n || r < t);
|
|
1317
1335
|
}
|
|
1318
|
-
function
|
|
1319
|
-
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex,
|
|
1320
|
-
var
|
|
1321
|
-
|
|
1336
|
+
function Vi(e) {
|
|
1337
|
+
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, d = e.stopIndex, c = [], l = null, u = null, f = r; f <= d; f++) {
|
|
1338
|
+
var M = t(f);
|
|
1339
|
+
M ? u !== null && (c.push(l, u), l = u = null) : (u = f, l === null && (l = f));
|
|
1322
1340
|
}
|
|
1323
1341
|
if (u !== null) {
|
|
1324
|
-
for (var
|
|
1325
|
-
u =
|
|
1326
|
-
|
|
1342
|
+
for (var v = Math.min(Math.max(u, l + i - 1), n - 1), h = u + 1; h <= v && !t(h); h++)
|
|
1343
|
+
u = h;
|
|
1344
|
+
c.push(l, u);
|
|
1327
1345
|
}
|
|
1328
|
-
if (
|
|
1329
|
-
for (;
|
|
1330
|
-
var A =
|
|
1346
|
+
if (c.length)
|
|
1347
|
+
for (; c[1] - c[0] + 1 < i && c[0] > 0; ) {
|
|
1348
|
+
var A = c[0] - 1;
|
|
1331
1349
|
if (!t(A))
|
|
1332
|
-
|
|
1350
|
+
c[0] = A;
|
|
1333
1351
|
else
|
|
1334
1352
|
break;
|
|
1335
1353
|
}
|
|
1336
|
-
return
|
|
1354
|
+
return c;
|
|
1337
1355
|
}
|
|
1338
1356
|
var Fi = function(e, t) {
|
|
1339
1357
|
if (!(e instanceof t))
|
|
1340
1358
|
throw new TypeError("Cannot call a class as a function");
|
|
1341
|
-
},
|
|
1359
|
+
}, Bi = function() {
|
|
1342
1360
|
function e(t, n) {
|
|
1343
1361
|
for (var i = 0; i < n.length; i++) {
|
|
1344
1362
|
var r = n[i];
|
|
@@ -1348,7 +1366,7 @@ var Fi = function(e, t) {
|
|
|
1348
1366
|
return function(t, n, i) {
|
|
1349
1367
|
return n && e(t.prototype, n), i && e(t, i), t;
|
|
1350
1368
|
};
|
|
1351
|
-
}(),
|
|
1369
|
+
}(), Hi = function(e, t) {
|
|
1352
1370
|
if (typeof t != "function" && t !== null)
|
|
1353
1371
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
1354
1372
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1359,25 +1377,25 @@ var Fi = function(e, t) {
|
|
|
1359
1377
|
configurable: !0
|
|
1360
1378
|
}
|
|
1361
1379
|
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
|
|
1362
|
-
},
|
|
1380
|
+
}, qe = function(e, t) {
|
|
1363
1381
|
if (!e)
|
|
1364
1382
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1365
1383
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
1366
|
-
},
|
|
1367
|
-
|
|
1384
|
+
}, Gi = function(e) {
|
|
1385
|
+
Hi(t, e);
|
|
1368
1386
|
function t() {
|
|
1369
|
-
var n, i, r,
|
|
1387
|
+
var n, i, r, d;
|
|
1370
1388
|
Fi(this, t);
|
|
1371
|
-
for (var
|
|
1372
|
-
|
|
1373
|
-
return
|
|
1374
|
-
var
|
|
1375
|
-
r._lastRenderedStartIndex =
|
|
1376
|
-
}, r._setRef = function(
|
|
1377
|
-
r._listRef =
|
|
1378
|
-
}, i),
|
|
1389
|
+
for (var c = arguments.length, l = Array(c), u = 0; u < c; u++)
|
|
1390
|
+
l[u] = arguments[u];
|
|
1391
|
+
return d = (i = (r = qe(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(f) {
|
|
1392
|
+
var M = f.visibleStartIndex, v = f.visibleStopIndex;
|
|
1393
|
+
r._lastRenderedStartIndex = M, r._lastRenderedStopIndex = v, r._ensureRowsLoaded(M, v);
|
|
1394
|
+
}, r._setRef = function(f) {
|
|
1395
|
+
r._listRef = f;
|
|
1396
|
+
}, i), qe(r, d);
|
|
1379
1397
|
}
|
|
1380
|
-
return
|
|
1398
|
+
return Bi(t, [{
|
|
1381
1399
|
key: "resetloadMoreItemsCache",
|
|
1382
1400
|
value: function() {
|
|
1383
1401
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1399,129 +1417,129 @@ var Fi = function(e, t) {
|
|
|
1399
1417
|
}, {
|
|
1400
1418
|
key: "_ensureRowsLoaded",
|
|
1401
1419
|
value: function(i, r) {
|
|
1402
|
-
var
|
|
1403
|
-
isItemLoaded:
|
|
1404
|
-
itemCount:
|
|
1405
|
-
minimumBatchSize:
|
|
1406
|
-
startIndex: Math.max(0, i -
|
|
1407
|
-
stopIndex: Math.min(
|
|
1420
|
+
var d = this.props, c = d.isItemLoaded, l = d.itemCount, u = d.minimumBatchSize, f = u === void 0 ? 10 : u, M = d.threshold, v = M === void 0 ? 15 : M, h = Vi({
|
|
1421
|
+
isItemLoaded: c,
|
|
1422
|
+
itemCount: l,
|
|
1423
|
+
minimumBatchSize: f,
|
|
1424
|
+
startIndex: Math.max(0, i - v),
|
|
1425
|
+
stopIndex: Math.min(l - 1, r + v)
|
|
1408
1426
|
});
|
|
1409
|
-
(this._memoizedUnloadedRanges.length !==
|
|
1410
|
-
return
|
|
1411
|
-
})) && (this._memoizedUnloadedRanges =
|
|
1427
|
+
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(A, S) {
|
|
1428
|
+
return h[S] !== A;
|
|
1429
|
+
})) && (this._memoizedUnloadedRanges = h, this._loadUnloadedRanges(h));
|
|
1412
1430
|
}
|
|
1413
1431
|
}, {
|
|
1414
1432
|
key: "_loadUnloadedRanges",
|
|
1415
1433
|
value: function(i) {
|
|
1416
|
-
for (var r = this,
|
|
1417
|
-
var
|
|
1418
|
-
|
|
1419
|
-
if (
|
|
1434
|
+
for (var r = this, d = this.props.loadMoreItems || this.props.loadMoreRows, c = function(f) {
|
|
1435
|
+
var M = i[f], v = i[f + 1], h = d(M, v);
|
|
1436
|
+
h != null && h.then(function() {
|
|
1437
|
+
if (Wi({
|
|
1420
1438
|
lastRenderedStartIndex: r._lastRenderedStartIndex,
|
|
1421
1439
|
lastRenderedStopIndex: r._lastRenderedStopIndex,
|
|
1422
|
-
startIndex:
|
|
1423
|
-
stopIndex:
|
|
1440
|
+
startIndex: M,
|
|
1441
|
+
stopIndex: v
|
|
1424
1442
|
})) {
|
|
1425
1443
|
if (r._listRef == null)
|
|
1426
1444
|
return;
|
|
1427
|
-
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(
|
|
1445
|
+
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(M, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
|
|
1428
1446
|
}
|
|
1429
1447
|
});
|
|
1430
|
-
},
|
|
1431
|
-
l
|
|
1448
|
+
}, l = 0; l < i.length; l += 2)
|
|
1449
|
+
c(l);
|
|
1432
1450
|
}
|
|
1433
1451
|
}]), t;
|
|
1434
|
-
}(
|
|
1435
|
-
const
|
|
1452
|
+
}(Ve);
|
|
1453
|
+
const Zi = /* @__PURE__ */ a("div")({
|
|
1436
1454
|
name: "Container",
|
|
1437
1455
|
class: "culdu4a",
|
|
1438
1456
|
propsAsIs: !1
|
|
1439
|
-
}),
|
|
1457
|
+
}), Ji = /* @__PURE__ */ a("div")({
|
|
1440
1458
|
name: "Position",
|
|
1441
1459
|
class: "pwf8e69",
|
|
1442
1460
|
propsAsIs: !1
|
|
1443
|
-
}),
|
|
1461
|
+
}), Ki = /* @__PURE__ */ a("img")({
|
|
1444
1462
|
name: "Avatar",
|
|
1445
1463
|
class: "atf4yh4",
|
|
1446
1464
|
propsAsIs: !1
|
|
1447
|
-
}),
|
|
1465
|
+
}), Xi = /* @__PURE__ */ a("div")({
|
|
1448
1466
|
name: "AvatarPlaceholder",
|
|
1449
1467
|
class: "a1dg29ja",
|
|
1450
1468
|
propsAsIs: !1
|
|
1451
|
-
}),
|
|
1469
|
+
}), er = /* @__PURE__ */ a("div")({
|
|
1452
1470
|
name: "Content",
|
|
1453
1471
|
class: "c10a68rc",
|
|
1454
1472
|
propsAsIs: !1
|
|
1455
|
-
}),
|
|
1473
|
+
}), tr = /* @__PURE__ */ a("div")({
|
|
1456
1474
|
name: "NameContainer",
|
|
1457
1475
|
class: "nc4kck5",
|
|
1458
1476
|
propsAsIs: !1
|
|
1459
|
-
}),
|
|
1477
|
+
}), nr = /* @__PURE__ */ a("span")({
|
|
1460
1478
|
name: "Name",
|
|
1461
1479
|
class: "njsrqgr",
|
|
1462
1480
|
propsAsIs: !1
|
|
1463
|
-
}),
|
|
1481
|
+
}), ir = () => C, rr = /* @__PURE__ */ a(ir())({
|
|
1464
1482
|
name: "CurrentUserBadge",
|
|
1465
1483
|
class: "c17uc4zr",
|
|
1466
1484
|
propsAsIs: !0
|
|
1467
|
-
}),
|
|
1485
|
+
}), sr = ({
|
|
1468
1486
|
rank: e,
|
|
1469
1487
|
avatar: t,
|
|
1470
1488
|
name: n,
|
|
1471
1489
|
points: i,
|
|
1472
1490
|
isCurrentUser: r,
|
|
1473
|
-
openItemDetail:
|
|
1474
|
-
style:
|
|
1475
|
-
}) => /* @__PURE__ */ I(
|
|
1476
|
-
/* @__PURE__ */ s(
|
|
1477
|
-
/* @__PURE__ */ I(
|
|
1478
|
-
t ? /* @__PURE__ */ s(
|
|
1479
|
-
/* @__PURE__ */ I(
|
|
1480
|
-
/* @__PURE__ */ s(
|
|
1481
|
-
r && /* @__PURE__ */ s(
|
|
1491
|
+
openItemDetail: d,
|
|
1492
|
+
style: c
|
|
1493
|
+
}) => /* @__PURE__ */ I(Zi, { onClick: d, style: c, children: [
|
|
1494
|
+
/* @__PURE__ */ s(Ji, { children: e || 0 }),
|
|
1495
|
+
/* @__PURE__ */ I(er, { children: [
|
|
1496
|
+
t ? /* @__PURE__ */ s(Ki, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(Xi, { children: Be(n || "") }),
|
|
1497
|
+
/* @__PURE__ */ I(tr, { children: [
|
|
1498
|
+
/* @__PURE__ */ s(nr, { children: n || "" }),
|
|
1499
|
+
r && /* @__PURE__ */ s(rr, { name: "icon-star" })
|
|
1482
1500
|
] })
|
|
1483
1501
|
] }),
|
|
1484
|
-
/* @__PURE__ */ s("div", { children:
|
|
1485
|
-
] }),
|
|
1502
|
+
/* @__PURE__ */ s("div", { children: He(i) })
|
|
1503
|
+
] }), or = /* @__PURE__ */ a("div")({
|
|
1486
1504
|
name: "ScrollContainer",
|
|
1487
1505
|
class: "s13d8sg6",
|
|
1488
1506
|
propsAsIs: !1
|
|
1489
|
-
}),
|
|
1507
|
+
}), ar = ({
|
|
1490
1508
|
items: e,
|
|
1491
1509
|
currentUserId: t,
|
|
1492
1510
|
openItemDetail: n,
|
|
1493
1511
|
fetchMore: i,
|
|
1494
1512
|
onScroll: r
|
|
1495
|
-
}) => /* @__PURE__ */ s(st, { children: ({ width:
|
|
1496
|
-
|
|
1513
|
+
}) => /* @__PURE__ */ s(st, { children: ({ width: d, height: c }) => /* @__PURE__ */ s(
|
|
1514
|
+
Gi,
|
|
1497
1515
|
{
|
|
1498
|
-
isItemLoaded: (
|
|
1516
|
+
isItemLoaded: (l) => l < e.length,
|
|
1499
1517
|
itemCount: e.length + 1,
|
|
1500
1518
|
loadMoreItems: i,
|
|
1501
|
-
children: ({ onItemsRendered:
|
|
1502
|
-
|
|
1519
|
+
children: ({ onItemsRendered: l, ref: u }) => /* @__PURE__ */ s(or, { children: /* @__PURE__ */ s(
|
|
1520
|
+
Yi,
|
|
1503
1521
|
{
|
|
1504
1522
|
itemSize: 56,
|
|
1505
1523
|
onScroll: r,
|
|
1506
|
-
onItemsRendered:
|
|
1524
|
+
onItemsRendered: l,
|
|
1507
1525
|
ref: u,
|
|
1508
1526
|
itemCount: e.length,
|
|
1509
|
-
width:
|
|
1510
|
-
height:
|
|
1511
|
-
children: ({ index:
|
|
1512
|
-
|
|
1527
|
+
width: d,
|
|
1528
|
+
height: c,
|
|
1529
|
+
children: ({ index: f, style: M }) => /* @__PURE__ */ s(
|
|
1530
|
+
sr,
|
|
1513
1531
|
{
|
|
1514
|
-
style: { ...
|
|
1515
|
-
...e[
|
|
1516
|
-
openItemDetail: () => n(e[
|
|
1517
|
-
isCurrentUser: !!t && t === e[
|
|
1532
|
+
style: { ...M, maxHeight: 48 },
|
|
1533
|
+
...e[f],
|
|
1534
|
+
openItemDetail: () => n(e[f].userId),
|
|
1535
|
+
isCurrentUser: !!t && t === e[f].userId
|
|
1518
1536
|
},
|
|
1519
|
-
e[
|
|
1537
|
+
e[f].userId
|
|
1520
1538
|
)
|
|
1521
1539
|
}
|
|
1522
1540
|
) })
|
|
1523
1541
|
}
|
|
1524
|
-
) }),
|
|
1542
|
+
) }), lr = ({ deepLink: e }) => {
|
|
1525
1543
|
const { data: t } = Y(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
|
|
1526
1544
|
return /* @__PURE__ */ s(
|
|
1527
1545
|
ot,
|
|
@@ -1543,15 +1561,15 @@ const Gi = /* @__PURE__ */ a("div")({
|
|
|
1543
1561
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1544
1562
|
}
|
|
1545
1563
|
);
|
|
1546
|
-
},
|
|
1547
|
-
const { data: n } = Y(e.leaderboardList.$store), i =
|
|
1548
|
-
|
|
1549
|
-
Math.abs(i.current -
|
|
1564
|
+
}, cr = ({ gamification: e, hideTabs: t }) => {
|
|
1565
|
+
const { data: n } = Y(e.leaderboardList.$store), i = $(0), r = P(
|
|
1566
|
+
tt((d) => {
|
|
1567
|
+
Math.abs(i.current - d.scrollOffset) < 112 || (i.current = d.scrollOffset, t(d.scrollOffset !== 0 && d.scrollDirection === "forward"));
|
|
1550
1568
|
}, 200),
|
|
1551
1569
|
[t]
|
|
1552
1570
|
);
|
|
1553
1571
|
return n != null && n.length ? /* @__PURE__ */ s(
|
|
1554
|
-
|
|
1572
|
+
ar,
|
|
1555
1573
|
{
|
|
1556
1574
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1557
1575
|
items: n,
|
|
@@ -1559,205 +1577,205 @@ const Gi = /* @__PURE__ */ a("div")({
|
|
|
1559
1577
|
openItemDetail: e.openUser,
|
|
1560
1578
|
currentUserId: e.currentUserId.get()
|
|
1561
1579
|
}
|
|
1562
|
-
) : /* @__PURE__ */ s(
|
|
1563
|
-
},
|
|
1580
|
+
) : /* @__PURE__ */ s(lr, { deepLink: e.deepLink });
|
|
1581
|
+
}, dr = /* @__PURE__ */ a("div")({
|
|
1564
1582
|
name: "QuestionItem",
|
|
1565
1583
|
class: "q1w97g3p",
|
|
1566
1584
|
propsAsIs: !1
|
|
1567
|
-
}),
|
|
1585
|
+
}), ur = /* @__PURE__ */ a("div")({
|
|
1568
1586
|
name: "QuestionCaption",
|
|
1569
1587
|
class: "q2sl39u",
|
|
1570
1588
|
propsAsIs: !1
|
|
1571
|
-
}),
|
|
1589
|
+
}), pr = /* @__PURE__ */ a("div")({
|
|
1572
1590
|
name: "QuestionBody",
|
|
1573
1591
|
class: "qd5h0uc",
|
|
1574
1592
|
propsAsIs: !1
|
|
1575
|
-
}),
|
|
1593
|
+
}), mr = /* @__PURE__ */ a("div")({
|
|
1576
1594
|
name: "QuestionAction",
|
|
1577
1595
|
class: "q105uluy",
|
|
1578
1596
|
propsAsIs: !1
|
|
1579
|
-
}),
|
|
1597
|
+
}), hr = () => C, se = /* @__PURE__ */ a(hr())({
|
|
1580
1598
|
name: "QuestionActionIcon",
|
|
1581
1599
|
class: "q1fa0b9h",
|
|
1582
1600
|
propsAsIs: !0
|
|
1583
|
-
}),
|
|
1601
|
+
}), Ir = () => C, fr = /* @__PURE__ */ a(Ir())({
|
|
1584
1602
|
name: "QuestionTypeIcon",
|
|
1585
1603
|
class: "qxlt78s",
|
|
1586
1604
|
propsAsIs: !0
|
|
1587
|
-
}),
|
|
1605
|
+
}), gr = /* @__PURE__ */ a("div")({
|
|
1588
1606
|
name: "QuestionTypeLabel",
|
|
1589
1607
|
class: "qmg0vkx",
|
|
1590
1608
|
propsAsIs: !1
|
|
1591
|
-
}),
|
|
1609
|
+
}), vr = /* @__PURE__ */ a("div")({
|
|
1592
1610
|
name: "QuestionContent",
|
|
1593
1611
|
class: "q1uz5j1g",
|
|
1594
1612
|
propsAsIs: !1
|
|
1595
|
-
}),
|
|
1613
|
+
}), Mr = /* @__PURE__ */ a("button")({
|
|
1596
1614
|
name: "PlayButton",
|
|
1597
1615
|
class: "p1pba9p1",
|
|
1598
1616
|
propsAsIs: !1
|
|
1599
|
-
}),
|
|
1600
|
-
[
|
|
1601
|
-
[
|
|
1602
|
-
[
|
|
1603
|
-
[
|
|
1617
|
+
}), Tr = {
|
|
1618
|
+
[ne.LOST]: /* @__PURE__ */ s(se, { name: "incorrectVoted" }),
|
|
1619
|
+
[ne.WON]: /* @__PURE__ */ s(se, { name: "icon-check" }),
|
|
1620
|
+
[ne.UNSET]: /* @__PURE__ */ s(se, { name: "icon-arrow" }),
|
|
1621
|
+
[ne.DNP]: /* @__PURE__ */ s(se, { name: "icon-arrow" })
|
|
1604
1622
|
}, yr = ({
|
|
1605
1623
|
questionId: e,
|
|
1606
1624
|
questionType: t,
|
|
1607
1625
|
questionStatus: n,
|
|
1608
1626
|
subject: i,
|
|
1609
1627
|
openForVoting: r,
|
|
1610
|
-
openQuestion:
|
|
1611
|
-
status:
|
|
1628
|
+
openQuestion: d,
|
|
1629
|
+
status: c
|
|
1612
1630
|
}) => {
|
|
1613
|
-
const
|
|
1614
|
-
return
|
|
1615
|
-
/* @__PURE__ */ I(
|
|
1616
|
-
/* @__PURE__ */ I(
|
|
1631
|
+
const l = Ye[t], u = Tr[c];
|
|
1632
|
+
return l ? /* @__PURE__ */ I(dr, { onClick: () => d == null ? void 0 : d(e), children: [
|
|
1633
|
+
/* @__PURE__ */ I(vr, { children: [
|
|
1634
|
+
/* @__PURE__ */ I(ur, { children: [
|
|
1617
1635
|
/* @__PURE__ */ s(
|
|
1618
1636
|
fr,
|
|
1619
1637
|
{
|
|
1620
|
-
"data-type-trivia": t ===
|
|
1621
|
-
"data-type-poll": t ===
|
|
1622
|
-
name:
|
|
1638
|
+
"data-type-trivia": t === b.TRIVIA,
|
|
1639
|
+
"data-type-poll": t === b.POLL,
|
|
1640
|
+
name: l.iconName
|
|
1623
1641
|
}
|
|
1624
1642
|
),
|
|
1625
|
-
/* @__PURE__ */ I(
|
|
1626
|
-
|
|
1627
|
-
t ===
|
|
1643
|
+
/* @__PURE__ */ I(gr, { children: [
|
|
1644
|
+
l.label,
|
|
1645
|
+
t === b.TRIVIA && n === Q.RESOLVED && " • Expired"
|
|
1628
1646
|
] })
|
|
1629
1647
|
] }),
|
|
1630
|
-
/* @__PURE__ */ s(
|
|
1648
|
+
/* @__PURE__ */ s(pr, { children: i || "" })
|
|
1631
1649
|
] }),
|
|
1632
|
-
/* @__PURE__ */ s(
|
|
1650
|
+
/* @__PURE__ */ s(mr, { children: r ? /* @__PURE__ */ s(Mr, { children: "Play" }) : u })
|
|
1633
1651
|
] }) : null;
|
|
1634
|
-
},
|
|
1652
|
+
}, Ar = /* @__PURE__ */ a("div")({
|
|
1635
1653
|
name: "Container",
|
|
1636
1654
|
class: "cll3md7",
|
|
1637
1655
|
propsAsIs: !1
|
|
1638
|
-
}),
|
|
1656
|
+
}), Nr = /* @__PURE__ */ a("button")({
|
|
1639
1657
|
name: "ActionBtn",
|
|
1640
1658
|
class: "a10g1iik",
|
|
1641
1659
|
propsAsIs: !1
|
|
1642
|
-
}),
|
|
1660
|
+
}), Dr = ({
|
|
1643
1661
|
openInsight: e,
|
|
1644
1662
|
questionId: t,
|
|
1645
1663
|
...n
|
|
1646
|
-
}) => /* @__PURE__ */ I(
|
|
1647
|
-
/* @__PURE__ */ s(
|
|
1648
|
-
e && /* @__PURE__ */ s(
|
|
1649
|
-
] }),
|
|
1664
|
+
}) => /* @__PURE__ */ I(Ar, { children: [
|
|
1665
|
+
/* @__PURE__ */ s(Xe, { questionId: t, ...n, isPickHistory: !0 }),
|
|
1666
|
+
e && /* @__PURE__ */ s(Nr, { onClick: () => e(t), children: "View Insight" })
|
|
1667
|
+
] }), Sr = /* @__PURE__ */ a("div")({
|
|
1650
1668
|
name: "Container",
|
|
1651
1669
|
class: "cl56x6b",
|
|
1652
1670
|
propsAsIs: !1
|
|
1653
|
-
}),
|
|
1671
|
+
}), xr = () => at, zr = /* @__PURE__ */ a(xr())({
|
|
1654
1672
|
name: "ActionButton",
|
|
1655
1673
|
class: "a11pzf92",
|
|
1656
1674
|
propsAsIs: !0
|
|
1657
|
-
}),
|
|
1675
|
+
}), br = /* @__PURE__ */ a("div")({
|
|
1658
1676
|
name: "DateTime",
|
|
1659
1677
|
class: "d1hbaleq",
|
|
1660
1678
|
propsAsIs: !1
|
|
1661
|
-
}),
|
|
1679
|
+
}), Or = /* @__PURE__ */ a("blockquote")({
|
|
1662
1680
|
name: "Quote",
|
|
1663
1681
|
class: "qvvgqjm",
|
|
1664
1682
|
propsAsIs: !1
|
|
1665
|
-
}),
|
|
1683
|
+
}), kr = ({
|
|
1666
1684
|
openTweet: e,
|
|
1667
1685
|
created: t,
|
|
1668
1686
|
...n
|
|
1669
1687
|
}) => {
|
|
1670
|
-
const i =
|
|
1688
|
+
const i = E(() => {
|
|
1671
1689
|
if (t) {
|
|
1672
1690
|
const r = new Date(t);
|
|
1673
|
-
if (
|
|
1691
|
+
if (Ne(r))
|
|
1674
1692
|
return {
|
|
1675
|
-
date:
|
|
1676
|
-
time:
|
|
1693
|
+
date: ye(r),
|
|
1694
|
+
time: Ae(r)
|
|
1677
1695
|
};
|
|
1678
1696
|
}
|
|
1679
1697
|
return null;
|
|
1680
1698
|
}, [t]);
|
|
1681
|
-
return /* @__PURE__ */ I(
|
|
1682
|
-
i && /* @__PURE__ */ I(
|
|
1699
|
+
return /* @__PURE__ */ I(Sr, { children: [
|
|
1700
|
+
i && /* @__PURE__ */ I(br, { children: [
|
|
1683
1701
|
i.date,
|
|
1684
1702
|
" · ",
|
|
1685
1703
|
i.time
|
|
1686
1704
|
] }),
|
|
1687
|
-
n.title && /* @__PURE__ */ s(
|
|
1688
|
-
/* @__PURE__ */ s(
|
|
1689
|
-
e && /* @__PURE__ */ s(
|
|
1705
|
+
n.title && /* @__PURE__ */ s(Or, { children: n.title }),
|
|
1706
|
+
/* @__PURE__ */ s(We, { ...n }),
|
|
1707
|
+
e && /* @__PURE__ */ s(zr, { onClick: () => e(n.tweetId), children: "View Insight" })
|
|
1690
1708
|
] });
|
|
1691
|
-
},
|
|
1709
|
+
}, jr = /* @__PURE__ */ a("div")({
|
|
1692
1710
|
name: "QuestionsContainer",
|
|
1693
1711
|
class: "qvghv3l",
|
|
1694
1712
|
propsAsIs: !1
|
|
1695
|
-
}),
|
|
1696
|
-
var i, r,
|
|
1713
|
+
}), wr = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(jr, { children: e == null ? void 0 : e.map((n) => {
|
|
1714
|
+
var i, r, d;
|
|
1697
1715
|
if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1698
|
-
const
|
|
1699
|
-
return /* @__PURE__ */ s(yr, { openQuestion: t, ...
|
|
1716
|
+
const c = n.attributes.attributes.value;
|
|
1717
|
+
return /* @__PURE__ */ s(yr, { openQuestion: t, ...c }, c.questionId);
|
|
1700
1718
|
}
|
|
1701
1719
|
if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
|
|
1702
|
-
const
|
|
1703
|
-
return /* @__PURE__ */ s(
|
|
1720
|
+
const c = n.attributes.attributes.value, l = n.attributes.created;
|
|
1721
|
+
return /* @__PURE__ */ s(Dr, { openInsight: t, ...c, created: l }, c.questionId);
|
|
1704
1722
|
}
|
|
1705
|
-
if (n.type === "tweet" && ((
|
|
1706
|
-
const
|
|
1707
|
-
return /* @__PURE__ */ s(
|
|
1723
|
+
if (n.type === "tweet" && ((d = n.attributes) == null ? void 0 : d.attributes.case) === "tweet") {
|
|
1724
|
+
const c = n.attributes.attributes.value, l = n.attributes.id, u = n.attributes.created;
|
|
1725
|
+
return /* @__PURE__ */ s(kr, { openTweet: t, ...c, tweetId: l, created: u }, l);
|
|
1708
1726
|
}
|
|
1709
1727
|
return null;
|
|
1710
1728
|
}) }), Cr = ({ store: e, openQuestion: t }) => {
|
|
1711
1729
|
const n = Y(e);
|
|
1712
|
-
return n != null && n.data ? /* @__PURE__ */ s(
|
|
1713
|
-
},
|
|
1730
|
+
return n != null && n.data ? /* @__PURE__ */ s(wr, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1731
|
+
}, Er = ({ userSummary: e }) => {
|
|
1714
1732
|
var t;
|
|
1715
|
-
const [n, i] =
|
|
1716
|
-
return
|
|
1717
|
-
const r = e.subscribe((
|
|
1718
|
-
|
|
1733
|
+
const [n, i] = L(void 0);
|
|
1734
|
+
return ae(() => {
|
|
1735
|
+
const r = e.subscribe((d) => {
|
|
1736
|
+
d != null && d.data && i(d.data);
|
|
1719
1737
|
});
|
|
1720
1738
|
return () => {
|
|
1721
1739
|
r();
|
|
1722
1740
|
};
|
|
1723
|
-
}, [e]), n != null && n.summary ? /* @__PURE__ */ s(
|
|
1724
|
-
},
|
|
1741
|
+
}, [e]), n != null && n.summary ? /* @__PURE__ */ s(Ge, { ...n.summary, successRate: (t = n.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1742
|
+
}, $r = ({
|
|
1725
1743
|
gamification: e
|
|
1726
1744
|
}) => {
|
|
1727
|
-
const [t, n] =
|
|
1728
|
-
u(() => r(
|
|
1729
|
-
},
|
|
1730
|
-
u(() => n(
|
|
1731
|
-
},
|
|
1732
|
-
const
|
|
1733
|
-
if (!
|
|
1745
|
+
const [t, n] = L(!1), [i, r] = L(J.HOME), d = $(null), c = $(0), [l, u] = ut(), f = (h) => {
|
|
1746
|
+
u(() => r(h));
|
|
1747
|
+
}, M = (h) => {
|
|
1748
|
+
u(() => n(h));
|
|
1749
|
+
}, v = P(tt(() => {
|
|
1750
|
+
const h = d.current;
|
|
1751
|
+
if (!h)
|
|
1734
1752
|
return;
|
|
1735
1753
|
const {
|
|
1736
1754
|
scrollTop: A
|
|
1737
|
-
} =
|
|
1755
|
+
} = h;
|
|
1738
1756
|
if (A === 0) {
|
|
1739
|
-
|
|
1757
|
+
c.current = 0, M(!1);
|
|
1740
1758
|
return;
|
|
1741
1759
|
}
|
|
1742
|
-
if (Math.abs(
|
|
1760
|
+
if (Math.abs(c.current - A) < 112)
|
|
1743
1761
|
return;
|
|
1744
|
-
const S =
|
|
1745
|
-
|
|
1762
|
+
const S = c.current < A ? "forward" : "backward";
|
|
1763
|
+
c.current = A, M(S === "forward");
|
|
1746
1764
|
}, 200), []);
|
|
1747
|
-
return
|
|
1748
|
-
const
|
|
1749
|
-
return
|
|
1750
|
-
|
|
1765
|
+
return ae(() => {
|
|
1766
|
+
const h = d.current;
|
|
1767
|
+
return h ? (i === J.HOME && h.addEventListener("scroll", v), () => {
|
|
1768
|
+
h.removeEventListener("scroll", v);
|
|
1751
1769
|
}) : () => {
|
|
1752
1770
|
};
|
|
1753
|
-
}, [i,
|
|
1771
|
+
}, [i, v]), /* @__PURE__ */ I("div", {
|
|
1754
1772
|
style: {
|
|
1755
1773
|
height: "100%",
|
|
1756
1774
|
display: "flex",
|
|
1757
1775
|
flexDirection: "column",
|
|
1758
1776
|
overflow: "hidden"
|
|
1759
1777
|
},
|
|
1760
|
-
children: [
|
|
1778
|
+
children: [l, /* @__PURE__ */ s(ge, {
|
|
1761
1779
|
style: {
|
|
1762
1780
|
paddingBottom: "4px",
|
|
1763
1781
|
transition: "margin-top 0.2s ease-in-out",
|
|
@@ -1765,15 +1783,15 @@ const Gi = /* @__PURE__ */ a("div")({
|
|
|
1765
1783
|
},
|
|
1766
1784
|
children: /* @__PURE__ */ s(Ci, {
|
|
1767
1785
|
activePage: i,
|
|
1768
|
-
toggleActivePage:
|
|
1786
|
+
toggleActivePage: f
|
|
1769
1787
|
})
|
|
1770
|
-
}), i === J.HOME && /* @__PURE__ */ I(
|
|
1771
|
-
ref:
|
|
1772
|
-
children: [/* @__PURE__ */ s(
|
|
1788
|
+
}), i === J.HOME && /* @__PURE__ */ I(Te, {
|
|
1789
|
+
ref: d,
|
|
1790
|
+
children: [/* @__PURE__ */ s(ge, {
|
|
1773
1791
|
style: {
|
|
1774
1792
|
paddingTop: "12px"
|
|
1775
1793
|
},
|
|
1776
|
-
children: /* @__PURE__ */ s(
|
|
1794
|
+
children: /* @__PURE__ */ s(Er, {
|
|
1777
1795
|
userSummary: e.userSummary
|
|
1778
1796
|
})
|
|
1779
1797
|
}), /* @__PURE__ */ s(lt, {
|
|
@@ -1784,59 +1802,59 @@ const Gi = /* @__PURE__ */ a("div")({
|
|
|
1784
1802
|
})]
|
|
1785
1803
|
}), i === J.LEADERBOARD && /* @__PURE__ */ s("div", {
|
|
1786
1804
|
className: "c1bp9dj2",
|
|
1787
|
-
children: /* @__PURE__ */ s(
|
|
1805
|
+
children: /* @__PURE__ */ s(cr, {
|
|
1788
1806
|
gamification: e,
|
|
1789
|
-
hideTabs:
|
|
1807
|
+
hideTabs: M
|
|
1790
1808
|
})
|
|
1791
1809
|
})]
|
|
1792
1810
|
});
|
|
1793
|
-
},
|
|
1811
|
+
}, Lr = () => ct, _e = /* @__PURE__ */ a(Lr())({
|
|
1794
1812
|
name: "OpenedContainer",
|
|
1795
1813
|
class: "oar61gl",
|
|
1796
1814
|
propsAsIs: !0
|
|
1797
|
-
}),
|
|
1815
|
+
}), Rr = /* @__PURE__ */ a("div")({
|
|
1798
1816
|
name: "UserContainer",
|
|
1799
1817
|
class: "u14zaal4",
|
|
1800
1818
|
propsAsIs: !1
|
|
1801
|
-
}),
|
|
1819
|
+
}), Qr = ({
|
|
1802
1820
|
correct: e,
|
|
1803
1821
|
incorrect: t
|
|
1804
1822
|
}) => {
|
|
1805
1823
|
const n = e + t;
|
|
1806
1824
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
1807
|
-
},
|
|
1825
|
+
}, _r = ({
|
|
1808
1826
|
gamification: e,
|
|
1809
1827
|
className: t
|
|
1810
1828
|
}) => {
|
|
1811
1829
|
const n = Y(e.openedQuestion.$store), i = Y(e.openedUser);
|
|
1812
|
-
return /* @__PURE__ */ I(
|
|
1813
|
-
children: [n && /* @__PURE__ */ s(
|
|
1830
|
+
return /* @__PURE__ */ I(R, {
|
|
1831
|
+
children: [n && /* @__PURE__ */ s(_e, {
|
|
1814
1832
|
className: t,
|
|
1815
|
-
children: /* @__PURE__ */ s(
|
|
1833
|
+
children: /* @__PURE__ */ s(di, {
|
|
1816
1834
|
gamification: e
|
|
1817
1835
|
})
|
|
1818
|
-
}), i && /* @__PURE__ */ s(
|
|
1836
|
+
}), i && /* @__PURE__ */ s(_e, {
|
|
1819
1837
|
className: t,
|
|
1820
|
-
children: /* @__PURE__ */ I(
|
|
1838
|
+
children: /* @__PURE__ */ I(Rr, {
|
|
1821
1839
|
children: [/* @__PURE__ */ s(Fe, {
|
|
1822
1840
|
label: "Friend's Rank",
|
|
1823
1841
|
close: e.closeUser
|
|
1824
|
-
}), /* @__PURE__ */ s(
|
|
1825
|
-
children: /* @__PURE__ */ s(
|
|
1842
|
+
}), /* @__PURE__ */ s(ge, {
|
|
1843
|
+
children: /* @__PURE__ */ s(Ge, {
|
|
1826
1844
|
...i,
|
|
1827
|
-
successRate:
|
|
1845
|
+
successRate: Qr(i)
|
|
1828
1846
|
})
|
|
1829
1847
|
})]
|
|
1830
1848
|
})
|
|
1831
|
-
}), /* @__PURE__ */ s(
|
|
1849
|
+
}), /* @__PURE__ */ s(Te, {
|
|
1832
1850
|
className: t,
|
|
1833
1851
|
"data-nav": "true",
|
|
1834
|
-
children: /* @__PURE__ */ s(
|
|
1852
|
+
children: /* @__PURE__ */ s($r, {
|
|
1835
1853
|
gamification: e
|
|
1836
1854
|
})
|
|
1837
1855
|
})]
|
|
1838
1856
|
});
|
|
1839
1857
|
};
|
|
1840
1858
|
export {
|
|
1841
|
-
|
|
1859
|
+
_r as default
|
|
1842
1860
|
};
|