@streamlayer/react 0.30.0 → 0.30.1

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 (38) hide show
  1. package/lib/cjs/app.js +1 -0
  2. package/lib/cjs/auth.js +1 -1
  3. package/lib/cjs/gamification-feature.js +1 -0
  4. package/lib/cjs/index.js +1 -1
  5. package/lib/cjs/index2.js +4 -0
  6. package/lib/cjs/masters.js +1 -1
  7. package/lib/cjs/masters2.js +6 -0
  8. package/lib/cjs/points.js +1 -1
  9. package/lib/dist/cjs/gamification-feature.js +1 -0
  10. package/lib/dist/cjs/index.js +1 -0
  11. package/lib/dist/cjs/masters.js +297 -1
  12. package/lib/dist/{index-bcabe854.js → es/gamification-feature.js} +522 -523
  13. package/lib/dist/es/index.js +9 -0
  14. package/lib/dist/es/masters.js +26797 -7
  15. package/lib/dist/index.d.ts +6 -5
  16. package/lib/dist/style.css +1 -1
  17. package/lib/{app-c53bb384.js → es/app.js} +1 -1
  18. package/lib/es/auth.js +2 -2
  19. package/lib/{index-e26b3493.js → es/gamification-feature.js} +542 -543
  20. package/lib/es/index.js +2 -2
  21. package/lib/{index-89366251.js → es/index2.js} +12 -12
  22. package/lib/es/masters.js +3 -3
  23. package/lib/es/masters2.js +2433 -0
  24. package/lib/es/points.js +45 -36
  25. package/lib/style.css +1 -1
  26. package/package.json +10 -10
  27. package/lib/app-36051bbe.cjs +0 -1
  28. package/lib/dist/index-f504e8d3.cjs +0 -1
  29. package/lib/dist/masters-3c9c6ffe.js +0 -26765
  30. package/lib/dist/masters-fe5f1486.cjs +0 -297
  31. package/lib/index-af5c5738.cjs +0 -1
  32. package/lib/index-dd93a61a.cjs +0 -4
  33. package/lib/masters-bf25c11c.js +0 -2415
  34. package/lib/masters-f135002d.cjs +0 -6
  35. /package/lib/{common-f34b9d88.cjs → cjs/common.js} +0 -0
  36. /package/lib/{index-565f26fb.cjs → cjs/index3.js} +0 -0
  37. /package/lib/{common-2d2a3ba3.js → es/common.js} +0 -0
  38. /package/lib/{index-15f61ac8.js → es/index3.js} +0 -0
