@everymatrix/casino-tournaments-controller 1.45.0 → 1.45.2
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/{CasinoTournamentsController-BgoGP80M.cjs → CasinoTournamentsController-CQ5C1jDl.cjs} +7 -7
- package/components/{CasinoTournamentsController-BBv1Hyoc.js → CasinoTournamentsController-Cr8b4j7l.js} +332 -332
- package/components/CasinoTournamentsFilterController-BtuK-ddv.cjs +1 -0
- package/components/{CasinoTournamentsFilterController-BqjTkXsP.js → CasinoTournamentsFilterController-Chy_sE0V.js} +118 -118
- package/components/{CasinoTournamentsListController-nfyqtXdi.cjs → CasinoTournamentsListController-BinvLjvx.cjs} +3 -3
- package/components/{CasinoTournamentsListController-BHZPf1Di.js → CasinoTournamentsListController-DXHqP9An.js} +111 -111
- package/components/{CasinoTournamentsThumbnail-DdkzbUpk.js → CasinoTournamentsThumbnail-BFS6MlWH.js} +190 -190
- package/components/CasinoTournamentsThumbnail-CM3Rfdn3.cjs +4 -0
- package/components/CasinoTournamentsThumbnailController-C71hXcQP.cjs +1 -0
- package/components/CasinoTournamentsThumbnailController-NEf6XMRB.js +1405 -0
- package/components/CasinoTournamentsThumbnailDuration-CrS_PUCZ.cjs +1 -0
- package/components/CasinoTournamentsThumbnailDuration-bu3Mm2Ay.js +495 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-DNrAc-zm.cjs +1 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-_haSuIUI.js +438 -0
- package/components/CasinoTournamentsThumbnailPrizes-BRcfU1P4.js +310 -0
- package/components/CasinoTournamentsThumbnailPrizes-E5pafLaj.cjs +1 -0
- package/es2015/casino-tournaments-controller.cjs +1 -1
- package/es2015/casino-tournaments-controller.js +1 -1
- package/package.json +2 -2
- package/components/CasinoTournamentsFilterController-DRPLlsmH.cjs +0 -1
- package/components/CasinoTournamentsThumbnail-B5svaS7p.cjs +0 -4
- package/components/CasinoTournamentsThumbnailController-BnIRoSw0.cjs +0 -1
- package/components/CasinoTournamentsThumbnailController-DX_9tXvb.js +0 -1405
- package/components/CasinoTournamentsThumbnailDuration-BZyUIEUp.cjs +0 -1
- package/components/CasinoTournamentsThumbnailDuration-CVtlYaVM.js +0 -495
- package/components/CasinoTournamentsThumbnailGamesSlider-CPUoPnwu.js +0 -438
- package/components/CasinoTournamentsThumbnailGamesSlider-CuGCo4r6.cjs +0 -1
- package/components/CasinoTournamentsThumbnailPrizes-CPmYLRmC.cjs +0 -1
- package/components/CasinoTournamentsThumbnailPrizes-DD7Zhrne.js +0 -310
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoTournamentsController-CQ5C1jDl.cjs");function C(a,e){t.addMessages(a,e)}const E={en:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"},hr:{finished:"Završeno",starting:"Starting in ",left:"preostalo",minutes:"minute",hours:"sati",days:"dana"},"zh-hk":{finished:"完成的",starting:"開始於",left:"剩下",minutes:"分鐘",hours:"小時",days:"天"},fr:{finished:"Fini",starting:"Début dans ",left:"restant",minutes:"minutes",hours:"heures",days:"jours"},ro:{finished:"Finalizat",starting:"Începe în",left:"rămase",minutes:"minute",hours:"ore",days:"zile"},tr:{finished:"Bitti",starting:"İçinde başlayan",left:"sol",minutes:"dakika",hours:"saat",days:"günler"},el:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",left:"απομένουν",minutes:"λεπτά",hours:"ώρες",days:"ημέρες"},es:{finished:"Finalizado",starting:"Iniciando en ",left:"queda",minutes:"minutos",hours:"horas",days:"días"},hu:{finished:"Befejezve",starting:"Kezdésig",left:"bal",minutes:"perc",hours:"óra",days:"nap"},pt:{finished:"Finalizado",starting:"Começando em",left:"Abandonou",minutes:"Minutos",hours:"Horas",days:"Dias"}};function L(a){t.append_styles(a,"svelte-n7yu38","*,*::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(--emfe-w-color-gray-300, #58586B)}.EndDate{font-size:11px;align-content:flex-end;color:var(--emfe-w-color-gray-300, #58586B)}.ProgressBar{margin:5px 20px;height:8px;background:var(--emfe-w-color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emfe-w-color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emfe-w-color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:var(--emfe-w-color-green, #48952a)}")}function M(a){let e,n,i=a[10](a[0])+"",l,u,o,d=a[10](a[1])+"",g,k,y,m,b,D,S;function P(s,_){return s[2]=="Finished"||s[2]=="Closing"||s[2]=="Closed"?N:s[5]>0?U:O}let B=P(a),h=B(a);function w(s,_){if(s[2]=="Finished"||s[2]=="Closing"||s[2]=="Closed")return H;if(s[5]>0)return A;if(s[4]>0)return q}let v=w(a),f=v&&v(a);return{c(){e=t.element("div"),n=t.element("div"),l=t.text(i),u=t.space(),o=t.element("div"),g=t.text(d),k=t.space(),y=t.element("div"),m=t.element("div"),h.c(),b=t.space(),f&&f.c(),t.attr(n,"class","StartDate"),t.attr(n,"part","StartDate"),t.attr(o,"class","EndDate"),t.attr(o,"part","EndDate"),t.attr(e,"class","TournamentDates"),t.attr(e,"part","TournamentDates"),t.attr(m,"class","ProgressBar"),t.attr(m,"part","ProgressBar"),t.attr(y,"class","ProgressBarWrapper"),t.attr(y,"part","ProgressBarWrapper")},m(s,_){t.insert(s,e,_),t.append(e,n),t.append(n,l),t.append(e,u),t.append(e,o),t.append(o,g),t.insert(s,k,_),t.insert(s,y,_),t.append(y,m),h.m(m,null),t.append(m,b),f&&f.m(m,null),D||(S=t.action_destroyer(a[9].call(null,y)),D=!0)},p(s,_){_&1&&i!==(i=s[10](s[0])+"")&&t.set_data(l,i),_&2&&d!==(d=s[10](s[1])+"")&&t.set_data(g,d),B===(B=P(s))&&h?h.p(s,_):(h.d(1),h=B(s),h&&(h.c(),h.m(m,b))),v===(v=w(s))&&f?f.p(s,_):(f&&f.d(1),f=v&&v(s),f&&(f.c(),f.m(m,null)))},d(s){s&&(t.detach(e),t.detach(k),t.detach(y)),h.d(),f&&f.d(),D=!1,S()}}}function O(a){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFill"),t.attr(e,"part","ProgressBarFill"),t.set_style(e,"width",a[7]()+"%")},m(n,i){t.insert(n,e,i)},p(n,i){i&128&&t.set_style(e,"width",n[7]()+"%")},d(n){n&&t.detach(e)}}}function U(a){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillStarting"),t.attr(e,"part","ProgressBarFillStarting")},m(n,i){t.insert(n,e,i)},p:t.noop,d(n){n&&t.detach(e)}}}function N(a){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillEnd"),t.attr(e,"part","ProgressBarFillEnd")},m(n,i){t.insert(n,e,i)},p:t.noop,d(n){n&&t.detach(e)}}}function q(a){let e,n,i,l=a[8]("tournamentsDuration.left")+"",u;return{c(){e=t.element("div"),n=t.text(a[6]),i=t.space(),u=t.text(l),t.attr(e,"class","Remaining"),t.attr(e,"part","Remaining")},m(o,d){t.insert(o,e,d),t.append(e,n),t.append(e,i),t.append(e,u)},p(o,d){d&64&&t.set_data(n,o[6]),d&256&&l!==(l=o[8]("tournamentsDuration.left")+"")&&t.set_data(u,l)},d(o){o&&t.detach(e)}}}function A(a){let e,n=a[8]("tournamentsDuration.starting")+"",i,l,u=a[11](a[5])+"",o;return{c(){e=t.element("div"),i=t.text(n),l=t.space(),o=t.text(u),t.attr(e,"class","Remaining"),t.attr(e,"part","Remaining")},m(d,g){t.insert(d,e,g),t.append(e,i),t.append(e,l),t.append(e,o)},p(d,g){g&256&&n!==(n=d[8]("tournamentsDuration.starting")+"")&&t.set_data(i,n),g&32&&u!==(u=d[11](d[5])+"")&&t.set_data(o,u)},d(d){d&&t.detach(e)}}}function H(a){let e,n=a[8]("tournamentsDuration.finished")+"",i;return{c(){e=t.element("div"),i=t.text(n),t.attr(e,"class","Finished"),t.attr(e,"part","Finished")},m(l,u){t.insert(l,e,u),t.append(e,i)},p(l,u){u&256&&n!==(n=l[8]("tournamentsDuration.finished")+"")&&t.set_data(i,n)},d(l){l&&t.detach(e)}}}function W(a){let e,n=a[0]&&a[1]&&M(a);return{c(){e=t.element("div"),n&&n.c(),t.attr(e,"class","TournamentDuration"),t.attr(e,"part","TournamentDuration")},m(i,l){t.insert(i,e,l),n&&n.m(e,null),a[16](e)},p(i,[l]){i[0]&&i[1]?n?n.p(i,l):(n=M(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:t.noop,o:t.noop,d(i){i&&t.detach(e),n&&n.d(),a[16](null)}}}function G(a,e,n){let i,l;t.component_subscribe(a,t.$format,r=>n(8,l=r));let{startdate:u=""}=e,{enddate:o=""}=e,{status:d=""}=e,{lang:g="en"}=e,{clientstyling:k=""}=e,{clientstylingurl:y=""}=e,{translationurl:m=""}=e,b,D="",S="",P="";const B=()=>{fetch(m).then(c=>c.json()).then(c=>{Object.keys(c).forEach(p=>{C(p,c[p])})}).catch(c=>{console.log(c)})};Object.keys(E).forEach(r=>{C(r,E[r])});const h=r=>new Date(r).getTime(),w=(r,c)=>(h(c)-h(r))/(1e3*60),v=()=>{const r=new Date;n(4,D=w(r,o)),n(5,S=w(r,u)),n(6,P=s(D))},f=r=>{const c={month:"long"};let p=new Date(r),T=new Intl.DateTimeFormat(g,c).format(p);return`${p.getDate()} ${T}, ${p.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${p.getUTCFullYear()}`},s=r=>{const c=(T,F)=>T+" "+l(F),p=T=>{const F=Math.floor(T);return F<10?`0${F}`:`${F}`};if(r<1440){const T=r/60,F=r%60,x=(F-Math.floor(F))*60;return[T,F,x].map(I=>p(I)).join(":")}return c(Math.ceil(r/(60*24)),"tournamentsDuration.days")},_=()=>{let r=document.createElement("style");r.innerHTML=k,b.appendChild(r)},R=()=>{let r=new URL(y),c=document.createElement("style");fetch(r.href).then(p=>p.text()).then(p=>{c.innerHTML=p,setTimeout(()=>{b.appendChild(c)},1),setTimeout(()=>{},500)})};t.onMount(()=>{const r=setInterval(()=>{u&&o&&v()},1e3);return()=>clearInterval(r)});function j(r){t.binding_callbacks[r?"unshift":"push"](()=>{b=r,n(3,b)})}return a.$$set=r=>{"startdate"in r&&n(0,u=r.startdate),"enddate"in r&&n(1,o=r.enddate),"status"in r&&n(2,d=r.status),"lang"in r&&n(12,g=r.lang),"clientstyling"in r&&n(13,k=r.clientstyling),"clientstylingurl"in r&&n(14,y=r.clientstylingurl),"translationurl"in r&&n(15,m=r.translationurl)},a.$$.update=()=>{a.$$.dirty&19&&n(7,i=()=>{if(D<=0)return 100;const r=w(u,o),c=100/r;return Math.floor((r-D)*c)}),a.$$.dirty&19&&u&&o&&v()&&s(D),a.$$.dirty&4096&&g&&v(),a.$$.dirty&4112&&g&&s(D),a.$$.dirty&32768&&m&&B(),a.$$.dirty&8200&&b&&k&&_(),a.$$.dirty&16392&&b&&y&&R()},[u,o,d,b,D,S,P,i,l,v,f,s,g,k,y,m,j]}class z extends t.SvelteComponent{constructor(e){super(),t.init(this,e,G,W,t.safe_not_equal,{startdate:0,enddate:1,status:2,lang:12,clientstyling:13,clientstylingurl:14,translationurl:15},L)}get startdate(){return this.$$.ctx[0]}set startdate(e){this.$$set({startdate:e}),t.flush()}get enddate(){return this.$$.ctx[1]}set enddate(e){this.$$set({enddate:e}),t.flush()}get status(){return this.$$.ctx[2]}set status(e){this.$$set({status:e}),t.flush()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),t.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}}t.create_custom_element(z,{startdate:{},enddate:{},status:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=z;
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import { a as K, S as Y, i as Z, f as C, c as J, s as Q, b as V, e as b, d as l, h as T, n as U, j as w, k as X, w as $, t as E, m as L, o as h, A as tt, p as z, u as et, D as A, $ as nt } from "./CasinoTournamentsController-Cr8b4j7l.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
|
+
};
|
|
87
|
+
function it(i) {
|
|
88
|
+
V(i, "svelte-n7yu38", "*,*::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(--emfe-w-color-gray-300, #58586B)}.EndDate{font-size:11px;align-content:flex-end;color:var(--emfe-w-color-gray-300, #58586B)}.ProgressBar{margin:5px 20px;height:8px;background:var(--emfe-w-color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emfe-w-color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emfe-w-color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:var(--emfe-w-color-green, #48952a)}");
|
|
89
|
+
}
|
|
90
|
+
function H(i) {
|
|
91
|
+
let t, e, r = (
|
|
92
|
+
/*formatDate*/
|
|
93
|
+
i[10](
|
|
94
|
+
/*startdate*/
|
|
95
|
+
i[0]
|
|
96
|
+
) + ""
|
|
97
|
+
), a, u, o, d = (
|
|
98
|
+
/*formatDate*/
|
|
99
|
+
i[10](
|
|
100
|
+
/*enddate*/
|
|
101
|
+
i[1]
|
|
102
|
+
) + ""
|
|
103
|
+
), g, S, p, m, v, F, j;
|
|
104
|
+
function I(s, D) {
|
|
105
|
+
return (
|
|
106
|
+
/*status*/
|
|
107
|
+
s[2] == "Finished" || /*status*/
|
|
108
|
+
s[2] == "Closing" || /*status*/
|
|
109
|
+
s[2] == "Closed" ? at : (
|
|
110
|
+
/*tournamentUntilStartDays*/
|
|
111
|
+
s[5] > 0 ? st : rt
|
|
112
|
+
)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
let M = I(i), y = M(i);
|
|
116
|
+
function R(s, D) {
|
|
117
|
+
if (
|
|
118
|
+
/*status*/
|
|
119
|
+
s[2] == "Finished" || /*status*/
|
|
120
|
+
s[2] == "Closing" || /*status*/
|
|
121
|
+
s[2] == "Closed"
|
|
122
|
+
) return ut;
|
|
123
|
+
if (
|
|
124
|
+
/*tournamentUntilStartDays*/
|
|
125
|
+
s[5] > 0
|
|
126
|
+
) return ot;
|
|
127
|
+
if (
|
|
128
|
+
/*tournamentLeftDays*/
|
|
129
|
+
s[4] > 0
|
|
130
|
+
) return lt;
|
|
131
|
+
}
|
|
132
|
+
let k = R(i), f = k && k(i);
|
|
133
|
+
return {
|
|
134
|
+
c() {
|
|
135
|
+
t = b("div"), e = b("div"), a = E(r), u = L(), o = b("div"), g = E(d), S = L(), p = b("div"), m = b("div"), y.c(), v = 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");
|
|
136
|
+
},
|
|
137
|
+
m(s, D) {
|
|
138
|
+
T(s, t, D), h(t, e), h(e, a), h(t, u), h(t, o), h(o, g), T(s, S, D), T(s, p, D), h(p, m), y.m(m, null), h(m, v), f && f.m(m, null), F || (j = tt(
|
|
139
|
+
/*getDuration*/
|
|
140
|
+
i[9].call(null, p)
|
|
141
|
+
), F = !0);
|
|
142
|
+
},
|
|
143
|
+
p(s, D) {
|
|
144
|
+
D & /*startdate*/
|
|
145
|
+
1 && r !== (r = /*formatDate*/
|
|
146
|
+
s[10](
|
|
147
|
+
/*startdate*/
|
|
148
|
+
s[0]
|
|
149
|
+
) + "") && z(a, r), D & /*enddate*/
|
|
150
|
+
2 && d !== (d = /*formatDate*/
|
|
151
|
+
s[10](
|
|
152
|
+
/*enddate*/
|
|
153
|
+
s[1]
|
|
154
|
+
) + "") && z(g, d), M === (M = I(s)) && y ? y.p(s, D) : (y.d(1), y = M(s), y && (y.c(), y.m(m, v))), k === (k = R(s)) && f ? f.p(s, D) : (f && f.d(1), f = k && k(s), f && (f.c(), f.m(m, null)));
|
|
155
|
+
},
|
|
156
|
+
d(s) {
|
|
157
|
+
s && (w(t), w(S), w(p)), y.d(), f && f.d(), F = !1, j();
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function rt(i) {
|
|
162
|
+
let t;
|
|
163
|
+
return {
|
|
164
|
+
c() {
|
|
165
|
+
t = b("div"), l(t, "class", "ProgressBarFill"), l(t, "part", "ProgressBarFill"), A(
|
|
166
|
+
t,
|
|
167
|
+
"width",
|
|
168
|
+
/*getProgress*/
|
|
169
|
+
i[7]() + "%"
|
|
170
|
+
);
|
|
171
|
+
},
|
|
172
|
+
m(e, r) {
|
|
173
|
+
T(e, t, r);
|
|
174
|
+
},
|
|
175
|
+
p(e, r) {
|
|
176
|
+
r & /*getProgress*/
|
|
177
|
+
128 && A(
|
|
178
|
+
t,
|
|
179
|
+
"width",
|
|
180
|
+
/*getProgress*/
|
|
181
|
+
e[7]() + "%"
|
|
182
|
+
);
|
|
183
|
+
},
|
|
184
|
+
d(e) {
|
|
185
|
+
e && w(t);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function st(i) {
|
|
190
|
+
let t;
|
|
191
|
+
return {
|
|
192
|
+
c() {
|
|
193
|
+
t = b("div"), l(t, "class", "ProgressBarFillStarting"), l(t, "part", "ProgressBarFillStarting");
|
|
194
|
+
},
|
|
195
|
+
m(e, r) {
|
|
196
|
+
T(e, t, r);
|
|
197
|
+
},
|
|
198
|
+
p: U,
|
|
199
|
+
d(e) {
|
|
200
|
+
e && w(t);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function at(i) {
|
|
205
|
+
let t;
|
|
206
|
+
return {
|
|
207
|
+
c() {
|
|
208
|
+
t = b("div"), l(t, "class", "ProgressBarFillEnd"), l(t, "part", "ProgressBarFillEnd");
|
|
209
|
+
},
|
|
210
|
+
m(e, r) {
|
|
211
|
+
T(e, t, r);
|
|
212
|
+
},
|
|
213
|
+
p: U,
|
|
214
|
+
d(e) {
|
|
215
|
+
e && w(t);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function lt(i) {
|
|
220
|
+
let t, e, r, a = (
|
|
221
|
+
/*$_*/
|
|
222
|
+
i[8]("tournamentsDuration.left") + ""
|
|
223
|
+
), u;
|
|
224
|
+
return {
|
|
225
|
+
c() {
|
|
226
|
+
t = b("div"), e = E(
|
|
227
|
+
/*showRemain*/
|
|
228
|
+
i[6]
|
|
229
|
+
), r = L(), u = E(a), l(t, "class", "Remaining"), l(t, "part", "Remaining");
|
|
230
|
+
},
|
|
231
|
+
m(o, d) {
|
|
232
|
+
T(o, t, d), h(t, e), h(t, r), h(t, u);
|
|
233
|
+
},
|
|
234
|
+
p(o, d) {
|
|
235
|
+
d & /*showRemain*/
|
|
236
|
+
64 && z(
|
|
237
|
+
e,
|
|
238
|
+
/*showRemain*/
|
|
239
|
+
o[6]
|
|
240
|
+
), d & /*$_*/
|
|
241
|
+
256 && a !== (a = /*$_*/
|
|
242
|
+
o[8]("tournamentsDuration.left") + "") && z(u, a);
|
|
243
|
+
},
|
|
244
|
+
d(o) {
|
|
245
|
+
o && w(t);
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function ot(i) {
|
|
250
|
+
let t, e = (
|
|
251
|
+
/*$_*/
|
|
252
|
+
i[8]("tournamentsDuration.starting") + ""
|
|
253
|
+
), r, a, u = (
|
|
254
|
+
/*getTextByDiff*/
|
|
255
|
+
i[11](
|
|
256
|
+
/*tournamentUntilStartDays*/
|
|
257
|
+
i[5]
|
|
258
|
+
) + ""
|
|
259
|
+
), o;
|
|
260
|
+
return {
|
|
261
|
+
c() {
|
|
262
|
+
t = b("div"), r = E(e), a = L(), o = E(u), l(t, "class", "Remaining"), l(t, "part", "Remaining");
|
|
263
|
+
},
|
|
264
|
+
m(d, g) {
|
|
265
|
+
T(d, t, g), h(t, r), h(t, a), h(t, o);
|
|
266
|
+
},
|
|
267
|
+
p(d, g) {
|
|
268
|
+
g & /*$_*/
|
|
269
|
+
256 && e !== (e = /*$_*/
|
|
270
|
+
d[8]("tournamentsDuration.starting") + "") && z(r, e), g & /*tournamentUntilStartDays*/
|
|
271
|
+
32 && u !== (u = /*getTextByDiff*/
|
|
272
|
+
d[11](
|
|
273
|
+
/*tournamentUntilStartDays*/
|
|
274
|
+
d[5]
|
|
275
|
+
) + "") && z(o, u);
|
|
276
|
+
},
|
|
277
|
+
d(d) {
|
|
278
|
+
d && w(t);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
function ut(i) {
|
|
283
|
+
let t, e = (
|
|
284
|
+
/*$_*/
|
|
285
|
+
i[8]("tournamentsDuration.finished") + ""
|
|
286
|
+
), r;
|
|
287
|
+
return {
|
|
288
|
+
c() {
|
|
289
|
+
t = b("div"), r = E(e), l(t, "class", "Finished"), l(t, "part", "Finished");
|
|
290
|
+
},
|
|
291
|
+
m(a, u) {
|
|
292
|
+
T(a, t, u), h(t, r);
|
|
293
|
+
},
|
|
294
|
+
p(a, u) {
|
|
295
|
+
u & /*$_*/
|
|
296
|
+
256 && e !== (e = /*$_*/
|
|
297
|
+
a[8]("tournamentsDuration.finished") + "") && z(r, e);
|
|
298
|
+
},
|
|
299
|
+
d(a) {
|
|
300
|
+
a && w(t);
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function dt(i) {
|
|
305
|
+
let t, e = (
|
|
306
|
+
/*startdate*/
|
|
307
|
+
i[0] && /*enddate*/
|
|
308
|
+
i[1] && H(i)
|
|
309
|
+
);
|
|
310
|
+
return {
|
|
311
|
+
c() {
|
|
312
|
+
t = b("div"), e && e.c(), l(t, "class", "TournamentDuration"), l(t, "part", "TournamentDuration");
|
|
313
|
+
},
|
|
314
|
+
m(r, a) {
|
|
315
|
+
T(r, t, a), e && e.m(t, null), i[16](t);
|
|
316
|
+
},
|
|
317
|
+
p(r, [a]) {
|
|
318
|
+
/*startdate*/
|
|
319
|
+
r[0] && /*enddate*/
|
|
320
|
+
r[1] ? e ? e.p(r, a) : (e = H(r), e.c(), e.m(t, null)) : e && (e.d(1), e = null);
|
|
321
|
+
},
|
|
322
|
+
i: U,
|
|
323
|
+
o: U,
|
|
324
|
+
d(r) {
|
|
325
|
+
r && w(t), e && e.d(), i[16](null);
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function ct(i, t, e) {
|
|
330
|
+
let r, a;
|
|
331
|
+
X(i, nt, (n) => e(8, a = n));
|
|
332
|
+
let { startdate: u = "" } = t, { enddate: o = "" } = t, { status: d = "" } = t, { lang: g = "en" } = t, { clientstyling: S = "" } = t, { clientstylingurl: p = "" } = t, { translationurl: m = "" } = t, v, F = "", j = "", I = "";
|
|
333
|
+
const M = () => {
|
|
334
|
+
fetch(m).then((c) => c.json()).then((c) => {
|
|
335
|
+
Object.keys(c).forEach((_) => {
|
|
336
|
+
N(_, c[_]);
|
|
337
|
+
});
|
|
338
|
+
}).catch((c) => {
|
|
339
|
+
console.log(c);
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
Object.keys(O).forEach((n) => {
|
|
343
|
+
N(n, O[n]);
|
|
344
|
+
});
|
|
345
|
+
const y = (n) => new Date(n).getTime(), R = (n, c) => (y(c) - y(n)) / (1e3 * 60), k = () => {
|
|
346
|
+
const n = /* @__PURE__ */ new Date();
|
|
347
|
+
e(4, F = R(n, o)), e(5, j = R(n, u)), e(6, I = s(F));
|
|
348
|
+
}, f = (n) => {
|
|
349
|
+
const c = { month: "long" };
|
|
350
|
+
let _ = new Date(n), P = new Intl.DateTimeFormat(g, c).format(_);
|
|
351
|
+
return `${_.getDate()} ${P}, ${_.toLocaleString("en-GB", { hour: "numeric", minute: "numeric" })}, ${_.getUTCFullYear()}`;
|
|
352
|
+
}, s = (n) => {
|
|
353
|
+
const c = (P, B) => P + " " + a(B), _ = (P) => {
|
|
354
|
+
const B = Math.floor(P);
|
|
355
|
+
return B < 10 ? `0${B}` : `${B}`;
|
|
356
|
+
};
|
|
357
|
+
if (n < 1440) {
|
|
358
|
+
const P = n / 60, B = n % 60, W = (B - Math.floor(B)) * 60;
|
|
359
|
+
return [P, B, W].map((G) => _(G)).join(":");
|
|
360
|
+
}
|
|
361
|
+
return c(Math.ceil(n / (60 * 24)), "tournamentsDuration.days");
|
|
362
|
+
}, D = () => {
|
|
363
|
+
let n = document.createElement("style");
|
|
364
|
+
n.innerHTML = S, v.appendChild(n);
|
|
365
|
+
}, q = () => {
|
|
366
|
+
let n = new URL(p), c = document.createElement("style");
|
|
367
|
+
fetch(n.href).then((_) => _.text()).then((_) => {
|
|
368
|
+
c.innerHTML = _, setTimeout(
|
|
369
|
+
() => {
|
|
370
|
+
v.appendChild(c);
|
|
371
|
+
},
|
|
372
|
+
1
|
|
373
|
+
), setTimeout(
|
|
374
|
+
() => {
|
|
375
|
+
},
|
|
376
|
+
500
|
|
377
|
+
);
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
$(() => {
|
|
381
|
+
const n = setInterval(
|
|
382
|
+
() => {
|
|
383
|
+
u && o && k();
|
|
384
|
+
},
|
|
385
|
+
1e3
|
|
386
|
+
);
|
|
387
|
+
return () => clearInterval(n);
|
|
388
|
+
});
|
|
389
|
+
function x(n) {
|
|
390
|
+
et[n ? "unshift" : "push"](() => {
|
|
391
|
+
v = n, e(3, v);
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
return i.$$set = (n) => {
|
|
395
|
+
"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);
|
|
396
|
+
}, i.$$.update = () => {
|
|
397
|
+
i.$$.dirty & /*tournamentLeftDays, startdate, enddate*/
|
|
398
|
+
19 && e(7, r = () => {
|
|
399
|
+
if (F <= 0) return 100;
|
|
400
|
+
const n = R(u, o), c = 100 / n;
|
|
401
|
+
return Math.floor((n - F) * c);
|
|
402
|
+
}), i.$$.dirty & /*startdate, enddate, tournamentLeftDays*/
|
|
403
|
+
19 && u && o && k() && s(F), i.$$.dirty & /*lang*/
|
|
404
|
+
4096 && g && k(), i.$$.dirty & /*lang, tournamentLeftDays*/
|
|
405
|
+
4112 && g && s(F), i.$$.dirty & /*translationurl*/
|
|
406
|
+
32768 && m && M(), i.$$.dirty & /*customStylingContainer, clientstyling*/
|
|
407
|
+
8200 && v && S && D(), i.$$.dirty & /*customStylingContainer, clientstylingurl*/
|
|
408
|
+
16392 && v && p && q();
|
|
409
|
+
}, [
|
|
410
|
+
u,
|
|
411
|
+
o,
|
|
412
|
+
d,
|
|
413
|
+
v,
|
|
414
|
+
F,
|
|
415
|
+
j,
|
|
416
|
+
I,
|
|
417
|
+
r,
|
|
418
|
+
a,
|
|
419
|
+
k,
|
|
420
|
+
f,
|
|
421
|
+
s,
|
|
422
|
+
g,
|
|
423
|
+
S,
|
|
424
|
+
p,
|
|
425
|
+
m,
|
|
426
|
+
x
|
|
427
|
+
];
|
|
428
|
+
}
|
|
429
|
+
class ft extends Y {
|
|
430
|
+
constructor(t) {
|
|
431
|
+
super(), Z(
|
|
432
|
+
this,
|
|
433
|
+
t,
|
|
434
|
+
ct,
|
|
435
|
+
dt,
|
|
436
|
+
Q,
|
|
437
|
+
{
|
|
438
|
+
startdate: 0,
|
|
439
|
+
enddate: 1,
|
|
440
|
+
status: 2,
|
|
441
|
+
lang: 12,
|
|
442
|
+
clientstyling: 13,
|
|
443
|
+
clientstylingurl: 14,
|
|
444
|
+
translationurl: 15
|
|
445
|
+
},
|
|
446
|
+
it
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
get startdate() {
|
|
450
|
+
return this.$$.ctx[0];
|
|
451
|
+
}
|
|
452
|
+
set startdate(t) {
|
|
453
|
+
this.$$set({ startdate: t }), C();
|
|
454
|
+
}
|
|
455
|
+
get enddate() {
|
|
456
|
+
return this.$$.ctx[1];
|
|
457
|
+
}
|
|
458
|
+
set enddate(t) {
|
|
459
|
+
this.$$set({ enddate: t }), C();
|
|
460
|
+
}
|
|
461
|
+
get status() {
|
|
462
|
+
return this.$$.ctx[2];
|
|
463
|
+
}
|
|
464
|
+
set status(t) {
|
|
465
|
+
this.$$set({ status: t }), C();
|
|
466
|
+
}
|
|
467
|
+
get lang() {
|
|
468
|
+
return this.$$.ctx[12];
|
|
469
|
+
}
|
|
470
|
+
set lang(t) {
|
|
471
|
+
this.$$set({ lang: t }), C();
|
|
472
|
+
}
|
|
473
|
+
get clientstyling() {
|
|
474
|
+
return this.$$.ctx[13];
|
|
475
|
+
}
|
|
476
|
+
set clientstyling(t) {
|
|
477
|
+
this.$$set({ clientstyling: t }), C();
|
|
478
|
+
}
|
|
479
|
+
get clientstylingurl() {
|
|
480
|
+
return this.$$.ctx[14];
|
|
481
|
+
}
|
|
482
|
+
set clientstylingurl(t) {
|
|
483
|
+
this.$$set({ clientstylingurl: t }), C();
|
|
484
|
+
}
|
|
485
|
+
get translationurl() {
|
|
486
|
+
return this.$$.ctx[15];
|
|
487
|
+
}
|
|
488
|
+
set translationurl(t) {
|
|
489
|
+
this.$$set({ translationurl: t }), C();
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
J(ft, { startdate: {}, enddate: {}, status: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
493
|
+
export {
|
|
494
|
+
ft as default
|
|
495
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoTournamentsController-CQ5C1jDl.cjs");function U(t,r){e.addMessages(t,r)}const q={en:{playNow:"Play now"},hr:{playNow:"Započni sada"},"zh-hk":{playNow:"现在播放"},fr:{playNow:"Joue maintenant"},ro:{playNow:"Joaca acum"},tr:{playNow:"Şimdi oyna"},el:{playNow:"Παίξε τώρα"},es:{playNow:"Jugar Ya"},pt:{playNow:"Jogue agora"}};function ie(t){e.append_styles(t,"svelte-1pdib0y","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentsGamesSlider{background:var(--emfe-w-color-contrast, #07072A);color:var(--emfe-w-color-white, #FFFFFF);display:flex;justify-content:center}.disabled{color:var(--emfe-w-color-contrast, #07072A)}.SliderNavButton{background:var(--emfe-w-color-contrast, #07072A);border:0px;width:25px;display:flex;align-items:center;justify-content:center}.SliderNavButton svg{width:20px}.NavButton{background:var(--emfe-w-color-contrast, #07072A);border:0px;width:25px;display:flex;align-items:center;justify-content:center}main{width:95%;overflow:hidden}.items{display:flex;transition:transform 0.4s ease-in-out;transform:translateX(0px)}.item{min-width:119px;height:96px;margin:0 4px;background-color:var(--emfe-w-color-secondary, #FD2839);color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.PlayNowButton{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.itemHover{opacity:1}.items .item:first-child{margin-left:0}.items .item:last-child{margin-right:0}")}function D(t,r,n){const i=t.slice();return i[50]=r[n],i[52]=n,i}function I(t){let r,n,i,d,m,p,_,s,y,w,f=e.ensure_array_like(t[1]),c=[];for(let a=0;a<f.length;a+=1)c[a]=W(D(t,f,a));return{c(){r=e.element("div"),n=e.element("div"),n.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>',i=e.space(),d=e.element("main"),m=e.element("div");for(let a=0;a<c.length;a+=1)c[a].c();_=e.space(),s=e.element("div"),s.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>',e.attr(n,"class","SliderNavButton"),e.attr(n,"part","SliderNavButton"),e.toggle_class(n,"disabled",t[8]),e.attr(m,"class","items"),e.attr(m,"part","items"),e.set_style(m,"transform","translateX("+t[2]+"px)"),e.add_render_callback(()=>t[28].call(d)),e.attr(s,"class","SliderNavButton"),e.attr(s,"part","SliderNavButton"),e.toggle_class(s,"disabled",t[9]),e.attr(r,"class","TournamentsGamesSlider"),e.attr(r,"part","TournamentsGamesSlider")},m(a,b){e.insert(a,r,b),e.append(r,n),e.append(r,i),e.append(r,d),e.append(d,m);for(let o=0;o<c.length;o+=1)c[o]&&c[o].m(m,null);t[27](m),p=e.add_iframe_resize_listener(d,t[28].bind(d)),e.append(r,_),e.append(r,s),t[30](r),y||(w=[e.listen(n,"click",t[23]),e.listen(s,"click",t[29])],y=!0)},p(a,b){if(b[0]&256&&e.toggle_class(n,"disabled",a[8]),b[0]&23650){f=e.ensure_array_like(a[1]);let o;for(o=0;o<f.length;o+=1){const v=D(a,f,o);c[o]?c[o].p(v,b):(c[o]=W(v),c[o].c(),c[o].m(m,null))}for(;o<c.length;o+=1)c[o].d(1);c.length=f.length}b[0]&4&&e.set_style(m,"transform","translateX("+a[2]+"px)"),b[0]&512&&e.toggle_class(s,"disabled",a[9])},d(a){a&&e.detach(r),e.destroy_each(c,a),t[27](null),p(),t[30](null),y=!1,e.run_all(w)}}}function W(t){let r,n,i=t[10]("playNow")+"",d,m,p,_,s,y,w,f,c,a,b;function o(){return t[24](t[50])}function v(){return t[25](t[52])}return{c(){r=e.element("div"),n=e.element("span"),d=e.text(i),_=e.space(),s=e.element("img"),c=e.space(),e.attr(n,"class",m="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":"")),e.attr(n,"part",p="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":"")),e.src_url_equal(s.src,y=t[50].thumbnail)||e.attr(s,"src",y),e.attr(s,"width","132px"),e.attr(s,"height","100px"),e.attr(s,"alt",w=t[50].name),e.attr(s,"title",f=t[50].name),e.attr(r,"class","item"),e.attr(r,"part","item")},m(u,h){e.insert(u,r,h),e.append(r,n),e.append(n,d),e.append(r,_),e.append(r,s),e.append(r,c),a||(b=[e.listen(r,"click",o),e.listen(r,"mouseenter",v),e.listen(r,"mouseleave",t[26])],a=!0)},p(u,h){t=u,h[0]&1024&&i!==(i=t[10]("playNow")+"")&&e.set_data(d,i),h[0]&96&&m!==(m="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":""))&&e.attr(n,"class",m),h[0]&96&&p!==(p="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":""))&&e.attr(n,"part",p),h[0]&2&&!e.src_url_equal(s.src,y=t[50].thumbnail)&&e.attr(s,"src",y),h[0]&2&&w!==(w=t[50].name)&&e.attr(s,"alt",w),h[0]&2&&f!==(f=t[50].name)&&e.attr(s,"title",f)},d(u){u&&e.detach(r),a=!1,e.run_all(b)}}}function oe(t){let r,n=t[1]&&t[1].length>0&&I(t);return{c(){r=e.element("div"),n&&n.c()},m(i,d){e.insert(i,r,d),n&&n.m(r,null),t[31](r)},p(i,d){i[1]&&i[1].length>0?n?n.p(i,d):(n=I(i),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},i:e.noop,o:e.noop,d(i){i&&e.detach(r),n&&n.d(),t[31](null)}}}let ce=30;function ue(t,r,n){let i,d,m;e.component_subscribe(t,e.$format,l=>n(10,m=l));let{tournamenturl:p=""}=r,{scrollby:_="3"}=r,{pagfactor:s="175"}=r,{lang:y=""}=r,{translationurl:w=""}=r,{clientstyling:f=""}=r,{clientstylingurl:c=""}=r,a,b=window.navigator.userAgent,o,v=[],u=0,h,P=null,B=null,E=!1,L,T,M=0,N;const O=()=>{fetch(w).then(g=>g.json()).then(g=>{Object.keys(g).forEach(k=>{U(k,g[k])})}).catch(g=>{console.log(g)})};Object.keys(q).forEach(l=>{U(l,q[l])});const C=l=>{n(5,E=!0),n(6,L=l)},j=()=>{n(5,E=!1),n(6,L=-1)},R=l=>l.touches||l.originalEvent.touches,H=l=>{const g=R(l)[0];P=g.clientX,B=g.clientY},z=l=>{if(!P||!B)return;let g=l.touches[0].clientX,k=l.touches[0].clientY,S=P-g,se=B-k;Math.abs(S)>Math.abs(se)&&(S>0?F(1):F(-1)),P=null,B=null},F=l=>{l>0&&!d?(n(2,u-=o),n(2,u=u<M?M:u)):l<0&&!i&&(n(2,u+=o),n(2,u=u>0?0:u))},A=l=>{window.postMessage({type:"TournamentGameAction",gameId:l.id,name:l.name,launchUrl:l.launchUrl},window.location.href)},X=()=>{let l=new URL(p),g=new Headers;l.searchParams.append("expand","games"),l.searchParams.append("pagination",`games(limit=${ce},offset=${u})`),l.searchParams.append("fields","games(id,name,thumbnail,launchUrl)"),l.searchParams.append("language",y),l.searchParams.append("platform",e.getDevice(b)),fetch(l,{method:"GET",headers:g}).then(S=>S.json()).then(S=>{n(1,v=S.item.games.items),S.item.games.total})},J=()=>{h.addEventListener("touchstart",H,{passive:!0}),h.addEventListener("touchmove",z,{passive:!0})},Y=()=>{setTimeout(()=>{n(22,M=(T.scrollWidth-T.clientWidth)*-1),n(16,s=new String(T.scrollWidth/v.length)),o=parseInt(_,10)*parseFloat(s,2).toFixed(2)},1e3)},x=()=>{let l=document.createElement("style");l.innerHTML=f,a.appendChild(l)},Z=()=>{let l=new URL(c),g=document.createElement("style");fetch(l.href).then(k=>k.text()).then(k=>{g.innerHTML=k,setTimeout(()=>{a.appendChild(g)},1),setTimeout(()=>{},500)})},K=()=>{N>0&&N<Math.floor((parseInt(_)+1)*s)&&n(15,_=Math.ceil(N/s).toString())};e.onMount(()=>(o=parseInt(_,10)*parseInt(s,10),()=>{h.removeEventListener("touchstart",H),h.removeEventListener("touchmove",z)}));const Q=()=>F(-1),V=l=>A(l),$=l=>C(l),ee=()=>j();function te(l){e.binding_callbacks[l?"unshift":"push"](()=>{T=l,n(7,T)})}function ne(){N=this.clientWidth,n(4,N)}const le=()=>F(1);function re(l){e.binding_callbacks[l?"unshift":"push"](()=>{h=l,n(3,h)})}function ae(l){e.binding_callbacks[l?"unshift":"push"](()=>{a=l,n(0,a)})}return t.$$set=l=>{"tournamenturl"in l&&n(17,p=l.tournamenturl),"scrollby"in l&&n(15,_=l.scrollby),"pagfactor"in l&&n(16,s=l.pagfactor),"lang"in l&&n(18,y=l.lang),"translationurl"in l&&n(19,w=l.translationurl),"clientstyling"in l&&n(20,f=l.clientstyling),"clientstylingurl"in l&&n(21,c=l.clientstylingurl)},t.$$.update=()=>{t.$$.dirty[0]&4&&n(8,i=u===0),t.$$.dirty[0]&4194308&&n(9,d=u<=M),t.$$.dirty[0]&16&&N&&K(),t.$$.dirty[0]&131072&&p&&X(),t.$$.dirty[0]&8&&h&&J(),t.$$.dirty[0]&524288&&w&&O(),t.$$.dirty[0]&2&&v.length&&Y(),t.$$.dirty[0]&1048577&&f&&a&&x(),t.$$.dirty[0]&2097153&&c&&a&&Z()},n(2,u=0),[a,v,u,h,N,E,L,T,i,d,m,C,j,F,A,_,s,p,y,w,f,c,M,Q,V,$,ee,te,ne,le,re,ae]}class G extends e.SvelteComponent{constructor(r){super(),e.init(this,r,ue,oe,e.safe_not_equal,{tournamenturl:17,scrollby:15,pagfactor:16,lang:18,translationurl:19,clientstyling:20,clientstylingurl:21},ie,[-1,-1])}get tournamenturl(){return this.$$.ctx[17]}set tournamenturl(r){this.$$set({tournamenturl:r}),e.flush()}get scrollby(){return this.$$.ctx[15]}set scrollby(r){this.$$set({scrollby:r}),e.flush()}get pagfactor(){return this.$$.ctx[16]}set pagfactor(r){this.$$set({pagfactor:r}),e.flush()}get lang(){return this.$$.ctx[18]}set lang(r){this.$$set({lang:r}),e.flush()}get translationurl(){return this.$$.ctx[19]}set translationurl(r){this.$$set({translationurl:r}),e.flush()}get clientstyling(){return this.$$.ctx[20]}set clientstyling(r){this.$$set({clientstyling:r}),e.flush()}get clientstylingurl(){return this.$$.ctx[21]}set clientstylingurl(r){this.$$set({clientstylingurl:r}),e.flush()}}e.create_custom_element(G,{tournamenturl:{},scrollby:{},pagfactor:{},lang:{},translationurl:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=G;
|