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