@streamlayer/react 0.27.0 → 0.27.2

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