@streamlayer/react 0.26.3 → 0.27.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.
- package/lib/{app-aa02d571.js → app-15ce925d.js} +1 -1
- package/lib/{app-f09f4092.cjs → app-bc994186.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 +129 -326
- package/lib/es/points.js +2 -2
- package/lib/index-0f29ff3a.js +245 -0
- package/lib/index-3e88fb0c.cjs +1 -0
- package/lib/{index-72a4fe17.js → index-ad42babc.js} +734 -743
- package/lib/index-e9cf1c5b.cjs +14 -0
- package/lib/style.css +1 -1
- package/package.json +12 -11
- package/lib/index-cd6e92ee.cjs +0 -14
package/lib/es/masters.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { s as
|
|
1
|
+
import { jsx as s, jsxs as S, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as I, useMemo as _, Suspense as F, useState as h, useCallback as E, useEffect as x, useContext as R } from "react";
|
|
3
|
+
import { s as u, q as g, l as O, f as A, r as N, S as w, a as G, b as j, p as M } from "../index-ad42babc.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 {
|
|
11
|
-
import { FeatureStatus as
|
|
10
|
+
import { FeatureType as $ } from "@streamlayer/sdk-web-types";
|
|
11
|
+
import { FeatureStatus as f } 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 p } from "@nanostores/react";
|
|
16
16
|
import "@streamlayer/sdk-web-notifications";
|
|
17
17
|
import "./useStreamLayerApp.js";
|
|
18
18
|
import "@streamlayer/sdk-web";
|
|
@@ -21,412 +21,215 @@ 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
|
|
26
|
-
return
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class: "n1aopxp8",
|
|
31
|
-
propsAsIs: !1
|
|
32
|
-
}), V = ({
|
|
33
|
-
children: s,
|
|
34
|
-
style: e,
|
|
24
|
+
const z = ({ feature: e, sdk: a, children: t, className: n }) => {
|
|
25
|
+
const o = p(e.status), { slStreamId: r } = p(a.sdkStore);
|
|
26
|
+
return r != null && r.loading ? /* @__PURE__ */ s("div", { className: n, children: "event is loading..." }) : r != null && r.data ? o !== f.Ready ? /* @__PURE__ */ s("div", { className: n, children: "wait feature..." }) : t : /* @__PURE__ */ s("div", { className: n, children: "event is forbidden..." });
|
|
27
|
+
}, P = I(() => import("../index-0f29ff3a.js")), T = ({
|
|
28
|
+
sdk: e,
|
|
29
|
+
feature: a,
|
|
35
30
|
className: t
|
|
36
|
-
}) => /* @__PURE__ */ a(K, {
|
|
37
|
-
style: e,
|
|
38
|
-
className: t,
|
|
39
|
-
children: s
|
|
40
|
-
});
|
|
41
|
-
const W = () => f, Y = () => f, Z = /* @__PURE__ */ r("div")({
|
|
42
|
-
name: "a",
|
|
43
|
-
class: "acysrl1",
|
|
44
|
-
propsAsIs: !1
|
|
45
|
-
}), J = /* @__PURE__ */ r("div")({
|
|
46
|
-
name: "l",
|
|
47
|
-
class: "lo57cjm",
|
|
48
|
-
propsAsIs: !1
|
|
49
|
-
}), X = /* @__PURE__ */ r(W())({
|
|
50
|
-
name: "p",
|
|
51
|
-
class: "p14kwh4y",
|
|
52
|
-
propsAsIs: !0
|
|
53
|
-
}), ee = /* @__PURE__ */ r("span")({
|
|
54
|
-
name: "s",
|
|
55
|
-
class: "sxun7sq",
|
|
56
|
-
propsAsIs: !1
|
|
57
|
-
}), se = /* @__PURE__ */ r("button")({
|
|
58
|
-
name: "c",
|
|
59
|
-
class: "c1i8ida8",
|
|
60
|
-
propsAsIs: !1
|
|
61
|
-
}), ae = /* @__PURE__ */ r(Y())({
|
|
62
|
-
name: "g",
|
|
63
|
-
class: "g1m0xfmw",
|
|
64
|
-
propsAsIs: !0
|
|
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
|
-
] }),
|
|
72
|
-
/* @__PURE__ */ a(se, { onClick: e, children: /* @__PURE__ */ a(ae, { name: "icon-cross" }) })
|
|
73
|
-
] });
|
|
74
|
-
};
|
|
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",
|
|
82
|
-
propsAsIs: !1
|
|
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")({
|
|
126
|
-
name: "i",
|
|
127
|
-
class: "i193lbwv",
|
|
128
|
-
propsAsIs: !1
|
|
129
|
-
}), me = /* @__PURE__ */ r("a")({
|
|
130
|
-
name: "a",
|
|
131
|
-
class: "a1dka9qs",
|
|
132
|
-
propsAsIs: !1
|
|
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
31
|
}) => {
|
|
151
|
-
|
|
152
|
-
return
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
|
|
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
|
|
169
|
-
}) => {
|
|
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
|
|
184
|
-
})]
|
|
185
|
-
});
|
|
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);
|
|
189
|
-
n(i);
|
|
190
|
-
};
|
|
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 })
|
|
194
|
-
] });
|
|
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() })
|
|
207
|
-
] }),
|
|
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 }) })
|
|
210
|
-
] });
|
|
32
|
+
const n = _(() => a && a.featureConfig.get().type === $.GAMES ? /* @__PURE__ */ s(z, { className: t, sdk: e, feature: a, children: /* @__PURE__ */ s(P, { className: t, gamification: a, sdk: e }) }) : null, [e, a, t]);
|
|
33
|
+
return /* @__PURE__ */ s(
|
|
34
|
+
F,
|
|
35
|
+
{
|
|
36
|
+
fallback: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
37
|
+
children: n
|
|
38
|
+
}
|
|
39
|
+
);
|
|
211
40
|
};
|
|
212
|
-
const
|
|
213
|
-
name: "l",
|
|
214
|
-
class: "l1ph66cs",
|
|
215
|
-
propsAsIs: !0
|
|
216
|
-
}), Ie = ({
|
|
217
|
-
gamification: s,
|
|
218
|
-
className: e
|
|
219
|
-
}) => {
|
|
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
|
|
226
|
-
})
|
|
227
|
-
}), /* @__PURE__ */ a(A, {
|
|
228
|
-
className: e,
|
|
229
|
-
"data-nav": "true",
|
|
230
|
-
children: /* @__PURE__ */ a(Se, {
|
|
231
|
-
gamification: s
|
|
232
|
-
})
|
|
233
|
-
})]
|
|
234
|
-
});
|
|
235
|
-
}, Ne = ({
|
|
236
|
-
sdk: s,
|
|
237
|
-
feature: e,
|
|
238
|
-
className: t
|
|
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")({
|
|
41
|
+
const U = /* @__PURE__ */ u("button")({
|
|
241
42
|
name: "e",
|
|
242
43
|
class: "enu64b2",
|
|
243
44
|
propsAsIs: !1
|
|
244
|
-
}),
|
|
45
|
+
}), q = /* @__PURE__ */ u("span")({
|
|
245
46
|
name: "t",
|
|
246
47
|
class: "tw2meku",
|
|
247
48
|
propsAsIs: !1
|
|
248
|
-
}),
|
|
49
|
+
}), B = /* @__PURE__ */ u("span")({
|
|
249
50
|
name: "a",
|
|
250
51
|
class: "aka8vam",
|
|
251
52
|
propsAsIs: !1
|
|
252
|
-
}),
|
|
253
|
-
|
|
254
|
-
/* @__PURE__ */
|
|
53
|
+
}), k = ({ disabled: e, active: a, onClick: t, label: n, icon: o }) => /* @__PURE__ */ s(U, { onClick: t, disabled: e, "data-selected": a, children: /* @__PURE__ */ S(L, { children: [
|
|
54
|
+
o && /* @__PURE__ */ s(q, { children: o }),
|
|
55
|
+
/* @__PURE__ */ s(B, { children: n })
|
|
255
56
|
] }) });
|
|
256
|
-
const
|
|
57
|
+
const D = () => g, K = /* @__PURE__ */ u(D())({
|
|
257
58
|
name: "a",
|
|
258
59
|
class: "a10lggiw",
|
|
259
60
|
propsAsIs: !0
|
|
260
|
-
}),
|
|
261
|
-
var
|
|
262
|
-
return /* @__PURE__ */
|
|
263
|
-
...
|
|
61
|
+
}), y = "channels", W = (e) => {
|
|
62
|
+
var a;
|
|
63
|
+
return /* @__PURE__ */ s(k, {
|
|
64
|
+
...e,
|
|
264
65
|
id: "channels",
|
|
265
66
|
label: "Channels",
|
|
266
|
-
icon: /* @__PURE__ */
|
|
67
|
+
icon: /* @__PURE__ */ s(K, {
|
|
267
68
|
name: "icon-btn-channels",
|
|
268
|
-
"data-selected": (
|
|
69
|
+
"data-selected": (a = e.active) == null ? void 0 : a.toString()
|
|
269
70
|
})
|
|
270
71
|
});
|
|
271
72
|
};
|
|
272
|
-
const
|
|
73
|
+
const Y = () => g, H = /* @__PURE__ */ u(Y())({
|
|
273
74
|
name: "d",
|
|
274
75
|
class: "d1x5s8ie",
|
|
275
76
|
propsAsIs: !0
|
|
276
|
-
}),
|
|
277
|
-
var
|
|
278
|
-
return /* @__PURE__ */
|
|
279
|
-
...
|
|
77
|
+
}), c = "featuredGroups", J = (e) => {
|
|
78
|
+
var a;
|
|
79
|
+
return /* @__PURE__ */ s(k, {
|
|
80
|
+
...e,
|
|
280
81
|
label: "FG+",
|
|
281
82
|
id: "featuredGroups",
|
|
282
|
-
icon: /* @__PURE__ */
|
|
83
|
+
icon: /* @__PURE__ */ s(H, {
|
|
283
84
|
name: "icon-btn-feature-groups",
|
|
284
|
-
"data-selected": (
|
|
85
|
+
"data-selected": (a = e.active) == null ? void 0 : a.toString()
|
|
285
86
|
})
|
|
286
87
|
});
|
|
287
88
|
};
|
|
288
|
-
const
|
|
89
|
+
const Q = () => g, V = /* @__PURE__ */ u(Q())({
|
|
289
90
|
name: "n",
|
|
290
91
|
class: "ntav86o",
|
|
291
92
|
propsAsIs: !0
|
|
292
|
-
}),
|
|
293
|
-
var
|
|
294
|
-
return /* @__PURE__ */
|
|
295
|
-
...
|
|
93
|
+
}), b = "leaderboard", X = (e) => {
|
|
94
|
+
var a;
|
|
95
|
+
return /* @__PURE__ */ s(k, {
|
|
96
|
+
...e,
|
|
296
97
|
label: "Leader Board",
|
|
297
98
|
id: "leaderboard",
|
|
298
|
-
icon: /* @__PURE__ */
|
|
99
|
+
icon: /* @__PURE__ */ s(V, {
|
|
299
100
|
name: "icon-btn-leaderboard",
|
|
300
|
-
"data-selected": (
|
|
101
|
+
"data-selected": (a = e.active) == null ? void 0 : a.toString()
|
|
301
102
|
})
|
|
302
103
|
});
|
|
303
104
|
};
|
|
304
|
-
const
|
|
105
|
+
const Z = /* @__PURE__ */ u("div")({
|
|
305
106
|
name: "n",
|
|
306
107
|
class: "n1rlvhvz",
|
|
307
108
|
propsAsIs: !1
|
|
308
|
-
}),
|
|
309
|
-
children:
|
|
310
|
-
className:
|
|
311
|
-
}) => /* @__PURE__ */
|
|
312
|
-
className:
|
|
313
|
-
children:
|
|
109
|
+
}), ee = ({
|
|
110
|
+
children: e,
|
|
111
|
+
className: a
|
|
112
|
+
}) => /* @__PURE__ */ s(Z, {
|
|
113
|
+
className: a,
|
|
114
|
+
children: e
|
|
314
115
|
});
|
|
315
|
-
const
|
|
116
|
+
const ae = () => ee, se = /* @__PURE__ */ u(ae())({
|
|
316
117
|
name: "n",
|
|
317
118
|
class: "n9bnom",
|
|
318
119
|
propsAsIs: !0
|
|
319
|
-
}),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
|
|
120
|
+
}), te = ({ activeOverlay: e, setActiveOverlay: a, sdkReady: t, className: n }) => /* @__PURE__ */ S(se, { className: n, children: [
|
|
121
|
+
/* @__PURE__ */ s(W, { active: e === y, onClick: () => a(y) }),
|
|
122
|
+
/* @__PURE__ */ s(
|
|
123
|
+
J,
|
|
323
124
|
{
|
|
324
|
-
active:
|
|
125
|
+
active: e === c,
|
|
325
126
|
disabled: !t,
|
|
326
127
|
onClick: () => {
|
|
327
|
-
|
|
128
|
+
a(c);
|
|
328
129
|
}
|
|
329
130
|
}
|
|
330
131
|
),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
|
|
132
|
+
/* @__PURE__ */ s(
|
|
133
|
+
X,
|
|
333
134
|
{
|
|
334
|
-
active:
|
|
335
|
-
onClick: () =>
|
|
135
|
+
active: e === b,
|
|
136
|
+
onClick: () => a(b)
|
|
336
137
|
}
|
|
337
138
|
)
|
|
338
|
-
] }),
|
|
339
|
-
const [
|
|
340
|
-
(
|
|
341
|
-
|
|
139
|
+
] }), ne = (e) => {
|
|
140
|
+
const [a, t] = h(!1), n = p(e.status), { data: o } = p(e.getUserStore()), r = n === "ready", [l, i] = h(c), v = E(
|
|
141
|
+
(d, m) => {
|
|
142
|
+
i(m), m === c ? (d && e.createEventSession(d), e.openFeature($.GAMES)) : e.closeFeature();
|
|
342
143
|
},
|
|
343
|
-
[
|
|
144
|
+
[e]
|
|
344
145
|
);
|
|
345
|
-
return
|
|
346
|
-
!
|
|
347
|
-
}, [
|
|
348
|
-
sdkEnabled:
|
|
349
|
-
sdkReady:
|
|
146
|
+
return x(() => {
|
|
147
|
+
!r && l === c && (i(y), e.closeFeature());
|
|
148
|
+
}, [r, l, e]), {
|
|
149
|
+
sdkEnabled: a,
|
|
150
|
+
sdkReady: r,
|
|
350
151
|
activeOverlay: l,
|
|
351
|
-
activateAndLoadOverlay:
|
|
352
|
-
enableSdk: (
|
|
353
|
-
|
|
354
|
-
if (t(!0),
|
|
355
|
-
|
|
152
|
+
activateAndLoadOverlay: v,
|
|
153
|
+
enableSdk: (d) => {
|
|
154
|
+
e.initializeApp().then(({ enabled: m, err: C }) => {
|
|
155
|
+
if (t(!0), C) {
|
|
156
|
+
v(d, y);
|
|
356
157
|
return;
|
|
357
158
|
}
|
|
358
|
-
if (
|
|
359
|
-
|
|
159
|
+
if (m) {
|
|
160
|
+
v(d, c);
|
|
360
161
|
return;
|
|
361
162
|
}
|
|
362
163
|
});
|
|
363
164
|
},
|
|
364
165
|
disableSdk: () => {
|
|
365
|
-
t(!1),
|
|
366
|
-
}
|
|
166
|
+
t(!1), e.disableApp();
|
|
167
|
+
},
|
|
168
|
+
isLogged: !!o
|
|
367
169
|
};
|
|
368
|
-
},
|
|
369
|
-
const
|
|
370
|
-
return
|
|
371
|
-
const
|
|
372
|
-
if (
|
|
373
|
-
for (const [
|
|
374
|
-
|
|
170
|
+
}, re = (e) => {
|
|
171
|
+
const a = p(e.getActiveFeature()), t = p(e.streamStore()), [n, o] = h(null);
|
|
172
|
+
return x(() => {
|
|
173
|
+
const r = e.getFeatures();
|
|
174
|
+
if (a)
|
|
175
|
+
for (const [l, i] of r)
|
|
176
|
+
l === a ? i.status.get() === f.Suspended && (i.enable(), o(i)) : i.status.get() === f.Ready && i.disable();
|
|
375
177
|
else {
|
|
376
|
-
for (const [,
|
|
377
|
-
|
|
378
|
-
|
|
178
|
+
for (const [, l] of r)
|
|
179
|
+
l.status.get() === f.Ready && l.disable();
|
|
180
|
+
o(null);
|
|
379
181
|
}
|
|
380
182
|
return () => {
|
|
381
|
-
for (const [,
|
|
382
|
-
|
|
183
|
+
for (const [, l] of r)
|
|
184
|
+
l.status.get() === f.Ready && l.disable();
|
|
383
185
|
};
|
|
384
|
-
}, [e,
|
|
385
|
-
},
|
|
386
|
-
const [, t] =
|
|
387
|
-
return /* @__PURE__ */
|
|
388
|
-
},
|
|
389
|
-
const { sdkEnabled: n, sdkReady:
|
|
390
|
-
return /* @__PURE__ */
|
|
391
|
-
n && /* @__PURE__ */
|
|
392
|
-
|
|
186
|
+
}, [a, e, t]), [a, n];
|
|
187
|
+
}, le = ({ sdk: e, className: a }) => {
|
|
188
|
+
const [, t] = re(e);
|
|
189
|
+
return /* @__PURE__ */ s(T, { className: a, feature: t, sdk: e });
|
|
190
|
+
}, oe = ({ sdk: e, overlays: a, children: t }) => {
|
|
191
|
+
const { sdkEnabled: n, sdkReady: o, activeOverlay: r, activateAndLoadOverlay: l, enableSdk: i, disableSdk: v, isLogged: d } = ne(e);
|
|
192
|
+
return /* @__PURE__ */ S(O, { children: [
|
|
193
|
+
n && /* @__PURE__ */ s(
|
|
194
|
+
te,
|
|
393
195
|
{
|
|
394
|
-
sdkReady:
|
|
395
|
-
activeOverlay:
|
|
396
|
-
className:
|
|
397
|
-
setActiveOverlay: (
|
|
196
|
+
sdkReady: o,
|
|
197
|
+
activeOverlay: r,
|
|
198
|
+
className: A,
|
|
199
|
+
setActiveOverlay: (m) => l("", m)
|
|
398
200
|
}
|
|
399
201
|
),
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
|
|
202
|
+
/* @__PURE__ */ s(
|
|
203
|
+
N,
|
|
402
204
|
{
|
|
403
205
|
"data-nav": n.toString(),
|
|
404
|
-
style: { display: !n ||
|
|
405
|
-
children: t && t({ enableSdk:
|
|
206
|
+
style: { display: !n || r === y ? "block" : "none" },
|
|
207
|
+
children: t && t({ enableSdk: i, disableSdk: v })
|
|
406
208
|
}
|
|
407
209
|
),
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
|
|
210
|
+
/* @__PURE__ */ s(
|
|
211
|
+
N,
|
|
410
212
|
{
|
|
411
213
|
"data-nav": n.toString(),
|
|
412
|
-
style: { display:
|
|
413
|
-
children:
|
|
214
|
+
style: { display: r === b ? "block" : "none" },
|
|
215
|
+
children: a && r === b && a[r]
|
|
414
216
|
}
|
|
415
217
|
),
|
|
416
|
-
n &&
|
|
218
|
+
d && n && r === c && /* @__PURE__ */ s(le, { className: A, sdk: e }),
|
|
219
|
+
!d && n && r === c && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
|
|
417
220
|
] });
|
|
418
|
-
},
|
|
419
|
-
sdkKey:
|
|
420
|
-
plugins:
|
|
221
|
+
}, Ee = ({
|
|
222
|
+
sdkKey: e,
|
|
223
|
+
plugins: a,
|
|
421
224
|
children: t,
|
|
422
225
|
production: n = !0
|
|
423
|
-
}) => /* @__PURE__ */
|
|
424
|
-
const { sdk: t, status: n } =
|
|
425
|
-
if (n ===
|
|
226
|
+
}) => /* @__PURE__ */ s(w, { sdkKey: e, plugins: a, production: n, autoEnable: !1, children: t }), Re = ({ children: e, overlays: a }) => {
|
|
227
|
+
const { sdk: t, status: n } = R(G);
|
|
228
|
+
if (n === j.UNSET)
|
|
426
229
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
427
|
-
return t ? /* @__PURE__ */
|
|
230
|
+
return t ? /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(M, { children: /* @__PURE__ */ s(oe, { sdk: t, overlays: a, children: e }) }) }) : e({});
|
|
428
231
|
};
|
|
429
232
|
export {
|
|
430
|
-
|
|
431
|
-
|
|
233
|
+
Ee as MastersStreamLayerProvider,
|
|
234
|
+
Re as MastersStreamLayerSDKReact
|
|
432
235
|
};
|
package/lib/es/points.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { FeatureType as n } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { useMemo as p } from "react";
|
|
4
|
-
import { s, q as l, f as c,
|
|
4
|
+
import { s, q as l, f as c, c as u, p as d } from "../index-ad42babc.js";
|
|
5
5
|
import "react-auth-code-input";
|
|
6
6
|
import "react-phone-number-input";
|
|
7
7
|
import "@connectrpc/connect";
|
|
@@ -14,7 +14,7 @@ import "@streamlayer/sdk-web-api";
|
|
|
14
14
|
import "@streamlayer/sdk-web-storage";
|
|
15
15
|
import { useStore as a } from "@nanostores/react";
|
|
16
16
|
import "@streamlayer/sdk-web-notifications";
|
|
17
|
-
import { u as f } from "../app-
|
|
17
|
+
import { u as f } from "../app-15ce925d.js";
|
|
18
18
|
import "./useStreamLayerApp.js";
|
|
19
19
|
import "@streamlayer/sdk-web";
|
|
20
20
|
import "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|