@everymatrix/casino-tournaments-controller 1.54.6 → 1.54.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/components/CasinoTournamentsController-C1dCP4c5.cjs +14 -0
  2. package/components/{CasinoTournamentsController-B6mh3T8V.js → CasinoTournamentsController-CD_5uyUc.js} +499 -507
  3. package/components/CasinoTournamentsController-UUtBZIFh.js +5639 -0
  4. package/components/{CasinoTournamentsFilterController-crq752J3.js → CasinoTournamentsFilterController-C6PNRuAN.js} +20 -20
  5. package/components/CasinoTournamentsFilterController-C8EhVpC4.js +536 -0
  6. package/components/CasinoTournamentsFilterController-CDD660uA.cjs +1 -0
  7. package/components/CasinoTournamentsListController-fm8TCneo.cjs +13 -0
  8. package/components/{CasinoTournamentsListController-BHaCpLNs.js → CasinoTournamentsListController-l8AH-AQy.js} +21 -21
  9. package/components/CasinoTournamentsListController-wgytIhYX.js +3117 -0
  10. package/components/CasinoTournamentsThumbnail-BVAQJY4f.cjs +4 -0
  11. package/components/{CasinoTournamentsThumbnail-BpY5tzvh.js → CasinoTournamentsThumbnail-C1PdhLiD.js} +36 -36
  12. package/components/CasinoTournamentsThumbnail-CfBfOQ6y.js +896 -0
  13. package/components/CasinoTournamentsThumbnailController-B5QfYW6Q.cjs +1 -0
  14. package/components/CasinoTournamentsThumbnailController-DBjAq9-k.js +1417 -0
  15. package/components/{CasinoTournamentsThumbnailController-CmauHmt0.js → CasinoTournamentsThumbnailController-neX5M-sd.js} +73 -73
  16. package/components/{CasinoTournamentsThumbnailDuration-Bl9YXTWz.js → CasinoTournamentsThumbnailDuration-CGgR5XoL.js} +40 -40
  17. package/components/CasinoTournamentsThumbnailDuration-DFP9BWRc.cjs +1 -0
  18. package/components/CasinoTournamentsThumbnailDuration-sMRWK6Da.js +504 -0
  19. package/components/{CasinoTournamentsThumbnailGamesSlider-7LdDhi2Q.js → CasinoTournamentsThumbnailGamesSlider-BUainTMh.js} +37 -37
  20. package/components/CasinoTournamentsThumbnailGamesSlider-Bcgbm6UZ.js +441 -0
  21. package/components/CasinoTournamentsThumbnailGamesSlider-CU3QiSRS.cjs +1 -0
  22. package/components/{CasinoTournamentsThumbnailPrizes-nDu0SMUv.js → CasinoTournamentsThumbnailPrizes-Cb6ucU30.js} +15 -15
  23. package/components/CasinoTournamentsThumbnailPrizes-D5o6hcAd.cjs +1 -0
  24. package/components/CasinoTournamentsThumbnailPrizes-pB7CeUbv.js +315 -0
  25. package/es2015/casino-tournaments-controller.cjs +1 -0
  26. package/es2015/casino-tournaments-controller.js +16 -0
  27. package/esnext/casino-tournaments-controller.js +1 -1
  28. package/package.json +1 -1
