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