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