@everymatrix/tournament-details-page 0.0.2 → 0.0.5

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 (29) hide show
  1. package/components/{TournamentDetails-upe3WFia.cjs → TournamentDetails-2nXu_Fl0.cjs} +5 -5
  2. package/components/{TournamentDetails-amGR_-Hv.js → TournamentDetails-ByOP8vGa.js} +575 -576
  3. package/components/{TournamentDetails-CJVSWVXD.js → TournamentDetails-DIGjTSwQ.js} +701 -702
  4. package/components/{TournamentDetailsPage-DW00w9RP.js → TournamentDetailsPage-CPVEgDYR.js} +154 -154
  5. package/components/TournamentDetailsPage-CpVOLote.cjs +63 -0
  6. package/components/{TournamentDetailsPage-B21wsWnv.js → TournamentDetailsPage-Dlv02xHw.js} +110 -110
  7. package/components/TournamentGames-0cZY55hS.js +348 -0
  8. package/components/TournamentGames-3vEVB6E0.js +376 -0
  9. package/components/TournamentGames-54X0-O5B.cjs +26 -0
  10. package/components/TournamentLeaderboard-CXLrlJUG.cjs +30 -0
  11. package/components/TournamentLeaderboard-D7ktm7ED.js +788 -0
  12. package/components/TournamentLeaderboard-nb3ySbAn.js +804 -0
  13. package/es2015/tournament-details-page.cjs +1 -1
  14. package/es2015/tournament-details-page.js +1 -1
  15. package/esnext/tournament-details-page.js +1 -1
  16. package/package.json +1 -1
  17. package/components/TournamentDetailsPage-BlWvqhbK.js +0 -953
  18. package/components/TournamentDetailsPage-BsjnqhIP.cjs +0 -63
  19. package/components/TournamentDetailsPage-DnknTo0Y.js +0 -976
  20. package/components/TournamentDetailsPage-FO-PGATk.cjs +0 -63
  21. package/components/TournamentGames-B0ap9lHo.cjs +0 -26
  22. package/components/TournamentGames-BqZd-C9h.js +0 -351
  23. package/components/TournamentGames-C0-voJOi.js +0 -324
  24. package/components/TournamentGames-Cb2LP2tF.js +0 -324
  25. package/components/TournamentGames-D5Nyb0Nx.cjs +0 -26
  26. package/components/TournamentGames-DIIgfZ-E.js +0 -351
  27. package/components/TournamentLeaderboard-BjmkrtNX.js +0 -800
  28. package/components/TournamentLeaderboard-C1tIH5FA.js +0 -784
  29. package/components/TournamentLeaderboard-DWYhqHPh.cjs +0 -36
