@streamlayer/react 1.4.1 → 1.5.1
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 +4 -0
- package/lib/app/app.d.ts +1 -0
- package/lib/app/event.d.ts +4 -0
- package/lib/app/insight.d.ts +4 -0
- package/lib/app/masters.d.ts +1 -1
- package/lib/app/provider.d.ts +4 -2
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index2.js +188 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- package/lib/dist/cjs/masters.js +69 -69
- package/lib/dist/es/masters.js +12322 -12363
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +193 -206
- package/lib/es/index.js +6 -6
- package/lib/es/index2.js +23929 -689
- package/lib/es/insight.js +44 -51
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +12 -12
- package/lib/es/points.js +28 -29
- package/lib/es/useStreamLayerApp2.js +2576 -2635
- package/lib/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +13 -13
- package/lib/cjs/provider.js +0 -188
- package/lib/es/provider.js +0 -23232
package/lib/es/advertisement.js
CHANGED
|
@@ -1,44 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const to = /* @__PURE__ */ n("div")({
|
|
1
|
+
import { jsx as n, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Q } from "react";
|
|
3
|
+
import { f, s as e, c as K, Q as V, g as N, a as H, L as J, u as X, d as Y, S as Z } from "./index2.js";
|
|
4
|
+
import { N as g, a as oo, b as no, C as eo, P as v, c as h, d as so, S as ao } from "./useStreamLayerApp2.js";
|
|
5
|
+
const to = /* @__PURE__ */ e("div")({
|
|
7
6
|
name: "Container",
|
|
8
7
|
class: "c5b6wdg",
|
|
9
8
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
9
|
+
}), io = "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", $ = ({
|
|
11
10
|
children: o,
|
|
12
11
|
style: s,
|
|
13
|
-
className:
|
|
12
|
+
className: t,
|
|
14
13
|
enabled: i = !0,
|
|
15
14
|
hiding: a,
|
|
16
|
-
direction:
|
|
17
|
-
onAnimationEnd:
|
|
18
|
-
}) => /* @__PURE__ */
|
|
15
|
+
direction: r = "left",
|
|
16
|
+
onAnimationEnd: l
|
|
17
|
+
}) => /* @__PURE__ */ n(to, {
|
|
19
18
|
style: s,
|
|
20
|
-
className: f(
|
|
21
|
-
onAnimationEnd:
|
|
19
|
+
className: f(t, io, vo(r), i && !a && mo(r), i && a && uo(r)),
|
|
20
|
+
onAnimationEnd: l,
|
|
22
21
|
children: o
|
|
23
|
-
}),
|
|
22
|
+
}), Io = /* @__PURE__ */ e("a")({
|
|
24
23
|
name: "Link",
|
|
25
24
|
class: "l1sgte8c",
|
|
26
25
|
propsAsIs: !1
|
|
27
|
-
}),
|
|
26
|
+
}), go = /* @__PURE__ */ e("div")({
|
|
28
27
|
name: "BannerContainer",
|
|
29
28
|
class: "b7yfc72",
|
|
30
29
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
30
|
+
}), ho = () => Io, bo = /* @__PURE__ */ e(ho())({
|
|
32
31
|
name: "BannerLink",
|
|
33
32
|
class: "bejjq94",
|
|
34
33
|
propsAsIs: !0
|
|
35
|
-
}),
|
|
36
|
-
name: "BannerImg",
|
|
37
|
-
class: "b1j94hdr",
|
|
38
|
-
propsAsIs: !1
|
|
39
|
-
}), fo = ({ promotion: o, promotionId: s, hiding: r, direction: i = "bottom" }) => {
|
|
34
|
+
}), Ao = ({ promotion: o, promotionId: s, hiding: t, direction: i = "bottom" }) => {
|
|
40
35
|
var a;
|
|
41
|
-
return (a = o.additionalBanner) != null && a.imageUrl ? /* @__PURE__ */
|
|
36
|
+
return (a = o.additionalBanner) != null && a.imageUrl ? /* @__PURE__ */ n($, { direction: i, hiding: t, children: /* @__PURE__ */ n(go, { className: "BannerContainer", children: /* @__PURE__ */ n(
|
|
42
37
|
bo,
|
|
43
38
|
{
|
|
44
39
|
className: "BannerLink",
|
|
@@ -47,210 +42,209 @@ const to = /* @__PURE__ */ n("div")({
|
|
|
47
42
|
"data-promo-id": s,
|
|
48
43
|
"data-promo-type": o.type,
|
|
49
44
|
"data-analytics": "banner",
|
|
50
|
-
target: "_blank"
|
|
51
|
-
children: /* @__PURE__ */ e(yo, { src: o.additionalBanner.imageUrl, alt: "promo" })
|
|
45
|
+
target: "_blank"
|
|
52
46
|
}
|
|
53
47
|
) }) }) : null;
|
|
54
|
-
},
|
|
48
|
+
}, yo = /* @__PURE__ */ e("div")({
|
|
55
49
|
name: "NotificationContent",
|
|
56
50
|
class: "n1ku6hz",
|
|
57
51
|
propsAsIs: !1
|
|
58
|
-
}),
|
|
52
|
+
}), fo = /* @__PURE__ */ e("div")({
|
|
59
53
|
name: "NotificationContainer",
|
|
60
54
|
class: "nbxqmol",
|
|
61
55
|
propsAsIs: !1
|
|
62
|
-
}),
|
|
56
|
+
}), No = /* @__PURE__ */ e("div")({
|
|
63
57
|
name: "Body",
|
|
64
58
|
class: "b1gu3eml",
|
|
65
59
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
60
|
+
}), $o = /* @__PURE__ */ e("div")({
|
|
67
61
|
name: "Title",
|
|
68
62
|
class: "t1u17zva",
|
|
69
63
|
propsAsIs: !1
|
|
70
|
-
}),
|
|
64
|
+
}), Co = /* @__PURE__ */ e("div")({
|
|
71
65
|
name: "Text",
|
|
72
66
|
class: "t10ko1g",
|
|
73
67
|
propsAsIs: !1
|
|
74
|
-
}),
|
|
68
|
+
}), b = /* @__PURE__ */ e("div")({
|
|
75
69
|
name: "Media",
|
|
76
70
|
class: "mntc42e",
|
|
77
71
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
72
|
+
}), So = () => b, w = /* @__PURE__ */ e(So())({
|
|
79
73
|
name: "MediaImgFit",
|
|
80
74
|
class: "ml060eo",
|
|
81
75
|
propsAsIs: !0
|
|
82
|
-
}),
|
|
76
|
+
}), To = () => b, W = /* @__PURE__ */ e(To())({
|
|
83
77
|
name: "MediaImgCentered",
|
|
84
78
|
class: "m1vqlvig",
|
|
85
79
|
propsAsIs: !0
|
|
86
|
-
}),
|
|
80
|
+
}), Mo = () => W, ko = /* @__PURE__ */ e(Mo())({
|
|
87
81
|
name: "MediaImgBottom",
|
|
88
82
|
class: "m1e7tvi5",
|
|
89
83
|
propsAsIs: !0
|
|
90
|
-
}),
|
|
84
|
+
}), Bo = () => b, Lo = /* @__PURE__ */ e(Bo())({
|
|
91
85
|
name: "MediaImgSolid",
|
|
92
86
|
class: "mqvntt2",
|
|
93
87
|
propsAsIs: !0
|
|
94
|
-
}),
|
|
88
|
+
}), Eo = () => b, Oo = /* @__PURE__ */ e(Eo())({
|
|
95
89
|
name: "MediaImgMiddle",
|
|
96
90
|
class: "m12jtj3u",
|
|
97
91
|
propsAsIs: !0
|
|
98
|
-
}),
|
|
92
|
+
}), xo = /* @__PURE__ */ e("img")({
|
|
99
93
|
name: "CtaIcon",
|
|
100
94
|
class: "ckq1frv",
|
|
101
95
|
propsAsIs: !1
|
|
102
|
-
}),
|
|
96
|
+
}), _o = /* @__PURE__ */ e("button")({
|
|
103
97
|
name: "Button",
|
|
104
98
|
class: "bis90pl",
|
|
105
99
|
propsAsIs: !1
|
|
106
|
-
}),
|
|
100
|
+
}), Po = () => K, jo = /* @__PURE__ */ e(Po())({
|
|
107
101
|
name: "StyledChevronRight",
|
|
108
102
|
class: "s9mjmz3",
|
|
109
103
|
propsAsIs: !0
|
|
110
|
-
}), qo = /* @__PURE__ */
|
|
104
|
+
}), qo = /* @__PURE__ */ e("div")({
|
|
111
105
|
name: "Logo",
|
|
112
106
|
class: "l1cf50a7",
|
|
113
107
|
propsAsIs: !1
|
|
114
|
-
}),
|
|
108
|
+
}), Do = {
|
|
115
109
|
[g.UNSET]: w,
|
|
116
110
|
[g.FIT]: w,
|
|
117
111
|
[g.CENTERED]: W,
|
|
118
|
-
[g.BOTTOM]:
|
|
119
|
-
[g.SOLID]:
|
|
120
|
-
[g.MIDDLE]:
|
|
121
|
-
},
|
|
122
|
-
const
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
},
|
|
125
|
-
if (!o || !o.promotion || o.enabled !==
|
|
112
|
+
[g.BOTTOM]: ko,
|
|
113
|
+
[g.SOLID]: Lo,
|
|
114
|
+
[g.MIDDLE]: Oo
|
|
115
|
+
}, Ro = ({ src: o, imagePosition: s }) => {
|
|
116
|
+
const t = Do[s];
|
|
117
|
+
return /* @__PURE__ */ n(t, { children: /* @__PURE__ */ n("img", { src: o, alt: "" }) });
|
|
118
|
+
}, Uo = ({ notification: o, promotionId: s, hiding: t, direction: i = "left" }) => {
|
|
119
|
+
if (!o || !o.promotion || o.enabled !== oo.NOTIFICATION_ENABLED)
|
|
126
120
|
return null;
|
|
127
|
-
const { title: a, body:
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
a && /* @__PURE__ */
|
|
134
|
-
|
|
121
|
+
const { title: a, body: r, image: l, promotion: m } = o, { sponsorLogo: u, sponsorLogoMode: c, imagePosition: I, ctaButton: d } = m;
|
|
122
|
+
return /* @__PURE__ */ n($, { direction: i, hiding: t, children: /* @__PURE__ */ p(fo, { children: [
|
|
123
|
+
c !== no.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ n(qo, { children: /* @__PURE__ */ n("img", { src: u, alt: a }) }),
|
|
124
|
+
/* @__PURE__ */ p(yo, { children: [
|
|
125
|
+
/* @__PURE__ */ n(Ro, { src: l, imagePosition: I }),
|
|
126
|
+
/* @__PURE__ */ p(No, { children: [
|
|
127
|
+
a && /* @__PURE__ */ n($o, { children: a }),
|
|
128
|
+
r && /* @__PURE__ */ n(Co, { children: r })
|
|
135
129
|
] }),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
(d == null ? void 0 : d.ctaIcon) && (d == null ? void 0 : d.ctaIconMode) ===
|
|
130
|
+
/* @__PURE__ */ p(_o, { name: "promo-button", style: { color: d == null ? void 0 : d.textColor, backgroundColor: d == null ? void 0 : d.color }, children: [
|
|
131
|
+
(d == null ? void 0 : d.ctaIcon) && (d == null ? void 0 : d.ctaIconMode) === eo.CTA_ICON_TRANSPARENT && /* @__PURE__ */ n(xo, { src: d == null ? void 0 : d.ctaIcon, alt: "cta-icon" }),
|
|
138
132
|
(d == null ? void 0 : d.label) || "Open"
|
|
139
133
|
] }),
|
|
140
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ n(jo, { name: "chevronRight" })
|
|
141
135
|
] })
|
|
142
136
|
] }) });
|
|
143
|
-
},
|
|
137
|
+
}, wo = /* @__PURE__ */ e("div")({
|
|
144
138
|
name: "OverlayContainer",
|
|
145
139
|
class: "okzhq2w",
|
|
146
140
|
propsAsIs: !1
|
|
147
|
-
}),
|
|
141
|
+
}), Fo = /* @__PURE__ */ e("div")({
|
|
148
142
|
name: "PromoOverlay",
|
|
149
143
|
class: "pmgz5i",
|
|
150
144
|
propsAsIs: !1
|
|
151
|
-
}),
|
|
145
|
+
}), Go = /* @__PURE__ */ e("div")({
|
|
152
146
|
name: "Header",
|
|
153
147
|
class: "hyxi3jt",
|
|
154
148
|
propsAsIs: !1
|
|
155
|
-
}),
|
|
149
|
+
}), zo = /* @__PURE__ */ e("div")({
|
|
156
150
|
name: "HeaderContent",
|
|
157
151
|
class: "h149e3gp",
|
|
158
152
|
propsAsIs: !1
|
|
159
|
-
}),
|
|
153
|
+
}), Ko = "h10toh7", F = /* @__PURE__ */ e("img")({
|
|
160
154
|
name: "SponsorLogo",
|
|
161
155
|
class: "s1jyea6t",
|
|
162
156
|
propsAsIs: !1
|
|
163
|
-
}),
|
|
157
|
+
}), Ho = /* @__PURE__ */ e("div")({
|
|
164
158
|
name: "SponsorName",
|
|
165
159
|
class: "szpfa3h",
|
|
166
160
|
propsAsIs: !1
|
|
167
|
-
}),
|
|
161
|
+
}), Wo = /* @__PURE__ */ e("div")({
|
|
168
162
|
name: "Media",
|
|
169
163
|
class: "m1crmu01",
|
|
170
164
|
propsAsIs: !1
|
|
171
|
-
}),
|
|
165
|
+
}), Qo = /* @__PURE__ */ e("img")({
|
|
172
166
|
name: "PromoImg",
|
|
173
167
|
class: "p1l37r8s",
|
|
174
168
|
propsAsIs: !1
|
|
175
|
-
}),
|
|
169
|
+
}), Vo = "s1nmch9k", G = /* @__PURE__ */ e("div")({
|
|
176
170
|
name: "Content",
|
|
177
171
|
class: "c1er0ljd",
|
|
178
172
|
propsAsIs: !1
|
|
179
|
-
}),
|
|
173
|
+
}), Jo = /* @__PURE__ */ e("div")({
|
|
180
174
|
name: "Description",
|
|
181
175
|
class: "dydopmr",
|
|
182
176
|
propsAsIs: !1
|
|
183
|
-
}),
|
|
177
|
+
}), Xo = /* @__PURE__ */ e("div")({
|
|
184
178
|
name: "Sponsor",
|
|
185
179
|
class: "s1w6nt04",
|
|
186
180
|
propsAsIs: !1
|
|
187
|
-
}),
|
|
181
|
+
}), Yo = /* @__PURE__ */ e("div")({
|
|
188
182
|
name: "SponsorText",
|
|
189
183
|
class: "s1evcmtq",
|
|
190
184
|
propsAsIs: !1
|
|
191
|
-
}),
|
|
185
|
+
}), Zo = /* @__PURE__ */ e("div")({
|
|
192
186
|
name: "ADLogo",
|
|
193
187
|
class: "awodx0x",
|
|
194
188
|
propsAsIs: !1
|
|
195
|
-
}),
|
|
189
|
+
}), on = /* @__PURE__ */ e("span")({
|
|
196
190
|
name: "SponsoredText",
|
|
197
191
|
class: "s1q3n6oi",
|
|
198
192
|
propsAsIs: !1
|
|
199
|
-
}),
|
|
193
|
+
}), nn = /* @__PURE__ */ e("div")({
|
|
200
194
|
name: "CloseIconWrap",
|
|
201
195
|
class: "c8d4xfk",
|
|
202
196
|
propsAsIs: !1
|
|
203
|
-
}),
|
|
197
|
+
}), en = () => K, sn = /* @__PURE__ */ e(en())({
|
|
204
198
|
name: "CloseIcon",
|
|
205
199
|
class: "ct6oobh",
|
|
206
200
|
propsAsIs: !0
|
|
207
|
-
}),
|
|
201
|
+
}), an = /* @__PURE__ */ e("div")({
|
|
208
202
|
name: "ActionBtnWrap",
|
|
209
203
|
class: "a1gyg7tt",
|
|
210
204
|
propsAsIs: !1
|
|
211
|
-
}),
|
|
205
|
+
}), tn = /* @__PURE__ */ e("a")({
|
|
212
206
|
name: "ActionButton",
|
|
213
207
|
class: "a17rwbtk",
|
|
214
208
|
propsAsIs: !1
|
|
215
|
-
}),
|
|
209
|
+
}), rn = /* @__PURE__ */ e("div")({
|
|
216
210
|
name: "Title",
|
|
217
211
|
class: "t3vxzaw",
|
|
218
212
|
propsAsIs: !1
|
|
219
|
-
}),
|
|
220
|
-
var i, a,
|
|
221
|
-
const
|
|
222
|
-
return /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode === h.LEFT && /* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
|
|
213
|
+
}), ln = "h10f3u0j", z = ({ promotion: o, promotionId: s, onClose: t }) => {
|
|
214
|
+
var i, a, r, l, m, u, c, I, d, C, S, T, M, k, B, L, E, O, x, _, P, j, q, D, R, U;
|
|
215
|
+
const A = o.type === v.INGAME_IAB11_LBAR || o.type === v.INGAME_IAB11, y = ((i = o.sponsor) == null ? void 0 : i.logo) && o.logoMode === h.CENTER;
|
|
216
|
+
return /* @__PURE__ */ p(Fo, { className: "PromoOverlay", children: [
|
|
217
|
+
/* @__PURE__ */ p(Go, { children: [
|
|
218
|
+
/* @__PURE__ */ p(zo, { className: f(!y && Ko), children: [
|
|
219
|
+
((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode === h.LEFT && /* @__PURE__ */ n(F, { src: (r = o.sponsor) == null ? void 0 : r.logo, alt: "promo" }),
|
|
220
|
+
/* @__PURE__ */ p(
|
|
221
|
+
Xo,
|
|
228
222
|
{
|
|
229
223
|
style: {
|
|
230
|
-
paddingLeft: (
|
|
224
|
+
paddingLeft: (l = o.sponsor) != null && l.logo && o.logoMode === h.LEFT ? "0px" : "8px"
|
|
231
225
|
},
|
|
232
226
|
children: [
|
|
233
|
-
((
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
227
|
+
((m = o.sponsor) == null ? void 0 : m.logo) && o.logoMode === h.LEFT && /* @__PURE__ */ n(Ho, { children: (u = o.sponsor) == null ? void 0 : u.name }),
|
|
228
|
+
/* @__PURE__ */ p(Yo, { className: "SponsorText", children: [
|
|
229
|
+
/* @__PURE__ */ n(Zo, { children: "AD" }),
|
|
230
|
+
/* @__PURE__ */ n(on, { children: "SPONSORED" })
|
|
237
231
|
] })
|
|
238
232
|
]
|
|
239
233
|
}
|
|
240
234
|
)
|
|
241
235
|
] }),
|
|
242
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ n(nn, { className: "ClosePromoIcon", onClick: t, children: /* @__PURE__ */ n(sn, { name: "icon-cross" }) })
|
|
243
237
|
] }),
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
y && /* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
|
|
238
|
+
/* @__PURE__ */ p(Wo, { children: [
|
|
239
|
+
y && /* @__PURE__ */ n(F, { className: Vo, src: (c = o.sponsor) == null ? void 0 : c.logo, alt: "promo" }),
|
|
240
|
+
/* @__PURE__ */ n(G, { children: (d = (I = o.banner) == null ? void 0 : I.video) != null && d.url ? /* @__PURE__ */ n(
|
|
241
|
+
V,
|
|
248
242
|
{
|
|
249
|
-
source: (S = (
|
|
250
|
-
poster: (
|
|
251
|
-
aspectRatio:
|
|
243
|
+
source: (S = (C = o.banner) == null ? void 0 : C.video) == null ? void 0 : S.url,
|
|
244
|
+
poster: (M = (T = o.banner) == null ? void 0 : T.video) == null ? void 0 : M.thumbnailUrl,
|
|
245
|
+
aspectRatio: A ? "1/1" : "16/9",
|
|
252
246
|
onPlay: () => {
|
|
253
|
-
|
|
247
|
+
N.emit("advertisement", {
|
|
254
248
|
action: "videoPlay",
|
|
255
249
|
payload: {
|
|
256
250
|
advertisementId: s,
|
|
@@ -259,182 +253,175 @@ const to = /* @__PURE__ */ n("div")({
|
|
|
259
253
|
});
|
|
260
254
|
}
|
|
261
255
|
}
|
|
262
|
-
) : (
|
|
263
|
-
!
|
|
264
|
-
((L = o.banner) == null ? void 0 : L.title) && /* @__PURE__ */
|
|
265
|
-
((
|
|
256
|
+
) : (k = o.banner) != null && k.imageUrl ? /* @__PURE__ */ n(Qo, { style: A ? { aspectRatio: "1/1" } : {}, src: (B = o.banner) == null ? void 0 : B.imageUrl, alt: "promo" }) : null }),
|
|
257
|
+
!A && /* @__PURE__ */ p(G, { children: [
|
|
258
|
+
((L = o.banner) == null ? void 0 : L.title) && /* @__PURE__ */ n(rn, { className: f("AdvTitle", y && ln), children: (E = o.banner) == null ? void 0 : E.title }),
|
|
259
|
+
((O = o.banner) == null ? void 0 : O.body) && /* @__PURE__ */ n(Jo, { className: "AdvDescription", children: (x = o.banner) == null ? void 0 : x.body })
|
|
266
260
|
] })
|
|
267
261
|
] }),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
|
|
262
|
+
o.buttonType !== so.NO_BUTTON && /* @__PURE__ */ n(an, { children: /* @__PURE__ */ n(
|
|
263
|
+
tn,
|
|
270
264
|
{
|
|
271
|
-
href: (
|
|
265
|
+
href: (_ = o.banner) == null ? void 0 : _.url,
|
|
272
266
|
style: {
|
|
273
|
-
backgroundColor: ((
|
|
274
|
-
color: ((
|
|
267
|
+
backgroundColor: ((j = (P = o.banner) == null ? void 0 : P.ctaButton) == null ? void 0 : j.color) || "#009dc4",
|
|
268
|
+
color: ((D = (q = o.banner) == null ? void 0 : q.ctaButton) == null ? void 0 : D.textColor) || "#fff"
|
|
275
269
|
},
|
|
276
270
|
"data-analytics": "button",
|
|
277
271
|
"data-promo-id": s,
|
|
278
272
|
"data-promo-type": o.type,
|
|
279
273
|
target: "_blank",
|
|
280
|
-
children: (U = (
|
|
274
|
+
children: (U = (R = o.banner) == null ? void 0 : R.ctaButton) == null ? void 0 : U.label
|
|
281
275
|
}
|
|
282
276
|
) })
|
|
283
277
|
] });
|
|
284
|
-
},
|
|
278
|
+
}, dn = /* @__PURE__ */ e("div")({
|
|
285
279
|
name: "SidebarContainer",
|
|
286
280
|
class: "s1abskp8",
|
|
287
281
|
propsAsIs: !1
|
|
288
|
-
}),
|
|
282
|
+
}), cn = ({
|
|
289
283
|
children: o,
|
|
290
284
|
direction: s,
|
|
291
|
-
style:
|
|
285
|
+
style: t,
|
|
292
286
|
className: i,
|
|
293
287
|
hiding: a
|
|
294
|
-
}) => /* @__PURE__ */
|
|
288
|
+
}) => /* @__PURE__ */ n($, {
|
|
295
289
|
direction: s,
|
|
296
|
-
style:
|
|
290
|
+
style: t,
|
|
297
291
|
hiding: a,
|
|
298
292
|
className: i,
|
|
299
|
-
children: /* @__PURE__ */
|
|
293
|
+
children: /* @__PURE__ */ n(dn, {
|
|
300
294
|
children: o
|
|
301
295
|
})
|
|
302
|
-
}),
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}, Ie = /* @__PURE__ */ n("div")({
|
|
296
|
+
}), pn = (o) => (o == null ? void 0 : o.type) === v.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === v.INGAME_IAB21_LBAR, mn = (o) => (o == null ? void 0 : o.type) === v.INGAME_IAB11 || (o == null ? void 0 : o.type) === v.INGAME_IAB21, un = ({
|
|
297
|
+
advertisement: o,
|
|
298
|
+
close: s,
|
|
299
|
+
skipTypeCheck: t,
|
|
300
|
+
layoutMode: i = "side-by-side",
|
|
301
|
+
sidebar: a,
|
|
302
|
+
isNotification: r,
|
|
303
|
+
banner: l
|
|
304
|
+
}) => o.promotion ? r && o.notification ? /* @__PURE__ */ n(Uo, { notification: o.notification, promotionId: o.question.id }) : !a && !l && (t || mn(o.promotion)) ? /* @__PURE__ */ n(wo, { className: "PromoOverlayContainer", children: /* @__PURE__ */ n(z, { promotionId: o.question.id, promotion: o.promotion, onClose: s }) }) : a && (t || pn(o.promotion)) ? /* @__PURE__ */ n(cn, { className: "PromoSidebarContainer", direction: a, hiding: !1, children: /* @__PURE__ */ n(z, { promotionId: o.question.id, promotion: o.promotion, onClose: s }) }) : l ? /* @__PURE__ */ n(
|
|
305
|
+
Ao,
|
|
306
|
+
{
|
|
307
|
+
promotionId: o.question.id,
|
|
308
|
+
hiding: !1,
|
|
309
|
+
promotion: o.promotion,
|
|
310
|
+
direction: l
|
|
311
|
+
}
|
|
312
|
+
) : null : null, vn = /* @__PURE__ */ e("div")({
|
|
320
313
|
name: "AdvertisementUIWrap",
|
|
321
314
|
class: "aa6pjif",
|
|
322
315
|
propsAsIs: !1
|
|
323
|
-
}),
|
|
316
|
+
}), In = (o) => {
|
|
324
317
|
const s = o.target;
|
|
325
318
|
if (s instanceof HTMLAnchorElement && s.target === "_blank") {
|
|
326
|
-
const
|
|
327
|
-
s.getAttribute("data-analytics") === "button" &&
|
|
319
|
+
const t = s.getAttribute("data-promo-id") || "", i = s.getAttribute("data-promo-type") || v.UNSET;
|
|
320
|
+
s.getAttribute("data-analytics") === "button" && N.emit("advertisement", {
|
|
328
321
|
action: "buttonSelect",
|
|
329
322
|
payload: {
|
|
330
|
-
advertisementId:
|
|
323
|
+
advertisementId: t,
|
|
331
324
|
advertisementType: i
|
|
332
325
|
}
|
|
333
|
-
}), s.getAttribute("data-analytics") === "banner" &&
|
|
326
|
+
}), s.getAttribute("data-analytics") === "banner" && N.emit("advertisement", {
|
|
334
327
|
action: "bannerSelect",
|
|
335
328
|
payload: {
|
|
336
|
-
advertisementId:
|
|
329
|
+
advertisementId: t,
|
|
337
330
|
advertisementType: i
|
|
338
331
|
}
|
|
339
332
|
});
|
|
340
333
|
}
|
|
341
|
-
},
|
|
334
|
+
}, gn = ({
|
|
342
335
|
gamification: o,
|
|
343
336
|
layoutMode: s,
|
|
344
|
-
skipTypeCheck:
|
|
337
|
+
skipTypeCheck: t,
|
|
345
338
|
sidebar: i,
|
|
346
339
|
banner: a,
|
|
347
|
-
notification:
|
|
348
|
-
isMobileScreen:
|
|
349
|
-
persistent:
|
|
340
|
+
notification: r,
|
|
341
|
+
isMobileScreen: l,
|
|
342
|
+
persistent: m
|
|
350
343
|
}) => {
|
|
351
|
-
const u =
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
355
|
-
[v, p]
|
|
356
|
-
);
|
|
357
|
-
return Y(u, {
|
|
358
|
-
enabled: !!m,
|
|
344
|
+
const u = Q(null), c = H(o.advertisement.$store);
|
|
345
|
+
J(u, {
|
|
346
|
+
enabled: !!c.data,
|
|
359
347
|
event: "click",
|
|
360
|
-
listener:
|
|
361
|
-
})
|
|
348
|
+
listener: In
|
|
349
|
+
});
|
|
350
|
+
const I = !a && !i;
|
|
351
|
+
return c.data === void 0 || !m && c.isViewed ? null : /* @__PURE__ */ n(vn, {
|
|
362
352
|
ref: u,
|
|
363
353
|
style: {
|
|
364
|
-
height:
|
|
354
|
+
height: I ? "auto" : "100%"
|
|
365
355
|
},
|
|
366
|
-
className:
|
|
367
|
-
children: /* @__PURE__ */
|
|
368
|
-
skipTypeCheck:
|
|
356
|
+
className: l ? "mobile-view" : "",
|
|
357
|
+
children: /* @__PURE__ */ n(un, {
|
|
358
|
+
skipTypeCheck: t,
|
|
369
359
|
sidebar: i,
|
|
370
360
|
banner: a,
|
|
371
|
-
advertisement:
|
|
361
|
+
advertisement: c.data,
|
|
362
|
+
close: c.close,
|
|
372
363
|
layoutMode: s,
|
|
373
|
-
isNotification:
|
|
364
|
+
isNotification: r
|
|
374
365
|
})
|
|
375
|
-
})
|
|
376
|
-
},
|
|
366
|
+
});
|
|
367
|
+
}, hn = ({
|
|
377
368
|
sdk: o,
|
|
378
369
|
sidebar: s,
|
|
379
|
-
banner:
|
|
370
|
+
banner: t,
|
|
380
371
|
skipTypeCheck: i,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
notification: u
|
|
372
|
+
layoutMode: a,
|
|
373
|
+
isMobileScreen: r,
|
|
374
|
+
persistent: l,
|
|
375
|
+
notification: m
|
|
386
376
|
}) => {
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
Q(() => {
|
|
391
|
-
a ? o.createEventSession(a) : v();
|
|
392
|
-
}, [a, v, o]);
|
|
393
|
-
const m = N(o.featuresList.getStore());
|
|
394
|
-
if (s && r)
|
|
395
|
-
return /* @__PURE__ */ e("div", {
|
|
377
|
+
const u = H(o.featuresList.getStore());
|
|
378
|
+
if (s && t)
|
|
379
|
+
return /* @__PURE__ */ n("div", {
|
|
396
380
|
style: {
|
|
397
381
|
color: "red"
|
|
398
382
|
},
|
|
399
383
|
children: "define either sidebar or banner, not both."
|
|
400
384
|
});
|
|
401
|
-
if (!
|
|
385
|
+
if (!u)
|
|
402
386
|
return null;
|
|
403
|
-
const
|
|
404
|
-
return
|
|
405
|
-
gamification:
|
|
387
|
+
const c = o.getFeature(ao.GAMES);
|
|
388
|
+
return c ? /* @__PURE__ */ n(gn, {
|
|
389
|
+
gamification: c,
|
|
406
390
|
sidebar: s,
|
|
407
|
-
banner:
|
|
408
|
-
layoutMode:
|
|
409
|
-
isMobileScreen:
|
|
410
|
-
persistent:
|
|
411
|
-
notification:
|
|
391
|
+
banner: t,
|
|
392
|
+
layoutMode: a,
|
|
393
|
+
isMobileScreen: r,
|
|
394
|
+
persistent: l,
|
|
395
|
+
notification: m,
|
|
412
396
|
skipTypeCheck: i
|
|
413
397
|
}) : null;
|
|
414
|
-
},
|
|
398
|
+
}, Nn = ({
|
|
415
399
|
event: o,
|
|
416
400
|
sidebar: s,
|
|
417
|
-
banner:
|
|
401
|
+
banner: t,
|
|
418
402
|
isMobileScreen: i,
|
|
419
403
|
persistent: a,
|
|
404
|
+
theme: r,
|
|
420
405
|
notification: l
|
|
421
406
|
}) => {
|
|
422
|
-
const
|
|
423
|
-
return
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
407
|
+
const m = X();
|
|
408
|
+
return m ? /* @__PURE__ */ p("div", { className: "StreamLayerSDK", children: [
|
|
409
|
+
/* @__PURE__ */ n(Y, { customTheme: r, children: /* @__PURE__ */ n(
|
|
410
|
+
hn,
|
|
411
|
+
{
|
|
412
|
+
sdk: m,
|
|
413
|
+
sidebar: s,
|
|
414
|
+
banner: t,
|
|
415
|
+
isMobileScreen: i,
|
|
416
|
+
persistent: a,
|
|
417
|
+
notification: l,
|
|
418
|
+
layoutMode: "side-by-side"
|
|
419
|
+
}
|
|
420
|
+
) }),
|
|
421
|
+
o !== void 0 && /* @__PURE__ */ n(Z, { event: o })
|
|
422
|
+
] }) : null;
|
|
436
423
|
};
|
|
437
424
|
export {
|
|
438
|
-
|
|
439
|
-
|
|
425
|
+
Nn as StreamLayerSDKAdvertisement,
|
|
426
|
+
hn as StreamLayerSDKAdvertisementUI
|
|
440
427
|
};
|