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