@streamlayer/react 1.11.1 → 1.11.3-rc.3

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