@streamlayer/react 1.24.7 → 1.24.8
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/advertisement.js +74 -75
- package/lib/cjs/bet-pack.js +65 -66
- package/lib/cjs/index.js +328 -329
- package/lib/cjs/insight.js +146 -147
- package/lib/cjs/masters.js +257 -258
- package/lib/cjs/notification.js +123 -124
- package/lib/cjs/points.js +31 -32
- package/lib/cjs/style.css +1 -1
- package/lib/dist/cjs/index.js +257 -258
- package/lib/dist/es/index.js +257 -258
- package/lib/es/advertisement.js +2 -2
- package/lib/es/index.js +1 -1
- package/lib/es/index10.js +9 -9
- package/lib/es/index12.js +17 -17
- package/lib/es/index13.js +41 -41
- package/lib/es/index14.js +29 -29
- package/lib/es/index16.js +30 -30
- package/lib/es/index2.js +35 -36
- package/lib/es/index4.js +1 -1
- package/lib/es/index5.js +273 -3
- package/lib/es/index6.js +3 -7
- package/lib/es/index7.js +5 -284
- package/lib/es/index8.js +11 -11
- package/lib/es/insight.js +1 -1
- package/lib/es/masters2.js +26 -26
- package/lib/es/notification.js +23 -23
- package/lib/es/pause-ad.js +1 -1
- package/lib/es/points.js +10 -10
- package/lib/es/polymarket.js +2 -2
- package/lib/es/storage.js +12 -12
- package/lib/es/style.css +1 -1
- package/lib/source.css +1 -1
- package/package.json +14 -14
package/lib/es/index14.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as T, jsx as e, Fragment as le } from "react/jsx-runtime";
|
|
2
2
|
import { s as n, c as Z } from "./feature.js";
|
|
3
|
-
import { useState as I, useEffect as b, useCallback as v, forwardRef as ce, useRef as
|
|
4
|
-
import {
|
|
3
|
+
import { useState as I, useEffect as b, useCallback as v, forwardRef as ce, useRef as R } from "react";
|
|
4
|
+
import { H as f } from "./index5.js";
|
|
5
5
|
import { G as ue, d as ie, b as de } from "./index8.js";
|
|
6
6
|
import { C as pe } from "./useStreamLayerApp2.js";
|
|
7
7
|
const me = /* @__PURE__ */ n("div")({
|
|
@@ -66,7 +66,7 @@ const me = /* @__PURE__ */ n("div")({
|
|
|
66
66
|
name: "Poster",
|
|
67
67
|
class: "p12ow7zo",
|
|
68
68
|
propsAsIs: !1
|
|
69
|
-
}),
|
|
69
|
+
}), H = /* @__PURE__ */ n("div")({
|
|
70
70
|
name: "Control",
|
|
71
71
|
class: "cdpal9o",
|
|
72
72
|
propsAsIs: !1
|
|
@@ -94,34 +94,34 @@ const me = /* @__PURE__ */ n("div")({
|
|
|
94
94
|
name: "WebOSIconButton",
|
|
95
95
|
class: "w1q3u7py",
|
|
96
96
|
propsAsIs: !1
|
|
97
|
-
}), Ee = () => Y,
|
|
97
|
+
}), Ee = () => Y, B = /* @__PURE__ */ n(Ee())({
|
|
98
98
|
name: "WebOSIconButtonAnimation",
|
|
99
99
|
class: "wdlqvum",
|
|
100
100
|
propsAsIs: !0
|
|
101
|
-
}), Ne = () =>
|
|
101
|
+
}), Ne = () => B, Oe = /* @__PURE__ */ n(Ne())({
|
|
102
102
|
name: "WebOSIconButtonPlay",
|
|
103
103
|
class: "w1ylz9ea",
|
|
104
104
|
propsAsIs: !0
|
|
105
|
-
}), Se = () =>
|
|
105
|
+
}), Se = () => B, We = /* @__PURE__ */ n(Se())({
|
|
106
106
|
name: "WebOSIconButtonPause",
|
|
107
107
|
class: "w1iylt55",
|
|
108
108
|
propsAsIs: !0
|
|
109
|
-
}),
|
|
109
|
+
}), Re = () => B, He = /* @__PURE__ */ n(Re())({
|
|
110
110
|
name: "WebOSIconButtonMute",
|
|
111
111
|
class: "w8h4h7",
|
|
112
112
|
propsAsIs: !0
|
|
113
|
-
}), Te = () =>
|
|
113
|
+
}), Te = () => B, Be = /* @__PURE__ */ n(Te())({
|
|
114
114
|
name: "WebOSIconButtonUnmute",
|
|
115
115
|
class: "w12l12kt",
|
|
116
116
|
propsAsIs: !0
|
|
117
|
-
}),
|
|
117
|
+
}), Le = (t) => {
|
|
118
118
|
for (const a of t)
|
|
119
119
|
a.isIntersecting ? a.target instanceof HTMLVideoElement && a.target.autoplay && a.target.play() : a.target instanceof HTMLVideoElement && !a.target.paused && a.target.pause();
|
|
120
|
-
}, ee = new IntersectionObserver(
|
|
120
|
+
}, ee = new IntersectionObserver(Le, { threshold: 0.5 }), F = /* @__PURE__ */ new Set(), Ue = (t) => {
|
|
121
121
|
ee.observe(t), F.add(t);
|
|
122
|
-
},
|
|
122
|
+
}, je = (t) => {
|
|
123
123
|
ee.unobserve(t), F.delete(t);
|
|
124
|
-
},
|
|
124
|
+
}, ze = () => {
|
|
125
125
|
for (const t of F)
|
|
126
126
|
t instanceof HTMLVideoElement && !t.paused && t.pause();
|
|
127
127
|
};
|
|
@@ -137,7 +137,7 @@ function qe(...t) {
|
|
|
137
137
|
[...t]
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
|
-
const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMuted: i, unmute: c, mute: d, togglePlaying: p }) => !t && !a && !o ? /* @__PURE__ */ e(
|
|
140
|
+
const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMuted: i, unmute: c, mute: d, togglePlaying: p }) => !t && !a && !o ? /* @__PURE__ */ e(H, { children: l ? /* @__PURE__ */ e(f, { name: "icon-pause" }) : /* @__PURE__ */ e(f, { name: "icon-play" }) }) : o ? /* @__PURE__ */ T(ve, { children: [
|
|
141
141
|
l ? /* @__PURE__ */ e(we, { onClick: p }) : /* @__PURE__ */ e(xe, { onClick: p }),
|
|
142
142
|
/* @__PURE__ */ e(Me, { className: Z(!i && "muted"), onClick: i ? c : d })
|
|
143
143
|
] }) : null, Fe = ({
|
|
@@ -152,8 +152,8 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
152
152
|
hasNotPausedVideo: y,
|
|
153
153
|
hasInteractedWithAudio: C
|
|
154
154
|
}) => /* @__PURE__ */ T(le, { children: [
|
|
155
|
-
!t && !(a && o) && /* @__PURE__ */ e(
|
|
156
|
-
!t && a && o && C && /* @__PURE__ */ e(
|
|
155
|
+
!t && !(a && o) && /* @__PURE__ */ e(H, { "data-control-btn": "true", children: l ? y ? null : /* @__PURE__ */ e(Oe, { children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) : i ? /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(f, { name: "icon-pause" }) }) : /* @__PURE__ */ e(Y, { "data-control-icon": "true", children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) }),
|
|
156
|
+
!t && a && o && C && /* @__PURE__ */ e(H, { children: p ? /* @__PURE__ */ e(He, { onClick: c, children: /* @__PURE__ */ e(f, { name: "iconMute" }) }) : /* @__PURE__ */ e(Be, { onClick: d, children: /* @__PURE__ */ e(f, { name: "iconUnMute" }) }) })
|
|
157
157
|
] }), Ye = ce(
|
|
158
158
|
({
|
|
159
159
|
poster: t,
|
|
@@ -167,7 +167,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
167
167
|
onRender: y,
|
|
168
168
|
onMute: C,
|
|
169
169
|
onMuteClick: x,
|
|
170
|
-
onQuartile:
|
|
170
|
+
onQuartile: L,
|
|
171
171
|
autoPlay: M,
|
|
172
172
|
playMuted: k,
|
|
173
173
|
className: te,
|
|
@@ -175,7 +175,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
175
175
|
webos: E,
|
|
176
176
|
hasNotPausedVideo: ae
|
|
177
177
|
}, se) => {
|
|
178
|
-
const u =
|
|
178
|
+
const u = R(null), ne = qe(u, se), U = R(!1), j = R(!1), m = R(/* @__PURE__ */ new Set()), [G, K] = I(!1), [N, O] = I(!1), [z, _] = I(!1), [J, S] = I(!0), [q, W] = I(k), [$, oe] = I(!1);
|
|
179
179
|
b(() => {
|
|
180
180
|
a && (W(k), K(!1));
|
|
181
181
|
}, [a]);
|
|
@@ -207,7 +207,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
207
207
|
const g = u?.current;
|
|
208
208
|
if (!g)
|
|
209
209
|
return;
|
|
210
|
-
|
|
210
|
+
ze(), g.play().catch((h) => console.log(h)), S(!1);
|
|
211
211
|
}
|
|
212
212
|
}, re = () => {
|
|
213
213
|
u?.current?.load(), S(!0);
|
|
@@ -216,14 +216,14 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
216
216
|
P();
|
|
217
217
|
}, [P]), b(() => {
|
|
218
218
|
const s = u.current;
|
|
219
|
-
return s ? (
|
|
220
|
-
|
|
219
|
+
return s ? (j.current = s.muted, W(s.muted), Ue(s), () => {
|
|
220
|
+
je(s);
|
|
221
221
|
}) : () => {
|
|
222
222
|
};
|
|
223
223
|
}, []), b(() => {
|
|
224
224
|
y?.();
|
|
225
225
|
}, [y]), b(() => {
|
|
226
|
-
m.current.clear(),
|
|
226
|
+
m.current.clear(), U.current = !1;
|
|
227
227
|
}, [a]), /* @__PURE__ */ T(
|
|
228
228
|
$e,
|
|
229
229
|
{
|
|
@@ -242,18 +242,18 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
242
242
|
src: a,
|
|
243
243
|
autoPlay: M,
|
|
244
244
|
onPlay: () => {
|
|
245
|
-
K(!0),
|
|
245
|
+
K(!0), U.current && (i?.(), m.current.clear()), O(!0), S(!1), c?.(), k ? A() : Q();
|
|
246
246
|
},
|
|
247
247
|
onTimeUpdate: (s) => {
|
|
248
248
|
const r = s.target.duration, g = s.target.currentTime;
|
|
249
249
|
if (r && g) {
|
|
250
250
|
const h = Math.floor(g / r * 100);
|
|
251
|
-
h >= 25 && h < 50 && !m.current.has(25) ? (
|
|
251
|
+
h >= 25 && h < 50 && !m.current.has(25) ? (L?.(25), m.current.add(25)) : h >= 50 && h < 75 && !m.current.has(50) ? (L?.(50), m.current.add(50)) : h >= 75 && !m.current.has(75) && (L?.(75), m.current.add(75));
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
onVolumeChange: (s) => {
|
|
255
255
|
const r = s.target.muted;
|
|
256
|
-
|
|
256
|
+
j.current !== r && (C?.(r), j.current = r, (r !== w || w === void 0) && (r ? P() : Q()));
|
|
257
257
|
},
|
|
258
258
|
onError: async (s) => {
|
|
259
259
|
try {
|
|
@@ -272,7 +272,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
272
272
|
O(!1), d?.(), P();
|
|
273
273
|
},
|
|
274
274
|
onEnded: () => {
|
|
275
|
-
O(!1),
|
|
275
|
+
O(!1), U.current = !0, re(), p?.(), P();
|
|
276
276
|
},
|
|
277
277
|
style: { visibility: J ? "hidden" : "visible" },
|
|
278
278
|
controls: !1,
|
|
@@ -283,7 +283,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
283
283
|
!E && /* @__PURE__ */ e(
|
|
284
284
|
De,
|
|
285
285
|
{
|
|
286
|
-
loading:
|
|
286
|
+
loading: z,
|
|
287
287
|
autoPlay: M,
|
|
288
288
|
played: G,
|
|
289
289
|
playing: N,
|
|
@@ -296,7 +296,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
296
296
|
E && /* @__PURE__ */ e(
|
|
297
297
|
Fe,
|
|
298
298
|
{
|
|
299
|
-
loading:
|
|
299
|
+
loading: z,
|
|
300
300
|
autoPlay: M,
|
|
301
301
|
playMuted: k,
|
|
302
302
|
playing: N,
|
|
@@ -308,14 +308,14 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
|
|
|
308
308
|
hasInteractedWithAudio: $
|
|
309
309
|
}
|
|
310
310
|
),
|
|
311
|
-
|
|
311
|
+
z && /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(ie, {}) })
|
|
312
312
|
]
|
|
313
313
|
}
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
316
|
);
|
|
317
317
|
export {
|
|
318
|
-
|
|
318
|
+
ze as O,
|
|
319
319
|
Ye as V,
|
|
320
320
|
Ze as y
|
|
321
321
|
};
|
package/lib/es/index16.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as Y, F as W, s } from "./feature.js";
|
|
2
2
|
import { h as b2, i as y2, I as T2, d as H2, Q as k } from "./useStreamLayerApp2.js";
|
|
3
|
-
import { useState as T, useEffect as V, useRef as Z, useCallback as
|
|
3
|
+
import { useState as T, useEffect as V, useRef as Z, useCallback as B, Component as V2, createElement as k2, useMemo as z2 } from "react";
|
|
4
4
|
import { jsxs as n, jsx as e, Fragment as S } from "react/jsx-runtime";
|
|
5
5
|
import { i as z } from "./index9.js";
|
|
6
6
|
import { I as g2, s as x2, N as v2, e as R2 } from "./index10.js";
|
|
@@ -8,9 +8,9 @@ import { createPortal as P } from "react-dom";
|
|
|
8
8
|
import { A as K } from "./index8.js";
|
|
9
9
|
import { u as F2 } from "./utils.js";
|
|
10
10
|
import { r as I2, S as S2, R as M2, D as q2 } from "./storage.js";
|
|
11
|
-
import { $ as
|
|
12
|
-
import { O as
|
|
13
|
-
import {
|
|
11
|
+
import { $ as E2 } from "./index12.js";
|
|
12
|
+
import { O as N2, V as B2 } from "./index14.js";
|
|
13
|
+
import { H } from "./index5.js";
|
|
14
14
|
import { p as Z2 } from "./index11.js";
|
|
15
15
|
import { f as O2 } from "./index13.js";
|
|
16
16
|
import { u as W2 } from "./analytics.js";
|
|
@@ -258,7 +258,7 @@ const re = (t) => b2(t), le = (t) => {
|
|
|
258
258
|
/* @__PURE__ */ e(H, { name: "iconCopySuccess" }),
|
|
259
259
|
/* @__PURE__ */ e(v0, { children: "Link Copied to Clipboard" })
|
|
260
260
|
] }) }), A0 = (t) => {
|
|
261
|
-
const i = Z(), [a, l] = T(null), c =
|
|
261
|
+
const i = Z(), [a, l] = T(null), c = B(
|
|
262
262
|
async (o) => {
|
|
263
263
|
if (o && navigator?.clipboard?.writeText) {
|
|
264
264
|
i.current && (clearTimeout(i.current), l(null));
|
|
@@ -517,17 +517,17 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
517
517
|
] }),
|
|
518
518
|
p
|
|
519
519
|
] });
|
|
520
|
-
}, q0 = () => I2,
|
|
520
|
+
}, q0 = () => I2, E0 = /* @__PURE__ */ s(q0())({
|
|
521
521
|
name: "Container",
|
|
522
522
|
class: "cll3md7",
|
|
523
523
|
propsAsIs: !0
|
|
524
|
-
}),
|
|
524
|
+
}), N0 = () => S2, B0 = /* @__PURE__ */ s(N0())({
|
|
525
525
|
name: "ActionBtn",
|
|
526
526
|
class: "a10g1iik",
|
|
527
527
|
propsAsIs: !0
|
|
528
|
-
}), Z0 = ({ questionId: t, ...i }) => /* @__PURE__ */ n(
|
|
529
|
-
/* @__PURE__ */ e(
|
|
530
|
-
/* @__PURE__ */ e(
|
|
528
|
+
}), Z0 = ({ questionId: t, ...i }) => /* @__PURE__ */ n(E0, { "data-a": "intr", "data-name": t, children: [
|
|
529
|
+
/* @__PURE__ */ e(E2, { questionId: t, ...i }),
|
|
530
|
+
/* @__PURE__ */ e(B0, { "data-a": "intr", "data-name": t, children: "View Insight" })
|
|
531
531
|
] }), O0 = () => I2, W0 = /* @__PURE__ */ s(O0())({
|
|
532
532
|
name: "Container",
|
|
533
533
|
class: "cl56x6b",
|
|
@@ -550,7 +550,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
550
550
|
propsAsIs: !1
|
|
551
551
|
}), de = ({ questions: t, openQuestion: i, controlVideo: a }) => t ? /* @__PURE__ */ e(n2, { "data-a": "intr", onClick: (c) => {
|
|
552
552
|
const o = c.target.getAttribute("data-name");
|
|
553
|
-
o && (
|
|
553
|
+
o && (N2(), i(o, { openedFrom: "list" }));
|
|
554
554
|
}, children: t?.map((c) => {
|
|
555
555
|
if (c.type === "question" && c.attributes?.attributes.case === "question") {
|
|
556
556
|
const o = c.attributes.attributes.value;
|
|
@@ -594,7 +594,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
594
594
|
class: "a12495er",
|
|
595
595
|
propsAsIs: !1
|
|
596
596
|
}), e1 = ({ video: t, image: i, imageMode: a, heading: l, body: c, action: o, controlVideo: d }) => /* @__PURE__ */ n(D0, { children: [
|
|
597
|
-
t?.url && /* @__PURE__ */ e(
|
|
597
|
+
t?.url && /* @__PURE__ */ e(B2, { source: t.url, poster: t.thumbnailUrl, controlVideo: d }),
|
|
598
598
|
i && !t?.url && /* @__PURE__ */ e(Q0, { "data-rounded": a === H2.ROUNDED, children: /* @__PURE__ */ e(U0, { src: i, alt: l }) }),
|
|
599
599
|
/* @__PURE__ */ n(Y0, { children: [
|
|
600
600
|
/* @__PURE__ */ e(K0, { children: l }),
|
|
@@ -788,7 +788,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
788
788
|
/* @__PURE__ */ e(F1, {}),
|
|
789
789
|
/* @__PURE__ */ e(M1, {})
|
|
790
790
|
] })
|
|
791
|
-
] }),
|
|
791
|
+
] }), E1 = 118, N1 = () => O2, B1 = /* @__PURE__ */ s(N1())({
|
|
792
792
|
name: "Container",
|
|
793
793
|
class: "c10131zw",
|
|
794
794
|
propsAsIs: !0
|
|
@@ -808,7 +808,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
808
808
|
name: "PointsTitle",
|
|
809
809
|
class: "p1pjil1h",
|
|
810
810
|
propsAsIs: !0
|
|
811
|
-
}),
|
|
811
|
+
}), E = /* @__PURE__ */ s("div")({
|
|
812
812
|
name: "Subtitle",
|
|
813
813
|
class: "s1iorwr9",
|
|
814
814
|
propsAsIs: !1
|
|
@@ -816,7 +816,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
816
816
|
name: "SubtitleFG",
|
|
817
817
|
class: "s51sv9d",
|
|
818
818
|
propsAsIs: !1
|
|
819
|
-
}),
|
|
819
|
+
}), N = /* @__PURE__ */ s("div")({
|
|
820
820
|
name: "AnswerText",
|
|
821
821
|
class: "a1lbk2ye",
|
|
822
822
|
propsAsIs: !1
|
|
@@ -848,12 +848,12 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
848
848
|
}, 3e3);
|
|
849
849
|
return () => clearInterval(u);
|
|
850
850
|
}, [l]), V(() => {
|
|
851
|
-
L.current[I] && d(L.current[I]?.getBoundingClientRect()?.height ||
|
|
851
|
+
L.current[I] && d(L.current[I]?.getBoundingClientRect()?.height || E1);
|
|
852
852
|
}, [I, d]);
|
|
853
853
|
const r = (u) => (g) => {
|
|
854
854
|
L.current && (L.current[u] = g);
|
|
855
855
|
}, h = (u) => ({ transform: K1(u, I, p.height) }), f = { ...p };
|
|
856
|
-
return a && f.height && typeof f.height == "number" && (f.height += 32), /* @__PURE__ */ e(
|
|
856
|
+
return a && f.height && typeof f.height == "number" && (f.height += 32), /* @__PURE__ */ e(B1, { style: p.height ? f : { ...p, paddingTop: 0, paddingBottom: 0 }, hiding: v, children: /* @__PURE__ */ n(
|
|
857
857
|
Z1,
|
|
858
858
|
{
|
|
859
859
|
style: {
|
|
@@ -874,7 +874,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
874
874
|
] }),
|
|
875
875
|
/* @__PURE__ */ n(x, { ref: r(3), style: h(3), children: [
|
|
876
876
|
/* @__PURE__ */ e(M, { children: o }),
|
|
877
|
-
/* @__PURE__ */ e(
|
|
877
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ n(N, { children: [
|
|
878
878
|
/* @__PURE__ */ e("span", { children: "Your Pick:" }),
|
|
879
879
|
" ",
|
|
880
880
|
i?.title
|
|
@@ -892,9 +892,9 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
892
892
|
/* @__PURE__ */ e("br", {}),
|
|
893
893
|
"You answered correctly."
|
|
894
894
|
] }),
|
|
895
|
-
/* @__PURE__ */ n(
|
|
895
|
+
/* @__PURE__ */ n(E, { children: [
|
|
896
896
|
/* @__PURE__ */ e(m2, { name: "selected" }),
|
|
897
|
-
/* @__PURE__ */ n(
|
|
897
|
+
/* @__PURE__ */ n(N, { children: [
|
|
898
898
|
/* @__PURE__ */ e("span", { children: "Your Pick:" }),
|
|
899
899
|
" ",
|
|
900
900
|
i?.title
|
|
@@ -910,9 +910,9 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
910
910
|
style: { ...h(5), color: "var(--color-sdk-prediction-result-success-text)" },
|
|
911
911
|
children: [
|
|
912
912
|
/* @__PURE__ */ e(W1, { children: I === 5 && /* @__PURE__ */ e(Z2, { delay: 0.5, prefix: "+", suffix: " points", value: i?.points }) }),
|
|
913
|
-
/* @__PURE__ */ n(
|
|
913
|
+
/* @__PURE__ */ n(E, { children: [
|
|
914
914
|
/* @__PURE__ */ e(m2, { name: "selected" }),
|
|
915
|
-
/* @__PURE__ */ n(
|
|
915
|
+
/* @__PURE__ */ n(N, { children: [
|
|
916
916
|
/* @__PURE__ */ e("span", { children: "Your Pick:" }),
|
|
917
917
|
" ",
|
|
918
918
|
i?.title
|
|
@@ -930,9 +930,9 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
930
930
|
c,
|
|
931
931
|
"."
|
|
932
932
|
] }),
|
|
933
|
-
/* @__PURE__ */ n(
|
|
933
|
+
/* @__PURE__ */ n(E, { style: { color: "var(--color-sdk-prediction-result-error-subtitle)" }, children: [
|
|
934
934
|
/* @__PURE__ */ e(D1, { name: "circleClose" }),
|
|
935
|
-
/* @__PURE__ */ n(
|
|
935
|
+
/* @__PURE__ */ n(N, { children: [
|
|
936
936
|
/* @__PURE__ */ e("span", { children: "Your Pick:" }),
|
|
937
937
|
" ",
|
|
938
938
|
i?.title
|
|
@@ -944,11 +944,11 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
944
944
|
}
|
|
945
945
|
) });
|
|
946
946
|
}, Ce = (t) => {
|
|
947
|
-
const [i, a] = T(!1), [l, c] = T(!1), o = Z(null), d =
|
|
947
|
+
const [i, a] = T(!1), [l, c] = T(!1), o = Z(null), d = B(() => {
|
|
948
948
|
c(!0), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
949
949
|
c(!1);
|
|
950
950
|
}, 1e3);
|
|
951
|
-
}, []), p =
|
|
951
|
+
}, []), p = B(async (v) => {
|
|
952
952
|
a(!0);
|
|
953
953
|
const I = v.map(
|
|
954
954
|
(_) => new Promise((L, r) => {
|
|
@@ -1141,11 +1141,11 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
1141
1141
|
name: "IconClose",
|
|
1142
1142
|
class: "i1mavjt2",
|
|
1143
1143
|
propsAsIs: !0
|
|
1144
|
-
}),
|
|
1144
|
+
}), E3 = /* @__PURE__ */ s("div")({
|
|
1145
1145
|
name: "OnboardingFooter",
|
|
1146
1146
|
class: "o1x0dyzv",
|
|
1147
1147
|
propsAsIs: !1
|
|
1148
|
-
}),
|
|
1148
|
+
}), N3 = () => z3, B3 = /* @__PURE__ */ s(N3())({
|
|
1149
1149
|
name: "OnboardingActionBtn",
|
|
1150
1150
|
class: "o1jfi9c3",
|
|
1151
1151
|
propsAsIs: !0
|
|
@@ -1175,7 +1175,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
1175
1175
|
V(() => {
|
|
1176
1176
|
i?.length ? y({ ...F, steps: !0 }) : a?.length ? y({ ...F, rules: !0 }) : y({ ...F, inviteCard: !0 });
|
|
1177
1177
|
}, []);
|
|
1178
|
-
const _2 = z2(() => A.steps && g === 0 ? "Continue" : A.rules ? C || !l ? "Got it" : l : A.inviteCard ? L || "Play Now" : "Next", [A, g, C, l, L]), w2 =
|
|
1178
|
+
const _2 = z2(() => A.steps && g === 0 ? "Continue" : A.rules ? C || !l ? "Got it" : l : A.inviteCard ? L || "Play Now" : "Next", [A, g, C, l, L]), w2 = B(() => {
|
|
1179
1179
|
i?.length && g < i.length - 1 ? m((O) => ++O) : a?.length && A.steps ? y({ ...F, rules: !0 }) : A.rules && y({ ...F, inviteCard: !0 });
|
|
1180
1180
|
}, [g, i?.length, a?.length, A, m, y]), $2 = async () => {
|
|
1181
1181
|
A.inviteCard ? await t.onboardingStatus.submitInplay() : A.rules && C ? $(!1) : w2();
|
|
@@ -1215,7 +1215,7 @@ const w0 = /* @__PURE__ */ s("div")({
|
|
|
1215
1215
|
}
|
|
1216
1216
|
)
|
|
1217
1217
|
] }),
|
|
1218
|
-
/* @__PURE__ */ e(
|
|
1218
|
+
/* @__PURE__ */ e(E3, { children: /* @__PURE__ */ e(z, { loading: r, style: { width: "100%" }, children: /* @__PURE__ */ e(B3, { "data-a": "intr", onClick: $2, children: _2 }) }) })
|
|
1219
1219
|
] }) });
|
|
1220
1220
|
}, Z3 = /* @__PURE__ */ s("button")({
|
|
1221
1221
|
name: "Container",
|
package/lib/es/index2.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { h as ye } from "./
|
|
1
|
+
import { h as ye } from "./index7.js";
|
|
2
2
|
import { jsx as o, jsxs as v, Fragment as R } from "react/jsx-runtime";
|
|
3
3
|
import { u as f, F as Ne, s as p, b as Se, c as w, a as T, N as M } from "./feature.js";
|
|
4
4
|
import { l as we, S as $e, m as Ae, d as Ce, n as Ee, C as Re, y as xe, a as Le, f as V, p as De, c as Te } from "./index13.js";
|
|
5
|
-
import { M as Oe, b as _e, Q as Me, z as me, c as he, T as fe, I as
|
|
5
|
+
import { M as Oe, b as _e, Q as Me, z as me, c as he, T as fe, I as Ue, n as Be, f as Pe, w as Q, a as Fe, p as ze } from "./index16.js";
|
|
6
6
|
import F from "lodash.throttle";
|
|
7
|
-
import { useState as N, useEffect as I, useRef as E, PureComponent as Ve, useCallback as z, useMemo as $, Suspense as qe, lazy as je, forwardRef as ve, useLayoutEffect as Qe, useContext as
|
|
7
|
+
import { useState as N, useEffect as I, useRef as E, PureComponent as Ve, useCallback as z, useMemo as $, Suspense as qe, lazy as je, forwardRef as ve, useLayoutEffect as Qe, useContext as H } from "react";
|
|
8
8
|
import { A as L } from "./index8.js";
|
|
9
|
-
import { f as ge, u as
|
|
9
|
+
import { f as ge, u as He, A as Ke, a as We } from "./analytics.js";
|
|
10
10
|
import { m as O } from "./theme.js";
|
|
11
11
|
import { p as q, _ as Ge, e as Je } from "./Question.js";
|
|
12
12
|
import { O as Ze } from "./index12.js";
|
|
13
|
-
import {
|
|
14
|
-
import { I as Xe, S as y, g as C, j as
|
|
15
|
-
import "@storybook/blocks";
|
|
13
|
+
import { H as x } from "./index5.js";
|
|
14
|
+
import { I as Xe, S as y, g as C, j as K, Q as B } from "./useStreamLayerApp2.js";
|
|
16
15
|
import Ye from "react-infinite-scroller";
|
|
17
16
|
import { I as et, s as tt, e as st } from "./index10.js";
|
|
18
17
|
import "./storage.js";
|
|
19
|
-
import "./
|
|
18
|
+
import "./index6.js";
|
|
20
19
|
import { createPortal as nt } from "react-dom";
|
|
21
20
|
import { e as ot } from "./index3.js";
|
|
22
21
|
import { i as W, q as at, _ as rt, j as G } from "./hooks-n9ax4LRT.js";
|
|
@@ -35,18 +34,18 @@ const J = Object.keys(L), Z = () => {
|
|
|
35
34
|
name: t,
|
|
36
35
|
size: L[t]
|
|
37
36
|
};
|
|
38
|
-
}, X = (e) => (e.current?.getBoundingClientRect().y || 0) < -68,
|
|
37
|
+
}, X = (e) => (e.current?.getBoundingClientRect().y || 0) < -68, U = () => window.matchMedia("(orientation: landscape)").matches, it = (e) => {
|
|
39
38
|
const [t] = N(() => ge({
|
|
40
39
|
screen: Z(),
|
|
41
40
|
sdkInView: X(e),
|
|
42
|
-
sdkInDesktopView:
|
|
41
|
+
sdkInDesktopView: U()
|
|
43
42
|
}));
|
|
44
43
|
return I(() => {
|
|
45
44
|
const s = F(() => {
|
|
46
45
|
t.setKey("sdkInView", X(e));
|
|
47
46
|
}, 200), a = F(() => {
|
|
48
47
|
const n = Z();
|
|
49
|
-
t.setKey("screen", n), t.setKey("sdkInDesktopView",
|
|
48
|
+
t.setKey("screen", n), t.setKey("sdkInDesktopView", U());
|
|
50
49
|
}, 200);
|
|
51
50
|
return window.addEventListener("scroll", s), window.addEventListener("resize", a), () => {
|
|
52
51
|
window.removeEventListener("scroll", s), window.removeEventListener("resize", a);
|
|
@@ -67,7 +66,7 @@ const J = Object.keys(L), Z = () => {
|
|
|
67
66
|
})
|
|
68
67
|
), r = f(t);
|
|
69
68
|
return I(() => {
|
|
70
|
-
const d =
|
|
69
|
+
const d = U() ? s.current : window;
|
|
71
70
|
if (!d)
|
|
72
71
|
return () => {
|
|
73
72
|
};
|
|
@@ -76,7 +75,7 @@ const J = Object.keys(L), Z = () => {
|
|
|
76
75
|
if (!c)
|
|
77
76
|
return;
|
|
78
77
|
let u = 0;
|
|
79
|
-
|
|
78
|
+
U() ? u = c.scrollTop : u = e.current?.getBoundingClientRect().y || 0;
|
|
80
79
|
const m = a.current - u;
|
|
81
80
|
if (lt > Math.abs(m))
|
|
82
81
|
return;
|
|
@@ -180,7 +179,7 @@ const Y = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ o(mt, { "data
|
|
|
180
179
|
class: "awohrz6",
|
|
181
180
|
propsAsIs: !0
|
|
182
181
|
}), wt = ({ title: e, description: t, onClick: s, className: a }) => {
|
|
183
|
-
const [n] =
|
|
182
|
+
const [n] = He({
|
|
184
183
|
type: "invitation",
|
|
185
184
|
action: "sent",
|
|
186
185
|
payload: {
|
|
@@ -346,7 +345,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
346
345
|
name: "Name",
|
|
347
346
|
class: "njsrqgr",
|
|
348
347
|
propsAsIs: !1
|
|
349
|
-
}),
|
|
348
|
+
}), Ut = () => x, Bt = /* @__PURE__ */ p(Ut())({
|
|
350
349
|
name: "CurrentUserBadge",
|
|
351
350
|
class: "c17uc4zr",
|
|
352
351
|
propsAsIs: !0
|
|
@@ -364,7 +363,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
364
363
|
t ? /* @__PURE__ */ o(Dt, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ o(Tt, { children: et(s || "") }),
|
|
365
364
|
/* @__PURE__ */ v(_t, { children: [
|
|
366
365
|
/* @__PURE__ */ o(Mt, { children: s || "" }),
|
|
367
|
-
r && /* @__PURE__ */ o(
|
|
366
|
+
r && /* @__PURE__ */ o(Bt, { name: "icon-star" })
|
|
368
367
|
] })
|
|
369
368
|
] }),
|
|
370
369
|
/* @__PURE__ */ o("div", { children: tt(n) })
|
|
@@ -450,7 +449,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
450
449
|
})
|
|
451
450
|
}), m]
|
|
452
451
|
});
|
|
453
|
-
},
|
|
452
|
+
}, Ht = ({
|
|
454
453
|
gamification: e,
|
|
455
454
|
scrollNode: t,
|
|
456
455
|
scrollStore: s
|
|
@@ -459,7 +458,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
459
458
|
gamification: e,
|
|
460
459
|
scrollNode: t,
|
|
461
460
|
scrollStore: s
|
|
462
|
-
}) : null,
|
|
461
|
+
}) : null, Kt = ({ store: e, openQuestion: t, withPickHistory: s }) => {
|
|
463
462
|
const { sdk: a } = q(), n = f(e);
|
|
464
463
|
return I(() => {
|
|
465
464
|
s.set(!0);
|
|
@@ -503,7 +502,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
503
502
|
c === D.HOME && /* @__PURE__ */ v(R, { children: [
|
|
504
503
|
/* @__PURE__ */ o(Ae, { children: /* @__PURE__ */ o(Ce, { children: /* @__PURE__ */ o(Wt, { userSummary: e.userSummary }) }) }),
|
|
505
504
|
/* @__PURE__ */ o(Ee, { style: { flex: 1 }, children: /* @__PURE__ */ o(
|
|
506
|
-
|
|
505
|
+
Kt,
|
|
507
506
|
{
|
|
508
507
|
openQuestion: e.openQuestion,
|
|
509
508
|
store: e.feedList.getStore(),
|
|
@@ -511,7 +510,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
511
510
|
}
|
|
512
511
|
) })
|
|
513
512
|
] }),
|
|
514
|
-
c === D.LEADERBOARD && /* @__PURE__ */ o(Re, { children: /* @__PURE__ */ o(
|
|
513
|
+
c === D.LEADERBOARD && /* @__PURE__ */ o(Re, { children: /* @__PURE__ */ o(Ht, { scrollStore: s, scrollNode: a, gamification: e }) })
|
|
515
514
|
] });
|
|
516
515
|
}, Jt = () => V, te = /* @__PURE__ */ p(Jt())({
|
|
517
516
|
name: "OpenedContainer",
|
|
@@ -527,7 +526,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
527
526
|
}) => {
|
|
528
527
|
const s = e + t;
|
|
529
528
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
530
|
-
},
|
|
529
|
+
}, Rn = ({
|
|
531
530
|
gamification: e,
|
|
532
531
|
scrollStore: t,
|
|
533
532
|
className: s,
|
|
@@ -665,7 +664,7 @@ var ne;
|
|
|
665
664
|
T("grpc:stream");
|
|
666
665
|
C.Unknown, C.Internal, C.DeadlineExceeded, C.ResourceExhausted, C.FailedPrecondition, C.Unavailable, C.DataLoss;
|
|
667
666
|
T("grpc:retry");
|
|
668
|
-
|
|
667
|
+
K(10, { description: "Number of attempts to retry" }), K(3e4, { description: "Max delay between retries in milliseconds" });
|
|
669
668
|
var S;
|
|
670
669
|
(function(e) {
|
|
671
670
|
e.SCHEMA = "schema", e.EXTERNAL_TOKEN = "eToken", e.TOKEN = "token";
|
|
@@ -721,7 +720,7 @@ var de;
|
|
|
721
720
|
(function(e) {
|
|
722
721
|
e.Unset = "unset", e.Required = "required", e.Optional = "optional", e.Completed = "completed", e.Disabled = "disabled", e.Unavailable = "unavailable";
|
|
723
722
|
})(de || (de = {}));
|
|
724
|
-
|
|
723
|
+
B.POLL, B.PREDICTION, B.TRIVIA;
|
|
725
724
|
const rs = {
|
|
726
725
|
[y.GAMES]: !0
|
|
727
726
|
}, is = /* @__PURE__ */ p("div")({
|
|
@@ -906,7 +905,7 @@ const rs = {
|
|
|
906
905
|
name: "Description",
|
|
907
906
|
class: "d8uezec",
|
|
908
907
|
propsAsIs: !1
|
|
909
|
-
}),
|
|
908
|
+
}), Us = /* @__PURE__ */ p("button")({
|
|
910
909
|
name: "ActionButton",
|
|
911
910
|
class: "a1h1bk90",
|
|
912
911
|
propsAsIs: !1
|
|
@@ -918,7 +917,7 @@ const rs = {
|
|
|
918
917
|
] }),
|
|
919
918
|
s?.titleCard?.title && /* @__PURE__ */ o(_s, { children: s?.titleCard?.title }),
|
|
920
919
|
s?.titleCard?.subtitle && /* @__PURE__ */ o(Ms, { children: s?.titleCard?.subtitle }),
|
|
921
|
-
/* @__PURE__ */ o(
|
|
920
|
+
/* @__PURE__ */ o(Us, { "data-a": "intr", onClick: t, children: "Play Now" })
|
|
922
921
|
] }), ke = [{
|
|
923
922
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
|
|
924
923
|
tagline: "",
|
|
@@ -931,7 +930,7 @@ const rs = {
|
|
|
931
930
|
}, {
|
|
932
931
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",
|
|
933
932
|
headline: "Win points and play against friends."
|
|
934
|
-
}],
|
|
933
|
+
}], Bs = /* @__PURE__ */ p("div")({
|
|
935
934
|
name: "OnboardingContainer",
|
|
936
935
|
class: "o1xni1kr",
|
|
937
936
|
propsAsIs: !1
|
|
@@ -971,8 +970,8 @@ const rs = {
|
|
|
971
970
|
return () => {
|
|
972
971
|
m();
|
|
973
972
|
};
|
|
974
|
-
}, [e.$store]), /* @__PURE__ */ v(
|
|
975
|
-
children: [/* @__PURE__ */ o(
|
|
973
|
+
}, [e.$store]), /* @__PURE__ */ v(Bs, {
|
|
974
|
+
children: [/* @__PURE__ */ o(Be, {
|
|
976
975
|
loading: n,
|
|
977
976
|
rules: [{
|
|
978
977
|
label: "Answer as many questions as you like.",
|
|
@@ -1024,7 +1023,7 @@ const rs = {
|
|
|
1024
1023
|
const {
|
|
1025
1024
|
loading: k,
|
|
1026
1025
|
throttled: A
|
|
1027
|
-
} =
|
|
1026
|
+
} = Ue(h);
|
|
1028
1027
|
return c && m && i && n.current ? /* @__PURE__ */ o(fe, {
|
|
1029
1028
|
container: n,
|
|
1030
1029
|
useContainer: !r,
|
|
@@ -1077,7 +1076,7 @@ const rs = {
|
|
|
1077
1076
|
name: "InnerContainer",
|
|
1078
1077
|
class: "iqfywam",
|
|
1079
1078
|
propsAsIs: !1
|
|
1080
|
-
}),
|
|
1079
|
+
}), Hs = () => be, Ks = /* @__PURE__ */ p(Hs())({
|
|
1081
1080
|
name: "HiddenContainer",
|
|
1082
1081
|
class: "hokmtod",
|
|
1083
1082
|
propsAsIs: !0
|
|
@@ -1130,7 +1129,7 @@ const rs = {
|
|
|
1130
1129
|
} = q(), [l, i, c] = Zs(t.id);
|
|
1131
1130
|
let u = i;
|
|
1132
1131
|
return n || (u = "auto"), t.type === M.QUESTION ? /* @__PURE__ */ v(R, {
|
|
1133
|
-
children: [/* @__PURE__ */ o(
|
|
1132
|
+
children: [/* @__PURE__ */ o(Ks, {
|
|
1134
1133
|
ref: l,
|
|
1135
1134
|
children: /* @__PURE__ */ o(Q, {
|
|
1136
1135
|
...t
|
|
@@ -1310,7 +1309,7 @@ const rs = {
|
|
|
1310
1309
|
activeFeature: h,
|
|
1311
1310
|
isLogged: g
|
|
1312
1311
|
} = sn(e), k = !!m;
|
|
1313
|
-
|
|
1312
|
+
Ke(r, {
|
|
1314
1313
|
enabled: k,
|
|
1315
1314
|
event: "click",
|
|
1316
1315
|
listener: We
|
|
@@ -1374,13 +1373,13 @@ const rs = {
|
|
|
1374
1373
|
})]
|
|
1375
1374
|
})
|
|
1376
1375
|
});
|
|
1377
|
-
},
|
|
1378
|
-
const { sdk: r, status: d } =
|
|
1376
|
+
}, xn = ({ event: e, topNavigation: t, theme: s, muted: a, withSidebarNotification: n = !0 }) => {
|
|
1377
|
+
const { sdk: r, status: d } = H(W), l = at(), i = rt(), { event: c } = H(W);
|
|
1379
1378
|
if (d === G.UNSET)
|
|
1380
1379
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
1381
1380
|
return d === G.CONNECTED ? /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: "wait" }) : r === null ? /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : !l.app && !l.appNotification && !l.appSidebar || !l.app && !l.appSidebar && l.appNotification && !n ? null : /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ o(ye, { customTheme: s ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ o(an, { sdk: r, muted: a, event: c?.current || e, topNavigation: t }) }) });
|
|
1382
1381
|
};
|
|
1383
1382
|
export {
|
|
1384
|
-
|
|
1385
|
-
|
|
1383
|
+
Rn as B,
|
|
1384
|
+
xn as D
|
|
1386
1385
|
};
|
package/lib/es/index4.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
|
2
2
|
import { s as _, u as Se, a as mt, c as Ee } from "./feature.js";
|
|
3
3
|
import $, { forwardRef as Ae, useRef as D, useState as W, useEffect as X, useLayoutEffect as ht, createContext as je, useMemo as He, useCallback as Re, memo as gt } from "react";
|
|
4
4
|
import vt from "lodash.throttle";
|
|
5
|
-
import {
|
|
5
|
+
import { H as te } from "./index5.js";
|
|
6
6
|
import { d as wt } from "./index8.js";
|
|
7
7
|
import { Q as yt } from "./index13.js";
|
|
8
8
|
import { f as bt, g as St, S as qe } from "./useStreamLayerApp2.js";
|