@streamlayer/react 1.5.2 → 1.7.0

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,427 +1,549 @@
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")({
1
+ import { jsx as n, jsxs as m, Fragment as eo } from "react/jsx-runtime";
2
+ import { useEffect as io, useRef as to } from "react";
3
+ import { f as $, s, c as ao, g as lo, X as ro, h as k, a as Q, L as co, u as po, i as mo, b as uo, d as vo, S as Ao } from "./index2.js";
4
+ import { N as h, a as Y, b as Z, C as oo, c as no, P as g, d as N, A as Io, e as ho, S as go } from "./useStreamLayerApp2.js";
5
+ const yo = /* @__PURE__ */ s("div")({
6
6
  name: "Container",
7
7
  class: "c5b6wdg",
8
8
  propsAsIs: !1
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", $ = ({
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", M = ({
10
10
  children: o,
11
- style: s,
12
- className: t,
13
- enabled: i = !0,
14
- hiding: a,
15
- direction: r = "left",
16
- onAnimationEnd: l
17
- }) => /* @__PURE__ */ n(to, {
18
- style: s,
19
- className: f(t, io, vo(r), i && !a && mo(r), i && a && uo(r)),
20
- onAnimationEnd: l,
11
+ style: e,
12
+ className: i,
13
+ enabled: l = !0,
14
+ hiding: r,
15
+ direction: a = "left",
16
+ onAnimationEnd: d
17
+ }) => /* @__PURE__ */ n(yo, {
18
+ style: e,
19
+ className: $(i, bo, ko(a), l && !r && To(a), l && r && So(a)),
20
+ onAnimationEnd: d,
21
21
  children: o
22
- }), Io = /* @__PURE__ */ e("a")({
22
+ }), Mo = /* @__PURE__ */ s("a")({
23
23
  name: "Link",
24
24
  class: "l1sgte8c",
25
25
  propsAsIs: !1
26
- }), go = /* @__PURE__ */ e("div")({
26
+ }), Lo = /* @__PURE__ */ s("div")({
27
27
  name: "BannerContainer",
28
28
  class: "b7yfc72",
29
29
  propsAsIs: !1
30
- }), ho = () => Io, bo = /* @__PURE__ */ e(ho())({
30
+ }), Oo = () => Mo, Bo = /* @__PURE__ */ s(Oo())({
31
31
  name: "BannerLink",
32
32
  class: "bejjq94",
33
33
  propsAsIs: !0
34
- }), Ao = ({ promotion: o, promotionId: s, hiding: t, direction: i = "bottom" }) => {
35
- var a;
36
- return (a = o.additionalBanner) != null && a.imageUrl ? /* @__PURE__ */ n($, { direction: i, hiding: t, children: /* @__PURE__ */ n(go, { className: "BannerContainer", children: /* @__PURE__ */ n(
37
- bo,
34
+ }), Eo = ({ promotion: o, promotionId: e, hiding: i, direction: l = "bottom" }) => {
35
+ var r, a;
36
+ if (!((r = o.additionalBanner) != null && r.imageUrl))
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__ */ n(M, { direction: l, hiding: i, children: /* @__PURE__ */ n(Lo, { className: "BannerContainer", children: /* @__PURE__ */ n(
40
+ Bo,
38
41
  {
39
42
  className: "BannerLink",
40
- href: o.additionalBanner.url,
43
+ href: d,
41
44
  style: { backgroundImage: `url(${o.additionalBanner.imageUrl})` },
42
- "data-promo-id": s,
45
+ "data-promo-id": e,
43
46
  "data-promo-type": o.type,
44
47
  "data-analytics": "banner",
45
48
  target: "_blank"
46
49
  }
47
- ) }) }) : null;
48
- }, yo = /* @__PURE__ */ e("div")({
50
+ ) }) });
51
+ }, _o = /* @__PURE__ */ s("div")({
52
+ name: "NotificationContent",
53
+ class: "n18wsqoo",
54
+ propsAsIs: !1
55
+ }), Po = /* @__PURE__ */ s("div")({
56
+ name: "Body",
57
+ class: "b1ia90c2",
58
+ propsAsIs: !1
59
+ }), xo = /* @__PURE__ */ s("div")({
60
+ name: "Title",
61
+ class: "tg2z08v",
62
+ propsAsIs: !1
63
+ }), Ro = /* @__PURE__ */ s("div")({
64
+ name: "Text",
65
+ class: "t59zdk1",
66
+ propsAsIs: !1
67
+ }), L = /* @__PURE__ */ s("div")({
68
+ name: "MediaImgBottom",
69
+ class: "m1ab9fq",
70
+ propsAsIs: !1
71
+ }), Do = () => L, qo = /* @__PURE__ */ s(Do())({
72
+ name: "MediaImgMiddle",
73
+ class: "m9fsr0y",
74
+ propsAsIs: !0
75
+ }), wo = /* @__PURE__ */ s("img")({
76
+ name: "CtaIcon",
77
+ class: "cvi9y5q",
78
+ propsAsIs: !1
79
+ }), jo = /* @__PURE__ */ s("button")({
80
+ name: "Button",
81
+ class: "bgl6boa",
82
+ propsAsIs: !1
83
+ }), Fo = /* @__PURE__ */ s("div")({
84
+ name: "Logo",
85
+ class: "l5mq0z",
86
+ propsAsIs: !1
87
+ }), Uo = /* @__PURE__ */ s("div")({
88
+ name: "Footer",
89
+ class: "f1mse0ft",
90
+ propsAsIs: !1
91
+ }), zo = /* @__PURE__ */ s("div")({
92
+ name: "Vector",
93
+ class: "v1hcloah",
94
+ propsAsIs: !1
95
+ }), Vo = /* @__PURE__ */ s("div")({
96
+ name: "NotificationContainer",
97
+ class: "n3n65jf",
98
+ propsAsIs: !1
99
+ }), Go = {
100
+ [h.BOTTOM]: L,
101
+ [h.MIDDLE]: qo
102
+ }, Wo = ({ src: o, imagePosition: e }) => {
103
+ const i = Go[e] || L;
104
+ return /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n("img", { src: o, alt: "" }) });
105
+ }, Ho = ({ notification: o, open: e }) => {
106
+ if (!o || !o.promotion || o.enabled !== Y.NOTIFICATION_ENABLED)
107
+ return null;
108
+ const { title: i, body: l, image: r, 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__ */ n(Wo, { src: r, imagePosition: u }),
112
+ /* @__PURE__ */ m(Po, { children: [
113
+ i && /* @__PURE__ */ n(xo, { children: i }),
114
+ l && /* @__PURE__ */ n(Ro, { children: l })
115
+ ] })
116
+ ] }),
117
+ /* @__PURE__ */ m(Uo, { children: [
118
+ c !== Z.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ m(eo, { children: [
119
+ /* @__PURE__ */ n(Fo, { children: /* @__PURE__ */ n("img", { src: d, alt: i }) }),
120
+ /* @__PURE__ */ n(zo, {})
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) === oo.CTA_ICON_TRANSPARENT && /* @__PURE__ */ n(wo, { src: t == null ? void 0 : t.ctaIcon, alt: "cta-icon" }),
124
+ (t == null ? void 0 : t.label) || "Open"
125
+ ] })
126
+ ] })
127
+ ] });
128
+ }, Ko = /* @__PURE__ */ s("div")({
49
129
  name: "NotificationContent",
50
130
  class: "n1ku6hz",
51
131
  propsAsIs: !1
52
- }), fo = /* @__PURE__ */ e("div")({
132
+ }), Xo = /* @__PURE__ */ s("div")({
53
133
  name: "NotificationContainer",
54
134
  class: "nbxqmol",
55
135
  propsAsIs: !1
56
- }), No = /* @__PURE__ */ e("div")({
136
+ }), Jo = /* @__PURE__ */ s("div")({
57
137
  name: "Body",
58
138
  class: "b1gu3eml",
59
139
  propsAsIs: !1
60
- }), $o = /* @__PURE__ */ e("div")({
140
+ }), Qo = /* @__PURE__ */ s("div")({
61
141
  name: "Title",
62
142
  class: "t1u17zva",
63
143
  propsAsIs: !1
64
- }), Co = /* @__PURE__ */ e("div")({
144
+ }), Yo = /* @__PURE__ */ s("div")({
65
145
  name: "Text",
66
146
  class: "t10ko1g",
67
147
  propsAsIs: !1
68
- }), b = /* @__PURE__ */ e("div")({
148
+ }), C = /* @__PURE__ */ s("div")({
69
149
  name: "Media",
70
150
  class: "mntc42e",
71
151
  propsAsIs: !1
72
- }), So = () => b, w = /* @__PURE__ */ e(So())({
152
+ }), Zo = () => C, H = /* @__PURE__ */ s(Zo())({
73
153
  name: "MediaImgFit",
74
154
  class: "ml060eo",
75
155
  propsAsIs: !0
76
- }), To = () => b, W = /* @__PURE__ */ e(To())({
156
+ }), on = () => C, so = /* @__PURE__ */ s(on())({
77
157
  name: "MediaImgCentered",
78
158
  class: "m1vqlvig",
79
159
  propsAsIs: !0
80
- }), Mo = () => W, ko = /* @__PURE__ */ e(Mo())({
160
+ }), nn = () => so, sn = /* @__PURE__ */ s(nn())({
81
161
  name: "MediaImgBottom",
82
162
  class: "m1e7tvi5",
83
163
  propsAsIs: !0
84
- }), Bo = () => b, Lo = /* @__PURE__ */ e(Bo())({
164
+ }), en = () => C, tn = /* @__PURE__ */ s(en())({
85
165
  name: "MediaImgSolid",
86
166
  class: "mqvntt2",
87
167
  propsAsIs: !0
88
- }), Eo = () => b, Oo = /* @__PURE__ */ e(Eo())({
168
+ }), an = () => C, ln = /* @__PURE__ */ s(an())({
89
169
  name: "MediaImgMiddle",
90
170
  class: "m12jtj3u",
91
171
  propsAsIs: !0
92
- }), xo = /* @__PURE__ */ e("img")({
172
+ }), rn = /* @__PURE__ */ s("img")({
93
173
  name: "CtaIcon",
94
174
  class: "ckq1frv",
95
175
  propsAsIs: !1
96
- }), _o = /* @__PURE__ */ e("button")({
176
+ }), dn = /* @__PURE__ */ s("button")({
97
177
  name: "Button",
98
178
  class: "bis90pl",
99
179
  propsAsIs: !1
100
- }), Po = () => K, jo = /* @__PURE__ */ e(Po())({
180
+ }), cn = () => ao, pn = /* @__PURE__ */ s(cn())({
101
181
  name: "StyledChevronRight",
102
182
  class: "s9mjmz3",
103
183
  propsAsIs: !0
104
- }), qo = /* @__PURE__ */ e("div")({
184
+ }), mn = /* @__PURE__ */ s("div")({
105
185
  name: "Logo",
106
186
  class: "l1cf50a7",
107
187
  propsAsIs: !1
108
- }), Do = {
109
- [g.UNSET]: w,
110
- [g.FIT]: w,
111
- [g.CENTERED]: W,
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)
188
+ }), un = {
189
+ [h.UNSET]: H,
190
+ [h.FIT]: H,
191
+ [h.CENTERED]: so,
192
+ [h.BOTTOM]: sn,
193
+ [h.SOLID]: tn,
194
+ [h.MIDDLE]: ln
195
+ }, vn = ({ src: o, imagePosition: e }) => {
196
+ const i = un[e];
197
+ return /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n("img", { src: o, alt: "" }) });
198
+ }, An = ({ notification: o, open: e, promotionId: i, hiding: l, direction: r = "left" }) => {
199
+ if (!o || !o.promotion || o.enabled !== Y.NOTIFICATION_ENABLED)
120
200
  return null;
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 })
201
+ if (o.promotion.mode === no.LOWER_THIRD)
202
+ return /* @__PURE__ */ n(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__ */ n(M, { className: "SL_Rich_Notification", direction: r, hiding: l, children: /* @__PURE__ */ m(Xo, { onClick: e, children: [
205
+ v !== Z.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ n(mn, { children: /* @__PURE__ */ n("img", { src: t, alt: a }) }),
206
+ /* @__PURE__ */ m(Ko, { children: [
207
+ /* @__PURE__ */ n(vn, { src: c, imagePosition: I }),
208
+ /* @__PURE__ */ m(Jo, { children: [
209
+ a && /* @__PURE__ */ n(Qo, { children: a }),
210
+ d && /* @__PURE__ */ n(Yo, { children: d })
129
211
  ] }),
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" }),
132
- (d == null ? void 0 : d.label) || "Open"
212
+ /* @__PURE__ */ m(dn, { 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) === oo.CTA_ICON_TRANSPARENT && /* @__PURE__ */ n(rn, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
214
+ (p == null ? void 0 : p.label) || "Open"
133
215
  ] }),
134
- /* @__PURE__ */ n(jo, { name: "chevronRight" })
216
+ /* @__PURE__ */ n(pn, { name: "chevronRight" })
135
217
  ] })
136
218
  ] }) });
