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