@streamlayer/react 0.34.3 → 0.34.5
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/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/gamification-feature.js +497 -463
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +496 -462
- package/lib/style.css +1 -1
- package/package.json +5 -5
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var se = (e, t, s) => (
|
|
4
|
-
import { jsxs as u, jsx as n, Fragment as
|
|
5
|
-
import { s as r, c as
|
|
6
|
-
import V, { useRef as
|
|
7
|
-
const
|
|
1
|
+
var Ue = Object.defineProperty;
|
|
2
|
+
var Ye = (e, t, s) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var se = (e, t, s) => (Ye(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
+
import { jsxs as u, jsx as n, Fragment as S } from "react/jsx-runtime";
|
|
5
|
+
import { s as r, c as x, Q as N, o as Ae, a as $, b as B, d as ie, E as U, r as Pe, w as qe, u as je, e as Y, g as Ve, O as We, P as G, f as _e, h as Z, n as Be, i as ue, x as Fe } from "./masters.js";
|
|
6
|
+
import V, { useRef as R, useState as w, useCallback as W, useEffect as te, useLayoutEffect as Ze, useMemo as k, PureComponent as He, Component as Ge, useTransition as Je } from "react";
|
|
7
|
+
const Xe = /* @__PURE__ */ r("div")({
|
|
8
8
|
name: "Container",
|
|
9
9
|
class: "c1vwopgc",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
11
|
+
}), Ke = /* @__PURE__ */ r("div")({
|
|
12
12
|
name: "QuestionTypeWrap",
|
|
13
13
|
class: "qyktpt0",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}), et = () =>
|
|
15
|
+
}), et = () => x, tt = /* @__PURE__ */ r(et())({
|
|
16
16
|
name: "QuestionTypeIcon",
|
|
17
17
|
class: "q951jdx",
|
|
18
18
|
propsAsIs: !0
|
|
@@ -24,19 +24,19 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
24
24
|
name: "CloseButton",
|
|
25
25
|
class: "c1ao1jtv",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}), it = () =>
|
|
27
|
+
}), it = () => x, ot = /* @__PURE__ */ r(it())({
|
|
28
28
|
name: "CloseIcon",
|
|
29
29
|
class: "cvsl7l3",
|
|
30
30
|
propsAsIs: !0
|
|
31
31
|
}), ye = ({ type: e, close: t, label: s }) => {
|
|
32
|
-
const o = e ?
|
|
33
|
-
return /* @__PURE__ */ u(
|
|
34
|
-
/* @__PURE__ */ u(
|
|
32
|
+
const o = e ? Ae[e] : { label: s, iconName: void 0 };
|
|
33
|
+
return /* @__PURE__ */ u(Xe, { children: [
|
|
34
|
+
/* @__PURE__ */ u(Ke, { children: [
|
|
35
35
|
(o == null ? void 0 : o.iconName) && /* @__PURE__ */ n(
|
|
36
36
|
tt,
|
|
37
37
|
{
|
|
38
|
-
"data-type-trivia": e ===
|
|
39
|
-
"data-type-poll": e ===
|
|
38
|
+
"data-type-trivia": e === N.TRIVIA,
|
|
39
|
+
"data-type-poll": e === N.POLL,
|
|
40
40
|
name: o.iconName
|
|
41
41
|
}
|
|
42
42
|
),
|
|
@@ -44,7 +44,7 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
44
44
|
] }),
|
|
45
45
|
/* @__PURE__ */ n(nt, { onClick: t, children: /* @__PURE__ */ n(ot, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
47
|
-
},
|
|
47
|
+
}, ve = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), xe = (e) => e ? e.toLocaleString("en-US") : "0", re = (e) => e.toLocaleDateString("en-US", {
|
|
48
48
|
weekday: "short",
|
|
49
49
|
month: "short",
|
|
50
50
|
day: "numeric"
|
|
@@ -78,38 +78,38 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
78
78
|
name: "Title",
|
|
79
79
|
class: "t8s05oq",
|
|
80
80
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
81
|
+
}), J = ({ indicator: e, title: t }) => /* @__PURE__ */ u(ct, { children: [
|
|
82
82
|
/* @__PURE__ */ n(dt, { children: e }),
|
|
83
83
|
/* @__PURE__ */ n(ut, { children: t })
|
|
84
84
|
] }), pt = /* @__PURE__ */ r("div")({
|
|
85
85
|
name: "Container",
|
|
86
86
|
class: "c1yrpn9o",
|
|
87
87
|
propsAsIs: !1
|
|
88
|
-
}),
|
|
88
|
+
}), Mt = /* @__PURE__ */ r("div")({
|
|
89
89
|
name: "TopInfo",
|
|
90
90
|
class: "t17fwahh",
|
|
91
91
|
propsAsIs: !1
|
|
92
|
-
}),
|
|
92
|
+
}), It = /* @__PURE__ */ r("div")({
|
|
93
93
|
name: "BottomInfo",
|
|
94
94
|
class: "by6w7e9",
|
|
95
95
|
propsAsIs: !1
|
|
96
|
-
}),
|
|
96
|
+
}), ht = /* @__PURE__ */ r("div")({
|
|
97
97
|
name: "User",
|
|
98
98
|
class: "u1g7arbm",
|
|
99
99
|
propsAsIs: !1
|
|
100
|
-
}),
|
|
100
|
+
}), Nt = /* @__PURE__ */ r("img")({
|
|
101
101
|
name: "Avatar",
|
|
102
102
|
class: "a1ldeata",
|
|
103
103
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
104
|
+
}), mt = /* @__PURE__ */ r("div")({
|
|
105
105
|
name: "UserInfo",
|
|
106
106
|
class: "u10d4koz",
|
|
107
107
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
108
|
+
}), gt = /* @__PURE__ */ r("div")({
|
|
109
109
|
name: "UserName",
|
|
110
110
|
class: "u1q6roj0",
|
|
111
111
|
propsAsIs: !1
|
|
112
|
-
}),
|
|
112
|
+
}), Dt = /* @__PURE__ */ r("div")({
|
|
113
113
|
name: "UserRating",
|
|
114
114
|
class: "ui0m425",
|
|
115
115
|
propsAsIs: !1
|
|
@@ -117,11 +117,11 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
117
117
|
name: "TrophyIcon",
|
|
118
118
|
class: "t1el3mrn",
|
|
119
119
|
propsAsIs: !1
|
|
120
|
-
}),
|
|
120
|
+
}), At = /* @__PURE__ */ r("div")({
|
|
121
121
|
name: "Rts",
|
|
122
122
|
class: "r2vgnxv",
|
|
123
123
|
propsAsIs: !1
|
|
124
|
-
}),
|
|
124
|
+
}), jt = /* @__PURE__ */ r("div")({
|
|
125
125
|
name: "RtsIndicator",
|
|
126
126
|
class: "roqn06j",
|
|
127
127
|
propsAsIs: !1
|
|
@@ -129,27 +129,27 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
129
129
|
name: "RtsLabel",
|
|
130
130
|
class: "r15adx7c",
|
|
131
131
|
propsAsIs: !1
|
|
132
|
-
}),
|
|
132
|
+
}), vt = /* @__PURE__ */ r("div")({
|
|
133
133
|
name: "Divider",
|
|
134
134
|
class: "dv59lta",
|
|
135
135
|
propsAsIs: !1
|
|
136
|
-
}),
|
|
136
|
+
}), xt = /* @__PURE__ */ r("div")({
|
|
137
137
|
name: "Ranks",
|
|
138
138
|
class: "r55lotb",
|
|
139
139
|
propsAsIs: !1
|
|
140
|
-
}),
|
|
140
|
+
}), ft = /* @__PURE__ */ r("div")({
|
|
141
141
|
name: "Statistics",
|
|
142
142
|
class: "s1knfgqt",
|
|
143
143
|
propsAsIs: !1
|
|
144
|
-
}),
|
|
144
|
+
}), Et = /* @__PURE__ */ r("div")({
|
|
145
145
|
name: "AvatarPlaceholder",
|
|
146
146
|
class: "a1mqo824",
|
|
147
147
|
propsAsIs: !1
|
|
148
|
-
}),
|
|
148
|
+
}), Lt = /* @__PURE__ */ r("button")({
|
|
149
149
|
name: "UserAccountBtn",
|
|
150
150
|
class: "uxareh6",
|
|
151
151
|
propsAsIs: !1
|
|
152
|
-
}),
|
|
152
|
+
}), zt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", fe = ({
|
|
153
153
|
avatar: e,
|
|
154
154
|
name: t,
|
|
155
155
|
points: s,
|
|
@@ -159,24 +159,24 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
159
159
|
correct: a,
|
|
160
160
|
incorrect: c,
|
|
161
161
|
inTop: d,
|
|
162
|
-
successRate:
|
|
162
|
+
successRate: M
|
|
163
163
|
}) => /* @__PURE__ */ u(pt, { children: [
|
|
164
|
-
/* @__PURE__ */ n(
|
|
165
|
-
/* @__PURE__ */ u(
|
|
166
|
-
e && /* @__PURE__ */ n(
|
|
167
|
-
!e && /* @__PURE__ */ n(
|
|
164
|
+
/* @__PURE__ */ n(Mt, { children: /* @__PURE__ */ u(ht, { children: [
|
|
165
|
+
/* @__PURE__ */ u(Lt, { children: [
|
|
166
|
+
e && /* @__PURE__ */ n(Nt, { alt: "avatar", src: e }),
|
|
167
|
+
!e && /* @__PURE__ */ n(Et, { children: ve(t || "") })
|
|
168
168
|
] }),
|
|
169
|
-
/* @__PURE__ */ u(
|
|
170
|
-
/* @__PURE__ */ n(
|
|
171
|
-
/* @__PURE__ */ u(
|
|
172
|
-
/* @__PURE__ */ u(
|
|
173
|
-
/* @__PURE__ */ n(Tt, { alt: "rank-icon", src:
|
|
174
|
-
/* @__PURE__ */ u(
|
|
175
|
-
|
|
169
|
+
/* @__PURE__ */ u(mt, { children: [
|
|
170
|
+
/* @__PURE__ */ n(gt, { children: t }),
|
|
171
|
+
/* @__PURE__ */ u(Dt, { children: [
|
|
172
|
+
/* @__PURE__ */ u(At, { children: [
|
|
173
|
+
/* @__PURE__ */ n(Tt, { alt: "rank-icon", src: zt }),
|
|
174
|
+
/* @__PURE__ */ u(jt, { children: [
|
|
175
|
+
xe(s),
|
|
176
176
|
/* @__PURE__ */ n(yt, { children: "PTS" })
|
|
177
177
|
] })
|
|
178
178
|
] }),
|
|
179
|
-
/* @__PURE__ */ n(
|
|
179
|
+
/* @__PURE__ */ n(vt, {}),
|
|
180
180
|
/* @__PURE__ */ u("div", { children: [
|
|
181
181
|
"TOP ",
|
|
182
182
|
d || 0,
|
|
@@ -185,35 +185,35 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
185
185
|
] })
|
|
186
186
|
] })
|
|
187
187
|
] }) }),
|
|
188
|
-
/* @__PURE__ */ u(
|
|
189
|
-
/* @__PURE__ */ u(
|
|
188
|
+
/* @__PURE__ */ u(It, { children: [
|
|
189
|
+
/* @__PURE__ */ u(xt, { children: [
|
|
190
190
|
/* @__PURE__ */ n(pe, { indicator: o || 0, title: "Friends rank" }),
|
|
191
191
|
/* @__PURE__ */ n(pe, { indicator: i || 0, title: "Global rank" })
|
|
192
192
|
] }),
|
|
193
|
-
/* @__PURE__ */ u(
|
|
194
|
-
/* @__PURE__ */ n(
|
|
195
|
-
/* @__PURE__ */ n(
|
|
196
|
-
/* @__PURE__ */ n(
|
|
197
|
-
/* @__PURE__ */ n(
|
|
193
|
+
/* @__PURE__ */ u(ft, { children: [
|
|
194
|
+
/* @__PURE__ */ n(J, { indicator: l || 0, title: "Win streak" }),
|
|
195
|
+
/* @__PURE__ */ n(J, { indicator: a || 0, title: "Correct" }),
|
|
196
|
+
/* @__PURE__ */ n(J, { indicator: c || 0, title: "Incorrect" }),
|
|
197
|
+
/* @__PURE__ */ n(J, { indicator: `${M || 0}%`, title: "Succ. rate" })
|
|
198
198
|
] })
|
|
199
199
|
] })
|
|
200
|
-
] }),
|
|
200
|
+
] }), Ot = /* @__PURE__ */ r("div")({
|
|
201
201
|
name: "SponsorLogoWrap",
|
|
202
202
|
class: "s8p5v5z",
|
|
203
203
|
propsAsIs: !1
|
|
204
|
-
}),
|
|
204
|
+
}), Ct = () => x, St = /* @__PURE__ */ r(Ct())({
|
|
205
205
|
name: "SponsorLogo",
|
|
206
206
|
class: "s755yti",
|
|
207
207
|
propsAsIs: !0
|
|
208
|
-
}),
|
|
209
|
-
children: /* @__PURE__ */ n(
|
|
208
|
+
}), kt = () => /* @__PURE__ */ n(Ot, {
|
|
209
|
+
children: /* @__PURE__ */ n(St, {
|
|
210
210
|
name: "mastersLogo"
|
|
211
211
|
})
|
|
212
|
-
}),
|
|
212
|
+
}), wt = /* @__PURE__ */ r("div")({
|
|
213
213
|
name: "Container",
|
|
214
214
|
class: "c38csyt",
|
|
215
215
|
propsAsIs: !1
|
|
216
|
-
}),
|
|
216
|
+
}), bt = /* @__PURE__ */ r("div")({
|
|
217
217
|
name: "Title",
|
|
218
218
|
class: "ty221rx",
|
|
219
219
|
propsAsIs: !1
|
|
@@ -221,15 +221,15 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
221
221
|
name: "Description",
|
|
222
222
|
class: "dlaj9xp",
|
|
223
223
|
propsAsIs: !1
|
|
224
|
-
}),
|
|
225
|
-
/* @__PURE__ */ n(
|
|
226
|
-
/* @__PURE__ */ n(
|
|
224
|
+
}), Qt = ({ title: e, description: t }) => /* @__PURE__ */ u(wt, { children: [
|
|
225
|
+
/* @__PURE__ */ n(x, { name: "icon-check-circle" }),
|
|
226
|
+
/* @__PURE__ */ n(bt, { children: e }),
|
|
227
227
|
/* @__PURE__ */ n($t, { children: t })
|
|
228
|
-
] }),
|
|
228
|
+
] }), Rt = /* @__PURE__ */ r("div")({
|
|
229
229
|
name: "Container",
|
|
230
230
|
class: "c16sbdnm",
|
|
231
231
|
propsAsIs: !1
|
|
232
|
-
}),
|
|
232
|
+
}), Ut = () => x, Yt = /* @__PURE__ */ r(Ut())({
|
|
233
233
|
name: "IconPrediction",
|
|
234
234
|
class: "ibhorgl",
|
|
235
235
|
propsAsIs: !0
|
|
@@ -237,15 +237,15 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
237
237
|
name: "FeedbackIconWrap",
|
|
238
238
|
class: "f1g20ja7",
|
|
239
239
|
propsAsIs: !1
|
|
240
|
-
}),
|
|
240
|
+
}), X = /* @__PURE__ */ r("div")({
|
|
241
241
|
name: "FeedbackHeader",
|
|
242
242
|
class: "f455ozj",
|
|
243
243
|
propsAsIs: !1
|
|
244
|
-
}),
|
|
244
|
+
}), Pt = /* @__PURE__ */ r("span")({
|
|
245
245
|
name: "FeedbackTitle",
|
|
246
246
|
class: "f1913njx",
|
|
247
247
|
propsAsIs: !1
|
|
248
|
-
}),
|
|
248
|
+
}), q = /* @__PURE__ */ r("span")({
|
|
249
249
|
name: "FeedbackDescription",
|
|
250
250
|
class: "fzfk69z",
|
|
251
251
|
propsAsIs: !1
|
|
@@ -253,7 +253,7 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
253
253
|
name: "FeedbackText",
|
|
254
254
|
class: "fx87qaj",
|
|
255
255
|
propsAsIs: !1
|
|
256
|
-
}),
|
|
256
|
+
}), qt = ({
|
|
257
257
|
feedbackMessages: e,
|
|
258
258
|
questionVotedCorrectly: t,
|
|
259
259
|
questionVoted: s,
|
|
@@ -263,49 +263,49 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
263
263
|
showExpiredNotification: a,
|
|
264
264
|
showClosedNotificationTrivia: c,
|
|
265
265
|
votedInCurrentRender: d,
|
|
266
|
-
votedAfterQuestionClosed:
|
|
267
|
-
enteredAnActiveQuestion:
|
|
266
|
+
votedAfterQuestionClosed: M,
|
|
267
|
+
enteredAnActiveQuestion: I,
|
|
268
268
|
marketClosed: p
|
|
269
269
|
}) => {
|
|
270
|
-
const
|
|
271
|
-
if (!a && !c && !
|
|
270
|
+
const h = s && (o === N.TRIVIA || o === N.PREDICTION) && d && l !== $.RESOLVED, m = o === N.PREDICTION && !i, f = p && o === N.PREDICTION && !s && !I || o === N.PREDICTION && M && d && I, D = h && m, A = h && i, g = o === N.PREDICTION && s && d && i, y = s && o === N.POLL && d;
|
|
271
|
+
if (!a && !c && !D && !A && !f && !y && !g)
|
|
272
272
|
return null;
|
|
273
|
-
const
|
|
274
|
-
return /* @__PURE__ */ u(
|
|
275
|
-
a && /* @__PURE__ */ u(
|
|
276
|
-
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(
|
|
273
|
+
const j = t ? "correct" : "incorrect", v = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
274
|
+
return /* @__PURE__ */ u(Rt, { "data-isPrediction": m, children: [
|
|
275
|
+
a && /* @__PURE__ */ u(S, { children: [
|
|
276
|
+
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(x, { name: "questionExpired" }) }),
|
|
277
277
|
/* @__PURE__ */ u("div", { children: [
|
|
278
|
-
/* @__PURE__ */ n(
|
|
278
|
+
/* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(q, { children: "Question Expired" }) }),
|
|
279
279
|
/* @__PURE__ */ n(ne, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
280
280
|
] })
|
|
281
281
|
] }),
|
|
282
|
-
c && /* @__PURE__ */ u(
|
|
283
|
-
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(
|
|
282
|
+
c && /* @__PURE__ */ u(S, { children: [
|
|
283
|
+
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(x, { name: "questionExpired" }) }),
|
|
284
284
|
/* @__PURE__ */ u("div", { children: [
|
|
285
|
-
/* @__PURE__ */ n(
|
|
285
|
+
/* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(q, { children: "Question Closed" }) }),
|
|
286
286
|
/* @__PURE__ */ n(ne, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
287
287
|
] })
|
|
288
288
|
] }),
|
|
289
|
-
|
|
290
|
-
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(
|
|
289
|
+
f && /* @__PURE__ */ u(S, { children: [
|
|
290
|
+
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(x, { name: "questionExpired" }) }),
|
|
291
291
|
/* @__PURE__ */ u("div", { children: [
|
|
292
|
-
/* @__PURE__ */ n(
|
|
292
|
+
/* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(q, { children: "Question Closed" }) }),
|
|
293
293
|
/* @__PURE__ */ n(ne, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
294
294
|
] })
|
|
295
295
|
] }),
|
|
296
|
-
|
|
297
|
-
/* @__PURE__ */ n(
|
|
298
|
-
/* @__PURE__ */ n(
|
|
296
|
+
D && /* @__PURE__ */ u(S, { children: [
|
|
297
|
+
/* @__PURE__ */ n(Yt, { name: "icon-prediction" }),
|
|
298
|
+
/* @__PURE__ */ n(q, { children: "Stay tuned to see if your prediction was correct." })
|
|
299
299
|
] }),
|
|
300
|
-
y && /* @__PURE__ */ u(
|
|
301
|
-
/* @__PURE__ */ n(F, { "data-feedbackType": "correct", children: /* @__PURE__ */ n(
|
|
302
|
-
/* @__PURE__ */ n(
|
|
300
|
+
y && /* @__PURE__ */ u(S, { children: [
|
|
301
|
+
/* @__PURE__ */ n(F, { "data-feedbackType": "correct", children: /* @__PURE__ */ n(x, { name: "correct" }) }),
|
|
302
|
+
/* @__PURE__ */ n(q, { children: "That's for answering. Please stay tuned for the next question." })
|
|
303
303
|
] }),
|
|
304
|
-
(
|
|
305
|
-
/* @__PURE__ */ n(F, { "data-feedbackType":
|
|
306
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ u(
|
|
307
|
-
/* @__PURE__ */ n(
|
|
308
|
-
/* @__PURE__ */ n(
|
|
304
|
+
(A || g) && /* @__PURE__ */ u(S, { children: [
|
|
305
|
+
/* @__PURE__ */ n(F, { "data-feedbackType": j, children: /* @__PURE__ */ n(x, { name: j }) }),
|
|
306
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ u(X, { children: [
|
|
307
|
+
/* @__PURE__ */ n(Pt, { "data-feedbackType": j, children: v == null ? void 0 : v.title }),
|
|
308
|
+
/* @__PURE__ */ n(q, { children: v == null ? void 0 : v.description })
|
|
309
309
|
] }) })
|
|
310
310
|
] })
|
|
311
311
|
] });
|
|
@@ -329,15 +329,15 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
329
329
|
name: "ButtonContainer",
|
|
330
330
|
class: "b1b6dl8t",
|
|
331
331
|
propsAsIs: !1
|
|
332
|
-
}),
|
|
332
|
+
}), Zt = /* @__PURE__ */ r("div")({
|
|
333
333
|
name: "ButtonPct",
|
|
334
334
|
class: "b4iik8i",
|
|
335
335
|
propsAsIs: !1
|
|
336
|
-
}),
|
|
336
|
+
}), Ht = /* @__PURE__ */ r("span")({
|
|
337
337
|
name: "ButtonBody",
|
|
338
338
|
class: "b1gq1lnf",
|
|
339
339
|
propsAsIs: !1
|
|
340
|
-
}),
|
|
340
|
+
}), Gt = /* @__PURE__ */ r("div")({
|
|
341
341
|
name: "IconContainer",
|
|
342
342
|
class: "i1j65z51",
|
|
343
343
|
propsAsIs: !1
|
|
@@ -345,15 +345,15 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
345
345
|
name: "IconWrap",
|
|
346
346
|
class: "i19tpfua",
|
|
347
347
|
propsAsIs: !1
|
|
348
|
-
}),
|
|
348
|
+
}), Ee = /* @__PURE__ */ r("img")({
|
|
349
349
|
name: "Icon",
|
|
350
350
|
class: "i1tubmma",
|
|
351
351
|
propsAsIs: !1
|
|
352
|
-
}),
|
|
352
|
+
}), Xt = () => Ee, Kt = /* @__PURE__ */ r(Xt())({
|
|
353
353
|
name: "IconDefault",
|
|
354
354
|
class: "i1grrgwj",
|
|
355
355
|
propsAsIs: !0
|
|
356
|
-
}), es = () =>
|
|
356
|
+
}), es = () => Ee, ts = /* @__PURE__ */ r(es())({
|
|
357
357
|
name: "IconCircle",
|
|
358
358
|
class: "ibemyq8",
|
|
359
359
|
propsAsIs: !0
|
|
@@ -373,33 +373,33 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
373
373
|
name: "Percentage",
|
|
374
374
|
class: "pu9kmlb",
|
|
375
375
|
propsAsIs: !1
|
|
376
|
-
}), rs = () =>
|
|
376
|
+
}), rs = () => x, as = /* @__PURE__ */ r(rs())({
|
|
377
377
|
name: "CheckIcon",
|
|
378
378
|
class: "c1j2j0s0",
|
|
379
379
|
propsAsIs: !0
|
|
380
|
-
}),
|
|
381
|
-
[B.CENTERED]: (e) => /* @__PURE__ */ n(
|
|
382
|
-
[B.TRANSPARENT]: (e) => /* @__PURE__ */ n(
|
|
380
|
+
}), Me = {
|
|
381
|
+
[B.CENTERED]: (e) => /* @__PURE__ */ n(Kt, { alt: "option-icon", src: e }),
|
|
382
|
+
[B.TRANSPARENT]: (e) => /* @__PURE__ */ n(Gt, { children: /* @__PURE__ */ n(Jt, { style: { backgroundImage: `url(${e})` } }) }),
|
|
383
383
|
[B.ROUNDED]: (e) => /* @__PURE__ */ n(ts, { alt: "option-icon", src: e }),
|
|
384
384
|
[B.NONE]: () => null,
|
|
385
385
|
[B.UNSET]: () => null
|
|
386
386
|
}, ls = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: o, questionVoted: i }) => {
|
|
387
|
-
if (e ===
|
|
387
|
+
if (e === N.POLL && o)
|
|
388
388
|
return "correct";
|
|
389
|
-
if (e ===
|
|
389
|
+
if (e === N.PREDICTION) {
|
|
390
390
|
if (t && i)
|
|
391
391
|
return o ? s ? "correct" : "incorrect" : "unset";
|
|
392
392
|
if (o)
|
|
393
393
|
return "correct";
|
|
394
394
|
}
|
|
395
|
-
return e ===
|
|
395
|
+
return e === N.TRIVIA && i && o ? s ? "correct" : "incorrect" : "unset";
|
|
396
396
|
}, cs = ({
|
|
397
397
|
questionType: e,
|
|
398
398
|
questionVoted: t,
|
|
399
399
|
correct: s,
|
|
400
400
|
hasCorrectAnswer: o,
|
|
401
401
|
questionStatus: i
|
|
402
|
-
}) => e ===
|
|
402
|
+
}) => e === N.TRIVIA ? t && s : e === N.PREDICTION ? t && s && o || i === $.RESOLVED && s : !1, ds = (e) => {
|
|
403
403
|
var t;
|
|
404
404
|
const {
|
|
405
405
|
// option props
|
|
@@ -411,43 +411,43 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
411
411
|
// extra props
|
|
412
412
|
onVote: c,
|
|
413
413
|
markThatVoted: d,
|
|
414
|
-
youSelected:
|
|
415
|
-
questionVoted:
|
|
414
|
+
youSelected: M,
|
|
415
|
+
questionVoted: I,
|
|
416
416
|
imageMode: p,
|
|
417
|
-
answerTimeExpired:
|
|
418
|
-
questionStatus:
|
|
419
|
-
isLoading:
|
|
420
|
-
questionType:
|
|
421
|
-
correct:
|
|
422
|
-
hasCorrectAnswer:
|
|
417
|
+
answerTimeExpired: h,
|
|
418
|
+
questionStatus: m,
|
|
419
|
+
isLoading: f,
|
|
420
|
+
questionType: D,
|
|
421
|
+
correct: A,
|
|
422
|
+
hasCorrectAnswer: g,
|
|
423
423
|
votedAfterQuestionClosed: y,
|
|
424
|
-
enteredAnActiveQuestion:
|
|
425
|
-
marketClosed:
|
|
426
|
-
} = e,
|
|
424
|
+
enteredAnActiveQuestion: j,
|
|
425
|
+
marketClosed: v
|
|
426
|
+
} = e, O = ls(e), Q = cs({ questionType: D, questionVoted: I, correct: A, hasCorrectAnswer: g, questionStatus: m }), b = v && D === N.PREDICTION, H = I || b, T = D === N.PREDICTION && !I && m !== $.RESOLVED;
|
|
427
427
|
return /* @__PURE__ */ u(
|
|
428
428
|
Ft,
|
|
429
429
|
{
|
|
430
430
|
value: s,
|
|
431
|
-
"data-selected":
|
|
432
|
-
"data-answer-state":
|
|
433
|
-
disabled:
|
|
434
|
-
"data-is-not-checked":
|
|
435
|
-
onClick: (
|
|
431
|
+
"data-selected": M,
|
|
432
|
+
"data-answer-state": O,
|
|
433
|
+
disabled: I || f || h || b && !j || b && j && y,
|
|
434
|
+
"data-is-not-checked": I && !M && O !== "incorrect",
|
|
435
|
+
onClick: (L) => {
|
|
436
436
|
d(
|
|
437
|
-
|
|
438
|
-
), c(
|
|
437
|
+
D === N.PREDICTION ? v : m === $.RESOLVED
|
|
438
|
+
), c(L);
|
|
439
439
|
},
|
|
440
440
|
children: [
|
|
441
|
-
/* @__PURE__ */ n(
|
|
442
|
-
/* @__PURE__ */ u(
|
|
443
|
-
o && p && ((t =
|
|
441
|
+
/* @__PURE__ */ n(Zt, { "data-answer-state": O, style: { width: `${H ? l : 0}%` } }),
|
|
442
|
+
/* @__PURE__ */ u(Ht, { children: [
|
|
443
|
+
o && p && ((t = Me[p]) == null ? void 0 : t.call(Me, o)),
|
|
444
444
|
/* @__PURE__ */ n(ss, { children: i }),
|
|
445
445
|
T && /* @__PURE__ */ u("div", { children: [
|
|
446
446
|
/* @__PURE__ */ n(ie, { value: a }),
|
|
447
447
|
/* @__PURE__ */ n(is, { children: "pts" })
|
|
448
448
|
] }),
|
|
449
449
|
H && /* @__PURE__ */ u(ns, { children: [
|
|
450
|
-
|
|
450
|
+
Q && /* @__PURE__ */ n(as, { name: "selected" }),
|
|
451
451
|
/* @__PURE__ */ n(os, { children: /* @__PURE__ */ n(ie, { value: l, suffix: "%" }) })
|
|
452
452
|
] })
|
|
453
453
|
] })
|
|
@@ -455,93 +455,93 @@ const Ke = /* @__PURE__ */ r("div")({
|
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
};
|
|
458
|
-
var
|
|
459
|
-
let [a, c] =
|
|
460
|
-
let y =
|
|
461
|
-
if (
|
|
462
|
-
|
|
458
|
+
var Ie = typeof window > "u" ? te : Ze, us = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: o = 0, onComplete: i, onUpdate: l }) => {
|
|
459
|
+
let [a, c] = w(s), d = R(0), M = R(s), I = R(s * -1e3), p = R(null), h = R(null), m = R(null), f = (g) => {
|
|
460
|
+
let y = g / 1e3;
|
|
461
|
+
if (h.current === null) {
|
|
462
|
+
h.current = y, p.current = requestAnimationFrame(f);
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
|
-
let
|
|
466
|
-
|
|
467
|
-
let
|
|
468
|
-
c(
|
|
469
|
-
},
|
|
470
|
-
p.current && cancelAnimationFrame(p.current),
|
|
471
|
-
},
|
|
472
|
-
|
|
473
|
-
let y = typeof
|
|
474
|
-
|
|
465
|
+
let j = y - h.current, v = d.current + j;
|
|
466
|
+
h.current = y, d.current = v;
|
|
467
|
+
let O = M.current + (o === 0 ? v : (v / o | 0) * o), Q = M.current + v, b = typeof t == "number" && Q >= t;
|
|
468
|
+
c(b ? t : O), b || (p.current = requestAnimationFrame(f));
|
|
469
|
+
}, D = () => {
|
|
470
|
+
p.current && cancelAnimationFrame(p.current), m.current && clearTimeout(m.current), h.current = null;
|
|
471
|
+
}, A = W((g) => {
|
|
472
|
+
D(), d.current = 0;
|
|
473
|
+
let y = typeof g == "number" ? g : s;
|
|
474
|
+
M.current = y, c(y), e && (p.current = requestAnimationFrame(f));
|
|
475
475
|
}, [e, s]);
|
|
476
|
-
return
|
|
476
|
+
return Ie(() => {
|
|
477
477
|
if (l == null || l(a), t && a >= t) {
|
|
478
|
-
|
|
479
|
-
let { shouldRepeat:
|
|
480
|
-
|
|
478
|
+
I.current += t * 1e3;
|
|
479
|
+
let { shouldRepeat: g = !1, delay: y = 0, newStartAt: j } = (i == null ? void 0 : i(I.current / 1e3)) || {};
|
|
480
|
+
g && (m.current = setTimeout(() => A(j), y * 1e3));
|
|
481
481
|
}
|
|
482
|
-
}, [a, t]),
|
|
482
|
+
}, [a, t]), Ie(() => (e && (p.current = requestAnimationFrame(f)), D), [e, t, o]), { elapsedTime: a, reset: A };
|
|
483
483
|
}, ps = (e, t, s) => {
|
|
484
484
|
let o = e / 2, i = t / 2, l = o - i, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
|
|
485
485
|
return { path: `m ${o},${i} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
|
|
486
|
-
},
|
|
486
|
+
}, he = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, Ms = (e) => ({ position: "relative", width: e, height: e }), Is = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Le = (e, t, s, o, i) => {
|
|
487
487
|
if (o === 0)
|
|
488
488
|
return t;
|
|
489
489
|
let l = (i ? o - e : e) / o;
|
|
490
490
|
return t + s * l;
|
|
491
|
-
},
|
|
491
|
+
}, Ne = (e) => {
|
|
492
492
|
var t, s;
|
|
493
493
|
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (o, i, l, a) => `#${i}${i}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((o) => parseInt(o, 16))) != null ? s : [];
|
|
494
|
-
},
|
|
494
|
+
}, hs = (e, t) => {
|
|
495
495
|
var s;
|
|
496
496
|
let { colors: o, colorsTime: i, isSmoothColorTransition: l = !0 } = e;
|
|
497
497
|
if (typeof o == "string")
|
|
498
498
|
return o;
|
|
499
|
-
let a = (s = i == null ? void 0 : i.findIndex((
|
|
499
|
+
let a = (s = i == null ? void 0 : i.findIndex((h, m) => h >= t && t >= i[m + 1])) != null ? s : -1;
|
|
500
500
|
if (!i || a === -1)
|
|
501
501
|
return o[0];
|
|
502
502
|
if (!l)
|
|
503
503
|
return o[a];
|
|
504
|
-
let c = i[a] - t, d = i[a] - i[a + 1],
|
|
505
|
-
return `rgb(${
|
|
506
|
-
},
|
|
507
|
-
let { duration: t, initialRemainingTime: s, updateInterval: o, size: i = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation:
|
|
508
|
-
let
|
|
509
|
-
|
|
510
|
-
} : void 0, onComplete: typeof
|
|
511
|
-
var
|
|
512
|
-
let { shouldRepeat:
|
|
513
|
-
if (
|
|
514
|
-
return { shouldRepeat:
|
|
515
|
-
} : void 0 }),
|
|
516
|
-
return { elapsedTime:
|
|
517
|
-
},
|
|
518
|
-
let { children: t, strokeLinecap: s, trailColor: o, trailStrokeWidth: i } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime:
|
|
519
|
-
return V.createElement("div", { style:
|
|
504
|
+
let c = i[a] - t, d = i[a] - i[a + 1], M = Ne(o[a]), I = Ne(o[a + 1]), p = !!e.isGrowing;
|
|
505
|
+
return `rgb(${M.map((h, m) => Le(c, h, I[m] - h, d, p) | 0).join(",")})`;
|
|
506
|
+
}, Ns = (e) => {
|
|
507
|
+
let { duration: t, initialRemainingTime: s, updateInterval: o, size: i = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: M = "clockwise", onComplete: I, onUpdate: p } = e, h = R(), m = Math.max(l, a ?? 0), { path: f, pathLength: D } = ps(i, m, M), { elapsedTime: A } = us({ isPlaying: c, duration: t, startAt: he(t, s), updateInterval: o, onUpdate: typeof p == "function" ? (y) => {
|
|
508
|
+
let j = Math.ceil(t - y);
|
|
509
|
+
j !== h.current && (h.current = j, p(j));
|
|
510
|
+
} : void 0, onComplete: typeof I == "function" ? (y) => {
|
|
511
|
+
var j;
|
|
512
|
+
let { shouldRepeat: v, delay: O, newInitialRemainingTime: Q } = (j = I(y)) != null ? j : {};
|
|
513
|
+
if (v)
|
|
514
|
+
return { shouldRepeat: v, delay: O, newStartAt: he(t, Q) };
|
|
515
|
+
} : void 0 }), g = t - A;
|
|
516
|
+
return { elapsedTime: A, path: f, pathLength: D, remainingTime: Math.ceil(g), rotation: M, size: i, stroke: hs(e, g), strokeDashoffset: Le(A, 0, D, t, d), strokeWidth: l };
|
|
517
|
+
}, ze = (e) => {
|
|
518
|
+
let { children: t, strokeLinecap: s, trailColor: o, trailStrokeWidth: i } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: M, elapsedTime: I, size: p, strokeWidth: h } = Ns(e);
|
|
519
|
+
return V.createElement("div", { style: Ms(p) }, V.createElement("svg", { viewBox: `0 0 ${p} ${p}`, width: p, height: p, xmlns: "http://www.w3.org/2000/svg" }, V.createElement("path", { d: l, fill: "none", stroke: o ?? "#d9d9d9", strokeWidth: i ?? h }), V.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: h, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && V.createElement("div", { style: Is }, t({ remainingTime: M, elapsedTime: I, color: c })));
|
|
520
520
|
};
|
|
521
|
-
|
|
522
|
-
const
|
|
521
|
+
ze.displayName = "CountdownCircleTimer";
|
|
522
|
+
const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRAY3], gs = [10, 10, 1, 0], Ds = /* @__PURE__ */ r("div")({
|
|
523
523
|
name: "RemainingTime",
|
|
524
524
|
class: "r165427",
|
|
525
525
|
propsAsIs: !1
|
|
526
|
-
}), Ts =
|
|
526
|
+
}), Ts = U.SECONDARY_GREEN6, me = U.SECONDARY_RED3, As = U.NEUTRALS_GRAY3, js = ({
|
|
527
527
|
isPlaying: e = !0,
|
|
528
528
|
duration: t = 30,
|
|
529
529
|
onTimerExpired: s
|
|
530
530
|
}) => {
|
|
531
|
-
const [o, i] =
|
|
531
|
+
const [o, i] = w(t > 10 ? Ts : me), l = ({
|
|
532
532
|
remainingTime: d
|
|
533
|
-
}) => /* @__PURE__ */ n(
|
|
533
|
+
}) => /* @__PURE__ */ n(Ds, {
|
|
534
534
|
children: d
|
|
535
535
|
}), a = W(() => {
|
|
536
|
-
s == null || s(), i(
|
|
536
|
+
s == null || s(), i(As);
|
|
537
537
|
}, [s, i]), c = W((d) => {
|
|
538
|
-
d === 10 && i(
|
|
538
|
+
d === 10 && i(me);
|
|
539
539
|
}, [i]);
|
|
540
|
-
return /* @__PURE__ */ n(
|
|
540
|
+
return /* @__PURE__ */ n(ze, {
|
|
541
541
|
isPlaying: e,
|
|
542
542
|
duration: t,
|
|
543
|
-
colors:
|
|
544
|
-
colorsTime:
|
|
543
|
+
colors: ms,
|
|
544
|
+
colorsTime: gs,
|
|
545
545
|
size: 32,
|
|
546
546
|
strokeWidth: 2,
|
|
547
547
|
trailStrokeWidth: 2,
|
|
@@ -554,31 +554,31 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
554
554
|
name: "WinBarContainer",
|
|
555
555
|
class: "wie6cqo",
|
|
556
556
|
propsAsIs: !1
|
|
557
|
-
}),
|
|
557
|
+
}), vs = /* @__PURE__ */ r("div")({
|
|
558
558
|
name: "Content",
|
|
559
559
|
class: "cgizw4u",
|
|
560
560
|
propsAsIs: !1
|
|
561
|
-
}),
|
|
561
|
+
}), xs = /* @__PURE__ */ r("div")({
|
|
562
562
|
name: "Title",
|
|
563
563
|
class: "t1l3ucjp",
|
|
564
564
|
propsAsIs: !1
|
|
565
|
-
}),
|
|
565
|
+
}), fs = () => x, Es = /* @__PURE__ */ r(fs())({
|
|
566
566
|
name: "WinIcon",
|
|
567
567
|
class: "wx7j799",
|
|
568
568
|
propsAsIs: !0
|
|
569
|
-
}),
|
|
569
|
+
}), Ls = /* @__PURE__ */ r("div")({
|
|
570
570
|
name: "Points",
|
|
571
571
|
class: "p4lwuj0",
|
|
572
572
|
propsAsIs: !1
|
|
573
|
-
}),
|
|
573
|
+
}), zs = /* @__PURE__ */ r("span")({
|
|
574
574
|
name: "PointsCount",
|
|
575
575
|
class: "po9i64o",
|
|
576
576
|
propsAsIs: !1
|
|
577
|
-
}),
|
|
577
|
+
}), Os = /* @__PURE__ */ r("span")({
|
|
578
578
|
name: "PointsUnits",
|
|
579
579
|
class: "pe5g05h",
|
|
580
580
|
propsAsIs: !1
|
|
581
|
-
}),
|
|
581
|
+
}), Cs = ({
|
|
582
582
|
title: e,
|
|
583
583
|
points: t,
|
|
584
584
|
isPlayingTimer: s,
|
|
@@ -586,142 +586,142 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
586
586
|
questionType: i,
|
|
587
587
|
timerDuration: l,
|
|
588
588
|
onTimerExpired: a
|
|
589
|
-
}) => /* @__PURE__ */ u(ys, { style: { justifyContent: i ===
|
|
590
|
-
/* @__PURE__ */ u(
|
|
591
|
-
e && /* @__PURE__ */ n(
|
|
592
|
-
t !== void 0 && i !==
|
|
593
|
-
/* @__PURE__ */ n(
|
|
594
|
-
/* @__PURE__ */ u(
|
|
595
|
-
/* @__PURE__ */ n(
|
|
596
|
-
/* @__PURE__ */ n(
|
|
589
|
+
}) => /* @__PURE__ */ u(ys, { style: { justifyContent: i === N.PREDICTION ? "center" : "space-between" }, children: [
|
|
590
|
+
/* @__PURE__ */ u(vs, { children: [
|
|
591
|
+
e && /* @__PURE__ */ n(xs, { children: e }),
|
|
592
|
+
t !== void 0 && i !== N.POLL && /* @__PURE__ */ u(S, { children: [
|
|
593
|
+
/* @__PURE__ */ n(Es, { name: "icon-trophy" }),
|
|
594
|
+
/* @__PURE__ */ u(Ls, { children: [
|
|
595
|
+
/* @__PURE__ */ n(zs, { children: /* @__PURE__ */ n(ie, { value: t }) }),
|
|
596
|
+
/* @__PURE__ */ n(Os, { children: "PTS" })
|
|
597
597
|
] })
|
|
598
598
|
] })
|
|
599
599
|
] }),
|
|
600
|
-
o && i !==
|
|
601
|
-
] }),
|
|
600
|
+
o && i !== N.PREDICTION && /* @__PURE__ */ n(js, { isPlaying: s, onTimerExpired: a, duration: l })
|
|
601
|
+
] }), Ss = ({ openedQuestion: e, isLoading: t, vote: s, close: o }) => {
|
|
602
602
|
var i, l;
|
|
603
|
-
const a = e.subject, c = e.type, d = e.status,
|
|
603
|
+
const a = e.subject, c = e.type, d = e.status, M = (i = e.options) == null ? void 0 : i.options, I = e.marketClosed, [p, h] = w(!1), [m, f] = w(!1), [D, A] = w(!0), [g, y] = w(!1), [j, v] = w(""), O = e == null ? void 0 : e.id;
|
|
604
604
|
te(() => {
|
|
605
|
-
c ===
|
|
605
|
+
c === N.PREDICTION ? I && A(!1) : d === $.RESOLVED && A(!1);
|
|
606
606
|
}, []);
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
}, []),
|
|
610
|
-
async (
|
|
611
|
-
if (
|
|
612
|
-
const _ =
|
|
613
|
-
|
|
607
|
+
const Q = W((E) => {
|
|
608
|
+
f(E), h(!0);
|
|
609
|
+
}, []), b = W(
|
|
610
|
+
async (E) => {
|
|
611
|
+
if (O) {
|
|
612
|
+
const _ = E.currentTarget.value;
|
|
613
|
+
v(_), await s(O, _);
|
|
614
614
|
}
|
|
615
615
|
},
|
|
616
|
-
[
|
|
616
|
+
[O, v, s]
|
|
617
617
|
), H = W(() => {
|
|
618
618
|
y(!0), setTimeout(o, 3e3);
|
|
619
|
-
}, [o]), T =
|
|
620
|
-
() => e == null ? void 0 : e.answers.find((
|
|
619
|
+
}, [o]), T = k(
|
|
620
|
+
() => e == null ? void 0 : e.answers.find((E) => E.youVoted === !0),
|
|
621
621
|
[e]
|
|
622
|
-
),
|
|
623
|
-
() => !!(e != null && e.answers.find((
|
|
622
|
+
), L = k(
|
|
623
|
+
() => !!(e != null && e.answers.find((E) => E.correct === !0)),
|
|
624
624
|
[e]
|
|
625
|
-
),
|
|
626
|
-
() => e == null ? void 0 : e.answers.find((
|
|
625
|
+
), C = k(
|
|
626
|
+
() => e == null ? void 0 : e.answers.find((E) => E.correct === !0),
|
|
627
627
|
[e]
|
|
628
|
-
),
|
|
628
|
+
), we = k(() => e ? e.answers.map((E) => {
|
|
629
629
|
var _;
|
|
630
630
|
return {
|
|
631
|
-
...
|
|
631
|
+
...E,
|
|
632
632
|
questionVoted: !!T,
|
|
633
|
-
youSelected:
|
|
633
|
+
youSelected: j === E.id,
|
|
634
634
|
isLoading: t,
|
|
635
|
-
hasCorrectAnswer:
|
|
635
|
+
hasCorrectAnswer: L,
|
|
636
636
|
questionType: e.type,
|
|
637
|
-
answerTimeExpired:
|
|
637
|
+
answerTimeExpired: g,
|
|
638
638
|
questionStatus: d,
|
|
639
639
|
imageMode: (_ = e.appearance) == null ? void 0 : _.images,
|
|
640
|
-
onVote:
|
|
640
|
+
onVote: b
|
|
641
641
|
};
|
|
642
642
|
}) : [], [
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
L,
|
|
644
|
+
g,
|
|
645
645
|
t,
|
|
646
646
|
e,
|
|
647
647
|
T,
|
|
648
648
|
d,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
]),
|
|
652
|
-
if (c ===
|
|
649
|
+
b,
|
|
650
|
+
j
|
|
651
|
+
]), be = M && (M.case === "trivia" || M.case === "prediction") ? M.value : void 0, P = d === $.RESOLVED && c === N.TRIVIA && !T && !D, ce = c === N.TRIVIA && m && p && D, de = k(() => c === N.PREDICTION ? !!(T && !L || T && L && C != null && C.youVoted) : !0, [c, T, L, C]), $e = k(() => {
|
|
652
|
+
if (c === N.PREDICTION && T && (!L || L && C != null && C.youVoted))
|
|
653
653
|
return T.points;
|
|
654
|
-
if (!(
|
|
655
|
-
return d === $.RESOLVED ? 0 : T ? T.correct ? T.points : 0 :
|
|
654
|
+
if (!(P || g))
|
|
655
|
+
return d === $.RESOLVED ? 0 : T ? T.correct ? T.points : 0 : C == null ? void 0 : C.points;
|
|
656
656
|
}, [
|
|
657
|
-
|
|
657
|
+
g,
|
|
658
658
|
T,
|
|
659
|
-
|
|
659
|
+
C,
|
|
660
660
|
d,
|
|
661
|
-
|
|
661
|
+
P,
|
|
662
662
|
c,
|
|
663
|
-
|
|
664
|
-
]),
|
|
665
|
-
return /* @__PURE__ */ n(
|
|
663
|
+
L
|
|
664
|
+
]), Qe = k(() => c === N.PREDICTION && T ? L ? L && C != null && C.youVoted ? "You won" : "" : "To win" : P || g ? "Time expired" : c === N.POLL ? "Time remaining" : T ? "You won" : "To win", [g, c, T, P, L, C]), Re = T || P || ce || c === N.TRIVIA && d === $.RESOLVED && D;
|
|
665
|
+
return /* @__PURE__ */ n(Pe, { "data-question-header": "true", children: /* @__PURE__ */ n(Vt, { children: /* @__PURE__ */ u(Wt, { children: [
|
|
666
666
|
/* @__PURE__ */ n(
|
|
667
|
-
|
|
667
|
+
qt,
|
|
668
668
|
{
|
|
669
|
-
feedbackMessages:
|
|
669
|
+
feedbackMessages: be,
|
|
670
670
|
questionVoted: !!T,
|
|
671
671
|
questionVotedCorrectly: T == null ? void 0 : T.correct,
|
|
672
672
|
questionType: c,
|
|
673
|
-
hasCorrectAnswer:
|
|
673
|
+
hasCorrectAnswer: L,
|
|
674
674
|
questionStatus: d,
|
|
675
|
-
showExpiredNotification:
|
|
675
|
+
showExpiredNotification: P,
|
|
676
676
|
showClosedNotificationTrivia: ce,
|
|
677
677
|
votedInCurrentRender: p,
|
|
678
|
-
votedAfterQuestionClosed:
|
|
679
|
-
enteredAnActiveQuestion:
|
|
680
|
-
marketClosed:
|
|
678
|
+
votedAfterQuestionClosed: m,
|
|
679
|
+
enteredAnActiveQuestion: D,
|
|
680
|
+
marketClosed: I
|
|
681
681
|
}
|
|
682
682
|
),
|
|
683
683
|
de && /* @__PURE__ */ n(
|
|
684
|
-
|
|
684
|
+
Cs,
|
|
685
685
|
{
|
|
686
|
-
title:
|
|
686
|
+
title: Qe,
|
|
687
687
|
points: $e,
|
|
688
688
|
onTimerExpired: H,
|
|
689
689
|
questionType: e.type,
|
|
690
690
|
isTimer: !t,
|
|
691
691
|
isPlayingTimer: !T,
|
|
692
|
-
timerDuration:
|
|
692
|
+
timerDuration: Re ? 0 : Number(((l = e == null ? void 0 : e.appearance) == null ? void 0 : l.autoHideInterval) || "30")
|
|
693
693
|
}
|
|
694
694
|
),
|
|
695
|
-
|
|
696
|
-
|
|
695
|
+
g ? /* @__PURE__ */ n(
|
|
696
|
+
Qt,
|
|
697
697
|
{
|
|
698
698
|
title: "More to come...",
|
|
699
699
|
description: "Watch for additional enhanced stream interactive experience."
|
|
700
700
|
}
|
|
701
|
-
) : /* @__PURE__ */ u(
|
|
701
|
+
) : /* @__PURE__ */ u(S, { children: [
|
|
702
702
|
/* @__PURE__ */ n(_t, { style: de ? {} : { marginTop: 0 }, children: a }),
|
|
703
|
-
/* @__PURE__ */ n(Bt, { children:
|
|
703
|
+
/* @__PURE__ */ n(Bt, { children: we.map((E) => /* @__PURE__ */ n(
|
|
704
704
|
ds,
|
|
705
705
|
{
|
|
706
|
-
...
|
|
707
|
-
markThatVoted:
|
|
708
|
-
votedAfterQuestionClosed:
|
|
709
|
-
enteredAnActiveQuestion:
|
|
710
|
-
marketClosed:
|
|
706
|
+
...E,
|
|
707
|
+
markThatVoted: Q,
|
|
708
|
+
votedAfterQuestionClosed: m,
|
|
709
|
+
enteredAnActiveQuestion: D,
|
|
710
|
+
marketClosed: I
|
|
711
711
|
},
|
|
712
|
-
|
|
712
|
+
E.id
|
|
713
713
|
)) })
|
|
714
714
|
] })
|
|
715
715
|
] }) }) });
|
|
716
|
-
},
|
|
716
|
+
}, ks = /* @__PURE__ */ r("div")({
|
|
717
717
|
name: "Container",
|
|
718
718
|
class: "cgn5uen",
|
|
719
719
|
propsAsIs: !1
|
|
720
|
-
}),
|
|
720
|
+
}), ws = /* @__PURE__ */ r("div")({
|
|
721
721
|
name: "Content",
|
|
722
722
|
class: "c1px8nt6",
|
|
723
723
|
propsAsIs: !1
|
|
724
|
-
}),
|
|
724
|
+
}), bs = /* @__PURE__ */ r("h3")({
|
|
725
725
|
name: "Title",
|
|
726
726
|
class: "t5et2jt",
|
|
727
727
|
propsAsIs: !1
|
|
@@ -729,15 +729,15 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
729
729
|
name: "Description",
|
|
730
730
|
class: "d1i2kpk2",
|
|
731
731
|
propsAsIs: !1
|
|
732
|
-
}),
|
|
732
|
+
}), Qs = /* @__PURE__ */ r("div")({
|
|
733
733
|
name: "DateWrap",
|
|
734
734
|
class: "dd3lh3p",
|
|
735
735
|
propsAsIs: !1
|
|
736
|
-
}),
|
|
736
|
+
}), Rs = /* @__PURE__ */ r("img")({
|
|
737
737
|
name: "Image",
|
|
738
738
|
class: "i1gfjeu5",
|
|
739
739
|
propsAsIs: !1
|
|
740
|
-
}),
|
|
740
|
+
}), Oe = ({
|
|
741
741
|
created: e,
|
|
742
742
|
image: t,
|
|
743
743
|
title: s,
|
|
@@ -745,7 +745,7 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
745
745
|
instantView: i,
|
|
746
746
|
notification: l
|
|
747
747
|
}) => {
|
|
748
|
-
const a =
|
|
748
|
+
const a = k(() => {
|
|
749
749
|
if (e) {
|
|
750
750
|
const d = new Date(e);
|
|
751
751
|
if (le(d))
|
|
@@ -756,34 +756,34 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
756
756
|
}
|
|
757
757
|
return null;
|
|
758
758
|
}, [e]), c = (i == null ? void 0 : i.image) || t;
|
|
759
|
-
return /* @__PURE__ */ u(
|
|
760
|
-
a && /* @__PURE__ */ u(
|
|
759
|
+
return /* @__PURE__ */ u(ks, { children: [
|
|
760
|
+
a && /* @__PURE__ */ u(Qs, { children: [
|
|
761
761
|
a.date,
|
|
762
762
|
" · ",
|
|
763
763
|
a.time
|
|
764
764
|
] }),
|
|
765
|
-
(i == null ? void 0 : i.video) && /* @__PURE__ */ n(
|
|
766
|
-
c && !(i != null && i.video) && /* @__PURE__ */ n(
|
|
767
|
-
/* @__PURE__ */ u(
|
|
768
|
-
/* @__PURE__ */ n(
|
|
765
|
+
(i == null ? void 0 : i.video) && /* @__PURE__ */ n(qe, { source: i.video.url, poster: i.video.thumbnailUrl }),
|
|
766
|
+
c && !(i != null && i.video) && /* @__PURE__ */ n(Rs, { src: c }),
|
|
767
|
+
/* @__PURE__ */ u(ws, { children: [
|
|
768
|
+
/* @__PURE__ */ n(bs, { children: o ? s : i == null ? void 0 : i.heading }),
|
|
769
769
|
/* @__PURE__ */ n($s, { children: o ? l == null ? void 0 : l.body : i == null ? void 0 : i.body })
|
|
770
770
|
] })
|
|
771
771
|
] });
|
|
772
|
-
},
|
|
772
|
+
}, Us = /* @__PURE__ */ r("div")({
|
|
773
773
|
name: "Container",
|
|
774
774
|
class: "c1euiow",
|
|
775
775
|
propsAsIs: !1
|
|
776
|
-
}),
|
|
776
|
+
}), Ys = /* @__PURE__ */ r("a")({
|
|
777
777
|
name: "WebLinkBtn",
|
|
778
778
|
class: "w19zie3h",
|
|
779
779
|
propsAsIs: !1
|
|
780
|
-
}),
|
|
781
|
-
/* @__PURE__ */ n(
|
|
782
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ u(
|
|
780
|
+
}), Ps = ({ instantView: e, ...t }) => /* @__PURE__ */ u(Us, { children: [
|
|
781
|
+
/* @__PURE__ */ n(Oe, { instantView: e, ...t }),
|
|
782
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ u(Ys, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
783
783
|
e == null ? void 0 : e.webLink.label,
|
|
784
|
-
/* @__PURE__ */ n(
|
|
784
|
+
/* @__PURE__ */ n(x, { name: "icon-external-link" })
|
|
785
785
|
] })
|
|
786
|
-
] }),
|
|
786
|
+
] }), qs = /* @__PURE__ */ r("div")({
|
|
787
787
|
name: "Container",
|
|
788
788
|
class: "c1dcxmvf",
|
|
789
789
|
propsAsIs: !1
|
|
@@ -796,7 +796,7 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
796
796
|
class: "q111mmic",
|
|
797
797
|
propsAsIs: !1
|
|
798
798
|
}), _s = ({ created: e, ...t }) => {
|
|
799
|
-
const s =
|
|
799
|
+
const s = k(() => {
|
|
800
800
|
if (e) {
|
|
801
801
|
const o = new Date(e);
|
|
802
802
|
if (le(o))
|
|
@@ -807,14 +807,14 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
807
807
|
}
|
|
808
808
|
return null;
|
|
809
809
|
}, [e]);
|
|
810
|
-
return /* @__PURE__ */ u(
|
|
810
|
+
return /* @__PURE__ */ u(qs, { children: [
|
|
811
811
|
s && /* @__PURE__ */ u(Vs, { children: [
|
|
812
812
|
s.date,
|
|
813
813
|
" · ",
|
|
814
814
|
s.time
|
|
815
815
|
] }),
|
|
816
816
|
t.title && /* @__PURE__ */ n(Ws, { children: t.title }),
|
|
817
|
-
/* @__PURE__ */ n(
|
|
817
|
+
/* @__PURE__ */ n(je, { ...t })
|
|
818
818
|
] });
|
|
819
819
|
}, Bs = /* @__PURE__ */ r("div")({
|
|
820
820
|
name: "QuestionContainer",
|
|
@@ -824,14 +824,14 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
824
824
|
openedQuestion: e
|
|
825
825
|
}) => {
|
|
826
826
|
var t, s;
|
|
827
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(
|
|
827
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(Ps, {
|
|
828
828
|
created: e.attributes.created,
|
|
829
829
|
...e.attributes.attributes.value
|
|
830
830
|
}) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(_s, {
|
|
831
831
|
created: e.attributes.created,
|
|
832
832
|
...e.attributes.attributes.value
|
|
833
833
|
}) : null;
|
|
834
|
-
},
|
|
834
|
+
}, Zs = ({
|
|
835
835
|
extendedQuestion: e,
|
|
836
836
|
vote: t,
|
|
837
837
|
close: s
|
|
@@ -840,59 +840,90 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
840
840
|
loading: o,
|
|
841
841
|
data: i
|
|
842
842
|
} = e;
|
|
843
|
-
return i ? /* @__PURE__ */ n(
|
|
843
|
+
return i ? /* @__PURE__ */ n(Ss, {
|
|
844
844
|
vote: t,
|
|
845
845
|
close: s,
|
|
846
846
|
openedQuestion: i,
|
|
847
847
|
isLoading: !!o
|
|
848
848
|
}) : null;
|
|
849
|
-
},
|
|
849
|
+
}, Hs = ({
|
|
850
850
|
gamification: e
|
|
851
851
|
}) => {
|
|
852
852
|
var t;
|
|
853
|
-
const s =
|
|
853
|
+
const s = Y(e.openedQuestion.$store), o = Y(e.openedQuestion.$extendedStore);
|
|
854
854
|
if (!s)
|
|
855
855
|
return null;
|
|
856
856
|
const i = s.type;
|
|
857
857
|
return /* @__PURE__ */ u(Bs, {
|
|
858
858
|
children: [/* @__PURE__ */ n(ye, {
|
|
859
859
|
close: e.closeQuestion,
|
|
860
|
-
type: ((t = s.attributes) == null ? void 0 : t.type) ||
|
|
861
|
-
}), i === "question" && /* @__PURE__ */ n(
|
|
860
|
+
type: ((t = s.attributes) == null ? void 0 : t.type) || N.UNSET
|
|
861
|
+
}), i === "question" && /* @__PURE__ */ n(Zs, {
|
|
862
862
|
vote: e.submitAnswer,
|
|
863
863
|
close: e.closeQuestion,
|
|
864
864
|
extendedQuestion: o
|
|
865
865
|
}), i !== "question" && /* @__PURE__ */ n(Fs, {
|
|
866
866
|
openedQuestion: s
|
|
867
|
-
}), /* @__PURE__ */ n(
|
|
867
|
+
}), /* @__PURE__ */ n(kt, {
|
|
868
868
|
sponsorLogo: ""
|
|
869
869
|
})]
|
|
870
870
|
});
|
|
871
|
-
},
|
|
871
|
+
}, Gs = /* @__PURE__ */ r("div")({
|
|
872
|
+
name: "Container",
|
|
873
|
+
class: "c1ux29ft",
|
|
874
|
+
propsAsIs: !1
|
|
875
|
+
}), Js = /* @__PURE__ */ r("img")({
|
|
876
|
+
name: "FriendsIcon",
|
|
877
|
+
class: "f10ncfg2",
|
|
878
|
+
propsAsIs: !1
|
|
879
|
+
}), Xs = /* @__PURE__ */ r("div")({
|
|
880
|
+
name: "Content",
|
|
881
|
+
class: "c1yc07bd",
|
|
882
|
+
propsAsIs: !1
|
|
883
|
+
}), Ks = /* @__PURE__ */ r("div")({
|
|
884
|
+
name: "Title",
|
|
885
|
+
class: "tj6cq7w",
|
|
886
|
+
propsAsIs: !1
|
|
887
|
+
}), en = /* @__PURE__ */ r("div")({
|
|
888
|
+
name: "Description",
|
|
889
|
+
class: "d1ag78xo",
|
|
890
|
+
propsAsIs: !1
|
|
891
|
+
}), tn = () => x, sn = /* @__PURE__ */ r(tn())({
|
|
892
|
+
name: "ArrowInviteIcon",
|
|
893
|
+
class: "awohrz6",
|
|
894
|
+
propsAsIs: !0
|
|
895
|
+
}), nn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiByeD0iMTYiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMC40NjE1IDEyLjY4NzVDOS40NDIzMSAxMi42ODc1IDguNjE1MzggMTMuNDY2NSA4LjYxNTM4IDE0LjQyNjZDOC42MTUzOCAxNS4zODY4IDkuNDQyMzEgMTYuMTY1OCAxMC40NjE1IDE2LjE2NThDMTEuNDgwOCAxNi4xNjU4IDEyLjMwNzcgMTUuMzg2OCAxMi4zMDc3IDE0LjQyNjZDMTIuMzA3NyAxMy40NjY1IDExLjQ4MDggMTIuNjg3NSAxMC40NjE1IDEyLjY4NzVaTTEwLjQ2MTUgMTYuMTY1OEM5LjEwODE3IDE2LjE2NTggOCAxNy4yMDk3IDggMTguNDg0NlYxOS43NTI3QzggMTkuNzUyNyA4LjYxNTM4IDIwLjIyMzcgMTAuNDYxNSAyMC4yMjM3QzEyLjMwNzcgMjAuMjIzNyAxMi45MjMxIDE5Ljc1MjcgMTIuOTIzMSAxOS43NTI3VjE4LjQ4NDZDMTIuOTIzMSAxNy4yMDk3IDExLjgxNDkgMTYuMTY1OCAxMC40NjE1IDE2LjE2NThaTTIxLjUzODUgMTIuNjg3NUMyMC41MTkyIDEyLjY4NzUgMTkuNjkyMyAxMy40NjY1IDE5LjY5MjMgMTQuNDI2NkMxOS42OTIzIDE1LjM4NjggMjAuNTE5MiAxNi4xNjU4IDIxLjUzODUgMTYuMTY1OEMyMi41NTc3IDE2LjE2NTggMjMuMzg0NiAxNS4zODY4IDIzLjM4NDYgMTQuNDI2NkMyMy4zODQ2IDEzLjQ2NjUgMjIuNTU3NyAxMi42ODc1IDIxLjUzODUgMTIuNjg3NVpNMjEuNTM4NSAxNi4xNjU4QzIwLjE4NTEgMTYuMTY1OCAxOS4wNzY5IDE3LjIwOTcgMTkuMDc2OSAxOC40ODQ2VjE5Ljc1MjdDMTkuMDc2OSAxOS43NTI3IDE5LjY5MjMgMjAuMjIzNyAyMS41Mzg1IDIwLjIyMzdDMjMuMzg0NiAyMC4yMjM3IDI0IDE5Ljc1MjcgMjQgMTkuNzUyN1YxOC40ODQ2QzI0IDE3LjIwOTcgMjIuODkxOCAxNi4xNjU4IDIxLjUzODUgMTYuMTY1OFpNMTYgMTUuMDA2M0MxNC45ODA4IDE1LjAwNjMgMTQuMTUzOCAxNS43ODUzIDE0LjE1MzggMTYuNzQ1NUMxNC4xNTM4IDE3LjcwNTYgMTQuOTgwOCAxOC40ODQ2IDE2IDE4LjQ4NDZDMTcuMDE5MiAxOC40ODQ2IDE3Ljg0NjIgMTcuNzA1NiAxNy44NDYyIDE2Ljc0NTVDMTcuODQ2MiAxNS43ODUzIDE3LjAxOTIgMTUuMDA2MyAxNiAxNS4wMDYzWk0xNiAxOC40ODQ2QzE0LjY0NjYgMTguNDg0NiAxMy41Mzg1IDE5LjUyODUgMTMuNTM4NSAyMC44MDM0VjIyLjA3MTVDMTMuNTM4NSAyMi4wNzE1IDE0LjE1MzggMjIuNTQyNSAxNiAyMi41NDI1QzE3Ljg0NjIgMjIuNTQyNSAxOC40NjE1IDIyLjA3MTUgMTguNDYxNSAyMi4wNzE1VjIwLjgwMzRDMTguNDYxNSAxOS41Mjg1IDE3LjM1MzQgMTguNDg0NiAxNiAxOC40ODQ2WiIgZmlsbD0iIzEwN0Q1NyIvPgo8cGF0aCBvcGFjaXR5PSIwLjUiIGQ9Ik0xMy4zOTA4IDlDMTIuMzEwMyA5IDExLjQzMzYgOS44MjU4NCAxMS40MzM2IDEwLjg0MzdDMTEuNDMzNiAxMS44NjE2IDEyLjMxMDMgMTIuNjg3NSAxMy4zOTA4IDEyLjY4NzVDMTQuNDcxMyAxMi42ODc1IDE1LjM0OCAxMS44NjE2IDE1LjM0OCAxMC44NDM3QzE1LjM0OCA5LjgyNTg0IDE0LjQ3MTMgOSAxMy4zOTA4IDlaTTEzLjM5MDggMTIuNjg3NUMxMy4xOTQ2IDEyLjY4NzUgMTIuOTk1OCAxMi42ODI3IDEyLjc5OTYgMTIuNzQ1MUMxMy4xOTIgMTMuMjM3MiAxMy4zOTA4IDEzLjg1NDIgMTMuMzkwOCAxNC41MzEyQzEzLjM5MDggMTQuNzc2MSAxMy4zMjk2IDE1LjAxNjEgMTMuMzI5NiAxNS4yNjFDMTMuODUyMSAxNC41MjQgMTQuNjk1NiAxNC4wMzkxIDE1LjY3NDIgMTMuOTE2NkMxNS4yMTggMTMuMTc5NiAxNC4zNjk0IDEyLjY4NzUgMTMuMzkwOCAxMi42ODc1Wk0xOC42MSA5QzE3LjUyOTUgOSAxNi42NTI4IDkuODI1ODQgMTYuNjUyOCAxMC44NDM3QzE2LjY1MjggMTEuODYxNiAxNy41Mjk1IDEyLjY4NzUgMTguNjEgMTIuNjg3NUMxOS42OTA1IDEyLjY4NzUgMjAuNTY3MiAxMS44NjE2IDIwLjU2NzIgMTAuODQzN0MyMC41NjcyIDkuODI1ODQgMTkuNjkwNSA5IDE4LjYxIDlaTTE4LjYxIDEyLjY4NzVDMTcuNjMxNCAxMi42ODc1IDE2Ljc4MjggMTMuMTc5NiAxNi4zMjY2IDEzLjkxNjZDMTcuMzA1MiAxNC4wMzkxIDE4LjE0ODcgMTQuNTI0IDE4LjY3MTIgMTUuMjYxQzE4LjY3MTIgMTUuMDE2MSAxOC42MSAxNC43NzYxIDE4LjYxIDE0LjUzMTJDMTguNjEgMTMuODU0MiAxOC44MDg4IDEzLjIzNzIgMTkuMjAxMiAxMi43NDUxQzE5LjAwNSAxMi42ODI3IDE4LjgwNjIgMTIuNjg3NSAxOC42MSAxMi42ODc1WiIgZmlsbD0iIzEwN0Q1NyIvPgo8L3N2Zz4K", on = ({ title: e, description: t, onClick: s }) => /* @__PURE__ */ u(Gs, { onClick: s, children: [
|
|
896
|
+
/* @__PURE__ */ n(Js, { alt: "friends-icon", src: nn }),
|
|
897
|
+
/* @__PURE__ */ u(Xs, { children: [
|
|
898
|
+
/* @__PURE__ */ n(Ks, { children: e }),
|
|
899
|
+
/* @__PURE__ */ n(en, { children: t })
|
|
900
|
+
] }),
|
|
901
|
+
/* @__PURE__ */ n(sn, { name: "icon-copy" })
|
|
902
|
+
] }), rn = /* @__PURE__ */ r("div")({
|
|
872
903
|
name: "Container",
|
|
873
904
|
class: "c115qtkr",
|
|
874
905
|
propsAsIs: !1
|
|
875
|
-
}),
|
|
906
|
+
}), an = /* @__PURE__ */ r("div")({
|
|
876
907
|
name: "STabs",
|
|
877
908
|
class: "sxnslc8",
|
|
878
909
|
propsAsIs: !1
|
|
879
|
-
}),
|
|
910
|
+
}), ln = /* @__PURE__ */ r("button")({
|
|
880
911
|
name: "Button",
|
|
881
912
|
class: "b1umzux0",
|
|
882
913
|
propsAsIs: !1
|
|
883
|
-
}),
|
|
914
|
+
}), cn = /* @__PURE__ */ r("span")({
|
|
884
915
|
name: "Title",
|
|
885
916
|
class: "tspsaas",
|
|
886
917
|
propsAsIs: !1
|
|
887
918
|
});
|
|
888
919
|
var ee = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(ee || {});
|
|
889
|
-
const
|
|
890
|
-
/* @__PURE__ */ n(
|
|
920
|
+
const ge = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(ln, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(cn, { children: e }) }), dn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(rn, { children: /* @__PURE__ */ u(an, { "data-position": e === "home" ? "left" : "right", children: [
|
|
921
|
+
/* @__PURE__ */ n(ge, { title: "Home", active: e === "home", onClick: () => t(
|
|
891
922
|
"home"
|
|
892
923
|
/* HOME */
|
|
893
924
|
) }),
|
|
894
925
|
/* @__PURE__ */ n(
|
|
895
|
-
|
|
926
|
+
ge,
|
|
896
927
|
{
|
|
897
928
|
title: "Friends",
|
|
898
929
|
active: e === "leaderboard",
|
|
@@ -903,34 +934,34 @@ const ve = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(Ks, { onCl
|
|
|
903
934
|
}
|
|
904
935
|
)
|
|
905
936
|
] }) });
|
|
906
|
-
function
|
|
937
|
+
function un(e) {
|
|
907
938
|
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, o = e.startIndex, i = e.stopIndex;
|
|
908
939
|
return !(o > s || i < t);
|
|
909
940
|
}
|
|
910
|
-
function
|
|
911
|
-
for (var t = e.isItemLoaded, s = e.itemCount, o = e.minimumBatchSize, i = e.startIndex, l = e.stopIndex, a = [], c = null, d = null,
|
|
912
|
-
var
|
|
913
|
-
|
|
941
|
+
function pn(e) {
|
|
942
|
+
for (var t = e.isItemLoaded, s = e.itemCount, o = e.minimumBatchSize, i = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, M = i; M <= l; M++) {
|
|
943
|
+
var I = t(M);
|
|
944
|
+
I ? d !== null && (a.push(c, d), c = d = null) : (d = M, c === null && (c = M));
|
|
914
945
|
}
|
|
915
946
|
if (d !== null) {
|
|
916
|
-
for (var p = Math.min(Math.max(d, c + o - 1), s - 1),
|
|
917
|
-
d =
|
|
947
|
+
for (var p = Math.min(Math.max(d, c + o - 1), s - 1), h = d + 1; h <= p && !t(h); h++)
|
|
948
|
+
d = h;
|
|
918
949
|
a.push(c, d);
|
|
919
950
|
}
|
|
920
951
|
if (a.length)
|
|
921
952
|
for (; a[1] - a[0] + 1 < o && a[0] > 0; ) {
|
|
922
|
-
var
|
|
923
|
-
if (!t(
|
|
924
|
-
a[0] =
|
|
953
|
+
var m = a[0] - 1;
|
|
954
|
+
if (!t(m))
|
|
955
|
+
a[0] = m;
|
|
925
956
|
else
|
|
926
957
|
break;
|
|
927
958
|
}
|
|
928
959
|
return a;
|
|
929
960
|
}
|
|
930
|
-
var
|
|
961
|
+
var Mn = function(e, t) {
|
|
931
962
|
if (!(e instanceof t))
|
|
932
963
|
throw new TypeError("Cannot call a class as a function");
|
|
933
|
-
},
|
|
964
|
+
}, In = function() {
|
|
934
965
|
function e(t, s) {
|
|
935
966
|
for (var o = 0; o < s.length; o++) {
|
|
936
967
|
var i = s[o];
|
|
@@ -940,7 +971,7 @@ var nn = function(e, t) {
|
|
|
940
971
|
return function(t, s, o) {
|
|
941
972
|
return s && e(t.prototype, s), o && e(t, o), t;
|
|
942
973
|
};
|
|
943
|
-
}(),
|
|
974
|
+
}(), hn = function(e, t) {
|
|
944
975
|
if (typeof t != "function" && t !== null)
|
|
945
976
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
946
977
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -951,26 +982,26 @@ var nn = function(e, t) {
|
|
|
951
982
|
configurable: !0
|
|
952
983
|
}
|
|
953
984
|
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
|
|
954
|
-
},
|
|
985
|
+
}, De = function(e, t) {
|
|
955
986
|
if (!e)
|
|
956
987
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
957
988
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
958
989
|
};
|
|
959
990
|
(function(e) {
|
|
960
|
-
|
|
991
|
+
hn(t, e);
|
|
961
992
|
function t() {
|
|
962
993
|
var s, o, i, l;
|
|
963
|
-
|
|
994
|
+
Mn(this, t);
|
|
964
995
|
for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
|
|
965
996
|
c[d] = arguments[d];
|
|
966
|
-
return l = (o = (i =
|
|
967
|
-
var
|
|
968
|
-
i._lastRenderedStartIndex =
|
|
969
|
-
}, i._setRef = function(
|
|
970
|
-
i._listRef =
|
|
971
|
-
}, o),
|
|
997
|
+
return l = (o = (i = De(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(M) {
|
|
998
|
+
var I = M.visibleStartIndex, p = M.visibleStopIndex;
|
|
999
|
+
i._lastRenderedStartIndex = I, i._lastRenderedStopIndex = p, i._ensureRowsLoaded(I, p);
|
|
1000
|
+
}, i._setRef = function(M) {
|
|
1001
|
+
i._listRef = M;
|
|
1002
|
+
}, o), De(i, l);
|
|
972
1003
|
}
|
|
973
|
-
return
|
|
1004
|
+
return In(t, [{
|
|
974
1005
|
key: "resetloadMoreItemsCache",
|
|
975
1006
|
value: function() {
|
|
976
1007
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -992,85 +1023,85 @@ var nn = function(e, t) {
|
|
|
992
1023
|
}, {
|
|
993
1024
|
key: "_ensureRowsLoaded",
|
|
994
1025
|
value: function(o, i) {
|
|
995
|
-
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize,
|
|
1026
|
+
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, M = d === void 0 ? 10 : d, I = l.threshold, p = I === void 0 ? 15 : I, h = pn({
|
|
996
1027
|
isItemLoaded: a,
|
|
997
1028
|
itemCount: c,
|
|
998
|
-
minimumBatchSize:
|
|
1029
|
+
minimumBatchSize: M,
|
|
999
1030
|
startIndex: Math.max(0, o - p),
|
|
1000
1031
|
stopIndex: Math.min(c - 1, i + p)
|
|
1001
1032
|
});
|
|
1002
|
-
(this._memoizedUnloadedRanges.length !==
|
|
1003
|
-
return
|
|
1004
|
-
})) && (this._memoizedUnloadedRanges =
|
|
1033
|
+
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(m, f) {
|
|
1034
|
+
return h[f] !== m;
|
|
1035
|
+
})) && (this._memoizedUnloadedRanges = h, this._loadUnloadedRanges(h));
|
|
1005
1036
|
}
|
|
1006
1037
|
}, {
|
|
1007
1038
|
key: "_loadUnloadedRanges",
|
|
1008
1039
|
value: function(o) {
|
|
1009
|
-
for (var i = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(
|
|
1010
|
-
var
|
|
1011
|
-
|
|
1012
|
-
if (
|
|
1040
|
+
for (var i = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(M) {
|
|
1041
|
+
var I = o[M], p = o[M + 1], h = l(I, p);
|
|
1042
|
+
h != null && h.then(function() {
|
|
1043
|
+
if (un({
|
|
1013
1044
|
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
1014
1045
|
lastRenderedStopIndex: i._lastRenderedStopIndex,
|
|
1015
|
-
startIndex:
|
|
1046
|
+
startIndex: I,
|
|
1016
1047
|
stopIndex: p
|
|
1017
1048
|
})) {
|
|
1018
1049
|
if (i._listRef == null)
|
|
1019
1050
|
return;
|
|
1020
|
-
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(
|
|
1051
|
+
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(I, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
|
|
1021
1052
|
}
|
|
1022
1053
|
});
|
|
1023
1054
|
}, c = 0; c < o.length; c += 2)
|
|
1024
1055
|
a(c);
|
|
1025
1056
|
}
|
|
1026
1057
|
}]), t;
|
|
1027
|
-
})(
|
|
1028
|
-
const
|
|
1058
|
+
})(He);
|
|
1059
|
+
const Nn = /* @__PURE__ */ r("div")({
|
|
1029
1060
|
name: "Container",
|
|
1030
1061
|
class: "culdu4a",
|
|
1031
1062
|
propsAsIs: !1
|
|
1032
|
-
}),
|
|
1063
|
+
}), mn = /* @__PURE__ */ r("div")({
|
|
1033
1064
|
name: "Position",
|
|
1034
1065
|
class: "pwf8e69",
|
|
1035
1066
|
propsAsIs: !1
|
|
1036
|
-
}),
|
|
1067
|
+
}), gn = /* @__PURE__ */ r("img")({
|
|
1037
1068
|
name: "Avatar",
|
|
1038
1069
|
class: "atf4yh4",
|
|
1039
1070
|
propsAsIs: !1
|
|
1040
|
-
}),
|
|
1071
|
+
}), Dn = /* @__PURE__ */ r("div")({
|
|
1041
1072
|
name: "AvatarPlaceholder",
|
|
1042
1073
|
class: "a1dg29ja",
|
|
1043
1074
|
propsAsIs: !1
|
|
1044
|
-
}),
|
|
1075
|
+
}), Tn = /* @__PURE__ */ r("div")({
|
|
1045
1076
|
name: "Content",
|
|
1046
1077
|
class: "c10a68rc",
|
|
1047
1078
|
propsAsIs: !1
|
|
1048
|
-
}),
|
|
1079
|
+
}), An = /* @__PURE__ */ r("div")({
|
|
1049
1080
|
name: "NameContainer",
|
|
1050
1081
|
class: "nc4kck5",
|
|
1051
1082
|
propsAsIs: !1
|
|
1052
|
-
}),
|
|
1083
|
+
}), jn = /* @__PURE__ */ r("span")({
|
|
1053
1084
|
name: "Name",
|
|
1054
1085
|
class: "njsrqgr",
|
|
1055
1086
|
propsAsIs: !1
|
|
1056
|
-
}),
|
|
1087
|
+
}), yn = () => x, vn = /* @__PURE__ */ r(yn())({
|
|
1057
1088
|
name: "CurrentUserBadge",
|
|
1058
1089
|
class: "c17uc4zr",
|
|
1059
1090
|
propsAsIs: !0
|
|
1060
1091
|
});
|
|
1061
|
-
var
|
|
1062
|
-
function
|
|
1092
|
+
var Ce = { exports: {} }, xn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", fn = xn, En = fn;
|
|
1093
|
+
function Se() {
|
|
1063
1094
|
}
|
|
1064
|
-
function
|
|
1095
|
+
function ke() {
|
|
1065
1096
|
}
|
|
1066
|
-
|
|
1067
|
-
var
|
|
1097
|
+
ke.resetWarningCache = Se;
|
|
1098
|
+
var Ln = function() {
|
|
1068
1099
|
function e(o, i, l, a, c, d) {
|
|
1069
|
-
if (d !==
|
|
1070
|
-
var
|
|
1100
|
+
if (d !== En) {
|
|
1101
|
+
var M = new Error(
|
|
1071
1102
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1072
1103
|
);
|
|
1073
|
-
throw
|
|
1104
|
+
throw M.name = "Invariant Violation", M;
|
|
1074
1105
|
}
|
|
1075
1106
|
}
|
|
1076
1107
|
e.isRequired = e;
|
|
@@ -1097,15 +1128,15 @@ var fn = function() {
|
|
|
1097
1128
|
oneOfType: t,
|
|
1098
1129
|
shape: t,
|
|
1099
1130
|
exact: t,
|
|
1100
|
-
checkPropTypes:
|
|
1101
|
-
resetWarningCache:
|
|
1131
|
+
checkPropTypes: ke,
|
|
1132
|
+
resetWarningCache: Se
|
|
1102
1133
|
};
|
|
1103
1134
|
return s.PropTypes = s, s;
|
|
1104
1135
|
};
|
|
1105
|
-
|
|
1106
|
-
var
|
|
1107
|
-
const
|
|
1108
|
-
class oe extends
|
|
1136
|
+
Ce.exports = Ln();
|
|
1137
|
+
var zn = Ce.exports;
|
|
1138
|
+
const z = /* @__PURE__ */ Ve(zn);
|
|
1139
|
+
class oe extends Ge {
|
|
1109
1140
|
constructor(t) {
|
|
1110
1141
|
super(t), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
|
|
1111
1142
|
}
|
|
@@ -1222,35 +1253,35 @@ class oe extends Ze {
|
|
|
1222
1253
|
isReverse: a,
|
|
1223
1254
|
loader: c,
|
|
1224
1255
|
loadMore: d,
|
|
1225
|
-
pageStart:
|
|
1226
|
-
ref:
|
|
1256
|
+
pageStart: M,
|
|
1257
|
+
ref: I,
|
|
1227
1258
|
threshold: p,
|
|
1228
|
-
useCapture:
|
|
1229
|
-
useWindow:
|
|
1230
|
-
getScrollParent:
|
|
1231
|
-
...
|
|
1259
|
+
useCapture: h,
|
|
1260
|
+
useWindow: m,
|
|
1261
|
+
getScrollParent: f,
|
|
1262
|
+
...D
|
|
1232
1263
|
} = t;
|
|
1233
|
-
|
|
1234
|
-
this.scrollComponent =
|
|
1264
|
+
D.ref = (g) => {
|
|
1265
|
+
this.scrollComponent = g, I && I(g);
|
|
1235
1266
|
};
|
|
1236
|
-
const
|
|
1237
|
-
return i && (c ? a ?
|
|
1267
|
+
const A = [s];
|
|
1268
|
+
return i && (c ? a ? A.unshift(c) : A.push(c) : this.defaultLoader && (a ? A.unshift(this.defaultLoader) : A.push(this.defaultLoader))), V.createElement(o, D, A);
|
|
1238
1269
|
}
|
|
1239
1270
|
}
|
|
1240
1271
|
se(oe, "propTypes", {
|
|
1241
|
-
children:
|
|
1242
|
-
element:
|
|
1243
|
-
hasMore:
|
|
1244
|
-
initialLoad:
|
|
1245
|
-
isReverse:
|
|
1246
|
-
loader:
|
|
1247
|
-
loadMore:
|
|
1248
|
-
pageStart:
|
|
1249
|
-
ref:
|
|
1250
|
-
getScrollParent:
|
|
1251
|
-
threshold:
|
|
1252
|
-
useCapture:
|
|
1253
|
-
useWindow:
|
|
1272
|
+
children: z.node.isRequired,
|
|
1273
|
+
element: z.node,
|
|
1274
|
+
hasMore: z.bool,
|
|
1275
|
+
initialLoad: z.bool,
|
|
1276
|
+
isReverse: z.bool,
|
|
1277
|
+
loader: z.node,
|
|
1278
|
+
loadMore: z.func.isRequired,
|
|
1279
|
+
pageStart: z.number,
|
|
1280
|
+
ref: z.func,
|
|
1281
|
+
getScrollParent: z.func,
|
|
1282
|
+
threshold: z.number,
|
|
1283
|
+
useCapture: z.bool,
|
|
1284
|
+
useWindow: z.bool
|
|
1254
1285
|
}), se(oe, "defaultProps", {
|
|
1255
1286
|
element: "div",
|
|
1256
1287
|
hasMore: !1,
|
|
@@ -1264,7 +1295,7 @@ se(oe, "propTypes", {
|
|
|
1264
1295
|
loader: null,
|
|
1265
1296
|
getScrollParent: null
|
|
1266
1297
|
});
|
|
1267
|
-
const
|
|
1298
|
+
const On = ({
|
|
1268
1299
|
rank: e,
|
|
1269
1300
|
avatar: t,
|
|
1270
1301
|
name: s,
|
|
@@ -1272,21 +1303,21 @@ const Nn = ({
|
|
|
1272
1303
|
isCurrentUser: i,
|
|
1273
1304
|
openItemDetail: l,
|
|
1274
1305
|
style: a
|
|
1275
|
-
}) => /* @__PURE__ */ u(
|
|
1276
|
-
/* @__PURE__ */ n(
|
|
1277
|
-
/* @__PURE__ */ u(
|
|
1278
|
-
t ? /* @__PURE__ */ n(
|
|
1279
|
-
/* @__PURE__ */ u(
|
|
1280
|
-
/* @__PURE__ */ n(
|
|
1281
|
-
i && /* @__PURE__ */ n(
|
|
1306
|
+
}) => /* @__PURE__ */ u(Nn, { onClick: l, style: a, children: [
|
|
1307
|
+
/* @__PURE__ */ n(mn, { children: e || 0 }),
|
|
1308
|
+
/* @__PURE__ */ u(Tn, { children: [
|
|
1309
|
+
t ? /* @__PURE__ */ n(gn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(Dn, { children: ve(s || "") }),
|
|
1310
|
+
/* @__PURE__ */ u(An, { children: [
|
|
1311
|
+
/* @__PURE__ */ n(jn, { children: s || "" }),
|
|
1312
|
+
i && /* @__PURE__ */ n(vn, { name: "icon-star" })
|
|
1282
1313
|
] })
|
|
1283
1314
|
] }),
|
|
1284
|
-
/* @__PURE__ */ n("div", { children:
|
|
1285
|
-
] }),
|
|
1315
|
+
/* @__PURE__ */ n("div", { children: xe(o) })
|
|
1316
|
+
] }), Cn = /* @__PURE__ */ r("div")({
|
|
1286
1317
|
name: "Container",
|
|
1287
1318
|
class: "c16btbfp",
|
|
1288
1319
|
propsAsIs: !1
|
|
1289
|
-
}),
|
|
1320
|
+
}), Sn = ({
|
|
1290
1321
|
items: e,
|
|
1291
1322
|
currentUserId: t,
|
|
1292
1323
|
openItemDetail: s,
|
|
@@ -1299,15 +1330,15 @@ const Nn = ({
|
|
|
1299
1330
|
hasMore: l,
|
|
1300
1331
|
useWindow: !1,
|
|
1301
1332
|
getScrollParent: () => i.current,
|
|
1302
|
-
children: /* @__PURE__ */ n(
|
|
1303
|
-
children: e.map((a) => /* @__PURE__ */ n(
|
|
1333
|
+
children: /* @__PURE__ */ n(Cn, {
|
|
1334
|
+
children: e.map((a) => /* @__PURE__ */ n(On, {
|
|
1304
1335
|
...a,
|
|
1305
1336
|
openItemDetail: () => s(a.userId),
|
|
1306
1337
|
isCurrentUser: !!t && t === a.userId
|
|
1307
1338
|
}, a.userId))
|
|
1308
1339
|
})
|
|
1309
|
-
}),
|
|
1310
|
-
const { data: t } =
|
|
1340
|
+
}), kn = ({ deepLink: e }) => {
|
|
1341
|
+
const { data: t } = Y(e.$store);
|
|
1311
1342
|
return /* @__PURE__ */ n(
|
|
1312
1343
|
We,
|
|
1313
1344
|
{
|
|
@@ -1328,10 +1359,10 @@ const Nn = ({
|
|
|
1328
1359
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1329
1360
|
}
|
|
1330
1361
|
);
|
|
1331
|
-
},
|
|
1332
|
-
const { data: o, hasMore: i } =
|
|
1362
|
+
}, wn = ({ gamification: e, scrollNode: t, scrollStore: s }) => {
|
|
1363
|
+
const { data: o, hasMore: i } = Y(e.leaderboardList.$store);
|
|
1333
1364
|
return o != null && o.length ? /* @__PURE__ */ n(
|
|
1334
|
-
|
|
1365
|
+
Sn,
|
|
1335
1366
|
{
|
|
1336
1367
|
items: o,
|
|
1337
1368
|
scrollNode: t,
|
|
@@ -1341,49 +1372,49 @@ const Nn = ({
|
|
|
1341
1372
|
openItemDetail: e.openUser,
|
|
1342
1373
|
currentUserId: e.currentUserId.get()
|
|
1343
1374
|
}
|
|
1344
|
-
) : /* @__PURE__ */ n(
|
|
1345
|
-
},
|
|
1375
|
+
) : /* @__PURE__ */ n(kn, { deepLink: e.deepLink });
|
|
1376
|
+
}, bn = /* @__PURE__ */ r("div")({
|
|
1346
1377
|
name: "QuestionItem",
|
|
1347
1378
|
class: "q1w97g3p",
|
|
1348
1379
|
propsAsIs: !1
|
|
1349
|
-
}),
|
|
1380
|
+
}), $n = /* @__PURE__ */ r("div")({
|
|
1350
1381
|
name: "QuestionCaption",
|
|
1351
1382
|
class: "q2sl39u",
|
|
1352
1383
|
propsAsIs: !1
|
|
1353
|
-
}),
|
|
1384
|
+
}), Qn = /* @__PURE__ */ r("div")({
|
|
1354
1385
|
name: "QuestionBody",
|
|
1355
1386
|
class: "qd5h0uc",
|
|
1356
1387
|
propsAsIs: !1
|
|
1357
|
-
}),
|
|
1388
|
+
}), Rn = /* @__PURE__ */ r("div")({
|
|
1358
1389
|
name: "QuestionAction",
|
|
1359
1390
|
class: "q105uluy",
|
|
1360
1391
|
propsAsIs: !1
|
|
1361
|
-
}),
|
|
1392
|
+
}), Un = () => x, K = /* @__PURE__ */ r(Un())({
|
|
1362
1393
|
name: "QuestionActionIcon",
|
|
1363
1394
|
class: "q1fa0b9h",
|
|
1364
1395
|
propsAsIs: !0
|
|
1365
|
-
}),
|
|
1396
|
+
}), Yn = () => x, Pn = /* @__PURE__ */ r(Yn())({
|
|
1366
1397
|
name: "QuestionTypeIcon",
|
|
1367
1398
|
class: "qxlt78s",
|
|
1368
1399
|
propsAsIs: !0
|
|
1369
|
-
}),
|
|
1400
|
+
}), qn = /* @__PURE__ */ r("div")({
|
|
1370
1401
|
name: "QuestionTypeLabel",
|
|
1371
1402
|
class: "qmg0vkx",
|
|
1372
1403
|
propsAsIs: !1
|
|
1373
|
-
}),
|
|
1404
|
+
}), Vn = /* @__PURE__ */ r("div")({
|
|
1374
1405
|
name: "QuestionContent",
|
|
1375
1406
|
class: "q1uz5j1g",
|
|
1376
1407
|
propsAsIs: !1
|
|
1377
|
-
}),
|
|
1408
|
+
}), Wn = /* @__PURE__ */ r("button")({
|
|
1378
1409
|
name: "PlayButton",
|
|
1379
1410
|
class: "p1pba9p1",
|
|
1380
1411
|
propsAsIs: !1
|
|
1381
|
-
}),
|
|
1412
|
+
}), _n = {
|
|
1382
1413
|
[G.LOST]: /* @__PURE__ */ n(K, { name: "incorrectVoted" }),
|
|
1383
1414
|
[G.WON]: /* @__PURE__ */ n(K, { name: "icon-check" }),
|
|
1384
1415
|
[G.UNSET]: /* @__PURE__ */ n(K, { name: "icon-arrow" }),
|
|
1385
1416
|
[G.DNP]: /* @__PURE__ */ n(K, { name: "icon-arrow" })
|
|
1386
|
-
},
|
|
1417
|
+
}, Bn = ({
|
|
1387
1418
|
questionId: e,
|
|
1388
1419
|
questionType: t,
|
|
1389
1420
|
questionStatus: s,
|
|
@@ -1392,64 +1423,64 @@ const Nn = ({
|
|
|
1392
1423
|
openQuestion: l,
|
|
1393
1424
|
status: a
|
|
1394
1425
|
}) => {
|
|
1395
|
-
const c =
|
|
1396
|
-
return c ? /* @__PURE__ */ u(
|
|
1397
|
-
/* @__PURE__ */ u(
|
|
1398
|
-
/* @__PURE__ */ u(
|
|
1426
|
+
const c = Ae[t], d = _n[a];
|
|
1427
|
+
return c ? /* @__PURE__ */ u(bn, { onClick: () => l == null ? void 0 : l(e), children: [
|
|
1428
|
+
/* @__PURE__ */ u(Vn, { children: [
|
|
1429
|
+
/* @__PURE__ */ u($n, { children: [
|
|
1399
1430
|
/* @__PURE__ */ n(
|
|
1400
|
-
|
|
1431
|
+
Pn,
|
|
1401
1432
|
{
|
|
1402
|
-
"data-type-trivia": t ===
|
|
1403
|
-
"data-type-poll": t ===
|
|
1433
|
+
"data-type-trivia": t === N.TRIVIA,
|
|
1434
|
+
"data-type-poll": t === N.POLL,
|
|
1404
1435
|
name: c.iconName
|
|
1405
1436
|
}
|
|
1406
1437
|
),
|
|
1407
|
-
/* @__PURE__ */ u(
|
|
1438
|
+
/* @__PURE__ */ u(qn, { children: [
|
|
1408
1439
|
c.label,
|
|
1409
|
-
t ===
|
|
1440
|
+
t === N.TRIVIA && s === $.RESOLVED && " • Expired"
|
|
1410
1441
|
] })
|
|
1411
1442
|
] }),
|
|
1412
|
-
/* @__PURE__ */ n(
|
|
1443
|
+
/* @__PURE__ */ n(Qn, { children: o || "" })
|
|
1413
1444
|
] }),
|
|
1414
|
-
/* @__PURE__ */ n(
|
|
1445
|
+
/* @__PURE__ */ n(Rn, { children: i ? /* @__PURE__ */ n(Wn, { children: "Play" }) : d })
|
|
1415
1446
|
] }) : null;
|
|
1416
|
-
},
|
|
1447
|
+
}, Fn = /* @__PURE__ */ r("div")({
|
|
1417
1448
|
name: "Container",
|
|
1418
1449
|
class: "cll3md7",
|
|
1419
1450
|
propsAsIs: !1
|
|
1420
|
-
}),
|
|
1451
|
+
}), Zn = /* @__PURE__ */ r("button")({
|
|
1421
1452
|
name: "ActionBtn",
|
|
1422
1453
|
class: "a10g1iik",
|
|
1423
1454
|
propsAsIs: !1
|
|
1424
|
-
}),
|
|
1455
|
+
}), Hn = ({
|
|
1425
1456
|
openInsight: e,
|
|
1426
1457
|
questionId: t,
|
|
1427
1458
|
...s
|
|
1428
|
-
}) => /* @__PURE__ */ u(
|
|
1429
|
-
/* @__PURE__ */ n(
|
|
1430
|
-
e && /* @__PURE__ */ n(
|
|
1431
|
-
] }),
|
|
1459
|
+
}) => /* @__PURE__ */ u(Fn, { children: [
|
|
1460
|
+
/* @__PURE__ */ n(Oe, { questionId: t, ...s, isPickHistory: !0 }),
|
|
1461
|
+
e && /* @__PURE__ */ n(Zn, { onClick: () => e(t), children: "View Insight" })
|
|
1462
|
+
] }), Gn = /* @__PURE__ */ r("div")({
|
|
1432
1463
|
name: "Container",
|
|
1433
1464
|
class: "cl56x6b",
|
|
1434
1465
|
propsAsIs: !1
|
|
1435
|
-
}),
|
|
1466
|
+
}), Jn = () => _e, Xn = /* @__PURE__ */ r(Jn())({
|
|
1436
1467
|
name: "ActionButton",
|
|
1437
1468
|
class: "a11pzf92",
|
|
1438
1469
|
propsAsIs: !0
|
|
1439
|
-
}),
|
|
1470
|
+
}), Kn = /* @__PURE__ */ r("div")({
|
|
1440
1471
|
name: "DateTime",
|
|
1441
1472
|
class: "d1hbaleq",
|
|
1442
1473
|
propsAsIs: !1
|
|
1443
|
-
}),
|
|
1474
|
+
}), ei = /* @__PURE__ */ r("blockquote")({
|
|
1444
1475
|
name: "Quote",
|
|
1445
1476
|
class: "qvvgqjm",
|
|
1446
1477
|
propsAsIs: !1
|
|
1447
|
-
}),
|
|
1478
|
+
}), ti = ({
|
|
1448
1479
|
openTweet: e,
|
|
1449
1480
|
created: t,
|
|
1450
1481
|
...s
|
|
1451
1482
|
}) => {
|
|
1452
|
-
const o =
|
|
1483
|
+
const o = k(() => {
|
|
1453
1484
|
if (t) {
|
|
1454
1485
|
const i = new Date(t);
|
|
1455
1486
|
if (le(i))
|
|
@@ -1460,41 +1491,41 @@ const Nn = ({
|
|
|
1460
1491
|
}
|
|
1461
1492
|
return null;
|
|
1462
1493
|
}, [t]);
|
|
1463
|
-
return /* @__PURE__ */ u(
|
|
1464
|
-
o && /* @__PURE__ */ u(
|
|
1494
|
+
return /* @__PURE__ */ u(Gn, { children: [
|
|
1495
|
+
o && /* @__PURE__ */ u(Kn, { children: [
|
|
1465
1496
|
o.date,
|
|
1466
1497
|
" · ",
|
|
1467
1498
|
o.time
|
|
1468
1499
|
] }),
|
|
1469
|
-
s.title && /* @__PURE__ */ n(
|
|
1470
|
-
/* @__PURE__ */ n(
|
|
1471
|
-
e && /* @__PURE__ */ n(
|
|
1500
|
+
s.title && /* @__PURE__ */ n(ei, { children: s.title }),
|
|
1501
|
+
/* @__PURE__ */ n(je, { ...s }),
|
|
1502
|
+
e && /* @__PURE__ */ n(Xn, { onClick: () => e(s.tweetId), children: "View Insight" })
|
|
1472
1503
|
] });
|
|
1473
|
-
},
|
|
1504
|
+
}, si = /* @__PURE__ */ r("div")({
|
|
1474
1505
|
name: "QuestionsContainer",
|
|
1475
1506
|
class: "qvghv3l",
|
|
1476
1507
|
propsAsIs: !1
|
|
1477
|
-
}),
|
|
1508
|
+
}), ni = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(si, { children: e == null ? void 0 : e.map((s) => {
|
|
1478
1509
|
var o, i, l;
|
|
1479
1510
|
if (s.type === "question" && ((o = s.attributes) == null ? void 0 : o.attributes.case) === "question") {
|
|
1480
1511
|
const a = s.attributes.attributes.value;
|
|
1481
|
-
return /* @__PURE__ */ n(
|
|
1512
|
+
return /* @__PURE__ */ n(Bn, { openQuestion: t, ...a }, a.questionId);
|
|
1482
1513
|
}
|
|
1483
1514
|
if (s.type === "insight" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "insight") {
|
|
1484
1515
|
const a = s.attributes.attributes.value, c = s.attributes.created;
|
|
1485
|
-
return /* @__PURE__ */ n(
|
|
1516
|
+
return /* @__PURE__ */ n(Hn, { openInsight: t, ...a, created: c }, a.questionId);
|
|
1486
1517
|
}
|
|
1487
1518
|
if (s.type === "tweet" && ((l = s.attributes) == null ? void 0 : l.attributes.case) === "tweet") {
|
|
1488
1519
|
const a = s.attributes.attributes.value, c = s.attributes.id, d = s.attributes.created;
|
|
1489
|
-
return /* @__PURE__ */ n(
|
|
1520
|
+
return /* @__PURE__ */ n(ti, { openTweet: t, ...a, tweetId: c, created: d }, c);
|
|
1490
1521
|
}
|
|
1491
1522
|
return null;
|
|
1492
|
-
}) }),
|
|
1493
|
-
const s =
|
|
1494
|
-
return s != null && s.data ? /* @__PURE__ */ n(
|
|
1495
|
-
},
|
|
1523
|
+
}) }), ii = ({ store: e, openQuestion: t }) => {
|
|
1524
|
+
const s = Y(e);
|
|
1525
|
+
return s != null && s.data ? /* @__PURE__ */ n(ni, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
|
|
1526
|
+
}, oi = ({ userSummary: e }) => {
|
|
1496
1527
|
var t;
|
|
1497
|
-
const [s, o] =
|
|
1528
|
+
const [s, o] = w(void 0);
|
|
1498
1529
|
return te(() => {
|
|
1499
1530
|
const i = e.subscribe((l) => {
|
|
1500
1531
|
l != null && l.data && o(l.data);
|
|
@@ -1502,22 +1533,22 @@ const Nn = ({
|
|
|
1502
1533
|
return () => {
|
|
1503
1534
|
i();
|
|
1504
1535
|
};
|
|
1505
|
-
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(
|
|
1506
|
-
},
|
|
1507
|
-
const [i, l] =
|
|
1536
|
+
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(fe, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
|
|
1537
|
+
}, ri = ({ gamification: e, className: t, scrollStore: s, scrollNode: o }) => {
|
|
1538
|
+
const [i, l] = w(!1), [a, c] = w(ee.HOME), [, d] = Je(), M = (p) => {
|
|
1508
1539
|
d(() => c(p));
|
|
1509
|
-
},
|
|
1540
|
+
}, I = (p) => {
|
|
1510
1541
|
d(() => l(p));
|
|
1511
1542
|
};
|
|
1512
1543
|
return te(() => s.listen((p) => {
|
|
1513
1544
|
if (p.scrollPosition === 0) {
|
|
1514
|
-
|
|
1545
|
+
I(!1), s.setKey("tabsShown", !1);
|
|
1515
1546
|
return;
|
|
1516
1547
|
}
|
|
1517
|
-
|
|
1548
|
+
I(p.scrollDirection === "forward"), s.setKey("tabsShown", p.scrollDirection !== "forward");
|
|
1518
1549
|
}), [s]), /* @__PURE__ */ u("div", { className: t, children: [
|
|
1519
1550
|
/* @__PURE__ */ n(
|
|
1520
|
-
|
|
1551
|
+
Z,
|
|
1521
1552
|
{
|
|
1522
1553
|
style: {
|
|
1523
1554
|
paddingBottom: "8px",
|
|
@@ -1525,57 +1556,60 @@ const Nn = ({
|
|
|
1525
1556
|
transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
|
|
1526
1557
|
top: i ? "-60px" : "0px"
|
|
1527
1558
|
},
|
|
1528
|
-
children: /* @__PURE__ */ n(
|
|
1559
|
+
children: /* @__PURE__ */ n(dn, { activePage: a, toggleActivePage: M })
|
|
1529
1560
|
}
|
|
1530
1561
|
),
|
|
1531
|
-
a === ee.HOME && /* @__PURE__ */ u(
|
|
1532
|
-
/* @__PURE__ */ n(
|
|
1533
|
-
/* @__PURE__ */ n(Be, { children: /* @__PURE__ */ n(
|
|
1562
|
+
a === ee.HOME && /* @__PURE__ */ u(S, { children: [
|
|
1563
|
+
/* @__PURE__ */ n(Z, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(oi, { userSummary: e.userSummary }) }),
|
|
1564
|
+
/* @__PURE__ */ n(Be, { children: /* @__PURE__ */ n(ii, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1534
1565
|
] }),
|
|
1535
|
-
a === ee.LEADERBOARD && /* @__PURE__ */
|
|
1566
|
+
a === ee.LEADERBOARD && /* @__PURE__ */ u(S, { children: [
|
|
1567
|
+
/* @__PURE__ */ n(Z, { style: { paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ n(wn, { scrollStore: s, scrollNode: o, gamification: e }) }),
|
|
1568
|
+
/* @__PURE__ */ n(Z, { style: { position: "sticky", bottom: "0", paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ n(on, { title: "Invite Friends", description: "Challenge them now!" }) })
|
|
1569
|
+
] })
|
|
1536
1570
|
] });
|
|
1537
|
-
},
|
|
1571
|
+
}, ai = () => Fe, Te = /* @__PURE__ */ r(ai())({
|
|
1538
1572
|
name: "OpenedContainer",
|
|
1539
1573
|
class: "oar61gl",
|
|
1540
1574
|
propsAsIs: !0
|
|
1541
|
-
}),
|
|
1575
|
+
}), li = /* @__PURE__ */ r("div")({
|
|
1542
1576
|
name: "UserContainer",
|
|
1543
1577
|
class: "u14zaal4",
|
|
1544
1578
|
propsAsIs: !1
|
|
1545
|
-
}),
|
|
1579
|
+
}), ci = ({
|
|
1546
1580
|
correct: e,
|
|
1547
1581
|
incorrect: t
|
|
1548
1582
|
}) => {
|
|
1549
1583
|
const s = e + t;
|
|
1550
1584
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
1551
|
-
},
|
|
1585
|
+
}, Ii = ({
|
|
1552
1586
|
gamification: e,
|
|
1553
1587
|
scrollStore: t,
|
|
1554
1588
|
className: s,
|
|
1555
1589
|
appNode: o,
|
|
1556
1590
|
scrollNode: i
|
|
1557
1591
|
}) => {
|
|
1558
|
-
const l =
|
|
1559
|
-
return /* @__PURE__ */ u(
|
|
1592
|
+
const l = Y(e.openedQuestion.$store), a = Y(e.openedUser);
|
|
1593
|
+
return /* @__PURE__ */ u(S, {
|
|
1560
1594
|
children: [l && o.current && ue.createPortal(/* @__PURE__ */ n(Te, {
|
|
1561
1595
|
className: s,
|
|
1562
|
-
children: /* @__PURE__ */ n(
|
|
1596
|
+
children: /* @__PURE__ */ n(Hs, {
|
|
1563
1597
|
gamification: e
|
|
1564
1598
|
})
|
|
1565
1599
|
}), o.current), a && o.current && ue.createPortal(/* @__PURE__ */ n(Te, {
|
|
1566
1600
|
className: s,
|
|
1567
|
-
children: /* @__PURE__ */ u(
|
|
1601
|
+
children: /* @__PURE__ */ u(li, {
|
|
1568
1602
|
children: [/* @__PURE__ */ n(ye, {
|
|
1569
1603
|
label: "Friend's Rank",
|
|
1570
1604
|
close: e.closeUser
|
|
1571
|
-
}), /* @__PURE__ */ n(
|
|
1572
|
-
children: /* @__PURE__ */ n(
|
|
1605
|
+
}), /* @__PURE__ */ n(Z, {
|
|
1606
|
+
children: /* @__PURE__ */ n(fe, {
|
|
1573
1607
|
...a,
|
|
1574
|
-
successRate:
|
|
1608
|
+
successRate: ci(a)
|
|
1575
1609
|
})
|
|
1576
1610
|
})]
|
|
1577
1611
|
})
|
|
1578
|
-
}), o.current), /* @__PURE__ */ n(
|
|
1612
|
+
}), o.current), /* @__PURE__ */ n(ri, {
|
|
1579
1613
|
scrollStore: t,
|
|
1580
1614
|
scrollNode: i,
|
|
1581
1615
|
className: s,
|
|
@@ -1584,5 +1618,5 @@ const Nn = ({
|
|
|
1584
1618
|
});
|
|
1585
1619
|
};
|
|
1586
1620
|
export {
|
|
1587
|
-
|
|
1621
|
+
Ii as default
|
|
1588
1622
|
};
|