@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.
@@ -1,549 +1,719 @@
1
- import { jsx as s, jsxs as m, Fragment as io } from "react/jsx-runtime";
2
- import { useEffect as to, useRef as ao } from "react";
3
- import { f as C, s as n, c as ro, g as lo, X as co, h as M, a as Y, L as po, u as mo, i as uo, b as vo, S as b, d as Ao } from "./index2.js";
4
- import { N as h, a as Z, b as oo, C as so, c as no, P as g, d as $, A as Io, e as ho, S as go } from "./useStreamLayerApp2.js";
5
- const yo = /* @__PURE__ */ n("div")({
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
- }), bo = "a1rlj479", fo = "s35f1di", No = "sj4471g", $o = "b12050d8", Co = "b1d5ybek", To = (o) => o === "left" || o === "right" ? fo : $o, So = (o) => o === "left" || o === "right" ? No : Co, ko = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", L = ({
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: e,
11
+ style: s,
12
12
  className: i,
13
- enabled: r = !0,
13
+ enabled: t = !0,
14
14
  hiding: l,
15
- direction: a = "left",
16
- onAnimationEnd: d
17
- }) => /* @__PURE__ */ s(yo, {
18
- style: e,
19
- className: C(i, bo, ko(a), r && !l && To(a), r && l && So(a)),
20
- onAnimationEnd: d,
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
- }), Mo = /* @__PURE__ */ n("a")({
22
+ }), Wo = /* @__PURE__ */ n("a")({
23
23
  name: "Link",
24
24
  class: "l1sgte8c",
25
25
  propsAsIs: !1
26
- }), Lo = /* @__PURE__ */ n("div")({
26
+ }), Ho = /* @__PURE__ */ n("div")({
27
27
  name: "BannerContainer",
28
28
  class: "b7yfc72",
29
29
  propsAsIs: !1
30
- }), Oo = () => Mo, Bo = /* @__PURE__ */ n(Oo())({
30
+ }), Ko = () => Wo, Yo = /* @__PURE__ */ n(Ko())({
31
31
  name: "BannerLink",
32
32
  class: "bejjq94",
33
33
  propsAsIs: !0
34
- }), Eo = ({ promotion: o, promotionId: e, hiding: i, direction: r = "bottom" }) => {
35
- var l, a;
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 d = (a = o.banner) == null ? void 0 : a.url;
39
- return d && d.indexOf("http") !== 0 && (d = `https://${d}`), /* @__PURE__ */ s(L, { direction: r, hiding: i, children: /* @__PURE__ */ s(Lo, { className: "BannerContainer", children: /* @__PURE__ */ s(
40
- Bo,
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: d,
43
+ href: c,
44
44
  style: { backgroundImage: `url(${o.additionalBanner.imageUrl})` },
45
- "data-promo-id": e,
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
- }, _o = /* @__PURE__ */ n("div")({
51
+ }, Qo = /* @__PURE__ */ n("div")({
52
52
  name: "NotificationContent",
53
53
  class: "n18wsqoo",
54
54
  propsAsIs: !1
55
- }), Po = /* @__PURE__ */ n("div")({
55
+ }), Xo = /* @__PURE__ */ n("div")({
56
56
  name: "Body",
57
57
  class: "b1ia90c2",
58
58
  propsAsIs: !1
59
- }), xo = /* @__PURE__ */ n("div")({
59
+ }), Zo = /* @__PURE__ */ n("div")({
60
60
  name: "Title",
61
61
  class: "tg2z08v",
62
62
  propsAsIs: !1
63
- }), Ro = /* @__PURE__ */ n("div")({
63
+ }), oe = /* @__PURE__ */ n("div")({
64
64
  name: "Text",
65
65
  class: "t59zdk1",
66
66
  propsAsIs: !1
67
- }), O = /* @__PURE__ */ n("div")({
67
+ }), F = /* @__PURE__ */ n("div")({
68
68
  name: "MediaImgBottom",
69
69
  class: "m1ab9fq",
70
70
  propsAsIs: !1
71
- }), Do = () => O, qo = /* @__PURE__ */ n(Do())({
71
+ }), ee = () => F, ne = /* @__PURE__ */ n(ee())({
72
72
  name: "MediaImgMiddle",
73
73
  class: "m9fsr0y",
74
74
  propsAsIs: !0
75
- }), wo = /* @__PURE__ */ n("img")({
75
+ }), se = /* @__PURE__ */ n("img")({
76
76
  name: "CtaIcon",
77
77
  class: "cvi9y5q",
78
78
  propsAsIs: !1
79
- }), jo = /* @__PURE__ */ n("button")({
79
+ }), te = /* @__PURE__ */ n("button")({
80
80
  name: "Button",
81
81
  class: "bgl6boa",
82
82
  propsAsIs: !1
83
- }), Fo = /* @__PURE__ */ n("div")({
83
+ }), ie = /* @__PURE__ */ n("div")({
84
84
  name: "Logo",
85
85
  class: "l5mq0z",
86
86
  propsAsIs: !1
87
- }), Uo = /* @__PURE__ */ n("div")({
87
+ }), ae = /* @__PURE__ */ n("div")({
88
88
  name: "Footer",
89
89
  class: "f1mse0ft",
90
90
  propsAsIs: !1
91
- }), zo = /* @__PURE__ */ n("div")({
91
+ }), re = /* @__PURE__ */ n("div")({
92
92
  name: "Vector",
93
93
  class: "v1hcloah",
94
94
  propsAsIs: !1
95
- }), Vo = /* @__PURE__ */ n("div")({
95
+ }), le = /* @__PURE__ */ n("div")({
96
96
  name: "NotificationContainer",
97
97
  class: "n3n65jf",
98
98
  propsAsIs: !1
99
- }), Go = {
100
- [h.BOTTOM]: O,
101
- [h.MIDDLE]: qo
102
- }, Wo = ({ src: o, imagePosition: e }) => {
103
- const i = Go[e] || O;
104
- return /* @__PURE__ */ s(i, { children: /* @__PURE__ */ s("img", { src: o, alt: "" }) });
105
- }, Ho = ({ notification: o, open: e }) => {
106
- if (!o || !o.promotion || o.enabled !== Z.NOTIFICATION_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: r, image: l, promotion: a } = o, { sponsorLogo: d, sponsorLogoMode: c, imagePosition: u, ctaButton: t } = a;
109
- return /* @__PURE__ */ m(Vo, { className: "SL_Lower_Third_Notification", onClick: e, children: [
110
- /* @__PURE__ */ m(_o, { children: [
111
- /* @__PURE__ */ s(Wo, { src: l, imagePosition: u }),
112
- /* @__PURE__ */ m(Po, { children: [
113
- i && /* @__PURE__ */ s(xo, { children: i }),
114
- r && /* @__PURE__ */ s(Ro, { children: r })
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__ */ m(Uo, { children: [
118
- c !== oo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ m(io, { children: [
119
- /* @__PURE__ */ s(Fo, { children: /* @__PURE__ */ s("img", { src: d, alt: i }) }),
120
- /* @__PURE__ */ s(zo, {})
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__ */ m(jo, { name: "promo-button", style: { color: t == null ? void 0 : t.textColor, backgroundColor: t == null ? void 0 : t.color }, children: [
123
- (t == null ? void 0 : t.ctaIcon) && (t == null ? void 0 : t.ctaIconMode) === so.CTA_ICON_TRANSPARENT && /* @__PURE__ */ s(wo, { src: t == null ? void 0 : t.ctaIcon, alt: "cta-icon" }),
124
- (t == null ? void 0 : t.label) || "Open"
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
- }, Ko = /* @__PURE__ */ n("div")({
128
+ }, me = /* @__PURE__ */ n("div")({
129
129
  name: "NotificationContent",
130
130
  class: "n1ku6hz",
131
131
  propsAsIs: !1
132
- }), Xo = /* @__PURE__ */ n("div")({
132
+ }), ue = /* @__PURE__ */ n("div")({
133
133
  name: "NotificationContainer",
134
134
  class: "nbxqmol",
135
135
  propsAsIs: !1
136
- }), Jo = /* @__PURE__ */ n("div")({
136
+ }), Ae = /* @__PURE__ */ n("div")({
137
137
  name: "Body",
138
138
  class: "b1gu3eml",
139
139
  propsAsIs: !1
140
- }), Qo = /* @__PURE__ */ n("div")({
140
+ }), ve = /* @__PURE__ */ n("div")({
141
141
  name: "Title",
142
142
  class: "t1u17zva",
143
143
  propsAsIs: !1
144
- }), Yo = /* @__PURE__ */ n("div")({
144
+ }), he = /* @__PURE__ */ n("div")({
145
145
  name: "Text",
146
146
  class: "t10ko1g",
147
147
  propsAsIs: !1
148
- }), T = /* @__PURE__ */ n("div")({
148
+ }), R = /* @__PURE__ */ n("div")({
149
149
  name: "Media",
150
150
  class: "mntc42e",
151
151
  propsAsIs: !1
152
- }), Zo = () => T, K = /* @__PURE__ */ n(Zo())({
152
+ }), Ie = () => R, no = /* @__PURE__ */ n(Ie())({
153
153
  name: "MediaImgFit",
154
154
  class: "ml060eo",
155
155
  propsAsIs: !0
156
- }), os = () => T, eo = /* @__PURE__ */ n(os())({
156
+ }), ge = () => R, vo = /* @__PURE__ */ n(ge())({
157
157
  name: "MediaImgCentered",
158
158
  class: "m1vqlvig",
159
159
  propsAsIs: !0
160
- }), ss = () => eo, ns = /* @__PURE__ */ n(ss())({
160
+ }), ye = () => vo, be = /* @__PURE__ */ n(ye())({
161
161
  name: "MediaImgBottom",
162
162
  class: "m1e7tvi5",
163
163
  propsAsIs: !0
164
- }), es = () => T, is = /* @__PURE__ */ n(es())({
164
+ }), fe = () => R, Ne = /* @__PURE__ */ n(fe())({
165
165
  name: "MediaImgSolid",
166
166
  class: "mqvntt2",
167
167
  propsAsIs: !0
168
- }), ts = () => T, as = /* @__PURE__ */ n(ts())({
168
+ }), $e = () => R, Ce = /* @__PURE__ */ n($e())({
169
169
  name: "MediaImgMiddle",
170
170
  class: "m12jtj3u",
171
171
  propsAsIs: !0
172
- }), rs = /* @__PURE__ */ n("img")({
172
+ }), Te = /* @__PURE__ */ n("img")({
173
173
  name: "CtaIcon",
174
174
  class: "ckq1frv",
175
175
  propsAsIs: !1
176
- }), ls = /* @__PURE__ */ n("button")({
176
+ }), Ee = /* @__PURE__ */ n("button")({
177
177
  name: "Button",
178
178
  class: "bis90pl",
179
179
  propsAsIs: !1
180
- }), ds = () => ro, cs = /* @__PURE__ */ n(ds())({
180
+ }), Se = () => So, ke = /* @__PURE__ */ n(Se())({
181
181
  name: "StyledChevronRight",
182
182
  class: "s9mjmz3",
183
183
  propsAsIs: !0
184
- }), ps = /* @__PURE__ */ n("div")({
184
+ }), Le = /* @__PURE__ */ n("div")({
185
185
  name: "Logo",
186
186
  class: "l1cf50a7",
187
187
  propsAsIs: !1
188
- }), ms = {
189
- [h.UNSET]: K,
190
- [h.FIT]: K,
191
- [h.CENTERED]: eo,
192
- [h.BOTTOM]: ns,
193
- [h.SOLID]: is,
194
- [h.MIDDLE]: as
195
- }, us = ({ src: o, imagePosition: e }) => {
196
- const i = ms[e];
197
- return /* @__PURE__ */ s(i, { children: /* @__PURE__ */ s("img", { src: o, alt: "" }) });
198
- }, vs = ({ notification: o, open: e, promotionId: i, hiding: r, direction: l = "left" }) => {
199
- if (!o || !o.promotion || o.enabled !== Z.NOTIFICATION_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 === no.LOWER_THIRD)
202
- return /* @__PURE__ */ s(Ho, { notification: o, open: e });
203
- const { title: a, body: d, image: c, promotion: u } = o, { sponsorLogo: t, sponsorLogoMode: v, imagePosition: I, ctaButton: p } = u;
204
- return /* @__PURE__ */ s(L, { className: "SL_Rich_Notification", direction: l, hiding: r, children: /* @__PURE__ */ m(Xo, { onClick: e, children: [
205
- v !== oo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ s(ps, { children: /* @__PURE__ */ s("img", { src: t, alt: a }) }),
206
- /* @__PURE__ */ m(Ko, { children: [
207
- /* @__PURE__ */ s(us, { src: c, imagePosition: I }),
208
- /* @__PURE__ */ m(Jo, { children: [
209
- a && /* @__PURE__ */ s(Qo, { children: a }),
210
- d && /* @__PURE__ */ s(Yo, { children: d })
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__ */ m(ls, { name: "promo-button", style: { color: p == null ? void 0 : p.textColor, backgroundColor: p == null ? void 0 : p.color }, children: [
213
- (p == null ? void 0 : p.ctaIcon) && (p == null ? void 0 : p.ctaIconMode) === so.CTA_ICON_TRANSPARENT && /* @__PURE__ */ s(rs, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
214
- (p == null ? void 0 : p.label) || "Open"
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__ */ s(cs, { name: "chevronRight" })
216
+ /* @__PURE__ */ e(ke, { name: "chevronRight" })
217
217
  ] })
218
218
  ] }) });
219
- }, As = /* @__PURE__ */ n("div")({
219
+ }, _e = /* @__PURE__ */ n("div")({
220
220
  name: "OverlayContainer",
221
221
  class: "okzhq2w",
222
222
  propsAsIs: !1
223
- }), Is = /* @__PURE__ */ n("div")({
223
+ }), ho = /* @__PURE__ */ n("div")({
224
224
  name: "PromoOverlay",
225
225
  class: "pmgz5i",
226
226
  propsAsIs: !1
227
- }), hs = /* @__PURE__ */ n("div")({
227
+ }), Io = /* @__PURE__ */ n("div")({
228
228
  name: "Header",
229
229
  class: "hyxi3jt",
230
230
  propsAsIs: !1
231
- }), gs = /* @__PURE__ */ n("div")({
231
+ }), go = /* @__PURE__ */ n("div")({
232
232
  name: "HeaderContent",
233
233
  class: "h149e3gp",
234
234
  propsAsIs: !1
235
- }), ys = "h10toh7", X = /* @__PURE__ */ n("img")({
235
+ }), yo = "h10toh7", so = /* @__PURE__ */ n("img")({
236
236
  name: "SponsorLogo",
237
237
  class: "s1jyea6t",
238
238
  propsAsIs: !1
239
- }), bs = /* @__PURE__ */ n("div")({
239
+ }), Be = /* @__PURE__ */ n("div")({
240
240
  name: "SponsorName",
241
241
  class: "szpfa3h",
242
242
  propsAsIs: !1
243
- }), fs = /* @__PURE__ */ n("div")({
243
+ }), bo = /* @__PURE__ */ n("div")({
244
244
  name: "Media",
245
245
  class: "m1crmu01",
246
246
  propsAsIs: !1
247
- }), Ns = /* @__PURE__ */ n("img")({
247
+ }), xe = /* @__PURE__ */ n("img")({
248
248
  name: "PromoImg",
249
249
  class: "p1l37r8s",
250
250
  propsAsIs: !1
251
- }), $s = "s1nmch9k", J = /* @__PURE__ */ n("div")({
251
+ }), Re = "s1nmch9k", to = /* @__PURE__ */ n("div")({
252
252
  name: "Content",
253
253
  class: "c1er0ljd",
254
254
  propsAsIs: !1
255
- }), Cs = /* @__PURE__ */ n("div")({
255
+ }), De = /* @__PURE__ */ n("div")({
256
256
  name: "Description",
257
257
  class: "dydopmr",
258
258
  propsAsIs: !1
259
- }), Ts = /* @__PURE__ */ n("div")({
259
+ }), qe = /* @__PURE__ */ n("div")({
260
260
  name: "Sponsor",
261
261
  class: "s1w6nt04",
262
262
  propsAsIs: !1
263
- }), Ss = /* @__PURE__ */ n("div")({
263
+ }), we = /* @__PURE__ */ n("div")({
264
264
  name: "SponsorText",
265
265
  class: "s1evcmtq",
266
266
  propsAsIs: !1
267
- }), ks = /* @__PURE__ */ n("div")({
267
+ }), fo = /* @__PURE__ */ n("div")({
268
268
  name: "ADLogo",
269
269
  class: "awodx0x",
270
270
  propsAsIs: !1
271
- }), Ms = /* @__PURE__ */ n("span")({
271
+ }), Ve = /* @__PURE__ */ n("span")({
272
272
  name: "SponsoredText",
273
273
  class: "s1q3n6oi",
274
274
  propsAsIs: !1
275
- }), Ls = /* @__PURE__ */ n("div")({
275
+ }), je = /* @__PURE__ */ n("div")({
276
276
  name: "ActionBtnWrap",
277
277
  class: "a8d4xfk",
278
278
  propsAsIs: !1
279
- }), Os = /* @__PURE__ */ n("a")({
279
+ }), Ue = /* @__PURE__ */ n("a")({
280
280
  name: "ActionButton",
281
281
  class: "at6oobh",
282
282
  propsAsIs: !1
283
- }), Bs = /* @__PURE__ */ n("div")({
283
+ }), Fe = /* @__PURE__ */ n("div")({
284
284
  name: "Title",
285
285
  class: "t1gyg7tt",
286
286
  propsAsIs: !1
287
- }), Es = "h17rwbtk", Q = ({ promotion: o, skipAutoClose: e, promotionId: i, onClose: r, markAsViewed: l }) => {
288
- var a, d, c, u, t, v, I, p, A, f, N, B, E, _, P, x, R, D, q, w, j, F, U, z, V, G, W, H;
289
- const S = o.type === g.INGAME_IAB11_LBAR || o.type === g.INGAME_IAB11, k = ((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode === $.CENTER;
290
- to(() => {
291
- i && o.type && l && l();
292
- }, [i, o.type, l]);
293
- let y = (d = o.banner) == null ? void 0 : d.url;
294
- return y && y.indexOf("http") !== 0 && (y = `https://${y}`), /* @__PURE__ */ m(Is, { className: "PromoOverlay", children: [
295
- /* @__PURE__ */ m(hs, { children: [
296
- /* @__PURE__ */ m(gs, { className: C(!k && ys), children: [
297
- ((c = o.sponsor) == null ? void 0 : c.logo) && o.logoMode === $.LEFT && /* @__PURE__ */ s(X, { src: (u = o.sponsor) == null ? void 0 : u.logo, alt: "promo" }),
298
- /* @__PURE__ */ m(
299
- Ts,
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: (t = o.sponsor) != null && t.logo && o.logoMode === $.LEFT ? "0px" : "8px"
440
+ paddingLeft: (p = d.sponsor) != null && p.logo && d.logoMode === M.LEFT ? "0px" : "8px"
303
441
  },
304
442
  children: [
305
- ((v = o.sponsor) == null ? void 0 : v.logo) && o.logoMode === $.LEFT && /* @__PURE__ */ s(bs, { children: (I = o.sponsor) == null ? void 0 : I.name }),
306
- /* @__PURE__ */ m(Ss, { className: "SponsorText", children: [
307
- /* @__PURE__ */ s(ks, { children: "AD" }),
308
- /* @__PURE__ */ s(Ms, { children: "SPONSORED" })
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__ */ s(
452
+ /* @__PURE__ */ e(
315
453
  lo,
316
454
  {
317
455
  className: "ClosePromoIcon",
318
- close: r,
319
- autoClose: (p = o.closeTimer) == null ? void 0 : p.auto,
320
- duration: e ? 0 : (A = o.closeTimer) == null ? void 0 : A.seconds
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__ */ m(fs, { children: [
325
- k && /* @__PURE__ */ s(X, { className: $s, src: (f = o.sponsor) == null ? void 0 : f.logo, alt: "promo" }),
326
- /* @__PURE__ */ s(J, { children: (B = (N = o.banner) == null ? void 0 : N.video) != null && B.url ? /* @__PURE__ */ s(
327
- co,
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: (_ = (E = o.banner) == null ? void 0 : E.video) == null ? void 0 : _.url,
330
- poster: (x = (P = o.banner) == null ? void 0 : P.video) == null ? void 0 : x.thumbnailUrl,
331
- aspectRatio: S ? "1/1" : "16/9",
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
- M.emit("advertisement", {
475
+ x.emit("advertisement", {
334
476
  action: "videoPlay",
335
477
  payload: {
336
- id: i,
337
- type: o.type
478
+ id: _,
479
+ type: d.type
338
480
  }
339
- });
481
+ }), eo(!0);
340
482
  },
341
- autoPlay: o.autoPlayVideo === Io.ENABLED
483
+ controlVideo: P,
484
+ autoPlay: V
342
485
  }
343
- ) : (R = o.banner) != null && R.imageUrl ? /* @__PURE__ */ s(Ns, { style: S ? { aspectRatio: "1/1" } : {}, src: (D = o.banner) == null ? void 0 : D.imageUrl, alt: "promo" }) : null }),
344
- !S && /* @__PURE__ */ m(J, { children: [
345
- ((q = o.banner) == null ? void 0 : q.title) && /* @__PURE__ */ s(Bs, { className: C("AdvTitle", k && Es), children: (w = o.banner) == null ? void 0 : w.title }),
346
- ((j = o.banner) == null ? void 0 : j.body) && /* @__PURE__ */ s(Cs, { className: "AdvDescription", children: (F = o.banner) == null ? void 0 : F.body })
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
- o.buttonType !== ho.NO_BUTTON && /* @__PURE__ */ s(Ls, { children: /* @__PURE__ */ s(
350
- Os,
492
+ d.buttonType !== xo.NO_BUTTON && /* @__PURE__ */ e(je, { children: /* @__PURE__ */ e(
493
+ Ue,
351
494
  {
352
- href: y,
495
+ href: k,
353
496
  style: {
354
- backgroundColor: ((z = (U = o.banner) == null ? void 0 : U.ctaButton) == null ? void 0 : z.color) || "#009dc4",
355
- color: ((G = (V = o.banner) == null ? void 0 : V.ctaButton) == null ? void 0 : G.textColor) || "#fff"
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": i,
359
- "data-promo-type": o.type,
501
+ "data-promo-id": _,
502
+ "data-promo-type": d.type,
360
503
  target: "_blank",
361
- children: (H = (W = o.banner) == null ? void 0 : W.ctaButton) == null ? void 0 : H.label
504
+ children: (Z = (X = d.banner) == null ? void 0 : X.ctaButton) == null ? void 0 : Z.label
362
505
  }
363
506
  ) })
364
507
  ] });
365
- }, _s = /* @__PURE__ */ n("div")({
508
+ }, en = /* @__PURE__ */ n("div")({
366
509
  name: "SidebarContainer",
367
510
  class: "s1abskp8",
368
511
  propsAsIs: !1
369
- }), Ps = ({
512
+ }), nn = ({
370
513
  children: o,
371
- direction: e,
514
+ direction: s,
372
515
  style: i,
373
- className: r,
516
+ className: t,
374
517
  hiding: l
375
- }) => /* @__PURE__ */ s(L, {
376
- direction: e,
518
+ }) => /* @__PURE__ */ e(U, {
519
+ direction: s,
377
520
  style: i,
378
521
  hiding: l,
379
- className: r,
380
- children: /* @__PURE__ */ s(_s, {
522
+ className: t,
523
+ children: /* @__PURE__ */ e(en, {
381
524
  children: o
382
525
  })
383
- }), xs = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === g.INGAME_IAB21_LBAR, Rs = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11 || (o == null ? void 0 : o.type) === g.INGAME_IAB21, Ds = ({
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: e,
528
+ close: s,
386
529
  skipTypeCheck: i,
387
- skipAutoClose: r,
530
+ skipAutoClose: t,
388
531
  layoutMode: l = "side-by-side",
389
- sidebar: a,
390
- isNotification: d,
391
- banner: c,
392
- markAsViewed: u,
393
- open: t
394
- }) => o.promotion ? d && o.notification ? /* @__PURE__ */ s(vs, { open: t, notification: o.notification, promotionId: o.question.id }) : !a && !c && (i || Rs(o.promotion)) ? /* @__PURE__ */ s(As, { className: "PromoOverlayContainer", children: /* @__PURE__ */ s(
395
- Q,
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: u,
542
+ markAsViewed: v,
398
543
  promotionId: o.question.id,
399
544
  promotion: o.promotion,
400
- onClose: e,
401
- skipAutoClose: r
545
+ onClose: s,
546
+ skipAutoClose: t,
547
+ externalAd: h,
548
+ controlVideo: u
402
549
  }
403
- ) }) : a && (i || xs(o.promotion)) ? /* @__PURE__ */ s(Ps, { className: "PromoSidebarContainer", direction: a, hiding: !1, children: /* @__PURE__ */ s(
404
- Q,
550
+ ) }) : r && (i || sn(o.promotion)) ? /* @__PURE__ */ e(nn, { className: "PromoSidebarContainer", direction: r, hiding: !1, children: /* @__PURE__ */ e(
551
+ ao,
405
552
  {
406
- markAsViewed: u,
553
+ markAsViewed: v,
407
554
  promotionId: o.question.id,
408
555
  promotion: o.promotion,
409
- onClose: e,
410
- skipAutoClose: r
556
+ externalAd: h,
557
+ onClose: s,
558
+ controlVideo: u,
559
+ skipAutoClose: t
411
560
  }
412
- ) }) : c ? /* @__PURE__ */ s(
413
- Eo,
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: c
567
+ direction: p
419
568
  }
420
- ) : null : null, qs = /* @__PURE__ */ n("div")({
569
+ ) : null : null, rn = /* @__PURE__ */ n("div")({
421
570
  name: "AdvertisementUIWrap",
422
571
  class: "aa6pjif",
423
572
  propsAsIs: !1
424
- }), ws = (o) => {
425
- const e = o.target;
426
- if (e instanceof HTMLAnchorElement && e.target === "_blank") {
427
- const i = e.getAttribute("data-promo-id") || "", r = e.getAttribute("data-promo-type") || g.UNSET;
428
- e.getAttribute("data-analytics") === "button" && M.emit("advertisement", {
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: r
581
+ type: t
433
582
  }
434
- }), e.getAttribute("data-analytics") === "banner" && M.emit("advertisement", {
583
+ }), s.getAttribute("data-analytics") === "banner" && x.emit("advertisement", {
435
584
  action: "bannerSelect",
436
585
  payload: {
437
586
  id: i,
438
- type: r
587
+ type: t
439
588
  }
440
589
  });
441
590
  }
442
- }, js = ({
591
+ }, dn = ({
443
592
  gamification: o,
444
- layoutMode: e,
593
+ layoutMode: s,
445
594
  skipAutoClose: i,
446
- skipTypeCheck: r,
595
+ skipTypeCheck: t,
447
596
  sidebar: l,
448
- banner: a,
449
- notification: d,
450
- isMobileScreen: c,
451
- persistent: u
597
+ banner: r,
598
+ notification: c,
599
+ isMobileScreen: p,
600
+ persistent: v,
601
+ externalAd: a,
602
+ controlVideo: h
452
603
  }) => {
453
- var t, v, I;
454
- const p = ao(null), A = Y(o.advertisement.$store);
455
- po(p, {
456
- enabled: !!A.data,
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: ws
609
+ listener: ln
459
610
  });
460
- const f = !a && !l;
461
- if (A.data === void 0 || !u && A.isViewed)
611
+ const g = !r && !l;
612
+ if (I.data === void 0 || !v && I.isViewed)
462
613
  return null;
463
- const N = ((I = (v = (t = A == null ? void 0 : A.data) == null ? void 0 : t.notification) == null ? void 0 : v.promotion) == null ? void 0 : I.mode) === no.LOWER_THIRD;
464
- return /* @__PURE__ */ s(qs, {
465
- ref: p,
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: f ? "auto" : "100%"
618
+ height: g ? "auto" : "100%"
468
619
  },
469
- className: C("SL-AdvertisementUIWrap", c && "mobile-view", N && "SL-AdvertisementUIWrap--lower-third"),
470
- children: /* @__PURE__ */ s(Ds, {
471
- skipTypeCheck: r,
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: a,
474
- advertisement: A.data,
475
- close: A.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: e,
479
- isNotification: d,
480
- skipAutoClose: i
630
+ layoutMode: s,
631
+ isNotification: c,
632
+ skipAutoClose: i,
633
+ controlVideo: h
481
634
  })
482
635
  });
483
- }, Fs = ({
636
+ }, cn = ({
484
637
  sdk: o,
485
- sidebar: e,
486
- banner: i,
487
- skipAutoClose: r,
488
- skipTypeCheck: l,
489
- layoutMode: a,
490
- isMobileScreen: d,
491
- persistent: c,
492
- notification: u
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 t = Y(o.featuresList.getStore());
495
- if (e && i)
496
- return /* @__PURE__ */ s("div", {
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 (!t)
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 v = o.getFeature(go.GAMES);
505
- return v ? /* @__PURE__ */ s(js, {
506
- gamification: v,
507
- sidebar: e,
508
- banner: i,
509
- layoutMode: a,
510
- isMobileScreen: d,
511
- persistent: c,
512
- notification: u,
513
- skipTypeCheck: l,
514
- skipAutoClose: r
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
- }, Ws = ({
684
+ }, vn = ({
517
685
  event: o,
518
- sidebar: e,
686
+ sidebar: s,
519
687
  banner: i,
520
- isMobileScreen: r,
688
+ isMobileScreen: t,
521
689
  skipAutoClose: l,
522
- persistent: a,
523
- theme: d,
524
- notification: c,
525
- skipTypeCheck: u
690
+ persistent: r,
691
+ theme: c,
692
+ notification: p,
693
+ skipTypeCheck: v,
694
+ externalAd: a
526
695
  }) => {
527
- const t = mo(), v = uo(), I = vo();
528
- return t ? e && !v.promotionSidebar ? o !== void 0 && /* @__PURE__ */ s(b, { event: o }) : i && !v.promotionBanner ? o !== void 0 && /* @__PURE__ */ s(b, { event: o }) : c && !v.promotionNotification ? o !== void 0 && /* @__PURE__ */ s(b, { event: o }) : !i && !e && !c && !v.promotionOverlay ? o !== void 0 && /* @__PURE__ */ s(b, { event: o }) : /* @__PURE__ */ m("div", { className: "StreamLayerSDK", children: [
529
- /* @__PURE__ */ s(Ao, { customTheme: d ?? I, children: /* @__PURE__ */ s(
530
- Fs,
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: t,
533
- sidebar: e,
701
+ sdk: h,
702
+ sidebar: s,
534
703
  banner: i,
535
- isMobileScreen: r,
536
- persistent: a,
537
- notification: c,
538
- skipTypeCheck: u,
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__ */ s(b, { event: o })
713
+ o !== void 0 && /* @__PURE__ */ e(T, { event: o })
544
714
  ] }) : null;
545
715
  };
546
716
  export {
547
- Ws as StreamLayerSDKAdvertisement,
548
- Fs as StreamLayerSDKAdvertisementUI
717
+ vn as StreamLayerSDKAdvertisement,
718
+ cn as StreamLayerSDKAdvertisementUI
549
719
  };