@streamlayer/react 0.29.11 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/lib/app/masters.d.ts +1 -0
  2. package/lib/{app-c9828ece.cjs → app-36051bbe.cjs} +1 -1
  3. package/lib/{app-e4b43a5c.js → app-c53bb384.js} +5 -5
  4. package/lib/cjs/auth.js +1 -1
  5. package/lib/cjs/index.js +1 -1
  6. package/lib/cjs/masters.js +1 -1
  7. package/lib/cjs/points.js +1 -1
  8. package/lib/dist/cjs/masters.js +1 -1
  9. package/lib/dist/es/masters.js +1 -1
  10. package/lib/dist/index-bcabe854.js +1464 -0
  11. package/lib/dist/index-f504e8d3.cjs +1 -0
  12. package/lib/dist/index.d.ts +1 -0
  13. package/lib/dist/masters-3c9c6ffe.js +26765 -0
  14. package/lib/dist/masters-fe5f1486.cjs +297 -0
  15. package/lib/dist/style.css +1 -196
  16. package/lib/es/auth.js +2 -2
  17. package/lib/es/index.js +2 -2
  18. package/lib/es/masters.js +5 -4
  19. package/lib/es/points.js +40 -40
  20. package/lib/index-15f61ac8.js +151 -0
  21. package/lib/index-565f26fb.cjs +1 -0
  22. package/lib/{index-0d23b24e.js → index-89366251.js} +5 -5
  23. package/lib/index-af5c5738.cjs +1 -0
  24. package/lib/{index-89c19a6e.cjs → index-dd93a61a.cjs} +2 -2
  25. package/lib/index-e26b3493.js +1410 -0
  26. package/lib/masters-bf25c11c.js +2415 -0
  27. package/lib/masters-f135002d.cjs +6 -0
  28. package/lib/style.css +1 -1
  29. package/package.json +3 -3
  30. package/lib/dist/index-56687fbe.cjs +0 -1
  31. package/lib/dist/index-b7b397b9.js +0 -1740
  32. package/lib/dist/masters-791400ce.js +0 -20468
  33. package/lib/dist/masters-8c3bc143.cjs +0 -29
  34. package/lib/index-60fabb42.cjs +0 -6
  35. package/lib/index-81810ce0.js +0 -950
  36. package/lib/index-9a1075fa.cjs +0 -1
  37. package/lib/index-d3a5d095.js +0 -2851
  38. package/lib/masters-a0c5967c.js +0 -693
  39. package/lib/masters-b0b09591.cjs +0 -1
