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