@streamlayer/react 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/advertisement.d.ts +1 -0
- package/lib/app/app.d.ts +0 -1
- package/lib/app/masters.d.ts +0 -1
- package/lib/app/provider.d.ts +0 -1
- package/lib/app/useStreamLayerApp.d.ts +0 -1
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/app.js +1 -1
- package/lib/cjs/index2.js +37 -37
- package/lib/cjs/masters2.js +2 -2
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +14 -14
- package/lib/dist/cjs/masters.js +75 -75
- package/lib/dist/es/masters.js +14935 -14661
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +235 -202
- package/lib/es/app.js +323 -311
- package/lib/es/index2.js +2050 -2046
- package/lib/es/masters2.js +11 -11
- package/lib/es/points.js +3 -3
- package/lib/es/useStreamLayerApp2.js +3592 -3329
- package/lib/style.css +1 -1
- package/package.json +28 -28
- package/lib/dist/index.d.ts +0 -2208
package/lib/es/advertisement.js
CHANGED
|
@@ -1,295 +1,328 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { a as
|
|
4
|
-
import { F as
|
|
5
|
-
import { P as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as F, useRef as z, useMemo as H } from "react";
|
|
3
|
+
import { a as y, s, c as W, Q as K, e as g, u as A, L as Q } from "./index2.js";
|
|
4
|
+
import { F as J, u as V, d as X } from "./app.js";
|
|
5
|
+
import { P as m, a as v, S as Y } from "./useStreamLayerApp2.js";
|
|
6
|
+
const Z = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "Container",
|
|
8
8
|
class: "c5b6wdg",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
11
|
-
children:
|
|
12
|
-
style:
|
|
10
|
+
}), ee = "a1rlj479", oe = "s35f1di", ne = "sj4471g", se = "b12050d8", ae = "b1d5ybek", te = (e) => e === "left" || e === "right" ? oe : se, ie = (e) => e === "left" || e === "right" ? ne : ae, le = (e) => e === "left" ? "avdxyl3" : e === "right" ? "a1bisd08" : e === "top" ? "a1u9y2aj" : "a1qqaks", D = ({
|
|
11
|
+
children: e,
|
|
12
|
+
style: t,
|
|
13
13
|
className: i,
|
|
14
|
-
enabled:
|
|
15
|
-
hiding:
|
|
16
|
-
direction:
|
|
17
|
-
onAnimationEnd:
|
|
18
|
-
}) => /* @__PURE__ */
|
|
19
|
-
style:
|
|
20
|
-
className:
|
|
21
|
-
onAnimationEnd:
|
|
22
|
-
children:
|
|
23
|
-
}),
|
|
14
|
+
enabled: a = !0,
|
|
15
|
+
hiding: n,
|
|
16
|
+
direction: l = "left",
|
|
17
|
+
onAnimationEnd: r
|
|
18
|
+
}) => /* @__PURE__ */ o(Z, {
|
|
19
|
+
style: t,
|
|
20
|
+
className: y(i, ee, le(l), a && !n && te(l), a && n && ie(l)),
|
|
21
|
+
onAnimationEnd: r,
|
|
22
|
+
children: e
|
|
23
|
+
}), re = /* @__PURE__ */ s("a")({
|
|
24
|
+
name: "Link",
|
|
25
|
+
class: "l1sgte8c",
|
|
26
|
+
propsAsIs: !1
|
|
27
|
+
}), de = /* @__PURE__ */ s("div")({
|
|
24
28
|
name: "BannerContainer",
|
|
25
|
-
class: "
|
|
29
|
+
class: "b7yfc72",
|
|
26
30
|
propsAsIs: !1
|
|
27
|
-
}),
|
|
31
|
+
}), ce = () => re, pe = /* @__PURE__ */ s(ce())({
|
|
32
|
+
name: "BannerLink",
|
|
33
|
+
class: "bejjq94",
|
|
34
|
+
propsAsIs: !0
|
|
35
|
+
}), me = /* @__PURE__ */ s("img")({
|
|
28
36
|
name: "BannerImg",
|
|
29
|
-
class: "
|
|
37
|
+
class: "b1j94hdr",
|
|
30
38
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
}), ue = ({ promotion: e, promotionId: t, hiding: i, direction: a = "bottom" }) => {
|
|
40
|
+
var n;
|
|
41
|
+
return (n = e.additionalBanner) != null && n.imageUrl ? /* @__PURE__ */ o(D, { direction: a, hiding: i, children: /* @__PURE__ */ o(de, { children: /* @__PURE__ */ o(
|
|
42
|
+
pe,
|
|
43
|
+
{
|
|
44
|
+
href: e.additionalBanner.url,
|
|
45
|
+
"data-promo-id": t,
|
|
46
|
+
"data-promo-type": e.type,
|
|
47
|
+
"data-analytics": "banner",
|
|
48
|
+
target: "_blank",
|
|
49
|
+
children: /* @__PURE__ */ o(me, { src: e.additionalBanner.imageUrl, alt: "promo" })
|
|
50
|
+
}
|
|
51
|
+
) }) }) : null;
|
|
52
|
+
}, ve = /* @__PURE__ */ s("div")({
|
|
53
|
+
name: "OverlayContainer",
|
|
54
|
+
class: "okzhq2w",
|
|
55
|
+
propsAsIs: !1
|
|
56
|
+
}), be = /* @__PURE__ */ s("div")({
|
|
57
|
+
name: "PromoOverlay",
|
|
58
|
+
class: "pmgz5i",
|
|
59
|
+
propsAsIs: !1
|
|
60
|
+
}), he = /* @__PURE__ */ s("div")({
|
|
48
61
|
name: "Header",
|
|
49
|
-
class: "
|
|
62
|
+
class: "hyxi3jt",
|
|
50
63
|
propsAsIs: !1
|
|
51
|
-
}),
|
|
64
|
+
}), ye = /* @__PURE__ */ s("div")({
|
|
52
65
|
name: "HeaderContent",
|
|
53
|
-
class: "
|
|
66
|
+
class: "h149e3gp",
|
|
54
67
|
propsAsIs: !1
|
|
55
|
-
}),
|
|
68
|
+
}), ge = "h10toh7", G = /* @__PURE__ */ s("img")({
|
|
56
69
|
name: "SponsorLogo",
|
|
57
|
-
class: "
|
|
70
|
+
class: "s1jyea6t",
|
|
58
71
|
propsAsIs: !1
|
|
59
|
-
}),
|
|
72
|
+
}), Ae = /* @__PURE__ */ s("div")({
|
|
60
73
|
name: "SponsorName",
|
|
61
|
-
class: "
|
|
74
|
+
class: "szpfa3h",
|
|
62
75
|
propsAsIs: !1
|
|
63
|
-
}),
|
|
64
|
-
name: "PromoOverlay",
|
|
65
|
-
class: "p10toh7",
|
|
66
|
-
propsAsIs: !1
|
|
67
|
-
}), mo = /* @__PURE__ */ s("div")({
|
|
76
|
+
}), Ie = /* @__PURE__ */ s("div")({
|
|
68
77
|
name: "Media",
|
|
69
|
-
class: "
|
|
78
|
+
class: "m1crmu01",
|
|
70
79
|
propsAsIs: !1
|
|
71
|
-
}),
|
|
72
|
-
name: "
|
|
73
|
-
class: "
|
|
80
|
+
}), fe = /* @__PURE__ */ s("img")({
|
|
81
|
+
name: "PromoImg",
|
|
82
|
+
class: "p1l37r8s",
|
|
74
83
|
propsAsIs: !1
|
|
75
|
-
}),
|
|
84
|
+
}), $e = "s1nmch9k", U = /* @__PURE__ */ s("div")({
|
|
85
|
+
name: "Content",
|
|
86
|
+
class: "c1er0ljd",
|
|
87
|
+
propsAsIs: !1
|
|
88
|
+
}), Se = /* @__PURE__ */ s("div")({
|
|
76
89
|
name: "Description",
|
|
77
|
-
class: "
|
|
90
|
+
class: "dydopmr",
|
|
78
91
|
propsAsIs: !1
|
|
79
|
-
}),
|
|
92
|
+
}), Me = /* @__PURE__ */ s("div")({
|
|
93
|
+
name: "Sponsor",
|
|
94
|
+
class: "s1w6nt04",
|
|
95
|
+
propsAsIs: !1
|
|
96
|
+
}), Be = /* @__PURE__ */ s("div")({
|
|
80
97
|
name: "SponsorText",
|
|
81
|
-
class: "
|
|
98
|
+
class: "s1evcmtq",
|
|
82
99
|
propsAsIs: !1
|
|
83
|
-
}),
|
|
100
|
+
}), Ee = /* @__PURE__ */ s("div")({
|
|
84
101
|
name: "ADLogo",
|
|
85
|
-
class: "
|
|
102
|
+
class: "awodx0x",
|
|
86
103
|
propsAsIs: !1
|
|
87
|
-
}),
|
|
104
|
+
}), ke = /* @__PURE__ */ s("span")({
|
|
88
105
|
name: "SponsoredText",
|
|
89
|
-
class: "
|
|
106
|
+
class: "s1q3n6oi",
|
|
90
107
|
propsAsIs: !1
|
|
91
|
-
}),
|
|
108
|
+
}), Le = /* @__PURE__ */ s("div")({
|
|
92
109
|
name: "CloseIconWrap",
|
|
93
|
-
class: "
|
|
110
|
+
class: "c8d4xfk",
|
|
94
111
|
propsAsIs: !1
|
|
95
|
-
}),
|
|
112
|
+
}), Ne = () => W, Ce = /* @__PURE__ */ s(Ne())({
|
|
96
113
|
name: "CloseIcon",
|
|
97
|
-
class: "
|
|
114
|
+
class: "ct6oobh",
|
|
98
115
|
propsAsIs: !0
|
|
99
|
-
}),
|
|
100
|
-
name: "Content",
|
|
101
|
-
class: "c1evcmtq",
|
|
102
|
-
propsAsIs: !1
|
|
103
|
-
}), $o = /* @__PURE__ */ s("div")({
|
|
116
|
+
}), xe = /* @__PURE__ */ s("div")({
|
|
104
117
|
name: "ActionBtnWrap",
|
|
105
|
-
class: "
|
|
118
|
+
class: "a1gyg7tt",
|
|
106
119
|
propsAsIs: !1
|
|
107
|
-
}),
|
|
120
|
+
}), Te = /* @__PURE__ */ s("a")({
|
|
108
121
|
name: "ActionButton",
|
|
109
|
-
class: "
|
|
110
|
-
propsAsIs: !1
|
|
111
|
-
}), So = /* @__PURE__ */ s("img")({
|
|
112
|
-
name: "PromoImg",
|
|
113
|
-
class: "p8d4xfk",
|
|
122
|
+
class: "a17rwbtk",
|
|
114
123
|
propsAsIs: !1
|
|
115
|
-
}),
|
|
124
|
+
}), _e = /* @__PURE__ */ s("div")({
|
|
116
125
|
name: "Title",
|
|
117
|
-
class: "
|
|
126
|
+
class: "t3vxzaw",
|
|
118
127
|
propsAsIs: !1
|
|
119
|
-
}),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return /* @__PURE__ */ d(po, { className: "PromoOverlay", style: { ...i ? {} : { backgroundColor: "#1E3344" } }, children: [
|
|
127
|
-
/* @__PURE__ */ d(ro, { children: [
|
|
128
|
-
/* @__PURE__ */ d(to, { children: [
|
|
129
|
-
((e = o.sponsor) == null ? void 0 : e.logo) && o.logoMode === m.LEFT && /* @__PURE__ */ n(j, { src: (l = o.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
|
|
128
|
+
}), je = "h10f3u0j", q = ({ promotion: e, promotionId: t, onClose: i }) => {
|
|
129
|
+
var a, n, l, r, p, c, u, I, f, $, S, M, B, E, k, L, N, C, x, T, _, j, P, O, w, R;
|
|
130
|
+
const b = e.type === m.INGAME_IAB11_LBAR || e.type === m.INGAME_IAB11, h = ((a = e.sponsor) == null ? void 0 : a.logo) && e.logoMode === v.CENTER;
|
|
131
|
+
return /* @__PURE__ */ d(be, { className: "PromoOverlay", children: [
|
|
132
|
+
/* @__PURE__ */ d(he, { children: [
|
|
133
|
+
/* @__PURE__ */ d(ye, { className: y(!h && ge), children: [
|
|
134
|
+
((n = e.sponsor) == null ? void 0 : n.logo) && e.logoMode === v.LEFT && /* @__PURE__ */ o(G, { src: (l = e.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
|
|
130
135
|
/* @__PURE__ */ d(
|
|
131
|
-
|
|
136
|
+
Me,
|
|
132
137
|
{
|
|
133
138
|
style: {
|
|
134
|
-
paddingLeft: (r =
|
|
139
|
+
paddingLeft: (r = e.sponsor) != null && r.logo && e.logoMode === v.LEFT ? "0px" : "8px"
|
|
135
140
|
},
|
|
136
141
|
children: [
|
|
137
|
-
((
|
|
138
|
-
/* @__PURE__ */ d(
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
142
|
+
((p = e.sponsor) == null ? void 0 : p.logo) && e.logoMode === v.LEFT && /* @__PURE__ */ o(Ae, { children: (c = e.sponsor) == null ? void 0 : c.name }),
|
|
143
|
+
/* @__PURE__ */ d(Be, { children: [
|
|
144
|
+
/* @__PURE__ */ o(Ee, { children: "AD" }),
|
|
145
|
+
/* @__PURE__ */ o(ke, { children: "SPONSORED" })
|
|
141
146
|
] })
|
|
142
147
|
]
|
|
143
148
|
}
|
|
144
149
|
)
|
|
145
150
|
] }),
|
|
146
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ o(Le, { onClick: i, children: /* @__PURE__ */ o(Ce, { name: "icon-cross" }) })
|
|
147
152
|
] }),
|
|
148
|
-
/* @__PURE__ */ d(
|
|
149
|
-
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
|
|
152
|
-
F,
|
|
153
|
-
{
|
|
154
|
-
source: (I = (y = o.banner) == null ? void 0 : y.video) == null ? void 0 : I.url,
|
|
155
|
-
poster: ($ = (f = o.banner) == null ? void 0 : f.video) == null ? void 0 : $.thumbnailUrl,
|
|
156
|
-
aspectRatio: u ? "1/1" : "16/9"
|
|
157
|
-
}
|
|
158
|
-
) : (M = o.banner) != null && M.imageUrl ? /* @__PURE__ */ n(
|
|
159
|
-
So,
|
|
160
|
-
{
|
|
161
|
-
style: u ? { width: "268px", height: "268px" } : {},
|
|
162
|
-
src: (S = o.banner) == null ? void 0 : S.imageUrl,
|
|
163
|
-
alt: "promo"
|
|
164
|
-
}
|
|
165
|
-
) : null,
|
|
166
|
-
!u && /* @__PURE__ */ d(uo, { children: [
|
|
167
|
-
/* @__PURE__ */ n(ko, { children: (k = o.banner) == null ? void 0 : k.title }),
|
|
168
|
-
/* @__PURE__ */ n(vo, { children: (B = o.banner) == null ? void 0 : B.body })
|
|
169
|
-
] })
|
|
170
|
-
] }),
|
|
171
|
-
/* @__PURE__ */ n($o, { children: /* @__PURE__ */ n(
|
|
172
|
-
Mo,
|
|
153
|
+
/* @__PURE__ */ d(Ie, { children: [
|
|
154
|
+
h && /* @__PURE__ */ o(G, { className: $e, src: (u = e.sponsor) == null ? void 0 : u.logo, alt: "promo" }),
|
|
155
|
+
/* @__PURE__ */ o(U, { children: (f = (I = e.banner) == null ? void 0 : I.video) != null && f.url ? /* @__PURE__ */ o(
|
|
156
|
+
K,
|
|
173
157
|
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
158
|
+
source: (S = ($ = e.banner) == null ? void 0 : $.video) == null ? void 0 : S.url,
|
|
159
|
+
poster: (B = (M = e.banner) == null ? void 0 : M.video) == null ? void 0 : B.thumbnailUrl,
|
|
160
|
+
aspectRatio: b ? "1/1" : "16/9",
|
|
161
|
+
onPlay: () => {
|
|
162
|
+
g.emit("advertisement", {
|
|
163
|
+
action: "videoPlay",
|
|
164
|
+
payload: {
|
|
165
|
+
advertisementId: t,
|
|
166
|
+
advertisementType: e.type
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
181
170
|
}
|
|
182
|
-
) })
|
|
183
|
-
|
|
171
|
+
) : (E = e.banner) != null && E.imageUrl ? /* @__PURE__ */ o(fe, { style: b ? { aspectRatio: "1/1" } : {}, src: (k = e.banner) == null ? void 0 : k.imageUrl, alt: "promo" }) : null }),
|
|
172
|
+
!b && /* @__PURE__ */ d(U, { children: [
|
|
173
|
+
((L = e.banner) == null ? void 0 : L.title) && /* @__PURE__ */ o(_e, { className: y(h && je), children: (N = e.banner) == null ? void 0 : N.title }),
|
|
174
|
+
((C = e.banner) == null ? void 0 : C.body) && /* @__PURE__ */ o(Se, { children: (x = e.banner) == null ? void 0 : x.body })
|
|
175
|
+
] })
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ o(xe, { children: /* @__PURE__ */ o(
|
|
178
|
+
Te,
|
|
179
|
+
{
|
|
180
|
+
href: (T = e.banner) == null ? void 0 : T.url,
|
|
181
|
+
style: {
|
|
182
|
+
backgroundColor: ((j = (_ = e.banner) == null ? void 0 : _.ctaButton) == null ? void 0 : j.color) || "#009dc4",
|
|
183
|
+
color: ((O = (P = e.banner) == null ? void 0 : P.ctaButton) == null ? void 0 : O.textColor) || "#fff"
|
|
184
|
+
},
|
|
185
|
+
"data-analytics": "button",
|
|
186
|
+
"data-promo-id": t,
|
|
187
|
+
"data-promo-type": e.type,
|
|
188
|
+
target: "_blank",
|
|
189
|
+
children: (R = (w = e.banner) == null ? void 0 : w.ctaButton) == null ? void 0 : R.label
|
|
190
|
+
}
|
|
191
|
+
) })
|
|
184
192
|
] });
|
|
185
|
-
},
|
|
193
|
+
}, Pe = /* @__PURE__ */ s("div")({
|
|
186
194
|
name: "SidebarContainer",
|
|
187
195
|
class: "s1abskp8",
|
|
188
196
|
propsAsIs: !1
|
|
189
|
-
}),
|
|
190
|
-
children:
|
|
191
|
-
direction:
|
|
197
|
+
}), Oe = ({
|
|
198
|
+
children: e,
|
|
199
|
+
direction: t,
|
|
192
200
|
style: i,
|
|
193
|
-
className:
|
|
194
|
-
hiding:
|
|
195
|
-
}) => /* @__PURE__ */
|
|
196
|
-
direction:
|
|
201
|
+
className: a,
|
|
202
|
+
hiding: n
|
|
203
|
+
}) => /* @__PURE__ */ o(D, {
|
|
204
|
+
direction: t,
|
|
197
205
|
style: i,
|
|
198
|
-
hiding:
|
|
199
|
-
className:
|
|
200
|
-
children: /* @__PURE__ */
|
|
201
|
-
children:
|
|
206
|
+
hiding: n,
|
|
207
|
+
className: a,
|
|
208
|
+
children: /* @__PURE__ */ o(Pe, {
|
|
209
|
+
children: e
|
|
202
210
|
})
|
|
203
|
-
}),
|
|
204
|
-
const
|
|
205
|
-
return !
|
|
211
|
+
}), we = (e) => (e == null ? void 0 : e.type) === m.INGAME_IAB11_LBAR || (e == null ? void 0 : e.type) === m.INGAME_IAB21_LBAR, Re = (e) => (e == null ? void 0 : e.type) === m.INGAME_IAB11 || (e == null ? void 0 : e.type) === m.INGAME_IAB21, Ge = ({ advertisement: e, layoutMode: t = "side-by-side", sidebar: i, banner: a }) => {
|
|
212
|
+
const n = A(e.data);
|
|
213
|
+
return !n.data && n.loading ? null : n.error ? /* @__PURE__ */ d("div", { children: [
|
|
206
214
|
"error ",
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
] }) :
|
|
215
|
+
/* @__PURE__ */ o("button", { onClick: e.close, children: "close" })
|
|
216
|
+
] }) : n.data ? !i && !a && Re(n.data) ? /* @__PURE__ */ o(ve, { children: /* @__PURE__ */ o(q, { promotionId: e.id, promotion: n.data, onClose: e.close }) }) : i && we(n.data) ? /* @__PURE__ */ o(Oe, { direction: i, hiding: e.hiding, children: /* @__PURE__ */ o(q, { promotionId: e.id, promotion: n.data, onClose: e.close }) }) : a ? /* @__PURE__ */ o(ue, { promotionId: e.id, hiding: e.hiding, promotion: n.data, direction: a }) : null : /* @__PURE__ */ d("div", { children: [
|
|
209
217
|
"empty promo ",
|
|
210
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ o("button", { onClick: e.close, children: "close" })
|
|
211
219
|
] });
|
|
212
|
-
},
|
|
220
|
+
}, Ue = /* @__PURE__ */ s("div")({
|
|
213
221
|
name: "AdvertisementUIWrap",
|
|
214
222
|
class: "aa6pjif",
|
|
215
223
|
propsAsIs: !1
|
|
216
|
-
}),
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
}), qe = (e) => {
|
|
225
|
+
const t = e.target;
|
|
226
|
+
if (t instanceof HTMLAnchorElement && t.target === "_blank") {
|
|
227
|
+
const i = t.getAttribute("data-promo-id") || "", a = t.getAttribute("data-promo-type") || m.UNSET;
|
|
228
|
+
t.getAttribute("data-analytics") === "button" && g.emit("advertisement", {
|
|
229
|
+
action: "buttonSelect",
|
|
230
|
+
payload: {
|
|
231
|
+
advertisementId: i,
|
|
232
|
+
advertisementType: a
|
|
233
|
+
}
|
|
234
|
+
}), t.getAttribute("data-analytics") === "banner" && g.emit("advertisement", {
|
|
235
|
+
action: "bannerSelect",
|
|
236
|
+
payload: {
|
|
237
|
+
advertisementId: i,
|
|
238
|
+
advertisementType: a
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}, De = ({
|
|
243
|
+
gamification: e,
|
|
244
|
+
layoutMode: t,
|
|
225
245
|
sidebar: i,
|
|
226
|
-
banner:
|
|
246
|
+
banner: a,
|
|
247
|
+
isMobileScreen: n,
|
|
248
|
+
persistent: l
|
|
227
249
|
}) => {
|
|
228
|
-
const
|
|
229
|
-
() =>
|
|
250
|
+
const r = z(null), p = A(e.advertisement.$list), c = H(
|
|
251
|
+
() => e.advertisement.getActiveAdvertisement(l),
|
|
230
252
|
// fire getActiveNotification when notifications were updated
|
|
231
253
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
232
|
-
[
|
|
254
|
+
[p, l]
|
|
233
255
|
);
|
|
234
|
-
return
|
|
235
|
-
enabled: !!
|
|
256
|
+
return Q(r, {
|
|
257
|
+
enabled: !!c,
|
|
236
258
|
event: "click",
|
|
237
|
-
listener:
|
|
238
|
-
}),
|
|
239
|
-
ref:
|
|
259
|
+
listener: qe
|
|
260
|
+
}), c ? /* @__PURE__ */ o(Ue, {
|
|
261
|
+
ref: r,
|
|
240
262
|
style: {
|
|
241
|
-
height: !
|
|
263
|
+
height: !a && !i ? "auto" : "100%"
|
|
242
264
|
},
|
|
243
|
-
|
|
265
|
+
className: n ? "mobile-view" : "",
|
|
266
|
+
children: /* @__PURE__ */ o(Ge, {
|
|
244
267
|
sidebar: i,
|
|
245
|
-
banner:
|
|
246
|
-
advertisement:
|
|
247
|
-
layoutMode:
|
|
268
|
+
banner: a,
|
|
269
|
+
advertisement: c,
|
|
270
|
+
layoutMode: t
|
|
248
271
|
})
|
|
249
272
|
}) : null;
|
|
250
|
-
},
|
|
251
|
-
sdk:
|
|
252
|
-
sidebar:
|
|
273
|
+
}, Fe = ({
|
|
274
|
+
sdk: e,
|
|
275
|
+
sidebar: t,
|
|
253
276
|
banner: i,
|
|
254
|
-
event:
|
|
255
|
-
layoutMode:
|
|
277
|
+
event: a,
|
|
278
|
+
layoutMode: n,
|
|
279
|
+
isMobileScreen: l,
|
|
280
|
+
persistent: r
|
|
256
281
|
}) => {
|
|
257
282
|
const {
|
|
258
|
-
deactivate:
|
|
259
|
-
} =
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}, [
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
return /* @__PURE__ */
|
|
283
|
+
deactivate: p
|
|
284
|
+
} = J(e);
|
|
285
|
+
F(() => {
|
|
286
|
+
a ? e.createEventSession(a) : p();
|
|
287
|
+
}, [a, p, e]);
|
|
288
|
+
const c = A(e.featuresList.getStore());
|
|
289
|
+
if (t && i)
|
|
290
|
+
return /* @__PURE__ */ o("div", {
|
|
266
291
|
style: {
|
|
267
292
|
color: "red"
|
|
268
293
|
},
|
|
269
294
|
children: "define either sidebar or banner, not both."
|
|
270
295
|
});
|
|
271
|
-
if (!
|
|
296
|
+
if (!c)
|
|
272
297
|
return null;
|
|
273
|
-
const
|
|
274
|
-
return
|
|
275
|
-
gamification:
|
|
276
|
-
sidebar:
|
|
298
|
+
const u = e.getFeature(Y.GAMES);
|
|
299
|
+
return u ? /* @__PURE__ */ o(De, {
|
|
300
|
+
gamification: u,
|
|
301
|
+
sidebar: t,
|
|
277
302
|
banner: i,
|
|
278
|
-
layoutMode:
|
|
303
|
+
layoutMode: n,
|
|
304
|
+
isMobileScreen: l,
|
|
305
|
+
persistent: r
|
|
279
306
|
}) : null;
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
307
|
+
}, Je = ({
|
|
308
|
+
event: e,
|
|
309
|
+
sidebar: t,
|
|
310
|
+
banner: i,
|
|
311
|
+
isMobileScreen: a
|
|
312
|
+
}) => {
|
|
313
|
+
const n = V();
|
|
314
|
+
return n ? /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(
|
|
315
|
+
Fe,
|
|
284
316
|
{
|
|
285
|
-
sdk:
|
|
286
|
-
event:
|
|
287
|
-
sidebar:
|
|
317
|
+
sdk: n,
|
|
318
|
+
event: e,
|
|
319
|
+
sidebar: t,
|
|
288
320
|
banner: i,
|
|
321
|
+
isMobileScreen: a,
|
|
289
322
|
layoutMode: "side-by-side"
|
|
290
323
|
}
|
|
291
324
|
) }) }) : null;
|
|
292
325
|
};
|
|
293
326
|
export {
|
|
294
|
-
|
|
327
|
+
Je as StreamLayerSDKAdvertisement
|
|
295
328
|
};
|