@@ -0,0 +1,788 @@
1
+ import { b as nt, $ as ot, M as st, g as it, h as Le, u as dt, o as lt, j as W, k as _e, z as ve, n as L, q as ct, r as vt, v as Ne, p as ht, l as A, m as p, C as ut, E as R, e as ft, f as pt, w as l, L as Qe, t as q, s as he, F as gt, x as f, I as Xe, y as De, J as Ye, K as tt, N as mt, B as rt } from "./TournamentDetails-ByOP8vGa.js";
2
+ function yt(se, $) {
3
+ nt(se, $);
4
+ }
5
+ function bt(se) {
6
+ ot.set(se);
7
+ }
8
+ const at = {
9
+ en: {
10
+ rank: "Rank",
11
+ user: "User",
12
+ points: "Points",
13
+ prize: "Prize",
14
+ notEnrolledRank: "You are currently not enrolled in this torunament",
15
+ myRanking: "My Ranking",
16
+ showMore: "Show More",
17
+ showLess: "Show Less",
18
+ emptyLeaderboard: "Currently there are no players enrolled in this tournament",
19
+ joinButton: "Join",
20
+ previousButton: "Previous",
21
+ nextButton: "Next"
22
+ },
23
+ tr: {
24
+ rank: "Sıralama",
25
+ user: "Kullanıcı",
26
+ points: "Puanlar",
27
+ prize: "Ödül",
28
+ notEnrolledRank: "Şu anda bu turnuvaya kayıtlı değilsiniz",
29
+ myRanking: "Sıralamam",
30
+ showMore: "Daha Fazla Göster",
31
+ showLess: "Daha Az Göster",
32
+ emptyLeaderboard: "Currently there are no players enrolled in this tournament",
33
+ joinButton: "Join",
34
+ previousButton: "Previous",
35
+ nextButton: "Next"
36
+ }
37
+ };
38
+ var Ze = { exports: {} };
39
+ /** @license
40
+ * eventsource.js
41
+ * Available under MIT License (MIT)
42
+ * https://github.com/Yaffle/EventSource/
43
+ */
44
+ (function(se, $) {
45
+ (function(b) {
46
+ var V = b.setTimeout, ie = b.clearTimeout, E = b.XMLHttpRequest, ae = b.XDomainRequest, J = b.ActiveXObject, K = b.EventSource, F = b.document, qe = b.Promise, M = b.fetch, ue = b.Response, Q = b.TextDecoder, je = b.TextEncoder, Y = b.AbortController;
47
+ if (typeof window < "u" && typeof F < "u" && !("readyState" in F) && F.body == null && (F.readyState = "loading", window.addEventListener("load", function(e) {
48
+ F.readyState = "complete";
49
+ }, !1)), E == null && J != null && (E = function() {
50
+ return new J("Microsoft.XMLHTTP");
51
+ }), Object.create == null && (Object.create = function(e) {
52
+ function n() {
53
+ }
54
+ return n.prototype = e, new n();
55
+ }), Date.now || (Date.now = function() {
56
+ return (/* @__PURE__ */ new Date()).getTime();
57
+ }), Y == null) {
58
+ var U = M;
59
+ M = function(e, n) {
60
+ var o = n.signal;
61
+ return U(e, { headers: n.headers, credentials: n.credentials, cache: n.cache }).then(function(a) {
62
+ var v = a.body.getReader();
63
+ return o._reader = v, o._aborted && o._reader.cancel(), {
64
+ status: a.status,
65
+ statusText: a.statusText,
66
+ headers: a.headers,
67
+ body: {
68
+ getReader: function() {
69
+ return v;
70
+ }
71
+ }
72
+ };
73
+ });
74
+ }, Y = function() {
75
+ this.signal = {
76
+ _reader: null,
77
+ _aborted: !1
78
+ }, this.abort = function() {
79
+ this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
80
+ };
81
+ };
82
+ }
83
+ function B() {
84
+ this.bitsNeeded = 0, this.codePoint = 0;
85
+ }
86
+ B.prototype.decode = function(e) {
87
+ function n(c, h, s) {
88
+ if (s === 1)
89
+ return c >= 128 >> h && c << h <= 2047;
90
+ if (s === 2)
91
+ return c >= 2048 >> h && c << h <= 55295 || c >= 57344 >> h && c << h <= 65535;
92
+ if (s === 3)
93
+ return c >= 65536 >> h && c << h <= 1114111;
94
+ throw new Error();
95
+ }
96
+ function o(c, h) {
97
+ if (c === 6 * 1)
98
+ return h >> 6 > 15 ? 3 : h > 31 ? 2 : 1;
99
+ if (c === 6 * 2)
100
+ return h > 15 ? 3 : 2;
101
+ if (c === 6 * 3)
102
+ return 3;
103
+ throw new Error();
104
+ }
105
+ for (var a = 65533, v = "", d = this.bitsNeeded, t = this.codePoint, i = 0; i < e.length; i += 1) {
106
+ var r = e[i];
107
+ d !== 0 && (r < 128 || r > 191 || !n(t << 6 | r & 63, d - 6, o(d, t))) && (d = 0, t = a, v += String.fromCharCode(t)), d === 0 ? (r >= 0 && r <= 127 ? (d = 0, t = r) : r >= 192 && r <= 223 ? (d = 6 * 1, t = r & 31) : r >= 224 && r <= 239 ? (d = 6 * 2, t = r & 15) : r >= 240 && r <= 247 ? (d = 6 * 3, t = r & 7) : (d = 0, t = a), d !== 0 && !n(t, d, o(d, t)) && (d = 0, t = a)) : (d -= 6, t = t << 6 | r & 63), d === 0 && (t <= 65535 ? v += String.fromCharCode(t) : (v += String.fromCharCode(55296 + (t - 65535 - 1 >> 10)), v += String.fromCharCode(56320 + (t - 65535 - 1 & 1023))));
108
+ }
109
+ return this.bitsNeeded = d, this.codePoint = t, v;
110
+ };
111
+ var fe = function() {
112
+ try {
113
+ return new Q().decode(new je().encode("test"), { stream: !0 }) === "test";
114
+ } catch (e) {
115
+ console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
116
+ }
117
+ return !1;
118
+ };
119
+ (Q == null || je == null || !fe()) && (Q = B);
120
+ var N = function() {
121
+ };
122
+ function z(e) {
123
+ this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = N, this.onload = N, this.onerror = N, this.onreadystatechange = N, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = N;
124
+ }
125
+ z.prototype.open = function(e, n) {
126
+ this._abort(!0);
127
+ var o = this, a = this._xhr, v = 1, d = 0;
128
+ this._abort = function(s) {
129
+ o._sendTimeout !== 0 && (ie(o._sendTimeout), o._sendTimeout = 0), (v === 1 || v === 2 || v === 3) && (v = 4, a.onload = N, a.onerror = N, a.onabort = N, a.onprogress = N, a.onreadystatechange = N, a.abort(), d !== 0 && (ie(d), d = 0), s || (o.readyState = 4, o.onabort(null), o.onreadystatechange())), v = 0;
130
+ };
131
+ var t = function() {
132
+ if (v === 1) {
133
+ var s = 0, u = "", _ = void 0;
134
+ if ("contentType" in a)
135
+ s = 200, u = "OK", _ = a.contentType;
136
+ else
137
+ try {
138
+ s = a.status, u = a.statusText, _ = a.getResponseHeader("Content-Type");
139
+ } catch {
140
+ s = 0, u = "", _ = void 0;
141
+ }
142
+ s !== 0 && (v = 2, o.readyState = 2, o.status = s, o.statusText = u, o._contentType = _, o.onreadystatechange());
143
+ }
144
+ }, i = function() {
145
+ if (t(), v === 2 || v === 3) {
146
+ v = 3;
147
+ var s = "";
148
+ try {
149
+ s = a.responseText;
150
+ } catch {
151
+ }
152
+ o.readyState = 3, o.responseText = s, o.onprogress();
153
+ }
154
+ }, r = function(s, u) {
155
+ if ((u == null || u.preventDefault == null) && (u = {
156
+ preventDefault: N
157
+ }), i(), v === 1 || v === 2 || v === 3) {
158
+ if (v = 4, d !== 0 && (ie(d), d = 0), o.readyState = 4, s === "load")
159
+ o.onload(u);
160
+ else if (s === "error")
161
+ o.onerror(u);
162
+ else if (s === "abort")
163
+ o.onabort(u);
164
+ else
165
+ throw new TypeError();
166
+ o.onreadystatechange();
167
+ }
168
+ }, c = function(s) {
169
+ a != null && (a.readyState === 4 ? (!("onload" in a) || !("onerror" in a) || !("onabort" in a)) && r(a.responseText === "" ? "error" : "load", s) : a.readyState === 3 ? "onprogress" in a || i() : a.readyState === 2 && t());
170
+ }, h = function() {
171
+ d = V(function() {
172
+ h();
173
+ }, 500), a.readyState === 3 && i();
174
+ };
175
+ "onload" in a && (a.onload = function(s) {
176
+ r("load", s);
177
+ }), "onerror" in a && (a.onerror = function(s) {
178
+ r("error", s);
179
+ }), "onabort" in a && (a.onabort = function(s) {
180
+ r("abort", s);
181
+ }), "onprogress" in a && (a.onprogress = i), "onreadystatechange" in a && (a.onreadystatechange = function(s) {
182
+ c(s);
183
+ }), ("contentType" in a || !("ontimeout" in E.prototype)) && (n += (n.indexOf("?") === -1 ? "?" : "&") + "padding=true"), a.open(e, n, !0), "readyState" in a && (d = V(function() {
184
+ h();
185
+ }, 0));
186
+ }, z.prototype.abort = function() {
187
+ this._abort(!1);
188
+ }, z.prototype.getResponseHeader = function(e) {
189
+ return this._contentType;
190
+ }, z.prototype.setRequestHeader = function(e, n) {
191
+ var o = this._xhr;
192
+ "setRequestHeader" in o && o.setRequestHeader(e, n);
193
+ }, z.prototype.getAllResponseHeaders = function() {
194
+ return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
195
+ }, z.prototype.send = function() {
196
+ if ((!("ontimeout" in E.prototype) || !("sendAsBinary" in E.prototype) && !("mozAnon" in E.prototype)) && F != null && F.readyState != null && F.readyState !== "complete") {
197
+ var e = this;
198
+ e._sendTimeout = V(function() {
199
+ e._sendTimeout = 0, e.send();
200
+ }, 4);
201
+ return;
202
+ }
203
+ var n = this._xhr;
204
+ "withCredentials" in n && (n.withCredentials = this.withCredentials);
205
+ try {
206
+ n.send(void 0);
207
+ } catch (o) {
208
+ throw o;
209
+ }
210
+ };
211
+ function Fe(e) {
212
+ return e.replace(/[A-Z]/g, function(n) {
213
+ return String.fromCharCode(n.charCodeAt(0) + 32);
214
+ });
215
+ }
216
+ function pe(e) {
217
+ for (var n = /* @__PURE__ */ Object.create(null), o = e.split(`\r
218
+ `), a = 0; a < o.length; a += 1) {
219
+ var v = o[a], d = v.split(": "), t = d.shift(), i = d.join(": ");
220
+ n[Fe(t)] = i;
221
+ }
222
+ this._map = n;
223
+ }
224
+ pe.prototype.get = function(e) {
225
+ return this._map[Fe(e)];
226
+ }, E != null && E.HEADERS_RECEIVED == null && (E.HEADERS_RECEIVED = 2);
227
+ function Oe() {
228
+ }
229
+ Oe.prototype.open = function(e, n, o, a, v, d, t) {
230
+ e.open("GET", v);
231
+ var i = 0;
232
+ e.onprogress = function() {
233
+ var c = e.responseText, h = c.slice(i);
234
+ i += h.length, o(h);
235
+ }, e.onerror = function(c) {
236
+ c.preventDefault(), a(new Error("NetworkError"));
237
+ }, e.onload = function() {
238
+ a(null);
239
+ }, e.onabort = function() {
240
+ a(null);
241
+ }, e.onreadystatechange = function() {
242
+ if (e.readyState === E.HEADERS_RECEIVED) {
243
+ var c = e.status, h = e.statusText, s = e.getResponseHeader("Content-Type"), u = e.getAllResponseHeaders();
244
+ n(c, h, s, new pe(u));
245
+ }
246
+ }, e.withCredentials = d;
247
+ for (var r in t)
248
+ Object.prototype.hasOwnProperty.call(t, r) && e.setRequestHeader(r, t[r]);
249
+ return e.send(), e;
250
+ };
251
+ function Be(e) {
252
+ this._headers = e;
253
+ }
254
+ Be.prototype.get = function(e) {
255
+ return this._headers.get(e);
256
+ };
257
+ function Ie() {
258
+ }
259
+ Ie.prototype.open = function(e, n, o, a, v, d, t) {
260
+ var i = null, r = new Y(), c = r.signal, h = new Q();
261
+ return M(v, {
262
+ headers: t,
263
+ credentials: d ? "include" : "same-origin",
264
+ signal: c,
265
+ cache: "no-store"
266
+ }).then(function(s) {
267
+ return i = s.body.getReader(), n(s.status, s.statusText, s.headers.get("Content-Type"), new Be(s.headers)), new qe(function(u, _) {
268
+ var x = function() {
269
+ i.read().then(function(g) {
270
+ if (g.done)
271
+ u(void 0);
272
+ else {
273
+ var y = h.decode(g.value, { stream: !0 });
274
+ o(y), x();
275
+ }
276
+ }).catch(function(g) {
277
+ _(g);
278
+ });
279
+ };
280
+ x();
281
+ });
282
+ }).catch(function(s) {
283
+ if (s.name !== "AbortError")
284
+ return s;
285
+ }).then(function(s) {
286
+ a(s);
287
+ }), {
288
+ abort: function() {
289
+ i?.cancel(), r.abort();
290
+ }
291
+ };
292
+ };
293
+ function ge() {
294
+ this._listeners = /* @__PURE__ */ Object.create(null);
295
+ }
296
+ function We(e) {
297
+ V(function() {
298
+ throw e;
299
+ }, 0);
300
+ }
301
+ ge.prototype.dispatchEvent = function(e) {
302
+ e.target = this;
303
+ var n = this._listeners[e.type];
304
+ if (n != null)
305
+ for (var o = n.length, a = 0; a < o; a += 1) {
306
+ var v = n[a];
307
+ try {
308
+ typeof v.handleEvent == "function" ? v.handleEvent(e) : v.call(this, e);
309
+ } catch (d) {
310
+ We(d);
311
+ }
312
+ }
313
+ }, ge.prototype.addEventListener = function(e, n) {
314
+ e = String(e);
315
+ var o = this._listeners, a = o[e];
316
+ a == null && (a = [], o[e] = a);
317
+ for (var v = !1, d = 0; d < a.length; d += 1)
318
+ a[d] === n && (v = !0);
319
+ v || a.push(n);
320
+ }, ge.prototype.removeEventListener = function(e, n) {
321
+ e = String(e);
322
+ var o = this._listeners, a = o[e];
323
+ if (a != null) {
324
+ for (var v = [], d = 0; d < a.length; d += 1)
325
+ a[d] !== n && v.push(a[d]);
326
+ v.length === 0 ? delete o[e] : o[e] = v;
327
+ }
328
+ };
329
+ function de(e) {
330
+ this.type = e, this.target = void 0;
331
+ }
332
+ function me(e, n) {
333
+ de.call(this, e), this.data = n.data, this.lastEventId = n.lastEventId;
334
+ }
335
+ me.prototype = Object.create(de.prototype);
336
+ function ye(e, n) {
337
+ de.call(this, e), this.status = n.status, this.statusText = n.statusText, this.headers = n.headers;
338
+ }
339
+ ye.prototype = Object.create(de.prototype);
340
+ function He(e, n) {
341
+ de.call(this, e), this.error = n.error;
342
+ }
343
+ He.prototype = Object.create(de.prototype);
344
+ var Pe = -1, Z = 0, ee = 1, le = 2, ke = -1, te = 0, be = 1, xe = 2, Me = 3, Re = /^text\/event\-stream(;.*)?$/i, Ge = 1e3, Te = 18e6, Ce = function(e, n) {
345
+ var o = e == null ? n : parseInt(e, 10);
346
+ return o !== o && (o = n), we(o);
347
+ }, we = function(e) {
348
+ return Math.min(Math.max(e, Ge), Te);
349
+ }, ce = function(e, n, o) {
350
+ try {
351
+ typeof n == "function" && n.call(e, o);
352
+ } catch (a) {
353
+ We(a);
354
+ }
355
+ };
356
+ function O(e, n) {
357
+ ge.call(this), n = n || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, Ve(this, e, n);
358
+ }
359
+ function $e() {
360
+ return E != null && "withCredentials" in E.prototype || ae == null ? new E() : new ae();
361
+ }
362
+ var Ue = M != null && ue != null && "body" in ue.prototype;
363
+ function Ve(e, n, o) {
364
+ n = String(n);
365
+ var a = !!o.withCredentials, v = o.lastEventIdQueryParameterName || "lastEventId", d = we(1e3), t = Ce(o.heartbeatTimeout, 45e3), i = "", r = d, c = !1, h = 0, s = o.headers || {}, u = o.Transport, _ = Ue && u == null ? void 0 : new z(u != null ? new u() : $e()), x = u != null && typeof u != "string" ? new u() : _ == null ? new Ie() : new Oe(), g = void 0, y = 0, S = Pe, X = "", w = "", m = "", P = "", j = te, re = 0, G = 0, Se = function(T, k, I, H) {
366
+ if (S === Z)
367
+ if (T === 200 && I != null && Re.test(I)) {
368
+ S = ee, c = Date.now(), r = d, e.readyState = ee;
369
+ var D = new ye("open", {
370
+ status: T,
371
+ statusText: k,
372
+ headers: H
373
+ });
374
+ e.dispatchEvent(D), ce(e, e.onopen, D);
375
+ } else {
376
+ var C = "";
377
+ T !== 200 ? (k && (k = k.replace(/\s+/g, " ")), C = "EventSource's response has a status " + T + " " + k + " that is not 200. Aborting the connection.") : C = "EventSource's response has a Content-Type specifying an unsupported type: " + (I == null ? "-" : I.replace(/\s+/g, " ")) + ". Aborting the connection.", Ke();
378
+ var D = new ye("error", {
379
+ status: T,
380
+ statusText: k,
381
+ headers: H
382
+ });
383
+ e.dispatchEvent(D), ce(e, e.onerror, D), console.error(C);
384
+ }
385
+ }, Je = function(T) {
386
+ if (S === ee) {
387
+ for (var k = -1, I = 0; I < T.length; I += 1) {
388
+ var H = T.charCodeAt(I);
389
+ (H === 10 || H === 13) && (k = I);
390
+ }
391
+ var D = (k !== -1 ? P : "") + T.slice(0, k + 1);
392
+ P = (k === -1 ? P : "") + T.slice(k + 1), T !== "" && (c = Date.now(), h += T.length);
393
+ for (var C = 0; C < D.length; C += 1) {
394
+ var H = D.charCodeAt(C);
395
+ if (j === ke && H === 10)
396
+ j = te;
397
+ else if (j === ke && (j = te), H === 13 || H === 10) {
398
+ if (j !== te) {
399
+ j === be && (G = C + 1);
400
+ var ne = D.slice(re, G - 1), oe = D.slice(G + (G < C && D.charCodeAt(G) === 32 ? 1 : 0), C);
401
+ ne === "data" ? (X += `
402
+ `, X += oe) : ne === "id" ? w = oe : ne === "event" ? m = oe : ne === "retry" ? (d = Ce(oe, d), r = d) : ne === "heartbeatTimeout" && (t = Ce(oe, t), y !== 0 && (ie(y), y = V(function() {
403
+ Ae();
404
+ }, t)));
405
+ }
406
+ if (j === te) {
407
+ if (X !== "") {
408
+ i = w, m === "" && (m = "message");
409
+ var Ee = new me(m, {
410
+ data: X.slice(1),
411
+ lastEventId: w
412
+ });
413
+ if (e.dispatchEvent(Ee), m === "open" ? ce(e, e.onopen, Ee) : m === "message" ? ce(e, e.onmessage, Ee) : m === "error" && ce(e, e.onerror, Ee), S === le)
414
+ return;
415
+ }
416
+ X = "", m = "";
417
+ }
418
+ j = H === 13 ? ke : te;
419
+ } else
420
+ j === te && (re = C, j = be), j === be ? H === 58 && (G = C + 1, j = xe) : j === xe && (j = Me);
421
+ }
422
+ }
423
+ }, et = function(T) {
424
+ if (S === ee || S === Z) {
425
+ S = Pe, y !== 0 && (ie(y), y = 0), y = V(function() {
426
+ Ae();
427
+ }, r), r = we(Math.min(d * 16, r * 2)), e.readyState = Z;
428
+ var k = new He("error", { error: T });
429
+ e.dispatchEvent(k), ce(e, e.onerror, k), T != null && console.error(T);
430
+ }
431
+ }, Ke = function() {
432
+ S = le, g != null && (g.abort(), g = void 0), y !== 0 && (ie(y), y = 0), e.readyState = le;
433
+ }, Ae = function() {
434
+ if (y = 0, S !== Pe) {
435
+ if (!c && g != null)
436
+ et(new Error("No activity within " + t + " milliseconds. " + (S === Z ? "No response received." : h + " chars received.") + " Reconnecting.")), g != null && (g.abort(), g = void 0);
437
+ else {
438
+ var T = Math.max((c || Date.now()) + t - Date.now(), 1);
439
+ c = !1, y = V(function() {
440
+ Ae();
441
+ }, T);
442
+ }
443
+ return;
444
+ }
445
+ c = !1, h = 0, y = V(function() {
446
+ Ae();
447
+ }, t), S = Z, X = "", m = "", w = i, P = "", re = 0, G = 0, j = te;
448
+ var k = n;
449
+ if (n.slice(0, 5) !== "data:" && n.slice(0, 5) !== "blob:" && i !== "") {
450
+ var I = n.indexOf("?");
451
+ k = I === -1 ? n : n.slice(0, I + 1) + n.slice(I + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(oe, Ee) {
452
+ return Ee === v ? "" : oe;
453
+ }), k += (n.indexOf("?") === -1 ? "?" : "&") + v + "=" + encodeURIComponent(i);
454
+ }
455
+ var H = e.withCredentials, D = {};
456
+ D.Accept = "text/event-stream";
457
+ var C = e.headers;
458
+ if (C != null)
459
+ for (var ne in C)
460
+ Object.prototype.hasOwnProperty.call(C, ne) && (D[ne] = C[ne]);
461
+ try {
462
+ g = x.open(_, Se, Je, et, k, H, D);
463
+ } catch (oe) {
464
+ throw Ke(), oe;
465
+ }
466
+ };
467
+ e.url = n, e.readyState = Z, e.withCredentials = a, e.headers = s, e._close = Ke, Ae();
468
+ }
469
+ O.prototype = Object.create(ge.prototype), O.prototype.CONNECTING = Z, O.prototype.OPEN = ee, O.prototype.CLOSED = le, O.prototype.close = function() {
470
+ this._close();
471
+ }, O.CONNECTING = Z, O.OPEN = ee, O.CLOSED = le, O.prototype.withCredentials = void 0;
472
+ var ze = K;
473
+ E != null && (K == null || !("withCredentials" in K.prototype)) && (ze = O), function(e) {
474
+ {
475
+ var n = e($);
476
+ n !== void 0 && (se.exports = n);
477
+ }
478
+ }(function(e) {
479
+ e.EventSourcePolyfill = O, e.NativeEventSource = K, e.EventSource = ze;
480
+ });
481
+ })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : st : globalThis);
482
+ })(Ze, Ze.exports);
483
+ var wt = Ze.exports, _t = W('<span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span>', 1), jt = W('<p class="svelte-75jgrh"> </p>'), xt = W('<div class="PlayerRankWrapper svelte-75jgrh"><div class="PlayerRankLabels svelte-75jgrh"><span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span></div> <div class="PlayerRankData svelte-75jgrh"><!></div></div>'), St = W('<div class="PlayerRankSkeletonWrapper svelte-75jgrh"><div class="PlayerRankSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PlayerRankSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div></div>'), Et = W('<tr class="SkeletonRow svelte-75jgrh"><td colspan="4" class="SkeletonShimmer svelte-75jgrh"><div class="svelte-75jgrh"></div></td></tr>'), Pt = W('<tr><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td></tr>'), kt = W('<tr class="svelte-75jgrh"><td colspan="4" class="svelte-75jgrh"><div class="EmptyLeaderboard svelte-75jgrh"><p class="svelte-75jgrh"> </p></div></td></tr>'), Rt = W('<span class="PaginationButton Elipsis svelte-75jgrh">...</span>'), Tt = W("<button> </button>"), Ct = W('<div class="PaginationWrapper svelte-75jgrh"><button class="PaginationButton svelte-75jgrh"> </button> <div class="PageNumberWrapper svelte-75jgrh"></div> <button class="PaginationButton svelte-75jgrh"> </button></div>'), At = W('<div class="PaginationSkeleton svelte-75jgrh"><div class="PaginationSkeletonButton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationSkeletonButton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div></div>'), Lt = W('<div class="LeaderboardWrapper svelte-75jgrh"><!> <table class="LeaderboardTable svelte-75jgrh"><thead class="LeaderboardTableHeader svelte-75jgrh"><tr class="svelte-75jgrh"><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th></tr></thead><tbody class="LeaderboardTableBody svelte-75jgrh"><!></tbody></table> <!> <!></div>');
484
+ const Nt = {
485
+ hash: "svelte-75jgrh",
486
+ code: `.svelte-75jgrh,
487
+ .svelte-75jgrh::before,
488
+ .svelte-75jgrh::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.LeaderboardWrapper.svelte-75jgrh {background-color:var(--emw-color-bg-secondary, #333232);border-radius:6px;padding:16px;overflow:hidden;}.PlayerRankWrapper.svelte-75jgrh {display:flex;flex-direction:column;gap:5px;margin-top:20px;.PlayerRankLabels:where(.svelte-75jgrh), .PlayerRankData:where(.svelte-75jgrh) {display:grid;grid-template-columns:1fr 1fr 2fr;padding:6px;color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;font-weight:400;& > span:where(.svelte-75jgrh):last-child{justify-self:end;}p:where(.svelte-75jgrh) {width:max-content;}}.PlayerRankData:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;padding:12px;}}.PaginationWrapper.svelte-75jgrh {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-75jgrh) {display:flex;gap:6px;}.PaginationButton:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;border:none;outline:none;padding:10px;width:auto;cursor:pointer;&.Number {background-color:transparent;min-width:0;padding:0 10px;}&:hover {background-color:var(--emw-color-bg-elements, #4A4A4A);cursor:pointer;}&:active {transform:scale(0.9);}&:disabled {opacity:60%;pointer-events:none;}&.Active {background-color:var(--emw-color-bg-elements, #4A4A4A);}&.Elipsis {pointer-events:none;background-color:transparent;min-width:0;padding:0;align-self:center;}}}.LeaderboardTable.svelte-75jgrh {border-collapse:separate;border-spacing:0 12px;width:100%;table-layout:fixed;overflow:hidden;.PlayerRow:where(.svelte-75jgrh) {color:#F9C408;}thead:where(.svelte-75jgrh) th:where(.svelte-75jgrh) {background:transparent;padding:6px 16px;text-align:center;font-weight:400;color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;}tbody:where(.svelte-75jgrh) tr:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;font-weight:500;&:last-child{justify-self:end;}}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh) {padding:12px;background-color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):first-child {border-top-left-radius:8px;border-bottom-left-radius:8px;width:15%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(2) {width:35%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(3) {width:20%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):last-child {border-top-right-radius:8px;border-bottom-right-radius:8px;width:30%;}th:where(.svelte-75jgrh), td:where(.svelte-75jgrh) {text-align:center;vertical-align:middle;}tbody:where(.svelte-75jgrh) tr.Gold:where(.svelte-75jgrh){background:linear-gradient(to right, #a2851a, color-mix(in srgb, #a2851a 50%, var(--emw-color-bg-secondary, #434343) 50%), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Silver:where(.svelte-75jgrh) {background:linear-gradient(to right, #b0aeae, color-mix(in srgb, #b0aeae, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Bronze:where(.svelte-75jgrh) {background:linear-gradient(to right, #ac763c, color-mix(in srgb, #ac763c, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}}.EmptyLeaderboard.svelte-75jgrh {background-color:var(--emw-color-bg-secondary, #333232);color:var(--emw-color-typography-secondary, #bdbdbd);width:100%;border-radius:8px;margin:10px 0;text-align:center;padding:10px 0;}.SkeletonRow.svelte-75jgrh {height:41px;overflow:hidden;}.PlayerRankSkeletonWrapper.svelte-75jgrh {display:flex;justify-content:space-between;width:100%;gap:6px;flex-direction:column;.PlayerRankSkeleton:where(.svelte-75jgrh) {width:100%;height:40px;border-radius:6px;background-color:var(--emw-color-bg-secondary, #333232);border-radius:6px;}}.PaginationSkeleton.svelte-75jgrh {display:flex;justify-content:space-between;gap:6px;.PaginationSkeletonButton:where(.svelte-75jgrh) {width:80px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.PaginationNumberSkeleton:where(.svelte-75jgrh) {width:40px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}}.SkeletonShimmer.svelte-75jgrh {width:100%;height:100%;background:linear-gradient(
489
+ 90deg,
490
+ transparent 0%,
491
+ var(--emw-color-skeleton, #333232) 50%,
492
+ transparent 100%
493
+ );
494
+ animation: svelte-75jgrh-loading 1.5s infinite;transform:translateX(-100%);}
495
+
496
+ @keyframes svelte-75jgrh-loading {
497
+ 0% {
498
+ transform: translateX(-100%);
499
+ }
500
+ 100% {
501
+ transform: translateX(100%);
502
+ }
503
+ }
504
+
505
+ @media (min-width: 1000px) {.ShowPlayersButton.svelte-75jgrh {display:block;width:300px;margin:auto;background-color:var(--emw-color-bg-primary, #212121);}
506
+ }
507
+
508
+ @media (min-width: 750px) {.PaginationWrapper.svelte-75jgrh, .PaginationSkeleton.svelte-75jgrh {justify-content:end;gap:10px;}.PaginationButton.svelte-75jgrh {min-width:75px;}
509
+ }`
510
+ };
511
+ function Dt(se, $) {
512
+ ht($, !0), it(se, Nt);
513
+ const b = () => ut(gt, "$_", V), [V, ie] = vt(), E = Le($, "endpoint"), ae = Le($, "language", 7, "en"), J = Le($, "session"), K = Le($, "tournamentid"), F = Le($, "platform");
514
+ Object.keys(at).forEach((t) => {
515
+ yt(t, at[t]);
516
+ });
517
+ const qe = () => {
518
+ bt(ae());
519
+ };
520
+ dt(() => {
521
+ qe();
522
+ });
523
+ let M = null, ue = he(void 0), Q = he(!1), je = he(!1), Y = he(void 0), U = he(0), B = he(10), fe = he(void 0), N = he(void 0);
524
+ const z = () => {
525
+ if (ye.has(l(me)))
526
+ return;
527
+ q(Q, !0);
528
+ const t = new URL(`${E()}/v1/tournaments/${K()}/leaderboard`), i = new Headers();
529
+ J() && i.append("X-SessionId", J()), t.searchParams.append("language", ae()), t.searchParams.append("platform", F()), t.searchParams.append("pagination", `offset=${l(U)},limit=${l(B)}`), fetch(t).then((r) => r.json()).then((r) => {
530
+ q(ue, r?.items, !0), q(fe, r?.pages, !0), q(N, r?.total, !0), ye.set(l(me), l(ue));
531
+ }).catch((r) => console.log(r)).finally(() => q(Q, !1));
532
+ }, Fe = (t) => {
533
+ const i = JSON.parse(t.data);
534
+ i && i.messageType === "LeaderBoardUpdate" && q(ue, i?.items, !0);
535
+ }, pe = () => {
536
+ M && (M.close(), M = null);
537
+ const t = new URL(`${E()}/v1/tournaments/${K()}/leaderboard/updates`);
538
+ t.searchParams.append("HeartBeat", "false"), t.searchParams.append("language", ae()), t.searchParams.append("filter", "includeUnqualifiedPlayer=true"), t.searchParams.append("pagination", `offset=${l(U)},limit=${l(B)}`), t.searchParams.append("platform", F()), M = new wt.EventSourcePolyfill(t, {
539
+ headers: { accept: "text/event-stream", "X-SessionId": J() }
540
+ }), M.onmessage = Fe;
541
+ }, Oe = () => {
542
+ q(je, !0);
543
+ const t = new URL(`${E()}/v1/tournaments/leaderboard/player`), i = new Headers();
544
+ t.searchParams.append("language", ae()), t.searchParams.append("platform", F()), t.searchParams.append("filter", "includeUnqualifiedPlayer=false"), J() && i.append("X-SessionId", J()), fetch(t, { method: "GET", headers: i }).then((c) => c.json()).then((c) => {
545
+ const h = c?.items?.find((s) => s?.tournament?.id === K());
546
+ q(Y, h?.leaderBoard, !0);
547
+ }).catch((c) => {
548
+ console.log(c);
549
+ }).finally(() => q(je, !1));
550
+ }, Be = () => {
551
+ l(fe)?.next && (q(U, l(U) + l(B)), z(), pe());
552
+ }, Ie = () => {
553
+ l(fe)?.previous && l(U) !== 0 && (q(U, l(U) - l(B)), z(), pe());
554
+ }, ge = (t) => {
555
+ q(U, (t - 1) * l(B)), z(), pe();
556
+ }, de = Qe(() => {
557
+ const t = Math.ceil(l(N) / l(B)), i = Math.floor(l(U) / l(B)) + 1;
558
+ if (t <= 5)
559
+ return Array.from({ length: t }, (c, h) => h + 1);
560
+ const r = [];
561
+ return r.push(1), i <= 3 ? (r.push(2, 3), r.push("..."), r.push(t)) : i >= t - 2 ? (r.push("..."), r.push(t - 2, t - 1, t)) : (r.push("..."), r.push(i - 1, i, i + 1), r.push("..."), r.push(t)), r;
562
+ }), me = Qe(() => Math.floor(l(U) / l(B)) + 1);
563
+ let ye = /* @__PURE__ */ new Map(), He = Qe(() => ye.get(l(me)) ?? []);
564
+ const Pe = (t, i) => {
565
+ const r = [];
566
+ return i && r.push("PlayerRow"), t === 1 && r.push("Gold"), t === 2 && r.push("Silver"), t === 3 && r.push("Bronze"), r.join(" ");
567
+ };
568
+ lt(() => (z(), Oe(), pe(), () => {
569
+ M?.close(), M = null;
570
+ }));
571
+ var Z = {
572
+ get endpoint() {
573
+ return E();
574
+ },
575
+ set endpoint(t) {
576
+ E(t), Ne();
577
+ },
578
+ get language() {
579
+ return ae();
580
+ },
581
+ set language(t = "en") {
582
+ ae(t), Ne();
583
+ },
584
+ get session() {
585
+ return J();
586
+ },
587
+ set session(t) {
588
+ J(t), Ne();
589
+ },
590
+ get tournamentid() {
591
+ return K();
592
+ },
593
+ set tournamentid(t) {
594
+ K(t), Ne();
595
+ },
596
+ get platform() {
597
+ return F();
598
+ },
599
+ set platform(t) {
600
+ F(t), Ne();
601
+ }
602
+ }, ee = Lt(), le = p(ee);
603
+ {
604
+ var ke = (t) => {
605
+ var i = xt(), r = p(i), c = p(r), h = p(c, !0);
606
+ f(c);
607
+ var s = A(c, 2), u = p(s, !0);
608
+ f(s);
609
+ var _ = A(s, 2), x = p(_, !0);
610
+ f(_), f(r);
611
+ var g = A(r, 2), y = p(g);
612
+ {
613
+ var S = (w) => {
614
+ var m = _t(), P = De(m), j = p(P);
615
+ f(P);
616
+ var re = A(P, 2), G = p(re, !0);
617
+ f(re);
618
+ var Se = A(re, 2), Je = p(Se, !0);
619
+ f(Se), ve(() => {
620
+ R(j, `${l(Y).rank ?? ""}.`), R(G, l(Y).score), R(Je, l(Y).prizeName || "-");
621
+ }), L(w, m);
622
+ }, X = (w) => {
623
+ var m = jt(), P = p(m, !0);
624
+ f(m), ve((j) => R(P, j), [() => b()("notEnrolledRank")]), L(w, m);
625
+ };
626
+ _e(y, (w) => {
627
+ l(Y) ? w(S) : w(X, !1);
628
+ });
629
+ }
630
+ f(g), f(i), ve(
631
+ (w, m, P) => {
632
+ R(h, w), R(u, m), R(x, P);
633
+ },
634
+ [
635
+ () => b()("myRanking"),
636
+ () => b()("points"),
637
+ () => b()("prize")
638
+ ]
639
+ ), L(t, i);
640
+ }, te = (t) => {
641
+ var i = St();
642
+ L(t, i);
643
+ };
644
+ _e(le, (t) => {
645
+ l(je) ? t(te, !1) : t(ke);
646
+ });
647
+ }
648
+ var be = A(le, 2), xe = p(be), Me = p(xe), Re = p(Me), Ge = p(Re, !0);
649
+ f(Re);
650
+ var Te = A(Re), Ce = p(Te, !0);
651
+ f(Te);
652
+ var we = A(Te), ce = p(we, !0);
653
+ f(we);
654
+ var O = A(we), $e = p(O, !0);
655
+ f(O), f(Me), f(xe);
656
+ var Ue = A(xe), Ve = p(Ue);
657
+ {
658
+ var ze = (t) => {
659
+ var i = Xe(), r = De(i);
660
+ Ye(r, 17, () => Array(l(B)), tt, (c, h, s, u) => {
661
+ var _ = Et();
662
+ L(c, _);
663
+ }), L(t, i);
664
+ }, e = (t) => {
665
+ var i = Xe(), r = De(i);
666
+ {
667
+ var c = (s) => {
668
+ var u = Xe(), _ = De(u);
669
+ Ye(_, 17, () => l(He), (x) => x.rank, (x, g) => {
670
+ var y = Pt(), S = p(y), X = p(S);
671
+ f(S);
672
+ var w = A(S), m = p(w, !0);
673
+ f(w);
674
+ var P = A(w), j = p(P, !0);
675
+ f(P);
676
+ var re = A(P), G = p(re, !0);
677
+ f(re), f(y), ve(
678
+ (Se) => {
679
+ rt(y, 1, Se, "svelte-75jgrh"), R(X, `${l(g).rank ?? ""}.`), R(m, l(g).shortName || "-"), R(j, l(g).score || "-"), R(G, l(g).prizeName || "-");
680
+ },
681
+ [
682
+ () => mt(Pe(l(g).rank, l(g).rank === l(Y)?.rank))
683
+ ]
684
+ ), L(x, y);
685
+ }), L(s, u);
686
+ }, h = (s) => {
687
+ var u = kt(), _ = p(u), x = p(_), g = p(x), y = p(g, !0);
688
+ f(g), f(x), f(_), f(u), ve((S) => R(y, S), [() => b()("emptyLeaderboard")]), L(s, u);
689
+ };
690
+ _e(
691
+ r,
692
+ (s) => {
693
+ l(ue)?.length > 0 ? s(c) : s(h, !1);
694
+ },
695
+ !0
696
+ );
697
+ }
698
+ L(t, i);
699
+ };
700
+ _e(Ve, (t) => {
701
+ l(Q) ? t(ze) : t(e, !1);
702
+ });
703
+ }
704
+ f(Ue), f(be);
705
+ var n = A(be, 2);
706
+ {
707
+ var o = (t) => {
708
+ var i = Ct(), r = p(i);
709
+ r.__click = Ie;
710
+ var c = p(r, !0);
711
+ f(r);
712
+ var h = A(r, 2);
713
+ Ye(h, 21, () => l(de), tt, (_, x) => {
714
+ var g = Xe(), y = De(g);
715
+ {
716
+ var S = (w) => {
717
+ var m = Rt();
718
+ L(w, m);
719
+ }, X = (w) => {
720
+ var m = Tt();
721
+ let P;
722
+ m.__click = () => ge(l(x));
723
+ var j = p(m, !0);
724
+ f(m), ve(() => {
725
+ P = rt(m, 1, "PaginationButton Number svelte-75jgrh", null, P, { Active: l(x) === l(me) }), R(j, l(x));
726
+ }), L(w, m);
727
+ };
728
+ _e(y, (w) => {
729
+ typeof l(x) != "number" ? w(S) : w(X, !1);
730
+ });
731
+ }
732
+ L(_, g);
733
+ }), f(h);
734
+ var s = A(h, 2);
735
+ s.__click = Be;
736
+ var u = p(s, !0);
737
+ f(s), f(i), ve(
738
+ (_, x) => {
739
+ r.disabled = !l(fe)?.previous, R(c, _), s.disabled = !l(fe)?.next, R(u, x);
740
+ },
741
+ [() => b()("previousButton"), () => b()("nextButton")]
742
+ ), L(t, i);
743
+ };
744
+ _e(n, (t) => {
745
+ !l(Q) && l(N) > l(B) && t(o);
746
+ });
747
+ }
748
+ var a = A(n, 2);
749
+ {
750
+ var v = (t) => {
751
+ var i = At();
752
+ L(t, i);
753
+ };
754
+ _e(a, (t) => {
755
+ l(Q) && t(v);
756
+ });
757
+ }
758
+ f(ee), ve(
759
+ (t, i, r, c) => {
760
+ R(Ge, t), R(Ce, i), R(ce, r), R($e, c);
761
+ },
762
+ [
763
+ () => b()("rank"),
764
+ () => b()("user"),
765
+ () => b()("points"),
766
+ () => b()("prize")
767
+ ]
768
+ ), L(se, ee);
769
+ var d = ct(Z);
770
+ return ie(), d;
771
+ }
772
+ ft(["click"]);
773
+ customElements.define("tournament-leaderboard", pt(
774
+ Dt,
775
+ {
776
+ endpoint: {},
777
+ language: {},
778
+ session: {},
779
+ tournamentid: {},
780
+ platform: {}
781
+ },
782
+ [],
783
+ [],
784
+ !1
785
+ ));
786
+ export {
787
+ Dt as default
788
+ };