@everymatrix/tournament-details-page 0.1.7 → 0.1.9

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