@streamlayer/react 1.23.1 → 1.24.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.
Files changed (159) hide show
  1. package/lib/app/masters.d.ts +0 -1
  2. package/lib/cjs/Question.js +1 -1
  3. package/lib/cjs/advertisement.js +33 -53
  4. package/lib/cjs/analytics.js +1 -1
  5. package/lib/cjs/auth.js +1 -1
  6. package/lib/cjs/bet-pack.js +1 -1
  7. package/lib/cjs/feature.js +1 -1
  8. package/lib/cjs/hooks-n9ax4LRT.js +1 -0
  9. package/lib/cjs/index-ByUNFvMk.js +5 -0
  10. package/lib/cjs/index.js +1 -1
  11. package/lib/cjs/index10.js +1 -1
  12. package/lib/cjs/index11.js +1 -4
  13. package/lib/cjs/index12.js +1 -1
  14. package/lib/cjs/index13.js +1 -1
  15. package/lib/cjs/index14.js +4 -1
  16. package/lib/cjs/index15.js +1 -1
  17. package/lib/cjs/index16.js +2 -2
  18. package/lib/cjs/index2.js +1 -1
  19. package/lib/cjs/index4.js +3 -3
  20. package/lib/cjs/index5.js +1 -1
  21. package/lib/cjs/index6.js +1 -1
  22. package/lib/cjs/index7.js +1 -1
  23. package/lib/cjs/index8.js +1 -1
  24. package/lib/cjs/index9.js +7 -1
  25. package/lib/cjs/insight.js +1 -1
  26. package/lib/cjs/masters.js +1 -1
  27. package/lib/cjs/masters2.js +5 -10
  28. package/lib/cjs/notification.js +1 -1
  29. package/lib/cjs/pause-ad.js +1 -1
  30. package/lib/cjs/points.js +1 -1
  31. package/lib/cjs/polymarket.js +4 -9
  32. package/lib/cjs/sl-types.js +1 -15
  33. package/lib/cjs/storage.js +1 -1
  34. package/lib/cjs/theme.js +1 -17
  35. package/lib/cjs/useStreamLayerApp.js +1 -1
  36. package/lib/cjs/useStreamLayerApp2.js +15 -15
  37. package/lib/cjs/utils.js +8 -8
  38. package/lib/classic/app/masters.d.ts +0 -1
  39. package/lib/classic/cjs/Question.js +1 -1
  40. package/lib/classic/cjs/advertisement.js +33 -53
  41. package/lib/classic/cjs/analytics.js +1 -1
  42. package/lib/classic/cjs/auth.js +1 -1
  43. package/lib/classic/cjs/bet-pack.js +3 -3
  44. package/lib/classic/cjs/feature.js +1 -1
  45. package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
  46. package/lib/classic/cjs/index-ByUNFvMk.js +5 -0
  47. package/lib/classic/cjs/index.js +1 -1
  48. package/lib/classic/cjs/index10.js +1 -1
  49. package/lib/classic/cjs/index11.js +1 -1
  50. package/lib/classic/cjs/index12.js +1 -1
  51. package/lib/classic/cjs/index13.js +3 -3
  52. package/lib/classic/cjs/index2.js +2 -2
  53. package/lib/classic/cjs/index3.js +1 -1
  54. package/lib/classic/cjs/index4.js +1 -1
  55. package/lib/classic/cjs/index5.js +1 -1
  56. package/lib/classic/cjs/index6.js +1 -1
  57. package/lib/classic/cjs/index7.js +7 -1
  58. package/lib/classic/cjs/index8.js +1 -1
  59. package/lib/classic/cjs/index9.js +1 -1
  60. package/lib/classic/cjs/insight.js +1 -1
  61. package/lib/classic/cjs/notification.js +1 -1
  62. package/lib/classic/cjs/notification2.js +1 -1
  63. package/lib/classic/cjs/pause-ad.js +1 -1
  64. package/lib/classic/cjs/points.js +1 -1
  65. package/lib/classic/cjs/polymarket.js +4 -9
  66. package/lib/classic/cjs/sl-types.js +1 -15
  67. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  68. package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
  69. package/lib/classic/cjs/utils.js +8 -8
  70. package/lib/classic/es/Question.js +216 -220
  71. package/lib/classic/es/advertisement.js +14665 -15122
  72. package/lib/classic/es/analytics.js +9 -9
  73. package/lib/classic/es/auth.js +1 -1
  74. package/lib/classic/es/bet-pack.js +637 -650
  75. package/lib/classic/es/feature.js +29 -33
  76. package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
  77. package/lib/classic/es/index-ByUNFvMk.js +3775 -0
  78. package/lib/classic/es/index.js +13 -16
  79. package/lib/classic/es/index10.js +2587 -82
  80. package/lib/classic/es/index11.js +306 -2344
  81. package/lib/classic/es/index12.js +103 -101
  82. package/lib/classic/es/index13.js +449 -464
  83. package/lib/classic/es/index2.js +1244 -1268
  84. package/lib/classic/es/index3.js +10 -10
  85. package/lib/classic/es/index4.js +4 -283
  86. package/lib/classic/es/index5.js +4 -5
  87. package/lib/classic/es/index6.js +285 -5
  88. package/lib/classic/es/index7.js +179 -5
  89. package/lib/classic/es/index8.js +5 -9
  90. package/lib/classic/es/index9.js +7 -315
  91. package/lib/classic/es/insight.js +39 -41
  92. package/lib/classic/es/notification.js +3 -3
  93. package/lib/classic/es/notification2.js +513 -528
  94. package/lib/classic/es/pause-ad.js +116 -116
  95. package/lib/classic/es/points.js +33 -34
  96. package/lib/classic/es/polymarket.js +1049 -1102
  97. package/lib/classic/es/sl-types.js +115 -217
  98. package/lib/classic/es/useStreamLayerApp.js +1 -1
  99. package/lib/classic/es/useStreamLayerApp2.js +6485 -6405
  100. package/lib/classic/es/utils.js +6 -6
  101. package/lib/classic/source.css +110 -0
  102. package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
  103. package/lib/dist/cjs/index.js +1 -1
  104. package/lib/dist/cjs/masters.js +34 -42
  105. package/lib/dist/es/index-ByUNFvMk.js +3775 -0
  106. package/lib/dist/es/index.js +7 -11
  107. package/lib/dist/es/masters.js +13506 -12760
  108. package/lib/dist/index.d.ts +5 -5
  109. package/lib/dist/source.css +64 -0
  110. package/lib/es/Question.js +99 -101
  111. package/lib/es/advertisement.js +14665 -15122
  112. package/lib/es/analytics.js +29 -29
  113. package/lib/es/auth.js +1 -1
  114. package/lib/es/bet-pack.js +12 -11
  115. package/lib/es/feature.js +29 -33
  116. package/lib/es/hooks-n9ax4LRT.js +97 -0
  117. package/lib/es/index-ByUNFvMk.js +3775 -0
  118. package/lib/es/index.js +13 -16
  119. package/lib/es/index10.js +7 -263
  120. package/lib/es/index11.js +172 -822
  121. package/lib/es/index12.js +2587 -178
  122. package/lib/es/index13.js +248 -302
  123. package/lib/es/index14.js +815 -82
  124. package/lib/es/index15.js +306 -2344
  125. package/lib/es/index16.js +451 -454
  126. package/lib/es/index2.js +737 -757
  127. package/lib/es/index4.js +626 -639
  128. package/lib/es/index5.js +10 -10
  129. package/lib/es/index6.js +5 -285
  130. package/lib/es/index7.js +7 -5
  131. package/lib/es/index8.js +283 -5
  132. package/lib/es/index9.js +179 -8
  133. package/lib/es/insight.js +39 -41
  134. package/lib/es/masters.js +4 -5
  135. package/lib/es/masters2.js +408 -441
  136. package/lib/es/notification.js +469 -484
  137. package/lib/es/pause-ad.js +116 -116
  138. package/lib/es/points.js +42 -43
  139. package/lib/es/polymarket.js +1049 -1102
  140. package/lib/es/sl-types.js +114 -235
  141. package/lib/es/storage.js +22 -22
  142. package/lib/es/theme.js +3 -44
  143. package/lib/es/useStreamLayerApp.js +1 -1
  144. package/lib/es/useStreamLayerApp2.js +6485 -6405
  145. package/lib/es/utils.js +6 -6
  146. package/lib/source.css +120 -0
  147. package/lib/style.css +1 -1
  148. package/package.json +15 -15
  149. package/lib/cjs/hooks-WfHlJH12.js +0 -1
  150. package/lib/cjs/index-eShKGO10.js +0 -5
  151. package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
  152. package/lib/classic/cjs/index-eShKGO10.js +0 -5
  153. package/lib/classic/es/hooks-WfHlJH12.js +0 -98
  154. package/lib/classic/es/index-eShKGO10.js +0 -3757
  155. package/lib/dist/cjs/index-eShKGO10.js +0 -5
  156. package/lib/dist/es/index-eShKGO10.js +0 -3757
  157. package/lib/dist/style.css +0 -1
  158. package/lib/es/hooks-WfHlJH12.js +0 -98
  159. package/lib/es/index-eShKGO10.js +0 -3757