@@ -1,2415 +0,0 @@
1
- import { jsx as c, jsxs as I, Fragment as pe } from "react/jsx-runtime";
2
- import { c as Ve, S as Gt, a as Pt, b as Mt, s as qt } from "./index-89366251.js";
3
- import { lazy as Wt, useMemo as Ne, Suspense as jt, useRef as Ht, useState as V, useEffect as _e, Component as Yt, createElement as Qt, useCallback as dt, useContext as Kt } from "react";
4
- import { FeatureType as Re, QuestionType as M } from "@streamlayer/sdk-web-types";
5
- import { useStore as ee } from "@nanostores/react";
6
- import { FeatureStatus as he } from "@streamlayer/sdk-web-interfaces";
7
- import { s as d, i as z, c as Vt } from "./index-15f61ac8.js";
8
- import { NotificationType as ge } from "@streamlayer/sdk-web-notifications";
9
- import { Player as Xt } from "@lottiefiles/react-lottie-player";
10
- const Jt = ({ feature: o, sdk: a, children: l, className: h }) => {
11
- const g = ee(o.status), { slStreamId: m } = ee(a.sdkStore);
12
- return m != null && m.loading ? /* @__PURE__ */ c("div", { className: h, children: "event is loading..." }) : m != null && m.data ? g !== he.Ready ? /* @__PURE__ */ c("div", { className: h, children: "wait feature..." }) : l : /* @__PURE__ */ c("div", { className: h, children: "event is forbidden..." });
13
- }, Zt = Wt(() => import("./index-e26b3493.js")), en = ({
14
- sdk: o,
15
- feature: a,
16
- className: l
17
- }) => {
18
- const h = Ne(() => a && a.featureConfig.get().type === Re.GAMES ? /* @__PURE__ */ c(Jt, { className: l, sdk: o, feature: a, children: /* @__PURE__ */ c(Zt, { className: l, gamification: a, sdk: o }) }) : null, [o, a, l]);
19
- return /* @__PURE__ */ c(
20
- jt,
21
- {
22
- fallback: /* @__PURE__ */ c("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
23
- children: h
24
- }
25
- );
26
- }, tn = /* @__PURE__ */ d("button")({
27
- name: "SButton",
28
- class: "SButton_sxxa0c",
29
- propsAsIs: !1
30
- }), nn = /* @__PURE__ */ d("span")({
31
- name: "ButtonIcon",
32
- class: "ButtonIcon_b193dcyu",
33
- propsAsIs: !1
34
- }), rn = /* @__PURE__ */ d("span")({
35
- name: "ButtonLabel",
36
- class: "ButtonLabel_b40tuix",
37
- propsAsIs: !1
38
- }), Ue = ({ disabled: o, active: a, onClick: l, label: h, icon: g }) => /* @__PURE__ */ c(tn, { onClick: l, disabled: o, "data-selected": a, children: /* @__PURE__ */ I(pe, { children: [
39
- g && /* @__PURE__ */ c(nn, { children: g }),
40
- /* @__PURE__ */ c(rn, { children: h })
41
- ] }) }), sn = () => z, on = /* @__PURE__ */ d(sn())({
42
- name: "ButtonIcon",
43
- class: "ButtonIcon_b1whzxvd",
44
- propsAsIs: !0
45
- }), fe = "channels", an = (o) => {
46
- var a;
47
- return /* @__PURE__ */ c(Ue, {
48
- ...o,
49
- id: "channels",
50
- label: "Channels",
51
- icon: /* @__PURE__ */ c(on, {
52
- name: "icon-btn-channels",
53
- "data-selected": (a = o.active) == null ? void 0 : a.toString()
54
- })
55
- });
56
- }, ln = () => z, cn = /* @__PURE__ */ d(ln())({
57
- name: "ButtonIcon",
58
- class: "ButtonIcon_b11des7c",
59
- propsAsIs: !0
60
- }), Z = "featuredGroups", un = (o) => {
61
- var a;
62
- return /* @__PURE__ */ c(Ue, {
63
- ...o,
64
- label: "FG+",
65
- id: "featuredGroups",
66
- icon: /* @__PURE__ */ c(cn, {
67
- name: "icon-btn-feature-groups",
68
- "data-selected": (a = o.active) == null ? void 0 : a.toString()
69
- })
70
- });
71
- }, hn = () => z, dn = /* @__PURE__ */ d(hn())({
72
- name: "ButtonIcon",
73
- class: "ButtonIcon_b180jd7l",
74
- propsAsIs: !0
75
- }), Ie = "leaderboard", pn = (o) => {
76
- var a;
77
- return /* @__PURE__ */ c(Ue, {
78
- ...o,
79
- label: "Leader Board",
80
- id: "leaderboard",
81
- icon: /* @__PURE__ */ c(dn, {
82
- name: "icon-btn-leaderboard",
83
- "data-selected": (a = o.active) == null ? void 0 : a.toString()
84
- })
85
- });
86
- }, fn = /* @__PURE__ */ d("div")({
87
- name: "Buttons",
88
- class: "Buttons_b6tbwuy",
89
- propsAsIs: !1
90
- }), mn = ({
91
- children: o,
92
- className: a
93
- }) => /* @__PURE__ */ c(fn, {
94
- className: a,
95
- children: o
96
- }), gn = () => mn, yn = /* @__PURE__ */ d(gn())({
97
- name: "Navigation",
98
- class: "Navigation_n19lpak2",
99
- propsAsIs: !0
100
- }), wn = ({ activeOverlay: o, setActiveOverlay: a, sdkReady: l, className: h }) => /* @__PURE__ */ I(yn, { className: h, children: [
101
- /* @__PURE__ */ c(an, { active: o === fe, onClick: () => a(fe) }),
102
- /* @__PURE__ */ c(
103
- un,
104
- {
105
- active: o === Z,
106
- disabled: !l,
107
- onClick: () => {
108
- a(Z);
109
- }
110
- }
111
- ),
112
- /* @__PURE__ */ c(
113
- pn,
114
- {
115
- active: o === Ie,
116
- onClick: () => a(Ie)
117
- }
118
- )
119
- ] }), In = {
120
- [M.TWEET]: { label: "Insight", iconName: "icon-insight" },
121
- [M.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
122
- [M.UNSET]: void 0,
123
- [M.FACTOID]: { label: "Insight", iconName: "icon-insight" },
124
- [M.POLL]: { label: "Poll", iconName: "icon-poll" },
125
- [M.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
126
- [M.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
127
- }, _n = /* @__PURE__ */ d("div")({
128
- name: "Container",
129
- class: "Container_c1bgb86j",
130
- propsAsIs: !1
131
- }), xn = /* @__PURE__ */ d("video")({
132
- name: "Player",
133
- class: "Player_p6703cq",
134
- propsAsIs: !1
135
- }), An = /* @__PURE__ */ d("img")({
136
- name: "Poster",
137
- class: "Poster_p12ow7zo",
138
- propsAsIs: !1
139
- }), Bn = /* @__PURE__ */ d("div")({
140
- name: "Control",
141
- class: "Control_cdpal9o",
142
- propsAsIs: !1
143
- }), bn = ({ poster: o, source: a }) => {
144
- const l = Ht(null), [h, g] = V(!1), [m, f] = V(!0);
145
- return /* @__PURE__ */ I(_n, { onClick: () => {
146
- const r = l == null ? void 0 : l.current;
147
- r && g((w) => w ? (r.pause(), !1) : (r.play(), f(!1), !0));
148
- }, children: [
149
- /* @__PURE__ */ c(
150
- xn,
151
- {
152
- ref: l,
153
- src: a,
154
- onEnded: () => {
155
- var r;
156
- (r = l == null ? void 0 : l.current) == null || r.load(), g(!1), f(!0);
157
- },
158
- style: { visibility: m ? "hidden" : "visible" }
159
- }
160
- ),
161
- /* @__PURE__ */ c(An, { src: o, style: { visibility: m ? "visible" : "hidden" } }),
162
- /* @__PURE__ */ c(Bn, { children: !h && /* @__PURE__ */ c(z, { name: "icon-play" }) })
163
- ] });
164
- }, En = /* @__PURE__ */ d("div")({
165
- name: "InsightContainer",
166
- class: "InsightContainer_i1pqqgpo",
167
- propsAsIs: !1
168
- }), Cn = /* @__PURE__ */ d("div")({
169
- name: "InsightContent",
170
- class: "InsightContent_igj7luu",
171
- propsAsIs: !1
172
- }), vn = /* @__PURE__ */ d("h3")({
173
- name: "Title",
174
- class: "Title_t1qne9g6",
175
- propsAsIs: !1
176
- }), Tn = /* @__PURE__ */ d("div")({
177
- name: "Description",
178
- class: "Description_dtpr98r",
179
- propsAsIs: !1
180
- }), Fn = /* @__PURE__ */ d("button")({
181
- name: "ActionBtn",
182
- class: "ActionBtn_a17iaqp8",
183
- propsAsIs: !1
184
- }), Ln = ({
185
- video: o,
186
- heading: a,
187
- body: l,
188
- action: h
189
- }) => /* @__PURE__ */ I(En, { children: [
190
- (o == null ? void 0 : o.url) && /* @__PURE__ */ c(bn, { source: o.url, poster: o.thumbnailUrl }),
191
- /* @__PURE__ */ I(Cn, { children: [
192
- /* @__PURE__ */ c(vn, { children: a }),
193
- /* @__PURE__ */ c(Tn, { children: l }),
194
- h && /* @__PURE__ */ c(Fn, { onClick: h, children: "View Insight" })
195
- ] })
196
- ] }), re = /* @__PURE__ */ d("div")({
197
- name: "BGWrap",
198
- class: "BGWrap_b1dqe0sz",
199
- propsAsIs: !1
200
- }), D = /* @__PURE__ */ d("div")({
201
- name: "BGLineBase",
202
- class: "BGLineBase_b1v6w7ni",
203
- propsAsIs: !1
204
- }), Sn = () => D, $n = /* @__PURE__ */ d(Sn())({
205
- name: "BGOneLineOne",
206
- class: "BGOneLineOne_b2nqb1p",
207
- propsAsIs: !0
208
- }), kn = () => D, Nn = /* @__PURE__ */ d(kn())({
209
- name: "BGOneLineTwo",
210
- class: "BGOneLineTwo_b1xxgmbk",
211
- propsAsIs: !0
212
- }), Rn = () => D, Un = /* @__PURE__ */ d(Rn())({
213
- name: "BGOneLineThree",
214
- class: "BGOneLineThree_b63lwcb",
215
- propsAsIs: !0
216
- }), zn = () => D, Xe = /* @__PURE__ */ d(zn())({
217
- name: "BGTwoLineOne",
218
- class: "BGTwoLineOne_b2iah4",
219
- propsAsIs: !0
220
- }), On = () => D, Je = /* @__PURE__ */ d(On())({
221
- name: "BGTwoLineTwo",
222
- class: "BGTwoLineTwo_b1xezvf6",
223
- propsAsIs: !0
224
- }), Dn = () => D, Ze = /* @__PURE__ */ d(Dn())({
225
- name: "BGTwoLineThree",
226
- class: "BGTwoLineThree_b1jz1hg0",
227
- propsAsIs: !0
228
- }), Gn = () => D, et = /* @__PURE__ */ d(Gn())({
229
- name: "BGThreeLineOne",
230
- class: "BGThreeLineOne_b18ho1tk",
231
- propsAsIs: !0
232
- }), Pn = () => D, tt = /* @__PURE__ */ d(Pn())({
233
- name: "BGThreeLineTwo",
234
- class: "BGThreeLineTwo_b14uvjfm",
235
- propsAsIs: !0
236
- }), Mn = () => D, nt = /* @__PURE__ */ d(Mn())({
237
- name: "BGThreeLineThree",
238
- class: "BGThreeLineThree_b11c3ns7",
239
- propsAsIs: !0
240
- }), qn = () => D, it = /* @__PURE__ */ d(qn())({
241
- name: "BGThreeLineFour",
242
- class: "BGThreeLineFour_b1bqhhet",
243
- propsAsIs: !0
244
- }), Wn = () => D, jn = /* @__PURE__ */ d(Wn())({
245
- name: "BGFourLineOne",
246
- class: "BGFourLineOne_b1xyzi7o",
247
- propsAsIs: !0
248
- }), Hn = () => D, Yn = /* @__PURE__ */ d(Hn())({
249
- name: "BGFourLineTwo",
250
- class: "BGFourLineTwo_byo0rup",
251
- propsAsIs: !0
252
- }), Qn = () => D, Kn = /* @__PURE__ */ d(Qn())({
253
- name: "BGFourLineThree",
254
- class: "BGFourLineThree_b1oyiqgv",
255
- propsAsIs: !0
256
- }), Vn = () => D, Xn = /* @__PURE__ */ d(Vn())({
257
- name: "BGFourLineFour",
258
- class: "BGFourLineFour_bx3ddqw",
259
- propsAsIs: !0
260
- }), Jn = ({ step: o, correct: a }) => /* @__PURE__ */ I(pe, { children: [
261
- /* @__PURE__ */ I(re, { "data-active": o === 1, "data-first-screen": "true", children: [
262
- /* @__PURE__ */ c($n, {}),
263
- /* @__PURE__ */ c(Nn, {}),
264
- /* @__PURE__ */ c(Un, {})
265
- ] }),
266
- /* @__PURE__ */ I(re, { "data-active": o === 2, children: [
267
- /* @__PURE__ */ c(Xe, {}),
268
- /* @__PURE__ */ c(Je, {}),
269
- /* @__PURE__ */ c(Ze, {})
270
- ] }),
271
- /* @__PURE__ */ I(re, { "data-active": o === 3, children: [
272
- /* @__PURE__ */ c(Xe, {}),
273
- /* @__PURE__ */ c(Je, {}),
274
- /* @__PURE__ */ c(Ze, {})
275
- ] }),
276
- a ? /* @__PURE__ */ I(pe, { children: [
277
- /* @__PURE__ */ I(re, { "data-active": o === 4, "data-correct": "false", children: [
278
- /* @__PURE__ */ c(et, {}),
279
- /* @__PURE__ */ c(tt, {}),
280
- /* @__PURE__ */ c(nt, {}),
281
- /* @__PURE__ */ c(it, {})
282
- ] }),
283
- /* @__PURE__ */ I(re, { "data-active": o === 5, "data-correct": "false", "data-last-screen": "true", children: [
284
- /* @__PURE__ */ c(et, {}),
285
- /* @__PURE__ */ c(tt, {}),
286
- /* @__PURE__ */ c(nt, {}),
287
- /* @__PURE__ */ c(it, {})
288
- ] })
289
- ] }) : /* @__PURE__ */ I(re, { "data-active": o === 4, "data-correct": "false", "data-last-screen": "true", children: [
290
- /* @__PURE__ */ c(jn, {}),
291
- /* @__PURE__ */ c(Yn, {}),
292
- /* @__PURE__ */ c(Kn, {}),
293
- /* @__PURE__ */ c(Xn, {})
294
- ] })
295
- ] }), Zn = /* @__PURE__ */ d("div")({
296
- name: "Container",
297
- class: "Container_c10131zw",
298
- propsAsIs: !1
299
- }), ei = /* @__PURE__ */ d("div")({
300
- name: "AnimateContent",
301
- class: "AnimateContent_ar6k2eo",
302
- propsAsIs: !1
303
- }), se = /* @__PURE__ */ d("div")({
304
- name: "Content",
305
- class: "Content_c1hwoq9l",
306
- propsAsIs: !1
307
- }), oe = /* @__PURE__ */ d("div")({
308
- name: "Title",
309
- class: "Title_t4ujo4g",
310
- propsAsIs: !1
311
- }), de = /* @__PURE__ */ d("div")({
312
- name: "Subtitle",
313
- class: "Subtitle_s1pjil1h",
314
- propsAsIs: !1
315
- }), ti = () => de, rt = /* @__PURE__ */ d(ti())({
316
- name: "SubtitleFG",
317
- class: "SubtitleFG_s1iorwr9",
318
- propsAsIs: !0
319
- }), ye = /* @__PURE__ */ d("div")({
320
- name: "AnswerText",
321
- class: "AnswerText_a51sv9d",
322
- propsAsIs: !1
323
- }), ni = () => z, Ee = /* @__PURE__ */ d(ni())({
324
- name: "FeedbackIcon",
325
- class: "FeedbackIcon_f1lbk2ye",
326
- propsAsIs: !0
327
- }), st = /* @__PURE__ */ d("button")({
328
- name: "CloseButton",
329
- class: "CloseButton_crcvk3t",
330
- propsAsIs: !1
331
- }), ii = () => z, ot = /* @__PURE__ */ d(ii())({
332
- name: "CloseIcon",
333
- class: "CloseIcon_c33p82r",
334
- propsAsIs: !0
335
- }), ri = ({
336
- close: o,
337
- votedAnswer: a,
338
- correct: l,
339
- correctAnswerTitle: h
340
- }) => {
341
- const [g, m] = V(1);
342
- return _e(() => {
343
- const f = setInterval(() => {
344
- m((r) => l && r > 4 || !l && r > 3 ? r : ++r);
345
- }, 6e3);
346
- return () => clearInterval(f);
347
- }, [l]), /* @__PURE__ */ I(Zn, { "data-bg-color-white": g > 3, children: [
348
- /* @__PURE__ */ c(Jn, { step: g, correct: l }),
349
- /* @__PURE__ */ I(ei, { "data-active-number": g, children: [
350
- /* @__PURE__ */ I(se, { children: [
351
- /* @__PURE__ */ c(oe, { children: "Master" }),
352
- /* @__PURE__ */ c(rt, { children: "FEATURED GROUPS +" })
353
- ] }),
354
- /* @__PURE__ */ I(se, { children: [
355
- /* @__PURE__ */ c(oe, { children: "Prediction results are in!" }),
356
- /* @__PURE__ */ c(rt, { children: "FEATURED GROUPS +" })
357
- ] }),
358
- /* @__PURE__ */ I(se, { children: [
359
- /* @__PURE__ */ c(oe, { children: "Who holds the most birdies in golf?" }),
360
- /* @__PURE__ */ I(de, { children: [
361
- "Your Pick: ",
362
- /* @__PURE__ */ c(ye, { children: a == null ? void 0 : a.title })
363
- ] })
364
- ] }),
365
- l ? /* @__PURE__ */ I(pe, { children: [
366
- /* @__PURE__ */ I(se, { "data-color-green": "true", children: [
367
- /* @__PURE__ */ c(oe, { children: "Congratulations! You answered correctly." }),
368
- /* @__PURE__ */ I(de, { children: [
369
- /* @__PURE__ */ c(Ee, { name: "selected" }),
370
- "Your Pick: ",
371
- /* @__PURE__ */ c(ye, { children: a == null ? void 0 : a.title })
372
- ] })
373
- ] }),
374
- /* @__PURE__ */ I(se, { "data-color-green": "true", children: [
375
- /* @__PURE__ */ c(st, { onClick: o, children: /* @__PURE__ */ c(ot, { name: "icon-cross" }) }),
376
- /* @__PURE__ */ I(oe, { children: [
377
- "+",
378
- a == null ? void 0 : a.points,
379
- " points"
380
- ] }),
381
- /* @__PURE__ */ I(de, { children: [
382
- /* @__PURE__ */ c(Ee, { name: "selected" }),
383
- "Your Pick: ",
384
- /* @__PURE__ */ c(ye, { children: a == null ? void 0 : a.title })
385
- ] })
386
- ] })
387
- ] }) : /* @__PURE__ */ I(se, { children: [
388
- /* @__PURE__ */ c(st, { onClick: o, children: /* @__PURE__ */ c(ot, { name: "icon-cross" }) }),
389
- /* @__PURE__ */ I(oe, { "data-incorrect": "true", children: [
390
- "Better luck next time! Correct: ",
391
- h,
392
- "."
393
- ] }),
394
- /* @__PURE__ */ I(de, { "data-incorrect": "true", children: [
395
- /* @__PURE__ */ c(Ee, { name: "circleClose" }),
396
- "Your Pick: ",
397
- /* @__PURE__ */ c(ye, { children: a == null ? void 0 : a.title })
398
- ] })
399
- ] })
400
- ] })
401
- ] });
402
- }, si = /* @__PURE__ */ d("div")({
403
- name: "Container",
404
- class: "Container_c1eptrjd",
405
- propsAsIs: !1
406
- }), oi = /* @__PURE__ */ d("div")({
407
- name: "CloseIconWrap",
408
- class: "CloseIconWrap_crylm65",
409
- propsAsIs: !1
410
- }), ai = () => z, li = /* @__PURE__ */ d(ai())({
411
- name: "CloseIcon",
412
- class: "CloseIcon_c9mrcz7",
413
- propsAsIs: !0
414
- }), ci = /* @__PURE__ */ d("div")({
415
- name: "Header",
416
- class: "Header_hw3lzv4",
417
- propsAsIs: !1
418
- }), ui = () => z, hi = /* @__PURE__ */ d(ui())({
419
- name: "TypeIcon",
420
- class: "TypeIcon_t1rrb3kf",
421
- propsAsIs: !0
422
- }), di = /* @__PURE__ */ d("span")({
423
- name: "TypeName",
424
- class: "TypeName_t1ydnjov",
425
- propsAsIs: !1
426
- }), pi = /* @__PURE__ */ d("div")({
427
- name: "Question",
428
- class: "Question_qlf90cl",
429
- propsAsIs: !1
430
- }), fi = /* @__PURE__ */ d("button")({
431
- name: "AnswerButton",
432
- class: "AnswerButton_a1e0nhcl",
433
- propsAsIs: !1
434
- }), mi = /* @__PURE__ */ d("div")({
435
- name: "Container",
436
- class: "Container_cjq447q",
437
- propsAsIs: !1
438
- }), gi = /* @__PURE__ */ d("div")({
439
- name: "ImageContainer",
440
- class: "ImageContainer_i14egogb",
441
- propsAsIs: !1
442
- }), yi = /* @__PURE__ */ d("img")({
443
- name: "Image",
444
- class: "Image_i2g9g4l",
445
- propsAsIs: !1
446
- }), wi = /* @__PURE__ */ d("div")({
447
- name: "Details",
448
- class: "Details_d1c454nm",
449
- propsAsIs: !1
450
- }), Ii = /* @__PURE__ */ d("div")({
451
- name: "Name",
452
- class: "Name_n11nigc3",
453
- propsAsIs: !1
454
- }), _i = /* @__PURE__ */ d("div")({
455
- name: "UserName",
456
- class: "UserName_urxa4k8",
457
- propsAsIs: !1
458
- }), xi = ({ image: o, name: a, userName: l, verified: h }) => /* @__PURE__ */ I(mi, { children: [
459
- /* @__PURE__ */ c(gi, { children: /* @__PURE__ */ c(yi, { src: o }) }),
460
- /* @__PURE__ */ I(wi, { children: [
461
- /* @__PURE__ */ I(Ii, { children: [
462
- a,
463
- " ",
464
- h && /* @__PURE__ */ c(z, { name: "icon-twitter-verified" })
465
- ] }),
466
- /* @__PURE__ */ c(_i, { children: l })
467
- ] })
468
- ] }), Ai = /* @__PURE__ */ d("div")({
469
- name: "Container",
470
- class: "Container_c1t4f0x4",
471
- propsAsIs: !1
472
- }), Bi = /* @__PURE__ */ d("button")({
473
- name: "ActionBtn",
474
- class: "ActionBtn_a16w1nl6",
475
- propsAsIs: !1
476
- }), bi = /* @__PURE__ */ d("div")({
477
- name: "Body",
478
- class: "Body_b14u54rf",
479
- propsAsIs: !1
480
- }), Ei = /* @__PURE__ */ d("img")({
481
- name: "Image",
482
- class: "Image_i1hxm6zo",
483
- propsAsIs: !1
484
- }), Ci = /* @__PURE__ */ d("div")({
485
- name: "Details",
486
- class: "Details_d1s19yop",
487
- propsAsIs: !1
488
- }), vi = /* @__PURE__ */ d("div")({
489
- name: "QuoteWrap",
490
- class: "QuoteWrap_q1qyx94r",
491
- propsAsIs: !1
492
- }), Ti = /* @__PURE__ */ d("blockquote")({
493
- name: "Quote",
494
- class: "Quote_qs97clu",
495
- propsAsIs: !1
496
- }), Fi = ({
497
- account: o,
498
- body: a,
499
- image: l,
500
- title: h,
501
- action: g
502
- }) => /* @__PURE__ */ I(Ai, { children: [
503
- /* @__PURE__ */ c(vi, { children: /* @__PURE__ */ c(Ti, { children: h }) }),
504
- /* @__PURE__ */ I(Ci, { children: [
505
- /* @__PURE__ */ c(xi, { ...o }),
506
- /* @__PURE__ */ c(bi, { children: a }),
507
- l && /* @__PURE__ */ c(Ei, { src: l })
508
- ] }),
509
- g && /* @__PURE__ */ c(Bi, { onClick: g, children: "View Tweet" })
510
- ] }), at = ({
511
- close: o,
512
- action: a,
513
- data: { questionType: l, question: h, insight: g, tweet: m }
514
- }) => {
515
- const f = In[l];
516
- return f ? h != null && h.predictionResult ? /* @__PURE__ */ c(ri, { close: o, ...h }) : /* @__PURE__ */ I(si, { children: [
517
- /* @__PURE__ */ c(oi, { onClick: o, children: /* @__PURE__ */ c(li, { name: "icon-cross" }) }),
518
- l !== M.TWEET && /* @__PURE__ */ I(ci, { children: [
519
- /* @__PURE__ */ c(hi, { name: f.iconName }),
520
- /* @__PURE__ */ c(di, { children: f.label })
521
- ] }),
522
- l === M.FACTOID && /* @__PURE__ */ c(Ln, { ...g, action: a }),
523
- l === M.TWEET && // ToDo: connect with real Api data
524
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
525
- // @ts-ignore
526
- /* @__PURE__ */ c(Fi, { ...m, action: a }),
527
- l !== M.FACTOID && l !== M.TWEET && /* @__PURE__ */ I(pe, { children: [
528
- /* @__PURE__ */ c(pi, { children: h == null ? void 0 : h.title }),
529
- /* @__PURE__ */ c(fi, { onClick: a, children: "Answer" })
530
- ] })
531
- ] }) : null;
532
- };
533
- var pt = {}, ft = {}, xe = {};
534
- xe.byteLength = $i;
535
- xe.toByteArray = Ni;
536
- xe.fromByteArray = zi;
537
- var Y = [], P = [], Li = typeof Uint8Array < "u" ? Uint8Array : Array, Ce = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
538
- for (var ae = 0, Si = Ce.length; ae < Si; ++ae)
539
- Y[ae] = Ce[ae], P[Ce.charCodeAt(ae)] = ae;
540
- P["-".charCodeAt(0)] = 62;
541
- P["_".charCodeAt(0)] = 63;
542
- function mt(o) {
543
- var a = o.length;
544
- if (a % 4 > 0)
545
- throw new Error("Invalid string. Length must be a multiple of 4");
546
- var l = o.indexOf("=");
547
- l === -1 && (l = a);
548
- var h = l === a ? 0 : 4 - l % 4;
549
- return [l, h];
550
- }
551
- function $i(o) {
552
- var a = mt(o), l = a[0], h = a[1];
553
- return (l + h) * 3 / 4 - h;
554
- }
555
- function ki(o, a, l) {
556
- return (a + l) * 3 / 4 - l;
557
- }
558
- function Ni(o) {
559
- var a, l = mt(o), h = l[0], g = l[1], m = new Li(ki(o, h, g)), f = 0, r = g > 0 ? h - 4 : h, w;
560
- for (w = 0; w < r; w += 4)
561
- a = P[o.charCodeAt(w)] << 18 | P[o.charCodeAt(w + 1)] << 12 | P[o.charCodeAt(w + 2)] << 6 | P[o.charCodeAt(w + 3)], m[f++] = a >> 16 & 255, m[f++] = a >> 8 & 255, m[f++] = a & 255;
562
- return g === 2 && (a = P[o.charCodeAt(w)] << 2 | P[o.charCodeAt(w + 1)] >> 4, m[f++] = a & 255), g === 1 && (a = P[o.charCodeAt(w)] << 10 | P[o.charCodeAt(w + 1)] << 4 | P[o.charCodeAt(w + 2)] >> 2, m[f++] = a >> 8 & 255, m[f++] = a & 255), m;
563
- }
564
- function Ri(o) {
565
- return Y[o >> 18 & 63] + Y[o >> 12 & 63] + Y[o >> 6 & 63] + Y[o & 63];
566
- }
567
- function Ui(o, a, l) {
568
- for (var h, g = [], m = a; m < l; m += 3)
569
- h = (o[m] << 16 & 16711680) + (o[m + 1] << 8 & 65280) + (o[m + 2] & 255), g.push(Ri(h));
570
- return g.join("");
571
- }
572
- function zi(o) {
573
- for (var a, l = o.length, h = l % 3, g = [], m = 16383, f = 0, r = l - h; f < r; f += m)
574
- g.push(Ui(o, f, f + m > r ? r : f + m));
575
- return h === 1 ? (a = o[l - 1], g.push(
576
- Y[a >> 2] + Y[a << 4 & 63] + "=="
577
- )) : h === 2 && (a = (o[l - 2] << 8) + o[l - 1], g.push(
578
- Y[a >> 10] + Y[a >> 4 & 63] + Y[a << 2 & 63] + "="
579
- )), g.join("");
580
- }
581
- var ze = {};
582
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
583
- ze.read = function(o, a, l, h, g) {
584
- var m, f, r = g * 8 - h - 1, w = (1 << r) - 1, B = w >> 1, _ = -7, v = l ? g - 1 : 0, y = l ? -1 : 1, x = o[a + v];
585
- for (v += y, m = x & (1 << -_) - 1, x >>= -_, _ += r; _ > 0; m = m * 256 + o[a + v], v += y, _ -= 8)
586
- ;
587
- for (f = m & (1 << -_) - 1, m >>= -_, _ += h; _ > 0; f = f * 256 + o[a + v], v += y, _ -= 8)
588
- ;
589
- if (m === 0)
590
- m = 1 - B;
591
- else {
592
- if (m === w)
593
- return f ? NaN : (x ? -1 : 1) * (1 / 0);
594
- f = f + Math.pow(2, h), m = m - B;
595
- }
596
- return (x ? -1 : 1) * f * Math.pow(2, m - h);
597
- };
598
- ze.write = function(o, a, l, h, g, m) {
599
- var f, r, w, B = m * 8 - g - 1, _ = (1 << B) - 1, v = _ >> 1, y = g === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, x = h ? 0 : m - 1, b = h ? 1 : -1, E = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
600
- for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (r = isNaN(a) ? 1 : 0, f = _) : (f = Math.floor(Math.log(a) / Math.LN2), a * (w = Math.pow(2, -f)) < 1 && (f--, w *= 2), f + v >= 1 ? a += y / w : a += y * Math.pow(2, 1 - v), a * w >= 2 && (f++, w /= 2), f + v >= _ ? (r = 0, f = _) : f + v >= 1 ? (r = (a * w - 1) * Math.pow(2, g), f = f + v) : (r = a * Math.pow(2, v - 1) * Math.pow(2, g), f = 0)); g >= 8; o[l + x] = r & 255, x += b, r /= 256, g -= 8)
601
- ;
602
- for (f = f << g | r, B += g; B > 0; o[l + x] = f & 255, x += b, f /= 256, B -= 8)
603
- ;
604
- o[l + x - b] |= E * 128;
605
- };
606
- /*!
607
- * The buffer module from node.js, for the browser.
608
- *
609
- * @author Feross Aboukhadijeh <https://feross.org>
610
- * @license MIT
611
- */
612
- (function(o) {
613
- const a = xe, l = ze, h = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
614
- o.Buffer = r, o.SlowBuffer = F, o.INSPECT_MAX_BYTES = 50;
615
- const g = 2147483647;
616
- o.kMaxLength = g, r.TYPED_ARRAY_SUPPORT = m(), !r.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
617
- "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
618
- );
619
- function m() {
620
- try {
621
- const n = new Uint8Array(1), e = { foo: function() {
622
- return 42;
623
- } };
624
- return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(n, e), n.foo() === 42;
625
- } catch {
626
- return !1;
627
- }
628
- }
629
- Object.defineProperty(r.prototype, "parent", {
630
- enumerable: !0,
631
- get: function() {
632
- if (r.isBuffer(this))
633
- return this.buffer;
634
- }
635
- }), Object.defineProperty(r.prototype, "offset", {
636
- enumerable: !0,
637
- get: function() {
638
- if (r.isBuffer(this))
639
- return this.byteOffset;
640
- }
641
- });
642
- function f(n) {
643
- if (n > g)
644
- throw new RangeError('The value "' + n + '" is invalid for option "size"');
645
- const e = new Uint8Array(n);
646
- return Object.setPrototypeOf(e, r.prototype), e;
647
- }
648
- function r(n, e, t) {
649
- if (typeof n == "number") {
650
- if (typeof e == "string")
651
- throw new TypeError(
652
- 'The "string" argument must be of type string. Received type number'
653
- );
654
- return v(n);
655
- }
656
- return w(n, e, t);
657
- }
658
- r.poolSize = 8192;
659
- function w(n, e, t) {
660
- if (typeof n == "string")
661
- return y(n, e);
662
- if (ArrayBuffer.isView(n))
663
- return b(n);
664
- if (n == null)
665
- throw new TypeError(
666
- "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof n
667
- );
668
- if (W(n, ArrayBuffer) || n && W(n.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (W(n, SharedArrayBuffer) || n && W(n.buffer, SharedArrayBuffer)))
669
- return E(n, e, t);
670
- if (typeof n == "number")
671
- throw new TypeError(
672
- 'The "value" argument must not be of type number. Received type number'
673
- );
674
- const i = n.valueOf && n.valueOf();
675
- if (i != null && i !== n)
676
- return r.from(i, e, t);
677
- const s = N(n);
678
- if (s)
679
- return s;
680
- if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof n[Symbol.toPrimitive] == "function")
681
- return r.from(n[Symbol.toPrimitive]("string"), e, t);
682
- throw new TypeError(
683
- "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof n
684
- );
685
- }
686
- r.from = function(n, e, t) {
687
- return w(n, e, t);
688
- }, Object.setPrototypeOf(r.prototype, Uint8Array.prototype), Object.setPrototypeOf(r, Uint8Array);
689
- function B(n) {
690
- if (typeof n != "number")
691
- throw new TypeError('"size" argument must be of type number');
692
- if (n < 0)
693
- throw new RangeError('The value "' + n + '" is invalid for option "size"');
694
- }
695
- function _(n, e, t) {
696
- return B(n), n <= 0 ? f(n) : e !== void 0 ? typeof t == "string" ? f(n).fill(e, t) : f(n).fill(e) : f(n);
697
- }
698
- r.alloc = function(n, e, t) {
699
- return _(n, e, t);
700
- };
701
- function v(n) {
702
- return B(n), f(n < 0 ? 0 : C(n) | 0);
703
- }
704
- r.allocUnsafe = function(n) {
705
- return v(n);
706
- }, r.allocUnsafeSlow = function(n) {
707
- return v(n);
708
- };
709
- function y(n, e) {
710
- if ((typeof e != "string" || e === "") && (e = "utf8"), !r.isEncoding(e))
711
- throw new TypeError("Unknown encoding: " + e);
712
- const t = U(n, e) | 0;
713
- let i = f(t);
714
- const s = i.write(n, e);
715
- return s !== t && (i = i.slice(0, s)), i;
716
- }
717
- function x(n) {
718
- const e = n.length < 0 ? 0 : C(n.length) | 0, t = f(e);
719
- for (let i = 0; i < e; i += 1)
720
- t[i] = n[i] & 255;
721
- return t;
722
- }
723
- function b(n) {
724
- if (W(n, Uint8Array)) {
725
- const e = new Uint8Array(n);
726
- return E(e.buffer, e.byteOffset, e.byteLength);
727
- }
728
- return x(n);
729
- }
730
- function E(n, e, t) {
731
- if (e < 0 || n.byteLength < e)
732
- throw new RangeError('"offset" is outside of buffer bounds');
733
- if (n.byteLength < e + (t || 0))
734
- throw new RangeError('"length" is outside of buffer bounds');
735
- let i;
736
- return e === void 0 && t === void 0 ? i = new Uint8Array(n) : t === void 0 ? i = new Uint8Array(n, e) : i = new Uint8Array(n, e, t), Object.setPrototypeOf(i, r.prototype), i;
737
- }
738
- function N(n) {
739
- if (r.isBuffer(n)) {
740
- const e = C(n.length) | 0, t = f(e);
741
- return t.length === 0 || n.copy(t, 0, 0, e), t;
742
- }
743
- if (n.length !== void 0)
744
- return typeof n.length != "number" || be(n.length) ? f(0) : x(n);
745
- if (n.type === "Buffer" && Array.isArray(n.data))
746
- return x(n.data);
747
- }
748
- function C(n) {
749
- if (n >= g)
750
- throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + g.toString(16) + " bytes");
751
- return n | 0;
752
- }
753
- function F(n) {
754
- return +n != n && (n = 0), r.alloc(+n);
755
- }
756
- r.isBuffer = function(e) {
757
- return e != null && e._isBuffer === !0 && e !== r.prototype;
758
- }, r.compare = function(e, t) {
759
- if (W(e, Uint8Array) && (e = r.from(e, e.offset, e.byteLength)), W(t, Uint8Array) && (t = r.from(t, t.offset, t.byteLength)), !r.isBuffer(e) || !r.isBuffer(t))
760
- throw new TypeError(
761
- 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
762
- );
763
- if (e === t)
764
- return 0;
765
- let i = e.length, s = t.length;
766
- for (let u = 0, p = Math.min(i, s); u < p; ++u)
767
- if (e[u] !== t[u]) {
768
- i = e[u], s = t[u];
769
- break;
770
- }
771
- return i < s ? -1 : s < i ? 1 : 0;
772
- }, r.isEncoding = function(e) {
773
- switch (String(e).toLowerCase()) {
774
- case "hex":
775
- case "utf8":
776
- case "utf-8":
777
- case "ascii":
778
- case "latin1":
779
- case "binary":
780
- case "base64":
781
- case "ucs2":
782
- case "ucs-2":
783
- case "utf16le":
784
- case "utf-16le":
785
- return !0;
786
- default:
787
- return !1;
788
- }
789
- }, r.concat = function(e, t) {
790
- if (!Array.isArray(e))
791
- throw new TypeError('"list" argument must be an Array of Buffers');
792
- if (e.length === 0)
793
- return r.alloc(0);
794
- let i;
795
- if (t === void 0)
796
- for (t = 0, i = 0; i < e.length; ++i)
797
- t += e[i].length;
798
- const s = r.allocUnsafe(t);
799
- let u = 0;
800
- for (i = 0; i < e.length; ++i) {
801
- let p = e[i];
802
- if (W(p, Uint8Array))
803
- u + p.length > s.length ? (r.isBuffer(p) || (p = r.from(p)), p.copy(s, u)) : Uint8Array.prototype.set.call(
804
- s,
805
- p,
806
- u
807
- );
808
- else if (r.isBuffer(p))
809
- p.copy(s, u);
810
- else
811
- throw new TypeError('"list" argument must be an Array of Buffers');
812
- u += p.length;
813
- }
814
- return s;
815
- };
816
- function U(n, e) {
817
- if (r.isBuffer(n))
818
- return n.length;
819
- if (ArrayBuffer.isView(n) || W(n, ArrayBuffer))
820
- return n.byteLength;
821
- if (typeof n != "string")
822
- throw new TypeError(
823
- 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof n
824
- );
825
- const t = n.length, i = arguments.length > 2 && arguments[2] === !0;
826
- if (!i && t === 0)
827
- return 0;
828
- let s = !1;
829
- for (; ; )
830
- switch (e) {
831
- case "ascii":
832
- case "latin1":
833
- case "binary":
834
- return t;
835
- case "utf8":
836
- case "utf-8":
837
- return Be(n).length;
838
- case "ucs2":
839
- case "ucs-2":
840
- case "utf16le":
841
- case "utf-16le":
842
- return t * 2;
843
- case "hex":
844
- return t >>> 1;
845
- case "base64":
846
- return Ke(n).length;
847
- default:
848
- if (s)
849
- return i ? -1 : Be(n).length;
850
- e = ("" + e).toLowerCase(), s = !0;
851
- }
852
- }
853
- r.byteLength = U;
854
- function Q(n, e, t) {
855
- let i = !1;
856
- if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((t === void 0 || t > this.length) && (t = this.length), t <= 0) || (t >>>= 0, e >>>= 0, t <= e))
857
- return "";
858
- for (n || (n = "utf8"); ; )
859
- switch (n) {
860
- case "hex":
861
- return St(this, e, t);
862
- case "utf8":
863
- case "utf-8":
864
- return Ge(this, e, t);
865
- case "ascii":
866
- return Ft(this, e, t);
867
- case "latin1":
868
- case "binary":
869
- return Lt(this, e, t);
870
- case "base64":
871
- return vt(this, e, t);
872
- case "ucs2":
873
- case "ucs-2":
874
- case "utf16le":
875
- case "utf-16le":
876
- return $t(this, e, t);
877
- default:
878
- if (i)
879
- throw new TypeError("Unknown encoding: " + n);
880
- n = (n + "").toLowerCase(), i = !0;
881
- }
882
- }
883
- r.prototype._isBuffer = !0;
884
- function G(n, e, t) {
885
- const i = n[e];
886
- n[e] = n[t], n[t] = i;
887
- }
888
- r.prototype.swap16 = function() {
889
- const e = this.length;
890
- if (e % 2 !== 0)
891
- throw new RangeError("Buffer size must be a multiple of 16-bits");
892
- for (let t = 0; t < e; t += 2)
893
- G(this, t, t + 1);
894
- return this;
895
- }, r.prototype.swap32 = function() {
896
- const e = this.length;
897
- if (e % 4 !== 0)
898
- throw new RangeError("Buffer size must be a multiple of 32-bits");
899
- for (let t = 0; t < e; t += 4)
900
- G(this, t, t + 3), G(this, t + 1, t + 2);
901
- return this;
902
- }, r.prototype.swap64 = function() {
903
- const e = this.length;
904
- if (e % 8 !== 0)
905
- throw new RangeError("Buffer size must be a multiple of 64-bits");
906
- for (let t = 0; t < e; t += 8)
907
- G(this, t, t + 7), G(this, t + 1, t + 6), G(this, t + 2, t + 5), G(this, t + 3, t + 4);
908
- return this;
909
- }, r.prototype.toString = function() {
910
- const e = this.length;
911
- return e === 0 ? "" : arguments.length === 0 ? Ge(this, 0, e) : Q.apply(this, arguments);
912
- }, r.prototype.toLocaleString = r.prototype.toString, r.prototype.equals = function(e) {
913
- if (!r.isBuffer(e))
914
- throw new TypeError("Argument must be a Buffer");
915
- return this === e ? !0 : r.compare(this, e) === 0;
916
- }, r.prototype.inspect = function() {
917
- let e = "";
918
- const t = o.INSPECT_MAX_BYTES;
919
- return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
920
- }, h && (r.prototype[h] = r.prototype.inspect), r.prototype.compare = function(e, t, i, s, u) {
921
- if (W(e, Uint8Array) && (e = r.from(e, e.offset, e.byteLength)), !r.isBuffer(e))
922
- throw new TypeError(
923
- 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e
924
- );
925
- if (t === void 0 && (t = 0), i === void 0 && (i = e ? e.length : 0), s === void 0 && (s = 0), u === void 0 && (u = this.length), t < 0 || i > e.length || s < 0 || u > this.length)
926
- throw new RangeError("out of range index");
927
- if (s >= u && t >= i)
928
- return 0;
929
- if (s >= u)
930
- return -1;
931
- if (t >= i)
932
- return 1;
933
- if (t >>>= 0, i >>>= 0, s >>>= 0, u >>>= 0, this === e)
934
- return 0;
935
- let p = u - s, A = i - t;
936
- const S = Math.min(p, A), L = this.slice(s, u), $ = e.slice(t, i);
937
- for (let T = 0; T < S; ++T)
938
- if (L[T] !== $[T]) {
939
- p = L[T], A = $[T];
940
- break;
941
- }
942
- return p < A ? -1 : A < p ? 1 : 0;
943
- };
944
- function Oe(n, e, t, i, s) {
945
- if (n.length === 0)
946
- return -1;
947
- if (typeof t == "string" ? (i = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, be(t) && (t = s ? 0 : n.length - 1), t < 0 && (t = n.length + t), t >= n.length) {
948
- if (s)
949
- return -1;
950
- t = n.length - 1;
951
- } else if (t < 0)
952
- if (s)
953
- t = 0;
954
- else
955
- return -1;
956
- if (typeof e == "string" && (e = r.from(e, i)), r.isBuffer(e))
957
- return e.length === 0 ? -1 : De(n, e, t, i, s);
958
- if (typeof e == "number")
959
- return e = e & 255, typeof Uint8Array.prototype.indexOf == "function" ? s ? Uint8Array.prototype.indexOf.call(n, e, t) : Uint8Array.prototype.lastIndexOf.call(n, e, t) : De(n, [e], t, i, s);
960
- throw new TypeError("val must be string, number or Buffer");
961
- }
962
- function De(n, e, t, i, s) {
963
- let u = 1, p = n.length, A = e.length;
964
- if (i !== void 0 && (i = String(i).toLowerCase(), i === "ucs2" || i === "ucs-2" || i === "utf16le" || i === "utf-16le")) {
965
- if (n.length < 2 || e.length < 2)
966
- return -1;
967
- u = 2, p /= 2, A /= 2, t /= 2;
968
- }
969
- function S($, T) {
970
- return u === 1 ? $[T] : $.readUInt16BE(T * u);
971
- }
972
- let L;
973
- if (s) {
974
- let $ = -1;
975
- for (L = t; L < p; L++)
976
- if (S(n, L) === S(e, $ === -1 ? 0 : L - $)) {
977
- if ($ === -1 && ($ = L), L - $ + 1 === A)
978
- return $ * u;
979
- } else
980
- $ !== -1 && (L -= L - $), $ = -1;
981
- } else
982
- for (t + A > p && (t = p - A), L = t; L >= 0; L--) {
983
- let $ = !0;
984
- for (let T = 0; T < A; T++)
985
- if (S(n, L + T) !== S(e, T)) {
986
- $ = !1;
987
- break;
988
- }
989
- if ($)
990
- return L;
991
- }
992
- return -1;
993
- }
994
- r.prototype.includes = function(e, t, i) {
995
- return this.indexOf(e, t, i) !== -1;
996
- }, r.prototype.indexOf = function(e, t, i) {
997
- return Oe(this, e, t, i, !0);
998
- }, r.prototype.lastIndexOf = function(e, t, i) {
999
- return Oe(this, e, t, i, !1);
1000
- };
1001
- function At(n, e, t, i) {
1002
- t = Number(t) || 0;
1003
- const s = n.length - t;
1004
- i ? (i = Number(i), i > s && (i = s)) : i = s;
1005
- const u = e.length;
1006
- i > u / 2 && (i = u / 2);
1007
- let p;
1008
- for (p = 0; p < i; ++p) {
1009
- const A = parseInt(e.substr(p * 2, 2), 16);
1010
- if (be(A))
1011
- return p;
1012
- n[t + p] = A;
1013
- }
1014
- return p;
1015
- }
1016
- function Bt(n, e, t, i) {
1017
- return me(Be(e, n.length - t), n, t, i);
1018
- }
1019
- function bt(n, e, t, i) {
1020
- return me(Ut(e), n, t, i);
1021
- }
1022
- function Et(n, e, t, i) {
1023
- return me(Ke(e), n, t, i);
1024
- }
1025
- function Ct(n, e, t, i) {
1026
- return me(zt(e, n.length - t), n, t, i);
1027
- }
1028
- r.prototype.write = function(e, t, i, s) {
1029
- if (t === void 0)
1030
- s = "utf8", i = this.length, t = 0;
1031
- else if (i === void 0 && typeof t == "string")
1032
- s = t, i = this.length, t = 0;
1033
- else if (isFinite(t))
1034
- t = t >>> 0, isFinite(i) ? (i = i >>> 0, s === void 0 && (s = "utf8")) : (s = i, i = void 0);
1035
- else
1036
- throw new Error(
1037
- "Buffer.write(string, encoding, offset[, length]) is no longer supported"
1038
- );
1039
- const u = this.length - t;
1040
- if ((i === void 0 || i > u) && (i = u), e.length > 0 && (i < 0 || t < 0) || t > this.length)
1041
- throw new RangeError("Attempt to write outside buffer bounds");
1042
- s || (s = "utf8");
1043
- let p = !1;
1044
- for (; ; )
1045
- switch (s) {
1046
- case "hex":
1047
- return At(this, e, t, i);
1048
- case "utf8":
1049
- case "utf-8":
1050
- return Bt(this, e, t, i);
1051
- case "ascii":
1052
- case "latin1":
1053
- case "binary":
1054
- return bt(this, e, t, i);
1055
- case "base64":
1056
- return Et(this, e, t, i);
1057
- case "ucs2":
1058
- case "ucs-2":
1059
- case "utf16le":
1060
- case "utf-16le":
1061
- return Ct(this, e, t, i);
1062
- default:
1063
- if (p)
1064
- throw new TypeError("Unknown encoding: " + s);
1065
- s = ("" + s).toLowerCase(), p = !0;
1066
- }
1067
- }, r.prototype.toJSON = function() {
1068
- return {
1069
- type: "Buffer",
1070
- data: Array.prototype.slice.call(this._arr || this, 0)
1071
- };
1072
- };
1073
- function vt(n, e, t) {
1074
- return e === 0 && t === n.length ? a.fromByteArray(n) : a.fromByteArray(n.slice(e, t));
1075
- }
1076
- function Ge(n, e, t) {
1077
- t = Math.min(n.length, t);
1078
- const i = [];
1079
- let s = e;
1080
- for (; s < t; ) {
1081
- const u = n[s];
1082
- let p = null, A = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1;
1083
- if (s + A <= t) {
1084
- let S, L, $, T;
1085
- switch (A) {
1086
- case 1:
1087
- u < 128 && (p = u);
1088
- break;
1089
- case 2:
1090
- S = n[s + 1], (S & 192) === 128 && (T = (u & 31) << 6 | S & 63, T > 127 && (p = T));
1091
- break;
1092
- case 3:
1093
- S = n[s + 1], L = n[s + 2], (S & 192) === 128 && (L & 192) === 128 && (T = (u & 15) << 12 | (S & 63) << 6 | L & 63, T > 2047 && (T < 55296 || T > 57343) && (p = T));
1094
- break;
1095
- case 4:
1096
- S = n[s + 1], L = n[s + 2], $ = n[s + 3], (S & 192) === 128 && (L & 192) === 128 && ($ & 192) === 128 && (T = (u & 15) << 18 | (S & 63) << 12 | (L & 63) << 6 | $ & 63, T > 65535 && T < 1114112 && (p = T));
1097
- }
1098
- }
1099
- p === null ? (p = 65533, A = 1) : p > 65535 && (p -= 65536, i.push(p >>> 10 & 1023 | 55296), p = 56320 | p & 1023), i.push(p), s += A;
1100
- }
1101
- return Tt(i);
1102
- }
1103
- const Pe = 4096;
1104
- function Tt(n) {
1105
- const e = n.length;
1106
- if (e <= Pe)
1107
- return String.fromCharCode.apply(String, n);
1108
- let t = "", i = 0;
1109
- for (; i < e; )
1110
- t += String.fromCharCode.apply(
1111
- String,
1112
- n.slice(i, i += Pe)
1113
- );
1114
- return t;
1115
- }
1116
- function Ft(n, e, t) {
1117
- let i = "";
1118
- t = Math.min(n.length, t);
1119
- for (let s = e; s < t; ++s)
1120
- i += String.fromCharCode(n[s] & 127);
1121
- return i;
1122
- }
1123
- function Lt(n, e, t) {
1124
- let i = "";
1125
- t = Math.min(n.length, t);
1126
- for (let s = e; s < t; ++s)
1127
- i += String.fromCharCode(n[s]);
1128
- return i;
1129
- }
1130
- function St(n, e, t) {
1131
- const i = n.length;
1132
- (!e || e < 0) && (e = 0), (!t || t < 0 || t > i) && (t = i);
1133
- let s = "";
1134
- for (let u = e; u < t; ++u)
1135
- s += Ot[n[u]];
1136
- return s;
1137
- }
1138
- function $t(n, e, t) {
1139
- const i = n.slice(e, t);
1140
- let s = "";
1141
- for (let u = 0; u < i.length - 1; u += 2)
1142
- s += String.fromCharCode(i[u] + i[u + 1] * 256);
1143
- return s;
1144
- }
1145
- r.prototype.slice = function(e, t) {
1146
- const i = this.length;
1147
- e = ~~e, t = t === void 0 ? i : ~~t, e < 0 ? (e += i, e < 0 && (e = 0)) : e > i && (e = i), t < 0 ? (t += i, t < 0 && (t = 0)) : t > i && (t = i), t < e && (t = e);
1148
- const s = this.subarray(e, t);
1149
- return Object.setPrototypeOf(s, r.prototype), s;
1150
- };
1151
- function R(n, e, t) {
1152
- if (n % 1 !== 0 || n < 0)
1153
- throw new RangeError("offset is not uint");
1154
- if (n + e > t)
1155
- throw new RangeError("Trying to access beyond buffer length");
1156
- }
1157
- r.prototype.readUintLE = r.prototype.readUIntLE = function(e, t, i) {
1158
- e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
1159
- let s = this[e], u = 1, p = 0;
1160
- for (; ++p < t && (u *= 256); )
1161
- s += this[e + p] * u;
1162
- return s;
1163
- }, r.prototype.readUintBE = r.prototype.readUIntBE = function(e, t, i) {
1164
- e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
1165
- let s = this[e + --t], u = 1;
1166
- for (; t > 0 && (u *= 256); )
1167
- s += this[e + --t] * u;
1168
- return s;
1169
- }, r.prototype.readUint8 = r.prototype.readUInt8 = function(e, t) {
1170
- return e = e >>> 0, t || R(e, 1, this.length), this[e];
1171
- }, r.prototype.readUint16LE = r.prototype.readUInt16LE = function(e, t) {
1172
- return e = e >>> 0, t || R(e, 2, this.length), this[e] | this[e + 1] << 8;
1173
- }, r.prototype.readUint16BE = r.prototype.readUInt16BE = function(e, t) {
1174
- return e = e >>> 0, t || R(e, 2, this.length), this[e] << 8 | this[e + 1];
1175
- }, r.prototype.readUint32LE = r.prototype.readUInt32LE = function(e, t) {
1176
- return e = e >>> 0, t || R(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
1177
- }, r.prototype.readUint32BE = r.prototype.readUInt32BE = function(e, t) {
1178
- return e = e >>> 0, t || R(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
1179
- }, r.prototype.readBigUInt64LE = J(function(e) {
1180
- e = e >>> 0, ie(e, "offset");
1181
- const t = this[e], i = this[e + 7];
1182
- (t === void 0 || i === void 0) && ue(e, this.length - 8);
1183
- const s = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, u = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + i * 2 ** 24;
1184
- return BigInt(s) + (BigInt(u) << BigInt(32));
1185
- }), r.prototype.readBigUInt64BE = J(function(e) {
1186
- e = e >>> 0, ie(e, "offset");
1187
- const t = this[e], i = this[e + 7];
1188
- (t === void 0 || i === void 0) && ue(e, this.length - 8);
1189
- const s = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], u = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + i;
1190
- return (BigInt(s) << BigInt(32)) + BigInt(u);
1191
- }), r.prototype.readIntLE = function(e, t, i) {
1192
- e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
1193
- let s = this[e], u = 1, p = 0;
1194
- for (; ++p < t && (u *= 256); )
1195
- s += this[e + p] * u;
1196
- return u *= 128, s >= u && (s -= Math.pow(2, 8 * t)), s;
1197
- }, r.prototype.readIntBE = function(e, t, i) {
1198
- e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
1199
- let s = t, u = 1, p = this[e + --s];
1200
- for (; s > 0 && (u *= 256); )
1201
- p += this[e + --s] * u;
1202
- return u *= 128, p >= u && (p -= Math.pow(2, 8 * t)), p;
1203
- }, r.prototype.readInt8 = function(e, t) {
1204
- return e = e >>> 0, t || R(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
1205
- }, r.prototype.readInt16LE = function(e, t) {
1206
- e = e >>> 0, t || R(e, 2, this.length);
1207
- const i = this[e] | this[e + 1] << 8;
1208
- return i & 32768 ? i | 4294901760 : i;
1209
- }, r.prototype.readInt16BE = function(e, t) {
1210
- e = e >>> 0, t || R(e, 2, this.length);
1211
- const i = this[e + 1] | this[e] << 8;
1212
- return i & 32768 ? i | 4294901760 : i;
1213
- }, r.prototype.readInt32LE = function(e, t) {
1214
- return e = e >>> 0, t || R(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
1215
- }, r.prototype.readInt32BE = function(e, t) {
1216
- return e = e >>> 0, t || R(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
1217
- }, r.prototype.readBigInt64LE = J(function(e) {
1218
- e = e >>> 0, ie(e, "offset");
1219
- const t = this[e], i = this[e + 7];
1220
- (t === void 0 || i === void 0) && ue(e, this.length - 8);
1221
- const s = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (i << 24);
1222
- return (BigInt(s) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
1223
- }), r.prototype.readBigInt64BE = J(function(e) {
1224
- e = e >>> 0, ie(e, "offset");
1225
- const t = this[e], i = this[e + 7];
1226
- (t === void 0 || i === void 0) && ue(e, this.length - 8);
1227
- const s = (t << 24) + // Overflow
1228
- this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
1229
- return (BigInt(s) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + i);
1230
- }), r.prototype.readFloatLE = function(e, t) {
1231
- return e = e >>> 0, t || R(e, 4, this.length), l.read(this, e, !0, 23, 4);
1232
- }, r.prototype.readFloatBE = function(e, t) {
1233
- return e = e >>> 0, t || R(e, 4, this.length), l.read(this, e, !1, 23, 4);
1234
- }, r.prototype.readDoubleLE = function(e, t) {
1235
- return e = e >>> 0, t || R(e, 8, this.length), l.read(this, e, !0, 52, 8);
1236
- }, r.prototype.readDoubleBE = function(e, t) {
1237
- return e = e >>> 0, t || R(e, 8, this.length), l.read(this, e, !1, 52, 8);
1238
- };
1239
- function O(n, e, t, i, s, u) {
1240
- if (!r.isBuffer(n))
1241
- throw new TypeError('"buffer" argument must be a Buffer instance');
1242
- if (e > s || e < u)
1243
- throw new RangeError('"value" argument is out of bounds');
1244
- if (t + i > n.length)
1245
- throw new RangeError("Index out of range");
1246
- }
1247
- r.prototype.writeUintLE = r.prototype.writeUIntLE = function(e, t, i, s) {
1248
- if (e = +e, t = t >>> 0, i = i >>> 0, !s) {
1249
- const A = Math.pow(2, 8 * i) - 1;
1250
- O(this, e, t, i, A, 0);
1251
- }
1252
- let u = 1, p = 0;
1253
- for (this[t] = e & 255; ++p < i && (u *= 256); )
1254
- this[t + p] = e / u & 255;
1255
- return t + i;
1256
- }, r.prototype.writeUintBE = r.prototype.writeUIntBE = function(e, t, i, s) {
1257
- if (e = +e, t = t >>> 0, i = i >>> 0, !s) {
1258
- const A = Math.pow(2, 8 * i) - 1;
1259
- O(this, e, t, i, A, 0);
1260
- }
1261
- let u = i - 1, p = 1;
1262
- for (this[t + u] = e & 255; --u >= 0 && (p *= 256); )
1263
- this[t + u] = e / p & 255;
1264
- return t + i;
1265
- }, r.prototype.writeUint8 = r.prototype.writeUInt8 = function(e, t, i) {
1266
- return e = +e, t = t >>> 0, i || O(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
1267
- }, r.prototype.writeUint16LE = r.prototype.writeUInt16LE = function(e, t, i) {
1268
- return e = +e, t = t >>> 0, i || O(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
1269
- }, r.prototype.writeUint16BE = r.prototype.writeUInt16BE = function(e, t, i) {
1270
- return e = +e, t = t >>> 0, i || O(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
1271
- }, r.prototype.writeUint32LE = r.prototype.writeUInt32LE = function(e, t, i) {
1272
- return e = +e, t = t >>> 0, i || O(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
1273
- }, r.prototype.writeUint32BE = r.prototype.writeUInt32BE = function(e, t, i) {
1274
- return e = +e, t = t >>> 0, i || O(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
1275
- };
1276
- function Me(n, e, t, i, s) {
1277
- Qe(e, i, s, n, t, 7);
1278
- let u = Number(e & BigInt(4294967295));
1279
- n[t++] = u, u = u >> 8, n[t++] = u, u = u >> 8, n[t++] = u, u = u >> 8, n[t++] = u;
1280
- let p = Number(e >> BigInt(32) & BigInt(4294967295));
1281
- return n[t++] = p, p = p >> 8, n[t++] = p, p = p >> 8, n[t++] = p, p = p >> 8, n[t++] = p, t;
1282
- }
1283
- function qe(n, e, t, i, s) {
1284
- Qe(e, i, s, n, t, 7);
1285
- let u = Number(e & BigInt(4294967295));
1286
- n[t + 7] = u, u = u >> 8, n[t + 6] = u, u = u >> 8, n[t + 5] = u, u = u >> 8, n[t + 4] = u;
1287
- let p = Number(e >> BigInt(32) & BigInt(4294967295));
1288
- return n[t + 3] = p, p = p >> 8, n[t + 2] = p, p = p >> 8, n[t + 1] = p, p = p >> 8, n[t] = p, t + 8;
1289
- }
1290
- r.prototype.writeBigUInt64LE = J(function(e, t = 0) {
1291
- return Me(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
1292
- }), r.prototype.writeBigUInt64BE = J(function(e, t = 0) {
1293
- return qe(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
1294
- }), r.prototype.writeIntLE = function(e, t, i, s) {
1295
- if (e = +e, t = t >>> 0, !s) {
1296
- const S = Math.pow(2, 8 * i - 1);
1297
- O(this, e, t, i, S - 1, -S);
1298
- }
1299
- let u = 0, p = 1, A = 0;
1300
- for (this[t] = e & 255; ++u < i && (p *= 256); )
1301
- e < 0 && A === 0 && this[t + u - 1] !== 0 && (A = 1), this[t + u] = (e / p >> 0) - A & 255;
1302
- return t + i;
1303
- }, r.prototype.writeIntBE = function(e, t, i, s) {
1304
- if (e = +e, t = t >>> 0, !s) {
1305
- const S = Math.pow(2, 8 * i - 1);
1306
- O(this, e, t, i, S - 1, -S);
1307
- }
1308
- let u = i - 1, p = 1, A = 0;
1309
- for (this[t + u] = e & 255; --u >= 0 && (p *= 256); )
1310
- e < 0 && A === 0 && this[t + u + 1] !== 0 && (A = 1), this[t + u] = (e / p >> 0) - A & 255;
1311
- return t + i;
1312
- }, r.prototype.writeInt8 = function(e, t, i) {
1313
- return e = +e, t = t >>> 0, i || O(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
1314
- }, r.prototype.writeInt16LE = function(e, t, i) {
1315
- return e = +e, t = t >>> 0, i || O(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
1316
- }, r.prototype.writeInt16BE = function(e, t, i) {
1317
- return e = +e, t = t >>> 0, i || O(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
1318
- }, r.prototype.writeInt32LE = function(e, t, i) {
1319
- return e = +e, t = t >>> 0, i || O(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
1320
- }, r.prototype.writeInt32BE = function(e, t, i) {
1321
- return e = +e, t = t >>> 0, i || O(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
1322
- }, r.prototype.writeBigInt64LE = J(function(e, t = 0) {
1323
- return Me(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1324
- }), r.prototype.writeBigInt64BE = J(function(e, t = 0) {
1325
- return qe(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1326
- });
1327
- function We(n, e, t, i, s, u) {
1328
- if (t + i > n.length)
1329
- throw new RangeError("Index out of range");
1330
- if (t < 0)
1331
- throw new RangeError("Index out of range");
1332
- }
1333
- function je(n, e, t, i, s) {
1334
- return e = +e, t = t >>> 0, s || We(n, e, t, 4), l.write(n, e, t, i, 23, 4), t + 4;
1335
- }
1336
- r.prototype.writeFloatLE = function(e, t, i) {
1337
- return je(this, e, t, !0, i);
1338
- }, r.prototype.writeFloatBE = function(e, t, i) {
1339
- return je(this, e, t, !1, i);
1340
- };
1341
- function He(n, e, t, i, s) {
1342
- return e = +e, t = t >>> 0, s || We(n, e, t, 8), l.write(n, e, t, i, 52, 8), t + 8;
1343
- }
1344
- r.prototype.writeDoubleLE = function(e, t, i) {
1345
- return He(this, e, t, !0, i);
1346
- }, r.prototype.writeDoubleBE = function(e, t, i) {
1347
- return He(this, e, t, !1, i);
1348
- }, r.prototype.copy = function(e, t, i, s) {
1349
- if (!r.isBuffer(e))
1350
- throw new TypeError("argument should be a Buffer");
1351
- if (i || (i = 0), !s && s !== 0 && (s = this.length), t >= e.length && (t = e.length), t || (t = 0), s > 0 && s < i && (s = i), s === i || e.length === 0 || this.length === 0)
1352
- return 0;
1353
- if (t < 0)
1354
- throw new RangeError("targetStart out of bounds");
1355
- if (i < 0 || i >= this.length)
1356
- throw new RangeError("Index out of range");
1357
- if (s < 0)
1358
- throw new RangeError("sourceEnd out of bounds");
1359
- s > this.length && (s = this.length), e.length - t < s - i && (s = e.length - t + i);
1360
- const u = s - i;
1361
- return this === e && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(t, i, s) : Uint8Array.prototype.set.call(
1362
- e,
1363
- this.subarray(i, s),
1364
- t
1365
- ), u;
1366
- }, r.prototype.fill = function(e, t, i, s) {
1367
- if (typeof e == "string") {
1368
- if (typeof t == "string" ? (s = t, t = 0, i = this.length) : typeof i == "string" && (s = i, i = this.length), s !== void 0 && typeof s != "string")
1369
- throw new TypeError("encoding must be a string");
1370
- if (typeof s == "string" && !r.isEncoding(s))
1371
- throw new TypeError("Unknown encoding: " + s);
1372
- if (e.length === 1) {
1373
- const p = e.charCodeAt(0);
1374
- (s === "utf8" && p < 128 || s === "latin1") && (e = p);
1375
- }
1376
- } else
1377
- typeof e == "number" ? e = e & 255 : typeof e == "boolean" && (e = Number(e));
1378
- if (t < 0 || this.length < t || this.length < i)
1379
- throw new RangeError("Out of range index");
1380
- if (i <= t)
1381
- return this;
1382
- t = t >>> 0, i = i === void 0 ? this.length : i >>> 0, e || (e = 0);
1383
- let u;
1384
- if (typeof e == "number")
1385
- for (u = t; u < i; ++u)
1386
- this[u] = e;
1387
- else {
1388
- const p = r.isBuffer(e) ? e : r.from(e, s), A = p.length;
1389
- if (A === 0)
1390
- throw new TypeError('The value "' + e + '" is invalid for argument "value"');
1391
- for (u = 0; u < i - t; ++u)
1392
- this[u + t] = p[u % A];
1393
- }
1394
- return this;
1395
- };
1396
- const ne = {};
1397
- function Ae(n, e, t) {
1398
- ne[n] = class extends t {
1399
- constructor() {
1400
- super(), Object.defineProperty(this, "message", {
1401
- value: e.apply(this, arguments),
1402
- writable: !0,
1403
- configurable: !0
1404
- }), this.name = `${this.name} [${n}]`, this.stack, delete this.name;
1405
- }
1406
- get code() {
1407
- return n;
1408
- }
1409
- set code(s) {
1410
- Object.defineProperty(this, "code", {
1411
- configurable: !0,
1412
- enumerable: !0,
1413
- value: s,
1414
- writable: !0
1415
- });
1416
- }
1417
- toString() {
1418
- return `${this.name} [${n}]: ${this.message}`;
1419
- }
1420
- };
1421
- }
1422
- Ae(
1423
- "ERR_BUFFER_OUT_OF_BOUNDS",
1424
- function(n) {
1425
- return n ? `${n} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
1426
- },
1427
- RangeError
1428
- ), Ae(
1429
- "ERR_INVALID_ARG_TYPE",
1430
- function(n, e) {
1431
- return `The "${n}" argument must be of type number. Received type ${typeof e}`;
1432
- },
1433
- TypeError
1434
- ), Ae(
1435
- "ERR_OUT_OF_RANGE",
1436
- function(n, e, t) {
1437
- let i = `The value of "${n}" is out of range.`, s = t;
1438
- return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? s = Ye(String(t)) : typeof t == "bigint" && (s = String(t), (t > BigInt(2) ** BigInt(32) || t < -(BigInt(2) ** BigInt(32))) && (s = Ye(s)), s += "n"), i += ` It must be ${e}. Received ${s}`, i;
1439
- },
1440
- RangeError
1441
- );
1442
- function Ye(n) {
1443
- let e = "", t = n.length;
1444
- const i = n[0] === "-" ? 1 : 0;
1445
- for (; t >= i + 4; t -= 3)
1446
- e = `_${n.slice(t - 3, t)}${e}`;
1447
- return `${n.slice(0, t)}${e}`;
1448
- }
1449
- function kt(n, e, t) {
1450
- ie(e, "offset"), (n[e] === void 0 || n[e + t] === void 0) && ue(e, n.length - (t + 1));
1451
- }
1452
- function Qe(n, e, t, i, s, u) {
1453
- if (n > t || n < e) {
1454
- const p = typeof e == "bigint" ? "n" : "";
1455
- let A;
1456
- throw u > 3 ? e === 0 || e === BigInt(0) ? A = `>= 0${p} and < 2${p} ** ${(u + 1) * 8}${p}` : A = `>= -(2${p} ** ${(u + 1) * 8 - 1}${p}) and < 2 ** ${(u + 1) * 8 - 1}${p}` : A = `>= ${e}${p} and <= ${t}${p}`, new ne.ERR_OUT_OF_RANGE("value", A, n);
1457
- }
1458
- kt(i, s, u);
1459
- }
1460
- function ie(n, e) {
1461
- if (typeof n != "number")
1462
- throw new ne.ERR_INVALID_ARG_TYPE(e, "number", n);
1463
- }
1464
- function ue(n, e, t) {
1465
- throw Math.floor(n) !== n ? (ie(n, t), new ne.ERR_OUT_OF_RANGE(t || "offset", "an integer", n)) : e < 0 ? new ne.ERR_BUFFER_OUT_OF_BOUNDS() : new ne.ERR_OUT_OF_RANGE(
1466
- t || "offset",
1467
- `>= ${t ? 1 : 0} and <= ${e}`,
1468
- n
1469
- );
1470
- }
1471
- const Nt = /[^+/0-9A-Za-z-_]/g;
1472
- function Rt(n) {
1473
- if (n = n.split("=")[0], n = n.trim().replace(Nt, ""), n.length < 2)
1474
- return "";
1475
- for (; n.length % 4 !== 0; )
1476
- n = n + "=";
1477
- return n;
1478
- }
1479
- function Be(n, e) {
1480
- e = e || 1 / 0;
1481
- let t;
1482
- const i = n.length;
1483
- let s = null;
1484
- const u = [];
1485
- for (let p = 0; p < i; ++p) {
1486
- if (t = n.charCodeAt(p), t > 55295 && t < 57344) {
1487
- if (!s) {
1488
- if (t > 56319) {
1489
- (e -= 3) > -1 && u.push(239, 191, 189);
1490
- continue;
1491
- } else if (p + 1 === i) {
1492
- (e -= 3) > -1 && u.push(239, 191, 189);
1493
- continue;
1494
- }
1495
- s = t;
1496
- continue;
1497
- }
1498
- if (t < 56320) {
1499
- (e -= 3) > -1 && u.push(239, 191, 189), s = t;
1500
- continue;
1501
- }
1502
- t = (s - 55296 << 10 | t - 56320) + 65536;
1503
- } else
1504
- s && (e -= 3) > -1 && u.push(239, 191, 189);
1505
- if (s = null, t < 128) {
1506
- if ((e -= 1) < 0)
1507
- break;
1508
- u.push(t);
1509
- } else if (t < 2048) {
1510
- if ((e -= 2) < 0)
1511
- break;
1512
- u.push(
1513
- t >> 6 | 192,
1514
- t & 63 | 128
1515
- );
1516
- } else if (t < 65536) {
1517
- if ((e -= 3) < 0)
1518
- break;
1519
- u.push(
1520
- t >> 12 | 224,
1521
- t >> 6 & 63 | 128,
1522
- t & 63 | 128
1523
- );
1524
- } else if (t < 1114112) {
1525
- if ((e -= 4) < 0)
1526
- break;
1527
- u.push(
1528
- t >> 18 | 240,
1529
- t >> 12 & 63 | 128,
1530
- t >> 6 & 63 | 128,
1531
- t & 63 | 128
1532
- );
1533
- } else
1534
- throw new Error("Invalid code point");
1535
- }
1536
- return u;
1537
- }
1538
- function Ut(n) {
1539
- const e = [];
1540
- for (let t = 0; t < n.length; ++t)
1541
- e.push(n.charCodeAt(t) & 255);
1542
- return e;
1543
- }
1544
- function zt(n, e) {
1545
- let t, i, s;
1546
- const u = [];
1547
- for (let p = 0; p < n.length && !((e -= 2) < 0); ++p)
1548
- t = n.charCodeAt(p), i = t >> 8, s = t % 256, u.push(s), u.push(i);
1549
- return u;
1550
- }
1551
- function Ke(n) {
1552
- return a.toByteArray(Rt(n));
1553
- }
1554
- function me(n, e, t, i) {
1555
- let s;
1556
- for (s = 0; s < i && !(s + t >= e.length || s >= n.length); ++s)
1557
- e[s + t] = n[s];
1558
- return s;
1559
- }
1560
- function W(n, e) {
1561
- return n instanceof e || n != null && n.constructor != null && n.constructor.name != null && n.constructor.name === e.name;
1562
- }
1563
- function be(n) {
1564
- return n !== n;
1565
- }
1566
- const Ot = function() {
1567
- const n = "0123456789abcdef", e = new Array(256);
1568
- for (let t = 0; t < 16; ++t) {
1569
- const i = t * 16;
1570
- for (let s = 0; s < 16; ++s)
1571
- e[i + s] = n[t] + n[s];
1572
- }
1573
- return e;
1574
- }();
1575
- function J(n) {
1576
- return typeof BigInt > "u" ? Dt : n;
1577
- }
1578
- function Dt() {
1579
- throw new Error("BigInt not supported");
1580
- }
1581
- })(ft);
1582
- var gt = { exports: {} }, k = gt.exports = {}, j, H;
1583
- function Le() {
1584
- throw new Error("setTimeout has not been defined");
1585
- }
1586
- function Se() {
1587
- throw new Error("clearTimeout has not been defined");
1588
- }
1589
- (function() {
1590
- try {
1591
- typeof setTimeout == "function" ? j = setTimeout : j = Le;
1592
- } catch {
1593
- j = Le;
1594
- }
1595
- try {
1596
- typeof clearTimeout == "function" ? H = clearTimeout : H = Se;
1597
- } catch {
1598
- H = Se;
1599
- }
1600
- })();
1601
- function yt(o) {
1602
- if (j === setTimeout)
1603
- return setTimeout(o, 0);
1604
- if ((j === Le || !j) && setTimeout)
1605
- return j = setTimeout, setTimeout(o, 0);
1606
- try {
1607
- return j(o, 0);
1608
- } catch {
1609
- try {
1610
- return j.call(null, o, 0);
1611
- } catch {
1612
- return j.call(this, o, 0);
1613
- }
1614
- }
1615
- }
1616
- function Oi(o) {
1617
- if (H === clearTimeout)
1618
- return clearTimeout(o);
1619
- if ((H === Se || !H) && clearTimeout)
1620
- return H = clearTimeout, clearTimeout(o);
1621
- try {
1622
- return H(o);
1623
- } catch {
1624
- try {
1625
- return H.call(null, o);
1626
- } catch {
1627
- return H.call(this, o);
1628
- }
1629
- }
1630
- }
1631
- var K = [], ce = !1, te, we = -1;
1632
- function Di() {
1633
- !ce || !te || (ce = !1, te.length ? K = te.concat(K) : we = -1, K.length && wt());
1634
- }
1635
- function wt() {
1636
- if (!ce) {
1637
- var o = yt(Di);
1638
- ce = !0;
1639
- for (var a = K.length; a; ) {
1640
- for (te = K, K = []; ++we < a; )
1641
- te && te[we].run();
1642
- we = -1, a = K.length;
1643
- }
1644
- te = null, ce = !1, Oi(o);
1645
- }
1646
- }
1647
- k.nextTick = function(o) {
1648
- var a = new Array(arguments.length - 1);
1649
- if (arguments.length > 1)
1650
- for (var l = 1; l < arguments.length; l++)
1651
- a[l - 1] = arguments[l];
1652
- K.push(new It(o, a)), K.length === 1 && !ce && yt(wt);
1653
- };
1654
- function It(o, a) {
1655
- this.fun = o, this.array = a;
1656
- }
1657
- It.prototype.run = function() {
1658
- this.fun.apply(null, this.array);
1659
- };
1660
- k.title = "browser";
1661
- k.browser = !0;
1662
- k.env = {};
1663
- k.argv = [];
1664
- k.version = "";
1665
- k.versions = {};
1666
- function X() {
1667
- }
1668
- k.on = X;
1669
- k.addListener = X;
1670
- k.once = X;
1671
- k.off = X;
1672
- k.removeListener = X;
1673
- k.removeAllListeners = X;
1674
- k.emit = X;
1675
- k.prependListener = X;
1676
- k.prependOnceListener = X;
1677
- k.listeners = function(o) {
1678
- return [];
1679
- };
1680
- k.binding = function(o) {
1681
- throw new Error("process.binding is not supported");
1682
- };
1683
- k.cwd = function() {
1684
- return "/";
1685
- };
1686
- k.chdir = function(o) {
1687
- throw new Error("process.chdir is not supported");
1688
- };
1689
- k.umask = function() {
1690
- return 0;
1691
- };
1692
- var Gi = gt.exports;
1693
- (function(o) {
1694
- Object.defineProperty(o, Symbol.toStringTag, { value: "Module" });
1695
- const a = ft, l = Gi, h = (f) => f && f.__esModule ? f : { default: f }, g = h(l), m = globalThis || void 0 || self;
1696
- Object.defineProperty(o, "Buffer", { enumerable: !0, get: () => a.Buffer }), Object.defineProperty(o, "process", { enumerable: !0, get: () => g.default }), o.global = m;
1697
- })(pt);
1698
- let q;
1699
- typeof window < "u" ? q = window : typeof self < "u" ? q = self : q = pt.global;
1700
- let $e = null, ke = null;
1701
- const lt = 20, ve = q.clearTimeout, ct = q.setTimeout, Te = q.cancelAnimationFrame || q.mozCancelAnimationFrame || q.webkitCancelAnimationFrame, ut = q.requestAnimationFrame || q.mozRequestAnimationFrame || q.webkitRequestAnimationFrame;
1702
- Te == null || ut == null ? ($e = ve, ke = function(a) {
1703
- return ct(a, lt);
1704
- }) : ($e = function([a, l]) {
1705
- Te(a), ve(l);
1706
- }, ke = function(a) {
1707
- const l = ut(function() {
1708
- ve(h), a();
1709
- }), h = ct(function() {
1710
- Te(l), a();
1711
- }, lt);
1712
- return [l, h];
1713
- });
1714
- function Pi(o) {
1715
- let a, l, h, g, m, f, r;
1716
- const w = typeof document < "u" && document.attachEvent;
1717
- if (!w) {
1718
- f = function(C) {
1719
- const F = C.__resizeTriggers__, U = F.firstElementChild, Q = F.lastElementChild, G = U.firstElementChild;
1720
- Q.scrollLeft = Q.scrollWidth, Q.scrollTop = Q.scrollHeight, G.style.width = U.offsetWidth + 1 + "px", G.style.height = U.offsetHeight + 1 + "px", U.scrollLeft = U.scrollWidth, U.scrollTop = U.scrollHeight;
1721
- }, m = function(C) {
1722
- return C.offsetWidth !== C.__resizeLast__.width || C.offsetHeight !== C.__resizeLast__.height;
1723
- }, r = function(C) {
1724
- if (C.target.className && typeof C.target.className.indexOf == "function" && C.target.className.indexOf("contract-trigger") < 0 && C.target.className.indexOf("expand-trigger") < 0)
1725
- return;
1726
- const F = this;
1727
- f(this), this.__resizeRAF__ && $e(this.__resizeRAF__), this.__resizeRAF__ = ke(function() {
1728
- m(F) && (F.__resizeLast__.width = F.offsetWidth, F.__resizeLast__.height = F.offsetHeight, F.__resizeListeners__.forEach(function(G) {
1729
- G.call(F, C);
1730
- }));
1731
- });
1732
- };
1733
- let y = !1, x = "";
1734
- h = "animationstart";
1735
- const b = "Webkit Moz O ms".split(" ");
1736
- let E = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), N = "";
1737
- {
1738
- const C = document.createElement("fakeelement");
1739
- if (C.style.animationName !== void 0 && (y = !0), y === !1) {
1740
- for (let F = 0; F < b.length; F++)
1741
- if (C.style[b[F] + "AnimationName"] !== void 0) {
1742
- N = b[F], x = "-" + N.toLowerCase() + "-", h = E[F], y = !0;
1743
- break;
1744
- }
1745
- }
1746
- }
1747
- l = "resizeanim", a = "@" + x + "keyframes " + l + " { from { opacity: 0; } to { opacity: 0; } } ", g = x + "animation: 1ms " + l + "; ";
1748
- }
1749
- const B = function(y) {
1750
- if (!y.getElementById("detectElementResize")) {
1751
- const x = (a || "") + ".resize-triggers { " + (g || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', b = y.head || y.getElementsByTagName("head")[0], E = y.createElement("style");
1752
- E.id = "detectElementResize", E.type = "text/css", o != null && E.setAttribute("nonce", o), E.styleSheet ? E.styleSheet.cssText = x : E.appendChild(y.createTextNode(x)), b.appendChild(E);
1753
- }
1754
- };
1755
- return {
1756
- addResizeListener: function(y, x) {
1757
- if (w)
1758
- y.attachEvent("onresize", x);
1759
- else {
1760
- if (!y.__resizeTriggers__) {
1761
- const b = y.ownerDocument, E = q.getComputedStyle(y);
1762
- E && E.position === "static" && (y.style.position = "relative"), B(b), y.__resizeLast__ = {}, y.__resizeListeners__ = [], (y.__resizeTriggers__ = b.createElement("div")).className = "resize-triggers";
1763
- const N = b.createElement("div");
1764
- N.className = "expand-trigger", N.appendChild(b.createElement("div"));
1765
- const C = b.createElement("div");
1766
- C.className = "contract-trigger", y.__resizeTriggers__.appendChild(N), y.__resizeTriggers__.appendChild(C), y.appendChild(y.__resizeTriggers__), f(y), y.addEventListener("scroll", r, !0), h && (y.__resizeTriggers__.__animationListener__ = function(U) {
1767
- U.animationName === l && f(y);
1768
- }, y.__resizeTriggers__.addEventListener(h, y.__resizeTriggers__.__animationListener__));
1769
- }
1770
- y.__resizeListeners__.push(x);
1771
- }
1772
- },
1773
- removeResizeListener: function(y, x) {
1774
- if (w)
1775
- y.detachEvent("onresize", x);
1776
- else if (y.__resizeListeners__.splice(y.__resizeListeners__.indexOf(x), 1), !y.__resizeListeners__.length) {
1777
- y.removeEventListener("scroll", r, !0), y.__resizeTriggers__.__animationListener__ && (y.__resizeTriggers__.removeEventListener(h, y.__resizeTriggers__.__animationListener__), y.__resizeTriggers__.__animationListener__ = null);
1778
- try {
1779
- y.__resizeTriggers__ = !y.removeChild(y.__resizeTriggers__);
1780
- } catch {
1781
- }
1782
- }
1783
- }
1784
- };
1785
- }
1786
- class _t extends Yt {
1787
- constructor(...a) {
1788
- super(...a), this.state = {
1789
- height: this.props.defaultHeight || 0,
1790
- scaledHeight: this.props.defaultHeight || 0,
1791
- scaledWidth: this.props.defaultWidth || 0,
1792
- width: this.props.defaultWidth || 0
1793
- }, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
1794
- this._timeoutId = null;
1795
- const {
1796
- disableHeight: l,
1797
- disableWidth: h,
1798
- onResize: g
1799
- } = this.props;
1800
- if (this._parentNode) {
1801
- var m, f, r, w;
1802
- const B = window.getComputedStyle(this._parentNode) || {}, _ = parseFloat((m = B.paddingLeft) !== null && m !== void 0 ? m : "0"), v = parseFloat((f = B.paddingRight) !== null && f !== void 0 ? f : "0"), y = parseFloat((r = B.paddingTop) !== null && r !== void 0 ? r : "0"), x = parseFloat((w = B.paddingBottom) !== null && w !== void 0 ? w : "0"), b = this._parentNode.getBoundingClientRect(), E = b.height - y - x, N = b.width - _ - v, C = this._parentNode.offsetHeight - y - x, F = this._parentNode.offsetWidth - _ - v;
1803
- (!l && (this.state.height !== C || this.state.scaledHeight !== E) || !h && (this.state.width !== F || this.state.scaledWidth !== N)) && (this.setState({
1804
- height: C,
1805
- width: F,
1806
- scaledHeight: E,
1807
- scaledWidth: N
1808
- }), typeof g == "function" && g({
1809
- height: C,
1810
- scaledHeight: E,
1811
- scaledWidth: N,
1812
- width: F
1813
- }));
1814
- }
1815
- }, this._setRef = (l) => {
1816
- this._autoSizer = l;
1817
- };
1818
- }
1819
- componentDidMount() {
1820
- const {
1821
- nonce: a
1822
- } = this.props;
1823
- this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._parentNode != null && (typeof ResizeObserver < "u" ? (this._resizeObserver = new ResizeObserver(() => {
1824
- this._timeoutId = setTimeout(this._onResize, 0);
1825
- }), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize = Pi(a), this._detectElementResize.addResizeListener(this._parentNode, this._onResize)), this._onResize()));
1826
- }
1827
- componentWillUnmount() {
1828
- this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && (this._resizeObserver.observe(this._parentNode), this._resizeObserver.disconnect()));
1829
- }
1830
- render() {
1831
- const {
1832
- children: a,
1833
- defaultHeight: l,
1834
- defaultWidth: h,
1835
- disableHeight: g = !1,
1836
- disableWidth: m = !1,
1837
- nonce: f,
1838
- onResize: r,
1839
- style: w = {},
1840
- tagName: B = "div",
1841
- ..._
1842
- } = this.props, {
1843
- height: v,
1844
- scaledHeight: y,
1845
- scaledWidth: x,
1846
- width: b
1847
- } = this.state, E = {
1848
- overflow: "visible"
1849
- }, N = {};
1850
- let C = !1;
1851
- return g || (v === 0 && (C = !0), E.height = 0, N.height = v, N.scaledHeight = y), m || (b === 0 && (C = !0), E.width = 0, N.width = b, N.scaledWidth = x), Qt(B, {
1852
- ref: this._setRef,
1853
- style: {
1854
- ...E,
1855
- ...w
1856
- },
1857
- ..._
1858
- }, !C && a(N));
1859
- }
1860
- }
1861
- const Mi = ({
1862
- src: o,
1863
- className: a,
1864
- style: l
1865
- }) => /* @__PURE__ */ c(_t, { className: a, style: l, children: ({ height: h, width: g }) => /* @__PURE__ */ c(
1866
- Xt,
1867
- {
1868
- autoplay: !0,
1869
- loop: !1,
1870
- controls: !1,
1871
- src: `https://url-proxy.streamlayer.io?${o}`,
1872
- style: { height: h, width: g }
1873
- }
1874
- ) }), qi = /* @__PURE__ */ d("div")({
1875
- name: "Container",
1876
- class: "Container_c1htq1lb",
1877
- propsAsIs: !1
1878
- }), Wi = /* @__PURE__ */ d("div")({
1879
- name: "Content",
1880
- class: "Content_cjyzpp7",
1881
- propsAsIs: !1
1882
- }), ji = /* @__PURE__ */ d("div")({
1883
- name: "Graphic",
1884
- class: "Graphic_g16mldgz",
1885
- propsAsIs: !1
1886
- }), Hi = /* @__PURE__ */ d("div")({
1887
- name: "Headline",
1888
- class: "Headline_h69js65",
1889
- propsAsIs: !1
1890
- }), Yi = /* @__PURE__ */ d("div")({
1891
- name: "StepsContainer",
1892
- class: "StepsContainer_smm7qmo",
1893
- propsAsIs: !1
1894
- }), Qi = /* @__PURE__ */ d("span")({
1895
- name: "StepIndicator",
1896
- class: "StepIndicator_s17knuw2",
1897
- propsAsIs: !1
1898
- }), Ki = ({
1899
- graphicSrc: o,
1900
- headline: a,
1901
- stepsCount: l,
1902
- currentStep: h
1903
- }) => /* @__PURE__ */ I(qi, { children: [
1904
- /* @__PURE__ */ I(Wi, { children: [
1905
- /* @__PURE__ */ c(ji, { children: /* @__PURE__ */ c(Mi, { src: o }) }),
1906
- a && /* @__PURE__ */ c(Hi, { children: a })
1907
- ] }),
1908
- /* @__PURE__ */ c(Yi, { children: Array.from({ length: l }).map((g, m) => /* @__PURE__ */ c(Qi, { "data-active": h === m }, m)) })
1909
- ] }), Vi = /* @__PURE__ */ d("div")({
1910
- name: "Container",
1911
- class: "Container_c1itm4k7",
1912
- propsAsIs: !1
1913
- }), Xi = /* @__PURE__ */ d("div")({
1914
- name: "IconContainer",
1915
- class: "IconContainer_i1w4fsni",
1916
- propsAsIs: !1
1917
- }), Ji = () => z, Zi = /* @__PURE__ */ d(Ji())({
1918
- name: "InviteGameIcon",
1919
- class: "InviteGameIcon_i19m85r1",
1920
- propsAsIs: !0
1921
- }), er = /* @__PURE__ */ d("div")({
1922
- name: "Content",
1923
- class: "Content_c1mbu204",
1924
- propsAsIs: !1
1925
- }), tr = /* @__PURE__ */ d("div")({
1926
- name: "Heading",
1927
- class: "Heading_h1amdqtv",
1928
- propsAsIs: !1
1929
- }), nr = /* @__PURE__ */ d("div")({
1930
- name: "Subtext",
1931
- class: "Subtext_s1lhlj9j",
1932
- propsAsIs: !1
1933
- }), ir = /* @__PURE__ */ d("div")({
1934
- name: "LinkContainer",
1935
- class: "LinkContainer_l1wot35e",
1936
- propsAsIs: !1
1937
- }), rr = /* @__PURE__ */ d("div")({
1938
- name: "LinkInfo",
1939
- class: "LinkInfo_l1jdw39q",
1940
- propsAsIs: !1
1941
- }), sr = /* @__PURE__ */ d("span")({
1942
- name: "LinkTitle",
1943
- class: "LinkTitle_l1cr5mk",
1944
- propsAsIs: !1
1945
- }), or = /* @__PURE__ */ d("span")({
1946
- name: "LinkAddress",
1947
- class: "LinkAddress_lvi87q4",
1948
- propsAsIs: !1
1949
- }), ar = () => z, lr = /* @__PURE__ */ d(ar())({
1950
- name: "LinkIcon",
1951
- class: "LinkIcon_l1pqlvw3",
1952
- propsAsIs: !0
1953
- }), cr = /* @__PURE__ */ d("div")({
1954
- name: "SocialLinksContainer",
1955
- class: "SocialLinksContainer_s1n7kzeh",
1956
- propsAsIs: !1
1957
- }), ur = /* @__PURE__ */ d("a")({
1958
- name: "SocialLink",
1959
- class: "SocialLink_s2m9o9y",
1960
- propsAsIs: !1
1961
- }), hr = /* @__PURE__ */ d("span")({
1962
- name: "SocialLinkLabel",
1963
- class: "SocialLinkLabel_sewjbbn",
1964
- propsAsIs: !1
1965
- }), dr = ({
1966
- inviteLink: o,
1967
- socialLinks: a,
1968
- inviteCardTitle: l,
1969
- inviteCardSubtext: h,
1970
- primaryColor: g,
1971
- className: m
1972
- }) => /* @__PURE__ */ I(Vi, { className: m, children: [
1973
- /* @__PURE__ */ c(Xi, { style: { backgroundColor: g }, children: /* @__PURE__ */ c(Zi, { name: "invite-game-icon" }) }),
1974
- /* @__PURE__ */ I(er, { children: [
1975
- /* @__PURE__ */ c(tr, { children: l || "" }),
1976
- /* @__PURE__ */ c(nr, { children: h || "" })
1977
- ] }),
1978
- o && /* @__PURE__ */ I(ir, { onClick: async () => {
1979
- if (o)
1980
- try {
1981
- await navigator.clipboard.writeText(o);
1982
- } catch (f) {
1983
- console.error("Unable to copy to clipboard", f);
1984
- }
1985
- }, children: [
1986
- /* @__PURE__ */ I(rr, { children: [
1987
- /* @__PURE__ */ c(sr, { children: "Invite link" }),
1988
- /* @__PURE__ */ c(or, { children: o })
1989
- ] }),
1990
- /* @__PURE__ */ c(lr, { name: "icon-copy" })
1991
- ] }),
1992
- a && a.length > 0 && /* @__PURE__ */ c(cr, { children: a.map(({ icon: f, link: r, label: w }) => /* @__PURE__ */ I(ur, { href: r, target: "_blank", children: [
1993
- /* @__PURE__ */ c(z, { name: f }),
1994
- /* @__PURE__ */ c(hr, { children: w })
1995
- ] }, r)) })
1996
- ] }), pr = /* @__PURE__ */ d("div")({
1997
- name: "Container",
1998
- class: "Container_cm0bev",
1999
- propsAsIs: !1
2000
- }), fr = /* @__PURE__ */ d("div")({
2001
- name: "Content",
2002
- class: "Content_ce7x737",
2003
- propsAsIs: !1
2004
- }), mr = /* @__PURE__ */ d("div")({
2005
- name: "Title",
2006
- class: "Title_tc2tor6",
2007
- propsAsIs: !1
2008
- }), gr = /* @__PURE__ */ d("div")({
2009
- name: "RulesList",
2010
- class: "RulesList_r1k5klql",
2011
- propsAsIs: !1
2012
- }), yr = /* @__PURE__ */ d("div")({
2013
- name: "RulesItem",
2014
- class: "RulesItem_r1tf3ft2",
2015
- propsAsIs: !1
2016
- }), wr = /* @__PURE__ */ d("div")({
2017
- name: "RuleIcon",
2018
- class: "RuleIcon_rwpvg1k",
2019
- propsAsIs: !1
2020
- }), Ir = /* @__PURE__ */ d("div")({
2021
- name: "RuleText",
2022
- class: "RuleText_rbxiag0",
2023
- propsAsIs: !1
2024
- }), _r = /* @__PURE__ */ d("button")({
2025
- name: "TermsButton",
2026
- class: "TermsButton_t6cyrry",
2027
- propsAsIs: !1
2028
- }), xr = ({ rules: o, rulesTitle: a, primaryColor: l }) => /* @__PURE__ */ I(pr, { children: [
2029
- /* @__PURE__ */ I(fr, { children: [
2030
- /* @__PURE__ */ c(mr, { children: a }),
2031
- /* @__PURE__ */ c(gr, { children: o == null ? void 0 : o.map(({ label: h, icon: g }, m) => /* @__PURE__ */ I(yr, { children: [
2032
- g && /* @__PURE__ */ c(wr, { style: { backgroundColor: l }, children: /* @__PURE__ */ c(z, { name: g, "data-icon": g }) }),
2033
- /* @__PURE__ */ c(Ir, { children: h })
2034
- ] }, m)) })
2035
- ] }),
2036
- /* @__PURE__ */ c(_r, { children: "See Terms and Conditions" })
2037
- ] }), Ar = /* @__PURE__ */ d("button")({
2038
- name: "SButton",
2039
- class: "SButton_s1nve60q",
2040
- propsAsIs: !1
2041
- }), Br = /* @__PURE__ */ d("span")({
2042
- name: "ButtonLabel",
2043
- class: "ButtonLabel_b1xoswwx",
2044
- propsAsIs: !1
2045
- }), br = ({ disabled: o, variant: a = "primary", onClick: l, children: h, ...g }) => /* @__PURE__ */ c(Ar, { onClick: l, disabled: o, "data-variant": a, ...g, children: /* @__PURE__ */ c(Br, { children: h }) }), Er = /* @__PURE__ */ d("div")({
2046
- name: "Container",
2047
- class: "Container_c18uddbs",
2048
- propsAsIs: !1
2049
- }), Cr = /* @__PURE__ */ d("div")({
2050
- name: "Content",
2051
- class: "Content_cvcfjf6",
2052
- propsAsIs: !1
2053
- }), vr = /* @__PURE__ */ d("div")({
2054
- name: "OnboardingHeader",
2055
- class: "OnboardingHeader_o1ie27lw",
2056
- propsAsIs: !1
2057
- }), Tr = /* @__PURE__ */ d("button")({
2058
- name: "CloseBtn",
2059
- class: "CloseBtn_c15cjkwi",
2060
- propsAsIs: !1
2061
- }), Fr = () => z, Lr = /* @__PURE__ */ d(Fr())({
2062
- name: "IconClose",
2063
- class: "IconClose_i1mavjt2",
2064
- propsAsIs: !0
2065
- }), Sr = /* @__PURE__ */ d("div")({
2066
- name: "OnboardingFooter",
2067
- class: "OnboardingFooter_o1x0dyzv",
2068
- propsAsIs: !1
2069
- }), $r = () => br, kr = /* @__PURE__ */ d($r())({
2070
- name: "OnboardingActionBtn",
2071
- class: "OnboardingActionBtn_o1jfi9c3",
2072
- propsAsIs: !0
2073
- }), le = {
2074
- steps: !1,
2075
- rules: !1,
2076
- inviteCard: !1
2077
- }, Nr = ({
2078
- gamification: o,
2079
- steps: a,
2080
- rules: l,
2081
- rulesBtnLabel: h,
2082
- rulesTitle: g,
2083
- primaryColor: m,
2084
- inviteLink: f,
2085
- socialLinks: r,
2086
- inviteCardTitle: w,
2087
- inviteCardSubtext: B,
2088
- inviteCardBtnLabel: _,
2089
- onClose: v
2090
- }) => {
2091
- const [y, x] = V(0), [b, E] = V(le);
2092
- _e(() => {
2093
- a != null && a.length ? E({ ...le, steps: !0 }) : l != null && l.length ? E({ ...le, rules: !0 }) : E({ ...le, inviteCard: !0 });
2094
- }, []);
2095
- const N = Ne(() => b.steps && y === 0 ? "Continue" : b.rules ? h || "Got it" : b.inviteCard ? _ || "Play Now" : "Next", [b, y, h, _]), C = dt(() => {
2096
- a != null && a.length && y < a.length - 1 ? x((U) => ++U) : l != null && l.length && b.steps ? E({ ...le, rules: !0 }) : b.rules && E({ ...le, inviteCard: !0 });
2097
- }, [y, a == null ? void 0 : a.length, l == null ? void 0 : l.length, b, x, E]), F = async () => {
2098
- await o.onboardingStatus.submitInplay();
2099
- };
2100
- return /* @__PURE__ */ c(_t, { children: ({ width: U, height: Q }) => /* @__PURE__ */ I(Er, { style: { width: U, height: Q }, children: [
2101
- /* @__PURE__ */ c(vr, { children: /* @__PURE__ */ c(Tr, { onClick: v, children: /* @__PURE__ */ c(Lr, { name: "icon-close-btn-gray" }) }) }),
2102
- /* @__PURE__ */ I(Cr, { children: [
2103
- b.steps && (a == null ? void 0 : a.length) && /* @__PURE__ */ c(Ki, { stepsCount: a.length, currentStep: y, ...a[y] }),
2104
- b.rules && /* @__PURE__ */ c(xr, { rules: l, rulesTitle: g, primaryColor: m }),
2105
- b.inviteCard && /* @__PURE__ */ c(
2106
- dr,
2107
- {
2108
- inviteLink: f,
2109
- inviteCardTitle: w,
2110
- inviteCardSubtext: B,
2111
- primaryColor: m,
2112
- socialLinks: r
2113
- }
2114
- )
2115
- ] }),
2116
- /* @__PURE__ */ c(Sr, { children: /* @__PURE__ */ c(kr, { onClick: b.inviteCard ? F : C, children: N }) })
2117
- ] }) });
2118
- }, Rr = /* @__PURE__ */ d("div")({
2119
- name: "Container",
2120
- class: "Container_c1pgyo67",
2121
- propsAsIs: !1
2122
- }), Ur = "HidingAnimation_hx17qu6", xt = ({
2123
- children: o,
2124
- style: a,
2125
- className: l,
2126
- hiding: h
2127
- }) => /* @__PURE__ */ c(Rr, {
2128
- style: a,
2129
- className: Vt(l, h && Ur),
2130
- children: o
2131
- }), zr = /* @__PURE__ */ d("div")({
2132
- name: "Container",
2133
- class: "Container_cocfo2g",
2134
- propsAsIs: !1
2135
- }), Or = /* @__PURE__ */ d("div")({
2136
- name: "CloseIconWrap",
2137
- class: "CloseIconWrap_c1pdhxdk",
2138
- propsAsIs: !1
2139
- }), Dr = () => z, Gr = /* @__PURE__ */ d(Dr())({
2140
- name: "CloseIcon",
2141
- class: "CloseIcon_c1funj3r",
2142
- propsAsIs: !0
2143
- }), Pr = /* @__PURE__ */ d("div")({
2144
- name: "Title",
2145
- class: "Title_t1okg06y",
2146
- propsAsIs: !1
2147
- }), Mr = /* @__PURE__ */ d("img")({
2148
- name: "SponsorLogo",
2149
- class: "SponsorLogo_sb1n923",
2150
- propsAsIs: !1
2151
- }), qr = /* @__PURE__ */ d("div")({
2152
- name: "PresentsTitle",
2153
- class: "PresentsTitle_p1stllxd",
2154
- propsAsIs: !1
2155
- }), Wr = /* @__PURE__ */ d("div")({
2156
- name: "Subtitle",
2157
- class: "Subtitle_s13kvdzw",
2158
- propsAsIs: !1
2159
- }), jr = /* @__PURE__ */ d("div")({
2160
- name: "Description",
2161
- class: "Description_dfvmv3t",
2162
- propsAsIs: !1
2163
- }), Hr = /* @__PURE__ */ d("button")({
2164
- name: "ActionButton",
2165
- class: "ActionButton_ay8e3j9",
2166
- propsAsIs: !1
2167
- }), Yr = ({ close: o, action: a, onboarding: l }) => {
2168
- var h, g, m, f, r, w, B, _;
2169
- return /* @__PURE__ */ I(zr, { children: [
2170
- /* @__PURE__ */ c(Or, { onClick: o, children: /* @__PURE__ */ c(Gr, { name: "icon-cross" }) }),
2171
- ((g = (h = l == null ? void 0 : l.titleCard) == null ? void 0 : h.media) == null ? void 0 : g.sponsorLogo) && /* @__PURE__ */ I(Pr, { children: [
2172
- /* @__PURE__ */ c(Mr, { alt: "sponsor-logo", src: (f = (m = l == null ? void 0 : l.titleCard) == null ? void 0 : m.media) == null ? void 0 : f.sponsorLogo }),
2173
- /* @__PURE__ */ c(qr, { children: "PRESENTS" })
2174
- ] }),
2175
- ((r = l == null ? void 0 : l.titleCard) == null ? void 0 : r.title) && /* @__PURE__ */ c(Wr, { children: (w = l == null ? void 0 : l.titleCard) == null ? void 0 : w.title }),
2176
- ((B = l == null ? void 0 : l.titleCard) == null ? void 0 : B.subtitle) && /* @__PURE__ */ c(jr, { children: (_ = l == null ? void 0 : l.titleCard) == null ? void 0 : _.subtitle }),
2177
- /* @__PURE__ */ c(Hr, { onClick: a, children: "Play Now" })
2178
- ] });
2179
- }, Qr = () => xt, Kr = /* @__PURE__ */ d(Qr())({
2180
- name: "OnboardingContainer",
2181
- class: "OnboardingContainer_o9squag",
2182
- propsAsIs: !0
2183
- }), Vr = ({
2184
- hiding: o,
2185
- deepLink: a,
2186
- onboardingOpts: l,
2187
- setOpened: h,
2188
- notification: g,
2189
- gamification: m
2190
- }) => {
2191
- var f, r, w, B, _, v;
2192
- const {
2193
- data: y
2194
- } = ee(a.$store);
2195
- return /* @__PURE__ */ c(Kr, {
2196
- hiding: o,
2197
- children: /* @__PURE__ */ c(Nr, {
2198
- rules: [{
2199
- label: "Answer as many questions as you like.",
2200
- icon: "icon-btn-feature-groups"
2201
- }, {
2202
- label: "Win points for each correct trivia or prediction answer.",
2203
- icon: "icon-thumb-up"
2204
- }, {
2205
- label: "Top the leader board and best your friends.",
2206
- icon: "icon-trophy"
2207
- }],
2208
- rulesBtnLabel: (f = l.rules) == null ? void 0 : f.buttonLabel,
2209
- rulesTitle: (r = l.rules) == null ? void 0 : r.heading,
2210
- steps: [{
2211
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_01.json",
2212
- headline: "Welcome to the Featured Groups +"
2213
- }, {
2214
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_02.json",
2215
- headline: "Get real-time insights"
2216
- }, {
2217
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_03.json",
2218
- headline: "Predictions, trivia & polls synced to match play"
2219
- }, {
2220
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_04.json",
2221
- headline: "Win points for every answer you get right"
2222
- }, {
2223
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_05.json",
2224
- headline: "Compete against friends on the leaderboard"
2225
- }],
2226
- primaryColor: (w = l.inviteCard) == null ? void 0 : w.iconColor,
2227
- inviteLink: y == null ? void 0 : y.url,
2228
- inviteCardTitle: (B = l.inviteCard) == null ? void 0 : B.heading,
2229
- inviteCardSubtext: (_ = l.inviteCard) == null ? void 0 : _.subtext,
2230
- inviteCardBtnLabel: (v = l.inviteCard) == null ? void 0 : v.buttonLabel,
2231
- onClose: () => {
2232
- var x;
2233
- h(!1), (x = g.close) == null || x.call(g);
2234
- },
2235
- socialLinks: [{
2236
- icon: "icon-facebook",
2237
- link: "https://www.facebook.com/TheMasters",
2238
- label: "Facebook"
2239
- }, {
2240
- icon: "icon-twitter",
2241
- link: "https://twitter.com/@TheMasters",
2242
- label: "X"
2243
- }],
2244
- gamification: m
2245
- })
2246
- });
2247
- }, Xr = ({
2248
- sdk: o,
2249
- hiding: a,
2250
- notification: l,
2251
- NotificationContainer: h
2252
- }) => {
2253
- const [g, m] = V(!1), f = o.getFeature(Re.GAMES), r = l.data.onboarding;
2254
- return g && f && r ? /* @__PURE__ */ c(Vr, {
2255
- notification: l,
2256
- setOpened: m,
2257
- gamification: f,
2258
- onboardingOpts: r,
2259
- deepLink: f.deepLink
2260
- }) : /* @__PURE__ */ c(h, {
2261
- hiding: a,
2262
- children: /* @__PURE__ */ c("div", {
2263
- children: /* @__PURE__ */ c(Yr, {
2264
- close: l.close,
2265
- action: () => m(!0),
2266
- onboarding: r
2267
- })
2268
- })
2269
- });
2270
- }, Jr = () => xt, Fe = /* @__PURE__ */ d(Jr())({
2271
- name: "Container",
2272
- class: "Container_ctckejh",
2273
- propsAsIs: !0
2274
- }), Zr = ({ sdk: o }) => {
2275
- const a = o.getNotificationsStore(), l = ee(a), h = Ne(() => {
2276
- if (!(l != null && l.size))
2277
- return null;
2278
- for (const g of l.values())
2279
- if (g.type === ge.ONBOARDING)
2280
- return g;
2281
- return l.values().next().value;
2282
- }, [l]);
2283
- return (h == null ? void 0 : h.type) === ge.QUESTION ? /* @__PURE__ */ c(Fe, { hiding: h.hiding, children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(at, { ...h }) }) }) : (h == null ? void 0 : h.type) === ge.QUESTION_RESOLVED ? /* @__PURE__ */ c(Fe, { hiding: h.hiding, children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(at, { ...h }) }) }) : (h == null ? void 0 : h.type) === ge.ONBOARDING ? /* @__PURE__ */ c(
2284
- Xr,
2285
- {
2286
- NotificationContainer: Fe,
2287
- sdk: o,
2288
- notification: h,
2289
- hiding: h.hiding
2290
- }
2291
- ) : null;
2292
- }, es = /* @__PURE__ */ d("div")({
2293
- name: "SDKContainer",
2294
- class: "SDKContainer_stu11h7",
2295
- propsAsIs: !1
2296
- }), ht = /* @__PURE__ */ d("div")({
2297
- name: "SDKScrollContainer",
2298
- class: "SDKScrollContainer_s1ucohr1",
2299
- propsAsIs: !1
2300
- }), ts = /* @__PURE__ */ d("div")({
2301
- name: "SDKContentContainer",
2302
- class: "SDKContentContainer_s1el4wvm",
2303
- propsAsIs: !1
2304
- }), ns = () => ts, ys = /* @__PURE__ */ d(ns())({
2305
- name: "SDKWhiteContainer",
2306
- class: "SDKWhiteContainer_s1oe3036",
2307
- propsAsIs: !0
2308
- }), is = (o) => {
2309
- const [a, l] = V(!1), h = ee(o.status), { data: g } = ee(o.getUserStore()), m = h === "ready", [f, r] = V(Z), w = dt(
2310
- (B, _) => {
2311
- r(_), _ === Z ? (B && o.createEventSession(B), o.openFeature(Re.GAMES)) : o.closeFeature();
2312
- },
2313
- [o]
2314
- );
2315
- return _e(() => {
2316
- !m && f === Z && (r(fe), o.closeFeature());
2317
- }, [m, f, o]), {
2318
- sdkEnabled: a,
2319
- sdkReady: m,
2320
- activeOverlay: f,
2321
- activateAndLoadOverlay: w,
2322
- enableSdk: (B) => {
2323
- o.initializeApp().then(({ enabled: _, err: v }) => {
2324
- if (l(!0), v) {
2325
- w(B, fe);
2326
- return;
2327
- }
2328
- if (_) {
2329
- w(B, Z);
2330
- return;
2331
- }
2332
- });
2333
- },
2334
- disableSdk: () => {
2335
- l(!1), o.disableApp();
2336
- },
2337
- isLogged: !!g
2338
- };
2339
- }, rs = (o) => {
2340
- const a = ee(o.getActiveFeature()), l = ee(o.streamStore()), [h, g] = V(null);
2341
- return _e(() => {
2342
- const m = o.getFeatures();
2343
- if (a)
2344
- for (const [f, r] of m)
2345
- f === a ? r.status.get() === he.Suspended && (r.enable(), g(r)) : r.status.get() === he.Ready && r.disable();
2346
- else {
2347
- for (const [, f] of m)
2348
- f.status.get() === he.Ready && f.disable();
2349
- g(null);
2350
- }
2351
- return () => {
2352
- for (const [, f] of m)
2353
- f.status.get() === he.Ready && f.disable();
2354
- };
2355
- }, [a, o, l]), [a, h];
2356
- }, ss = ({ sdk: o, className: a }) => {
2357
- const [, l] = rs(o);
2358
- return /* @__PURE__ */ c(en, { className: a, feature: l, sdk: o });
2359
- }, os = ({ sdk: o, overlays: a, children: l }) => {
2360
- const { sdkEnabled: h, sdkReady: g, activeOverlay: m, activateAndLoadOverlay: f, enableSdk: r, disableSdk: w, isLogged: B } = is(o);
2361
- return /* @__PURE__ */ I(es, { children: [
2362
- h && /* @__PURE__ */ c(
2363
- wn,
2364
- {
2365
- sdkReady: g,
2366
- activeOverlay: m,
2367
- className: Ve,
2368
- setActiveOverlay: (_) => f("", _)
2369
- }
2370
- ),
2371
- h && /* @__PURE__ */ c(Zr, { sdk: o }),
2372
- /* @__PURE__ */ c(
2373
- ht,
2374
- {
2375
- "data-nav": h.toString(),
2376
- style: { display: !h || m === fe ? "block" : "none" },
2377
- children: l && l({ enableSdk: r, disableSdk: w })
2378
- }
2379
- ),
2380
- /* @__PURE__ */ c(
2381
- ht,
2382
- {
2383
- "data-nav": h.toString(),
2384
- style: { display: m === Ie ? "block" : "none" },
2385
- children: a && m === Ie && a[m]
2386
- }
2387
- ),
2388
- B && h && m === Z && /* @__PURE__ */ c(ss, { className: Ve, sdk: o }),
2389
- !B && h && m === Z && /* @__PURE__ */ c("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
2390
- ] });
2391
- };
2392
- const ws = ({
2393
- sdkKey: o,
2394
- plugins: a,
2395
- children: l,
2396
- production: h = !0
2397
- }) => /* @__PURE__ */ c(Gt, { sdkKey: o, plugins: a, production: h, autoEnable: !1, children: l }), Is = ({ children: o, overlays: a }) => {
2398
- const { sdk: l, status: h } = Kt(Pt);
2399
- if (h === Mt.UNSET)
2400
- throw new Error("Wrap app in `StreamLayerProvider`");
2401
- return l ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ c(qt, { style: { height: "100%" }, children: /* @__PURE__ */ c(os, { sdk: l, overlays: a, children: o }) }) }) : o({});
2402
- };
2403
- export {
2404
- _t as A,
2405
- ws as M,
2406
- dr as O,
2407
- ys as a,
2408
- Is as b,
2409
- br as c,
2410
- In as o,
2411
- ht as r,
2412
- ts as s,
2413
- bn as w,
2414
- xt as x
2415
- };