137
- }, wo = /* @__PURE__ */ e("div")({
219
+ }, In = /* @__PURE__ */ s("div")({
138
220
  name: "OverlayContainer",
139
221
  class: "okzhq2w",
140
222
  propsAsIs: !1
141
- }), Fo = /* @__PURE__ */ e("div")({
223
+ }), hn = /* @__PURE__ */ s("div")({
142
224
  name: "PromoOverlay",
143
225
  class: "pmgz5i",
144
226
  propsAsIs: !1
145
- }), Go = /* @__PURE__ */ e("div")({
227
+ }), gn = /* @__PURE__ */ s("div")({
146
228
  name: "Header",
147
229
  class: "hyxi3jt",
148
230
  propsAsIs: !1
149
- }), zo = /* @__PURE__ */ e("div")({
231
+ }), yn = /* @__PURE__ */ s("div")({
150
232
  name: "HeaderContent",
151
233
  class: "h149e3gp",
152
234
  propsAsIs: !1
153
- }), Ko = "h10toh7", F = /* @__PURE__ */ e("img")({
235
+ }), bn = "h10toh7", K = /* @__PURE__ */ s("img")({
154
236
  name: "SponsorLogo",
155
237
  class: "s1jyea6t",
156
238
  propsAsIs: !1
157
- }), Ho = /* @__PURE__ */ e("div")({
239
+ }), fn = /* @__PURE__ */ s("div")({
158
240
  name: "SponsorName",
159
241
  class: "szpfa3h",
160
242
  propsAsIs: !1
161
- }), Wo = /* @__PURE__ */ e("div")({
243
+ }), Nn = /* @__PURE__ */ s("div")({
162
244
  name: "Media",
163
245
  class: "m1crmu01",
164
246
  propsAsIs: !1
165
- }), Qo = /* @__PURE__ */ e("img")({
247
+ }), $n = /* @__PURE__ */ s("img")({
166
248
  name: "PromoImg",
167
249
  class: "p1l37r8s",
168
250
  propsAsIs: !1
169
- }), Vo = "s1nmch9k", G = /* @__PURE__ */ e("div")({
251
+ }), Cn = "s1nmch9k", X = /* @__PURE__ */ s("div")({
170
252
  name: "Content",
171
253
  class: "c1er0ljd",
172
254
  propsAsIs: !1
173
- }), Jo = /* @__PURE__ */ e("div")({
255
+ }), Tn = /* @__PURE__ */ s("div")({
174
256
  name: "Description",
175
257
  class: "dydopmr",
176
258
  propsAsIs: !1
177
- }), Xo = /* @__PURE__ */ e("div")({
259
+ }), Sn = /* @__PURE__ */ s("div")({
178
260
  name: "Sponsor",
179
261
  class: "s1w6nt04",
180
262
  propsAsIs: !1
181
- }), Yo = /* @__PURE__ */ e("div")({
263
+ }), kn = /* @__PURE__ */ s("div")({
182
264
  name: "SponsorText",
183
265
  class: "s1evcmtq",
184
266
  propsAsIs: !1
185
- }), Zo = /* @__PURE__ */ e("div")({
267
+ }), Mn = /* @__PURE__ */ s("div")({
186
268
  name: "ADLogo",
187
269
  class: "awodx0x",
188
270
  propsAsIs: !1
189
- }), on = /* @__PURE__ */ e("span")({
271
+ }), Ln = /* @__PURE__ */ s("span")({
190
272
  name: "SponsoredText",
191
273
  class: "s1q3n6oi",
192
274
  propsAsIs: !1
193
- }), nn = /* @__PURE__ */ e("div")({
194
- name: "CloseIconWrap",
195
- class: "c8d4xfk",
196
- propsAsIs: !1
197
- }), en = () => K, sn = /* @__PURE__ */ e(en())({
198
- name: "CloseIcon",
199
- class: "ct6oobh",
200
- propsAsIs: !0
201
- }), an = /* @__PURE__ */ e("div")({
275
+ }), On = /* @__PURE__ */ s("div")({
202
276
  name: "ActionBtnWrap",
203
- class: "a1gyg7tt",
277
+ class: "a8d4xfk",
204
278
  propsAsIs: !1
205
- }), tn = /* @__PURE__ */ e("a")({
279
+ }), Bn = /* @__PURE__ */ s("a")({
206
280
  name: "ActionButton",
207
- class: "a17rwbtk",
281
+ class: "at6oobh",
208
282
  propsAsIs: !1
209
- }), rn = /* @__PURE__ */ e("div")({
283
+ }), En = /* @__PURE__ */ s("div")({
210
284
  name: "Title",
211
- class: "t3vxzaw",
212
- propsAsIs: !1
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,
285
+ class: "t1gyg7tt",
286
+ propsAsIs: !1
287
+ }), _n = "h17rwbtk", J = ({ promotion: o, skipAutoClose: e, promotionId: i, onClose: l, markAsViewed: r }) => {
288
+ var a, d, c, u, t, v, I, p, A, b, f, O, B, E, _, P, x, R, D, q, w, j, F, U, z, V, G, W;
289
+ const T = o.type === g.INGAME_IAB11_LBAR || o.type === g.INGAME_IAB11, S = ((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode === N.CENTER;
290
+ io(() => {
291
+ i && o.type && r && r();
292
+ }, [i, o.type, r]);
293
+ let y = (d = o.banner) == null ? void 0 : d.url;
294
+ return y && y.indexOf("http") !== 0 && (y = `https://${y}`), /* @__PURE__ */ m(hn, { className: "PromoOverlay", children: [
295
+ /* @__PURE__ */ m(gn, { children: [
296
+ /* @__PURE__ */ m(yn, { className: $(!S && bn), children: [
297
+ ((c = o.sponsor) == null ? void 0 : c.logo) && o.logoMode === N.LEFT && /* @__PURE__ */ n(K, { src: (u = o.sponsor) == null ? void 0 : u.logo, alt: "promo" }),
298
+ /* @__PURE__ */ m(
299
+ Sn,
222
300
  {
223
301
  style: {
224
- paddingLeft: (l = o.sponsor) != null && l.logo && o.logoMode === h.LEFT ? "0px" : "8px"
302
+ paddingLeft: (t = o.sponsor) != null && t.logo && o.logoMode === N.LEFT ? "0px" : "8px"
225
303
  },
226
304
  children: [
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" })
305
+ ((v = o.sponsor) == null ? void 0 : v.logo) && o.logoMode === N.LEFT && /* @__PURE__ */ n(fn, { children: (I = o.sponsor) == null ? void 0 : I.name }),
306
+ /* @__PURE__ */ m(kn, { className: "SponsorText", children: [
307
+ /* @__PURE__ */ n(Mn, { children: "AD" }),
308
+ /* @__PURE__ */ n(Ln, { children: "SPONSORED" })
231
309
  ] })
232
310
  ]
233
311
  }
234
312
  )
235
313
  ] }),
236
- /* @__PURE__ */ n(nn, { className: "ClosePromoIcon", onClick: t, children: /* @__PURE__ */ n(sn, { name: "icon-cross" }) })
314
+ /* @__PURE__ */ n(
315
+ lo,
316
+ {
317
+ className: "ClosePromoIcon",
318
+ close: l,
319
+ autoClose: (p = o.closeTimer) == null ? void 0 : p.auto,
320
+ duration: e ? 0 : (A = o.closeTimer) == null ? void 0 : A.seconds
321
+ }
322
+ )
237
323
  ] }),
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,
324
+ /* @__PURE__ */ m(Nn, { children: [
325
+ S && /* @__PURE__ */ n(K, { className: Cn, src: (b = o.sponsor) == null ? void 0 : b.logo, alt: "promo" }),
326
+ /* @__PURE__ */ n(X, { children: (O = (f = o.banner) == null ? void 0 : f.video) != null && O.url ? /* @__PURE__ */ n(
327
+ ro,
242
328
  {
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",
329
+ source: (E = (B = o.banner) == null ? void 0 : B.video) == null ? void 0 : E.url,
330
+ poster: (P = (_ = o.banner) == null ? void 0 : _.video) == null ? void 0 : P.thumbnailUrl,
331
+ aspectRatio: T ? "1/1" : "16/9",
246
332
  onPlay: () => {
247
- N.emit("advertisement", {
333
+ k.emit("advertisement", {
248
334
  action: "videoPlay",
249
335
  payload: {
250
- advertisementId: s,
251
- advertisementType: o.type
336
+ id: i,
337
+ type: o.type
252
338
  }
253
339
  });
254
- }
340
+ },
341
+ autoPlay: o.autoPlayVideo === Io.ENABLED
255
342
  }
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 })
343
+ ) : (x = o.banner) != null && x.imageUrl ? /* @__PURE__ */ n($n, { style: T ? { aspectRatio: "1/1" } : {}, src: (R = o.banner) == null ? void 0 : R.imageUrl, alt: "promo" }) : null }),
344
+ !T && /* @__PURE__ */ m(X, { children: [
345
+ ((D = o.banner) == null ? void 0 : D.title) && /* @__PURE__ */ n(En, { className: $("AdvTitle", S && _n), children: (q = o.banner) == null ? void 0 : q.title }),
346
+ ((w = o.banner) == null ? void 0 : w.body) && /* @__PURE__ */ n(Tn, { className: "AdvDescription", children: (j = o.banner) == null ? void 0 : j.body })
260
347
  ] })
261
348
  ] }),
262
- o.buttonType !== so.NO_BUTTON && /* @__PURE__ */ n(an, { children: /* @__PURE__ */ n(
263
- tn,
349
+ o.buttonType !== ho.NO_BUTTON && /* @__PURE__ */ n(On, { children: /* @__PURE__ */ n(
350
+ Bn,
264
351
  {
265
- href: (_ = o.banner) == null ? void 0 : _.url,
352
+ href: y,
266
353
  style: {
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"
354
+ backgroundColor: ((U = (F = o.banner) == null ? void 0 : F.ctaButton) == null ? void 0 : U.color) || "#009dc4",
355
+ color: ((V = (z = o.banner) == null ? void 0 : z.ctaButton) == null ? void 0 : V.textColor) || "#fff"
269
356
  },
270
357
  "data-analytics": "button",
271
- "data-promo-id": s,
358
+ "data-promo-id": i,
272
359
  "data-promo-type": o.type,
273
360
  target: "_blank",
274
- children: (U = (R = o.banner) == null ? void 0 : R.ctaButton) == null ? void 0 : U.label
361
+ children: (W = (G = o.banner) == null ? void 0 : G.ctaButton) == null ? void 0 : W.label
275
362
  }
276
363
  ) })
277
364
  ] });
278
- }, dn = /* @__PURE__ */ e("div")({
365
+ }, Pn = /* @__PURE__ */ s("div")({
279
366
  name: "SidebarContainer",
280
367
  class: "s1abskp8",
281
368
  propsAsIs: !1
282
- }), cn = ({
369
+ }), xn = ({
283
370
  children: o,
284
- direction: s,
285
- style: t,
286
- className: i,
287
- hiding: a
288
- }) => /* @__PURE__ */ n($, {
289
- direction: s,
290
- style: t,
291
- hiding: a,
292
- className: i,
293
- children: /* @__PURE__ */ n(dn, {
371
+ direction: e,
372
+ style: i,
373
+ className: l,
374
+ hiding: r
375
+ }) => /* @__PURE__ */ n(M, {
376
+ direction: e,
377
+ style: i,
378
+ hiding: r,
379
+ className: l,
380
+ children: /* @__PURE__ */ n(Pn, {
294
381
  children: o
295
382
  })
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 = ({
383
+ }), Rn = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === g.INGAME_IAB21_LBAR, Dn = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11 || (o == null ? void 0 : o.type) === g.INGAME_IAB21, qn = ({
297
384
  advertisement: o,
298
- close: s,
299
- skipTypeCheck: t,
300
- layoutMode: i = "side-by-side",
385
+ close: e,
386
+ skipTypeCheck: i,
387
+ skipAutoClose: l,
388
+ layoutMode: r = "side-by-side",
301
389
  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,
390
+ isNotification: d,
391
+ banner: c,
392
+ markAsViewed: u,
393
+ open: t
394
+ }) => o.promotion ? d && o.notification ? /* @__PURE__ */ n(An, { open: t, notification: o.notification, promotionId: o.question.id }) : !a && !c && (i || Dn(o.promotion)) ? /* @__PURE__ */ n(In, { className: "PromoOverlayContainer", children: /* @__PURE__ */ n(
395
+ J,
396
+ {
397
+ markAsViewed: u,
398
+ promotionId: o.question.id,
399
+ promotion: o.promotion,
400
+ onClose: e,
401
+ skipAutoClose: l
402
+ }
403
+ ) }) : a && (i || Rn(o.promotion)) ? /* @__PURE__ */ n(xn, { className: "PromoSidebarContainer", direction: a, hiding: !1, children: /* @__PURE__ */ n(
404
+ J,
405
+ {
406
+ markAsViewed: u,
407
+ promotionId: o.question.id,
408
+ promotion: o.promotion,
409
+ onClose: e,
410
+ skipAutoClose: l
411
+ }
412
+ ) }) : c ? /* @__PURE__ */ n(
413
+ Eo,
306
414
  {
307
415
  promotionId: o.question.id,
308
416
  hiding: !1,
309
417
  promotion: o.promotion,
310
- direction: l
418
+ direction: c
311
419
  }
312
- ) : null : null, vn = /* @__PURE__ */ e("div")({
420
+ ) : null : null, wn = /* @__PURE__ */ s("div")({
313
421
  name: "AdvertisementUIWrap",
314
422
  class: "aa6pjif",
315
423
  propsAsIs: !1
316
- }), In = (o) => {
317
- const s = o.target;
318
- if (s instanceof HTMLAnchorElement && s.target === "_blank") {
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", {
424
+ }), jn = (o) => {
425
+ const e = o.target;
426
+ if (e instanceof HTMLAnchorElement && e.target === "_blank") {
427
+ const i = e.getAttribute("data-promo-id") || "", l = e.getAttribute("data-promo-type") || g.UNSET;
428
+ e.getAttribute("data-analytics") === "button" && k.emit("advertisement", {
321
429
  action: "buttonSelect",
322
430
  payload: {
323
- advertisementId: t,
324
- advertisementType: i
431
+ id: i,
432
+ type: l
325
433
  }
326
- }), s.getAttribute("data-analytics") === "banner" && N.emit("advertisement", {
434
+ }), e.getAttribute("data-analytics") === "banner" && k.emit("advertisement", {
327
435
  action: "bannerSelect",
328
436
  payload: {
329
- advertisementId: t,
330
- advertisementType: i
437
+ id: i,
438
+ type: l
331
439
  }
332
440
  });
333
441
  }
334
- }, gn = ({
442
+ }, Fn = ({
335
443
  gamification: o,
336
- layoutMode: s,
337
- skipTypeCheck: t,
338
- sidebar: i,
444
+ layoutMode: e,
445
+ skipAutoClose: i,
446
+ skipTypeCheck: l,
447
+ sidebar: r,
339
448
  banner: a,
340
- notification: r,
341
- isMobileScreen: l,
342
- persistent: m
449
+ notification: d,
450
+ isMobileScreen: c,
451
+ persistent: u
343
452
  }) => {
344
- const u = Q(null), c = H(o.advertisement.$store);
345
- J(u, {
346
- enabled: !!c.data,
453
+ var t, v, I;
454
+ const p = to(null), A = Q(o.advertisement.$store);
455
+ co(p, {
456
+ enabled: !!A.data,
347
457
  event: "click",
348
- listener: In
458
+ listener: jn
349
459
  });
350
- const I = !a && !i;
351
- return c.data === void 0 || !m && c.isViewed ? null : /* @__PURE__ */ n(vn, {
352
- ref: u,
460
+ const b = !a && !r;
461
+ if (A.data === void 0 || !u && A.isViewed)
462
+ return null;
463
+ const f = ((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__ */ n(wn, {
465
+ ref: p,
353
466
  style: {
354
- height: I ? "auto" : "100%"
467
+ height: b ? "auto" : "100%"
355
468
  },
356
- className: l ? "mobile-view" : "",
357
- children: /* @__PURE__ */ n(un, {
358
- skipTypeCheck: t,
359
- sidebar: i,
469
+ className: $("SL-AdvertisementUIWrap", c && "mobile-view", f && "SL-AdvertisementUIWrap--lower-third"),
470
+ children: /* @__PURE__ */ n(qn, {
471
+ skipTypeCheck: l,
472
+ sidebar: r,
360
473
  banner: a,
361
- advertisement: c.data,
362
- close: c.close,
363
- layoutMode: s,
364
- isNotification: r
474
+ advertisement: A.data,
475
+ close: A.close,
476
+ markAsViewed: o.advertisement.markAsViewed,
477
+ open: o.advertisement.open,
478
+ layoutMode: e,
479
+ isNotification: d,
480
+ skipAutoClose: i
365
481
  })
366
482
  });
367
- }, hn = ({
483
+ }, Un = ({
368
484
  sdk: o,
369
- sidebar: s,
370
- banner: t,
371
- skipTypeCheck: i,
485
+ sidebar: e,
486
+ banner: i,
487
+ skipAutoClose: l,
488
+ skipTypeCheck: r,
372
489
  layoutMode: a,
373
- isMobileScreen: r,
374
- persistent: l,
375
- notification: m
490
+ isMobileScreen: d,
491
+ persistent: c,
492
+ notification: u
376
493
  }) => {
377
- const u = H(o.featuresList.getStore());
378
- if (s && t)
494
+ const t = Q(o.featuresList.getStore());
495
+ if (e && i)
379
496
  return /* @__PURE__ */ n("div", {
380
497
  style: {
381
498
  color: "red"
382
499
  },
383
500
  children: "define either sidebar or banner, not both."
384
501
  });
385
- if (!u)
502
+ if (!t)
386
503
  return null;
387
- const c = o.getFeature(ao.GAMES);
388
- return c ? /* @__PURE__ */ n(gn, {
389
- gamification: c,
390
- sidebar: s,
391
- banner: t,
504
+ const v = o.getFeature(go.GAMES);
505
+ return v ? /* @__PURE__ */ n(Fn, {
506
+ gamification: v,
507
+ sidebar: e,
508
+ banner: i,
392
509
  layoutMode: a,
393
- isMobileScreen: r,
394
- persistent: l,
395
- notification: m,
396
- skipTypeCheck: i
510
+ isMobileScreen: d,
511
+ persistent: c,
512
+ notification: u,
513
+ skipTypeCheck: r,
514
+ skipAutoClose: l
397
515
  }) : null;
398
- }, Nn = ({
516
+ }, Hn = ({
399
517
  event: o,
400
- sidebar: s,
401
- banner: t,
402
- isMobileScreen: i,
518
+ sidebar: e,
519
+ banner: i,
520
+ isMobileScreen: l,
521
+ skipAutoClose: r,
403
522
  persistent: a,
404
- theme: r,
405
- notification: l
523
+ theme: d,
524
+ notification: c,
525
+ skipTypeCheck: u
406
526
  }) => {
407
- const m = X();
408
- return m ? /* @__PURE__ */ p("div", { className: "StreamLayerSDK", children: [
409
- /* @__PURE__ */ n(Y, { customTheme: r, children: /* @__PURE__ */ n(
410
- hn,
527
+ const t = po(), v = mo(), I = uo();
528
+ return !t || e && !v.promotionSidebar || i && !v.promotionBanner || c && !v.promotionNotification || !i && !e && !c && !v.promotionOverlay ? null : /* @__PURE__ */ m("div", { className: "StreamLayerSDK", children: [
529
+ /* @__PURE__ */ n(vo, { customTheme: d ?? I, children: /* @__PURE__ */ n(
530
+ Un,
411
531
  {
412
- sdk: m,
413
- sidebar: s,
414
- banner: t,
415
- isMobileScreen: i,
532
+ sdk: t,
533
+ sidebar: e,
534
+ banner: i,
535
+ isMobileScreen: l,
416
536
  persistent: a,
417
- notification: l,
537
+ notification: c,
538
+ skipTypeCheck: u,
539
+ skipAutoClose: r,
418
540
  layoutMode: "side-by-side"
419
541
  }
420
542
  ) }),
421
- o !== void 0 && /* @__PURE__ */ n(Z, { event: o })
422
- ] }) : null;
543
+ o !== void 0 && /* @__PURE__ */ n(Ao, { event: o })
544
+ ] });
423
545
  };
424
546
  export {
425
- Nn as StreamLayerSDKAdvertisement,
426
- hn as StreamLayerSDKAdvertisementUI
547
+ Hn as StreamLayerSDKAdvertisement,
548
+ Un as StreamLayerSDKAdvertisementUI
427
549
  };