@streamlayer/react 0.26.1 → 0.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{app-215a7e7d.js → app-aa02d571.js} +1 -1
- package/lib/{app-037724c5.cjs → app-f09f4092.cjs} +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/es/auth.js +2 -2
- package/lib/es/index.js +2 -2
- package/lib/es/masters.js +260 -212
- package/lib/es/points.js +2 -2
- package/lib/{index-98298310.js → index-72a4fe17.js} +872 -863
- package/lib/{index-e2714a2f.cjs → index-cd6e92ee.cjs} +4 -4
- package/lib/style.css +1 -1
- package/package.json +10 -10
package/lib/es/masters.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as v, useMemo as
|
|
3
|
-
import { s as r, q as
|
|
1
|
+
import { jsx as a, jsxs as d, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as _, useState as v, useMemo as L, useCallback as E, useEffect as N, useContext as Q } from "react";
|
|
3
|
+
import { s as r, q as f, o as C, Y as R, e as j, j as O, g as q, v as F, h as y, i as M, k as G, l as x, r as A, m as D, f as I, S as B, a as P, b as T, p as z } from "../index-72a4fe17.js";
|
|
4
4
|
import "react-auth-code-input";
|
|
5
5
|
import "react-phone-number-input";
|
|
6
6
|
import "@connectrpc/connect";
|
|
7
7
|
import "@connectrpc/connect-web";
|
|
8
8
|
import "@streamlayer/sl-eslib/users/users_connect";
|
|
9
9
|
import "react-countdown-circle-timer";
|
|
10
|
-
import { QuestionType as
|
|
10
|
+
import { QuestionType as H, FeatureType as w } from "@streamlayer/sdk-web-types";
|
|
11
11
|
import { FeatureStatus as h } from "@streamlayer/sdk-web-interfaces";
|
|
12
12
|
import "@streamlayer/sdk-web-features";
|
|
13
13
|
import "@streamlayer/sdk-web-api";
|
|
14
14
|
import "@streamlayer/sdk-web-storage";
|
|
15
|
-
import { useStore as
|
|
15
|
+
import { useStore as u } from "@nanostores/react";
|
|
16
16
|
import "@streamlayer/sdk-web-notifications";
|
|
17
17
|
import "./useStreamLayerApp.js";
|
|
18
18
|
import "@streamlayer/sdk-web";
|
|
@@ -21,309 +21,357 @@ import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
|
21
21
|
import "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
22
22
|
import "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
23
23
|
import "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
24
|
-
const
|
|
25
|
-
const l =
|
|
24
|
+
const U = ({ feature: s, sdk: e, children: t, className: n }) => {
|
|
25
|
+
const l = u(s.status), { slStreamId: o } = u(e.sdkStore);
|
|
26
26
|
return o != null && o.loading ? /* @__PURE__ */ a("div", { className: n, children: "event is loading..." }) : o != null && o.data ? l !== h.Ready ? /* @__PURE__ */ a("div", { className: n, children: "wait feature..." }) : t : /* @__PURE__ */ a("div", { className: n, children: "event is forbidden..." });
|
|
27
27
|
};
|
|
28
|
-
const
|
|
28
|
+
const K = /* @__PURE__ */ r("div")({
|
|
29
29
|
name: "n",
|
|
30
30
|
class: "n1aopxp8",
|
|
31
31
|
propsAsIs: !1
|
|
32
|
-
}),
|
|
33
|
-
children:
|
|
34
|
-
style:
|
|
32
|
+
}), V = ({
|
|
33
|
+
children: s,
|
|
34
|
+
style: e,
|
|
35
35
|
className: t
|
|
36
|
-
}) => /* @__PURE__ */ a(
|
|
37
|
-
style:
|
|
36
|
+
}) => /* @__PURE__ */ a(K, {
|
|
37
|
+
style: e,
|
|
38
38
|
className: t,
|
|
39
|
-
children:
|
|
39
|
+
children: s
|
|
40
40
|
});
|
|
41
|
-
const
|
|
41
|
+
const W = () => f, Y = () => f, Z = /* @__PURE__ */ r("div")({
|
|
42
42
|
name: "a",
|
|
43
43
|
class: "acysrl1",
|
|
44
44
|
propsAsIs: !1
|
|
45
|
-
}),
|
|
45
|
+
}), J = /* @__PURE__ */ r("div")({
|
|
46
46
|
name: "l",
|
|
47
47
|
class: "lo57cjm",
|
|
48
48
|
propsAsIs: !1
|
|
49
|
-
}),
|
|
49
|
+
}), X = /* @__PURE__ */ r(W())({
|
|
50
50
|
name: "p",
|
|
51
51
|
class: "p14kwh4y",
|
|
52
52
|
propsAsIs: !0
|
|
53
|
-
}),
|
|
53
|
+
}), ee = /* @__PURE__ */ r("span")({
|
|
54
54
|
name: "s",
|
|
55
55
|
class: "sxun7sq",
|
|
56
56
|
propsAsIs: !1
|
|
57
|
-
}),
|
|
57
|
+
}), se = /* @__PURE__ */ r("button")({
|
|
58
58
|
name: "c",
|
|
59
59
|
class: "c1i8ida8",
|
|
60
60
|
propsAsIs: !1
|
|
61
|
-
}),
|
|
61
|
+
}), ae = /* @__PURE__ */ r(Y())({
|
|
62
62
|
name: "g",
|
|
63
63
|
class: "g1m0xfmw",
|
|
64
64
|
propsAsIs: !0
|
|
65
|
-
}),
|
|
66
|
-
const t =
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
(t == null ? void 0 : t.iconName) && /* @__PURE__ */ a(
|
|
70
|
-
(t == null ? void 0 : t.label) && /* @__PURE__ */ a(
|
|
65
|
+
}), te = ({ type: s, close: e }) => {
|
|
66
|
+
const t = C[s];
|
|
67
|
+
return /* @__PURE__ */ d(Z, { children: [
|
|
68
|
+
/* @__PURE__ */ d(J, { children: [
|
|
69
|
+
(t == null ? void 0 : t.iconName) && /* @__PURE__ */ a(X, { name: t.iconName }),
|
|
70
|
+
(t == null ? void 0 : t.label) && /* @__PURE__ */ a(ee, { children: t.label })
|
|
71
71
|
] }),
|
|
72
|
-
/* @__PURE__ */ a(
|
|
72
|
+
/* @__PURE__ */ a(se, { onClick: e, children: /* @__PURE__ */ a(ae, { name: "icon-cross" }) })
|
|
73
73
|
] });
|
|
74
74
|
};
|
|
75
|
-
const
|
|
76
|
-
name: "
|
|
77
|
-
class: "
|
|
75
|
+
const ne = /* @__PURE__ */ r("div")({
|
|
76
|
+
name: "i",
|
|
77
|
+
class: "i1bwjtdb",
|
|
78
|
+
propsAsIs: !1
|
|
79
|
+
}), oe = /* @__PURE__ */ r("video")({
|
|
80
|
+
name: "e",
|
|
81
|
+
class: "enb7moc",
|
|
78
82
|
propsAsIs: !1
|
|
79
83
|
}), re = /* @__PURE__ */ r("img")({
|
|
84
|
+
name: "r",
|
|
85
|
+
class: "r1ws5lyh",
|
|
86
|
+
propsAsIs: !1
|
|
87
|
+
}), le = /* @__PURE__ */ r("div")({
|
|
88
|
+
name: "s",
|
|
89
|
+
class: "soibf55",
|
|
90
|
+
propsAsIs: !1
|
|
91
|
+
}), ie = ({ poster: s, source: e }) => {
|
|
92
|
+
const t = _(null), [n, l] = v(!1), [o, i] = v(!0);
|
|
93
|
+
return /* @__PURE__ */ d(ne, { onClick: () => {
|
|
94
|
+
const c = t == null ? void 0 : t.current;
|
|
95
|
+
c && l((p) => p ? (c.pause(), !1) : (c.play(), i(!1), !0));
|
|
96
|
+
}, children: [
|
|
97
|
+
/* @__PURE__ */ a(
|
|
98
|
+
oe,
|
|
99
|
+
{
|
|
100
|
+
ref: t,
|
|
101
|
+
src: e,
|
|
102
|
+
onEnded: () => {
|
|
103
|
+
var c;
|
|
104
|
+
(c = t == null ? void 0 : t.current) == null || c.load(), l(!1), i(!0);
|
|
105
|
+
},
|
|
106
|
+
style: { visibility: o ? "hidden" : "visible" }
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ a(re, { src: s, style: { visibility: o ? "visible" : "hidden" } }),
|
|
110
|
+
/* @__PURE__ */ a(le, { children: !n && /* @__PURE__ */ a(f, { name: "icon-play" }) })
|
|
111
|
+
] });
|
|
112
|
+
};
|
|
113
|
+
const ce = /* @__PURE__ */ r("div")({
|
|
114
|
+
name: "t",
|
|
115
|
+
class: "t18unvw4",
|
|
116
|
+
propsAsIs: !1
|
|
117
|
+
}), de = /* @__PURE__ */ r("div")({
|
|
118
|
+
name: "r",
|
|
119
|
+
class: "rs0uvk8",
|
|
120
|
+
propsAsIs: !1
|
|
121
|
+
}), ue = /* @__PURE__ */ r("h3")({
|
|
122
|
+
name: "n",
|
|
123
|
+
class: "n1hem4g7",
|
|
124
|
+
propsAsIs: !1
|
|
125
|
+
}), pe = /* @__PURE__ */ r("div")({
|
|
80
126
|
name: "i",
|
|
81
|
-
class: "
|
|
127
|
+
class: "i193lbwv",
|
|
82
128
|
propsAsIs: !1
|
|
83
|
-
}),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
children: /* @__PURE__ */ a(re, {
|
|
87
|
-
alt: "sponsor-logo",
|
|
88
|
-
src: e
|
|
89
|
-
})
|
|
90
|
-
});
|
|
91
|
-
const ie = /* @__PURE__ */ r("div")({
|
|
92
|
-
name: "x",
|
|
93
|
-
class: "xk8r1eq",
|
|
129
|
+
}), me = /* @__PURE__ */ r("a")({
|
|
130
|
+
name: "a",
|
|
131
|
+
class: "a1dka9qs",
|
|
94
132
|
propsAsIs: !1
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
133
|
+
}), ve = ({ title: s, instantView: e }) => /* @__PURE__ */ d(ce, { children: [
|
|
134
|
+
(e == null ? void 0 : e.video) && /* @__PURE__ */ a(ie, { source: e.video.url, poster: e.video.thumbnailUrl }),
|
|
135
|
+
/* @__PURE__ */ d(de, { children: [
|
|
136
|
+
/* @__PURE__ */ a(ue, { children: (e == null ? void 0 : e.heading) || s }),
|
|
137
|
+
/* @__PURE__ */ a(pe, { children: e == null ? void 0 : e.body }),
|
|
138
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ d(me, { href: "webLink", target: "_blank", children: [
|
|
139
|
+
"Explore more of the Masters History",
|
|
140
|
+
/* @__PURE__ */ a(f, { name: "icon-external-link" })
|
|
141
|
+
] })
|
|
142
|
+
] })
|
|
143
|
+
] });
|
|
144
|
+
const fe = /* @__PURE__ */ r("div")({
|
|
145
|
+
name: "d",
|
|
146
|
+
class: "dk8r1eq",
|
|
147
|
+
propsAsIs: !1
|
|
148
|
+
}), he = ({
|
|
149
|
+
openedQuestion: s
|
|
150
|
+
}) => {
|
|
151
|
+
var e;
|
|
152
|
+
return ((e = s == null ? void 0 : s.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */ a(ve, {
|
|
153
|
+
...s.attributes.attributes.value
|
|
154
|
+
}) : null;
|
|
155
|
+
}, be = ({
|
|
156
|
+
extendedQuestion: s,
|
|
157
|
+
vote: e
|
|
158
|
+
}) => {
|
|
159
|
+
const {
|
|
160
|
+
loading: t,
|
|
161
|
+
data: n
|
|
162
|
+
} = s;
|
|
163
|
+
return !t && n ? /* @__PURE__ */ a(R, {
|
|
164
|
+
vote: e,
|
|
165
|
+
openedQuestion: n
|
|
166
|
+
}) : null;
|
|
167
|
+
}, ye = ({
|
|
168
|
+
gamification: s
|
|
99
169
|
}) => {
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
170
|
+
var e;
|
|
171
|
+
const t = u(s.openedQuestion.$store), n = u(s.openedQuestion.$extendedStore);
|
|
172
|
+
if (!t)
|
|
173
|
+
return null;
|
|
174
|
+
const l = t.type;
|
|
175
|
+
return /* @__PURE__ */ d(fe, {
|
|
176
|
+
children: [/* @__PURE__ */ a(te, {
|
|
177
|
+
close: s.closeQuestion,
|
|
178
|
+
type: ((e = t.attributes) == null ? void 0 : e.type) || H.UNSET
|
|
179
|
+
}), l === "question" && /* @__PURE__ */ a(be, {
|
|
180
|
+
vote: s.submitAnswer,
|
|
181
|
+
extendedQuestion: n
|
|
182
|
+
}), l !== "question" && /* @__PURE__ */ a(he, {
|
|
183
|
+
openedQuestion: t
|
|
110
184
|
})]
|
|
111
185
|
});
|
|
112
|
-
},
|
|
113
|
-
const { data:
|
|
114
|
-
const i =
|
|
186
|
+
}, ge = ({ leaderboardList: s }) => {
|
|
187
|
+
const { data: e } = u(s.$store), [t, n] = v(void 0), l = (o) => {
|
|
188
|
+
const i = e.find((c) => c.userId === o);
|
|
115
189
|
n(i);
|
|
116
190
|
};
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
t && /* @__PURE__ */ a(
|
|
119
|
-
!t && /* @__PURE__ */ a(
|
|
191
|
+
return /* @__PURE__ */ d(S, { children: [
|
|
192
|
+
t && /* @__PURE__ */ a(j, { comeBack: () => l(null), ...t }),
|
|
193
|
+
!t && /* @__PURE__ */ a(O, { fetchMore: s.fetchMore, items: e, openItemDetail: l })
|
|
120
194
|
] });
|
|
121
|
-
},
|
|
122
|
-
const t =
|
|
123
|
-
return t != null && t.data ? /* @__PURE__ */ a(
|
|
124
|
-
},
|
|
125
|
-
const { data:
|
|
126
|
-
return
|
|
127
|
-
},
|
|
128
|
-
const [
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */ a(
|
|
132
|
-
|
|
195
|
+
}, ke = ({ store: s, openQuestion: e }) => {
|
|
196
|
+
const t = u(s);
|
|
197
|
+
return t != null && t.data ? /* @__PURE__ */ a(q, { openQuestion: e, questions: t.data }) : /* @__PURE__ */ a("div", { children: "wait questions..." });
|
|
198
|
+
}, Ae = ({ store: s }) => {
|
|
199
|
+
const { data: e } = u(s);
|
|
200
|
+
return e != null && e.summary ? /* @__PURE__ */ a(F, { ...e.summary, ...e.percentage }) : /* @__PURE__ */ a("div", { children: "wait user..." });
|
|
201
|
+
}, Se = ({ gamification: s }) => {
|
|
202
|
+
const [e, t] = v(y.HOME);
|
|
203
|
+
return /* @__PURE__ */ d("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
204
|
+
/* @__PURE__ */ d(M, { children: [
|
|
205
|
+
/* @__PURE__ */ a(G, { activePage: e, toggleActivePage: t }),
|
|
206
|
+
e === y.HOME && /* @__PURE__ */ a(Ae, { store: s.userSummary.getStore() })
|
|
133
207
|
] }),
|
|
134
|
-
|
|
135
|
-
|
|
208
|
+
e === y.HOME && /* @__PURE__ */ a(x, { children: /* @__PURE__ */ a(ke, { openQuestion: s.openQuestion, store: s.feedList.getStore() }) }),
|
|
209
|
+
e === y.LEADERBOARD && /* @__PURE__ */ a(x, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ a(ge, { leaderboardList: s.leaderboardList }) })
|
|
136
210
|
] });
|
|
137
211
|
};
|
|
138
|
-
const
|
|
139
|
-
name: "
|
|
140
|
-
class: "
|
|
212
|
+
const $e = () => V, xe = /* @__PURE__ */ r($e())({
|
|
213
|
+
name: "l",
|
|
214
|
+
class: "l1ph66cs",
|
|
141
215
|
propsAsIs: !0
|
|
142
|
-
}),
|
|
143
|
-
gamification:
|
|
144
|
-
className:
|
|
216
|
+
}), Ie = ({
|
|
217
|
+
gamification: s,
|
|
218
|
+
className: e
|
|
145
219
|
}) => {
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
className: s,
|
|
153
|
-
children: /* @__PURE__ */ a(ce, {
|
|
154
|
-
closeQuestion: e.closeQuestion,
|
|
155
|
-
vote: e.submitAnswer,
|
|
156
|
-
openedQuestion: n
|
|
220
|
+
const t = u(s.openedQuestion.$store);
|
|
221
|
+
return /* @__PURE__ */ d(S, {
|
|
222
|
+
children: [t && /* @__PURE__ */ a(xe, {
|
|
223
|
+
className: e,
|
|
224
|
+
children: /* @__PURE__ */ a(ye, {
|
|
225
|
+
gamification: s
|
|
157
226
|
})
|
|
158
|
-
}), /* @__PURE__ */ a(
|
|
159
|
-
className:
|
|
227
|
+
}), /* @__PURE__ */ a(A, {
|
|
228
|
+
className: e,
|
|
160
229
|
"data-nav": "true",
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
flexDirection: "column"
|
|
164
|
-
},
|
|
165
|
-
children: /* @__PURE__ */ a(me, {
|
|
166
|
-
gamification: e
|
|
230
|
+
children: /* @__PURE__ */ a(Se, {
|
|
231
|
+
gamification: s
|
|
167
232
|
})
|
|
168
233
|
})]
|
|
169
234
|
});
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}) => {
|
|
174
|
-
const t = p(e.openedInsight);
|
|
175
|
-
return /* @__PURE__ */ c(g, { children: [
|
|
176
|
-
!t && e.insights && /* @__PURE__ */ a(D, { className: s, highlights: e, store: e.insights.getStore() }),
|
|
177
|
-
t && /* @__PURE__ */ a(
|
|
178
|
-
j,
|
|
179
|
-
{
|
|
180
|
-
className: s,
|
|
181
|
-
openedInsight: t,
|
|
182
|
-
closeHighlights: e.closeFeature,
|
|
183
|
-
closeInsight: e.closeHighlight
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
] });
|
|
187
|
-
}, ye = ({
|
|
188
|
-
sdk: e,
|
|
189
|
-
feature: s,
|
|
235
|
+
}, Ne = ({
|
|
236
|
+
sdk: s,
|
|
237
|
+
feature: e,
|
|
190
238
|
className: t
|
|
191
|
-
}) =>
|
|
192
|
-
const
|
|
239
|
+
}) => L(() => e && e.featureConfig.get().type === w.GAMES ? /* @__PURE__ */ a(U, { className: t, sdk: s, feature: e, children: /* @__PURE__ */ a(Ie, { className: t, gamification: e, sdk: s }) }) : null, [s, e, t]);
|
|
240
|
+
const we = /* @__PURE__ */ r("button")({
|
|
193
241
|
name: "e",
|
|
194
242
|
class: "enu64b2",
|
|
195
243
|
propsAsIs: !1
|
|
196
|
-
}),
|
|
244
|
+
}), _e = /* @__PURE__ */ r("span")({
|
|
197
245
|
name: "t",
|
|
198
246
|
class: "tw2meku",
|
|
199
247
|
propsAsIs: !1
|
|
200
|
-
}),
|
|
248
|
+
}), Le = /* @__PURE__ */ r("span")({
|
|
201
249
|
name: "a",
|
|
202
250
|
class: "aka8vam",
|
|
203
251
|
propsAsIs: !1
|
|
204
|
-
}),
|
|
205
|
-
l && /* @__PURE__ */ a(
|
|
206
|
-
/* @__PURE__ */ a(
|
|
252
|
+
}), $ = ({ disabled: s, active: e, onClick: t, label: n, icon: l }) => /* @__PURE__ */ a(we, { onClick: t, disabled: s, "data-selected": e, children: /* @__PURE__ */ d(S, { children: [
|
|
253
|
+
l && /* @__PURE__ */ a(_e, { children: l }),
|
|
254
|
+
/* @__PURE__ */ a(Le, { children: n })
|
|
207
255
|
] }) });
|
|
208
|
-
const
|
|
256
|
+
const Ee = () => f, Qe = /* @__PURE__ */ r(Ee())({
|
|
209
257
|
name: "a",
|
|
210
258
|
class: "a10lggiw",
|
|
211
259
|
propsAsIs: !0
|
|
212
|
-
}),
|
|
213
|
-
var
|
|
214
|
-
return /* @__PURE__ */ a(
|
|
215
|
-
...
|
|
260
|
+
}), b = "channels", Ce = (s) => {
|
|
261
|
+
var e;
|
|
262
|
+
return /* @__PURE__ */ a($, {
|
|
263
|
+
...s,
|
|
216
264
|
id: "channels",
|
|
217
265
|
label: "Channels",
|
|
218
|
-
icon: /* @__PURE__ */ a(
|
|
266
|
+
icon: /* @__PURE__ */ a(Qe, {
|
|
219
267
|
name: "icon-btn-channels",
|
|
220
|
-
"data-selected": (
|
|
268
|
+
"data-selected": (e = s.active) == null ? void 0 : e.toString()
|
|
221
269
|
})
|
|
222
270
|
});
|
|
223
271
|
};
|
|
224
|
-
const
|
|
272
|
+
const Re = () => f, je = /* @__PURE__ */ r(Re())({
|
|
225
273
|
name: "d",
|
|
226
274
|
class: "d1x5s8ie",
|
|
227
275
|
propsAsIs: !0
|
|
228
|
-
}),
|
|
229
|
-
var
|
|
230
|
-
return /* @__PURE__ */ a(
|
|
231
|
-
...
|
|
276
|
+
}), m = "featuredGroups", Oe = (s) => {
|
|
277
|
+
var e;
|
|
278
|
+
return /* @__PURE__ */ a($, {
|
|
279
|
+
...s,
|
|
232
280
|
label: "FG+",
|
|
233
281
|
id: "featuredGroups",
|
|
234
|
-
icon: /* @__PURE__ */ a(
|
|
282
|
+
icon: /* @__PURE__ */ a(je, {
|
|
235
283
|
name: "icon-btn-feature-groups",
|
|
236
|
-
"data-selected": (
|
|
284
|
+
"data-selected": (e = s.active) == null ? void 0 : e.toString()
|
|
237
285
|
})
|
|
238
286
|
});
|
|
239
287
|
};
|
|
240
|
-
const
|
|
288
|
+
const qe = () => f, Fe = /* @__PURE__ */ r(qe())({
|
|
241
289
|
name: "n",
|
|
242
290
|
class: "ntav86o",
|
|
243
291
|
propsAsIs: !0
|
|
244
|
-
}),
|
|
245
|
-
var
|
|
246
|
-
return /* @__PURE__ */ a(
|
|
247
|
-
...
|
|
292
|
+
}), g = "leaderboard", Me = (s) => {
|
|
293
|
+
var e;
|
|
294
|
+
return /* @__PURE__ */ a($, {
|
|
295
|
+
...s,
|
|
248
296
|
label: "Leader Board",
|
|
249
297
|
id: "leaderboard",
|
|
250
|
-
icon: /* @__PURE__ */ a(
|
|
298
|
+
icon: /* @__PURE__ */ a(Fe, {
|
|
251
299
|
name: "icon-btn-leaderboard",
|
|
252
|
-
"data-selected": (
|
|
300
|
+
"data-selected": (e = s.active) == null ? void 0 : e.toString()
|
|
253
301
|
})
|
|
254
302
|
});
|
|
255
303
|
};
|
|
256
|
-
const
|
|
304
|
+
const Ge = /* @__PURE__ */ r("div")({
|
|
257
305
|
name: "n",
|
|
258
306
|
class: "n1rlvhvz",
|
|
259
307
|
propsAsIs: !1
|
|
260
|
-
}),
|
|
261
|
-
children:
|
|
262
|
-
className:
|
|
263
|
-
}) => /* @__PURE__ */ a(
|
|
264
|
-
className:
|
|
265
|
-
children:
|
|
308
|
+
}), De = ({
|
|
309
|
+
children: s,
|
|
310
|
+
className: e
|
|
311
|
+
}) => /* @__PURE__ */ a(Ge, {
|
|
312
|
+
className: e,
|
|
313
|
+
children: s
|
|
266
314
|
});
|
|
267
|
-
const
|
|
315
|
+
const Be = () => De, Pe = /* @__PURE__ */ r(Be())({
|
|
268
316
|
name: "n",
|
|
269
317
|
class: "n9bnom",
|
|
270
318
|
propsAsIs: !0
|
|
271
|
-
}),
|
|
272
|
-
/* @__PURE__ */ a(
|
|
319
|
+
}), Te = ({ activeOverlay: s, setActiveOverlay: e, sdkReady: t, className: n }) => /* @__PURE__ */ d(Pe, { className: n, children: [
|
|
320
|
+
/* @__PURE__ */ a(Ce, { active: s === b, onClick: () => e(b) }),
|
|
273
321
|
/* @__PURE__ */ a(
|
|
274
|
-
|
|
322
|
+
Oe,
|
|
275
323
|
{
|
|
276
|
-
active:
|
|
324
|
+
active: s === m,
|
|
277
325
|
disabled: !t,
|
|
278
326
|
onClick: () => {
|
|
279
|
-
|
|
327
|
+
e(m);
|
|
280
328
|
}
|
|
281
329
|
}
|
|
282
330
|
),
|
|
283
331
|
/* @__PURE__ */ a(
|
|
284
|
-
|
|
332
|
+
Me,
|
|
285
333
|
{
|
|
286
|
-
active:
|
|
287
|
-
onClick: () =>
|
|
334
|
+
active: s === g,
|
|
335
|
+
onClick: () => e(g)
|
|
288
336
|
}
|
|
289
337
|
)
|
|
290
|
-
] }),
|
|
291
|
-
const [
|
|
292
|
-
(
|
|
293
|
-
o(
|
|
338
|
+
] }), ze = (s) => {
|
|
339
|
+
const [e, t] = v(!1), n = u(s.status) === "ready", [l, o] = v(m), i = E(
|
|
340
|
+
(c, p) => {
|
|
341
|
+
o(p), p === m ? (c && s.createEventSession(c), s.openFeature(w.GAMES)) : s.closeFeature();
|
|
294
342
|
},
|
|
295
|
-
[
|
|
343
|
+
[s]
|
|
296
344
|
);
|
|
297
|
-
return
|
|
298
|
-
!n && l ===
|
|
299
|
-
}, [n, l,
|
|
300
|
-
sdkEnabled:
|
|
345
|
+
return N(() => {
|
|
346
|
+
!n && l === m && (o(b), s.closeFeature());
|
|
347
|
+
}, [n, l, s]), {
|
|
348
|
+
sdkEnabled: e,
|
|
301
349
|
sdkReady: n,
|
|
302
350
|
activeOverlay: l,
|
|
303
351
|
activateAndLoadOverlay: i,
|
|
304
|
-
enableSdk: (
|
|
305
|
-
|
|
306
|
-
if (t(!0),
|
|
307
|
-
i(
|
|
352
|
+
enableSdk: (c) => {
|
|
353
|
+
s.initializeApp().then(({ enabled: p, err: k }) => {
|
|
354
|
+
if (t(!0), k) {
|
|
355
|
+
i(c, b);
|
|
308
356
|
return;
|
|
309
357
|
}
|
|
310
|
-
if (
|
|
311
|
-
i(
|
|
358
|
+
if (p) {
|
|
359
|
+
i(c, m);
|
|
312
360
|
return;
|
|
313
361
|
}
|
|
314
362
|
});
|
|
315
363
|
},
|
|
316
364
|
disableSdk: () => {
|
|
317
|
-
t(!1),
|
|
365
|
+
t(!1), s.disableApp();
|
|
318
366
|
}
|
|
319
367
|
};
|
|
320
|
-
},
|
|
321
|
-
const
|
|
322
|
-
return
|
|
323
|
-
const l =
|
|
324
|
-
if (
|
|
368
|
+
}, He = (s) => {
|
|
369
|
+
const e = u(s.getActiveFeature()), [t, n] = v(null);
|
|
370
|
+
return N(() => {
|
|
371
|
+
const l = s.getFeatures();
|
|
372
|
+
if (e)
|
|
325
373
|
for (const [o, i] of l)
|
|
326
|
-
o ===
|
|
374
|
+
o === e ? i.status.get() === h.Suspended && (i.enable(), n(i)) : i.status.get() === h.Ready && i.disable();
|
|
327
375
|
else {
|
|
328
376
|
for (const [, o] of l)
|
|
329
377
|
o.status.get() === h.Ready && o.disable();
|
|
@@ -333,52 +381,52 @@ const we = () => Qe, Re = /* @__PURE__ */ r(we())({
|
|
|
333
381
|
for (const [, o] of l)
|
|
334
382
|
o.status.get() === h.Ready && o.disable();
|
|
335
383
|
};
|
|
336
|
-
}, [
|
|
337
|
-
},
|
|
338
|
-
const [, t] =
|
|
339
|
-
return /* @__PURE__ */ a(
|
|
340
|
-
},
|
|
341
|
-
const { sdkEnabled: n, sdkReady: l, activeOverlay: o, activateAndLoadOverlay: i, enableSdk:
|
|
342
|
-
return /* @__PURE__ */
|
|
384
|
+
}, [e, s]), [e, t];
|
|
385
|
+
}, Ue = ({ sdk: s, className: e }) => {
|
|
386
|
+
const [, t] = He(s);
|
|
387
|
+
return /* @__PURE__ */ a(Ne, { className: e, feature: t, sdk: s });
|
|
388
|
+
}, Ke = ({ sdk: s, overlays: e, children: t }) => {
|
|
389
|
+
const { sdkEnabled: n, sdkReady: l, activeOverlay: o, activateAndLoadOverlay: i, enableSdk: c, disableSdk: p } = ze(s);
|
|
390
|
+
return /* @__PURE__ */ d(D, { children: [
|
|
343
391
|
n && /* @__PURE__ */ a(
|
|
344
|
-
|
|
392
|
+
Te,
|
|
345
393
|
{
|
|
346
394
|
sdkReady: l,
|
|
347
395
|
activeOverlay: o,
|
|
348
396
|
className: I,
|
|
349
|
-
setActiveOverlay: (
|
|
397
|
+
setActiveOverlay: (k) => i("", k)
|
|
350
398
|
}
|
|
351
399
|
),
|
|
352
400
|
/* @__PURE__ */ a(
|
|
353
|
-
|
|
401
|
+
A,
|
|
354
402
|
{
|
|
355
403
|
"data-nav": n.toString(),
|
|
356
|
-
style: { display: !n || o ===
|
|
357
|
-
children: t && t({ enableSdk:
|
|
404
|
+
style: { display: !n || o === b ? "block" : "none" },
|
|
405
|
+
children: t && t({ enableSdk: c, disableSdk: p })
|
|
358
406
|
}
|
|
359
407
|
),
|
|
360
408
|
/* @__PURE__ */ a(
|
|
361
|
-
|
|
409
|
+
A,
|
|
362
410
|
{
|
|
363
411
|
"data-nav": n.toString(),
|
|
364
|
-
style: { display: o ===
|
|
365
|
-
children:
|
|
412
|
+
style: { display: o === g ? "block" : "none" },
|
|
413
|
+
children: e && o === g && e[o]
|
|
366
414
|
}
|
|
367
415
|
),
|
|
368
|
-
n && o ===
|
|
416
|
+
n && o === m && /* @__PURE__ */ a(Ue, { className: I, sdk: s })
|
|
369
417
|
] });
|
|
370
|
-
},
|
|
371
|
-
sdkKey:
|
|
372
|
-
plugins:
|
|
418
|
+
}, bs = ({
|
|
419
|
+
sdkKey: s,
|
|
420
|
+
plugins: e,
|
|
373
421
|
children: t,
|
|
374
422
|
production: n = !0
|
|
375
|
-
}) => /* @__PURE__ */ a(
|
|
376
|
-
const { sdk: t, status: n } =
|
|
377
|
-
if (n ===
|
|
423
|
+
}) => /* @__PURE__ */ a(B, { sdkKey: s, plugins: e, production: n, autoEnable: !1, children: t }), ys = ({ children: s, overlays: e }) => {
|
|
424
|
+
const { sdk: t, status: n } = Q(P);
|
|
425
|
+
if (n === T.UNSET)
|
|
378
426
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
379
|
-
return t ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ a(
|
|
427
|
+
return t ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ a(z, { children: /* @__PURE__ */ a(Ke, { sdk: t, overlays: e, children: s }) }) }) : s({});
|
|
380
428
|
};
|
|
381
429
|
export {
|
|
382
|
-
|
|
383
|
-
|
|
430
|
+
bs as MastersStreamLayerProvider,
|
|
431
|
+
ys as MastersStreamLayerSDKReact
|
|
384
432
|
};
|