@@ -0,0 +1,504 @@
1
+ import { a as K, S as Y, i as Z, s as J, f as C, b as Q, n as U, d as T, c as B, e as v, g as l, j as V, w as X, m as E, o as h, A as $, t as M, p as L, q as tt, C as A, v as et, $ as nt } from "./CasinoTournamentsController-UUtBZIFh.js";
2
+ function N(i, t) {
3
+ K(i, t);
4
+ }
5
+ const O = {
6
+ en: {
7
+ finished: "Finished",
8
+ starting: "Starting in ",
9
+ left: "left",
10
+ minutes: "minutes",
11
+ hours: "hours",
12
+ days: "days"
13
+ },
14
+ hr: {
15
+ finished: "Završeno",
16
+ starting: "Starting in ",
17
+ left: "preostalo",
18
+ minutes: "minute",
19
+ hours: "sati",
20
+ days: "dana"
21
+ },
22
+ "zh-hk": {
23
+ finished: "完成的",
24
+ starting: "開始於",
25
+ left: "剩下",
26
+ minutes: "分鐘",
27
+ hours: "小時",
28
+ days: "天"
29
+ },
30
+ fr: {
31
+ finished: "Fini",
32
+ starting: "Début dans ",
33
+ left: "restant",
34
+ minutes: "minutes",
35
+ hours: "heures",
36
+ days: "jours"
37
+ },
38
+ ro: {
39
+ finished: "Finalizat",
40
+ starting: "Începe în",
41
+ left: "rămase",
42
+ minutes: "minute",
43
+ hours: "ore",
44
+ days: "zile"
45
+ },
46
+ tr: {
47
+ finished: "Bitti",
48
+ starting: "İçinde başlayan",
49
+ left: "sol",
50
+ minutes: "dakika",
51
+ hours: "saat",
52
+ days: "günler"
53
+ },
54
+ el: {
55
+ finished: "Ολοκληρωμένα",
56
+ starting: "Αρχίζει σε ",
57
+ left: "απομένουν",
58
+ minutes: "λεπτά",
59
+ hours: "ώρες",
60
+ days: "ημέρες"
61
+ },
62
+ es: {
63
+ finished: "Finalizado",
64
+ starting: "Iniciando en ",
65
+ left: "queda",
66
+ minutes: "minutos",
67
+ hours: "horas",
68
+ days: "días"
69
+ },
70
+ hu: {
71
+ finished: "Befejezve",
72
+ starting: "Kezdésig",
73
+ left: "bal",
74
+ minutes: "perc",
75
+ hours: "óra",
76
+ days: "nap"
77
+ },
78
+ pt: {
79
+ finished: "Finalizado",
80
+ starting: "Começando em",
81
+ left: "Abandonou",
82
+ minutes: "Minutos",
83
+ hours: "Horas",
84
+ days: "Dias"
85
+ },
86
+ "en-us": {
87
+ finished: "Finished",
88
+ starting: "Starting in ",
89
+ left: "left",
90
+ minutes: "minutes",
91
+ hours: "hours",
92
+ days: "days"
93
+ }
94
+ };
95
+ function it(i) {
96
+ Q(i, "svelte-6h4bfy", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentDates{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate{font-size:11px;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:11px;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 20px;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}");
97
+ }
98
+ function q(i) {
99
+ let t, e, s = (
100
+ /*formatDate*/
101
+ i[10](
102
+ /*startdate*/
103
+ i[0]
104
+ ) + ""
105
+ ), a, u, o, d = (
106
+ /*formatDate*/
107
+ i[10](
108
+ /*enddate*/
109
+ i[1]
110
+ ) + ""
111
+ ), g, S, p, m, D, F, j;
112
+ function I(r, b) {
113
+ return (
114
+ /*status*/
115
+ r[2] == "Finished" || /*status*/
116
+ r[2] == "Closing" || /*status*/
117
+ r[2] == "Closed" ? at : (
118
+ /*tournamentUntilStartDays*/
119
+ r[5] > 0 ? rt : st
120
+ )
121
+ );
122
+ }
123
+ let z = I(i), y = z(i);
124
+ function R(r, b) {
125
+ if (
126
+ /*status*/
127
+ r[2] == "Finished" || /*status*/
128
+ r[2] == "Closing" || /*status*/
129
+ r[2] == "Closed"
130
+ ) return ut;
131
+ if (
132
+ /*tournamentUntilStartDays*/
133
+ r[5] > 0
134
+ ) return ot;
135
+ if (
136
+ /*tournamentLeftDays*/
137
+ r[4] > 0
138
+ ) return lt;
139
+ }
140
+ let k = R(i), f = k && k(i);
141
+ return {
142
+ c() {
143
+ t = v("div"), e = v("div"), a = M(s), u = L(), o = v("div"), g = M(d), S = L(), p = v("div"), m = v("div"), y.c(), D = L(), f && f.c(), l(e, "class", "StartDate"), l(e, "part", "StartDate"), l(o, "class", "EndDate"), l(o, "part", "EndDate"), l(t, "class", "TournamentDates"), l(t, "part", "TournamentDates"), l(m, "class", "ProgressBar"), l(m, "part", "ProgressBar"), l(p, "class", "ProgressBarWrapper"), l(p, "part", "ProgressBarWrapper");
144
+ },
145
+ m(r, b) {
146
+ B(r, t, b), h(t, e), h(e, a), h(t, u), h(t, o), h(o, g), B(r, S, b), B(r, p, b), h(p, m), y.m(m, null), h(m, D), f && f.m(m, null), F || (j = $(
147
+ /*getDuration*/
148
+ i[9].call(null, p)
149
+ ), F = !0);
150
+ },
151
+ p(r, b) {
152
+ b & /*startdate*/
153
+ 1 && s !== (s = /*formatDate*/
154
+ r[10](
155
+ /*startdate*/
156
+ r[0]
157
+ ) + "") && E(a, s), b & /*enddate*/
158
+ 2 && d !== (d = /*formatDate*/
159
+ r[10](
160
+ /*enddate*/
161
+ r[1]
162
+ ) + "") && E(g, d), z === (z = I(r)) && y ? y.p(r, b) : (y.d(1), y = z(r), y && (y.c(), y.m(m, D))), k === (k = R(r)) && f ? f.p(r, b) : (f && f.d(1), f = k && k(r), f && (f.c(), f.m(m, null)));
163
+ },
164
+ d(r) {
165
+ r && (T(t), T(S), T(p)), y.d(), f && f.d(), F = !1, j();
166
+ }
167
+ };
168
+ }
169
+ function st(i) {
170
+ let t;
171
+ return {
172
+ c() {
173
+ t = v("div"), l(t, "class", "ProgressBarFill"), l(t, "part", "ProgressBarFill"), A(
174
+ t,
175
+ "width",
176
+ /*getProgress*/
177
+ i[7]() + "%"
178
+ );
179
+ },
180
+ m(e, s) {
181
+ B(e, t, s);
182
+ },
183
+ p(e, s) {
184
+ s & /*getProgress*/
185
+ 128 && A(
186
+ t,
187
+ "width",
188
+ /*getProgress*/
189
+ e[7]() + "%"
190
+ );
191
+ },
192
+ d(e) {
193
+ e && T(t);
194
+ }
195
+ };
196
+ }
197
+ function rt(i) {
198
+ let t;
199
+ return {
200
+ c() {
201
+ t = v("div"), l(t, "class", "ProgressBarFillStarting"), l(t, "part", "ProgressBarFillStarting");
202
+ },
203
+ m(e, s) {
204
+ B(e, t, s);
205
+ },
206
+ p: U,
207
+ d(e) {
208
+ e && T(t);
209
+ }
210
+ };
211
+ }
212
+ function at(i) {
213
+ let t;
214
+ return {
215
+ c() {
216
+ t = v("div"), l(t, "class", "ProgressBarFillEnd"), l(t, "part", "ProgressBarFillEnd");
217
+ },
218
+ m(e, s) {
219
+ B(e, t, s);
220
+ },
221
+ p: U,
222
+ d(e) {
223
+ e && T(t);
224
+ }
225
+ };
226
+ }
227
+ function lt(i) {
228
+ let t, e, s, a = (
229
+ /*$_*/
230
+ i[8]("left") + ""
231
+ ), u;
232
+ return {
233
+ c() {
234
+ t = v("div"), e = M(
235
+ /*showRemain*/
236
+ i[6]
237
+ ), s = L(), u = M(a), l(t, "class", "Remaining"), l(t, "part", "Remaining");
238
+ },
239
+ m(o, d) {
240
+ B(o, t, d), h(t, e), h(t, s), h(t, u);
241
+ },
242
+ p(o, d) {
243
+ d & /*showRemain*/
244
+ 64 && E(
245
+ e,
246
+ /*showRemain*/
247
+ o[6]
248
+ ), d & /*$_*/
249
+ 256 && a !== (a = /*$_*/
250
+ o[8]("left") + "") && E(u, a);
251
+ },
252
+ d(o) {
253
+ o && T(t);
254
+ }
255
+ };
256
+ }
257
+ function ot(i) {
258
+ let t, e = (
259
+ /*$_*/
260
+ i[8]("starting") + ""
261
+ ), s, a, u = (
262
+ /*getTextByDiff*/
263
+ i[11](
264
+ /*tournamentUntilStartDays*/
265
+ i[5]
266
+ ) + ""
267
+ ), o;
268
+ return {
269
+ c() {
270
+ t = v("div"), s = M(e), a = L(), o = M(u), l(t, "class", "Remaining"), l(t, "part", "Remaining");
271
+ },
272
+ m(d, g) {
273
+ B(d, t, g), h(t, s), h(t, a), h(t, o);
274
+ },
275
+ p(d, g) {
276
+ g & /*$_*/
277
+ 256 && e !== (e = /*$_*/
278
+ d[8]("starting") + "") && E(s, e), g & /*tournamentUntilStartDays*/
279
+ 32 && u !== (u = /*getTextByDiff*/
280
+ d[11](
281
+ /*tournamentUntilStartDays*/
282
+ d[5]
283
+ ) + "") && E(o, u);
284
+ },
285
+ d(d) {
286
+ d && T(t);
287
+ }
288
+ };
289
+ }
290
+ function ut(i) {
291
+ let t, e = (
292
+ /*$_*/
293
+ i[8]("finished") + ""
294
+ ), s;
295
+ return {
296
+ c() {
297
+ t = v("div"), s = M(e), l(t, "class", "Finished"), l(t, "part", "Finished");
298
+ },
299
+ m(a, u) {
300
+ B(a, t, u), h(t, s);
301
+ },
302
+ p(a, u) {
303
+ u & /*$_*/
304
+ 256 && e !== (e = /*$_*/
305
+ a[8]("finished") + "") && E(s, e);
306
+ },
307
+ d(a) {
308
+ a && T(t);
309
+ }
310
+ };
311
+ }
312
+ function dt(i) {
313
+ let t, e = (
314
+ /*startdate*/
315
+ i[0] && /*enddate*/
316
+ i[1] && q(i)
317
+ );
318
+ return {
319
+ c() {
320
+ t = v("div"), e && e.c(), l(t, "class", "TournamentDuration"), l(t, "part", "TournamentDuration");
321
+ },
322
+ m(s, a) {
323
+ B(s, t, a), e && e.m(t, null), i[16](t);
324
+ },
325
+ p(s, [a]) {
326
+ /*startdate*/
327
+ s[0] && /*enddate*/
328
+ s[1] ? e ? e.p(s, a) : (e = q(s), e.c(), e.m(t, null)) : e && (e.d(1), e = null);
329
+ },
330
+ i: U,
331
+ o: U,
332
+ d(s) {
333
+ s && T(t), e && e.d(), i[16](null);
334
+ }
335
+ };
336
+ }
337
+ function ct(i, t, e) {
338
+ let s, a;
339
+ V(i, nt, (n) => e(8, a = n));
340
+ let { startdate: u = "" } = t, { enddate: o = "" } = t, { status: d = "" } = t, { lang: g = "en" } = t, { clientstyling: S = "" } = t, { clientstylingurl: p = "" } = t, { translationurl: m = "" } = t, D, F = "", j = "", I = "";
341
+ const z = () => {
342
+ fetch(m).then((c) => c.json()).then((c) => {
343
+ Object.keys(c).forEach((_) => {
344
+ N(_, c[_]);
345
+ });
346
+ }).catch((c) => {
347
+ console.log(c);
348
+ });
349
+ };
350
+ Object.keys(O).forEach((n) => {
351
+ N(n, O[n]);
352
+ });
353
+ const y = (n) => new Date(n).getTime(), R = (n, c) => (y(c) - y(n)) / (1e3 * 60), k = () => {
354
+ const n = /* @__PURE__ */ new Date();
355
+ e(4, F = R(n, o)), e(5, j = R(n, u)), e(6, I = r(F));
356
+ }, f = (n) => {
357
+ const c = { month: "long" };
358
+ let _ = new Date(n), P = new Intl.DateTimeFormat(g, c).format(_);
359
+ return `${_.getDate()} ${P}, ${_.toLocaleString("en-GB", { hour: "numeric", minute: "numeric" })}, ${_.getUTCFullYear()}`;
360
+ }, r = (n) => {
361
+ const c = (P, w) => P + " " + a(w), _ = (P) => {
362
+ const w = Math.floor(P);
363
+ return w < 10 ? `0${w}` : `${w}`;
364
+ };
365
+ if (n < 1440) {
366
+ const P = n / 60, w = n % 60, W = (w - Math.floor(w)) * 60;
367
+ return [P, w, W].map((G) => _(G)).join(":");
368
+ }
369
+ return c(Math.ceil(n / (60 * 24)), "days");
370
+ }, b = () => {
371
+ let n = document.createElement("style");
372
+ n.innerHTML = S, D.appendChild(n);
373
+ }, H = () => {
374
+ let n = new URL(p), c = document.createElement("style");
375
+ fetch(n.href).then((_) => _.text()).then((_) => {
376
+ c.innerHTML = _, setTimeout(
377
+ () => {
378
+ D.appendChild(c);
379
+ },
380
+ 1
381
+ ), setTimeout(
382
+ () => {
383
+ },
384
+ 500
385
+ );
386
+ });
387
+ };
388
+ X(() => {
389
+ window.postMessage({ type: "TournamentThumbnailMounted" }, window.location.href);
390
+ const n = setInterval(
391
+ () => {
392
+ u && o && k();
393
+ },
394
+ 1e3
395
+ );
396
+ return () => clearInterval(n);
397
+ });
398
+ function x(n) {
399
+ tt[n ? "unshift" : "push"](() => {
400
+ D = n, e(3, D);
401
+ });
402
+ }
403
+ return i.$$set = (n) => {
404
+ "startdate" in n && e(0, u = n.startdate), "enddate" in n && e(1, o = n.enddate), "status" in n && e(2, d = n.status), "lang" in n && e(12, g = n.lang), "clientstyling" in n && e(13, S = n.clientstyling), "clientstylingurl" in n && e(14, p = n.clientstylingurl), "translationurl" in n && e(15, m = n.translationurl);
405
+ }, i.$$.update = () => {
406
+ i.$$.dirty & /*tournamentLeftDays, startdate, enddate*/
407
+ 19 && e(7, s = () => {
408
+ if (F <= 0) return 100;
409
+ const n = R(u, o), c = 100 / n;
410
+ return Math.floor((n - F) * c);
411
+ }), i.$$.dirty & /*startdate, enddate, tournamentLeftDays*/
412
+ 19 && u && o && k() && r(F), i.$$.dirty & /*lang*/
413
+ 4096 && g && k(), i.$$.dirty & /*lang, tournamentLeftDays*/
414
+ 4112 && g && r(F), i.$$.dirty & /*translationurl*/
415
+ 32768 && m && z(), i.$$.dirty & /*customStylingContainer, clientstyling*/
416
+ 8200 && D && S && b(), i.$$.dirty & /*customStylingContainer, clientstylingurl*/
417
+ 16392 && D && p && H();
418
+ }, [
419
+ u,
420
+ o,
421
+ d,
422
+ D,
423
+ F,
424
+ j,
425
+ I,
426
+ s,
427
+ a,
428
+ k,
429
+ f,
430
+ r,
431
+ g,
432
+ S,
433
+ p,
434
+ m,
435
+ x
436
+ ];
437
+ }
438
+ class ft extends Y {
439
+ constructor(t) {
440
+ super(), Z(
441
+ this,
442
+ t,
443
+ ct,
444
+ dt,
445
+ J,
446
+ {
447
+ startdate: 0,
448
+ enddate: 1,
449
+ status: 2,
450
+ lang: 12,
451
+ clientstyling: 13,
452
+ clientstylingurl: 14,
453
+ translationurl: 15
454
+ },
455
+ it
456
+ );
457
+ }
458
+ get startdate() {
459
+ return this.$$.ctx[0];
460
+ }
461
+ set startdate(t) {
462
+ this.$$set({ startdate: t }), C();
463
+ }
464
+ get enddate() {
465
+ return this.$$.ctx[1];
466
+ }
467
+ set enddate(t) {
468
+ this.$$set({ enddate: t }), C();
469
+ }
470
+ get status() {
471
+ return this.$$.ctx[2];
472
+ }
473
+ set status(t) {
474
+ this.$$set({ status: t }), C();
475
+ }
476
+ get lang() {
477
+ return this.$$.ctx[12];
478
+ }
479
+ set lang(t) {
480
+ this.$$set({ lang: t }), C();
481
+ }
482
+ get clientstyling() {
483
+ return this.$$.ctx[13];
484
+ }
485
+ set clientstyling(t) {
486
+ this.$$set({ clientstyling: t }), C();
487
+ }
488
+ get clientstylingurl() {
489
+ return this.$$.ctx[14];
490
+ }
491
+ set clientstylingurl(t) {
492
+ this.$$set({ clientstylingurl: t }), C();
493
+ }
494
+ get translationurl() {
495
+ return this.$$.ctx[15];
496
+ }
497
+ set translationurl(t) {
498
+ this.$$set({ translationurl: t }), C();
499
+ }
500
+ }
501
+ et(ft, { startdate: {}, enddate: {}, status: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
502
+ export {
503
+ ft as default
504
+ };