@streamlayer/react 0.39.1 → 0.40.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/provider.d.ts +2 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index2.js +7 -7
- package/lib/cjs/masters2.js +41 -41
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +65 -65
- package/lib/dist/es/gamification-feature.js +573 -554
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +12167 -12049
- package/lib/dist/index.d.ts +30 -4
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +581 -562
- package/lib/es/index2.js +44 -41
- package/lib/es/masters2.js +7678 -7588
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -12
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as s, Fragment as x } from "react/jsx-runtime";
|
|
2
2
|
import { s as t, c as A, d as ce } from "./useSdkFeature.js";
|
|
3
3
|
import { useStore as S } from "@nanostores/react";
|
|
4
|
-
import { useState as E, useLayoutEffect as
|
|
5
|
-
import { o as de, I as pe, s as ue, c as
|
|
6
|
-
import { QuestionType as m, QuestionStatus as
|
|
4
|
+
import { useState as E, useLayoutEffect as Re, useCallback as B, useEffect as ee, useMemo as V, PureComponent as we, useTransition as ke } from "react";
|
|
5
|
+
import { o as de, I as pe, s as ue, c as Te, q as xe, J as me, n as he, F as Se, h as qe, a as Ee, p as Ve, C as Ne, b as Ie, m as De, d as Le, l as Pe, e as Oe, V as Qe, f as Me } from "./masters2.js";
|
|
6
|
+
import { QuestionType as m, QuestionStatus as N, QuestionImages as j, PickHistoryStatus as F } from "@streamlayer/sdk-web-types";
|
|
7
7
|
import "react-countup";
|
|
8
|
-
import { CountdownCircleTimer as
|
|
9
|
-
import { E as
|
|
10
|
-
import
|
|
8
|
+
import { CountdownCircleTimer as _e } from "react-countdown-circle-timer";
|
|
9
|
+
import { E as D } from "./index2.js";
|
|
10
|
+
import je from "react-infinite-scroller";
|
|
11
11
|
import "lodash.throttle";
|
|
12
12
|
import "@streamlayer/sdk-web-interfaces";
|
|
13
13
|
import "@streamlayer/sdk-web-notifications";
|
|
14
14
|
import "./useStreamLayerApp.js";
|
|
15
15
|
import "@streamlayer/sdk-web";
|
|
16
|
-
const
|
|
16
|
+
const Ue = /* @__PURE__ */ t("div")({
|
|
17
17
|
name: "Container",
|
|
18
18
|
class: "c1vwopgc",
|
|
19
19
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
20
|
+
}), Be = /* @__PURE__ */ t("div")({
|
|
21
21
|
name: "QuestionTypeWrap",
|
|
22
22
|
class: "qyktpt0",
|
|
23
23
|
propsAsIs: !1
|
|
24
|
-
}),
|
|
24
|
+
}), ze = () => A, Fe = /* @__PURE__ */ t(ze())({
|
|
25
25
|
name: "QuestionTypeIcon",
|
|
26
26
|
class: "q951jdx",
|
|
27
27
|
propsAsIs: !0
|
|
28
|
-
}),
|
|
28
|
+
}), We = /* @__PURE__ */ t("span")({
|
|
29
29
|
name: "QuestionTypeTitle",
|
|
30
30
|
class: "qss5f0e",
|
|
31
31
|
propsAsIs: !1
|
|
32
|
-
}),
|
|
32
|
+
}), Ze = /* @__PURE__ */ t("div")({
|
|
33
33
|
name: "CloseIconWrap",
|
|
34
34
|
class: "c1ao1jtv",
|
|
35
35
|
propsAsIs: !1
|
|
36
|
-
}),
|
|
36
|
+
}), He = () => A, Ye = /* @__PURE__ */ t(He())({
|
|
37
37
|
name: "CloseIcon",
|
|
38
38
|
class: "cvsl7l3",
|
|
39
39
|
propsAsIs: !0
|
|
40
|
-
}),
|
|
41
|
-
const
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
(
|
|
45
|
-
|
|
40
|
+
}), ve = ({ type: e, close: n, label: i }) => {
|
|
41
|
+
const o = e ? de[e] : { label: i, iconName: void 0 };
|
|
42
|
+
return /* @__PURE__ */ c(Ue, { children: [
|
|
43
|
+
/* @__PURE__ */ c(Be, { children: [
|
|
44
|
+
(o == null ? void 0 : o.iconName) && /* @__PURE__ */ s(
|
|
45
|
+
Fe,
|
|
46
46
|
{
|
|
47
47
|
"data-type-trivia": e === m.TRIVIA,
|
|
48
48
|
"data-type-poll": e === m.POLL,
|
|
49
|
-
name:
|
|
49
|
+
name: o.iconName
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
(
|
|
52
|
+
(o == null ? void 0 : o.label) && /* @__PURE__ */ s(We, { children: o.label })
|
|
53
53
|
] }),
|
|
54
|
-
/* @__PURE__ */ s(
|
|
54
|
+
/* @__PURE__ */ s(Ze, { onClick: n, children: /* @__PURE__ */ s(Ye, { name: "icon-cross" }) })
|
|
55
55
|
] });
|
|
56
|
-
},
|
|
56
|
+
}, Ge = /* @__PURE__ */ t("div")({
|
|
57
57
|
name: "Container",
|
|
58
58
|
class: "c1zy8a",
|
|
59
59
|
propsAsIs: !1
|
|
60
|
-
}),
|
|
60
|
+
}), Je = /* @__PURE__ */ t("div")({
|
|
61
61
|
name: "Title",
|
|
62
62
|
class: "t1vih9p5",
|
|
63
63
|
propsAsIs: !1
|
|
@@ -65,41 +65,41 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
65
65
|
name: "Indicator",
|
|
66
66
|
class: "i1fbnvpb",
|
|
67
67
|
propsAsIs: !1
|
|
68
|
-
}), te = ({ indicator: e, title: n }) => /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */ s(
|
|
68
|
+
}), te = ({ indicator: e, title: n }) => /* @__PURE__ */ c(Ge, { children: [
|
|
69
|
+
/* @__PURE__ */ s(Je, { children: n }),
|
|
70
70
|
/* @__PURE__ */ s(Ke, { children: e })
|
|
71
71
|
] }), Xe = /* @__PURE__ */ t("div")({
|
|
72
72
|
name: "Container",
|
|
73
73
|
class: "ctmhwyc",
|
|
74
74
|
propsAsIs: !1
|
|
75
|
-
}),
|
|
75
|
+
}), es = /* @__PURE__ */ t("div")({
|
|
76
76
|
name: "Indicator",
|
|
77
77
|
class: "i1jri200",
|
|
78
78
|
propsAsIs: !1
|
|
79
|
-
}),
|
|
79
|
+
}), ss = /* @__PURE__ */ t("div")({
|
|
80
80
|
name: "Title",
|
|
81
81
|
class: "t8s05oq",
|
|
82
82
|
propsAsIs: !1
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ s(
|
|
85
|
-
/* @__PURE__ */ s(
|
|
86
|
-
] }),
|
|
83
|
+
}), W = ({ indicator: e, title: n }) => /* @__PURE__ */ c(Xe, { children: [
|
|
84
|
+
/* @__PURE__ */ s(es, { children: e }),
|
|
85
|
+
/* @__PURE__ */ s(ss, { children: n })
|
|
86
|
+
] }), ns = /* @__PURE__ */ t("div")({
|
|
87
87
|
name: "Container",
|
|
88
88
|
class: "c1yrpn9o",
|
|
89
89
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
90
|
+
}), ts = /* @__PURE__ */ t("div")({
|
|
91
91
|
name: "TopInfo",
|
|
92
92
|
class: "t17fwahh",
|
|
93
93
|
propsAsIs: !1
|
|
94
|
-
}),
|
|
94
|
+
}), os = /* @__PURE__ */ t("div")({
|
|
95
95
|
name: "BottomInfo",
|
|
96
96
|
class: "by6w7e9",
|
|
97
97
|
propsAsIs: !1
|
|
98
|
-
}),
|
|
98
|
+
}), is = /* @__PURE__ */ t("div")({
|
|
99
99
|
name: "User",
|
|
100
100
|
class: "u1g7arbm",
|
|
101
101
|
propsAsIs: !1
|
|
102
|
-
}),
|
|
102
|
+
}), rs = /* @__PURE__ */ t("img")({
|
|
103
103
|
name: "Avatar",
|
|
104
104
|
class: "a1ldeata",
|
|
105
105
|
propsAsIs: !1
|
|
@@ -107,131 +107,131 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
107
107
|
name: "UserInfo",
|
|
108
108
|
class: "u10d4koz",
|
|
109
109
|
propsAsIs: !1
|
|
110
|
-
}),
|
|
110
|
+
}), ls = /* @__PURE__ */ t("div")({
|
|
111
111
|
name: "UserName",
|
|
112
112
|
class: "u1q6roj0",
|
|
113
113
|
propsAsIs: !1
|
|
114
|
-
}),
|
|
114
|
+
}), cs = /* @__PURE__ */ t("div")({
|
|
115
115
|
name: "UserRating",
|
|
116
116
|
class: "ui0m425",
|
|
117
117
|
propsAsIs: !1
|
|
118
|
-
}),
|
|
118
|
+
}), ds = /* @__PURE__ */ t("img")({
|
|
119
119
|
name: "TrophyIcon",
|
|
120
120
|
class: "t1el3mrn",
|
|
121
121
|
propsAsIs: !1
|
|
122
|
-
}),
|
|
122
|
+
}), ps = /* @__PURE__ */ t("div")({
|
|
123
123
|
name: "Rts",
|
|
124
124
|
class: "r2vgnxv",
|
|
125
125
|
propsAsIs: !1
|
|
126
|
-
}),
|
|
126
|
+
}), us = /* @__PURE__ */ t("div")({
|
|
127
127
|
name: "RtsIndicator",
|
|
128
128
|
class: "roqn06j",
|
|
129
129
|
propsAsIs: !1
|
|
130
|
-
}),
|
|
130
|
+
}), ms = /* @__PURE__ */ t("div")({
|
|
131
131
|
name: "RtsLabel",
|
|
132
132
|
class: "r15adx7c",
|
|
133
133
|
propsAsIs: !1
|
|
134
|
-
}),
|
|
134
|
+
}), hs = /* @__PURE__ */ t("div")({
|
|
135
135
|
name: "Divider",
|
|
136
136
|
class: "dv59lta",
|
|
137
137
|
propsAsIs: !1
|
|
138
|
-
}),
|
|
138
|
+
}), Is = /* @__PURE__ */ t("div")({
|
|
139
139
|
name: "Ranks",
|
|
140
140
|
class: "r55lotb",
|
|
141
141
|
propsAsIs: !1
|
|
142
|
-
}),
|
|
142
|
+
}), vs = /* @__PURE__ */ t("div")({
|
|
143
143
|
name: "Statistics",
|
|
144
144
|
class: "s1knfgqt",
|
|
145
145
|
propsAsIs: !1
|
|
146
|
-
}),
|
|
146
|
+
}), Cs = /* @__PURE__ */ t("div")({
|
|
147
147
|
name: "AvatarPlaceholder",
|
|
148
148
|
class: "a1mqo824",
|
|
149
149
|
propsAsIs: !1
|
|
150
|
-
}),
|
|
150
|
+
}), fs = /* @__PURE__ */ t("button")({
|
|
151
151
|
name: "UserAccountBtn",
|
|
152
152
|
class: "uxareh6",
|
|
153
153
|
propsAsIs: !1
|
|
154
|
-
}),
|
|
154
|
+
}), As = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", Ce = ({
|
|
155
155
|
avatar: e,
|
|
156
156
|
name: n,
|
|
157
|
-
points:
|
|
158
|
-
friendsRank:
|
|
159
|
-
rank:
|
|
160
|
-
streak:
|
|
161
|
-
correct:
|
|
162
|
-
incorrect:
|
|
163
|
-
inTop:
|
|
157
|
+
points: i,
|
|
158
|
+
friendsRank: o,
|
|
159
|
+
rank: r,
|
|
160
|
+
streak: d,
|
|
161
|
+
correct: p,
|
|
162
|
+
incorrect: a,
|
|
163
|
+
inTop: l,
|
|
164
164
|
successRate: u
|
|
165
|
-
}) => /* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */ s(
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
e && /* @__PURE__ */ s(
|
|
169
|
-
!e && /* @__PURE__ */ s(
|
|
165
|
+
}) => /* @__PURE__ */ c(ns, { children: [
|
|
166
|
+
/* @__PURE__ */ s(ts, { children: /* @__PURE__ */ c(is, { children: [
|
|
167
|
+
/* @__PURE__ */ c(fs, { children: [
|
|
168
|
+
e && /* @__PURE__ */ s(rs, { alt: "avatar", src: e }),
|
|
169
|
+
!e && /* @__PURE__ */ s(Cs, { children: pe(n || "") })
|
|
170
170
|
] }),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */ s(
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */ s(
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
ue(
|
|
178
|
-
/* @__PURE__ */ s(
|
|
171
|
+
/* @__PURE__ */ c(as, { children: [
|
|
172
|
+
/* @__PURE__ */ s(ls, { children: n }),
|
|
173
|
+
/* @__PURE__ */ c(cs, { children: [
|
|
174
|
+
/* @__PURE__ */ c(ps, { children: [
|
|
175
|
+
/* @__PURE__ */ s(ds, { alt: "rank-icon", src: As }),
|
|
176
|
+
/* @__PURE__ */ c(us, { children: [
|
|
177
|
+
ue(i),
|
|
178
|
+
/* @__PURE__ */ s(ms, { children: "PTS" })
|
|
179
179
|
] })
|
|
180
180
|
] }),
|
|
181
|
-
/* @__PURE__ */ s(
|
|
182
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ s(hs, {}),
|
|
182
|
+
/* @__PURE__ */ c("div", { children: [
|
|
183
183
|
"TOP ",
|
|
184
|
-
|
|
184
|
+
l || 0,
|
|
185
185
|
"%"
|
|
186
186
|
] })
|
|
187
187
|
] })
|
|
188
188
|
] })
|
|
189
189
|
] }) }),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */ s(te, { indicator:
|
|
193
|
-
/* @__PURE__ */ s(te, { indicator:
|
|
190
|
+
/* @__PURE__ */ c(os, { children: [
|
|
191
|
+
/* @__PURE__ */ c(Is, { children: [
|
|
192
|
+
/* @__PURE__ */ s(te, { indicator: o || 0, title: "Friends rank" }),
|
|
193
|
+
/* @__PURE__ */ s(te, { indicator: r || 0, title: "Global rank" })
|
|
194
194
|
] }),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */ s(
|
|
197
|
-
/* @__PURE__ */ s(
|
|
198
|
-
/* @__PURE__ */ s(
|
|
199
|
-
/* @__PURE__ */ s(
|
|
195
|
+
/* @__PURE__ */ c(vs, { children: [
|
|
196
|
+
/* @__PURE__ */ s(W, { indicator: d || 0, title: "Win streak" }),
|
|
197
|
+
/* @__PURE__ */ s(W, { indicator: p || 0, title: "Correct" }),
|
|
198
|
+
/* @__PURE__ */ s(W, { indicator: a || 0, title: "Incorrect" }),
|
|
199
|
+
/* @__PURE__ */ s(W, { indicator: `${u || 0}%`, title: "Succ. rate" })
|
|
200
200
|
] })
|
|
201
201
|
] })
|
|
202
|
-
] }),
|
|
202
|
+
] }), $s = /* @__PURE__ */ t("div")({
|
|
203
203
|
name: "SponsorLogoWrap",
|
|
204
204
|
class: "s8p5v5z",
|
|
205
205
|
propsAsIs: !1
|
|
206
|
-
}),
|
|
206
|
+
}), gs = () => A, bs = /* @__PURE__ */ t(gs())({
|
|
207
207
|
name: "SponsorLogo",
|
|
208
208
|
class: "s755yti",
|
|
209
209
|
propsAsIs: !0
|
|
210
|
-
}),
|
|
211
|
-
children: /* @__PURE__ */ s(
|
|
210
|
+
}), ys = () => /* @__PURE__ */ s($s, {
|
|
211
|
+
children: /* @__PURE__ */ s(bs, {
|
|
212
212
|
name: "mastersLogo"
|
|
213
213
|
})
|
|
214
|
-
}),
|
|
214
|
+
}), Rs = /* @__PURE__ */ t("div")({
|
|
215
215
|
name: "Container",
|
|
216
216
|
class: "c38csyt",
|
|
217
217
|
propsAsIs: !1
|
|
218
|
-
}),
|
|
218
|
+
}), ws = /* @__PURE__ */ t("div")({
|
|
219
219
|
name: "Title",
|
|
220
220
|
class: "ty221rx",
|
|
221
221
|
propsAsIs: !1
|
|
222
|
-
}),
|
|
222
|
+
}), ks = /* @__PURE__ */ t("div")({
|
|
223
223
|
name: "Description",
|
|
224
224
|
class: "dlaj9xp",
|
|
225
225
|
propsAsIs: !1
|
|
226
|
-
}),
|
|
226
|
+
}), Ts = ({ title: e, description: n }) => /* @__PURE__ */ c(Rs, { children: [
|
|
227
227
|
/* @__PURE__ */ s(A, { name: "icon-check-circle" }),
|
|
228
|
-
/* @__PURE__ */ s(
|
|
229
|
-
/* @__PURE__ */ s(
|
|
230
|
-
] }),
|
|
228
|
+
/* @__PURE__ */ s(ws, { children: e }),
|
|
229
|
+
/* @__PURE__ */ s(ks, { children: n })
|
|
230
|
+
] }), xs = /* @__PURE__ */ t("div")({
|
|
231
231
|
name: "Container",
|
|
232
232
|
class: "c16sbdnm",
|
|
233
233
|
propsAsIs: !1
|
|
234
|
-
}),
|
|
234
|
+
}), Ss = () => A, qs = /* @__PURE__ */ t(Ss())({
|
|
235
235
|
name: "IconPrediction",
|
|
236
236
|
class: "ibhorgl",
|
|
237
237
|
propsAsIs: !0
|
|
@@ -239,11 +239,11 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
239
239
|
name: "FeedbackIconWrap",
|
|
240
240
|
class: "f1g20ja7",
|
|
241
241
|
propsAsIs: !1
|
|
242
|
-
}),
|
|
242
|
+
}), Z = /* @__PURE__ */ t("div")({
|
|
243
243
|
name: "FeedbackHeader",
|
|
244
244
|
class: "f455ozj",
|
|
245
245
|
propsAsIs: !1
|
|
246
|
-
}),
|
|
246
|
+
}), Es = /* @__PURE__ */ t("span")({
|
|
247
247
|
name: "FeedbackTitle",
|
|
248
248
|
class: "f1913njx",
|
|
249
249
|
propsAsIs: !1
|
|
@@ -251,62 +251,62 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
251
251
|
name: "FeedbackDescription",
|
|
252
252
|
class: "fzfk69z",
|
|
253
253
|
propsAsIs: !1
|
|
254
|
-
}),
|
|
254
|
+
}), X = /* @__PURE__ */ t("div")({
|
|
255
255
|
name: "FeedbackText",
|
|
256
256
|
class: "fx87qaj",
|
|
257
257
|
propsAsIs: !1
|
|
258
|
-
}),
|
|
258
|
+
}), Vs = ({
|
|
259
259
|
feedbackMessages: e,
|
|
260
260
|
questionVotedCorrectly: n,
|
|
261
|
-
questionVoted:
|
|
262
|
-
questionType:
|
|
263
|
-
hasCorrectAnswer:
|
|
264
|
-
questionStatus:
|
|
265
|
-
showExpiredNotification:
|
|
266
|
-
showClosedNotificationTrivia:
|
|
267
|
-
votedInCurrentRender:
|
|
261
|
+
questionVoted: i,
|
|
262
|
+
questionType: o,
|
|
263
|
+
hasCorrectAnswer: r,
|
|
264
|
+
questionStatus: d,
|
|
265
|
+
showExpiredNotification: p,
|
|
266
|
+
showClosedNotificationTrivia: a,
|
|
267
|
+
votedInCurrentRender: l,
|
|
268
268
|
votedAfterQuestionClosed: u,
|
|
269
269
|
enteredAnActiveQuestion: h,
|
|
270
270
|
marketClosed: C
|
|
271
271
|
}) => {
|
|
272
|
-
const I =
|
|
273
|
-
if (!
|
|
272
|
+
const I = i && (o === m.TRIVIA || o === m.PREDICTION) && l && d !== N.RESOLVED, f = o === m.PREDICTION && !r, k = C && o === m.PREDICTION && !i && !h || o === m.PREDICTION && u && l && h, g = I && f, w = I && r, b = o === m.PREDICTION && i && l && r, L = i && o === m.POLL && l;
|
|
273
|
+
if (!p && !a && !g && !w && !k && !L && !b)
|
|
274
274
|
return null;
|
|
275
275
|
const q = n ? "correct" : "incorrect", T = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
276
|
-
return /* @__PURE__ */
|
|
277
|
-
|
|
276
|
+
return /* @__PURE__ */ c(xs, { "data-isPrediction": f, children: [
|
|
277
|
+
p && /* @__PURE__ */ c(x, { children: [
|
|
278
278
|
/* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */ s(
|
|
281
|
-
/* @__PURE__ */ s(
|
|
279
|
+
/* @__PURE__ */ c("div", { children: [
|
|
280
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(Q, { children: "Question Expired" }) }),
|
|
281
|
+
/* @__PURE__ */ s(X, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
282
282
|
] })
|
|
283
283
|
] }),
|
|
284
|
-
|
|
284
|
+
a && /* @__PURE__ */ c(x, { children: [
|
|
285
285
|
/* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */ s(
|
|
288
|
-
/* @__PURE__ */ s(
|
|
286
|
+
/* @__PURE__ */ c("div", { children: [
|
|
287
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
|
|
288
|
+
/* @__PURE__ */ s(X, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
289
289
|
] })
|
|
290
290
|
] }),
|
|
291
|
-
k && /* @__PURE__ */
|
|
291
|
+
k && /* @__PURE__ */ c(x, { children: [
|
|
292
292
|
/* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */ s(
|
|
295
|
-
/* @__PURE__ */ s(
|
|
293
|
+
/* @__PURE__ */ c("div", { children: [
|
|
294
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
|
|
295
|
+
/* @__PURE__ */ s(X, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
296
296
|
] })
|
|
297
297
|
] }),
|
|
298
|
-
g && /* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */ s(
|
|
298
|
+
g && /* @__PURE__ */ c(x, { children: [
|
|
299
|
+
/* @__PURE__ */ s(qs, { name: "icon-prediction" }),
|
|
300
300
|
/* @__PURE__ */ s(Q, { children: "Stay tuned to see if your prediction was correct." })
|
|
301
301
|
] }),
|
|
302
|
-
|
|
302
|
+
L && /* @__PURE__ */ c(x, { children: [
|
|
303
303
|
/* @__PURE__ */ s(U, { "data-feedback-type": "correct", children: /* @__PURE__ */ s(A, { name: "correct" }) }),
|
|
304
304
|
/* @__PURE__ */ s(Q, { children: "Thanks for answering. Please stay tuned for the next question." })
|
|
305
305
|
] }),
|
|
306
|
-
(w || b) && /* @__PURE__ */
|
|
306
|
+
(w || b) && /* @__PURE__ */ c(x, { children: [
|
|
307
307
|
/* @__PURE__ */ s(U, { "data-feedback-type": q, children: /* @__PURE__ */ s(A, { name: q }) }),
|
|
308
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */ s(
|
|
308
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ c(Z, { children: [
|
|
309
|
+
/* @__PURE__ */ s(Es, { "data-feedback-type": q, children: T == null ? void 0 : T.title }),
|
|
310
310
|
/* @__PURE__ */ s(Q, { children: T == null ? void 0 : T.description })
|
|
311
311
|
] }) })
|
|
312
312
|
] })
|
|
@@ -315,67 +315,67 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
315
315
|
name: "Container",
|
|
316
316
|
class: "c14ielyq",
|
|
317
317
|
propsAsIs: !1
|
|
318
|
-
}), Ds = () =>
|
|
318
|
+
}), Ds = () => Te, Ls = /* @__PURE__ */ t(Ds())({
|
|
319
319
|
name: "QuestionScrollContainer",
|
|
320
320
|
class: "q1tlqx57",
|
|
321
321
|
propsAsIs: !0
|
|
322
|
-
}),
|
|
322
|
+
}), Ps = /* @__PURE__ */ t("div")({
|
|
323
323
|
name: "Content",
|
|
324
324
|
class: "c1hq58md",
|
|
325
325
|
propsAsIs: !1
|
|
326
|
-
}),
|
|
326
|
+
}), Os = /* @__PURE__ */ t("div")({
|
|
327
327
|
name: "Title",
|
|
328
328
|
class: "t1c8nxcx",
|
|
329
329
|
propsAsIs: !1
|
|
330
|
-
}),
|
|
330
|
+
}), Qs = /* @__PURE__ */ t("div")({
|
|
331
331
|
name: "Options",
|
|
332
332
|
class: "oiozuc3",
|
|
333
333
|
propsAsIs: !1
|
|
334
|
-
}),
|
|
334
|
+
}), Ms = /* @__PURE__ */ t("button")({
|
|
335
335
|
name: "ButtonContainer",
|
|
336
336
|
class: "b1b6dl8t",
|
|
337
337
|
propsAsIs: !1
|
|
338
|
-
}),
|
|
338
|
+
}), _s = /* @__PURE__ */ t("div")({
|
|
339
339
|
name: "ButtonPct",
|
|
340
340
|
class: "b4iik8i",
|
|
341
341
|
propsAsIs: !1
|
|
342
|
-
}),
|
|
342
|
+
}), js = /* @__PURE__ */ t("span")({
|
|
343
343
|
name: "ButtonBody",
|
|
344
344
|
class: "b1gq1lnf",
|
|
345
345
|
propsAsIs: !1
|
|
346
|
-
}),
|
|
346
|
+
}), Us = /* @__PURE__ */ t("div")({
|
|
347
347
|
name: "IconContainer",
|
|
348
348
|
class: "i1j65z51",
|
|
349
349
|
propsAsIs: !1
|
|
350
|
-
}),
|
|
350
|
+
}), Bs = /* @__PURE__ */ t("div")({
|
|
351
351
|
name: "IconWrap",
|
|
352
352
|
class: "i19tpfua",
|
|
353
353
|
propsAsIs: !1
|
|
354
|
-
}),
|
|
354
|
+
}), fe = /* @__PURE__ */ t("img")({
|
|
355
355
|
name: "Icon",
|
|
356
356
|
class: "i1tubmma",
|
|
357
357
|
propsAsIs: !1
|
|
358
|
-
}),
|
|
358
|
+
}), zs = () => fe, Fs = /* @__PURE__ */ t(zs())({
|
|
359
359
|
name: "IconDefault",
|
|
360
360
|
class: "i1grrgwj",
|
|
361
361
|
propsAsIs: !0
|
|
362
|
-
}),
|
|
362
|
+
}), Ws = () => fe, Zs = /* @__PURE__ */ t(Ws())({
|
|
363
363
|
name: "IconCircle",
|
|
364
364
|
class: "ibemyq8",
|
|
365
365
|
propsAsIs: !0
|
|
366
|
-
}),
|
|
366
|
+
}), Hs = /* @__PURE__ */ t("span")({
|
|
367
367
|
name: "Title",
|
|
368
368
|
class: "t1dceht",
|
|
369
369
|
propsAsIs: !1
|
|
370
|
-
}),
|
|
370
|
+
}), Ys = /* @__PURE__ */ t("span")({
|
|
371
371
|
name: "Indicators",
|
|
372
372
|
class: "i116q4vq",
|
|
373
373
|
propsAsIs: !1
|
|
374
|
-
}),
|
|
374
|
+
}), Gs = /* @__PURE__ */ t("span")({
|
|
375
375
|
name: "Pts",
|
|
376
376
|
class: "p17ajcu2",
|
|
377
377
|
propsAsIs: !1
|
|
378
|
-
}),
|
|
378
|
+
}), Js = /* @__PURE__ */ t("span")({
|
|
379
379
|
name: "Percentage",
|
|
380
380
|
class: "pu9kmlb",
|
|
381
381
|
propsAsIs: !1
|
|
@@ -384,39 +384,39 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
384
384
|
class: "c1j2j0s0",
|
|
385
385
|
propsAsIs: !0
|
|
386
386
|
}), oe = {
|
|
387
|
-
[j.CENTERED]: (e) => /* @__PURE__ */ s(
|
|
388
|
-
[j.TRANSPARENT]: (e) => /* @__PURE__ */ s(
|
|
389
|
-
[j.ROUNDED]: (e) => /* @__PURE__ */ s(
|
|
387
|
+
[j.CENTERED]: (e) => /* @__PURE__ */ s(Fs, { alt: "option-icon", src: e }),
|
|
388
|
+
[j.TRANSPARENT]: (e) => /* @__PURE__ */ s(Us, { children: /* @__PURE__ */ s(Bs, { style: { backgroundImage: `url(${e})` } }) }),
|
|
389
|
+
[j.ROUNDED]: (e) => /* @__PURE__ */ s(Zs, { alt: "option-icon", src: e }),
|
|
390
390
|
[j.NONE]: () => null,
|
|
391
391
|
[j.UNSET]: () => null
|
|
392
|
-
},
|
|
393
|
-
if (e === m.POLL &&
|
|
392
|
+
}, en = ({ questionType: e, hasCorrectAnswer: n, correct: i, youVoted: o, questionVoted: r }) => {
|
|
393
|
+
if (e === m.POLL && o)
|
|
394
394
|
return "correct";
|
|
395
395
|
if (e === m.PREDICTION) {
|
|
396
|
-
if (n &&
|
|
397
|
-
return
|
|
398
|
-
if (
|
|
396
|
+
if (n && r)
|
|
397
|
+
return o ? i ? "correct" : "incorrect" : "unset";
|
|
398
|
+
if (o)
|
|
399
399
|
return "correct";
|
|
400
400
|
}
|
|
401
|
-
return e === m.TRIVIA &&
|
|
402
|
-
},
|
|
401
|
+
return e === m.TRIVIA && r && o ? i ? "correct" : "incorrect" : "unset";
|
|
402
|
+
}, sn = ({
|
|
403
403
|
questionType: e,
|
|
404
404
|
questionVoted: n,
|
|
405
|
-
correct:
|
|
406
|
-
hasCorrectAnswer:
|
|
407
|
-
questionStatus:
|
|
408
|
-
}) => e === m.TRIVIA ? n &&
|
|
405
|
+
correct: i,
|
|
406
|
+
hasCorrectAnswer: o,
|
|
407
|
+
questionStatus: r
|
|
408
|
+
}) => e === m.TRIVIA ? n && i : e === m.PREDICTION ? n && i && o || r === N.RESOLVED && i : !1, nn = (e) => {
|
|
409
409
|
var n;
|
|
410
410
|
const {
|
|
411
411
|
// option props
|
|
412
|
-
id:
|
|
413
|
-
icon:
|
|
414
|
-
text:
|
|
415
|
-
percentageDecimal:
|
|
416
|
-
points:
|
|
412
|
+
id: i,
|
|
413
|
+
icon: o,
|
|
414
|
+
text: r,
|
|
415
|
+
percentageDecimal: d,
|
|
416
|
+
points: p,
|
|
417
417
|
// extra props
|
|
418
|
-
onVote:
|
|
419
|
-
markThatVoted:
|
|
418
|
+
onVote: a,
|
|
419
|
+
markThatVoted: l,
|
|
420
420
|
youSelected: u,
|
|
421
421
|
questionVoted: h,
|
|
422
422
|
imageMode: C,
|
|
@@ -426,129 +426,129 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
426
426
|
questionType: g,
|
|
427
427
|
correct: w,
|
|
428
428
|
hasCorrectAnswer: b,
|
|
429
|
-
votedAfterQuestionClosed:
|
|
429
|
+
votedAfterQuestionClosed: L,
|
|
430
430
|
enteredAnActiveQuestion: q,
|
|
431
431
|
marketClosed: T
|
|
432
|
-
} = e, [M, z] = E(
|
|
433
|
-
return
|
|
434
|
-
|
|
435
|
-
z(
|
|
432
|
+
} = e, [M, z] = E(d), P = en(e), G = sn({ questionType: g, questionVoted: h, correct: w, hasCorrectAnswer: b, questionStatus: f }), v = T && g === m.PREDICTION, $ = h || v, y = g === m.PREDICTION && !h && !T, J = h && !u && P !== "incorrect";
|
|
433
|
+
return Re(() => {
|
|
434
|
+
d > 0 && (z(0), requestAnimationFrame(() => {
|
|
435
|
+
z(d);
|
|
436
436
|
}));
|
|
437
|
-
}, [
|
|
438
|
-
|
|
437
|
+
}, [d]), /* @__PURE__ */ c(
|
|
438
|
+
Ms,
|
|
439
439
|
{
|
|
440
|
-
value:
|
|
440
|
+
value: i,
|
|
441
441
|
"data-selected": u,
|
|
442
442
|
"data-answer-state": P,
|
|
443
|
-
disabled: h || k || I || v && !q || v && q &&
|
|
444
|
-
"data-is-not-checked":
|
|
445
|
-
onClick: (
|
|
446
|
-
|
|
447
|
-
g === m.PREDICTION ? T : f ===
|
|
448
|
-
),
|
|
443
|
+
disabled: h || k || I || v && !q || v && q && L,
|
|
444
|
+
"data-is-not-checked": J,
|
|
445
|
+
onClick: (K) => {
|
|
446
|
+
l(
|
|
447
|
+
g === m.PREDICTION ? T : f === N.RESOLVED
|
|
448
|
+
), a(K);
|
|
449
449
|
},
|
|
450
450
|
children: [
|
|
451
|
-
/* @__PURE__ */ s(
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
|
|
454
|
-
/* @__PURE__ */ s(
|
|
455
|
-
y && /* @__PURE__ */
|
|
456
|
-
|
|
457
|
-
/* @__PURE__ */ s(
|
|
451
|
+
/* @__PURE__ */ s(_s, { "data-answer-state": P, style: { width: `${$ ? M : 0}%` } }),
|
|
452
|
+
/* @__PURE__ */ c(js, { children: [
|
|
453
|
+
o && C && ((n = oe[C]) == null ? void 0 : n.call(oe, o)),
|
|
454
|
+
/* @__PURE__ */ s(Hs, { children: r }),
|
|
455
|
+
y && /* @__PURE__ */ c("div", { children: [
|
|
456
|
+
p,
|
|
457
|
+
/* @__PURE__ */ s(Gs, { children: "pts" })
|
|
458
458
|
] }),
|
|
459
|
-
$ && /* @__PURE__ */
|
|
459
|
+
$ && /* @__PURE__ */ c(Ys, { children: [
|
|
460
460
|
G && /* @__PURE__ */ s(Xs, { name: "selected" }),
|
|
461
|
-
/* @__PURE__ */ s(
|
|
461
|
+
/* @__PURE__ */ s(Js, { children: /* @__PURE__ */ s(ce, { value: d, suffix: "%" }) })
|
|
462
462
|
] })
|
|
463
463
|
] })
|
|
464
464
|
]
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
|
-
},
|
|
467
|
+
}, tn = [D.PRIMARY_GREEN1, D.SECONDARY_RED1, D.SECONDARY_RED1, D.NEUTRALS_GRAY3], on = [10, 10, 1, 0], rn = /* @__PURE__ */ t("div")({
|
|
468
468
|
name: "RemainingTime",
|
|
469
469
|
class: "r165427",
|
|
470
470
|
propsAsIs: !1
|
|
471
|
-
}), an =
|
|
471
|
+
}), an = D.SECONDARY_GREEN6, ie = D.SECONDARY_RED3, ln = D.NEUTRALS_GRAY3, cn = ({
|
|
472
472
|
isPlaying: e = !0,
|
|
473
473
|
duration: n = 30,
|
|
474
|
-
onTimerExpired:
|
|
474
|
+
onTimerExpired: i
|
|
475
475
|
}) => {
|
|
476
|
-
const [
|
|
477
|
-
remainingTime:
|
|
478
|
-
}) => /* @__PURE__ */ s(
|
|
479
|
-
children:
|
|
480
|
-
}),
|
|
481
|
-
|
|
482
|
-
}, [
|
|
483
|
-
|
|
484
|
-
}, [
|
|
485
|
-
return /* @__PURE__ */ s(
|
|
476
|
+
const [o, r] = E(n > 10 ? an : ie), d = ({
|
|
477
|
+
remainingTime: l
|
|
478
|
+
}) => /* @__PURE__ */ s(rn, {
|
|
479
|
+
children: l
|
|
480
|
+
}), p = B(() => {
|
|
481
|
+
i == null || i(), r(ln);
|
|
482
|
+
}, [i, r]), a = B((l) => {
|
|
483
|
+
l === 10 && r(ie);
|
|
484
|
+
}, [r]);
|
|
485
|
+
return /* @__PURE__ */ s(_e, {
|
|
486
486
|
isPlaying: e,
|
|
487
487
|
duration: n,
|
|
488
|
-
colors:
|
|
489
|
-
colorsTime:
|
|
488
|
+
colors: tn,
|
|
489
|
+
colorsTime: on,
|
|
490
490
|
size: 32,
|
|
491
491
|
strokeWidth: 2,
|
|
492
492
|
trailStrokeWidth: 2,
|
|
493
|
-
trailColor:
|
|
494
|
-
onComplete:
|
|
495
|
-
onUpdate:
|
|
496
|
-
children:
|
|
493
|
+
trailColor: o,
|
|
494
|
+
onComplete: p,
|
|
495
|
+
onUpdate: a,
|
|
496
|
+
children: d
|
|
497
497
|
});
|
|
498
|
-
},
|
|
498
|
+
}, dn = /* @__PURE__ */ t("div")({
|
|
499
499
|
name: "WinBarContainer",
|
|
500
500
|
class: "wie6cqo",
|
|
501
501
|
propsAsIs: !1
|
|
502
|
-
}),
|
|
502
|
+
}), pn = /* @__PURE__ */ t("div")({
|
|
503
503
|
name: "Content",
|
|
504
504
|
class: "cgizw4u",
|
|
505
505
|
propsAsIs: !1
|
|
506
|
-
}),
|
|
506
|
+
}), un = /* @__PURE__ */ t("div")({
|
|
507
507
|
name: "Title",
|
|
508
508
|
class: "t1l3ucjp",
|
|
509
509
|
propsAsIs: !1
|
|
510
|
-
}),
|
|
510
|
+
}), mn = () => A, hn = /* @__PURE__ */ t(mn())({
|
|
511
511
|
name: "WinIcon",
|
|
512
512
|
class: "wx7j799",
|
|
513
513
|
propsAsIs: !0
|
|
514
|
-
}),
|
|
514
|
+
}), In = /* @__PURE__ */ t("div")({
|
|
515
515
|
name: "Points",
|
|
516
516
|
class: "p4lwuj0",
|
|
517
517
|
propsAsIs: !1
|
|
518
|
-
}),
|
|
518
|
+
}), vn = /* @__PURE__ */ t("span")({
|
|
519
519
|
name: "PointsCount",
|
|
520
520
|
class: "po9i64o",
|
|
521
521
|
propsAsIs: !1
|
|
522
|
-
}),
|
|
522
|
+
}), Cn = /* @__PURE__ */ t("span")({
|
|
523
523
|
name: "PointsUnits",
|
|
524
524
|
class: "pe5g05h",
|
|
525
525
|
propsAsIs: !1
|
|
526
|
-
}),
|
|
526
|
+
}), fn = ({
|
|
527
527
|
title: e,
|
|
528
528
|
points: n,
|
|
529
|
-
isPlayingTimer:
|
|
530
|
-
isTimer:
|
|
531
|
-
animatePoints:
|
|
532
|
-
questionType:
|
|
533
|
-
timerDuration:
|
|
534
|
-
onTimerExpired:
|
|
535
|
-
}) => /* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
e && /* @__PURE__ */ s(
|
|
538
|
-
n !== void 0 &&
|
|
539
|
-
/* @__PURE__ */ s(
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */ s(
|
|
542
|
-
/* @__PURE__ */ s(
|
|
529
|
+
isPlayingTimer: i,
|
|
530
|
+
isTimer: o,
|
|
531
|
+
animatePoints: r,
|
|
532
|
+
questionType: d,
|
|
533
|
+
timerDuration: p,
|
|
534
|
+
onTimerExpired: a
|
|
535
|
+
}) => /* @__PURE__ */ c(dn, { style: { justifyContent: d === m.PREDICTION ? "center" : "space-between" }, children: [
|
|
536
|
+
/* @__PURE__ */ c(pn, { children: [
|
|
537
|
+
e && /* @__PURE__ */ s(un, { children: e }),
|
|
538
|
+
n !== void 0 && d !== m.POLL && /* @__PURE__ */ c(x, { children: [
|
|
539
|
+
/* @__PURE__ */ s(hn, { name: "icon-trophy" }),
|
|
540
|
+
/* @__PURE__ */ c(In, { children: [
|
|
541
|
+
/* @__PURE__ */ s(vn, { children: r ? /* @__PURE__ */ s(ce, { value: n, delay: 0.3 }) : n }),
|
|
542
|
+
/* @__PURE__ */ s(Cn, { children: "PTS" })
|
|
543
543
|
] })
|
|
544
544
|
] })
|
|
545
545
|
] }),
|
|
546
|
-
|
|
547
|
-
] }),
|
|
548
|
-
var
|
|
549
|
-
const
|
|
546
|
+
o && d !== m.PREDICTION && /* @__PURE__ */ s(cn, { isPlaying: i, onTimerExpired: a, duration: p })
|
|
547
|
+
] }), An = ({ openedQuestion: e, isLoading: n, vote: i, close: o }) => {
|
|
548
|
+
var r, d;
|
|
549
|
+
const p = e.subject, a = e.type, l = e.status, u = (r = e.options) == null ? void 0 : r.options, h = e.marketClosed, [C, I] = E(!1), [f, k] = E(!1), [g, w] = E(!0), [b, L] = E(!1), [q, T] = E(""), M = e == null ? void 0 : e.id;
|
|
550
550
|
ee(() => {
|
|
551
|
-
|
|
551
|
+
a === m.PREDICTION ? h && w(!1) : l === N.RESOLVED && w(!1);
|
|
552
552
|
}, []);
|
|
553
553
|
const z = B((R) => {
|
|
554
554
|
k(R), I(!0);
|
|
@@ -556,22 +556,22 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
556
556
|
async (R) => {
|
|
557
557
|
if (M) {
|
|
558
558
|
const _ = R.currentTarget.value;
|
|
559
|
-
T(_), await
|
|
559
|
+
T(_), await i(M, _);
|
|
560
560
|
}
|
|
561
561
|
},
|
|
562
|
-
[M, T,
|
|
562
|
+
[M, T, i]
|
|
563
563
|
), G = B(() => {
|
|
564
|
-
|
|
565
|
-
}, [
|
|
564
|
+
L(!0), setTimeout(o, 3e3);
|
|
565
|
+
}, [o]), v = V(
|
|
566
566
|
() => e == null ? void 0 : e.answers.find((R) => R.youVoted === !0),
|
|
567
567
|
[e]
|
|
568
|
-
), $ =
|
|
568
|
+
), $ = V(
|
|
569
569
|
() => !!(e != null && e.answers.find((R) => R.correct === !0)),
|
|
570
570
|
[e]
|
|
571
|
-
), y =
|
|
571
|
+
), y = V(
|
|
572
572
|
() => e == null ? void 0 : e.answers.find((R) => R.correct === !0),
|
|
573
573
|
[e]
|
|
574
|
-
),
|
|
574
|
+
), J = V(() => e ? e.answers.map((R) => {
|
|
575
575
|
var _;
|
|
576
576
|
return {
|
|
577
577
|
...R,
|
|
@@ -581,7 +581,7 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
581
581
|
hasCorrectAnswer: $,
|
|
582
582
|
questionType: e.type,
|
|
583
583
|
answerTimeExpired: b,
|
|
584
|
-
questionStatus:
|
|
584
|
+
questionStatus: l,
|
|
585
585
|
imageMode: (_ = e.appearance) == null ? void 0 : _.images,
|
|
586
586
|
onVote: P
|
|
587
587
|
};
|
|
@@ -591,33 +591,33 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
591
591
|
n,
|
|
592
592
|
e,
|
|
593
593
|
v,
|
|
594
|
-
|
|
594
|
+
l,
|
|
595
595
|
P,
|
|
596
596
|
q
|
|
597
|
-
]),
|
|
598
|
-
if (
|
|
597
|
+
]), K = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, O = l === N.RESOLVED && a === m.TRIVIA && !v && !g, se = a === m.TRIVIA && f && C && g, ne = V(() => a === m.PREDICTION ? !!(v && !$ || v && $ && y != null && y.youVoted) : !0, [a, v, $, y]), $e = V(() => {
|
|
598
|
+
if (a === m.PREDICTION && v && (!$ || $ && y != null && y.youVoted))
|
|
599
599
|
return v.points;
|
|
600
600
|
if (!(O || b))
|
|
601
|
-
return
|
|
601
|
+
return l === N.RESOLVED ? 0 : v ? v.correct ? v.points : 0 : y == null ? void 0 : y.points;
|
|
602
602
|
}, [
|
|
603
603
|
b,
|
|
604
604
|
v,
|
|
605
605
|
y,
|
|
606
|
-
d,
|
|
607
|
-
O,
|
|
608
606
|
l,
|
|
607
|
+
O,
|
|
608
|
+
a,
|
|
609
609
|
$
|
|
610
|
-
]),
|
|
611
|
-
return /* @__PURE__ */ s(Ls, { children: /* @__PURE__ */ s(Ns, { children: /* @__PURE__ */
|
|
610
|
+
]), ge = V(() => a === m.PREDICTION && v ? $ ? $ && y != null && y.youVoted ? "You won" : "" : "To win" : O || b ? "Time expired" : a === m.POLL ? "Time remaining" : v ? "You won" : "To win", [b, a, v, O, $, y]), be = (a === m.TRIVIA || a === m.PREDICTION) && v && $ && (y == null ? void 0 : y.youVoted), ye = v || O || se || a === m.TRIVIA && l === N.RESOLVED && g;
|
|
611
|
+
return /* @__PURE__ */ s(Ls, { children: /* @__PURE__ */ s(Ns, { children: /* @__PURE__ */ c(Ps, { children: [
|
|
612
612
|
/* @__PURE__ */ s(
|
|
613
|
-
|
|
613
|
+
Vs,
|
|
614
614
|
{
|
|
615
|
-
feedbackMessages:
|
|
615
|
+
feedbackMessages: K,
|
|
616
616
|
questionVoted: !!v,
|
|
617
617
|
questionVotedCorrectly: v == null ? void 0 : v.correct,
|
|
618
|
-
questionType:
|
|
618
|
+
questionType: a,
|
|
619
619
|
hasCorrectAnswer: $,
|
|
620
|
-
questionStatus:
|
|
620
|
+
questionStatus: l,
|
|
621
621
|
showExpiredNotification: O,
|
|
622
622
|
showClosedNotificationTrivia: se,
|
|
623
623
|
votedInCurrentRender: C,
|
|
@@ -627,28 +627,28 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
627
627
|
}
|
|
628
628
|
),
|
|
629
629
|
ne && /* @__PURE__ */ s(
|
|
630
|
-
|
|
630
|
+
fn,
|
|
631
631
|
{
|
|
632
|
-
title:
|
|
633
|
-
points:
|
|
632
|
+
title: ge,
|
|
633
|
+
points: $e,
|
|
634
634
|
onTimerExpired: G,
|
|
635
635
|
questionType: e.type,
|
|
636
636
|
isTimer: !n,
|
|
637
637
|
isPlayingTimer: !v,
|
|
638
|
-
animatePoints:
|
|
639
|
-
timerDuration:
|
|
638
|
+
animatePoints: be,
|
|
639
|
+
timerDuration: ye ? 0 : Number(((d = e == null ? void 0 : e.appearance) == null ? void 0 : d.autoHideInterval) || "30")
|
|
640
640
|
}
|
|
641
641
|
),
|
|
642
642
|
b ? /* @__PURE__ */ s(
|
|
643
|
-
|
|
643
|
+
Ts,
|
|
644
644
|
{
|
|
645
645
|
title: "More to come...",
|
|
646
646
|
description: "Watch for additional enhanced stream interactive experience."
|
|
647
647
|
}
|
|
648
|
-
) : /* @__PURE__ */
|
|
649
|
-
/* @__PURE__ */ s(
|
|
650
|
-
/* @__PURE__ */ s(
|
|
651
|
-
|
|
648
|
+
) : /* @__PURE__ */ c(x, { children: [
|
|
649
|
+
/* @__PURE__ */ s(Os, { style: ne ? {} : { marginTop: 0 }, children: p }),
|
|
650
|
+
/* @__PURE__ */ s(Qs, { children: J.map((R) => /* @__PURE__ */ s(
|
|
651
|
+
nn,
|
|
652
652
|
{
|
|
653
653
|
...R,
|
|
654
654
|
markThatVoted: z,
|
|
@@ -660,108 +660,125 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
660
660
|
)) })
|
|
661
661
|
] })
|
|
662
662
|
] }) }) });
|
|
663
|
-
},
|
|
663
|
+
}, $n = /* @__PURE__ */ t("div")({
|
|
664
664
|
name: "Container",
|
|
665
665
|
class: "cgn5uen",
|
|
666
666
|
propsAsIs: !1
|
|
667
|
-
}),
|
|
667
|
+
}), gn = /* @__PURE__ */ t("div")({
|
|
668
668
|
name: "Content",
|
|
669
669
|
class: "c1px8nt6",
|
|
670
670
|
propsAsIs: !1
|
|
671
|
-
}),
|
|
671
|
+
}), bn = /* @__PURE__ */ t("h3")({
|
|
672
672
|
name: "Title",
|
|
673
673
|
class: "t5et2jt",
|
|
674
674
|
propsAsIs: !1
|
|
675
|
-
}),
|
|
675
|
+
}), yn = /* @__PURE__ */ t("div")({
|
|
676
676
|
name: "Description",
|
|
677
677
|
class: "d1i2kpk2",
|
|
678
678
|
propsAsIs: !1
|
|
679
|
-
}),
|
|
679
|
+
}), Rn = /* @__PURE__ */ t("img")({
|
|
680
680
|
name: "Image",
|
|
681
681
|
class: "id3lh3p",
|
|
682
682
|
propsAsIs: !1
|
|
683
|
-
}),
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
683
|
+
}), Ae = ({
|
|
684
|
+
instantView: e,
|
|
685
|
+
isDetail: n,
|
|
686
|
+
notification: i,
|
|
687
|
+
controlVideo: o
|
|
688
|
+
}) => {
|
|
689
|
+
const r = e == null ? void 0 : e.heading, d = e == null ? void 0 : e.body, p = r || d, a = i == null ? void 0 : i.title, l = i == null ? void 0 : i.body;
|
|
690
|
+
return /* @__PURE__ */ c($n, { children: [
|
|
691
|
+
(e == null ? void 0 : e.video) && /* @__PURE__ */ s(
|
|
692
|
+
xe,
|
|
693
|
+
{
|
|
694
|
+
source: e.video.url,
|
|
695
|
+
poster: e.video.thumbnailUrl,
|
|
696
|
+
controlVideo: o
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
(e == null ? void 0 : e.image) && !(e != null && e.video) && /* @__PURE__ */ s(Rn, { src: e == null ? void 0 : e.image }),
|
|
700
|
+
/* @__PURE__ */ c(gn, { children: [
|
|
701
|
+
/* @__PURE__ */ s(bn, { children: n && p ? r : a }),
|
|
702
|
+
/* @__PURE__ */ s(yn, { children: n && p ? d : l })
|
|
691
703
|
] })
|
|
692
704
|
] });
|
|
693
|
-
},
|
|
705
|
+
}, wn = /* @__PURE__ */ t("div")({
|
|
694
706
|
name: "Container",
|
|
695
707
|
class: "c1euiow",
|
|
696
708
|
propsAsIs: !1
|
|
697
|
-
}),
|
|
709
|
+
}), kn = /* @__PURE__ */ t("a")({
|
|
698
710
|
name: "WebLinkBtn",
|
|
699
711
|
class: "w19zie3h",
|
|
700
712
|
propsAsIs: !1
|
|
701
|
-
}),
|
|
702
|
-
/* @__PURE__ */ s(
|
|
703
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */
|
|
713
|
+
}), Tn = ({ instantView: e, ...n }) => /* @__PURE__ */ c(wn, { children: [
|
|
714
|
+
/* @__PURE__ */ s(Ae, { instantView: e, ...n, isDetail: !0 }),
|
|
715
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ c(kn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
704
716
|
e == null ? void 0 : e.webLink.label,
|
|
705
717
|
/* @__PURE__ */ s(A, { name: "icon-external-link" })
|
|
706
718
|
] })
|
|
707
|
-
] }),
|
|
719
|
+
] }), xn = /* @__PURE__ */ t("div")({
|
|
708
720
|
name: "Container",
|
|
709
721
|
class: "c1dcxmvf",
|
|
710
722
|
propsAsIs: !1
|
|
711
|
-
}),
|
|
723
|
+
}), Sn = /* @__PURE__ */ t("blockquote")({
|
|
712
724
|
name: "Quote",
|
|
713
725
|
class: "qb4q22c",
|
|
714
726
|
propsAsIs: !1
|
|
715
|
-
}),
|
|
716
|
-
e.title && /* @__PURE__ */ s(
|
|
727
|
+
}), qn = (e) => /* @__PURE__ */ c(xn, { children: [
|
|
728
|
+
e.title && /* @__PURE__ */ s(Sn, { children: e.title }),
|
|
717
729
|
/* @__PURE__ */ s(me, { ...e, isDetail: !0 })
|
|
718
|
-
] }),
|
|
730
|
+
] }), En = /* @__PURE__ */ t("div")({
|
|
719
731
|
name: "QuestionContainer",
|
|
720
732
|
class: "qdri6g3",
|
|
721
733
|
propsAsIs: !1
|
|
722
|
-
}),
|
|
734
|
+
}), Vn = ({
|
|
723
735
|
openedQuestion: e
|
|
724
736
|
}) => {
|
|
725
|
-
var n,
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
737
|
+
var n, i;
|
|
738
|
+
const {
|
|
739
|
+
sdk: o
|
|
740
|
+
} = he();
|
|
741
|
+
return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(Tn, {
|
|
742
|
+
...e.attributes.attributes.value,
|
|
743
|
+
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
744
|
+
}) : ((i = e == null ? void 0 : e.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ s(qn, {
|
|
745
|
+
...e.attributes.attributes.value,
|
|
746
|
+
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
730
747
|
}) : null;
|
|
731
748
|
}, Nn = ({
|
|
732
749
|
extendedQuestion: e,
|
|
733
750
|
vote: n,
|
|
734
|
-
close:
|
|
751
|
+
close: i
|
|
735
752
|
}) => {
|
|
736
753
|
const {
|
|
737
|
-
loading:
|
|
738
|
-
data:
|
|
754
|
+
loading: o,
|
|
755
|
+
data: r
|
|
739
756
|
} = e;
|
|
740
|
-
return
|
|
757
|
+
return r ? /* @__PURE__ */ s(An, {
|
|
741
758
|
vote: n,
|
|
742
|
-
close:
|
|
743
|
-
openedQuestion:
|
|
744
|
-
isLoading: !!
|
|
759
|
+
close: i,
|
|
760
|
+
openedQuestion: r,
|
|
761
|
+
isLoading: !!o
|
|
745
762
|
}) : null;
|
|
746
763
|
}, Dn = ({
|
|
747
764
|
gamification: e
|
|
748
765
|
}) => {
|
|
749
766
|
var n;
|
|
750
|
-
const
|
|
751
|
-
if (!
|
|
767
|
+
const i = S(e.openedQuestion.$store), o = S(e.openedQuestion.$extendedStore);
|
|
768
|
+
if (!i)
|
|
752
769
|
return null;
|
|
753
|
-
const
|
|
754
|
-
return /* @__PURE__ */
|
|
755
|
-
children: [/* @__PURE__ */ s(
|
|
770
|
+
const r = i.type;
|
|
771
|
+
return /* @__PURE__ */ c(En, {
|
|
772
|
+
children: [/* @__PURE__ */ s(ve, {
|
|
756
773
|
close: e.closeQuestion,
|
|
757
|
-
type: ((n =
|
|
758
|
-
}),
|
|
774
|
+
type: ((n = i.attributes) == null ? void 0 : n.type) || m.UNSET
|
|
775
|
+
}), r === "question" && /* @__PURE__ */ s(Nn, {
|
|
759
776
|
vote: e.submitAnswer,
|
|
760
777
|
close: e.closeQuestion,
|
|
761
|
-
extendedQuestion:
|
|
762
|
-
}),
|
|
763
|
-
openedQuestion:
|
|
764
|
-
}), /* @__PURE__ */ s(
|
|
778
|
+
extendedQuestion: o
|
|
779
|
+
}), r !== "question" && /* @__PURE__ */ s(Vn, {
|
|
780
|
+
openedQuestion: i
|
|
781
|
+
}), /* @__PURE__ */ s(ys, {
|
|
765
782
|
sponsorLogo: ""
|
|
766
783
|
})]
|
|
767
784
|
});
|
|
@@ -769,27 +786,27 @@ const je = /* @__PURE__ */ t("div")({
|
|
|
769
786
|
name: "Container",
|
|
770
787
|
class: "c115qtkr",
|
|
771
788
|
propsAsIs: !1
|
|
772
|
-
}),
|
|
789
|
+
}), Pn = /* @__PURE__ */ t("div")({
|
|
773
790
|
name: "STabs",
|
|
774
791
|
class: "sxnslc8",
|
|
775
792
|
propsAsIs: !1
|
|
776
|
-
}),
|
|
793
|
+
}), On = /* @__PURE__ */ t("button")({
|
|
777
794
|
name: "Button",
|
|
778
795
|
class: "b1umzux0",
|
|
779
796
|
propsAsIs: !1
|
|
780
|
-
}),
|
|
797
|
+
}), Qn = /* @__PURE__ */ t("span")({
|
|
781
798
|
name: "Title",
|
|
782
799
|
class: "tspsaas",
|
|
783
800
|
propsAsIs: !1
|
|
784
801
|
});
|
|
785
802
|
var Y = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(Y || {});
|
|
786
|
-
const
|
|
787
|
-
/* @__PURE__ */ s(
|
|
803
|
+
const re = ({ title: e, active: n, onClick: i }) => /* @__PURE__ */ s(On, { onClick: i, "data-selected": n, children: /* @__PURE__ */ s(Qn, { children: e }) }), Mn = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(Ln, { children: /* @__PURE__ */ c(Pn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
804
|
+
/* @__PURE__ */ s(re, { title: "Home", active: e === "home", onClick: () => n(
|
|
788
805
|
"home"
|
|
789
806
|
/* HOME */
|
|
790
807
|
) }),
|
|
791
808
|
/* @__PURE__ */ s(
|
|
792
|
-
|
|
809
|
+
re,
|
|
793
810
|
{
|
|
794
811
|
title: "Friends",
|
|
795
812
|
active: e === "leaderboard",
|
|
@@ -799,74 +816,74 @@ const ae = ({ title: e, active: n, onClick: o }) => /* @__PURE__ */ s(Pn, { onCl
|
|
|
799
816
|
)
|
|
800
817
|
}
|
|
801
818
|
)
|
|
802
|
-
] }) }),
|
|
819
|
+
] }) }), _n = /* @__PURE__ */ t("div")({
|
|
803
820
|
name: "Container",
|
|
804
821
|
class: "c1ux29ft",
|
|
805
822
|
propsAsIs: !1
|
|
806
|
-
}),
|
|
823
|
+
}), jn = /* @__PURE__ */ t("img")({
|
|
807
824
|
name: "FriendsIcon",
|
|
808
825
|
class: "f10ncfg2",
|
|
809
826
|
propsAsIs: !1
|
|
810
|
-
}),
|
|
827
|
+
}), Un = /* @__PURE__ */ t("div")({
|
|
811
828
|
name: "Content",
|
|
812
829
|
class: "c1yc07bd",
|
|
813
830
|
propsAsIs: !1
|
|
814
|
-
}),
|
|
831
|
+
}), Bn = /* @__PURE__ */ t("div")({
|
|
815
832
|
name: "Title",
|
|
816
833
|
class: "tj6cq7w",
|
|
817
834
|
propsAsIs: !1
|
|
818
|
-
}),
|
|
835
|
+
}), zn = /* @__PURE__ */ t("div")({
|
|
819
836
|
name: "Description",
|
|
820
837
|
class: "d1ag78xo",
|
|
821
838
|
propsAsIs: !1
|
|
822
|
-
}),
|
|
839
|
+
}), Fn = () => A, Wn = /* @__PURE__ */ t(Fn())({
|
|
823
840
|
name: "ArrowInviteIcon",
|
|
824
841
|
class: "awohrz6",
|
|
825
842
|
propsAsIs: !0
|
|
826
|
-
}),
|
|
827
|
-
/* @__PURE__ */ s(
|
|
828
|
-
/* @__PURE__ */
|
|
829
|
-
/* @__PURE__ */ s(
|
|
830
|
-
/* @__PURE__ */ s(
|
|
843
|
+
}), Zn = "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", Hn = ({ title: e, description: n, onClick: i, className: o }) => /* @__PURE__ */ c(_n, { onClick: i, className: o, children: [
|
|
844
|
+
/* @__PURE__ */ s(jn, { alt: "friends-icon", src: Zn }),
|
|
845
|
+
/* @__PURE__ */ c(Un, { children: [
|
|
846
|
+
/* @__PURE__ */ s(Bn, { children: e }),
|
|
847
|
+
/* @__PURE__ */ s(zn, { children: n })
|
|
831
848
|
] }),
|
|
832
|
-
/* @__PURE__ */ s(
|
|
849
|
+
/* @__PURE__ */ s(Wn, { name: "icon-copy" })
|
|
833
850
|
] });
|
|
834
|
-
function Zn(e) {
|
|
835
|
-
var n = e.lastRenderedStartIndex, o = e.lastRenderedStopIndex, i = e.startIndex, a = e.stopIndex;
|
|
836
|
-
return !(i > o || a < n);
|
|
837
|
-
}
|
|
838
851
|
function Yn(e) {
|
|
839
|
-
|
|
852
|
+
var n = e.lastRenderedStartIndex, i = e.lastRenderedStopIndex, o = e.startIndex, r = e.stopIndex;
|
|
853
|
+
return !(o > i || r < n);
|
|
854
|
+
}
|
|
855
|
+
function Gn(e) {
|
|
856
|
+
for (var n = e.isItemLoaded, i = e.itemCount, o = e.minimumBatchSize, r = e.startIndex, d = e.stopIndex, p = [], a = null, l = null, u = r; u <= d; u++) {
|
|
840
857
|
var h = n(u);
|
|
841
|
-
h ?
|
|
858
|
+
h ? l !== null && (p.push(a, l), a = l = null) : (l = u, a === null && (a = u));
|
|
842
859
|
}
|
|
843
|
-
if (
|
|
844
|
-
for (var C = Math.min(Math.max(
|
|
845
|
-
|
|
846
|
-
|
|
860
|
+
if (l !== null) {
|
|
861
|
+
for (var C = Math.min(Math.max(l, a + o - 1), i - 1), I = l + 1; I <= C && !n(I); I++)
|
|
862
|
+
l = I;
|
|
863
|
+
p.push(a, l);
|
|
847
864
|
}
|
|
848
|
-
if (
|
|
849
|
-
for (;
|
|
850
|
-
var f =
|
|
865
|
+
if (p.length)
|
|
866
|
+
for (; p[1] - p[0] + 1 < o && p[0] > 0; ) {
|
|
867
|
+
var f = p[0] - 1;
|
|
851
868
|
if (!n(f))
|
|
852
|
-
|
|
869
|
+
p[0] = f;
|
|
853
870
|
else
|
|
854
871
|
break;
|
|
855
872
|
}
|
|
856
|
-
return
|
|
873
|
+
return p;
|
|
857
874
|
}
|
|
858
|
-
var
|
|
875
|
+
var Jn = function(e, n) {
|
|
859
876
|
if (!(e instanceof n))
|
|
860
877
|
throw new TypeError("Cannot call a class as a function");
|
|
861
878
|
}, Kn = /* @__PURE__ */ function() {
|
|
862
|
-
function e(n,
|
|
863
|
-
for (var
|
|
864
|
-
var
|
|
865
|
-
|
|
879
|
+
function e(n, i) {
|
|
880
|
+
for (var o = 0; o < i.length; o++) {
|
|
881
|
+
var r = i[o];
|
|
882
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, r.key, r);
|
|
866
883
|
}
|
|
867
884
|
}
|
|
868
|
-
return function(n,
|
|
869
|
-
return
|
|
885
|
+
return function(n, i, o) {
|
|
886
|
+
return i && e(n.prototype, i), o && e(n, o), n;
|
|
870
887
|
};
|
|
871
888
|
}(), Xn = function(e, n) {
|
|
872
889
|
if (typeof n != "function" && n !== null)
|
|
@@ -879,7 +896,7 @@ var Gn = function(e, n) {
|
|
|
879
896
|
configurable: !0
|
|
880
897
|
}
|
|
881
898
|
}), n && (Object.setPrototypeOf ? Object.setPrototypeOf(e, n) : e.__proto__ = n);
|
|
882
|
-
},
|
|
899
|
+
}, ae = function(e, n) {
|
|
883
900
|
if (!e)
|
|
884
901
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
885
902
|
return n && (typeof n == "object" || typeof n == "function") ? n : e;
|
|
@@ -887,22 +904,22 @@ var Gn = function(e, n) {
|
|
|
887
904
|
(function(e) {
|
|
888
905
|
Xn(n, e);
|
|
889
906
|
function n() {
|
|
890
|
-
var
|
|
891
|
-
|
|
892
|
-
for (var
|
|
893
|
-
l
|
|
894
|
-
return
|
|
907
|
+
var i, o, r, d;
|
|
908
|
+
Jn(this, n);
|
|
909
|
+
for (var p = arguments.length, a = Array(p), l = 0; l < p; l++)
|
|
910
|
+
a[l] = arguments[l];
|
|
911
|
+
return d = (o = (r = ae(this, (i = n.__proto__ || Object.getPrototypeOf(n)).call.apply(i, [this].concat(a))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(u) {
|
|
895
912
|
var h = u.visibleStartIndex, C = u.visibleStopIndex;
|
|
896
|
-
|
|
897
|
-
},
|
|
898
|
-
|
|
899
|
-
},
|
|
913
|
+
r._lastRenderedStartIndex = h, r._lastRenderedStopIndex = C, r._ensureRowsLoaded(h, C);
|
|
914
|
+
}, r._setRef = function(u) {
|
|
915
|
+
r._listRef = u;
|
|
916
|
+
}, o), ae(r, d);
|
|
900
917
|
}
|
|
901
918
|
return Kn(n, [{
|
|
902
919
|
key: "resetloadMoreItemsCache",
|
|
903
920
|
value: function() {
|
|
904
|
-
var
|
|
905
|
-
this._memoizedUnloadedRanges = [],
|
|
921
|
+
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
922
|
+
this._memoizedUnloadedRanges = [], o && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
906
923
|
}
|
|
907
924
|
}, {
|
|
908
925
|
key: "componentDidMount",
|
|
@@ -911,21 +928,21 @@ var Gn = function(e, n) {
|
|
|
911
928
|
}, {
|
|
912
929
|
key: "render",
|
|
913
930
|
value: function() {
|
|
914
|
-
var
|
|
915
|
-
return
|
|
931
|
+
var o = this.props.children;
|
|
932
|
+
return o({
|
|
916
933
|
onItemsRendered: this._onItemsRendered,
|
|
917
934
|
ref: this._setRef
|
|
918
935
|
});
|
|
919
936
|
}
|
|
920
937
|
}, {
|
|
921
938
|
key: "_ensureRowsLoaded",
|
|
922
|
-
value: function(
|
|
923
|
-
var
|
|
924
|
-
isItemLoaded:
|
|
925
|
-
itemCount:
|
|
939
|
+
value: function(o, r) {
|
|
940
|
+
var d = this.props, p = d.isItemLoaded, a = d.itemCount, l = d.minimumBatchSize, u = l === void 0 ? 10 : l, h = d.threshold, C = h === void 0 ? 15 : h, I = Gn({
|
|
941
|
+
isItemLoaded: p,
|
|
942
|
+
itemCount: a,
|
|
926
943
|
minimumBatchSize: u,
|
|
927
|
-
startIndex: Math.max(0,
|
|
928
|
-
stopIndex: Math.min(
|
|
944
|
+
startIndex: Math.max(0, o - C),
|
|
945
|
+
stopIndex: Math.min(a - 1, r + C)
|
|
929
946
|
});
|
|
930
947
|
(this._memoizedUnloadedRanges.length !== I.length || this._memoizedUnloadedRanges.some(function(f, k) {
|
|
931
948
|
return I[k] !== f;
|
|
@@ -933,102 +950,102 @@ var Gn = function(e, n) {
|
|
|
933
950
|
}
|
|
934
951
|
}, {
|
|
935
952
|
key: "_loadUnloadedRanges",
|
|
936
|
-
value: function(
|
|
937
|
-
for (var
|
|
938
|
-
var h =
|
|
953
|
+
value: function(o) {
|
|
954
|
+
for (var r = this, d = this.props.loadMoreItems || this.props.loadMoreRows, p = function(u) {
|
|
955
|
+
var h = o[u], C = o[u + 1], I = d(h, C);
|
|
939
956
|
I != null && I.then(function() {
|
|
940
|
-
if (
|
|
941
|
-
lastRenderedStartIndex:
|
|
942
|
-
lastRenderedStopIndex:
|
|
957
|
+
if (Yn({
|
|
958
|
+
lastRenderedStartIndex: r._lastRenderedStartIndex,
|
|
959
|
+
lastRenderedStopIndex: r._lastRenderedStopIndex,
|
|
943
960
|
startIndex: h,
|
|
944
961
|
stopIndex: C
|
|
945
962
|
})) {
|
|
946
|
-
if (
|
|
963
|
+
if (r._listRef == null)
|
|
947
964
|
return;
|
|
948
|
-
typeof
|
|
965
|
+
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(h, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
|
|
949
966
|
}
|
|
950
967
|
});
|
|
951
|
-
},
|
|
952
|
-
|
|
968
|
+
}, a = 0; a < o.length; a += 2)
|
|
969
|
+
p(a);
|
|
953
970
|
}
|
|
954
971
|
}]), n;
|
|
955
|
-
})(
|
|
956
|
-
const
|
|
972
|
+
})(we);
|
|
973
|
+
const et = /* @__PURE__ */ t("div")({
|
|
957
974
|
name: "Container",
|
|
958
975
|
class: "culdu4a",
|
|
959
976
|
propsAsIs: !1
|
|
960
|
-
}),
|
|
977
|
+
}), st = /* @__PURE__ */ t("div")({
|
|
961
978
|
name: "Position",
|
|
962
979
|
class: "pwf8e69",
|
|
963
980
|
propsAsIs: !1
|
|
964
|
-
}),
|
|
981
|
+
}), nt = /* @__PURE__ */ t("img")({
|
|
965
982
|
name: "Avatar",
|
|
966
983
|
class: "atf4yh4",
|
|
967
984
|
propsAsIs: !1
|
|
968
|
-
}),
|
|
985
|
+
}), tt = /* @__PURE__ */ t("div")({
|
|
969
986
|
name: "AvatarPlaceholder",
|
|
970
987
|
class: "a1dg29ja",
|
|
971
988
|
propsAsIs: !1
|
|
972
|
-
}),
|
|
989
|
+
}), ot = /* @__PURE__ */ t("div")({
|
|
973
990
|
name: "Content",
|
|
974
991
|
class: "c10a68rc",
|
|
975
992
|
propsAsIs: !1
|
|
976
|
-
}),
|
|
993
|
+
}), it = /* @__PURE__ */ t("div")({
|
|
977
994
|
name: "NameContainer",
|
|
978
995
|
class: "nc4kck5",
|
|
979
996
|
propsAsIs: !1
|
|
980
|
-
}),
|
|
997
|
+
}), rt = /* @__PURE__ */ t("span")({
|
|
981
998
|
name: "Name",
|
|
982
999
|
class: "njsrqgr",
|
|
983
1000
|
propsAsIs: !1
|
|
984
|
-
}), at = () => A,
|
|
1001
|
+
}), at = () => A, lt = /* @__PURE__ */ t(at())({
|
|
985
1002
|
name: "CurrentUserBadge",
|
|
986
1003
|
class: "c17uc4zr",
|
|
987
1004
|
propsAsIs: !0
|
|
988
|
-
}),
|
|
1005
|
+
}), ct = ({
|
|
989
1006
|
rank: e,
|
|
990
1007
|
avatar: n,
|
|
991
|
-
name:
|
|
992
|
-
points:
|
|
993
|
-
isCurrentUser:
|
|
994
|
-
openItemDetail:
|
|
995
|
-
style:
|
|
996
|
-
}) => /* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */ s(
|
|
998
|
-
/* @__PURE__ */
|
|
999
|
-
n ? /* @__PURE__ */ s(
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */ s(
|
|
1002
|
-
|
|
1008
|
+
name: i,
|
|
1009
|
+
points: o,
|
|
1010
|
+
isCurrentUser: r,
|
|
1011
|
+
openItemDetail: d,
|
|
1012
|
+
style: p
|
|
1013
|
+
}) => /* @__PURE__ */ c(et, { onClick: d, style: p, children: [
|
|
1014
|
+
/* @__PURE__ */ s(st, { children: e || 0 }),
|
|
1015
|
+
/* @__PURE__ */ c(ot, { children: [
|
|
1016
|
+
n ? /* @__PURE__ */ s(nt, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(tt, { children: pe(i || "") }),
|
|
1017
|
+
/* @__PURE__ */ c(it, { children: [
|
|
1018
|
+
/* @__PURE__ */ s(rt, { children: i || "" }),
|
|
1019
|
+
r && /* @__PURE__ */ s(lt, { name: "icon-star" })
|
|
1003
1020
|
] })
|
|
1004
1021
|
] }),
|
|
1005
|
-
/* @__PURE__ */ s("div", { children: ue(
|
|
1006
|
-
] }),
|
|
1022
|
+
/* @__PURE__ */ s("div", { children: ue(o) })
|
|
1023
|
+
] }), dt = /* @__PURE__ */ t("div")({
|
|
1007
1024
|
name: "Container",
|
|
1008
1025
|
class: "c16btbfp",
|
|
1009
1026
|
propsAsIs: !1
|
|
1010
|
-
}),
|
|
1027
|
+
}), pt = ({
|
|
1011
1028
|
items: e,
|
|
1012
1029
|
currentUserId: n,
|
|
1013
|
-
openItemDetail:
|
|
1014
|
-
fetchMore:
|
|
1015
|
-
scrollNode:
|
|
1016
|
-
hasMore:
|
|
1017
|
-
}) => /* @__PURE__ */ s(
|
|
1018
|
-
loadMore:
|
|
1030
|
+
openItemDetail: i,
|
|
1031
|
+
fetchMore: o,
|
|
1032
|
+
scrollNode: r,
|
|
1033
|
+
hasMore: d
|
|
1034
|
+
}) => /* @__PURE__ */ s(je, {
|
|
1035
|
+
loadMore: o,
|
|
1019
1036
|
initialLoad: !1,
|
|
1020
|
-
hasMore:
|
|
1037
|
+
hasMore: d,
|
|
1021
1038
|
useWindow: !1,
|
|
1022
|
-
getScrollParent: () =>
|
|
1023
|
-
children: /* @__PURE__ */ s(
|
|
1024
|
-
children: e.map((
|
|
1025
|
-
...
|
|
1026
|
-
openItemDetail: () =>
|
|
1027
|
-
isCurrentUser: !!n && n ===
|
|
1028
|
-
},
|
|
1039
|
+
getScrollParent: () => r.current,
|
|
1040
|
+
children: /* @__PURE__ */ s(dt, {
|
|
1041
|
+
children: e.map((p) => /* @__PURE__ */ s(ct, {
|
|
1042
|
+
...p,
|
|
1043
|
+
openItemDetail: () => i(p.userId),
|
|
1044
|
+
isCurrentUser: !!n && n === p.userId
|
|
1045
|
+
}, p.userId))
|
|
1029
1046
|
})
|
|
1030
|
-
}),
|
|
1031
|
-
|
|
1047
|
+
}), ut = ({ renderClipBoardNode: e, deepLink: n }) => /* @__PURE__ */ s(
|
|
1048
|
+
Se,
|
|
1032
1049
|
{
|
|
1033
1050
|
renderToNode: e,
|
|
1034
1051
|
inviteLink: n,
|
|
@@ -1047,135 +1064,131 @@ const Jn = /* @__PURE__ */ t("div")({
|
|
|
1047
1064
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
1048
1065
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1049
1066
|
}
|
|
1050
|
-
),
|
|
1067
|
+
), mt = /* @__PURE__ */ t("div")({
|
|
1051
1068
|
name: "InviteLinkContainer",
|
|
1052
1069
|
class: "i1chxfpe",
|
|
1053
1070
|
propsAsIs: !1
|
|
1054
|
-
}),
|
|
1071
|
+
}), ht = ({
|
|
1055
1072
|
gamification: e,
|
|
1056
1073
|
scrollNode: n,
|
|
1057
|
-
scrollStore:
|
|
1058
|
-
renderClipBoardNode:
|
|
1074
|
+
scrollStore: i,
|
|
1075
|
+
renderClipBoardNode: o
|
|
1059
1076
|
}) => {
|
|
1060
1077
|
const {
|
|
1061
|
-
data:
|
|
1062
|
-
hasMore:
|
|
1063
|
-
loading:
|
|
1064
|
-
key:
|
|
1078
|
+
data: r,
|
|
1079
|
+
hasMore: d,
|
|
1080
|
+
loading: p,
|
|
1081
|
+
key: a
|
|
1065
1082
|
} = S(e.leaderboardList.$store), {
|
|
1066
|
-
data:
|
|
1067
|
-
} = S(e.deepLink.$store), [u, h] =
|
|
1068
|
-
return !
|
|
1069
|
-
renderClipBoardNode:
|
|
1070
|
-
deepLink:
|
|
1071
|
-
}) : /* @__PURE__ */
|
|
1072
|
-
children: [/* @__PURE__ */ s(
|
|
1073
|
-
items:
|
|
1083
|
+
data: l
|
|
1084
|
+
} = S(e.deepLink.$store), [u, h] = qe(o);
|
|
1085
|
+
return !r.length && !p ? /* @__PURE__ */ s(ut, {
|
|
1086
|
+
renderClipBoardNode: o,
|
|
1087
|
+
deepLink: l
|
|
1088
|
+
}) : /* @__PURE__ */ c(x, {
|
|
1089
|
+
children: [/* @__PURE__ */ s(pt, {
|
|
1090
|
+
items: r,
|
|
1074
1091
|
scrollNode: n,
|
|
1075
|
-
scrollStore:
|
|
1092
|
+
scrollStore: i,
|
|
1076
1093
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1077
|
-
hasMore:
|
|
1094
|
+
hasMore: d,
|
|
1078
1095
|
openItemDetail: e.openUser,
|
|
1079
1096
|
currentUserId: e.currentUserId.get()
|
|
1080
|
-
},
|
|
1081
|
-
children: /* @__PURE__ */ s(
|
|
1082
|
-
onClick: () => u(
|
|
1097
|
+
}, a), l && /* @__PURE__ */ s(mt, {
|
|
1098
|
+
children: /* @__PURE__ */ s(Hn, {
|
|
1099
|
+
onClick: () => u(l),
|
|
1083
1100
|
title: "Invite Friends",
|
|
1084
1101
|
description: "Challenge them now!"
|
|
1085
1102
|
})
|
|
1086
1103
|
}), h]
|
|
1087
1104
|
});
|
|
1088
|
-
},
|
|
1105
|
+
}, It = /* @__PURE__ */ t("div")({
|
|
1089
1106
|
name: "QuestionItem",
|
|
1090
1107
|
class: "q1w97g3p",
|
|
1091
1108
|
propsAsIs: !1
|
|
1092
|
-
}),
|
|
1109
|
+
}), vt = /* @__PURE__ */ t("div")({
|
|
1093
1110
|
name: "QuestionCaption",
|
|
1094
1111
|
class: "q2sl39u",
|
|
1095
1112
|
propsAsIs: !1
|
|
1096
|
-
}),
|
|
1113
|
+
}), Ct = /* @__PURE__ */ t("div")({
|
|
1097
1114
|
name: "QuestionBody",
|
|
1098
1115
|
class: "qd5h0uc",
|
|
1099
1116
|
propsAsIs: !1
|
|
1100
|
-
}),
|
|
1117
|
+
}), ft = /* @__PURE__ */ t("div")({
|
|
1101
1118
|
name: "QuestionAction",
|
|
1102
1119
|
class: "q105uluy",
|
|
1103
1120
|
propsAsIs: !1
|
|
1104
|
-
}),
|
|
1121
|
+
}), At = () => A, H = /* @__PURE__ */ t(At())({
|
|
1105
1122
|
name: "QuestionActionIcon",
|
|
1106
1123
|
class: "q1fa0b9h",
|
|
1107
1124
|
propsAsIs: !0
|
|
1108
|
-
}),
|
|
1125
|
+
}), $t = () => A, gt = /* @__PURE__ */ t($t())({
|
|
1109
1126
|
name: "QuestionTypeIcon",
|
|
1110
1127
|
class: "qxlt78s",
|
|
1111
1128
|
propsAsIs: !0
|
|
1112
|
-
}),
|
|
1129
|
+
}), bt = /* @__PURE__ */ t("div")({
|
|
1113
1130
|
name: "QuestionTypeLabel",
|
|
1114
1131
|
class: "qmg0vkx",
|
|
1115
1132
|
propsAsIs: !1
|
|
1116
|
-
}),
|
|
1133
|
+
}), yt = /* @__PURE__ */ t("div")({
|
|
1117
1134
|
name: "QuestionContent",
|
|
1118
1135
|
class: "q1uz5j1g",
|
|
1119
1136
|
propsAsIs: !1
|
|
1120
|
-
}),
|
|
1137
|
+
}), Rt = /* @__PURE__ */ t("button")({
|
|
1121
1138
|
name: "PlayButton",
|
|
1122
1139
|
class: "p1pba9p1",
|
|
1123
1140
|
propsAsIs: !1
|
|
1124
|
-
}),
|
|
1125
|
-
[F.LOST]: /* @__PURE__ */ s(
|
|
1126
|
-
[F.WON]: /* @__PURE__ */ s(
|
|
1127
|
-
[F.UNSET]: /* @__PURE__ */ s(
|
|
1128
|
-
[F.DNP]: /* @__PURE__ */ s(
|
|
1129
|
-
},
|
|
1141
|
+
}), wt = {
|
|
1142
|
+
[F.LOST]: /* @__PURE__ */ s(H, { name: "incorrectVoted" }),
|
|
1143
|
+
[F.WON]: /* @__PURE__ */ s(H, { name: "icon-check" }),
|
|
1144
|
+
[F.UNSET]: /* @__PURE__ */ s(H, { name: "icon-arrow" }),
|
|
1145
|
+
[F.DNP]: /* @__PURE__ */ s(H, { name: "icon-arrow" })
|
|
1146
|
+
}, kt = ({
|
|
1130
1147
|
questionId: e,
|
|
1131
1148
|
questionType: n,
|
|
1132
|
-
questionStatus:
|
|
1133
|
-
subject:
|
|
1134
|
-
openForVoting:
|
|
1135
|
-
openQuestion:
|
|
1136
|
-
status:
|
|
1149
|
+
questionStatus: i,
|
|
1150
|
+
subject: o,
|
|
1151
|
+
openForVoting: r,
|
|
1152
|
+
openQuestion: d,
|
|
1153
|
+
status: p
|
|
1137
1154
|
}) => {
|
|
1138
|
-
const
|
|
1139
|
-
return
|
|
1140
|
-
/* @__PURE__ */
|
|
1141
|
-
/* @__PURE__ */
|
|
1155
|
+
const a = de[n], l = wt[p];
|
|
1156
|
+
return a ? /* @__PURE__ */ c(It, { onClick: () => d == null ? void 0 : d(e), children: [
|
|
1157
|
+
/* @__PURE__ */ c(yt, { children: [
|
|
1158
|
+
/* @__PURE__ */ c(vt, { children: [
|
|
1142
1159
|
/* @__PURE__ */ s(
|
|
1143
|
-
|
|
1160
|
+
gt,
|
|
1144
1161
|
{
|
|
1145
1162
|
"data-type-trivia": n === m.TRIVIA,
|
|
1146
1163
|
"data-type-poll": n === m.POLL,
|
|
1147
|
-
name:
|
|
1164
|
+
name: a.iconName
|
|
1148
1165
|
}
|
|
1149
1166
|
),
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
|
|
1152
|
-
n === m.TRIVIA &&
|
|
1167
|
+
/* @__PURE__ */ c(bt, { children: [
|
|
1168
|
+
a.label,
|
|
1169
|
+
n === m.TRIVIA && i === N.RESOLVED && " • Expired"
|
|
1153
1170
|
] })
|
|
1154
1171
|
] }),
|
|
1155
|
-
/* @__PURE__ */ s(
|
|
1172
|
+
/* @__PURE__ */ s(Ct, { children: o || "" })
|
|
1156
1173
|
] }),
|
|
1157
|
-
/* @__PURE__ */ s(
|
|
1174
|
+
/* @__PURE__ */ s(ft, { children: r ? /* @__PURE__ */ s(Rt, { children: "Play" }) : l })
|
|
1158
1175
|
] }) : null;
|
|
1159
|
-
},
|
|
1176
|
+
}, Tt = /* @__PURE__ */ t("div")({
|
|
1160
1177
|
name: "Container",
|
|
1161
1178
|
class: "cll3md7",
|
|
1162
1179
|
propsAsIs: !1
|
|
1163
|
-
}),
|
|
1180
|
+
}), xt = /* @__PURE__ */ t("button")({
|
|
1164
1181
|
name: "ActionBtn",
|
|
1165
1182
|
class: "a10g1iik",
|
|
1166
1183
|
propsAsIs: !1
|
|
1167
|
-
}),
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}) => /* @__PURE__ */ r(kt, { children: [
|
|
1172
|
-
/* @__PURE__ */ s(fe, { questionId: n, ...o }),
|
|
1173
|
-
e && /* @__PURE__ */ s(Tt, { onClick: () => e(n), children: "View Insight" })
|
|
1174
|
-
] }), St = /* @__PURE__ */ t("div")({
|
|
1184
|
+
}), St = ({ openInsight: e, questionId: n, ...i }) => /* @__PURE__ */ c(Tt, { children: [
|
|
1185
|
+
/* @__PURE__ */ s(Ae, { questionId: n, ...i }),
|
|
1186
|
+
e && /* @__PURE__ */ s(xt, { onClick: () => e(n), children: "View Insight" })
|
|
1187
|
+
] }), qt = /* @__PURE__ */ t("div")({
|
|
1175
1188
|
name: "Container",
|
|
1176
1189
|
class: "cl56x6b",
|
|
1177
1190
|
propsAsIs: !1
|
|
1178
|
-
}),
|
|
1191
|
+
}), Et = () => Ee, Vt = /* @__PURE__ */ t(Et())({
|
|
1179
1192
|
name: "ActionButton",
|
|
1180
1193
|
class: "a11pzf92",
|
|
1181
1194
|
propsAsIs: !0
|
|
@@ -1183,157 +1196,163 @@ const Jn = /* @__PURE__ */ t("div")({
|
|
|
1183
1196
|
name: "Quote",
|
|
1184
1197
|
class: "q1hbaleq",
|
|
1185
1198
|
propsAsIs: !1
|
|
1186
|
-
}), Dt = ({
|
|
1187
|
-
openTweet: e,
|
|
1188
|
-
...n
|
|
1189
|
-
}) => /* @__PURE__ */ r(St, { children: [
|
|
1199
|
+
}), Dt = ({ openTweet: e, ...n }) => /* @__PURE__ */ c(qt, { children: [
|
|
1190
1200
|
n.title && /* @__PURE__ */ s(Nt, { children: n.title }),
|
|
1191
1201
|
/* @__PURE__ */ s(me, { ...n }),
|
|
1192
|
-
e && /* @__PURE__ */ s(
|
|
1202
|
+
e && /* @__PURE__ */ s(Vt, { onClick: () => e(n.tweetId), children: "View Insight" })
|
|
1193
1203
|
] }), Lt = /* @__PURE__ */ t("div")({
|
|
1194
1204
|
name: "QuestionsContainer",
|
|
1195
1205
|
class: "qvghv3l",
|
|
1196
1206
|
propsAsIs: !1
|
|
1197
|
-
}),
|
|
1198
|
-
var
|
|
1199
|
-
if (o.type === "question" && ((
|
|
1200
|
-
const
|
|
1201
|
-
return /* @__PURE__ */ s(
|
|
1207
|
+
}), Pt = ({ questions: e, openQuestion: n, controlVideo: i }) => /* @__PURE__ */ s(Lt, { children: e == null ? void 0 : e.map((o) => {
|
|
1208
|
+
var r, d, p;
|
|
1209
|
+
if (o.type === "question" && ((r = o.attributes) == null ? void 0 : r.attributes.case) === "question") {
|
|
1210
|
+
const a = o.attributes.attributes.value;
|
|
1211
|
+
return /* @__PURE__ */ s(kt, { openQuestion: n, ...a }, a.questionId);
|
|
1202
1212
|
}
|
|
1203
|
-
if (o.type === "insight" && ((
|
|
1204
|
-
const
|
|
1205
|
-
return /* @__PURE__ */ s(
|
|
1213
|
+
if (o.type === "insight" && ((d = o.attributes) == null ? void 0 : d.attributes.case) === "insight") {
|
|
1214
|
+
const a = o.attributes.attributes.value;
|
|
1215
|
+
return /* @__PURE__ */ s(St, { openInsight: n, controlVideo: i, ...a }, a.questionId);
|
|
1206
1216
|
}
|
|
1207
1217
|
if (o.type === "tweet" && ((p = o.attributes) == null ? void 0 : p.attributes.case) === "tweet") {
|
|
1208
|
-
const
|
|
1209
|
-
return /* @__PURE__ */ s(
|
|
1218
|
+
const a = o.attributes.attributes.value, l = o.attributes.id;
|
|
1219
|
+
return /* @__PURE__ */ s(
|
|
1220
|
+
Dt,
|
|
1221
|
+
{
|
|
1222
|
+
openTweet: n,
|
|
1223
|
+
controlVideo: i,
|
|
1224
|
+
...a,
|
|
1225
|
+
tweetId: l
|
|
1226
|
+
},
|
|
1227
|
+
l
|
|
1228
|
+
);
|
|
1210
1229
|
}
|
|
1211
1230
|
return null;
|
|
1212
|
-
}) }),
|
|
1213
|
-
const o = S(e);
|
|
1214
|
-
return o != null && o.data ? /* @__PURE__ */ s(
|
|
1215
|
-
},
|
|
1231
|
+
}) }), Ot = ({ store: e, openQuestion: n }) => {
|
|
1232
|
+
const { sdk: i } = he(), o = S(e);
|
|
1233
|
+
return o != null && o.data ? /* @__PURE__ */ s(Pt, { openQuestion: n, questions: o.data, controlVideo: i == null ? void 0 : i.controlVideoPlayer }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1234
|
+
}, Qt = ({ userSummary: e }) => {
|
|
1216
1235
|
var n;
|
|
1217
|
-
const [
|
|
1236
|
+
const [i, o] = E(void 0);
|
|
1218
1237
|
return ee(() => {
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1238
|
+
const r = e.subscribe((d) => {
|
|
1239
|
+
d != null && d.data && o(d.data);
|
|
1221
1240
|
});
|
|
1222
1241
|
return () => {
|
|
1223
|
-
|
|
1242
|
+
r();
|
|
1224
1243
|
};
|
|
1225
|
-
}, [e]),
|
|
1226
|
-
},
|
|
1227
|
-
const { tabsShown:
|
|
1244
|
+
}, [e]), i != null && i.summary ? /* @__PURE__ */ s(Ce, { ...i.summary, successRate: (n = i.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1245
|
+
}, Mt = ({ gamification: e, className: n, scrollStore: i, scrollNode: o, appNode: r, style: d, responsiveStore: p, headerNode: a }) => {
|
|
1246
|
+
const { tabsShown: l } = S(i, { keys: ["tabsShown"] }), [u, h] = E(Y.HOME), [, C] = ke(), { sdkInDesktopView: I } = S(p, { keys: ["sdkInDesktopView"] }), f = (w) => {
|
|
1228
1247
|
C(() => {
|
|
1229
1248
|
var b;
|
|
1230
|
-
h(w), I === !1 && (((b =
|
|
1249
|
+
h(w), I === !1 && (((b = r.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 && Oe(r, { behavior: "instant" });
|
|
1231
1250
|
});
|
|
1232
1251
|
};
|
|
1233
|
-
ee(() =>
|
|
1252
|
+
ee(() => i.listen((w) => {
|
|
1234
1253
|
if (w.scrollPosition === 0) {
|
|
1235
|
-
|
|
1254
|
+
i.setKey("tabsShown", !0);
|
|
1236
1255
|
return;
|
|
1237
1256
|
}
|
|
1238
|
-
|
|
1239
|
-
}), [
|
|
1257
|
+
p.get().sdkInDesktopView ? i.setKey("tabsShown", w.scrollDirection === "backward") : i.setKey("tabsShown", w.scrollDirection === "forward");
|
|
1258
|
+
}), [i, p]);
|
|
1240
1259
|
let k = "0px";
|
|
1241
|
-
I ? k =
|
|
1242
|
-
const g = I ?
|
|
1243
|
-
return /* @__PURE__ */
|
|
1260
|
+
I ? k = l ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : k = l ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px";
|
|
1261
|
+
const g = I ? r : a;
|
|
1262
|
+
return /* @__PURE__ */ c(Ve, { className: n, style: d, children: [
|
|
1244
1263
|
/* @__PURE__ */ s(
|
|
1245
1264
|
Ne,
|
|
1246
1265
|
{
|
|
1247
1266
|
style: {
|
|
1248
1267
|
top: k
|
|
1249
1268
|
},
|
|
1250
|
-
children: /* @__PURE__ */ s(
|
|
1269
|
+
children: /* @__PURE__ */ s(Mn, { activePage: u, toggleActivePage: f })
|
|
1251
1270
|
}
|
|
1252
1271
|
),
|
|
1253
|
-
u === Y.HOME && /* @__PURE__ */
|
|
1254
|
-
/* @__PURE__ */ s(
|
|
1255
|
-
/* @__PURE__ */ s(Le, { style: { flex: 1 }, children: /* @__PURE__ */ s(
|
|
1272
|
+
u === Y.HOME && /* @__PURE__ */ c(x, { children: [
|
|
1273
|
+
/* @__PURE__ */ s(Ie, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(De, { children: /* @__PURE__ */ s(Qt, { userSummary: e.userSummary }) }) }),
|
|
1274
|
+
/* @__PURE__ */ s(Le, { style: { flex: 1 }, children: /* @__PURE__ */ s(Ot, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1256
1275
|
] }),
|
|
1257
|
-
u === Y.LEADERBOARD && /* @__PURE__ */ s(
|
|
1258
|
-
|
|
1276
|
+
u === Y.LEADERBOARD && /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ s(
|
|
1277
|
+
ht,
|
|
1259
1278
|
{
|
|
1260
1279
|
renderClipBoardNode: g,
|
|
1261
|
-
scrollStore:
|
|
1262
|
-
scrollNode:
|
|
1280
|
+
scrollStore: i,
|
|
1281
|
+
scrollNode: o,
|
|
1263
1282
|
gamification: e
|
|
1264
1283
|
}
|
|
1265
1284
|
) })
|
|
1266
1285
|
] });
|
|
1267
|
-
},
|
|
1286
|
+
}, _t = () => Me, le = /* @__PURE__ */ t(_t())({
|
|
1268
1287
|
name: "OpenedContainer",
|
|
1269
1288
|
class: "oar61gl",
|
|
1270
1289
|
propsAsIs: !0
|
|
1271
|
-
}),
|
|
1290
|
+
}), jt = /* @__PURE__ */ t("div")({
|
|
1272
1291
|
name: "UserContainer",
|
|
1273
1292
|
class: "u14zaal4",
|
|
1274
1293
|
propsAsIs: !1
|
|
1275
|
-
}),
|
|
1294
|
+
}), Ut = ({
|
|
1276
1295
|
correct: e,
|
|
1277
1296
|
incorrect: n
|
|
1278
1297
|
}) => {
|
|
1279
|
-
const
|
|
1280
|
-
return
|
|
1281
|
-
},
|
|
1298
|
+
const i = e + n;
|
|
1299
|
+
return i === 0 ? 0 : Math.round(e / i * 100);
|
|
1300
|
+
}, oo = ({
|
|
1282
1301
|
gamification: e,
|
|
1283
1302
|
scrollStore: n,
|
|
1284
|
-
className:
|
|
1285
|
-
appNode:
|
|
1286
|
-
scrollNode:
|
|
1287
|
-
headerNode:
|
|
1288
|
-
responsiveStore:
|
|
1303
|
+
className: i,
|
|
1304
|
+
appNode: o,
|
|
1305
|
+
scrollNode: r,
|
|
1306
|
+
headerNode: d,
|
|
1307
|
+
responsiveStore: p
|
|
1289
1308
|
}) => {
|
|
1290
|
-
const
|
|
1309
|
+
const a = S(e.openedQuestion.$store), l = S(e.openedUser), {
|
|
1291
1310
|
sdkInDesktopView: u
|
|
1292
|
-
} = S(
|
|
1311
|
+
} = S(p, {
|
|
1293
1312
|
keys: ["sdkInDesktopView"]
|
|
1294
|
-
}), h =
|
|
1313
|
+
}), h = V(() => {
|
|
1295
1314
|
var C;
|
|
1296
|
-
const I = (((C =
|
|
1297
|
-
if (!
|
|
1315
|
+
const I = (((C = o.current) == null ? void 0 : C.getBoundingClientRect().y) || 0) < 0;
|
|
1316
|
+
if (!o.current || !a && !l)
|
|
1298
1317
|
return null;
|
|
1299
|
-
const f =
|
|
1300
|
-
className:
|
|
1318
|
+
const f = a ? /* @__PURE__ */ s(le, {
|
|
1319
|
+
className: i,
|
|
1301
1320
|
children: /* @__PURE__ */ s(Dn, {
|
|
1302
1321
|
gamification: e
|
|
1303
1322
|
})
|
|
1304
|
-
}) :
|
|
1305
|
-
className:
|
|
1306
|
-
children: /* @__PURE__ */
|
|
1307
|
-
children: [/* @__PURE__ */ s(
|
|
1323
|
+
}) : l ? /* @__PURE__ */ s(le, {
|
|
1324
|
+
className: i,
|
|
1325
|
+
children: /* @__PURE__ */ c(jt, {
|
|
1326
|
+
children: [/* @__PURE__ */ s(ve, {
|
|
1308
1327
|
label: "Friend's Rank",
|
|
1309
1328
|
close: e.closeUser
|
|
1310
|
-
}), /* @__PURE__ */ s(
|
|
1311
|
-
children: /* @__PURE__ */ s(
|
|
1312
|
-
...
|
|
1313
|
-
successRate:
|
|
1329
|
+
}), /* @__PURE__ */ s(Ie, {
|
|
1330
|
+
children: /* @__PURE__ */ s(Ce, {
|
|
1331
|
+
...l,
|
|
1332
|
+
successRate: Ut(l)
|
|
1314
1333
|
})
|
|
1315
1334
|
})]
|
|
1316
1335
|
})
|
|
1317
1336
|
}) : null;
|
|
1318
|
-
return
|
|
1319
|
-
|
|
1320
|
-
container: i,
|
|
1337
|
+
return /* @__PURE__ */ s(Qe, {
|
|
1338
|
+
container: o,
|
|
1321
1339
|
useContainer: !u,
|
|
1322
|
-
fixedView: I
|
|
1340
|
+
fixedView: I,
|
|
1341
|
+
children: f
|
|
1323
1342
|
});
|
|
1324
|
-
}, [
|
|
1325
|
-
return /* @__PURE__ */
|
|
1326
|
-
children: [h, /* @__PURE__ */ s(
|
|
1327
|
-
appNode:
|
|
1328
|
-
headerNode:
|
|
1343
|
+
}, [o, i, e, a, l, u]);
|
|
1344
|
+
return /* @__PURE__ */ c(x, {
|
|
1345
|
+
children: [h, /* @__PURE__ */ s(Mt, {
|
|
1346
|
+
appNode: o,
|
|
1347
|
+
headerNode: d,
|
|
1329
1348
|
scrollStore: n,
|
|
1330
|
-
scrollNode:
|
|
1331
|
-
className:
|
|
1349
|
+
scrollNode: r,
|
|
1350
|
+
className: i,
|
|
1332
1351
|
gamification: e,
|
|
1333
|
-
responsiveStore:
|
|
1352
|
+
responsiveStore: p
|
|
1334
1353
|
})]
|
|
1335
1354
|
});
|
|
1336
1355
|
};
|
|
1337
1356
|
export {
|
|
1338
|
-
|
|
1357
|
+
oo as default
|
|
1339
1358
|
};
|