@everymatrix/tournaments-banner 0.2.2 → 0.2.4

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,1271 +0,0 @@
1
- import { z as Xe, A as nt, B as ft, c as rt, g as at, a as ht, p as J, C as vt, D as pt, E as Ze, F as gt, G as Pe, q as $e, H as mt, m as ve, j as w, I as yt, J as bt, i as Qe, b as Fe, d as ot, o as Ye, v as K, K as wt, L as _t, h as Je, M as Ke, r as je, N as Tt, s as St, e as Ue, O as Re, f as Ne, t as et, l as We, k as Dt, P as Mt, $ as Et } from "./StatusBadge-DLrMedBp.js";
2
- import { T as xt } from "./TournamentImage-BamdCHr_.js";
3
- typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
4
- }, globalThis.customElements = { define() {
5
- }, get() {
6
- }, whenDefined() {
7
- } });
8
- const Ot = (T, p) => {
9
- window.postMessage(
10
- {
11
- ...p,
12
- type: T
13
- },
14
- window.location.href
15
- );
16
- }, $t = (T, p) => {
17
- Ot(`Tournaments:${T}`, p);
18
- }, Lt = (T, p) => {
19
- $t("viewTournamentDetails", {
20
- tournamentId: T.id,
21
- tournamentName: T.nameOrTitle
22
- });
23
- }, At = (T) => {
24
- const p = new Headers();
25
- return T && p.append("X-SessionId", T), p;
26
- }, Ct = async (T) => {
27
- const p = new URL(`${T.endpoint}/v1/tournaments`);
28
- return p.searchParams.append("language", T.language), p.searchParams.append("sortField", T.sortField ?? "StartTime"), p.searchParams.append("sortOrder", T.sortOrder ?? "desc"), p.searchParams.append("platform", T.platform), (await (await fetch(p, { method: "GET", headers: At(T.session) })).json())?.items ?? [];
29
- }, Ft = async (T) => {
30
- const p = await Ct(T), x = /* @__PURE__ */ new Date();
31
- return p.filter((k) => new Date(k.exhibitionEndTime) > x);
32
- };
33
- var tt = { exports: {} };
34
- /** @license
35
- * eventsource.js
36
- * Available under MIT License (MIT)
37
- * https://github.com/Yaffle/EventSource/
38
- */
39
- (function(T, p) {
40
- (function(x) {
41
- var k = x.setTimeout, ie = x.clearTimeout, C = x.XMLHttpRequest, F = x.XDomainRequest, V = x.ActiveXObject, N = x.EventSource, H = x.document, A = x.Promise, P = x.fetch, se = x.Response, q = x.TextDecoder, S = x.TextEncoder, Se = x.AbortController;
42
- if (typeof window < "u" && typeof H < "u" && !("readyState" in H) && H.body == null && (H.readyState = "loading", window.addEventListener("load", function(e) {
43
- H.readyState = "complete";
44
- }, !1)), C == null && V != null && (C = function() {
45
- return new V("Microsoft.XMLHTTP");
46
- }), Object.create == null && (Object.create = function(e) {
47
- function a() {
48
- }
49
- return a.prototype = e, new a();
50
- }), Date.now || (Date.now = function() {
51
- return (/* @__PURE__ */ new Date()).getTime();
52
- }), Se == null) {
53
- var d = P;
54
- P = function(e, a) {
55
- var s = a.signal;
56
- return d(e, { headers: a.headers, credentials: a.credentials, cache: a.cache }).then(function(o) {
57
- var m = o.body.getReader();
58
- return s._reader = m, s._aborted && s._reader.cancel(), {
59
- status: o.status,
60
- statusText: o.statusText,
61
- headers: o.headers,
62
- body: {
63
- getReader: function() {
64
- return m;
65
- }
66
- }
67
- };
68
- });
69
- }, Se = function() {
70
- this.signal = {
71
- _reader: null,
72
- _aborted: !1
73
- }, this.abort = function() {
74
- this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
75
- };
76
- };
77
- }
78
- function D() {
79
- this.bitsNeeded = 0, this.codePoint = 0;
80
- }
81
- D.prototype.decode = function(e) {
82
- function a(I, U, y) {
83
- if (y === 1)
84
- return I >= 128 >> U && I << U <= 2047;
85
- if (y === 2)
86
- return I >= 2048 >> U && I << U <= 55295 || I >= 57344 >> U && I << U <= 65535;
87
- if (y === 3)
88
- return I >= 65536 >> U && I << U <= 1114111;
89
- throw new Error();
90
- }
91
- function s(I, U) {
92
- if (I === 6 * 1)
93
- return U >> 6 > 15 ? 3 : U > 31 ? 2 : 1;
94
- if (I === 6 * 2)
95
- return U > 15 ? 3 : 2;
96
- if (I === 6 * 3)
97
- return 3;
98
- throw new Error();
99
- }
100
- for (var o = 65533, m = "", h = this.bitsNeeded, E = this.codePoint, G = 0; G < e.length; G += 1) {
101
- var L = e[G];
102
- h !== 0 && (L < 128 || L > 191 || !a(E << 6 | L & 63, h - 6, s(h, E))) && (h = 0, E = o, m += String.fromCharCode(E)), h === 0 ? (L >= 0 && L <= 127 ? (h = 0, E = L) : L >= 192 && L <= 223 ? (h = 6 * 1, E = L & 31) : L >= 224 && L <= 239 ? (h = 6 * 2, E = L & 15) : L >= 240 && L <= 247 ? (h = 6 * 3, E = L & 7) : (h = 0, E = o), h !== 0 && !a(E, h, s(h, E)) && (h = 0, E = o)) : (h -= 6, E = E << 6 | L & 63), h === 0 && (E <= 65535 ? m += String.fromCharCode(E) : (m += String.fromCharCode(55296 + (E - 65535 - 1 >> 10)), m += String.fromCharCode(56320 + (E - 65535 - 1 & 1023))));
103
- }
104
- return this.bitsNeeded = h, this.codePoint = E, m;
105
- };
106
- var Y = function() {
107
- try {
108
- return new q().decode(new S().encode("test"), { stream: !0 }) === "test";
109
- } catch (e) {
110
- console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
111
- }
112
- return !1;
113
- };
114
- (q == null || S == null || !Y()) && (q = D);
115
- var g = function() {
116
- };
117
- function B(e) {
118
- this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = g, this.onload = g, this.onerror = g, this.onreadystatechange = g, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = g;
119
- }
120
- B.prototype.open = function(e, a) {
121
- this._abort(!0);
122
- var s = this, o = this._xhr, m = 1, h = 0;
123
- this._abort = function(y) {
124
- s._sendTimeout !== 0 && (ie(s._sendTimeout), s._sendTimeout = 0), (m === 1 || m === 2 || m === 3) && (m = 4, o.onload = g, o.onerror = g, o.onabort = g, o.onprogress = g, o.onreadystatechange = g, o.abort(), h !== 0 && (ie(h), h = 0), y || (s.readyState = 4, s.onabort(null), s.onreadystatechange())), m = 0;
125
- };
126
- var E = function() {
127
- if (m === 1) {
128
- var y = 0, X = "", Me = void 0;
129
- if ("contentType" in o)
130
- y = 200, X = "OK", Me = o.contentType;
131
- else
132
- try {
133
- y = o.status, X = o.statusText, Me = o.getResponseHeader("Content-Type");
134
- } catch {
135
- y = 0, X = "", Me = void 0;
136
- }
137
- y !== 0 && (m = 2, s.readyState = 2, s.status = y, s.statusText = X, s._contentType = Me, s.onreadystatechange());
138
- }
139
- }, G = function() {
140
- if (E(), m === 2 || m === 3) {
141
- m = 3;
142
- var y = "";
143
- try {
144
- y = o.responseText;
145
- } catch {
146
- }
147
- s.readyState = 3, s.responseText = y, s.onprogress();
148
- }
149
- }, L = function(y, X) {
150
- if ((X == null || X.preventDefault == null) && (X = {
151
- preventDefault: g
152
- }), G(), m === 1 || m === 2 || m === 3) {
153
- if (m = 4, h !== 0 && (ie(h), h = 0), s.readyState = 4, y === "load")
154
- s.onload(X);
155
- else if (y === "error")
156
- s.onerror(X);
157
- else if (y === "abort")
158
- s.onabort(X);
159
- else
160
- throw new TypeError();
161
- s.onreadystatechange();
162
- }
163
- }, I = function(y) {
164
- o != null && (o.readyState === 4 ? (!("onload" in o) || !("onerror" in o) || !("onabort" in o)) && L(o.responseText === "" ? "error" : "load", y) : o.readyState === 3 ? "onprogress" in o || G() : o.readyState === 2 && E());
165
- }, U = function() {
166
- h = k(function() {
167
- U();
168
- }, 500), o.readyState === 3 && G();
169
- };
170
- "onload" in o && (o.onload = function(y) {
171
- L("load", y);
172
- }), "onerror" in o && (o.onerror = function(y) {
173
- L("error", y);
174
- }), "onabort" in o && (o.onabort = function(y) {
175
- L("abort", y);
176
- }), "onprogress" in o && (o.onprogress = G), "onreadystatechange" in o && (o.onreadystatechange = function(y) {
177
- I(y);
178
- }), ("contentType" in o || !("ontimeout" in C.prototype)) && (a += (a.indexOf("?") === -1 ? "?" : "&") + "padding=true"), o.open(e, a, !0), "readyState" in o && (h = k(function() {
179
- U();
180
- }, 0));
181
- }, B.prototype.abort = function() {
182
- this._abort(!1);
183
- }, B.prototype.getResponseHeader = function(e) {
184
- return this._contentType;
185
- }, B.prototype.setRequestHeader = function(e, a) {
186
- var s = this._xhr;
187
- "setRequestHeader" in s && s.setRequestHeader(e, a);
188
- }, B.prototype.getAllResponseHeaders = function() {
189
- return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
190
- }, B.prototype.send = function() {
191
- if ((!("ontimeout" in C.prototype) || !("sendAsBinary" in C.prototype) && !("mozAnon" in C.prototype)) && H != null && H.readyState != null && H.readyState !== "complete") {
192
- var e = this;
193
- e._sendTimeout = k(function() {
194
- e._sendTimeout = 0, e.send();
195
- }, 4);
196
- return;
197
- }
198
- var a = this._xhr;
199
- "withCredentials" in a && (a.withCredentials = this.withCredentials);
200
- try {
201
- a.send(void 0);
202
- } catch (s) {
203
- throw s;
204
- }
205
- };
206
- function Z(e) {
207
- return e.replace(/[A-Z]/g, function(a) {
208
- return String.fromCharCode(a.charCodeAt(0) + 32);
209
- });
210
- }
211
- function ee(e) {
212
- for (var a = /* @__PURE__ */ Object.create(null), s = e.split(`\r
213
- `), o = 0; o < s.length; o += 1) {
214
- var m = s[o], h = m.split(": "), E = h.shift(), G = h.join(": ");
215
- a[Z(E)] = G;
216
- }
217
- this._map = a;
218
- }
219
- ee.prototype.get = function(e) {
220
- return this._map[Z(e)];
221
- }, C != null && C.HEADERS_RECEIVED == null && (C.HEADERS_RECEIVED = 2);
222
- function he() {
223
- }
224
- he.prototype.open = function(e, a, s, o, m, h, E) {
225
- e.open("GET", m);
226
- var G = 0;
227
- e.onprogress = function() {
228
- var I = e.responseText, U = I.slice(G);
229
- G += U.length, s(U);
230
- }, e.onerror = function(I) {
231
- I.preventDefault(), o(new Error("NetworkError"));
232
- }, e.onload = function() {
233
- o(null);
234
- }, e.onabort = function() {
235
- o(null);
236
- }, e.onreadystatechange = function() {
237
- if (e.readyState === C.HEADERS_RECEIVED) {
238
- var I = e.status, U = e.statusText, y = e.getResponseHeader("Content-Type"), X = e.getAllResponseHeaders();
239
- a(I, U, y, new ee(X));
240
- }
241
- }, e.withCredentials = h;
242
- for (var L in E)
243
- Object.prototype.hasOwnProperty.call(E, L) && e.setRequestHeader(L, E[L]);
244
- return e.send(), e;
245
- };
246
- function te(e) {
247
- this._headers = e;
248
- }
249
- te.prototype.get = function(e) {
250
- return this._headers.get(e);
251
- };
252
- function ne() {
253
- }
254
- ne.prototype.open = function(e, a, s, o, m, h, E) {
255
- var G = null, L = new Se(), I = L.signal, U = new q();
256
- return P(m, {
257
- headers: E,
258
- credentials: h ? "include" : "same-origin",
259
- signal: I,
260
- cache: "no-store"
261
- }).then(function(y) {
262
- return G = y.body.getReader(), a(y.status, y.statusText, y.headers.get("Content-Type"), new te(y.headers)), new A(function(X, Me) {
263
- var He = function() {
264
- G.read().then(function(we) {
265
- if (we.done)
266
- X(void 0);
267
- else {
268
- var ge = U.decode(we.value, { stream: !0 });
269
- s(ge), He();
270
- }
271
- }).catch(function(we) {
272
- Me(we);
273
- });
274
- };
275
- He();
276
- });
277
- }).catch(function(y) {
278
- if (y.name !== "AbortError")
279
- return y;
280
- }).then(function(y) {
281
- o(y);
282
- }), {
283
- abort: function() {
284
- G?.cancel(), L.abort();
285
- }
286
- };
287
- };
288
- function O() {
289
- this._listeners = /* @__PURE__ */ Object.create(null);
290
- }
291
- function b(e) {
292
- k(function() {
293
- throw e;
294
- }, 0);
295
- }
296
- O.prototype.dispatchEvent = function(e) {
297
- e.target = this;
298
- var a = this._listeners[e.type];
299
- if (a != null)
300
- for (var s = a.length, o = 0; o < s; o += 1) {
301
- var m = a[o];
302
- try {
303
- typeof m.handleEvent == "function" ? m.handleEvent(e) : m.call(this, e);
304
- } catch (h) {
305
- b(h);
306
- }
307
- }
308
- }, O.prototype.addEventListener = function(e, a) {
309
- e = String(e);
310
- var s = this._listeners, o = s[e];
311
- o == null && (o = [], s[e] = o);
312
- for (var m = !1, h = 0; h < o.length; h += 1)
313
- o[h] === a && (m = !0);
314
- m || o.push(a);
315
- }, O.prototype.removeEventListener = function(e, a) {
316
- e = String(e);
317
- var s = this._listeners, o = s[e];
318
- if (o != null) {
319
- for (var m = [], h = 0; h < o.length; h += 1)
320
- o[h] !== a && m.push(o[h]);
321
- m.length === 0 ? delete s[e] : s[e] = m;
322
- }
323
- };
324
- function W(e) {
325
- this.type = e, this.target = void 0;
326
- }
327
- function re(e, a) {
328
- W.call(this, e), this.data = a.data, this.lastEventId = a.lastEventId;
329
- }
330
- re.prototype = Object.create(W.prototype);
331
- function c(e, a) {
332
- W.call(this, e), this.status = a.status, this.statusText = a.statusText, this.headers = a.headers;
333
- }
334
- c.prototype = Object.create(W.prototype);
335
- function r(e, a) {
336
- W.call(this, e), this.error = a.error;
337
- }
338
- r.prototype = Object.create(W.prototype);
339
- var t = -1, i = 0, n = 1, l = 2, f = -1, v = 0, R = 1, z = 2, Q = 3, u = /^text\/event\-stream(;.*)?$/i, _ = 1e3, j = 18e6, pe = function(e, a) {
340
- var s = e == null ? a : parseInt(e, 10);
341
- return s !== s && (s = a), ue(s);
342
- }, ue = function(e) {
343
- return Math.min(Math.max(e, _), j);
344
- }, $ = function(e, a, s) {
345
- try {
346
- typeof a == "function" && a.call(e, s);
347
- } catch (o) {
348
- b(o);
349
- }
350
- };
351
- function M(e, a) {
352
- O.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, be(this, e, a);
353
- }
354
- function ce() {
355
- return C != null && "withCredentials" in C.prototype || F == null ? new C() : new F();
356
- }
357
- var le = P != null && se != null && "body" in se.prototype;
358
- function be(e, a, s) {
359
- a = String(a);
360
- var o = !!s.withCredentials, m = s.lastEventIdQueryParameterName || "lastEventId", h = ue(1e3), E = pe(s.heartbeatTimeout, 45e3), G = "", L = h, I = !1, U = 0, y = s.headers || {}, X = s.Transport, Me = le && X == null ? void 0 : new B(X != null ? new X() : ce()), He = X != null && typeof X != "string" ? new X() : Me == null ? new ne() : new he(), we = void 0, ge = 0, De = t, Ae = "", ze = "", Ee = "", ke = "", me = v, Be = 0, Le = 0, lt = function(de, oe, _e, Te) {
361
- if (De === i)
362
- if (de === 200 && _e != null && u.test(_e)) {
363
- De = n, I = Date.now(), L = h, e.readyState = n;
364
- var ye = new c("open", {
365
- status: de,
366
- statusText: oe,
367
- headers: Te
368
- });
369
- e.dispatchEvent(ye), $(e, e.onopen, ye);
370
- } else {
371
- var fe = "";
372
- de !== 200 ? (oe && (oe = oe.replace(/\s+/g, " ")), fe = "EventSource's response has a status " + de + " " + oe + " that is not 200. Aborting the connection.") : fe = "EventSource's response has a Content-Type specifying an unsupported type: " + (_e == null ? "-" : _e.replace(/\s+/g, " ")) + ". Aborting the connection.", Ge();
373
- var ye = new c("error", {
374
- status: de,
375
- statusText: oe,
376
- headers: Te
377
- });
378
- e.dispatchEvent(ye), $(e, e.onerror, ye), console.error(fe);
379
- }
380
- }, dt = function(de) {
381
- if (De === n) {
382
- for (var oe = -1, _e = 0; _e < de.length; _e += 1) {
383
- var Te = de.charCodeAt(_e);
384
- (Te === 10 || Te === 13) && (oe = _e);
385
- }
386
- var ye = (oe !== -1 ? ke : "") + de.slice(0, oe + 1);
387
- ke = (oe === -1 ? ke : "") + de.slice(oe + 1), de !== "" && (I = Date.now(), U += de.length);
388
- for (var fe = 0; fe < ye.length; fe += 1) {
389
- var Te = ye.charCodeAt(fe);
390
- if (me === f && Te === 10)
391
- me = v;
392
- else if (me === f && (me = v), Te === 13 || Te === 10) {
393
- if (me !== v) {
394
- me === R && (Le = fe + 1);
395
- var xe = ye.slice(Be, Le - 1), Oe = ye.slice(Le + (Le < fe && ye.charCodeAt(Le) === 32 ? 1 : 0), fe);
396
- xe === "data" ? (Ae += `
397
- `, Ae += Oe) : xe === "id" ? ze = Oe : xe === "event" ? Ee = Oe : xe === "retry" ? (h = pe(Oe, h), L = h) : xe === "heartbeatTimeout" && (E = pe(Oe, E), ge !== 0 && (ie(ge), ge = k(function() {
398
- Ie();
399
- }, E)));
400
- }
401
- if (me === v) {
402
- if (Ae !== "") {
403
- G = ze, Ee === "" && (Ee = "message");
404
- var Ce = new re(Ee, {
405
- data: Ae.slice(1),
406
- lastEventId: ze
407
- });
408
- if (e.dispatchEvent(Ce), Ee === "open" ? $(e, e.onopen, Ce) : Ee === "message" ? $(e, e.onmessage, Ce) : Ee === "error" && $(e, e.onerror, Ce), De === l)
409
- return;
410
- }
411
- Ae = "", Ee = "";
412
- }
413
- me = Te === 13 ? f : v;
414
- } else
415
- me === v && (Be = fe, me = R), me === R ? Te === 58 && (Le = fe + 1, me = z) : me === z && (me = Q);
416
- }
417
- }
418
- }, qe = function(de) {
419
- if (De === n || De === i) {
420
- De = t, ge !== 0 && (ie(ge), ge = 0), ge = k(function() {
421
- Ie();
422
- }, L), L = ue(Math.min(h * 16, L * 2)), e.readyState = i;
423
- var oe = new r("error", { error: de });
424
- e.dispatchEvent(oe), $(e, e.onerror, oe), de != null && console.error(de);
425
- }
426
- }, Ge = function() {
427
- De = l, we != null && (we.abort(), we = void 0), ge !== 0 && (ie(ge), ge = 0), e.readyState = l;
428
- }, Ie = function() {
429
- if (ge = 0, De !== t) {
430
- if (!I && we != null)
431
- qe(new Error("No activity within " + E + " milliseconds. " + (De === i ? "No response received." : U + " chars received.") + " Reconnecting.")), we != null && (we.abort(), we = void 0);
432
- else {
433
- var de = Math.max((I || Date.now()) + E - Date.now(), 1);
434
- I = !1, ge = k(function() {
435
- Ie();
436
- }, de);
437
- }
438
- return;
439
- }
440
- I = !1, U = 0, ge = k(function() {
441
- Ie();
442
- }, E), De = i, Ae = "", Ee = "", ze = G, ke = "", Be = 0, Le = 0, me = v;
443
- var oe = a;
444
- if (a.slice(0, 5) !== "data:" && a.slice(0, 5) !== "blob:" && G !== "") {
445
- var _e = a.indexOf("?");
446
- oe = _e === -1 ? a : a.slice(0, _e + 1) + a.slice(_e + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(Oe, Ce) {
447
- return Ce === m ? "" : Oe;
448
- }), oe += (a.indexOf("?") === -1 ? "?" : "&") + m + "=" + encodeURIComponent(G);
449
- }
450
- var Te = e.withCredentials, ye = {};
451
- ye.Accept = "text/event-stream";
452
- var fe = e.headers;
453
- if (fe != null)
454
- for (var xe in fe)
455
- Object.prototype.hasOwnProperty.call(fe, xe) && (ye[xe] = fe[xe]);
456
- try {
457
- we = He.open(Me, lt, dt, qe, oe, Te, ye);
458
- } catch (Oe) {
459
- throw Ge(), Oe;
460
- }
461
- };
462
- e.url = a, e.readyState = i, e.withCredentials = o, e.headers = y, e._close = Ge, Ie();
463
- }
464
- M.prototype = Object.create(O.prototype), M.prototype.CONNECTING = i, M.prototype.OPEN = n, M.prototype.CLOSED = l, M.prototype.close = function() {
465
- this._close();
466
- }, M.CONNECTING = i, M.OPEN = n, M.CLOSED = l, M.prototype.withCredentials = void 0;
467
- var ae = N;
468
- C != null && (N == null || !("withCredentials" in N.prototype)) && (ae = M), function(e) {
469
- {
470
- var a = e(p);
471
- a !== void 0 && (T.exports = a);
472
- }
473
- }(function(e) {
474
- e.EventSourcePolyfill = M, e.NativeEventSource = N, e.EventSource = ae;
475
- });
476
- })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : Xe : globalThis);
477
- })(tt, tt.exports);
478
- var it = { exports: {} };
479
- (function(T, p) {
480
- (function(x, k) {
481
- T.exports = k();
482
- })(Xe, function() {
483
- var x = 1e3, k = 6e4, ie = 36e5, C = "millisecond", F = "second", V = "minute", N = "hour", H = "day", A = "week", P = "month", se = "quarter", q = "year", S = "date", Se = "Invalid Date", d = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, D = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Y = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(c) {
484
- var r = ["th", "st", "nd", "rd"], t = c % 100;
485
- return "[" + c + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
486
- } }, g = function(c, r, t) {
487
- var i = String(c);
488
- return !i || i.length >= r ? c : "" + Array(r + 1 - i.length).join(t) + c;
489
- }, B = { s: g, z: function(c) {
490
- var r = -c.utcOffset(), t = Math.abs(r), i = Math.floor(t / 60), n = t % 60;
491
- return (r <= 0 ? "+" : "-") + g(i, 2, "0") + ":" + g(n, 2, "0");
492
- }, m: function c(r, t) {
493
- if (r.date() < t.date()) return -c(t, r);
494
- var i = 12 * (t.year() - r.year()) + (t.month() - r.month()), n = r.clone().add(i, P), l = t - n < 0, f = r.clone().add(i + (l ? -1 : 1), P);
495
- return +(-(i + (t - n) / (l ? n - f : f - n)) || 0);
496
- }, a: function(c) {
497
- return c < 0 ? Math.ceil(c) || 0 : Math.floor(c);
498
- }, p: function(c) {
499
- return { M: P, y: q, w: A, d: H, D: S, h: N, m: V, s: F, ms: C, Q: se }[c] || String(c || "").toLowerCase().replace(/s$/, "");
500
- }, u: function(c) {
501
- return c === void 0;
502
- } }, Z = "en", ee = {};
503
- ee[Z] = Y;
504
- var he = "$isDayjsObject", te = function(c) {
505
- return c instanceof W || !(!c || !c[he]);
506
- }, ne = function c(r, t, i) {
507
- var n;
508
- if (!r) return Z;
509
- if (typeof r == "string") {
510
- var l = r.toLowerCase();
511
- ee[l] && (n = l), t && (ee[l] = t, n = l);
512
- var f = r.split("-");
513
- if (!n && f.length > 1) return c(f[0]);
514
- } else {
515
- var v = r.name;
516
- ee[v] = r, n = v;
517
- }
518
- return !i && n && (Z = n), n || !i && Z;
519
- }, O = function(c, r) {
520
- if (te(c)) return c.clone();
521
- var t = typeof r == "object" ? r : {};
522
- return t.date = c, t.args = arguments, new W(t);
523
- }, b = B;
524
- b.l = ne, b.i = te, b.w = function(c, r) {
525
- return O(c, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
526
- };
527
- var W = function() {
528
- function c(t) {
529
- this.$L = ne(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[he] = !0;
530
- }
531
- var r = c.prototype;
532
- return r.parse = function(t) {
533
- this.$d = function(i) {
534
- var n = i.date, l = i.utc;
535
- if (n === null) return /* @__PURE__ */ new Date(NaN);
536
- if (b.u(n)) return /* @__PURE__ */ new Date();
537
- if (n instanceof Date) return new Date(n);
538
- if (typeof n == "string" && !/Z$/i.test(n)) {
539
- var f = n.match(d);
540
- if (f) {
541
- var v = f[2] - 1 || 0, R = (f[7] || "0").substring(0, 3);
542
- return l ? new Date(Date.UTC(f[1], v, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, R)) : new Date(f[1], v, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, R);
543
- }
544
- }
545
- return new Date(n);
546
- }(t), this.init();
547
- }, r.init = function() {
548
- var t = this.$d;
549
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
550
- }, r.$utils = function() {
551
- return b;
552
- }, r.isValid = function() {
553
- return this.$d.toString() !== Se;
554
- }, r.isSame = function(t, i) {
555
- var n = O(t);
556
- return this.startOf(i) <= n && n <= this.endOf(i);
557
- }, r.isAfter = function(t, i) {
558
- return O(t) < this.startOf(i);
559
- }, r.isBefore = function(t, i) {
560
- return this.endOf(i) < O(t);
561
- }, r.$g = function(t, i, n) {
562
- return b.u(t) ? this[i] : this.set(n, t);
563
- }, r.unix = function() {
564
- return Math.floor(this.valueOf() / 1e3);
565
- }, r.valueOf = function() {
566
- return this.$d.getTime();
567
- }, r.startOf = function(t, i) {
568
- var n = this, l = !!b.u(i) || i, f = b.p(t), v = function(ue, $) {
569
- var M = b.w(n.$u ? Date.UTC(n.$y, $, ue) : new Date(n.$y, $, ue), n);
570
- return l ? M : M.endOf(H);
571
- }, R = function(ue, $) {
572
- return b.w(n.toDate()[ue].apply(n.toDate("s"), (l ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), n);
573
- }, z = this.$W, Q = this.$M, u = this.$D, _ = "set" + (this.$u ? "UTC" : "");
574
- switch (f) {
575
- case q:
576
- return l ? v(1, 0) : v(31, 11);
577
- case P:
578
- return l ? v(1, Q) : v(0, Q + 1);
579
- case A:
580
- var j = this.$locale().weekStart || 0, pe = (z < j ? z + 7 : z) - j;
581
- return v(l ? u - pe : u + (6 - pe), Q);
582
- case H:
583
- case S:
584
- return R(_ + "Hours", 0);
585
- case N:
586
- return R(_ + "Minutes", 1);
587
- case V:
588
- return R(_ + "Seconds", 2);
589
- case F:
590
- return R(_ + "Milliseconds", 3);
591
- default:
592
- return this.clone();
593
- }
594
- }, r.endOf = function(t) {
595
- return this.startOf(t, !1);
596
- }, r.$set = function(t, i) {
597
- var n, l = b.p(t), f = "set" + (this.$u ? "UTC" : ""), v = (n = {}, n[H] = f + "Date", n[S] = f + "Date", n[P] = f + "Month", n[q] = f + "FullYear", n[N] = f + "Hours", n[V] = f + "Minutes", n[F] = f + "Seconds", n[C] = f + "Milliseconds", n)[l], R = l === H ? this.$D + (i - this.$W) : i;
598
- if (l === P || l === q) {
599
- var z = this.clone().set(S, 1);
600
- z.$d[v](R), z.init(), this.$d = z.set(S, Math.min(this.$D, z.daysInMonth())).$d;
601
- } else v && this.$d[v](R);
602
- return this.init(), this;
603
- }, r.set = function(t, i) {
604
- return this.clone().$set(t, i);
605
- }, r.get = function(t) {
606
- return this[b.p(t)]();
607
- }, r.add = function(t, i) {
608
- var n, l = this;
609
- t = Number(t);
610
- var f = b.p(i), v = function(Q) {
611
- var u = O(l);
612
- return b.w(u.date(u.date() + Math.round(Q * t)), l);
613
- };
614
- if (f === P) return this.set(P, this.$M + t);
615
- if (f === q) return this.set(q, this.$y + t);
616
- if (f === H) return v(1);
617
- if (f === A) return v(7);
618
- var R = (n = {}, n[V] = k, n[N] = ie, n[F] = x, n)[f] || 1, z = this.$d.getTime() + t * R;
619
- return b.w(z, this);
620
- }, r.subtract = function(t, i) {
621
- return this.add(-1 * t, i);
622
- }, r.format = function(t) {
623
- var i = this, n = this.$locale();
624
- if (!this.isValid()) return n.invalidDate || Se;
625
- var l = t || "YYYY-MM-DDTHH:mm:ssZ", f = b.z(this), v = this.$H, R = this.$m, z = this.$M, Q = n.weekdays, u = n.months, _ = n.meridiem, j = function($, M, ce, le) {
626
- return $ && ($[M] || $(i, l)) || ce[M].slice(0, le);
627
- }, pe = function($) {
628
- return b.s(v % 12 || 12, $, "0");
629
- }, ue = _ || function($, M, ce) {
630
- var le = $ < 12 ? "AM" : "PM";
631
- return ce ? le.toLowerCase() : le;
632
- };
633
- return l.replace(D, function($, M) {
634
- return M || function(ce) {
635
- switch (ce) {
636
- case "YY":
637
- return String(i.$y).slice(-2);
638
- case "YYYY":
639
- return b.s(i.$y, 4, "0");
640
- case "M":
641
- return z + 1;
642
- case "MM":
643
- return b.s(z + 1, 2, "0");
644
- case "MMM":
645
- return j(n.monthsShort, z, u, 3);
646
- case "MMMM":
647
- return j(u, z);
648
- case "D":
649
- return i.$D;
650
- case "DD":
651
- return b.s(i.$D, 2, "0");
652
- case "d":
653
- return String(i.$W);
654
- case "dd":
655
- return j(n.weekdaysMin, i.$W, Q, 2);
656
- case "ddd":
657
- return j(n.weekdaysShort, i.$W, Q, 3);
658
- case "dddd":
659
- return Q[i.$W];
660
- case "H":
661
- return String(v);
662
- case "HH":
663
- return b.s(v, 2, "0");
664
- case "h":
665
- return pe(1);
666
- case "hh":
667
- return pe(2);
668
- case "a":
669
- return ue(v, R, !0);
670
- case "A":
671
- return ue(v, R, !1);
672
- case "m":
673
- return String(R);
674
- case "mm":
675
- return b.s(R, 2, "0");
676
- case "s":
677
- return String(i.$s);
678
- case "ss":
679
- return b.s(i.$s, 2, "0");
680
- case "SSS":
681
- return b.s(i.$ms, 3, "0");
682
- case "Z":
683
- return f;
684
- }
685
- return null;
686
- }($) || f.replace(":", "");
687
- });
688
- }, r.utcOffset = function() {
689
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
690
- }, r.diff = function(t, i, n) {
691
- var l, f = this, v = b.p(i), R = O(t), z = (R.utcOffset() - this.utcOffset()) * k, Q = this - R, u = function() {
692
- return b.m(f, R);
693
- };
694
- switch (v) {
695
- case q:
696
- l = u() / 12;
697
- break;
698
- case P:
699
- l = u();
700
- break;
701
- case se:
702
- l = u() / 3;
703
- break;
704
- case A:
705
- l = (Q - z) / 6048e5;
706
- break;
707
- case H:
708
- l = (Q - z) / 864e5;
709
- break;
710
- case N:
711
- l = Q / ie;
712
- break;
713
- case V:
714
- l = Q / k;
715
- break;
716
- case F:
717
- l = Q / x;
718
- break;
719
- default:
720
- l = Q;
721
- }
722
- return n ? l : b.a(l);
723
- }, r.daysInMonth = function() {
724
- return this.endOf(P).$D;
725
- }, r.$locale = function() {
726
- return ee[this.$L];
727
- }, r.locale = function(t, i) {
728
- if (!t) return this.$L;
729
- var n = this.clone(), l = ne(t, i, !0);
730
- return l && (n.$L = l), n;
731
- }, r.clone = function() {
732
- return b.w(this.$d, this);
733
- }, r.toDate = function() {
734
- return new Date(this.valueOf());
735
- }, r.toJSON = function() {
736
- return this.isValid() ? this.toISOString() : null;
737
- }, r.toISOString = function() {
738
- return this.$d.toISOString();
739
- }, r.toString = function() {
740
- return this.$d.toUTCString();
741
- }, c;
742
- }(), re = W.prototype;
743
- return O.prototype = re, [["$ms", C], ["$s", F], ["$m", V], ["$H", N], ["$W", H], ["$M", P], ["$y", q], ["$D", S]].forEach(function(c) {
744
- re[c[1]] = function(r) {
745
- return this.$g(r, c[0], c[1]);
746
- };
747
- }), O.extend = function(c, r) {
748
- return c.$i || (c(r, W, O), c.$i = !0), O;
749
- }, O.locale = ne, O.isDayjs = te, O.unix = function(c) {
750
- return O(1e3 * c);
751
- }, O.en = ee[Z], O.Ls = ee, O.p = {}, O;
752
- });
753
- })(it);
754
- var Yt = it.exports;
755
- const Rt = /* @__PURE__ */ nt(Yt);
756
- var st = { exports: {} };
757
- (function(T, p) {
758
- (function(x, k) {
759
- T.exports = k();
760
- })(Xe, function() {
761
- var x = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, k = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, ie = /\d/, C = /\d\d/, F = /\d\d?/, V = /\d*[^-_:/,()\s\d]+/, N = {}, H = function(d) {
762
- return (d = +d) + (d > 68 ? 1900 : 2e3);
763
- }, A = function(d) {
764
- return function(D) {
765
- this[d] = +D;
766
- };
767
- }, P = [/[+-]\d\d:?(\d\d)?|Z/, function(d) {
768
- (this.zone || (this.zone = {})).offset = function(D) {
769
- if (!D || D === "Z") return 0;
770
- var Y = D.match(/([+-]|\d\d)/g), g = 60 * Y[1] + (+Y[2] || 0);
771
- return g === 0 ? 0 : Y[0] === "+" ? -g : g;
772
- }(d);
773
- }], se = function(d) {
774
- var D = N[d];
775
- return D && (D.indexOf ? D : D.s.concat(D.f));
776
- }, q = function(d, D) {
777
- var Y, g = N.meridiem;
778
- if (g) {
779
- for (var B = 1; B <= 24; B += 1) if (d.indexOf(g(B, 0, D)) > -1) {
780
- Y = B > 12;
781
- break;
782
- }
783
- } else Y = d === (D ? "pm" : "PM");
784
- return Y;
785
- }, S = { A: [V, function(d) {
786
- this.afternoon = q(d, !1);
787
- }], a: [V, function(d) {
788
- this.afternoon = q(d, !0);
789
- }], Q: [ie, function(d) {
790
- this.month = 3 * (d - 1) + 1;
791
- }], S: [ie, function(d) {
792
- this.milliseconds = 100 * +d;
793
- }], SS: [C, function(d) {
794
- this.milliseconds = 10 * +d;
795
- }], SSS: [/\d{3}/, function(d) {
796
- this.milliseconds = +d;
797
- }], s: [F, A("seconds")], ss: [F, A("seconds")], m: [F, A("minutes")], mm: [F, A("minutes")], H: [F, A("hours")], h: [F, A("hours")], HH: [F, A("hours")], hh: [F, A("hours")], D: [F, A("day")], DD: [C, A("day")], Do: [V, function(d) {
798
- var D = N.ordinal, Y = d.match(/\d+/);
799
- if (this.day = Y[0], D) for (var g = 1; g <= 31; g += 1) D(g).replace(/\[|\]/g, "") === d && (this.day = g);
800
- }], w: [F, A("week")], ww: [C, A("week")], M: [F, A("month")], MM: [C, A("month")], MMM: [V, function(d) {
801
- var D = se("months"), Y = (se("monthsShort") || D.map(function(g) {
802
- return g.slice(0, 3);
803
- })).indexOf(d) + 1;
804
- if (Y < 1) throw new Error();
805
- this.month = Y % 12 || Y;
806
- }], MMMM: [V, function(d) {
807
- var D = se("months").indexOf(d) + 1;
808
- if (D < 1) throw new Error();
809
- this.month = D % 12 || D;
810
- }], Y: [/[+-]?\d+/, A("year")], YY: [C, function(d) {
811
- this.year = H(d);
812
- }], YYYY: [/\d{4}/, A("year")], Z: P, ZZ: P };
813
- function Se(d) {
814
- var D, Y;
815
- D = d, Y = N && N.formats;
816
- for (var g = (d = D.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(O, b, W) {
817
- var re = W && W.toUpperCase();
818
- return b || Y[W] || x[W] || Y[re].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(c, r, t) {
819
- return r || t.slice(1);
820
- });
821
- })).match(k), B = g.length, Z = 0; Z < B; Z += 1) {
822
- var ee = g[Z], he = S[ee], te = he && he[0], ne = he && he[1];
823
- g[Z] = ne ? { regex: te, parser: ne } : ee.replace(/^\[|\]$/g, "");
824
- }
825
- return function(O) {
826
- for (var b = {}, W = 0, re = 0; W < B; W += 1) {
827
- var c = g[W];
828
- if (typeof c == "string") re += c.length;
829
- else {
830
- var r = c.regex, t = c.parser, i = O.slice(re), n = r.exec(i)[0];
831
- t.call(b, n), O = O.replace(n, "");
832
- }
833
- }
834
- return function(l) {
835
- var f = l.afternoon;
836
- if (f !== void 0) {
837
- var v = l.hours;
838
- f ? v < 12 && (l.hours += 12) : v === 12 && (l.hours = 0), delete l.afternoon;
839
- }
840
- }(b), b;
841
- };
842
- }
843
- return function(d, D, Y) {
844
- Y.p.customParseFormat = !0, d && d.parseTwoDigitYear && (H = d.parseTwoDigitYear);
845
- var g = D.prototype, B = g.parse;
846
- g.parse = function(Z) {
847
- var ee = Z.date, he = Z.utc, te = Z.args;
848
- this.$u = he;
849
- var ne = te[1];
850
- if (typeof ne == "string") {
851
- var O = te[2] === !0, b = te[3] === !0, W = O || b, re = te[2];
852
- b && (re = te[2]), N = this.$locale(), !O && re && (N = Y.Ls[re]), this.$d = function(i, n, l, f) {
853
- try {
854
- if (["x", "X"].indexOf(n) > -1) return new Date((n === "X" ? 1e3 : 1) * i);
855
- var v = Se(n)(i), R = v.year, z = v.month, Q = v.day, u = v.hours, _ = v.minutes, j = v.seconds, pe = v.milliseconds, ue = v.zone, $ = v.week, M = /* @__PURE__ */ new Date(), ce = Q || (R || z ? 1 : M.getDate()), le = R || M.getFullYear(), be = 0;
856
- R && !z || (be = z > 0 ? z - 1 : M.getMonth());
857
- var ae, e = u || 0, a = _ || 0, s = j || 0, o = pe || 0;
858
- return ue ? new Date(Date.UTC(le, be, ce, e, a, s, o + 60 * ue.offset * 1e3)) : l ? new Date(Date.UTC(le, be, ce, e, a, s, o)) : (ae = new Date(le, be, ce, e, a, s, o), $ && (ae = f(ae).week($).toDate()), ae);
859
- } catch {
860
- return /* @__PURE__ */ new Date("");
861
- }
862
- }(ee, ne, he, Y), this.init(), re && re !== !0 && (this.$L = this.locale(re).$L), W && ee != this.format(ne) && (this.$d = /* @__PURE__ */ new Date("")), N = {};
863
- } else if (ne instanceof Array) for (var c = ne.length, r = 1; r <= c; r += 1) {
864
- te[1] = ne[r - 1];
865
- var t = Y.apply(this, te);
866
- if (t.isValid()) {
867
- this.$d = t.$d, this.$L = t.$L, this.init();
868
- break;
869
- }
870
- r === c && (this.$d = /* @__PURE__ */ new Date(""));
871
- }
872
- else B.call(this, Z);
873
- };
874
- };
875
- });
876
- })(st);
877
- var Ht = st.exports;
878
- const It = /* @__PURE__ */ nt(Ht);
879
- Rt.extend(It);
880
- const Ve = (T, p = !1) => {
881
- if (typeof T == "boolean") return T;
882
- if (T == null) return p;
883
- if (typeof T == "number") return T !== 0;
884
- const x = String(T).trim().toLowerCase();
885
- return x === "" ? !0 : x !== "false" && x !== "0";
886
- }, Nt = {
887
- en: {
888
- bannerSlideLabel: "Tournament {index} of {total}",
889
- bannerGoToSlide: "Go to tournament {index}"
890
- },
891
- tr: {
892
- bannerSlideLabel: "Turnuva {index} / {total}",
893
- bannerGoToSlide: "{index}. turnuvaya git"
894
- },
895
- da: {
896
- bannerSlideLabel: "Turnering {index} af {total}",
897
- bannerGoToSlide: "Gå til turnering {index}"
898
- }
899
- }, zt = 5e3, kt = 1e3, Pt = !0, jt = !0, Ut = !0, Wt = !0;
900
- var Vt = Ne('<div class="tournaments-banner svelte-h8hbcz"><div class="tournaments-banner__skeleton svelte-h8hbcz" aria-busy="true"></div></div>'), Bt = Ne('<a class="tournaments-banner__slide svelte-h8hbcz"><!></a>'), Gt = Ne('<button type="button"></button>'), Xt = Ne('<div class="tournaments-banner__dots svelte-h8hbcz"></div>'), qt = Ne('<div class="tournaments-banner svelte-h8hbcz" role="region" aria-roledescription="carousel"><div class="tournaments-banner__track svelte-h8hbcz"></div> <!></div>');
901
- const Zt = {
902
- hash: "svelte-h8hbcz",
903
- code: `.tournaments-banner.svelte-h8hbcz {display:flex;flex-direction:column;gap:8px;.tournaments-banner__track:where(.svelte-h8hbcz) {display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar {display:none;}}.tournaments-banner__slide:where(.svelte-h8hbcz) {display:block;flex:0 0 100%;color:inherit;text-decoration:none;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;cursor:pointer;&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:-2px;border-radius:13px;}}.tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:308px;border-radius:13px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));
904
- animation: svelte-h8hbcz-tournaments-banner-pulse 1.5s ease-in-out infinite;}.tournaments-banner__dots:where(.svelte-h8hbcz) {display:flex;justify-content:center;gap:8px;}.tournaments-banner__dot:where(.svelte-h8hbcz) {width:8px;height:8px;padding:0;border:0;border-radius:50%;background:var(--text-subtle, rgba(223, 227, 232, 1));opacity:0.8;cursor:pointer;&.active {background:var(--text-brand, rgba(255, 204, 0, 1));opacity:1;}&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:2px;}}}
905
-
906
- @keyframes svelte-h8hbcz-tournaments-banner-pulse {
907
- 50% {
908
- opacity: 0.4;
909
- }
910
- }
911
-
912
- @media (max-width: 767px) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:160px;}
913
- }
914
-
915
- @media (prefers-reduced-motion: reduce) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__track:where(.svelte-h8hbcz) {scroll-behavior:auto;}.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {
916
- animation: none;}
917
- }`
918
- };
919
- function ut(T, p) {
920
- at(p, !0), ht(T, Zt);
921
- const x = () => Mt(Et, "$_", k), [k, ie] = wt(), C = J(p, "endpoint"), F = J(p, "language", 7, "en"), V = J(p, "session"), N = J(p, "platform"), H = J(p, "translationurl"), A = J(p, "navigationhref", 7, ""), P = J(p, "enableautoplay", 7, void 0), se = J(p, "autoplayinterval", 7, void 0), q = J(p, "pauseoninteraction", 7, void 0), S = J(p, "loop", 7, void 0), Se = J(p, "showdots", 7, void 0);
922
- vt({ withLocale: "en", translations: {} }), pt(Nt), Ze(F()), gt(() => {
923
- H() && _t(H());
924
- }), Pe(() => {
925
- Ze(F());
926
- });
927
- let d = $e(mt([])), D = $e(!0), Y = $e(0), g = $e(null), B = $e(!1), Z = $e(!1), ee = $e(!1), he = $e(!1), te = $e(!1);
928
- const ne = Ye(() => Ve(P(), Pt)), O = Ye(() => Ve(q(), jt)), b = Ye(() => Ve(S(), Ut)), W = Ye(() => Ve(Se(), Wt)), re = Ye(() => Number(se()) > 0 ? Math.max(Number(se()), kt) : zt), c = (u) => `${A().replace(/\/$/, "")}/${u.id}`;
929
- Pe(() => {
930
- const u = {
931
- endpoint: C(),
932
- language: F(),
933
- session: V(),
934
- platform: N()
935
- };
936
- if (!u.endpoint)
937
- return;
938
- let _ = !1;
939
- return ve(D, !0), Ft(u).then((j) => {
940
- _ || (ve(d, j, !0), ve(Y, 0));
941
- }).catch((j) => {
942
- console.log(j), _ || ve(d, [], !0);
943
- }).finally(() => {
944
- _ || ve(D, !1);
945
- }), () => {
946
- _ = !0;
947
- };
948
- }), Pe(() => {
949
- const u = window.matchMedia("(prefers-reduced-motion: reduce)"), _ = () => {
950
- ve(te, u.matches, !0);
951
- }, j = () => {
952
- ve(he, document.visibilityState === "hidden");
953
- };
954
- return _(), j(), u.addEventListener("change", _), document.addEventListener("visibilitychange", j), () => {
955
- u.removeEventListener("change", _), document.removeEventListener("visibilitychange", j);
956
- };
957
- }), Pe(() => {
958
- const u = w(Y), _ = w(d).length, j = w(O) && (w(B) || w(Z) || w(ee)), pe = u >= _ - 1;
959
- if (!w(ne) || _ < 2 || j || w(he) || w(te) || pe && !w(b))
960
- return;
961
- const ue = setTimeout(() => t((u + 1) % _), w(re));
962
- return () => clearTimeout(ue);
963
- });
964
- const r = () => {
965
- !w(g) || !w(g).clientWidth || ve(Y, Math.round(w(g).scrollLeft / w(g).clientWidth), !0);
966
- }, t = (u) => {
967
- w(g)?.scrollTo({ left: u * w(g).clientWidth, behavior: "smooth" });
968
- }, i = (u) => {
969
- ve(Z, u.target.matches(":focus-visible"), !0);
970
- }, n = (u, _) => {
971
- A() || (u.preventDefault(), Lt(_));
972
- };
973
- var l = {
974
- get endpoint() {
975
- return C();
976
- },
977
- set endpoint(u) {
978
- C(u), K();
979
- },
980
- get language() {
981
- return F();
982
- },
983
- set language(u = "en") {
984
- F(u), K();
985
- },
986
- get session() {
987
- return V();
988
- },
989
- set session(u) {
990
- V(u), K();
991
- },
992
- get platform() {
993
- return N();
994
- },
995
- set platform(u) {
996
- N(u), K();
997
- },
998
- get translationurl() {
999
- return H();
1000
- },
1001
- set translationurl(u) {
1002
- H(u), K();
1003
- },
1004
- get navigationhref() {
1005
- return A();
1006
- },
1007
- set navigationhref(u = "") {
1008
- A(u), K();
1009
- },
1010
- get enableautoplay() {
1011
- return P();
1012
- },
1013
- set enableautoplay(u = void 0) {
1014
- P(u), K();
1015
- },
1016
- get autoplayinterval() {
1017
- return se();
1018
- },
1019
- set autoplayinterval(u = void 0) {
1020
- se(u), K();
1021
- },
1022
- get pauseoninteraction() {
1023
- return q();
1024
- },
1025
- set pauseoninteraction(u = void 0) {
1026
- q(u), K();
1027
- },
1028
- get loop() {
1029
- return S();
1030
- },
1031
- set loop(u = void 0) {
1032
- S(u), K();
1033
- },
1034
- get showdots() {
1035
- return Se();
1036
- },
1037
- set showdots(u = void 0) {
1038
- Se(u), K();
1039
- }
1040
- }, f = yt(), v = bt(f);
1041
- {
1042
- var R = (u) => {
1043
- var _ = Vt();
1044
- Fe(u, _);
1045
- }, z = (u) => {
1046
- var _ = qt(), j = Je(_);
1047
- Ke(j, 23, () => w(d), ($) => $.id, ($, M, ce) => {
1048
- var le = Bt(), be = Je(le);
1049
- {
1050
- let ae = Ye(() => w(ce) === 0);
1051
- xt(be, {
1052
- variant: "banner",
1053
- get priority() {
1054
- return w(ae);
1055
- },
1056
- get src() {
1057
- return w(M).thumbnail;
1058
- },
1059
- get alt() {
1060
- return w(M).nameOrTitle;
1061
- },
1062
- get state() {
1063
- return w(M).state;
1064
- },
1065
- get startTime() {
1066
- return w(M).startTime;
1067
- },
1068
- get endTime() {
1069
- return w(M).endTime;
1070
- },
1071
- get language() {
1072
- return F();
1073
- }
1074
- });
1075
- }
1076
- je(le), et(
1077
- (ae, e) => {
1078
- We(le, "href", ae), We(le, "aria-label", e);
1079
- },
1080
- [
1081
- () => A() ? c(w(M)) : "#",
1082
- () => `${w(M).nameOrTitle} – ${x()("bannerSlideLabel", {
1083
- values: { index: w(ce) + 1, total: w(d).length }
1084
- })}`
1085
- ]
1086
- ), Re("click", le, (ae) => n(ae, w(M))), Fe($, le);
1087
- }), je(j), Tt(j, ($) => ve(g, $), () => w(g));
1088
- var pe = St(j, 2);
1089
- {
1090
- var ue = ($) => {
1091
- var M = Xt();
1092
- Ke(M, 23, () => w(d), (ce) => ce.id, (ce, le, be) => {
1093
- var ae = Gt();
1094
- let e;
1095
- et(
1096
- (a) => {
1097
- e = Dt(ae, 1, "tournaments-banner__dot svelte-h8hbcz", null, e, { active: w(be) === w(Y) }), We(ae, "aria-label", a), We(ae, "aria-current", w(be) === w(Y) ? "true" : void 0);
1098
- },
1099
- [
1100
- () => x()("bannerGoToSlide", { values: { index: w(be) + 1 } })
1101
- ]
1102
- ), Re("click", ae, () => t(w(be))), Fe(ce, ae);
1103
- }), je(M), Fe($, M);
1104
- };
1105
- Qe(pe, ($) => {
1106
- w(W) && w(d).length > 1 && $(ue);
1107
- });
1108
- }
1109
- je(_), Ue("mouseenter", _, () => ve(B, !0)), Ue("mouseleave", _, () => ve(B, !1)), Re("focusin", _, i), Re("focusout", _, () => ve(Z, !1)), Re("touchstart", _, () => ve(ee, !0)), Re("touchend", _, () => ve(ee, !1)), Ue("touchcancel", _, () => ve(ee, !1)), Ue("scroll", j, r), Fe(u, _);
1110
- };
1111
- Qe(v, (u) => {
1112
- w(D) ? u(R) : w(d).length && u(z, 1);
1113
- });
1114
- }
1115
- Fe(T, f);
1116
- var Q = ot(l);
1117
- return ie(), Q;
1118
- }
1119
- ft(["focusin", "focusout", "touchstart", "touchend", "click"]);
1120
- rt(
1121
- ut,
1122
- {
1123
- endpoint: {},
1124
- language: {},
1125
- session: {},
1126
- platform: {},
1127
- translationurl: {},
1128
- navigationhref: {},
1129
- enableautoplay: {},
1130
- autoplayinterval: {},
1131
- pauseoninteraction: {},
1132
- loop: {},
1133
- showdots: {}
1134
- },
1135
- [],
1136
- [],
1137
- { mode: "open" }
1138
- );
1139
- function ct(T, p) {
1140
- at(p, !0);
1141
- let x = J(p, "endpoint"), k = J(p, "language", 7, "en"), ie = J(p, "session"), C = J(p, "platform"), F = J(p, "translationurl"), V = J(p, "navigationhref"), N = J(p, "enableautoplay"), H = J(p, "autoplayinterval"), A = J(p, "pauseoninteraction"), P = J(p, "loop"), se = J(p, "showdots");
1142
- var q = {
1143
- get endpoint() {
1144
- return x();
1145
- },
1146
- set endpoint(S) {
1147
- x(S), K();
1148
- },
1149
- get language() {
1150
- return k();
1151
- },
1152
- set language(S = "en") {
1153
- k(S), K();
1154
- },
1155
- get session() {
1156
- return ie();
1157
- },
1158
- set session(S) {
1159
- ie(S), K();
1160
- },
1161
- get platform() {
1162
- return C();
1163
- },
1164
- set platform(S) {
1165
- C(S), K();
1166
- },
1167
- get translationurl() {
1168
- return F();
1169
- },
1170
- set translationurl(S) {
1171
- F(S), K();
1172
- },
1173
- get navigationhref() {
1174
- return V();
1175
- },
1176
- set navigationhref(S) {
1177
- V(S), K();
1178
- },
1179
- get enableautoplay() {
1180
- return N();
1181
- },
1182
- set enableautoplay(S) {
1183
- N(S), K();
1184
- },
1185
- get autoplayinterval() {
1186
- return H();
1187
- },
1188
- set autoplayinterval(S) {
1189
- H(S), K();
1190
- },
1191
- get pauseoninteraction() {
1192
- return A();
1193
- },
1194
- set pauseoninteraction(S) {
1195
- A(S), K();
1196
- },
1197
- get loop() {
1198
- return P();
1199
- },
1200
- set loop(S) {
1201
- P(S), K();
1202
- },
1203
- get showdots() {
1204
- return se();
1205
- },
1206
- set showdots(S) {
1207
- se(S), K();
1208
- }
1209
- };
1210
- return ut(T, {
1211
- get endpoint() {
1212
- return x();
1213
- },
1214
- get language() {
1215
- return k();
1216
- },
1217
- get session() {
1218
- return ie();
1219
- },
1220
- get platform() {
1221
- return C();
1222
- },
1223
- get translationurl() {
1224
- return F();
1225
- },
1226
- get navigationhref() {
1227
- return V();
1228
- },
1229
- get enableautoplay() {
1230
- return N();
1231
- },
1232
- get autoplayinterval() {
1233
- return H();
1234
- },
1235
- get pauseoninteraction() {
1236
- return A();
1237
- },
1238
- get loop() {
1239
- return P();
1240
- },
1241
- get showdots() {
1242
- return se();
1243
- }
1244
- }), ot(q);
1245
- }
1246
- customElements.define("tournaments-banner", rt(
1247
- ct,
1248
- {
1249
- endpoint: {},
1250
- language: {},
1251
- session: {},
1252
- platform: {},
1253
- translationurl: {},
1254
- navigationhref: {},
1255
- enableautoplay: {},
1256
- autoplayinterval: {},
1257
- pauseoninteraction: {},
1258
- loop: {},
1259
- showdots: {}
1260
- },
1261
- [],
1262
- []
1263
- ));
1264
- const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1265
- __proto__: null,
1266
- default: ct
1267
- }, Symbol.toStringTag, { value: "Module" }));
1268
- export {
1269
- ut as T,
1270
- Kt as a
1271
- };