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