@streamlayer/react 0.25.1 → 0.26.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/es/masters.js CHANGED
@@ -1,394 +1,382 @@
1
- import { jsx as t, jsxs as c, Fragment as g } from "react/jsx-runtime";
2
- import { s as o, Y as y, o as E, X as w, f as C, x as Q, u as F, v as O, h as b, p as R, d as M, j as q, e as G, S as H, a as N, b as j } from "../provider-a6b36c89.js";
3
- import { useState as h, useMemo as B, useCallback as D, useEffect as L, useContext as P } from "react";
4
- import { QuestionType as T, FeatureType as A } from "@streamlayer/sdk-web-types";
5
- import { useStore as d } from "@nanostores/react";
6
- import { FeatureStatus as v } from "@streamlayer/sdk-web-interfaces";
7
- import "react-countdown-circle-timer";
1
+ import { jsx as a, jsxs as c, Fragment as g } from "react/jsx-runtime";
2
+ import { useState as v, useMemo as E, useCallback as C, useEffect as L, useContext as O } from "react";
3
+ import { s as r, q as y, o as Q, Y as w, e as R, x as F, u as M, v as q, h as b, g as G, i as H, j as N, r as $, k as D, l as j, m as P, f as I, S as T, a as B, b as z, p as Y } from "../index-98298310.js";
8
4
  import "react-auth-code-input";
9
5
  import "react-phone-number-input";
10
6
  import "@connectrpc/connect";
11
7
  import "@connectrpc/connect-web";
12
8
  import "@streamlayer/sl-eslib/users/users_connect";
9
+ import "react-countdown-circle-timer";
10
+ import { QuestionType as K, FeatureType as x } from "@streamlayer/sdk-web-types";
11
+ import { FeatureStatus as h } from "@streamlayer/sdk-web-interfaces";
13
12
  import "@streamlayer/sdk-web-features";
14
13
  import "@streamlayer/sdk-web-api";
15
14
  import "@streamlayer/sdk-web-storage";
15
+ import { useStore as p } from "@nanostores/react";
16
16
  import "@streamlayer/sdk-web-notifications";
17
+ import "./useStreamLayerApp.js";
18
+ import "@streamlayer/sdk-web";
17
19
  import "@streamlayer/sl-eslib/interactive/interactive.common_pb";
18
20
  import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
19
21
  import "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
20
22
  import "@streamlayer/sl-eslib/sports/events/events_connect";
21
23
  import "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
