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