@everymatrix/tournament-details-page 0.0.6 → 0.0.7
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.
- package/components/{TournamentDetails-BwBvr-th.cjs → TournamentDetails-C-zS8XGk.cjs} +2 -2
- package/components/{TournamentDetails-DIfQFrc8.js → TournamentDetails-DoBMS_9T.js} +9 -9
- package/components/{TournamentDetails-wSkU01Xy.js → TournamentDetails-qcyLTtSv.js} +9 -9
- package/components/{TournamentDetailsPage-rE5SsAXj.js → TournamentDetailsPage-C2wcS4rg.js} +282 -248
- package/components/{TournamentDetailsPage-9QiBj_5p.js → TournamentDetailsPage-CQFv3xok.js} +269 -235
- package/components/{TournamentDetailsPage-du8_rjJX.cjs → TournamentDetailsPage-CR3ti0az.cjs} +8 -5
- package/components/{TournamentGames-Dxvil6j2.js → TournamentGames-KOJ004rg.js} +108 -104
- package/components/{TournamentGames-EuHRBJf0.js → TournamentGames-xrJB7h-M.js} +85 -81
- package/components/{TournamentGames-o7mTC32n.cjs → TournamentGames-zikPbhES.cjs} +2 -2
- package/components/{TournamentLeaderboard-BgywP9Jb.js → TournamentLeaderboard-BjBItfy9.js} +81 -81
- package/components/{TournamentLeaderboard-m4CZolTW.cjs → TournamentLeaderboard-D9naoaD9.cjs} +4 -4
- package/components/{TournamentLeaderboard-ncHvraaw.js → TournamentLeaderboard-Dc8xv6be.js} +165 -165
- package/es2015/tournament-details-page.cjs +1 -1
- package/es2015/tournament-details-page.js +1 -1
- package/esnext/tournament-details-page.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as He, $ as Ie, p as Fe, g as Xe, h as y, u as pe, s as O, i as Ue, j as g, l as _, m as l, k as G, z as S, C as Je, E as x, B as A, w as a, n as m, q as
|
|
2
|
-
import { g as Ze } from "./TournamentDetailsPage-
|
|
1
|
+
import { b as He, $ as Ie, p as Fe, g as Xe, h as y, u as pe, s as O, i as Ue, j as g, l as _, m as l, k as G, z as S, C as Je, E as x, B as A, w as a, n as m, q as Ke, r as qe, F as Qe, t as w, v as k, e as Ve, f as Ye, x as r, J as X, K as U, I as J, y as K, L as ae, D as me } from "./TournamentDetails-DoBMS_9T.js";
|
|
2
|
+
import { g as Ze } from "./TournamentDetailsPage-C2wcS4rg.js";
|
|
3
3
|
function $e(B, d) {
|
|
4
4
|
He(B, d);
|
|
5
5
|
}
|
|
@@ -18,13 +18,17 @@ const de = {
|
|
|
18
18
|
noAvailableGames: "No games have been configured yet!"
|
|
19
19
|
},
|
|
20
20
|
tr: {
|
|
21
|
-
previousButton: "
|
|
22
|
-
nextButton: "
|
|
21
|
+
previousButton: "Önceki",
|
|
22
|
+
nextButton: "Sonraki",
|
|
23
23
|
casinoTab: "Casino",
|
|
24
|
-
sportsbookTab: "
|
|
24
|
+
sportsbookTab: "Spor Bahisleri",
|
|
25
|
+
gamesDescriptionTitle: "Katılımcı oyunlar",
|
|
26
|
+
gamesDescriptionSubtitle: "Oyunları keşfedin",
|
|
27
|
+
sportsRulesParseError: "Turnuva kuralları ayrıştırma hatası",
|
|
28
|
+
noAvailableGames: "Henüz oyun yapılandırılmamış!"
|
|
25
29
|
}
|
|
26
30
|
}, et = () => typeof window > "u";
|
|
27
|
-
var tt = g('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), at = g('<p class="svelte-p7mf8l"> </p>'), nt = g("<div></div>"),
|
|
31
|
+
var tt = g('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), at = g('<p class="svelte-p7mf8l"> </p>'), nt = g("<div></div>"), st = g('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'), ot = g('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'), rt = g('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'), lt = g("<button> </button>"), it = g('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'), pt = g("<p> </p>"), mt = g('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div></div>'), vt = g('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');
|
|
28
32
|
const dt = {
|
|
29
33
|
hash: "svelte-p7mf8l",
|
|
30
34
|
code: `.svelte-p7mf8l,
|
|
@@ -57,40 +61,40 @@ const dt = {
|
|
|
57
61
|
};
|
|
58
62
|
function ct(B, d) {
|
|
59
63
|
Fe(d, !0), Xe(B, dt);
|
|
60
|
-
const b = () => Je(Qe, "$_", ce), [ce,
|
|
64
|
+
const b = () => Je(Qe, "$_", ce), [ce, ue] = qe(), W = y(d, "initialGames"), q = y(d, "endpoint"), N = y(d, "language", 7, "en"), z = y(d, "session"), R = y(d, "tournamentid"), u = y(d, "gamesLimit", 7, 6), E = y(d, "totalGames"), Q = y(d, "platformProp", 7, null), D = y(d, "tournamentMetadata");
|
|
61
65
|
Object.keys(de).forEach((e) => {
|
|
62
66
|
$e(e, de[e]);
|
|
63
67
|
}), ve(N());
|
|
64
|
-
const
|
|
68
|
+
const fe = () => {
|
|
65
69
|
ve(N());
|
|
66
70
|
};
|
|
67
71
|
pe(() => {
|
|
68
|
-
|
|
72
|
+
fe();
|
|
69
73
|
});
|
|
70
|
-
let L = O(Ue(W() || [])), M = O(!1), c = O(0),
|
|
74
|
+
let L = O(Ue(W() || [])), M = O(!1), c = O(0), C = O(void 0);
|
|
71
75
|
const ge = et() ? Q() ?? "dk" : Ze(window.navigator.userAgent), V = async () => {
|
|
72
76
|
if (Y.has(a(H)))
|
|
73
77
|
return;
|
|
74
78
|
w(M, !0);
|
|
75
|
-
const e = new URL(`${
|
|
79
|
+
const e = new URL(`${q()}/v1/tournaments/${R()}`), t = new Headers();
|
|
76
80
|
z() && t.append("X-SessionId", z());
|
|
77
81
|
const n = { method: "GET", headers: t };
|
|
78
|
-
e.searchParams.append("filter", `id=${
|
|
79
|
-
w(L,
|
|
80
|
-
}).catch((
|
|
82
|
+
e.searchParams.append("filter", `id=${R()}`), e.searchParams.append("language", N()), e.searchParams.append("expand", "games"), e.searchParams.append("pagination", `games(limit=${u()},offset=${a(c)})`), e.searchParams.append("platform", ge), fetch(e, n).then((s) => s.json()).then((s) => {
|
|
83
|
+
w(L, s?.item?.games?.items, !0), Y.set(a(H), a(L));
|
|
84
|
+
}).catch((s) => console.log(s)).finally(() => w(M, !1));
|
|
81
85
|
}, be = () => {
|
|
82
|
-
const e = Math.ceil(E() /
|
|
86
|
+
const e = Math.ceil(E() / u()), t = Math.floor(a(c) / u()) + 1;
|
|
83
87
|
if (e <= 5)
|
|
84
|
-
return Array.from({ length: e }, (
|
|
88
|
+
return Array.from({ length: e }, (s, i) => i + 1);
|
|
85
89
|
const n = [];
|
|
86
90
|
return n.push(1), t <= 3 ? (n.push(2, 3), n.push("..."), n.push(e)) : t >= e - 2 ? (n.push("..."), n.push(e - 2, e - 1, e)) : (n.push("..."), n.push(t - 1, t, t + 1), n.push("..."), n.push(e)), n;
|
|
87
91
|
}, he = () => {
|
|
88
|
-
a(c) < E() && (w(c, a(c) +
|
|
92
|
+
a(c) < E() && (w(c, a(c) + u()), V());
|
|
89
93
|
}, _e = () => {
|
|
90
|
-
a(c) !== 0 && (w(c, a(c) -
|
|
94
|
+
a(c) !== 0 && (w(c, a(c) - u()), V());
|
|
91
95
|
}, xe = (e) => {
|
|
92
|
-
w(c, (e - 1) *
|
|
93
|
-
}, we = ae(be), H = ae(() => Math.floor(a(c) /
|
|
96
|
+
w(c, (e - 1) * u()), V();
|
|
97
|
+
}, we = ae(be), H = ae(() => Math.floor(a(c) / u()) + 1);
|
|
94
98
|
let Y = /* @__PURE__ */ new Map([[1, W()]]), ye = ae(() => Y.get(a(H)) ?? []), P = O("casino");
|
|
95
99
|
const ke = () => {
|
|
96
100
|
if (!D()) return;
|
|
@@ -98,9 +102,9 @@ function ct(B, d) {
|
|
|
98
102
|
let t;
|
|
99
103
|
if (e)
|
|
100
104
|
try {
|
|
101
|
-
t = JSON.parse(e), w(
|
|
105
|
+
t = JSON.parse(e), w(C, t[N()] || t["*"], !0);
|
|
102
106
|
} catch (n) {
|
|
103
|
-
console.log(n), w(
|
|
107
|
+
console.log(n), w(C, `${b()("sportsRulesParseError")}`);
|
|
104
108
|
}
|
|
105
109
|
}, Pe = (e) => {
|
|
106
110
|
window.postMessage(
|
|
@@ -125,10 +129,10 @@ function ct(B, d) {
|
|
|
125
129
|
W(e), k();
|
|
126
130
|
},
|
|
127
131
|
get endpoint() {
|
|
128
|
-
return
|
|
132
|
+
return q();
|
|
129
133
|
},
|
|
130
134
|
set endpoint(e) {
|
|
131
|
-
|
|
135
|
+
q(e), k();
|
|
132
136
|
},
|
|
133
137
|
get language() {
|
|
134
138
|
return N();
|
|
@@ -143,16 +147,16 @@ function ct(B, d) {
|
|
|
143
147
|
z(e), k();
|
|
144
148
|
},
|
|
145
149
|
get tournamentid() {
|
|
146
|
-
return
|
|
150
|
+
return R();
|
|
147
151
|
},
|
|
148
152
|
set tournamentid(e) {
|
|
149
|
-
|
|
153
|
+
R(e), k();
|
|
150
154
|
},
|
|
151
155
|
get gamesLimit() {
|
|
152
|
-
return
|
|
156
|
+
return u();
|
|
153
157
|
},
|
|
154
158
|
set gamesLimit(e = 6) {
|
|
155
|
-
|
|
159
|
+
u(e), k();
|
|
156
160
|
},
|
|
157
161
|
get totalGames() {
|
|
158
162
|
return E();
|
|
@@ -176,65 +180,65 @@ function ct(B, d) {
|
|
|
176
180
|
r(ee);
|
|
177
181
|
var ne = _(ee, 2), Ge = l(ne, !0);
|
|
178
182
|
r(ne), r($);
|
|
179
|
-
var
|
|
183
|
+
var se = _($, 2);
|
|
180
184
|
{
|
|
181
185
|
var Ae = (e) => {
|
|
182
186
|
var t = tt(), n = l(t);
|
|
183
|
-
let
|
|
187
|
+
let s;
|
|
184
188
|
n.__click = () => w(P, "casino");
|
|
185
189
|
var i = l(n, !0);
|
|
186
190
|
r(n);
|
|
187
|
-
var
|
|
191
|
+
var o = _(n, 2);
|
|
188
192
|
let p;
|
|
189
|
-
|
|
190
|
-
var v = l(
|
|
191
|
-
r(
|
|
192
|
-
(h,
|
|
193
|
-
|
|
193
|
+
o.__click = () => w(P, "sports");
|
|
194
|
+
var v = l(o, !0);
|
|
195
|
+
r(o), r(t), S(
|
|
196
|
+
(h, f) => {
|
|
197
|
+
s = A(n, 1, "Tab svelte-p7mf8l", null, s, { Active: a(P) === "casino" }), x(i, h), p = A(o, 1, "Tab svelte-p7mf8l", null, p, { Active: a(P) === "sports" }), x(v, f);
|
|
194
198
|
},
|
|
195
199
|
[() => b()("casinoTab"), () => b()("sportsbookTab")]
|
|
196
200
|
), m(e, t);
|
|
197
201
|
};
|
|
198
|
-
G(
|
|
202
|
+
G(se, (e) => {
|
|
199
203
|
Object.keys(D()).length !== 0 && e(Ae);
|
|
200
204
|
});
|
|
201
205
|
}
|
|
202
|
-
var
|
|
206
|
+
var oe = _(se, 2);
|
|
203
207
|
{
|
|
204
208
|
var Be = (e) => {
|
|
205
209
|
var t = nt();
|
|
206
210
|
let n;
|
|
207
|
-
X(t, 21, () => a(
|
|
208
|
-
var
|
|
209
|
-
r(
|
|
211
|
+
X(t, 21, () => a(C), U, (s, i) => {
|
|
212
|
+
var o = at(), p = l(o);
|
|
213
|
+
r(o), S((v) => x(p, `${a(i).rule ?? ""} ${v ?? ""}`), [() => b()("contribution")]), m(s, o);
|
|
210
214
|
}), r(t), S(() => n = A(t, 1, "TournamentRulesWrapper svelte-p7mf8l", null, n, { Hidden: a(P) === "casino" })), m(e, t);
|
|
211
215
|
};
|
|
212
|
-
G(
|
|
213
|
-
a(
|
|
216
|
+
G(oe, (e) => {
|
|
217
|
+
a(C) && e(Be);
|
|
214
218
|
});
|
|
215
219
|
}
|
|
216
|
-
var I = _(
|
|
220
|
+
var I = _(oe, 2);
|
|
217
221
|
let re;
|
|
218
222
|
var Ne = l(I);
|
|
219
223
|
{
|
|
220
224
|
var De = (e) => {
|
|
221
|
-
var t = J(), n =
|
|
222
|
-
X(n, 17, () => Array(
|
|
223
|
-
var v =
|
|
224
|
-
m(
|
|
225
|
+
var t = J(), n = K(t);
|
|
226
|
+
X(n, 17, () => Array(u()), U, (s, i, o, p) => {
|
|
227
|
+
var v = st();
|
|
228
|
+
m(s, v);
|
|
225
229
|
}), m(e, t);
|
|
226
230
|
}, Me = (e) => {
|
|
227
|
-
var t = J(), n =
|
|
228
|
-
X(n, 17, () => a(ye), U, (
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
var p = l(
|
|
232
|
-
r(
|
|
231
|
+
var t = J(), n = K(t);
|
|
232
|
+
X(n, 17, () => a(ye), U, (s, i) => {
|
|
233
|
+
var o = ot();
|
|
234
|
+
o.__click = () => Pe(a(i));
|
|
235
|
+
var p = l(o), v = l(p), h = _(v, 2), f = l(h), F = l(f, !0);
|
|
236
|
+
r(f), r(h), r(p), r(o), S(
|
|
233
237
|
(te) => {
|
|
234
238
|
me(v, "src", `https:${a(i).thumbnail}`), me(v, "alt", a(i).name), x(F, te);
|
|
235
239
|
},
|
|
236
240
|
[() => b()("play")]
|
|
237
|
-
), m(
|
|
241
|
+
), m(s, o);
|
|
238
242
|
}), m(e, t);
|
|
239
243
|
};
|
|
240
244
|
G(Ne, (e) => {
|
|
@@ -247,59 +251,59 @@ function ct(B, d) {
|
|
|
247
251
|
var je = (e) => {
|
|
248
252
|
var t = it();
|
|
249
253
|
let n;
|
|
250
|
-
var
|
|
251
|
-
|
|
252
|
-
var i = l(
|
|
253
|
-
r(
|
|
254
|
-
var
|
|
255
|
-
X(
|
|
256
|
-
var F = J(), te =
|
|
254
|
+
var s = l(t);
|
|
255
|
+
s.__click = _e;
|
|
256
|
+
var i = l(s, !0);
|
|
257
|
+
r(s);
|
|
258
|
+
var o = _(s, 2);
|
|
259
|
+
X(o, 21, () => a(we), U, (h, f) => {
|
|
260
|
+
var F = J(), te = K(F);
|
|
257
261
|
{
|
|
258
262
|
var ze = (j) => {
|
|
259
263
|
var T = rt();
|
|
260
264
|
m(j, T);
|
|
261
|
-
},
|
|
265
|
+
}, Re = (j) => {
|
|
262
266
|
var T = lt();
|
|
263
267
|
let ie;
|
|
264
|
-
T.__click = () => xe(a(
|
|
265
|
-
var
|
|
268
|
+
T.__click = () => xe(a(f));
|
|
269
|
+
var Ce = l(T, !0);
|
|
266
270
|
r(T), S(() => {
|
|
267
|
-
ie = A(T, 1, "PaginationButton Number svelte-p7mf8l", null, ie, { Active: a(
|
|
271
|
+
ie = A(T, 1, "PaginationButton Number svelte-p7mf8l", null, ie, { Active: a(f) === a(H) }), x(Ce, a(f));
|
|
268
272
|
}), m(j, T);
|
|
269
273
|
};
|
|
270
274
|
G(te, (j) => {
|
|
271
|
-
typeof a(
|
|
275
|
+
typeof a(f) != "number" ? j(ze) : j(Re, !1);
|
|
272
276
|
});
|
|
273
277
|
}
|
|
274
278
|
m(h, F);
|
|
275
|
-
}), r(
|
|
276
|
-
var p = _(
|
|
279
|
+
}), r(o);
|
|
280
|
+
var p = _(o, 2);
|
|
277
281
|
p.__click = he;
|
|
278
282
|
var v = l(p, !0);
|
|
279
283
|
r(p), r(t), S(
|
|
280
|
-
(h,
|
|
281
|
-
n = A(t, 1, "PaginationWrapper svelte-p7mf8l", null, n, { Hidden: a(P) === "sports" }),
|
|
284
|
+
(h, f) => {
|
|
285
|
+
n = A(t, 1, "PaginationWrapper svelte-p7mf8l", null, n, { Hidden: a(P) === "sports" }), s.disabled = a(c) === 0, x(i, h), p.disabled = a(c) >= E() - u(), x(v, f);
|
|
282
286
|
},
|
|
283
287
|
[() => b()("previousButton"), () => b()("nextButton")]
|
|
284
288
|
), m(e, t);
|
|
285
289
|
}, Ee = (e) => {
|
|
286
|
-
var t = J(), n =
|
|
290
|
+
var t = J(), n = K(t);
|
|
287
291
|
{
|
|
288
|
-
var
|
|
289
|
-
var
|
|
292
|
+
var s = (i) => {
|
|
293
|
+
var o = pt();
|
|
290
294
|
let p;
|
|
291
|
-
var v = l(
|
|
292
|
-
r(
|
|
295
|
+
var v = l(o, !0);
|
|
296
|
+
r(o), S(
|
|
293
297
|
(h) => {
|
|
294
|
-
p = A(
|
|
298
|
+
p = A(o, 1, "NoGamesAvailable svelte-p7mf8l", null, p, { Hidden: a(P) === "sports" }), x(v, h);
|
|
295
299
|
},
|
|
296
300
|
[() => b()("noAvailableGames")]
|
|
297
|
-
), m(i,
|
|
301
|
+
), m(i, o);
|
|
298
302
|
};
|
|
299
303
|
G(
|
|
300
304
|
n,
|
|
301
305
|
(i) => {
|
|
302
|
-
!a(M) && a(L)?.length === 0 && i(
|
|
306
|
+
!a(M) && a(L)?.length === 0 && i(s);
|
|
303
307
|
},
|
|
304
308
|
!0
|
|
305
309
|
);
|
|
@@ -329,8 +333,8 @@ function ct(B, d) {
|
|
|
329
333
|
() => b()("gamesDescriptionSubtitle")
|
|
330
334
|
]
|
|
331
335
|
), m(B, Z);
|
|
332
|
-
var We =
|
|
333
|
-
return
|
|
336
|
+
var We = Ke(Se);
|
|
337
|
+
return ue(), We;
|
|
334
338
|
}
|
|
335
339
|
Ve(["click"]);
|
|
336
340
|
customElements.define("tournament-games", Ye(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var K=(h,m,i)=>new Promise((j,A)=>{var y=d=>{try{g(i.next(d))}catch(b){A(b)}},S=d=>{try{g(i.throw(d))}catch(b){A(b)}},g=d=>d.done?j(d.value):Promise.resolve(d.value).then(y,S);g((i=i.apply(h,m)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetails-
|
|
1
|
+
"use strict";var K=(h,m,i)=>new Promise((j,A)=>{var y=d=>{try{g(i.next(d))}catch(b){A(b)}},S=d=>{try{g(i.throw(d))}catch(b){A(b)}},g=d=>d.done?j(d.value):Promise.resolve(d.value).then(y,S);g((i=i.apply(h,m)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetails-C-zS8XGk.cjs"),Pe=require("./TournamentDetailsPage-CR3ti0az.cjs");function Se(h,m){e.addMessages(h,m)}function Q(h){e.$locale.set(h)}const V={en:{previousButton:"Previous",nextButton:"Next",casinoTab:"Casino",sportsbookTab:"Sportsbook",gamesDescriptionTitle:"Participating games",gamesDescriptionSubtitle:"Discover the games",sportsRulesParseError:"Error parsing tournament rules",noAvailableGames:"No games have been configured yet!"},tr:{previousButton:"Önceki",nextButton:"Sonraki",casinoTab:"Casino",sportsbookTab:"Spor Bahisleri",gamesDescriptionTitle:"Katılımcı oyunlar",gamesDescriptionSubtitle:"Oyunları keşfedin",sportsRulesParseError:"Turnuva kuralları ayrıştırma hatası",noAvailableGames:"Henüz oyun yapılandırılmamış!"}},Te=()=>typeof window=="undefined";var Ge=e.from_html('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'),Ae=e.from_html('<p class="svelte-p7mf8l"> </p>'),Be=e.from_html("<div></div>"),Ne=e.from_html('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'),De=e.from_html('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'),Me=e.from_html('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'),je=e.from_html("<button> </button>"),Ee=e.from_html('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'),Oe=e.from_html("<p> </p>"),Le=e.from_html('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div></div>'),We=e.from_html('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');const Re={hash:"svelte-p7mf8l",code:`.svelte-p7mf8l,
|
|
2
2
|
.svelte-p7mf8l::before,
|
|
3
3
|
.svelte-p7mf8l::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.GamesDescription.svelte-p7mf8l {display:flex;flex-direction:column;gap:6px;margin:10px 0;.GamesDescriptionTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:16px;font-weight:600;}.GamesDescriptionSubTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:200;}}.TournamentGamesTabs.svelte-p7mf8l {display:flex;border-radius:50px;background-color:var(--emw-color-bg-section, #434343);padding:6px;margin-bottom:6px;width:100%;justify-content:center;.Tab:where(.svelte-p7mf8l) {padding:5px 20px;color:var(--emw-color-typography, #ffffff);width:100%;border-radius:50px;background-color:transparent;border:none;cursor:pointer;}.Active:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-elements, #4A4A4A);border:none;}}.TournamentRulesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:400;margin:10px 0;}.TournamentGamesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;gap:10px;background-color:var(--emw-color-bg-secondary, #333232);padding:10px;border-radius:6px;}.TournamentGamesContainer.svelte-p7mf8l {display:grid;gap:12px;grid-template-columns:repeat(auto-fit, minmax(min(150px, 100%), 1fr));.TournamentGameThumbnailSkeleton:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;background:linear-gradient(
|
|
4
4
|
to top,
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
|
|
25
25
|
@media (min-width: 750px) {.TournamentGamesTabs.svelte-p7mf8l {width:fit-content;}.PaginationWrapper.svelte-p7mf8l, .PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;}.PaginationButton.svelte-p7mf8l {min-width:75px;}.PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;.PaginationSkeletonButton:where(.svelte-p7mf8l) {width:auto;min-width:55px;}.PaginationNumberSkeleton:where(.svelte-p7mf8l) {width:35px;}}
|
|
26
26
|
|
|
27
|
-
}.Hidden.svelte-p7mf8l {display:none;}`};function Y(h,m){var q;e.push(m,!0),e.append_styles(h,Re);const i=()=>e.store_get(e.$format,"$_",j),[j,A]=e.setup_stores(),y=e.prop(m,"initialGames"),S=e.prop(m,"endpoint"),g=e.prop(m,"language",7,"en"),d=e.prop(m,"session"),b=e.prop(m,"tournamentid"),v=e.prop(m,"gamesLimit",7,6),T=e.prop(m,"totalGames"),E=e.prop(m,"platformProp",7,null),w=e.prop(m,"tournamentMetadata");Object.keys(V).forEach(t=>{Se(t,V[t])}),Q(g());const Z=()=>{Q(g())};e.user_effect(()=>{Z()});let G=e.state(e.proxy(y()||[])),k=e.state(!1),f=e.state(0),
|
|
27
|
+
}.Hidden.svelte-p7mf8l {display:none;}`};function Y(h,m){var q;e.push(m,!0),e.append_styles(h,Re);const i=()=>e.store_get(e.$format,"$_",j),[j,A]=e.setup_stores(),y=e.prop(m,"initialGames"),S=e.prop(m,"endpoint"),g=e.prop(m,"language",7,"en"),d=e.prop(m,"session"),b=e.prop(m,"tournamentid"),v=e.prop(m,"gamesLimit",7,6),T=e.prop(m,"totalGames"),E=e.prop(m,"platformProp",7,null),w=e.prop(m,"tournamentMetadata");Object.keys(V).forEach(t=>{Se(t,V[t])}),Q(g());const Z=()=>{Q(g())};e.user_effect(()=>{Z()});let G=e.state(e.proxy(y()||[])),k=e.state(!1),f=e.state(0),B=e.state(void 0);const $=Te()?(q=E())!=null?q:"dk":Pe.getDevice(window.navigator.userAgent),O=()=>K(this,null,function*(){if(L.has(e.get(N)))return;e.set(k,!0);const t=new URL(`${S()}/v1/tournaments/${b()}`),a=new Headers;d()&&a.append("X-SessionId",d());const n={method:"GET",headers:a};t.searchParams.append("filter",`id=${b()}`),t.searchParams.append("language",g()),t.searchParams.append("expand","games"),t.searchParams.append("pagination",`games(limit=${v()},offset=${e.get(f)})`),t.searchParams.append("platform",$),fetch(t,n).then(r=>r.json()).then(r=>{var o,s;e.set(G,(s=(o=r==null?void 0:r.item)==null?void 0:o.games)==null?void 0:s.items,!0),L.set(e.get(N),e.get(G))}).catch(r=>console.log(r)).finally(()=>e.set(k,!1))}),ee=()=>{const t=Math.ceil(T()/v()),a=Math.floor(e.get(f)/v())+1;if(t<=5)return Array.from({length:t},(r,o)=>o+1);const n=[];return n.push(1),a<=3?(n.push(2,3),n.push("..."),n.push(t)):a>=t-2?(n.push("..."),n.push(t-2,t-1,t)):(n.push("..."),n.push(a-1,a,a+1),n.push("..."),n.push(t)),n},te=()=>{e.get(f)<T()&&(e.set(f,e.get(f)+v()),O())},ae=()=>{e.get(f)!==0&&(e.set(f,e.get(f)-v()),O())},ne=t=>{e.set(f,(t-1)*v()),O()},se=e.user_derived(ee),N=e.user_derived(()=>Math.floor(e.get(f)/v())+1);let L=new Map([[1,y()]]),re=e.user_derived(()=>{var t;return(t=L.get(e.get(N)))!=null?t:[]}),_=e.state("casino");const oe=()=>{var n;if(!w())return;const t=(n=w().sports)==null?void 0:n.rules;let a;if(t)try{a=JSON.parse(t),e.set(B,a[g()]||a["*"],!0)}catch(r){console.log(r),e.set(B,`${i()("sportsRulesParseError")}`)}},le=t=>{window.postMessage({type:"Tournaments:PlayGame",launchUrl:t.launchUrl,id:t.gameId,thumbnail:t.thumbnail,name:t.name},window.location.href)};e.user_effect(()=>{Object.keys(w()).length!==0&&oe()});var ie={get initialGames(){return y()},set initialGames(t){y(t),e.flushSync()},get endpoint(){return S()},set endpoint(t){S(t),e.flushSync()},get language(){return g()},set language(t="en"){g(t),e.flushSync()},get session(){return d()},set session(t){d(t),e.flushSync()},get tournamentid(){return b()},set tournamentid(t){b(t),e.flushSync()},get gamesLimit(){return v()},set gamesLimit(t=6){v(t),e.flushSync()},get totalGames(){return T()},set totalGames(t){T(t),e.flushSync()},get platformProp(){return E()},set platformProp(t=null){E(t),e.flushSync()},get tournamentMetadata(){return w()},set tournamentMetadata(t){w(t),e.flushSync()}},W=We(),R=e.child(W),z=e.child(R),pe=e.child(z,!0);e.reset(z);var C=e.sibling(z,2),me=e.child(C,!0);e.reset(C),e.reset(R);var I=e.sibling(R,2);{var ce=t=>{var a=Ge(),n=e.child(a);let r;n.__click=()=>e.set(_,"casino");var o=e.child(n,!0);e.reset(n);var s=e.sibling(n,2);let l;s.__click=()=>e.set(_,"sports");var p=e.child(s,!0);e.reset(s),e.reset(a),e.template_effect((c,u)=>{r=e.set_class(n,1,"Tab svelte-p7mf8l",null,r,{Active:e.get(_)==="casino"}),e.set_text(o,c),l=e.set_class(s,1,"Tab svelte-p7mf8l",null,l,{Active:e.get(_)==="sports"}),e.set_text(p,u)},[()=>i()("casinoTab"),()=>i()("sportsbookTab")]),e.append(t,a)};e.if_block(I,t=>{Object.keys(w()).length!==0&&t(ce)})}var F=e.sibling(I,2);{var de=t=>{var a=Be();let n;e.each(a,21,()=>e.get(B),e.index,(r,o)=>{var s=Ae(),l=e.child(s);e.reset(s),e.template_effect(p=>{var c;return e.set_text(l,`${(c=e.get(o).rule)!=null?c:""} ${p!=null?p:""}`)},[()=>i()("contribution")]),e.append(r,s)}),e.reset(a),e.template_effect(()=>n=e.set_class(a,1,"TournamentRulesWrapper svelte-p7mf8l",null,n,{Hidden:e.get(_)==="casino"})),e.append(t,a)};e.if_block(F,t=>{e.get(B)&&t(de)})}var D=e.sibling(F,2);let X;var fe=e.child(D);{var ve=t=>{var a=e.comment(),n=e.first_child(a);e.each(n,17,()=>Array(v()),e.index,(r,o,s,l)=>{var p=Ne();e.append(r,p)}),e.append(t,a)},ue=t=>{var a=e.comment(),n=e.first_child(a);e.each(n,17,()=>e.get(re),e.index,(r,o)=>{var s=De();s.__click=()=>le(e.get(o));var l=e.child(s),p=e.child(l),c=e.sibling(p,2),u=e.child(c),M=e.child(u,!0);e.reset(u),e.reset(c),e.reset(l),e.reset(s),e.template_effect(H=>{e.set_attribute(p,"src",`https:${e.get(o).thumbnail}`),e.set_attribute(p,"alt",e.get(o).name),e.set_text(M,H)},[()=>i()("play")]),e.append(r,s)}),e.append(t,a)};e.if_block(fe,t=>{var a;e.get(k)||((a=e.get(G))==null?void 0:a.length)===0?t(ve):t(ue,!1)})}e.reset(D);var U=e.sibling(D,2);{var ge=t=>{var a=Ee();let n;var r=e.child(a);r.__click=ae;var o=e.child(r,!0);e.reset(r);var s=e.sibling(r,2);e.each(s,21,()=>e.get(se),e.index,(c,u)=>{var M=e.comment(),H=e.first_child(M);{var ye=P=>{var x=Me();e.append(P,x)},we=P=>{var x=je();let J;x.__click=()=>ne(e.get(u));var ke=e.child(x,!0);e.reset(x),e.template_effect(()=>{J=e.set_class(x,1,"PaginationButton Number svelte-p7mf8l",null,J,{Active:e.get(u)===e.get(N)}),e.set_text(ke,e.get(u))}),e.append(P,x)};e.if_block(H,P=>{typeof e.get(u)!="number"?P(ye):P(we,!1)})}e.append(c,M)}),e.reset(s);var l=e.sibling(s,2);l.__click=te;var p=e.child(l,!0);e.reset(l),e.reset(a),e.template_effect((c,u)=>{n=e.set_class(a,1,"PaginationWrapper svelte-p7mf8l",null,n,{Hidden:e.get(_)==="sports"}),r.disabled=e.get(f)===0,e.set_text(o,c),l.disabled=e.get(f)>=T()-v(),e.set_text(p,u)},[()=>i()("previousButton"),()=>i()("nextButton")]),e.append(t,a)},he=t=>{var a=e.comment(),n=e.first_child(a);{var r=o=>{var s=Oe();let l;var p=e.child(s,!0);e.reset(s),e.template_effect(c=>{l=e.set_class(s,1,"NoGamesAvailable svelte-p7mf8l",null,l,{Hidden:e.get(_)==="sports"}),e.set_text(p,c)},[()=>i()("noAvailableGames")]),e.append(o,s)};e.if_block(n,o=>{var s;!e.get(k)&&((s=e.get(G))==null?void 0:s.length)===0&&o(r)},!0)}e.append(t,a)};e.if_block(U,t=>{var a;!e.get(k)&&((a=e.get(G))==null?void 0:a.length)>0?t(ge):t(he,!1)})}var be=e.sibling(U,2);{var _e=t=>{var a=Le();e.append(t,a)};e.if_block(be,t=>{e.get(k)&&t(_e)})}e.reset(W),e.template_effect((t,a)=>{e.set_text(pe,t),e.set_text(me,a),X=e.set_class(D,1,"TournamentGamesContainer svelte-p7mf8l",null,X,{Hidden:e.get(_)==="sports"})},[()=>i()("gamesDescriptionTitle"),()=>i()("gamesDescriptionSubtitle")]),e.append(h,W);var xe=e.pop(ie);return A(),xe}e.delegate(["click"]);customElements.define("tournament-games",e.create_custom_element(Y,{initialGames:{},endpoint:{},language:{},session:{},tournamentid:{},gamesLimit:{},totalGames:{},platformProp:{},tournamentMetadata:{}},[],[],!1));exports.default=Y;
|