22
- import "./useStreamLayerApp.js";
23
- import "@streamlayer/sdk-web";
24
- const _ = ({
25
- feature: e,
26
- sdk: s,
27
- children: n
28
- }) => {
29
- const r = d(e.status), { slStreamId: a } = d(s.sdkStore);
30
- return a != null && a.loading ? /* @__PURE__ */ t("div", { children: "event is loading..." }) : a != null && a.data ? r !== v.Ready ? /* @__PURE__ */ t("div", { children: "wait feature..." }) : n : /* @__PURE__ */ t("div", { children: "event is forbidden..." });
24
+ const _ = ({ feature: e, sdk: s, children: t, className: n }) => {
25
+ const l = p(e.status), { slStreamId: o } = p(s.sdkStore);
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..." });
31
27
  };
32
- const z = () => x, Y = /* @__PURE__ */ o("div")({
33
- name: "i",
34
- class: "idhrx8x",
35
- propsAsIs: !1
36
- }), $ = /* @__PURE__ */ o("div")({
37
- name: "r",
38
- class: "r1k6v4ep",
39
- propsAsIs: !1
40
- }), x = /* @__PURE__ */ o("div")({
41
- name: "t",
42
- class: "t1v8kucd",
43
- propsAsIs: !1
44
- }), U = /* @__PURE__ */ o(z())({
45
- name: "o",
46
- class: "o16yw7z1",
47
- propsAsIs: !0
48
- });
49
- const X = /* @__PURE__ */ o("div")({
28
+ const U = /* @__PURE__ */ r("div")({
50
29
  name: "n",
51
30
  class: "n1aopxp8",
52
31
  propsAsIs: !1
53
- }), K = ({
32
+ }), W = ({
54
33
  children: e,
55
34
  style: s,
56
- className: n
57
- }) => /* @__PURE__ */ t(X, {
35
+ className: t
36
+ }) => /* @__PURE__ */ a(U, {
58
37
  style: s,
59
- className: n,
38
+ className: t,
60
39
  children: e
61
40
  });
62
- const W = () => y, J = () => y, V = /* @__PURE__ */ o("div")({
41
+ const J = () => y, V = () => y, X = /* @__PURE__ */ r("div")({
63
42
  name: "a",
64
43
  class: "acysrl1",
65
44
  propsAsIs: !1
66
- }), Z = /* @__PURE__ */ o("div")({
45
+ }), Z = /* @__PURE__ */ r("div")({
67
46
  name: "l",
68
47
  class: "lo57cjm",
69
48
  propsAsIs: !1
70
- }), ee = /* @__PURE__ */ o(W())({
49
+ }), ee = /* @__PURE__ */ r(J())({
71
50
  name: "p",
72
51
  class: "p14kwh4y",
73
52
  propsAsIs: !0
74
- }), se = /* @__PURE__ */ o("span")({
53
+ }), se = /* @__PURE__ */ r("span")({
75
54
  name: "s",
76
55
  class: "sxun7sq",
77
56
  propsAsIs: !1
78
- }), te = /* @__PURE__ */ o("button")({
57
+ }), ae = /* @__PURE__ */ r("button")({
79
58
  name: "c",
80
59
  class: "c1i8ida8",
81
60
  propsAsIs: !1
82
- }), ne = /* @__PURE__ */ o(J())({
61
+ }), te = /* @__PURE__ */ r(V())({
83
62
  name: "g",
84
63
  class: "g1m0xfmw",
85
64
  propsAsIs: !0
86
- }), ae = ({ type: e, close: s }) => {
87
- const n = E[e];
88
- return /* @__PURE__ */ c(V, { children: [
65
+ }), ne = ({ type: e, close: s }) => {
66
+ const t = Q[e];
67
+ return /* @__PURE__ */ c(X, { children: [
89
68
  /* @__PURE__ */ c(Z, { children: [
90
- (n == null ? void 0 : n.iconName) && /* @__PURE__ */ t(ee, { name: n.iconName }),
91
- (n == null ? void 0 : n.label) && /* @__PURE__ */ t(se, { children: n.label })
69
+ (t == null ? void 0 : t.iconName) && /* @__PURE__ */ a(ee, { name: t.iconName }),
70
+ (t == null ? void 0 : t.label) && /* @__PURE__ */ a(se, { children: t.label })
92
71
  ] }),
93
- /* @__PURE__ */ t(te, { onClick: s, children: /* @__PURE__ */ t(ne, { name: "icon-cross" }) })
72
+ /* @__PURE__ */ a(ae, { onClick: s, children: /* @__PURE__ */ a(te, { name: "icon-cross" }) })
94
73
  ] });
95
74
  };
96
- const oe = /* @__PURE__ */ o("div")({
75
+ const oe = /* @__PURE__ */ r("div")({
97
76
  name: "r",
98
77
  class: "ruyb9yw",
99
78
  propsAsIs: !1
100
- }), re = /* @__PURE__ */ o("img")({
79
+ }), re = /* @__PURE__ */ r("img")({
101
80
  name: "i",
102
81
  class: "imbcgl0",
103
82
  propsAsIs: !1
104
- }), ie = ({
83
+ }), le = ({
105
84
  sponsorLogo: e
106
- }) => e && /* @__PURE__ */ t(oe, {
107
- children: /* @__PURE__ */ t(re, {
85
+ }) => e && /* @__PURE__ */ a(oe, {
86
+ children: /* @__PURE__ */ a(re, {
108
87
  alt: "sponsor-logo",
109
88
  src: e
110
89
  })
111
90
  });
112
- const le = /* @__PURE__ */ o("div")({
91
+ const ie = /* @__PURE__ */ r("div")({
113
92
  name: "x",
114
93
  class: "xk8r1eq",
115
94
  propsAsIs: !1
116
95
  }), ce = ({
117
96
  openedQuestion: e,
118
97
  closeQuestion: s,
119
- vote: n
98
+ vote: t
120
99
  }) => {
121
- var r;
122
- return /* @__PURE__ */ c(le, {
123
- children: [/* @__PURE__ */ t(ae, {
100
+ var n;
101
+ return /* @__PURE__ */ c(ie, {
102
+ children: [/* @__PURE__ */ a(ne, {
124
103
  close: s,
125
- type: (e == null ? void 0 : e.type) || T.UNSET
126
- }), e && /* @__PURE__ */ t(w, {
127
- vote: n,
104
+ type: (e == null ? void 0 : e.type) || K.UNSET
105
+ }), e && /* @__PURE__ */ a(w, {
106
+ vote: t,
128
107
  openedQuestion: e
129
- }), /* @__PURE__ */ t(ie, {
130
- sponsorLogo: (r = e == null ? void 0 : e.sponsorship) == null ? void 0 : r.logo
108
+ }), /* @__PURE__ */ a(le, {
109
+ sponsorLogo: (n = e == null ? void 0 : e.sponsorship) == null ? void 0 : n.logo
131
110
  })]
132
111
  });
133
112
  }, de = ({ leaderboardList: e }) => {
134
- const { data: s } = d(e.$store), [n, r] = h(void 0), a = (l) => {
135
- const i = s.find((p) => p.userId === l);
136
- r(i);
113
+ const { data: s } = p(e.$store), [t, n] = v(void 0), l = (o) => {
114
+ const i = s.find((d) => d.userId === o);
115
+ n(i);
137
116
  };
138
117
  return /* @__PURE__ */ c(g, { children: [
139
- n && /* @__PURE__ */ t(C, { comeBack: () => a(null), ...n }),
140
- !n && /* @__PURE__ */ t(Q, { fetchMore: e.fetchMore, items: s, openItemDetail: a })
118
+ t && /* @__PURE__ */ a(R, { comeBack: () => l(null), ...t }),
119
+ !t && /* @__PURE__ */ a(F, { fetchMore: e.fetchMore, items: s, openItemDetail: l })
141
120
  ] });
142
121
  }, pe = ({ store: e, openQuestion: s }) => {
143
- const n = d(e);
144
- return n != null && n.data ? /* @__PURE__ */ t(F, { openQuestion: s, questions: n.data }) : /* @__PURE__ */ t("div", { children: "wait questions..." });
122
+ const t = p(e);
123
+ return t != null && t.data ? /* @__PURE__ */ a(M, { openQuestion: s, questions: t.data }) : /* @__PURE__ */ a("div", { children: "wait questions..." });
145
124
  }, ue = ({ store: e }) => {
146
- const { data: s } = d(e);
147
- return s != null && s.summary ? /* @__PURE__ */ t(O, { ...s.summary, ...s.percentage }) : /* @__PURE__ */ t("div", { children: "wait user..." });
125
+ const { data: s } = p(e);
126
+ return s != null && s.summary ? /* @__PURE__ */ a(q, { ...s.summary, ...s.percentage }) : /* @__PURE__ */ a("div", { children: "wait user..." });
148
127
  }, me = ({ gamification: e }) => {
149
- const [s, n] = h(b.HOME);
128
+ const [s, t] = v(b.HOME);
150
129
  return /* @__PURE__ */ c(g, { children: [
151
- /* @__PURE__ */ c(U, { children: [
152
- /* @__PURE__ */ t(R, { activePage: s, toggleActivePage: n }),
153
- s === b.HOME && /* @__PURE__ */ t(ue, { store: e.userSummary.getStore() })
130
+ /* @__PURE__ */ c(G, { children: [
131
+ /* @__PURE__ */ a(H, { activePage: s, toggleActivePage: t }),
132
+ s === b.HOME && /* @__PURE__ */ a(ue, { store: e.userSummary.getStore() })
154
133
  ] }),
155
- s === b.HOME && /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(pe, { openQuestion: e.openQuestion, store: e.questions.getStore() }) }),
156
- s === b.LEADERBOARD && /* @__PURE__ */ t(x, { style: { flex: "1 1 auto" }, children: /* @__PURE__ */ t(de, { leaderboardList: e.leaderboardList }) })
134
+ s === b.HOME && /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(pe, { openQuestion: e.openQuestion, store: e.questions.getStore() }) }),
135
+ s === b.LEADERBOARD && /* @__PURE__ */ a(N, { style: { flex: "1 1 auto" }, children: /* @__PURE__ */ a(de, { leaderboardList: e.leaderboardList }) })
157
136
  ] });
158
137
  };
159
- const ve = () => K, he = /* @__PURE__ */ o(ve())({
160
- name: "u",
161
- class: "u1ph66cs",
138
+ const he = () => W, ve = /* @__PURE__ */ r(he())({
139
+ name: "c",
140
+ class: "c1ph66cs",
162
141
  propsAsIs: !0
163
142
  }), fe = ({
164
- gamification: e
143
+ gamification: e,
144
+ className: s
165
145
  }) => {
166
146
  const {
167
- loading: s,
147
+ loading: t,
168
148
  data: n
169
- } = d(e.openedQuestion);
149
+ } = p(e.openedQuestion);
170
150
  return /* @__PURE__ */ c(g, {
171
- children: [(s || n) && /* @__PURE__ */ t(he, {
172
- children: /* @__PURE__ */ t(ce, {
151
+ children: [(t || n) && /* @__PURE__ */ a(ve, {
152
+ className: s,
153
+ children: /* @__PURE__ */ a(ce, {
173
154
  closeQuestion: e.closeQuestion,
174
155
  vote: e.submitAnswer,
175
156
  openedQuestion: n
176
157
  })
177
- }), /* @__PURE__ */ t($, {
158
+ }), /* @__PURE__ */ a($, {
159
+ className: s,
178
160
  "data-nav": "true",
179
161
  style: {
180
162
  display: "flex",
181
163
  flexDirection: "column"
182
164
  },
183
- children: /* @__PURE__ */ t(me, {
165
+ children: /* @__PURE__ */ a(me, {
184
166
  gamification: e
185
167
  })
186
168
  })]
187
169
  });
188
- }, ge = ({ highlights: e }) => {
189
- const s = d(e.openedInsight);
170
+ }, ge = ({
171
+ highlights: e,
172
+ className: s
173
+ }) => {
174
+ const t = p(e.openedInsight);
190
175
  return /* @__PURE__ */ c(g, { children: [
191
- !s && e.insights && /* @__PURE__ */ t(M, { highlights: e, store: e.insights.getStore() }),
192
- s && /* @__PURE__ */ t(
193
- q,
176
+ !t && e.insights && /* @__PURE__ */ a(D, { className: s, highlights: e, store: e.insights.getStore() }),
177
+ t && /* @__PURE__ */ a(
178
+ j,
194
179
  {
195
- openedInsight: s,
180
+ className: s,
181
+ openedInsight: t,
196
182
  closeHighlights: e.closeFeature,
197
183
  closeInsight: e.closeHighlight
198
184
  }
199
185
  )
200
186
  ] });
201
- }, ye = ({ sdk: e, feature: s }) => B(() => s ? s.featureConfig.get().type === A.GAMES ? /* @__PURE__ */ t(_, { sdk: e, feature: s, children: /* @__PURE__ */ t(fe, { gamification: s, sdk: e }) }) : s.featureConfig.get().type === A.HIGHLIGHTS ? /* @__PURE__ */ t(_, { sdk: e, feature: s, children: /* @__PURE__ */ t(ge, { highlights: s, sdk: e }) }) : null : null, [e, s]);
202
- const be = /* @__PURE__ */ o("button")({
187
+ }, ye = ({
188
+ sdk: e,
189
+ feature: s,
190
+ className: t
191
+ }) => E(() => s ? s.featureConfig.get().type === x.GAMES ? /* @__PURE__ */ a(_, { className: t, sdk: e, feature: s, children: /* @__PURE__ */ a(fe, { className: t, gamification: s, sdk: e }) }) : s.featureConfig.get().type === x.HIGHLIGHTS ? /* @__PURE__ */ a(_, { className: t, sdk: e, feature: s, children: /* @__PURE__ */ a(ge, { className: t, highlights: s, sdk: e }) }) : null : null, [e, s]);
192
+ const be = /* @__PURE__ */ r("button")({
203
193
  name: "e",
204
194
  class: "enu64b2",
205
195
  propsAsIs: !1
206
- }), ke = /* @__PURE__ */ o("span")({
196
+ }), ke = /* @__PURE__ */ r("span")({
207
197
  name: "t",
208
198
  class: "tw2meku",
209
199
  propsAsIs: !1
210
- }), Se = /* @__PURE__ */ o("span")({
200
+ }), Se = /* @__PURE__ */ r("span")({
211
201
  name: "a",
212
202
  class: "aka8vam",
213
203
  propsAsIs: !1
214
- }), I = ({ disabled: e, active: s, onClick: n, label: r, icon: a }) => /* @__PURE__ */ t(be, { onClick: n, disabled: e, "data-selected": s, children: /* @__PURE__ */ c(g, { children: [
215
- a && /* @__PURE__ */ t(ke, { children: a }),
216
- /* @__PURE__ */ t(Se, { children: r })
204
+ }), A = ({ disabled: e, active: s, onClick: t, label: n, icon: l }) => /* @__PURE__ */ a(be, { onClick: t, disabled: e, "data-selected": s, children: /* @__PURE__ */ c(g, { children: [
205
+ l && /* @__PURE__ */ a(ke, { children: l }),
206
+ /* @__PURE__ */ a(Se, { children: n })
217
207
  ] }) });
218
- const Ae = () => y, $e = /* @__PURE__ */ o(Ae())({
208
+ const $e = () => y, xe = /* @__PURE__ */ r($e())({
219
209
  name: "a",
220
210
  class: "a10lggiw",
221
211
  propsAsIs: !0
222
- }), f = "channels", xe = (e) => {
212
+ }), f = "channels", Ae = (e) => {
223
213
  var s;
224
- return /* @__PURE__ */ t(I, {
214
+ return /* @__PURE__ */ a(A, {
225
215
  ...e,
226
216
  id: "channels",
227
217
  label: "Channels",
228
- icon: /* @__PURE__ */ t($e, {
218
+ icon: /* @__PURE__ */ a(xe, {
229
219
  name: "icon-btn-channels",
230
220
  "data-selected": (s = e.active) == null ? void 0 : s.toString()
231
221
  })
232
222
  });
233
223
  };
234
- const Ie = () => y, _e = /* @__PURE__ */ o(Ie())({
224
+ const Ne = () => y, Ie = /* @__PURE__ */ r(Ne())({
235
225
  name: "d",
236
226
  class: "d1x5s8ie",
237
227
  propsAsIs: !0
238
- }), u = "featuredGroups", Le = (e) => {
228
+ }), u = "featuredGroups", _e = (e) => {
239
229
  var s;
240
- return /* @__PURE__ */ t(I, {
230
+ return /* @__PURE__ */ a(A, {
241
231
  ...e,
242
232
  label: "FG+",
243
233
  id: "featuredGroups",
244
- icon: /* @__PURE__ */ t(_e, {
234
+ icon: /* @__PURE__ */ a(Ie, {
245
235
  name: "icon-btn-feature-groups",
246
236
  "data-selected": (s = e.active) == null ? void 0 : s.toString()
247
237
  })
248
238
  });
249
239
  };
250
- const Ee = () => y, we = /* @__PURE__ */ o(Ee())({
240
+ const Le = () => y, Ee = /* @__PURE__ */ r(Le())({
251
241
  name: "n",
252
242
  class: "ntav86o",
253
243
  propsAsIs: !0
254
244
  }), k = "leaderboard", Ce = (e) => {
255
245
  var s;
256
- return /* @__PURE__ */ t(I, {
246
+ return /* @__PURE__ */ a(A, {
257
247
  ...e,
258
248
  label: "Leader Board",
259
249
  id: "leaderboard",
260
- icon: /* @__PURE__ */ t(we, {
250
+ icon: /* @__PURE__ */ a(Ee, {
261
251
  name: "icon-btn-leaderboard",
262
252
  "data-selected": (s = e.active) == null ? void 0 : s.toString()
263
253
  })
264
254
  });
265
255
  };
266
- const Qe = /* @__PURE__ */ o("div")({
256
+ const Oe = /* @__PURE__ */ r("div")({
267
257
  name: "n",
268
258
  class: "n1rlvhvz",
269
259
  propsAsIs: !1
270
- }), Fe = ({
260
+ }), Qe = ({
271
261
  children: e,
272
262
  className: s
273
- }) => /* @__PURE__ */ t(Qe, {
263
+ }) => /* @__PURE__ */ a(Oe, {
274
264
  className: s,
275
265
  children: e
276
266
  });
277
- const Oe = () => Fe, Re = /* @__PURE__ */ o(Oe())({
267
+ const we = () => Qe, Re = /* @__PURE__ */ r(we())({
278
268
  name: "n",
279
269
  class: "n9bnom",
280
270
  propsAsIs: !0
281
- }), Me = ({ activeOverlay: e, setActiveOverlay: s, sdkReady: n }) => /* @__PURE__ */ c(Re, { children: [
282
- /* @__PURE__ */ t(xe, { active: e === f, onClick: () => s(f) }),
283
- /* @__PURE__ */ t(
284
- Le,
271
+ }), Fe = ({ activeOverlay: e, setActiveOverlay: s, sdkReady: t, className: n }) => /* @__PURE__ */ c(Re, { className: n, children: [
272
+ /* @__PURE__ */ a(Ae, { active: e === f, onClick: () => s(f) }),
273
+ /* @__PURE__ */ a(
274
+ _e,
285
275
  {
286
276
  active: e === u,
287
- disabled: !n,
277
+ disabled: !t,
288
278
  onClick: () => {
289
279
  s(u);
290
280
  }
291
281
  }
292
282
  ),
293
- /* @__PURE__ */ t(
283
+ /* @__PURE__ */ a(
294
284
  Ce,
295
285
  {
296
286
  active: e === k,
297
287
  onClick: () => s(k)
298
288
  }
299
289
  )
300
- ] }), qe = (e, s) => {
301
- const [n, r] = h(!1), a = d(e.status) === "ready", [l, i] = h(u), p = D(
302
- (m) => {
303
- i(m), m === u ? (e.createEventSession(s), e.openFeature(A.GAMES)) : e.closeFeature();
290
+ ] }), Me = (e) => {
291
+ const [s, t] = v(!1), n = p(e.status) === "ready", [l, o] = v(u), i = C(
292
+ (d, m) => {
293
+ o(m), m === u ? (d && e.createEventSession(d), e.openFeature(x.GAMES)) : e.closeFeature();
304
294
  },
305
- [s, e]
295
+ [e]
306
296
  );
307
297
  return L(() => {
308
- !a && l === u && (i(f), e.closeFeature());
309
- }, [a, l, e]), {
310
- sdkEnabled: n,
311
- sdkReady: a,
298
+ !n && l === u && (o(f), e.closeFeature());
299
+ }, [n, l, e]), {
300
+ sdkEnabled: s,
301
+ sdkReady: n,
312
302
  activeOverlay: l,
313
- activateAndLoadOverlay: p,
314
- enableSdk: () => {
303
+ activateAndLoadOverlay: i,
304
+ enableSdk: (d) => {
315
305
  e.initializeApp().then(({ enabled: m, err: S }) => {
316
- if (r(!0), S) {
317
- p(f);
306
+ if (t(!0), S) {
307
+ i(d, f);
318
308
  return;
319
309
  }
320
310
  if (m) {
321
- p(u);
311
+ i(d, u);
322
312
  return;
323
313
  }
324
314
  });
325
315
  },
326
316
  disableSdk: () => {
327
- r(!1), e.disableApp();
317
+ t(!1), e.disableApp();
328
318
  }
329
319
  };
330
- }, Ge = (e) => {
331
- const s = d(e.getActiveFeature()), [n, r] = h(null);
320
+ }, qe = (e) => {
321
+ const s = p(e.getActiveFeature()), [t, n] = v(null);
332
322
  return L(() => {
333
- const a = e.getFeatures();
323
+ const l = e.getFeatures();
334
324
  if (s)
335
- for (const [l, i] of a)
336
- l === s ? i.status.get() === v.Suspended && (i.enable(), r(i)) : i.status.get() === v.Ready && i.disable();
325
+ for (const [o, i] of l)
326
+ o === s ? i.status.get() === h.Suspended && (i.enable(), n(i)) : i.status.get() === h.Ready && i.disable();
337
327
  else {
338
- for (const [, l] of a)
339
- l.status.get() === v.Ready && l.disable();
340
- r(null);
328
+ for (const [, o] of l)
329
+ o.status.get() === h.Ready && o.disable();
330
+ n(null);
341
331
  }
342
332
  return () => {
343
- for (const [, l] of a)
344
- l.status.get() === v.Ready && l.disable();
333
+ for (const [, o] of l)
334
+ o.status.get() === h.Ready && o.disable();
345
335
  };
346
- }, [s, e]), [s, n];
347
- }, He = ({ sdk: e }) => {
348
- const [, s] = Ge(e);
349
- return /* @__PURE__ */ t(ye, { feature: s, sdk: e });
350
- }, Ne = ({ sdk: e, overlays: s, children: n, event: r }) => {
351
- const { sdkEnabled: a, sdkReady: l, activeOverlay: i, activateAndLoadOverlay: p, enableSdk: m, disableSdk: S } = qe(
352
- e,
353
- r
354
- );
355
- return /* @__PURE__ */ t(G, { style: { height: "100%" }, children: /* @__PURE__ */ c(Y, { children: [
356
- a && /* @__PURE__ */ t(
357
- Me,
336
+ }, [s, e]), [s, t];
337
+ }, Ge = ({ sdk: e, className: s }) => {
338
+ const [, t] = qe(e);
339
+ return /* @__PURE__ */ a(ye, { className: s, feature: t, sdk: e });
340
+ }, He = ({ sdk: e, overlays: s, children: t }) => {
341
+ const { sdkEnabled: n, sdkReady: l, activeOverlay: o, activateAndLoadOverlay: i, enableSdk: d, disableSdk: m } = Me(e);
342
+ return /* @__PURE__ */ c(P, { children: [
343
+ n && /* @__PURE__ */ a(
344
+ Fe,
358
345
  {
359
346
  sdkReady: l,
360
- activeOverlay: i,
361
- setActiveOverlay: p
347
+ activeOverlay: o,
348
+ className: I,
349
+ setActiveOverlay: (S) => i("", S)
362
350
  }
363
351
  ),
364
- /* @__PURE__ */ t(
352
+ /* @__PURE__ */ a(
365
353
  $,
366
354
  {
367
- "data-nav": a.toString(),
368
- style: { display: !a || i === f ? "block" : "none" },
369
- children: n && n({ enableSdk: m, disableSdk: S })
355
+ "data-nav": n.toString(),
356
+ style: { display: !n || o === f ? "block" : "none" },
357
+ children: t && t({ enableSdk: d, disableSdk: m })
370
358
  }
371
359
  ),
372
- /* @__PURE__ */ t(
360
+ /* @__PURE__ */ a(
373
361
  $,
374
362
  {
375
- "data-nav": a.toString(),
376
- style: { display: i === k ? "block" : "none" },
377
- children: s && i === k && s[i]
363
+ "data-nav": n.toString(),
364
+ style: { display: o === k ? "block" : "none" },
365
+ children: s && o === k && s[o]
378
366
  }
379
367
  ),
380
- a && i === u && /* @__PURE__ */ t(He, { sdk: e })
381
- ] }) });
368
+ n && o === u && /* @__PURE__ */ a(Ge, { className: I, sdk: e })
369
+ ] });
382
370
  }, cs = ({
383
371
  sdkKey: e,
384
372
  plugins: s,
385
- children: n,
386
- production: r = !0
387
- }) => /* @__PURE__ */ t(H, { sdkKey: e, plugins: s, production: r, autoEnable: !1, children: n }), ds = ({ children: e, event: s, overlays: n }) => {
388
- const { sdk: r, status: a } = P(N);
389
- if (a === j.UNSET)
373
+ children: t,
374
+ production: n = !0
375
+ }) => /* @__PURE__ */ a(T, { sdkKey: e, plugins: s, production: n, autoEnable: !1, children: t }), ds = ({ children: e, overlays: s }) => {
376
+ const { sdk: t, status: n } = O(B);
377
+ if (n === z.UNSET)
390
378
  throw new Error("Wrap app in `StreamLayerProvider`");
391
- return r ? /* @__PURE__ */ t(Ne, { sdk: r, event: s, overlays: n, children: e }) : e({});
379
+ return t ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ a(Y, { children: /* @__PURE__ */ a(He, { sdk: t, overlays: s, children: e }) }) }) : e({});
392
380
  };
393
381
  export {
394
382
  cs as MastersStreamLayerProvider,
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, Y as l, c } from "../provider-a6b36c89.js";
4
+ import { s, q as l, f as c, d as u, p as d } from "../index-98298310.js";
5
5
  import "react-auth-code-input";
6
6
  import "react-phone-number-input";
7
7
  import "@connectrpc/connect";
@@ -14,55 +14,55 @@ 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 } from "../app-43e52907.js";
17
+ import { u as f } from "../app-215a7e7d.js";
18
+ import "./useStreamLayerApp.js";
19
+ import "@streamlayer/sdk-web";
18
20
  import "@streamlayer/sl-eslib/interactive/interactive.common_pb";
19
21
  import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
20
22
  import "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
21
23
  import "@streamlayer/sl-eslib/sports/events/events_connect";
22
24
  import "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
23
- import "./useStreamLayerApp.js";
24
- import "@streamlayer/sdk-web";
25
- const d = () => l, f = /* @__PURE__ */ s("div")({
25
+ const S = () => l, y = /* @__PURE__ */ s("div")({
26
26
  name: "l",
27
27
  class: "l4qld3l",
28
28
  propsAsIs: !1
29
- }), S = /* @__PURE__ */ s("div")({
29
+ }), h = /* @__PURE__ */ s("div")({
30
30
  name: "a",
31
31
  class: "ainhtok",
32
32
  propsAsIs: !1
33
- }), y = /* @__PURE__ */ s(d())({
33
+ }), v = /* @__PURE__ */ s(S())({
34
34
  name: "x",
35
35
  class: "xk8yd5t",
36
36
  propsAsIs: !0
37
- }), h = /* @__PURE__ */ s("div")({
37
+ }), x = /* @__PURE__ */ s("div")({
38
38
  name: "h",
39
39
  class: "h6rf9gb",
40
40
  propsAsIs: !1
41
- }), x = /* @__PURE__ */ s("div")({
41
+ }), g = /* @__PURE__ */ s("div")({
42
42
  name: "c",
43
43
  class: "c18f5pxx",
44
44
  propsAsIs: !1
45
- }), v = /* @__PURE__ */ s("div")({
45
+ }), A = /* @__PURE__ */ s("div")({
46
46
  name: "m",
47
47
  class: "m1jwsyj1",
48
48
  propsAsIs: !1
49
- }), g = ({ points: r }) => /* @__PURE__ */ m(f, { children: [
50
- /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(y, { name: "icon-trophy" }) }),
51
- /* @__PURE__ */ m(h, { children: [
52
- /* @__PURE__ */ t(x, { children: "Total points" }),
53
- /* @__PURE__ */ t(v, { children: c(r) })
49
+ }), I = ({ points: r }) => /* @__PURE__ */ m(y, { className: c, children: [
50
+ /* @__PURE__ */ t(h, { children: /* @__PURE__ */ t(v, { name: "icon-trophy" }) }),
51
+ /* @__PURE__ */ m(x, { children: [
52
+ /* @__PURE__ */ t(g, { children: "Total points" }),
53
+ /* @__PURE__ */ t(A, { children: u(r) })
54
54
  ] })
55
- ] }), A = ({ userSummary: r }) => {
55
+ ] }), j = ({ userSummary: r }) => {
56
56
  var e, o;
57
57
  const i = a(r.getStore());
58
- return ((o = (e = i.data) == null ? void 0 : e.summary) == null ? void 0 : o.points) === void 0 ? null : /* @__PURE__ */ t(g, { points: i.data.summary.points });
59
- }, I = ({ sdk: r }) => {
58
+ return ((o = (e = i.data) == null ? void 0 : e.summary) == null ? void 0 : o.points) === void 0 ? null : /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t(I, { points: i.data.summary.points }) }) });
59
+ }, L = ({ sdk: r }) => {
60
60
  const { organizationSettings: i, streamSettings: e } = a(r.sdkStore), o = p(() => r.getFeature(n.GAMES), [r, i, e]);
61
- return o ? /* @__PURE__ */ t(A, { userSummary: o.userSummary }) : null;
62
- }, Q = () => {
63
- const r = u();
64
- return r ? /* @__PURE__ */ t(I, { sdk: r }) : null;
61
+ return o ? /* @__PURE__ */ t(j, { userSummary: o.userSummary }) : null;
62
+ }, V = () => {
63
+ const r = f();
64
+ return r ? /* @__PURE__ */ t(L, { sdk: r }) : null;
65
65
  };
66
66
  export {
67
- Q as StreamLayerSDKPoints
67
+ V as StreamLayerSDKPoints
68
68
  };