@@ -1,2851 +0,0 @@
1
- import { jsxs as v, jsx as h, Fragment as de } from "react/jsx-runtime";
2
- import { s as g, i as Q } from "./index-81810ce0.js";
3
- import { useStore as re } from "@nanostores/react";
4
- import { o as Et, r as Tt, w as Wt, e as Ve, n as Vt, f as Ht } from "./masters-a0c5967c.js";
5
- import { useState as xe, useCallback as be, useMemo as Se, Component as Gt, createElement as ze, PureComponent as vt } from "react";
6
- import { QuestionType as q, QuestionStatus as we, QuestionImages as ue, PickHistoryStatus as Ne } from "@streamlayer/sdk-web-types";
7
- import { o as Nt, i as _t, r as Zt, a as Jt, n as Kt } from "./common-2d2a3ba3.js";
8
- import { CountdownCircleTimer as Xt } from "react-countdown-circle-timer";
9
- import { E as he } from "./index-0d23b24e.js";
10
- import "@streamlayer/sdk-web-interfaces";
11
- import "@streamlayer/sdk-web-notifications";
12
- import "./es/useStreamLayerApp.js";
13
- import "@streamlayer/sdk-web";
14
- const er = () => Q, tr = () => Q, rr = /* @__PURE__ */ g("div")({
15
- name: "a",
16
- class: "acysrl1",
17
- propsAsIs: !1
18
- }), ir = /* @__PURE__ */ g("div")({
19
- name: "l",
20
- class: "lo57cjm",
21
- propsAsIs: !1
22
- }), nr = /* @__PURE__ */ g(er())({
23
- name: "p",
24
- class: "p14kwh4y",
25
- propsAsIs: !0
26
- }), sr = /* @__PURE__ */ g("span")({
27
- name: "s",
28
- class: "sxun7sq",
29
- propsAsIs: !1
30
- }), or = /* @__PURE__ */ g("button")({
31
- name: "c",
32
- class: "c1i8ida8",
33
- propsAsIs: !1
34
- }), ar = /* @__PURE__ */ g(tr())({
35
- name: "g",
36
- class: "g1m0xfmw",
37
- propsAsIs: !0
38
- }), St = ({ type: i, close: n, label: a }) => {
39
- const c = i ? Et[i] : { label: a, iconName: void 0 };
40
- return /* @__PURE__ */ v(rr, { children: [
41
- /* @__PURE__ */ v(ir, { children: [
42
- (c == null ? void 0 : c.iconName) && /* @__PURE__ */ h(nr, { name: c.iconName }),
43
- (c == null ? void 0 : c.label) && /* @__PURE__ */ h(sr, { children: c.label })
44
- ] }),
45
- /* @__PURE__ */ h(or, { onClick: n, children: /* @__PURE__ */ h(ar, { name: "icon-cross" }) })
46
- ] });
47
- };
48
- const lr = /* @__PURE__ */ g("div")({
49
- name: "t",
50
- class: "taj61ja",
51
- propsAsIs: !1
52
- }), cr = /* @__PURE__ */ g("div")({
53
- name: "r",
54
- class: "r19fxewd",
55
- propsAsIs: !1
56
- }), ur = /* @__PURE__ */ g("div")({
57
- name: "i",
58
- class: "i1whkbqh",
59
- propsAsIs: !1
60
- }), ot = ({ indicator: i, title: n }) => /* @__PURE__ */ v(lr, { children: [
61
- /* @__PURE__ */ h(cr, { children: n }),
62
- /* @__PURE__ */ h(ur, { children: i })
63
- ] });
64
- const dr = /* @__PURE__ */ g("div")({
65
- name: "i",
66
- class: "i4lbhzs",
67
- propsAsIs: !1
68
- }), hr = /* @__PURE__ */ g("div")({
69
- name: "o",
70
- class: "ordquhq",
71
- propsAsIs: !1
72
- }), pr = /* @__PURE__ */ g("div")({
73
- name: "n",
74
- class: "nwzed99",
75
- propsAsIs: !1
76
- }), _e = ({ indicator: i, title: n }) => /* @__PURE__ */ v(dr, { children: [
77
- /* @__PURE__ */ h(hr, { children: i }),
78
- /* @__PURE__ */ h(pr, { children: n })
79
- ] });
80
- const fr = /* @__PURE__ */ g("div")({
81
- name: "o",
82
- class: "o15y0waw",
83
- propsAsIs: !1
84
- }), mr = /* @__PURE__ */ g("div")({
85
- name: "i",
86
- class: "ihjewwf",
87
- propsAsIs: !1
88
- }), gr = /* @__PURE__ */ g("div")({
89
- name: "n",
90
- class: "n10e9lv8",
91
- propsAsIs: !1
92
- }), Ir = /* @__PURE__ */ g("div")({
93
- name: "r",
94
- class: "r13bxv",
95
- propsAsIs: !1
96
- }), yr = /* @__PURE__ */ g("img")({
97
- name: "a",
98
- class: "a1fi59c9",
99
- propsAsIs: !1
100
- }), xr = /* @__PURE__ */ g("div")({
101
- name: "s",
102
- class: "s1kkihge",
103
- propsAsIs: !1
104
- }), wr = /* @__PURE__ */ g("div")({
105
- name: "c",
106
- class: "cy4f4t",
107
- propsAsIs: !1
108
- }), Mr = /* @__PURE__ */ g("div")({
109
- name: "p",
110
- class: "p18cnlx1",
111
- propsAsIs: !1
112
- }), Ar = /* @__PURE__ */ g("img")({
113
- name: "l",
114
- class: "lboqgs5",
115
- propsAsIs: !1
116
- }), Er = /* @__PURE__ */ g("div")({
117
- name: "d",
118
- class: "d1oaal4",
119
- propsAsIs: !1
120
- }), Tr = /* @__PURE__ */ g("div")({
121
- name: "x",
122
- class: "x1yzgo0u",
123
- propsAsIs: !1
124
- }), vr = /* @__PURE__ */ g("div")({
125
- name: "f",
126
- class: "f1l9i8s8",
127
- propsAsIs: !1
128
- }), Nr = /* @__PURE__ */ g("div")({
129
- name: "g",
130
- class: "g4cgl4u",
131
- propsAsIs: !1
132
- }), _r = /* @__PURE__ */ g("div")({
133
- name: "h",
134
- class: "h1qn1tmd",
135
- propsAsIs: !1
136
- }), Sr = /* @__PURE__ */ g("div")({
137
- name: "u",
138
- class: "u1gsbhq4",
139
- propsAsIs: !1
140
- }), zr = /* @__PURE__ */ g("div")({
141
- name: "m",
142
- class: "mvj8oco",
143
- propsAsIs: !1
144
- }), Dr = /* @__PURE__ */ g("button")({
145
- name: "v",
146
- class: "viqiaf2",
147
- propsAsIs: !1
148
- }), br = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", zt = ({
149
- avatar: i,
150
- name: n,
151
- points: a,
152
- friendsRank: c,
153
- rank: u,
154
- streak: I,
155
- correct: m,
156
- incorrect: o,
157
- inTop: y,
158
- successRate: E
159
- }) => /* @__PURE__ */ v(fr, { children: [
160
- /* @__PURE__ */ h(mr, { children: /* @__PURE__ */ v(Ir, { children: [
161
- /* @__PURE__ */ v(Dr, { children: [
162
- i && /* @__PURE__ */ h(yr, { alt: "avatar", src: i }),
163
- !i && /* @__PURE__ */ h(zr, { children: Nt(n || "") })
164
- ] }),
165
- /* @__PURE__ */ v(xr, { children: [
166
- /* @__PURE__ */ h(wr, { children: n }),
167
- /* @__PURE__ */ v(Mr, { children: [
168
- /* @__PURE__ */ v(Er, { children: [
169
- /* @__PURE__ */ h(Ar, { alt: "rank-icon", src: br }),
170
- /* @__PURE__ */ v(Tr, { children: [
171
- _t(a),
172
- /* @__PURE__ */ h(vr, { children: "PTS" })
173
- ] })
174
- ] }),
175
- /* @__PURE__ */ h(Nr, {}),
176
- /* @__PURE__ */ v("div", { children: [
177
- "TOP ",
178
- y || 0,
179
- "%"
180
- ] })
181
- ] })
182
- ] })
183
- ] }) }),
184
- /* @__PURE__ */ v(gr, { children: [
185
- /* @__PURE__ */ v(_r, { children: [
186
- /* @__PURE__ */ h(ot, { indicator: c || 0, title: "Friends rank" }),
187
- /* @__PURE__ */ h(ot, { indicator: u || 0, title: "Global rank" })
188
- ] }),
189
- /* @__PURE__ */ v(Sr, { children: [
190
- /* @__PURE__ */ h(_e, { indicator: I || 0, title: "Win streak" }),
191
- /* @__PURE__ */ h(_e, { indicator: m || 0, title: "Correct" }),
192
- /* @__PURE__ */ h(_e, { indicator: o || 0, title: "Incorrect" }),
193
- /* @__PURE__ */ h(_e, { indicator: `${E || 0}%`, title: "Succ. rate" })
194
- ] })
195
- ] })
196
- ] });
197
- const Or = /* @__PURE__ */ g("div")({
198
- name: "i",
199
- class: "i1mbhc7z",
200
- propsAsIs: !1
201
- }), Lr = /* @__PURE__ */ g("div")({
202
- name: "n",
203
- class: "n1f9yefw",
204
- propsAsIs: !1
205
- }), kr = /* @__PURE__ */ g("div")({
206
- name: "o",
207
- class: "o1n7beii",
208
- propsAsIs: !1
209
- }), Br = ({ title: i, description: n }) => /* @__PURE__ */ v(Or, { children: [
210
- /* @__PURE__ */ h(Q, { name: "icon-check-circle" }),
211
- /* @__PURE__ */ h(Lr, { children: i }),
212
- /* @__PURE__ */ h(kr, { children: n })
213
- ] });
214
- const Cr = () => Q, Rr = /* @__PURE__ */ g("div")({
215
- name: "c",
216
- class: "ciyeb68",
217
- propsAsIs: !1
218
- }), Ur = /* @__PURE__ */ g(Cr())({
219
- name: "n",
220
- class: "nfic4xc",
221
- propsAsIs: !0
222
- }), at = /* @__PURE__ */ g("div")({
223
- name: "d",
224
- class: "d1pd1p66",
225
- propsAsIs: !1
226
- }), lt = /* @__PURE__ */ g("div")({
227
- name: "p",
228
- class: "p132yxcv",
229
- propsAsIs: !1
230
- }), jr = /* @__PURE__ */ g("span")({
231
- name: "l",
232
- class: "l4a8aw",
233
- propsAsIs: !1
234
- }), Fe = /* @__PURE__ */ g("span")({
235
- name: "g",
236
- class: "gzdx7pk",
237
- propsAsIs: !1
238
- }), Fr = /* @__PURE__ */ g("div")({
239
- name: "s",
240
- class: "smnc4zm",
241
- propsAsIs: !1
242
- }), $r = ({
243
- feedbackMessages: i,
244
- questionVotedCorrectly: n,
245
- questionVoted: a,
246
- questionType: c,
247
- hasCorrectAnswer: u,
248
- questionStatus: I
249
- }) => {
250
- const m = a && (c === q.TRIVIA || c === q.PREDICTION);
251
- if (!m && I !== we.RESOLVED)
252
- return null;
253
- const o = c === q.PREDICTION && !u, y = n ? "correct" : "incorrect", E = n ? i.correctFeedback : i.incorrectFeedback;
254
- return /* @__PURE__ */ v(Rr, { "data-isPrediction": o, children: [
255
- I === we.RESOLVED && c === q.TRIVIA && !a && /* @__PURE__ */ v(de, { children: [
256
- /* @__PURE__ */ h(at, { children: /* @__PURE__ */ h(Q, { name: "questionExpired" }) }),
257
- /* @__PURE__ */ v("div", { children: [
258
- /* @__PURE__ */ h(lt, { children: /* @__PURE__ */ h(Fe, { children: "Question Expired" }) }),
259
- /* @__PURE__ */ h(Fr, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
260
- ] })
261
- ] }),
262
- m && o && /* @__PURE__ */ v(de, { children: [
263
- /* @__PURE__ */ h(Ur, { name: "icon-prediction" }),
264
- /* @__PURE__ */ h(Fe, { children: "Stay tuned to see if your prediction was correct." })
265
- ] }),
266
- m && u && /* @__PURE__ */ v(de, { children: [
267
- /* @__PURE__ */ h(at, { "data-feedbackType": y, children: /* @__PURE__ */ h(Q, { name: y }) }),
268
- /* @__PURE__ */ h("div", { children: /* @__PURE__ */ v(lt, { children: [
269
- /* @__PURE__ */ h(jr, { "data-feedbackType": y, children: E == null ? void 0 : E.title }),
270
- /* @__PURE__ */ h(Fe, { children: E == null ? void 0 : E.description })
271
- ] }) })
272
- ] })
273
- ] });
274
- };
275
- const Qr = /* @__PURE__ */ g("div")({
276
- name: "o",
277
- class: "olc1eph",
278
- propsAsIs: !1
279
- }), Pr = /* @__PURE__ */ g("div")({
280
- name: "n",
281
- class: "n1yoh29a",
282
- propsAsIs: !1
283
- }), qr = /* @__PURE__ */ g("div")({
284
- name: "e",
285
- class: "ejkr5mb",
286
- propsAsIs: !1
287
- }), Yr = /* @__PURE__ */ g("div")({
288
- name: "p",
289
- class: "p82wnnx",
290
- propsAsIs: !1
291
- });
292
- const Wr = () => Dt, Vr = () => Dt, Hr = () => Q, Gr = /* @__PURE__ */ g("button")({
293
- name: "c",
294
- class: "cpm4u8k",
295
- propsAsIs: !1
296
- }), Zr = /* @__PURE__ */ g("div")({
297
- name: "l",
298
- class: "lwfomc3",
299
- propsAsIs: !1
300
- }), Jr = /* @__PURE__ */ g("span")({
301
- name: "d",
302
- class: "dmltvg2",
303
- propsAsIs: !1
304
- }), Kr = /* @__PURE__ */ g("div")({
305
- name: "s",
306
- class: "stfjpqz",
307
- propsAsIs: !1
308
- }), Xr = /* @__PURE__ */ g("div")({
309
- name: "p",
310
- class: "p198m24r",
311
- propsAsIs: !1
312
- }), Dt = /* @__PURE__ */ g("img")({
313
- name: "r",
314
- class: "rbq5eu7",
315
- propsAsIs: !1
316
- }), ei = /* @__PURE__ */ g(Wr())({
317
- name: "g",
318
- class: "g1iv6oeb",
319
- propsAsIs: !0
320
- }), ti = /* @__PURE__ */ g(Vr())({
321
- name: "h",
322
- class: "h1qtxlqc",
323
- propsAsIs: !0
324
- }), ri = /* @__PURE__ */ g("span")({
325
- name: "u",
326
- class: "udm736q",
327
- propsAsIs: !1
328
- }), ii = /* @__PURE__ */ g("span")({
329
- name: "b",
330
- class: "b1da34tx",
331
- propsAsIs: !1
332
- }), ni = /* @__PURE__ */ g("span")({
333
- name: "x",
334
- class: "x1dqwq83",
335
- propsAsIs: !1
336
- }), si = /* @__PURE__ */ g(Hr())({
337
- name: "v",
338
- class: "v10s9my2",
339
- propsAsIs: !0
340
- }), ct = {
341
- [ue.CENTERED]: (i) => /* @__PURE__ */ h(ei, { alt: "option-icon", src: i }),
342
- [ue.TRANSPARENT]: (i) => /* @__PURE__ */ h(Kr, { children: /* @__PURE__ */ h(Xr, { style: { backgroundImage: `url(${i})` } }) }),
343
- [ue.ROUNDED]: (i) => /* @__PURE__ */ h(ti, { alt: "option-icon", src: i }),
344
- [ue.NONE]: () => null,
345
- [ue.UNSET]: () => null
346
- }, oi = ({ questionType: i, hasCorrectAnswer: n, correct: a, youVoted: c, questionVoted: u }) => {
347
- if (i === q.POLL && c)
348
- return "correct";
349
- if (i === q.PREDICTION) {
350
- if (n && u)
351
- return c ? a ? "correct" : "incorrect" : a ? "correct" : "unset";
352
- if (c)
353
- return "correct";
354
- }
355
- return i === q.TRIVIA && u ? c ? a ? "correct" : "incorrect" : a ? "correct" : "unset" : "unset";
356
- }, ai = ({
357
- questionType: i,
358
- questionVoted: n,
359
- correct: a,
360
- hasCorrectAnswer: c,
361
- questionStatus: u
362
- }) => i === q.TRIVIA ? n && a : i === q.PREDICTION ? n && a && c || u === we.RESOLVED && a : !1, li = (i) => {
363
- var n;
364
- const {
365
- // option props
366
- id: a,
367
- icon: c,
368
- text: u,
369
- percentageDecimal: I,
370
- // extra props
371
- onVote: m,
372
- youSelected: o,
373
- questionVoted: y,
374
- // ToDo: Figure out why imageMode is not in the response, and delete default value
375
- imageMode: E = ue.ROUNDED,
376
- answerTimeExpired: N,
377
- questionStatus: S,
378
- isLoading: w,
379
- questionType: T,
380
- correct: _,
381
- hasCorrectAnswer: p
382
- } = i, M = oi(i), x = ai({ questionType: T, questionVoted: y, correct: _, hasCorrectAnswer: p, questionStatus: S }), A = y || S === we.RESOLVED && T === q.PREDICTION;
383
- return /* @__PURE__ */ v(
384
- Gr,
385
- {
386
- value: a,
387
- "data-selected": o,
388
- "data-answerState": M,
389
- disabled: y || w || N,
390
- onClick: m,
391
- children: [
392
- A && /* @__PURE__ */ h(Zr, { "data-answerState": M, style: { width: `${I}%` } }),
393
- /* @__PURE__ */ v(Jr, { children: [
394
- c && ((n = ct[E]) == null ? void 0 : n.call(ct, c)),
395
- /* @__PURE__ */ h(ri, { children: u }),
396
- A && /* @__PURE__ */ v(ii, { children: [
397
- x && /* @__PURE__ */ h(si, { name: "selected" }),
398
- /* @__PURE__ */ v(ni, { children: [
399
- I,
400
- "%"
401
- ] })
402
- ] })
403
- ] })
404
- ]
405
- }
406
- );
407
- };
408
- const ci = [he.PRIMARY_GREEN1, he.SECONDARY_RED1, he.SECONDARY_RED1], ui = [10, 10, 0], di = /* @__PURE__ */ g("div")({
409
- name: "A",
410
- class: "a1f928zy",
411
- propsAsIs: !1
412
- }), hi = he.SECONDARY_GREEN6, ut = he.SECONDARY_RED3, pi = he.NEUTRALS_GRAY3, fi = ({
413
- isPlaying: i = !0,
414
- duration: n = 30,
415
- onTimerExpired: a
416
- }) => {
417
- const [c, u] = xe(n > 10 ? hi : ut), I = ({
418
- remainingTime: y
419
- }) => /* @__PURE__ */ h(di, {
420
- children: y
421
- }), m = be(() => {
422
- a == null || a(), u(pi);
423
- }, [a, u]), o = be((y) => {
424
- y === 10 && u(ut);
425
- }, [u]);
426
- return /* @__PURE__ */ h(Xt, {
427
- isPlaying: i,
428
- duration: n,
429
- colors: ci,
430
- colorsTime: ui,
431
- size: 32,
432
- strokeWidth: 2,
433
- trailStrokeWidth: 2,
434
- trailColor: c,
435
- onComplete: m,
436
- onUpdate: o,
437
- children: I
438
- });
439
- };
440
- const mi = () => Q, gi = /* @__PURE__ */ g("div")({
441
- name: "a",
442
- class: "a1r7f3z4",
443
- propsAsIs: !1
444
- }), Ii = /* @__PURE__ */ g("div")({
445
- name: "s",
446
- class: "sblndl",
447
- propsAsIs: !1
448
- }), yi = /* @__PURE__ */ g("div")({
449
- name: "l",
450
- class: "l7ka1tv",
451
- propsAsIs: !1
452
- }), xi = /* @__PURE__ */ g(mi())({
453
- name: "p",
454
- class: "p1edlxt3",
455
- propsAsIs: !0
456
- }), wi = /* @__PURE__ */ g("div")({
457
- name: "g",
458
- class: "ghm08u2",
459
- propsAsIs: !1
460
- }), Mi = /* @__PURE__ */ g("span")({
461
- name: "c",
462
- class: "c12nsh46",
463
- propsAsIs: !1
464
- }), Ai = /* @__PURE__ */ g("span")({
465
- name: "d",
466
- class: "dlr9eoc",
467
- propsAsIs: !1
468
- }), Ei = ({ title: i, points: n, isPlayingTimer: a, isTimer: c, onTimerExpired: u }) => /* @__PURE__ */ v(gi, { children: [
469
- /* @__PURE__ */ v(Ii, { children: [
470
- i && /* @__PURE__ */ h(yi, { children: i }),
471
- n !== void 0 && /* @__PURE__ */ v(de, { children: [
472
- /* @__PURE__ */ h(xi, { name: "icon-trophy" }),
473
- /* @__PURE__ */ v(wi, { children: [
474
- /* @__PURE__ */ h(Mi, { children: n }),
475
- /* @__PURE__ */ h(Ai, { children: "PTS" })
476
- ] })
477
- ] })
478
- ] }),
479
- c && /* @__PURE__ */ h(fi, { isPlaying: a, onTimerExpired: u })
480
- ] }), Ti = ({ openedQuestion: i, vote: n, close: a }) => {
481
- var c;
482
- const u = i.subject, I = i.type, m = (c = i.options) == null ? void 0 : c.options, [o, y] = xe(!1), [E, N] = xe(!1), [S, w] = xe(""), T = i == null ? void 0 : i.id, _ = be(
483
- async (b) => {
484
- if (T) {
485
- const D = b.currentTarget.value;
486
- w(D), N(!0), await n(T, D), N(!1);
487
- }
488
- },
489
- [T, w, n]
490
- ), p = be(() => {
491
- y(!0), setTimeout(a, 3e3);
492
- }, [a]), M = Se(
493
- () => i == null ? void 0 : i.answers.find((b) => b.youVoted === !0),
494
- [i]
495
- ), x = Se(
496
- () => !!(i != null && i.answers.find((b) => b.correct === !0)),
497
- [i]
498
- ), A = Se(() => i ? i.answers.map((b) => ({
499
- ...b,
500
- questionVoted: !!M,
501
- youSelected: S === b.id,
502
- isLoading: E,
503
- hasCorrectAnswer: x,
504
- questionType: i.type,
505
- answerTimeExpired: o,
506
- questionStatus: i.status,
507
- // ToDo: Figure out why imageMode is not in the response
508
- onVote: _
509
- })) : [], [x, o, E, i, M, _, S]), z = m && (m.case === "trivia" || m.case === "prediction") ? m.value : void 0;
510
- return /* @__PURE__ */ h(Tt, { "data-question-header": "true", children: /* @__PURE__ */ h(Qr, { children: /* @__PURE__ */ v(Pr, { children: [
511
- z && /* @__PURE__ */ h(
512
- $r,
513
- {
514
- feedbackMessages: z,
515
- questionVoted: !!M,
516
- questionVotedCorrectly: M == null ? void 0 : M.correct,
517
- questionType: I,
518
- hasCorrectAnswer: x,
519
- questionStatus: i.status
520
- }
521
- ),
522
- /* @__PURE__ */ h(
523
- Ei,
524
- {
525
- title: o ? "Time expired" : "To win",
526
- points: o ? void 0 : 100,
527
- onTimerExpired: p,
528
- isTimer: !0
529
- }
530
- ),
531
- o ? /* @__PURE__ */ h(
532
- Br,
533
- {
534
- title: "More to come...",
535
- description: "Watch for additional enhanced stream interactive experience."
536
- }
537
- ) : /* @__PURE__ */ v(de, { children: [
538
- /* @__PURE__ */ h(qr, { children: u }),
539
- /* @__PURE__ */ h(Yr, { children: A.map((b) => /* @__PURE__ */ h(li, { ...b }, b.id)) })
540
- ] })
541
- ] }) }) });
542
- };
543
- const vi = /* @__PURE__ */ g("div")({
544
- name: "e",
545
- class: "e1eio0mt",
546
- propsAsIs: !1
547
- }), Ni = /* @__PURE__ */ g("div")({
548
- name: "i",
549
- class: "iigl87b",
550
- propsAsIs: !1
551
- }), _i = /* @__PURE__ */ g("h3")({
552
- name: "n",
553
- class: "n1o2cwub",
554
- propsAsIs: !1
555
- }), Si = /* @__PURE__ */ g("div")({
556
- name: "r",
557
- class: "r3uxe45",
558
- propsAsIs: !1
559
- }), zi = /* @__PURE__ */ g("div")({
560
- name: "l",
561
- class: "lrqius",
562
- propsAsIs: !1
563
- }), bt = ({ created: i, title: n, instantView: a }) => {
564
- const c = Se(() => {
565
- if (i) {
566
- const u = new Date(i);
567
- if (Zt(u))
568
- return {
569
- date: Jt(u),
570
- time: Kt(u)
571
- };
572
- }
573
- return null;
574
- }, [i]);
575
- return /* @__PURE__ */ v(vi, { children: [
576
- c && /* @__PURE__ */ v(zi, { children: [
577
- c.date,
578
- " · ",
579
- c.time
580
- ] }),
581
- (a == null ? void 0 : a.video) && /* @__PURE__ */ h(Wt, { source: a.video.url, poster: a.video.thumbnailUrl }),
582
- /* @__PURE__ */ v(Ni, { children: [
583
- /* @__PURE__ */ h(_i, { children: (a == null ? void 0 : a.heading) || n }),
584
- /* @__PURE__ */ h(Si, { children: a == null ? void 0 : a.body })
585
- ] })
586
- ] });
587
- };
588
- const Di = /* @__PURE__ */ g("div")({
589
- name: "o",
590
- class: "o18unvw4",
591
- propsAsIs: !1
592
- }), bi = /* @__PURE__ */ g("a")({
593
- name: "n",
594
- class: "ns0uvk8",
595
- propsAsIs: !1
596
- }), Oi = ({ instantView: i, ...n }) => /* @__PURE__ */ v(Di, { children: [
597
- /* @__PURE__ */ h(bt, { instantView: i, ...n }),
598
- (i == null ? void 0 : i.webLink) && /* @__PURE__ */ v(bi, { href: i == null ? void 0 : i.webLink.url, target: "_blank", children: [
599
- "Explore more of the Masters History",
600
- /* @__PURE__ */ h(Q, { name: "icon-external-link" })
601
- ] })
602
- ] });
603
- const Li = /* @__PURE__ */ g("div")({
604
- name: "d",
605
- class: "dk8r1eq",
606
- propsAsIs: !1
607
- }), ki = ({
608
- openedQuestion: i
609
- }) => {
610
- var n;
611
- return ((n = i == null ? void 0 : i.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ h(Oi, {
612
- created: i.attributes.created,
613
- ...i.attributes.attributes.value
614
- }) : null;
615
- }, Bi = ({
616
- extendedQuestion: i,
617
- vote: n,
618
- close: a
619
- }) => {
620
- const {
621
- loading: c,
622
- data: u
623
- } = i;
624
- return !c && u ? /* @__PURE__ */ h(Ti, {
625
- vote: n,
626
- close: a,
627
- openedQuestion: u
628
- }) : null;
629
- }, Ci = ({
630
- gamification: i
631
- }) => {
632
- var n;
633
- const a = re(i.openedQuestion.$store), c = re(i.openedQuestion.$extendedStore);
634
- if (!a)
635
- return null;
636
- const u = a.type;
637
- return /* @__PURE__ */ v(Li, {
638
- children: [/* @__PURE__ */ h(St, {
639
- close: i.closeQuestion,
640
- type: ((n = a.attributes) == null ? void 0 : n.type) || q.UNSET
641
- }), u === "question" && /* @__PURE__ */ h(Bi, {
642
- vote: i.submitAnswer,
643
- close: i.closeQuestion,
644
- extendedQuestion: c
645
- }), u !== "question" && /* @__PURE__ */ h(ki, {
646
- openedQuestion: a
647
- })]
648
- });
649
- };
650
- const Ri = /* @__PURE__ */ g("div")({
651
- name: "t",
652
- class: "tcim9sm",
653
- propsAsIs: !1
654
- }), Ui = /* @__PURE__ */ g("div")({
655
- name: "e",
656
- class: "e8wco6o",
657
- propsAsIs: !1
658
- }), ji = /* @__PURE__ */ g("button")({
659
- name: "n",
660
- class: "n1ardwzl",
661
- propsAsIs: !1
662
- }), Fi = /* @__PURE__ */ g("span")({
663
- name: "i",
664
- class: "i1vk8ojx",
665
- propsAsIs: !1
666
- });
667
- var ye = /* @__PURE__ */ ((i) => (i.HOME = "home", i.LEADERBOARD = "leaderboard", i))(ye || {});
668
- const dt = ({ title: i, active: n, onClick: a }) => /* @__PURE__ */ h(ji, { onClick: a, "data-selected": n, children: /* @__PURE__ */ h(Fi, { children: i }) }), $i = ({ activePage: i = "home", toggleActivePage: n }) => /* @__PURE__ */ h(Ri, { children: /* @__PURE__ */ v(Ui, { "data-position": i === "home" ? "left" : "right", children: [
669
- /* @__PURE__ */ h(dt, { title: "Home", active: i === "home", onClick: () => n(
670
- "home"
671
- /* HOME */
672
- ) }),
673
- /* @__PURE__ */ h(
674
- dt,
675
- {
676
- title: "Leader Board",
677
- active: i === "leaderboard",
678
- onClick: () => n(
679
- "leaderboard"
680
- /* LEADERBOARD */
681
- )
682
- }
683
- )
684
- ] }) });
685
- var Ot = {}, Lt = {}, Oe = {};
686
- Oe.byteLength = qi;
687
- Oe.toByteArray = Wi;
688
- Oe.fromByteArray = Gi;
689
- var J = [], P = [], Qi = typeof Uint8Array < "u" ? Uint8Array : Array, $e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
690
- for (var le = 0, Pi = $e.length; le < Pi; ++le)
691
- J[le] = $e[le], P[$e.charCodeAt(le)] = le;
692
- P["-".charCodeAt(0)] = 62;
693
- P["_".charCodeAt(0)] = 63;
694
- function kt(i) {
695
- var n = i.length;
696
- if (n % 4 > 0)
697
- throw new Error("Invalid string. Length must be a multiple of 4");
698
- var a = i.indexOf("=");
699
- a === -1 && (a = n);
700
- var c = a === n ? 0 : 4 - a % 4;
701
- return [a, c];
702
- }
703
- function qi(i) {
704
- var n = kt(i), a = n[0], c = n[1];
705
- return (a + c) * 3 / 4 - c;
706
- }
707
- function Yi(i, n, a) {
708
- return (n + a) * 3 / 4 - a;
709
- }
710
- function Wi(i) {
711
- var n, a = kt(i), c = a[0], u = a[1], I = new Qi(Yi(i, c, u)), m = 0, o = u > 0 ? c - 4 : c, y;
712
- for (y = 0; y < o; y += 4)
713
- n = P[i.charCodeAt(y)] << 18 | P[i.charCodeAt(y + 1)] << 12 | P[i.charCodeAt(y + 2)] << 6 | P[i.charCodeAt(y + 3)], I[m++] = n >> 16 & 255, I[m++] = n >> 8 & 255, I[m++] = n & 255;
714
- return u === 2 && (n = P[i.charCodeAt(y)] << 2 | P[i.charCodeAt(y + 1)] >> 4, I[m++] = n & 255), u === 1 && (n = P[i.charCodeAt(y)] << 10 | P[i.charCodeAt(y + 1)] << 4 | P[i.charCodeAt(y + 2)] >> 2, I[m++] = n >> 8 & 255, I[m++] = n & 255), I;
715
- }
716
- function Vi(i) {
717
- return J[i >> 18 & 63] + J[i >> 12 & 63] + J[i >> 6 & 63] + J[i & 63];
718
- }
719
- function Hi(i, n, a) {
720
- for (var c, u = [], I = n; I < a; I += 3)
721
- c = (i[I] << 16 & 16711680) + (i[I + 1] << 8 & 65280) + (i[I + 2] & 255), u.push(Vi(c));
722
- return u.join("");
723
- }
724
- function Gi(i) {
725
- for (var n, a = i.length, c = a % 3, u = [], I = 16383, m = 0, o = a - c; m < o; m += I)
726
- u.push(Hi(i, m, m + I > o ? o : m + I));
727
- return c === 1 ? (n = i[a - 1], u.push(
728
- J[n >> 2] + J[n << 4 & 63] + "=="
729
- )) : c === 2 && (n = (i[a - 2] << 8) + i[a - 1], u.push(
730
- J[n >> 10] + J[n >> 4 & 63] + J[n << 2 & 63] + "="
731
- )), u.join("");
732
- }
733
- var et = {};
734
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
735
- et.read = function(i, n, a, c, u) {
736
- var I, m, o = u * 8 - c - 1, y = (1 << o) - 1, E = y >> 1, N = -7, S = a ? u - 1 : 0, w = a ? -1 : 1, T = i[n + S];
737
- for (S += w, I = T & (1 << -N) - 1, T >>= -N, N += o; N > 0; I = I * 256 + i[n + S], S += w, N -= 8)
738
- ;
739
- for (m = I & (1 << -N) - 1, I >>= -N, N += c; N > 0; m = m * 256 + i[n + S], S += w, N -= 8)
740
- ;
741
- if (I === 0)
742
- I = 1 - E;
743
- else {
744
- if (I === y)
745
- return m ? NaN : (T ? -1 : 1) * (1 / 0);
746
- m = m + Math.pow(2, c), I = I - E;
747
- }
748
- return (T ? -1 : 1) * m * Math.pow(2, I - c);
749
- };
750
- et.write = function(i, n, a, c, u, I) {
751
- var m, o, y, E = I * 8 - u - 1, N = (1 << E) - 1, S = N >> 1, w = u === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, T = c ? 0 : I - 1, _ = c ? 1 : -1, p = n < 0 || n === 0 && 1 / n < 0 ? 1 : 0;
752
- for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (o = isNaN(n) ? 1 : 0, m = N) : (m = Math.floor(Math.log(n) / Math.LN2), n * (y = Math.pow(2, -m)) < 1 && (m--, y *= 2), m + S >= 1 ? n += w / y : n += w * Math.pow(2, 1 - S), n * y >= 2 && (m++, y /= 2), m + S >= N ? (o = 0, m = N) : m + S >= 1 ? (o = (n * y - 1) * Math.pow(2, u), m = m + S) : (o = n * Math.pow(2, S - 1) * Math.pow(2, u), m = 0)); u >= 8; i[a + T] = o & 255, T += _, o /= 256, u -= 8)
753
- ;
754
- for (m = m << u | o, E += u; E > 0; i[a + T] = m & 255, T += _, m /= 256, E -= 8)
755
- ;
756
- i[a + T - _] |= p * 128;
757
- };
758
- /*!
759
- * The buffer module from node.js, for the browser.
760
- *
761
- * @author Feross Aboukhadijeh <https://feross.org>
762
- * @license MIT
763
- */
764
- (function(i) {
765
- const n = Oe, a = et, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
766
- i.Buffer = o, i.SlowBuffer = A, i.INSPECT_MAX_BYTES = 50;
767
- const u = 2147483647;
768
- i.kMaxLength = u, o.TYPED_ARRAY_SUPPORT = I(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
769
- "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
770
- );
771
- function I() {
772
- try {
773
- const r = new Uint8Array(1), e = { foo: function() {
774
- return 42;
775
- } };
776
- return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(r, e), r.foo() === 42;
777
- } catch {
778
- return !1;
779
- }
780
- }
781
- Object.defineProperty(o.prototype, "parent", {
782
- enumerable: !0,
783
- get: function() {
784
- if (o.isBuffer(this))
785
- return this.buffer;
786
- }
787
- }), Object.defineProperty(o.prototype, "offset", {
788
- enumerable: !0,
789
- get: function() {
790
- if (o.isBuffer(this))
791
- return this.byteOffset;
792
- }
793
- });
794
- function m(r) {
795
- if (r > u)
796
- throw new RangeError('The value "' + r + '" is invalid for option "size"');
797
- const e = new Uint8Array(r);
798
- return Object.setPrototypeOf(e, o.prototype), e;
799
- }
800
- function o(r, e, t) {
801
- if (typeof r == "number") {
802
- if (typeof e == "string")
803
- throw new TypeError(
804
- 'The "string" argument must be of type string. Received type number'
805
- );
806
- return S(r);
807
- }
808
- return y(r, e, t);
809
- }
810
- o.poolSize = 8192;
811
- function y(r, e, t) {
812
- if (typeof r == "string")
813
- return w(r, e);
814
- if (ArrayBuffer.isView(r))
815
- return _(r);
816
- if (r == null)
817
- throw new TypeError(
818
- "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
819
- );
820
- if (H(r, ArrayBuffer) || r && H(r.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (H(r, SharedArrayBuffer) || r && H(r.buffer, SharedArrayBuffer)))
821
- return p(r, e, t);
822
- if (typeof r == "number")
823
- throw new TypeError(
824
- 'The "value" argument must not be of type number. Received type number'
825
- );
826
- const s = r.valueOf && r.valueOf();
827
- if (s != null && s !== r)
828
- return o.from(s, e, t);
829
- const l = M(r);
830
- if (l)
831
- return l;
832
- if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof r[Symbol.toPrimitive] == "function")
833
- return o.from(r[Symbol.toPrimitive]("string"), e, t);
834
- throw new TypeError(
835
- "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
836
- );
837
- }
838
- o.from = function(r, e, t) {
839
- return y(r, e, t);
840
- }, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
841
- function E(r) {
842
- if (typeof r != "number")
843
- throw new TypeError('"size" argument must be of type number');
844
- if (r < 0)
845
- throw new RangeError('The value "' + r + '" is invalid for option "size"');
846
- }
847
- function N(r, e, t) {
848
- return E(r), r <= 0 ? m(r) : e !== void 0 ? typeof t == "string" ? m(r).fill(e, t) : m(r).fill(e) : m(r);
849
- }
850
- o.alloc = function(r, e, t) {
851
- return N(r, e, t);
852
- };
853
- function S(r) {
854
- return E(r), m(r < 0 ? 0 : x(r) | 0);
855
- }
856
- o.allocUnsafe = function(r) {
857
- return S(r);
858
- }, o.allocUnsafeSlow = function(r) {
859
- return S(r);
860
- };
861
- function w(r, e) {
862
- if ((typeof e != "string" || e === "") && (e = "utf8"), !o.isEncoding(e))
863
- throw new TypeError("Unknown encoding: " + e);
864
- const t = z(r, e) | 0;
865
- let s = m(t);
866
- const l = s.write(r, e);
867
- return l !== t && (s = s.slice(0, l)), s;
868
- }
869
- function T(r) {
870
- const e = r.length < 0 ? 0 : x(r.length) | 0, t = m(e);
871
- for (let s = 0; s < e; s += 1)
872
- t[s] = r[s] & 255;
873
- return t;
874
- }
875
- function _(r) {
876
- if (H(r, Uint8Array)) {
877
- const e = new Uint8Array(r);
878
- return p(e.buffer, e.byteOffset, e.byteLength);
879
- }
880
- return T(r);
881
- }
882
- function p(r, e, t) {
883
- if (e < 0 || r.byteLength < e)
884
- throw new RangeError('"offset" is outside of buffer bounds');
885
- if (r.byteLength < e + (t || 0))
886
- throw new RangeError('"length" is outside of buffer bounds');
887
- let s;
888
- return e === void 0 && t === void 0 ? s = new Uint8Array(r) : t === void 0 ? s = new Uint8Array(r, e) : s = new Uint8Array(r, e, t), Object.setPrototypeOf(s, o.prototype), s;
889
- }
890
- function M(r) {
891
- if (o.isBuffer(r)) {
892
- const e = x(r.length) | 0, t = m(e);
893
- return t.length === 0 || r.copy(t, 0, 0, e), t;
894
- }
895
- if (r.length !== void 0)
896
- return typeof r.length != "number" || je(r.length) ? m(0) : T(r);
897
- if (r.type === "Buffer" && Array.isArray(r.data))
898
- return T(r.data);
899
- }
900
- function x(r) {
901
- if (r >= u)
902
- throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + u.toString(16) + " bytes");
903
- return r | 0;
904
- }
905
- function A(r) {
906
- return +r != r && (r = 0), o.alloc(+r);
907
- }
908
- o.isBuffer = function(e) {
909
- return e != null && e._isBuffer === !0 && e !== o.prototype;
910
- }, o.compare = function(e, t) {
911
- if (H(e, Uint8Array) && (e = o.from(e, e.offset, e.byteLength)), H(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(e) || !o.isBuffer(t))
912
- throw new TypeError(
913
- 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
914
- );
915
- if (e === t)
916
- return 0;
917
- let s = e.length, l = t.length;
918
- for (let d = 0, f = Math.min(s, l); d < f; ++d)
919
- if (e[d] !== t[d]) {
920
- s = e[d], l = t[d];
921
- break;
922
- }
923
- return s < l ? -1 : l < s ? 1 : 0;
924
- }, o.isEncoding = function(e) {
925
- switch (String(e).toLowerCase()) {
926
- case "hex":
927
- case "utf8":
928
- case "utf-8":
929
- case "ascii":
930
- case "latin1":
931
- case "binary":
932
- case "base64":
933
- case "ucs2":
934
- case "ucs-2":
935
- case "utf16le":
936
- case "utf-16le":
937
- return !0;
938
- default:
939
- return !1;
940
- }
941
- }, o.concat = function(e, t) {
942
- if (!Array.isArray(e))
943
- throw new TypeError('"list" argument must be an Array of Buffers');
944
- if (e.length === 0)
945
- return o.alloc(0);
946
- let s;
947
- if (t === void 0)
948
- for (t = 0, s = 0; s < e.length; ++s)
949
- t += e[s].length;
950
- const l = o.allocUnsafe(t);
951
- let d = 0;
952
- for (s = 0; s < e.length; ++s) {
953
- let f = e[s];
954
- if (H(f, Uint8Array))
955
- d + f.length > l.length ? (o.isBuffer(f) || (f = o.from(f)), f.copy(l, d)) : Uint8Array.prototype.set.call(
956
- l,
957
- f,
958
- d
959
- );
960
- else if (o.isBuffer(f))
961
- f.copy(l, d);
962
- else
963
- throw new TypeError('"list" argument must be an Array of Buffers');
964
- d += f.length;
965
- }
966
- return l;
967
- };
968
- function z(r, e) {
969
- if (o.isBuffer(r))
970
- return r.length;
971
- if (ArrayBuffer.isView(r) || H(r, ArrayBuffer))
972
- return r.byteLength;
973
- if (typeof r != "string")
974
- throw new TypeError(
975
- 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof r
976
- );
977
- const t = r.length, s = arguments.length > 2 && arguments[2] === !0;
978
- if (!s && t === 0)
979
- return 0;
980
- let l = !1;
981
- for (; ; )
982
- switch (e) {
983
- case "ascii":
984
- case "latin1":
985
- case "binary":
986
- return t;
987
- case "utf8":
988
- case "utf-8":
989
- return Ue(r).length;
990
- case "ucs2":
991
- case "ucs-2":
992
- case "utf16le":
993
- case "utf-16le":
994
- return t * 2;
995
- case "hex":
996
- return t >>> 1;
997
- case "base64":
998
- return st(r).length;
999
- default:
1000
- if (l)
1001
- return s ? -1 : Ue(r).length;
1002
- e = ("" + e).toLowerCase(), l = !0;
1003
- }
1004
- }
1005
- o.byteLength = z;
1006
- function b(r, e, t) {
1007
- let s = !1;
1008
- if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((t === void 0 || t > this.length) && (t = this.length), t <= 0) || (t >>>= 0, e >>>= 0, t <= e))
1009
- return "";
1010
- for (r || (r = "utf8"); ; )
1011
- switch (r) {
1012
- case "hex":
1013
- return Ce(this, e, t);
1014
- case "utf8":
1015
- case "utf-8":
1016
- return Me(this, e, t);
1017
- case "ascii":
1018
- return Ee(this, e, t);
1019
- case "latin1":
1020
- case "binary":
1021
- return fe(this, e, t);
1022
- case "base64":
1023
- return ke(this, e, t);
1024
- case "ucs2":
1025
- case "ucs-2":
1026
- case "utf16le":
1027
- case "utf-16le":
1028
- return Te(this, e, t);
1029
- default:
1030
- if (s)
1031
- throw new TypeError("Unknown encoding: " + r);
1032
- r = (r + "").toLowerCase(), s = !0;
1033
- }
1034
- }
1035
- o.prototype._isBuffer = !0;
1036
- function D(r, e, t) {
1037
- const s = r[e];
1038
- r[e] = r[t], r[t] = s;
1039
- }
1040
- o.prototype.swap16 = function() {
1041
- const e = this.length;
1042
- if (e % 2 !== 0)
1043
- throw new RangeError("Buffer size must be a multiple of 16-bits");
1044
- for (let t = 0; t < e; t += 2)
1045
- D(this, t, t + 1);
1046
- return this;
1047
- }, o.prototype.swap32 = function() {
1048
- const e = this.length;
1049
- if (e % 4 !== 0)
1050
- throw new RangeError("Buffer size must be a multiple of 32-bits");
1051
- for (let t = 0; t < e; t += 4)
1052
- D(this, t, t + 3), D(this, t + 1, t + 2);
1053
- return this;
1054
- }, o.prototype.swap64 = function() {
1055
- const e = this.length;
1056
- if (e % 8 !== 0)
1057
- throw new RangeError("Buffer size must be a multiple of 64-bits");
1058
- for (let t = 0; t < e; t += 8)
1059
- D(this, t, t + 7), D(this, t + 1, t + 6), D(this, t + 2, t + 5), D(this, t + 3, t + 4);
1060
- return this;
1061
- }, o.prototype.toString = function() {
1062
- const e = this.length;
1063
- return e === 0 ? "" : arguments.length === 0 ? Me(this, 0, e) : b.apply(this, arguments);
1064
- }, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(e) {
1065
- if (!o.isBuffer(e))
1066
- throw new TypeError("Argument must be a Buffer");
1067
- return this === e ? !0 : o.compare(this, e) === 0;
1068
- }, o.prototype.inspect = function() {
1069
- let e = "";
1070
- const t = i.INSPECT_MAX_BYTES;
1071
- return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
1072
- }, c && (o.prototype[c] = o.prototype.inspect), o.prototype.compare = function(e, t, s, l, d) {
1073
- if (H(e, Uint8Array) && (e = o.from(e, e.offset, e.byteLength)), !o.isBuffer(e))
1074
- throw new TypeError(
1075
- 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e
1076
- );
1077
- if (t === void 0 && (t = 0), s === void 0 && (s = e ? e.length : 0), l === void 0 && (l = 0), d === void 0 && (d = this.length), t < 0 || s > e.length || l < 0 || d > this.length)
1078
- throw new RangeError("out of range index");
1079
- if (l >= d && t >= s)
1080
- return 0;
1081
- if (l >= d)
1082
- return -1;
1083
- if (t >= s)
1084
- return 1;
1085
- if (t >>>= 0, s >>>= 0, l >>>= 0, d >>>= 0, this === e)
1086
- return 0;
1087
- let f = d - l, O = s - t;
1088
- const C = Math.min(f, O), B = this.slice(l, d), R = e.slice(t, s);
1089
- for (let L = 0; L < C; ++L)
1090
- if (B[L] !== R[L]) {
1091
- f = B[L], O = R[L];
1092
- break;
1093
- }
1094
- return f < O ? -1 : O < f ? 1 : 0;
1095
- };
1096
- function k(r, e, t, s, l) {
1097
- if (r.length === 0)
1098
- return -1;
1099
- if (typeof t == "string" ? (s = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, je(t) && (t = l ? 0 : r.length - 1), t < 0 && (t = r.length + t), t >= r.length) {
1100
- if (l)
1101
- return -1;
1102
- t = r.length - 1;
1103
- } else if (t < 0)
1104
- if (l)
1105
- t = 0;
1106
- else
1107
- return -1;
1108
- if (typeof e == "string" && (e = o.from(e, s)), o.isBuffer(e))
1109
- return e.length === 0 ? -1 : j(r, e, t, s, l);
1110
- if (typeof e == "number")
1111
- return e = e & 255, typeof Uint8Array.prototype.indexOf == "function" ? l ? Uint8Array.prototype.indexOf.call(r, e, t) : Uint8Array.prototype.lastIndexOf.call(r, e, t) : j(r, [e], t, s, l);
1112
- throw new TypeError("val must be string, number or Buffer");
1113
- }
1114
- function j(r, e, t, s, l) {
1115
- let d = 1, f = r.length, O = e.length;
1116
- if (s !== void 0 && (s = String(s).toLowerCase(), s === "ucs2" || s === "ucs-2" || s === "utf16le" || s === "utf-16le")) {
1117
- if (r.length < 2 || e.length < 2)
1118
- return -1;
1119
- d = 2, f /= 2, O /= 2, t /= 2;
1120
- }
1121
- function C(R, L) {
1122
- return d === 1 ? R[L] : R.readUInt16BE(L * d);
1123
- }
1124
- let B;
1125
- if (l) {
1126
- let R = -1;
1127
- for (B = t; B < f; B++)
1128
- if (C(r, B) === C(e, R === -1 ? 0 : B - R)) {
1129
- if (R === -1 && (R = B), B - R + 1 === O)
1130
- return R * d;
1131
- } else
1132
- R !== -1 && (B -= B - R), R = -1;
1133
- } else
1134
- for (t + O > f && (t = f - O), B = t; B >= 0; B--) {
1135
- let R = !0;
1136
- for (let L = 0; L < O; L++)
1137
- if (C(r, B + L) !== C(e, L)) {
1138
- R = !1;
1139
- break;
1140
- }
1141
- if (R)
1142
- return B;
1143
- }
1144
- return -1;
1145
- }
1146
- o.prototype.includes = function(e, t, s) {
1147
- return this.indexOf(e, t, s) !== -1;
1148
- }, o.prototype.indexOf = function(e, t, s) {
1149
- return k(this, e, t, s, !0);
1150
- }, o.prototype.lastIndexOf = function(e, t, s) {
1151
- return k(this, e, t, s, !1);
1152
- };
1153
- function W(r, e, t, s) {
1154
- t = Number(t) || 0;
1155
- const l = r.length - t;
1156
- s ? (s = Number(s), s > l && (s = l)) : s = l;
1157
- const d = e.length;
1158
- s > d / 2 && (s = d / 2);
1159
- let f;
1160
- for (f = 0; f < s; ++f) {
1161
- const O = parseInt(e.substr(f * 2, 2), 16);
1162
- if (je(O))
1163
- return f;
1164
- r[t + f] = O;
1165
- }
1166
- return f;
1167
- }
1168
- function V(r, e, t, s) {
1169
- return ve(Ue(e, r.length - t), r, t, s);
1170
- }
1171
- function ne(r, e, t, s) {
1172
- return ve(Qt(e), r, t, s);
1173
- }
1174
- function se(r, e, t, s) {
1175
- return ve(st(e), r, t, s);
1176
- }
1177
- function Le(r, e, t, s) {
1178
- return ve(Pt(e, r.length - t), r, t, s);
1179
- }
1180
- o.prototype.write = function(e, t, s, l) {
1181
- if (t === void 0)
1182
- l = "utf8", s = this.length, t = 0;
1183
- else if (s === void 0 && typeof t == "string")
1184
- l = t, s = this.length, t = 0;
1185
- else if (isFinite(t))
1186
- t = t >>> 0, isFinite(s) ? (s = s >>> 0, l === void 0 && (l = "utf8")) : (l = s, s = void 0);
1187
- else
1188
- throw new Error(
1189
- "Buffer.write(string, encoding, offset[, length]) is no longer supported"
1190
- );
1191
- const d = this.length - t;
1192
- if ((s === void 0 || s > d) && (s = d), e.length > 0 && (s < 0 || t < 0) || t > this.length)
1193
- throw new RangeError("Attempt to write outside buffer bounds");
1194
- l || (l = "utf8");
1195
- let f = !1;
1196
- for (; ; )
1197
- switch (l) {
1198
- case "hex":
1199
- return W(this, e, t, s);
1200
- case "utf8":
1201
- case "utf-8":
1202
- return V(this, e, t, s);
1203
- case "ascii":
1204
- case "latin1":
1205
- case "binary":
1206
- return ne(this, e, t, s);
1207
- case "base64":
1208
- return se(this, e, t, s);
1209
- case "ucs2":
1210
- case "ucs-2":
1211
- case "utf16le":
1212
- case "utf-16le":
1213
- return Le(this, e, t, s);
1214
- default:
1215
- if (f)
1216
- throw new TypeError("Unknown encoding: " + l);
1217
- l = ("" + l).toLowerCase(), f = !0;
1218
- }
1219
- }, o.prototype.toJSON = function() {
1220
- return {
1221
- type: "Buffer",
1222
- data: Array.prototype.slice.call(this._arr || this, 0)
1223
- };
1224
- };
1225
- function ke(r, e, t) {
1226
- return e === 0 && t === r.length ? n.fromByteArray(r) : n.fromByteArray(r.slice(e, t));
1227
- }
1228
- function Me(r, e, t) {
1229
- t = Math.min(r.length, t);
1230
- const s = [];
1231
- let l = e;
1232
- for (; l < t; ) {
1233
- const d = r[l];
1234
- let f = null, O = d > 239 ? 4 : d > 223 ? 3 : d > 191 ? 2 : 1;
1235
- if (l + O <= t) {
1236
- let C, B, R, L;
1237
- switch (O) {
1238
- case 1:
1239
- d < 128 && (f = d);
1240
- break;
1241
- case 2:
1242
- C = r[l + 1], (C & 192) === 128 && (L = (d & 31) << 6 | C & 63, L > 127 && (f = L));
1243
- break;
1244
- case 3:
1245
- C = r[l + 1], B = r[l + 2], (C & 192) === 128 && (B & 192) === 128 && (L = (d & 15) << 12 | (C & 63) << 6 | B & 63, L > 2047 && (L < 55296 || L > 57343) && (f = L));
1246
- break;
1247
- case 4:
1248
- C = r[l + 1], B = r[l + 2], R = r[l + 3], (C & 192) === 128 && (B & 192) === 128 && (R & 192) === 128 && (L = (d & 15) << 18 | (C & 63) << 12 | (B & 63) << 6 | R & 63, L > 65535 && L < 1114112 && (f = L));
1249
- }
1250
- }
1251
- f === null ? (f = 65533, O = 1) : f > 65535 && (f -= 65536, s.push(f >>> 10 & 1023 | 55296), f = 56320 | f & 1023), s.push(f), l += O;
1252
- }
1253
- return Be(s);
1254
- }
1255
- const Ae = 4096;
1256
- function Be(r) {
1257
- const e = r.length;
1258
- if (e <= Ae)
1259
- return String.fromCharCode.apply(String, r);
1260
- let t = "", s = 0;
1261
- for (; s < e; )
1262
- t += String.fromCharCode.apply(
1263
- String,
1264
- r.slice(s, s += Ae)
1265
- );
1266
- return t;
1267
- }
1268
- function Ee(r, e, t) {
1269
- let s = "";
1270
- t = Math.min(r.length, t);
1271
- for (let l = e; l < t; ++l)
1272
- s += String.fromCharCode(r[l] & 127);
1273
- return s;
1274
- }
1275
- function fe(r, e, t) {
1276
- let s = "";
1277
- t = Math.min(r.length, t);
1278
- for (let l = e; l < t; ++l)
1279
- s += String.fromCharCode(r[l]);
1280
- return s;
1281
- }
1282
- function Ce(r, e, t) {
1283
- const s = r.length;
1284
- (!e || e < 0) && (e = 0), (!t || t < 0 || t > s) && (t = s);
1285
- let l = "";
1286
- for (let d = e; d < t; ++d)
1287
- l += qt[r[d]];
1288
- return l;
1289
- }
1290
- function Te(r, e, t) {
1291
- const s = r.slice(e, t);
1292
- let l = "";
1293
- for (let d = 0; d < s.length - 1; d += 2)
1294
- l += String.fromCharCode(s[d] + s[d + 1] * 256);
1295
- return l;
1296
- }
1297
- o.prototype.slice = function(e, t) {
1298
- const s = this.length;
1299
- e = ~~e, t = t === void 0 ? s : ~~t, e < 0 ? (e += s, e < 0 && (e = 0)) : e > s && (e = s), t < 0 ? (t += s, t < 0 && (t = 0)) : t > s && (t = s), t < e && (t = e);
1300
- const l = this.subarray(e, t);
1301
- return Object.setPrototypeOf(l, o.prototype), l;
1302
- };
1303
- function F(r, e, t) {
1304
- if (r % 1 !== 0 || r < 0)
1305
- throw new RangeError("offset is not uint");
1306
- if (r + e > t)
1307
- throw new RangeError("Trying to access beyond buffer length");
1308
- }
1309
- o.prototype.readUintLE = o.prototype.readUIntLE = function(e, t, s) {
1310
- e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
1311
- let l = this[e], d = 1, f = 0;
1312
- for (; ++f < t && (d *= 256); )
1313
- l += this[e + f] * d;
1314
- return l;
1315
- }, o.prototype.readUintBE = o.prototype.readUIntBE = function(e, t, s) {
1316
- e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
1317
- let l = this[e + --t], d = 1;
1318
- for (; t > 0 && (d *= 256); )
1319
- l += this[e + --t] * d;
1320
- return l;
1321
- }, o.prototype.readUint8 = o.prototype.readUInt8 = function(e, t) {
1322
- return e = e >>> 0, t || F(e, 1, this.length), this[e];
1323
- }, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(e, t) {
1324
- return e = e >>> 0, t || F(e, 2, this.length), this[e] | this[e + 1] << 8;
1325
- }, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(e, t) {
1326
- return e = e >>> 0, t || F(e, 2, this.length), this[e] << 8 | this[e + 1];
1327
- }, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(e, t) {
1328
- return e = e >>> 0, t || F(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
1329
- }, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(e, t) {
1330
- return e = e >>> 0, t || F(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
1331
- }, o.prototype.readBigUInt64LE = te(function(e) {
1332
- e = e >>> 0, ae(e, "offset");
1333
- const t = this[e], s = this[e + 7];
1334
- (t === void 0 || s === void 0) && Ie(e, this.length - 8);
1335
- const l = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, d = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + s * 2 ** 24;
1336
- return BigInt(l) + (BigInt(d) << BigInt(32));
1337
- }), o.prototype.readBigUInt64BE = te(function(e) {
1338
- e = e >>> 0, ae(e, "offset");
1339
- const t = this[e], s = this[e + 7];
1340
- (t === void 0 || s === void 0) && Ie(e, this.length - 8);
1341
- const l = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], d = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + s;
1342
- return (BigInt(l) << BigInt(32)) + BigInt(d);
1343
- }), o.prototype.readIntLE = function(e, t, s) {
1344
- e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
1345
- let l = this[e], d = 1, f = 0;
1346
- for (; ++f < t && (d *= 256); )
1347
- l += this[e + f] * d;
1348
- return d *= 128, l >= d && (l -= Math.pow(2, 8 * t)), l;
1349
- }, o.prototype.readIntBE = function(e, t, s) {
1350
- e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
1351
- let l = t, d = 1, f = this[e + --l];
1352
- for (; l > 0 && (d *= 256); )
1353
- f += this[e + --l] * d;
1354
- return d *= 128, f >= d && (f -= Math.pow(2, 8 * t)), f;
1355
- }, o.prototype.readInt8 = function(e, t) {
1356
- return e = e >>> 0, t || F(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
1357
- }, o.prototype.readInt16LE = function(e, t) {
1358
- e = e >>> 0, t || F(e, 2, this.length);
1359
- const s = this[e] | this[e + 1] << 8;
1360
- return s & 32768 ? s | 4294901760 : s;
1361
- }, o.prototype.readInt16BE = function(e, t) {
1362
- e = e >>> 0, t || F(e, 2, this.length);
1363
- const s = this[e + 1] | this[e] << 8;
1364
- return s & 32768 ? s | 4294901760 : s;
1365
- }, o.prototype.readInt32LE = function(e, t) {
1366
- return e = e >>> 0, t || F(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
1367
- }, o.prototype.readInt32BE = function(e, t) {
1368
- return e = e >>> 0, t || F(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
1369
- }, o.prototype.readBigInt64LE = te(function(e) {
1370
- e = e >>> 0, ae(e, "offset");
1371
- const t = this[e], s = this[e + 7];
1372
- (t === void 0 || s === void 0) && Ie(e, this.length - 8);
1373
- const l = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (s << 24);
1374
- return (BigInt(l) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
1375
- }), o.prototype.readBigInt64BE = te(function(e) {
1376
- e = e >>> 0, ae(e, "offset");
1377
- const t = this[e], s = this[e + 7];
1378
- (t === void 0 || s === void 0) && Ie(e, this.length - 8);
1379
- const l = (t << 24) + // Overflow
1380
- this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
1381
- return (BigInt(l) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + s);
1382
- }), o.prototype.readFloatLE = function(e, t) {
1383
- return e = e >>> 0, t || F(e, 4, this.length), a.read(this, e, !0, 23, 4);
1384
- }, o.prototype.readFloatBE = function(e, t) {
1385
- return e = e >>> 0, t || F(e, 4, this.length), a.read(this, e, !1, 23, 4);
1386
- }, o.prototype.readDoubleLE = function(e, t) {
1387
- return e = e >>> 0, t || F(e, 8, this.length), a.read(this, e, !0, 52, 8);
1388
- }, o.prototype.readDoubleBE = function(e, t) {
1389
- return e = e >>> 0, t || F(e, 8, this.length), a.read(this, e, !1, 52, 8);
1390
- };
1391
- function $(r, e, t, s, l, d) {
1392
- if (!o.isBuffer(r))
1393
- throw new TypeError('"buffer" argument must be a Buffer instance');
1394
- if (e > l || e < d)
1395
- throw new RangeError('"value" argument is out of bounds');
1396
- if (t + s > r.length)
1397
- throw new RangeError("Index out of range");
1398
- }
1399
- o.prototype.writeUintLE = o.prototype.writeUIntLE = function(e, t, s, l) {
1400
- if (e = +e, t = t >>> 0, s = s >>> 0, !l) {
1401
- const O = Math.pow(2, 8 * s) - 1;
1402
- $(this, e, t, s, O, 0);
1403
- }
1404
- let d = 1, f = 0;
1405
- for (this[t] = e & 255; ++f < s && (d *= 256); )
1406
- this[t + f] = e / d & 255;
1407
- return t + s;
1408
- }, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(e, t, s, l) {
1409
- if (e = +e, t = t >>> 0, s = s >>> 0, !l) {
1410
- const O = Math.pow(2, 8 * s) - 1;
1411
- $(this, e, t, s, O, 0);
1412
- }
1413
- let d = s - 1, f = 1;
1414
- for (this[t + d] = e & 255; --d >= 0 && (f *= 256); )
1415
- this[t + d] = e / f & 255;
1416
- return t + s;
1417
- }, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(e, t, s) {
1418
- return e = +e, t = t >>> 0, s || $(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
1419
- }, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(e, t, s) {
1420
- return e = +e, t = t >>> 0, s || $(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
1421
- }, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(e, t, s) {
1422
- return e = +e, t = t >>> 0, s || $(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
1423
- }, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(e, t, s) {
1424
- return e = +e, t = t >>> 0, s || $(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
1425
- }, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(e, t, s) {
1426
- return e = +e, t = t >>> 0, s || $(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
1427
- };
1428
- function me(r, e, t, s, l) {
1429
- nt(e, s, l, r, t, 7);
1430
- let d = Number(e & BigInt(4294967295));
1431
- r[t++] = d, d = d >> 8, r[t++] = d, d = d >> 8, r[t++] = d, d = d >> 8, r[t++] = d;
1432
- let f = Number(e >> BigInt(32) & BigInt(4294967295));
1433
- return r[t++] = f, f = f >> 8, r[t++] = f, f = f >> 8, r[t++] = f, f = f >> 8, r[t++] = f, t;
1434
- }
1435
- function ee(r, e, t, s, l) {
1436
- nt(e, s, l, r, t, 7);
1437
- let d = Number(e & BigInt(4294967295));
1438
- r[t + 7] = d, d = d >> 8, r[t + 6] = d, d = d >> 8, r[t + 5] = d, d = d >> 8, r[t + 4] = d;
1439
- let f = Number(e >> BigInt(32) & BigInt(4294967295));
1440
- return r[t + 3] = f, f = f >> 8, r[t + 2] = f, f = f >> 8, r[t + 1] = f, f = f >> 8, r[t] = f, t + 8;
1441
- }
1442
- o.prototype.writeBigUInt64LE = te(function(e, t = 0) {
1443
- return me(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
1444
- }), o.prototype.writeBigUInt64BE = te(function(e, t = 0) {
1445
- return ee(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
1446
- }), o.prototype.writeIntLE = function(e, t, s, l) {
1447
- if (e = +e, t = t >>> 0, !l) {
1448
- const C = Math.pow(2, 8 * s - 1);
1449
- $(this, e, t, s, C - 1, -C);
1450
- }
1451
- let d = 0, f = 1, O = 0;
1452
- for (this[t] = e & 255; ++d < s && (f *= 256); )
1453
- e < 0 && O === 0 && this[t + d - 1] !== 0 && (O = 1), this[t + d] = (e / f >> 0) - O & 255;
1454
- return t + s;
1455
- }, o.prototype.writeIntBE = function(e, t, s, l) {
1456
- if (e = +e, t = t >>> 0, !l) {
1457
- const C = Math.pow(2, 8 * s - 1);
1458
- $(this, e, t, s, C - 1, -C);
1459
- }
1460
- let d = s - 1, f = 1, O = 0;
1461
- for (this[t + d] = e & 255; --d >= 0 && (f *= 256); )
1462
- e < 0 && O === 0 && this[t + d + 1] !== 0 && (O = 1), this[t + d] = (e / f >> 0) - O & 255;
1463
- return t + s;
1464
- }, o.prototype.writeInt8 = function(e, t, s) {
1465
- return e = +e, t = t >>> 0, s || $(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
1466
- }, o.prototype.writeInt16LE = function(e, t, s) {
1467
- return e = +e, t = t >>> 0, s || $(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
1468
- }, o.prototype.writeInt16BE = function(e, t, s) {
1469
- return e = +e, t = t >>> 0, s || $(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
1470
- }, o.prototype.writeInt32LE = function(e, t, s) {
1471
- return e = +e, t = t >>> 0, s || $(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
1472
- }, o.prototype.writeInt32BE = function(e, t, s) {
1473
- return e = +e, t = t >>> 0, s || $(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
1474
- }, o.prototype.writeBigInt64LE = te(function(e, t = 0) {
1475
- return me(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1476
- }), o.prototype.writeBigInt64BE = te(function(e, t = 0) {
1477
- return ee(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1478
- });
1479
- function ge(r, e, t, s, l, d) {
1480
- if (t + s > r.length)
1481
- throw new RangeError("Index out of range");
1482
- if (t < 0)
1483
- throw new RangeError("Index out of range");
1484
- }
1485
- function tt(r, e, t, s, l) {
1486
- return e = +e, t = t >>> 0, l || ge(r, e, t, 4), a.write(r, e, t, s, 23, 4), t + 4;
1487
- }
1488
- o.prototype.writeFloatLE = function(e, t, s) {
1489
- return tt(this, e, t, !0, s);
1490
- }, o.prototype.writeFloatBE = function(e, t, s) {
1491
- return tt(this, e, t, !1, s);
1492
- };
1493
- function rt(r, e, t, s, l) {
1494
- return e = +e, t = t >>> 0, l || ge(r, e, t, 8), a.write(r, e, t, s, 52, 8), t + 8;
1495
- }
1496
- o.prototype.writeDoubleLE = function(e, t, s) {
1497
- return rt(this, e, t, !0, s);
1498
- }, o.prototype.writeDoubleBE = function(e, t, s) {
1499
- return rt(this, e, t, !1, s);
1500
- }, o.prototype.copy = function(e, t, s, l) {
1501
- if (!o.isBuffer(e))
1502
- throw new TypeError("argument should be a Buffer");
1503
- if (s || (s = 0), !l && l !== 0 && (l = this.length), t >= e.length && (t = e.length), t || (t = 0), l > 0 && l < s && (l = s), l === s || e.length === 0 || this.length === 0)
1504
- return 0;
1505
- if (t < 0)
1506
- throw new RangeError("targetStart out of bounds");
1507
- if (s < 0 || s >= this.length)
1508
- throw new RangeError("Index out of range");
1509
- if (l < 0)
1510
- throw new RangeError("sourceEnd out of bounds");
1511
- l > this.length && (l = this.length), e.length - t < l - s && (l = e.length - t + s);
1512
- const d = l - s;
1513
- return this === e && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(t, s, l) : Uint8Array.prototype.set.call(
1514
- e,
1515
- this.subarray(s, l),
1516
- t
1517
- ), d;
1518
- }, o.prototype.fill = function(e, t, s, l) {
1519
- if (typeof e == "string") {
1520
- if (typeof t == "string" ? (l = t, t = 0, s = this.length) : typeof s == "string" && (l = s, s = this.length), l !== void 0 && typeof l != "string")
1521
- throw new TypeError("encoding must be a string");
1522
- if (typeof l == "string" && !o.isEncoding(l))
1523
- throw new TypeError("Unknown encoding: " + l);
1524
- if (e.length === 1) {
1525
- const f = e.charCodeAt(0);
1526
- (l === "utf8" && f < 128 || l === "latin1") && (e = f);
1527
- }
1528
- } else
1529
- typeof e == "number" ? e = e & 255 : typeof e == "boolean" && (e = Number(e));
1530
- if (t < 0 || this.length < t || this.length < s)
1531
- throw new RangeError("Out of range index");
1532
- if (s <= t)
1533
- return this;
1534
- t = t >>> 0, s = s === void 0 ? this.length : s >>> 0, e || (e = 0);
1535
- let d;
1536
- if (typeof e == "number")
1537
- for (d = t; d < s; ++d)
1538
- this[d] = e;
1539
- else {
1540
- const f = o.isBuffer(e) ? e : o.from(e, l), O = f.length;
1541
- if (O === 0)
1542
- throw new TypeError('The value "' + e + '" is invalid for argument "value"');
1543
- for (d = 0; d < s - t; ++d)
1544
- this[d + t] = f[d % O];
1545
- }
1546
- return this;
1547
- };
1548
- const oe = {};
1549
- function Re(r, e, t) {
1550
- oe[r] = class extends t {
1551
- constructor() {
1552
- super(), Object.defineProperty(this, "message", {
1553
- value: e.apply(this, arguments),
1554
- writable: !0,
1555
- configurable: !0
1556
- }), this.name = `${this.name} [${r}]`, this.stack, delete this.name;
1557
- }
1558
- get code() {
1559
- return r;
1560
- }
1561
- set code(l) {
1562
- Object.defineProperty(this, "code", {
1563
- configurable: !0,
1564
- enumerable: !0,
1565
- value: l,
1566
- writable: !0
1567
- });
1568
- }
1569
- toString() {
1570
- return `${this.name} [${r}]: ${this.message}`;
1571
- }
1572
- };
1573
- }
1574
- Re(
1575
- "ERR_BUFFER_OUT_OF_BOUNDS",
1576
- function(r) {
1577
- return r ? `${r} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
1578
- },
1579
- RangeError
1580
- ), Re(
1581
- "ERR_INVALID_ARG_TYPE",
1582
- function(r, e) {
1583
- return `The "${r}" argument must be of type number. Received type ${typeof e}`;
1584
- },
1585
- TypeError
1586
- ), Re(
1587
- "ERR_OUT_OF_RANGE",
1588
- function(r, e, t) {
1589
- let s = `The value of "${r}" is out of range.`, l = t;
1590
- return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? l = it(String(t)) : typeof t == "bigint" && (l = String(t), (t > BigInt(2) ** BigInt(32) || t < -(BigInt(2) ** BigInt(32))) && (l = it(l)), l += "n"), s += ` It must be ${e}. Received ${l}`, s;
1591
- },
1592
- RangeError
1593
- );
1594
- function it(r) {
1595
- let e = "", t = r.length;
1596
- const s = r[0] === "-" ? 1 : 0;
1597
- for (; t >= s + 4; t -= 3)
1598
- e = `_${r.slice(t - 3, t)}${e}`;
1599
- return `${r.slice(0, t)}${e}`;
1600
- }
1601
- function jt(r, e, t) {
1602
- ae(e, "offset"), (r[e] === void 0 || r[e + t] === void 0) && Ie(e, r.length - (t + 1));
1603
- }
1604
- function nt(r, e, t, s, l, d) {
1605
- if (r > t || r < e) {
1606
- const f = typeof e == "bigint" ? "n" : "";
1607
- let O;
1608
- throw d > 3 ? e === 0 || e === BigInt(0) ? O = `>= 0${f} and < 2${f} ** ${(d + 1) * 8}${f}` : O = `>= -(2${f} ** ${(d + 1) * 8 - 1}${f}) and < 2 ** ${(d + 1) * 8 - 1}${f}` : O = `>= ${e}${f} and <= ${t}${f}`, new oe.ERR_OUT_OF_RANGE("value", O, r);
1609
- }
1610
- jt(s, l, d);
1611
- }
1612
- function ae(r, e) {
1613
- if (typeof r != "number")
1614
- throw new oe.ERR_INVALID_ARG_TYPE(e, "number", r);
1615
- }
1616
- function Ie(r, e, t) {
1617
- throw Math.floor(r) !== r ? (ae(r, t), new oe.ERR_OUT_OF_RANGE(t || "offset", "an integer", r)) : e < 0 ? new oe.ERR_BUFFER_OUT_OF_BOUNDS() : new oe.ERR_OUT_OF_RANGE(
1618
- t || "offset",
1619
- `>= ${t ? 1 : 0} and <= ${e}`,
1620
- r
1621
- );
1622
- }
1623
- const Ft = /[^+/0-9A-Za-z-_]/g;
1624
- function $t(r) {
1625
- if (r = r.split("=")[0], r = r.trim().replace(Ft, ""), r.length < 2)
1626
- return "";
1627
- for (; r.length % 4 !== 0; )
1628
- r = r + "=";
1629
- return r;
1630
- }
1631
- function Ue(r, e) {
1632
- e = e || 1 / 0;
1633
- let t;
1634
- const s = r.length;
1635
- let l = null;
1636
- const d = [];
1637
- for (let f = 0; f < s; ++f) {
1638
- if (t = r.charCodeAt(f), t > 55295 && t < 57344) {
1639
- if (!l) {
1640
- if (t > 56319) {
1641
- (e -= 3) > -1 && d.push(239, 191, 189);
1642
- continue;
1643
- } else if (f + 1 === s) {
1644
- (e -= 3) > -1 && d.push(239, 191, 189);
1645
- continue;
1646
- }
1647
- l = t;
1648
- continue;
1649
- }
1650
- if (t < 56320) {
1651
- (e -= 3) > -1 && d.push(239, 191, 189), l = t;
1652
- continue;
1653
- }
1654
- t = (l - 55296 << 10 | t - 56320) + 65536;
1655
- } else
1656
- l && (e -= 3) > -1 && d.push(239, 191, 189);
1657
- if (l = null, t < 128) {
1658
- if ((e -= 1) < 0)
1659
- break;
1660
- d.push(t);
1661
- } else if (t < 2048) {
1662
- if ((e -= 2) < 0)
1663
- break;
1664
- d.push(
1665
- t >> 6 | 192,
1666
- t & 63 | 128
1667
- );
1668
- } else if (t < 65536) {
1669
- if ((e -= 3) < 0)
1670
- break;
1671
- d.push(
1672
- t >> 12 | 224,
1673
- t >> 6 & 63 | 128,
1674
- t & 63 | 128
1675
- );
1676
- } else if (t < 1114112) {
1677
- if ((e -= 4) < 0)
1678
- break;
1679
- d.push(
1680
- t >> 18 | 240,
1681
- t >> 12 & 63 | 128,
1682
- t >> 6 & 63 | 128,
1683
- t & 63 | 128
1684
- );
1685
- } else
1686
- throw new Error("Invalid code point");
1687
- }
1688
- return d;
1689
- }
1690
- function Qt(r) {
1691
- const e = [];
1692
- for (let t = 0; t < r.length; ++t)
1693
- e.push(r.charCodeAt(t) & 255);
1694
- return e;
1695
- }
1696
- function Pt(r, e) {
1697
- let t, s, l;
1698
- const d = [];
1699
- for (let f = 0; f < r.length && !((e -= 2) < 0); ++f)
1700
- t = r.charCodeAt(f), s = t >> 8, l = t % 256, d.push(l), d.push(s);
1701
- return d;
1702
- }
1703
- function st(r) {
1704
- return n.toByteArray($t(r));
1705
- }
1706
- function ve(r, e, t, s) {
1707
- let l;
1708
- for (l = 0; l < s && !(l + t >= e.length || l >= r.length); ++l)
1709
- e[l + t] = r[l];
1710
- return l;
1711
- }
1712
- function H(r, e) {
1713
- return r instanceof e || r != null && r.constructor != null && r.constructor.name != null && r.constructor.name === e.name;
1714
- }
1715
- function je(r) {
1716
- return r !== r;
1717
- }
1718
- const qt = function() {
1719
- const r = "0123456789abcdef", e = new Array(256);
1720
- for (let t = 0; t < 16; ++t) {
1721
- const s = t * 16;
1722
- for (let l = 0; l < 16; ++l)
1723
- e[s + l] = r[t] + r[l];
1724
- }
1725
- return e;
1726
- }();
1727
- function te(r) {
1728
- return typeof BigInt > "u" ? Yt : r;
1729
- }
1730
- function Yt() {
1731
- throw new Error("BigInt not supported");
1732
- }
1733
- })(Lt);
1734
- var Bt = { exports: {} }, U = Bt.exports = {}, G, Z;
1735
- function He() {
1736
- throw new Error("setTimeout has not been defined");
1737
- }
1738
- function Ge() {
1739
- throw new Error("clearTimeout has not been defined");
1740
- }
1741
- (function() {
1742
- try {
1743
- typeof setTimeout == "function" ? G = setTimeout : G = He;
1744
- } catch {
1745
- G = He;
1746
- }
1747
- try {
1748
- typeof clearTimeout == "function" ? Z = clearTimeout : Z = Ge;
1749
- } catch {
1750
- Z = Ge;
1751
- }
1752
- })();
1753
- function Ct(i) {
1754
- if (G === setTimeout)
1755
- return setTimeout(i, 0);
1756
- if ((G === He || !G) && setTimeout)
1757
- return G = setTimeout, setTimeout(i, 0);
1758
- try {
1759
- return G(i, 0);
1760
- } catch {
1761
- try {
1762
- return G.call(null, i, 0);
1763
- } catch {
1764
- return G.call(this, i, 0);
1765
- }
1766
- }
1767
- }
1768
- function Zi(i) {
1769
- if (Z === clearTimeout)
1770
- return clearTimeout(i);
1771
- if ((Z === Ge || !Z) && clearTimeout)
1772
- return Z = clearTimeout, clearTimeout(i);
1773
- try {
1774
- return Z(i);
1775
- } catch {
1776
- try {
1777
- return Z.call(null, i);
1778
- } catch {
1779
- return Z.call(this, i);
1780
- }
1781
- }
1782
- }
1783
- var K = [], pe = !1, ie, De = -1;
1784
- function Ji() {
1785
- !pe || !ie || (pe = !1, ie.length ? K = ie.concat(K) : De = -1, K.length && Rt());
1786
- }
1787
- function Rt() {
1788
- if (!pe) {
1789
- var i = Ct(Ji);
1790
- pe = !0;
1791
- for (var n = K.length; n; ) {
1792
- for (ie = K, K = []; ++De < n; )
1793
- ie && ie[De].run();
1794
- De = -1, n = K.length;
1795
- }
1796
- ie = null, pe = !1, Zi(i);
1797
- }
1798
- }
1799
- U.nextTick = function(i) {
1800
- var n = new Array(arguments.length - 1);
1801
- if (arguments.length > 1)
1802
- for (var a = 1; a < arguments.length; a++)
1803
- n[a - 1] = arguments[a];
1804
- K.push(new Ut(i, n)), K.length === 1 && !pe && Ct(Rt);
1805
- };
1806
- function Ut(i, n) {
1807
- this.fun = i, this.array = n;
1808
- }
1809
- Ut.prototype.run = function() {
1810
- this.fun.apply(null, this.array);
1811
- };
1812
- U.title = "browser";
1813
- U.browser = !0;
1814
- U.env = {};
1815
- U.argv = [];
1816
- U.version = "";
1817
- U.versions = {};
1818
- function X() {
1819
- }
1820
- U.on = X;
1821
- U.addListener = X;
1822
- U.once = X;
1823
- U.off = X;
1824
- U.removeListener = X;
1825
- U.removeAllListeners = X;
1826
- U.emit = X;
1827
- U.prependListener = X;
1828
- U.prependOnceListener = X;
1829
- U.listeners = function(i) {
1830
- return [];
1831
- };
1832
- U.binding = function(i) {
1833
- throw new Error("process.binding is not supported");
1834
- };
1835
- U.cwd = function() {
1836
- return "/";
1837
- };
1838
- U.chdir = function(i) {
1839
- throw new Error("process.chdir is not supported");
1840
- };
1841
- U.umask = function() {
1842
- return 0;
1843
- };
1844
- var Ki = Bt.exports;
1845
- (function(i) {
1846
- Object.defineProperty(i, Symbol.toStringTag, { value: "Module" });
1847
- const n = Lt, a = Ki, c = (m) => m && m.__esModule ? m : { default: m }, u = c(a), I = globalThis || void 0 || self;
1848
- Object.defineProperty(i, "Buffer", { enumerable: !0, get: () => n.Buffer }), Object.defineProperty(i, "process", { enumerable: !0, get: () => u.default }), i.global = I;
1849
- })(Ot);
1850
- let Y;
1851
- typeof window < "u" ? Y = window : typeof self < "u" ? Y = self : Y = Ot.global;
1852
- let Ze = null, Je = null;
1853
- const ht = 20, Qe = Y.clearTimeout, pt = Y.setTimeout, Pe = Y.cancelAnimationFrame || Y.mozCancelAnimationFrame || Y.webkitCancelAnimationFrame, ft = Y.requestAnimationFrame || Y.mozRequestAnimationFrame || Y.webkitRequestAnimationFrame;
1854
- Pe == null || ft == null ? (Ze = Qe, Je = function(n) {
1855
- return pt(n, ht);
1856
- }) : (Ze = function([n, a]) {
1857
- Pe(n), Qe(a);
1858
- }, Je = function(n) {
1859
- const a = ft(function() {
1860
- Qe(c), n();
1861
- }), c = pt(function() {
1862
- Pe(a), n();
1863
- }, ht);
1864
- return [a, c];
1865
- });
1866
- function Xi(i) {
1867
- let n, a, c, u, I, m, o;
1868
- const y = typeof document < "u" && document.attachEvent;
1869
- if (!y) {
1870
- m = function(x) {
1871
- const A = x.__resizeTriggers__, z = A.firstElementChild, b = A.lastElementChild, D = z.firstElementChild;
1872
- b.scrollLeft = b.scrollWidth, b.scrollTop = b.scrollHeight, D.style.width = z.offsetWidth + 1 + "px", D.style.height = z.offsetHeight + 1 + "px", z.scrollLeft = z.scrollWidth, z.scrollTop = z.scrollHeight;
1873
- }, I = function(x) {
1874
- return x.offsetWidth !== x.__resizeLast__.width || x.offsetHeight !== x.__resizeLast__.height;
1875
- }, o = function(x) {
1876
- if (x.target.className && typeof x.target.className.indexOf == "function" && x.target.className.indexOf("contract-trigger") < 0 && x.target.className.indexOf("expand-trigger") < 0)
1877
- return;
1878
- const A = this;
1879
- m(this), this.__resizeRAF__ && Ze(this.__resizeRAF__), this.__resizeRAF__ = Je(function() {
1880
- I(A) && (A.__resizeLast__.width = A.offsetWidth, A.__resizeLast__.height = A.offsetHeight, A.__resizeListeners__.forEach(function(D) {
1881
- D.call(A, x);
1882
- }));
1883
- });
1884
- };
1885
- let w = !1, T = "";
1886
- c = "animationstart";
1887
- const _ = "Webkit Moz O ms".split(" ");
1888
- let p = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), M = "";
1889
- {
1890
- const x = document.createElement("fakeelement");
1891
- if (x.style.animationName !== void 0 && (w = !0), w === !1) {
1892
- for (let A = 0; A < _.length; A++)
1893
- if (x.style[_[A] + "AnimationName"] !== void 0) {
1894
- M = _[A], T = "-" + M.toLowerCase() + "-", c = p[A], w = !0;
1895
- break;
1896
- }
1897
- }
1898
- }
1899
- a = "resizeanim", n = "@" + T + "keyframes " + a + " { from { opacity: 0; } to { opacity: 0; } } ", u = T + "animation: 1ms " + a + "; ";
1900
- }
1901
- const E = function(w) {
1902
- if (!w.getElementById("detectElementResize")) {
1903
- const T = (n || "") + ".resize-triggers { " + (u || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', _ = w.head || w.getElementsByTagName("head")[0], p = w.createElement("style");
1904
- p.id = "detectElementResize", p.type = "text/css", i != null && p.setAttribute("nonce", i), p.styleSheet ? p.styleSheet.cssText = T : p.appendChild(w.createTextNode(T)), _.appendChild(p);
1905
- }
1906
- };
1907
- return {
1908
- addResizeListener: function(w, T) {
1909
- if (y)
1910
- w.attachEvent("onresize", T);
1911
- else {
1912
- if (!w.__resizeTriggers__) {
1913
- const _ = w.ownerDocument, p = Y.getComputedStyle(w);
1914
- p && p.position === "static" && (w.style.position = "relative"), E(_), w.__resizeLast__ = {}, w.__resizeListeners__ = [], (w.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
1915
- const M = _.createElement("div");
1916
- M.className = "expand-trigger", M.appendChild(_.createElement("div"));
1917
- const x = _.createElement("div");
1918
- x.className = "contract-trigger", w.__resizeTriggers__.appendChild(M), w.__resizeTriggers__.appendChild(x), w.appendChild(w.__resizeTriggers__), m(w), w.addEventListener("scroll", o, !0), c && (w.__resizeTriggers__.__animationListener__ = function(z) {
1919
- z.animationName === a && m(w);
1920
- }, w.__resizeTriggers__.addEventListener(c, w.__resizeTriggers__.__animationListener__));
1921
- }
1922
- w.__resizeListeners__.push(T);
1923
- }
1924
- },
1925
- removeResizeListener: function(w, T) {
1926
- if (y)
1927
- w.detachEvent("onresize", T);
1928
- else if (w.__resizeListeners__.splice(w.__resizeListeners__.indexOf(T), 1), !w.__resizeListeners__.length) {
1929
- w.removeEventListener("scroll", o, !0), w.__resizeTriggers__.__animationListener__ && (w.__resizeTriggers__.removeEventListener(c, w.__resizeTriggers__.__animationListener__), w.__resizeTriggers__.__animationListener__ = null);
1930
- try {
1931
- w.__resizeTriggers__ = !w.removeChild(w.__resizeTriggers__);
1932
- } catch {
1933
- }
1934
- }
1935
- }
1936
- };
1937
- }
1938
- class en extends Gt {
1939
- constructor(...n) {
1940
- super(...n), this.state = {
1941
- height: this.props.defaultHeight || 0,
1942
- scaledHeight: this.props.defaultHeight || 0,
1943
- scaledWidth: this.props.defaultWidth || 0,
1944
- width: this.props.defaultWidth || 0
1945
- }, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
1946
- this._timeoutId = null;
1947
- const {
1948
- disableHeight: a,
1949
- disableWidth: c,
1950
- onResize: u
1951
- } = this.props;
1952
- if (this._parentNode) {
1953
- var I, m, o, y;
1954
- const E = window.getComputedStyle(this._parentNode) || {}, N = parseFloat((I = E.paddingLeft) !== null && I !== void 0 ? I : "0"), S = parseFloat((m = E.paddingRight) !== null && m !== void 0 ? m : "0"), w = parseFloat((o = E.paddingTop) !== null && o !== void 0 ? o : "0"), T = parseFloat((y = E.paddingBottom) !== null && y !== void 0 ? y : "0"), _ = this._parentNode.getBoundingClientRect(), p = _.height - w - T, M = _.width - N - S, x = this._parentNode.offsetHeight - w - T, A = this._parentNode.offsetWidth - N - S;
1955
- (!a && (this.state.height !== x || this.state.scaledHeight !== p) || !c && (this.state.width !== A || this.state.scaledWidth !== M)) && (this.setState({
1956
- height: x,
1957
- width: A,
1958
- scaledHeight: p,
1959
- scaledWidth: M
1960
- }), typeof u == "function" && u({
1961
- height: x,
1962
- scaledHeight: p,
1963
- scaledWidth: M,
1964
- width: A
1965
- }));
1966
- }
1967
- }, this._setRef = (a) => {
1968
- this._autoSizer = a;
1969
- };
1970
- }
1971
- componentDidMount() {
1972
- const {
1973
- nonce: n
1974
- } = this.props;
1975
- this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._parentNode != null && (typeof ResizeObserver < "u" ? (this._resizeObserver = new ResizeObserver(() => {
1976
- this._timeoutId = setTimeout(this._onResize, 0);
1977
- }), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize = Xi(n), this._detectElementResize.addResizeListener(this._parentNode, this._onResize)), this._onResize()));
1978
- }
1979
- componentWillUnmount() {
1980
- this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && (this._resizeObserver.observe(this._parentNode), this._resizeObserver.disconnect()));
1981
- }
1982
- render() {
1983
- const {
1984
- children: n,
1985
- defaultHeight: a,
1986
- defaultWidth: c,
1987
- disableHeight: u = !1,
1988
- disableWidth: I = !1,
1989
- nonce: m,
1990
- onResize: o,
1991
- style: y = {},
1992
- tagName: E = "div",
1993
- ...N
1994
- } = this.props, {
1995
- height: S,
1996
- scaledHeight: w,
1997
- scaledWidth: T,
1998
- width: _
1999
- } = this.state, p = {
2000
- overflow: "visible"
2001
- }, M = {};
2002
- let x = !1;
2003
- return u || (S === 0 && (x = !0), p.height = 0, M.height = S, M.scaledHeight = w), I || (_ === 0 && (x = !0), p.width = 0, M.width = _, M.scaledWidth = T), ze(E, {
2004
- ref: this._setRef,
2005
- style: {
2006
- ...p,
2007
- ...y
2008
- },
2009
- ...N
2010
- }, !x && n(M));
2011
- }
2012
- }
2013
- function Ke() {
2014
- return Ke = Object.assign ? Object.assign.bind() : function(i) {
2015
- for (var n = 1; n < arguments.length; n++) {
2016
- var a = arguments[n];
2017
- for (var c in a)
2018
- Object.prototype.hasOwnProperty.call(a, c) && (i[c] = a[c]);
2019
- }
2020
- return i;
2021
- }, Ke.apply(this, arguments);
2022
- }
2023
- function mt(i) {
2024
- if (i === void 0)
2025
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2026
- return i;
2027
- }
2028
- function Xe(i, n) {
2029
- return Xe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(c, u) {
2030
- return c.__proto__ = u, c;
2031
- }, Xe(i, n);
2032
- }
2033
- function tn(i, n) {
2034
- i.prototype = Object.create(n.prototype), i.prototype.constructor = i, Xe(i, n);
2035
- }
2036
- var gt = Number.isNaN || function(n) {
2037
- return typeof n == "number" && n !== n;
2038
- };
2039
- function rn(i, n) {
2040
- return !!(i === n || gt(i) && gt(n));
2041
- }
2042
- function nn(i, n) {
2043
- if (i.length !== n.length)
2044
- return !1;
2045
- for (var a = 0; a < i.length; a++)
2046
- if (!rn(i[a], n[a]))
2047
- return !1;
2048
- return !0;
2049
- }
2050
- function qe(i, n) {
2051
- n === void 0 && (n = nn);
2052
- var a, c = [], u, I = !1;
2053
- function m() {
2054
- for (var o = [], y = 0; y < arguments.length; y++)
2055
- o[y] = arguments[y];
2056
- return I && a === this && n(o, c) || (u = i.apply(this, o), I = !0, a = this, c = o), u;
2057
- }
2058
- return m;
2059
- }
2060
- var sn = typeof performance == "object" && typeof performance.now == "function", It = sn ? function() {
2061
- return performance.now();
2062
- } : function() {
2063
- return Date.now();
2064
- };
2065
- function yt(i) {
2066
- cancelAnimationFrame(i.id);
2067
- }
2068
- function on(i, n) {
2069
- var a = It();
2070
- function c() {
2071
- It() - a >= n ? i.call(null) : u.id = requestAnimationFrame(c);
2072
- }
2073
- var u = {
2074
- id: requestAnimationFrame(c)
2075
- };
2076
- return u;
2077
- }
2078
- var Ye = -1;
2079
- function xt(i) {
2080
- if (i === void 0 && (i = !1), Ye === -1 || i) {
2081
- var n = document.createElement("div"), a = n.style;
2082
- a.width = "50px", a.height = "50px", a.overflow = "scroll", document.body.appendChild(n), Ye = n.offsetWidth - n.clientWidth, document.body.removeChild(n);
2083
- }
2084
- return Ye;
2085
- }
2086
- var ce = null;
2087
- function wt(i) {
2088
- if (i === void 0 && (i = !1), ce === null || i) {
2089
- var n = document.createElement("div"), a = n.style;
2090
- a.width = "50px", a.height = "50px", a.overflow = "scroll", a.direction = "rtl";
2091
- var c = document.createElement("div"), u = c.style;
2092
- return u.width = "100px", u.height = "100px", n.appendChild(c), document.body.appendChild(n), n.scrollLeft > 0 ? ce = "positive-descending" : (n.scrollLeft = 1, n.scrollLeft === 0 ? ce = "negative" : ce = "positive-ascending"), document.body.removeChild(n), ce;
2093
- }
2094
- return ce;
2095
- }
2096
- var an = 150, ln = function(n, a) {
2097
- return n;
2098
- };
2099
- function cn(i) {
2100
- var n, a = i.getItemOffset, c = i.getEstimatedTotalSize, u = i.getItemSize, I = i.getOffsetForIndexAndAlignment, m = i.getStartIndexForOffset, o = i.getStopIndexForStartIndex, y = i.initInstanceProps, E = i.shouldResetStyleCacheOnItemSizeChange, N = i.validateProps;
2101
- return n = /* @__PURE__ */ function(S) {
2102
- tn(w, S);
2103
- function w(_) {
2104
- var p;
2105
- return p = S.call(this, _) || this, p._instanceProps = y(p.props, mt(p)), p._outerRef = void 0, p._resetIsScrollingTimeoutId = null, p.state = {
2106
- instance: mt(p),
2107
- isScrolling: !1,
2108
- scrollDirection: "forward",
2109
- scrollOffset: typeof p.props.initialScrollOffset == "number" ? p.props.initialScrollOffset : 0,
2110
- scrollUpdateWasRequested: !1
2111
- }, p._callOnItemsRendered = void 0, p._callOnItemsRendered = qe(function(M, x, A, z) {
2112
- return p.props.onItemsRendered({
2113
- overscanStartIndex: M,
2114
- overscanStopIndex: x,
2115
- visibleStartIndex: A,
2116
- visibleStopIndex: z
2117
- });
2118
- }), p._callOnScroll = void 0, p._callOnScroll = qe(function(M, x, A) {
2119
- return p.props.onScroll({
2120
- scrollDirection: M,
2121
- scrollOffset: x,
2122
- scrollUpdateWasRequested: A
2123
- });
2124
- }), p._getItemStyle = void 0, p._getItemStyle = function(M) {
2125
- var x = p.props, A = x.direction, z = x.itemSize, b = x.layout, D = p._getItemStyleCache(E && z, E && b, E && A), k;
2126
- if (D.hasOwnProperty(M))
2127
- k = D[M];
2128
- else {
2129
- var j = a(p.props, M, p._instanceProps), W = u(p.props, M, p._instanceProps), V = A === "horizontal" || b === "horizontal", ne = A === "rtl", se = V ? j : 0;
2130
- D[M] = k = {
2131
- position: "absolute",
2132
- left: ne ? void 0 : se,
2133
- right: ne ? se : void 0,
2134
- top: V ? 0 : j,
2135
- height: V ? "100%" : W,
2136
- width: V ? W : "100%"
2137
- };
2138
- }
2139
- return k;
2140
- }, p._getItemStyleCache = void 0, p._getItemStyleCache = qe(function(M, x, A) {
2141
- return {};
2142
- }), p._onScrollHorizontal = function(M) {
2143
- var x = M.currentTarget, A = x.clientWidth, z = x.scrollLeft, b = x.scrollWidth;
2144
- p.setState(function(D) {
2145
- if (D.scrollOffset === z)
2146
- return null;
2147
- var k = p.props.direction, j = z;
2148
- if (k === "rtl")
2149
- switch (wt()) {
2150
- case "negative":
2151
- j = -z;
2152
- break;
2153
- case "positive-descending":
2154
- j = b - A - z;
2155
- break;
2156
- }
2157
- return j = Math.max(0, Math.min(j, b - A)), {
2158
- isScrolling: !0,
2159
- scrollDirection: D.scrollOffset < z ? "forward" : "backward",
2160
- scrollOffset: j,
2161
- scrollUpdateWasRequested: !1
2162
- };
2163
- }, p._resetIsScrollingDebounced);
2164
- }, p._onScrollVertical = function(M) {
2165
- var x = M.currentTarget, A = x.clientHeight, z = x.scrollHeight, b = x.scrollTop;
2166
- p.setState(function(D) {
2167
- if (D.scrollOffset === b)
2168
- return null;
2169
- var k = Math.max(0, Math.min(b, z - A));
2170
- return {
2171
- isScrolling: !0,
2172
- scrollDirection: D.scrollOffset < k ? "forward" : "backward",
2173
- scrollOffset: k,
2174
- scrollUpdateWasRequested: !1
2175
- };
2176
- }, p._resetIsScrollingDebounced);
2177
- }, p._outerRefSetter = function(M) {
2178
- var x = p.props.outerRef;
2179
- p._outerRef = M, typeof x == "function" ? x(M) : x != null && typeof x == "object" && x.hasOwnProperty("current") && (x.current = M);
2180
- }, p._resetIsScrollingDebounced = function() {
2181
- p._resetIsScrollingTimeoutId !== null && yt(p._resetIsScrollingTimeoutId), p._resetIsScrollingTimeoutId = on(p._resetIsScrolling, an);
2182
- }, p._resetIsScrolling = function() {
2183
- p._resetIsScrollingTimeoutId = null, p.setState({
2184
- isScrolling: !1
2185
- }, function() {
2186
- p._getItemStyleCache(-1, null);
2187
- });
2188
- }, p;
2189
- }
2190
- w.getDerivedStateFromProps = function(p, M) {
2191
- return un(p, M), N(p), null;
2192
- };
2193
- var T = w.prototype;
2194
- return T.scrollTo = function(p) {
2195
- p = Math.max(0, p), this.setState(function(M) {
2196
- return M.scrollOffset === p ? null : {
2197
- scrollDirection: M.scrollOffset < p ? "forward" : "backward",
2198
- scrollOffset: p,
2199
- scrollUpdateWasRequested: !0
2200
- };
2201
- }, this._resetIsScrollingDebounced);
2202
- }, T.scrollToItem = function(p, M) {
2203
- M === void 0 && (M = "auto");
2204
- var x = this.props, A = x.itemCount, z = x.layout, b = this.state.scrollOffset;
2205
- p = Math.max(0, Math.min(p, A - 1));
2206
- var D = 0;
2207
- if (this._outerRef) {
2208
- var k = this._outerRef;
2209
- z === "vertical" ? D = k.scrollWidth > k.clientWidth ? xt() : 0 : D = k.scrollHeight > k.clientHeight ? xt() : 0;
2210
- }
2211
- this.scrollTo(I(this.props, p, M, b, this._instanceProps, D));
2212
- }, T.componentDidMount = function() {
2213
- var p = this.props, M = p.direction, x = p.initialScrollOffset, A = p.layout;
2214
- if (typeof x == "number" && this._outerRef != null) {
2215
- var z = this._outerRef;
2216
- M === "horizontal" || A === "horizontal" ? z.scrollLeft = x : z.scrollTop = x;
2217
- }
2218
- this._callPropsCallbacks();
2219
- }, T.componentDidUpdate = function() {
2220
- var p = this.props, M = p.direction, x = p.layout, A = this.state, z = A.scrollOffset, b = A.scrollUpdateWasRequested;
2221
- if (b && this._outerRef != null) {
2222
- var D = this._outerRef;
2223
- if (M === "horizontal" || x === "horizontal")
2224
- if (M === "rtl")
2225
- switch (wt()) {
2226
- case "negative":
2227
- D.scrollLeft = -z;
2228
- break;
2229
- case "positive-ascending":
2230
- D.scrollLeft = z;
2231
- break;
2232
- default:
2233
- var k = D.clientWidth, j = D.scrollWidth;
2234
- D.scrollLeft = j - k - z;
2235
- break;
2236
- }
2237
- else
2238
- D.scrollLeft = z;
2239
- else
2240
- D.scrollTop = z;
2241
- }
2242
- this._callPropsCallbacks();
2243
- }, T.componentWillUnmount = function() {
2244
- this._resetIsScrollingTimeoutId !== null && yt(this._resetIsScrollingTimeoutId);
2245
- }, T.render = function() {
2246
- var p = this.props, M = p.children, x = p.className, A = p.direction, z = p.height, b = p.innerRef, D = p.innerElementType, k = p.innerTagName, j = p.itemCount, W = p.itemData, V = p.itemKey, ne = V === void 0 ? ln : V, se = p.layout, Le = p.outerElementType, ke = p.outerTagName, Me = p.style, Ae = p.useIsScrolling, Be = p.width, Ee = this.state.isScrolling, fe = A === "horizontal" || se === "horizontal", Ce = fe ? this._onScrollHorizontal : this._onScrollVertical, Te = this._getRangeToRender(), F = Te[0], $ = Te[1], me = [];
2247
- if (j > 0)
2248
- for (var ee = F; ee <= $; ee++)
2249
- me.push(ze(M, {
2250
- data: W,
2251
- key: ne(ee, W),
2252
- index: ee,
2253
- isScrolling: Ae ? Ee : void 0,
2254
- style: this._getItemStyle(ee)
2255
- }));
2256
- var ge = c(this.props, this._instanceProps);
2257
- return ze(Le || ke || "div", {
2258
- className: x,
2259
- onScroll: Ce,
2260
- ref: this._outerRefSetter,
2261
- style: Ke({
2262
- position: "relative",
2263
- height: z,
2264
- width: Be,
2265
- overflow: "auto",
2266
- WebkitOverflowScrolling: "touch",
2267
- willChange: "transform",
2268
- direction: A
2269
- }, Me)
2270
- }, ze(D || k || "div", {
2271
- children: me,
2272
- ref: b,
2273
- style: {
2274
- height: fe ? "100%" : ge,
2275
- pointerEvents: Ee ? "none" : void 0,
2276
- width: fe ? ge : "100%"
2277
- }
2278
- }));
2279
- }, T._callPropsCallbacks = function() {
2280
- if (typeof this.props.onItemsRendered == "function") {
2281
- var p = this.props.itemCount;
2282
- if (p > 0) {
2283
- var M = this._getRangeToRender(), x = M[0], A = M[1], z = M[2], b = M[3];
2284
- this._callOnItemsRendered(x, A, z, b);
2285
- }
2286
- }
2287
- if (typeof this.props.onScroll == "function") {
2288
- var D = this.state, k = D.scrollDirection, j = D.scrollOffset, W = D.scrollUpdateWasRequested;
2289
- this._callOnScroll(k, j, W);
2290
- }
2291
- }, T._getRangeToRender = function() {
2292
- var p = this.props, M = p.itemCount, x = p.overscanCount, A = this.state, z = A.isScrolling, b = A.scrollDirection, D = A.scrollOffset;
2293
- if (M === 0)
2294
- return [0, 0, 0, 0];
2295
- var k = m(this.props, D, this._instanceProps), j = o(this.props, k, D, this._instanceProps), W = !z || b === "backward" ? Math.max(1, x) : 1, V = !z || b === "forward" ? Math.max(1, x) : 1;
2296
- return [Math.max(0, k - W), Math.max(0, Math.min(M - 1, j + V)), k, j];
2297
- }, w;
2298
- }(vt), n.defaultProps = {
2299
- direction: "ltr",
2300
- itemData: void 0,
2301
- layout: "vertical",
2302
- overscanCount: 2,
2303
- useIsScrolling: !1
2304
- }, n;
2305
- }
2306
- var un = function(n, a) {
2307
- n.children, n.direction, n.height, n.layout, n.innerTagName, n.outerTagName, n.width, a.instance;
2308
- }, dn = /* @__PURE__ */ cn({
2309
- getItemOffset: function(n, a) {
2310
- var c = n.itemSize;
2311
- return a * c;
2312
- },
2313
- getItemSize: function(n, a) {
2314
- var c = n.itemSize;
2315
- return c;
2316
- },
2317
- getEstimatedTotalSize: function(n) {
2318
- var a = n.itemCount, c = n.itemSize;
2319
- return c * a;
2320
- },
2321
- getOffsetForIndexAndAlignment: function(n, a, c, u, I, m) {
2322
- var o = n.direction, y = n.height, E = n.itemCount, N = n.itemSize, S = n.layout, w = n.width, T = o === "horizontal" || S === "horizontal", _ = T ? w : y, p = Math.max(0, E * N - _), M = Math.min(p, a * N), x = Math.max(0, a * N - _ + N + m);
2323
- switch (c === "smart" && (u >= x - _ && u <= M + _ ? c = "auto" : c = "center"), c) {
2324
- case "start":
2325
- return M;
2326
- case "end":
2327
- return x;
2328
- case "center": {
2329
- var A = Math.round(x + (M - x) / 2);
2330
- return A < Math.ceil(_ / 2) ? 0 : A > p + Math.floor(_ / 2) ? p : A;
2331
- }
2332
- case "auto":
2333
- default:
2334
- return u >= x && u <= M ? u : u < x ? x : M;
2335
- }
2336
- },
2337
- getStartIndexForOffset: function(n, a) {
2338
- var c = n.itemCount, u = n.itemSize;
2339
- return Math.max(0, Math.min(c - 1, Math.floor(a / u)));
2340
- },
2341
- getStopIndexForStartIndex: function(n, a, c) {
2342
- var u = n.direction, I = n.height, m = n.itemCount, o = n.itemSize, y = n.layout, E = n.width, N = u === "horizontal" || y === "horizontal", S = a * o, w = N ? E : I, T = Math.ceil((w + c - S) / o);
2343
- return Math.max(0, Math.min(
2344
- m - 1,
2345
- a + T - 1
2346
- // -1 is because stop index is inclusive
2347
- ));
2348
- },
2349
- initInstanceProps: function(n) {
2350
- },
2351
- shouldResetStyleCacheOnItemSizeChange: !0,
2352
- validateProps: function(n) {
2353
- n.itemSize;
2354
- }
2355
- });
2356
- function hn(i) {
2357
- var n = i.lastRenderedStartIndex, a = i.lastRenderedStopIndex, c = i.startIndex, u = i.stopIndex;
2358
- return !(c > a || u < n);
2359
- }
2360
- function pn(i) {
2361
- for (var n = i.isItemLoaded, a = i.itemCount, c = i.minimumBatchSize, u = i.startIndex, I = i.stopIndex, m = [], o = null, y = null, E = u; E <= I; E++) {
2362
- var N = n(E);
2363
- N ? y !== null && (m.push(o, y), o = y = null) : (y = E, o === null && (o = E));
2364
- }
2365
- if (y !== null) {
2366
- for (var S = Math.min(Math.max(y, o + c - 1), a - 1), w = y + 1; w <= S && !n(w); w++)
2367
- y = w;
2368
- m.push(o, y);
2369
- }
2370
- if (m.length)
2371
- for (; m[1] - m[0] + 1 < c && m[0] > 0; ) {
2372
- var T = m[0] - 1;
2373
- if (!n(T))
2374
- m[0] = T;
2375
- else
2376
- break;
2377
- }
2378
- return m;
2379
- }
2380
- var fn = function(i, n) {
2381
- if (!(i instanceof n))
2382
- throw new TypeError("Cannot call a class as a function");
2383
- }, mn = function() {
2384
- function i(n, a) {
2385
- for (var c = 0; c < a.length; c++) {
2386
- var u = a[c];
2387
- u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(n, u.key, u);
2388
- }
2389
- }
2390
- return function(n, a, c) {
2391
- return a && i(n.prototype, a), c && i(n, c), n;
2392
- };
2393
- }(), gn = function(i, n) {
2394
- if (typeof n != "function" && n !== null)
2395
- throw new TypeError("Super expression must either be null or a function, not " + typeof n);
2396
- i.prototype = Object.create(n && n.prototype, {
2397
- constructor: {
2398
- value: i,
2399
- enumerable: !1,
2400
- writable: !0,
2401
- configurable: !0
2402
- }
2403
- }), n && (Object.setPrototypeOf ? Object.setPrototypeOf(i, n) : i.__proto__ = n);
2404
- }, Mt = function(i, n) {
2405
- if (!i)
2406
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2407
- return n && (typeof n == "object" || typeof n == "function") ? n : i;
2408
- }, In = function(i) {
2409
- gn(n, i);
2410
- function n() {
2411
- var a, c, u, I;
2412
- fn(this, n);
2413
- for (var m = arguments.length, o = Array(m), y = 0; y < m; y++)
2414
- o[y] = arguments[y];
2415
- return I = (c = (u = Mt(this, (a = n.__proto__ || Object.getPrototypeOf(n)).call.apply(a, [this].concat(o))), u), u._lastRenderedStartIndex = -1, u._lastRenderedStopIndex = -1, u._memoizedUnloadedRanges = [], u._onItemsRendered = function(E) {
2416
- var N = E.visibleStartIndex, S = E.visibleStopIndex;
2417
- u._lastRenderedStartIndex = N, u._lastRenderedStopIndex = S, u._ensureRowsLoaded(N, S);
2418
- }, u._setRef = function(E) {
2419
- u._listRef = E;
2420
- }, c), Mt(u, I);
2421
- }
2422
- return mn(n, [{
2423
- key: "resetloadMoreItemsCache",
2424
- value: function() {
2425
- var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
2426
- this._memoizedUnloadedRanges = [], c && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
2427
- }
2428
- }, {
2429
- key: "componentDidMount",
2430
- value: function() {
2431
- }
2432
- }, {
2433
- key: "render",
2434
- value: function() {
2435
- var c = this.props.children;
2436
- return c({
2437
- onItemsRendered: this._onItemsRendered,
2438
- ref: this._setRef
2439
- });
2440
- }
2441
- }, {
2442
- key: "_ensureRowsLoaded",
2443
- value: function(c, u) {
2444
- var I = this.props, m = I.isItemLoaded, o = I.itemCount, y = I.minimumBatchSize, E = y === void 0 ? 10 : y, N = I.threshold, S = N === void 0 ? 15 : N, w = pn({
2445
- isItemLoaded: m,
2446
- itemCount: o,
2447
- minimumBatchSize: E,
2448
- startIndex: Math.max(0, c - S),
2449
- stopIndex: Math.min(o - 1, u + S)
2450
- });
2451
- (this._memoizedUnloadedRanges.length !== w.length || this._memoizedUnloadedRanges.some(function(T, _) {
2452
- return w[_] !== T;
2453
- })) && (this._memoizedUnloadedRanges = w, this._loadUnloadedRanges(w));
2454
- }
2455
- }, {
2456
- key: "_loadUnloadedRanges",
2457
- value: function(c) {
2458
- for (var u = this, I = this.props.loadMoreItems || this.props.loadMoreRows, m = function(E) {
2459
- var N = c[E], S = c[E + 1], w = I(N, S);
2460
- w != null && w.then(function() {
2461
- if (hn({
2462
- lastRenderedStartIndex: u._lastRenderedStartIndex,
2463
- lastRenderedStopIndex: u._lastRenderedStopIndex,
2464
- startIndex: N,
2465
- stopIndex: S
2466
- })) {
2467
- if (u._listRef == null)
2468
- return;
2469
- typeof u._listRef.resetAfterIndex == "function" ? u._listRef.resetAfterIndex(N, !0) : (typeof u._listRef._getItemStyleCache == "function" && u._listRef._getItemStyleCache(-1), u._listRef.forceUpdate());
2470
- }
2471
- });
2472
- }, o = 0; o < c.length; o += 2)
2473
- m(o);
2474
- }
2475
- }]), n;
2476
- }(vt);
2477
- const yn = () => Q, xn = /* @__PURE__ */ g("div")({
2478
- name: "a",
2479
- class: "a1w9zony",
2480
- propsAsIs: !1
2481
- }), wn = /* @__PURE__ */ g("div")({
2482
- name: "l",
2483
- class: "l16qcfv8",
2484
- propsAsIs: !1
2485
- }), Mn = /* @__PURE__ */ g("img")({
2486
- name: "p",
2487
- class: "p1gmcc5f",
2488
- propsAsIs: !1
2489
- }), An = /* @__PURE__ */ g("div")({
2490
- name: "s",
2491
- class: "s1doddh0",
2492
- propsAsIs: !1
2493
- }), En = /* @__PURE__ */ g("div")({
2494
- name: "c",
2495
- class: "c1js9xhe",
2496
- propsAsIs: !1
2497
- }), Tn = /* @__PURE__ */ g("div")({
2498
- name: "d",
2499
- class: "d1tmnqsh",
2500
- propsAsIs: !1
2501
- }), vn = /* @__PURE__ */ g("span")({
2502
- name: "g",
2503
- class: "gi9h87j",
2504
- propsAsIs: !1
2505
- }), Nn = /* @__PURE__ */ g(yn())({
2506
- name: "x",
2507
- class: "x13mk3z6",
2508
- propsAsIs: !0
2509
- }), _n = ({
2510
- rank: i,
2511
- avatar: n,
2512
- name: a,
2513
- points: c,
2514
- isCurrentUser: u,
2515
- openItemDetail: I,
2516
- style: m
2517
- }) => /* @__PURE__ */ v(xn, { onClick: I, style: m, children: [
2518
- /* @__PURE__ */ h(wn, { children: i || 0 }),
2519
- /* @__PURE__ */ v(En, { children: [
2520
- n ? /* @__PURE__ */ h(Mn, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ h(An, { children: Nt(a || "") }),
2521
- /* @__PURE__ */ v(Tn, { children: [
2522
- /* @__PURE__ */ h(vn, { children: a || "" }),
2523
- u && /* @__PURE__ */ h(Nn, { name: "icon-star" })
2524
- ] })
2525
- ] }),
2526
- /* @__PURE__ */ h("div", { children: _t(c) })
2527
- ] }), Sn = ({
2528
- items: i,
2529
- currentUserId: n,
2530
- openItemDetail: a,
2531
- fetchMore: c
2532
- }) => /* @__PURE__ */ h(en, { children: ({ width: u, height: I }) => /* @__PURE__ */ h(
2533
- In,
2534
- {
2535
- isItemLoaded: (m) => m < i.length,
2536
- itemCount: i.length + 1,
2537
- loadMoreItems: c,
2538
- children: ({ onItemsRendered: m, ref: o }) => /* @__PURE__ */ h(
2539
- dn,
2540
- {
2541
- itemSize: 56,
2542
- onItemsRendered: m,
2543
- ref: o,
2544
- itemCount: i.length,
2545
- width: u,
2546
- height: I,
2547
- children: ({ index: y, style: E }) => /* @__PURE__ */ h(
2548
- _n,
2549
- {
2550
- style: { ...E, maxHeight: 48 },
2551
- ...i[y],
2552
- openItemDetail: () => a(i[y].userId),
2553
- isCurrentUser: !!n && n === i[y].userId
2554
- },
2555
- i[y].userId
2556
- )
2557
- }
2558
- )
2559
- }
2560
- ) });
2561
- const zn = () => Q, Dn = () => Q, bn = /* @__PURE__ */ g("div")({
2562
- name: "a",
2563
- class: "ay8exst",
2564
- propsAsIs: !1
2565
- }), On = /* @__PURE__ */ g("div")({
2566
- name: "l",
2567
- class: "l31riw0",
2568
- propsAsIs: !1
2569
- }), Ln = /* @__PURE__ */ g(zn())({
2570
- name: "p",
2571
- class: "pcmm4w7",
2572
- propsAsIs: !0
2573
- }), kn = /* @__PURE__ */ g("div")({
2574
- name: "c",
2575
- class: "cct922a",
2576
- propsAsIs: !1
2577
- }), Bn = /* @__PURE__ */ g("div")({
2578
- name: "s",
2579
- class: "s12b7u74",
2580
- propsAsIs: !1
2581
- }), Cn = /* @__PURE__ */ g("div")({
2582
- name: "x",
2583
- class: "x1896nrl",
2584
- propsAsIs: !1
2585
- }), Rn = /* @__PURE__ */ g("div")({
2586
- name: "d",
2587
- class: "d1vnagog",
2588
- propsAsIs: !1
2589
- }), Un = /* @__PURE__ */ g("div")({
2590
- name: "g",
2591
- class: "gznzzc2",
2592
- propsAsIs: !1
2593
- }), jn = /* @__PURE__ */ g("span")({
2594
- name: "f",
2595
- class: "fnmvyxu",
2596
- propsAsIs: !1
2597
- }), Fn = /* @__PURE__ */ g("span")({
2598
- name: "h",
2599
- class: "h1iubd2g",
2600
- propsAsIs: !1
2601
- }), $n = /* @__PURE__ */ g(Dn())({
2602
- name: "m",
2603
- class: "mmvjfuo",
2604
- propsAsIs: !0
2605
- }), Qn = /* @__PURE__ */ g("div")({
2606
- name: "v",
2607
- class: "v1oi1553",
2608
- propsAsIs: !1
2609
- }), Pn = /* @__PURE__ */ g("a")({
2610
- name: "w",
2611
- class: "w1vwcogq",
2612
- propsAsIs: !1
2613
- }), qn = /* @__PURE__ */ g("span")({
2614
- name: "u",
2615
- class: "utbqo0e",
2616
- propsAsIs: !1
2617
- }), Yn = ({
2618
- inviteLink: i,
2619
- socialLinks: n,
2620
- inviteCardTitle: a,
2621
- inviteCardSubtext: c,
2622
- primaryColor: u,
2623
- className: I
2624
- }) => /* @__PURE__ */ v(bn, { className: I, children: [
2625
- /* @__PURE__ */ h(On, { style: { backgroundColor: u }, children: /* @__PURE__ */ h(Ln, { name: "invite-game-icon" }) }),
2626
- /* @__PURE__ */ v(kn, { children: [
2627
- /* @__PURE__ */ h(Bn, { children: a || "" }),
2628
- /* @__PURE__ */ h(Cn, { children: c || "" })
2629
- ] }),
2630
- i && /* @__PURE__ */ v(Rn, { onClick: async () => {
2631
- if (i)
2632
- try {
2633
- await navigator.clipboard.writeText(i);
2634
- } catch (m) {
2635
- console.error("Unable to copy to clipboard", m);
2636
- }
2637
- }, children: [
2638
- /* @__PURE__ */ v(Un, { children: [
2639
- /* @__PURE__ */ h(jn, { children: "Invite link" }),
2640
- /* @__PURE__ */ h(Fn, { children: i })
2641
- ] }),
2642
- /* @__PURE__ */ h($n, { name: "icon-copy" })
2643
- ] }),
2644
- n && n.length > 0 && /* @__PURE__ */ h(Qn, { children: n.map(({ icon: m, link: o, label: y }) => /* @__PURE__ */ v(Pn, { href: o, target: "_blank", children: [
2645
- /* @__PURE__ */ h(Q, { name: m }),
2646
- /* @__PURE__ */ h(qn, { children: y })
2647
- ] }, o)) })
2648
- ] }), Wn = ({ deepLink: i }) => {
2649
- const { data: n } = re(i.$store);
2650
- return /* @__PURE__ */ h(
2651
- Yn,
2652
- {
2653
- inviteLink: n == null ? void 0 : n.url,
2654
- socialLinks: [
2655
- {
2656
- icon: "icon-facebook",
2657
- link: "https://www.facebook.com/TheMasters",
2658
- label: "Facebook"
2659
- },
2660
- {
2661
- icon: "icon-twitter",
2662
- link: "https://twitter.com/@TheMasters",
2663
- label: "X"
2664
- }
2665
- ],
2666
- inviteCardTitle: "It’s more fun with friends",
2667
- inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
2668
- }
2669
- );
2670
- }, Vn = ({ gamification: i }) => {
2671
- const { data: n } = re(i.leaderboardList.$store);
2672
- return n != null && n.length ? /* @__PURE__ */ h(
2673
- Sn,
2674
- {
2675
- fetchMore: i.leaderboardList.fetchMore,
2676
- items: n,
2677
- openItemDetail: i.openUser,
2678
- currentUserId: i.currentUserId.get()
2679
- }
2680
- ) : /* @__PURE__ */ h(Wn, { deepLink: i.deepLink });
2681
- };
2682
- const Hn = /* @__PURE__ */ g("button")({
2683
- name: "a",
2684
- class: "akly9h2",
2685
- propsAsIs: !1
2686
- }), Gn = /* @__PURE__ */ g("span")({
2687
- name: "e",
2688
- class: "eptoiz9",
2689
- propsAsIs: !1
2690
- }), Zn = ({ disabled: i, variant: n = "primary", onClick: a, children: c, ...u }) => /* @__PURE__ */ h(Hn, { onClick: a, disabled: i, "data-variant": n, ...u, children: /* @__PURE__ */ h(Gn, { children: c }) });
2691
- const Jn = () => Q, Kn = () => Q, Xn = /* @__PURE__ */ g("div")({
2692
- name: "s",
2693
- class: "s1lblda3",
2694
- propsAsIs: !1
2695
- }), es = /* @__PURE__ */ g("div")({
2696
- name: "a",
2697
- class: "ascvb2g",
2698
- propsAsIs: !1
2699
- }), ts = /* @__PURE__ */ g("div")({
2700
- name: "p",
2701
- class: "p17rl8zy",
2702
- propsAsIs: !1
2703
- }), rs = /* @__PURE__ */ g("div")({
2704
- name: "l",
2705
- class: "l1vvttbn",
2706
- propsAsIs: !1
2707
- }), We = /* @__PURE__ */ g(Jn())({
2708
- name: "c",
2709
- class: "c6fk2ph",
2710
- propsAsIs: !0
2711
- }), is = /* @__PURE__ */ g(Kn())({
2712
- name: "d",
2713
- class: "d1rdm136",
2714
- propsAsIs: !0
2715
- }), ns = /* @__PURE__ */ g("div")({
2716
- name: "f",
2717
- class: "fwqnnel",
2718
- propsAsIs: !1
2719
- }), ss = /* @__PURE__ */ g("div")({
2720
- name: "u",
2721
- class: "ucyxnlg",
2722
- propsAsIs: !1
2723
- }), os = {
2724
- [Ne.LOST]: /* @__PURE__ */ h(We, { name: "icon-cross" }),
2725
- [Ne.WON]: /* @__PURE__ */ h(We, { name: "icon-check" }),
2726
- [Ne.UNSET]: void 0,
2727
- [Ne.DNP]: /* @__PURE__ */ h(We, { name: "icon-arrow" })
2728
- }, as = ({
2729
- questionId: i,
2730
- questionType: n,
2731
- questionStatus: a,
2732
- subject: c,
2733
- openForVoting: u,
2734
- openQuestion: I,
2735
- status: m
2736
- }) => {
2737
- const o = Et[n], y = os[m];
2738
- return o ? /* @__PURE__ */ v(Xn, { onClick: () => I == null ? void 0 : I(i), children: [
2739
- /* @__PURE__ */ v(ss, { children: [
2740
- /* @__PURE__ */ v(es, { children: [
2741
- /* @__PURE__ */ h(is, { name: o.iconName }),
2742
- /* @__PURE__ */ v(ns, { children: [
2743
- o.label,
2744
- n === q.TRIVIA && a === we.RESOLVED && " • Expired"
2745
- ] })
2746
- ] }),
2747
- /* @__PURE__ */ h(ts, { children: c || "" })
2748
- ] }),
2749
- /* @__PURE__ */ h(rs, { children: y || (u ? /* @__PURE__ */ h(Zn, { children: "Play" }) : null) })
2750
- ] }) : null;
2751
- };
2752
- const ls = /* @__PURE__ */ g("div")({
2753
- name: "n",
2754
- class: "n1jcgove",
2755
- propsAsIs: !1
2756
- }), cs = /* @__PURE__ */ g("button")({
2757
- name: "l",
2758
- class: "l1bwp7hh",
2759
- propsAsIs: !1
2760
- }), us = ({
2761
- openInsight: i,
2762
- questionId: n,
2763
- ...a
2764
- }) => /* @__PURE__ */ v(ls, { children: [
2765
- /* @__PURE__ */ h(bt, { questionId: n, ...a }),
2766
- i && /* @__PURE__ */ h(cs, { onClick: () => i(n), children: "View Insight" })
2767
- ] });
2768
- const ds = /* @__PURE__ */ g("div")({
2769
- name: "t",
2770
- class: "t19vr3p1",
2771
- propsAsIs: !1
2772
- }), hs = ({ questions: i, openQuestion: n }) => /* @__PURE__ */ h(ds, { children: i == null ? void 0 : i.map((a) => {
2773
- var c, u;
2774
- if (a.type === "question" && ((c = a.attributes) == null ? void 0 : c.attributes.case) === "question") {
2775
- const I = a.attributes.attributes.value;
2776
- return /* @__PURE__ */ h(as, { openQuestion: n, ...I }, I.questionId);
2777
- }
2778
- if (a.type === "insight" && ((u = a.attributes) == null ? void 0 : u.attributes.case) === "insight") {
2779
- const I = a.attributes.attributes.value;
2780
- return /* @__PURE__ */ h(us, { openInsight: n, ...I }, I.questionId);
2781
- }
2782
- return null;
2783
- }) }), ps = ({ store: i, openQuestion: n }) => {
2784
- const a = re(i);
2785
- return a != null && a.data ? /* @__PURE__ */ h(hs, { openQuestion: n, questions: a.data }) : /* @__PURE__ */ h("div", { children: "wait questions..." });
2786
- }, fs = ({ userSummary: i }) => {
2787
- var n, a;
2788
- const c = re(i.getStore());
2789
- return (n = c.data) != null && n.summary ? /* @__PURE__ */ h(zt, { ...c.data.summary, successRate: (a = c.data.percentage) == null ? void 0 : a.correct }) : /* @__PURE__ */ h("div", { children: "wait user..." });
2790
- }, ms = ({ gamification: i }) => {
2791
- const [n, a] = xe(ye.HOME);
2792
- return /* @__PURE__ */ v("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
2793
- /* @__PURE__ */ v(Ve, { children: [
2794
- /* @__PURE__ */ h($i, { activePage: n, toggleActivePage: a }),
2795
- n === ye.HOME && /* @__PURE__ */ h(fs, { userSummary: i.userSummary })
2796
- ] }),
2797
- n === ye.HOME && /* @__PURE__ */ h(Vt, { children: /* @__PURE__ */ h(ps, { openQuestion: i.openQuestion, store: i.feedList.getStore() }) }),
2798
- n === ye.LEADERBOARD && /* @__PURE__ */ h(Ve, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ h(Vn, { gamification: i }) })
2799
- ] });
2800
- };
2801
- const gs = () => Ht, At = /* @__PURE__ */ g(gs())({
2802
- name: "n",
2803
- class: "n1ph66cs",
2804
- propsAsIs: !0
2805
- }), Is = /* @__PURE__ */ g("div")({
2806
- name: "x",
2807
- class: "xorme7i",
2808
- propsAsIs: !1
2809
- }), ys = ({
2810
- correct: i,
2811
- incorrect: n
2812
- }) => {
2813
- const a = i + n;
2814
- return a === 0 ? 0 : Math.round(i / a * 100);
2815
- }, Ls = ({
2816
- gamification: i,
2817
- className: n
2818
- }) => {
2819
- const a = re(i.openedQuestion.$store), c = re(i.openedUser);
2820
- return /* @__PURE__ */ v(de, {
2821
- children: [a && /* @__PURE__ */ h(At, {
2822
- className: n,
2823
- children: /* @__PURE__ */ h(Ci, {
2824
- gamification: i
2825
- })
2826
- }), c && /* @__PURE__ */ h(At, {
2827
- className: n,
2828
- children: /* @__PURE__ */ v(Is, {
2829
- children: [/* @__PURE__ */ h(St, {
2830
- label: "Friend's Rank",
2831
- close: i.closeUser
2832
- }), /* @__PURE__ */ h(Ve, {
2833
- children: /* @__PURE__ */ h(zt, {
2834
- ...c,
2835
- successRate: ys(c)
2836
- })
2837
- })]
2838
- })
2839
- }), /* @__PURE__ */ h(Tt, {
2840
- className: n,
2841
- "data-nav": "true",
2842
- children: /* @__PURE__ */ h(ms, {
2843
- gamification: i
2844
- })
2845
- })]
2846
- });
2847
- };
2848
- export {
2849
- Ls as GamificationOverlay,
2850
- Ls as default
2851
- };