@streamlayer/react 0.32.11 → 0.33.1
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.
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index4.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/cjs/points.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +14 -14
- package/lib/dist/es/gamification-feature.js +863 -733
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +5553 -5619
- package/lib/dist/index.d.ts +47 -50
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +743 -699
- package/lib/es/index4.js +30 -29
- package/lib/es/masters2.js +194 -187
- package/lib/es/points.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +9 -7
|
@@ -1,191 +1,192 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { s as o,
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { o as
|
|
5
|
-
import { QuestionType as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { d as
|
|
1
|
+
import { jsxs as m, jsx as s, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { s as o, r as C } from "./index4.js";
|
|
3
|
+
import { useStore as _ } from "@nanostores/react";
|
|
4
|
+
import { o as ke, r as me, w as We, u as we, A as Fe, O as Be, c as He, a as ce, n as Ge, f as Ze } from "./masters2.js";
|
|
5
|
+
import { QuestionType as z, QuestionStatus as U, QuestionImages as B, PickHistoryStatus as K } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { useState as E, useCallback as P, useEffect as he, useMemo as w, createElement as re, PureComponent as Ee, useRef as de, useTransition as Je } from "react";
|
|
7
|
+
import { d as Le } from "./index3.js";
|
|
8
8
|
import "react-countup";
|
|
9
|
-
import { CountdownCircleTimer as
|
|
10
|
-
import { E as
|
|
9
|
+
import { CountdownCircleTimer as Ke } from "react-countdown-circle-timer";
|
|
10
|
+
import { E as q } from "./index2.js";
|
|
11
|
+
import $e from "lodash.throttle";
|
|
11
12
|
import "@streamlayer/sdk-web-interfaces";
|
|
12
13
|
import "@streamlayer/sdk-web-notifications";
|
|
13
14
|
import "./useStreamLayerApp.js";
|
|
14
15
|
import "@streamlayer/sdk-web";
|
|
15
|
-
const
|
|
16
|
+
const Xe = /* @__PURE__ */ o("div")({
|
|
16
17
|
name: "Container",
|
|
17
18
|
class: "c1vwopgc",
|
|
18
19
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
20
|
+
}), et = /* @__PURE__ */ o("div")({
|
|
20
21
|
name: "QuestionTypeWrap",
|
|
21
22
|
class: "qyktpt0",
|
|
22
23
|
propsAsIs: !1
|
|
23
|
-
}),
|
|
24
|
+
}), tt = () => C, nt = /* @__PURE__ */ o(tt())({
|
|
24
25
|
name: "QuestionTypeIcon",
|
|
25
26
|
class: "q951jdx",
|
|
26
27
|
propsAsIs: !0
|
|
27
|
-
}),
|
|
28
|
+
}), st = /* @__PURE__ */ o("span")({
|
|
28
29
|
name: "QuestionTypeTitle",
|
|
29
30
|
class: "qss5f0e",
|
|
30
31
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
32
|
+
}), it = /* @__PURE__ */ o("button")({
|
|
32
33
|
name: "CloseButton",
|
|
33
34
|
class: "c1ao1jtv",
|
|
34
35
|
propsAsIs: !1
|
|
35
|
-
}),
|
|
36
|
+
}), rt = () => C, ot = /* @__PURE__ */ o(rt())({
|
|
36
37
|
name: "CloseIcon",
|
|
37
38
|
class: "cvsl7l3",
|
|
38
39
|
propsAsIs: !0
|
|
39
|
-
}),
|
|
40
|
-
const i = e ?
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
40
|
+
}), Re = ({ type: e, close: t, label: n }) => {
|
|
41
|
+
const i = e ? ke[e] : { label: n, iconName: void 0 };
|
|
42
|
+
return /* @__PURE__ */ m(Xe, { children: [
|
|
43
|
+
/* @__PURE__ */ m(et, { children: [
|
|
43
44
|
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
|
|
44
|
-
|
|
45
|
+
nt,
|
|
45
46
|
{
|
|
46
|
-
"data-type-trivia": e ===
|
|
47
|
-
"data-type-poll": e ===
|
|
47
|
+
"data-type-trivia": e === z.TRIVIA,
|
|
48
|
+
"data-type-poll": e === z.POLL,
|
|
48
49
|
name: i.iconName
|
|
49
50
|
}
|
|
50
51
|
),
|
|
51
|
-
(i == null ? void 0 : i.label) && /* @__PURE__ */ s(
|
|
52
|
+
(i == null ? void 0 : i.label) && /* @__PURE__ */ s(st, { children: i.label })
|
|
52
53
|
] }),
|
|
53
|
-
/* @__PURE__ */ s(
|
|
54
|
+
/* @__PURE__ */ s(it, { onClick: t, children: /* @__PURE__ */ s(ot, { name: "icon-cross" }) })
|
|
54
55
|
] });
|
|
55
|
-
},
|
|
56
|
+
}, Qe = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Ue = (e) => e ? e.toLocaleString("en-US") : "0", Ie = (e) => e.toLocaleDateString("en-US", {
|
|
56
57
|
weekday: "short",
|
|
57
58
|
month: "short",
|
|
58
59
|
day: "numeric"
|
|
59
|
-
}),
|
|
60
|
+
}), fe = (e) => e.toLocaleTimeString("en-US", {
|
|
60
61
|
hour: "2-digit",
|
|
61
62
|
minute: "2-digit"
|
|
62
|
-
}),
|
|
63
|
+
}), ge = (e) => !isNaN(e.getTime()), at = /* @__PURE__ */ o("div")({
|
|
63
64
|
name: "Container",
|
|
64
65
|
class: "c1zy8a",
|
|
65
66
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
67
|
+
}), lt = /* @__PURE__ */ o("div")({
|
|
67
68
|
name: "Title",
|
|
68
69
|
class: "t1vih9p5",
|
|
69
70
|
propsAsIs: !1
|
|
70
|
-
}),
|
|
71
|
+
}), ct = /* @__PURE__ */ o("div")({
|
|
71
72
|
name: "Indicator",
|
|
72
73
|
class: "i1fbnvpb",
|
|
73
74
|
propsAsIs: !1
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */ s(
|
|
76
|
-
/* @__PURE__ */ s(
|
|
77
|
-
] }),
|
|
75
|
+
}), Ae = ({ indicator: e, title: t }) => /* @__PURE__ */ m(at, { children: [
|
|
76
|
+
/* @__PURE__ */ s(lt, { children: t }),
|
|
77
|
+
/* @__PURE__ */ s(ct, { children: e })
|
|
78
|
+
] }), dt = /* @__PURE__ */ o("div")({
|
|
78
79
|
name: "Container",
|
|
79
80
|
class: "ctmhwyc",
|
|
80
81
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
82
|
+
}), ut = /* @__PURE__ */ o("div")({
|
|
82
83
|
name: "Indicator",
|
|
83
84
|
class: "i1jri200",
|
|
84
85
|
propsAsIs: !1
|
|
85
|
-
}),
|
|
86
|
+
}), pt = /* @__PURE__ */ o("div")({
|
|
86
87
|
name: "Title",
|
|
87
88
|
class: "t8s05oq",
|
|
88
89
|
propsAsIs: !1
|
|
89
|
-
}),
|
|
90
|
-
/* @__PURE__ */ s(
|
|
91
|
-
/* @__PURE__ */ s(
|
|
92
|
-
] }),
|
|
90
|
+
}), X = ({ indicator: e, title: t }) => /* @__PURE__ */ m(dt, { children: [
|
|
91
|
+
/* @__PURE__ */ s(ut, { children: e }),
|
|
92
|
+
/* @__PURE__ */ s(pt, { children: t })
|
|
93
|
+
] }), mt = /* @__PURE__ */ o("div")({
|
|
93
94
|
name: "Container",
|
|
94
95
|
class: "c1yrpn9o",
|
|
95
96
|
propsAsIs: !1
|
|
96
|
-
}),
|
|
97
|
+
}), ht = /* @__PURE__ */ o("div")({
|
|
97
98
|
name: "TopInfo",
|
|
98
99
|
class: "t17fwahh",
|
|
99
100
|
propsAsIs: !1
|
|
100
|
-
}),
|
|
101
|
+
}), It = /* @__PURE__ */ o("div")({
|
|
101
102
|
name: "BottomInfo",
|
|
102
103
|
class: "by6w7e9",
|
|
103
104
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
105
|
+
}), ft = /* @__PURE__ */ o("div")({
|
|
105
106
|
name: "User",
|
|
106
107
|
class: "u1g7arbm",
|
|
107
108
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
109
|
+
}), gt = /* @__PURE__ */ o("img")({
|
|
109
110
|
name: "Avatar",
|
|
110
111
|
class: "a1ldeata",
|
|
111
112
|
propsAsIs: !1
|
|
112
|
-
}),
|
|
113
|
+
}), vt = /* @__PURE__ */ o("div")({
|
|
113
114
|
name: "UserInfo",
|
|
114
115
|
class: "u10d4koz",
|
|
115
116
|
propsAsIs: !1
|
|
116
|
-
}),
|
|
117
|
+
}), Mt = /* @__PURE__ */ o("div")({
|
|
117
118
|
name: "UserName",
|
|
118
119
|
class: "u1q6roj0",
|
|
119
120
|
propsAsIs: !1
|
|
120
|
-
}),
|
|
121
|
+
}), At = /* @__PURE__ */ o("div")({
|
|
121
122
|
name: "UserRating",
|
|
122
123
|
class: "ui0m425",
|
|
123
124
|
propsAsIs: !1
|
|
124
|
-
}),
|
|
125
|
+
}), Nt = /* @__PURE__ */ o("img")({
|
|
125
126
|
name: "TrophyIcon",
|
|
126
127
|
class: "t1el3mrn",
|
|
127
128
|
propsAsIs: !1
|
|
128
|
-
}),
|
|
129
|
+
}), Tt = /* @__PURE__ */ o("div")({
|
|
129
130
|
name: "Rts",
|
|
130
131
|
class: "r2vgnxv",
|
|
131
132
|
propsAsIs: !1
|
|
132
|
-
}),
|
|
133
|
+
}), yt = /* @__PURE__ */ o("div")({
|
|
133
134
|
name: "RtsIndicator",
|
|
134
135
|
class: "roqn06j",
|
|
135
136
|
propsAsIs: !1
|
|
136
|
-
}),
|
|
137
|
+
}), Dt = /* @__PURE__ */ o("div")({
|
|
137
138
|
name: "RtsLabel",
|
|
138
139
|
class: "r15adx7c",
|
|
139
140
|
propsAsIs: !1
|
|
140
|
-
}),
|
|
141
|
+
}), St = /* @__PURE__ */ o("div")({
|
|
141
142
|
name: "Divider",
|
|
142
143
|
class: "dv59lta",
|
|
143
144
|
propsAsIs: !1
|
|
144
|
-
}),
|
|
145
|
+
}), zt = /* @__PURE__ */ o("div")({
|
|
145
146
|
name: "Ranks",
|
|
146
147
|
class: "r55lotb",
|
|
147
148
|
propsAsIs: !1
|
|
148
|
-
}),
|
|
149
|
+
}), xt = /* @__PURE__ */ o("div")({
|
|
149
150
|
name: "Statistics",
|
|
150
151
|
class: "s1knfgqt",
|
|
151
152
|
propsAsIs: !1
|
|
152
|
-
}),
|
|
153
|
+
}), Ot = /* @__PURE__ */ o("div")({
|
|
153
154
|
name: "AvatarPlaceholder",
|
|
154
155
|
class: "a1mqo824",
|
|
155
156
|
propsAsIs: !1
|
|
156
|
-
}),
|
|
157
|
+
}), bt = /* @__PURE__ */ o("button")({
|
|
157
158
|
name: "UserAccountBtn",
|
|
158
159
|
class: "uxareh6",
|
|
159
160
|
propsAsIs: !1
|
|
160
|
-
}),
|
|
161
|
+
}), Ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", qe = ({
|
|
161
162
|
avatar: e,
|
|
162
163
|
name: t,
|
|
163
164
|
points: n,
|
|
164
165
|
friendsRank: i,
|
|
165
166
|
rank: r,
|
|
166
|
-
streak:
|
|
167
|
+
streak: d,
|
|
167
168
|
correct: p,
|
|
168
|
-
incorrect:
|
|
169
|
+
incorrect: l,
|
|
169
170
|
inTop: c,
|
|
170
|
-
successRate:
|
|
171
|
-
}) => /* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */ s(
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
e && /* @__PURE__ */ s(
|
|
175
|
-
!e && /* @__PURE__ */ s(
|
|
171
|
+
successRate: I
|
|
172
|
+
}) => /* @__PURE__ */ m(mt, { children: [
|
|
173
|
+
/* @__PURE__ */ s(ht, { children: /* @__PURE__ */ m(ft, { children: [
|
|
174
|
+
/* @__PURE__ */ m(bt, { children: [
|
|
175
|
+
e && /* @__PURE__ */ s(gt, { alt: "avatar", src: e }),
|
|
176
|
+
!e && /* @__PURE__ */ s(Ot, { children: Qe(t || "") })
|
|
176
177
|
] }),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */ s(
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */ s(
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
|
|
184
|
-
/* @__PURE__ */ s(
|
|
178
|
+
/* @__PURE__ */ m(vt, { children: [
|
|
179
|
+
/* @__PURE__ */ s(Mt, { children: t }),
|
|
180
|
+
/* @__PURE__ */ m(At, { children: [
|
|
181
|
+
/* @__PURE__ */ m(Tt, { children: [
|
|
182
|
+
/* @__PURE__ */ s(Nt, { alt: "rank-icon", src: Ct }),
|
|
183
|
+
/* @__PURE__ */ m(yt, { children: [
|
|
184
|
+
Ue(n),
|
|
185
|
+
/* @__PURE__ */ s(Dt, { children: "PTS" })
|
|
185
186
|
] })
|
|
186
187
|
] }),
|
|
187
|
-
/* @__PURE__ */ s(
|
|
188
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ s(St, {}),
|
|
189
|
+
/* @__PURE__ */ m("div", { children: [
|
|
189
190
|
"TOP ",
|
|
190
191
|
c || 0,
|
|
191
192
|
"%"
|
|
@@ -193,563 +194,569 @@ const Ze = /* @__PURE__ */ o("div")({
|
|
|
193
194
|
] })
|
|
194
195
|
] })
|
|
195
196
|
] }) }),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */ s(
|
|
199
|
-
/* @__PURE__ */ s(
|
|
197
|
+
/* @__PURE__ */ m(It, { children: [
|
|
198
|
+
/* @__PURE__ */ m(zt, { children: [
|
|
199
|
+
/* @__PURE__ */ s(Ae, { indicator: i || 0, title: "Friends rank" }),
|
|
200
|
+
/* @__PURE__ */ s(Ae, { indicator: r || 0, title: "Global rank" })
|
|
200
201
|
] }),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */ s(
|
|
203
|
-
/* @__PURE__ */ s(
|
|
204
|
-
/* @__PURE__ */ s(
|
|
205
|
-
/* @__PURE__ */ s(
|
|
202
|
+
/* @__PURE__ */ m(xt, { children: [
|
|
203
|
+
/* @__PURE__ */ s(X, { indicator: d || 0, title: "Win streak" }),
|
|
204
|
+
/* @__PURE__ */ s(X, { indicator: p || 0, title: "Correct" }),
|
|
205
|
+
/* @__PURE__ */ s(X, { indicator: l || 0, title: "Incorrect" }),
|
|
206
|
+
/* @__PURE__ */ s(X, { indicator: `${I || 0}%`, title: "Succ. rate" })
|
|
206
207
|
] })
|
|
207
208
|
] })
|
|
208
|
-
] }),
|
|
209
|
+
] }), jt = /* @__PURE__ */ o("div")({
|
|
209
210
|
name: "SponsorLogoWrap",
|
|
210
211
|
class: "s8p5v5z",
|
|
211
212
|
propsAsIs: !1
|
|
212
|
-
}),
|
|
213
|
+
}), kt = () => C, wt = /* @__PURE__ */ o(kt())({
|
|
213
214
|
name: "SponsorLogo",
|
|
214
215
|
class: "s755yti",
|
|
215
216
|
propsAsIs: !0
|
|
216
|
-
}),
|
|
217
|
-
children: /* @__PURE__ */ s(
|
|
217
|
+
}), Et = () => /* @__PURE__ */ s(jt, {
|
|
218
|
+
children: /* @__PURE__ */ s(wt, {
|
|
218
219
|
name: "mastersLogo"
|
|
219
220
|
})
|
|
220
|
-
}),
|
|
221
|
+
}), Lt = /* @__PURE__ */ o("div")({
|
|
221
222
|
name: "Container",
|
|
222
223
|
class: "c38csyt",
|
|
223
224
|
propsAsIs: !1
|
|
224
|
-
}),
|
|
225
|
+
}), $t = /* @__PURE__ */ o("div")({
|
|
225
226
|
name: "Title",
|
|
226
227
|
class: "ty221rx",
|
|
227
228
|
propsAsIs: !1
|
|
228
|
-
}),
|
|
229
|
+
}), Rt = /* @__PURE__ */ o("div")({
|
|
229
230
|
name: "Description",
|
|
230
231
|
class: "dlaj9xp",
|
|
231
232
|
propsAsIs: !1
|
|
232
|
-
}),
|
|
233
|
-
/* @__PURE__ */ s(
|
|
234
|
-
/* @__PURE__ */ s(
|
|
235
|
-
/* @__PURE__ */ s(
|
|
236
|
-
] }),
|
|
233
|
+
}), Qt = ({ title: e, description: t }) => /* @__PURE__ */ m(Lt, { children: [
|
|
234
|
+
/* @__PURE__ */ s(C, { name: "icon-check-circle" }),
|
|
235
|
+
/* @__PURE__ */ s($t, { children: e }),
|
|
236
|
+
/* @__PURE__ */ s(Rt, { children: t })
|
|
237
|
+
] }), Ut = /* @__PURE__ */ o("div")({
|
|
237
238
|
name: "Container",
|
|
238
239
|
class: "c16sbdnm",
|
|
239
240
|
propsAsIs: !1
|
|
240
|
-
}),
|
|
241
|
+
}), qt = () => C, Pt = /* @__PURE__ */ o(qt())({
|
|
241
242
|
name: "IconPrediction",
|
|
242
243
|
class: "ibhorgl",
|
|
243
244
|
propsAsIs: !0
|
|
244
|
-
}),
|
|
245
|
+
}), H = /* @__PURE__ */ o("div")({
|
|
245
246
|
name: "FeedbackIconWrap",
|
|
246
247
|
class: "f1g20ja7",
|
|
247
248
|
propsAsIs: !1
|
|
248
|
-
}),
|
|
249
|
+
}), ee = /* @__PURE__ */ o("div")({
|
|
249
250
|
name: "FeedbackHeader",
|
|
250
251
|
class: "f455ozj",
|
|
251
252
|
propsAsIs: !1
|
|
252
|
-
}),
|
|
253
|
+
}), _t = /* @__PURE__ */ o("span")({
|
|
253
254
|
name: "FeedbackTitle",
|
|
254
255
|
class: "f1913njx",
|
|
255
256
|
propsAsIs: !1
|
|
256
|
-
}),
|
|
257
|
+
}), Y = /* @__PURE__ */ o("span")({
|
|
257
258
|
name: "FeedbackDescription",
|
|
258
259
|
class: "fzfk69z",
|
|
259
260
|
propsAsIs: !1
|
|
260
|
-
}),
|
|
261
|
+
}), oe = /* @__PURE__ */ o("div")({
|
|
261
262
|
name: "FeedbackText",
|
|
262
263
|
class: "fx87qaj",
|
|
263
264
|
propsAsIs: !1
|
|
264
|
-
}),
|
|
265
|
+
}), Yt = ({
|
|
265
266
|
feedbackMessages: e,
|
|
266
267
|
questionVotedCorrectly: t,
|
|
267
268
|
questionVoted: n,
|
|
268
269
|
questionType: i,
|
|
269
270
|
hasCorrectAnswer: r,
|
|
270
|
-
questionStatus:
|
|
271
|
+
questionStatus: d,
|
|
271
272
|
showExpiredNotification: p,
|
|
272
|
-
showClosedNotificationTrivia:
|
|
273
|
+
showClosedNotificationTrivia: l,
|
|
273
274
|
votedInCurrentRender: c,
|
|
274
|
-
votedAfterQuestionClosed:
|
|
275
|
-
enteredAnActiveQuestion:
|
|
275
|
+
votedAfterQuestionClosed: I,
|
|
276
|
+
enteredAnActiveQuestion: M,
|
|
277
|
+
marketClosed: S
|
|
276
278
|
}) => {
|
|
277
|
-
const
|
|
278
|
-
if (!p && !
|
|
279
|
+
const g = n && (i === z.TRIVIA || i === z.PREDICTION) && c && d !== U.RESOLVED, N = i === z.PREDICTION && !r, y = S && i === z.PREDICTION && !n && !M || i === z.PREDICTION && I && c && M, a = g && N, h = g && r, u = i === z.PREDICTION && n && c && r, f = n && i === z.POLL && c;
|
|
280
|
+
if (!p && !l && !a && !h && !y && !f && !u)
|
|
279
281
|
return null;
|
|
280
|
-
const
|
|
281
|
-
return /* @__PURE__ */
|
|
282
|
-
p && /* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */ s(
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */ s(
|
|
286
|
-
/* @__PURE__ */ s(
|
|
282
|
+
const v = t ? "correct" : "incorrect", T = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
283
|
+
return /* @__PURE__ */ m(Ut, { "data-isPrediction": N, children: [
|
|
284
|
+
p && /* @__PURE__ */ m(k, { children: [
|
|
285
|
+
/* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
|
|
286
|
+
/* @__PURE__ */ m("div", { children: [
|
|
287
|
+
/* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(Y, { children: "Question Expired" }) }),
|
|
288
|
+
/* @__PURE__ */ s(oe, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
287
289
|
] })
|
|
288
290
|
] }),
|
|
289
|
-
|
|
290
|
-
/* @__PURE__ */ s(
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */ s(
|
|
293
|
-
/* @__PURE__ */ s(
|
|
291
|
+
l && /* @__PURE__ */ m(k, { children: [
|
|
292
|
+
/* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
|
|
293
|
+
/* @__PURE__ */ m("div", { children: [
|
|
294
|
+
/* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
|
|
295
|
+
/* @__PURE__ */ s(oe, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
294
296
|
] })
|
|
295
297
|
] }),
|
|
296
|
-
|
|
297
|
-
/* @__PURE__ */ s(
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */ s(
|
|
300
|
-
/* @__PURE__ */ s(
|
|
298
|
+
y && /* @__PURE__ */ m(k, { children: [
|
|
299
|
+
/* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
|
|
300
|
+
/* @__PURE__ */ m("div", { children: [
|
|
301
|
+
/* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
|
|
302
|
+
/* @__PURE__ */ s(oe, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
301
303
|
] })
|
|
302
304
|
] }),
|
|
303
|
-
|
|
304
|
-
/* @__PURE__ */ s(
|
|
305
|
-
/* @__PURE__ */ s(
|
|
305
|
+
a && /* @__PURE__ */ m(k, { children: [
|
|
306
|
+
/* @__PURE__ */ s(Pt, { name: "icon-prediction" }),
|
|
307
|
+
/* @__PURE__ */ s(Y, { children: "Stay tuned to see if your prediction was correct." })
|
|
306
308
|
] }),
|
|
307
|
-
|
|
308
|
-
/* @__PURE__ */ s(
|
|
309
|
-
/* @__PURE__ */ s(
|
|
309
|
+
f && /* @__PURE__ */ m(k, { children: [
|
|
310
|
+
/* @__PURE__ */ s(H, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(C, { name: "correct" }) }),
|
|
311
|
+
/* @__PURE__ */ s(Y, { children: "That's for answering. Please stay tuned for the next question." })
|
|
310
312
|
] }),
|
|
311
|
-
|
|
312
|
-
/* @__PURE__ */ s(
|
|
313
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */ s(
|
|
315
|
-
/* @__PURE__ */ s(
|
|
313
|
+
(h || u) && /* @__PURE__ */ m(k, { children: [
|
|
314
|
+
/* @__PURE__ */ s(H, { "data-feedbackType": v, children: /* @__PURE__ */ s(C, { name: v }) }),
|
|
315
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ m(ee, { children: [
|
|
316
|
+
/* @__PURE__ */ s(_t, { "data-feedbackType": v, children: T == null ? void 0 : T.title }),
|
|
317
|
+
/* @__PURE__ */ s(Y, { children: T == null ? void 0 : T.description })
|
|
316
318
|
] }) })
|
|
317
319
|
] })
|
|
318
320
|
] });
|
|
319
|
-
},
|
|
321
|
+
}, Vt = /* @__PURE__ */ o("div")({
|
|
320
322
|
name: "Container",
|
|
321
323
|
class: "c14ielyq",
|
|
322
324
|
propsAsIs: !1
|
|
323
|
-
}),
|
|
325
|
+
}), Wt = /* @__PURE__ */ o("div")({
|
|
324
326
|
name: "Content",
|
|
325
327
|
class: "c1tlqx57",
|
|
326
328
|
propsAsIs: !1
|
|
327
|
-
}),
|
|
329
|
+
}), Ft = /* @__PURE__ */ o("div")({
|
|
328
330
|
name: "Title",
|
|
329
331
|
class: "t1hq58md",
|
|
330
332
|
propsAsIs: !1
|
|
331
|
-
}),
|
|
333
|
+
}), Bt = /* @__PURE__ */ o("div")({
|
|
332
334
|
name: "Options",
|
|
333
335
|
class: "o1c8nxcx",
|
|
334
336
|
propsAsIs: !1
|
|
335
|
-
}),
|
|
337
|
+
}), Ht = /* @__PURE__ */ o("button")({
|
|
336
338
|
name: "ButtonContainer",
|
|
337
339
|
class: "b1b6dl8t",
|
|
338
340
|
propsAsIs: !1
|
|
339
|
-
}),
|
|
341
|
+
}), Gt = /* @__PURE__ */ o("div")({
|
|
340
342
|
name: "ButtonPct",
|
|
341
343
|
class: "b4iik8i",
|
|
342
344
|
propsAsIs: !1
|
|
343
|
-
}),
|
|
345
|
+
}), Zt = /* @__PURE__ */ o("span")({
|
|
344
346
|
name: "ButtonBody",
|
|
345
347
|
class: "b1gq1lnf",
|
|
346
348
|
propsAsIs: !1
|
|
347
|
-
}),
|
|
349
|
+
}), Jt = /* @__PURE__ */ o("div")({
|
|
348
350
|
name: "IconContainer",
|
|
349
351
|
class: "i1j65z51",
|
|
350
352
|
propsAsIs: !1
|
|
351
|
-
}),
|
|
353
|
+
}), Kt = /* @__PURE__ */ o("div")({
|
|
352
354
|
name: "IconWrap",
|
|
353
355
|
class: "i19tpfua",
|
|
354
356
|
propsAsIs: !1
|
|
355
|
-
}),
|
|
357
|
+
}), Pe = /* @__PURE__ */ o("img")({
|
|
356
358
|
name: "Icon",
|
|
357
359
|
class: "i1tubmma",
|
|
358
360
|
propsAsIs: !1
|
|
359
|
-
}),
|
|
361
|
+
}), Xt = () => Pe, en = /* @__PURE__ */ o(Xt())({
|
|
360
362
|
name: "IconDefault",
|
|
361
363
|
class: "i1grrgwj",
|
|
362
364
|
propsAsIs: !0
|
|
363
|
-
}),
|
|
365
|
+
}), tn = () => Pe, nn = /* @__PURE__ */ o(tn())({
|
|
364
366
|
name: "IconCircle",
|
|
365
367
|
class: "ibemyq8",
|
|
366
368
|
propsAsIs: !0
|
|
367
|
-
}),
|
|
369
|
+
}), sn = /* @__PURE__ */ o("span")({
|
|
368
370
|
name: "Title",
|
|
369
371
|
class: "t1dceht",
|
|
370
372
|
propsAsIs: !1
|
|
371
|
-
}),
|
|
373
|
+
}), rn = /* @__PURE__ */ o("span")({
|
|
372
374
|
name: "Indicators",
|
|
373
375
|
class: "i116q4vq",
|
|
374
376
|
propsAsIs: !1
|
|
375
|
-
}),
|
|
377
|
+
}), on = /* @__PURE__ */ o("span")({
|
|
376
378
|
name: "Percentage",
|
|
377
379
|
class: "p17ajcu2",
|
|
378
380
|
propsAsIs: !1
|
|
379
|
-
}),
|
|
381
|
+
}), an = () => C, ln = /* @__PURE__ */ o(an())({
|
|
380
382
|
name: "CheckIcon",
|
|
381
383
|
class: "cu9kmlb",
|
|
382
384
|
propsAsIs: !0
|
|
383
|
-
}),
|
|
384
|
-
[
|
|
385
|
-
[
|
|
386
|
-
[
|
|
387
|
-
[
|
|
388
|
-
[
|
|
389
|
-
},
|
|
390
|
-
if (e ===
|
|
385
|
+
}), Ne = {
|
|
386
|
+
[B.CENTERED]: (e) => /* @__PURE__ */ s(en, { alt: "option-icon", src: e }),
|
|
387
|
+
[B.TRANSPARENT]: (e) => /* @__PURE__ */ s(Jt, { children: /* @__PURE__ */ s(Kt, { style: { backgroundImage: `url(${e})` } }) }),
|
|
388
|
+
[B.ROUNDED]: (e) => /* @__PURE__ */ s(nn, { alt: "option-icon", src: e }),
|
|
389
|
+
[B.NONE]: () => null,
|
|
390
|
+
[B.UNSET]: () => null
|
|
391
|
+
}, cn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
|
|
392
|
+
if (e === z.POLL && i)
|
|
391
393
|
return "correct";
|
|
392
|
-
if (e ===
|
|
394
|
+
if (e === z.PREDICTION) {
|
|
393
395
|
if (t && r)
|
|
394
396
|
return i ? n ? "correct" : "incorrect" : "unset";
|
|
395
397
|
if (i)
|
|
396
398
|
return "correct";
|
|
397
399
|
}
|
|
398
|
-
return e ===
|
|
399
|
-
},
|
|
400
|
+
return e === z.TRIVIA && r && i ? n ? "correct" : "incorrect" : "unset";
|
|
401
|
+
}, dn = ({
|
|
400
402
|
questionType: e,
|
|
401
403
|
questionVoted: t,
|
|
402
404
|
correct: n,
|
|
403
405
|
hasCorrectAnswer: i,
|
|
404
406
|
questionStatus: r
|
|
405
|
-
}) => e ===
|
|
407
|
+
}) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || r === U.RESOLVED && n : !1, un = (e) => {
|
|
406
408
|
var t;
|
|
407
409
|
const {
|
|
408
410
|
// option props
|
|
409
411
|
id: n,
|
|
410
412
|
icon: i,
|
|
411
413
|
text: r,
|
|
412
|
-
percentageDecimal:
|
|
414
|
+
percentageDecimal: d,
|
|
413
415
|
// extra props
|
|
414
416
|
onVote: p,
|
|
415
|
-
markThatVoted:
|
|
417
|
+
markThatVoted: l,
|
|
416
418
|
youSelected: c,
|
|
417
|
-
questionVoted:
|
|
419
|
+
questionVoted: I,
|
|
418
420
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
419
|
-
imageMode:
|
|
421
|
+
imageMode: M,
|
|
420
422
|
answerTimeExpired: S,
|
|
421
|
-
questionStatus:
|
|
422
|
-
isLoading:
|
|
423
|
-
questionType:
|
|
423
|
+
questionStatus: g,
|
|
424
|
+
isLoading: N,
|
|
425
|
+
questionType: y,
|
|
424
426
|
correct: a,
|
|
425
|
-
hasCorrectAnswer:
|
|
426
|
-
votedAfterQuestionClosed:
|
|
427
|
-
enteredAnActiveQuestion:
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
427
|
+
hasCorrectAnswer: h,
|
|
428
|
+
votedAfterQuestionClosed: u,
|
|
429
|
+
enteredAnActiveQuestion: f,
|
|
430
|
+
marketClosed: v
|
|
431
|
+
} = e, T = cn(e), A = dn({ questionType: y, questionVoted: I, correct: a, hasCorrectAnswer: h, questionStatus: g }), D = v && y === z.PREDICTION, O = I || D;
|
|
432
|
+
return /* @__PURE__ */ m(
|
|
433
|
+
Ht,
|
|
431
434
|
{
|
|
432
435
|
value: n,
|
|
433
436
|
"data-selected": c,
|
|
434
|
-
"data-answerState":
|
|
435
|
-
disabled:
|
|
436
|
-
"data-isNotChecked":
|
|
437
|
-
onClick: (
|
|
438
|
-
|
|
437
|
+
"data-answerState": T,
|
|
438
|
+
disabled: I || N || S || D && !f || D && f && u,
|
|
439
|
+
"data-isNotChecked": I && !c && T !== "incorrect",
|
|
440
|
+
onClick: (j) => {
|
|
441
|
+
l(
|
|
442
|
+
y === z.PREDICTION ? v : g === U.RESOLVED
|
|
443
|
+
), p(j);
|
|
439
444
|
},
|
|
440
445
|
children: [
|
|
441
|
-
/* @__PURE__ */ s(
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
i &&
|
|
444
|
-
/* @__PURE__ */ s(
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
/* @__PURE__ */ s(
|
|
446
|
+
/* @__PURE__ */ s(Gt, { "data-answerState": T, style: { width: `${O ? d : 0}%` } }),
|
|
447
|
+
/* @__PURE__ */ m(Zt, { children: [
|
|
448
|
+
i && M && ((t = Ne[M]) == null ? void 0 : t.call(Ne, i)),
|
|
449
|
+
/* @__PURE__ */ s(sn, { children: r }),
|
|
450
|
+
O && /* @__PURE__ */ m(rn, { children: [
|
|
451
|
+
A && /* @__PURE__ */ s(ln, { name: "selected" }),
|
|
452
|
+
/* @__PURE__ */ s(on, { children: /* @__PURE__ */ s(Le, { value: d, suffix: "%" }) })
|
|
448
453
|
] })
|
|
449
454
|
] })
|
|
450
455
|
]
|
|
451
456
|
}
|
|
452
457
|
);
|
|
453
|
-
},
|
|
458
|
+
}, pn = [q.PRIMARY_GREEN1, q.SECONDARY_RED1, q.SECONDARY_RED1, q.NEUTRALS_GRAY3], mn = [10, 10, 1, 0], hn = /* @__PURE__ */ o("div")({
|
|
454
459
|
name: "RemainingTime",
|
|
455
460
|
class: "r165427",
|
|
456
461
|
propsAsIs: !1
|
|
457
|
-
}),
|
|
462
|
+
}), In = q.SECONDARY_GREEN6, Te = q.SECONDARY_RED3, fn = q.NEUTRALS_GRAY3, gn = ({
|
|
458
463
|
isPlaying: e = !0,
|
|
459
464
|
duration: t = 30,
|
|
460
465
|
onTimerExpired: n
|
|
461
466
|
}) => {
|
|
462
|
-
const [i, r] =
|
|
467
|
+
const [i, r] = E(t > 10 ? In : Te), d = ({
|
|
463
468
|
remainingTime: c
|
|
464
|
-
}) => /* @__PURE__ */ s(
|
|
469
|
+
}) => /* @__PURE__ */ s(hn, {
|
|
465
470
|
children: c
|
|
466
|
-
}), p =
|
|
467
|
-
n == null || n(), r(
|
|
468
|
-
}, [n, r]),
|
|
469
|
-
c === 10 && r(
|
|
471
|
+
}), p = P(() => {
|
|
472
|
+
n == null || n(), r(fn);
|
|
473
|
+
}, [n, r]), l = P((c) => {
|
|
474
|
+
c === 10 && r(Te);
|
|
470
475
|
}, [r]);
|
|
471
|
-
return /* @__PURE__ */ s(
|
|
476
|
+
return /* @__PURE__ */ s(Ke, {
|
|
472
477
|
isPlaying: e,
|
|
473
478
|
duration: t,
|
|
474
|
-
colors:
|
|
475
|
-
colorsTime:
|
|
479
|
+
colors: pn,
|
|
480
|
+
colorsTime: mn,
|
|
476
481
|
size: 32,
|
|
477
482
|
strokeWidth: 2,
|
|
478
483
|
trailStrokeWidth: 2,
|
|
479
484
|
trailColor: i,
|
|
480
485
|
onComplete: p,
|
|
481
|
-
onUpdate:
|
|
482
|
-
children:
|
|
486
|
+
onUpdate: l,
|
|
487
|
+
children: d
|
|
483
488
|
});
|
|
484
|
-
},
|
|
489
|
+
}, vn = /* @__PURE__ */ o("div")({
|
|
485
490
|
name: "WinBarContainer",
|
|
486
491
|
class: "wie6cqo",
|
|
487
492
|
propsAsIs: !1
|
|
488
|
-
}),
|
|
493
|
+
}), Mn = /* @__PURE__ */ o("div")({
|
|
489
494
|
name: "Content",
|
|
490
495
|
class: "cgizw4u",
|
|
491
496
|
propsAsIs: !1
|
|
492
|
-
}),
|
|
497
|
+
}), An = /* @__PURE__ */ o("div")({
|
|
493
498
|
name: "Title",
|
|
494
499
|
class: "t1l3ucjp",
|
|
495
500
|
propsAsIs: !1
|
|
496
|
-
}),
|
|
501
|
+
}), Nn = () => C, Tn = /* @__PURE__ */ o(Nn())({
|
|
497
502
|
name: "WinIcon",
|
|
498
503
|
class: "wx7j799",
|
|
499
504
|
propsAsIs: !0
|
|
500
|
-
}),
|
|
505
|
+
}), yn = /* @__PURE__ */ o("div")({
|
|
501
506
|
name: "Points",
|
|
502
507
|
class: "p4lwuj0",
|
|
503
508
|
propsAsIs: !1
|
|
504
|
-
}),
|
|
509
|
+
}), Dn = /* @__PURE__ */ o("span")({
|
|
505
510
|
name: "PointsCount",
|
|
506
511
|
class: "po9i64o",
|
|
507
512
|
propsAsIs: !1
|
|
508
|
-
}),
|
|
513
|
+
}), Sn = /* @__PURE__ */ o("span")({
|
|
509
514
|
name: "PointsUnits",
|
|
510
515
|
class: "pe5g05h",
|
|
511
516
|
propsAsIs: !1
|
|
512
|
-
}),
|
|
517
|
+
}), zn = ({
|
|
513
518
|
title: e,
|
|
514
519
|
points: t,
|
|
515
520
|
isPlayingTimer: n,
|
|
516
521
|
isTimer: i,
|
|
517
522
|
questionType: r,
|
|
518
|
-
timerDuration:
|
|
523
|
+
timerDuration: d,
|
|
519
524
|
onTimerExpired: p
|
|
520
|
-
}) => /* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
-
e && /* @__PURE__ */ s(
|
|
523
|
-
t !== void 0 && r !==
|
|
524
|
-
/* @__PURE__ */ s(
|
|
525
|
-
/* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */ s(
|
|
527
|
-
/* @__PURE__ */ s(
|
|
525
|
+
}) => /* @__PURE__ */ m(vn, { children: [
|
|
526
|
+
/* @__PURE__ */ m(Mn, { children: [
|
|
527
|
+
e && /* @__PURE__ */ s(An, { children: e }),
|
|
528
|
+
t !== void 0 && r !== z.POLL && /* @__PURE__ */ m(k, { children: [
|
|
529
|
+
/* @__PURE__ */ s(Tn, { name: "icon-trophy" }),
|
|
530
|
+
/* @__PURE__ */ m(yn, { children: [
|
|
531
|
+
/* @__PURE__ */ s(Dn, { children: /* @__PURE__ */ s(Le, { value: t }) }),
|
|
532
|
+
/* @__PURE__ */ s(Sn, { children: "PTS" })
|
|
528
533
|
] })
|
|
529
534
|
] })
|
|
530
535
|
] }),
|
|
531
|
-
i && /* @__PURE__ */ s(
|
|
532
|
-
] }),
|
|
533
|
-
var r,
|
|
534
|
-
const p = e.subject,
|
|
535
|
-
|
|
536
|
-
c ===
|
|
536
|
+
i && /* @__PURE__ */ s(gn, { isPlaying: n, onTimerExpired: p, duration: d })
|
|
537
|
+
] }), xn = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
|
|
538
|
+
var r, d;
|
|
539
|
+
const p = e.subject, l = e.type, c = e.status, I = (r = e.options) == null ? void 0 : r.options, M = e.marketClosed, [S, g] = E(!1), [N, y] = E(!1), [a, h] = E(!0), [u, f] = E(!1), [v, T] = E(""), A = e == null ? void 0 : e.id;
|
|
540
|
+
he(() => {
|
|
541
|
+
l === z.PREDICTION ? M && h(!1) : c === U.RESOLVED && h(!1);
|
|
537
542
|
}, []);
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
}, []),
|
|
541
|
-
async (
|
|
542
|
-
if (
|
|
543
|
-
const Q =
|
|
544
|
-
|
|
543
|
+
const D = P((b) => {
|
|
544
|
+
y(b), g(!0);
|
|
545
|
+
}, []), O = P(
|
|
546
|
+
async (b) => {
|
|
547
|
+
if (A) {
|
|
548
|
+
const Q = b.currentTarget.value;
|
|
549
|
+
T(Q), await n(A, Q);
|
|
545
550
|
}
|
|
546
551
|
},
|
|
547
|
-
[
|
|
548
|
-
),
|
|
549
|
-
|
|
550
|
-
}, [i]), x =
|
|
551
|
-
() => e == null ? void 0 : e.answers.find((
|
|
552
|
+
[A, T, n]
|
|
553
|
+
), j = P(() => {
|
|
554
|
+
f(!0), setTimeout(i, 3e3);
|
|
555
|
+
}, [i]), x = w(
|
|
556
|
+
() => e == null ? void 0 : e.answers.find((b) => b.youVoted === !0),
|
|
552
557
|
[e]
|
|
553
|
-
),
|
|
554
|
-
() => !!(e != null && e.answers.find((
|
|
558
|
+
), L = w(
|
|
559
|
+
() => !!(e != null && e.answers.find((b) => b.correct === !0)),
|
|
555
560
|
[e]
|
|
556
|
-
),
|
|
557
|
-
() => e == null ? void 0 : e.answers.find((
|
|
561
|
+
), $ = w(
|
|
562
|
+
() => e == null ? void 0 : e.answers.find((b) => b.correct === !0),
|
|
558
563
|
[e]
|
|
559
|
-
),
|
|
564
|
+
), ne = w(() => e ? e.answers.map((b) => {
|
|
560
565
|
var Q;
|
|
561
566
|
return {
|
|
562
|
-
...
|
|
567
|
+
...b,
|
|
563
568
|
questionVoted: !!x,
|
|
564
|
-
youSelected:
|
|
569
|
+
youSelected: v === b.id,
|
|
565
570
|
isLoading: t,
|
|
566
|
-
hasCorrectAnswer:
|
|
571
|
+
hasCorrectAnswer: L,
|
|
567
572
|
questionType: e.type,
|
|
568
|
-
answerTimeExpired:
|
|
573
|
+
answerTimeExpired: u,
|
|
569
574
|
questionStatus: c,
|
|
570
575
|
imageMode: (Q = e.appearance) == null ? void 0 : Q.images,
|
|
571
|
-
onVote:
|
|
576
|
+
onVote: O
|
|
572
577
|
};
|
|
573
578
|
}) : [], [
|
|
574
|
-
|
|
575
|
-
|
|
579
|
+
L,
|
|
580
|
+
u,
|
|
576
581
|
t,
|
|
577
582
|
e,
|
|
578
583
|
x,
|
|
579
584
|
c,
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
]),
|
|
583
|
-
if (!(
|
|
584
|
-
return c ===
|
|
585
|
-
}, [
|
|
586
|
-
return /* @__PURE__ */ s(
|
|
585
|
+
O,
|
|
586
|
+
v
|
|
587
|
+
]), se = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, R = c === U.RESOLVED && l === z.TRIVIA && !x && !a, Z = l === z.TRIVIA && N && S && a, ie = w(() => {
|
|
588
|
+
if (!(R || u))
|
|
589
|
+
return c === U.RESOLVED ? 0 : x ? x.correct ? x.points : 0 : $ == null ? void 0 : $.points;
|
|
590
|
+
}, [u, x, $, c, R]), J = w(() => R || u ? "Time expired" : e.type === z.POLL ? "Time remaining" : x ? "You won" : "To win", [u, e.type, x, R]), W = x || R || Z || l === z.TRIVIA && c === U.RESOLVED && a;
|
|
591
|
+
return /* @__PURE__ */ s(me, { "data-question-header": "true", children: /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ m(Wt, { children: [
|
|
587
592
|
/* @__PURE__ */ s(
|
|
588
|
-
|
|
593
|
+
Yt,
|
|
589
594
|
{
|
|
590
|
-
feedbackMessages:
|
|
595
|
+
feedbackMessages: se,
|
|
591
596
|
questionVoted: !!x,
|
|
592
597
|
questionVotedCorrectly: x == null ? void 0 : x.correct,
|
|
593
|
-
questionType:
|
|
594
|
-
hasCorrectAnswer:
|
|
598
|
+
questionType: l,
|
|
599
|
+
hasCorrectAnswer: L,
|
|
595
600
|
questionStatus: c,
|
|
596
|
-
showExpiredNotification:
|
|
597
|
-
showClosedNotificationTrivia:
|
|
598
|
-
votedInCurrentRender:
|
|
599
|
-
votedAfterQuestionClosed:
|
|
600
|
-
enteredAnActiveQuestion:
|
|
601
|
+
showExpiredNotification: R,
|
|
602
|
+
showClosedNotificationTrivia: Z,
|
|
603
|
+
votedInCurrentRender: S,
|
|
604
|
+
votedAfterQuestionClosed: N,
|
|
605
|
+
enteredAnActiveQuestion: a,
|
|
606
|
+
marketClosed: M
|
|
601
607
|
}
|
|
602
608
|
),
|
|
603
|
-
e.type !==
|
|
604
|
-
|
|
609
|
+
e.type !== z.PREDICTION && /* @__PURE__ */ s(
|
|
610
|
+
zn,
|
|
605
611
|
{
|
|
606
|
-
title:
|
|
607
|
-
points:
|
|
608
|
-
onTimerExpired:
|
|
612
|
+
title: J,
|
|
613
|
+
points: ie,
|
|
614
|
+
onTimerExpired: j,
|
|
609
615
|
questionType: e.type,
|
|
610
616
|
isTimer: !t,
|
|
611
617
|
isPlayingTimer: !x,
|
|
612
|
-
timerDuration:
|
|
618
|
+
timerDuration: W ? 0 : Number(((d = e == null ? void 0 : e.appearance) == null ? void 0 : d.autoHideInterval) || "30")
|
|
613
619
|
}
|
|
614
620
|
),
|
|
615
|
-
|
|
616
|
-
|
|
621
|
+
u ? /* @__PURE__ */ s(
|
|
622
|
+
Qt,
|
|
617
623
|
{
|
|
618
624
|
title: "More to come...",
|
|
619
625
|
description: "Watch for additional enhanced stream interactive experience."
|
|
620
626
|
}
|
|
621
|
-
) : /* @__PURE__ */
|
|
622
|
-
/* @__PURE__ */ s(
|
|
623
|
-
/* @__PURE__ */ s(
|
|
624
|
-
|
|
627
|
+
) : /* @__PURE__ */ m(k, { children: [
|
|
628
|
+
/* @__PURE__ */ s(Ft, { "data-isPrediction": e.type === z.PREDICTION, children: p }),
|
|
629
|
+
/* @__PURE__ */ s(Bt, { children: ne.map((b) => /* @__PURE__ */ s(
|
|
630
|
+
un,
|
|
625
631
|
{
|
|
626
|
-
...
|
|
627
|
-
markThatVoted:
|
|
628
|
-
votedAfterQuestionClosed:
|
|
629
|
-
enteredAnActiveQuestion:
|
|
632
|
+
...b,
|
|
633
|
+
markThatVoted: D,
|
|
634
|
+
votedAfterQuestionClosed: N,
|
|
635
|
+
enteredAnActiveQuestion: a,
|
|
636
|
+
marketClosed: M
|
|
630
637
|
},
|
|
631
|
-
|
|
638
|
+
b.id
|
|
632
639
|
)) })
|
|
633
640
|
] })
|
|
634
641
|
] }) }) });
|
|
635
|
-
},
|
|
642
|
+
}, On = /* @__PURE__ */ o("div")({
|
|
636
643
|
name: "Container",
|
|
637
644
|
class: "cgn5uen",
|
|
638
645
|
propsAsIs: !1
|
|
639
|
-
}),
|
|
646
|
+
}), bn = /* @__PURE__ */ o("div")({
|
|
640
647
|
name: "Content",
|
|
641
648
|
class: "c1px8nt6",
|
|
642
649
|
propsAsIs: !1
|
|
643
|
-
}),
|
|
650
|
+
}), Cn = /* @__PURE__ */ o("h3")({
|
|
644
651
|
name: "Title",
|
|
645
652
|
class: "t5et2jt",
|
|
646
653
|
propsAsIs: !1
|
|
647
|
-
}),
|
|
654
|
+
}), jn = /* @__PURE__ */ o("div")({
|
|
648
655
|
name: "Description",
|
|
649
656
|
class: "d1i2kpk2",
|
|
650
657
|
propsAsIs: !1
|
|
651
|
-
}),
|
|
658
|
+
}), kn = /* @__PURE__ */ o("div")({
|
|
652
659
|
name: "DateWrap",
|
|
653
660
|
class: "dd3lh3p",
|
|
654
661
|
propsAsIs: !1
|
|
655
|
-
}),
|
|
662
|
+
}), wn = /* @__PURE__ */ o("img")({
|
|
656
663
|
name: "Image",
|
|
657
664
|
class: "i1gfjeu5",
|
|
658
665
|
propsAsIs: !1
|
|
659
|
-
}),
|
|
666
|
+
}), _e = ({
|
|
660
667
|
created: e,
|
|
661
668
|
image: t,
|
|
662
669
|
title: n,
|
|
663
670
|
isPickHistory: i,
|
|
664
671
|
instantView: r
|
|
665
672
|
}) => {
|
|
666
|
-
const
|
|
673
|
+
const d = w(() => {
|
|
667
674
|
if (e) {
|
|
668
|
-
const
|
|
669
|
-
if (
|
|
675
|
+
const l = new Date(e);
|
|
676
|
+
if (ge(l))
|
|
670
677
|
return {
|
|
671
|
-
date:
|
|
672
|
-
time:
|
|
678
|
+
date: Ie(l),
|
|
679
|
+
time: fe(l)
|
|
673
680
|
};
|
|
674
681
|
}
|
|
675
682
|
return null;
|
|
676
683
|
}, [e]), p = (r == null ? void 0 : r.image) || t;
|
|
677
|
-
return /* @__PURE__ */
|
|
678
|
-
|
|
679
|
-
|
|
684
|
+
return /* @__PURE__ */ m(On, { children: [
|
|
685
|
+
d && /* @__PURE__ */ m(kn, { children: [
|
|
686
|
+
d.date,
|
|
680
687
|
" · ",
|
|
681
|
-
|
|
688
|
+
d.time
|
|
682
689
|
] }),
|
|
683
|
-
(r == null ? void 0 : r.video) && /* @__PURE__ */ s(
|
|
684
|
-
p && !(r != null && r.video) && /* @__PURE__ */ s(
|
|
685
|
-
/* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */ s(
|
|
687
|
-
!i && /* @__PURE__ */ s(
|
|
690
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ s(We, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
691
|
+
p && !(r != null && r.video) && /* @__PURE__ */ s(wn, { src: p }),
|
|
692
|
+
/* @__PURE__ */ m(bn, { children: [
|
|
693
|
+
/* @__PURE__ */ s(Cn, { children: i ? n : r == null ? void 0 : r.heading }),
|
|
694
|
+
!i && /* @__PURE__ */ s(jn, { children: r == null ? void 0 : r.body })
|
|
688
695
|
] })
|
|
689
696
|
] });
|
|
690
|
-
},
|
|
697
|
+
}, En = /* @__PURE__ */ o("div")({
|
|
691
698
|
name: "Container",
|
|
692
699
|
class: "c1euiow",
|
|
693
700
|
propsAsIs: !1
|
|
694
|
-
}),
|
|
701
|
+
}), Ln = /* @__PURE__ */ o("a")({
|
|
695
702
|
name: "WebLinkBtn",
|
|
696
703
|
class: "w19zie3h",
|
|
697
704
|
propsAsIs: !1
|
|
698
|
-
}),
|
|
699
|
-
/* @__PURE__ */ s(
|
|
700
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */
|
|
701
|
-
|
|
702
|
-
/* @__PURE__ */ s(
|
|
705
|
+
}), $n = ({ instantView: e, ...t }) => /* @__PURE__ */ m(En, { children: [
|
|
706
|
+
/* @__PURE__ */ s(_e, { instantView: e, ...t }),
|
|
707
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ m(Ln, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
708
|
+
e == null ? void 0 : e.webLink.label,
|
|
709
|
+
/* @__PURE__ */ s(C, { name: "icon-external-link" })
|
|
703
710
|
] })
|
|
704
|
-
] }),
|
|
711
|
+
] }), Rn = /* @__PURE__ */ o("div")({
|
|
705
712
|
name: "Container",
|
|
706
713
|
class: "c1dcxmvf",
|
|
707
714
|
propsAsIs: !1
|
|
708
|
-
}),
|
|
715
|
+
}), Qn = /* @__PURE__ */ o("div")({
|
|
709
716
|
name: "DateTime",
|
|
710
717
|
class: "db4q22c",
|
|
711
718
|
propsAsIs: !1
|
|
712
|
-
}),
|
|
719
|
+
}), Un = /* @__PURE__ */ o("blockquote")({
|
|
713
720
|
name: "Quote",
|
|
714
721
|
class: "q111mmic",
|
|
715
722
|
propsAsIs: !1
|
|
716
|
-
}),
|
|
717
|
-
const n =
|
|
723
|
+
}), qn = ({ created: e, ...t }) => {
|
|
724
|
+
const n = w(() => {
|
|
718
725
|
if (e) {
|
|
719
726
|
const i = new Date(e);
|
|
720
|
-
if (
|
|
727
|
+
if (ge(i))
|
|
721
728
|
return {
|
|
722
|
-
date:
|
|
723
|
-
time:
|
|
729
|
+
date: Ie(i),
|
|
730
|
+
time: fe(i)
|
|
724
731
|
};
|
|
725
732
|
}
|
|
726
733
|
return null;
|
|
727
734
|
}, [e]);
|
|
728
|
-
return /* @__PURE__ */
|
|
729
|
-
n && /* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ m(Rn, { children: [
|
|
736
|
+
n && /* @__PURE__ */ m(Qn, { children: [
|
|
730
737
|
n.date,
|
|
731
738
|
" · ",
|
|
732
739
|
n.time
|
|
733
740
|
] }),
|
|
734
|
-
t.title && /* @__PURE__ */ s(
|
|
741
|
+
t.title && /* @__PURE__ */ s(Un, { children: t.title }),
|
|
735
742
|
/* @__PURE__ */ s(we, { ...t })
|
|
736
743
|
] });
|
|
737
|
-
},
|
|
744
|
+
}, Pn = /* @__PURE__ */ o("div")({
|
|
738
745
|
name: "QuestionContainer",
|
|
739
746
|
class: "qdri6g3",
|
|
740
747
|
propsAsIs: !1
|
|
741
|
-
}),
|
|
748
|
+
}), _n = ({
|
|
742
749
|
openedQuestion: e
|
|
743
750
|
}) => {
|
|
744
751
|
var t, n;
|
|
745
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(
|
|
752
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s($n, {
|
|
746
753
|
created: e.attributes.created,
|
|
747
754
|
...e.attributes.attributes.value
|
|
748
|
-
}) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(
|
|
755
|
+
}) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(qn, {
|
|
749
756
|
created: e.attributes.created,
|
|
750
757
|
...e.attributes.attributes.value
|
|
751
758
|
}) : null;
|
|
752
|
-
},
|
|
759
|
+
}, Yn = ({
|
|
753
760
|
extendedQuestion: e,
|
|
754
761
|
vote: t,
|
|
755
762
|
close: n
|
|
@@ -758,59 +765,59 @@ const Ze = /* @__PURE__ */ o("div")({
|
|
|
758
765
|
loading: i,
|
|
759
766
|
data: r
|
|
760
767
|
} = e;
|
|
761
|
-
return r ? /* @__PURE__ */ s(
|
|
768
|
+
return r ? /* @__PURE__ */ s(xn, {
|
|
762
769
|
vote: t,
|
|
763
770
|
close: n,
|
|
764
771
|
openedQuestion: r,
|
|
765
772
|
isLoading: !!i
|
|
766
773
|
}) : null;
|
|
767
|
-
},
|
|
774
|
+
}, Vn = ({
|
|
768
775
|
gamification: e
|
|
769
776
|
}) => {
|
|
770
777
|
var t;
|
|
771
|
-
const n =
|
|
778
|
+
const n = _(e.openedQuestion.$store), i = _(e.openedQuestion.$extendedStore);
|
|
772
779
|
if (!n)
|
|
773
780
|
return null;
|
|
774
781
|
const r = n.type;
|
|
775
|
-
return /* @__PURE__ */
|
|
776
|
-
children: [/* @__PURE__ */ s(
|
|
782
|
+
return /* @__PURE__ */ m(Pn, {
|
|
783
|
+
children: [/* @__PURE__ */ s(Re, {
|
|
777
784
|
close: e.closeQuestion,
|
|
778
|
-
type: ((t = n.attributes) == null ? void 0 : t.type) ||
|
|
779
|
-
}), r === "question" && /* @__PURE__ */ s(
|
|
785
|
+
type: ((t = n.attributes) == null ? void 0 : t.type) || z.UNSET
|
|
786
|
+
}), r === "question" && /* @__PURE__ */ s(Yn, {
|
|
780
787
|
vote: e.submitAnswer,
|
|
781
788
|
close: e.closeQuestion,
|
|
782
789
|
extendedQuestion: i
|
|
783
|
-
}), r !== "question" && /* @__PURE__ */ s(
|
|
790
|
+
}), r !== "question" && /* @__PURE__ */ s(_n, {
|
|
784
791
|
openedQuestion: n
|
|
785
|
-
}), /* @__PURE__ */ s(
|
|
792
|
+
}), /* @__PURE__ */ s(Et, {
|
|
786
793
|
sponsorLogo: ""
|
|
787
794
|
})]
|
|
788
795
|
});
|
|
789
|
-
},
|
|
796
|
+
}, Wn = /* @__PURE__ */ o("div")({
|
|
790
797
|
name: "Container",
|
|
791
798
|
class: "c115qtkr",
|
|
792
799
|
propsAsIs: !1
|
|
793
|
-
}),
|
|
800
|
+
}), Fn = /* @__PURE__ */ o("div")({
|
|
794
801
|
name: "STabs",
|
|
795
802
|
class: "sxnslc8",
|
|
796
803
|
propsAsIs: !1
|
|
797
|
-
}),
|
|
804
|
+
}), Bn = /* @__PURE__ */ o("button")({
|
|
798
805
|
name: "Button",
|
|
799
806
|
class: "b1umzux0",
|
|
800
807
|
propsAsIs: !1
|
|
801
|
-
}),
|
|
808
|
+
}), Hn = /* @__PURE__ */ o("span")({
|
|
802
809
|
name: "Title",
|
|
803
810
|
class: "tspsaas",
|
|
804
811
|
propsAsIs: !1
|
|
805
812
|
});
|
|
806
|
-
var
|
|
807
|
-
const
|
|
808
|
-
/* @__PURE__ */ s(
|
|
813
|
+
var G = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(G || {});
|
|
814
|
+
const ye = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Bn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(Hn, { children: e }) }), Gn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(Wn, { children: /* @__PURE__ */ m(Fn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
815
|
+
/* @__PURE__ */ s(ye, { title: "Home", active: e === "home", onClick: () => t(
|
|
809
816
|
"home"
|
|
810
817
|
/* HOME */
|
|
811
818
|
) }),
|
|
812
819
|
/* @__PURE__ */ s(
|
|
813
|
-
|
|
820
|
+
ye,
|
|
814
821
|
{
|
|
815
822
|
title: "Friends",
|
|
816
823
|
active: e === "leaderboard",
|
|
@@ -821,175 +828,175 @@ const Ne = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Vn, { onCl
|
|
|
821
828
|
}
|
|
822
829
|
)
|
|
823
830
|
] }) });
|
|
824
|
-
function
|
|
825
|
-
return
|
|
831
|
+
function ue() {
|
|
832
|
+
return ue = Object.assign ? Object.assign.bind() : function(e) {
|
|
826
833
|
for (var t = 1; t < arguments.length; t++) {
|
|
827
834
|
var n = arguments[t];
|
|
828
835
|
for (var i in n)
|
|
829
836
|
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
830
837
|
}
|
|
831
838
|
return e;
|
|
832
|
-
},
|
|
839
|
+
}, ue.apply(this, arguments);
|
|
833
840
|
}
|
|
834
|
-
function
|
|
841
|
+
function De(e) {
|
|
835
842
|
if (e === void 0)
|
|
836
843
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
837
844
|
return e;
|
|
838
845
|
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
846
|
+
function pe(e, t) {
|
|
847
|
+
return pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
|
|
841
848
|
return i.__proto__ = r, i;
|
|
842
|
-
},
|
|
849
|
+
}, pe(e, t);
|
|
843
850
|
}
|
|
844
|
-
function
|
|
845
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
851
|
+
function Zn(e, t) {
|
|
852
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, pe(e, t);
|
|
846
853
|
}
|
|
847
|
-
var
|
|
854
|
+
var Se = Number.isNaN || function(t) {
|
|
848
855
|
return typeof t == "number" && t !== t;
|
|
849
856
|
};
|
|
850
|
-
function
|
|
851
|
-
return !!(e === t ||
|
|
857
|
+
function Jn(e, t) {
|
|
858
|
+
return !!(e === t || Se(e) && Se(t));
|
|
852
859
|
}
|
|
853
|
-
function
|
|
860
|
+
function Kn(e, t) {
|
|
854
861
|
if (e.length !== t.length)
|
|
855
862
|
return !1;
|
|
856
863
|
for (var n = 0; n < e.length; n++)
|
|
857
|
-
if (!
|
|
864
|
+
if (!Jn(e[n], t[n]))
|
|
858
865
|
return !1;
|
|
859
866
|
return !0;
|
|
860
867
|
}
|
|
861
|
-
function
|
|
862
|
-
t === void 0 && (t =
|
|
863
|
-
var n, i = [], r,
|
|
868
|
+
function ae(e, t) {
|
|
869
|
+
t === void 0 && (t = Kn);
|
|
870
|
+
var n, i = [], r, d = !1;
|
|
864
871
|
function p() {
|
|
865
|
-
for (var
|
|
866
|
-
|
|
867
|
-
return
|
|
872
|
+
for (var l = [], c = 0; c < arguments.length; c++)
|
|
873
|
+
l[c] = arguments[c];
|
|
874
|
+
return d && n === this && t(l, i) || (r = e.apply(this, l), d = !0, n = this, i = l), r;
|
|
868
875
|
}
|
|
869
876
|
return p;
|
|
870
877
|
}
|
|
871
|
-
var
|
|
878
|
+
var Xn = typeof performance == "object" && typeof performance.now == "function", ze = Xn ? function() {
|
|
872
879
|
return performance.now();
|
|
873
880
|
} : function() {
|
|
874
881
|
return Date.now();
|
|
875
882
|
};
|
|
876
|
-
function
|
|
883
|
+
function xe(e) {
|
|
877
884
|
cancelAnimationFrame(e.id);
|
|
878
885
|
}
|
|
879
|
-
function
|
|
880
|
-
var n =
|
|
886
|
+
function es(e, t) {
|
|
887
|
+
var n = ze();
|
|
881
888
|
function i() {
|
|
882
|
-
|
|
889
|
+
ze() - n >= t ? e.call(null) : r.id = requestAnimationFrame(i);
|
|
883
890
|
}
|
|
884
891
|
var r = {
|
|
885
892
|
id: requestAnimationFrame(i)
|
|
886
893
|
};
|
|
887
894
|
return r;
|
|
888
895
|
}
|
|
889
|
-
var
|
|
890
|
-
function
|
|
891
|
-
if (e === void 0 && (e = !1),
|
|
896
|
+
var le = -1;
|
|
897
|
+
function Oe(e) {
|
|
898
|
+
if (e === void 0 && (e = !1), le === -1 || e) {
|
|
892
899
|
var t = document.createElement("div"), n = t.style;
|
|
893
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t),
|
|
900
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), le = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
894
901
|
}
|
|
895
|
-
return
|
|
902
|
+
return le;
|
|
896
903
|
}
|
|
897
|
-
var
|
|
898
|
-
function
|
|
899
|
-
if (e === void 0 && (e = !1),
|
|
904
|
+
var V = null;
|
|
905
|
+
function be(e) {
|
|
906
|
+
if (e === void 0 && (e = !1), V === null || e) {
|
|
900
907
|
var t = document.createElement("div"), n = t.style;
|
|
901
908
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
902
909
|
var i = document.createElement("div"), r = i.style;
|
|
903
|
-
return r.width = "100px", r.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ?
|
|
910
|
+
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;
|
|
904
911
|
}
|
|
905
|
-
return
|
|
912
|
+
return V;
|
|
906
913
|
}
|
|
907
|
-
var
|
|
914
|
+
var ts = 150, ns = function(t, n) {
|
|
908
915
|
return t;
|
|
909
916
|
};
|
|
910
|
-
function
|
|
911
|
-
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize,
|
|
917
|
+
function ss(e) {
|
|
918
|
+
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, d = e.getOffsetForIndexAndAlignment, p = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, c = e.initInstanceProps, I = e.shouldResetStyleCacheOnItemSizeChange, M = e.validateProps;
|
|
912
919
|
return t = /* @__PURE__ */ function(S) {
|
|
913
|
-
|
|
914
|
-
function
|
|
920
|
+
Zn(g, S);
|
|
921
|
+
function g(y) {
|
|
915
922
|
var a;
|
|
916
|
-
return a = S.call(this,
|
|
917
|
-
instance:
|
|
923
|
+
return a = S.call(this, y) || this, a._instanceProps = c(a.props, De(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
|
|
924
|
+
instance: De(a),
|
|
918
925
|
isScrolling: !1,
|
|
919
926
|
scrollDirection: "forward",
|
|
920
927
|
scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
|
|
921
928
|
scrollUpdateWasRequested: !1
|
|
922
|
-
}, a._callOnItemsRendered = void 0, a._callOnItemsRendered =
|
|
929
|
+
}, a._callOnItemsRendered = void 0, a._callOnItemsRendered = ae(function(h, u, f, v) {
|
|
923
930
|
return a.props.onItemsRendered({
|
|
924
|
-
overscanStartIndex:
|
|
925
|
-
overscanStopIndex:
|
|
926
|
-
visibleStartIndex:
|
|
927
|
-
visibleStopIndex:
|
|
931
|
+
overscanStartIndex: h,
|
|
932
|
+
overscanStopIndex: u,
|
|
933
|
+
visibleStartIndex: f,
|
|
934
|
+
visibleStopIndex: v
|
|
928
935
|
});
|
|
929
|
-
}), a._callOnScroll = void 0, a._callOnScroll =
|
|
936
|
+
}), a._callOnScroll = void 0, a._callOnScroll = ae(function(h, u, f) {
|
|
930
937
|
return a.props.onScroll({
|
|
931
|
-
scrollDirection:
|
|
932
|
-
scrollOffset:
|
|
933
|
-
scrollUpdateWasRequested:
|
|
938
|
+
scrollDirection: h,
|
|
939
|
+
scrollOffset: u,
|
|
940
|
+
scrollUpdateWasRequested: f
|
|
934
941
|
});
|
|
935
|
-
}), a._getItemStyle = void 0, a._getItemStyle = function(
|
|
936
|
-
var
|
|
937
|
-
if (
|
|
938
|
-
|
|
942
|
+
}), a._getItemStyle = void 0, a._getItemStyle = function(h) {
|
|
943
|
+
var u = a.props, f = u.direction, v = u.itemSize, T = u.layout, A = a._getItemStyleCache(I && v, I && T, I && f), D;
|
|
944
|
+
if (A.hasOwnProperty(h))
|
|
945
|
+
D = A[h];
|
|
939
946
|
else {
|
|
940
|
-
var O = n(a.props,
|
|
941
|
-
|
|
947
|
+
var O = n(a.props, h, a._instanceProps), j = r(a.props, h, a._instanceProps), x = f === "horizontal" || T === "horizontal", L = f === "rtl", $ = x ? O : 0;
|
|
948
|
+
A[h] = D = {
|
|
942
949
|
position: "absolute",
|
|
943
|
-
left: L ? void 0 :
|
|
944
|
-
right: L ?
|
|
945
|
-
top:
|
|
946
|
-
height:
|
|
947
|
-
width:
|
|
950
|
+
left: L ? void 0 : $,
|
|
951
|
+
right: L ? $ : void 0,
|
|
952
|
+
top: x ? 0 : O,
|
|
953
|
+
height: x ? "100%" : j,
|
|
954
|
+
width: x ? j : "100%"
|
|
948
955
|
};
|
|
949
956
|
}
|
|
950
|
-
return
|
|
951
|
-
}, a._getItemStyleCache = void 0, a._getItemStyleCache =
|
|
957
|
+
return D;
|
|
958
|
+
}, a._getItemStyleCache = void 0, a._getItemStyleCache = ae(function(h, u, f) {
|
|
952
959
|
return {};
|
|
953
|
-
}), a._onScrollHorizontal = function(
|
|
954
|
-
var
|
|
955
|
-
a.setState(function(
|
|
956
|
-
if (
|
|
960
|
+
}), a._onScrollHorizontal = function(h) {
|
|
961
|
+
var u = h.currentTarget, f = u.clientWidth, v = u.scrollLeft, T = u.scrollWidth;
|
|
962
|
+
a.setState(function(A) {
|
|
963
|
+
if (A.scrollOffset === v)
|
|
957
964
|
return null;
|
|
958
|
-
var
|
|
959
|
-
if (
|
|
960
|
-
switch (
|
|
965
|
+
var D = a.props.direction, O = v;
|
|
966
|
+
if (D === "rtl")
|
|
967
|
+
switch (be()) {
|
|
961
968
|
case "negative":
|
|
962
|
-
O = -
|
|
969
|
+
O = -v;
|
|
963
970
|
break;
|
|
964
971
|
case "positive-descending":
|
|
965
|
-
O =
|
|
972
|
+
O = T - f - v;
|
|
966
973
|
break;
|
|
967
974
|
}
|
|
968
|
-
return O = Math.max(0, Math.min(O,
|
|
975
|
+
return O = Math.max(0, Math.min(O, T - f)), {
|
|
969
976
|
isScrolling: !0,
|
|
970
|
-
scrollDirection:
|
|
977
|
+
scrollDirection: A.scrollOffset < v ? "forward" : "backward",
|
|
971
978
|
scrollOffset: O,
|
|
972
979
|
scrollUpdateWasRequested: !1
|
|
973
980
|
};
|
|
974
981
|
}, a._resetIsScrollingDebounced);
|
|
975
|
-
}, a._onScrollVertical = function(
|
|
976
|
-
var
|
|
977
|
-
a.setState(function(
|
|
978
|
-
if (
|
|
982
|
+
}, a._onScrollVertical = function(h) {
|
|
983
|
+
var u = h.currentTarget, f = u.clientHeight, v = u.scrollHeight, T = u.scrollTop;
|
|
984
|
+
a.setState(function(A) {
|
|
985
|
+
if (A.scrollOffset === T)
|
|
979
986
|
return null;
|
|
980
|
-
var
|
|
987
|
+
var D = Math.max(0, Math.min(T, v - f));
|
|
981
988
|
return {
|
|
982
989
|
isScrolling: !0,
|
|
983
|
-
scrollDirection:
|
|
984
|
-
scrollOffset:
|
|
990
|
+
scrollDirection: A.scrollOffset < D ? "forward" : "backward",
|
|
991
|
+
scrollOffset: D,
|
|
985
992
|
scrollUpdateWasRequested: !1
|
|
986
993
|
};
|
|
987
994
|
}, a._resetIsScrollingDebounced);
|
|
988
|
-
}, a._outerRefSetter = function(
|
|
989
|
-
var
|
|
990
|
-
a._outerRef =
|
|
995
|
+
}, a._outerRefSetter = function(h) {
|
|
996
|
+
var u = a.props.outerRef;
|
|
997
|
+
a._outerRef = h, typeof u == "function" ? u(h) : u != null && typeof u == "object" && u.hasOwnProperty("current") && (u.current = h);
|
|
991
998
|
}, a._resetIsScrollingDebounced = function() {
|
|
992
|
-
a._resetIsScrollingTimeoutId !== null &&
|
|
999
|
+
a._resetIsScrollingTimeoutId !== null && xe(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = es(a._resetIsScrolling, ts);
|
|
993
1000
|
}, a._resetIsScrolling = function() {
|
|
994
1001
|
a._resetIsScrollingTimeoutId = null, a.setState({
|
|
995
1002
|
isScrolling: !1
|
|
@@ -998,115 +1005,115 @@ function es(e) {
|
|
|
998
1005
|
});
|
|
999
1006
|
}, a;
|
|
1000
1007
|
}
|
|
1001
|
-
|
|
1002
|
-
return
|
|
1008
|
+
g.getDerivedStateFromProps = function(a, h) {
|
|
1009
|
+
return is(a, h), M(a), null;
|
|
1003
1010
|
};
|
|
1004
|
-
var
|
|
1005
|
-
return
|
|
1006
|
-
a = Math.max(0, a), this.setState(function(
|
|
1007
|
-
return
|
|
1008
|
-
scrollDirection:
|
|
1011
|
+
var N = g.prototype;
|
|
1012
|
+
return N.scrollTo = function(a) {
|
|
1013
|
+
a = Math.max(0, a), this.setState(function(h) {
|
|
1014
|
+
return h.scrollOffset === a ? null : {
|
|
1015
|
+
scrollDirection: h.scrollOffset < a ? "forward" : "backward",
|
|
1009
1016
|
scrollOffset: a,
|
|
1010
1017
|
scrollUpdateWasRequested: !0
|
|
1011
1018
|
};
|
|
1012
1019
|
}, this._resetIsScrollingDebounced);
|
|
1013
|
-
},
|
|
1014
|
-
|
|
1015
|
-
var
|
|
1016
|
-
a = Math.max(0, Math.min(a,
|
|
1017
|
-
var
|
|
1020
|
+
}, N.scrollToItem = function(a, h) {
|
|
1021
|
+
h === void 0 && (h = "auto");
|
|
1022
|
+
var u = this.props, f = u.itemCount, v = u.layout, T = this.state.scrollOffset;
|
|
1023
|
+
a = Math.max(0, Math.min(a, f - 1));
|
|
1024
|
+
var A = 0;
|
|
1018
1025
|
if (this._outerRef) {
|
|
1019
|
-
var
|
|
1020
|
-
|
|
1026
|
+
var D = this._outerRef;
|
|
1027
|
+
v === "vertical" ? A = D.scrollWidth > D.clientWidth ? Oe() : 0 : A = D.scrollHeight > D.clientHeight ? Oe() : 0;
|
|
1021
1028
|
}
|
|
1022
|
-
this.scrollTo(
|
|
1023
|
-
},
|
|
1024
|
-
var a = this.props,
|
|
1025
|
-
if (typeof
|
|
1026
|
-
var
|
|
1027
|
-
|
|
1029
|
+
this.scrollTo(d(this.props, a, h, T, this._instanceProps, A));
|
|
1030
|
+
}, N.componentDidMount = function() {
|
|
1031
|
+
var a = this.props, h = a.direction, u = a.initialScrollOffset, f = a.layout;
|
|
1032
|
+
if (typeof u == "number" && this._outerRef != null) {
|
|
1033
|
+
var v = this._outerRef;
|
|
1034
|
+
h === "horizontal" || f === "horizontal" ? v.scrollLeft = u : v.scrollTop = u;
|
|
1028
1035
|
}
|
|
1029
1036
|
this._callPropsCallbacks();
|
|
1030
|
-
},
|
|
1031
|
-
var a = this.props,
|
|
1032
|
-
if (
|
|
1033
|
-
var
|
|
1034
|
-
if (
|
|
1035
|
-
if (
|
|
1036
|
-
switch (
|
|
1037
|
+
}, N.componentDidUpdate = function() {
|
|
1038
|
+
var a = this.props, h = a.direction, u = a.layout, f = this.state, v = f.scrollOffset, T = f.scrollUpdateWasRequested;
|
|
1039
|
+
if (T && this._outerRef != null) {
|
|
1040
|
+
var A = this._outerRef;
|
|
1041
|
+
if (h === "horizontal" || u === "horizontal")
|
|
1042
|
+
if (h === "rtl")
|
|
1043
|
+
switch (be()) {
|
|
1037
1044
|
case "negative":
|
|
1038
|
-
|
|
1045
|
+
A.scrollLeft = -v;
|
|
1039
1046
|
break;
|
|
1040
1047
|
case "positive-ascending":
|
|
1041
|
-
|
|
1048
|
+
A.scrollLeft = v;
|
|
1042
1049
|
break;
|
|
1043
1050
|
default:
|
|
1044
|
-
var
|
|
1045
|
-
|
|
1051
|
+
var D = A.clientWidth, O = A.scrollWidth;
|
|
1052
|
+
A.scrollLeft = O - D - v;
|
|
1046
1053
|
break;
|
|
1047
1054
|
}
|
|
1048
1055
|
else
|
|
1049
|
-
|
|
1056
|
+
A.scrollLeft = v;
|
|
1050
1057
|
else
|
|
1051
|
-
|
|
1058
|
+
A.scrollTop = v;
|
|
1052
1059
|
}
|
|
1053
1060
|
this._callPropsCallbacks();
|
|
1054
|
-
},
|
|
1055
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1056
|
-
},
|
|
1057
|
-
var a = this.props,
|
|
1061
|
+
}, N.componentWillUnmount = function() {
|
|
1062
|
+
this._resetIsScrollingTimeoutId !== null && xe(this._resetIsScrollingTimeoutId);
|
|
1063
|
+
}, N.render = function() {
|
|
1064
|
+
var a = this.props, h = a.children, u = a.className, f = a.direction, v = a.height, T = a.innerRef, A = a.innerElementType, D = a.innerTagName, O = a.itemCount, j = a.itemData, x = a.itemKey, L = x === void 0 ? ns : x, $ = a.layout, ne = a.outerElementType, se = a.outerTagName, R = a.style, Z = a.useIsScrolling, ie = a.width, J = this.state.isScrolling, W = f === "horizontal" || $ === "horizontal", b = W ? this._onScrollHorizontal : this._onScrollVertical, Q = this._getRangeToRender(), Ye = Q[0], Ve = Q[1], ve = [];
|
|
1058
1065
|
if (O > 0)
|
|
1059
|
-
for (var
|
|
1060
|
-
|
|
1061
|
-
data:
|
|
1062
|
-
key: L(
|
|
1063
|
-
index:
|
|
1064
|
-
isScrolling:
|
|
1065
|
-
style: this._getItemStyle(
|
|
1066
|
+
for (var F = Ye; F <= Ve; F++)
|
|
1067
|
+
ve.push(re(h, {
|
|
1068
|
+
data: j,
|
|
1069
|
+
key: L(F, j),
|
|
1070
|
+
index: F,
|
|
1071
|
+
isScrolling: Z ? J : void 0,
|
|
1072
|
+
style: this._getItemStyle(F)
|
|
1066
1073
|
}));
|
|
1067
|
-
var
|
|
1068
|
-
return
|
|
1069
|
-
className:
|
|
1070
|
-
onScroll:
|
|
1074
|
+
var Me = i(this.props, this._instanceProps);
|
|
1075
|
+
return re(ne || se || "div", {
|
|
1076
|
+
className: u,
|
|
1077
|
+
onScroll: b,
|
|
1071
1078
|
ref: this._outerRefSetter,
|
|
1072
|
-
style:
|
|
1079
|
+
style: ue({
|
|
1073
1080
|
position: "relative",
|
|
1074
|
-
height:
|
|
1075
|
-
width:
|
|
1081
|
+
height: v,
|
|
1082
|
+
width: ie,
|
|
1076
1083
|
overflow: "auto",
|
|
1077
1084
|
WebkitOverflowScrolling: "touch",
|
|
1078
1085
|
willChange: "transform",
|
|
1079
|
-
direction:
|
|
1080
|
-
},
|
|
1081
|
-
},
|
|
1082
|
-
children:
|
|
1083
|
-
ref:
|
|
1086
|
+
direction: f
|
|
1087
|
+
}, R)
|
|
1088
|
+
}, re(A || D || "div", {
|
|
1089
|
+
children: ve,
|
|
1090
|
+
ref: T,
|
|
1084
1091
|
style: {
|
|
1085
|
-
height:
|
|
1086
|
-
pointerEvents:
|
|
1087
|
-
width:
|
|
1092
|
+
height: W ? "100%" : Me,
|
|
1093
|
+
pointerEvents: J ? "none" : void 0,
|
|
1094
|
+
width: W ? Me : "100%"
|
|
1088
1095
|
}
|
|
1089
1096
|
}));
|
|
1090
|
-
},
|
|
1097
|
+
}, N._callPropsCallbacks = function() {
|
|
1091
1098
|
if (typeof this.props.onItemsRendered == "function") {
|
|
1092
1099
|
var a = this.props.itemCount;
|
|
1093
1100
|
if (a > 0) {
|
|
1094
|
-
var
|
|
1095
|
-
this._callOnItemsRendered(
|
|
1101
|
+
var h = this._getRangeToRender(), u = h[0], f = h[1], v = h[2], T = h[3];
|
|
1102
|
+
this._callOnItemsRendered(u, f, v, T);
|
|
1096
1103
|
}
|
|
1097
1104
|
}
|
|
1098
1105
|
if (typeof this.props.onScroll == "function") {
|
|
1099
|
-
var
|
|
1100
|
-
this._callOnScroll(
|
|
1106
|
+
var A = this.state, D = A.scrollDirection, O = A.scrollOffset, j = A.scrollUpdateWasRequested;
|
|
1107
|
+
this._callOnScroll(D, O, j);
|
|
1101
1108
|
}
|
|
1102
|
-
},
|
|
1103
|
-
var a = this.props,
|
|
1104
|
-
if (
|
|
1109
|
+
}, N._getRangeToRender = function() {
|
|
1110
|
+
var a = this.props, h = a.itemCount, u = a.overscanCount, f = this.state, v = f.isScrolling, T = f.scrollDirection, A = f.scrollOffset;
|
|
1111
|
+
if (h === 0)
|
|
1105
1112
|
return [0, 0, 0, 0];
|
|
1106
|
-
var
|
|
1107
|
-
return [Math.max(0,
|
|
1108
|
-
},
|
|
1109
|
-
}(
|
|
1113
|
+
var D = p(this.props, A, this._instanceProps), O = l(this.props, D, A, this._instanceProps), j = !v || T === "backward" ? Math.max(1, u) : 1, x = !v || T === "forward" ? Math.max(1, u) : 1;
|
|
1114
|
+
return [Math.max(0, D - j), Math.max(0, Math.min(h - 1, O + x)), D, O];
|
|
1115
|
+
}, g;
|
|
1116
|
+
}(Ee), t.defaultProps = {
|
|
1110
1117
|
direction: "ltr",
|
|
1111
1118
|
itemData: void 0,
|
|
1112
1119
|
layout: "vertical",
|
|
@@ -1114,9 +1121,9 @@ function es(e) {
|
|
|
1114
1121
|
useIsScrolling: !1
|
|
1115
1122
|
}, t;
|
|
1116
1123
|
}
|
|
1117
|
-
var
|
|
1124
|
+
var is = function(t, n) {
|
|
1118
1125
|
t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
|
|
1119
|
-
},
|
|
1126
|
+
}, rs = /* @__PURE__ */ ss({
|
|
1120
1127
|
getItemOffset: function(t, n) {
|
|
1121
1128
|
var i = t.itemSize;
|
|
1122
1129
|
return n * i;
|
|
@@ -1129,20 +1136,20 @@ var ts = function(t, n) {
|
|
|
1129
1136
|
var n = t.itemCount, i = t.itemSize;
|
|
1130
1137
|
return i * n;
|
|
1131
1138
|
},
|
|
1132
|
-
getOffsetForIndexAndAlignment: function(t, n, i, r,
|
|
1133
|
-
var
|
|
1134
|
-
switch (i === "smart" && (r >=
|
|
1139
|
+
getOffsetForIndexAndAlignment: function(t, n, i, r, d, p) {
|
|
1140
|
+
var l = t.direction, c = t.height, I = t.itemCount, M = t.itemSize, S = t.layout, g = t.width, N = l === "horizontal" || S === "horizontal", y = N ? g : c, a = Math.max(0, I * M - y), h = Math.min(a, n * M), u = Math.max(0, n * M - y + M + p);
|
|
1141
|
+
switch (i === "smart" && (r >= u - y && r <= h + y ? i = "auto" : i = "center"), i) {
|
|
1135
1142
|
case "start":
|
|
1136
|
-
return
|
|
1143
|
+
return h;
|
|
1137
1144
|
case "end":
|
|
1138
|
-
return
|
|
1145
|
+
return u;
|
|
1139
1146
|
case "center": {
|
|
1140
|
-
var
|
|
1141
|
-
return
|
|
1147
|
+
var f = Math.round(u + (h - u) / 2);
|
|
1148
|
+
return f < Math.ceil(y / 2) ? 0 : f > a + Math.floor(y / 2) ? a : f;
|
|
1142
1149
|
}
|
|
1143
1150
|
case "auto":
|
|
1144
1151
|
default:
|
|
1145
|
-
return r >=
|
|
1152
|
+
return r >= u && r <= h ? r : r < u ? u : h;
|
|
1146
1153
|
}
|
|
1147
1154
|
},
|
|
1148
1155
|
getStartIndexForOffset: function(t, n) {
|
|
@@ -1150,10 +1157,10 @@ var ts = function(t, n) {
|
|
|
1150
1157
|
return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
|
|
1151
1158
|
},
|
|
1152
1159
|
getStopIndexForStartIndex: function(t, n, i) {
|
|
1153
|
-
var r = t.direction,
|
|
1160
|
+
var r = t.direction, d = t.height, p = t.itemCount, l = t.itemSize, c = t.layout, I = t.width, M = r === "horizontal" || c === "horizontal", S = n * l, g = M ? I : d, N = Math.ceil((g + i - S) / l);
|
|
1154
1161
|
return Math.max(0, Math.min(
|
|
1155
1162
|
p - 1,
|
|
1156
|
-
n +
|
|
1163
|
+
n + N - 1
|
|
1157
1164
|
// -1 is because stop index is inclusive
|
|
1158
1165
|
));
|
|
1159
1166
|
},
|
|
@@ -1164,34 +1171,34 @@ var ts = function(t, n) {
|
|
|
1164
1171
|
t.itemSize;
|
|
1165
1172
|
}
|
|
1166
1173
|
});
|
|
1167
|
-
function
|
|
1174
|
+
function os(e) {
|
|
1168
1175
|
var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
|
|
1169
1176
|
return !(i > n || r < t);
|
|
1170
1177
|
}
|
|
1171
|
-
function
|
|
1172
|
-
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex,
|
|
1173
|
-
var
|
|
1174
|
-
|
|
1178
|
+
function as(e) {
|
|
1179
|
+
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, d = e.stopIndex, p = [], l = null, c = null, I = r; I <= d; I++) {
|
|
1180
|
+
var M = t(I);
|
|
1181
|
+
M ? c !== null && (p.push(l, c), l = c = null) : (c = I, l === null && (l = I));
|
|
1175
1182
|
}
|
|
1176
1183
|
if (c !== null) {
|
|
1177
|
-
for (var S = Math.min(Math.max(c,
|
|
1178
|
-
c =
|
|
1179
|
-
p.push(
|
|
1184
|
+
for (var S = Math.min(Math.max(c, l + i - 1), n - 1), g = c + 1; g <= S && !t(g); g++)
|
|
1185
|
+
c = g;
|
|
1186
|
+
p.push(l, c);
|
|
1180
1187
|
}
|
|
1181
1188
|
if (p.length)
|
|
1182
1189
|
for (; p[1] - p[0] + 1 < i && p[0] > 0; ) {
|
|
1183
|
-
var
|
|
1184
|
-
if (!t(
|
|
1185
|
-
p[0] =
|
|
1190
|
+
var N = p[0] - 1;
|
|
1191
|
+
if (!t(N))
|
|
1192
|
+
p[0] = N;
|
|
1186
1193
|
else
|
|
1187
1194
|
break;
|
|
1188
1195
|
}
|
|
1189
1196
|
return p;
|
|
1190
1197
|
}
|
|
1191
|
-
var
|
|
1198
|
+
var ls = function(e, t) {
|
|
1192
1199
|
if (!(e instanceof t))
|
|
1193
1200
|
throw new TypeError("Cannot call a class as a function");
|
|
1194
|
-
},
|
|
1201
|
+
}, cs = function() {
|
|
1195
1202
|
function e(t, n) {
|
|
1196
1203
|
for (var i = 0; i < n.length; i++) {
|
|
1197
1204
|
var r = n[i];
|
|
@@ -1201,7 +1208,7 @@ var rs = function(e, t) {
|
|
|
1201
1208
|
return function(t, n, i) {
|
|
1202
1209
|
return n && e(t.prototype, n), i && e(t, i), t;
|
|
1203
1210
|
};
|
|
1204
|
-
}(),
|
|
1211
|
+
}(), ds = function(e, t) {
|
|
1205
1212
|
if (typeof t != "function" && t !== null)
|
|
1206
1213
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
1207
1214
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1212,25 +1219,25 @@ var rs = function(e, t) {
|
|
|
1212
1219
|
configurable: !0
|
|
1213
1220
|
}
|
|
1214
1221
|
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
|
|
1215
|
-
},
|
|
1222
|
+
}, Ce = function(e, t) {
|
|
1216
1223
|
if (!e)
|
|
1217
1224
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1218
1225
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1226
|
+
}, us = function(e) {
|
|
1227
|
+
ds(t, e);
|
|
1221
1228
|
function t() {
|
|
1222
|
-
var n, i, r,
|
|
1223
|
-
|
|
1224
|
-
for (var p = arguments.length,
|
|
1225
|
-
|
|
1226
|
-
return
|
|
1227
|
-
var
|
|
1228
|
-
r._lastRenderedStartIndex =
|
|
1229
|
-
}, r._setRef = function(
|
|
1230
|
-
r._listRef =
|
|
1231
|
-
}, i),
|
|
1229
|
+
var n, i, r, d;
|
|
1230
|
+
ls(this, t);
|
|
1231
|
+
for (var p = arguments.length, l = Array(p), c = 0; c < p; c++)
|
|
1232
|
+
l[c] = arguments[c];
|
|
1233
|
+
return d = (i = (r = Ce(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(I) {
|
|
1234
|
+
var M = I.visibleStartIndex, S = I.visibleStopIndex;
|
|
1235
|
+
r._lastRenderedStartIndex = M, r._lastRenderedStopIndex = S, r._ensureRowsLoaded(M, S);
|
|
1236
|
+
}, r._setRef = function(I) {
|
|
1237
|
+
r._listRef = I;
|
|
1238
|
+
}, i), Ce(r, d);
|
|
1232
1239
|
}
|
|
1233
|
-
return
|
|
1240
|
+
return cs(t, [{
|
|
1234
1241
|
key: "resetloadMoreItemsCache",
|
|
1235
1242
|
value: function() {
|
|
1236
1243
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1252,130 +1259,132 @@ var rs = function(e, t) {
|
|
|
1252
1259
|
}, {
|
|
1253
1260
|
key: "_ensureRowsLoaded",
|
|
1254
1261
|
value: function(i, r) {
|
|
1255
|
-
var
|
|
1262
|
+
var d = this.props, p = d.isItemLoaded, l = d.itemCount, c = d.minimumBatchSize, I = c === void 0 ? 10 : c, M = d.threshold, S = M === void 0 ? 15 : M, g = as({
|
|
1256
1263
|
isItemLoaded: p,
|
|
1257
|
-
itemCount:
|
|
1258
|
-
minimumBatchSize:
|
|
1264
|
+
itemCount: l,
|
|
1265
|
+
minimumBatchSize: I,
|
|
1259
1266
|
startIndex: Math.max(0, i - S),
|
|
1260
|
-
stopIndex: Math.min(
|
|
1267
|
+
stopIndex: Math.min(l - 1, r + S)
|
|
1261
1268
|
});
|
|
1262
|
-
(this._memoizedUnloadedRanges.length !==
|
|
1263
|
-
return
|
|
1264
|
-
})) && (this._memoizedUnloadedRanges =
|
|
1269
|
+
(this._memoizedUnloadedRanges.length !== g.length || this._memoizedUnloadedRanges.some(function(N, y) {
|
|
1270
|
+
return g[y] !== N;
|
|
1271
|
+
})) && (this._memoizedUnloadedRanges = g, this._loadUnloadedRanges(g));
|
|
1265
1272
|
}
|
|
1266
1273
|
}, {
|
|
1267
1274
|
key: "_loadUnloadedRanges",
|
|
1268
1275
|
value: function(i) {
|
|
1269
|
-
for (var r = this,
|
|
1270
|
-
var
|
|
1271
|
-
|
|
1272
|
-
if (
|
|
1276
|
+
for (var r = this, d = this.props.loadMoreItems || this.props.loadMoreRows, p = function(I) {
|
|
1277
|
+
var M = i[I], S = i[I + 1], g = d(M, S);
|
|
1278
|
+
g != null && g.then(function() {
|
|
1279
|
+
if (os({
|
|
1273
1280
|
lastRenderedStartIndex: r._lastRenderedStartIndex,
|
|
1274
1281
|
lastRenderedStopIndex: r._lastRenderedStopIndex,
|
|
1275
|
-
startIndex:
|
|
1282
|
+
startIndex: M,
|
|
1276
1283
|
stopIndex: S
|
|
1277
1284
|
})) {
|
|
1278
1285
|
if (r._listRef == null)
|
|
1279
1286
|
return;
|
|
1280
|
-
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(
|
|
1287
|
+
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(M, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
|
|
1281
1288
|
}
|
|
1282
1289
|
});
|
|
1283
|
-
},
|
|
1284
|
-
p(
|
|
1290
|
+
}, l = 0; l < i.length; l += 2)
|
|
1291
|
+
p(l);
|
|
1285
1292
|
}
|
|
1286
1293
|
}]), t;
|
|
1287
|
-
}(
|
|
1288
|
-
const
|
|
1294
|
+
}(Ee);
|
|
1295
|
+
const ps = /* @__PURE__ */ o("div")({
|
|
1289
1296
|
name: "Container",
|
|
1290
1297
|
class: "culdu4a",
|
|
1291
1298
|
propsAsIs: !1
|
|
1292
|
-
}),
|
|
1299
|
+
}), ms = /* @__PURE__ */ o("div")({
|
|
1293
1300
|
name: "Position",
|
|
1294
1301
|
class: "pwf8e69",
|
|
1295
1302
|
propsAsIs: !1
|
|
1296
|
-
}),
|
|
1303
|
+
}), hs = /* @__PURE__ */ o("img")({
|
|
1297
1304
|
name: "Avatar",
|
|
1298
1305
|
class: "atf4yh4",
|
|
1299
1306
|
propsAsIs: !1
|
|
1300
|
-
}),
|
|
1307
|
+
}), Is = /* @__PURE__ */ o("div")({
|
|
1301
1308
|
name: "AvatarPlaceholder",
|
|
1302
1309
|
class: "a1dg29ja",
|
|
1303
1310
|
propsAsIs: !1
|
|
1304
|
-
}),
|
|
1311
|
+
}), fs = /* @__PURE__ */ o("div")({
|
|
1305
1312
|
name: "Content",
|
|
1306
1313
|
class: "c10a68rc",
|
|
1307
1314
|
propsAsIs: !1
|
|
1308
|
-
}),
|
|
1315
|
+
}), gs = /* @__PURE__ */ o("div")({
|
|
1309
1316
|
name: "NameContainer",
|
|
1310
1317
|
class: "nc4kck5",
|
|
1311
1318
|
propsAsIs: !1
|
|
1312
|
-
}),
|
|
1319
|
+
}), vs = /* @__PURE__ */ o("span")({
|
|
1313
1320
|
name: "Name",
|
|
1314
1321
|
class: "njsrqgr",
|
|
1315
1322
|
propsAsIs: !1
|
|
1316
|
-
}),
|
|
1323
|
+
}), Ms = () => C, As = /* @__PURE__ */ o(Ms())({
|
|
1317
1324
|
name: "CurrentUserBadge",
|
|
1318
1325
|
class: "c17uc4zr",
|
|
1319
1326
|
propsAsIs: !0
|
|
1320
|
-
}),
|
|
1327
|
+
}), Ns = ({
|
|
1321
1328
|
rank: e,
|
|
1322
1329
|
avatar: t,
|
|
1323
1330
|
name: n,
|
|
1324
1331
|
points: i,
|
|
1325
1332
|
isCurrentUser: r,
|
|
1326
|
-
openItemDetail:
|
|
1333
|
+
openItemDetail: d,
|
|
1327
1334
|
style: p
|
|
1328
|
-
}) => /* @__PURE__ */
|
|
1329
|
-
/* @__PURE__ */ s(
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
t ? /* @__PURE__ */ s(
|
|
1332
|
-
/* @__PURE__ */
|
|
1333
|
-
/* @__PURE__ */ s(
|
|
1334
|
-
r && /* @__PURE__ */ s(
|
|
1335
|
+
}) => /* @__PURE__ */ m(ps, { onClick: d, style: p, children: [
|
|
1336
|
+
/* @__PURE__ */ s(ms, { children: e || 0 }),
|
|
1337
|
+
/* @__PURE__ */ m(fs, { children: [
|
|
1338
|
+
t ? /* @__PURE__ */ s(hs, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(Is, { children: Qe(n || "") }),
|
|
1339
|
+
/* @__PURE__ */ m(gs, { children: [
|
|
1340
|
+
/* @__PURE__ */ s(vs, { children: n || "" }),
|
|
1341
|
+
r && /* @__PURE__ */ s(As, { name: "icon-star" })
|
|
1335
1342
|
] })
|
|
1336
1343
|
] }),
|
|
1337
|
-
/* @__PURE__ */ s("div", { children:
|
|
1338
|
-
] }),
|
|
1344
|
+
/* @__PURE__ */ s("div", { children: Ue(i) })
|
|
1345
|
+
] }), Ts = /* @__PURE__ */ o("div")({
|
|
1339
1346
|
name: "ScrollContainer",
|
|
1340
1347
|
class: "s13d8sg6",
|
|
1341
1348
|
propsAsIs: !1
|
|
1342
|
-
}),
|
|
1349
|
+
}), ys = ({
|
|
1343
1350
|
items: e,
|
|
1344
1351
|
currentUserId: t,
|
|
1345
1352
|
openItemDetail: n,
|
|
1346
|
-
fetchMore: i
|
|
1347
|
-
|
|
1348
|
-
|
|
1353
|
+
fetchMore: i,
|
|
1354
|
+
onScroll: r
|
|
1355
|
+
}) => /* @__PURE__ */ s(Fe, { children: ({ width: d, height: p }) => /* @__PURE__ */ s(
|
|
1356
|
+
us,
|
|
1349
1357
|
{
|
|
1350
|
-
isItemLoaded: (
|
|
1358
|
+
isItemLoaded: (l) => l < e.length,
|
|
1351
1359
|
itemCount: e.length + 1,
|
|
1352
1360
|
loadMoreItems: i,
|
|
1353
|
-
children: ({ onItemsRendered:
|
|
1354
|
-
|
|
1361
|
+
children: ({ onItemsRendered: l, ref: c }) => /* @__PURE__ */ s(Ts, { children: /* @__PURE__ */ s(
|
|
1362
|
+
rs,
|
|
1355
1363
|
{
|
|
1356
1364
|
itemSize: 56,
|
|
1357
|
-
|
|
1358
|
-
|
|
1365
|
+
onScroll: r,
|
|
1366
|
+
onItemsRendered: l,
|
|
1367
|
+
ref: c,
|
|
1359
1368
|
itemCount: e.length,
|
|
1360
|
-
width:
|
|
1361
|
-
height:
|
|
1362
|
-
children: ({ index:
|
|
1363
|
-
|
|
1369
|
+
width: d,
|
|
1370
|
+
height: p,
|
|
1371
|
+
children: ({ index: I, style: M }) => /* @__PURE__ */ s(
|
|
1372
|
+
Ns,
|
|
1364
1373
|
{
|
|
1365
|
-
style: { ...
|
|
1366
|
-
...e[
|
|
1367
|
-
openItemDetail: () => n(e[
|
|
1368
|
-
isCurrentUser: !!t && t === e[
|
|
1374
|
+
style: { ...M, maxHeight: 48 },
|
|
1375
|
+
...e[I],
|
|
1376
|
+
openItemDetail: () => n(e[I].userId),
|
|
1377
|
+
isCurrentUser: !!t && t === e[I].userId
|
|
1369
1378
|
},
|
|
1370
|
-
e[
|
|
1379
|
+
e[I].userId
|
|
1371
1380
|
)
|
|
1372
1381
|
}
|
|
1373
1382
|
) })
|
|
1374
1383
|
}
|
|
1375
|
-
) }),
|
|
1376
|
-
const { data: t } =
|
|
1384
|
+
) }), Ds = ({ deepLink: e }) => {
|
|
1385
|
+
const { data: t } = _(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
|
|
1377
1386
|
return /* @__PURE__ */ s(
|
|
1378
|
-
|
|
1387
|
+
Be,
|
|
1379
1388
|
{
|
|
1380
1389
|
inviteLink: n || i,
|
|
1381
1390
|
socialLinks: [
|
|
@@ -1394,265 +1403,300 @@ const cs = /* @__PURE__ */ o("div")({
|
|
|
1394
1403
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1395
1404
|
}
|
|
1396
1405
|
);
|
|
1397
|
-
},
|
|
1398
|
-
const { data:
|
|
1399
|
-
|
|
1400
|
-
|
|
1406
|
+
}, Ss = ({ gamification: e, hideTabs: t }) => {
|
|
1407
|
+
const { data: n } = _(e.leaderboardList.$store), i = de(0), r = P(
|
|
1408
|
+
$e((d) => {
|
|
1409
|
+
Math.abs(i.current - d.scrollOffset) < 112 || (i.current = d.scrollOffset, t(d.scrollOffset !== 0 && d.scrollDirection === "forward"));
|
|
1410
|
+
}, 200),
|
|
1411
|
+
[t]
|
|
1412
|
+
);
|
|
1413
|
+
return n != null && n.length ? /* @__PURE__ */ s(
|
|
1414
|
+
ys,
|
|
1401
1415
|
{
|
|
1402
1416
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1403
|
-
items:
|
|
1417
|
+
items: n,
|
|
1418
|
+
onScroll: r,
|
|
1404
1419
|
openItemDetail: e.openUser,
|
|
1405
1420
|
currentUserId: e.currentUserId.get()
|
|
1406
1421
|
}
|
|
1407
|
-
) : /* @__PURE__ */ s(
|
|
1408
|
-
},
|
|
1422
|
+
) : /* @__PURE__ */ s(Ds, { deepLink: e.deepLink });
|
|
1423
|
+
}, zs = /* @__PURE__ */ o("div")({
|
|
1409
1424
|
name: "QuestionItem",
|
|
1410
1425
|
class: "q1w97g3p",
|
|
1411
1426
|
propsAsIs: !1
|
|
1412
|
-
}),
|
|
1427
|
+
}), xs = /* @__PURE__ */ o("div")({
|
|
1413
1428
|
name: "QuestionCaption",
|
|
1414
1429
|
class: "q2sl39u",
|
|
1415
1430
|
propsAsIs: !1
|
|
1416
|
-
}),
|
|
1431
|
+
}), Os = /* @__PURE__ */ o("div")({
|
|
1417
1432
|
name: "QuestionBody",
|
|
1418
1433
|
class: "qd5h0uc",
|
|
1419
1434
|
propsAsIs: !1
|
|
1420
|
-
}),
|
|
1435
|
+
}), bs = /* @__PURE__ */ o("div")({
|
|
1421
1436
|
name: "QuestionAction",
|
|
1422
1437
|
class: "q105uluy",
|
|
1423
1438
|
propsAsIs: !1
|
|
1424
|
-
}),
|
|
1439
|
+
}), Cs = () => C, te = /* @__PURE__ */ o(Cs())({
|
|
1425
1440
|
name: "QuestionActionIcon",
|
|
1426
1441
|
class: "q1fa0b9h",
|
|
1427
1442
|
propsAsIs: !0
|
|
1428
|
-
}),
|
|
1443
|
+
}), js = () => C, ks = /* @__PURE__ */ o(js())({
|
|
1429
1444
|
name: "QuestionTypeIcon",
|
|
1430
1445
|
class: "qxlt78s",
|
|
1431
1446
|
propsAsIs: !0
|
|
1432
|
-
}),
|
|
1447
|
+
}), ws = /* @__PURE__ */ o("div")({
|
|
1433
1448
|
name: "QuestionTypeLabel",
|
|
1434
1449
|
class: "qmg0vkx",
|
|
1435
1450
|
propsAsIs: !1
|
|
1436
|
-
}),
|
|
1451
|
+
}), Es = /* @__PURE__ */ o("div")({
|
|
1437
1452
|
name: "QuestionContent",
|
|
1438
1453
|
class: "q1uz5j1g",
|
|
1439
1454
|
propsAsIs: !1
|
|
1440
|
-
}),
|
|
1455
|
+
}), Ls = /* @__PURE__ */ o("button")({
|
|
1441
1456
|
name: "PlayButton",
|
|
1442
1457
|
class: "p1pba9p1",
|
|
1443
1458
|
propsAsIs: !1
|
|
1444
|
-
}),
|
|
1445
|
-
[
|
|
1446
|
-
[
|
|
1447
|
-
[
|
|
1448
|
-
[
|
|
1449
|
-
},
|
|
1459
|
+
}), $s = {
|
|
1460
|
+
[K.LOST]: /* @__PURE__ */ s(te, { name: "incorrectVoted" }),
|
|
1461
|
+
[K.WON]: /* @__PURE__ */ s(te, { name: "icon-check" }),
|
|
1462
|
+
[K.UNSET]: /* @__PURE__ */ s(te, { name: "icon-arrow" }),
|
|
1463
|
+
[K.DNP]: /* @__PURE__ */ s(te, { name: "icon-arrow" })
|
|
1464
|
+
}, Rs = ({
|
|
1450
1465
|
questionId: e,
|
|
1451
1466
|
questionType: t,
|
|
1452
1467
|
questionStatus: n,
|
|
1453
1468
|
subject: i,
|
|
1454
1469
|
openForVoting: r,
|
|
1455
|
-
openQuestion:
|
|
1470
|
+
openQuestion: d,
|
|
1456
1471
|
status: p
|
|
1457
1472
|
}) => {
|
|
1458
|
-
const
|
|
1459
|
-
return
|
|
1460
|
-
/* @__PURE__ */
|
|
1461
|
-
/* @__PURE__ */
|
|
1473
|
+
const l = ke[t], c = $s[p];
|
|
1474
|
+
return l ? /* @__PURE__ */ m(zs, { onClick: () => d == null ? void 0 : d(e), children: [
|
|
1475
|
+
/* @__PURE__ */ m(Es, { children: [
|
|
1476
|
+
/* @__PURE__ */ m(xs, { children: [
|
|
1462
1477
|
/* @__PURE__ */ s(
|
|
1463
|
-
|
|
1478
|
+
ks,
|
|
1464
1479
|
{
|
|
1465
|
-
"data-type-trivia": t ===
|
|
1466
|
-
"data-type-poll": t ===
|
|
1467
|
-
name:
|
|
1480
|
+
"data-type-trivia": t === z.TRIVIA,
|
|
1481
|
+
"data-type-poll": t === z.POLL,
|
|
1482
|
+
name: l.iconName
|
|
1468
1483
|
}
|
|
1469
1484
|
),
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
|
|
1472
|
-
t ===
|
|
1485
|
+
/* @__PURE__ */ m(ws, { children: [
|
|
1486
|
+
l.label,
|
|
1487
|
+
t === z.TRIVIA && n === U.RESOLVED && " • Expired"
|
|
1473
1488
|
] })
|
|
1474
1489
|
] }),
|
|
1475
|
-
/* @__PURE__ */ s(
|
|
1490
|
+
/* @__PURE__ */ s(Os, { children: i || "" })
|
|
1476
1491
|
] }),
|
|
1477
|
-
/* @__PURE__ */ s(
|
|
1492
|
+
/* @__PURE__ */ s(bs, { children: r ? /* @__PURE__ */ s(Ls, { children: "Play" }) : c })
|
|
1478
1493
|
] }) : null;
|
|
1479
|
-
},
|
|
1494
|
+
}, Qs = /* @__PURE__ */ o("div")({
|
|
1480
1495
|
name: "Container",
|
|
1481
1496
|
class: "cll3md7",
|
|
1482
1497
|
propsAsIs: !1
|
|
1483
|
-
}),
|
|
1498
|
+
}), Us = /* @__PURE__ */ o("button")({
|
|
1484
1499
|
name: "ActionBtn",
|
|
1485
1500
|
class: "a10g1iik",
|
|
1486
1501
|
propsAsIs: !1
|
|
1487
|
-
}),
|
|
1502
|
+
}), qs = ({
|
|
1488
1503
|
openInsight: e,
|
|
1489
1504
|
questionId: t,
|
|
1490
1505
|
...n
|
|
1491
|
-
}) => /* @__PURE__ */
|
|
1492
|
-
/* @__PURE__ */ s(
|
|
1493
|
-
e && /* @__PURE__ */ s(
|
|
1494
|
-
] }),
|
|
1506
|
+
}) => /* @__PURE__ */ m(Qs, { children: [
|
|
1507
|
+
/* @__PURE__ */ s(_e, { questionId: t, ...n, isPickHistory: !0 }),
|
|
1508
|
+
e && /* @__PURE__ */ s(Us, { onClick: () => e(t), children: "View Insight" })
|
|
1509
|
+
] }), Ps = /* @__PURE__ */ o("div")({
|
|
1495
1510
|
name: "Container",
|
|
1496
1511
|
class: "cl56x6b",
|
|
1497
1512
|
propsAsIs: !1
|
|
1498
|
-
}),
|
|
1513
|
+
}), _s = () => He, Ys = /* @__PURE__ */ o(_s())({
|
|
1499
1514
|
name: "ActionButton",
|
|
1500
1515
|
class: "a11pzf92",
|
|
1501
1516
|
propsAsIs: !0
|
|
1502
|
-
}),
|
|
1517
|
+
}), Vs = /* @__PURE__ */ o("div")({
|
|
1503
1518
|
name: "DateTime",
|
|
1504
1519
|
class: "d1hbaleq",
|
|
1505
1520
|
propsAsIs: !1
|
|
1506
|
-
}),
|
|
1521
|
+
}), Ws = /* @__PURE__ */ o("blockquote")({
|
|
1507
1522
|
name: "Quote",
|
|
1508
1523
|
class: "qvvgqjm",
|
|
1509
1524
|
propsAsIs: !1
|
|
1510
|
-
}),
|
|
1525
|
+
}), Fs = ({
|
|
1511
1526
|
openTweet: e,
|
|
1512
1527
|
created: t,
|
|
1513
1528
|
...n
|
|
1514
1529
|
}) => {
|
|
1515
|
-
const i =
|
|
1530
|
+
const i = w(() => {
|
|
1516
1531
|
if (t) {
|
|
1517
1532
|
const r = new Date(t);
|
|
1518
|
-
if (
|
|
1533
|
+
if (ge(r))
|
|
1519
1534
|
return {
|
|
1520
|
-
date:
|
|
1521
|
-
time:
|
|
1535
|
+
date: Ie(r),
|
|
1536
|
+
time: fe(r)
|
|
1522
1537
|
};
|
|
1523
1538
|
}
|
|
1524
1539
|
return null;
|
|
1525
1540
|
}, [t]);
|
|
1526
|
-
return /* @__PURE__ */
|
|
1527
|
-
i && /* @__PURE__ */
|
|
1541
|
+
return /* @__PURE__ */ m(Ps, { children: [
|
|
1542
|
+
i && /* @__PURE__ */ m(Vs, { children: [
|
|
1528
1543
|
i.date,
|
|
1529
1544
|
" · ",
|
|
1530
1545
|
i.time
|
|
1531
1546
|
] }),
|
|
1532
|
-
n.title && /* @__PURE__ */ s(
|
|
1547
|
+
n.title && /* @__PURE__ */ s(Ws, { children: n.title }),
|
|
1533
1548
|
/* @__PURE__ */ s(we, { ...n }),
|
|
1534
|
-
e && /* @__PURE__ */ s(
|
|
1549
|
+
e && /* @__PURE__ */ s(Ys, { onClick: () => e(n.tweetId), children: "View Insight" })
|
|
1535
1550
|
] });
|
|
1536
|
-
},
|
|
1551
|
+
}, Bs = /* @__PURE__ */ o("div")({
|
|
1537
1552
|
name: "QuestionsContainer",
|
|
1538
1553
|
class: "qvghv3l",
|
|
1539
1554
|
propsAsIs: !1
|
|
1540
|
-
}),
|
|
1541
|
-
var i, r,
|
|
1555
|
+
}), Hs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Bs, { children: e == null ? void 0 : e.map((n) => {
|
|
1556
|
+
var i, r, d;
|
|
1542
1557
|
if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1543
1558
|
const p = n.attributes.attributes.value;
|
|
1544
|
-
return /* @__PURE__ */ s(
|
|
1559
|
+
return /* @__PURE__ */ s(Rs, { openQuestion: t, ...p }, p.questionId);
|
|
1545
1560
|
}
|
|
1546
1561
|
if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
|
|
1547
|
-
const p = n.attributes.attributes.value,
|
|
1548
|
-
return /* @__PURE__ */ s(
|
|
1562
|
+
const p = n.attributes.attributes.value, l = n.attributes.created;
|
|
1563
|
+
return /* @__PURE__ */ s(qs, { openInsight: t, ...p, created: l }, p.questionId);
|
|
1549
1564
|
}
|
|
1550
|
-
if (n.type === "tweet" && ((
|
|
1551
|
-
const p = n.attributes.attributes.value,
|
|
1552
|
-
return /* @__PURE__ */ s(
|
|
1565
|
+
if (n.type === "tweet" && ((d = n.attributes) == null ? void 0 : d.attributes.case) === "tweet") {
|
|
1566
|
+
const p = n.attributes.attributes.value, l = n.attributes.id, c = n.attributes.created;
|
|
1567
|
+
return /* @__PURE__ */ s(Fs, { openTweet: t, ...p, tweetId: l, created: c }, l);
|
|
1553
1568
|
}
|
|
1554
1569
|
return null;
|
|
1555
|
-
}) }),
|
|
1556
|
-
const n =
|
|
1557
|
-
return n != null && n.data ? /* @__PURE__ */ s(
|
|
1558
|
-
},
|
|
1570
|
+
}) }), Gs = ({ store: e, openQuestion: t }) => {
|
|
1571
|
+
const n = _(e);
|
|
1572
|
+
return n != null && n.data ? /* @__PURE__ */ s(Hs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1573
|
+
}, Zs = ({ userSummary: e }) => {
|
|
1559
1574
|
var t;
|
|
1560
|
-
const [n, i] =
|
|
1561
|
-
return
|
|
1562
|
-
const r = e.subscribe((
|
|
1563
|
-
|
|
1575
|
+
const [n, i] = E(void 0);
|
|
1576
|
+
return he(() => {
|
|
1577
|
+
const r = e.subscribe((d) => {
|
|
1578
|
+
d != null && d.data && i(d.data);
|
|
1564
1579
|
});
|
|
1565
1580
|
return () => {
|
|
1566
1581
|
r();
|
|
1567
1582
|
};
|
|
1568
|
-
}, [e]), n != null && n.summary ? /* @__PURE__ */ s(
|
|
1569
|
-
},
|
|
1583
|
+
}, [e]), n != null && n.summary ? /* @__PURE__ */ s(qe, { ...n.summary, successRate: (t = n.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1584
|
+
}, Js = ({
|
|
1570
1585
|
gamification: e
|
|
1571
1586
|
}) => {
|
|
1572
|
-
const [t, n] =
|
|
1573
|
-
|
|
1587
|
+
const [t, n] = E(!1), [i, r] = E(G.HOME), d = de(null), p = de(0), [l, c] = Je(), I = (g) => {
|
|
1588
|
+
c(() => r(g));
|
|
1589
|
+
}, M = (g) => {
|
|
1590
|
+
c(() => n(g));
|
|
1591
|
+
}, S = P($e(() => {
|
|
1592
|
+
const g = d.current;
|
|
1593
|
+
if (!g)
|
|
1594
|
+
return;
|
|
1595
|
+
const {
|
|
1596
|
+
scrollTop: N
|
|
1597
|
+
} = g;
|
|
1598
|
+
if (N === 0) {
|
|
1599
|
+
p.current = 0, M(!1);
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1602
|
+
if (Math.abs(p.current - N) < 112)
|
|
1603
|
+
return;
|
|
1604
|
+
const y = p.current < N ? "forward" : "backward";
|
|
1605
|
+
p.current = N, M(y === "forward");
|
|
1606
|
+
}, 200), []);
|
|
1607
|
+
return he(() => {
|
|
1608
|
+
const g = d.current;
|
|
1609
|
+
return g ? (i === G.HOME && g.addEventListener("scroll", S), () => {
|
|
1610
|
+
g.removeEventListener("scroll", S);
|
|
1611
|
+
}) : () => {
|
|
1612
|
+
};
|
|
1613
|
+
}, [i, S]), /* @__PURE__ */ m("div", {
|
|
1574
1614
|
style: {
|
|
1575
1615
|
height: "100%",
|
|
1576
1616
|
display: "flex",
|
|
1577
1617
|
flexDirection: "column",
|
|
1578
1618
|
overflow: "hidden"
|
|
1579
1619
|
},
|
|
1580
|
-
children: [/* @__PURE__ */ s(
|
|
1620
|
+
children: [l, /* @__PURE__ */ s(ce, {
|
|
1581
1621
|
style: {
|
|
1582
|
-
paddingBottom: "4px"
|
|
1622
|
+
paddingBottom: "4px",
|
|
1623
|
+
transition: "margin-top 0.2s ease-in-out",
|
|
1624
|
+
marginTop: t ? "-56px" : "0px"
|
|
1583
1625
|
},
|
|
1584
|
-
children: /* @__PURE__ */ s(
|
|
1585
|
-
activePage:
|
|
1586
|
-
toggleActivePage:
|
|
1626
|
+
children: /* @__PURE__ */ s(Gn, {
|
|
1627
|
+
activePage: i,
|
|
1628
|
+
toggleActivePage: I
|
|
1587
1629
|
})
|
|
1588
|
-
}),
|
|
1589
|
-
|
|
1630
|
+
}), i === G.HOME && /* @__PURE__ */ m(me, {
|
|
1631
|
+
ref: d,
|
|
1632
|
+
children: [/* @__PURE__ */ s(ce, {
|
|
1590
1633
|
style: {
|
|
1591
1634
|
paddingTop: "12px"
|
|
1592
1635
|
},
|
|
1593
|
-
children: /* @__PURE__ */ s(
|
|
1636
|
+
children: /* @__PURE__ */ s(Zs, {
|
|
1594
1637
|
userSummary: e.userSummary
|
|
1595
1638
|
})
|
|
1596
|
-
}), /* @__PURE__ */ s(
|
|
1597
|
-
children: /* @__PURE__ */ s(
|
|
1639
|
+
}), /* @__PURE__ */ s(Ge, {
|
|
1640
|
+
children: /* @__PURE__ */ s(Gs, {
|
|
1598
1641
|
openQuestion: e.openQuestion,
|
|
1599
1642
|
store: e.feedList.getStore()
|
|
1600
1643
|
})
|
|
1601
1644
|
})]
|
|
1602
|
-
}),
|
|
1645
|
+
}), i === G.LEADERBOARD && /* @__PURE__ */ s("div", {
|
|
1603
1646
|
className: "c1bp9dj2",
|
|
1604
|
-
children: /* @__PURE__ */ s(
|
|
1605
|
-
gamification: e
|
|
1647
|
+
children: /* @__PURE__ */ s(Ss, {
|
|
1648
|
+
gamification: e,
|
|
1649
|
+
hideTabs: M
|
|
1606
1650
|
})
|
|
1607
1651
|
})]
|
|
1608
1652
|
});
|
|
1609
|
-
},
|
|
1653
|
+
}, Ks = () => Ze, je = /* @__PURE__ */ o(Ks())({
|
|
1610
1654
|
name: "OpenedContainer",
|
|
1611
1655
|
class: "oar61gl",
|
|
1612
1656
|
propsAsIs: !0
|
|
1613
|
-
}),
|
|
1657
|
+
}), Xs = /* @__PURE__ */ o("div")({
|
|
1614
1658
|
name: "UserContainer",
|
|
1615
1659
|
class: "u14zaal4",
|
|
1616
1660
|
propsAsIs: !1
|
|
1617
|
-
}),
|
|
1661
|
+
}), ei = ({
|
|
1618
1662
|
correct: e,
|
|
1619
1663
|
incorrect: t
|
|
1620
1664
|
}) => {
|
|
1621
1665
|
const n = e + t;
|
|
1622
1666
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
1623
|
-
},
|
|
1667
|
+
}, fi = ({
|
|
1624
1668
|
gamification: e,
|
|
1625
1669
|
className: t
|
|
1626
1670
|
}) => {
|
|
1627
|
-
const n =
|
|
1628
|
-
return /* @__PURE__ */
|
|
1671
|
+
const n = _(e.openedQuestion.$store), i = _(e.openedUser);
|
|
1672
|
+
return /* @__PURE__ */ m(k, {
|
|
1629
1673
|
children: [n && /* @__PURE__ */ s(je, {
|
|
1630
1674
|
className: t,
|
|
1631
|
-
children: /* @__PURE__ */ s(
|
|
1675
|
+
children: /* @__PURE__ */ s(Vn, {
|
|
1632
1676
|
gamification: e
|
|
1633
1677
|
})
|
|
1634
1678
|
}), i && /* @__PURE__ */ s(je, {
|
|
1635
1679
|
className: t,
|
|
1636
|
-
children: /* @__PURE__ */
|
|
1637
|
-
children: [/* @__PURE__ */ s(
|
|
1680
|
+
children: /* @__PURE__ */ m(Xs, {
|
|
1681
|
+
children: [/* @__PURE__ */ s(Re, {
|
|
1638
1682
|
label: "Friend's Rank",
|
|
1639
1683
|
close: e.closeUser
|
|
1640
|
-
}), /* @__PURE__ */ s(
|
|
1641
|
-
children: /* @__PURE__ */ s(
|
|
1684
|
+
}), /* @__PURE__ */ s(ce, {
|
|
1685
|
+
children: /* @__PURE__ */ s(qe, {
|
|
1642
1686
|
...i,
|
|
1643
|
-
successRate:
|
|
1687
|
+
successRate: ei(i)
|
|
1644
1688
|
})
|
|
1645
1689
|
})]
|
|
1646
1690
|
})
|
|
1647
|
-
}), /* @__PURE__ */ s(
|
|
1691
|
+
}), /* @__PURE__ */ s(me, {
|
|
1648
1692
|
className: t,
|
|
1649
1693
|
"data-nav": "true",
|
|
1650
|
-
children: /* @__PURE__ */ s(
|
|
1694
|
+
children: /* @__PURE__ */ s(Js, {
|
|
1651
1695
|
gamification: e
|
|
1652
1696
|
})
|
|
1653
1697
|
})]
|
|
1654
1698
|
});
|
|
1655
1699
|
};
|
|
1656
1700
|
export {
|
|
1657
|
-
|
|
1701
|
+
fi as default
|
|
1658
1702
|
};
|