@@ -1,10 +1,10 @@
1
- import { jsx as s, jsxs as w } from "react/jsx-runtime";
2
- import { h as N } from "./index7.js";
3
- import { s as d, u as j, c as q } from "./sl-types.js";
4
- import { d as V } from "./index11.js";
5
- import { useState as B, useRef as E, useCallback as _, useEffect as c, Component as z } from "react";
6
- import { e as C } from "./index5.js";
7
- import { B as K, z as G } from "./hooks-WfHlJH12.js";
1
+ import { jsx as r, jsxs as D } from "react/jsx-runtime";
2
+ import { h as M } from "./index8.js";
3
+ import { s as d, u as q, c as V } from "./sl-types.js";
4
+ import { d as j } from "./index10.js";
5
+ import { useState as B, useRef as x, useCallback as _, useEffect as c, Component as K } from "react";
6
+ import { e as T } from "./index4.js";
7
+ import { Y as z, _ as G } from "./hooks-n9ax4LRT.js";
8
8
  const O = /* @__PURE__ */ d("div")({
9
9
  name: "PauseAdOverlay",
10
10
  class: "pw9gih8",
@@ -17,19 +17,19 @@ const O = /* @__PURE__ */ d("div")({
17
17
  name: "PauseAdTopLeft",
18
18
  class: "pv7u167",
19
19
  propsAsIs: !1
20
- }), H = /* @__PURE__ */ d("h2")({
20
+ }), Y = /* @__PURE__ */ d("h2")({
21
21
  name: "PauseAdTitle",
22
22
  class: "p1kh2yb0",
23
23
  propsAsIs: !1
24
- }), J = /* @__PURE__ */ d("p")({
24
+ }), H = /* @__PURE__ */ d("p")({
25
25
  name: "PauseAdCaption",
26
26
  class: "pl8f94x",
27
27
  propsAsIs: !1
28
- }), Q = /* @__PURE__ */ d("div")({
28
+ }), J = /* @__PURE__ */ d("div")({
29
29
  name: "PauseAdBottomLeft",
30
30
  class: "p1m6zmrt",
31
31
  propsAsIs: !1
32
- }), Y = /* @__PURE__ */ d("button")({
32
+ }), Q = /* @__PURE__ */ d("button")({
33
33
  name: "PauseAdPlayButton",
34
34
  class: "pm3vwfa",
35
35
  propsAsIs: !1
@@ -45,27 +45,27 @@ const O = /* @__PURE__ */ d("div")({
45
45
  name: "PauseAdTitleDescription",
46
46
  class: "p14estxv",
47
47
  propsAsIs: !1
48
- }), F = /* @__PURE__ */ d("img")({
48
+ }), N = /* @__PURE__ */ d("img")({
49
49
  name: "ExternalAdContainer",
50
50
  class: "e1dpvfl1",
51
51
  propsAsIs: !1
52
52
  }), re = ({
53
53
  vastUrl: i,
54
- isDesktop: n,
54
+ isDesktop: a,
55
55
  content: e
56
56
  }) => (c(() => {
57
- e.imageSrc && e.id && C.emit("exposedPauseAd", {
57
+ e.imageSrc && e.id && T.emit("exposedPauseAd", {
58
58
  action: "rendered",
59
59
  payload: {
60
60
  id: e.id,
61
61
  parentId: e.parentId
62
62
  }
63
63
  });
64
- }, [e, i]), e != null && e.imageSrc ? !e.adUrl || !n ? /* @__PURE__ */ s(F, { src: e.imageSrc }) : /* @__PURE__ */ s(
64
+ }, [e, i]), e?.imageSrc ? !e.adUrl || !a ? /* @__PURE__ */ r(N, { src: e.imageSrc }) : /* @__PURE__ */ r(
65
65
  "a",
66
66
  {
67
67
  onClick: () => {
68
- C.emit("exposedPauseAd", {
68
+ T.emit("exposedPauseAd", {
69
69
  action: "navigated",
70
70
  payload: {
71
71
  id: e.id,
@@ -76,180 +76,180 @@ const O = /* @__PURE__ */ d("div")({
76
76
  href: e.adUrl,
77
77
  target: "_blank",
78
78
  rel: "noopener noreferrer",
79
- children: /* @__PURE__ */ s(F, { src: e.imageSrc })
79
+ children: /* @__PURE__ */ r(N, { src: e.imageSrc })
80
80
  }
81
- ) : null), te = ({ isClosing: i, content: n, externalPauseAdStore: e, title: I, caption: v, onPlay: u, onClose: a, vastUrl: t, options: f, isDesktop: l }) => {
82
- const b = (f == null ? void 0 : f.showPauseButton) ?? !0, { ref: p, focusSelf: g } = V.useFocusable({
81
+ ) : null), te = ({ isClosing: i, content: a, externalPauseAdStore: e, title: y, caption: f, onPlay: l, onClose: u, vastUrl: t, options: h, isDesktop: n }) => {
82
+ const b = h?.showPauseButton ?? !0, { ref: p, focusSelf: I } = j.useFocusable({
83
83
  focusKey: "sl-pause-ad-play",
84
- onEnterRelease: u,
84
+ onEnterRelease: l,
85
85
  isFocusBoundary: !0,
86
86
  forceFocus: !0
87
87
  });
88
88
  return c(() => () => {
89
89
  e.revalidate();
90
90
  }, [e]), c(() => {
91
- p.current && g();
92
- }, [p, g]), c(() => {
93
- if (!a)
91
+ p.current && I();
92
+ }, [p, I]), c(() => {
93
+ if (!u)
94
94
  return () => {
95
95
  };
96
- const T = (A) => {
97
- const o = A.keyCode;
98
- if (o === 461 || o === 10009 || o === 27 || o === 8) {
99
- A.preventDefault(), A.stopPropagation(), A.stopImmediatePropagation(), a();
96
+ const C = (A) => {
97
+ const s = A.keyCode;
98
+ if (s === 461 || s === 10009 || s === 27 || s === 8) {
99
+ A.preventDefault(), A.stopPropagation(), A.stopImmediatePropagation(), u();
100
100
  return;
101
101
  }
102
102
  };
103
- return window.addEventListener("keydown", T, { capture: !0 }), () => window.removeEventListener("keydown", T, { capture: !0 });
104
- }, [a]), /* @__PURE__ */ s(O, { className: q("SL_PauseAd", i && "pause-ad-closing"), children: /* @__PURE__ */ w(W, { children: [
105
- /* @__PURE__ */ w(X, { children: [
106
- /* @__PURE__ */ s(H, { children: I }),
107
- /* @__PURE__ */ s(J, { children: v })
103
+ return window.addEventListener("keydown", C, { capture: !0 }), () => window.removeEventListener("keydown", C, { capture: !0 });
104
+ }, [u]), /* @__PURE__ */ r(O, { className: V("SL_PauseAd", i && "pause-ad-closing"), children: /* @__PURE__ */ D(W, { children: [
105
+ /* @__PURE__ */ D(X, { children: [
106
+ /* @__PURE__ */ r(Y, { children: y }),
107
+ /* @__PURE__ */ r(H, { children: f })
108
108
  ] }),
109
- b && /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(
110
- Y,
109
+ b && /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(
110
+ Q,
111
111
  {
112
112
  ref: p,
113
- onClick: u,
113
+ onClick: l,
114
114
  onMouseEnter: () => p.current.focus(),
115
115
  "aria-label": "Resume playback"
116
116
  }
117
117
  ) }),
118
- /* @__PURE__ */ s(Z, { className: "SL_PauseAdSidebar", children: /* @__PURE__ */ w($, { children: [
119
- t && /* @__PURE__ */ s(re, { content: n, isDesktop: l, vastUrl: t }),
120
- /* @__PURE__ */ s(ee, { children: "ADVERTISEMENT" })
118
+ /* @__PURE__ */ r(Z, { className: "SL_PauseAdSidebar", children: /* @__PURE__ */ D($, { children: [
119
+ t && /* @__PURE__ */ r(re, { content: a, isDesktop: n, vastUrl: t }),
120
+ /* @__PURE__ */ r(ee, { children: "ADVERTISEMENT" })
121
121
  ] }) })
122
122
  ] }) });
123
- }, se = ({ showPauseAd: i, vastUrls: n, title: e, caption: I, sdk: v, onClose: u, onRender: a, options: t, isDesktop: f }) => {
124
- const l = (t == null ? void 0 : t.pauseAdDelay) ?? 0, b = (t == null ? void 0 : t.pauseAdRefetchInterval) ?? 1e3 * 60 * 50, [p, g] = B(!1), [T, A] = B(!1), o = E(), h = n == null ? void 0 : n[0].url, P = E(h), y = E(""), S = E("");
125
- P.current = h;
126
- const [m, R] = v.advertisement.getExternalPauseAd(h, {
123
+ }, se = ({ showPauseAd: i, vastUrls: a, title: e, caption: y, sdk: f, onClose: l, onRender: u, options: t, isDesktop: h }) => {
124
+ const n = t?.pauseAdDelay ?? 0, b = t?.pauseAdRefetchInterval ?? 1e3 * 60 * 50, [p, I] = B(!1), [C, A] = B(!1), s = x(), v = a?.[0].url, P = x(v), g = x(""), S = x("");
125
+ P.current = v;
126
+ const [m, R] = f.advertisement.getExternalPauseAd(v, {
127
127
  refetchInterval: b,
128
- $enabled: l === 0 || !!i,
129
- prefetch: l === 0 && b > 0
130
- }), k = j(m), x = _(() => {
131
- if (u) {
128
+ $enabled: n === 0 || !!i,
129
+ prefetch: n === 0 && b > 0
130
+ }), k = q(m), E = _(() => {
131
+ if (l) {
132
132
  S.current = P.current;
133
- const r = m.get().data;
134
- C.emit("exposedPauseAd", {
133
+ const o = m.get().data;
134
+ T.emit("exposedPauseAd", {
135
135
  action: "closed",
136
- payload: (r == null ? void 0 : r.url) === S.current ? {
137
- id: r == null ? void 0 : r.id,
138
- parentId: r == null ? void 0 : r.parentId
136
+ payload: o?.url === S.current ? {
137
+ id: o?.id,
138
+ parentId: o?.parentId
139
139
  } : {}
140
- }), u();
140
+ }), l();
141
141
  }
142
- }, [u, m]), M = _(() => {
143
- v.controlVideoPlayer({ play: !0 });
144
- }, [v]);
142
+ }, [l, m]), F = _(() => {
143
+ f.controlVideoPlayer({ play: !0 });
144
+ }, [f]);
145
145
  return c(() => {
146
- R === P.current && k.error && (console.log("error", k.error), clearTimeout(o.current), x == null || x());
147
- }, [k, x, R]), c(() => {
148
- if (i && h) {
149
- y.current = P.current, S.current = "";
150
- const r = m.get().data;
151
- C.emit("exposedPauseAd", {
146
+ R === P.current && k.error && (console.log("error", k.error), clearTimeout(s.current), E?.());
147
+ }, [k, E, R]), c(() => {
148
+ if (i && v) {
149
+ g.current = P.current, S.current = "";
150
+ const o = m.get().data;
151
+ T.emit("exposedPauseAd", {
152
152
  action: "enabled",
153
- payload: (r == null ? void 0 : r.url) === y.current ? {
154
- id: r == null ? void 0 : r.id,
155
- parentId: r == null ? void 0 : r.parentId
153
+ payload: o?.url === g.current ? {
154
+ id: o?.id,
155
+ parentId: o?.parentId
156
156
  } : {}
157
157
  });
158
158
  const U = () => {
159
- const L = m.get(), D = L.data;
160
- (D == null ? void 0 : D.url) === P.current && (!L.loading && D != null && D.imageSrc ? (clearTimeout(o.current), A(!1), g(!0)) : L.loading && (o.current = setTimeout(() => {
161
- console.log("checkAndAllowRender timeout"), U();
159
+ const w = m.get(), L = w.data;
160
+ (!L || L?.url === P.current) && (!w.loading && L?.imageSrc ? (clearTimeout(s.current), A(!1), I(!0)) : w.loading && (s.current = setTimeout(() => {
161
+ U();
162
162
  }, 200)));
163
163
  };
164
- clearTimeout(o.current), o.current = setTimeout(() => {
164
+ clearTimeout(s.current), s.current = setTimeout(() => {
165
165
  U();
166
- }, l);
166
+ }, n);
167
167
  } else {
168
168
  if (S.current !== P.current) {
169
- const r = m.get().data;
170
- S.current = "", y.current !== "" && (C.emit("exposedPauseAd", {
169
+ const o = m.get().data;
170
+ S.current = "", g.current !== "" && (T.emit("exposedPauseAd", {
171
171
  action: "disabled",
172
- payload: y.current === (r == null ? void 0 : r.url) ? {
173
- id: r == null ? void 0 : r.id,
174
- parentId: r == null ? void 0 : r.parentId
172
+ payload: g.current === o?.url ? {
173
+ id: o?.id,
174
+ parentId: o?.parentId
175
175
  } : {}
176
- }), y.current = "");
176
+ }), g.current = "");
177
177
  }
178
- A(!0), o.current = setTimeout(() => {
179
- g(!1);
178
+ A(!0), s.current = setTimeout(() => {
179
+ I(!1);
180
180
  }, 400);
181
181
  }
182
182
  return () => {
183
- o.current && clearTimeout(o.current);
183
+ s.current && clearTimeout(s.current);
184
184
  };
185
- }, [m, x, l, i, h]), c(() => {
186
- a == null || a({ rendered: p });
187
- }, [p, a]), c(() => () => {
188
- a == null || a({ rendered: !1 });
189
- }, [a]), !p || !k.data ? null : /* @__PURE__ */ s(
185
+ }, [m, E, n, i, v]), c(() => {
186
+ u?.({ rendered: p });
187
+ }, [p, u]), c(() => () => {
188
+ u?.({ rendered: !1 });
189
+ }, [u]), !p || !k.data ? null : /* @__PURE__ */ r(
190
190
  te,
191
191
  {
192
- onClose: x,
193
- isClosing: T,
192
+ onClose: E,
193
+ isClosing: C,
194
194
  title: e,
195
- caption: I,
196
- onPlay: M,
197
- vastUrl: h,
195
+ caption: y,
196
+ onPlay: F,
197
+ vastUrl: v,
198
198
  options: t,
199
- isDesktop: f,
199
+ isDesktop: h,
200
200
  externalPauseAdStore: m,
201
201
  content: k.data
202
202
  }
203
203
  );
204
- }, ne = ({
204
+ }, ae = ({
205
205
  showPauseAd: i,
206
- pauseAdVastUrl: n,
206
+ pauseAdVastUrl: a,
207
207
  videoPlayerController: e,
208
- onRenderPauseAd: I,
209
- onClosePauseAd: v,
210
- children: u,
211
- options: a
208
+ onRenderPauseAd: y,
209
+ onClosePauseAd: f,
210
+ children: l,
211
+ options: u
212
212
  }) => {
213
- const t = K(), f = G(), l = E();
214
- return c(() => t ? (e && (l.current = e, t.addVideoPlayerController(l.current)), () => {
215
- l.current && t.removeVideoPlayerController(l.current);
213
+ const t = z(), h = G(), n = x();
214
+ return c(() => t ? (e && (n.current = e, t.addVideoPlayerController(n.current)), () => {
215
+ n.current && t.removeVideoPlayerController(n.current);
216
216
  }) : () => {
217
- }, [t, e]), t ? /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ w(
218
- N,
217
+ }, [t, e]), t ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ D(
218
+ M,
219
219
  {
220
- style: u ? { position: "relative" } : {},
221
- customTheme: f.theme,
222
- themeMode: f.themeMode,
220
+ style: l ? { position: "relative" } : {},
221
+ customTheme: h.theme,
222
+ themeMode: h.themeMode,
223
223
  children: [
224
- u,
225
- n && /* @__PURE__ */ s(
224
+ l,
225
+ a && /* @__PURE__ */ r(
226
226
  se,
227
227
  {
228
228
  sdk: t,
229
229
  showPauseAd: i,
230
- vastUrls: n,
231
- onClose: v,
232
- onRender: I,
233
- options: a,
230
+ vastUrls: a,
231
+ onClose: f,
232
+ onRender: y,
233
+ options: u,
234
234
  isDesktop: !0
235
235
  }
236
236
  )
237
237
  ]
238
238
  }
239
- ) }) : u;
239
+ ) }) : l;
240
240
  };
241
- class pe extends z {
242
- constructor(n) {
243
- super(n), this.state = { hasError: !1 };
241
+ class pe extends K {
242
+ constructor(a) {
243
+ super(a), this.state = { hasError: !1 };
244
244
  }
245
245
  static getDerivedStateFromError() {
246
246
  return { hasError: !0 };
247
247
  }
248
- componentDidCatch(n, e) {
249
- console.error(n, e.componentStack);
248
+ componentDidCatch(a, e) {
249
+ console.error(a, e.componentStack);
250
250
  }
251
251
  render() {
252
- return this.state.hasError ? this.props.children : /* @__PURE__ */ s(ne, { ...this.props });
252
+ return this.state.hasError ? this.props.children : /* @__PURE__ */ r(ae, { ...this.props });
253
253
  }
254
254
  }
255
255
  export {
@@ -1,13 +1,13 @@
1
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import { m as u, h as d } from "./index7.js";
3
- import { useState as f, useEffect as y } from "react";
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import { m as c, h as u } from "./index8.js";
3
+ import { useState as d, useEffect as f } from "react";
4
4
  import { s as o, u as h } from "./sl-types.js";
5
- import { e as a } from "./index5.js";
6
- import { d as S } from "./index3.js";
7
- import { B as v } from "./index4.js";
8
- import { F as c } from "./feature.js";
9
- import { S as g } from "./useStreamLayerApp2.js";
10
- import { B as k, z as A } from "./hooks-WfHlJH12.js";
5
+ import { e as n } from "./index4.js";
6
+ import { p as y } from "./index3.js";
7
+ import { B as S } from "./index6.js";
8
+ import { F as m } from "./feature.js";
9
+ import { S as v } from "./useStreamLayerApp2.js";
10
+ import { Y as g, _ as A } from "./hooks-n9ax4LRT.js";
11
11
  const I = /* @__PURE__ */ o("div")({
12
12
  name: "PointsContainer",
13
13
  class: "psiob9b",
@@ -16,7 +16,7 @@ const I = /* @__PURE__ */ o("div")({
16
16
  name: "PointsIcon",
17
17
  class: "p1gqe4lh",
18
18
  propsAsIs: !1
19
- }), b = () => v, B = /* @__PURE__ */ o(b())({
19
+ }), b = () => S, k = /* @__PURE__ */ o(b())({
20
20
  name: "PointsSvg",
21
21
  class: "p15syg2y",
22
22
  propsAsIs: !0
@@ -32,47 +32,46 @@ const I = /* @__PURE__ */ o("div")({
32
32
  name: "PointsValue",
33
33
  class: "prj9b3v",
34
34
  propsAsIs: !1
35
- }), C = ({ points: s, onClick: t }) => /* @__PURE__ */ p(I, { className: u, onClick: t, children: [
36
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(B, { name: "icon-trophy-solid" }) }),
35
+ }), B = ({ points: s, onClick: e }) => /* @__PURE__ */ p(I, { className: c, onClick: e, children: [
36
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(k, { name: "icon-trophy-solid" }) }),
37
37
  /* @__PURE__ */ p(F, { children: [
38
- /* @__PURE__ */ e(T, { children: "Total points" }),
39
- /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(S, { value: s }) })
38
+ /* @__PURE__ */ t(T, { children: "Total points" }),
39
+ /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(y, { value: s }) })
40
40
  ] })
41
- ] }), j = ({ gamification: s }) => {
42
- const t = s.userSummary.$store, [r, l] = f(0);
43
- return y(() => {
44
- const n = t.subscribe((i) => {
45
- var m;
46
- (m = i == null ? void 0 : i.summary) != null && m.points && l(i.summary.points);
41
+ ] }), C = ({ gamification: s }) => {
42
+ const e = s.userSummary.$store, [a, l] = d(0);
43
+ return f(() => {
44
+ const r = e.subscribe((i) => {
45
+ i?.summary?.points && l(i.summary.points);
47
46
  });
48
47
  return () => {
49
- n();
48
+ r();
50
49
  };
51
- }, [t]), /* @__PURE__ */ e(C, { points: r, onClick: () => {
52
- const n = s.status.get();
53
- n === c.Suspended ? (s.openFeature(), a.emit("app", {
50
+ }, [e]), /* @__PURE__ */ t(B, { points: a, onClick: () => {
51
+ const r = s.status.get();
52
+ r === m.Suspended ? (s.openFeature(), n.emit("app", {
54
53
  action: "open",
55
54
  payload: {}
56
- }), a.emit("interactions", {
55
+ }), n.emit("interactions", {
57
56
  action: "tap",
58
57
  payload: {}
59
- })) : n === c.Ready && (s.closeFeature(!1), a.emit("app", {
58
+ })) : r === m.Ready && (s.closeFeature(!1), n.emit("app", {
60
59
  action: "close",
61
60
  payload: {}
62
- }), a.emit("interactions", {
61
+ }), n.emit("interactions", {
63
62
  action: "tap",
64
63
  payload: {}
65
64
  }));
66
65
  } });
67
- }, L = ({ sdk: s }) => {
66
+ }, $ = ({ sdk: s }) => {
68
67
  if (!h(s.featuresList.getStore()))
69
68
  return null;
70
- const t = s.getFeature(g.GAMES);
71
- return t ? /* @__PURE__ */ e(j, { gamification: t }) : null;
72
- }, V = ({ theme: s }) => {
73
- const t = k(), r = A();
74
- return t ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(d, { customTheme: s ?? r.theme, themeMode: r.themeMode, children: /* @__PURE__ */ e(L, { sdk: t }) }) }) : null;
69
+ const e = s.getFeature(v.GAMES);
70
+ return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
71
+ }, O = ({ theme: s }) => {
72
+ const e = g(), a = A();
73
+ return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(u, { customTheme: s ?? a.theme, themeMode: a.themeMode, children: /* @__PURE__ */ t($, { sdk: e }) }) }) : null;
75
74
  };
76
75
  export {
77
- V as StreamLayerSDKPoints
76
+ O as StreamLayerSDKPoints
78
77
  };