@streamlayer/react 1.21.4 → 1.22.2

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 (168) hide show
  1. package/lib/app/masters.d.ts +2 -5
  2. package/lib/app/pause-ad.d.ts +1 -10
  3. package/lib/app/useStreamLayerApp.d.ts +1 -23
  4. package/lib/cjs/Question.js +1 -0
  5. package/lib/cjs/advertisement.js +40 -40
  6. package/lib/cjs/analytics.js +1 -0
  7. package/lib/cjs/auth.js +1 -1
  8. package/lib/cjs/bet-pack.js +1 -1
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/hooks-B0Qttldg.js +1 -0
  11. package/lib/cjs/index-DSi8Qgfs.js +1 -0
  12. package/lib/cjs/index.js +1 -1
  13. package/lib/cjs/index10.js +1 -0
  14. package/lib/cjs/index11.js +4 -0
  15. package/lib/cjs/index12.js +1 -0
  16. package/lib/cjs/index13.js +1 -0
  17. package/lib/cjs/index14.js +1 -0
  18. package/lib/cjs/index15.js +1 -0
  19. package/lib/cjs/index16.js +5 -0
  20. package/lib/cjs/index2.js +1 -5
  21. package/lib/cjs/index3.js +1 -0
  22. package/lib/cjs/index4.js +5 -0
  23. package/lib/cjs/index5.js +1 -0
  24. package/lib/cjs/index6.js +1 -0
  25. package/lib/cjs/index7.js +5 -0
  26. package/lib/cjs/index8.js +1 -0
  27. package/lib/cjs/index9.js +1 -0
  28. package/lib/cjs/insight.js +1 -1
  29. package/lib/cjs/masters.js +1 -1
  30. package/lib/cjs/masters2.js +6 -6
  31. package/lib/cjs/notification.js +1 -1
  32. package/lib/cjs/pause-ad.js +1 -1
  33. package/lib/cjs/points.js +1 -1
  34. package/lib/cjs/sl-types.js +15 -0
  35. package/lib/cjs/storage.js +1 -0
  36. package/lib/cjs/theme.js +17 -0
  37. package/lib/cjs/useStreamLayerApp.js +1 -1
  38. package/lib/cjs/useStreamLayerApp2.js +9 -9
  39. package/lib/cjs/utils.js +47 -0
  40. package/lib/cjs/vast-client.min.js +1 -0
  41. package/lib/classic/app/masters.d.ts +2 -5
  42. package/lib/classic/app/pause-ad.d.ts +1 -10
  43. package/lib/classic/app/useStreamLayerApp.d.ts +1 -23
  44. package/lib/classic/cjs/Question.js +1 -0
  45. package/lib/classic/cjs/advertisement.js +40 -40
  46. package/lib/classic/cjs/analytics.js +1 -0
  47. package/lib/classic/cjs/auth.js +1 -1
  48. package/lib/classic/cjs/bet-pack.js +4 -4
  49. package/lib/classic/cjs/gamification-feature.js +1 -1
  50. package/lib/classic/cjs/hooks-B0Qttldg.js +1 -0
  51. package/lib/classic/cjs/index-DSi8Qgfs.js +1 -0
  52. package/lib/classic/cjs/index.js +1 -1
  53. package/lib/classic/cjs/index10.js +1 -0
  54. package/lib/classic/cjs/index11.js +1 -0
  55. package/lib/classic/cjs/index12.js +1 -0
  56. package/lib/classic/cjs/index13.js +4 -0
  57. package/lib/classic/cjs/index2.js +5 -0
  58. package/lib/classic/cjs/index3.js +1 -0
  59. package/lib/classic/cjs/index4.js +1 -0
  60. package/lib/classic/cjs/index5.js +1 -0
  61. package/lib/classic/cjs/index6.js +5 -0
  62. package/lib/classic/cjs/index7.js +1 -0
  63. package/lib/classic/cjs/index8.js +1 -0
  64. package/lib/classic/cjs/index9.js +1 -0
  65. package/lib/classic/cjs/insight.js +1 -1
  66. package/lib/classic/cjs/notification.js +1 -1
  67. package/lib/classic/cjs/notification2.js +1 -0
  68. package/lib/classic/cjs/pause-ad.js +1 -1
  69. package/lib/classic/cjs/points.js +1 -1
  70. package/lib/classic/cjs/sl-types.js +15 -0
  71. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  72. package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
  73. package/lib/classic/cjs/utils.js +47 -0
  74. package/lib/classic/cjs/vast-client.min.js +1 -0
  75. package/lib/classic/es/Question.js +392 -0
  76. package/lib/classic/es/advertisement.js +10375 -10374
  77. package/lib/classic/es/analytics.js +28 -0
  78. package/lib/classic/es/auth.js +4 -4
  79. package/lib/classic/es/bet-pack.js +56 -51
  80. package/lib/classic/es/gamification-feature.js +1 -1
  81. package/lib/classic/es/hooks-B0Qttldg.js +98 -0
  82. package/lib/classic/es/index-DSi8Qgfs.js +65 -0
  83. package/lib/classic/es/index.js +14 -15
  84. package/lib/classic/es/index10.js +87 -0
  85. package/lib/classic/es/index11.js +2361 -0
  86. package/lib/classic/es/index12.js +183 -0
  87. package/lib/classic/es/index13.js +835 -0
  88. package/lib/classic/es/index2.js +2621 -0
  89. package/lib/classic/es/index3.js +64 -0
  90. package/lib/classic/es/index4.js +19 -0
  91. package/lib/classic/es/index5.js +285 -0
  92. package/lib/classic/es/{index-l-eyvmpL.js → index6.js} +937 -937
  93. package/lib/classic/es/index7.js +7 -0
  94. package/lib/classic/es/index8.js +11 -0
  95. package/lib/classic/es/index9.js +319 -0
  96. package/lib/classic/es/insight.js +31 -32
  97. package/lib/classic/es/notification.js +7 -1006
  98. package/lib/classic/es/notification2.js +1117 -0
  99. package/lib/classic/es/pause-ad.js +139 -138
  100. package/lib/classic/es/points.js +39 -38
  101. package/lib/classic/es/sl-types.js +258 -0
  102. package/lib/classic/es/useStreamLayerApp.js +1 -2
  103. package/lib/classic/es/useStreamLayerApp2.js +2400 -2283
  104. package/lib/classic/es/utils.js +76 -0
  105. package/lib/{es/vast-client.min-B0NUra1B.js → classic/es/vast-client.min.js} +338 -338
  106. package/lib/classic/index.d.ts +5 -13
  107. package/lib/classic/masters.d.ts +1 -1
  108. package/lib/dist/cjs/index.js +1 -1
  109. package/lib/dist/cjs/masters.js +30 -30
  110. package/lib/dist/es/index.js +2 -2
  111. package/lib/dist/es/masters.js +5813 -6063
  112. package/lib/dist/index.d.ts +1332 -0
  113. package/lib/dist/style.css +1 -1
  114. package/lib/es/Question.js +136 -0
  115. package/lib/es/advertisement.js +10375 -10374
  116. package/lib/es/analytics.js +28 -0
  117. package/lib/es/auth.js +4 -4
  118. package/lib/es/bet-pack.js +7 -6
  119. package/lib/es/gamification-feature.js +1 -1
  120. package/lib/es/hooks-B0Qttldg.js +98 -0
  121. package/lib/es/index-DSi8Qgfs.js +65 -0
  122. package/lib/es/index.js +13 -14
  123. package/lib/es/index10.js +267 -0
  124. package/lib/es/index11.js +835 -0
  125. package/lib/es/index12.js +183 -0
  126. package/lib/es/index13.js +319 -0
  127. package/lib/es/index14.js +87 -0
  128. package/lib/es/index15.js +2355 -0
  129. package/lib/es/index16.js +1254 -0
  130. package/lib/es/index2.js +1349 -3363
  131. package/lib/es/index3.js +64 -0
  132. package/lib/es/index4.js +3418 -0
  133. package/lib/es/index5.js +19 -0
  134. package/lib/es/index6.js +285 -0
  135. package/lib/es/{index-l-eyvmpL.js → index7.js} +937 -937
  136. package/lib/es/index8.js +7 -0
  137. package/lib/es/index9.js +11 -0
  138. package/lib/es/insight.js +31 -32
  139. package/lib/es/masters.js +6 -5
  140. package/lib/es/masters2.js +189 -176
  141. package/lib/es/notification.js +124 -119
  142. package/lib/es/pause-ad.js +140 -139
  143. package/lib/es/points.js +40 -38
  144. package/lib/es/sl-types.js +277 -0
  145. package/lib/es/storage.js +113 -0
  146. package/lib/es/theme.js +47 -0
  147. package/lib/es/useStreamLayerApp.js +1 -2
  148. package/lib/es/useStreamLayerApp2.js +2399 -2282
  149. package/lib/es/utils.js +76 -0
  150. package/lib/{classic/es/vast-client.min-B0NUra1B.js → es/vast-client.min.js} +338 -338
  151. package/lib/index.d.ts +5 -13
  152. package/lib/masters.d.ts +1 -1
  153. package/lib/style.css +1 -1
  154. package/package.json +13 -48
  155. package/lib/app/event.d.ts +0 -6
  156. package/lib/app/provider.d.ts +0 -49
  157. package/lib/cjs/index-l-eyvmpL.js +0 -5
  158. package/lib/cjs/provider.js +0 -84
  159. package/lib/cjs/vast-client.min-B0NUra1B.js +0 -1
  160. package/lib/classic/app/event.d.ts +0 -6
  161. package/lib/classic/app/provider.d.ts +0 -49
  162. package/lib/classic/cjs/index-l-eyvmpL.js +0 -5
  163. package/lib/classic/cjs/provider.js +0 -68
  164. package/lib/classic/cjs/vast-client.min-B0NUra1B.js +0 -1
  165. package/lib/classic/es/provider.js +0 -7617
  166. package/lib/dist/cjs/gamification-feature2.js +0 -1
  167. package/lib/dist/es/gamification-feature2.js +0 -285
  168. package/lib/es/provider.js +0 -7693
