@streamlayer/react 0.30.1 → 0.30.3
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/useStreamLayerApp.d.ts +5 -0
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +15 -15
- package/lib/dist/es/gamification-feature.js +203 -169
- package/lib/dist/es/masters.js +2781 -2778
- package/lib/dist/index.d.ts +7 -2
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +327 -293
- package/lib/es/masters2.js +14 -14
- package/lib/style.css +1 -1
- package/package.json +8 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as u, jsx as s, Fragment as E } from "react/jsx-runtime";
|
|
2
|
-
import { s as
|
|
2
|
+
import { s as o, i as j } from "./index3.js";
|
|
3
3
|
import { useStore as w } from "@nanostores/react";
|
|
4
|
-
import { o as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { QuestionType as x, QuestionStatus as
|
|
4
|
+
import { o as Ne, r as te, w as $e, A as Re, O as Qe, c as Ue, a as K, n as _e, d as qe } from "./masters2.js";
|
|
5
|
+
import { useState as R, useCallback as V, useMemo as P, createElement as B, PureComponent as Ae } from "react";
|
|
6
|
+
import { QuestionType as x, QuestionStatus as Q, QuestionImages as b, PickHistoryStatus as q } from "@streamlayer/sdk-web-types";
|
|
7
7
|
import { o as ye, i as Te, r as Ye, a as Pe, n as We } from "./common.js";
|
|
8
8
|
import { CountdownCircleTimer as Ve } from "react-countdown-circle-timer";
|
|
9
9
|
import { E as L } from "./index2.js";
|
|
@@ -12,32 +12,32 @@ import "@streamlayer/sdk-web-notifications";
|
|
|
12
12
|
import "@lottiefiles/react-lottie-player";
|
|
13
13
|
import "./useStreamLayerApp.js";
|
|
14
14
|
import "@streamlayer/sdk-web";
|
|
15
|
-
const Fe = /* @__PURE__ */
|
|
15
|
+
const Fe = /* @__PURE__ */ o("div")({
|
|
16
16
|
name: "Container",
|
|
17
17
|
class: "c1vwopgc",
|
|
18
18
|
propsAsIs: !1
|
|
19
|
-
}), Be = /* @__PURE__ */
|
|
19
|
+
}), Be = /* @__PURE__ */ o("div")({
|
|
20
20
|
name: "QuestionTypeWrap",
|
|
21
21
|
class: "qyktpt0",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}), He = () => j, Ze = /* @__PURE__ */
|
|
23
|
+
}), He = () => j, Ze = /* @__PURE__ */ o(He())({
|
|
24
24
|
name: "QuestionTypeIcon",
|
|
25
25
|
class: "q951jdx",
|
|
26
26
|
propsAsIs: !0
|
|
27
|
-
}), Ge = /* @__PURE__ */
|
|
27
|
+
}), Ge = /* @__PURE__ */ o("span")({
|
|
28
28
|
name: "QuestionTypeTitle",
|
|
29
29
|
class: "qss5f0e",
|
|
30
30
|
propsAsIs: !1
|
|
31
|
-
}), Je = /* @__PURE__ */
|
|
31
|
+
}), Je = /* @__PURE__ */ o("button")({
|
|
32
32
|
name: "CloseButton",
|
|
33
33
|
class: "c1ao1jtv",
|
|
34
34
|
propsAsIs: !1
|
|
35
|
-
}), Ke = () => j, Xe = /* @__PURE__ */
|
|
35
|
+
}), Ke = () => j, Xe = /* @__PURE__ */ o(Ke())({
|
|
36
36
|
name: "CloseIcon",
|
|
37
37
|
class: "cvsl7l3",
|
|
38
38
|
propsAsIs: !0
|
|
39
39
|
}), De = ({ type: e, close: t, label: n }) => {
|
|
40
|
-
const i = e ?
|
|
40
|
+
const i = e ? Ne[e] : { label: n, iconName: void 0 };
|
|
41
41
|
return /* @__PURE__ */ u(Fe, { children: [
|
|
42
42
|
/* @__PURE__ */ u(Be, { children: [
|
|
43
43
|
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(Ze, { name: i.iconName }),
|
|
@@ -45,101 +45,101 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
45
45
|
] }),
|
|
46
46
|
/* @__PURE__ */ s(Je, { onClick: t, children: /* @__PURE__ */ s(Xe, { name: "icon-cross" }) })
|
|
47
47
|
] });
|
|
48
|
-
}, et = /* @__PURE__ */
|
|
48
|
+
}, et = /* @__PURE__ */ o("div")({
|
|
49
49
|
name: "Container",
|
|
50
50
|
class: "c1zy8a",
|
|
51
51
|
propsAsIs: !1
|
|
52
|
-
}), tt = /* @__PURE__ */
|
|
52
|
+
}), tt = /* @__PURE__ */ o("div")({
|
|
53
53
|
name: "Title",
|
|
54
54
|
class: "t1vih9p5",
|
|
55
55
|
propsAsIs: !1
|
|
56
|
-
}), nt = /* @__PURE__ */
|
|
56
|
+
}), nt = /* @__PURE__ */ o("div")({
|
|
57
57
|
name: "Indicator",
|
|
58
58
|
class: "i1fbnvpb",
|
|
59
59
|
propsAsIs: !1
|
|
60
|
-
}),
|
|
60
|
+
}), oe = ({ indicator: e, title: t }) => /* @__PURE__ */ u(et, { children: [
|
|
61
61
|
/* @__PURE__ */ s(tt, { children: t }),
|
|
62
62
|
/* @__PURE__ */ s(nt, { children: e })
|
|
63
|
-
] }), st = /* @__PURE__ */
|
|
63
|
+
] }), st = /* @__PURE__ */ o("div")({
|
|
64
64
|
name: "Container",
|
|
65
65
|
class: "ctmhwyc",
|
|
66
66
|
propsAsIs: !1
|
|
67
|
-
}), it = /* @__PURE__ */
|
|
67
|
+
}), it = /* @__PURE__ */ o("div")({
|
|
68
68
|
name: "Indicator",
|
|
69
69
|
class: "i1jri200",
|
|
70
70
|
propsAsIs: !1
|
|
71
|
-
}), rt = /* @__PURE__ */
|
|
71
|
+
}), rt = /* @__PURE__ */ o("div")({
|
|
72
72
|
name: "Title",
|
|
73
73
|
class: "t8s05oq",
|
|
74
74
|
propsAsIs: !1
|
|
75
|
-
}),
|
|
75
|
+
}), Y = ({ indicator: e, title: t }) => /* @__PURE__ */ u(st, { children: [
|
|
76
76
|
/* @__PURE__ */ s(it, { children: e }),
|
|
77
77
|
/* @__PURE__ */ s(rt, { children: t })
|
|
78
|
-
] }), ot = /* @__PURE__ */
|
|
78
|
+
] }), ot = /* @__PURE__ */ o("div")({
|
|
79
79
|
name: "Container",
|
|
80
80
|
class: "c1yrpn9o",
|
|
81
81
|
propsAsIs: !1
|
|
82
|
-
}), at = /* @__PURE__ */
|
|
82
|
+
}), at = /* @__PURE__ */ o("div")({
|
|
83
83
|
name: "TopInfo",
|
|
84
84
|
class: "t17fwahh",
|
|
85
85
|
propsAsIs: !1
|
|
86
|
-
}), lt = /* @__PURE__ */
|
|
86
|
+
}), lt = /* @__PURE__ */ o("div")({
|
|
87
87
|
name: "BottomInfo",
|
|
88
88
|
class: "by6w7e9",
|
|
89
89
|
propsAsIs: !1
|
|
90
|
-
}), ct = /* @__PURE__ */
|
|
90
|
+
}), ct = /* @__PURE__ */ o("div")({
|
|
91
91
|
name: "User",
|
|
92
92
|
class: "u1g7arbm",
|
|
93
93
|
propsAsIs: !1
|
|
94
|
-
}), dt = /* @__PURE__ */
|
|
94
|
+
}), dt = /* @__PURE__ */ o("img")({
|
|
95
95
|
name: "Avatar",
|
|
96
96
|
class: "a1ldeata",
|
|
97
97
|
propsAsIs: !1
|
|
98
|
-
}), ut = /* @__PURE__ */
|
|
98
|
+
}), ut = /* @__PURE__ */ o("div")({
|
|
99
99
|
name: "UserInfo",
|
|
100
100
|
class: "u10d4koz",
|
|
101
101
|
propsAsIs: !1
|
|
102
|
-
}), pt = /* @__PURE__ */
|
|
102
|
+
}), pt = /* @__PURE__ */ o("div")({
|
|
103
103
|
name: "UserName",
|
|
104
104
|
class: "u1q6roj0",
|
|
105
105
|
propsAsIs: !1
|
|
106
|
-
}), mt = /* @__PURE__ */
|
|
106
|
+
}), mt = /* @__PURE__ */ o("div")({
|
|
107
107
|
name: "UserRating",
|
|
108
108
|
class: "ui0m425",
|
|
109
109
|
propsAsIs: !1
|
|
110
|
-
}), It = /* @__PURE__ */
|
|
110
|
+
}), It = /* @__PURE__ */ o("img")({
|
|
111
111
|
name: "TrophyIcon",
|
|
112
112
|
class: "t1el3mrn",
|
|
113
113
|
propsAsIs: !1
|
|
114
|
-
}), ht = /* @__PURE__ */
|
|
114
|
+
}), ht = /* @__PURE__ */ o("div")({
|
|
115
115
|
name: "Rts",
|
|
116
116
|
class: "r2vgnxv",
|
|
117
117
|
propsAsIs: !1
|
|
118
|
-
}), ft = /* @__PURE__ */
|
|
118
|
+
}), ft = /* @__PURE__ */ o("div")({
|
|
119
119
|
name: "RtsIndicator",
|
|
120
120
|
class: "roqn06j",
|
|
121
121
|
propsAsIs: !1
|
|
122
|
-
}),
|
|
122
|
+
}), gt = /* @__PURE__ */ o("div")({
|
|
123
123
|
name: "RtsLabel",
|
|
124
124
|
class: "r15adx7c",
|
|
125
125
|
propsAsIs: !1
|
|
126
|
-
}),
|
|
126
|
+
}), Mt = /* @__PURE__ */ o("div")({
|
|
127
127
|
name: "Divider",
|
|
128
128
|
class: "dv59lta",
|
|
129
129
|
propsAsIs: !1
|
|
130
|
-
}), vt = /* @__PURE__ */
|
|
130
|
+
}), vt = /* @__PURE__ */ o("div")({
|
|
131
131
|
name: "Ranks",
|
|
132
132
|
class: "r55lotb",
|
|
133
133
|
propsAsIs: !1
|
|
134
|
-
}), Nt = /* @__PURE__ */
|
|
134
|
+
}), Nt = /* @__PURE__ */ o("div")({
|
|
135
135
|
name: "Statistics",
|
|
136
136
|
class: "s1knfgqt",
|
|
137
137
|
propsAsIs: !1
|
|
138
|
-
}), At = /* @__PURE__ */
|
|
138
|
+
}), At = /* @__PURE__ */ o("div")({
|
|
139
139
|
name: "AvatarPlaceholder",
|
|
140
140
|
class: "a1mqo824",
|
|
141
141
|
propsAsIs: !1
|
|
142
|
-
}), yt = /* @__PURE__ */
|
|
142
|
+
}), yt = /* @__PURE__ */ o("button")({
|
|
143
143
|
name: "UserAccountBtn",
|
|
144
144
|
class: "uxareh6",
|
|
145
145
|
propsAsIs: !1
|
|
@@ -167,10 +167,10 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
167
167
|
/* @__PURE__ */ s(It, { alt: "rank-icon", src: Tt }),
|
|
168
168
|
/* @__PURE__ */ u(ft, { children: [
|
|
169
169
|
Te(n),
|
|
170
|
-
/* @__PURE__ */ s(
|
|
170
|
+
/* @__PURE__ */ s(gt, { children: "PTS" })
|
|
171
171
|
] })
|
|
172
172
|
] }),
|
|
173
|
-
/* @__PURE__ */ s(
|
|
173
|
+
/* @__PURE__ */ s(Mt, {}),
|
|
174
174
|
/* @__PURE__ */ u("div", { children: [
|
|
175
175
|
"TOP ",
|
|
176
176
|
d || 0,
|
|
@@ -181,25 +181,25 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
181
181
|
] }) }),
|
|
182
182
|
/* @__PURE__ */ u(lt, { children: [
|
|
183
183
|
/* @__PURE__ */ u(vt, { children: [
|
|
184
|
-
/* @__PURE__ */ s(
|
|
185
|
-
/* @__PURE__ */ s(
|
|
184
|
+
/* @__PURE__ */ s(oe, { indicator: i || 0, title: "Friends rank" }),
|
|
185
|
+
/* @__PURE__ */ s(oe, { indicator: r || 0, title: "Global rank" })
|
|
186
186
|
] }),
|
|
187
187
|
/* @__PURE__ */ u(Nt, { children: [
|
|
188
|
-
/* @__PURE__ */ s(
|
|
189
|
-
/* @__PURE__ */ s(
|
|
190
|
-
/* @__PURE__ */ s(
|
|
191
|
-
/* @__PURE__ */ s(
|
|
188
|
+
/* @__PURE__ */ s(Y, { indicator: I || 0, title: "Win streak" }),
|
|
189
|
+
/* @__PURE__ */ s(Y, { indicator: m || 0, title: "Correct" }),
|
|
190
|
+
/* @__PURE__ */ s(Y, { indicator: p || 0, title: "Incorrect" }),
|
|
191
|
+
/* @__PURE__ */ s(Y, { indicator: `${f || 0}%`, title: "Succ. rate" })
|
|
192
192
|
] })
|
|
193
193
|
] })
|
|
194
|
-
] }), Dt = /* @__PURE__ */
|
|
194
|
+
] }), Dt = /* @__PURE__ */ o("div")({
|
|
195
195
|
name: "Container",
|
|
196
196
|
class: "c38csyt",
|
|
197
197
|
propsAsIs: !1
|
|
198
|
-
}), St = /* @__PURE__ */
|
|
198
|
+
}), St = /* @__PURE__ */ o("div")({
|
|
199
199
|
name: "Title",
|
|
200
200
|
class: "ty221rx",
|
|
201
201
|
propsAsIs: !1
|
|
202
|
-
}), zt = /* @__PURE__ */
|
|
202
|
+
}), zt = /* @__PURE__ */ o("div")({
|
|
203
203
|
name: "Description",
|
|
204
204
|
class: "dlaj9xp",
|
|
205
205
|
propsAsIs: !1
|
|
@@ -207,31 +207,31 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
207
207
|
/* @__PURE__ */ s(j, { name: "icon-check-circle" }),
|
|
208
208
|
/* @__PURE__ */ s(St, { children: e }),
|
|
209
209
|
/* @__PURE__ */ s(zt, { children: t })
|
|
210
|
-
] }), jt = /* @__PURE__ */
|
|
210
|
+
] }), jt = /* @__PURE__ */ o("div")({
|
|
211
211
|
name: "Container",
|
|
212
212
|
class: "c16sbdnm",
|
|
213
213
|
propsAsIs: !1
|
|
214
|
-
}), Ot = () => j, kt = /* @__PURE__ */
|
|
214
|
+
}), Ot = () => j, kt = /* @__PURE__ */ o(Ot())({
|
|
215
215
|
name: "IconPrediction",
|
|
216
216
|
class: "ibhorgl",
|
|
217
217
|
propsAsIs: !0
|
|
218
|
-
}),
|
|
218
|
+
}), ae = /* @__PURE__ */ o("div")({
|
|
219
219
|
name: "FeedbackIconWrap",
|
|
220
220
|
class: "f1g20ja7",
|
|
221
221
|
propsAsIs: !1
|
|
222
|
-
}),
|
|
222
|
+
}), le = /* @__PURE__ */ o("div")({
|
|
223
223
|
name: "FeedbackHeader",
|
|
224
224
|
class: "f455ozj",
|
|
225
225
|
propsAsIs: !1
|
|
226
|
-
}), wt = /* @__PURE__ */
|
|
226
|
+
}), wt = /* @__PURE__ */ o("span")({
|
|
227
227
|
name: "FeedbackTitle",
|
|
228
228
|
class: "f1913njx",
|
|
229
229
|
propsAsIs: !1
|
|
230
|
-
}), H = /* @__PURE__ */
|
|
230
|
+
}), H = /* @__PURE__ */ o("span")({
|
|
231
231
|
name: "FeedbackDescription",
|
|
232
232
|
class: "fzfk69z",
|
|
233
233
|
propsAsIs: !1
|
|
234
|
-
}), Ct = /* @__PURE__ */
|
|
234
|
+
}), Ct = /* @__PURE__ */ o("div")({
|
|
235
235
|
name: "FeedbackText",
|
|
236
236
|
class: "fx87qaj",
|
|
237
237
|
propsAsIs: !1
|
|
@@ -244,14 +244,14 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
244
244
|
questionStatus: I
|
|
245
245
|
}) => {
|
|
246
246
|
const m = n && (i === x.TRIVIA || i === x.PREDICTION);
|
|
247
|
-
if (!m && I !==
|
|
247
|
+
if (!m && I !== Q.RESOLVED)
|
|
248
248
|
return null;
|
|
249
249
|
const p = i === x.PREDICTION && !r, d = t ? "correct" : "incorrect", f = t ? e.correctFeedback : e.incorrectFeedback;
|
|
250
250
|
return /* @__PURE__ */ u(jt, { "data-isPrediction": p, children: [
|
|
251
|
-
I ===
|
|
252
|
-
/* @__PURE__ */ s(
|
|
251
|
+
I === Q.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ u(E, { children: [
|
|
252
|
+
/* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
|
|
253
253
|
/* @__PURE__ */ u("div", { children: [
|
|
254
|
-
/* @__PURE__ */ s(
|
|
254
|
+
/* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(H, { children: "Question Expired" }) }),
|
|
255
255
|
/* @__PURE__ */ s(Ct, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
256
256
|
] })
|
|
257
257
|
] }),
|
|
@@ -260,78 +260,78 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
260
260
|
/* @__PURE__ */ s(H, { children: "Stay tuned to see if your prediction was correct." })
|
|
261
261
|
] }),
|
|
262
262
|
m && r && /* @__PURE__ */ u(E, { children: [
|
|
263
|
-
/* @__PURE__ */ s(
|
|
264
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ u(
|
|
263
|
+
/* @__PURE__ */ s(ae, { "data-feedbackType": d, children: /* @__PURE__ */ s(j, { name: d }) }),
|
|
264
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ u(le, { children: [
|
|
265
265
|
/* @__PURE__ */ s(wt, { "data-feedbackType": d, children: f == null ? void 0 : f.title }),
|
|
266
266
|
/* @__PURE__ */ s(H, { children: f == null ? void 0 : f.description })
|
|
267
267
|
] }) })
|
|
268
268
|
] })
|
|
269
269
|
] });
|
|
270
|
-
}, Et = /* @__PURE__ */
|
|
270
|
+
}, Et = /* @__PURE__ */ o("div")({
|
|
271
271
|
name: "Container",
|
|
272
272
|
class: "c14ielyq",
|
|
273
273
|
propsAsIs: !1
|
|
274
|
-
}), Lt = /* @__PURE__ */
|
|
274
|
+
}), Lt = /* @__PURE__ */ o("div")({
|
|
275
275
|
name: "Content",
|
|
276
276
|
class: "c1tlqx57",
|
|
277
277
|
propsAsIs: !1
|
|
278
|
-
}), $t = /* @__PURE__ */
|
|
278
|
+
}), $t = /* @__PURE__ */ o("div")({
|
|
279
279
|
name: "Title",
|
|
280
280
|
class: "t1hq58md",
|
|
281
281
|
propsAsIs: !1
|
|
282
|
-
}), Rt = /* @__PURE__ */
|
|
282
|
+
}), Rt = /* @__PURE__ */ o("div")({
|
|
283
283
|
name: "Options",
|
|
284
284
|
class: "o1c8nxcx",
|
|
285
285
|
propsAsIs: !1
|
|
286
|
-
}), Qt = /* @__PURE__ */
|
|
286
|
+
}), Qt = /* @__PURE__ */ o("button")({
|
|
287
287
|
name: "ButtonContainer",
|
|
288
288
|
class: "b1b6dl8t",
|
|
289
289
|
propsAsIs: !1
|
|
290
|
-
}), Ut = /* @__PURE__ */
|
|
290
|
+
}), Ut = /* @__PURE__ */ o("div")({
|
|
291
291
|
name: "ButtonPct",
|
|
292
292
|
class: "b4iik8i",
|
|
293
293
|
propsAsIs: !1
|
|
294
|
-
}), _t = /* @__PURE__ */
|
|
294
|
+
}), _t = /* @__PURE__ */ o("span")({
|
|
295
295
|
name: "ButtonBody",
|
|
296
296
|
class: "b1gq1lnf",
|
|
297
297
|
propsAsIs: !1
|
|
298
|
-
}), qt = /* @__PURE__ */
|
|
298
|
+
}), qt = /* @__PURE__ */ o("div")({
|
|
299
299
|
name: "IconContainer",
|
|
300
300
|
class: "i1j65z51",
|
|
301
301
|
propsAsIs: !1
|
|
302
|
-
}), Yt = /* @__PURE__ */
|
|
302
|
+
}), Yt = /* @__PURE__ */ o("div")({
|
|
303
303
|
name: "IconWrap",
|
|
304
304
|
class: "i19tpfua",
|
|
305
305
|
propsAsIs: !1
|
|
306
|
-
}), ze = /* @__PURE__ */
|
|
306
|
+
}), ze = /* @__PURE__ */ o("img")({
|
|
307
307
|
name: "Icon",
|
|
308
308
|
class: "i1tubmma",
|
|
309
309
|
propsAsIs: !1
|
|
310
|
-
}), Pt = () => ze, Wt = /* @__PURE__ */
|
|
310
|
+
}), Pt = () => ze, Wt = /* @__PURE__ */ o(Pt())({
|
|
311
311
|
name: "IconDefault",
|
|
312
312
|
class: "i1grrgwj",
|
|
313
313
|
propsAsIs: !0
|
|
314
|
-
}), Vt = () => ze, Ft = /* @__PURE__ */
|
|
314
|
+
}), Vt = () => ze, Ft = /* @__PURE__ */ o(Vt())({
|
|
315
315
|
name: "IconCircle",
|
|
316
316
|
class: "ibemyq8",
|
|
317
317
|
propsAsIs: !0
|
|
318
|
-
}), Bt = /* @__PURE__ */
|
|
318
|
+
}), Bt = /* @__PURE__ */ o("span")({
|
|
319
319
|
name: "Title",
|
|
320
320
|
class: "t1dceht",
|
|
321
321
|
propsAsIs: !1
|
|
322
|
-
}), Ht = /* @__PURE__ */
|
|
322
|
+
}), Ht = /* @__PURE__ */ o("span")({
|
|
323
323
|
name: "Indicators",
|
|
324
324
|
class: "i116q4vq",
|
|
325
325
|
propsAsIs: !1
|
|
326
|
-
}), Zt = /* @__PURE__ */
|
|
326
|
+
}), Zt = /* @__PURE__ */ o("span")({
|
|
327
327
|
name: "Percentage",
|
|
328
328
|
class: "p17ajcu2",
|
|
329
329
|
propsAsIs: !1
|
|
330
|
-
}), Gt = () => j, Jt = /* @__PURE__ */
|
|
330
|
+
}), Gt = () => j, Jt = /* @__PURE__ */ o(Gt())({
|
|
331
331
|
name: "CheckIcon",
|
|
332
332
|
class: "cu9kmlb",
|
|
333
333
|
propsAsIs: !0
|
|
334
|
-
}),
|
|
334
|
+
}), ce = {
|
|
335
335
|
[b.CENTERED]: (e) => /* @__PURE__ */ s(Wt, { alt: "option-icon", src: e }),
|
|
336
336
|
[b.TRANSPARENT]: (e) => /* @__PURE__ */ s(qt, { children: /* @__PURE__ */ s(Yt, { style: { backgroundImage: `url(${e})` } }) }),
|
|
337
337
|
[b.ROUNDED]: (e) => /* @__PURE__ */ s(Ft, { alt: "option-icon", src: e }),
|
|
@@ -353,7 +353,7 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
353
353
|
correct: n,
|
|
354
354
|
hasCorrectAnswer: i,
|
|
355
355
|
questionStatus: r
|
|
356
|
-
}) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && i || r ===
|
|
356
|
+
}) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && i || r === Q.RESOLVED && n : !1, en = (e) => {
|
|
357
357
|
var t;
|
|
358
358
|
const {
|
|
359
359
|
// option props
|
|
@@ -372,8 +372,8 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
372
372
|
isLoading: N,
|
|
373
373
|
questionType: y,
|
|
374
374
|
correct: T,
|
|
375
|
-
hasCorrectAnswer:
|
|
376
|
-
} = e, l = Kt(e), c = Xt({ questionType: y, questionVoted: d, correct: T, hasCorrectAnswer:
|
|
375
|
+
hasCorrectAnswer: a
|
|
376
|
+
} = e, l = Kt(e), c = Xt({ questionType: y, questionVoted: d, correct: T, hasCorrectAnswer: a, questionStatus: D }), h = d || D === Q.RESOLVED && y === x.PREDICTION;
|
|
377
377
|
return /* @__PURE__ */ u(
|
|
378
378
|
Qt,
|
|
379
379
|
{
|
|
@@ -385,7 +385,7 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
385
385
|
children: [
|
|
386
386
|
h && /* @__PURE__ */ s(Ut, { "data-answerState": l, style: { width: `${I}%` } }),
|
|
387
387
|
/* @__PURE__ */ u(_t, { children: [
|
|
388
|
-
i && ((t =
|
|
388
|
+
i && ((t = ce[f]) == null ? void 0 : t.call(ce, i)),
|
|
389
389
|
/* @__PURE__ */ s(Bt, { children: r }),
|
|
390
390
|
h && /* @__PURE__ */ u(Ht, { children: [
|
|
391
391
|
c && /* @__PURE__ */ s(Jt, { name: "selected" }),
|
|
@@ -398,23 +398,23 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
398
398
|
]
|
|
399
399
|
}
|
|
400
400
|
);
|
|
401
|
-
}, tn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], nn = [10, 10, 0], sn = /* @__PURE__ */
|
|
401
|
+
}, tn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], nn = [10, 10, 0], sn = /* @__PURE__ */ o("div")({
|
|
402
402
|
name: "RemainingTime",
|
|
403
403
|
class: "r165427",
|
|
404
404
|
propsAsIs: !1
|
|
405
|
-
}), rn = L.SECONDARY_GREEN6,
|
|
405
|
+
}), rn = L.SECONDARY_GREEN6, de = L.SECONDARY_RED3, on = L.NEUTRALS_GRAY3, an = ({
|
|
406
406
|
isPlaying: e = !0,
|
|
407
407
|
duration: t = 30,
|
|
408
408
|
onTimerExpired: n
|
|
409
409
|
}) => {
|
|
410
|
-
const [i, r] =
|
|
410
|
+
const [i, r] = R(t > 10 ? rn : de), I = ({
|
|
411
411
|
remainingTime: d
|
|
412
412
|
}) => /* @__PURE__ */ s(sn, {
|
|
413
413
|
children: d
|
|
414
414
|
}), m = V(() => {
|
|
415
415
|
n == null || n(), r(on);
|
|
416
416
|
}, [n, r]), p = V((d) => {
|
|
417
|
-
d === 10 && r(
|
|
417
|
+
d === 10 && r(de);
|
|
418
418
|
}, [r]);
|
|
419
419
|
return /* @__PURE__ */ s(Ve, {
|
|
420
420
|
isPlaying: e,
|
|
@@ -429,31 +429,31 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
429
429
|
onUpdate: p,
|
|
430
430
|
children: I
|
|
431
431
|
});
|
|
432
|
-
}, ln = /* @__PURE__ */
|
|
432
|
+
}, ln = /* @__PURE__ */ o("div")({
|
|
433
433
|
name: "WinBarContainer",
|
|
434
434
|
class: "wie6cqo",
|
|
435
435
|
propsAsIs: !1
|
|
436
|
-
}), cn = /* @__PURE__ */
|
|
436
|
+
}), cn = /* @__PURE__ */ o("div")({
|
|
437
437
|
name: "Content",
|
|
438
438
|
class: "cgizw4u",
|
|
439
439
|
propsAsIs: !1
|
|
440
|
-
}), dn = /* @__PURE__ */
|
|
440
|
+
}), dn = /* @__PURE__ */ o("div")({
|
|
441
441
|
name: "Title",
|
|
442
442
|
class: "t1l3ucjp",
|
|
443
443
|
propsAsIs: !1
|
|
444
|
-
}), un = () => j, pn = /* @__PURE__ */
|
|
444
|
+
}), un = () => j, pn = /* @__PURE__ */ o(un())({
|
|
445
445
|
name: "WinIcon",
|
|
446
446
|
class: "wx7j799",
|
|
447
447
|
propsAsIs: !0
|
|
448
|
-
}), mn = /* @__PURE__ */
|
|
448
|
+
}), mn = /* @__PURE__ */ o("div")({
|
|
449
449
|
name: "Points",
|
|
450
450
|
class: "p4lwuj0",
|
|
451
451
|
propsAsIs: !1
|
|
452
|
-
}), In = /* @__PURE__ */
|
|
452
|
+
}), In = /* @__PURE__ */ o("span")({
|
|
453
453
|
name: "PointsCount",
|
|
454
454
|
class: "po9i64o",
|
|
455
455
|
propsAsIs: !1
|
|
456
|
-
}), hn = /* @__PURE__ */
|
|
456
|
+
}), hn = /* @__PURE__ */ o("span")({
|
|
457
457
|
name: "PointsUnits",
|
|
458
458
|
class: "pe5g05h",
|
|
459
459
|
propsAsIs: !1
|
|
@@ -469,25 +469,25 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
469
469
|
] })
|
|
470
470
|
] }),
|
|
471
471
|
i && /* @__PURE__ */ s(an, { isPlaying: n, onTimerExpired: r })
|
|
472
|
-
] }),
|
|
472
|
+
] }), gn = ({ openedQuestion: e, vote: t, close: n }) => {
|
|
473
473
|
var i;
|
|
474
|
-
const r = e.subject, I = e.type, m = (i = e.options) == null ? void 0 : i.options, [p, d] =
|
|
474
|
+
const r = e.subject, I = e.type, m = (i = e.options) == null ? void 0 : i.options, [p, d] = R(!1), [f, A] = R(!1), [D, N] = R(""), y = e == null ? void 0 : e.id, T = V(
|
|
475
475
|
async (v) => {
|
|
476
476
|
if (y) {
|
|
477
|
-
const
|
|
478
|
-
N(
|
|
477
|
+
const g = v.currentTarget.value;
|
|
478
|
+
N(g), A(!0), await t(y, g), A(!1);
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
481
|
[y, N, t]
|
|
482
|
-
),
|
|
482
|
+
), a = V(() => {
|
|
483
483
|
d(!0), setTimeout(n, 3e3);
|
|
484
|
-
}, [n]), l =
|
|
484
|
+
}, [n]), l = P(
|
|
485
485
|
() => e == null ? void 0 : e.answers.find((v) => v.youVoted === !0),
|
|
486
486
|
[e]
|
|
487
|
-
), c =
|
|
487
|
+
), c = P(
|
|
488
488
|
() => !!(e != null && e.answers.find((v) => v.correct === !0)),
|
|
489
489
|
[e]
|
|
490
|
-
), h =
|
|
490
|
+
), h = P(() => e ? e.answers.map((v) => ({
|
|
491
491
|
...v,
|
|
492
492
|
questionVoted: !!l,
|
|
493
493
|
youSelected: D === v.id,
|
|
@@ -498,12 +498,12 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
498
498
|
questionStatus: e.status,
|
|
499
499
|
// ToDo: Figure out why imageMode is not in the response
|
|
500
500
|
onVote: T
|
|
501
|
-
})) : [], [c, p, f, e, l, T, D]),
|
|
502
|
-
return /* @__PURE__ */ s(
|
|
503
|
-
|
|
501
|
+
})) : [], [c, p, f, e, l, T, D]), M = m && (m.case === "trivia" || m.case === "prediction") ? m.value : void 0;
|
|
502
|
+
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(Et, { children: /* @__PURE__ */ u(Lt, { children: [
|
|
503
|
+
M && /* @__PURE__ */ s(
|
|
504
504
|
bt,
|
|
505
505
|
{
|
|
506
|
-
feedbackMessages:
|
|
506
|
+
feedbackMessages: M,
|
|
507
507
|
questionVoted: !!l,
|
|
508
508
|
questionVotedCorrectly: l == null ? void 0 : l.correct,
|
|
509
509
|
questionType: I,
|
|
@@ -516,7 +516,7 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
516
516
|
{
|
|
517
517
|
title: p ? "Time expired" : "To win",
|
|
518
518
|
points: p ? void 0 : 100,
|
|
519
|
-
onTimerExpired:
|
|
519
|
+
onTimerExpired: a,
|
|
520
520
|
isTimer: !0
|
|
521
521
|
}
|
|
522
522
|
),
|
|
@@ -531,28 +531,28 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
531
531
|
/* @__PURE__ */ s(Rt, { children: h.map((v) => /* @__PURE__ */ s(en, { ...v }, v.id)) })
|
|
532
532
|
] })
|
|
533
533
|
] }) }) });
|
|
534
|
-
},
|
|
534
|
+
}, Mn = /* @__PURE__ */ o("div")({
|
|
535
535
|
name: "Container",
|
|
536
536
|
class: "cgn5uen",
|
|
537
537
|
propsAsIs: !1
|
|
538
|
-
}), vn = /* @__PURE__ */
|
|
538
|
+
}), vn = /* @__PURE__ */ o("div")({
|
|
539
539
|
name: "Content",
|
|
540
540
|
class: "c1px8nt6",
|
|
541
541
|
propsAsIs: !1
|
|
542
|
-
}), Nn = /* @__PURE__ */
|
|
542
|
+
}), Nn = /* @__PURE__ */ o("h3")({
|
|
543
543
|
name: "Title",
|
|
544
544
|
class: "t5et2jt",
|
|
545
545
|
propsAsIs: !1
|
|
546
|
-
}), An = /* @__PURE__ */
|
|
546
|
+
}), An = /* @__PURE__ */ o("div")({
|
|
547
547
|
name: "Description",
|
|
548
548
|
class: "d1i2kpk2",
|
|
549
549
|
propsAsIs: !1
|
|
550
|
-
}), yn = /* @__PURE__ */
|
|
550
|
+
}), yn = /* @__PURE__ */ o("div")({
|
|
551
551
|
name: "DateWrap",
|
|
552
552
|
class: "dd3lh3p",
|
|
553
553
|
propsAsIs: !1
|
|
554
554
|
}), xe = ({ created: e, title: t, instantView: n }) => {
|
|
555
|
-
const i =
|
|
555
|
+
const i = P(() => {
|
|
556
556
|
if (e) {
|
|
557
557
|
const r = new Date(e);
|
|
558
558
|
if (Ye(r))
|
|
@@ -563,7 +563,7 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
563
563
|
}
|
|
564
564
|
return null;
|
|
565
565
|
}, [e]);
|
|
566
|
-
return /* @__PURE__ */ u(
|
|
566
|
+
return /* @__PURE__ */ u(Mn, { children: [
|
|
567
567
|
i && /* @__PURE__ */ u(yn, { children: [
|
|
568
568
|
i.date,
|
|
569
569
|
" · ",
|
|
@@ -575,11 +575,11 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
575
575
|
/* @__PURE__ */ s(An, { children: n == null ? void 0 : n.body })
|
|
576
576
|
] })
|
|
577
577
|
] });
|
|
578
|
-
}, Tn = /* @__PURE__ */
|
|
578
|
+
}, Tn = /* @__PURE__ */ o("div")({
|
|
579
579
|
name: "Container",
|
|
580
580
|
class: "c1euiow",
|
|
581
581
|
propsAsIs: !1
|
|
582
|
-
}), Dn = /* @__PURE__ */
|
|
582
|
+
}), Dn = /* @__PURE__ */ o("a")({
|
|
583
583
|
name: "WebLinkBtn",
|
|
584
584
|
class: "w19zie3h",
|
|
585
585
|
propsAsIs: !1
|
|
@@ -589,7 +589,7 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
589
589
|
"Explore more of the Masters History",
|
|
590
590
|
/* @__PURE__ */ s(j, { name: "icon-external-link" })
|
|
591
591
|
] })
|
|
592
|
-
] }), zn = /* @__PURE__ */
|
|
592
|
+
] }), zn = /* @__PURE__ */ o("div")({
|
|
593
593
|
name: "QuestionContainer",
|
|
594
594
|
class: "qdri6g3",
|
|
595
595
|
propsAsIs: !1
|
|
@@ -610,7 +610,7 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
610
610
|
loading: i,
|
|
611
611
|
data: r
|
|
612
612
|
} = e;
|
|
613
|
-
return !i && r ? /* @__PURE__ */ s(
|
|
613
|
+
return !i && r ? /* @__PURE__ */ s(gn, {
|
|
614
614
|
vote: t,
|
|
615
615
|
close: n,
|
|
616
616
|
openedQuestion: r
|
|
@@ -635,31 +635,31 @@ const Fe = /* @__PURE__ */ a("div")({
|
|
|
635
635
|
openedQuestion: n
|
|
636
636
|
})]
|
|
637
637
|
});
|
|
638
|
-
}, kn = /* @__PURE__ */
|
|
638
|
+
}, kn = /* @__PURE__ */ o("div")({
|
|
639
639
|
name: "Container",
|
|
640
640
|
class: "c115qtkr",
|
|
641
641
|
propsAsIs: !1
|
|
642
|
-
}), wn = /* @__PURE__ */
|
|
642
|
+
}), wn = /* @__PURE__ */ o("div")({
|
|
643
643
|
name: "STabs",
|
|
644
644
|
class: "sxnslc8",
|
|
645
645
|
propsAsIs: !1
|
|
646
|
-
}), Cn = /* @__PURE__ */
|
|
646
|
+
}), Cn = /* @__PURE__ */ o("button")({
|
|
647
647
|
name: "Button",
|
|
648
648
|
class: "b1umzux0",
|
|
649
649
|
propsAsIs: !1
|
|
650
|
-
}), bn = /* @__PURE__ */
|
|
650
|
+
}), bn = /* @__PURE__ */ o("span")({
|
|
651
651
|
name: "Title",
|
|
652
652
|
class: "tspsaas",
|
|
653
653
|
propsAsIs: !1
|
|
654
654
|
});
|
|
655
|
-
var
|
|
656
|
-
const
|
|
657
|
-
/* @__PURE__ */ s(
|
|
655
|
+
var W = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(W || {});
|
|
656
|
+
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Cn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(bn, { children: e }) }), En = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(kn, { children: /* @__PURE__ */ u(wn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
657
|
+
/* @__PURE__ */ s(ue, { title: "Home", active: e === "home", onClick: () => t(
|
|
658
658
|
"home"
|
|
659
659
|
/* HOME */
|
|
660
660
|
) }),
|
|
661
661
|
/* @__PURE__ */ s(
|
|
662
|
-
|
|
662
|
+
ue,
|
|
663
663
|
{
|
|
664
664
|
title: "Leader Board",
|
|
665
665
|
active: e === "leaderboard",
|
|
@@ -680,7 +680,7 @@ function X() {
|
|
|
680
680
|
return e;
|
|
681
681
|
}, X.apply(this, arguments);
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function pe(e) {
|
|
684
684
|
if (e === void 0)
|
|
685
685
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
686
686
|
return e;
|
|
@@ -693,11 +693,11 @@ function ee(e, t) {
|
|
|
693
693
|
function Ln(e, t) {
|
|
694
694
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ee(e, t);
|
|
695
695
|
}
|
|
696
|
-
var
|
|
696
|
+
var me = Number.isNaN || function(t) {
|
|
697
697
|
return typeof t == "number" && t !== t;
|
|
698
698
|
};
|
|
699
699
|
function $n(e, t) {
|
|
700
|
-
return !!(e === t ||
|
|
700
|
+
return !!(e === t || me(e) && me(t));
|
|
701
701
|
}
|
|
702
702
|
function Rn(e, t) {
|
|
703
703
|
if (e.length !== t.length)
|
|
@@ -717,18 +717,18 @@ function Z(e, t) {
|
|
|
717
717
|
}
|
|
718
718
|
return m;
|
|
719
719
|
}
|
|
720
|
-
var Qn = typeof performance == "object" && typeof performance.now == "function",
|
|
720
|
+
var Qn = typeof performance == "object" && typeof performance.now == "function", Ie = Qn ? function() {
|
|
721
721
|
return performance.now();
|
|
722
722
|
} : function() {
|
|
723
723
|
return Date.now();
|
|
724
724
|
};
|
|
725
|
-
function
|
|
725
|
+
function he(e) {
|
|
726
726
|
cancelAnimationFrame(e.id);
|
|
727
727
|
}
|
|
728
728
|
function Un(e, t) {
|
|
729
|
-
var n =
|
|
729
|
+
var n = Ie();
|
|
730
730
|
function i() {
|
|
731
|
-
|
|
731
|
+
Ie() - n >= t ? e.call(null) : r.id = requestAnimationFrame(i);
|
|
732
732
|
}
|
|
733
733
|
var r = {
|
|
734
734
|
id: requestAnimationFrame(i)
|
|
@@ -736,7 +736,7 @@ function Un(e, t) {
|
|
|
736
736
|
return r;
|
|
737
737
|
}
|
|
738
738
|
var G = -1;
|
|
739
|
-
function
|
|
739
|
+
function fe(e) {
|
|
740
740
|
if (e === void 0 && (e = !1), G === -1 || e) {
|
|
741
741
|
var t = document.createElement("div"), n = t.style;
|
|
742
742
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), G = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
@@ -744,7 +744,7 @@ function he(e) {
|
|
|
744
744
|
return G;
|
|
745
745
|
}
|
|
746
746
|
var C = null;
|
|
747
|
-
function
|
|
747
|
+
function ge(e) {
|
|
748
748
|
if (e === void 0 && (e = !1), C === null || e) {
|
|
749
749
|
var t = document.createElement("div"), n = t.style;
|
|
750
750
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
@@ -761,198 +761,198 @@ function Yn(e) {
|
|
|
761
761
|
return t = /* @__PURE__ */ function(D) {
|
|
762
762
|
Ln(N, D);
|
|
763
763
|
function N(T) {
|
|
764
|
-
var
|
|
765
|
-
return
|
|
766
|
-
instance:
|
|
764
|
+
var a;
|
|
765
|
+
return a = D.call(this, T) || this, a._instanceProps = d(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
|
|
766
|
+
instance: pe(a),
|
|
767
767
|
isScrolling: !1,
|
|
768
768
|
scrollDirection: "forward",
|
|
769
|
-
scrollOffset: typeof
|
|
769
|
+
scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
|
|
770
770
|
scrollUpdateWasRequested: !1
|
|
771
|
-
},
|
|
772
|
-
return
|
|
771
|
+
}, a._callOnItemsRendered = void 0, a._callOnItemsRendered = Z(function(l, c, h, M) {
|
|
772
|
+
return a.props.onItemsRendered({
|
|
773
773
|
overscanStartIndex: l,
|
|
774
774
|
overscanStopIndex: c,
|
|
775
775
|
visibleStartIndex: h,
|
|
776
|
-
visibleStopIndex:
|
|
776
|
+
visibleStopIndex: M
|
|
777
777
|
});
|
|
778
|
-
}),
|
|
779
|
-
return
|
|
778
|
+
}), a._callOnScroll = void 0, a._callOnScroll = Z(function(l, c, h) {
|
|
779
|
+
return a.props.onScroll({
|
|
780
780
|
scrollDirection: l,
|
|
781
781
|
scrollOffset: c,
|
|
782
782
|
scrollUpdateWasRequested: h
|
|
783
783
|
});
|
|
784
|
-
}),
|
|
785
|
-
var c =
|
|
786
|
-
if (
|
|
787
|
-
S =
|
|
784
|
+
}), a._getItemStyle = void 0, a._getItemStyle = function(l) {
|
|
785
|
+
var c = a.props, h = c.direction, M = c.itemSize, v = c.layout, g = a._getItemStyleCache(f && M, f && v, f && h), S;
|
|
786
|
+
if (g.hasOwnProperty(l))
|
|
787
|
+
S = g[l];
|
|
788
788
|
else {
|
|
789
|
-
var z = n(
|
|
790
|
-
|
|
789
|
+
var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), k = h === "horizontal" || v === "horizontal", U = h === "rtl", _ = k ? z : 0;
|
|
790
|
+
g[l] = S = {
|
|
791
791
|
position: "absolute",
|
|
792
|
-
left:
|
|
793
|
-
right:
|
|
792
|
+
left: U ? void 0 : _,
|
|
793
|
+
right: U ? _ : void 0,
|
|
794
794
|
top: k ? 0 : z,
|
|
795
795
|
height: k ? "100%" : O,
|
|
796
796
|
width: k ? O : "100%"
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
799
|
return S;
|
|
800
|
-
},
|
|
800
|
+
}, a._getItemStyleCache = void 0, a._getItemStyleCache = Z(function(l, c, h) {
|
|
801
801
|
return {};
|
|
802
|
-
}),
|
|
803
|
-
var c = l.currentTarget, h = c.clientWidth,
|
|
804
|
-
|
|
805
|
-
if (
|
|
802
|
+
}), a._onScrollHorizontal = function(l) {
|
|
803
|
+
var c = l.currentTarget, h = c.clientWidth, M = c.scrollLeft, v = c.scrollWidth;
|
|
804
|
+
a.setState(function(g) {
|
|
805
|
+
if (g.scrollOffset === M)
|
|
806
806
|
return null;
|
|
807
|
-
var S =
|
|
807
|
+
var S = a.props.direction, z = M;
|
|
808
808
|
if (S === "rtl")
|
|
809
|
-
switch (
|
|
809
|
+
switch (ge()) {
|
|
810
810
|
case "negative":
|
|
811
|
-
z = -
|
|
811
|
+
z = -M;
|
|
812
812
|
break;
|
|
813
813
|
case "positive-descending":
|
|
814
|
-
z = v - h -
|
|
814
|
+
z = v - h - M;
|
|
815
815
|
break;
|
|
816
816
|
}
|
|
817
817
|
return z = Math.max(0, Math.min(z, v - h)), {
|
|
818
818
|
isScrolling: !0,
|
|
819
|
-
scrollDirection:
|
|
819
|
+
scrollDirection: g.scrollOffset < M ? "forward" : "backward",
|
|
820
820
|
scrollOffset: z,
|
|
821
821
|
scrollUpdateWasRequested: !1
|
|
822
822
|
};
|
|
823
|
-
},
|
|
824
|
-
},
|
|
825
|
-
var c = l.currentTarget, h = c.clientHeight,
|
|
826
|
-
|
|
827
|
-
if (
|
|
823
|
+
}, a._resetIsScrollingDebounced);
|
|
824
|
+
}, a._onScrollVertical = function(l) {
|
|
825
|
+
var c = l.currentTarget, h = c.clientHeight, M = c.scrollHeight, v = c.scrollTop;
|
|
826
|
+
a.setState(function(g) {
|
|
827
|
+
if (g.scrollOffset === v)
|
|
828
828
|
return null;
|
|
829
|
-
var S = Math.max(0, Math.min(v,
|
|
829
|
+
var S = Math.max(0, Math.min(v, M - h));
|
|
830
830
|
return {
|
|
831
831
|
isScrolling: !0,
|
|
832
|
-
scrollDirection:
|
|
832
|
+
scrollDirection: g.scrollOffset < S ? "forward" : "backward",
|
|
833
833
|
scrollOffset: S,
|
|
834
834
|
scrollUpdateWasRequested: !1
|
|
835
835
|
};
|
|
836
|
-
},
|
|
837
|
-
},
|
|
838
|
-
var c =
|
|
839
|
-
|
|
840
|
-
},
|
|
841
|
-
|
|
842
|
-
},
|
|
843
|
-
|
|
836
|
+
}, a._resetIsScrollingDebounced);
|
|
837
|
+
}, a._outerRefSetter = function(l) {
|
|
838
|
+
var c = a.props.outerRef;
|
|
839
|
+
a._outerRef = l, typeof c == "function" ? c(l) : c != null && typeof c == "object" && c.hasOwnProperty("current") && (c.current = l);
|
|
840
|
+
}, a._resetIsScrollingDebounced = function() {
|
|
841
|
+
a._resetIsScrollingTimeoutId !== null && he(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = Un(a._resetIsScrolling, _n);
|
|
842
|
+
}, a._resetIsScrolling = function() {
|
|
843
|
+
a._resetIsScrollingTimeoutId = null, a.setState({
|
|
844
844
|
isScrolling: !1
|
|
845
845
|
}, function() {
|
|
846
|
-
|
|
846
|
+
a._getItemStyleCache(-1, null);
|
|
847
847
|
});
|
|
848
|
-
},
|
|
848
|
+
}, a;
|
|
849
849
|
}
|
|
850
|
-
N.getDerivedStateFromProps = function(
|
|
851
|
-
return Pn(
|
|
850
|
+
N.getDerivedStateFromProps = function(a, l) {
|
|
851
|
+
return Pn(a, l), A(a), null;
|
|
852
852
|
};
|
|
853
853
|
var y = N.prototype;
|
|
854
|
-
return y.scrollTo = function(
|
|
855
|
-
|
|
856
|
-
return l.scrollOffset ===
|
|
857
|
-
scrollDirection: l.scrollOffset <
|
|
858
|
-
scrollOffset:
|
|
854
|
+
return y.scrollTo = function(a) {
|
|
855
|
+
a = Math.max(0, a), this.setState(function(l) {
|
|
856
|
+
return l.scrollOffset === a ? null : {
|
|
857
|
+
scrollDirection: l.scrollOffset < a ? "forward" : "backward",
|
|
858
|
+
scrollOffset: a,
|
|
859
859
|
scrollUpdateWasRequested: !0
|
|
860
860
|
};
|
|
861
861
|
}, this._resetIsScrollingDebounced);
|
|
862
|
-
}, y.scrollToItem = function(
|
|
862
|
+
}, y.scrollToItem = function(a, l) {
|
|
863
863
|
l === void 0 && (l = "auto");
|
|
864
|
-
var c = this.props, h = c.itemCount,
|
|
865
|
-
|
|
866
|
-
var
|
|
864
|
+
var c = this.props, h = c.itemCount, M = c.layout, v = this.state.scrollOffset;
|
|
865
|
+
a = Math.max(0, Math.min(a, h - 1));
|
|
866
|
+
var g = 0;
|
|
867
867
|
if (this._outerRef) {
|
|
868
868
|
var S = this._outerRef;
|
|
869
|
-
|
|
869
|
+
M === "vertical" ? g = S.scrollWidth > S.clientWidth ? fe() : 0 : g = S.scrollHeight > S.clientHeight ? fe() : 0;
|
|
870
870
|
}
|
|
871
|
-
this.scrollTo(I(this.props,
|
|
871
|
+
this.scrollTo(I(this.props, a, l, v, this._instanceProps, g));
|
|
872
872
|
}, y.componentDidMount = function() {
|
|
873
|
-
var
|
|
873
|
+
var a = this.props, l = a.direction, c = a.initialScrollOffset, h = a.layout;
|
|
874
874
|
if (typeof c == "number" && this._outerRef != null) {
|
|
875
|
-
var
|
|
876
|
-
l === "horizontal" || h === "horizontal" ?
|
|
875
|
+
var M = this._outerRef;
|
|
876
|
+
l === "horizontal" || h === "horizontal" ? M.scrollLeft = c : M.scrollTop = c;
|
|
877
877
|
}
|
|
878
878
|
this._callPropsCallbacks();
|
|
879
879
|
}, y.componentDidUpdate = function() {
|
|
880
|
-
var
|
|
880
|
+
var a = this.props, l = a.direction, c = a.layout, h = this.state, M = h.scrollOffset, v = h.scrollUpdateWasRequested;
|
|
881
881
|
if (v && this._outerRef != null) {
|
|
882
|
-
var
|
|
882
|
+
var g = this._outerRef;
|
|
883
883
|
if (l === "horizontal" || c === "horizontal")
|
|
884
884
|
if (l === "rtl")
|
|
885
|
-
switch (
|
|
885
|
+
switch (ge()) {
|
|
886
886
|
case "negative":
|
|
887
|
-
|
|
887
|
+
g.scrollLeft = -M;
|
|
888
888
|
break;
|
|
889
889
|
case "positive-ascending":
|
|
890
|
-
|
|
890
|
+
g.scrollLeft = M;
|
|
891
891
|
break;
|
|
892
892
|
default:
|
|
893
|
-
var S =
|
|
894
|
-
|
|
893
|
+
var S = g.clientWidth, z = g.scrollWidth;
|
|
894
|
+
g.scrollLeft = z - S - M;
|
|
895
895
|
break;
|
|
896
896
|
}
|
|
897
897
|
else
|
|
898
|
-
|
|
898
|
+
g.scrollLeft = M;
|
|
899
899
|
else
|
|
900
|
-
|
|
900
|
+
g.scrollTop = M;
|
|
901
901
|
}
|
|
902
902
|
this._callPropsCallbacks();
|
|
903
903
|
}, y.componentWillUnmount = function() {
|
|
904
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
904
|
+
this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
|
|
905
905
|
}, y.render = function() {
|
|
906
|
-
var
|
|
906
|
+
var a = this.props, l = a.children, c = a.className, h = a.direction, M = a.height, v = a.innerRef, g = a.innerElementType, S = a.innerTagName, z = a.itemCount, O = a.itemData, k = a.itemKey, U = k === void 0 ? qn : k, _ = a.layout, je = a.outerElementType, Oe = a.outerTagName, ke = a.style, we = a.useIsScrolling, Ce = a.width, ne = this.state.isScrolling, F = h === "horizontal" || _ === "horizontal", be = F ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
|
|
907
907
|
if (z > 0)
|
|
908
908
|
for (var $ = Ee; $ <= Le; $++)
|
|
909
|
-
|
|
909
|
+
ie.push(B(l, {
|
|
910
910
|
data: O,
|
|
911
|
-
key:
|
|
911
|
+
key: U($, O),
|
|
912
912
|
index: $,
|
|
913
|
-
isScrolling: we ?
|
|
913
|
+
isScrolling: we ? ne : void 0,
|
|
914
914
|
style: this._getItemStyle($)
|
|
915
915
|
}));
|
|
916
|
-
var
|
|
916
|
+
var re = i(this.props, this._instanceProps);
|
|
917
917
|
return B(je || Oe || "div", {
|
|
918
918
|
className: c,
|
|
919
919
|
onScroll: be,
|
|
920
920
|
ref: this._outerRefSetter,
|
|
921
921
|
style: X({
|
|
922
922
|
position: "relative",
|
|
923
|
-
height:
|
|
923
|
+
height: M,
|
|
924
924
|
width: Ce,
|
|
925
925
|
overflow: "auto",
|
|
926
926
|
WebkitOverflowScrolling: "touch",
|
|
927
927
|
willChange: "transform",
|
|
928
928
|
direction: h
|
|
929
929
|
}, ke)
|
|
930
|
-
}, B(
|
|
931
|
-
children:
|
|
930
|
+
}, B(g || S || "div", {
|
|
931
|
+
children: ie,
|
|
932
932
|
ref: v,
|
|
933
933
|
style: {
|
|
934
|
-
height: F ? "100%" :
|
|
935
|
-
pointerEvents:
|
|
936
|
-
width: F ?
|
|
934
|
+
height: F ? "100%" : re,
|
|
935
|
+
pointerEvents: ne ? "none" : void 0,
|
|
936
|
+
width: F ? re : "100%"
|
|
937
937
|
}
|
|
938
938
|
}));
|
|
939
939
|
}, y._callPropsCallbacks = function() {
|
|
940
940
|
if (typeof this.props.onItemsRendered == "function") {
|
|
941
|
-
var
|
|
942
|
-
if (
|
|
943
|
-
var l = this._getRangeToRender(), c = l[0], h = l[1],
|
|
944
|
-
this._callOnItemsRendered(c, h,
|
|
941
|
+
var a = this.props.itemCount;
|
|
942
|
+
if (a > 0) {
|
|
943
|
+
var l = this._getRangeToRender(), c = l[0], h = l[1], M = l[2], v = l[3];
|
|
944
|
+
this._callOnItemsRendered(c, h, M, v);
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
947
|
if (typeof this.props.onScroll == "function") {
|
|
948
|
-
var
|
|
948
|
+
var g = this.state, S = g.scrollDirection, z = g.scrollOffset, O = g.scrollUpdateWasRequested;
|
|
949
949
|
this._callOnScroll(S, z, O);
|
|
950
950
|
}
|
|
951
951
|
}, y._getRangeToRender = function() {
|
|
952
|
-
var
|
|
952
|
+
var a = this.props, l = a.itemCount, c = a.overscanCount, h = this.state, M = h.isScrolling, v = h.scrollDirection, g = h.scrollOffset;
|
|
953
953
|
if (l === 0)
|
|
954
954
|
return [0, 0, 0, 0];
|
|
955
|
-
var S = m(this.props,
|
|
955
|
+
var S = m(this.props, g, this._instanceProps), z = p(this.props, S, g, this._instanceProps), O = !M || v === "backward" ? Math.max(1, c) : 1, k = !M || v === "forward" ? Math.max(1, c) : 1;
|
|
956
956
|
return [Math.max(0, S - O), Math.max(0, Math.min(l - 1, z + k)), S, z];
|
|
957
957
|
}, N;
|
|
958
958
|
}(Ae), t.defaultProps = {
|
|
@@ -979,7 +979,7 @@ var Pn = function(t, n) {
|
|
|
979
979
|
return i * n;
|
|
980
980
|
},
|
|
981
981
|
getOffsetForIndexAndAlignment: function(t, n, i, r, I, m) {
|
|
982
|
-
var p = t.direction, d = t.height, f = t.itemCount, A = t.itemSize, D = t.layout, N = t.width, y = p === "horizontal" || D === "horizontal", T = y ? N : d,
|
|
982
|
+
var p = t.direction, d = t.height, f = t.itemCount, A = t.itemSize, D = t.layout, N = t.width, y = p === "horizontal" || D === "horizontal", T = y ? N : d, a = Math.max(0, f * A - T), l = Math.min(a, n * A), c = Math.max(0, n * A - T + A + m);
|
|
983
983
|
switch (i === "smart" && (r >= c - T && r <= l + T ? i = "auto" : i = "center"), i) {
|
|
984
984
|
case "start":
|
|
985
985
|
return l;
|
|
@@ -987,7 +987,7 @@ var Pn = function(t, n) {
|
|
|
987
987
|
return c;
|
|
988
988
|
case "center": {
|
|
989
989
|
var h = Math.round(c + (l - c) / 2);
|
|
990
|
-
return h < Math.ceil(T / 2) ? 0 : h >
|
|
990
|
+
return h < Math.ceil(T / 2) ? 0 : h > a + Math.floor(T / 2) ? a : h;
|
|
991
991
|
}
|
|
992
992
|
case "auto":
|
|
993
993
|
default:
|
|
@@ -1134,35 +1134,35 @@ var Bn = function(e, t) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
}]), t;
|
|
1136
1136
|
}(Ae);
|
|
1137
|
-
const Jn = /* @__PURE__ */
|
|
1137
|
+
const Jn = /* @__PURE__ */ o("div")({
|
|
1138
1138
|
name: "Container",
|
|
1139
1139
|
class: "culdu4a",
|
|
1140
1140
|
propsAsIs: !1
|
|
1141
|
-
}), Kn = /* @__PURE__ */
|
|
1141
|
+
}), Kn = /* @__PURE__ */ o("div")({
|
|
1142
1142
|
name: "Position",
|
|
1143
1143
|
class: "pwf8e69",
|
|
1144
1144
|
propsAsIs: !1
|
|
1145
|
-
}), Xn = /* @__PURE__ */
|
|
1145
|
+
}), Xn = /* @__PURE__ */ o("img")({
|
|
1146
1146
|
name: "Avatar",
|
|
1147
1147
|
class: "atf4yh4",
|
|
1148
1148
|
propsAsIs: !1
|
|
1149
|
-
}), es = /* @__PURE__ */
|
|
1149
|
+
}), es = /* @__PURE__ */ o("div")({
|
|
1150
1150
|
name: "AvatarPlaceholder",
|
|
1151
1151
|
class: "a1dg29ja",
|
|
1152
1152
|
propsAsIs: !1
|
|
1153
|
-
}), ts = /* @__PURE__ */
|
|
1153
|
+
}), ts = /* @__PURE__ */ o("div")({
|
|
1154
1154
|
name: "Content",
|
|
1155
1155
|
class: "c10a68rc",
|
|
1156
1156
|
propsAsIs: !1
|
|
1157
|
-
}), ns = /* @__PURE__ */
|
|
1157
|
+
}), ns = /* @__PURE__ */ o("div")({
|
|
1158
1158
|
name: "NameContainer",
|
|
1159
1159
|
class: "nc4kck5",
|
|
1160
1160
|
propsAsIs: !1
|
|
1161
|
-
}), ss = /* @__PURE__ */
|
|
1161
|
+
}), ss = /* @__PURE__ */ o("span")({
|
|
1162
1162
|
name: "Name",
|
|
1163
1163
|
class: "njsrqgr",
|
|
1164
1164
|
propsAsIs: !1
|
|
1165
|
-
}), is = () => j, rs = /* @__PURE__ */
|
|
1165
|
+
}), is = () => j, rs = /* @__PURE__ */ o(is())({
|
|
1166
1166
|
name: "CurrentUserBadge",
|
|
1167
1167
|
class: "c17uc4zr",
|
|
1168
1168
|
propsAsIs: !0
|
|
@@ -1184,7 +1184,11 @@ const Jn = /* @__PURE__ */ a("div")({
|
|
|
1184
1184
|
] })
|
|
1185
1185
|
] }),
|
|
1186
1186
|
/* @__PURE__ */ s("div", { children: Te(i) })
|
|
1187
|
-
] }), as = ({
|
|
1187
|
+
] }), as = /* @__PURE__ */ o("div")({
|
|
1188
|
+
name: "ScrollContainer",
|
|
1189
|
+
class: "s13d8sg6",
|
|
1190
|
+
propsAsIs: !1
|
|
1191
|
+
}), ls = ({
|
|
1188
1192
|
items: e,
|
|
1189
1193
|
currentUserId: t,
|
|
1190
1194
|
openItemDetail: n,
|
|
@@ -1195,7 +1199,7 @@ const Jn = /* @__PURE__ */ a("div")({
|
|
|
1195
1199
|
isItemLoaded: (m) => m < e.length,
|
|
1196
1200
|
itemCount: e.length + 1,
|
|
1197
1201
|
loadMoreItems: i,
|
|
1198
|
-
children: ({ onItemsRendered: m, ref: p }) => /* @__PURE__ */ s(
|
|
1202
|
+
children: ({ onItemsRendered: m, ref: p }) => /* @__PURE__ */ s(as, { children: /* @__PURE__ */ s(
|
|
1199
1203
|
Wn,
|
|
1200
1204
|
{
|
|
1201
1205
|
itemSize: 56,
|
|
@@ -1215,9 +1219,9 @@ const Jn = /* @__PURE__ */ a("div")({
|
|
|
1215
1219
|
e[d].userId
|
|
1216
1220
|
)
|
|
1217
1221
|
}
|
|
1218
|
-
)
|
|
1222
|
+
) })
|
|
1219
1223
|
}
|
|
1220
|
-
) }),
|
|
1224
|
+
) }), cs = ({ deepLink: e }) => {
|
|
1221
1225
|
const { data: t } = w(e.$store);
|
|
1222
1226
|
return /* @__PURE__ */ s(
|
|
1223
1227
|
Qe,
|
|
@@ -1239,55 +1243,55 @@ const Jn = /* @__PURE__ */ a("div")({
|
|
|
1239
1243
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1240
1244
|
}
|
|
1241
1245
|
);
|
|
1242
|
-
},
|
|
1246
|
+
}, ds = ({ gamification: e }) => {
|
|
1243
1247
|
const { data: t } = w(e.leaderboardList.$store);
|
|
1244
1248
|
return t != null && t.length ? /* @__PURE__ */ s(
|
|
1245
|
-
|
|
1249
|
+
ls,
|
|
1246
1250
|
{
|
|
1247
1251
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1248
1252
|
items: t,
|
|
1249
1253
|
openItemDetail: e.openUser,
|
|
1250
1254
|
currentUserId: e.currentUserId.get()
|
|
1251
1255
|
}
|
|
1252
|
-
) : /* @__PURE__ */ s(
|
|
1253
|
-
},
|
|
1256
|
+
) : /* @__PURE__ */ s(cs, { deepLink: e.deepLink });
|
|
1257
|
+
}, us = /* @__PURE__ */ o("div")({
|
|
1254
1258
|
name: "QuestionItem",
|
|
1255
1259
|
class: "q1w97g3p",
|
|
1256
1260
|
propsAsIs: !1
|
|
1257
|
-
}),
|
|
1261
|
+
}), ps = /* @__PURE__ */ o("div")({
|
|
1258
1262
|
name: "QuestionCaption",
|
|
1259
1263
|
class: "q2sl39u",
|
|
1260
1264
|
propsAsIs: !1
|
|
1261
|
-
}),
|
|
1265
|
+
}), ms = /* @__PURE__ */ o("div")({
|
|
1262
1266
|
name: "QuestionBody",
|
|
1263
1267
|
class: "qd5h0uc",
|
|
1264
1268
|
propsAsIs: !1
|
|
1265
|
-
}),
|
|
1269
|
+
}), Is = /* @__PURE__ */ o("div")({
|
|
1266
1270
|
name: "QuestionAction",
|
|
1267
1271
|
class: "q105uluy",
|
|
1268
1272
|
propsAsIs: !1
|
|
1269
|
-
}),
|
|
1273
|
+
}), hs = () => j, J = /* @__PURE__ */ o(hs())({
|
|
1270
1274
|
name: "QuestionActionIcon",
|
|
1271
1275
|
class: "q1fa0b9h",
|
|
1272
1276
|
propsAsIs: !0
|
|
1273
|
-
}),
|
|
1277
|
+
}), fs = () => j, gs = /* @__PURE__ */ o(fs())({
|
|
1274
1278
|
name: "QuestionTypeIcon",
|
|
1275
1279
|
class: "qxlt78s",
|
|
1276
1280
|
propsAsIs: !0
|
|
1277
|
-
}), Ms = /* @__PURE__ */
|
|
1281
|
+
}), Ms = /* @__PURE__ */ o("div")({
|
|
1278
1282
|
name: "QuestionTypeLabel",
|
|
1279
1283
|
class: "qmg0vkx",
|
|
1280
1284
|
propsAsIs: !1
|
|
1281
|
-
}),
|
|
1285
|
+
}), vs = /* @__PURE__ */ o("div")({
|
|
1282
1286
|
name: "QuestionContent",
|
|
1283
1287
|
class: "q1uz5j1g",
|
|
1284
1288
|
propsAsIs: !1
|
|
1285
|
-
}),
|
|
1286
|
-
[
|
|
1287
|
-
[
|
|
1288
|
-
[
|
|
1289
|
-
[
|
|
1290
|
-
},
|
|
1289
|
+
}), Ns = {
|
|
1290
|
+
[q.LOST]: /* @__PURE__ */ s(J, { name: "icon-cross" }),
|
|
1291
|
+
[q.WON]: /* @__PURE__ */ s(J, { name: "icon-check" }),
|
|
1292
|
+
[q.UNSET]: void 0,
|
|
1293
|
+
[q.DNP]: /* @__PURE__ */ s(J, { name: "icon-arrow" })
|
|
1294
|
+
}, As = ({
|
|
1291
1295
|
questionId: e,
|
|
1292
1296
|
questionType: t,
|
|
1293
1297
|
questionStatus: n,
|
|
@@ -1296,114 +1300,144 @@ const Jn = /* @__PURE__ */ a("div")({
|
|
|
1296
1300
|
openQuestion: I,
|
|
1297
1301
|
status: m
|
|
1298
1302
|
}) => {
|
|
1299
|
-
const p =
|
|
1300
|
-
return p ? /* @__PURE__ */ u(
|
|
1301
|
-
/* @__PURE__ */ u(
|
|
1302
|
-
/* @__PURE__ */ u(
|
|
1303
|
-
/* @__PURE__ */ s(
|
|
1303
|
+
const p = Ne[t], d = Ns[m];
|
|
1304
|
+
return p ? /* @__PURE__ */ u(us, { onClick: () => I == null ? void 0 : I(e), children: [
|
|
1305
|
+
/* @__PURE__ */ u(vs, { children: [
|
|
1306
|
+
/* @__PURE__ */ u(ps, { children: [
|
|
1307
|
+
/* @__PURE__ */ s(gs, { name: p.iconName }),
|
|
1304
1308
|
/* @__PURE__ */ u(Ms, { children: [
|
|
1305
1309
|
p.label,
|
|
1306
|
-
t === x.TRIVIA && n ===
|
|
1310
|
+
t === x.TRIVIA && n === Q.RESOLVED && " • Expired"
|
|
1307
1311
|
] })
|
|
1308
1312
|
] }),
|
|
1309
|
-
/* @__PURE__ */ s(
|
|
1313
|
+
/* @__PURE__ */ s(ms, { children: i || "" })
|
|
1310
1314
|
] }),
|
|
1311
|
-
/* @__PURE__ */ s(
|
|
1315
|
+
/* @__PURE__ */ s(Is, { children: d || (r ? /* @__PURE__ */ s(Ue, { children: "Play" }) : null) })
|
|
1312
1316
|
] }) : null;
|
|
1313
|
-
},
|
|
1317
|
+
}, ys = /* @__PURE__ */ o("div")({
|
|
1314
1318
|
name: "Container",
|
|
1315
1319
|
class: "cll3md7",
|
|
1316
1320
|
propsAsIs: !1
|
|
1317
|
-
}),
|
|
1321
|
+
}), Ts = /* @__PURE__ */ o("button")({
|
|
1318
1322
|
name: "ActionBtn",
|
|
1319
1323
|
class: "a10g1iik",
|
|
1320
1324
|
propsAsIs: !1
|
|
1321
|
-
}),
|
|
1325
|
+
}), Ds = ({
|
|
1322
1326
|
openInsight: e,
|
|
1323
1327
|
questionId: t,
|
|
1324
1328
|
...n
|
|
1325
|
-
}) => /* @__PURE__ */ u(
|
|
1329
|
+
}) => /* @__PURE__ */ u(ys, { children: [
|
|
1326
1330
|
/* @__PURE__ */ s(xe, { questionId: t, ...n }),
|
|
1327
|
-
e && /* @__PURE__ */ s(
|
|
1328
|
-
] }),
|
|
1331
|
+
e && /* @__PURE__ */ s(Ts, { onClick: () => e(t), children: "View Insight" })
|
|
1332
|
+
] }), Ss = /* @__PURE__ */ o("div")({
|
|
1329
1333
|
name: "QuestionsContainer",
|
|
1330
1334
|
class: "qvghv3l",
|
|
1331
1335
|
propsAsIs: !1
|
|
1332
|
-
}),
|
|
1336
|
+
}), zs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Ss, { children: e == null ? void 0 : e.map((n) => {
|
|
1333
1337
|
var i, r;
|
|
1334
1338
|
if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1335
1339
|
const I = n.attributes.attributes.value;
|
|
1336
|
-
return /* @__PURE__ */ s(
|
|
1340
|
+
return /* @__PURE__ */ s(As, { openQuestion: t, ...I }, I.questionId);
|
|
1337
1341
|
}
|
|
1338
1342
|
if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
|
|
1339
1343
|
const I = n.attributes.attributes.value;
|
|
1340
|
-
return /* @__PURE__ */ s(
|
|
1344
|
+
return /* @__PURE__ */ s(Ds, { openInsight: t, ...I }, I.questionId);
|
|
1341
1345
|
}
|
|
1342
1346
|
return null;
|
|
1343
|
-
}) }),
|
|
1347
|
+
}) }), xs = ({ store: e, openQuestion: t }) => {
|
|
1344
1348
|
const n = w(e);
|
|
1345
|
-
return n != null && n.data ? /* @__PURE__ */ s(
|
|
1346
|
-
},
|
|
1349
|
+
return n != null && n.data ? /* @__PURE__ */ s(zs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1350
|
+
}, js = ({ userSummary: e }) => {
|
|
1347
1351
|
var t, n;
|
|
1348
1352
|
const i = w(e.getStore());
|
|
1349
1353
|
return (t = i.data) != null && t.summary ? /* @__PURE__ */ s(Se, { ...i.data.summary, successRate: (n = i.data.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1350
|
-
},
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
},
|
|
1354
|
+
}, Os = ({
|
|
1355
|
+
gamification: e
|
|
1356
|
+
}) => {
|
|
1357
|
+
const [t, n] = R(W.HOME);
|
|
1358
|
+
return /* @__PURE__ */ u("div", {
|
|
1359
|
+
style: {
|
|
1360
|
+
height: "100%",
|
|
1361
|
+
display: "flex",
|
|
1362
|
+
flexDirection: "column",
|
|
1363
|
+
overflow: "hidden"
|
|
1364
|
+
},
|
|
1365
|
+
children: [/* @__PURE__ */ s(K, {
|
|
1366
|
+
style: {
|
|
1367
|
+
paddingBottom: "4px"
|
|
1368
|
+
},
|
|
1369
|
+
children: /* @__PURE__ */ s(En, {
|
|
1370
|
+
activePage: t,
|
|
1371
|
+
toggleActivePage: n
|
|
1372
|
+
})
|
|
1373
|
+
}), t === W.HOME && /* @__PURE__ */ u(te, {
|
|
1374
|
+
children: [/* @__PURE__ */ s(K, {
|
|
1375
|
+
style: {
|
|
1376
|
+
paddingTop: "12px"
|
|
1377
|
+
},
|
|
1378
|
+
children: /* @__PURE__ */ s(js, {
|
|
1379
|
+
userSummary: e.userSummary
|
|
1380
|
+
})
|
|
1381
|
+
}), /* @__PURE__ */ s(_e, {
|
|
1382
|
+
children: /* @__PURE__ */ s(xs, {
|
|
1383
|
+
openQuestion: e.openQuestion,
|
|
1384
|
+
store: e.feedList.getStore()
|
|
1385
|
+
})
|
|
1386
|
+
})]
|
|
1387
|
+
}), t === W.LEADERBOARD && /* @__PURE__ */ s("div", {
|
|
1388
|
+
className: "c1bp9dj2",
|
|
1389
|
+
children: /* @__PURE__ */ s(ds, {
|
|
1390
|
+
gamification: e
|
|
1391
|
+
})
|
|
1392
|
+
})]
|
|
1393
|
+
});
|
|
1394
|
+
}, ks = () => qe, ve = /* @__PURE__ */ o(ks())({
|
|
1361
1395
|
name: "OpenedContainer",
|
|
1362
1396
|
class: "oar61gl",
|
|
1363
1397
|
propsAsIs: !0
|
|
1364
|
-
}),
|
|
1398
|
+
}), ws = /* @__PURE__ */ o("div")({
|
|
1365
1399
|
name: "UserContainer",
|
|
1366
1400
|
class: "u14zaal4",
|
|
1367
1401
|
propsAsIs: !1
|
|
1368
|
-
}),
|
|
1402
|
+
}), Cs = ({
|
|
1369
1403
|
correct: e,
|
|
1370
1404
|
incorrect: t
|
|
1371
1405
|
}) => {
|
|
1372
1406
|
const n = e + t;
|
|
1373
1407
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
1374
|
-
},
|
|
1408
|
+
}, Bs = ({
|
|
1375
1409
|
gamification: e,
|
|
1376
1410
|
className: t
|
|
1377
1411
|
}) => {
|
|
1378
1412
|
const n = w(e.openedQuestion.$store), i = w(e.openedUser);
|
|
1379
1413
|
return /* @__PURE__ */ u(E, {
|
|
1380
|
-
children: [n && /* @__PURE__ */ s(
|
|
1414
|
+
children: [n && /* @__PURE__ */ s(ve, {
|
|
1381
1415
|
className: t,
|
|
1382
1416
|
children: /* @__PURE__ */ s(On, {
|
|
1383
1417
|
gamification: e
|
|
1384
1418
|
})
|
|
1385
|
-
}), i && /* @__PURE__ */ s(
|
|
1419
|
+
}), i && /* @__PURE__ */ s(ve, {
|
|
1386
1420
|
className: t,
|
|
1387
|
-
children: /* @__PURE__ */ u(
|
|
1421
|
+
children: /* @__PURE__ */ u(ws, {
|
|
1388
1422
|
children: [/* @__PURE__ */ s(De, {
|
|
1389
1423
|
label: "Friend's Rank",
|
|
1390
1424
|
close: e.closeUser
|
|
1391
1425
|
}), /* @__PURE__ */ s(K, {
|
|
1392
1426
|
children: /* @__PURE__ */ s(Se, {
|
|
1393
1427
|
...i,
|
|
1394
|
-
successRate:
|
|
1428
|
+
successRate: Cs(i)
|
|
1395
1429
|
})
|
|
1396
1430
|
})]
|
|
1397
1431
|
})
|
|
1398
|
-
}), /* @__PURE__ */ s(
|
|
1432
|
+
}), /* @__PURE__ */ s(te, {
|
|
1399
1433
|
className: t,
|
|
1400
1434
|
"data-nav": "true",
|
|
1401
|
-
children: /* @__PURE__ */ s(
|
|
1435
|
+
children: /* @__PURE__ */ s(Os, {
|
|
1402
1436
|
gamification: e
|
|
1403
1437
|
})
|
|
1404
1438
|
})]
|
|
1405
1439
|
});
|
|
1406
1440
|
};
|
|
1407
1441
|
export {
|
|
1408
|
-
|
|
1442
|
+
Bs as default
|
|
1409
1443
|
};
|