@streamlayer/react 1.3.0 → 1.3.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/app/advertisement.d.ts +1 -0
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +10 -10
- package/lib/cjs/useStreamLayerApp2.js +8 -8
- package/lib/dist/cjs/masters.js +47 -47
- package/lib/dist/es/masters.js +3164 -3155
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +256 -161
- package/lib/es/index2.js +2 -2
- package/lib/es/masters2.js +1 -1
- package/lib/es/points.js +11 -11
- package/lib/es/provider.js +676 -671
- package/lib/es/useStreamLayerApp2.js +683 -677
- package/lib/style.css +1 -1
- package/package.json +13 -13
package/lib/es/advertisement.js
CHANGED
|
@@ -1,335 +1,430 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import {
|
|
4
|
-
import { F as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as Q, useRef as J, useMemo as V } from "react";
|
|
3
|
+
import { c as f, s as n, a as W, Q as X, e as $, u as N, L as Y } from "./provider.js";
|
|
4
|
+
import { F as Z, u as oo, d as eo } from "./index2.js";
|
|
5
|
+
import { N as I, a as no, b as so, P as h, c as b, S as io } from "./useStreamLayerApp2.js";
|
|
6
|
+
const ao = /* @__PURE__ */ n("div")({
|
|
7
7
|
name: "Container",
|
|
8
8
|
class: "c5b6wdg",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
11
|
-
children:
|
|
10
|
+
}), to = "a1rlj479", ro = "s35f1di", lo = "sj4471g", co = "b12050d8", po = "b1d5ybek", mo = (o) => o === "left" || o === "right" ? ro : co, uo = (o) => o === "left" || o === "right" ? lo : po, vo = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", C = ({
|
|
11
|
+
children: o,
|
|
12
12
|
style: s,
|
|
13
13
|
className: r,
|
|
14
|
-
enabled:
|
|
15
|
-
hiding:
|
|
16
|
-
direction:
|
|
17
|
-
onAnimationEnd:
|
|
18
|
-
}) => /* @__PURE__ */
|
|
14
|
+
enabled: i = !0,
|
|
15
|
+
hiding: a,
|
|
16
|
+
direction: l = "left",
|
|
17
|
+
onAnimationEnd: t
|
|
18
|
+
}) => /* @__PURE__ */ e(ao, {
|
|
19
19
|
style: s,
|
|
20
|
-
className:
|
|
21
|
-
onAnimationEnd:
|
|
22
|
-
children:
|
|
23
|
-
}),
|
|
20
|
+
className: f(r, to, vo(l), i && !a && mo(l), i && a && uo(l)),
|
|
21
|
+
onAnimationEnd: t,
|
|
22
|
+
children: o
|
|
23
|
+
}), ho = /* @__PURE__ */ n("a")({
|
|
24
24
|
name: "Link",
|
|
25
25
|
class: "l1sgte8c",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}),
|
|
27
|
+
}), Io = /* @__PURE__ */ n("div")({
|
|
28
28
|
name: "BannerContainer",
|
|
29
29
|
class: "b7yfc72",
|
|
30
30
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
31
|
+
}), go = () => ho, bo = /* @__PURE__ */ n(go())({
|
|
32
32
|
name: "BannerLink",
|
|
33
33
|
class: "bejjq94",
|
|
34
34
|
propsAsIs: !0
|
|
35
|
-
}),
|
|
35
|
+
}), Ao = /* @__PURE__ */ n("img")({
|
|
36
36
|
name: "BannerImg",
|
|
37
37
|
class: "b1j94hdr",
|
|
38
38
|
propsAsIs: !1
|
|
39
|
-
}),
|
|
40
|
-
var
|
|
41
|
-
return (
|
|
42
|
-
|
|
39
|
+
}), yo = ({ promotion: o, promotionId: s, hiding: r, direction: i = "bottom" }) => {
|
|
40
|
+
var a;
|
|
41
|
+
return (a = o.additionalBanner) != null && a.imageUrl ? /* @__PURE__ */ e(C, { direction: i, hiding: r, children: /* @__PURE__ */ e(Io, { className: "BannerContainer", children: /* @__PURE__ */ e(
|
|
42
|
+
bo,
|
|
43
43
|
{
|
|
44
|
-
|
|
44
|
+
className: "BannerLink",
|
|
45
|
+
href: o.additionalBanner.url,
|
|
46
|
+
style: { backgroundImage: `url(${o.additionalBanner.imageUrl})` },
|
|
45
47
|
"data-promo-id": s,
|
|
46
|
-
"data-promo-type":
|
|
48
|
+
"data-promo-type": o.type,
|
|
47
49
|
"data-analytics": "banner",
|
|
48
50
|
target: "_blank",
|
|
49
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ e(Ao, { src: o.additionalBanner.imageUrl, alt: "promo" })
|
|
50
52
|
}
|
|
51
53
|
) }) }) : null;
|
|
52
|
-
},
|
|
54
|
+
}, fo = /* @__PURE__ */ n("div")({
|
|
55
|
+
name: "NotificationContent",
|
|
56
|
+
class: "n1ku6hz",
|
|
57
|
+
propsAsIs: !1
|
|
58
|
+
}), $o = /* @__PURE__ */ n("div")({
|
|
59
|
+
name: "NotificationContainer",
|
|
60
|
+
class: "nbxqmol",
|
|
61
|
+
propsAsIs: !1
|
|
62
|
+
}), No = /* @__PURE__ */ n("div")({
|
|
63
|
+
name: "Body",
|
|
64
|
+
class: "b1gu3eml",
|
|
65
|
+
propsAsIs: !1
|
|
66
|
+
}), Co = /* @__PURE__ */ n("div")({
|
|
67
|
+
name: "Title",
|
|
68
|
+
class: "t1u17zva",
|
|
69
|
+
propsAsIs: !1
|
|
70
|
+
}), So = /* @__PURE__ */ n("div")({
|
|
71
|
+
name: "Text",
|
|
72
|
+
class: "t10ko1g",
|
|
73
|
+
propsAsIs: !1
|
|
74
|
+
}), S = /* @__PURE__ */ n("div")({
|
|
75
|
+
name: "Media",
|
|
76
|
+
class: "mntc42e",
|
|
77
|
+
propsAsIs: !1
|
|
78
|
+
}), ko = () => S, G = /* @__PURE__ */ n(ko())({
|
|
79
|
+
name: "MediaImgFit",
|
|
80
|
+
class: "ml060eo",
|
|
81
|
+
propsAsIs: !0
|
|
82
|
+
}), Mo = () => S, k = /* @__PURE__ */ n(Mo())({
|
|
83
|
+
name: "MediaImgCentered",
|
|
84
|
+
class: "m1vqlvig",
|
|
85
|
+
propsAsIs: !0
|
|
86
|
+
}), To = () => k, Bo = /* @__PURE__ */ n(To())({
|
|
87
|
+
name: "MediaImgBottom",
|
|
88
|
+
class: "m1e7tvi5",
|
|
89
|
+
propsAsIs: !0
|
|
90
|
+
}), Eo = () => S, Lo = /* @__PURE__ */ n(Eo())({
|
|
91
|
+
name: "MediaImgSolid",
|
|
92
|
+
class: "mqvntt2",
|
|
93
|
+
propsAsIs: !0
|
|
94
|
+
}), xo = () => k, Oo = /* @__PURE__ */ n(xo())({
|
|
95
|
+
name: "MediaImgMiddle",
|
|
96
|
+
class: "m12jtj3u",
|
|
97
|
+
propsAsIs: !0
|
|
98
|
+
}), _o = /* @__PURE__ */ n("button")({
|
|
99
|
+
name: "Button",
|
|
100
|
+
class: "bkq1frv",
|
|
101
|
+
propsAsIs: !1
|
|
102
|
+
}), Po = () => W, jo = /* @__PURE__ */ n(Po())({
|
|
103
|
+
name: "StyledChevronRight",
|
|
104
|
+
class: "sis90pl",
|
|
105
|
+
propsAsIs: !0
|
|
106
|
+
}), Do = /* @__PURE__ */ n("div")({
|
|
107
|
+
name: "Logo",
|
|
108
|
+
class: "l9mjmz3",
|
|
109
|
+
propsAsIs: !1
|
|
110
|
+
}), Ro = {
|
|
111
|
+
[I.UNSET]: G,
|
|
112
|
+
[I.FIT]: G,
|
|
113
|
+
[I.CENTERED]: k,
|
|
114
|
+
[I.BOTTOM]: Bo,
|
|
115
|
+
[I.SOLID]: Lo,
|
|
116
|
+
[I.MIDDLE]: Oo
|
|
117
|
+
}, Fo = ({ notification: o, promotionId: s, hiding: r, direction: i = "left" }) => {
|
|
118
|
+
if (!o || !o.promotion || o.enabled !== no.NOTIFICATION_ENABLED)
|
|
119
|
+
return null;
|
|
120
|
+
const { title: a, body: l, image: t, promotion: m } = o, { sponsorLogo: u, sponsorLogoMode: v, imagePosition: p, ctaButton: d } = m, g = Ro[p];
|
|
121
|
+
return /* @__PURE__ */ e(C, { direction: i, hiding: r, children: /* @__PURE__ */ c($o, { children: [
|
|
122
|
+
v !== so.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(Do, { children: /* @__PURE__ */ e("img", { src: u, alt: a }) }),
|
|
123
|
+
/* @__PURE__ */ c(fo, { children: [
|
|
124
|
+
/* @__PURE__ */ e(g, { children: /* @__PURE__ */ e("img", { src: t, alt: "" }) }),
|
|
125
|
+
/* @__PURE__ */ c(No, { children: [
|
|
126
|
+
a && /* @__PURE__ */ e(Co, { children: a }),
|
|
127
|
+
l && /* @__PURE__ */ e(So, { children: l })
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ e(_o, { name: "promo-button", style: { color: d == null ? void 0 : d.textColor, backgroundColor: d == null ? void 0 : d.color }, children: (d == null ? void 0 : d.label) || "Open" }),
|
|
130
|
+
/* @__PURE__ */ e(jo, { name: "chevronRight" })
|
|
131
|
+
] })
|
|
132
|
+
] }) });
|
|
133
|
+
}, qo = /* @__PURE__ */ n("div")({
|
|
53
134
|
name: "OverlayContainer",
|
|
54
135
|
class: "okzhq2w",
|
|
55
136
|
propsAsIs: !1
|
|
56
|
-
}),
|
|
137
|
+
}), Uo = /* @__PURE__ */ n("div")({
|
|
57
138
|
name: "PromoOverlay",
|
|
58
139
|
class: "pmgz5i",
|
|
59
140
|
propsAsIs: !1
|
|
60
|
-
}),
|
|
141
|
+
}), wo = /* @__PURE__ */ n("div")({
|
|
61
142
|
name: "Header",
|
|
62
143
|
class: "hyxi3jt",
|
|
63
144
|
propsAsIs: !1
|
|
64
|
-
}),
|
|
145
|
+
}), Go = /* @__PURE__ */ n("div")({
|
|
65
146
|
name: "HeaderContent",
|
|
66
147
|
class: "h149e3gp",
|
|
67
148
|
propsAsIs: !1
|
|
68
|
-
}),
|
|
149
|
+
}), zo = "h10toh7", z = /* @__PURE__ */ n("img")({
|
|
69
150
|
name: "SponsorLogo",
|
|
70
151
|
class: "s1jyea6t",
|
|
71
152
|
propsAsIs: !1
|
|
72
|
-
}),
|
|
153
|
+
}), Ho = /* @__PURE__ */ n("div")({
|
|
73
154
|
name: "SponsorName",
|
|
74
155
|
class: "szpfa3h",
|
|
75
156
|
propsAsIs: !1
|
|
76
|
-
}),
|
|
157
|
+
}), Ko = /* @__PURE__ */ n("div")({
|
|
77
158
|
name: "Media",
|
|
78
159
|
class: "m1crmu01",
|
|
79
160
|
propsAsIs: !1
|
|
80
|
-
}),
|
|
161
|
+
}), Wo = /* @__PURE__ */ n("img")({
|
|
81
162
|
name: "PromoImg",
|
|
82
163
|
class: "p1l37r8s",
|
|
83
164
|
propsAsIs: !1
|
|
84
|
-
}),
|
|
165
|
+
}), Qo = "s1nmch9k", H = /* @__PURE__ */ n("div")({
|
|
85
166
|
name: "Content",
|
|
86
167
|
class: "c1er0ljd",
|
|
87
168
|
propsAsIs: !1
|
|
88
|
-
}),
|
|
169
|
+
}), Jo = /* @__PURE__ */ n("div")({
|
|
89
170
|
name: "Description",
|
|
90
171
|
class: "dydopmr",
|
|
91
172
|
propsAsIs: !1
|
|
92
|
-
}),
|
|
173
|
+
}), Vo = /* @__PURE__ */ n("div")({
|
|
93
174
|
name: "Sponsor",
|
|
94
175
|
class: "s1w6nt04",
|
|
95
176
|
propsAsIs: !1
|
|
96
|
-
}),
|
|
177
|
+
}), Xo = /* @__PURE__ */ n("div")({
|
|
97
178
|
name: "SponsorText",
|
|
98
179
|
class: "s1evcmtq",
|
|
99
180
|
propsAsIs: !1
|
|
100
|
-
}),
|
|
181
|
+
}), Yo = /* @__PURE__ */ n("div")({
|
|
101
182
|
name: "ADLogo",
|
|
102
183
|
class: "awodx0x",
|
|
103
184
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
185
|
+
}), Zo = /* @__PURE__ */ n("span")({
|
|
105
186
|
name: "SponsoredText",
|
|
106
187
|
class: "s1q3n6oi",
|
|
107
188
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
189
|
+
}), oe = /* @__PURE__ */ n("div")({
|
|
109
190
|
name: "CloseIconWrap",
|
|
110
191
|
class: "c8d4xfk",
|
|
111
192
|
propsAsIs: !1
|
|
112
|
-
}),
|
|
193
|
+
}), ee = () => W, ne = /* @__PURE__ */ n(ee())({
|
|
113
194
|
name: "CloseIcon",
|
|
114
195
|
class: "ct6oobh",
|
|
115
196
|
propsAsIs: !0
|
|
116
|
-
}),
|
|
197
|
+
}), se = /* @__PURE__ */ n("div")({
|
|
117
198
|
name: "ActionBtnWrap",
|
|
118
199
|
class: "a1gyg7tt",
|
|
119
200
|
propsAsIs: !1
|
|
120
|
-
}),
|
|
201
|
+
}), ie = /* @__PURE__ */ n("a")({
|
|
121
202
|
name: "ActionButton",
|
|
122
203
|
class: "a17rwbtk",
|
|
123
204
|
propsAsIs: !1
|
|
124
|
-
}),
|
|
205
|
+
}), ae = /* @__PURE__ */ n("div")({
|
|
125
206
|
name: "Title",
|
|
126
207
|
class: "t3vxzaw",
|
|
127
208
|
propsAsIs: !1
|
|
128
|
-
}),
|
|
129
|
-
var
|
|
130
|
-
const
|
|
131
|
-
return /* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
((
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
|
|
209
|
+
}), te = "h10f3u0j", K = ({ promotion: o, promotionId: s, onClose: r }) => {
|
|
210
|
+
var i, a, l, t, m, u, v, p, d, g, M, T, B, E, L, x, O, _, P, j, D, R, F, q, U, w;
|
|
211
|
+
const A = o.type === h.INGAME_IAB11_LBAR || o.type === h.INGAME_IAB11, y = ((i = o.sponsor) == null ? void 0 : i.logo) && o.logoMode === b.CENTER;
|
|
212
|
+
return /* @__PURE__ */ c(Uo, { className: "PromoOverlay", children: [
|
|
213
|
+
/* @__PURE__ */ c(wo, { children: [
|
|
214
|
+
/* @__PURE__ */ c(Go, { className: f(!y && zo), children: [
|
|
215
|
+
((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode === b.LEFT && /* @__PURE__ */ e(z, { src: (l = o.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
|
|
216
|
+
/* @__PURE__ */ c(
|
|
217
|
+
Vo,
|
|
137
218
|
{
|
|
138
219
|
style: {
|
|
139
|
-
paddingLeft: (
|
|
220
|
+
paddingLeft: (t = o.sponsor) != null && t.logo && o.logoMode === b.LEFT ? "0px" : "8px"
|
|
140
221
|
},
|
|
141
222
|
children: [
|
|
142
|
-
((
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
/* @__PURE__ */
|
|
223
|
+
((m = o.sponsor) == null ? void 0 : m.logo) && o.logoMode === b.LEFT && /* @__PURE__ */ e(Ho, { children: (u = o.sponsor) == null ? void 0 : u.name }),
|
|
224
|
+
/* @__PURE__ */ c(Xo, { className: "SponsorText", children: [
|
|
225
|
+
/* @__PURE__ */ e(Yo, { children: "AD" }),
|
|
226
|
+
/* @__PURE__ */ e(Zo, { children: "SPONSORED" })
|
|
146
227
|
] })
|
|
147
228
|
]
|
|
148
229
|
}
|
|
149
230
|
)
|
|
150
231
|
] }),
|
|
151
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ e(oe, { className: "ClosePromoIcon", onClick: r, children: /* @__PURE__ */ e(ne, { name: "icon-cross" }) })
|
|
152
233
|
] }),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
|
|
234
|
+
/* @__PURE__ */ c(Ko, { children: [
|
|
235
|
+
y && /* @__PURE__ */ e(z, { className: Qo, src: (v = o.sponsor) == null ? void 0 : v.logo, alt: "promo" }),
|
|
236
|
+
/* @__PURE__ */ e(H, { children: (d = (p = o.banner) == null ? void 0 : p.video) != null && d.url ? /* @__PURE__ */ e(
|
|
237
|
+
X,
|
|
157
238
|
{
|
|
158
|
-
source: (
|
|
159
|
-
poster: (
|
|
160
|
-
aspectRatio:
|
|
239
|
+
source: (M = (g = o.banner) == null ? void 0 : g.video) == null ? void 0 : M.url,
|
|
240
|
+
poster: (B = (T = o.banner) == null ? void 0 : T.video) == null ? void 0 : B.thumbnailUrl,
|
|
241
|
+
aspectRatio: A ? "1/1" : "16/9",
|
|
161
242
|
onPlay: () => {
|
|
162
|
-
|
|
243
|
+
$.emit("advertisement", {
|
|
163
244
|
action: "videoPlay",
|
|
164
245
|
payload: {
|
|
165
246
|
advertisementId: s,
|
|
166
|
-
advertisementType:
|
|
247
|
+
advertisementType: o.type
|
|
167
248
|
}
|
|
168
249
|
});
|
|
169
250
|
}
|
|
170
251
|
}
|
|
171
|
-
) : (
|
|
172
|
-
!
|
|
173
|
-
((
|
|
174
|
-
((
|
|
252
|
+
) : (E = o.banner) != null && E.imageUrl ? /* @__PURE__ */ e(Wo, { style: A ? { aspectRatio: "1/1" } : {}, src: (L = o.banner) == null ? void 0 : L.imageUrl, alt: "promo" }) : null }),
|
|
253
|
+
!A && /* @__PURE__ */ c(H, { children: [
|
|
254
|
+
((x = o.banner) == null ? void 0 : x.title) && /* @__PURE__ */ e(ae, { className: f("AdvTitle", y && te), children: (O = o.banner) == null ? void 0 : O.title }),
|
|
255
|
+
((_ = o.banner) == null ? void 0 : _.body) && /* @__PURE__ */ e(Jo, { className: "AdvDescription", children: (P = o.banner) == null ? void 0 : P.body })
|
|
175
256
|
] })
|
|
176
257
|
] }),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
258
|
+
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(
|
|
259
|
+
ie,
|
|
179
260
|
{
|
|
180
|
-
href: (
|
|
261
|
+
href: (j = o.banner) == null ? void 0 : j.url,
|
|
181
262
|
style: {
|
|
182
|
-
backgroundColor: ((
|
|
183
|
-
color: ((
|
|
263
|
+
backgroundColor: ((R = (D = o.banner) == null ? void 0 : D.ctaButton) == null ? void 0 : R.color) || "#009dc4",
|
|
264
|
+
color: ((q = (F = o.banner) == null ? void 0 : F.ctaButton) == null ? void 0 : q.textColor) || "#fff"
|
|
184
265
|
},
|
|
185
266
|
"data-analytics": "button",
|
|
186
267
|
"data-promo-id": s,
|
|
187
|
-
"data-promo-type":
|
|
268
|
+
"data-promo-type": o.type,
|
|
188
269
|
target: "_blank",
|
|
189
|
-
children: (
|
|
270
|
+
children: (w = (U = o.banner) == null ? void 0 : U.ctaButton) == null ? void 0 : w.label
|
|
190
271
|
}
|
|
191
272
|
) })
|
|
192
273
|
] });
|
|
193
|
-
},
|
|
274
|
+
}, re = /* @__PURE__ */ n("div")({
|
|
194
275
|
name: "SidebarContainer",
|
|
195
276
|
class: "s1abskp8",
|
|
196
277
|
propsAsIs: !1
|
|
197
|
-
}),
|
|
198
|
-
children:
|
|
278
|
+
}), le = ({
|
|
279
|
+
children: o,
|
|
199
280
|
direction: s,
|
|
200
281
|
style: r,
|
|
201
|
-
className:
|
|
202
|
-
hiding:
|
|
203
|
-
}) => /* @__PURE__ */
|
|
282
|
+
className: i,
|
|
283
|
+
hiding: a
|
|
284
|
+
}) => /* @__PURE__ */ e(C, {
|
|
204
285
|
direction: s,
|
|
205
286
|
style: r,
|
|
206
|
-
hiding:
|
|
207
|
-
className:
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
children:
|
|
287
|
+
hiding: a,
|
|
288
|
+
className: i,
|
|
289
|
+
children: /* @__PURE__ */ e(re, {
|
|
290
|
+
children: o
|
|
210
291
|
})
|
|
211
|
-
}),
|
|
212
|
-
const
|
|
213
|
-
return !
|
|
292
|
+
}), de = (o) => (o == null ? void 0 : o.type) === h.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === h.INGAME_IAB21_LBAR, ce = (o) => (o == null ? void 0 : o.type) === h.INGAME_IAB11 || (o == null ? void 0 : o.type) === h.INGAME_IAB21, pe = ({ advertisement: o, skipTypeCheck: s, layoutMode: r = "side-by-side", sidebar: i, isNotification: a, banner: l }) => {
|
|
293
|
+
const t = N(o.data);
|
|
294
|
+
return !t.data && t.loading ? null : t.error ? /* @__PURE__ */ c("div", { children: [
|
|
214
295
|
"error ",
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
] }) :
|
|
296
|
+
/* @__PURE__ */ e("button", { onClick: o.close, children: "close" })
|
|
297
|
+
] }) : t.data ? a ? /* @__PURE__ */ e(Fo, { notification: t.data.notification, promotionId: o.id }) : !i && !l && (s || ce(t.data.promotions)) ? /* @__PURE__ */ e(qo, { className: "PromoOverlayContainer", children: /* @__PURE__ */ e(K, { promotionId: o.id, promotion: t.data.promotions, onClose: o.close }) }) : i && (s || de(t.data.promotions)) ? /* @__PURE__ */ e(le, { className: "PromoSidebarContainer", direction: i, hiding: o.hiding, children: /* @__PURE__ */ e(K, { promotionId: o.id, promotion: t.data.promotions, onClose: o.close }) }) : l ? /* @__PURE__ */ e(
|
|
298
|
+
yo,
|
|
299
|
+
{
|
|
300
|
+
promotionId: o.id,
|
|
301
|
+
hiding: o.hiding,
|
|
302
|
+
promotion: t.data.promotions,
|
|
303
|
+
direction: l
|
|
304
|
+
}
|
|
305
|
+
) : null : /* @__PURE__ */ c("div", { children: [
|
|
217
306
|
"empty promo ",
|
|
218
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ e("button", { onClick: o.close, children: "close" })
|
|
219
308
|
] });
|
|
220
|
-
},
|
|
309
|
+
}, me = /* @__PURE__ */ n("div")({
|
|
221
310
|
name: "AdvertisementUIWrap",
|
|
222
311
|
class: "aa6pjif",
|
|
223
312
|
propsAsIs: !1
|
|
224
|
-
}),
|
|
225
|
-
const s =
|
|
313
|
+
}), ue = (o) => {
|
|
314
|
+
const s = o.target;
|
|
226
315
|
if (s instanceof HTMLAnchorElement && s.target === "_blank") {
|
|
227
|
-
const r = s.getAttribute("data-promo-id") || "",
|
|
228
|
-
s.getAttribute("data-analytics") === "button" &&
|
|
316
|
+
const r = s.getAttribute("data-promo-id") || "", i = s.getAttribute("data-promo-type") || h.UNSET;
|
|
317
|
+
s.getAttribute("data-analytics") === "button" && $.emit("advertisement", {
|
|
229
318
|
action: "buttonSelect",
|
|
230
319
|
payload: {
|
|
231
320
|
advertisementId: r,
|
|
232
|
-
advertisementType:
|
|
321
|
+
advertisementType: i
|
|
233
322
|
}
|
|
234
|
-
}), s.getAttribute("data-analytics") === "banner" &&
|
|
323
|
+
}), s.getAttribute("data-analytics") === "banner" && $.emit("advertisement", {
|
|
235
324
|
action: "bannerSelect",
|
|
236
325
|
payload: {
|
|
237
326
|
advertisementId: r,
|
|
238
|
-
advertisementType:
|
|
327
|
+
advertisementType: i
|
|
239
328
|
}
|
|
240
329
|
});
|
|
241
330
|
}
|
|
242
|
-
},
|
|
243
|
-
gamification:
|
|
331
|
+
}, ve = ({
|
|
332
|
+
gamification: o,
|
|
244
333
|
layoutMode: s,
|
|
245
334
|
skipTypeCheck: r,
|
|
246
|
-
sidebar:
|
|
247
|
-
banner:
|
|
248
|
-
|
|
249
|
-
|
|
335
|
+
sidebar: i,
|
|
336
|
+
banner: a,
|
|
337
|
+
notification: l,
|
|
338
|
+
isMobileScreen: t,
|
|
339
|
+
persistent: m
|
|
250
340
|
}) => {
|
|
251
|
-
const
|
|
252
|
-
() =>
|
|
341
|
+
const u = J(null), v = N(o.advertisement.$list), p = V(
|
|
342
|
+
() => o.advertisement.getActiveAdvertisement(m),
|
|
253
343
|
// fire getActiveNotification when notifications were updated
|
|
254
344
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
255
|
-
[
|
|
345
|
+
[v, m]
|
|
256
346
|
);
|
|
257
|
-
return
|
|
258
|
-
enabled: !!
|
|
347
|
+
return Y(u, {
|
|
348
|
+
enabled: !!p,
|
|
259
349
|
event: "click",
|
|
260
|
-
listener:
|
|
261
|
-
}),
|
|
262
|
-
ref:
|
|
350
|
+
listener: ue
|
|
351
|
+
}), p ? /* @__PURE__ */ e(me, {
|
|
352
|
+
ref: u,
|
|
263
353
|
style: {
|
|
264
|
-
height: !
|
|
354
|
+
height: !a && !i ? "auto" : "100%"
|
|
265
355
|
},
|
|
266
|
-
className:
|
|
267
|
-
children: /* @__PURE__ */
|
|
356
|
+
className: t ? "mobile-view" : "",
|
|
357
|
+
children: /* @__PURE__ */ e(pe, {
|
|
268
358
|
skipTypeCheck: r,
|
|
269
|
-
sidebar:
|
|
270
|
-
banner:
|
|
271
|
-
advertisement:
|
|
272
|
-
layoutMode: s
|
|
359
|
+
sidebar: i,
|
|
360
|
+
banner: a,
|
|
361
|
+
advertisement: p,
|
|
362
|
+
layoutMode: s,
|
|
363
|
+
isNotification: l
|
|
273
364
|
})
|
|
274
365
|
}) : null;
|
|
275
|
-
},
|
|
276
|
-
sdk:
|
|
366
|
+
}, he = ({
|
|
367
|
+
sdk: o,
|
|
277
368
|
sidebar: s,
|
|
278
369
|
banner: r,
|
|
279
|
-
skipTypeCheck:
|
|
280
|
-
event:
|
|
281
|
-
layoutMode:
|
|
282
|
-
isMobileScreen:
|
|
283
|
-
persistent:
|
|
370
|
+
skipTypeCheck: i,
|
|
371
|
+
event: a,
|
|
372
|
+
layoutMode: l,
|
|
373
|
+
isMobileScreen: t,
|
|
374
|
+
persistent: m,
|
|
375
|
+
notification: u
|
|
284
376
|
}) => {
|
|
285
377
|
const {
|
|
286
|
-
deactivate:
|
|
287
|
-
} =
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}, [
|
|
291
|
-
const
|
|
378
|
+
deactivate: v
|
|
379
|
+
} = Z(o);
|
|
380
|
+
Q(() => {
|
|
381
|
+
a ? o.createEventSession(a) : v();
|
|
382
|
+
}, [a, v, o]);
|
|
383
|
+
const p = N(o.featuresList.getStore());
|
|
292
384
|
if (s && r)
|
|
293
|
-
return /* @__PURE__ */
|
|
385
|
+
return /* @__PURE__ */ e("div", {
|
|
294
386
|
style: {
|
|
295
387
|
color: "red"
|
|
296
388
|
},
|
|
297
389
|
children: "define either sidebar or banner, not both."
|
|
298
390
|
});
|
|
299
|
-
if (!
|
|
391
|
+
if (!p)
|
|
300
392
|
return null;
|
|
301
|
-
const
|
|
302
|
-
return
|
|
303
|
-
gamification:
|
|
393
|
+
const d = o.getFeature(io.GAMES);
|
|
394
|
+
return d ? /* @__PURE__ */ e(ve, {
|
|
395
|
+
gamification: d,
|
|
304
396
|
sidebar: s,
|
|
305
397
|
banner: r,
|
|
306
|
-
layoutMode:
|
|
307
|
-
isMobileScreen:
|
|
308
|
-
persistent:
|
|
309
|
-
|
|
398
|
+
layoutMode: l,
|
|
399
|
+
isMobileScreen: t,
|
|
400
|
+
persistent: m,
|
|
401
|
+
notification: u,
|
|
402
|
+
skipTypeCheck: i
|
|
310
403
|
}) : null;
|
|
311
|
-
},
|
|
312
|
-
event:
|
|
404
|
+
}, fe = ({
|
|
405
|
+
event: o,
|
|
313
406
|
sidebar: s,
|
|
314
407
|
banner: r,
|
|
315
|
-
isMobileScreen:
|
|
316
|
-
persistent:
|
|
408
|
+
isMobileScreen: i,
|
|
409
|
+
persistent: a,
|
|
410
|
+
notification: l
|
|
317
411
|
}) => {
|
|
318
|
-
const
|
|
319
|
-
return
|
|
320
|
-
|
|
412
|
+
const t = oo();
|
|
413
|
+
return t ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(eo, { children: /* @__PURE__ */ e(
|
|
414
|
+
he,
|
|
321
415
|
{
|
|
322
|
-
sdk:
|
|
323
|
-
event:
|
|
416
|
+
sdk: t,
|
|
417
|
+
event: o,
|
|
324
418
|
sidebar: s,
|
|
325
419
|
banner: r,
|
|
326
|
-
isMobileScreen:
|
|
327
|
-
persistent:
|
|
420
|
+
isMobileScreen: i,
|
|
421
|
+
persistent: a,
|
|
422
|
+
notification: l,
|
|
328
423
|
layoutMode: "side-by-side"
|
|
329
424
|
}
|
|
330
425
|
) }) }) : null;
|
|
331
426
|
};
|
|
332
427
|
export {
|
|
333
|
-
|
|
334
|
-
|
|
428
|
+
fe as StreamLayerSDKAdvertisement,
|
|
429
|
+
he as StreamLayerSDKAdvertisementUI
|
|
335
430
|
};
|
package/lib/es/index2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var fe = Object.defineProperty;
|
|
2
2
|
var ke = (e, s, n) => s in e ? fe(e, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[s] = n;
|
|
3
3
|
var m = (e, s, n) => ke(e, typeof s != "symbol" ? s + "" : s, n);
|
|
4
|
-
import { C,
|
|
5
|
-
import { a4 as P, u, F as ye, s as h, T as re, i as Ne, p as be, b as Se, N as Ie, k as Ee, M as Ae,
|
|
4
|
+
import { C, h as G, Q as x, S as w } from "./useStreamLayerApp2.js";
|
|
5
|
+
import { a4 as P, u, F as ye, s as h, T as re, i as Ne, p as be, b as Se, N as Ie, k as Ee, M as Ae, f as Ce, S as we, C as $e, g as De, O as le, m as q, l as Le, h as Te, j as Oe, n as de, o as xe, q as Re, r as Ve, t as M, w as Pe, x as ce, y as U, z as qe, A as H, I as O, a as pe, D as _e, E as Fe, G as Qe, e as Ke, H as R, J as j, K as Me, P as Ue, R as ze, c as ue, V as We, W as Be, L as _, _ as Ge, v as F, $ as He, a0 as je, X as Xe, Y as Ye, Z as Ze, a5 as Je, a2 as he, a3 as X } from "./provider.js";
|
|
6
6
|
import { jsx as t, jsxs as g, Fragment as L } from "react/jsx-runtime";
|
|
7
7
|
import { createContext as es, useContext as z, useRef as D, useState as E, useEffect as k, useTransition as ss, lazy as ns, useMemo as $, Suspense as ts, forwardRef as os, useLayoutEffect as is, useCallback as V } from "react";
|
|
8
8
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
package/lib/es/masters2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as L, Fragment as E } from "react/jsx-runtime";
|
|
2
|
-
import { u as C, F as r2, s as u, T as j, i as i2, p as a2, b as l2, N as d2, k as c2, M as p2,
|
|
2
|
+
import { u as C, F as r2, s as u, T as j, i as i2, p as a2, b as l2, N as d2, k as c2, M as p2, f as u2, S as C2, C as v2, g as h2, O as K, m as x, l as m2, h as g2, j as L2, n as X, o as f2, q as S2, r as y2, t as U, w as k2, x as J, y as _, I as e2, a as P, z as N2, A as b2, B as z, D as A2, E as I2, G as $2, e as E2, H as T, J as q, K as V2, P as w2, R as R2, c as H2, U as Q, V as T2, W as x2, L as F, X as F2, Y as D2, Z as M2, _ as O2, v as D, $ as U2, a0 as _2, a1 as P2, a2 as B2, a3 as G2 } from "./provider.js";
|
|
3
3
|
import { createContext as z2, useContext as s2, useRef as $, useState as b, useEffect as k, useTransition as q2, lazy as Q2, useMemo as H, Suspense as Z2, forwardRef as Y2, useLayoutEffect as W2, useCallback as R, Component as j2 } from "react";
|
|
4
4
|
import { Q as K2, S as I } from "./useStreamLayerApp2.js";
|
|
5
5
|
const M = /* @__PURE__ */ u("div")({
|