@@ -0,0 +1,1117 @@
1
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
2
+ import { h as gs } from "./index7.js";
3
+ import { useState as w, useRef as ss, useEffect as y, useCallback as ws, useMemo as ys } from "react";
4
+ import { s as e, u as Ts, a as z } from "./sl-types.js";
5
+ import { e as bs } from "./index3.js";
6
+ import { e as M, D as Cs, a as fs, o as ks } from "./index12.js";
7
+ import { e as Ns, i as Q } from "./index8.js";
8
+ import { B as I } from "./index5.js";
9
+ import { f, Q as A, c as R, a as v, N as D, S as qs, b as V } from "./useStreamLayerApp2.js";
10
+ import { O } from "./index10.js";
11
+ import { E as Ss, y as Es } from "./index9.js";
12
+ import { d as Ls } from "./index4.js";
13
+ import { B as Ds, z as xs, F as Ms } from "./hooks-B0Qttldg.js";
14
+ const Rs = /* @__PURE__ */ e("div")({
15
+ name: "QuestionItem",
16
+ class: "q1w97g3p",
17
+ propsAsIs: !1
18
+ }), Os = /* @__PURE__ */ e("div")({
19
+ name: "QuestionCaption",
20
+ class: "q2sl39u",
21
+ propsAsIs: !1
22
+ }), Bs = /* @__PURE__ */ e("div")({
23
+ name: "QuestionBody",
24
+ class: "qd5h0uc",
25
+ propsAsIs: !1
26
+ }), js = /* @__PURE__ */ e("div")({
27
+ name: "QuestionAction",
28
+ class: "q105uluy",
29
+ propsAsIs: !1
30
+ }), Ps = () => I, k = /* @__PURE__ */ e(Ps())({
31
+ name: "QuestionActionIcon",
32
+ class: "q1fa0b9h",
33
+ propsAsIs: !0
34
+ }), zs = () => k, Qs = /* @__PURE__ */ e(zs())({
35
+ name: "QuestionCheckIcon",
36
+ class: "qxlt78s",
37
+ propsAsIs: !0
38
+ }), Vs = () => I, Fs = /* @__PURE__ */ e(Vs())({
39
+ name: "QuestionTypeIcon",
40
+ class: "qmg0vkx",
41
+ propsAsIs: !0
42
+ }), Us = /* @__PURE__ */ e("div")({
43
+ name: "QuestionTypeLabel",
44
+ class: "q1uz5j1g",
45
+ propsAsIs: !1
46
+ }), _s = /* @__PURE__ */ e("div")({
47
+ name: "QuestionContent",
48
+ class: "qc3icwa",
49
+ propsAsIs: !1
50
+ }), Ws = /* @__PURE__ */ e("button")({
51
+ name: "PlayButton",
52
+ class: "p169lohr",
53
+ propsAsIs: !1
54
+ }), Ys = /* @__PURE__ */ e("div")({
55
+ name: "SkeletonContainer",
56
+ class: "s1f43z3r",
57
+ propsAsIs: !1
58
+ }), Ks = () => Ns, Gs = /* @__PURE__ */ e(Ks())({
59
+ name: "SkeletonButton",
60
+ class: "s16k8geu",
61
+ propsAsIs: !0
62
+ }), Hs = {
63
+ [f.LOST]: /* @__PURE__ */ s(k, { name: "incorrectVoted" }),
64
+ [f.WON]: /* @__PURE__ */ s(Qs, { name: "icon-check" }),
65
+ [f.UNSET]: /* @__PURE__ */ s(k, { name: "icon-arrow" }),
66
+ [f.DNP]: /* @__PURE__ */ s(k, { name: "icon-arrow" })
67
+ }, ai = () => /* @__PURE__ */ c(Ys, { children: [
68
+ /* @__PURE__ */ s(Q, { loading: !0, style: { width: "35%" } }),
69
+ /* @__PURE__ */ s(Q, { loading: !0, style: { width: "70%" } }),
70
+ /* @__PURE__ */ s(Gs, {})
71
+ ] }), B = ({ questionTypeData: n, questionType: i, questionStatus: t }) => /* @__PURE__ */ c(Os, { className: "SL_QuestionCaption", children: [
72
+ /* @__PURE__ */ s(
73
+ Fs,
74
+ {
75
+ className: "SL_QuestionTypeIcon",
76
+ "data-testid": "question-type-icon",
77
+ "data-type-trivia": i === A.TRIVIA,
78
+ "data-type-poll": i === A.POLL,
79
+ name: n.iconName
80
+ }
81
+ ),
82
+ /* @__PURE__ */ c(Us, { className: "SL_QuestionTypeLabel", children: [
83
+ n.label,
84
+ i === A.TRIVIA && t === R.RESOLVED && " • Expired"
85
+ ] })
86
+ ] }), ri = ({
87
+ questionId: n,
88
+ questionType: i,
89
+ questionStatus: t,
90
+ subject: o,
91
+ openForVoting: a,
92
+ status: p
93
+ }) => {
94
+ const d = M[i], r = Hs[p];
95
+ return d ? /* @__PURE__ */ c(Rs, { "data-a": "intr", "data-name": n, children: [
96
+ /* @__PURE__ */ c(_s, { children: [
97
+ /* @__PURE__ */ s(
98
+ B,
99
+ {
100
+ questionTypeData: d,
101
+ questionType: i,
102
+ questionStatus: t
103
+ }
104
+ ),
105
+ /* @__PURE__ */ s(Bs, { children: o || "" })
106
+ ] }),
107
+ /* @__PURE__ */ s(js, { children: a ? /* @__PURE__ */ s(Ws, { "data-a": "intr", "data-name": n, children: "Play" }) : r })
108
+ ] }) : null;
109
+ };
110
+ var F;
111
+ (function(n) {
112
+ n.OPENED = "opened";
113
+ })(F || (F = {}));
114
+ const b = /* @__PURE__ */ e("div")({
115
+ name: "Media",
116
+ class: "m1bcvojl",
117
+ propsAsIs: !1
118
+ }), Xs = () => b, Js = /* @__PURE__ */ e(Xs())({
119
+ name: "MediaImgBottom",
120
+ class: "m58gin0",
121
+ propsAsIs: !0
122
+ }), Zs = () => b, L = /* @__PURE__ */ e(Zs())({
123
+ name: "MediaImgSolid",
124
+ class: "m1atm8do",
125
+ propsAsIs: !0
126
+ }), se = () => b, ee = /* @__PURE__ */ e(se())({
127
+ name: "MediaImgRounded",
128
+ class: "myx3xoi",
129
+ propsAsIs: !0
130
+ }), ne = () => b, oe = /* @__PURE__ */ e(ne())({
131
+ name: "MediaImgCentered",
132
+ class: "m1bwv0gx",
133
+ propsAsIs: !0
134
+ }), ie = () => b, te = /* @__PURE__ */ e(ie())({
135
+ name: "MediaImgInsight",
136
+ class: "mntjanp",
137
+ propsAsIs: !0
138
+ }), ae = /* @__PURE__ */ e("div")({
139
+ name: "VideoIcon",
140
+ class: "v1kofb47",
141
+ propsAsIs: !1
142
+ }), re = {
143
+ [v.UNSET]: L,
144
+ [v.NONE]: L,
145
+ [v.ROUNDED]: ee,
146
+ [v.CENTERED]: oe,
147
+ [v.TRANSPARENT]: Js,
148
+ [v.SOLID]: L
149
+ }, U = ({
150
+ src: n,
151
+ imageMode: i = v.UNSET,
152
+ withVideo: t,
153
+ fromInsight: o
154
+ }) => {
155
+ if (i === v.NONE)
156
+ return null;
157
+ const a = o ? te : re[i];
158
+ return /* @__PURE__ */ c(a, {
159
+ children: [/* @__PURE__ */ s("img", {
160
+ src: n,
161
+ alt: ""
162
+ }), t && /* @__PURE__ */ s(ae, {
163
+ children: /* @__PURE__ */ s(I, {
164
+ name: "icon-play"
165
+ })
166
+ })]
167
+ });
168
+ }, ce = /* @__PURE__ */ e("div")({
169
+ name: "NotificationContent",
170
+ class: "nuraq9m",
171
+ propsAsIs: !1
172
+ }), le = /* @__PURE__ */ e("div")({
173
+ name: "NotificationContainer",
174
+ class: "ns1nzpg",
175
+ propsAsIs: !1
176
+ }), es = /* @__PURE__ */ e("div")({
177
+ name: "Body",
178
+ class: "b1j59nzs",
179
+ propsAsIs: !1
180
+ }), de = /* @__PURE__ */ e("div")({
181
+ name: "Title",
182
+ class: "t9vmnpp",
183
+ propsAsIs: !1
184
+ }), pe = /* @__PURE__ */ e("button")({
185
+ name: "Button",
186
+ class: "b14ivj5k",
187
+ propsAsIs: !1
188
+ }), ue = () => I, me = /* @__PURE__ */ e(ue())({
189
+ name: "StyledChevronRight",
190
+ class: "s1atci8n",
191
+ propsAsIs: !0
192
+ }), ve = /* @__PURE__ */ e("div")({
193
+ name: "QuoteWrap",
194
+ class: "q4w8jgs",
195
+ propsAsIs: !1
196
+ }), Ie = /* @__PURE__ */ e("blockquote")({
197
+ name: "Quote",
198
+ class: "qaa0kez",
199
+ propsAsIs: !1
200
+ }), Ae = /* @__PURE__ */ e("div")({
201
+ name: "Body",
202
+ class: "b1wvd52w",
203
+ propsAsIs: !1
204
+ }), he = /* @__PURE__ */ e("div")({
205
+ name: "Container",
206
+ class: "ccvukea",
207
+ propsAsIs: !1
208
+ }), $e = ({ image: n, tweet: i, account: t, accountVerified: o, body: a, title: p }) => {
209
+ var d;
210
+ return /* @__PURE__ */ c(he, { children: [
211
+ p && /* @__PURE__ */ s(ve, { children: /* @__PURE__ */ s(Ie, { children: p }) }),
212
+ /* @__PURE__ */ s(
213
+ Cs,
214
+ {
215
+ image: n,
216
+ name: (d = i == null ? void 0 : i.meta) == null ? void 0 : d.accountName,
217
+ userName: t,
218
+ verified: o,
219
+ createdTweet: i == null ? void 0 : i.date
220
+ }
221
+ ),
222
+ /* @__PURE__ */ s(Ae, { children: fs(a) })
223
+ ] });
224
+ }, ge = ({ title: n, questionType: i, questionTypeData: t }) => /* @__PURE__ */ c(es, { children: [
225
+ /* @__PURE__ */ s(
226
+ B,
227
+ {
228
+ questionTypeData: t,
229
+ questionType: i,
230
+ questionStatus: R.UNSET
231
+ }
232
+ ),
233
+ n && /* @__PURE__ */ s(de, { children: n })
234
+ ] }), we = ({ tweet: n }) => n ? /* @__PURE__ */ s(es, { children: /* @__PURE__ */ s($e, { ...n, controlVideo: () => {
235
+ } }) }) : null, ye = ({ action: n, questionType: i, inApp: t, insight: o, tweet: a }) => {
236
+ var p;
237
+ const d = M[i], r = ks[i];
238
+ if (!d || !t || !t.notification)
239
+ return null;
240
+ const { title: u, image: m, imageMode: $ } = t.notification;
241
+ let h = m;
242
+ i === A.TWEET && a != null && a.tweetMedia && (h = a.tweetMedia.image), $ === v.NONE && (h = "");
243
+ const g = t.useMediaFromContent && (o == null ? void 0 : o.image), l = i === A.TWEET && ((p = a == null ? void 0 : a.tweetMedia) == null ? void 0 : p.video) || i === A.FACTOID && (o == null ? void 0 : o.video);
244
+ return /* @__PURE__ */ s(le, { "data-a": "intr", className: "SL_InApp", onClick: n, children: /* @__PURE__ */ c(ce, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
245
+ h && !g && /* @__PURE__ */ s(U, { src: h, imageMode: $, withVideo: !!l }),
246
+ g && /* @__PURE__ */ s(U, { src: g, fromInsight: !0, withVideo: !!l }),
247
+ i === A.TWEET ? /* @__PURE__ */ s(we, { tweet: a }) : /* @__PURE__ */ s(ge, { questionTypeData: d, questionType: i, title: u }),
248
+ /* @__PURE__ */ s(pe, { name: "inapp-button", children: r || "Open" }),
249
+ /* @__PURE__ */ s(me, { name: "chevronRight" })
250
+ ] }) });
251
+ }, Te = () => ({
252
+ color: n
253
+ }) => n || "transparent", _ = /* @__PURE__ */ e("div")({
254
+ name: "MediaComponentWrap",
255
+ class: "mek728j",
256
+ propsAsIs: !1,
257
+ vars: {
258
+ "mek728j-0": [Te()]
259
+ }
260
+ }), T = /* @__PURE__ */ e("div")({
261
+ name: "Media",
262
+ class: "m461t56",
263
+ propsAsIs: !1
264
+ }), be = () => T, Ce = /* @__PURE__ */ e(be())({
265
+ name: "MediaImgBottom",
266
+ class: "m22bh04",
267
+ propsAsIs: !0
268
+ }), fe = () => T, ke = /* @__PURE__ */ e(fe())({
269
+ name: "MediaVideo",
270
+ class: "m17u1e34",
271
+ propsAsIs: !0
272
+ }), Ne = () => T, qe = /* @__PURE__ */ e(Ne())({
273
+ name: "MediaImgContentMedia",
274
+ class: "m4j3eds",
275
+ propsAsIs: !0
276
+ }), Se = () => T, Ee = /* @__PURE__ */ e(Se())({
277
+ name: "MediaImgSolid",
278
+ class: "m1lp3swr",
279
+ propsAsIs: !0
280
+ }), Le = () => T, De = /* @__PURE__ */ e(Le())({
281
+ name: "MediaImgRounded",
282
+ class: "mc7lij",
283
+ propsAsIs: !0
284
+ }), xe = () => T, Me = /* @__PURE__ */ e(xe())({
285
+ name: "MediaImgCentered",
286
+ class: "mwwaw7o",
287
+ propsAsIs: !0
288
+ }), Re = () => T, x = /* @__PURE__ */ e(Re())({
289
+ name: "MediaNone",
290
+ class: "mqfzyyr",
291
+ propsAsIs: !0
292
+ }), Oe = "v170mtgf", Be = {
293
+ [v.UNSET]: x,
294
+ [v.NONE]: x,
295
+ [v.ROUNDED]: De,
296
+ [v.CENTERED]: Me,
297
+ [v.TRANSPARENT]: Ce,
298
+ [v.SOLID]: Ee
299
+ }, W = ({
300
+ src: n,
301
+ imageMode: i = v.UNSET,
302
+ withVideo: t,
303
+ color: o,
304
+ useContentMedia: a,
305
+ thumbnailUrl: p
306
+ }) => {
307
+ if (!n)
308
+ return /* @__PURE__ */ s(_, {
309
+ color: o,
310
+ children: /* @__PURE__ */ s(x, {})
311
+ });
312
+ const d = a === D.ENABLED ? qe : Be[i];
313
+ return /* @__PURE__ */ s(_, {
314
+ color: o,
315
+ children: t ? /* @__PURE__ */ s(ke, {
316
+ children: /* @__PURE__ */ s(Ss, {
317
+ className: Oe,
318
+ source: n,
319
+ poster: p || ""
320
+ })
321
+ }) : /* @__PURE__ */ s(d, {
322
+ children: /* @__PURE__ */ s("img", {
323
+ src: n,
324
+ alt: ""
325
+ })
326
+ })
327
+ });
328
+ }, je = () => ({
329
+ withoutPadding: n
330
+ }) => n ? "0px" : "1rem", ns = /* @__PURE__ */ e("div")({
331
+ name: "NotificationContent",
332
+ class: "n1p3bk1c",
333
+ propsAsIs: !1,
334
+ vars: {
335
+ "n1p3bk1c-0": [je()]
336
+ }
337
+ }), Pe = /* @__PURE__ */ e("div")({
338
+ name: "MainContent",
339
+ class: "m1g211mu",
340
+ propsAsIs: !1
341
+ }), ze = () => I, Qe = /* @__PURE__ */ e(ze())({
342
+ name: "StyledChevronRight",
343
+ class: "sx1hq4c",
344
+ propsAsIs: !0
345
+ }), os = /* @__PURE__ */ e("div")({
346
+ name: "NotificationContainer",
347
+ class: "n1fcriet",
348
+ propsAsIs: !1
349
+ }), Ve = () => ({
350
+ questionType: n
351
+ }) => n === A.FACTOID ? "7.3rem" : "4.5rem", Fe = () => ({
352
+ webos: n
353
+ }) => n ? "11px 0px 8px 0px" : "11px 0px", Ue = () => ({
354
+ imageMode: n,
355
+ webos: i
356
+ }) => i ? "330px" : n === v.SOLID ? "310px" : n === v.CENTERED || n === v.ROUNDED || n === v.TRANSPARENT ? "370px" : "430px", _e = /* @__PURE__ */ e("div")({
357
+ name: "Body",
358
+ class: "b1byyovs",
359
+ propsAsIs: !1,
360
+ vars: {
361
+ "b1byyovs-0": [Ve()],
362
+ "b1byyovs-1": [Fe()],
363
+ "b1byyovs-2": [Ue()]
364
+ }
365
+ }), We = () => ({
366
+ webos: n
367
+ }) => n ? "0.85rem" : "1.033rem", Ye = () => ({
368
+ webos: n
369
+ }) => n ? "0.95rem" : "1.25rem", Ke = () => ({
370
+ webos: n
371
+ }) => n ? "4.7rem" : "2.25rem", Ge = () => ({
372
+ webos: n
373
+ }) => n ? "pre-wrap" : "nowrap", He = /* @__PURE__ */ e("div")({
374
+ name: "Title",
375
+ class: "t1y5k5id",
376
+ propsAsIs: !1,
377
+ vars: {
378
+ "t1y5k5id-0": [We()],
379
+ "t1y5k5id-1": [Ye()],
380
+ "t1y5k5id-2": [Ke()],
381
+ "t1y5k5id-3": [Ge()]
382
+ }
383
+ }), Xe = /* @__PURE__ */ e("div")({
384
+ name: "Description",
385
+ class: "dw9eb7l",
386
+ propsAsIs: !1
387
+ }), Je = /* @__PURE__ */ e("div")({
388
+ name: "LogoImgContainer",
389
+ class: "ldu8wgy",
390
+ propsAsIs: !1
391
+ }), is = /* @__PURE__ */ e("img")({
392
+ name: "LogoImg",
393
+ class: "ln4a3eh",
394
+ propsAsIs: !1
395
+ }), Ze = () => os, sn = /* @__PURE__ */ e(Ze())({
396
+ name: "NotificationInterstitialContainer",
397
+ class: "no2k63v",
398
+ propsAsIs: !0
399
+ }), en = /* @__PURE__ */ e("div")({
400
+ name: "TVButtons",
401
+ class: "th9nn6a",
402
+ propsAsIs: !1
403
+ }), ts = /* @__PURE__ */ e("button")({
404
+ name: "TVButton",
405
+ class: "t1eee77p",
406
+ propsAsIs: !1
407
+ }), nn = () => ts, on = /* @__PURE__ */ e(nn())({
408
+ name: "DismissButton",
409
+ class: "ds000hw",
410
+ propsAsIs: !0
411
+ }), tn = () => ts, an = /* @__PURE__ */ e(tn())({
412
+ name: "AnswerButton",
413
+ class: "a1nz9hoe",
414
+ propsAsIs: !0
415
+ }), rn = ({ title: n, questionType: i, questionTypeData: t, description: o, imageMode: a, webos: p }) => /* @__PURE__ */ c(_e, { imageMode: a, questionType: i, webos: p, children: [
416
+ /* @__PURE__ */ s(
417
+ B,
418
+ {
419
+ questionTypeData: t,
420
+ questionType: i,
421
+ questionStatus: R.UNSET
422
+ }
423
+ ),
424
+ n && /* @__PURE__ */ s(He, { webos: p, children: n }),
425
+ o && /* @__PURE__ */ s(Xe, { children: o })
426
+ ] }), cn = O(sn), ln = O(on), dn = O(an), pn = ({
427
+ sponsorLogo: n,
428
+ onClick: i,
429
+ webos: t
430
+ }) => /* @__PURE__ */ s(cn, { autoFocus: !0, webos: t, onClick: i, "data-webos": t, children: /* @__PURE__ */ s(ns, { withoutPadding: !0, children: /* @__PURE__ */ s(is, { src: n }) }) }), un = ({
431
+ action: n,
432
+ close: i,
433
+ questionType: t,
434
+ inApp: o,
435
+ insight: a,
436
+ color: p,
437
+ webos: d
438
+ }) => {
439
+ var r, u, m;
440
+ const [$, h] = w(!1), g = ss();
441
+ y(() => (o != null && o.sponsorLogo && (h(!0), g.current = setTimeout(() => {
442
+ h(!1);
443
+ }, 5e3)), () => clearTimeout(g.current)), [o == null ? void 0 : o.sponsorLogo]);
444
+ const l = M[t];
445
+ if (!l || !o || !o.notification)
446
+ return null;
447
+ const { title: vs, image: Is, imageMode: N, useContentMedia: q } = o.notification, As = t === A.FACTOID ? a == null ? void 0 : a.heading : vs, hs = t === A.FACTOID ? a == null ? void 0 : a.body : "", $s = Is, S = t === A.FACTOID && ((r = a == null ? void 0 : a.video) == null ? void 0 : r.url) && (o == null ? void 0 : o.isVideo) && q === D.ENABLED, E = q === D.ENABLED ? S ? (u = a == null ? void 0 : a.video) == null ? void 0 : u.url : a == null ? void 0 : a.image : "";
448
+ return o != null && o.sponsorLogo && $ ? /* @__PURE__ */ s(
449
+ pn,
450
+ {
451
+ sponsorLogo: o == null ? void 0 : o.sponsorLogo,
452
+ webos: d,
453
+ onClick: () => h(!1)
454
+ }
455
+ ) : /* @__PURE__ */ c(
456
+ os,
457
+ {
458
+ "data-a": "intr",
459
+ className: "SL_InApp",
460
+ onClick: (C) => {
461
+ d || n == null || n(C);
462
+ },
463
+ "data-is-insight": t === A.FACTOID,
464
+ "data-webos": d,
465
+ children: [
466
+ (o == null ? void 0 : o.sponsorLogo) && /* @__PURE__ */ s(Je, { children: /* @__PURE__ */ s(is, { src: o == null ? void 0 : o.sponsorLogo }) }),
467
+ /* @__PURE__ */ c(ns, { children: [
468
+ /* @__PURE__ */ c(Pe, { children: [
469
+ !E && /* @__PURE__ */ s(W, { src: $s, imageMode: N, withVideo: !!S, color: p }),
470
+ E && /* @__PURE__ */ s(
471
+ W,
472
+ {
473
+ src: E,
474
+ imageMode: N,
475
+ withVideo: !!S,
476
+ color: p,
477
+ useContentMedia: q,
478
+ thumbnailUrl: (m = a == null ? void 0 : a.video) == null ? void 0 : m.thumbnailUrl
479
+ }
480
+ ),
481
+ /* @__PURE__ */ s(
482
+ rn,
483
+ {
484
+ questionTypeData: l,
485
+ questionType: t,
486
+ title: As,
487
+ description: hs,
488
+ imageMode: N,
489
+ webos: d
490
+ }
491
+ )
492
+ ] }),
493
+ !d && /* @__PURE__ */ s(Qe, { name: "chevronRight" }),
494
+ d && /* @__PURE__ */ c(en, { children: [
495
+ /* @__PURE__ */ s(
496
+ ln,
497
+ {
498
+ webos: !0,
499
+ "data-close-btn": "true",
500
+ onClick: (C) => {
501
+ C.stopPropagation(), i == null || i(C);
502
+ },
503
+ children: "Dismiss"
504
+ }
505
+ ),
506
+ /* @__PURE__ */ s(dn, { webos: !0, autoFocus: !0, onClick: n, children: "Answer" })
507
+ ] })
508
+ ] })
509
+ ]
510
+ }
511
+ );
512
+ }, mn = /* @__PURE__ */ e("div")({
513
+ name: "NotificationContainer",
514
+ class: "n11jcrxe",
515
+ propsAsIs: !1
516
+ }), Y = /* @__PURE__ */ e("img")({
517
+ name: "Icon",
518
+ class: "i1vmpt6u",
519
+ propsAsIs: !1
520
+ }), vn = /* @__PURE__ */ e("div")({
521
+ name: "IconContainer",
522
+ class: "i180665s",
523
+ propsAsIs: !1
524
+ }), In = () => I, An = /* @__PURE__ */ e(In())({
525
+ name: "TitleIcon",
526
+ class: "t16zzzei",
527
+ propsAsIs: !0
528
+ }), hn = () => Es, $n = /* @__PURE__ */ e(hn())({
529
+ name: "Close",
530
+ class: "c1sur0q2",
531
+ propsAsIs: !0
532
+ }), gn = /* @__PURE__ */ e("div")({
533
+ name: "Body",
534
+ class: "bai9j52",
535
+ propsAsIs: !1
536
+ }), wn = /* @__PURE__ */ e("div")({
537
+ name: "Title",
538
+ class: "t1bnt25p",
539
+ propsAsIs: !1
540
+ }), yn = /* @__PURE__ */ e("div")({
541
+ name: "Description",
542
+ class: "dmixjec",
543
+ propsAsIs: !1
544
+ }), Tn = /* @__PURE__ */ e("button")({
545
+ name: "Button",
546
+ class: "b1ubkw1q",
547
+ propsAsIs: !1
548
+ }), bn = ({
549
+ open: n,
550
+ close: i,
551
+ ...t
552
+ }) => {
553
+ var o, a;
554
+ return /* @__PURE__ */ c(
555
+ mn,
556
+ {
557
+ "data-a": "intr",
558
+ onClick: () => {
559
+ n == null || n(), t && t.markIstantOpen();
560
+ },
561
+ children: [
562
+ /* @__PURE__ */ c(vn, { children: [
563
+ /* @__PURE__ */ s(Y, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
564
+ /* @__PURE__ */ s(
565
+ Y,
566
+ {
567
+ className: "on-dark",
568
+ src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
569
+ }
570
+ )
571
+ ] }),
572
+ /* @__PURE__ */ c(gn, { children: [
573
+ /* @__PURE__ */ c(wn, { children: [
574
+ /* @__PURE__ */ s(An, { name: "icon-trophy-solid" }),
575
+ (o = t == null ? void 0 : t.titleCard) == null ? void 0 : o.title
576
+ ] }),
577
+ /* @__PURE__ */ c(yn, { children: [
578
+ /* @__PURE__ */ s("span", { children: (a = t == null ? void 0 : t.titleCard) == null ? void 0 : a.subtitle }),
579
+ /* @__PURE__ */ s(Tn, { name: "inapp-button", children: "Play Now" })
580
+ ] })
581
+ ] }),
582
+ /* @__PURE__ */ s(
583
+ $n,
584
+ {
585
+ close: (p) => {
586
+ p == null || p.stopPropagation(), i == null || i();
587
+ }
588
+ }
589
+ )
590
+ ]
591
+ }
592
+ );
593
+ }, Cn = /* @__PURE__ */ e("div")({
594
+ name: "Container",
595
+ class: "cef8huz",
596
+ propsAsIs: !1
597
+ }), fn = () => I, kn = /* @__PURE__ */ e(fn())({
598
+ name: "CheckIcon",
599
+ class: "c1mo15kk",
600
+ propsAsIs: !0
601
+ }), Nn = () => I, qn = /* @__PURE__ */ e(Nn())({
602
+ name: "PredictionIcon",
603
+ class: "p16zkqnm",
604
+ propsAsIs: !0
605
+ }), Sn = /* @__PURE__ */ e("div")({
606
+ name: "PredictionIconContainer",
607
+ class: "pjszi7a",
608
+ propsAsIs: !1
609
+ }), En = /* @__PURE__ */ e("div")({
610
+ name: "BodyContainer",
611
+ class: "bftbmo3",
612
+ propsAsIs: !1
613
+ }), Ln = /* @__PURE__ */ e("div")({
614
+ name: "Body",
615
+ class: "barrbyu",
616
+ propsAsIs: !1
617
+ }), Dn = /* @__PURE__ */ e("div")({
618
+ name: "Subtitle",
619
+ class: "sz7237i",
620
+ propsAsIs: !1
621
+ }), xn = ({
622
+ step: n,
623
+ children: i,
624
+ answer: t,
625
+ state: o = "pending"
626
+ }) => {
627
+ const [a, p] = w(0), [d] = w(() => new ResizeObserver((u) => {
628
+ window.requestAnimationFrame(() => {
629
+ var m, $;
630
+ p((($ = (m = u == null ? void 0 : u[0]) == null ? void 0 : m.contentRect) == null ? void 0 : $.width) ?? 0);
631
+ });
632
+ })), r = ws((u) => {
633
+ u ? d.observe(u) : d.disconnect();
634
+ }, [d]);
635
+ return y(() => () => {
636
+ d.disconnect();
637
+ }, [d]), /* @__PURE__ */ c(Cn, {
638
+ children: [/* @__PURE__ */ s(Sn, {
639
+ children: /* @__PURE__ */ s(qn, {
640
+ name: "icon-prediction"
641
+ })
642
+ }), /* @__PURE__ */ s(En, {
643
+ style: {
644
+ minWidth: `${a}px`
645
+ },
646
+ children: /* @__PURE__ */ s(Ln, {
647
+ children: i
648
+ }, n)
649
+ }), /* @__PURE__ */ s(Dn, {
650
+ ref: r,
651
+ className: o,
652
+ children: /* @__PURE__ */ c("div", {
653
+ children: [/* @__PURE__ */ s(kn, {
654
+ name: "icon-check"
655
+ }), "Your Pick: ", t]
656
+ })
657
+ })]
658
+ });
659
+ }, Mn = /* @__PURE__ */ e("div")({
660
+ name: "Container",
661
+ class: "ckyzolp",
662
+ propsAsIs: !1
663
+ }), j = /* @__PURE__ */ e("div")({
664
+ name: "Line",
665
+ class: "l16t1zr7",
666
+ propsAsIs: !1
667
+ }), Rn = () => j, On = /* @__PURE__ */ e(Rn())({
668
+ name: "Line1",
669
+ class: "le78kvg",
670
+ propsAsIs: !0
671
+ }), Bn = () => j, jn = /* @__PURE__ */ e(Bn())({
672
+ name: "Line2",
673
+ class: "l1o7966d",
674
+ propsAsIs: !0
675
+ }), Pn = () => j, zn = /* @__PURE__ */ e(Pn())({
676
+ name: "Line3",
677
+ class: "lu9lyxq",
678
+ propsAsIs: !0
679
+ }), Qn = () => /* @__PURE__ */ c(Mn, {
680
+ children: [/* @__PURE__ */ s(On, {
681
+ children: /* @__PURE__ */ s("div", {})
682
+ }), /* @__PURE__ */ s(jn, {
683
+ children: /* @__PURE__ */ s("div", {})
684
+ }), /* @__PURE__ */ s(zn, {
685
+ children: /* @__PURE__ */ s("div", {})
686
+ })]
687
+ }), Vn = /* @__PURE__ */ e("div")({
688
+ name: "Container",
689
+ class: "c10jy6zf",
690
+ propsAsIs: !1
691
+ }), Fn = () => I, Un = /* @__PURE__ */ e(Fn())({
692
+ name: "CheckIcon",
693
+ class: "c1c7scay",
694
+ propsAsIs: !0
695
+ }), _n = () => /* @__PURE__ */ c(Vn, {
696
+ children: [/* @__PURE__ */ s(Un, {
697
+ name: "icon-check"
698
+ }), " Prediction results are in!"]
699
+ }), Wn = /* @__PURE__ */ e("div")({
700
+ name: "Container",
701
+ class: "cf6k2yy",
702
+ propsAsIs: !1
703
+ }), Yn = /* @__PURE__ */ e("div")({
704
+ name: "Caption",
705
+ class: "c1c8xjus",
706
+ propsAsIs: !1
707
+ }), Kn = /* @__PURE__ */ e("div")({
708
+ name: "Title",
709
+ class: "t1d1uekn",
710
+ propsAsIs: !1
711
+ }), Gn = ({
712
+ title: n
713
+ }) => /* @__PURE__ */ c(Wn, {
714
+ children: [/* @__PURE__ */ s(Yn, {
715
+ children: "Results for"
716
+ }), /* @__PURE__ */ s(Kn, {
717
+ children: n
718
+ })]
719
+ }), as = /* @__PURE__ */ e("div")({
720
+ name: "Container",
721
+ class: "c181a1as",
722
+ propsAsIs: !1
723
+ }), rs = /* @__PURE__ */ e("div")({
724
+ name: "Title",
725
+ class: "t1cduox6",
726
+ propsAsIs: !1
727
+ }), Hn = () => I, cs = /* @__PURE__ */ e(Hn())({
728
+ name: "CorrectIcon",
729
+ class: "c1onrv6j",
730
+ propsAsIs: !0
731
+ }), Xn = () => cs, Jn = /* @__PURE__ */ e(Xn())({
732
+ name: "InCorrectIcon",
733
+ class: "i17n9o7e",
734
+ propsAsIs: !0
735
+ }), Zn = () => /* @__PURE__ */ c(as, {
736
+ children: [/* @__PURE__ */ c(rs, {
737
+ children: ["Congratulations!", /* @__PURE__ */ s("br", {}), "You answered correctly."]
738
+ }), /* @__PURE__ */ s(cs, {
739
+ name: "icon-check"
740
+ })]
741
+ }), so = ({
742
+ title: n
743
+ }) => /* @__PURE__ */ c(as, {
744
+ children: [/* @__PURE__ */ c(rs, {
745
+ children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", n]
746
+ }), /* @__PURE__ */ s(Jn, {
747
+ name: "icon-cross"
748
+ })]
749
+ }), eo = /* @__PURE__ */ e("div")({
750
+ name: "Container",
751
+ class: "cnxgcs2",
752
+ propsAsIs: !1
753
+ }), no = /* @__PURE__ */ e("div")({
754
+ name: "Title",
755
+ class: "t903f8n",
756
+ propsAsIs: !1
757
+ }), oo = () => I, io = /* @__PURE__ */ e(oo())({
758
+ name: "CheckIcon",
759
+ class: "ceyu3qj",
760
+ propsAsIs: !0
761
+ }), to = ({
762
+ points: n
763
+ }) => /* @__PURE__ */ c(eo, {
764
+ children: [/* @__PURE__ */ c(no, {
765
+ children: ["You won ", /* @__PURE__ */ s(Ls, {
766
+ delay: 0.5,
767
+ prefix: "+",
768
+ suffix: " points",
769
+ value: n
770
+ })]
771
+ }), /* @__PURE__ */ s(io, {
772
+ name: "icon-trophy-solid"
773
+ })]
774
+ }), K = /* @__PURE__ */ e("div")({
775
+ name: "Container",
776
+ class: "cq3agu2",
777
+ propsAsIs: !1
778
+ }), G = /* @__PURE__ */ e("div")({
779
+ name: "Body",
780
+ class: "b16qj0do",
781
+ propsAsIs: !1
782
+ }), H = {
783
+ 1: 3e3,
784
+ 2: 4e3,
785
+ 3: 4e3,
786
+ 4: 4e3
787
+ }, ao = ({ close: n, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
788
+ if (y(() => {
789
+ if (t) {
790
+ const m = setTimeout(() => {
791
+ H[r + 1] && (a || r < 3) ? t(r + 1) : n == null || n();
792
+ }, H[r]);
793
+ return () => {
794
+ m && clearTimeout(m);
795
+ };
796
+ }
797
+ return () => {
798
+ };
799
+ }, [t, r, n, a]), r === 1)
800
+ return /* @__PURE__ */ s(K, { children: /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(_n, {}) }) });
801
+ let u = "pending";
802
+ return (r === 3 || r === 4) && (u = a ? "correct" : "incorrect"), /* @__PURE__ */ s(K, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ c(G, { children: [
803
+ r !== 1 && /* @__PURE__ */ s(Qn, {}, r),
804
+ /* @__PURE__ */ c(xn, { state: u, step: r, answer: (o == null ? void 0 : o.title) || "unknown", children: [
805
+ r === 2 && /* @__PURE__ */ s(Gn, { title: d || "unknown" }),
806
+ r === 3 && a && /* @__PURE__ */ s(Zn, {}),
807
+ r === 3 && !a && /* @__PURE__ */ s(so, { title: p || "unknown" }),
808
+ r === 4 && /* @__PURE__ */ s(to, { points: (o == null ? void 0 : o.points) || 0 })
809
+ ] })
810
+ ] }) });
811
+ }, ro = ({ close: n, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
812
+ const [d, r] = w(1);
813
+ return /* @__PURE__ */ s(
814
+ ao,
815
+ {
816
+ close: n,
817
+ action: i,
818
+ votedAnswer: t,
819
+ correct: o,
820
+ correctAnswerTitle: a,
821
+ questionTitle: p,
822
+ setStep: r,
823
+ step: d,
824
+ title: ""
825
+ }
826
+ );
827
+ }, co = /* @__PURE__ */ e("div")({
828
+ name: "NotificationContainer",
829
+ class: "n1i4h28u",
830
+ propsAsIs: !1
831
+ }), lo = (n) => /* @__PURE__ */ s(co, { children: /* @__PURE__ */ s(ro, { ...n }) }), po = /* @__PURE__ */ e("div")({
832
+ name: "Container",
833
+ class: "cwa9tgs",
834
+ propsAsIs: !1
835
+ }), uo = /* @__PURE__ */ e("div")({
836
+ name: "BodyContainer",
837
+ class: "b1xx7swj",
838
+ propsAsIs: !1
839
+ }), mo = /* @__PURE__ */ e("div")({
840
+ name: "Body",
841
+ class: "b1a21en",
842
+ propsAsIs: !1
843
+ }), vo = ({
844
+ step: n,
845
+ children: i,
846
+ state: t = "pending"
847
+ }) => {
848
+ const [o, a] = w(0);
849
+ return y(() => {
850
+ const p = new ResizeObserver((d) => {
851
+ window.requestAnimationFrame(() => {
852
+ var r, u;
853
+ const m = ((u = (r = d == null ? void 0 : d[0]) == null ? void 0 : r.contentRect) == null ? void 0 : u.width) ?? 0;
854
+ a(m);
855
+ });
856
+ });
857
+ return () => {
858
+ p.disconnect();
859
+ };
860
+ }, []), /* @__PURE__ */ s(po, {
861
+ style: {
862
+ padding: `${n === 3 && t === "incorrect" || n === 1 ? "5px 100px" : "5px 40px"}`
863
+ },
864
+ children: /* @__PURE__ */ s(uo, {
865
+ style: {
866
+ minWidth: `${o}px`
867
+ },
868
+ children: /* @__PURE__ */ s(mo, {
869
+ children: i
870
+ }, n)
871
+ })
872
+ });
873
+ }, Io = /* @__PURE__ */ e("div")({
874
+ name: "Container",
875
+ class: "c1nd5cu8",
876
+ propsAsIs: !1
877
+ }), P = /* @__PURE__ */ e("div")({
878
+ name: "Line",
879
+ class: "lgbipw0",
880
+ propsAsIs: !1
881
+ }), Ao = () => P, ho = /* @__PURE__ */ e(Ao())({
882
+ name: "Line1",
883
+ class: "l1anth16",
884
+ propsAsIs: !0
885
+ }), $o = () => P, go = /* @__PURE__ */ e($o())({
886
+ name: "Line2",
887
+ class: "l193yd7v",
888
+ propsAsIs: !0
889
+ }), wo = () => P, yo = /* @__PURE__ */ e(wo())({
890
+ name: "Line3",
891
+ class: "lhbflsp",
892
+ propsAsIs: !0
893
+ }), To = () => /* @__PURE__ */ c(Io, {
894
+ children: [/* @__PURE__ */ s(ho, {
895
+ children: /* @__PURE__ */ s("div", {})
896
+ }), /* @__PURE__ */ s(go, {
897
+ children: /* @__PURE__ */ s("div", {})
898
+ }), /* @__PURE__ */ s(yo, {
899
+ children: /* @__PURE__ */ s("div", {})
900
+ })]
901
+ }), bo = /* @__PURE__ */ e("div")({
902
+ name: "Container",
903
+ class: "c1lvd429",
904
+ propsAsIs: !1
905
+ }), Co = () => I, fo = /* @__PURE__ */ e(Co())({
906
+ name: "PredictionIcon",
907
+ class: "p1n4m87t",
908
+ propsAsIs: !0
909
+ }), ko = () => /* @__PURE__ */ c(bo, {
910
+ children: [/* @__PURE__ */ s(fo, {
911
+ name: "icon-prediction"
912
+ }), " Prediction results are in!"]
913
+ }), No = () => I, qo = /* @__PURE__ */ e(No())({
914
+ name: "CheckIcon",
915
+ class: "c126r8f9",
916
+ propsAsIs: !0
917
+ }), So = /* @__PURE__ */ e("div")({
918
+ name: "Answer",
919
+ class: "a1o2rpgl",
920
+ propsAsIs: !1
921
+ }), Eo = /* @__PURE__ */ e("div")({
922
+ name: "Container",
923
+ class: "cej6ci1",
924
+ propsAsIs: !1
925
+ }), Lo = /* @__PURE__ */ e("div")({
926
+ name: "Title",
927
+ class: "tob24mr",
928
+ propsAsIs: !1
929
+ }), Do = ({
930
+ title: n,
931
+ answer: i
932
+ }) => /* @__PURE__ */ c(Eo, {
933
+ children: [/* @__PURE__ */ s(Lo, {
934
+ children: n
935
+ }), /* @__PURE__ */ c(So, {
936
+ children: [/* @__PURE__ */ s(qo, {
937
+ name: "icon-prediction"
938
+ }), "Your Pick: ", i]
939
+ })]
940
+ }), ls = /* @__PURE__ */ e("div")({
941
+ name: "Container",
942
+ class: "c1lesal4",
943
+ propsAsIs: !1
944
+ }), ds = /* @__PURE__ */ e("div")({
945
+ name: "Title",
946
+ class: "tv66n4w",
947
+ propsAsIs: !1
948
+ }), xo = () => I, Mo = /* @__PURE__ */ e(xo())({
949
+ name: "CorrectIcon",
950
+ class: "cx0vlv2",
951
+ propsAsIs: !0
952
+ }), ps = /* @__PURE__ */ e("div")({
953
+ name: "Answer",
954
+ class: "akfh4v5",
955
+ propsAsIs: !1
956
+ }), Ro = ({
957
+ answer: n
958
+ }) => /* @__PURE__ */ c(ls, {
959
+ children: [/* @__PURE__ */ s(ds, {
960
+ children: "Congratulations! You answered correctly."
961
+ }), /* @__PURE__ */ c(ps, {
962
+ children: [/* @__PURE__ */ s(Mo, {
963
+ name: "icon-correct"
964
+ }), "Your Pick: ", n]
965
+ })]
966
+ }), Oo = ({
967
+ title: n,
968
+ answer: i
969
+ }) => /* @__PURE__ */ c(ls, {
970
+ children: [/* @__PURE__ */ c(ds, {
971
+ children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", n]
972
+ }), /* @__PURE__ */ c(ps, {
973
+ children: ["Your Pick: ", i]
974
+ })]
975
+ }), X = /* @__PURE__ */ e("div")({
976
+ name: "Container",
977
+ class: "cmox3ot",
978
+ propsAsIs: !1
979
+ }), J = /* @__PURE__ */ e("div")({
980
+ name: "Body",
981
+ class: "bqq1ix4",
982
+ propsAsIs: !1
983
+ }), Z = {
984
+ 1: 3e3,
985
+ 2: 4e3,
986
+ 3: 4e3
987
+ }, Bo = ({ close: n, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
988
+ if (y(() => {
989
+ if (t) {
990
+ const m = setTimeout(() => {
991
+ Z[r + 1] && (a || r < 3) ? t(r + 1) : n == null || n();
992
+ }, Z[r]);
993
+ return () => {
994
+ m && clearTimeout(m);
995
+ };
996
+ }
997
+ return () => {
998
+ };
999
+ }, [t, r, n, a]), r === 1)
1000
+ return /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(J, { children: /* @__PURE__ */ s(ko, {}) }) });
1001
+ let u = "pending";
1002
+ return r === 3 && (u = a ? "correct" : "incorrect"), /* @__PURE__ */ s(X, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ c(J, { children: [
1003
+ r !== 1 && /* @__PURE__ */ s(To, {}, r),
1004
+ /* @__PURE__ */ c(vo, { state: u, step: r, children: [
1005
+ r === 2 && /* @__PURE__ */ s(Do, { title: d || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" }),
1006
+ r === 3 && a && /* @__PURE__ */ s(Ro, { answer: (o == null ? void 0 : o.title) || "unknown" }),
1007
+ r === 3 && !a && /* @__PURE__ */ s(Oo, { title: p || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" })
1008
+ ] })
1009
+ ] }) });
1010
+ }, jo = ({ close: n, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
1011
+ const [d, r] = w(1);
1012
+ return /* @__PURE__ */ s(
1013
+ Bo,
1014
+ {
1015
+ close: n,
1016
+ action: i,
1017
+ votedAnswer: t,
1018
+ correct: o,
1019
+ correctAnswerTitle: a,
1020
+ questionTitle: p,
1021
+ setStep: r,
1022
+ step: d,
1023
+ title: ""
1024
+ }
1025
+ );
1026
+ }, us = /* @__PURE__ */ e("div")({
1027
+ name: "NotificationContainer",
1028
+ class: "nn0nqh6",
1029
+ propsAsIs: !1
1030
+ }), Po = () => ({
1031
+ withoutPadding: n
1032
+ }) => n ? "0px" : "1rem", zo = /* @__PURE__ */ e("div")({
1033
+ name: "NotificationContent",
1034
+ class: "n1bcdf3j",
1035
+ propsAsIs: !1,
1036
+ vars: {
1037
+ "n1bcdf3j-0": [Po()]
1038
+ }
1039
+ }), ms = /* @__PURE__ */ e("img")({
1040
+ name: "LogoImg",
1041
+ class: "l8jorbq",
1042
+ propsAsIs: !1
1043
+ }), Qo = () => us, Vo = /* @__PURE__ */ e(Qo())({
1044
+ name: "NotificationInterstitialContainer",
1045
+ class: "nf920y3",
1046
+ propsAsIs: !0
1047
+ }), Fo = /* @__PURE__ */ e("div")({
1048
+ name: "LogoImgContainer",
1049
+ class: "lzsmehn",
1050
+ propsAsIs: !1
1051
+ }), Uo = ({ sponsorLogo: n, onClick: i }) => /* @__PURE__ */ s(Vo, { onClick: i, children: /* @__PURE__ */ s(zo, { withoutPadding: !0, children: /* @__PURE__ */ s(ms, { src: n }) }) }), _o = (n) => {
1052
+ var i, t, o, a, p;
1053
+ const [d, r] = w(!1), u = ss();
1054
+ return y(() => {
1055
+ var m;
1056
+ return (m = n == null ? void 0 : n.inApp) != null && m.sponsorLogo && (r(!0), u.current = setTimeout(() => {
1057
+ r(!1);
1058
+ }, 5e3)), () => clearTimeout(u.current);
1059
+ }, [(i = n == null ? void 0 : n.inApp) == null ? void 0 : i.sponsorLogo]), (t = n == null ? void 0 : n.inApp) != null && t.sponsorLogo && d ? /* @__PURE__ */ s(Uo, { sponsorLogo: (o = n.inApp) == null ? void 0 : o.sponsorLogo, onClick: () => r(!1) }) : /* @__PURE__ */ s(us, { children: /* @__PURE__ */ c("div", { children: [
1060
+ ((a = n == null ? void 0 : n.inApp) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ s(Fo, { children: /* @__PURE__ */ s(ms, { src: (p = n == null ? void 0 : n.inApp) == null ? void 0 : p.sponsorLogo }) }),
1061
+ /* @__PURE__ */ s(jo, { ...n })
1062
+ ] }) });
1063
+ }, Wo = ({ sdk: n, webos: i }) => {
1064
+ var t, o, a, p, d, r, u, m;
1065
+ const [$] = w(n.getNotificationsStore()), h = Ts($), g = n.getFeature(qs.GAMES), l = ys(() => n.getActiveNotification(), [n, h]);
1066
+ return y(() => {
1067
+ l && bs.emit("notification", {
1068
+ action: "rendered",
1069
+ payload: {
1070
+ questionId: l.data.questionId,
1071
+ questionType: l.data.questionType
1072
+ }
1073
+ });
1074
+ }, [l]), l && l.type === z.QUESTION_RESOLVED ? l.data.question && l.data.questionType === A.PREDICTION ? l && ((t = l.data.inApp) == null ? void 0 : t.adUnit) === V.STANDART ? /* @__PURE__ */ s(
1075
+ _o,
1076
+ {
1077
+ action: l.action,
1078
+ close: l.close,
1079
+ ...l.data.question,
1080
+ inApp: l.data.inApp
1081
+ }
1082
+ ) : /* @__PURE__ */ s(
1083
+ lo,
1084
+ {
1085
+ action: l.action,
1086
+ close: l.close,
1087
+ ...l.data.question
1088
+ }
1089
+ ) : null : l && l.type === z.ONBOARDING ? l.data.onboarding ? /* @__PURE__ */ s(
1090
+ bn,
1091
+ {
1092
+ open: g == null ? void 0 : g.openOnboarding,
1093
+ close: l.close,
1094
+ ...l.data.onboarding
1095
+ }
1096
+ ) : null : l && ((o = l.data.inApp) == null ? void 0 : o.adUnit) === V.STANDART ? /* @__PURE__ */ s(
1097
+ un,
1098
+ {
1099
+ ...l.data,
1100
+ action: l.action,
1101
+ close: l.close,
1102
+ color: ((d = (p = (a = l == null ? void 0 : l.data) == null ? void 0 : a.inApp) == null ? void 0 : p.notification) == null ? void 0 : d.indicatorColor) || ((m = (u = (r = l == null ? void 0 : l.data) == null ? void 0 : r.inApp) == null ? void 0 : u.appearance) == null ? void 0 : m.primaryColor),
1103
+ webos: i
1104
+ }
1105
+ ) : l && /* @__PURE__ */ s(ye, { ...l.data, action: l.action });
1106
+ }, ci = ({ theme: n }) => {
1107
+ const i = Ds(), t = xs(), o = Ms();
1108
+ return i && (o.appNotification || o.onboardingNotification) ? o.app && !o.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(gs, { customTheme: n ?? t.theme, themeMode: t.themeMode, children: /* @__PURE__ */ s(Wo, { sdk: i }) }) }) : null;
1109
+ };
1110
+ export {
1111
+ ai as D,
1112
+ Wo as K,
1113
+ ri as R,
1114
+ Ws as S,
1115
+ ci as a,
1116
+ Rs as r
1117
+ };