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