@streamlayer/react 1.8.4 → 1.8.6
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/app/app.d.ts +1 -0
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/index2.js +45 -45
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +10 -10
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/masters.js +58 -58
- package/lib/dist/es/gamification-feature2.js +11 -11
- package/lib/dist/es/index.js +3 -3
- package/lib/dist/es/masters.js +9683 -9577
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +442 -272
- package/lib/es/index.js +4 -4
- package/lib/es/index2.js +6119 -6040
- package/lib/es/masters2.js +70 -67
- package/lib/es/points.js +16 -16
- package/lib/es/useStreamLayerApp2.js +2499 -2476
- package/lib/style.css +1 -1
- package/package.json +13 -13
package/lib/es/advertisement.js
CHANGED
|
@@ -1,549 +1,719 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { N
|
|
5
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as A, Fragment as ro } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as j, useState as L, useCallback as Eo, useEffect as B } from "react";
|
|
3
|
+
import { e as S, s as n, h as So, g as lo, i as x, Y as ko, a as co, L as Lo, u as Mo, j as Oo, b as Po, S as T, d as _o } from "./index2.js";
|
|
4
|
+
import { N, a as po, b as mo, C as uo, c as Ao, P as M, d as E, A as Bo, e as xo, S as Ro } from "./useStreamLayerApp2.js";
|
|
5
|
+
const Do = /* @__PURE__ */ n("div")({
|
|
6
6
|
name: "Container",
|
|
7
7
|
class: "c5b6wdg",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), qo = "a1rlj479", wo = "s35f1di", Vo = "sj4471g", jo = "b12050d8", Uo = "b1d5ybek", Fo = (o) => o === "left" || o === "right" ? wo : jo, zo = (o) => o === "left" || o === "right" ? Vo : Uo, Go = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", U = ({
|
|
10
10
|
children: o,
|
|
11
|
-
style:
|
|
11
|
+
style: s,
|
|
12
12
|
className: i,
|
|
13
|
-
enabled:
|
|
13
|
+
enabled: t = !0,
|
|
14
14
|
hiding: l,
|
|
15
|
-
direction:
|
|
16
|
-
onAnimationEnd:
|
|
17
|
-
}) => /* @__PURE__ */
|
|
18
|
-
style:
|
|
19
|
-
className:
|
|
20
|
-
onAnimationEnd:
|
|
15
|
+
direction: r = "left",
|
|
16
|
+
onAnimationEnd: c
|
|
17
|
+
}) => /* @__PURE__ */ e(Do, {
|
|
18
|
+
style: s,
|
|
19
|
+
className: S(i, qo, Go(r), t && !l && Fo(r), t && l && zo(r)),
|
|
20
|
+
onAnimationEnd: c,
|
|
21
21
|
children: o
|
|
22
|
-
}),
|
|
22
|
+
}), Wo = /* @__PURE__ */ n("a")({
|
|
23
23
|
name: "Link",
|
|
24
24
|
class: "l1sgte8c",
|
|
25
25
|
propsAsIs: !1
|
|
26
|
-
}),
|
|
26
|
+
}), Ho = /* @__PURE__ */ n("div")({
|
|
27
27
|
name: "BannerContainer",
|
|
28
28
|
class: "b7yfc72",
|
|
29
29
|
propsAsIs: !1
|
|
30
|
-
}),
|
|
30
|
+
}), Ko = () => Wo, Yo = /* @__PURE__ */ n(Ko())({
|
|
31
31
|
name: "BannerLink",
|
|
32
32
|
class: "bejjq94",
|
|
33
33
|
propsAsIs: !0
|
|
34
|
-
}),
|
|
35
|
-
var l,
|
|
34
|
+
}), Jo = ({ promotion: o, promotionId: s, hiding: i, direction: t = "bottom" }) => {
|
|
35
|
+
var l, r;
|
|
36
36
|
if (!((l = o.additionalBanner) != null && l.imageUrl))
|
|
37
37
|
return null;
|
|
38
|
-
let
|
|
39
|
-
return
|
|
40
|
-
|
|
38
|
+
let c = (r = o.banner) == null ? void 0 : r.url;
|
|
39
|
+
return c && c.indexOf("http") !== 0 && (c = `https://${c}`), /* @__PURE__ */ e(U, { direction: t, hiding: i, children: /* @__PURE__ */ e(Ho, { className: "BannerContainer", children: /* @__PURE__ */ e(
|
|
40
|
+
Yo,
|
|
41
41
|
{
|
|
42
42
|
className: "BannerLink",
|
|
43
|
-
href:
|
|
43
|
+
href: c,
|
|
44
44
|
style: { backgroundImage: `url(${o.additionalBanner.imageUrl})` },
|
|
45
|
-
"data-promo-id":
|
|
45
|
+
"data-promo-id": s,
|
|
46
46
|
"data-promo-type": o.type,
|
|
47
47
|
"data-analytics": "banner",
|
|
48
48
|
target: "_blank"
|
|
49
49
|
}
|
|
50
50
|
) }) });
|
|
51
|
-
},
|
|
51
|
+
}, Qo = /* @__PURE__ */ n("div")({
|
|
52
52
|
name: "NotificationContent",
|
|
53
53
|
class: "n18wsqoo",
|
|
54
54
|
propsAsIs: !1
|
|
55
|
-
}),
|
|
55
|
+
}), Xo = /* @__PURE__ */ n("div")({
|
|
56
56
|
name: "Body",
|
|
57
57
|
class: "b1ia90c2",
|
|
58
58
|
propsAsIs: !1
|
|
59
|
-
}),
|
|
59
|
+
}), Zo = /* @__PURE__ */ n("div")({
|
|
60
60
|
name: "Title",
|
|
61
61
|
class: "tg2z08v",
|
|
62
62
|
propsAsIs: !1
|
|
63
|
-
}),
|
|
63
|
+
}), oe = /* @__PURE__ */ n("div")({
|
|
64
64
|
name: "Text",
|
|
65
65
|
class: "t59zdk1",
|
|
66
66
|
propsAsIs: !1
|
|
67
|
-
}),
|
|
67
|
+
}), F = /* @__PURE__ */ n("div")({
|
|
68
68
|
name: "MediaImgBottom",
|
|
69
69
|
class: "m1ab9fq",
|
|
70
70
|
propsAsIs: !1
|
|
71
|
-
}),
|
|
71
|
+
}), ee = () => F, ne = /* @__PURE__ */ n(ee())({
|
|
72
72
|
name: "MediaImgMiddle",
|
|
73
73
|
class: "m9fsr0y",
|
|
74
74
|
propsAsIs: !0
|
|
75
|
-
}),
|
|
75
|
+
}), se = /* @__PURE__ */ n("img")({
|
|
76
76
|
name: "CtaIcon",
|
|
77
77
|
class: "cvi9y5q",
|
|
78
78
|
propsAsIs: !1
|
|
79
|
-
}),
|
|
79
|
+
}), te = /* @__PURE__ */ n("button")({
|
|
80
80
|
name: "Button",
|
|
81
81
|
class: "bgl6boa",
|
|
82
82
|
propsAsIs: !1
|
|
83
|
-
}),
|
|
83
|
+
}), ie = /* @__PURE__ */ n("div")({
|
|
84
84
|
name: "Logo",
|
|
85
85
|
class: "l5mq0z",
|
|
86
86
|
propsAsIs: !1
|
|
87
|
-
}),
|
|
87
|
+
}), ae = /* @__PURE__ */ n("div")({
|
|
88
88
|
name: "Footer",
|
|
89
89
|
class: "f1mse0ft",
|
|
90
90
|
propsAsIs: !1
|
|
91
|
-
}),
|
|
91
|
+
}), re = /* @__PURE__ */ n("div")({
|
|
92
92
|
name: "Vector",
|
|
93
93
|
class: "v1hcloah",
|
|
94
94
|
propsAsIs: !1
|
|
95
|
-
}),
|
|
95
|
+
}), le = /* @__PURE__ */ n("div")({
|
|
96
96
|
name: "NotificationContainer",
|
|
97
97
|
class: "n3n65jf",
|
|
98
98
|
propsAsIs: !1
|
|
99
|
-
}),
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
},
|
|
103
|
-
const i =
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
},
|
|
106
|
-
if (!o || !o.promotion || o.enabled !==
|
|
99
|
+
}), de = {
|
|
100
|
+
[N.BOTTOM]: F,
|
|
101
|
+
[N.MIDDLE]: ne
|
|
102
|
+
}, ce = ({ src: o, imagePosition: s }) => {
|
|
103
|
+
const i = de[s] || F;
|
|
104
|
+
return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
|
|
105
|
+
}, pe = ({ notification: o, open: s }) => {
|
|
106
|
+
if (!o || !o.promotion || o.enabled !== po.NOTIFICATION_ENABLED)
|
|
107
107
|
return null;
|
|
108
|
-
const { title: i, body:
|
|
109
|
-
return /* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
i && /* @__PURE__ */
|
|
114
|
-
|
|
108
|
+
const { title: i, body: t, image: l, promotion: r } = o, { sponsorLogo: c, sponsorLogoMode: p, imagePosition: v, ctaButton: a } = r;
|
|
109
|
+
return /* @__PURE__ */ A(le, { className: "SL_Lower_Third_Notification", onClick: s, children: [
|
|
110
|
+
/* @__PURE__ */ A(Qo, { children: [
|
|
111
|
+
/* @__PURE__ */ e(ce, { src: l, imagePosition: v }),
|
|
112
|
+
/* @__PURE__ */ A(Xo, { children: [
|
|
113
|
+
i && /* @__PURE__ */ e(Zo, { children: i }),
|
|
114
|
+
t && /* @__PURE__ */ e(oe, { children: t })
|
|
115
115
|
] })
|
|
116
116
|
] }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ A(ae, { children: [
|
|
118
|
+
p !== mo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ A(ro, { children: [
|
|
119
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e("img", { src: c, alt: i }) }),
|
|
120
|
+
/* @__PURE__ */ e(re, {})
|
|
121
121
|
] }),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
(
|
|
124
|
-
(
|
|
122
|
+
/* @__PURE__ */ A(te, { name: "promo-button", style: { color: a == null ? void 0 : a.textColor, backgroundColor: a == null ? void 0 : a.color }, children: [
|
|
123
|
+
(a == null ? void 0 : a.ctaIcon) && (a == null ? void 0 : a.ctaIconMode) === uo.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(se, { src: a == null ? void 0 : a.ctaIcon, alt: "cta-icon" }),
|
|
124
|
+
(a == null ? void 0 : a.label) || "Open"
|
|
125
125
|
] })
|
|
126
126
|
] })
|
|
127
127
|
] });
|
|
128
|
-
},
|
|
128
|
+
}, me = /* @__PURE__ */ n("div")({
|
|
129
129
|
name: "NotificationContent",
|
|
130
130
|
class: "n1ku6hz",
|
|
131
131
|
propsAsIs: !1
|
|
132
|
-
}),
|
|
132
|
+
}), ue = /* @__PURE__ */ n("div")({
|
|
133
133
|
name: "NotificationContainer",
|
|
134
134
|
class: "nbxqmol",
|
|
135
135
|
propsAsIs: !1
|
|
136
|
-
}),
|
|
136
|
+
}), Ae = /* @__PURE__ */ n("div")({
|
|
137
137
|
name: "Body",
|
|
138
138
|
class: "b1gu3eml",
|
|
139
139
|
propsAsIs: !1
|
|
140
|
-
}),
|
|
140
|
+
}), ve = /* @__PURE__ */ n("div")({
|
|
141
141
|
name: "Title",
|
|
142
142
|
class: "t1u17zva",
|
|
143
143
|
propsAsIs: !1
|
|
144
|
-
}),
|
|
144
|
+
}), he = /* @__PURE__ */ n("div")({
|
|
145
145
|
name: "Text",
|
|
146
146
|
class: "t10ko1g",
|
|
147
147
|
propsAsIs: !1
|
|
148
|
-
}),
|
|
148
|
+
}), R = /* @__PURE__ */ n("div")({
|
|
149
149
|
name: "Media",
|
|
150
150
|
class: "mntc42e",
|
|
151
151
|
propsAsIs: !1
|
|
152
|
-
}),
|
|
152
|
+
}), Ie = () => R, no = /* @__PURE__ */ n(Ie())({
|
|
153
153
|
name: "MediaImgFit",
|
|
154
154
|
class: "ml060eo",
|
|
155
155
|
propsAsIs: !0
|
|
156
|
-
}),
|
|
156
|
+
}), ge = () => R, vo = /* @__PURE__ */ n(ge())({
|
|
157
157
|
name: "MediaImgCentered",
|
|
158
158
|
class: "m1vqlvig",
|
|
159
159
|
propsAsIs: !0
|
|
160
|
-
}),
|
|
160
|
+
}), ye = () => vo, be = /* @__PURE__ */ n(ye())({
|
|
161
161
|
name: "MediaImgBottom",
|
|
162
162
|
class: "m1e7tvi5",
|
|
163
163
|
propsAsIs: !0
|
|
164
|
-
}),
|
|
164
|
+
}), fe = () => R, Ne = /* @__PURE__ */ n(fe())({
|
|
165
165
|
name: "MediaImgSolid",
|
|
166
166
|
class: "mqvntt2",
|
|
167
167
|
propsAsIs: !0
|
|
168
|
-
}),
|
|
168
|
+
}), $e = () => R, Ce = /* @__PURE__ */ n($e())({
|
|
169
169
|
name: "MediaImgMiddle",
|
|
170
170
|
class: "m12jtj3u",
|
|
171
171
|
propsAsIs: !0
|
|
172
|
-
}),
|
|
172
|
+
}), Te = /* @__PURE__ */ n("img")({
|
|
173
173
|
name: "CtaIcon",
|
|
174
174
|
class: "ckq1frv",
|
|
175
175
|
propsAsIs: !1
|
|
176
|
-
}),
|
|
176
|
+
}), Ee = /* @__PURE__ */ n("button")({
|
|
177
177
|
name: "Button",
|
|
178
178
|
class: "bis90pl",
|
|
179
179
|
propsAsIs: !1
|
|
180
|
-
}),
|
|
180
|
+
}), Se = () => So, ke = /* @__PURE__ */ n(Se())({
|
|
181
181
|
name: "StyledChevronRight",
|
|
182
182
|
class: "s9mjmz3",
|
|
183
183
|
propsAsIs: !0
|
|
184
|
-
}),
|
|
184
|
+
}), Le = /* @__PURE__ */ n("div")({
|
|
185
185
|
name: "Logo",
|
|
186
186
|
class: "l1cf50a7",
|
|
187
187
|
propsAsIs: !1
|
|
188
|
-
}),
|
|
189
|
-
[
|
|
190
|
-
[
|
|
191
|
-
[
|
|
192
|
-
[
|
|
193
|
-
[
|
|
194
|
-
[
|
|
195
|
-
},
|
|
196
|
-
const i =
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
},
|
|
199
|
-
if (!o || !o.promotion || o.enabled !==
|
|
188
|
+
}), Me = {
|
|
189
|
+
[N.UNSET]: no,
|
|
190
|
+
[N.FIT]: no,
|
|
191
|
+
[N.CENTERED]: vo,
|
|
192
|
+
[N.BOTTOM]: be,
|
|
193
|
+
[N.SOLID]: Ne,
|
|
194
|
+
[N.MIDDLE]: Ce
|
|
195
|
+
}, Oe = ({ src: o, imagePosition: s }) => {
|
|
196
|
+
const i = Me[s];
|
|
197
|
+
return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
|
|
198
|
+
}, Pe = ({ notification: o, open: s, promotionId: i, hiding: t, direction: l = "left" }) => {
|
|
199
|
+
if (!o || !o.promotion || o.enabled !== po.NOTIFICATION_ENABLED)
|
|
200
200
|
return null;
|
|
201
|
-
if (o.promotion.mode ===
|
|
202
|
-
return /* @__PURE__ */
|
|
203
|
-
const { title:
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
210
|
-
|
|
201
|
+
if (o.promotion.mode === Ao.LOWER_THIRD)
|
|
202
|
+
return /* @__PURE__ */ e(pe, { notification: o, open: s });
|
|
203
|
+
const { title: r, body: c, image: p, promotion: v } = o, { sponsorLogo: a, sponsorLogoMode: h, imagePosition: u, ctaButton: m } = v;
|
|
204
|
+
return /* @__PURE__ */ e(U, { className: "SL_Rich_Notification", direction: l, hiding: t, children: /* @__PURE__ */ A(ue, { onClick: s, children: [
|
|
205
|
+
h !== mo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(Le, { children: /* @__PURE__ */ e("img", { src: a, alt: r }) }),
|
|
206
|
+
/* @__PURE__ */ A(me, { children: [
|
|
207
|
+
/* @__PURE__ */ e(Oe, { src: p, imagePosition: u }),
|
|
208
|
+
/* @__PURE__ */ A(Ae, { children: [
|
|
209
|
+
r && /* @__PURE__ */ e(ve, { children: r }),
|
|
210
|
+
c && /* @__PURE__ */ e(he, { children: c })
|
|
211
211
|
] }),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
(
|
|
214
|
-
(
|
|
212
|
+
/* @__PURE__ */ A(Ee, { name: "promo-button", style: { color: m == null ? void 0 : m.textColor, backgroundColor: m == null ? void 0 : m.color }, children: [
|
|
213
|
+
(m == null ? void 0 : m.ctaIcon) && (m == null ? void 0 : m.ctaIconMode) === uo.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(Te, { src: m == null ? void 0 : m.ctaIcon, alt: "cta-icon" }),
|
|
214
|
+
(m == null ? void 0 : m.label) || "Open"
|
|
215
215
|
] }),
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ e(ke, { name: "chevronRight" })
|
|
217
217
|
] })
|
|
218
218
|
] }) });
|
|
219
|
-
},
|
|
219
|
+
}, _e = /* @__PURE__ */ n("div")({
|
|
220
220
|
name: "OverlayContainer",
|
|
221
221
|
class: "okzhq2w",
|
|
222
222
|
propsAsIs: !1
|
|
223
|
-
}),
|
|
223
|
+
}), ho = /* @__PURE__ */ n("div")({
|
|
224
224
|
name: "PromoOverlay",
|
|
225
225
|
class: "pmgz5i",
|
|
226
226
|
propsAsIs: !1
|
|
227
|
-
}),
|
|
227
|
+
}), Io = /* @__PURE__ */ n("div")({
|
|
228
228
|
name: "Header",
|
|
229
229
|
class: "hyxi3jt",
|
|
230
230
|
propsAsIs: !1
|
|
231
|
-
}),
|
|
231
|
+
}), go = /* @__PURE__ */ n("div")({
|
|
232
232
|
name: "HeaderContent",
|
|
233
233
|
class: "h149e3gp",
|
|
234
234
|
propsAsIs: !1
|
|
235
|
-
}),
|
|
235
|
+
}), yo = "h10toh7", so = /* @__PURE__ */ n("img")({
|
|
236
236
|
name: "SponsorLogo",
|
|
237
237
|
class: "s1jyea6t",
|
|
238
238
|
propsAsIs: !1
|
|
239
|
-
}),
|
|
239
|
+
}), Be = /* @__PURE__ */ n("div")({
|
|
240
240
|
name: "SponsorName",
|
|
241
241
|
class: "szpfa3h",
|
|
242
242
|
propsAsIs: !1
|
|
243
|
-
}),
|
|
243
|
+
}), bo = /* @__PURE__ */ n("div")({
|
|
244
244
|
name: "Media",
|
|
245
245
|
class: "m1crmu01",
|
|
246
246
|
propsAsIs: !1
|
|
247
|
-
}),
|
|
247
|
+
}), xe = /* @__PURE__ */ n("img")({
|
|
248
248
|
name: "PromoImg",
|
|
249
249
|
class: "p1l37r8s",
|
|
250
250
|
propsAsIs: !1
|
|
251
|
-
}),
|
|
251
|
+
}), Re = "s1nmch9k", to = /* @__PURE__ */ n("div")({
|
|
252
252
|
name: "Content",
|
|
253
253
|
class: "c1er0ljd",
|
|
254
254
|
propsAsIs: !1
|
|
255
|
-
}),
|
|
255
|
+
}), De = /* @__PURE__ */ n("div")({
|
|
256
256
|
name: "Description",
|
|
257
257
|
class: "dydopmr",
|
|
258
258
|
propsAsIs: !1
|
|
259
|
-
}),
|
|
259
|
+
}), qe = /* @__PURE__ */ n("div")({
|
|
260
260
|
name: "Sponsor",
|
|
261
261
|
class: "s1w6nt04",
|
|
262
262
|
propsAsIs: !1
|
|
263
|
-
}),
|
|
263
|
+
}), we = /* @__PURE__ */ n("div")({
|
|
264
264
|
name: "SponsorText",
|
|
265
265
|
class: "s1evcmtq",
|
|
266
266
|
propsAsIs: !1
|
|
267
|
-
}),
|
|
267
|
+
}), fo = /* @__PURE__ */ n("div")({
|
|
268
268
|
name: "ADLogo",
|
|
269
269
|
class: "awodx0x",
|
|
270
270
|
propsAsIs: !1
|
|
271
|
-
}),
|
|
271
|
+
}), Ve = /* @__PURE__ */ n("span")({
|
|
272
272
|
name: "SponsoredText",
|
|
273
273
|
class: "s1q3n6oi",
|
|
274
274
|
propsAsIs: !1
|
|
275
|
-
}),
|
|
275
|
+
}), je = /* @__PURE__ */ n("div")({
|
|
276
276
|
name: "ActionBtnWrap",
|
|
277
277
|
class: "a8d4xfk",
|
|
278
278
|
propsAsIs: !1
|
|
279
|
-
}),
|
|
279
|
+
}), Ue = /* @__PURE__ */ n("a")({
|
|
280
280
|
name: "ActionButton",
|
|
281
281
|
class: "at6oobh",
|
|
282
282
|
propsAsIs: !1
|
|
283
|
-
}),
|
|
283
|
+
}), Fe = /* @__PURE__ */ n("div")({
|
|
284
284
|
name: "Title",
|
|
285
285
|
class: "t1gyg7tt",
|
|
286
286
|
propsAsIs: !1
|
|
287
|
-
}),
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
287
|
+
}), ze = "h17rwbtk", Ge = /* @__PURE__ */ n("div")({
|
|
288
|
+
name: "Container",
|
|
289
|
+
class: "c10m2bce",
|
|
290
|
+
propsAsIs: !1
|
|
291
|
+
}), io = /* @__PURE__ */ n("div")({
|
|
292
|
+
name: "Item",
|
|
293
|
+
class: "ig23yq5",
|
|
294
|
+
propsAsIs: !1
|
|
295
|
+
}), We = /* @__PURE__ */ n("div")({
|
|
296
|
+
name: "Dot",
|
|
297
|
+
class: "d1f6aqua",
|
|
298
|
+
propsAsIs: !1
|
|
299
|
+
}), He = ({
|
|
300
|
+
time: o,
|
|
301
|
+
adCount: s,
|
|
302
|
+
adPosition: i
|
|
303
|
+
}) => {
|
|
304
|
+
const t = Math.floor(o / 60), l = o - t * 60;
|
|
305
|
+
return t === 0 && l === 0 && s === i ? null : /* @__PURE__ */ A(Ge, {
|
|
306
|
+
children: [s > 1 && /* @__PURE__ */ A(ro, {
|
|
307
|
+
children: [/* @__PURE__ */ A(io, {
|
|
308
|
+
children: [i, " of ", s]
|
|
309
|
+
}), /* @__PURE__ */ e(We, {})]
|
|
310
|
+
}), /* @__PURE__ */ A(io, {
|
|
311
|
+
children: [t, ":", l < 10 ? `0${l}` : l]
|
|
312
|
+
})]
|
|
313
|
+
});
|
|
314
|
+
}, Ke = (o, s, { onPlay: i, onStop: t, onProgress: l }) => {
|
|
315
|
+
const r = google.ima;
|
|
316
|
+
let c = new r.AdDisplayContainer(o), p = new r.AdsLoader(c), v = new r.AdsRequest(), a;
|
|
317
|
+
p.addEventListener(
|
|
318
|
+
r.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
319
|
+
(u) => {
|
|
320
|
+
a = u.getAdsManager(o), i && a.addEventListener(r.AdEvent.Type.STARTED, i), t && a.addEventListener(r.AdEvent.Type.COMPLETE, t), l && a.addEventListener(r.AdEvent.Type.AD_PROGRESS, (m) => l(m.getAdData())), a.init(o.clientWidth, o.clientHeight, r.ViewMode.NORMAL), a.start();
|
|
321
|
+
},
|
|
322
|
+
!1
|
|
323
|
+
), p.addEventListener(
|
|
324
|
+
r.AdErrorEvent.Type.AD_ERROR,
|
|
325
|
+
() => {
|
|
326
|
+
console.log("ad error"), t == null || t();
|
|
327
|
+
},
|
|
328
|
+
!1
|
|
329
|
+
), v.linearAdSlotWidth = o.clientWidth, v.linearAdSlotHeight = o.clientHeight, v.adTagUrl = s, p.requestAds(v);
|
|
330
|
+
const h = () => {
|
|
331
|
+
a == null || a.destroy(), p == null || p.destroy(), c == null || c.destroy(), c = void 0, p = void 0, v = void 0, a = void 0;
|
|
332
|
+
};
|
|
333
|
+
return () => {
|
|
334
|
+
try {
|
|
335
|
+
c.initialize();
|
|
336
|
+
} catch (u) {
|
|
337
|
+
t == null || t(), console.log("AdsManager could not be started", u);
|
|
338
|
+
}
|
|
339
|
+
return h;
|
|
340
|
+
};
|
|
341
|
+
}, Ye = /* @__PURE__ */ n("div")({
|
|
342
|
+
name: "Container",
|
|
343
|
+
class: "c4q6dw1",
|
|
344
|
+
propsAsIs: !1
|
|
345
|
+
}), Je = /* @__PURE__ */ n("div")({
|
|
346
|
+
name: "ControlsContainer",
|
|
347
|
+
class: "c1la67r",
|
|
348
|
+
propsAsIs: !1
|
|
349
|
+
}), Qe = "m3guev", Xe = "m7099mt", Ze = "mmm6o5s", on = ({
|
|
350
|
+
promotion: o,
|
|
351
|
+
controlVideo: s,
|
|
352
|
+
promotionId: i,
|
|
353
|
+
onClose: t,
|
|
354
|
+
externalAd: l,
|
|
355
|
+
skipAutoClose: r
|
|
356
|
+
}) => {
|
|
357
|
+
var c;
|
|
358
|
+
const p = j(null), [v, a] = L(!1), [h, u] = L(0), [m, b] = L(0), [$, I] = L(0), g = j(), y = Eo(() => {
|
|
359
|
+
u(0), b(0), I(0), a(!1), s == null || s({
|
|
360
|
+
muted: !1
|
|
361
|
+
});
|
|
362
|
+
}, [s]);
|
|
363
|
+
B(() => {
|
|
364
|
+
if (l != null && l.url && p.current) {
|
|
365
|
+
y();
|
|
366
|
+
const f = Ke(p.current, l.url, {
|
|
367
|
+
onPlay: () => {
|
|
368
|
+
x.emit("advertisement", {
|
|
369
|
+
action: "videoPlay",
|
|
370
|
+
payload: {
|
|
371
|
+
id: i,
|
|
372
|
+
type: o.type
|
|
373
|
+
}
|
|
374
|
+
}), s == null || s({
|
|
375
|
+
muted: !0
|
|
376
|
+
}), a(!0);
|
|
377
|
+
},
|
|
378
|
+
onStop: () => {
|
|
379
|
+
t == null || t(), y();
|
|
380
|
+
},
|
|
381
|
+
onProgress: (C) => {
|
|
382
|
+
u(Math.round(C.duration - C.currentTime)), b(C.totalAds), I(C.adPosition);
|
|
383
|
+
}
|
|
384
|
+
})();
|
|
385
|
+
return g.current = f, () => {
|
|
386
|
+
g.current = void 0, f();
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
}, [l == null ? void 0 : l.url, s, y, i, o.type, t]);
|
|
390
|
+
const O = ((c = o.sponsor) == null ? void 0 : c.logo) && o.logoMode === M.CENTER;
|
|
391
|
+
return /* @__PURE__ */ A(ho, {
|
|
392
|
+
className: "PromoOverlay",
|
|
393
|
+
children: [/* @__PURE__ */ A(Io, {
|
|
394
|
+
children: [/* @__PURE__ */ e(go, {
|
|
395
|
+
className: S(!O && yo),
|
|
396
|
+
children: /* @__PURE__ */ e(fo, {
|
|
397
|
+
style: {
|
|
398
|
+
transform: "scale(1.5)"
|
|
399
|
+
},
|
|
400
|
+
children: "Ad"
|
|
401
|
+
})
|
|
402
|
+
}), /* @__PURE__ */ A(Je, {
|
|
403
|
+
children: [/* @__PURE__ */ e(He, {
|
|
404
|
+
time: h,
|
|
405
|
+
adCount: m,
|
|
406
|
+
adPosition: $
|
|
407
|
+
}), r && /* @__PURE__ */ e(lo, {
|
|
408
|
+
className: "ClosePromoIcon",
|
|
409
|
+
close: () => {
|
|
410
|
+
var f;
|
|
411
|
+
(f = g.current) == null || f.call(g), t == null || t(), y();
|
|
412
|
+
}
|
|
413
|
+
})]
|
|
414
|
+
})]
|
|
415
|
+
}), /* @__PURE__ */ e(bo, {
|
|
416
|
+
className: S(Qe, v && Xe, !v && Ze),
|
|
417
|
+
children: /* @__PURE__ */ e(Ye, {
|
|
418
|
+
ref: p
|
|
419
|
+
})
|
|
420
|
+
})]
|
|
421
|
+
});
|
|
422
|
+
}, ao = (o) => {
|
|
423
|
+
var s, i, t, l, r, c, p, v, a, h, u, m, b, $, I, g, y, O, f, C, z, G, W, H, K, Y, J, Q, X, Z;
|
|
424
|
+
const { promotion: d, controlVideo: P, skipAutoClose: No, promotionId: _, onClose: $o, markAsViewed: D, externalAd: oo } = o, q = d.type === E.INGAME_IAB11_LBAR || d.type === E.INGAME_IAB11, w = ((s = d.sponsor) == null ? void 0 : s.logo) && d.logoMode === M.CENTER, Co = !!((t = (i = d.banner) == null ? void 0 : i.video) != null && t.url), V = d.autoPlayVideo === Bo.ENABLED, [To, eo] = L(!Co || !V);
|
|
425
|
+
if (B(() => {
|
|
426
|
+
_ && d.type && D && D();
|
|
427
|
+
}, [_, d.type, D]), B(() => () => {
|
|
428
|
+
P == null || P({ muted: !1 });
|
|
429
|
+
}, [P]), oo)
|
|
430
|
+
return /* @__PURE__ */ e(on, { ...o, externalAd: oo });
|
|
431
|
+
let k = (l = d.banner) == null ? void 0 : l.url;
|
|
432
|
+
return k && k.indexOf("http") !== 0 && (k = `https://${k}`), /* @__PURE__ */ A(ho, { className: "PromoOverlay", children: [
|
|
433
|
+
/* @__PURE__ */ A(Io, { children: [
|
|
434
|
+
/* @__PURE__ */ A(go, { className: S(!w && yo), children: [
|
|
435
|
+
((r = d.sponsor) == null ? void 0 : r.logo) && d.logoMode === M.LEFT && /* @__PURE__ */ e(so, { src: (c = d.sponsor) == null ? void 0 : c.logo, alt: "promo" }),
|
|
436
|
+
/* @__PURE__ */ A(
|
|
437
|
+
qe,
|
|
300
438
|
{
|
|
301
439
|
style: {
|
|
302
|
-
paddingLeft: (
|
|
440
|
+
paddingLeft: (p = d.sponsor) != null && p.logo && d.logoMode === M.LEFT ? "0px" : "8px"
|
|
303
441
|
},
|
|
304
442
|
children: [
|
|
305
|
-
((v =
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
443
|
+
((v = d.sponsor) == null ? void 0 : v.logo) && d.logoMode === M.LEFT && /* @__PURE__ */ e(Be, { children: (a = d.sponsor) == null ? void 0 : a.name }),
|
|
444
|
+
/* @__PURE__ */ A(we, { className: "SponsorText", children: [
|
|
445
|
+
/* @__PURE__ */ e(fo, { children: "AD" }),
|
|
446
|
+
/* @__PURE__ */ e(Ve, { children: "SPONSORED" })
|
|
309
447
|
] })
|
|
310
448
|
]
|
|
311
449
|
}
|
|
312
450
|
)
|
|
313
451
|
] }),
|
|
314
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ e(
|
|
315
453
|
lo,
|
|
316
454
|
{
|
|
317
455
|
className: "ClosePromoIcon",
|
|
318
|
-
close:
|
|
319
|
-
autoClose: (
|
|
320
|
-
duration:
|
|
456
|
+
close: $o,
|
|
457
|
+
autoClose: (h = d.closeTimer) == null ? void 0 : h.auto,
|
|
458
|
+
duration: No ? 0 : (u = d.closeTimer) == null ? void 0 : u.seconds,
|
|
459
|
+
isPlaying: To
|
|
321
460
|
}
|
|
322
461
|
)
|
|
323
462
|
] }),
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
|
|
463
|
+
/* @__PURE__ */ A(bo, { children: [
|
|
464
|
+
w && /* @__PURE__ */ e(so, { className: Re, src: (m = d.sponsor) == null ? void 0 : m.logo, alt: "promo" }),
|
|
465
|
+
/* @__PURE__ */ e(to, { children: ($ = (b = d.banner) == null ? void 0 : b.video) != null && $.url ? /* @__PURE__ */ e(
|
|
466
|
+
ko,
|
|
328
467
|
{
|
|
329
|
-
source: (
|
|
330
|
-
poster: (
|
|
331
|
-
aspectRatio:
|
|
468
|
+
source: (g = (I = d.banner) == null ? void 0 : I.video) == null ? void 0 : g.url,
|
|
469
|
+
poster: (O = (y = d.banner) == null ? void 0 : y.video) == null ? void 0 : O.thumbnailUrl,
|
|
470
|
+
aspectRatio: q ? "1/1" : "16/9",
|
|
471
|
+
onPause: () => {
|
|
472
|
+
V && eo(!1);
|
|
473
|
+
},
|
|
332
474
|
onPlay: () => {
|
|
333
|
-
|
|
475
|
+
x.emit("advertisement", {
|
|
334
476
|
action: "videoPlay",
|
|
335
477
|
payload: {
|
|
336
|
-
id:
|
|
337
|
-
type:
|
|
478
|
+
id: _,
|
|
479
|
+
type: d.type
|
|
338
480
|
}
|
|
339
|
-
});
|
|
481
|
+
}), eo(!0);
|
|
340
482
|
},
|
|
341
|
-
|
|
483
|
+
controlVideo: P,
|
|
484
|
+
autoPlay: V
|
|
342
485
|
}
|
|
343
|
-
) : (
|
|
344
|
-
!
|
|
345
|
-
((
|
|
346
|
-
((
|
|
486
|
+
) : (f = d.banner) != null && f.imageUrl ? /* @__PURE__ */ e(xe, { style: q ? { aspectRatio: "1/1" } : {}, src: (C = d.banner) == null ? void 0 : C.imageUrl, alt: "promo" }) : null }),
|
|
487
|
+
!q && /* @__PURE__ */ A(to, { children: [
|
|
488
|
+
((z = d.banner) == null ? void 0 : z.title) && /* @__PURE__ */ e(Fe, { className: S("AdvTitle", w && ze), children: (G = d.banner) == null ? void 0 : G.title }),
|
|
489
|
+
((W = d.banner) == null ? void 0 : W.body) && /* @__PURE__ */ e(De, { className: "AdvDescription", children: (H = d.banner) == null ? void 0 : H.body })
|
|
347
490
|
] })
|
|
348
491
|
] }),
|
|
349
|
-
|
|
350
|
-
|
|
492
|
+
d.buttonType !== xo.NO_BUTTON && /* @__PURE__ */ e(je, { children: /* @__PURE__ */ e(
|
|
493
|
+
Ue,
|
|
351
494
|
{
|
|
352
|
-
href:
|
|
495
|
+
href: k,
|
|
353
496
|
style: {
|
|
354
|
-
backgroundColor: ((
|
|
355
|
-
color: ((
|
|
497
|
+
backgroundColor: ((Y = (K = d.banner) == null ? void 0 : K.ctaButton) == null ? void 0 : Y.color) || "#009dc4",
|
|
498
|
+
color: ((Q = (J = d.banner) == null ? void 0 : J.ctaButton) == null ? void 0 : Q.textColor) || "#fff"
|
|
356
499
|
},
|
|
357
500
|
"data-analytics": "button",
|
|
358
|
-
"data-promo-id":
|
|
359
|
-
"data-promo-type":
|
|
501
|
+
"data-promo-id": _,
|
|
502
|
+
"data-promo-type": d.type,
|
|
360
503
|
target: "_blank",
|
|
361
|
-
children: (
|
|
504
|
+
children: (Z = (X = d.banner) == null ? void 0 : X.ctaButton) == null ? void 0 : Z.label
|
|
362
505
|
}
|
|
363
506
|
) })
|
|
364
507
|
] });
|
|
365
|
-
},
|
|
508
|
+
}, en = /* @__PURE__ */ n("div")({
|
|
366
509
|
name: "SidebarContainer",
|
|
367
510
|
class: "s1abskp8",
|
|
368
511
|
propsAsIs: !1
|
|
369
|
-
}),
|
|
512
|
+
}), nn = ({
|
|
370
513
|
children: o,
|
|
371
|
-
direction:
|
|
514
|
+
direction: s,
|
|
372
515
|
style: i,
|
|
373
|
-
className:
|
|
516
|
+
className: t,
|
|
374
517
|
hiding: l
|
|
375
|
-
}) => /* @__PURE__ */
|
|
376
|
-
direction:
|
|
518
|
+
}) => /* @__PURE__ */ e(U, {
|
|
519
|
+
direction: s,
|
|
377
520
|
style: i,
|
|
378
521
|
hiding: l,
|
|
379
|
-
className:
|
|
380
|
-
children: /* @__PURE__ */
|
|
522
|
+
className: t,
|
|
523
|
+
children: /* @__PURE__ */ e(en, {
|
|
381
524
|
children: o
|
|
382
525
|
})
|
|
383
|
-
}),
|
|
526
|
+
}), sn = (o) => (o == null ? void 0 : o.type) === E.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === E.INGAME_IAB21_LBAR, tn = (o) => (o == null ? void 0 : o.type) === E.INGAME_IAB11 || (o == null ? void 0 : o.type) === E.INGAME_IAB21, an = ({
|
|
384
527
|
advertisement: o,
|
|
385
|
-
close:
|
|
528
|
+
close: s,
|
|
386
529
|
skipTypeCheck: i,
|
|
387
|
-
skipAutoClose:
|
|
530
|
+
skipAutoClose: t,
|
|
388
531
|
layoutMode: l = "side-by-side",
|
|
389
|
-
sidebar:
|
|
390
|
-
isNotification:
|
|
391
|
-
banner:
|
|
392
|
-
markAsViewed:
|
|
393
|
-
open:
|
|
394
|
-
|
|
395
|
-
|
|
532
|
+
sidebar: r,
|
|
533
|
+
isNotification: c,
|
|
534
|
+
banner: p,
|
|
535
|
+
markAsViewed: v,
|
|
536
|
+
open: a,
|
|
537
|
+
externalAd: h,
|
|
538
|
+
controlVideo: u
|
|
539
|
+
}) => o.promotion ? c && o.notification ? /* @__PURE__ */ e(Pe, { open: a, notification: o.notification, promotionId: o.question.id }) : !r && !p && (i || tn(o.promotion)) ? /* @__PURE__ */ e(_e, { className: "PromoOverlayContainer", children: /* @__PURE__ */ e(
|
|
540
|
+
ao,
|
|
396
541
|
{
|
|
397
|
-
markAsViewed:
|
|
542
|
+
markAsViewed: v,
|
|
398
543
|
promotionId: o.question.id,
|
|
399
544
|
promotion: o.promotion,
|
|
400
|
-
onClose:
|
|
401
|
-
skipAutoClose:
|
|
545
|
+
onClose: s,
|
|
546
|
+
skipAutoClose: t,
|
|
547
|
+
externalAd: h,
|
|
548
|
+
controlVideo: u
|
|
402
549
|
}
|
|
403
|
-
) }) :
|
|
404
|
-
|
|
550
|
+
) }) : r && (i || sn(o.promotion)) ? /* @__PURE__ */ e(nn, { className: "PromoSidebarContainer", direction: r, hiding: !1, children: /* @__PURE__ */ e(
|
|
551
|
+
ao,
|
|
405
552
|
{
|
|
406
|
-
markAsViewed:
|
|
553
|
+
markAsViewed: v,
|
|
407
554
|
promotionId: o.question.id,
|
|
408
555
|
promotion: o.promotion,
|
|
409
|
-
|
|
410
|
-
|
|
556
|
+
externalAd: h,
|
|
557
|
+
onClose: s,
|
|
558
|
+
controlVideo: u,
|
|
559
|
+
skipAutoClose: t
|
|
411
560
|
}
|
|
412
|
-
) }) :
|
|
413
|
-
|
|
561
|
+
) }) : p ? /* @__PURE__ */ e(
|
|
562
|
+
Jo,
|
|
414
563
|
{
|
|
415
564
|
promotionId: o.question.id,
|
|
416
565
|
hiding: !1,
|
|
417
566
|
promotion: o.promotion,
|
|
418
|
-
direction:
|
|
567
|
+
direction: p
|
|
419
568
|
}
|
|
420
|
-
) : null : null,
|
|
569
|
+
) : null : null, rn = /* @__PURE__ */ n("div")({
|
|
421
570
|
name: "AdvertisementUIWrap",
|
|
422
571
|
class: "aa6pjif",
|
|
423
572
|
propsAsIs: !1
|
|
424
|
-
}),
|
|
425
|
-
const
|
|
426
|
-
if (
|
|
427
|
-
const i =
|
|
428
|
-
|
|
573
|
+
}), ln = (o) => {
|
|
574
|
+
const s = o.target;
|
|
575
|
+
if (s instanceof HTMLAnchorElement && s.target === "_blank") {
|
|
576
|
+
const i = s.getAttribute("data-promo-id") || "", t = s.getAttribute("data-promo-type") || E.UNSET;
|
|
577
|
+
s.getAttribute("data-analytics") === "button" && x.emit("advertisement", {
|
|
429
578
|
action: "buttonSelect",
|
|
430
579
|
payload: {
|
|
431
580
|
id: i,
|
|
432
|
-
type:
|
|
581
|
+
type: t
|
|
433
582
|
}
|
|
434
|
-
}),
|
|
583
|
+
}), s.getAttribute("data-analytics") === "banner" && x.emit("advertisement", {
|
|
435
584
|
action: "bannerSelect",
|
|
436
585
|
payload: {
|
|
437
586
|
id: i,
|
|
438
|
-
type:
|
|
587
|
+
type: t
|
|
439
588
|
}
|
|
440
589
|
});
|
|
441
590
|
}
|
|
442
|
-
},
|
|
591
|
+
}, dn = ({
|
|
443
592
|
gamification: o,
|
|
444
|
-
layoutMode:
|
|
593
|
+
layoutMode: s,
|
|
445
594
|
skipAutoClose: i,
|
|
446
|
-
skipTypeCheck:
|
|
595
|
+
skipTypeCheck: t,
|
|
447
596
|
sidebar: l,
|
|
448
|
-
banner:
|
|
449
|
-
notification:
|
|
450
|
-
isMobileScreen:
|
|
451
|
-
persistent:
|
|
597
|
+
banner: r,
|
|
598
|
+
notification: c,
|
|
599
|
+
isMobileScreen: p,
|
|
600
|
+
persistent: v,
|
|
601
|
+
externalAd: a,
|
|
602
|
+
controlVideo: h
|
|
452
603
|
}) => {
|
|
453
|
-
var
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
enabled: !!
|
|
604
|
+
var u, m, b;
|
|
605
|
+
const $ = j(null), I = co(o.advertisement.$store);
|
|
606
|
+
Lo($, {
|
|
607
|
+
enabled: !!I.data,
|
|
457
608
|
event: "click",
|
|
458
|
-
listener:
|
|
609
|
+
listener: ln
|
|
459
610
|
});
|
|
460
|
-
const
|
|
461
|
-
if (
|
|
611
|
+
const g = !r && !l;
|
|
612
|
+
if (I.data === void 0 || !v && I.isViewed)
|
|
462
613
|
return null;
|
|
463
|
-
const
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
ref:
|
|
614
|
+
const y = ((b = (m = (u = I == null ? void 0 : I.data) == null ? void 0 : u.notification) == null ? void 0 : m.promotion) == null ? void 0 : b.mode) === Ao.LOWER_THIRD;
|
|
615
|
+
return /* @__PURE__ */ e(rn, {
|
|
616
|
+
ref: $,
|
|
466
617
|
style: {
|
|
467
|
-
height:
|
|
618
|
+
height: g ? "auto" : "100%"
|
|
468
619
|
},
|
|
469
|
-
className:
|
|
470
|
-
children: /* @__PURE__ */
|
|
471
|
-
skipTypeCheck:
|
|
620
|
+
className: S("SL-AdvertisementUIWrap", p && "mobile-view", y && "SL-AdvertisementUIWrap--lower-third"),
|
|
621
|
+
children: /* @__PURE__ */ e(an, {
|
|
622
|
+
skipTypeCheck: t,
|
|
472
623
|
sidebar: l,
|
|
473
|
-
banner:
|
|
474
|
-
advertisement:
|
|
475
|
-
close:
|
|
624
|
+
banner: r,
|
|
625
|
+
advertisement: I.data,
|
|
626
|
+
close: I.close,
|
|
627
|
+
externalAd: a ? I.externalAd : void 0,
|
|
476
628
|
markAsViewed: o.advertisement.markAsViewed,
|
|
477
629
|
open: o.advertisement.open,
|
|
478
|
-
layoutMode:
|
|
479
|
-
isNotification:
|
|
480
|
-
skipAutoClose: i
|
|
630
|
+
layoutMode: s,
|
|
631
|
+
isNotification: c,
|
|
632
|
+
skipAutoClose: i,
|
|
633
|
+
controlVideo: h
|
|
481
634
|
})
|
|
482
635
|
});
|
|
483
|
-
},
|
|
636
|
+
}, cn = ({
|
|
484
637
|
sdk: o,
|
|
485
|
-
sidebar:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
638
|
+
sidebar: s,
|
|
639
|
+
externalAd: i,
|
|
640
|
+
banner: t,
|
|
641
|
+
skipAutoClose: l,
|
|
642
|
+
skipTypeCheck: r,
|
|
643
|
+
layoutMode: c,
|
|
644
|
+
isMobileScreen: p,
|
|
645
|
+
persistent: v,
|
|
646
|
+
notification: a
|
|
493
647
|
}) => {
|
|
494
|
-
const
|
|
495
|
-
if (
|
|
496
|
-
|
|
648
|
+
const h = co(o.featuresList.getStore());
|
|
649
|
+
if (B(() => {
|
|
650
|
+
if (i) {
|
|
651
|
+
const m = document.createElement("script");
|
|
652
|
+
m.async = !0, m.src = "https://imasdk.googleapis.com/js/sdkloader/ima3.js", document.body.appendChild(m);
|
|
653
|
+
}
|
|
654
|
+
}, [i]), s && t)
|
|
655
|
+
return /* @__PURE__ */ e("div", {
|
|
497
656
|
style: {
|
|
498
657
|
color: "red"
|
|
499
658
|
},
|
|
500
659
|
children: "define either sidebar or banner, not both."
|
|
501
660
|
});
|
|
502
|
-
if (
|
|
661
|
+
if (t && i)
|
|
662
|
+
return /* @__PURE__ */ e("div", {
|
|
663
|
+
style: {
|
|
664
|
+
color: "red"
|
|
665
|
+
},
|
|
666
|
+
children: "externalAd is not supported with banner"
|
|
667
|
+
});
|
|
668
|
+
if (!h)
|
|
503
669
|
return null;
|
|
504
|
-
const
|
|
505
|
-
return
|
|
506
|
-
gamification:
|
|
507
|
-
sidebar:
|
|
508
|
-
banner:
|
|
509
|
-
layoutMode:
|
|
510
|
-
isMobileScreen:
|
|
511
|
-
persistent:
|
|
512
|
-
notification:
|
|
513
|
-
skipTypeCheck:
|
|
514
|
-
skipAutoClose:
|
|
670
|
+
const u = o.getFeature(Ro.GAMES);
|
|
671
|
+
return u ? /* @__PURE__ */ e(dn, {
|
|
672
|
+
gamification: u,
|
|
673
|
+
sidebar: s,
|
|
674
|
+
banner: t,
|
|
675
|
+
layoutMode: c,
|
|
676
|
+
isMobileScreen: p,
|
|
677
|
+
persistent: v,
|
|
678
|
+
notification: a,
|
|
679
|
+
skipTypeCheck: r,
|
|
680
|
+
skipAutoClose: l,
|
|
681
|
+
externalAd: i,
|
|
682
|
+
controlVideo: o.controlVideoPlayer
|
|
515
683
|
}) : null;
|
|
516
|
-
},
|
|
684
|
+
}, vn = ({
|
|
517
685
|
event: o,
|
|
518
|
-
sidebar:
|
|
686
|
+
sidebar: s,
|
|
519
687
|
banner: i,
|
|
520
|
-
isMobileScreen:
|
|
688
|
+
isMobileScreen: t,
|
|
521
689
|
skipAutoClose: l,
|
|
522
|
-
persistent:
|
|
523
|
-
theme:
|
|
524
|
-
notification:
|
|
525
|
-
skipTypeCheck:
|
|
690
|
+
persistent: r,
|
|
691
|
+
theme: c,
|
|
692
|
+
notification: p,
|
|
693
|
+
skipTypeCheck: v,
|
|
694
|
+
externalAd: a
|
|
526
695
|
}) => {
|
|
527
|
-
const
|
|
528
|
-
return
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
|
|
696
|
+
const h = Mo(), u = Oo(), m = Po();
|
|
697
|
+
return h ? a && !u.promotionExternalAd ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : !a && u.promotionExternalAd ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : s && !u.promotionSidebar ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : i && !u.promotionBanner ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : p && !u.promotionNotification ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : !i && !s && !p && !u.promotionOverlay ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : /* @__PURE__ */ A("div", { className: "StreamLayerSDK", children: [
|
|
698
|
+
/* @__PURE__ */ e(_o, { customTheme: c ?? m, children: /* @__PURE__ */ e(
|
|
699
|
+
cn,
|
|
531
700
|
{
|
|
532
|
-
sdk:
|
|
533
|
-
sidebar:
|
|
701
|
+
sdk: h,
|
|
702
|
+
sidebar: s,
|
|
534
703
|
banner: i,
|
|
535
|
-
isMobileScreen:
|
|
536
|
-
persistent:
|
|
537
|
-
notification:
|
|
538
|
-
skipTypeCheck:
|
|
704
|
+
isMobileScreen: t,
|
|
705
|
+
persistent: r,
|
|
706
|
+
notification: p,
|
|
707
|
+
skipTypeCheck: v,
|
|
539
708
|
skipAutoClose: l,
|
|
540
|
-
layoutMode: "side-by-side"
|
|
709
|
+
layoutMode: "side-by-side",
|
|
710
|
+
externalAd: a
|
|
541
711
|
}
|
|
542
712
|
) }),
|
|
543
|
-
o !== void 0 && /* @__PURE__ */
|
|
713
|
+
o !== void 0 && /* @__PURE__ */ e(T, { event: o })
|
|
544
714
|
] }) : null;
|
|
545
715
|
};
|
|
546
716
|
export {
|
|
547
|
-
|
|
548
|
-
|
|
717
|
+
vn as StreamLayerSDKAdvertisement,
|
|
718
|
+
cn as StreamLayerSDKAdvertisementUI
|
|
549
719
|
};
|