@streamlayer/react 1.23.2 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/masters.d.ts +0 -1
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +203 -28
- package/lib/cjs/analytics.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/cjs/index-ByUNFvMk.js +5 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -1
- package/lib/cjs/index11.js +1 -3
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +1 -3
- package/lib/cjs/index14.js +4 -1
- package/lib/cjs/index15.js +1 -1
- package/lib/cjs/index16.js +5 -3
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +5 -3
- package/lib/cjs/index5.js +1 -1
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +7 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +8 -1
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +14 -9
- package/lib/cjs/sl-types.js +1 -1
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/theme.js +1 -1
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +17 -3
- package/lib/cjs/utils.js +47 -1
- package/lib/classic/app/masters.d.ts +0 -1
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +203 -28
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +5 -3
- package/lib/classic/cjs/feature.js +1 -1
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/classic/cjs/index-ByUNFvMk.js +5 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -1
- package/lib/classic/cjs/index13.js +4 -3
- package/lib/classic/cjs/index2.js +5 -3
- package/lib/classic/cjs/index3.js +1 -1
- package/lib/classic/cjs/index4.js +1 -1
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +7 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +1 -3
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +14 -9
- package/lib/classic/cjs/sl-types.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +17 -3
- package/lib/classic/cjs/utils.js +47 -1
- package/lib/classic/es/Question.js +258 -275
- package/lib/classic/es/advertisement.js +22128 -38694
- package/lib/classic/es/analytics.js +55 -57
- package/lib/classic/es/auth.js +8 -14
- package/lib/classic/es/bet-pack.js +2413 -2455
- package/lib/classic/es/feature.js +46 -95
- package/lib/classic/es/gamification-feature.js +2 -2
- package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
- package/lib/classic/es/index-ByUNFvMk.js +3775 -0
- package/lib/classic/es/index.js +13 -16
- package/lib/classic/es/index10.js +2587 -83
- package/lib/classic/es/index11.js +305 -3087
- package/lib/classic/es/index12.js +121 -124
- package/lib/classic/es/index13.js +559 -589
- package/lib/classic/es/index2.js +1755 -2114
- package/lib/classic/es/index3.js +13 -13
- package/lib/classic/es/index4.js +4 -283
- package/lib/classic/es/index5.js +5 -5
- package/lib/classic/es/index6.js +285 -10
- package/lib/classic/es/index7.js +179 -6
- package/lib/classic/es/index8.js +5 -10
- package/lib/classic/es/index9.js +8 -318
- package/lib/classic/es/insight.js +54 -61
- package/lib/classic/es/notification.js +5 -5
- package/lib/classic/es/notification2.js +730 -787
- package/lib/classic/es/pause-ad.js +168 -191
- package/lib/classic/es/points.js +47 -55
- package/lib/classic/es/polymarket.js +4058 -4289
- package/lib/classic/es/sl-types.js +128 -298
- package/lib/classic/es/useStreamLayerApp.js +2 -2
- package/lib/classic/es/useStreamLayerApp2.js +9090 -11121
- package/lib/classic/es/utils.js +28 -28
- package/lib/classic/index.d.ts +0 -1
- package/lib/classic/source.css +110 -0
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +69 -3
- package/lib/dist/es/gamification-feature.js +2 -2
- package/lib/dist/es/index-ByUNFvMk.js +3775 -0
- package/lib/dist/es/index.js +7 -10
- package/lib/dist/es/masters.js +16944 -19645
- package/lib/dist/index.d.ts +7 -17
- package/lib/dist/source.css +64 -0
- package/lib/es/Question.js +101 -105
- package/lib/es/advertisement.js +22128 -38694
- package/lib/es/analytics.js +55 -57
- package/lib/es/auth.js +8 -14
- package/lib/es/bet-pack.js +18 -29
- package/lib/es/feature.js +46 -95
- package/lib/es/gamification-feature.js +2 -2
- package/lib/es/gamification-feature2.js +2 -2
- package/lib/es/hooks-n9ax4LRT.js +97 -0
- package/lib/es/index-ByUNFvMk.js +3775 -0
- package/lib/es/index.js +13 -17
- package/lib/es/index10.js +8 -274
- package/lib/es/index11.js +172 -837
- package/lib/es/index12.js +2587 -183
- package/lib/es/index13.js +258 -314
- package/lib/es/index14.js +813 -81
- package/lib/es/index15.js +305 -3087
- package/lib/es/index16.js +803 -1005
- package/lib/es/index2.js +980 -1133
- package/lib/es/index3.js +4 -3
- package/lib/es/index4.js +2401 -2431
- package/lib/es/index5.js +13 -13
- package/lib/es/index6.js +5 -285
- package/lib/es/index7.js +7 -10
- package/lib/es/index8.js +283 -5
- package/lib/es/index9.js +180 -10
- package/lib/es/insight.js +54 -61
- package/lib/es/masters.js +5 -7
- package/lib/es/masters2.js +538 -708
- package/lib/es/notification.js +663 -719
- package/lib/es/pause-ad.js +168 -191
- package/lib/es/points.js +48 -56
- package/lib/es/polymarket.js +4058 -4289
- package/lib/es/sl-types.js +128 -317
- package/lib/es/storage.js +74 -75
- package/lib/es/theme.js +3 -190
- package/lib/es/useStreamLayerApp.js +2 -2
- package/lib/es/useStreamLayerApp2.js +9090 -11121
- package/lib/es/utils.js +28 -28
- package/lib/index.d.ts +0 -1
- package/lib/source.css +120 -0
- package/lib/style.css +1 -1
- package/package.json +21 -24
- package/lib/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/cjs/index-eShKGO10.js +0 -1
- package/lib/cjs/style.css +0 -1
- package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/classic/cjs/index-eShKGO10.js +0 -1
- package/lib/classic/cjs/style.css +0 -1
- package/lib/classic/es/hooks-WfHlJH12.js +0 -98
- package/lib/classic/es/index-eShKGO10.js +0 -3757
- package/lib/classic/style.css +0 -1
- package/lib/dist/cjs/index-eShKGO10.js +0 -1
- package/lib/dist/es/index-eShKGO10.js +0 -3757
- package/lib/dist/style.css +0 -1
- package/lib/es/hooks-WfHlJH12.js +0 -98
- package/lib/es/index-eShKGO10.js +0 -3757
package/lib/es/index11.js
CHANGED
|
@@ -1,850 +1,185 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}), t$4 = () => a$5, S$2 = /* @__PURE__ */ styled_default(t$4())({
|
|
38
|
-
name: "TabsNavContainer",
|
|
39
|
-
class: "t19dtrb3",
|
|
40
|
-
propsAsIs: true
|
|
41
|
-
}), d$5 = /* @__PURE__ */ styled_default("div")({
|
|
42
|
-
name: "UserSummaryContainer",
|
|
43
|
-
class: "u1552n3j",
|
|
44
|
-
propsAsIs: false
|
|
45
|
-
});
|
|
46
|
-
var l$3 = Object.defineProperty;
|
|
47
|
-
var d$4 = (t2, e2, s) => e2 in t2 ? l$3(t2, e2, { enumerable: true, configurable: true, writable: true, value: s }) : t2[e2] = s;
|
|
48
|
-
var u$4 = (t2, e2, s) => d$4(t2, e2 + "", s);
|
|
49
|
-
let y$3 = class y {
|
|
50
|
-
constructor() {
|
|
51
|
-
u$4(this, "observers", /* @__PURE__ */ new Set());
|
|
52
|
-
}
|
|
53
|
-
subscribe(e2) {
|
|
54
|
-
this.observers.add(e2);
|
|
55
|
-
}
|
|
56
|
-
unsubscribe(e2) {
|
|
57
|
-
this.observers.delete(e2);
|
|
58
|
-
}
|
|
59
|
-
notify(e2) {
|
|
60
|
-
this.observers.forEach((s) => s(e2));
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const n$3 = new y$3(), m$3 = { hiding: false, finished: false }, S$1 = () => {
|
|
64
|
-
const [t2, e2] = useState(m$3), s = useRef(null);
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
const r2 = (i2) => {
|
|
67
|
-
e2(i2);
|
|
68
|
-
};
|
|
69
|
-
return n$3.subscribe(r2), () => {
|
|
70
|
-
n$3.unsubscribe(r2);
|
|
71
|
-
};
|
|
72
|
-
}, []);
|
|
73
|
-
const c2 = useCallback((r2) => {
|
|
74
|
-
const i2 = { hiding: true, finished: false };
|
|
75
|
-
s.current && clearTimeout(s.current), r2 != null && r2.delay ? s.current = setTimeout(() => {
|
|
76
|
-
n$3.notify(i2);
|
|
77
|
-
}, r2 == null ? void 0 : r2.delay) : n$3.notify(i2);
|
|
78
|
-
}, []), f2 = useCallback(() => {
|
|
79
|
-
t2.hiding && (s.current = null, n$3.notify({ hiding: false, finished: true }));
|
|
80
|
-
}, [t2.hiding]);
|
|
81
|
-
return {
|
|
82
|
-
...t2,
|
|
83
|
-
runAnimation: c2,
|
|
84
|
-
onAnimationEnd: f2
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
const u$3 = /* @__PURE__ */ styled_default("div")({
|
|
88
|
-
name: "Container",
|
|
89
|
-
class: "c1pgyo67",
|
|
90
|
-
propsAsIs: false
|
|
91
|
-
}), h$2 = "sx17qu6", w$2 = "h1692c5m", f$4 = ({
|
|
92
|
-
children: r2,
|
|
93
|
-
style: e2,
|
|
94
|
-
className: o2,
|
|
95
|
-
enabled: t2 = true,
|
|
96
|
-
hiding: s,
|
|
97
|
-
onAnimationEnd: n2
|
|
98
|
-
}) => /* @__PURE__ */ jsx(u$3, {
|
|
99
|
-
style: e2,
|
|
100
|
-
className: cx_default(o2, t2 && h$2, t2 && s && w$2),
|
|
101
|
-
onAnimationEnd: n2,
|
|
102
|
-
children: r2
|
|
103
|
-
}), d$3 = () => f$4, y$2 = /* @__PURE__ */ styled_default(d$3())({
|
|
104
|
-
name: "GrowingContainer",
|
|
105
|
-
class: "gck55ev",
|
|
106
|
-
propsAsIs: true
|
|
107
|
-
}), v$2 = ({
|
|
108
|
-
children: r2,
|
|
109
|
-
style: e2,
|
|
110
|
-
enabled: o2,
|
|
111
|
-
animate: t2,
|
|
112
|
-
...s
|
|
113
|
-
}) => {
|
|
114
|
-
const n2 = useRef(null);
|
|
115
|
-
return /* @__PURE__ */ jsx(y$2, {
|
|
116
|
-
...s,
|
|
117
|
-
enabled: o2 && t2,
|
|
118
|
-
style: {
|
|
119
|
-
...e2,
|
|
120
|
-
...(() => {
|
|
121
|
-
const m2 = n2 == null ? void 0 : n2.current, i2 = m2 && window.getComputedStyle(m2), a2 = i2 == null ? void 0 : i2.getPropertyValue("height");
|
|
122
|
-
return o2 ? {
|
|
123
|
-
height: t2 ? a2 : 0
|
|
124
|
-
} : {};
|
|
125
|
-
})()
|
|
126
|
-
},
|
|
127
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
128
|
-
ref: n2,
|
|
129
|
-
children: r2
|
|
130
|
-
})
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
const t$3 = /* @__PURE__ */ styled_default("div")({
|
|
1
|
+
import { s as a } from "./sl-types.js";
|
|
2
|
+
import { Q as i } from "./useStreamLayerApp2.js";
|
|
3
|
+
import { jsxs as t, jsx as s, Fragment as U } from "react/jsx-runtime";
|
|
4
|
+
import { memo as $, useMemo as w } from "react";
|
|
5
|
+
import { F as y } from "./index15.js";
|
|
6
|
+
import { B as T } from "./index8.js";
|
|
7
|
+
const G = {
|
|
8
|
+
[i.TWEET]: { label: "Insight", iconName: "icon-insight" },
|
|
9
|
+
[i.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
|
|
10
|
+
[i.UNSET]: void 0,
|
|
11
|
+
[i.FACTOID]: { label: "Insight", iconName: "icon-insight" },
|
|
12
|
+
[i.POLL]: { label: "Poll", iconName: "icon-poll" },
|
|
13
|
+
[i.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
|
|
14
|
+
[i.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
|
|
15
|
+
}, J = {
|
|
16
|
+
[i.TWEET]: "Learn more",
|
|
17
|
+
[i.FACTOID]: "Learn more",
|
|
18
|
+
[i.POLL]: "Answer",
|
|
19
|
+
[i.TRIVIA]: "Answer",
|
|
20
|
+
[i.PREDICTION]: "Answer",
|
|
21
|
+
[i.PROMOTION]: "",
|
|
22
|
+
[i.UNSET]: ""
|
|
23
|
+
}, K = (r) => r.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), X = (r) => r ? r.toLocaleString("en-US") : "0", L = (r) => {
|
|
24
|
+
const n = new Date(r);
|
|
25
|
+
if (!n)
|
|
26
|
+
return "";
|
|
27
|
+
const c = /* @__PURE__ */ new Date(), o = Math.floor(c.getTime() - n.getTime());
|
|
28
|
+
return o < 6e4 ? `${Math.floor(o / 1e3)}s` : o < 36e5 ? `${Math.floor(o / 6e4)}m` : o < 864e5 ? `${Math.floor(o / 36e5)}h` : n.getFullYear() === c.getFullYear() ? `${n.toLocaleDateString("en-US", {
|
|
29
|
+
month: "short",
|
|
30
|
+
day: "numeric"
|
|
31
|
+
})}` : `${n.toLocaleDateString("en-US", {
|
|
32
|
+
month: "2-digit",
|
|
33
|
+
day: "2-digit",
|
|
34
|
+
year: "2-digit"
|
|
35
|
+
})}`;
|
|
36
|
+
}, D = /* @__PURE__ */ a("div")({
|
|
134
37
|
name: "Container",
|
|
135
|
-
class: "
|
|
136
|
-
propsAsIs:
|
|
137
|
-
}),
|
|
138
|
-
name: "
|
|
139
|
-
class: "
|
|
140
|
-
propsAsIs:
|
|
141
|
-
}),
|
|
142
|
-
name: "
|
|
143
|
-
class: "
|
|
144
|
-
propsAsIs:
|
|
145
|
-
}),
|
|
146
|
-
name: "
|
|
147
|
-
class: "
|
|
148
|
-
propsAsIs:
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}), A$3 = /* @__PURE__ */ styled_default("span")({
|
|
180
|
-
name: "FeedbackTitle",
|
|
181
|
-
class: "fvek9ew",
|
|
182
|
-
propsAsIs: false
|
|
183
|
-
}), e$1 = /* @__PURE__ */ styled_default("span")({
|
|
184
|
-
name: "FeedbackDescription",
|
|
185
|
-
class: "f1kbtp09",
|
|
186
|
-
propsAsIs: false
|
|
187
|
-
}), D = /* @__PURE__ */ styled_default("div")({
|
|
188
|
-
name: "FeedbackTitleWrap",
|
|
189
|
-
class: "f4i8rro",
|
|
190
|
-
propsAsIs: false
|
|
191
|
-
}), v$1 = /* @__PURE__ */ styled_default("div")({
|
|
192
|
-
name: "FeedbackResultDescriptionWrap",
|
|
193
|
-
class: "fqyssr",
|
|
194
|
-
propsAsIs: false
|
|
195
|
-
}), p$2 = () => e$1, x$2 = /* @__PURE__ */ styled_default(p$2())({
|
|
196
|
-
name: "FeedbackDynamicDescription",
|
|
197
|
-
class: "fyv794i",
|
|
198
|
-
propsAsIs: true
|
|
199
|
-
}), r$4 = () => e$1, u$2 = /* @__PURE__ */ styled_default(r$4())({
|
|
200
|
-
name: "FeedbackResultDescription",
|
|
201
|
-
class: "f1jkj9vx",
|
|
202
|
-
propsAsIs: true
|
|
203
|
-
}), y$1 = /* @__PURE__ */ styled_default("div")({
|
|
204
|
-
name: "FeedbackText",
|
|
205
|
-
class: "f1pxh3a6",
|
|
206
|
-
propsAsIs: false
|
|
207
|
-
}), W = /* @__PURE__ */ styled_default("span")({
|
|
208
|
-
name: "DynamicWrap",
|
|
209
|
-
class: "d1afvufn",
|
|
210
|
-
propsAsIs: false
|
|
211
|
-
}), h$1 = /* @__PURE__ */ styled_default("div")({
|
|
212
|
-
name: "EarlyFeedbackDescription",
|
|
213
|
-
class: "eq8u24d",
|
|
214
|
-
propsAsIs: false
|
|
215
|
-
});
|
|
216
|
-
const ii = ({
|
|
217
|
-
feedbackMessages: t2,
|
|
218
|
-
questionVotedCorrectly: S2,
|
|
219
|
-
questionVoted: k$1,
|
|
220
|
-
questionType: d2,
|
|
221
|
-
hasCorrectAnswer: r2,
|
|
222
|
-
showExpiredNotification: I2,
|
|
223
|
-
showClosedNotificationTrivia: D$1,
|
|
224
|
-
votedInCurrentRender: b2,
|
|
225
|
-
votedAfterQuestionClosed: y3,
|
|
226
|
-
voteErrorMessage: e2,
|
|
227
|
-
enteredAnActiveQuestion: B2,
|
|
228
|
-
marketClosed: H,
|
|
229
|
-
percentsAnimated: z,
|
|
230
|
-
votedAnswer: T,
|
|
231
|
-
isEarlyPrediction: n2,
|
|
232
|
-
correctAnswer: a2,
|
|
233
|
-
onAnimationEnd: G
|
|
234
|
-
}) => {
|
|
235
|
-
const W$1 = k$1 && (d2 === QuestionType.TRIVIA || d2 === QuestionType.PREDICTION), f2 = d2 === QuestionType.PREDICTION && !r2, R = H && d2 === QuestionType.PREDICTION && !k$1 || d2 === QuestionType.PREDICTION && y3 && b2 && B2, N = W$1 && f2, Q = W$1 && r2, C2 = d2 === QuestionType.PREDICTION && k$1 && b2 && r2, P2 = k$1 && d2 === QuestionType.POLL && b2, m2 = S2 ? "correct" : "incorrect", o2 = S2 ? t2 == null ? void 0 : t2.correctFeedback : t2 == null ? void 0 : t2.incorrectFeedback;
|
|
236
|
-
return I2 || D$1 || N || Q || R || P2 || C2 || e2 ? /* @__PURE__ */ jsx(
|
|
237
|
-
l$2,
|
|
238
|
-
{
|
|
239
|
-
enabled: b2,
|
|
240
|
-
animate: !e2 && I2 ? true : z,
|
|
241
|
-
onAnimationEnd: G,
|
|
242
|
-
children: /* @__PURE__ */ jsxs(k, { "data-prediction": f2, children: [
|
|
243
|
-
e2 && !R && /* @__PURE__ */ jsxs(f$3, { children: [
|
|
244
|
-
!n2 && /* @__PURE__ */ jsx(b$2, { name: "questionExpired" }),
|
|
245
|
-
/* @__PURE__ */ jsx(e$1, { children: e2 })
|
|
246
|
-
] }),
|
|
247
|
-
!e2 && I2 && /* @__PURE__ */ jsxs(f$3, { children: [
|
|
248
|
-
!n2 && /* @__PURE__ */ jsx(I$3, { children: /* @__PURE__ */ jsx(B1, { name: "questionExpired" }) }),
|
|
249
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
250
|
-
/* @__PURE__ */ jsx(F, { children: /* @__PURE__ */ jsx(e$1, { children: "Question Expired" }) }),
|
|
251
|
-
/* @__PURE__ */ jsx(y$1, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
252
|
-
] })
|
|
253
|
-
] }),
|
|
254
|
-
!e2 && D$1 && /* @__PURE__ */ jsxs(f$3, { className: cx_default(m$2), children: [
|
|
255
|
-
/* @__PURE__ */ jsx(I$3, { children: /* @__PURE__ */ jsx(B1, { name: "questionExpired" }) }),
|
|
256
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
257
|
-
/* @__PURE__ */ jsx(F, { children: /* @__PURE__ */ jsx(e$1, { children: "Question Closed" }) }),
|
|
258
|
-
/* @__PURE__ */ jsx(y$1, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
259
|
-
] })
|
|
260
|
-
] }),
|
|
261
|
-
R && /* @__PURE__ */ jsxs(f$3, { children: [
|
|
262
|
-
!n2 && /* @__PURE__ */ jsx(I$3, { children: /* @__PURE__ */ jsx(B1, { name: "questionExpired" }) }),
|
|
263
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
264
|
-
/* @__PURE__ */ jsx(F, { children: /* @__PURE__ */ jsx(e$1, { children: n2 ? r2 ? "The results are already in!" : "Question is Closed" : "Question Closed" }) }),
|
|
265
|
-
/* @__PURE__ */ jsx(y$1, { children: n2 ? /* @__PURE__ */ jsx(h$1, { children: r2 ? `Correct: ${a2 == null ? void 0 : a2.text}` : "Event affecting the outcome has occurred." }) : "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
266
|
-
] })
|
|
267
|
-
] }),
|
|
268
|
-
!e2 && N && /* @__PURE__ */ jsxs(f$3, { children: [
|
|
269
|
-
!n2 && /* @__PURE__ */ jsx(b$2, { name: "icon-prediction" }),
|
|
270
|
-
/* @__PURE__ */ jsxs(x$2, { children: [
|
|
271
|
-
"Your pick has been recorded. ",
|
|
272
|
-
/* @__PURE__ */ jsx(W, { children: "We’ll notify you of the result." })
|
|
273
|
-
] })
|
|
274
|
-
] }),
|
|
275
|
-
!e2 && P2 && /* @__PURE__ */ jsxs(f$3, { children: [
|
|
276
|
-
!n2 && /* @__PURE__ */ jsx(I$3, { "data-feedback-type": "correct", children: /* @__PURE__ */ jsx(B1, { name: "correct" }) }),
|
|
277
|
-
/* @__PURE__ */ jsx(e$1, { children: "Thanks for answering. Please stay tuned for the next question." })
|
|
278
|
-
] }),
|
|
279
|
-
!e2 && (Q || C2) && /* @__PURE__ */ jsxs(f$3, { className: cx_default(D$1 && m$2), children: [
|
|
280
|
-
!n2 && /* @__PURE__ */ jsx(I$3, { "data-feedback-type": m2, children: /* @__PURE__ */ jsx(B1, { name: m2 }) }),
|
|
281
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(F, { children: [
|
|
282
|
-
n2 ? /* @__PURE__ */ jsx(D, { children: m2 === "incorrect" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
283
|
-
/* @__PURE__ */ jsx("div", { children: "So close!" }),
|
|
284
|
-
/* @__PURE__ */ jsx("div", { children: "Better luck next time" })
|
|
285
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
286
|
-
/* @__PURE__ */ jsx("div", { children: "That’s correct!" }),
|
|
287
|
-
/* @__PURE__ */ jsx("div", { children: "You chose wisely." })
|
|
288
|
-
] }) }) : /* @__PURE__ */ jsx(A$3, { "data-feedback-type": m2, children: o2 == null ? void 0 : o2.title }),
|
|
289
|
-
n2 ? /* @__PURE__ */ jsxs(v$1, { children: [
|
|
290
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
291
|
-
"Your pick: ",
|
|
292
|
-
T == null ? void 0 : T.text
|
|
293
|
-
] }),
|
|
294
|
-
/* @__PURE__ */ jsx("div", { children: m2 === "incorrect" ? `Correct: ${a2 == null ? void 0 : a2.text}` : "" })
|
|
295
|
-
] }) : /* @__PURE__ */ jsx(u$2, { children: o2 == null ? void 0 : o2.description })
|
|
296
|
-
] }) })
|
|
297
|
-
] })
|
|
38
|
+
class: "cjq447q",
|
|
39
|
+
propsAsIs: !1
|
|
40
|
+
}), H = /* @__PURE__ */ a("div")({
|
|
41
|
+
name: "ImageContainer",
|
|
42
|
+
class: "i14egogb",
|
|
43
|
+
propsAsIs: !1
|
|
44
|
+
}), S = /* @__PURE__ */ a("img")({
|
|
45
|
+
name: "Image",
|
|
46
|
+
class: "i2g9g4l",
|
|
47
|
+
propsAsIs: !1
|
|
48
|
+
}), O = () => T, E = /* @__PURE__ */ a(O())({
|
|
49
|
+
name: "TwitterIcon",
|
|
50
|
+
class: "t1c454nm",
|
|
51
|
+
propsAsIs: !0
|
|
52
|
+
}), b = /* @__PURE__ */ a("div")({
|
|
53
|
+
name: "Details",
|
|
54
|
+
class: "d11nigc3",
|
|
55
|
+
propsAsIs: !1
|
|
56
|
+
}), x = /* @__PURE__ */ a("div")({
|
|
57
|
+
name: "Name",
|
|
58
|
+
class: "nrxa4k8",
|
|
59
|
+
propsAsIs: !1
|
|
60
|
+
}), C = /* @__PURE__ */ a("div")({
|
|
61
|
+
name: "UserNameAndDate",
|
|
62
|
+
class: "u1p051g3",
|
|
63
|
+
propsAsIs: !1
|
|
64
|
+
}), F = ({ image: r, name: n, userName: c, verified: o, createdTweet: p }) => {
|
|
65
|
+
const m = p && L(p);
|
|
66
|
+
return /* @__PURE__ */ t(D, { children: [
|
|
67
|
+
r && /* @__PURE__ */ t(H, { children: [
|
|
68
|
+
/* @__PURE__ */ s(S, { className: "SL_AccountImage", src: r }),
|
|
69
|
+
/* @__PURE__ */ s(E, { name: "twitter" })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ t(b, { children: [
|
|
72
|
+
n && /* @__PURE__ */ t(x, { className: "SL_TweetAccountName", children: [
|
|
73
|
+
n,
|
|
74
|
+
" ",
|
|
75
|
+
o && /* @__PURE__ */ s(T, { name: "icon-twitter-verified" })
|
|
76
|
+
] }),
|
|
77
|
+
c && /* @__PURE__ */ t(C, { className: "SL_TweetAccountUserName", children: [
|
|
78
|
+
"@",
|
|
79
|
+
c,
|
|
80
|
+
" ",
|
|
81
|
+
m && `・ ${m}`
|
|
298
82
|
] })
|
|
299
|
-
}
|
|
300
|
-
)
|
|
301
|
-
}
|
|
302
|
-
const t$2 = /* @__PURE__ */ styled_default("div")({
|
|
303
|
-
name: "Container",
|
|
304
|
-
class: "c1hygj0s",
|
|
305
|
-
propsAsIs: false
|
|
306
|
-
}), a$3 = /* @__PURE__ */ styled_default("div")({
|
|
307
|
-
name: "Title",
|
|
308
|
-
class: "t1r84tez",
|
|
309
|
-
propsAsIs: false
|
|
310
|
-
}), c$2 = /* @__PURE__ */ styled_default("div")({
|
|
311
|
-
name: "Description",
|
|
312
|
-
class: "d1aj1a7k",
|
|
313
|
-
propsAsIs: false
|
|
314
|
-
}), r$3 = /* @__PURE__ */ styled_default("div")({
|
|
315
|
-
name: "AdditionalDescription",
|
|
316
|
-
class: "ax09ezs",
|
|
317
|
-
propsAsIs: false
|
|
318
|
-
}), n$1 = () => B1, p$1 = /* @__PURE__ */ styled_default(n$1())({
|
|
319
|
-
name: "Icon",
|
|
320
|
-
class: "inkrac",
|
|
321
|
-
propsAsIs: true
|
|
322
|
-
});
|
|
323
|
-
const x$1 = ({ icon: e2, title: i2, description: t2, additionalDescription: n2 }) => /* @__PURE__ */ jsxs(t$2, { children: [
|
|
324
|
-
e2 && /* @__PURE__ */ jsx(p$1, { name: e2 }),
|
|
325
|
-
/* @__PURE__ */ jsx(a$3, { children: i2 }),
|
|
326
|
-
/* @__PURE__ */ jsx(c$2, { children: t2 }),
|
|
327
|
-
n2 && /* @__PURE__ */ jsx(r$3, { children: n2 })
|
|
328
|
-
] });
|
|
329
|
-
const d$1 = /* @__PURE__ */ styled_default("div")({
|
|
83
|
+
] })
|
|
84
|
+
] });
|
|
85
|
+
}, P = /* @__PURE__ */ a("div")({
|
|
330
86
|
name: "Container",
|
|
331
|
-
class: "
|
|
332
|
-
propsAsIs:
|
|
333
|
-
}),
|
|
334
|
-
name: "
|
|
335
|
-
class: "
|
|
336
|
-
propsAsIs:
|
|
337
|
-
}),
|
|
338
|
-
name: "
|
|
339
|
-
class: "
|
|
340
|
-
propsAsIs:
|
|
341
|
-
}),
|
|
342
|
-
name: "
|
|
343
|
-
class: "
|
|
344
|
-
propsAsIs:
|
|
345
|
-
}),
|
|
346
|
-
name: "
|
|
347
|
-
class: "
|
|
348
|
-
propsAsIs:
|
|
349
|
-
}),
|
|
350
|
-
name: "
|
|
351
|
-
class: "
|
|
352
|
-
propsAsIs:
|
|
353
|
-
}),
|
|
354
|
-
name: "
|
|
355
|
-
class: "
|
|
356
|
-
propsAsIs:
|
|
357
|
-
}),
|
|
358
|
-
name: "
|
|
359
|
-
class: "
|
|
360
|
-
propsAsIs:
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
name: "EarlyPredictionIcon",
|
|
375
|
-
class: "ez9juex",
|
|
376
|
-
propsAsIs: true
|
|
377
|
-
}), p = () => B1, q = /* @__PURE__ */ styled_default(p())({
|
|
378
|
-
name: "SponsorIcon",
|
|
379
|
-
class: "s8p4aob",
|
|
380
|
-
propsAsIs: true
|
|
381
|
-
});
|
|
382
|
-
const r$1 = /* @__PURE__ */ styled_default("button")({
|
|
383
|
-
name: "ButtonContainer",
|
|
384
|
-
class: "b1b6dl8t",
|
|
385
|
-
propsAsIs: false
|
|
386
|
-
}), l$1 = /* @__PURE__ */ styled_default("div")({
|
|
387
|
-
name: "ButtonPctWrap",
|
|
388
|
-
class: "b4iik8i",
|
|
389
|
-
propsAsIs: false
|
|
390
|
-
}), I$1 = /* @__PURE__ */ styled_default("div")({
|
|
391
|
-
name: "ButtonPct",
|
|
392
|
-
class: "b1gq1lnf",
|
|
393
|
-
propsAsIs: false
|
|
394
|
-
}), i = /* @__PURE__ */ styled_default("span")({
|
|
395
|
-
name: "ButtonBody",
|
|
396
|
-
class: "b1j65z51",
|
|
397
|
-
propsAsIs: false
|
|
398
|
-
}), m$1 = /* @__PURE__ */ styled_default("div")({
|
|
399
|
-
name: "IconContainer",
|
|
400
|
-
class: "i19tpfua",
|
|
401
|
-
propsAsIs: false
|
|
402
|
-
}), f$1 = /* @__PURE__ */ styled_default("div")({
|
|
403
|
-
name: "IconWrap",
|
|
404
|
-
class: "i1tubmma",
|
|
405
|
-
propsAsIs: false
|
|
406
|
-
}), n = /* @__PURE__ */ styled_default("img")({
|
|
407
|
-
name: "Icon",
|
|
408
|
-
class: "i1grrgwj",
|
|
409
|
-
propsAsIs: false
|
|
410
|
-
}), t$1 = () => n, u = /* @__PURE__ */ styled_default(t$1())({
|
|
411
|
-
name: "IconDefault",
|
|
412
|
-
class: "ibemyq8",
|
|
413
|
-
propsAsIs: true
|
|
414
|
-
}), a$1 = () => n, A$1 = /* @__PURE__ */ styled_default(a$1())({
|
|
415
|
-
name: "IconCircle",
|
|
416
|
-
class: "i1dceht",
|
|
417
|
-
propsAsIs: true
|
|
418
|
-
}), d = /* @__PURE__ */ styled_default("span")({
|
|
419
|
-
name: "Title",
|
|
420
|
-
class: "t116q4vq",
|
|
421
|
-
propsAsIs: false
|
|
422
|
-
}), B = /* @__PURE__ */ styled_default("span")({
|
|
423
|
-
name: "Indicators",
|
|
424
|
-
class: "i17ajcu2",
|
|
425
|
-
propsAsIs: false
|
|
426
|
-
}), P = /* @__PURE__ */ styled_default("div")({
|
|
427
|
-
name: "PtsWrap",
|
|
428
|
-
class: "pu9kmlb",
|
|
429
|
-
propsAsIs: false
|
|
430
|
-
}), b$1 = /* @__PURE__ */ styled_default("span")({
|
|
431
|
-
name: "Pts",
|
|
432
|
-
class: "p1j2j0s0",
|
|
433
|
-
propsAsIs: false
|
|
434
|
-
}), g = /* @__PURE__ */ styled_default("span")({
|
|
435
|
-
name: "Percentage",
|
|
436
|
-
class: "p1mzj1sj",
|
|
437
|
-
propsAsIs: false
|
|
438
|
-
}), c$1 = () => B1, C = /* @__PURE__ */ styled_default(c$1())({
|
|
439
|
-
name: "CheckIcon",
|
|
440
|
-
class: "cichgz8",
|
|
441
|
-
propsAsIs: true
|
|
442
|
-
});
|
|
443
|
-
const E = {
|
|
444
|
-
[QuestionImages.CENTERED]: (t2) => /* @__PURE__ */ jsx(u, { "data-testid": "vote-icon", alt: "option-icon", src: t2 }),
|
|
445
|
-
[QuestionImages.TRANSPARENT]: (t2) => /* @__PURE__ */ jsx(m$1, { "data-testid": "vote-icon", children: /* @__PURE__ */ jsx(f$1, { style: { backgroundImage: `url(${t2})` } }) }),
|
|
446
|
-
[QuestionImages.ROUNDED]: (t2) => /* @__PURE__ */ jsx(A$1, { "data-testid": "vote-icon", alt: "option-icon", src: t2 }),
|
|
447
|
-
[QuestionImages.NONE]: () => null,
|
|
448
|
-
[QuestionImages.UNSET]: () => null
|
|
449
|
-
}, rt = ({ questionType: t2, hasCorrectAnswer: a2, correct: n2, youVoted: i2, questionVoted: r2 }) => {
|
|
450
|
-
if (t2 === QuestionType.POLL && i2)
|
|
451
|
-
return "voted";
|
|
452
|
-
if (t2 === QuestionType.PREDICTION) {
|
|
453
|
-
if (!a2 && r2)
|
|
454
|
-
return i2 ? "voted" : "unset";
|
|
455
|
-
if (a2 && r2)
|
|
456
|
-
return i2 ? n2 ? "correct" : "incorrect" : "unset";
|
|
457
|
-
if (i2)
|
|
458
|
-
return "correct";
|
|
459
|
-
}
|
|
460
|
-
return t2 === QuestionType.TRIVIA && r2 && i2 ? n2 ? "correct" : "incorrect" : "unset";
|
|
461
|
-
}, ot = ({
|
|
462
|
-
questionType: t2,
|
|
463
|
-
questionVoted: a2,
|
|
464
|
-
correct: n2,
|
|
465
|
-
hasCorrectAnswer: i2,
|
|
466
|
-
questionStatus: r2
|
|
467
|
-
}) => t2 === QuestionType.TRIVIA ? a2 && n2 : t2 === QuestionType.PREDICTION ? a2 && n2 && i2 || r2 === QuestionStatus.RESOLVED && n2 : false, at = O(r$1), mt = (t2) => {
|
|
468
|
-
var N;
|
|
469
|
-
const {
|
|
470
|
-
// option props
|
|
471
|
-
id: a2,
|
|
472
|
-
icon: n2,
|
|
473
|
-
text: i$12,
|
|
474
|
-
percentageDecimal: r2,
|
|
475
|
-
points: w2,
|
|
476
|
-
// extra props
|
|
477
|
-
onVote: D2,
|
|
478
|
-
markThatVoted: g$1,
|
|
479
|
-
firstOption: k2,
|
|
480
|
-
onPercentsAnimated: l2,
|
|
481
|
-
youSelected: P$1,
|
|
482
|
-
youVoted: v2,
|
|
483
|
-
questionVoted: s,
|
|
484
|
-
imageMode: C$12,
|
|
485
|
-
answerTimeExpired: A2,
|
|
486
|
-
questionStatus: p2,
|
|
487
|
-
isLoading: B$1,
|
|
488
|
-
questionType: d$12,
|
|
489
|
-
correct: x2,
|
|
490
|
-
hasCorrectAnswer: L2,
|
|
491
|
-
marketClosed: f2,
|
|
492
|
-
isEarlyPrediction: b2,
|
|
493
|
-
isAd: m2,
|
|
494
|
-
webos: W2
|
|
495
|
-
} = t2, [F2, R] = useState(0), I2 = rt(t2), Q = ot({ questionType: d$12, questionVoted: s, correct: x2, hasCorrectAnswer: L2, questionStatus: p2 }), h2 = f2 && d$12 === QuestionType.PREDICTION, S2 = s || h2, j = d$12 === QuestionType.PREDICTION && !s && !f2 && !m2, T = s && !P$1 && I2 !== "incorrect" && !v2;
|
|
496
|
-
return useLayoutEffect(() => {
|
|
497
|
-
R(0), requestAnimationFrame(() => {
|
|
498
|
-
R(r2);
|
|
499
|
-
});
|
|
500
|
-
}, [r2]), /* @__PURE__ */ jsxs(
|
|
501
|
-
at,
|
|
502
|
-
{
|
|
503
|
-
value: a2,
|
|
504
|
-
webos: W2,
|
|
505
|
-
autoFocus: k2,
|
|
506
|
-
"data-selected": P$1,
|
|
507
|
-
"data-answer-state": I2,
|
|
508
|
-
disabled: s || B$1 || A2 || h2,
|
|
509
|
-
"data-is-not-checked": T,
|
|
510
|
-
"data-a": "intr",
|
|
511
|
-
onClick: (y3) => {
|
|
512
|
-
g$1(
|
|
513
|
-
d$12 === QuestionType.PREDICTION ? f2 : p2 === QuestionStatus.RESOLVED
|
|
514
|
-
), D2(y3);
|
|
515
|
-
},
|
|
516
|
-
"data-is-ad": m2,
|
|
517
|
-
children: [
|
|
518
|
-
/* @__PURE__ */ jsx(l$1, { children: /* @__PURE__ */ jsx(
|
|
519
|
-
I$1,
|
|
87
|
+
class: "c1kzqw87",
|
|
88
|
+
propsAsIs: !1
|
|
89
|
+
}), M = /* @__PURE__ */ a("div")({
|
|
90
|
+
name: "Details",
|
|
91
|
+
class: "d9r1hf9",
|
|
92
|
+
propsAsIs: !1
|
|
93
|
+
}), R = /* @__PURE__ */ a("div")({
|
|
94
|
+
name: "Body",
|
|
95
|
+
class: "bezygt5",
|
|
96
|
+
propsAsIs: !1
|
|
97
|
+
}), d = /* @__PURE__ */ a("div")({
|
|
98
|
+
name: "ImagesContainer",
|
|
99
|
+
class: "i1y8f7ym",
|
|
100
|
+
propsAsIs: !1
|
|
101
|
+
}), h = /* @__PURE__ */ a("div")({
|
|
102
|
+
name: "ImagesBlock",
|
|
103
|
+
class: "i18gwonx",
|
|
104
|
+
propsAsIs: !1
|
|
105
|
+
}), N = /* @__PURE__ */ a("img")({
|
|
106
|
+
name: "Image",
|
|
107
|
+
class: "i3g0xjd",
|
|
108
|
+
propsAsIs: !1
|
|
109
|
+
}), j = () => N, l = /* @__PURE__ */ a(j())({
|
|
110
|
+
name: "ImageFullSize",
|
|
111
|
+
class: "io8rt7p",
|
|
112
|
+
propsAsIs: !0
|
|
113
|
+
}), V = () => N, f = /* @__PURE__ */ a(V())({
|
|
114
|
+
name: "ImageHalfSize",
|
|
115
|
+
class: "i4hn3ox",
|
|
116
|
+
propsAsIs: !0
|
|
117
|
+
}), _ = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), z = (r) => r?.replace(_, ""), Z = $(
|
|
118
|
+
({ image: r, body: n, muted: c, account: o, accountVerified: p, tweet: m, isDetail: u, controlVideo: v }) => {
|
|
119
|
+
const e = m?.meta?.extendedEntities?.media, g = e?.find(
|
|
120
|
+
({ type: I }) => I === "photo"
|
|
121
|
+
/* PHOTO */
|
|
122
|
+
), A = w(() => e?.[0]?.videoInfo?.variants?.findLast(
|
|
123
|
+
({ contentType: I }) => I === "video/mp4"
|
|
124
|
+
/* VIDEO */
|
|
125
|
+
)?.url, [e]);
|
|
126
|
+
return /* @__PURE__ */ t(P, { children: [
|
|
127
|
+
/* @__PURE__ */ t(M, { children: [
|
|
128
|
+
/* @__PURE__ */ s(
|
|
129
|
+
F,
|
|
520
130
|
{
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
},
|
|
527
|
-
"data-is-ad": m2
|
|
131
|
+
image: r,
|
|
132
|
+
name: m?.meta?.accountName,
|
|
133
|
+
userName: o,
|
|
134
|
+
verified: p,
|
|
135
|
+
createdTweet: m?.date
|
|
528
136
|
}
|
|
529
|
-
)
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
/* @__PURE__ */
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ s(R, { children: z(n) }),
|
|
139
|
+
!u && g && /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s(l, { src: e?.[0].mediaUrlHttps }) }),
|
|
140
|
+
u && g && /* @__PURE__ */ t(U, { children: [
|
|
141
|
+
e?.length === 1 && /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s(l, { src: e[0].mediaUrlHttps }) }),
|
|
142
|
+
e?.length === 2 && /* @__PURE__ */ t(d, { children: [
|
|
143
|
+
/* @__PURE__ */ s(f, { src: e[0].mediaUrlHttps }),
|
|
144
|
+
/* @__PURE__ */ s(f, { src: e[1].mediaUrlHttps })
|
|
536
145
|
] }),
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
]
|
|
543
|
-
}
|
|
544
|
-
);
|
|
545
|
-
};
|
|
546
|
-
const t = () => v$2, c = /* @__PURE__ */ styled_default(t())({
|
|
547
|
-
name: "ShowInContainer",
|
|
548
|
-
class: "sie6cqo",
|
|
549
|
-
propsAsIs: true
|
|
550
|
-
}), r = /* @__PURE__ */ styled_default("div")({
|
|
551
|
-
name: "WinBarContainer",
|
|
552
|
-
class: "wgizw4u",
|
|
553
|
-
propsAsIs: false
|
|
554
|
-
}), l = /* @__PURE__ */ styled_default("div")({
|
|
555
|
-
name: "Content",
|
|
556
|
-
class: "c1l3ucjp",
|
|
557
|
-
propsAsIs: false
|
|
558
|
-
}), m = /* @__PURE__ */ styled_default("div")({
|
|
559
|
-
name: "Title",
|
|
560
|
-
class: "tx7j799",
|
|
561
|
-
propsAsIs: false
|
|
562
|
-
}), a = () => B1, I = /* @__PURE__ */ styled_default(a())({
|
|
563
|
-
name: "WinIcon",
|
|
564
|
-
class: "w4lwuj0",
|
|
565
|
-
propsAsIs: true
|
|
566
|
-
}), f = /* @__PURE__ */ styled_default("div")({
|
|
567
|
-
name: "Points",
|
|
568
|
-
class: "po9i64o",
|
|
569
|
-
propsAsIs: false
|
|
570
|
-
}), w = /* @__PURE__ */ styled_default("span")({
|
|
571
|
-
name: "PointsCount",
|
|
572
|
-
class: "pe5g05h",
|
|
573
|
-
propsAsIs: false
|
|
574
|
-
}), A = /* @__PURE__ */ styled_default("span")({
|
|
575
|
-
name: "PointsUnits",
|
|
576
|
-
class: "p1hdtpmb",
|
|
577
|
-
propsAsIs: false
|
|
578
|
-
});
|
|
579
|
-
const b = ({
|
|
580
|
-
title: o2,
|
|
581
|
-
points: t2,
|
|
582
|
-
isPlayingTimer: a2,
|
|
583
|
-
isTimer: m$12,
|
|
584
|
-
animatePoints: c$12,
|
|
585
|
-
questionType: r$12,
|
|
586
|
-
timerDuration: d2,
|
|
587
|
-
votedInCurrentRender: l$12,
|
|
588
|
-
percentsAnimated: h2,
|
|
589
|
-
onTimerExpired: C2
|
|
590
|
-
}) => /* @__PURE__ */ jsx(
|
|
591
|
-
c,
|
|
592
|
-
{
|
|
593
|
-
enabled: r$12 === QuestionType.PREDICTION && l$12,
|
|
594
|
-
animate: h2,
|
|
595
|
-
children: /* @__PURE__ */ jsxs(
|
|
596
|
-
r,
|
|
597
|
-
{
|
|
598
|
-
style: {
|
|
599
|
-
justifyContent: r$12 === QuestionType.PREDICTION ? "center" : "space-between"
|
|
600
|
-
},
|
|
601
|
-
children: [
|
|
602
|
-
/* @__PURE__ */ jsxs(l, { children: [
|
|
603
|
-
o2 && /* @__PURE__ */ jsx(m, { children: o2 }),
|
|
604
|
-
t2 !== void 0 && r$12 !== QuestionType.POLL && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
605
|
-
/* @__PURE__ */ jsx(I, { name: "icon-trophy" }),
|
|
606
|
-
/* @__PURE__ */ jsxs(f, { children: [
|
|
607
|
-
/* @__PURE__ */ jsx(w, { children: c$12 ? /* @__PURE__ */ jsx(d$6, { value: t2, delay: 0.3 }) : t2 }),
|
|
608
|
-
/* @__PURE__ */ jsx(A, { children: "PTS" })
|
|
609
|
-
] })
|
|
146
|
+
e?.length === 3 && /* @__PURE__ */ t(d, { children: [
|
|
147
|
+
/* @__PURE__ */ s(f, { src: e[0].mediaUrlHttps }),
|
|
148
|
+
/* @__PURE__ */ t(h, { children: [
|
|
149
|
+
/* @__PURE__ */ s(l, { src: e[1].mediaUrlHttps }),
|
|
150
|
+
/* @__PURE__ */ s(l, { src: e[2].mediaUrlHttps })
|
|
610
151
|
] })
|
|
611
152
|
] }),
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
default:
|
|
623
|
-
return "Something went wrong, please try again";
|
|
624
|
-
}
|
|
625
|
-
}, te = () => /* @__PURE__ */ jsx(d$1, { children: /* @__PURE__ */ jsxs(v, { children: [
|
|
626
|
-
/* @__PURE__ */ jsx(i$1, { loading: true, style: { height: "40px", borderRadius: "100px" } }),
|
|
627
|
-
/* @__PURE__ */ jsx(i$1, { loading: true, style: { height: "24px", margin: "16px 0" } }),
|
|
628
|
-
/* @__PURE__ */ jsx(u$1, { children: Array.from({ length: 5 }).map((e2, T) => /* @__PURE__ */ jsx(i$1, { loading: true, style: { height: "44px" } }, T)) })
|
|
629
|
-
] }) }), ee = ({
|
|
630
|
-
openedQuestion: e2,
|
|
631
|
-
isLoading: T,
|
|
632
|
-
vote: j,
|
|
633
|
-
close: F2,
|
|
634
|
-
isEarlyPrediction: a2,
|
|
635
|
-
mastersApp: at2,
|
|
636
|
-
webos: ct
|
|
637
|
-
}) => {
|
|
638
|
-
var tt, et;
|
|
639
|
-
const H = e2.subject, r2 = e2.type, v$12 = e2.status, f2 = (tt = e2.options) == null ? void 0 : tt.options, I2 = e2.marketClosed, O2 = e2.id, U = useRef(), S$22 = useRef(), g2 = at2 ? false : (e2 == null ? void 0 : e2.adUnit) === AdUnit.STANDART, [V, _] = useState(false), [x$22, lt] = useState(false), [y$12, $] = useState(true), [d2, ft] = useState(false), [k2, ut] = useState(false), [z, P2] = useState(""), [D2, mt$1] = useState(""), [E2, G] = useState(false), [dt, Tt] = useState(false), [J, ht] = useState(false), { runAnimation: A2, finished: K } = S$1();
|
|
640
|
-
useEffect(() => {
|
|
641
|
-
K && F2(O2);
|
|
642
|
-
}, [F2, K]), useEffect(() => {
|
|
643
|
-
r2 === QuestionType.PREDICTION ? I2 && $(false) : v$12 === QuestionStatus.RESOLVED && $(false);
|
|
644
|
-
}, []);
|
|
645
|
-
const It = useCallback((s) => {
|
|
646
|
-
lt(s), _(true);
|
|
647
|
-
}, []), gt = useCallback(() => {
|
|
648
|
-
a2 && _(false);
|
|
649
|
-
}, [a2]), L2 = useRef(false), X = useCallback(() => {
|
|
650
|
-
S$22.current && clearTimeout(S$22.current), S$22.current = setTimeout(() => {
|
|
651
|
-
ht(true), A2({ delay: 5500 });
|
|
652
|
-
}, 4e3);
|
|
653
|
-
}, [A2]), Z = useCallback(
|
|
654
|
-
async (s) => {
|
|
655
|
-
if (!L2.current && (L2.current = true, O2)) {
|
|
656
|
-
const l2 = s.currentTarget.value;
|
|
657
|
-
P2(l2);
|
|
658
|
-
try {
|
|
659
|
-
await j(O2, l2), g2 && X();
|
|
660
|
-
} catch (C2) {
|
|
661
|
-
mt$1(Ft(C2.message, r2)), P2(""), console.error("Error while voting", C2), L2.current = false;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
[r2, O2, P2, j, g2, X]
|
|
666
|
-
), At = useCallback(() => {
|
|
667
|
-
ft(true), A2({ delay: 3500 });
|
|
668
|
-
}, [A2]), Ct = useCallback(() => {
|
|
669
|
-
ut(true), A2({ delay: 3500 });
|
|
670
|
-
}, [A2]), t2 = e2 == null ? void 0 : e2.answers.find((s) => s.youVoted === true), c2 = useMemo(
|
|
671
|
-
() => !!(e2 != null && e2.answers.find((s) => s.correct === true)),
|
|
672
|
-
[e2]
|
|
673
|
-
), o2 = useMemo(
|
|
674
|
-
() => e2 == null ? void 0 : e2.answers.find((s) => s.correct === true),
|
|
675
|
-
[e2]
|
|
676
|
-
);
|
|
677
|
-
useEffect(() => {
|
|
678
|
-
t2 && V && !dt && (U.current = setTimeout(Ct, 1e4), Tt(true));
|
|
679
|
-
}, [t2]), useEffect(() => () => {
|
|
680
|
-
clearTimeout(U.current), clearTimeout(S$22.current);
|
|
681
|
-
}, []);
|
|
682
|
-
const b$12 = useMemo(() => e2 ? e2.answers.map((s) => {
|
|
683
|
-
var l2;
|
|
684
|
-
return {
|
|
685
|
-
...s,
|
|
686
|
-
questionVoted: !!t2,
|
|
687
|
-
youSelected: z === s.id,
|
|
688
|
-
isLoading: T,
|
|
689
|
-
hasCorrectAnswer: c2,
|
|
690
|
-
questionType: e2.type,
|
|
691
|
-
answerTimeExpired: d2,
|
|
692
|
-
questionStatus: v$12,
|
|
693
|
-
imageMode: (l2 = e2.appearance) == null ? void 0 : l2.images,
|
|
694
|
-
onVote: Z
|
|
695
|
-
};
|
|
696
|
-
}) : [], [
|
|
697
|
-
c2,
|
|
698
|
-
d2,
|
|
699
|
-
T,
|
|
700
|
-
e2,
|
|
701
|
-
t2,
|
|
702
|
-
v$12,
|
|
703
|
-
Z,
|
|
704
|
-
z
|
|
705
|
-
]);
|
|
706
|
-
useEffect(() => {
|
|
707
|
-
const s = b$12.some(({ percentageDecimal: C2 }) => C2 !== 0), l2 = t2 && r2 === QuestionType.PREDICTION;
|
|
708
|
-
D2 && (a2 || !s || I2 && l2) && G(true);
|
|
709
|
-
}, [b$12, D2, a2, I2, r2, t2]);
|
|
710
|
-
const Q = f2 && (f2.case === "trivia" || f2.case === "prediction") ? f2.value : void 0, h$12 = v$12 === QuestionStatus.RESOLVED && r2 === QuestionType.TRIVIA && !t2 && !y$12, W2 = r2 === QuestionType.TRIVIA && x$22, Y = useMemo(() => g2 ? false : r2 === QuestionType.PREDICTION ? a2 ? false : !!(t2 && !c2 || t2 && c2 && (o2 != null && o2.youVoted)) : true, [r2, t2, c2, o2, a2, g2]), Rt = useMemo(() => {
|
|
711
|
-
if (r2 === QuestionType.PREDICTION && t2 && (!c2 || c2 && (o2 != null && o2.youVoted)))
|
|
712
|
-
return t2.points;
|
|
713
|
-
if (!(h$12 || d2))
|
|
714
|
-
return t2 ? t2.correct ? t2.pointsEarned : 0 : o2 == null ? void 0 : o2.points;
|
|
715
|
-
}, [d2, t2, o2, h$12, r2, c2]), wt = useMemo(() => r2 === QuestionType.PREDICTION && t2 ? c2 ? c2 && (o2 != null && o2.youVoted) ? "You won" : "" : "To win" : h$12 || d2 ? "Time expired" : r2 === QuestionType.POLL ? "Time remaining" : t2 ? "You won" : "To win", [d2, r2, t2, h$12, c2, o2]), vt = !Y || Y && r2 === QuestionType.PREDICTION && V && !E2, Vt = (r2 === QuestionType.TRIVIA || r2 === QuestionType.PREDICTION) && t2 && c2 && (o2 == null ? void 0 : o2.youVoted), yt = t2 || h$12 || W2 || r2 === QuestionType.TRIVIA && v$12 === QuestionStatus.RESOLVED && y$12, pt = !a2 && (d2 || k2) || J, Ot = () => {
|
|
716
|
-
const s = () => r2 === QuestionType.TRIVIA ? t2 != null && t2.correct ? `That's correct!
|
|
717
|
-
You chose wisely.` : `So close!
|
|
718
|
-
Better luck next time.` : r2 === QuestionType.POLL ? `Thanks for answering.
|
|
719
|
-
Please stay tuned for the next question.` : r2 === QuestionType.PREDICTION ? "Stay tuned to see if your prediction was correct." : "", l2 = () => r2 === QuestionType.TRIVIA ? `Your Pick: ${o2 == null ? void 0 : o2.text}` : r2 === QuestionType.POLL || r2 === QuestionType.PREDICTION ? `Your Pick: ${t2 == null ? void 0 : t2.text}` : "", C2 = () => r2 === QuestionType.TRIVIA && (f2 == null ? void 0 : f2.case) === "trivia" ? f2 == null ? void 0 : f2.value.explanation : r2 === QuestionType.PREDICTION ? H : "";
|
|
720
|
-
return J ? /* @__PURE__ */ jsx(w$1, { children: /* @__PURE__ */ jsx(
|
|
721
|
-
x$1,
|
|
722
|
-
{
|
|
723
|
-
title: s(),
|
|
724
|
-
description: l2(),
|
|
725
|
-
...t2 != null && t2.correct || r2 === QuestionType.POLL || r2 === QuestionType.PREDICTION ? { icon: "icon-correct" } : {},
|
|
726
|
-
...r2 === QuestionType.TRIVIA || r2 === QuestionType.PREDICTION ? { additionalDescription: C2() } : {}
|
|
727
|
-
}
|
|
728
|
-
) }) : !a2 && (d2 || k2) ? /* @__PURE__ */ jsx(w$1, { children: /* @__PURE__ */ jsx(
|
|
729
|
-
d$2,
|
|
730
|
-
{
|
|
731
|
-
icon: "icon-check-circle",
|
|
732
|
-
title: "More to come...",
|
|
733
|
-
description: k2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
734
|
-
"Stay tuned for more questions ",
|
|
735
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
736
|
-
" and insights."
|
|
737
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
738
|
-
"Watch for additional enhanced stream ",
|
|
739
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
740
|
-
" interactive experience."
|
|
153
|
+
e?.length === 4 && /* @__PURE__ */ t(d, { children: [
|
|
154
|
+
/* @__PURE__ */ t(h, { children: [
|
|
155
|
+
/* @__PURE__ */ s(l, { src: e[0].mediaUrlHttps }),
|
|
156
|
+
/* @__PURE__ */ s(l, { src: e[1].mediaUrlHttps })
|
|
157
|
+
] }),
|
|
158
|
+
/* @__PURE__ */ t(h, { children: [
|
|
159
|
+
/* @__PURE__ */ s(l, { src: e[2].mediaUrlHttps }),
|
|
160
|
+
/* @__PURE__ */ s(l, { src: e[3].mediaUrlHttps })
|
|
161
|
+
] })
|
|
162
|
+
] })
|
|
741
163
|
] })
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
return /* @__PURE__ */ jsxs(I$2, { children: [
|
|
746
|
-
a2 && /* @__PURE__ */ jsx(A$2, {}),
|
|
747
|
-
/* @__PURE__ */ jsx(d$1, { style: a2 ? { marginTop: "-40px" } : {}, children: /* @__PURE__ */ jsxs(v, { children: [
|
|
748
|
-
!a2 && !g2 && /* @__PURE__ */ jsx(
|
|
749
|
-
ii,
|
|
750
|
-
{
|
|
751
|
-
feedbackMessages: Q,
|
|
752
|
-
questionVoted: !!t2,
|
|
753
|
-
questionVotedCorrectly: t2 == null ? void 0 : t2.correct,
|
|
754
|
-
questionType: r2,
|
|
755
|
-
hasCorrectAnswer: c2,
|
|
756
|
-
showExpiredNotification: h$12,
|
|
757
|
-
showClosedNotificationTrivia: W2,
|
|
758
|
-
votedInCurrentRender: V,
|
|
759
|
-
votedAfterQuestionClosed: x$22,
|
|
760
|
-
enteredAnActiveQuestion: y$12,
|
|
761
|
-
marketClosed: I2,
|
|
762
|
-
percentsAnimated: E2,
|
|
763
|
-
voteErrorMessage: D2,
|
|
764
|
-
votedAnswer: t2
|
|
765
|
-
}
|
|
766
|
-
),
|
|
767
|
-
Y && /* @__PURE__ */ jsx(
|
|
768
|
-
b,
|
|
164
|
+
] }),
|
|
165
|
+
!g && (e?.[0]?.type === "video" || e?.[0]?.type === "animated_gif") && A && /* @__PURE__ */ s(
|
|
166
|
+
y,
|
|
769
167
|
{
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
isTimer: !T,
|
|
775
|
-
isPlayingTimer: !t2,
|
|
776
|
-
animatePoints: Vt,
|
|
777
|
-
timerDuration: yt ? 0 : Number(((et = e2 == null ? void 0 : e2.appearance) == null ? void 0 : et.autoHideInterval) || "30"),
|
|
778
|
-
votedInCurrentRender: V,
|
|
779
|
-
percentsAnimated: E2
|
|
168
|
+
muted: c,
|
|
169
|
+
source: A,
|
|
170
|
+
poster: e[0].mediaUrlHttps,
|
|
171
|
+
controlVideo: v
|
|
780
172
|
}
|
|
781
|
-
)
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
"EARLY PREDICTION"
|
|
786
|
-
] }),
|
|
787
|
-
/* @__PURE__ */ jsx(x, { style: vt ? { marginTop: 0 } : {}, children: H }),
|
|
788
|
-
a2 && /* @__PURE__ */ jsx(
|
|
789
|
-
ii,
|
|
790
|
-
{
|
|
791
|
-
feedbackMessages: Q,
|
|
792
|
-
questionVoted: !!t2,
|
|
793
|
-
questionVotedCorrectly: t2 == null ? void 0 : t2.correct,
|
|
794
|
-
questionType: r2,
|
|
795
|
-
hasCorrectAnswer: c2,
|
|
796
|
-
showExpiredNotification: h$12,
|
|
797
|
-
showClosedNotificationTrivia: W2,
|
|
798
|
-
votedInCurrentRender: V,
|
|
799
|
-
votedAfterQuestionClosed: x$22,
|
|
800
|
-
enteredAnActiveQuestion: y$12,
|
|
801
|
-
marketClosed: I2,
|
|
802
|
-
percentsAnimated: E2,
|
|
803
|
-
voteErrorMessage: D2,
|
|
804
|
-
isEarlyPrediction: a2,
|
|
805
|
-
correctAnswer: o2,
|
|
806
|
-
votedAnswer: t2,
|
|
807
|
-
onAnimationEnd: gt
|
|
808
|
-
}
|
|
809
|
-
),
|
|
810
|
-
/* @__PURE__ */ jsxs(C$1, { children: [
|
|
811
|
-
/* @__PURE__ */ jsx(u$1, { children: b$12.sort((s, l2) => s.id > l2.id ? 1 : -1).map((s, l2) => /* @__PURE__ */ jsx(
|
|
812
|
-
mt,
|
|
813
|
-
{
|
|
814
|
-
...s,
|
|
815
|
-
firstOption: l2 === 0,
|
|
816
|
-
markThatVoted: It,
|
|
817
|
-
onPercentsAnimated: () => G(true),
|
|
818
|
-
votedAfterQuestionClosed: x$22,
|
|
819
|
-
enteredAnActiveQuestion: y$12,
|
|
820
|
-
marketClosed: I2,
|
|
821
|
-
isEarlyPrediction: a2,
|
|
822
|
-
isAd: g2,
|
|
823
|
-
webos: ct
|
|
824
|
-
},
|
|
825
|
-
s.id
|
|
826
|
-
)) }),
|
|
827
|
-
a2 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
828
|
-
/* @__PURE__ */ jsx(f$2, {}),
|
|
829
|
-
/* @__PURE__ */ jsx(S, { children: /* @__PURE__ */ jsx(q, { name: "mastersLogoWhite" }) })
|
|
830
|
-
] })
|
|
831
|
-
] })
|
|
832
|
-
] })
|
|
833
|
-
] }) })
|
|
834
|
-
] });
|
|
835
|
-
};
|
|
173
|
+
)
|
|
174
|
+
] });
|
|
175
|
+
}
|
|
176
|
+
);
|
|
836
177
|
export {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
f$4 as f,
|
|
845
|
-
l$4 as l,
|
|
846
|
-
m$4 as m,
|
|
847
|
-
n$4 as n,
|
|
848
|
-
p$4 as p,
|
|
849
|
-
te as t
|
|
178
|
+
F as D,
|
|
179
|
+
K as I,
|
|
180
|
+
Z as N,
|
|
181
|
+
G as e,
|
|
182
|
+
z as j,
|
|
183
|
+
J as o,
|
|
184
|
+
X as s
|
|
850
185
|
};
|