@streamlayer/react 0.36.2 → 0.37.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/app/masters.d.ts +1 -1
- package/lib/cjs/gamification-feature.js +5 -1
- package/lib/cjs/index2.js +2 -2
- package/lib/cjs/masters2.js +34 -34
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +5 -1
- package/lib/dist/cjs/masters.js +50 -49
- package/lib/dist/es/gamification-feature.js +618 -569
- package/lib/dist/es/masters.js +11683 -11499
- package/lib/dist/index.d.ts +37 -7
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +714 -665
- package/lib/es/index2.js +15 -8
- package/lib/es/masters2.js +6709 -6599
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +9 -9
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
var _e = Object.defineProperty;
|
|
2
2
|
var Qe = (e, t, s) => t in e ? _e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var te = (e, t, s) => (Qe(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
-
import { jsxs as p, jsx as n, Fragment as
|
|
5
|
-
import { s as
|
|
6
|
-
import W, { useRef as
|
|
7
|
-
const st = /* @__PURE__ */
|
|
4
|
+
import { jsxs as p, jsx as n, Fragment as q } from "react/jsx-runtime";
|
|
5
|
+
import { s as i, c as R, Q as I, o as Ae, a as V, b as Ue, d as F, e as ne, E as Q, w as je, j as ye, u as O, g as We, f as Be, K as ze, P as G, h as Fe, p as He, C as Ye, n as $e, i as Ze, l as Ge, Y as de, k as Ke } from "./masters.js";
|
|
6
|
+
import W, { useRef as M, useState as N, useCallback as B, useEffect as Y, useLayoutEffect as Je, useMemo as P, PureComponent as Xe, Component as et, useTransition as tt } from "react";
|
|
7
|
+
const st = /* @__PURE__ */ i("div")({
|
|
8
8
|
name: "Container",
|
|
9
9
|
class: "c1vwopgc",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}), nt = /* @__PURE__ */
|
|
11
|
+
}), nt = /* @__PURE__ */ i("div")({
|
|
12
12
|
name: "QuestionTypeWrap",
|
|
13
13
|
class: "qyktpt0",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), rt = () => R, ot = /* @__PURE__ */ i(rt())({
|
|
16
16
|
name: "QuestionTypeIcon",
|
|
17
17
|
class: "q951jdx",
|
|
18
18
|
propsAsIs: !0
|
|
19
|
-
}),
|
|
19
|
+
}), it = /* @__PURE__ */ i("span")({
|
|
20
20
|
name: "QuestionTypeTitle",
|
|
21
21
|
class: "qss5f0e",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}), at = /* @__PURE__ */
|
|
23
|
+
}), at = /* @__PURE__ */ i("button")({
|
|
24
24
|
name: "CloseButton",
|
|
25
25
|
class: "c1ao1jtv",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}), lt = () =>
|
|
27
|
+
}), lt = () => R, ct = /* @__PURE__ */ i(lt())({
|
|
28
28
|
name: "CloseIcon",
|
|
29
29
|
class: "cvsl7l3",
|
|
30
30
|
propsAsIs: !0
|
|
@@ -33,119 +33,119 @@ const st = /* @__PURE__ */ o("div")({
|
|
|
33
33
|
return /* @__PURE__ */ p(st, { children: [
|
|
34
34
|
/* @__PURE__ */ p(nt, { children: [
|
|
35
35
|
(r == null ? void 0 : r.iconName) && /* @__PURE__ */ n(
|
|
36
|
-
|
|
36
|
+
ot,
|
|
37
37
|
{
|
|
38
|
-
"data-type-trivia": e ===
|
|
39
|
-
"data-type-poll": e ===
|
|
38
|
+
"data-type-trivia": e === I.TRIVIA,
|
|
39
|
+
"data-type-poll": e === I.POLL,
|
|
40
40
|
name: r.iconName
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
(r == null ? void 0 : r.label) && /* @__PURE__ */ n(
|
|
43
|
+
(r == null ? void 0 : r.label) && /* @__PURE__ */ n(it, { children: r.label })
|
|
44
44
|
] }),
|
|
45
45
|
/* @__PURE__ */ n(at, { onClick: t, children: /* @__PURE__ */ n(ct, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
47
|
-
}, we = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Te = (e) => e ? e.toLocaleString("en-US") : "0",
|
|
47
|
+
}, we = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Te = (e) => e ? e.toLocaleString("en-US") : "0", oe = (e) => e.toLocaleDateString("en-US", {
|
|
48
48
|
weekday: "short",
|
|
49
49
|
month: "short",
|
|
50
50
|
day: "numeric"
|
|
51
|
-
}),
|
|
51
|
+
}), ie = (e) => e.toLocaleTimeString("en-US", {
|
|
52
52
|
hour: "2-digit",
|
|
53
53
|
minute: "2-digit"
|
|
54
|
-
}), ae = (e) => !isNaN(e.getTime()), dt = /* @__PURE__ */
|
|
54
|
+
}), ae = (e) => !isNaN(e.getTime()), dt = /* @__PURE__ */ i("div")({
|
|
55
55
|
name: "Container",
|
|
56
56
|
class: "c1zy8a",
|
|
57
57
|
propsAsIs: !1
|
|
58
|
-
}), pt = /* @__PURE__ */
|
|
58
|
+
}), pt = /* @__PURE__ */ i("div")({
|
|
59
59
|
name: "Title",
|
|
60
60
|
class: "t1vih9p5",
|
|
61
61
|
propsAsIs: !1
|
|
62
|
-
}), ut = /* @__PURE__ */
|
|
62
|
+
}), ut = /* @__PURE__ */ i("div")({
|
|
63
63
|
name: "Indicator",
|
|
64
64
|
class: "i1fbnvpb",
|
|
65
65
|
propsAsIs: !1
|
|
66
66
|
}), pe = ({ indicator: e, title: t }) => /* @__PURE__ */ p(dt, { children: [
|
|
67
67
|
/* @__PURE__ */ n(pt, { children: t }),
|
|
68
68
|
/* @__PURE__ */ n(ut, { children: e })
|
|
69
|
-
] }), ht = /* @__PURE__ */
|
|
69
|
+
] }), ht = /* @__PURE__ */ i("div")({
|
|
70
70
|
name: "Container",
|
|
71
71
|
class: "ctmhwyc",
|
|
72
72
|
propsAsIs: !1
|
|
73
|
-
}), mt = /* @__PURE__ */
|
|
73
|
+
}), mt = /* @__PURE__ */ i("div")({
|
|
74
74
|
name: "Indicator",
|
|
75
75
|
class: "i1jri200",
|
|
76
76
|
propsAsIs: !1
|
|
77
|
-
}), vt = /* @__PURE__ */
|
|
77
|
+
}), vt = /* @__PURE__ */ i("div")({
|
|
78
78
|
name: "Title",
|
|
79
79
|
class: "t8s05oq",
|
|
80
80
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
81
|
+
}), K = ({ indicator: e, title: t }) => /* @__PURE__ */ p(ht, { children: [
|
|
82
82
|
/* @__PURE__ */ n(mt, { children: e }),
|
|
83
83
|
/* @__PURE__ */ n(vt, { children: t })
|
|
84
|
-
] }), ft = /* @__PURE__ */
|
|
84
|
+
] }), ft = /* @__PURE__ */ i("div")({
|
|
85
85
|
name: "Container",
|
|
86
86
|
class: "c1yrpn9o",
|
|
87
87
|
propsAsIs: !1
|
|
88
|
-
}), It = /* @__PURE__ */
|
|
88
|
+
}), It = /* @__PURE__ */ i("div")({
|
|
89
89
|
name: "TopInfo",
|
|
90
90
|
class: "t17fwahh",
|
|
91
91
|
propsAsIs: !1
|
|
92
|
-
}), Ct = /* @__PURE__ */
|
|
92
|
+
}), Ct = /* @__PURE__ */ i("div")({
|
|
93
93
|
name: "BottomInfo",
|
|
94
94
|
class: "by6w7e9",
|
|
95
95
|
propsAsIs: !1
|
|
96
|
-
}), gt = /* @__PURE__ */
|
|
96
|
+
}), gt = /* @__PURE__ */ i("div")({
|
|
97
97
|
name: "User",
|
|
98
98
|
class: "u1g7arbm",
|
|
99
99
|
propsAsIs: !1
|
|
100
|
-
}), At = /* @__PURE__ */
|
|
100
|
+
}), At = /* @__PURE__ */ i("img")({
|
|
101
101
|
name: "Avatar",
|
|
102
102
|
class: "a1ldeata",
|
|
103
103
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
104
|
+
}), yt = /* @__PURE__ */ i("div")({
|
|
105
105
|
name: "UserInfo",
|
|
106
106
|
class: "u10d4koz",
|
|
107
107
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
108
|
+
}), $t = /* @__PURE__ */ i("div")({
|
|
109
109
|
name: "UserName",
|
|
110
110
|
class: "u1q6roj0",
|
|
111
111
|
propsAsIs: !1
|
|
112
|
-
}), bt = /* @__PURE__ */
|
|
112
|
+
}), bt = /* @__PURE__ */ i("div")({
|
|
113
113
|
name: "UserRating",
|
|
114
114
|
class: "ui0m425",
|
|
115
115
|
propsAsIs: !1
|
|
116
|
-
}), wt = /* @__PURE__ */
|
|
116
|
+
}), wt = /* @__PURE__ */ i("img")({
|
|
117
117
|
name: "TrophyIcon",
|
|
118
118
|
class: "t1el3mrn",
|
|
119
119
|
propsAsIs: !1
|
|
120
|
-
}), Tt = /* @__PURE__ */
|
|
120
|
+
}), Tt = /* @__PURE__ */ i("div")({
|
|
121
121
|
name: "Rts",
|
|
122
122
|
class: "r2vgnxv",
|
|
123
123
|
propsAsIs: !1
|
|
124
|
-
}), Rt = /* @__PURE__ */
|
|
124
|
+
}), Rt = /* @__PURE__ */ i("div")({
|
|
125
125
|
name: "RtsIndicator",
|
|
126
126
|
class: "roqn06j",
|
|
127
127
|
propsAsIs: !1
|
|
128
|
-
}), St = /* @__PURE__ */
|
|
128
|
+
}), St = /* @__PURE__ */ i("div")({
|
|
129
129
|
name: "RtsLabel",
|
|
130
130
|
class: "r15adx7c",
|
|
131
131
|
propsAsIs: !1
|
|
132
|
-
}), kt = /* @__PURE__ */
|
|
132
|
+
}), kt = /* @__PURE__ */ i("div")({
|
|
133
133
|
name: "Divider",
|
|
134
134
|
class: "dv59lta",
|
|
135
135
|
propsAsIs: !1
|
|
136
|
-
}), Lt = /* @__PURE__ */
|
|
136
|
+
}), Lt = /* @__PURE__ */ i("div")({
|
|
137
137
|
name: "Ranks",
|
|
138
138
|
class: "r55lotb",
|
|
139
139
|
propsAsIs: !1
|
|
140
|
-
}), Et = /* @__PURE__ */
|
|
140
|
+
}), Et = /* @__PURE__ */ i("div")({
|
|
141
141
|
name: "Statistics",
|
|
142
142
|
class: "s1knfgqt",
|
|
143
143
|
propsAsIs: !1
|
|
144
|
-
}), xt = /* @__PURE__ */
|
|
144
|
+
}), xt = /* @__PURE__ */ i("div")({
|
|
145
145
|
name: "AvatarPlaceholder",
|
|
146
146
|
class: "a1mqo824",
|
|
147
147
|
propsAsIs: !1
|
|
148
|
-
}), Pt = /* @__PURE__ */
|
|
148
|
+
}), Pt = /* @__PURE__ */ i("button")({
|
|
149
149
|
name: "UserAccountBtn",
|
|
150
150
|
class: "uxareh6",
|
|
151
151
|
propsAsIs: !1
|
|
@@ -154,7 +154,7 @@ const st = /* @__PURE__ */ o("div")({
|
|
|
154
154
|
name: t,
|
|
155
155
|
points: s,
|
|
156
156
|
friendsRank: r,
|
|
157
|
-
rank:
|
|
157
|
+
rank: o,
|
|
158
158
|
streak: l,
|
|
159
159
|
correct: a,
|
|
160
160
|
incorrect: c,
|
|
@@ -166,8 +166,8 @@ const st = /* @__PURE__ */ o("div")({
|
|
|
166
166
|
e && /* @__PURE__ */ n(At, { alt: "avatar", src: e }),
|
|
167
167
|
!e && /* @__PURE__ */ n(xt, { children: we(t || "") })
|
|
168
168
|
] }),
|
|
169
|
-
/* @__PURE__ */ p(
|
|
170
|
-
/* @__PURE__ */ n(
|
|
169
|
+
/* @__PURE__ */ p(yt, { children: [
|
|
170
|
+
/* @__PURE__ */ n($t, { children: t }),
|
|
171
171
|
/* @__PURE__ */ p(bt, { children: [
|
|
172
172
|
/* @__PURE__ */ p(Tt, { children: [
|
|
173
173
|
/* @__PURE__ */ n(wt, { alt: "rank-icon", src: qt }),
|
|
@@ -188,20 +188,20 @@ const st = /* @__PURE__ */ o("div")({
|
|
|
188
188
|
/* @__PURE__ */ p(Ct, { children: [
|
|
189
189
|
/* @__PURE__ */ p(Lt, { children: [
|
|
190
190
|
/* @__PURE__ */ n(pe, { indicator: r || 0, title: "Friends rank" }),
|
|
191
|
-
/* @__PURE__ */ n(pe, { indicator:
|
|
191
|
+
/* @__PURE__ */ n(pe, { indicator: o || 0, title: "Global rank" })
|
|
192
192
|
] }),
|
|
193
193
|
/* @__PURE__ */ p(Et, { children: [
|
|
194
|
-
/* @__PURE__ */ n(
|
|
195
|
-
/* @__PURE__ */ n(
|
|
196
|
-
/* @__PURE__ */ n(
|
|
197
|
-
/* @__PURE__ */ n(
|
|
194
|
+
/* @__PURE__ */ n(K, { indicator: l || 0, title: "Win streak" }),
|
|
195
|
+
/* @__PURE__ */ n(K, { indicator: a || 0, title: "Correct" }),
|
|
196
|
+
/* @__PURE__ */ n(K, { indicator: c || 0, title: "Incorrect" }),
|
|
197
|
+
/* @__PURE__ */ n(K, { indicator: `${u || 0}%`, title: "Succ. rate" })
|
|
198
198
|
] })
|
|
199
199
|
] })
|
|
200
|
-
] }), Nt = /* @__PURE__ */
|
|
200
|
+
] }), Nt = /* @__PURE__ */ i("div")({
|
|
201
201
|
name: "SponsorLogoWrap",
|
|
202
202
|
class: "s8p5v5z",
|
|
203
203
|
propsAsIs: !1
|
|
204
|
-
}), Dt = () =>
|
|
204
|
+
}), Dt = () => R, Ot = /* @__PURE__ */ i(Dt())({
|
|
205
205
|
name: "SponsorLogo",
|
|
206
206
|
class: "s755yti",
|
|
207
207
|
propsAsIs: !0
|
|
@@ -209,47 +209,47 @@ const st = /* @__PURE__ */ o("div")({
|
|
|
209
209
|
children: /* @__PURE__ */ n(Ot, {
|
|
210
210
|
name: "mastersLogo"
|
|
211
211
|
})
|
|
212
|
-
}), Vt = /* @__PURE__ */
|
|
212
|
+
}), Vt = /* @__PURE__ */ i("div")({
|
|
213
213
|
name: "Container",
|
|
214
214
|
class: "c38csyt",
|
|
215
215
|
propsAsIs: !1
|
|
216
|
-
}), _t = /* @__PURE__ */
|
|
216
|
+
}), _t = /* @__PURE__ */ i("div")({
|
|
217
217
|
name: "Title",
|
|
218
218
|
class: "ty221rx",
|
|
219
219
|
propsAsIs: !1
|
|
220
|
-
}), Qt = /* @__PURE__ */
|
|
220
|
+
}), Qt = /* @__PURE__ */ i("div")({
|
|
221
221
|
name: "Description",
|
|
222
222
|
class: "dlaj9xp",
|
|
223
223
|
propsAsIs: !1
|
|
224
|
-
}),
|
|
225
|
-
/* @__PURE__ */ n(
|
|
224
|
+
}), Ut = ({ title: e, description: t }) => /* @__PURE__ */ p(Vt, { children: [
|
|
225
|
+
/* @__PURE__ */ n(R, { name: "icon-check-circle" }),
|
|
226
226
|
/* @__PURE__ */ n(_t, { children: e }),
|
|
227
227
|
/* @__PURE__ */ n(Qt, { children: t })
|
|
228
|
-
] }),
|
|
228
|
+
] }), jt = /* @__PURE__ */ i("div")({
|
|
229
229
|
name: "Container",
|
|
230
230
|
class: "c16sbdnm",
|
|
231
231
|
propsAsIs: !1
|
|
232
|
-
}), Wt = () =>
|
|
232
|
+
}), Wt = () => R, Bt = /* @__PURE__ */ i(Wt())({
|
|
233
233
|
name: "IconPrediction",
|
|
234
234
|
class: "ibhorgl",
|
|
235
235
|
propsAsIs: !0
|
|
236
|
-
}), H = /* @__PURE__ */
|
|
236
|
+
}), H = /* @__PURE__ */ i("div")({
|
|
237
237
|
name: "FeedbackIconWrap",
|
|
238
238
|
class: "f1g20ja7",
|
|
239
239
|
propsAsIs: !1
|
|
240
|
-
}),
|
|
240
|
+
}), J = /* @__PURE__ */ i("div")({
|
|
241
241
|
name: "FeedbackHeader",
|
|
242
242
|
class: "f455ozj",
|
|
243
243
|
propsAsIs: !1
|
|
244
|
-
}),
|
|
244
|
+
}), zt = /* @__PURE__ */ i("span")({
|
|
245
245
|
name: "FeedbackTitle",
|
|
246
246
|
class: "f1913njx",
|
|
247
247
|
propsAsIs: !1
|
|
248
|
-
}),
|
|
248
|
+
}), j = /* @__PURE__ */ i("span")({
|
|
249
249
|
name: "FeedbackDescription",
|
|
250
250
|
class: "fzfk69z",
|
|
251
251
|
propsAsIs: !1
|
|
252
|
-
}), se = /* @__PURE__ */
|
|
252
|
+
}), se = /* @__PURE__ */ i("div")({
|
|
253
253
|
name: "FeedbackText",
|
|
254
254
|
class: "fx87qaj",
|
|
255
255
|
propsAsIs: !1
|
|
@@ -258,290 +258,294 @@ const st = /* @__PURE__ */ o("div")({
|
|
|
258
258
|
questionVotedCorrectly: t,
|
|
259
259
|
questionVoted: s,
|
|
260
260
|
questionType: r,
|
|
261
|
-
hasCorrectAnswer:
|
|
261
|
+
hasCorrectAnswer: o,
|
|
262
262
|
questionStatus: l,
|
|
263
263
|
showExpiredNotification: a,
|
|
264
264
|
showClosedNotificationTrivia: c,
|
|
265
265
|
votedInCurrentRender: d,
|
|
266
266
|
votedAfterQuestionClosed: u,
|
|
267
|
-
enteredAnActiveQuestion:
|
|
268
|
-
marketClosed:
|
|
267
|
+
enteredAnActiveQuestion: h,
|
|
268
|
+
marketClosed: v
|
|
269
269
|
}) => {
|
|
270
|
-
const
|
|
271
|
-
if (!a && !c && !
|
|
270
|
+
const m = s && (r === I.TRIVIA || r === I.PREDICTION) && d && l !== V.RESOLVED, f = r === I.PREDICTION && !o, b = v && r === I.PREDICTION && !s && !h || r === I.PREDICTION && u && d && h, C = m && f, y = m && o, A = r === I.PREDICTION && s && d && o, g = s && r === I.POLL && d;
|
|
271
|
+
if (!a && !c && !C && !y && !b && !g && !A)
|
|
272
272
|
return null;
|
|
273
|
-
const
|
|
274
|
-
return /* @__PURE__ */ p(
|
|
275
|
-
a && /* @__PURE__ */ p(
|
|
276
|
-
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(
|
|
273
|
+
const $ = t ? "correct" : "incorrect", T = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
274
|
+
return /* @__PURE__ */ p(jt, { "data-isPrediction": f, children: [
|
|
275
|
+
a && /* @__PURE__ */ p(q, { children: [
|
|
276
|
+
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
|
|
277
277
|
/* @__PURE__ */ p("div", { children: [
|
|
278
|
-
/* @__PURE__ */ n(
|
|
278
|
+
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(j, { children: "Question Expired" }) }),
|
|
279
279
|
/* @__PURE__ */ n(se, { 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__ */ p(
|
|
283
|
-
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(
|
|
282
|
+
c && /* @__PURE__ */ p(q, { children: [
|
|
283
|
+
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
|
|
284
284
|
/* @__PURE__ */ p("div", { children: [
|
|
285
|
-
/* @__PURE__ */ n(
|
|
285
|
+
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(j, { children: "Question Closed" }) }),
|
|
286
286
|
/* @__PURE__ */ n(se, { 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(H, { children: /* @__PURE__ */ n(
|
|
289
|
+
b && /* @__PURE__ */ p(q, { children: [
|
|
290
|
+
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
|
|
291
291
|
/* @__PURE__ */ p("div", { children: [
|
|
292
|
-
/* @__PURE__ */ n(
|
|
292
|
+
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(j, { children: "Question Closed" }) }),
|
|
293
293
|
/* @__PURE__ */ n(se, { 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
|
+
C && /* @__PURE__ */ p(q, { children: [
|
|
297
|
+
/* @__PURE__ */ n(Bt, { name: "icon-prediction" }),
|
|
298
|
+
/* @__PURE__ */ n(j, { children: "Stay tuned to see if your prediction was correct." })
|
|
299
299
|
] }),
|
|
300
|
-
|
|
301
|
-
/* @__PURE__ */ n(H, { "data-feedback-type": "correct", children: /* @__PURE__ */ n(
|
|
302
|
-
/* @__PURE__ */ n(
|
|
300
|
+
g && /* @__PURE__ */ p(q, { children: [
|
|
301
|
+
/* @__PURE__ */ n(H, { "data-feedback-type": "correct", children: /* @__PURE__ */ n(R, { name: "correct" }) }),
|
|
302
|
+
/* @__PURE__ */ n(j, { children: "That's for answering. Please stay tuned for the next question." })
|
|
303
303
|
] }),
|
|
304
|
-
(
|
|
305
|
-
/* @__PURE__ */ n(H, { "data-feedback-type":
|
|
306
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ p(
|
|
307
|
-
/* @__PURE__ */ n(
|
|
308
|
-
/* @__PURE__ */ n(
|
|
304
|
+
(y || A) && /* @__PURE__ */ p(q, { children: [
|
|
305
|
+
/* @__PURE__ */ n(H, { "data-feedback-type": $, children: /* @__PURE__ */ n(R, { name: $ }) }),
|
|
306
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ p(J, { children: [
|
|
307
|
+
/* @__PURE__ */ n(zt, { "data-feedback-type": $, children: T == null ? void 0 : T.title }),
|
|
308
|
+
/* @__PURE__ */ n(j, { children: T == null ? void 0 : T.description })
|
|
309
309
|
] }) })
|
|
310
310
|
] })
|
|
311
311
|
] });
|
|
312
|
-
}, Ht = /* @__PURE__ */
|
|
312
|
+
}, Ht = /* @__PURE__ */ i("div")({
|
|
313
313
|
name: "Container",
|
|
314
314
|
class: "c14ielyq",
|
|
315
315
|
propsAsIs: !1
|
|
316
|
-
}), Yt = /* @__PURE__ */
|
|
316
|
+
}), Yt = () => Ue, Zt = /* @__PURE__ */ i(Yt())({
|
|
317
|
+
name: "QuestionScrollContainer",
|
|
318
|
+
class: "q1tlqx57",
|
|
319
|
+
propsAsIs: !0
|
|
320
|
+
}), Gt = /* @__PURE__ */ i("div")({
|
|
317
321
|
name: "Content",
|
|
318
|
-
class: "
|
|
322
|
+
class: "c1hq58md",
|
|
319
323
|
propsAsIs: !1
|
|
320
|
-
}),
|
|
324
|
+
}), Kt = /* @__PURE__ */ i("div")({
|
|
321
325
|
name: "Title",
|
|
322
|
-
class: "
|
|
326
|
+
class: "t1c8nxcx",
|
|
323
327
|
propsAsIs: !1
|
|
324
|
-
}),
|
|
328
|
+
}), Jt = /* @__PURE__ */ i("div")({
|
|
325
329
|
name: "Options",
|
|
326
|
-
class: "
|
|
330
|
+
class: "oiozuc3",
|
|
327
331
|
propsAsIs: !1
|
|
328
|
-
}),
|
|
332
|
+
}), Xt = /* @__PURE__ */ i("button")({
|
|
329
333
|
name: "ButtonContainer",
|
|
330
334
|
class: "b1b6dl8t",
|
|
331
335
|
propsAsIs: !1
|
|
332
|
-
}),
|
|
336
|
+
}), es = /* @__PURE__ */ i("div")({
|
|
333
337
|
name: "ButtonPct",
|
|
334
338
|
class: "b4iik8i",
|
|
335
339
|
propsAsIs: !1
|
|
336
|
-
}),
|
|
340
|
+
}), ts = /* @__PURE__ */ i("span")({
|
|
337
341
|
name: "ButtonBody",
|
|
338
342
|
class: "b1gq1lnf",
|
|
339
343
|
propsAsIs: !1
|
|
340
|
-
}),
|
|
344
|
+
}), ss = /* @__PURE__ */ i("div")({
|
|
341
345
|
name: "IconContainer",
|
|
342
346
|
class: "i1j65z51",
|
|
343
347
|
propsAsIs: !1
|
|
344
|
-
}),
|
|
348
|
+
}), ns = /* @__PURE__ */ i("div")({
|
|
345
349
|
name: "IconWrap",
|
|
346
350
|
class: "i19tpfua",
|
|
347
351
|
propsAsIs: !1
|
|
348
|
-
}), Se = /* @__PURE__ */
|
|
352
|
+
}), Se = /* @__PURE__ */ i("img")({
|
|
349
353
|
name: "Icon",
|
|
350
354
|
class: "i1tubmma",
|
|
351
355
|
propsAsIs: !1
|
|
352
|
-
}),
|
|
356
|
+
}), rs = () => Se, os = /* @__PURE__ */ i(rs())({
|
|
353
357
|
name: "IconDefault",
|
|
354
358
|
class: "i1grrgwj",
|
|
355
359
|
propsAsIs: !0
|
|
356
|
-
}), is = () => Se,
|
|
360
|
+
}), is = () => Se, as = /* @__PURE__ */ i(is())({
|
|
357
361
|
name: "IconCircle",
|
|
358
362
|
class: "ibemyq8",
|
|
359
363
|
propsAsIs: !0
|
|
360
|
-
}),
|
|
364
|
+
}), ls = /* @__PURE__ */ i("span")({
|
|
361
365
|
name: "Title",
|
|
362
366
|
class: "t1dceht",
|
|
363
367
|
propsAsIs: !1
|
|
364
|
-
}),
|
|
368
|
+
}), cs = /* @__PURE__ */ i("span")({
|
|
365
369
|
name: "Indicators",
|
|
366
370
|
class: "i116q4vq",
|
|
367
371
|
propsAsIs: !1
|
|
368
|
-
}),
|
|
372
|
+
}), ds = /* @__PURE__ */ i("span")({
|
|
369
373
|
name: "Pts",
|
|
370
374
|
class: "p17ajcu2",
|
|
371
375
|
propsAsIs: !1
|
|
372
|
-
}),
|
|
376
|
+
}), ps = /* @__PURE__ */ i("span")({
|
|
373
377
|
name: "Percentage",
|
|
374
378
|
class: "pu9kmlb",
|
|
375
379
|
propsAsIs: !1
|
|
376
|
-
}),
|
|
380
|
+
}), us = () => R, hs = /* @__PURE__ */ i(us())({
|
|
377
381
|
name: "CheckIcon",
|
|
378
382
|
class: "c1j2j0s0",
|
|
379
383
|
propsAsIs: !0
|
|
380
384
|
}), ue = {
|
|
381
|
-
[F.CENTERED]: (e) => /* @__PURE__ */ n(
|
|
382
|
-
[F.TRANSPARENT]: (e) => /* @__PURE__ */ n(
|
|
383
|
-
[F.ROUNDED]: (e) => /* @__PURE__ */ n(
|
|
385
|
+
[F.CENTERED]: (e) => /* @__PURE__ */ n(os, { alt: "option-icon", src: e }),
|
|
386
|
+
[F.TRANSPARENT]: (e) => /* @__PURE__ */ n(ss, { children: /* @__PURE__ */ n(ns, { style: { backgroundImage: `url(${e})` } }) }),
|
|
387
|
+
[F.ROUNDED]: (e) => /* @__PURE__ */ n(as, { alt: "option-icon", src: e }),
|
|
384
388
|
[F.NONE]: () => null,
|
|
385
389
|
[F.UNSET]: () => null
|
|
386
|
-
},
|
|
387
|
-
if (e ===
|
|
390
|
+
}, ms = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: r, questionVoted: o }) => {
|
|
391
|
+
if (e === I.POLL && r)
|
|
388
392
|
return "correct";
|
|
389
|
-
if (e ===
|
|
390
|
-
if (t &&
|
|
393
|
+
if (e === I.PREDICTION) {
|
|
394
|
+
if (t && o)
|
|
391
395
|
return r ? s ? "correct" : "incorrect" : "unset";
|
|
392
396
|
if (r)
|
|
393
397
|
return "correct";
|
|
394
398
|
}
|
|
395
|
-
return e ===
|
|
396
|
-
},
|
|
399
|
+
return e === I.TRIVIA && o && r ? s ? "correct" : "incorrect" : "unset";
|
|
400
|
+
}, vs = ({
|
|
397
401
|
questionType: e,
|
|
398
402
|
questionVoted: t,
|
|
399
403
|
correct: s,
|
|
400
404
|
hasCorrectAnswer: r,
|
|
401
|
-
questionStatus:
|
|
402
|
-
}) => e ===
|
|
405
|
+
questionStatus: o
|
|
406
|
+
}) => e === I.TRIVIA ? t && s : e === I.PREDICTION ? t && s && r || o === V.RESOLVED && s : !1, fs = (e) => {
|
|
403
407
|
var t;
|
|
404
408
|
const {
|
|
405
409
|
// option props
|
|
406
410
|
id: s,
|
|
407
411
|
icon: r,
|
|
408
|
-
text:
|
|
412
|
+
text: o,
|
|
409
413
|
percentageDecimal: l,
|
|
410
414
|
points: a,
|
|
411
415
|
// extra props
|
|
412
416
|
onVote: c,
|
|
413
417
|
markThatVoted: d,
|
|
414
418
|
youSelected: u,
|
|
415
|
-
questionVoted:
|
|
416
|
-
imageMode:
|
|
417
|
-
answerTimeExpired:
|
|
418
|
-
questionStatus:
|
|
419
|
-
isLoading:
|
|
420
|
-
questionType:
|
|
421
|
-
correct:
|
|
422
|
-
hasCorrectAnswer:
|
|
423
|
-
votedAfterQuestionClosed:
|
|
424
|
-
enteredAnActiveQuestion:
|
|
425
|
-
marketClosed:
|
|
426
|
-
} = e, E =
|
|
419
|
+
questionVoted: h,
|
|
420
|
+
imageMode: v,
|
|
421
|
+
answerTimeExpired: m,
|
|
422
|
+
questionStatus: f,
|
|
423
|
+
isLoading: b,
|
|
424
|
+
questionType: C,
|
|
425
|
+
correct: y,
|
|
426
|
+
hasCorrectAnswer: A,
|
|
427
|
+
votedAfterQuestionClosed: g,
|
|
428
|
+
enteredAnActiveQuestion: $,
|
|
429
|
+
marketClosed: T
|
|
430
|
+
} = e, E = ms(e), _ = vs({ questionType: C, questionVoted: h, correct: y, hasCorrectAnswer: A, questionStatus: f }), D = T && C === I.PREDICTION, Z = h || D, w = C === I.PREDICTION && !h && !T;
|
|
427
431
|
return /* @__PURE__ */ p(
|
|
428
|
-
|
|
432
|
+
Xt,
|
|
429
433
|
{
|
|
430
434
|
value: s,
|
|
431
435
|
"data-selected": u,
|
|
432
436
|
"data-answer-state": E,
|
|
433
|
-
disabled:
|
|
434
|
-
"data-is-not-checked":
|
|
437
|
+
disabled: h || b || m || D && !$ || D && $ && g,
|
|
438
|
+
"data-is-not-checked": h && !u && E !== "incorrect",
|
|
435
439
|
onClick: (k) => {
|
|
436
440
|
d(
|
|
437
|
-
|
|
441
|
+
C === I.PREDICTION ? T : f === V.RESOLVED
|
|
438
442
|
), c(k);
|
|
439
443
|
},
|
|
440
444
|
children: [
|
|
441
|
-
/* @__PURE__ */ n(
|
|
442
|
-
/* @__PURE__ */ p(
|
|
443
|
-
r &&
|
|
444
|
-
/* @__PURE__ */ n(
|
|
445
|
-
|
|
445
|
+
/* @__PURE__ */ n(es, { "data-answer-state": E, style: { width: `${Z ? l : 0}%` } }),
|
|
446
|
+
/* @__PURE__ */ p(ts, { children: [
|
|
447
|
+
r && v && ((t = ue[v]) == null ? void 0 : t.call(ue, r)),
|
|
448
|
+
/* @__PURE__ */ n(ls, { children: o }),
|
|
449
|
+
w && /* @__PURE__ */ p("div", { children: [
|
|
446
450
|
/* @__PURE__ */ n(ne, { value: a }),
|
|
447
|
-
/* @__PURE__ */ n(
|
|
451
|
+
/* @__PURE__ */ n(ds, { children: "pts" })
|
|
448
452
|
] }),
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
/* @__PURE__ */ n(
|
|
453
|
+
Z && /* @__PURE__ */ p(cs, { children: [
|
|
454
|
+
_ && /* @__PURE__ */ n(hs, { name: "selected" }),
|
|
455
|
+
/* @__PURE__ */ n(ps, { children: /* @__PURE__ */ n(ne, { value: l, suffix: "%" }) })
|
|
452
456
|
] })
|
|
453
457
|
] })
|
|
454
458
|
]
|
|
455
459
|
}
|
|
456
460
|
);
|
|
457
461
|
};
|
|
458
|
-
var he = typeof window > "u" ?
|
|
459
|
-
let [a, c] = N(s), d =
|
|
460
|
-
let
|
|
461
|
-
if (
|
|
462
|
-
|
|
462
|
+
var he = typeof window > "u" ? Y : Je, Is = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: r = 0, onComplete: o, onUpdate: l }) => {
|
|
463
|
+
let [a, c] = N(s), d = M(0), u = M(s), h = M(s * -1e3), v = M(null), m = M(null), f = M(null), b = (A) => {
|
|
464
|
+
let g = A / 1e3;
|
|
465
|
+
if (m.current === null) {
|
|
466
|
+
m.current = g, v.current = requestAnimationFrame(b);
|
|
463
467
|
return;
|
|
464
468
|
}
|
|
465
|
-
let
|
|
466
|
-
|
|
467
|
-
let E = u.current + (r === 0 ?
|
|
468
|
-
c(D ? t : E), D || (
|
|
469
|
-
},
|
|
470
|
-
|
|
471
|
-
},
|
|
472
|
-
|
|
473
|
-
let
|
|
474
|
-
u.current =
|
|
469
|
+
let $ = g - m.current, T = d.current + $;
|
|
470
|
+
m.current = g, d.current = T;
|
|
471
|
+
let E = u.current + (r === 0 ? T : (T / r | 0) * r), _ = u.current + T, D = typeof t == "number" && _ >= t;
|
|
472
|
+
c(D ? t : E), D || (v.current = requestAnimationFrame(b));
|
|
473
|
+
}, C = () => {
|
|
474
|
+
v.current && cancelAnimationFrame(v.current), f.current && clearTimeout(f.current), m.current = null;
|
|
475
|
+
}, y = B((A) => {
|
|
476
|
+
C(), d.current = 0;
|
|
477
|
+
let g = typeof A == "number" ? A : s;
|
|
478
|
+
u.current = g, c(g), e && (v.current = requestAnimationFrame(b));
|
|
475
479
|
}, [e, s]);
|
|
476
480
|
return he(() => {
|
|
477
481
|
if (l == null || l(a), t && a >= t) {
|
|
478
|
-
|
|
479
|
-
let { shouldRepeat:
|
|
480
|
-
|
|
482
|
+
h.current += t * 1e3;
|
|
483
|
+
let { shouldRepeat: A = !1, delay: g = 0, newStartAt: $ } = (o == null ? void 0 : o(h.current / 1e3)) || {};
|
|
484
|
+
A && (f.current = setTimeout(() => y($), g * 1e3));
|
|
481
485
|
}
|
|
482
|
-
}, [a, t]), he(() => (e && (
|
|
483
|
-
},
|
|
484
|
-
let r = e / 2,
|
|
485
|
-
return { path: `m ${r},${
|
|
486
|
-
}, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0,
|
|
486
|
+
}, [a, t]), he(() => (e && (v.current = requestAnimationFrame(b)), C), [e, t, r]), { elapsedTime: a, reset: y };
|
|
487
|
+
}, Cs = (e, t, s) => {
|
|
488
|
+
let r = e / 2, o = t / 2, l = r - o, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
|
|
489
|
+
return { path: `m ${r},${o} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
|
|
490
|
+
}, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, gs = (e) => ({ position: "relative", width: e, height: e }), As = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, ke = (e, t, s, r, o) => {
|
|
487
491
|
if (r === 0)
|
|
488
492
|
return t;
|
|
489
|
-
let l = (
|
|
493
|
+
let l = (o ? r - e : e) / r;
|
|
490
494
|
return t + s * l;
|
|
491
495
|
}, ve = (e) => {
|
|
492
496
|
var t, s;
|
|
493
|
-
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (r,
|
|
494
|
-
},
|
|
497
|
+
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (r, o, l, a) => `#${o}${o}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((r) => parseInt(r, 16))) != null ? s : [];
|
|
498
|
+
}, ys = (e, t) => {
|
|
495
499
|
var s;
|
|
496
|
-
let { colors: r, colorsTime:
|
|
500
|
+
let { colors: r, colorsTime: o, isSmoothColorTransition: l = !0 } = e;
|
|
497
501
|
if (typeof r == "string")
|
|
498
502
|
return r;
|
|
499
|
-
let a = (s =
|
|
500
|
-
if (!
|
|
503
|
+
let a = (s = o == null ? void 0 : o.findIndex((m, f) => m >= t && t >= o[f + 1])) != null ? s : -1;
|
|
504
|
+
if (!o || a === -1)
|
|
501
505
|
return r[0];
|
|
502
506
|
if (!l)
|
|
503
507
|
return r[a];
|
|
504
|
-
let c =
|
|
505
|
-
return `rgb(${u.map((
|
|
506
|
-
},
|
|
507
|
-
let { duration: t, initialRemainingTime: s, updateInterval: r, size:
|
|
508
|
-
let
|
|
509
|
-
|
|
510
|
-
} : void 0, onComplete: typeof
|
|
511
|
-
var
|
|
512
|
-
let { shouldRepeat:
|
|
513
|
-
if (
|
|
514
|
-
return { shouldRepeat:
|
|
515
|
-
} : void 0 }),
|
|
516
|
-
return { elapsedTime:
|
|
508
|
+
let c = o[a] - t, d = o[a] - o[a + 1], u = ve(r[a]), h = ve(r[a + 1]), v = !!e.isGrowing;
|
|
509
|
+
return `rgb(${u.map((m, f) => ke(c, m, h[f] - m, d, v) | 0).join(",")})`;
|
|
510
|
+
}, $s = (e) => {
|
|
511
|
+
let { duration: t, initialRemainingTime: s, updateInterval: r, size: o = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: u = "clockwise", onComplete: h, onUpdate: v } = e, m = M(), f = Math.max(l, a ?? 0), { path: b, pathLength: C } = Cs(o, f, u), { elapsedTime: y } = Is({ isPlaying: c, duration: t, startAt: me(t, s), updateInterval: r, onUpdate: typeof v == "function" ? (g) => {
|
|
512
|
+
let $ = Math.ceil(t - g);
|
|
513
|
+
$ !== m.current && (m.current = $, v($));
|
|
514
|
+
} : void 0, onComplete: typeof h == "function" ? (g) => {
|
|
515
|
+
var $;
|
|
516
|
+
let { shouldRepeat: T, delay: E, newInitialRemainingTime: _ } = ($ = h(g)) != null ? $ : {};
|
|
517
|
+
if (T)
|
|
518
|
+
return { shouldRepeat: T, delay: E, newStartAt: me(t, _) };
|
|
519
|
+
} : void 0 }), A = t - y;
|
|
520
|
+
return { elapsedTime: y, path: b, pathLength: C, remainingTime: Math.ceil(A), rotation: u, size: o, stroke: ys(e, A), strokeDashoffset: ke(y, 0, C, t, d), strokeWidth: l };
|
|
517
521
|
}, Le = (e) => {
|
|
518
|
-
let { children: t, strokeLinecap: s, trailColor: r, trailStrokeWidth:
|
|
519
|
-
return W.createElement("div", { style:
|
|
522
|
+
let { children: t, strokeLinecap: s, trailColor: r, trailStrokeWidth: o } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: u, elapsedTime: h, size: v, strokeWidth: m } = $s(e);
|
|
523
|
+
return W.createElement("div", { style: gs(v) }, W.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, W.createElement("path", { d: l, fill: "none", stroke: r ?? "#d9d9d9", strokeWidth: o ?? m }), W.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: m, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && W.createElement("div", { style: As }, t({ remainingTime: u, elapsedTime: h, color: c })));
|
|
520
524
|
};
|
|
521
525
|
Le.displayName = "CountdownCircleTimer";
|
|
522
|
-
const
|
|
526
|
+
const bs = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRAY3], ws = [10, 10, 1, 0], Ts = /* @__PURE__ */ i("div")({
|
|
523
527
|
name: "RemainingTime",
|
|
524
528
|
class: "r165427",
|
|
525
529
|
propsAsIs: !1
|
|
526
|
-
}),
|
|
530
|
+
}), Rs = Q.SECONDARY_GREEN6, fe = Q.SECONDARY_RED3, Ss = Q.NEUTRALS_GRAY3, ks = ({
|
|
527
531
|
isPlaying: e = !0,
|
|
528
532
|
duration: t = 30,
|
|
529
533
|
onTimerExpired: s
|
|
530
534
|
}) => {
|
|
531
|
-
const [r,
|
|
535
|
+
const [r, o] = N(t > 10 ? Rs : fe), l = ({
|
|
532
536
|
remainingTime: d
|
|
533
|
-
}) => /* @__PURE__ */ n(
|
|
537
|
+
}) => /* @__PURE__ */ n(Ts, {
|
|
534
538
|
children: d
|
|
535
|
-
}), a =
|
|
536
|
-
s == null || s(),
|
|
537
|
-
}, [s,
|
|
538
|
-
d === 10 &&
|
|
539
|
-
}, [
|
|
539
|
+
}), a = B(() => {
|
|
540
|
+
s == null || s(), o(Ss);
|
|
541
|
+
}, [s, o]), c = B((d) => {
|
|
542
|
+
d === 10 && o(fe);
|
|
543
|
+
}, [o]);
|
|
540
544
|
return /* @__PURE__ */ n(Le, {
|
|
541
545
|
isPlaying: e,
|
|
542
546
|
duration: t,
|
|
543
|
-
colors:
|
|
544
|
-
colorsTime:
|
|
547
|
+
colors: bs,
|
|
548
|
+
colorsTime: ws,
|
|
545
549
|
size: 32,
|
|
546
550
|
strokeWidth: 2,
|
|
547
551
|
trailStrokeWidth: 2,
|
|
@@ -550,343 +554,342 @@ const $s = [_.PRIMARY_GREEN1, _.SECONDARY_RED1, _.SECONDARY_RED1, _.NEUTRALS_GRA
|
|
|
550
554
|
onUpdate: c,
|
|
551
555
|
children: l
|
|
552
556
|
});
|
|
553
|
-
},
|
|
557
|
+
}, Ls = /* @__PURE__ */ i("div")({
|
|
554
558
|
name: "WinBarContainer",
|
|
555
559
|
class: "wie6cqo",
|
|
556
560
|
propsAsIs: !1
|
|
557
|
-
}),
|
|
561
|
+
}), Es = /* @__PURE__ */ i("div")({
|
|
558
562
|
name: "Content",
|
|
559
563
|
class: "cgizw4u",
|
|
560
564
|
propsAsIs: !1
|
|
561
|
-
}),
|
|
565
|
+
}), xs = /* @__PURE__ */ i("div")({
|
|
562
566
|
name: "Title",
|
|
563
567
|
class: "t1l3ucjp",
|
|
564
568
|
propsAsIs: !1
|
|
565
|
-
}),
|
|
569
|
+
}), Ps = () => R, qs = /* @__PURE__ */ i(Ps())({
|
|
566
570
|
name: "WinIcon",
|
|
567
571
|
class: "wx7j799",
|
|
568
572
|
propsAsIs: !0
|
|
569
|
-
}),
|
|
573
|
+
}), Ns = /* @__PURE__ */ i("div")({
|
|
570
574
|
name: "Points",
|
|
571
575
|
class: "p4lwuj0",
|
|
572
576
|
propsAsIs: !1
|
|
573
|
-
}),
|
|
577
|
+
}), Ds = /* @__PURE__ */ i("span")({
|
|
574
578
|
name: "PointsCount",
|
|
575
579
|
class: "po9i64o",
|
|
576
580
|
propsAsIs: !1
|
|
577
|
-
}),
|
|
581
|
+
}), Os = /* @__PURE__ */ i("span")({
|
|
578
582
|
name: "PointsUnits",
|
|
579
583
|
class: "pe5g05h",
|
|
580
584
|
propsAsIs: !1
|
|
581
|
-
}),
|
|
585
|
+
}), Ms = ({
|
|
582
586
|
title: e,
|
|
583
587
|
points: t,
|
|
584
588
|
isPlayingTimer: s,
|
|
585
589
|
isTimer: r,
|
|
586
|
-
questionType:
|
|
590
|
+
questionType: o,
|
|
587
591
|
timerDuration: l,
|
|
588
592
|
onTimerExpired: a
|
|
589
|
-
}) => /* @__PURE__ */ p(
|
|
590
|
-
/* @__PURE__ */ p(
|
|
591
|
-
e && /* @__PURE__ */ n(
|
|
592
|
-
t !== void 0 &&
|
|
593
|
-
/* @__PURE__ */ n(
|
|
594
|
-
/* @__PURE__ */ p(
|
|
595
|
-
/* @__PURE__ */ n(
|
|
596
|
-
/* @__PURE__ */ n(
|
|
593
|
+
}) => /* @__PURE__ */ p(Ls, { style: { justifyContent: o === I.PREDICTION ? "center" : "space-between" }, children: [
|
|
594
|
+
/* @__PURE__ */ p(Es, { children: [
|
|
595
|
+
e && /* @__PURE__ */ n(xs, { children: e }),
|
|
596
|
+
t !== void 0 && o !== I.POLL && /* @__PURE__ */ p(q, { children: [
|
|
597
|
+
/* @__PURE__ */ n(qs, { name: "icon-trophy" }),
|
|
598
|
+
/* @__PURE__ */ p(Ns, { children: [
|
|
599
|
+
/* @__PURE__ */ n(Ds, { children: /* @__PURE__ */ n(ne, { value: t }) }),
|
|
600
|
+
/* @__PURE__ */ n(Os, { children: "PTS" })
|
|
597
601
|
] })
|
|
598
602
|
] })
|
|
599
603
|
] }),
|
|
600
|
-
r &&
|
|
601
|
-
] }),
|
|
602
|
-
var
|
|
603
|
-
const a = e.subject, c = e.type, d = e.status, u = (
|
|
604
|
-
|
|
605
|
-
c ===
|
|
604
|
+
r && o !== I.PREDICTION && /* @__PURE__ */ n(ks, { isPlaying: s, onTimerExpired: a, duration: l })
|
|
605
|
+
] }), Vs = ({ openedQuestion: e, isLoading: t, vote: s, close: r }) => {
|
|
606
|
+
var o, l;
|
|
607
|
+
const a = e.subject, c = e.type, d = e.status, u = (o = e.options) == null ? void 0 : o.options, h = e.marketClosed, [v, m] = N(!1), [f, b] = N(!1), [C, y] = N(!0), [A, g] = N(!1), [$, T] = N(""), E = e == null ? void 0 : e.id;
|
|
608
|
+
Y(() => {
|
|
609
|
+
c === I.PREDICTION ? h && y(!1) : d === V.RESOLVED && y(!1);
|
|
606
610
|
}, []);
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
}, []), D =
|
|
611
|
+
const _ = B((S) => {
|
|
612
|
+
b(S), m(!0);
|
|
613
|
+
}, []), D = B(
|
|
610
614
|
async (S) => {
|
|
611
615
|
if (E) {
|
|
612
|
-
const
|
|
613
|
-
|
|
616
|
+
const z = S.currentTarget.value;
|
|
617
|
+
T(z), await s(E, z);
|
|
614
618
|
}
|
|
615
619
|
},
|
|
616
|
-
[E,
|
|
617
|
-
),
|
|
618
|
-
|
|
619
|
-
}, [r]),
|
|
620
|
+
[E, T, s]
|
|
621
|
+
), Z = B(() => {
|
|
622
|
+
g(!0), setTimeout(r, 3e3);
|
|
623
|
+
}, [r]), w = P(
|
|
620
624
|
() => e == null ? void 0 : e.answers.find((S) => S.youVoted === !0),
|
|
621
625
|
[e]
|
|
622
|
-
), k =
|
|
626
|
+
), k = P(
|
|
623
627
|
() => !!(e != null && e.answers.find((S) => S.correct === !0)),
|
|
624
628
|
[e]
|
|
625
|
-
), x =
|
|
629
|
+
), x = P(
|
|
626
630
|
() => e == null ? void 0 : e.answers.find((S) => S.correct === !0),
|
|
627
631
|
[e]
|
|
628
|
-
), Ne =
|
|
629
|
-
var
|
|
632
|
+
), Ne = P(() => e ? e.answers.map((S) => {
|
|
633
|
+
var z;
|
|
630
634
|
return {
|
|
631
635
|
...S,
|
|
632
|
-
questionVoted: !!
|
|
633
|
-
youSelected:
|
|
636
|
+
questionVoted: !!w,
|
|
637
|
+
youSelected: $ === S.id,
|
|
634
638
|
isLoading: t,
|
|
635
639
|
hasCorrectAnswer: k,
|
|
636
640
|
questionType: e.type,
|
|
637
|
-
answerTimeExpired:
|
|
641
|
+
answerTimeExpired: A,
|
|
638
642
|
questionStatus: d,
|
|
639
|
-
imageMode: (
|
|
643
|
+
imageMode: (z = e.appearance) == null ? void 0 : z.images,
|
|
640
644
|
onVote: D
|
|
641
645
|
};
|
|
642
646
|
}) : [], [
|
|
643
647
|
k,
|
|
644
|
-
|
|
648
|
+
A,
|
|
645
649
|
t,
|
|
646
650
|
e,
|
|
647
|
-
|
|
651
|
+
w,
|
|
648
652
|
d,
|
|
649
653
|
D,
|
|
650
|
-
|
|
651
|
-
]), De = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0,
|
|
652
|
-
if (c ===
|
|
653
|
-
return
|
|
654
|
-
if (!(
|
|
655
|
-
return d ===
|
|
654
|
+
$
|
|
655
|
+
]), De = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, U = d === V.RESOLVED && c === I.TRIVIA && !w && !C, le = c === I.TRIVIA && f && v && C, ce = P(() => c === I.PREDICTION ? !!(w && !k || w && k && x != null && x.youVoted) : !0, [c, w, k, x]), Oe = P(() => {
|
|
656
|
+
if (c === I.PREDICTION && w && (!k || k && x != null && x.youVoted))
|
|
657
|
+
return w.points;
|
|
658
|
+
if (!(U || A))
|
|
659
|
+
return d === V.RESOLVED ? 0 : w ? w.correct ? w.points : 0 : x == null ? void 0 : x.points;
|
|
656
660
|
}, [
|
|
657
|
-
C,
|
|
658
661
|
A,
|
|
662
|
+
w,
|
|
659
663
|
x,
|
|
660
664
|
d,
|
|
661
|
-
|
|
665
|
+
U,
|
|
662
666
|
c,
|
|
663
667
|
k
|
|
664
|
-
]), Me =
|
|
665
|
-
return /* @__PURE__ */ n(
|
|
668
|
+
]), Me = P(() => c === I.PREDICTION && w ? k ? k && x != null && x.youVoted ? "You won" : "" : "To win" : U || A ? "Time expired" : c === I.POLL ? "Time remaining" : w ? "You won" : "To win", [A, c, w, U, k, x]), Ve = w || U || le || c === I.TRIVIA && d === V.RESOLVED && C;
|
|
669
|
+
return /* @__PURE__ */ n(Zt, { children: /* @__PURE__ */ n(Ht, { children: /* @__PURE__ */ p(Gt, { children: [
|
|
666
670
|
/* @__PURE__ */ n(
|
|
667
671
|
Ft,
|
|
668
672
|
{
|
|
669
673
|
feedbackMessages: De,
|
|
670
|
-
questionVoted: !!
|
|
671
|
-
questionVotedCorrectly:
|
|
674
|
+
questionVoted: !!w,
|
|
675
|
+
questionVotedCorrectly: w == null ? void 0 : w.correct,
|
|
672
676
|
questionType: c,
|
|
673
677
|
hasCorrectAnswer: k,
|
|
674
678
|
questionStatus: d,
|
|
675
|
-
showExpiredNotification:
|
|
679
|
+
showExpiredNotification: U,
|
|
676
680
|
showClosedNotificationTrivia: le,
|
|
677
|
-
votedInCurrentRender:
|
|
678
|
-
votedAfterQuestionClosed:
|
|
679
|
-
enteredAnActiveQuestion:
|
|
680
|
-
marketClosed:
|
|
681
|
+
votedInCurrentRender: v,
|
|
682
|
+
votedAfterQuestionClosed: f,
|
|
683
|
+
enteredAnActiveQuestion: C,
|
|
684
|
+
marketClosed: h
|
|
681
685
|
}
|
|
682
686
|
),
|
|
683
687
|
ce && /* @__PURE__ */ n(
|
|
684
|
-
|
|
688
|
+
Ms,
|
|
685
689
|
{
|
|
686
690
|
title: Me,
|
|
687
691
|
points: Oe,
|
|
688
|
-
onTimerExpired:
|
|
692
|
+
onTimerExpired: Z,
|
|
689
693
|
questionType: e.type,
|
|
690
694
|
isTimer: !t,
|
|
691
|
-
isPlayingTimer: !
|
|
695
|
+
isPlayingTimer: !w,
|
|
692
696
|
timerDuration: Ve ? 0 : Number(((l = e == null ? void 0 : e.appearance) == null ? void 0 : l.autoHideInterval) || "30")
|
|
693
697
|
}
|
|
694
698
|
),
|
|
695
|
-
|
|
696
|
-
|
|
699
|
+
A ? /* @__PURE__ */ n(
|
|
700
|
+
Ut,
|
|
697
701
|
{
|
|
698
702
|
title: "More to come...",
|
|
699
703
|
description: "Watch for additional enhanced stream interactive experience."
|
|
700
704
|
}
|
|
701
|
-
) : /* @__PURE__ */ p(
|
|
702
|
-
/* @__PURE__ */ n(
|
|
703
|
-
/* @__PURE__ */ n(
|
|
704
|
-
|
|
705
|
+
) : /* @__PURE__ */ p(q, { children: [
|
|
706
|
+
/* @__PURE__ */ n(Kt, { style: ce ? {} : { marginTop: 0 }, children: a }),
|
|
707
|
+
/* @__PURE__ */ n(Jt, { children: Ne.map((S) => /* @__PURE__ */ n(
|
|
708
|
+
fs,
|
|
705
709
|
{
|
|
706
710
|
...S,
|
|
707
|
-
markThatVoted:
|
|
708
|
-
votedAfterQuestionClosed:
|
|
709
|
-
enteredAnActiveQuestion:
|
|
710
|
-
marketClosed:
|
|
711
|
+
markThatVoted: _,
|
|
712
|
+
votedAfterQuestionClosed: f,
|
|
713
|
+
enteredAnActiveQuestion: C,
|
|
714
|
+
marketClosed: h
|
|
711
715
|
},
|
|
712
716
|
S.id
|
|
713
717
|
)) })
|
|
714
718
|
] })
|
|
715
719
|
] }) }) });
|
|
716
|
-
},
|
|
720
|
+
}, _s = /* @__PURE__ */ i("div")({
|
|
717
721
|
name: "Container",
|
|
718
722
|
class: "cgn5uen",
|
|
719
723
|
propsAsIs: !1
|
|
720
|
-
}),
|
|
724
|
+
}), Qs = /* @__PURE__ */ i("div")({
|
|
721
725
|
name: "Content",
|
|
722
726
|
class: "c1px8nt6",
|
|
723
727
|
propsAsIs: !1
|
|
724
|
-
}),
|
|
728
|
+
}), Us = /* @__PURE__ */ i("h3")({
|
|
725
729
|
name: "Title",
|
|
726
730
|
class: "t5et2jt",
|
|
727
731
|
propsAsIs: !1
|
|
728
|
-
}),
|
|
732
|
+
}), js = /* @__PURE__ */ i("div")({
|
|
729
733
|
name: "Description",
|
|
730
734
|
class: "d1i2kpk2",
|
|
731
735
|
propsAsIs: !1
|
|
732
|
-
}),
|
|
736
|
+
}), Ws = /* @__PURE__ */ i("div")({
|
|
733
737
|
name: "DateWrap",
|
|
734
738
|
class: "dd3lh3p",
|
|
735
739
|
propsAsIs: !1
|
|
736
|
-
}),
|
|
740
|
+
}), Bs = /* @__PURE__ */ i("img")({
|
|
737
741
|
name: "Image",
|
|
738
742
|
class: "i1gfjeu5",
|
|
739
743
|
propsAsIs: !1
|
|
740
744
|
}), Ee = ({
|
|
741
745
|
created: e,
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
notification: l
|
|
746
|
+
title: t,
|
|
747
|
+
isPickHistory: s,
|
|
748
|
+
instantView: r,
|
|
749
|
+
notification: o
|
|
747
750
|
}) => {
|
|
748
|
-
const
|
|
751
|
+
const l = P(() => {
|
|
749
752
|
if (e) {
|
|
750
|
-
const
|
|
751
|
-
if (ae(
|
|
753
|
+
const a = new Date(e);
|
|
754
|
+
if (ae(a))
|
|
752
755
|
return {
|
|
753
|
-
date:
|
|
754
|
-
time:
|
|
756
|
+
date: oe(a),
|
|
757
|
+
time: ie(a)
|
|
755
758
|
};
|
|
756
759
|
}
|
|
757
760
|
return null;
|
|
758
|
-
}, [e])
|
|
759
|
-
return /* @__PURE__ */ p(
|
|
760
|
-
|
|
761
|
-
|
|
761
|
+
}, [e]);
|
|
762
|
+
return /* @__PURE__ */ p(_s, { children: [
|
|
763
|
+
l && /* @__PURE__ */ p(Ws, { children: [
|
|
764
|
+
l.date,
|
|
762
765
|
" · ",
|
|
763
|
-
|
|
766
|
+
l.time
|
|
764
767
|
] }),
|
|
765
|
-
(
|
|
766
|
-
|
|
767
|
-
/* @__PURE__ */ p(
|
|
768
|
-
/* @__PURE__ */ n(
|
|
769
|
-
/* @__PURE__ */ n(
|
|
768
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ n(je, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
769
|
+
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ n(Bs, { src: r == null ? void 0 : r.image }),
|
|
770
|
+
/* @__PURE__ */ p(Qs, { children: [
|
|
771
|
+
/* @__PURE__ */ n(Us, { children: s ? t : r == null ? void 0 : r.heading }),
|
|
772
|
+
/* @__PURE__ */ n(js, { children: s ? o == null ? void 0 : o.body : r == null ? void 0 : r.body })
|
|
770
773
|
] })
|
|
771
774
|
] });
|
|
772
|
-
},
|
|
775
|
+
}, zs = /* @__PURE__ */ i("div")({
|
|
773
776
|
name: "Container",
|
|
774
777
|
class: "c1euiow",
|
|
775
778
|
propsAsIs: !1
|
|
776
|
-
}),
|
|
779
|
+
}), Fs = /* @__PURE__ */ i("a")({
|
|
777
780
|
name: "WebLinkBtn",
|
|
778
781
|
class: "w19zie3h",
|
|
779
782
|
propsAsIs: !1
|
|
780
|
-
}),
|
|
783
|
+
}), Hs = ({ instantView: e, ...t }) => /* @__PURE__ */ p(zs, { children: [
|
|
781
784
|
/* @__PURE__ */ n(Ee, { instantView: e, ...t }),
|
|
782
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(
|
|
785
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(Fs, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
783
786
|
e == null ? void 0 : e.webLink.label,
|
|
784
|
-
/* @__PURE__ */ n(
|
|
787
|
+
/* @__PURE__ */ n(R, { name: "icon-external-link" })
|
|
785
788
|
] })
|
|
786
|
-
] }),
|
|
789
|
+
] }), Ys = /* @__PURE__ */ i("div")({
|
|
787
790
|
name: "Container",
|
|
788
791
|
class: "c1dcxmvf",
|
|
789
792
|
propsAsIs: !1
|
|
790
|
-
}),
|
|
793
|
+
}), Zs = /* @__PURE__ */ i("div")({
|
|
791
794
|
name: "DateTime",
|
|
792
795
|
class: "db4q22c",
|
|
793
796
|
propsAsIs: !1
|
|
794
|
-
}),
|
|
797
|
+
}), Gs = /* @__PURE__ */ i("blockquote")({
|
|
795
798
|
name: "Quote",
|
|
796
799
|
class: "q111mmic",
|
|
797
800
|
propsAsIs: !1
|
|
798
|
-
}),
|
|
799
|
-
const s =
|
|
801
|
+
}), Ks = ({ created: e, ...t }) => {
|
|
802
|
+
const s = P(() => {
|
|
800
803
|
if (e) {
|
|
801
804
|
const r = new Date(e);
|
|
802
805
|
if (ae(r))
|
|
803
806
|
return {
|
|
804
|
-
date:
|
|
805
|
-
time:
|
|
807
|
+
date: oe(r),
|
|
808
|
+
time: ie(r)
|
|
806
809
|
};
|
|
807
810
|
}
|
|
808
811
|
return null;
|
|
809
812
|
}, [e]);
|
|
810
|
-
return /* @__PURE__ */ p(
|
|
811
|
-
s && /* @__PURE__ */ p(
|
|
813
|
+
return /* @__PURE__ */ p(Ys, { children: [
|
|
814
|
+
s && /* @__PURE__ */ p(Zs, { children: [
|
|
812
815
|
s.date,
|
|
813
816
|
" · ",
|
|
814
817
|
s.time
|
|
815
818
|
] }),
|
|
816
|
-
t.title && /* @__PURE__ */ n(
|
|
817
|
-
/* @__PURE__ */ n(
|
|
819
|
+
t.title && /* @__PURE__ */ n(Gs, { children: t.title }),
|
|
820
|
+
/* @__PURE__ */ n(ye, { ...t })
|
|
818
821
|
] });
|
|
819
|
-
},
|
|
822
|
+
}, Js = /* @__PURE__ */ i("div")({
|
|
820
823
|
name: "QuestionContainer",
|
|
821
824
|
class: "qdri6g3",
|
|
822
825
|
propsAsIs: !1
|
|
823
|
-
}),
|
|
826
|
+
}), Xs = ({
|
|
824
827
|
openedQuestion: e
|
|
825
828
|
}) => {
|
|
826
829
|
var t, s;
|
|
827
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(
|
|
830
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(Hs, {
|
|
828
831
|
created: e.attributes.created,
|
|
829
832
|
...e.attributes.attributes.value
|
|
830
|
-
}) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(
|
|
833
|
+
}) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(Ks, {
|
|
831
834
|
created: e.attributes.created,
|
|
832
835
|
...e.attributes.attributes.value
|
|
833
836
|
}) : null;
|
|
834
|
-
},
|
|
837
|
+
}, en = ({
|
|
835
838
|
extendedQuestion: e,
|
|
836
839
|
vote: t,
|
|
837
840
|
close: s
|
|
838
841
|
}) => {
|
|
839
842
|
const {
|
|
840
843
|
loading: r,
|
|
841
|
-
data:
|
|
844
|
+
data: o
|
|
842
845
|
} = e;
|
|
843
|
-
return
|
|
846
|
+
return o ? /* @__PURE__ */ n(Vs, {
|
|
844
847
|
vote: t,
|
|
845
848
|
close: s,
|
|
846
|
-
openedQuestion:
|
|
849
|
+
openedQuestion: o,
|
|
847
850
|
isLoading: !!r
|
|
848
851
|
}) : null;
|
|
849
|
-
},
|
|
852
|
+
}, tn = ({
|
|
850
853
|
gamification: e
|
|
851
854
|
}) => {
|
|
852
855
|
var t;
|
|
853
|
-
const s =
|
|
856
|
+
const s = O(e.openedQuestion.$store), r = O(e.openedQuestion.$extendedStore);
|
|
854
857
|
if (!s)
|
|
855
858
|
return null;
|
|
856
|
-
const
|
|
857
|
-
return /* @__PURE__ */ p(
|
|
859
|
+
const o = s.type;
|
|
860
|
+
return /* @__PURE__ */ p(Js, {
|
|
858
861
|
children: [/* @__PURE__ */ n(be, {
|
|
859
862
|
close: e.closeQuestion,
|
|
860
|
-
type: ((t = s.attributes) == null ? void 0 : t.type) ||
|
|
861
|
-
}),
|
|
863
|
+
type: ((t = s.attributes) == null ? void 0 : t.type) || I.UNSET
|
|
864
|
+
}), o === "question" && /* @__PURE__ */ n(en, {
|
|
862
865
|
vote: e.submitAnswer,
|
|
863
866
|
close: e.closeQuestion,
|
|
864
867
|
extendedQuestion: r
|
|
865
|
-
}),
|
|
868
|
+
}), o !== "question" && /* @__PURE__ */ n(Xs, {
|
|
866
869
|
openedQuestion: s
|
|
867
870
|
}), /* @__PURE__ */ n(Mt, {
|
|
868
871
|
sponsorLogo: ""
|
|
869
872
|
})]
|
|
870
873
|
});
|
|
871
|
-
},
|
|
874
|
+
}, sn = /* @__PURE__ */ i("div")({
|
|
872
875
|
name: "Container",
|
|
873
876
|
class: "c115qtkr",
|
|
874
877
|
propsAsIs: !1
|
|
875
|
-
}),
|
|
878
|
+
}), nn = /* @__PURE__ */ i("div")({
|
|
876
879
|
name: "STabs",
|
|
877
880
|
class: "sxnslc8",
|
|
878
881
|
propsAsIs: !1
|
|
879
|
-
}),
|
|
882
|
+
}), rn = /* @__PURE__ */ i("button")({
|
|
880
883
|
name: "Button",
|
|
881
884
|
class: "b1umzux0",
|
|
882
885
|
propsAsIs: !1
|
|
883
|
-
}),
|
|
886
|
+
}), on = /* @__PURE__ */ i("span")({
|
|
884
887
|
name: "Title",
|
|
885
888
|
class: "tspsaas",
|
|
886
889
|
propsAsIs: !1
|
|
887
890
|
});
|
|
888
|
-
var
|
|
889
|
-
const Ie = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(
|
|
891
|
+
var ee = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(ee || {});
|
|
892
|
+
const Ie = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(rn, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(on, { children: e }) }), an = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(sn, { children: /* @__PURE__ */ p(nn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
890
893
|
/* @__PURE__ */ n(Ie, { title: "Home", active: e === "home", onClick: () => t(
|
|
891
894
|
"home"
|
|
892
895
|
/* HOME */
|
|
@@ -902,76 +905,76 @@ const Ie = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(sn, { onCl
|
|
|
902
905
|
)
|
|
903
906
|
}
|
|
904
907
|
)
|
|
905
|
-
] }) }),
|
|
908
|
+
] }) }), ln = /* @__PURE__ */ i("div")({
|
|
906
909
|
name: "Container",
|
|
907
910
|
class: "c1ux29ft",
|
|
908
911
|
propsAsIs: !1
|
|
909
|
-
}),
|
|
912
|
+
}), cn = /* @__PURE__ */ i("img")({
|
|
910
913
|
name: "FriendsIcon",
|
|
911
914
|
class: "f10ncfg2",
|
|
912
915
|
propsAsIs: !1
|
|
913
|
-
}),
|
|
916
|
+
}), dn = /* @__PURE__ */ i("div")({
|
|
914
917
|
name: "Content",
|
|
915
918
|
class: "c1yc07bd",
|
|
916
919
|
propsAsIs: !1
|
|
917
|
-
}),
|
|
920
|
+
}), pn = /* @__PURE__ */ i("div")({
|
|
918
921
|
name: "Title",
|
|
919
922
|
class: "tj6cq7w",
|
|
920
923
|
propsAsIs: !1
|
|
921
|
-
}),
|
|
924
|
+
}), un = /* @__PURE__ */ i("div")({
|
|
922
925
|
name: "Description",
|
|
923
926
|
class: "d1ag78xo",
|
|
924
927
|
propsAsIs: !1
|
|
925
|
-
}),
|
|
928
|
+
}), hn = () => R, mn = /* @__PURE__ */ i(hn())({
|
|
926
929
|
name: "ArrowInviteIcon",
|
|
927
930
|
class: "awohrz6",
|
|
928
931
|
propsAsIs: !0
|
|
929
|
-
}),
|
|
930
|
-
/* @__PURE__ */ n(
|
|
931
|
-
/* @__PURE__ */ p(
|
|
932
|
-
/* @__PURE__ */ n(
|
|
933
|
-
/* @__PURE__ */ n(
|
|
932
|
+
}), vn = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", fn = ({ title: e, description: t, onClick: s, className: r }) => /* @__PURE__ */ p(ln, { onClick: s, className: r, children: [
|
|
933
|
+
/* @__PURE__ */ n(cn, { alt: "friends-icon", src: vn }),
|
|
934
|
+
/* @__PURE__ */ p(dn, { children: [
|
|
935
|
+
/* @__PURE__ */ n(pn, { children: e }),
|
|
936
|
+
/* @__PURE__ */ n(un, { children: t })
|
|
934
937
|
] }),
|
|
935
|
-
/* @__PURE__ */ n(
|
|
938
|
+
/* @__PURE__ */ n(mn, { name: "icon-copy" })
|
|
936
939
|
] });
|
|
937
|
-
function
|
|
938
|
-
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, r = e.startIndex,
|
|
939
|
-
return !(r > s ||
|
|
940
|
+
function In(e) {
|
|
941
|
+
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, r = e.startIndex, o = e.stopIndex;
|
|
942
|
+
return !(r > s || o < t);
|
|
940
943
|
}
|
|
941
|
-
function
|
|
942
|
-
for (var t = e.isItemLoaded, s = e.itemCount, r = e.minimumBatchSize,
|
|
943
|
-
var
|
|
944
|
-
|
|
944
|
+
function Cn(e) {
|
|
945
|
+
for (var t = e.isItemLoaded, s = e.itemCount, r = e.minimumBatchSize, o = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, u = o; u <= l; u++) {
|
|
946
|
+
var h = t(u);
|
|
947
|
+
h ? d !== null && (a.push(c, d), c = d = null) : (d = u, c === null && (c = u));
|
|
945
948
|
}
|
|
946
949
|
if (d !== null) {
|
|
947
|
-
for (var
|
|
948
|
-
d =
|
|
950
|
+
for (var v = Math.min(Math.max(d, c + r - 1), s - 1), m = d + 1; m <= v && !t(m); m++)
|
|
951
|
+
d = m;
|
|
949
952
|
a.push(c, d);
|
|
950
953
|
}
|
|
951
954
|
if (a.length)
|
|
952
955
|
for (; a[1] - a[0] + 1 < r && a[0] > 0; ) {
|
|
953
|
-
var
|
|
954
|
-
if (!t(
|
|
955
|
-
a[0] =
|
|
956
|
+
var f = a[0] - 1;
|
|
957
|
+
if (!t(f))
|
|
958
|
+
a[0] = f;
|
|
956
959
|
else
|
|
957
960
|
break;
|
|
958
961
|
}
|
|
959
962
|
return a;
|
|
960
963
|
}
|
|
961
|
-
var
|
|
964
|
+
var gn = function(e, t) {
|
|
962
965
|
if (!(e instanceof t))
|
|
963
966
|
throw new TypeError("Cannot call a class as a function");
|
|
964
|
-
},
|
|
967
|
+
}, An = /* @__PURE__ */ function() {
|
|
965
968
|
function e(t, s) {
|
|
966
969
|
for (var r = 0; r < s.length; r++) {
|
|
967
|
-
var
|
|
968
|
-
|
|
970
|
+
var o = s[r];
|
|
971
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
|
|
969
972
|
}
|
|
970
973
|
}
|
|
971
974
|
return function(t, s, r) {
|
|
972
975
|
return s && e(t.prototype, s), r && e(t, r), t;
|
|
973
976
|
};
|
|
974
|
-
}(),
|
|
977
|
+
}(), yn = function(e, t) {
|
|
975
978
|
if (typeof t != "function" && t !== null)
|
|
976
979
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
977
980
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -988,20 +991,20 @@ var In = function(e, t) {
|
|
|
988
991
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
989
992
|
};
|
|
990
993
|
(function(e) {
|
|
991
|
-
|
|
994
|
+
yn(t, e);
|
|
992
995
|
function t() {
|
|
993
|
-
var s, r,
|
|
994
|
-
|
|
996
|
+
var s, r, o, l;
|
|
997
|
+
gn(this, t);
|
|
995
998
|
for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
|
|
996
999
|
c[d] = arguments[d];
|
|
997
|
-
return l = (r = (
|
|
998
|
-
var
|
|
999
|
-
|
|
1000
|
-
},
|
|
1001
|
-
|
|
1002
|
-
}, r), Ce(
|
|
1000
|
+
return l = (r = (o = Ce(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(u) {
|
|
1001
|
+
var h = u.visibleStartIndex, v = u.visibleStopIndex;
|
|
1002
|
+
o._lastRenderedStartIndex = h, o._lastRenderedStopIndex = v, o._ensureRowsLoaded(h, v);
|
|
1003
|
+
}, o._setRef = function(u) {
|
|
1004
|
+
o._listRef = u;
|
|
1005
|
+
}, r), Ce(o, l);
|
|
1003
1006
|
}
|
|
1004
|
-
return
|
|
1007
|
+
return An(t, [{
|
|
1005
1008
|
key: "resetloadMoreItemsCache",
|
|
1006
1009
|
value: function() {
|
|
1007
1010
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1022,33 +1025,33 @@ var In = function(e, t) {
|
|
|
1022
1025
|
}
|
|
1023
1026
|
}, {
|
|
1024
1027
|
key: "_ensureRowsLoaded",
|
|
1025
|
-
value: function(r,
|
|
1026
|
-
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, u = d === void 0 ? 10 : d,
|
|
1028
|
+
value: function(r, o) {
|
|
1029
|
+
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, u = d === void 0 ? 10 : d, h = l.threshold, v = h === void 0 ? 15 : h, m = Cn({
|
|
1027
1030
|
isItemLoaded: a,
|
|
1028
1031
|
itemCount: c,
|
|
1029
1032
|
minimumBatchSize: u,
|
|
1030
|
-
startIndex: Math.max(0, r -
|
|
1031
|
-
stopIndex: Math.min(c - 1,
|
|
1033
|
+
startIndex: Math.max(0, r - v),
|
|
1034
|
+
stopIndex: Math.min(c - 1, o + v)
|
|
1032
1035
|
});
|
|
1033
|
-
(this._memoizedUnloadedRanges.length !==
|
|
1034
|
-
return
|
|
1035
|
-
})) && (this._memoizedUnloadedRanges =
|
|
1036
|
+
(this._memoizedUnloadedRanges.length !== m.length || this._memoizedUnloadedRanges.some(function(f, b) {
|
|
1037
|
+
return m[b] !== f;
|
|
1038
|
+
})) && (this._memoizedUnloadedRanges = m, this._loadUnloadedRanges(m));
|
|
1036
1039
|
}
|
|
1037
1040
|
}, {
|
|
1038
1041
|
key: "_loadUnloadedRanges",
|
|
1039
1042
|
value: function(r) {
|
|
1040
|
-
for (var
|
|
1041
|
-
var
|
|
1042
|
-
|
|
1043
|
-
if (
|
|
1044
|
-
lastRenderedStartIndex:
|
|
1045
|
-
lastRenderedStopIndex:
|
|
1046
|
-
startIndex:
|
|
1047
|
-
stopIndex:
|
|
1043
|
+
for (var o = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(u) {
|
|
1044
|
+
var h = r[u], v = r[u + 1], m = l(h, v);
|
|
1045
|
+
m != null && m.then(function() {
|
|
1046
|
+
if (In({
|
|
1047
|
+
lastRenderedStartIndex: o._lastRenderedStartIndex,
|
|
1048
|
+
lastRenderedStopIndex: o._lastRenderedStopIndex,
|
|
1049
|
+
startIndex: h,
|
|
1050
|
+
stopIndex: v
|
|
1048
1051
|
})) {
|
|
1049
|
-
if (
|
|
1052
|
+
if (o._listRef == null)
|
|
1050
1053
|
return;
|
|
1051
|
-
typeof
|
|
1054
|
+
typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(h, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
|
|
1052
1055
|
}
|
|
1053
1056
|
});
|
|
1054
1057
|
}, c = 0; c < r.length; c += 2)
|
|
@@ -1056,48 +1059,48 @@ var In = function(e, t) {
|
|
|
1056
1059
|
}
|
|
1057
1060
|
}]), t;
|
|
1058
1061
|
})(Xe);
|
|
1059
|
-
const
|
|
1062
|
+
const $n = /* @__PURE__ */ i("div")({
|
|
1060
1063
|
name: "Container",
|
|
1061
1064
|
class: "culdu4a",
|
|
1062
1065
|
propsAsIs: !1
|
|
1063
|
-
}),
|
|
1066
|
+
}), bn = /* @__PURE__ */ i("div")({
|
|
1064
1067
|
name: "Position",
|
|
1065
1068
|
class: "pwf8e69",
|
|
1066
1069
|
propsAsIs: !1
|
|
1067
|
-
}),
|
|
1070
|
+
}), wn = /* @__PURE__ */ i("img")({
|
|
1068
1071
|
name: "Avatar",
|
|
1069
1072
|
class: "atf4yh4",
|
|
1070
1073
|
propsAsIs: !1
|
|
1071
|
-
}),
|
|
1074
|
+
}), Tn = /* @__PURE__ */ i("div")({
|
|
1072
1075
|
name: "AvatarPlaceholder",
|
|
1073
1076
|
class: "a1dg29ja",
|
|
1074
1077
|
propsAsIs: !1
|
|
1075
|
-
}),
|
|
1078
|
+
}), Rn = /* @__PURE__ */ i("div")({
|
|
1076
1079
|
name: "Content",
|
|
1077
1080
|
class: "c10a68rc",
|
|
1078
1081
|
propsAsIs: !1
|
|
1079
|
-
}),
|
|
1082
|
+
}), Sn = /* @__PURE__ */ i("div")({
|
|
1080
1083
|
name: "NameContainer",
|
|
1081
1084
|
class: "nc4kck5",
|
|
1082
1085
|
propsAsIs: !1
|
|
1083
|
-
}),
|
|
1086
|
+
}), kn = /* @__PURE__ */ i("span")({
|
|
1084
1087
|
name: "Name",
|
|
1085
1088
|
class: "njsrqgr",
|
|
1086
1089
|
propsAsIs: !1
|
|
1087
|
-
}),
|
|
1090
|
+
}), Ln = () => R, En = /* @__PURE__ */ i(Ln())({
|
|
1088
1091
|
name: "CurrentUserBadge",
|
|
1089
1092
|
class: "c17uc4zr",
|
|
1090
1093
|
propsAsIs: !0
|
|
1091
1094
|
});
|
|
1092
|
-
var xe = { exports: {} },
|
|
1095
|
+
var xe = { exports: {} }, xn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", Pn = xn, qn = Pn;
|
|
1093
1096
|
function Pe() {
|
|
1094
1097
|
}
|
|
1095
1098
|
function qe() {
|
|
1096
1099
|
}
|
|
1097
1100
|
qe.resetWarningCache = Pe;
|
|
1098
|
-
var
|
|
1099
|
-
function e(r,
|
|
1100
|
-
if (d !==
|
|
1101
|
+
var Nn = function() {
|
|
1102
|
+
function e(r, o, l, a, c, d) {
|
|
1103
|
+
if (d !== qn) {
|
|
1101
1104
|
var u = new Error(
|
|
1102
1105
|
"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"
|
|
1103
1106
|
);
|
|
@@ -1133,10 +1136,10 @@ var Pn = function() {
|
|
|
1133
1136
|
};
|
|
1134
1137
|
return s.PropTypes = s, s;
|
|
1135
1138
|
};
|
|
1136
|
-
xe.exports =
|
|
1137
|
-
var
|
|
1138
|
-
const L = /* @__PURE__ */ We(
|
|
1139
|
-
class
|
|
1139
|
+
xe.exports = Nn();
|
|
1140
|
+
var Dn = xe.exports;
|
|
1141
|
+
const L = /* @__PURE__ */ We(Dn);
|
|
1142
|
+
class re extends et {
|
|
1140
1143
|
constructor(t) {
|
|
1141
1144
|
super(t), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
|
|
1142
1145
|
}
|
|
@@ -1230,13 +1233,13 @@ class ie extends et {
|
|
|
1230
1233
|
}
|
|
1231
1234
|
scrollListener() {
|
|
1232
1235
|
const t = this.scrollComponent, s = window, r = this.getParentElement(t);
|
|
1233
|
-
let
|
|
1236
|
+
let o;
|
|
1234
1237
|
if (this.props.useWindow) {
|
|
1235
1238
|
const l = document.documentElement || document.body.parentNode || document.body, a = s.pageYOffset !== void 0 ? s.pageYOffset : l.scrollTop;
|
|
1236
|
-
this.props.isReverse ?
|
|
1239
|
+
this.props.isReverse ? o = a : o = this.calculateOffset(t, a);
|
|
1237
1240
|
} else
|
|
1238
|
-
this.props.isReverse ?
|
|
1239
|
-
|
|
1241
|
+
this.props.isReverse ? o = r.scrollTop : o = t.scrollHeight - r.scrollTop - r.clientHeight;
|
|
1242
|
+
o < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = r.scrollHeight, this.beforeScrollTop = r.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
|
|
1240
1243
|
}
|
|
1241
1244
|
calculateOffset(t, s) {
|
|
1242
1245
|
return t ? this.calculateTopPosition(t) + (t.offsetHeight - s - window.innerHeight) : 0;
|
|
@@ -1248,27 +1251,27 @@ class ie extends et {
|
|
|
1248
1251
|
const t = this.filterProps(this.props), {
|
|
1249
1252
|
children: s,
|
|
1250
1253
|
element: r,
|
|
1251
|
-
hasMore:
|
|
1254
|
+
hasMore: o,
|
|
1252
1255
|
initialLoad: l,
|
|
1253
1256
|
isReverse: a,
|
|
1254
1257
|
loader: c,
|
|
1255
1258
|
loadMore: d,
|
|
1256
1259
|
pageStart: u,
|
|
1257
|
-
ref:
|
|
1258
|
-
threshold:
|
|
1259
|
-
useCapture:
|
|
1260
|
-
useWindow:
|
|
1261
|
-
getScrollParent:
|
|
1262
|
-
...
|
|
1260
|
+
ref: h,
|
|
1261
|
+
threshold: v,
|
|
1262
|
+
useCapture: m,
|
|
1263
|
+
useWindow: f,
|
|
1264
|
+
getScrollParent: b,
|
|
1265
|
+
...C
|
|
1263
1266
|
} = t;
|
|
1264
|
-
|
|
1265
|
-
this.scrollComponent =
|
|
1267
|
+
C.ref = (A) => {
|
|
1268
|
+
this.scrollComponent = A, h && h(A);
|
|
1266
1269
|
};
|
|
1267
|
-
const
|
|
1268
|
-
return
|
|
1270
|
+
const y = [s];
|
|
1271
|
+
return o && (c ? a ? y.unshift(c) : y.push(c) : this.defaultLoader && (a ? y.unshift(this.defaultLoader) : y.push(this.defaultLoader))), W.createElement(r, C, y);
|
|
1269
1272
|
}
|
|
1270
1273
|
}
|
|
1271
|
-
te(
|
|
1274
|
+
te(re, "propTypes", {
|
|
1272
1275
|
children: L.node.isRequired,
|
|
1273
1276
|
element: L.node,
|
|
1274
1277
|
hasMore: L.bool,
|
|
@@ -1282,7 +1285,7 @@ te(ie, "propTypes", {
|
|
|
1282
1285
|
threshold: L.number,
|
|
1283
1286
|
useCapture: L.bool,
|
|
1284
1287
|
useWindow: L.bool
|
|
1285
|
-
}), te(
|
|
1288
|
+
}), te(re, "defaultProps", {
|
|
1286
1289
|
element: "div",
|
|
1287
1290
|
hasMore: !1,
|
|
1288
1291
|
initialLoad: !0,
|
|
@@ -1295,52 +1298,52 @@ te(ie, "propTypes", {
|
|
|
1295
1298
|
loader: null,
|
|
1296
1299
|
getScrollParent: null
|
|
1297
1300
|
});
|
|
1298
|
-
const
|
|
1301
|
+
const On = ({
|
|
1299
1302
|
rank: e,
|
|
1300
1303
|
avatar: t,
|
|
1301
1304
|
name: s,
|
|
1302
1305
|
points: r,
|
|
1303
|
-
isCurrentUser:
|
|
1306
|
+
isCurrentUser: o,
|
|
1304
1307
|
openItemDetail: l,
|
|
1305
1308
|
style: a
|
|
1306
|
-
}) => /* @__PURE__ */ p(
|
|
1307
|
-
/* @__PURE__ */ n(
|
|
1308
|
-
/* @__PURE__ */ p(
|
|
1309
|
-
t ? /* @__PURE__ */ n(
|
|
1310
|
-
/* @__PURE__ */ p(
|
|
1311
|
-
/* @__PURE__ */ n(
|
|
1312
|
-
|
|
1309
|
+
}) => /* @__PURE__ */ p($n, { onClick: l, style: a, children: [
|
|
1310
|
+
/* @__PURE__ */ n(bn, { children: e || 0 }),
|
|
1311
|
+
/* @__PURE__ */ p(Rn, { children: [
|
|
1312
|
+
t ? /* @__PURE__ */ n(wn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(Tn, { children: we(s || "") }),
|
|
1313
|
+
/* @__PURE__ */ p(Sn, { children: [
|
|
1314
|
+
/* @__PURE__ */ n(kn, { children: s || "" }),
|
|
1315
|
+
o && /* @__PURE__ */ n(En, { name: "icon-star" })
|
|
1313
1316
|
] })
|
|
1314
1317
|
] }),
|
|
1315
1318
|
/* @__PURE__ */ n("div", { children: Te(r) })
|
|
1316
|
-
] }),
|
|
1319
|
+
] }), Mn = /* @__PURE__ */ i("div")({
|
|
1317
1320
|
name: "Container",
|
|
1318
1321
|
class: "c16btbfp",
|
|
1319
1322
|
propsAsIs: !1
|
|
1320
|
-
}),
|
|
1323
|
+
}), Vn = ({
|
|
1321
1324
|
items: e,
|
|
1322
1325
|
currentUserId: t,
|
|
1323
1326
|
openItemDetail: s,
|
|
1324
1327
|
fetchMore: r,
|
|
1325
|
-
scrollNode:
|
|
1328
|
+
scrollNode: o,
|
|
1326
1329
|
hasMore: l
|
|
1327
|
-
}) => /* @__PURE__ */ n(
|
|
1330
|
+
}) => /* @__PURE__ */ n(re, {
|
|
1328
1331
|
loadMore: r,
|
|
1329
1332
|
initialLoad: !1,
|
|
1330
1333
|
hasMore: l,
|
|
1331
1334
|
useWindow: !1,
|
|
1332
|
-
getScrollParent: () =>
|
|
1333
|
-
children: /* @__PURE__ */ n(
|
|
1334
|
-
children: e.map((a) => /* @__PURE__ */ n(
|
|
1335
|
+
getScrollParent: () => o.current,
|
|
1336
|
+
children: /* @__PURE__ */ n(Mn, {
|
|
1337
|
+
children: e.map((a) => /* @__PURE__ */ n(On, {
|
|
1335
1338
|
...a,
|
|
1336
1339
|
openItemDetail: () => s(a.userId),
|
|
1337
1340
|
isCurrentUser: !!t && t === a.userId
|
|
1338
1341
|
}, a.userId))
|
|
1339
1342
|
})
|
|
1340
|
-
}),
|
|
1341
|
-
|
|
1343
|
+
}), _n = ({ renderClipBoardNode: e, deepLink: t }) => /* @__PURE__ */ n(
|
|
1344
|
+
Be,
|
|
1342
1345
|
{
|
|
1343
|
-
|
|
1346
|
+
renderToNode: e,
|
|
1344
1347
|
inviteLink: t,
|
|
1345
1348
|
socialLinks: [
|
|
1346
1349
|
{
|
|
@@ -1357,289 +1360,335 @@ const Nn = ({
|
|
|
1357
1360
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
1358
1361
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1359
1362
|
}
|
|
1360
|
-
),
|
|
1363
|
+
), Qn = /* @__PURE__ */ i("div")({
|
|
1361
1364
|
name: "InviteLinkContainer",
|
|
1362
1365
|
class: "i1chxfpe",
|
|
1363
1366
|
propsAsIs: !1
|
|
1364
|
-
}),
|
|
1367
|
+
}), Un = ({
|
|
1365
1368
|
gamification: e,
|
|
1366
1369
|
scrollNode: t,
|
|
1367
1370
|
scrollStore: s,
|
|
1368
|
-
|
|
1371
|
+
renderClipBoardNode: r
|
|
1369
1372
|
}) => {
|
|
1370
1373
|
const {
|
|
1371
|
-
data:
|
|
1372
|
-
hasMore: l
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
} =
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1374
|
+
data: o,
|
|
1375
|
+
hasMore: l,
|
|
1376
|
+
loading: a,
|
|
1377
|
+
key: c
|
|
1378
|
+
} = O(e.leaderboardList.$store), {
|
|
1379
|
+
data: d
|
|
1380
|
+
} = O(e.deepLink.$store), [u, h] = ze(r);
|
|
1381
|
+
return !o.length && !a ? /* @__PURE__ */ n(_n, {
|
|
1382
|
+
renderClipBoardNode: r,
|
|
1383
|
+
deepLink: d
|
|
1384
|
+
}) : /* @__PURE__ */ p(q, {
|
|
1385
|
+
children: [/* @__PURE__ */ n(Vn, {
|
|
1386
|
+
items: o,
|
|
1379
1387
|
scrollNode: t,
|
|
1380
1388
|
scrollStore: s,
|
|
1381
1389
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1382
1390
|
hasMore: l,
|
|
1383
1391
|
openItemDetail: e.openUser,
|
|
1384
1392
|
currentUserId: e.currentUserId.get()
|
|
1385
|
-
}),
|
|
1386
|
-
children: /* @__PURE__ */ n(
|
|
1387
|
-
onClick: () =>
|
|
1393
|
+
}, c), d && /* @__PURE__ */ n(Qn, {
|
|
1394
|
+
children: /* @__PURE__ */ n(fn, {
|
|
1395
|
+
onClick: () => u(d),
|
|
1388
1396
|
title: "Invite Friends",
|
|
1389
1397
|
description: "Challenge them now!"
|
|
1390
1398
|
})
|
|
1391
|
-
}),
|
|
1392
|
-
}) : /* @__PURE__ */ n(Mn, {
|
|
1393
|
-
appNode: r,
|
|
1394
|
-
deepLink: a
|
|
1399
|
+
}), h]
|
|
1395
1400
|
});
|
|
1396
|
-
},
|
|
1401
|
+
}, jn = /* @__PURE__ */ i("div")({
|
|
1397
1402
|
name: "QuestionItem",
|
|
1398
1403
|
class: "q1w97g3p",
|
|
1399
1404
|
propsAsIs: !1
|
|
1400
|
-
}),
|
|
1405
|
+
}), Wn = /* @__PURE__ */ i("div")({
|
|
1401
1406
|
name: "QuestionCaption",
|
|
1402
1407
|
class: "q2sl39u",
|
|
1403
1408
|
propsAsIs: !1
|
|
1404
|
-
}),
|
|
1409
|
+
}), Bn = /* @__PURE__ */ i("div")({
|
|
1405
1410
|
name: "QuestionBody",
|
|
1406
1411
|
class: "qd5h0uc",
|
|
1407
1412
|
propsAsIs: !1
|
|
1408
|
-
}),
|
|
1413
|
+
}), zn = /* @__PURE__ */ i("div")({
|
|
1409
1414
|
name: "QuestionAction",
|
|
1410
1415
|
class: "q105uluy",
|
|
1411
1416
|
propsAsIs: !1
|
|
1412
|
-
}),
|
|
1417
|
+
}), Fn = () => R, X = /* @__PURE__ */ i(Fn())({
|
|
1413
1418
|
name: "QuestionActionIcon",
|
|
1414
1419
|
class: "q1fa0b9h",
|
|
1415
1420
|
propsAsIs: !0
|
|
1416
|
-
}),
|
|
1421
|
+
}), Hn = () => R, Yn = /* @__PURE__ */ i(Hn())({
|
|
1417
1422
|
name: "QuestionTypeIcon",
|
|
1418
1423
|
class: "qxlt78s",
|
|
1419
1424
|
propsAsIs: !0
|
|
1420
|
-
}),
|
|
1425
|
+
}), Zn = /* @__PURE__ */ i("div")({
|
|
1421
1426
|
name: "QuestionTypeLabel",
|
|
1422
1427
|
class: "qmg0vkx",
|
|
1423
1428
|
propsAsIs: !1
|
|
1424
|
-
}),
|
|
1429
|
+
}), Gn = /* @__PURE__ */ i("div")({
|
|
1425
1430
|
name: "QuestionContent",
|
|
1426
1431
|
class: "q1uz5j1g",
|
|
1427
1432
|
propsAsIs: !1
|
|
1428
|
-
}),
|
|
1433
|
+
}), Kn = /* @__PURE__ */ i("button")({
|
|
1429
1434
|
name: "PlayButton",
|
|
1430
1435
|
class: "p1pba9p1",
|
|
1431
1436
|
propsAsIs: !1
|
|
1432
|
-
}),
|
|
1433
|
-
[
|
|
1434
|
-
[
|
|
1435
|
-
[
|
|
1436
|
-
[
|
|
1437
|
-
},
|
|
1437
|
+
}), Jn = {
|
|
1438
|
+
[G.LOST]: /* @__PURE__ */ n(X, { name: "incorrectVoted" }),
|
|
1439
|
+
[G.WON]: /* @__PURE__ */ n(X, { name: "icon-check" }),
|
|
1440
|
+
[G.UNSET]: /* @__PURE__ */ n(X, { name: "icon-arrow" }),
|
|
1441
|
+
[G.DNP]: /* @__PURE__ */ n(X, { name: "icon-arrow" })
|
|
1442
|
+
}, Xn = ({
|
|
1438
1443
|
questionId: e,
|
|
1439
1444
|
questionType: t,
|
|
1440
1445
|
questionStatus: s,
|
|
1441
1446
|
subject: r,
|
|
1442
|
-
openForVoting:
|
|
1447
|
+
openForVoting: o,
|
|
1443
1448
|
openQuestion: l,
|
|
1444
1449
|
status: a
|
|
1445
1450
|
}) => {
|
|
1446
|
-
const c = Ae[t], d =
|
|
1447
|
-
return c ? /* @__PURE__ */ p(
|
|
1448
|
-
/* @__PURE__ */ p(
|
|
1449
|
-
/* @__PURE__ */ p(
|
|
1451
|
+
const c = Ae[t], d = Jn[a];
|
|
1452
|
+
return c ? /* @__PURE__ */ p(jn, { onClick: () => l == null ? void 0 : l(e), children: [
|
|
1453
|
+
/* @__PURE__ */ p(Gn, { children: [
|
|
1454
|
+
/* @__PURE__ */ p(Wn, { children: [
|
|
1450
1455
|
/* @__PURE__ */ n(
|
|
1451
|
-
|
|
1456
|
+
Yn,
|
|
1452
1457
|
{
|
|
1453
|
-
"data-type-trivia": t ===
|
|
1454
|
-
"data-type-poll": t ===
|
|
1458
|
+
"data-type-trivia": t === I.TRIVIA,
|
|
1459
|
+
"data-type-poll": t === I.POLL,
|
|
1455
1460
|
name: c.iconName
|
|
1456
1461
|
}
|
|
1457
1462
|
),
|
|
1458
|
-
/* @__PURE__ */ p(
|
|
1463
|
+
/* @__PURE__ */ p(Zn, { children: [
|
|
1459
1464
|
c.label,
|
|
1460
|
-
t ===
|
|
1465
|
+
t === I.TRIVIA && s === V.RESOLVED && " • Expired"
|
|
1461
1466
|
] })
|
|
1462
1467
|
] }),
|
|
1463
|
-
/* @__PURE__ */ n(
|
|
1468
|
+
/* @__PURE__ */ n(Bn, { children: r || "" })
|
|
1464
1469
|
] }),
|
|
1465
|
-
/* @__PURE__ */ n(
|
|
1470
|
+
/* @__PURE__ */ n(zn, { children: o ? /* @__PURE__ */ n(Kn, { children: "Play" }) : d })
|
|
1466
1471
|
] }) : null;
|
|
1467
|
-
},
|
|
1472
|
+
}, er = /* @__PURE__ */ i("div")({
|
|
1468
1473
|
name: "Container",
|
|
1469
1474
|
class: "cll3md7",
|
|
1470
1475
|
propsAsIs: !1
|
|
1471
|
-
}),
|
|
1476
|
+
}), tr = /* @__PURE__ */ i("button")({
|
|
1472
1477
|
name: "ActionBtn",
|
|
1473
1478
|
class: "a10g1iik",
|
|
1474
1479
|
propsAsIs: !1
|
|
1475
|
-
}),
|
|
1480
|
+
}), sr = ({
|
|
1476
1481
|
openInsight: e,
|
|
1477
1482
|
questionId: t,
|
|
1478
1483
|
...s
|
|
1479
|
-
}) => /* @__PURE__ */ p(
|
|
1484
|
+
}) => /* @__PURE__ */ p(er, { children: [
|
|
1480
1485
|
/* @__PURE__ */ n(Ee, { questionId: t, ...s, isPickHistory: !0 }),
|
|
1481
|
-
e && /* @__PURE__ */ n(
|
|
1482
|
-
] }),
|
|
1486
|
+
e && /* @__PURE__ */ n(tr, { onClick: () => e(t), children: "View Insight" })
|
|
1487
|
+
] }), nr = /* @__PURE__ */ i("div")({
|
|
1483
1488
|
name: "Container",
|
|
1484
1489
|
class: "cl56x6b",
|
|
1485
1490
|
propsAsIs: !1
|
|
1486
|
-
}),
|
|
1491
|
+
}), rr = () => Fe, or = /* @__PURE__ */ i(rr())({
|
|
1487
1492
|
name: "ActionButton",
|
|
1488
1493
|
class: "a11pzf92",
|
|
1489
1494
|
propsAsIs: !0
|
|
1490
|
-
}),
|
|
1495
|
+
}), ir = /* @__PURE__ */ i("div")({
|
|
1491
1496
|
name: "DateTime",
|
|
1492
1497
|
class: "d1hbaleq",
|
|
1493
1498
|
propsAsIs: !1
|
|
1494
|
-
}),
|
|
1499
|
+
}), ar = /* @__PURE__ */ i("blockquote")({
|
|
1495
1500
|
name: "Quote",
|
|
1496
1501
|
class: "qvvgqjm",
|
|
1497
1502
|
propsAsIs: !1
|
|
1498
|
-
}),
|
|
1503
|
+
}), lr = ({
|
|
1499
1504
|
openTweet: e,
|
|
1500
1505
|
created: t,
|
|
1501
1506
|
...s
|
|
1502
1507
|
}) => {
|
|
1503
|
-
const r =
|
|
1508
|
+
const r = P(() => {
|
|
1504
1509
|
if (t) {
|
|
1505
|
-
const
|
|
1506
|
-
if (ae(
|
|
1510
|
+
const o = new Date(t);
|
|
1511
|
+
if (ae(o))
|
|
1507
1512
|
return {
|
|
1508
|
-
date:
|
|
1509
|
-
time:
|
|
1513
|
+
date: oe(o),
|
|
1514
|
+
time: ie(o)
|
|
1510
1515
|
};
|
|
1511
1516
|
}
|
|
1512
1517
|
return null;
|
|
1513
1518
|
}, [t]);
|
|
1514
|
-
return /* @__PURE__ */ p(
|
|
1515
|
-
r && /* @__PURE__ */ p(
|
|
1519
|
+
return /* @__PURE__ */ p(nr, { children: [
|
|
1520
|
+
r && /* @__PURE__ */ p(ir, { children: [
|
|
1516
1521
|
r.date,
|
|
1517
1522
|
" · ",
|
|
1518
1523
|
r.time
|
|
1519
1524
|
] }),
|
|
1520
|
-
s.title && /* @__PURE__ */ n(
|
|
1521
|
-
/* @__PURE__ */ n(
|
|
1522
|
-
e && /* @__PURE__ */ n(
|
|
1525
|
+
s.title && /* @__PURE__ */ n(ar, { children: s.title }),
|
|
1526
|
+
/* @__PURE__ */ n(ye, { ...s }),
|
|
1527
|
+
e && /* @__PURE__ */ n(or, { onClick: () => e(s.tweetId), children: "View Insight" })
|
|
1523
1528
|
] });
|
|
1524
|
-
},
|
|
1529
|
+
}, cr = /* @__PURE__ */ i("div")({
|
|
1525
1530
|
name: "QuestionsContainer",
|
|
1526
1531
|
class: "qvghv3l",
|
|
1527
1532
|
propsAsIs: !1
|
|
1528
|
-
}),
|
|
1529
|
-
var r,
|
|
1533
|
+
}), dr = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(cr, { children: e == null ? void 0 : e.map((s) => {
|
|
1534
|
+
var r, o, l;
|
|
1530
1535
|
if (s.type === "question" && ((r = s.attributes) == null ? void 0 : r.attributes.case) === "question") {
|
|
1531
1536
|
const a = s.attributes.attributes.value;
|
|
1532
|
-
return /* @__PURE__ */ n(
|
|
1537
|
+
return /* @__PURE__ */ n(Xn, { openQuestion: t, ...a }, a.questionId);
|
|
1533
1538
|
}
|
|
1534
|
-
if (s.type === "insight" && ((
|
|
1539
|
+
if (s.type === "insight" && ((o = s.attributes) == null ? void 0 : o.attributes.case) === "insight") {
|
|
1535
1540
|
const a = s.attributes.attributes.value, c = s.attributes.created;
|
|
1536
|
-
return /* @__PURE__ */ n(
|
|
1541
|
+
return /* @__PURE__ */ n(sr, { openInsight: t, ...a, created: c }, a.questionId);
|
|
1537
1542
|
}
|
|
1538
1543
|
if (s.type === "tweet" && ((l = s.attributes) == null ? void 0 : l.attributes.case) === "tweet") {
|
|
1539
1544
|
const a = s.attributes.attributes.value, c = s.attributes.id, d = s.attributes.created;
|
|
1540
|
-
return /* @__PURE__ */ n(
|
|
1545
|
+
return /* @__PURE__ */ n(lr, { openTweet: t, ...a, tweetId: c, created: d }, c);
|
|
1541
1546
|
}
|
|
1542
1547
|
return null;
|
|
1543
|
-
}) }),
|
|
1544
|
-
const s =
|
|
1545
|
-
return s != null && s.data ? /* @__PURE__ */ n(
|
|
1546
|
-
},
|
|
1548
|
+
}) }), pr = ({ store: e, openQuestion: t }) => {
|
|
1549
|
+
const s = O(e);
|
|
1550
|
+
return s != null && s.data ? /* @__PURE__ */ n(dr, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
|
|
1551
|
+
}, ur = ({ userSummary: e }) => {
|
|
1547
1552
|
var t;
|
|
1548
1553
|
const [s, r] = N(void 0);
|
|
1549
|
-
return
|
|
1550
|
-
const
|
|
1554
|
+
return Y(() => {
|
|
1555
|
+
const o = e.subscribe((l) => {
|
|
1551
1556
|
l != null && l.data && r(l.data);
|
|
1552
1557
|
});
|
|
1553
1558
|
return () => {
|
|
1554
|
-
|
|
1559
|
+
o();
|
|
1555
1560
|
};
|
|
1556
1561
|
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(Re, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
|
|
1557
|
-
},
|
|
1558
|
-
const [
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
+
}, hr = ({ gamification: e, className: t, scrollStore: s, scrollNode: r, appNode: o, style: l, responsiveStore: a, headerNode: c }) => {
|
|
1563
|
+
const [d, u] = N(!1), [h, v] = N(ee.HOME), [, m] = tt(), { sdkInScrollView: f } = O(a, { keys: ["sdkInScrollView"] }), b = (g) => {
|
|
1564
|
+
m(() => {
|
|
1565
|
+
var $;
|
|
1566
|
+
v(g), f === !1 && (($ = o.current) == null || $.scrollIntoView({ behavior: "instant" }));
|
|
1567
|
+
});
|
|
1568
|
+
}, C = (g) => {
|
|
1569
|
+
m(() => u(g));
|
|
1562
1570
|
};
|
|
1563
|
-
|
|
1564
|
-
if (
|
|
1565
|
-
|
|
1571
|
+
Y(() => s.listen((g) => {
|
|
1572
|
+
if (g.scrollPosition === 0) {
|
|
1573
|
+
C(!1), s.setKey("tabsShown", !1);
|
|
1566
1574
|
return;
|
|
1567
1575
|
}
|
|
1568
|
-
|
|
1569
|
-
}), [s])
|
|
1576
|
+
C(g.scrollDirection === "forward"), s.setKey("tabsShown", g.scrollDirection !== "forward");
|
|
1577
|
+
}), [s]);
|
|
1578
|
+
let y = "0px";
|
|
1579
|
+
f ? y = d ? "-60px" : "0px" : y = d ? "0px" : "68px";
|
|
1580
|
+
const A = f ? o : c;
|
|
1581
|
+
return /* @__PURE__ */ p(He, { className: t, style: l, children: [
|
|
1570
1582
|
/* @__PURE__ */ n(
|
|
1571
1583
|
Ye,
|
|
1572
1584
|
{
|
|
1573
1585
|
style: {
|
|
1574
|
-
top:
|
|
1586
|
+
top: y
|
|
1575
1587
|
},
|
|
1576
|
-
children: /* @__PURE__ */ n(
|
|
1588
|
+
children: /* @__PURE__ */ n(an, { activePage: h, toggleActivePage: b })
|
|
1577
1589
|
}
|
|
1578
1590
|
),
|
|
1579
|
-
|
|
1580
|
-
/* @__PURE__ */ n(
|
|
1581
|
-
/* @__PURE__ */ n(Ze, { style: { flex: 1 }, children: /* @__PURE__ */ n(
|
|
1591
|
+
h === ee.HOME && /* @__PURE__ */ p(q, { children: [
|
|
1592
|
+
/* @__PURE__ */ n($e, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(ur, { userSummary: e.userSummary }) }),
|
|
1593
|
+
/* @__PURE__ */ n(Ze, { style: { flex: 1 }, children: /* @__PURE__ */ n(pr, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1582
1594
|
] }),
|
|
1583
|
-
|
|
1584
|
-
|
|
1595
|
+
h === ee.LEADERBOARD && /* @__PURE__ */ n(Ge, { children: /* @__PURE__ */ n(
|
|
1596
|
+
Un,
|
|
1585
1597
|
{
|
|
1586
|
-
|
|
1598
|
+
renderClipBoardNode: A,
|
|
1587
1599
|
scrollStore: s,
|
|
1588
1600
|
scrollNode: r,
|
|
1589
1601
|
gamification: e
|
|
1590
1602
|
}
|
|
1591
1603
|
) })
|
|
1592
1604
|
] });
|
|
1593
|
-
},
|
|
1605
|
+
}, mr = () => Ke, ge = /* @__PURE__ */ i(mr())({
|
|
1594
1606
|
name: "OpenedContainer",
|
|
1595
1607
|
class: "oar61gl",
|
|
1596
1608
|
propsAsIs: !0
|
|
1597
|
-
}),
|
|
1609
|
+
}), vr = /* @__PURE__ */ i("div")({
|
|
1598
1610
|
name: "UserContainer",
|
|
1599
1611
|
class: "u14zaal4",
|
|
1600
1612
|
propsAsIs: !1
|
|
1601
|
-
}),
|
|
1613
|
+
}), fr = ({
|
|
1602
1614
|
correct: e,
|
|
1603
1615
|
incorrect: t
|
|
1604
1616
|
}) => {
|
|
1605
1617
|
const s = e + t;
|
|
1606
1618
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
1607
|
-
},
|
|
1619
|
+
}, Ir = `
|
|
1620
|
+
body {
|
|
1621
|
+
overflow: hidden
|
|
1622
|
+
}
|
|
1623
|
+
`, $r = ({
|
|
1608
1624
|
gamification: e,
|
|
1609
1625
|
scrollStore: t,
|
|
1610
1626
|
className: s,
|
|
1611
1627
|
appNode: r,
|
|
1612
|
-
scrollNode:
|
|
1628
|
+
scrollNode: o,
|
|
1629
|
+
headerNode: l,
|
|
1630
|
+
responsiveStore: a
|
|
1613
1631
|
}) => {
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
})
|
|
1632
|
-
}
|
|
1633
|
-
})
|
|
1634
|
-
|
|
1632
|
+
const c = O(e.openedQuestion.$store), d = O(e.openedUser), {
|
|
1633
|
+
sdkInScrollView: u
|
|
1634
|
+
} = O(a, {
|
|
1635
|
+
keys: ["sdkInScrollView"]
|
|
1636
|
+
}), h = M(0), [v, m] = P(() => {
|
|
1637
|
+
var f;
|
|
1638
|
+
const b = u ? r : l, C = (((f = r.current) == null ? void 0 : f.getBoundingClientRect().y) || 0) < 0;
|
|
1639
|
+
if ((c || d) && b.current) {
|
|
1640
|
+
C && (h.current = window.scrollY);
|
|
1641
|
+
const y = () => (Y(() => {
|
|
1642
|
+
const A = setTimeout(() => {
|
|
1643
|
+
var g;
|
|
1644
|
+
(g = r.current) == null || g.scrollIntoView();
|
|
1645
|
+
}, 1e3);
|
|
1646
|
+
return () => {
|
|
1647
|
+
clearTimeout(A), h.current !== 0 && (window.scroll({
|
|
1648
|
+
top: h.current
|
|
1649
|
+
}), h.current = 0);
|
|
1650
|
+
};
|
|
1651
|
+
}, []), /* @__PURE__ */ n("style", {
|
|
1652
|
+
children: Ir
|
|
1653
|
+
}));
|
|
1654
|
+
return [C, c ? de.createPortal(/* @__PURE__ */ p(ge, {
|
|
1655
|
+
className: s,
|
|
1656
|
+
children: [/* @__PURE__ */ n(tn, {
|
|
1657
|
+
gamification: e
|
|
1658
|
+
}), C && !u && /* @__PURE__ */ n(y, {})]
|
|
1659
|
+
}), b.current) : d ? de.createPortal(/* @__PURE__ */ n(ge, {
|
|
1660
|
+
className: s,
|
|
1661
|
+
children: /* @__PURE__ */ p(vr, {
|
|
1662
|
+
children: [/* @__PURE__ */ n(be, {
|
|
1663
|
+
label: "Friend's Rank",
|
|
1664
|
+
close: e.closeUser
|
|
1665
|
+
}), /* @__PURE__ */ n($e, {
|
|
1666
|
+
children: /* @__PURE__ */ n(Re, {
|
|
1667
|
+
...d,
|
|
1668
|
+
successRate: fr(d)
|
|
1669
|
+
})
|
|
1670
|
+
})]
|
|
1671
|
+
})
|
|
1672
|
+
}), b.current) : null];
|
|
1673
|
+
}
|
|
1674
|
+
return [C, null];
|
|
1675
|
+
}, [r, s, e, l, c, d, u]);
|
|
1676
|
+
return /* @__PURE__ */ p(q, {
|
|
1677
|
+
children: [m, /* @__PURE__ */ n(hr, {
|
|
1635
1678
|
appNode: r,
|
|
1679
|
+
headerNode: l,
|
|
1636
1680
|
scrollStore: t,
|
|
1637
|
-
scrollNode:
|
|
1681
|
+
scrollNode: o,
|
|
1638
1682
|
className: s,
|
|
1639
|
-
gamification: e
|
|
1683
|
+
gamification: e,
|
|
1684
|
+
responsiveStore: a,
|
|
1685
|
+
style: !u && !v && m !== null ? {
|
|
1686
|
+
height: "0",
|
|
1687
|
+
overflow: "hidden"
|
|
1688
|
+
} : {}
|
|
1640
1689
|
})]
|
|
1641
1690
|
});
|
|
1642
1691
|
};
|
|
1643
1692
|
export {
|
|
1644
|
-
|
|
1693
|
+
$r as default
|
|
1645
1694
|
};
|