@everymatrix/casino-tournament-buttons 1.27.9 → 1.28.0
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/dist/casino-tournament-buttons/casino-tournament-buttons.esm.js +1 -1
- package/dist/casino-tournament-buttons/p-3f6ac723.entry.js +1 -0
- package/dist/casino-tournament-buttons/p-de285d04.js +1 -0
- package/dist/cjs/casino-tournament-buttons.cjs.entry.js +22 -14
- package/dist/cjs/casino-tournament-buttons.cjs.js +2 -2
- package/dist/cjs/{index-61ab317a.js → index-3c551592.js} +2 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/casino-tournament-buttons/casino-tournament-buttons.js +22 -15
- package/dist/components/casino-tournament-buttons.js +21 -14
- package/dist/esm/casino-tournament-buttons.entry.js +22 -14
- package/dist/esm/casino-tournament-buttons.js +2 -2
- package/dist/esm/{index-d7f0ce45.js → index-2a64c803.js} +2 -14
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-tournament-buttons/.stencil/packages/casino-tournament-buttons/stencil.config.d.ts +2 -0
- package/dist/types/components/casino-tournament-buttons/casino-tournament-buttons.d.ts +1 -1
- package/package.json +1 -1
- package/dist/casino-tournament-buttons/p-62e6ef78.entry.js +0 -1
- package/dist/casino-tournament-buttons/p-6ef0312c.js +0 -1
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/casino-tournament-buttons/.stencil/packages/casino-tournament-buttons/stencil.config.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as e}from"./p-
|
|
1
|
+
import{p as n,b as e}from"./p-de285d04.js";(()=>{const e=import.meta.url,r={};return""!==e&&(r.resourcesUrl=new URL(".",e).href),n(r)})().then((n=>e([["p-3f6ac723",[[1,"casino-tournament-buttons",{language:[1],tournamentId:[1,"tournament-id"],session:[1],loginEvent:[1,"login-event"],loginUrl:[1,"login-url"],registerEvent:[1,"register-event"],registerUrl:[1,"register-url"],endpoint:[1],currency:[1],bonusCode:[1,"bonus-code"],enrolled:[4],showReadMore:[4,"show-read-more"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],limitStylingAppends:[32],joinButtonLoading:[32],errorJoin:[32],errorJoinConcurrently:[32]}]]]],n)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,g as i}from"./p-de285d04.js";const r=["ro","en","zh-hk","fr","hu","tr","el","es","pt","hr"],n={en:{joined:"Joined",join:"Join",enrolled:"Enrolled",scoreCriteria:"Score Criteria",minbet:"min bet count",seegames:"You can see the games",here:"here",scheduled:"Scheduled",ongoing:"Ongoing",finished:"Finished",startingAt:"Starting at:",startedAt:"Started at:",startingAtWithTime:"Starts ",startedAtWithTime:"Started ",mostRounds:"Most Rounds",betCount:"Number of Bets",maxWinStakeRatio:"Max Win per Stake",winStakeRatio:"Total Win per Stake",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Log in",register:"Register",details:"Details",joinerror:"An error occurred while registering in the tournament, please try again."},"zh-hk":{enrolled:"已註冊",scoreCriteria:"評分標準",minbet:"最小投注數:",seegames:"你可以看比賽",here:"這裡",scheduled:"預定的",ongoing:"進行中",finished:"完成的",startingAt:"開始於",startedAt:"大多數回合",mostRounds:"投注數",betCount:"投注计数",maxWinStakeRatio:"最大勝率",winStakeRatio:"勝率",January:"一月",February:"二月",March:"行进",April:"四月",May:"可能",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月",login:"登錄",register:"登記",details:"細節",join:"加入",joinerror:"加入錦標賽時出錯,請重試"},fr:{enrolled:"Inscrits",scoreCriteria:"Critères de notation",minbet:"nombre de paris minimum",seegames:"Vous pouvez voir les jeux",here:"ici",scheduled:"Programmé",ongoing:"En cours",finished:"Fini",startingAt:"À partir de:",startedAt:"Commencé à:",mostRounds:"Le plus grand nombre de tours",betCount:"Nombre de paris",maxWinStakeRatio:"Indice maximum du gain d'une mise",winStakeRatio:"Indice du gain d'une mise",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Connexion",register:"Enregistre",details:"Détails",join:"Rejoignez",joinerror:"Une erreur s'est produite lors de l'inscription au tournoi - "},ro:{enrolled:"Înscris",scoreCriteria:"Criterii de punctaj",minbet:"număr minim de pariuri",seegames:"Vezi jocurile",here:"aici",scheduled:"Programat",ongoing:"În desfășurare",finished:"Finalizat",startingAt:"Începând de la",startedAt:"A inceput la:",startingAtWithTime:"Începând de",startedAtWithTime:"A inceput:",mostRounds:"Cele mai multe runde",betCount:"Număr de pariuri",maxWinStakeRatio:"Pondere maximă a mizei din câștig",winStakeRatio:"Câștig Total per Miză",January:"Ianuarie",February:"Februarie",March:"Martie",April:"Aprilie",May:"Mai",June:"Iunie",July:"Iulie",August:"August",September:"Septembrie",October:"Octombrie",November:"Noiembrie",December:"Decembrie",login:"Autentificare",register:"Înregistrare",details:"Detalii",join:"Participă",joinerror:"A apărut o eroare la înregistrarea în turneu, te rugăm să încerci din nou."},tr:{enrolled:"Katıldın",scoreCriteria:"Skor kriteri",minbet:"en düşük bahis sayısı",seegames:"Turnuvadaki oyunları görmek için",here:"tıklayın",scheduled:"Planlanmış",ongoing:"Devam Eden",finished:"Sona Ermiş",startingAt:"Başlangıç saati:",startedAt:"Başlangıç saati:",mostRounds:"ÇoğuRounds",betCount:"Oynanan Tur Sayısı",maxWinStakeRatio:"Maksimum Kazanç / Bahis Oranı",winStakeRatio:"Kazanç / Bahis Oranı",January:"Ocak",February:"Şubat",March:"Mart",April:"Nisan",May:"Mayıs",June:"Haziran",July:"Temmuz",August:"Ağustos",September:"Eylül",October:"Ekim",November:"Kasım",December:"Aralık",login:"Giriş",register:"Kayıt Ol",details:"Detaylar",join:"Katıl",joinerror:"Turnuvaya katılım ile ilgili bir hata oluştu - "},el:{enrolled:"Εγγεγραμμένος",scoreCriteria:"Κριτήρια Σκορ",minbet:"Ελάχιστος αριθμός πονταρισμάτων",seegames:"Μπορείς να δεις τα παιχνίδια",here:"εδώ",all:"Όλα",scheduled:"Προγραμματισμένα",ongoing:"Τρέχοντα",finished:"Ολοκληρωμένα",startingAt:"Αρχίζει στις:",startedAt:"Άρχισε στις:",startingAtWithTime:"Αρχίζει στις ",startedAtWithTime:"Άρχισε στις ",mostRounds:"Οι περισσότεροι γύροι",betCount:"Οι περισσότεροι γύροι",maxWinStakeRatio:"Μεγαλύτερο Κέρδος άνα Ποντάρισμα",winStakeRatio:"Συνολική Αναλογία Κερδών άνα Ποντάρισμα",January:"Ιανουαρίου",February:"Φεβρουαρίου",March:"Μαρτίου",April:"Απριλίου",May:"Μαΐου",June:"Ιουνίου",July:"Ιουλίου",August:"Αυγούστου",September:"Σεπτεμβρίου",October:"Οκτωβρίου",November:"Νοεμβρίου",December:"Δεκεμβρίου",login:"Είσοδος",register:"Εγγραφή",details:"Λεπτομέρειες",join:"Συμμετοχή",joinerror:"Παρουσιάστηκε σφάλμα κατά τη διαδικασία εγγραφής στο τουρνουά, παρακαλούμε δοκιμάστε ξανά."},es:{enrolled:"Inscrito",scoreCriteria:"Criterios de puntuación",minbet:"la apuesta mínima cuenta",seegames:"Puedes ver los juegos",here:"aquí",scheduled:"Programado",ongoing:"En marcha",finished:"Terminado",startingAt:"Desde",startedAt:"Empezó el:",mostRounds:"LaMayoríaDeLasRondas",betCount:"Recuento De Apuestas",maxWinStakeRatio:"Ratio De Ganancia Máxima",winStakeRatio:"Ratio De Ganancia",January:"de enero",February:"de febrero",March:"de marzo",April:"de abril",May:"de mayo",June:"de junio",July:"de julio",August:"de agosto",September:"de septiembre",October:"de octubre",November:"de noviembre",December:"de diciembre",login:"Iniciar sesión",register:"Regístrate",details:"Detalles",join:"Unirse",joinerror:"Ha ocurrido un error mientras se registra en el Torneo"},pt:{enrolled:"Inscrito",scoreCriteria:"Critérios de pontuação",minbet:"Contagens de aposta mínima",seegames:"Você pode ver os jogos",here:"Aqui",scheduled:"Agendado",ongoing:"Em progresso",finished:"Finalizado",startingAt:"Começando às:",startedAt:"Começou às:",mostRounds:"Mais rodadas",betCount:"Contagem de Apostas",maxWinStakeRatio:"Rácio máximo de vitórias",winStakeRatio:"Rácio de Vitórias",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Entrar",register:"Registro",details:"Detalhes",join:"Junte-se",joinerror:"Ocorreu um erro ao entrar no torneio -"},hu:{enrolled:"Feliratkozott",scoreCriteria:"Pontozási kritériumok",minbet:"Minimális tét",seegames:"Játékok megnézése",here:"itt",scheduled:"Ütemezés",ongoing:"Folyamatban lévő",finished:"Befejezett",startingAt:"Kezdődik",startedAt:"Started at:",mostRounds:"Legtöbb kör",betCount:"Számított tét",maxWinStakeRatio:"Maximális nyeremény tétenként",winStakeRatio:"Összes nyeremény tétenként",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Bejelentkezés",register:"Regisztráció",details:"Adatok",join:"Csatlakozás",joinerror:"Hiba történt a versenyre való regisztráció során, kérjük próbálja újra."},hr:{joined:"Pridružen",enrolled:"Upisan",scoreCriteria:"Kriteriji bodovanja",minbet:"minimalni broj beta",seegames:"Možete vidjeti igre",here:"Ovdje",scheduled:"Zakazano",ongoing:"U tijeku",finished:"Gotovo",startingAt:"S početkom u",startedAt:"Započelo u",startingAtWithTime:"Počinje ",startedAtWithTime:"Započelo ",mostRounds:"Najviše rundi",betCount:"Broj betova",maxWinStakeRatio:"Maksimalni dobitak po ulogu",winStakeRatio:"Ukupni dobitak po ulogu",January:"Siječanj",February:"Veljača",March:"Ožujak",April:"Travanj",May:"Svibanj",June:"Lipanj",July:"Srpanj",August:"Kolovoz",September:"Rujan",October:"Listopad",November:"Studeni",December:"Prosinac",login:"Prijaviti se",register:"Registracija",details:"Detalji",join:"join",joinerror:"Došlo je do pogreške prilikom registracije na turnir, pokušajte ponovno.",left:"lijevo",minutes:"minute",hours:"sati",days:"dani"}},o=(e,t)=>{const i=t;return n[void 0!==i&&r.includes(i)?i:"en"][e]},a=class{constructor(t){e(this,t),this.enrolled=!1,this.showReadMore=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.joinButtonLoading=!1,this.errorJoin=!1,this.errorJoinConcurrently=!1}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){const e=new CSSStyleSheet;e.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,e]}setClientStylingURL(){let e=new URL(this.clientStylingUrl);fetch(e.href).then((e=>e.text())).then((e=>{const t=new CSSStyleSheet;t.replace(e),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}))}loginAction(){this.loginEvent&&(window.postMessage({type:this.loginEvent,transition:"Login"},window.location.href),"function"==typeof gtag&>ag("event","OpenLoginModal",{context:"TournamentsThumbnailController"})),this.loginUrl&&(location.href=this.loginUrl)}registerAction(){this.registerEvent&&(window.postMessage({type:this.registerEvent,transition:"Register"},window.location.href),"function"==typeof gtag&>ag("event","OpenRegisterModal",{context:"TournamentsThumbnailController"})),this.registerUrl&&(location.href=this.registerUrl)}async joinAction(e,t){var i;this.errorJoin=!1,this.errorJoinConcurrently=!1,window.postMessage({type:"TournamentJoinRequest",tournamentId:e},window.location.href),this.joinButtonLoading=!0;let r=new URL(`${this.endpoint}/v1/bonus/claim`),n=new Headers,o={};r.searchParams.append("language",this.language),r.searchParams.append("platform",(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})()),n.append("Content-Type","application/json"),n.append("X-SessionID",this.session),t&&(o={language:this.language,bonusCode:t,currency:this.currency});let a={method:"PUT",headers:n,body:JSON.stringify(o)};const s=()=>{this.joinButtonLoading=!1,this.enrolled=!0,window.postMessage({type:"TournamentUserEnrolled",userenrolled:this.enrolled},window.location.href)},u=()=>{this.joinButtonLoading=!1,this.errorJoin=!0},d=await(async()=>{let e;try{e=await fetch(`${this.endpoint}/v1/bonus/claim?${r.searchParams.toString()}`,a),e=await e.json()}catch(e){u()}return e})();if(d)if(1==d.success)s();else if(d.errorMessage.match("VersionMismatchException")){let e;e=await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`,{headers:{"X-SessionID":this.session}}),e=await e.json(),(null===(i=null==e?void 0:e.item)||void 0===i?void 0:i.playerEnrolled)?s():(u(),this.errorJoinConcurrently=!0,this.errorJoin=!1)}else u()}detailAction(e){window.postMessage({type:"TournamentDetailsClicked",tournamentId:e,showLeaderboard:!0},window.location.href)}moreAction(e){window.postMessage({type:"TournamentReadMoreClicked",tournamentId:e},window.location.href)}render(){return t("div",{class:"TournamentButtons"},!this.session&&t("div",{class:"ButtonGroup"},t("button",{class:"LoginButton Button",part:"LoginButton",onClick:()=>this.loginAction()},o("login",this.language)),t("button",{class:"RegisterButton Button",part:"RegisterButton",onClick:()=>this.registerAction()},o("register",this.language))),this.session&&t("div",null,!this.enrolled&&t("div",{class:"ButtonGroup"},t("button",{class:"Button",onClick:()=>this.joinAction(this.tournamentId,this.bonusCode)},o("join",this.language)),this.showReadMore&&t("button",{class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},"Read more")),this.enrolled&&t("div",{class:"ButtonGroup"},t("button",{class:"Button",onClick:()=>this.detailAction(this.tournamentId)},o("details",this.language)),this.showReadMore&&t("button",{class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},"Read more"))),(this.errorJoin||this.errorJoinConcurrently)&&t("span",{class:"ErrorText",part:"ErrorText"},o("joinerror",this.language)))}get host(){return i(this)}};a.style=':host{display:block}.ButtonGroup{display:flex;gap:4px}.Button{padding:6px 8px;border-radius:2px;border:1px solid #fff;color:#fff;background:none;position:relative;cursor:pointer}.Button.NoBorder{border:0;padding:7px 8px}.Button::after{content:"";display:block;position:absolute;border-radius:2px;left:0;top:0;width:100%;height:100%;opacity:0;transition:all 0.5s;box-shadow:0 0 10px 10px white}.Button:active::after{box-shadow:0 0 0 0 white;position:absolute;border-radius:2px;left:0;top:0;opacity:1;transition:0s}.Button:active{top:1px}';export{a as casino_tournament_buttons}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?h(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=h(e,null);return c.u=t,r.length>0&&(c.$=r),c},h=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),d={},y=(e,t,n,s,r,i)=>{if(n!==s){let c=H(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):H(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},m=/\s/,p=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||y(s,l,o[l],void 0,n,t.t);for(l in r)y(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.$[l],c=0;if(null!==i.i)o=i.m=s.createTextNode(i.i);else if(o=i.m=s.createElement(i.h),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.$)for(c=0;c<i.$.length;++c)r=w(t,i,c),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].m=i,c.insertBefore(i,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.m.remove()},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?(b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:j(c,f)?(v(c,f),c=t[++o],f=l[++r]):j(u,$)?(v(u,$),u=t[--i],$=l[--a]):j(c,$)?(v(c,$),e.insertBefore(c.m,u.m.nextSibling),c=t[++o],$=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.m,c.m),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.m.parentNode.insertBefore(s,c.m));o>i?S(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>q(e).p,k=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},C=(e,t)=>{if(e.t|=16,!(4&e.t))return k(e,e.g),Y((()=>O(e,t)));e.t|=512},O=(e,t)=>{const n=e.j;return T(void 0,(()=>P(e,n,t)))},P=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=u(t),l=B.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);x(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},x=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.M||h(null,null),r=(e=>e&&e.h===d)(l)?l:$(null,null,l);t=s.tagName,r.h=null,r.t|=4,n.M=r,r.m=o.m=s.shadowRoot||s,e=s["s-sc"],v(o,r)})(n,l)}catch(e){V(e,n.p)}return null},E=e=>{const t=e.p,n=e.g;R(e.j,"componentDidRender"),64&e.t||(e.t|=64,A(t),e.k(t),n||N()),e.S&&(e.S(),e.S=void 0),512&e.t&&X((()=>C(e,!1))),e.t&=-517},N=()=>{A(s.documentElement),X((()=>(e=>{const t=o.ce("appload",{detail:{namespace:"casino-tournament-buttons"}});return e.dispatchEvent(t),t})(l)))},R=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){V(e)}},T=(e,t)=>e&&e.then?e.then(t):t(),A=e=>e.classList.add("hydrated"),L=(e,t,n)=>{if(t.C){const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>q(this).O.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=q(e),o=s.O.get(t),r=s.t,i=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.C[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.O.set(t,n),i&&2==(18&r)&&C(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){o.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},U=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),h=[];let d,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],C:t[2],P:t[3]};l.C=t[2];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),F(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),y?h.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=q(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(t,t.g=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=z(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(L(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){V(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!B.has(t)){const l=()=>{};((e,t,n)=>{let l=B.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,B.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>C(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return q(this).N}};l.R=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,L(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),y=!1,h.length?h.map((e=>e.connectedCallback())):o.jmp((()=>d=setTimeout(N,30)))},W=new WeakMap,q=e=>W.get(e),D=(e,t)=>W.set(t.j=e,t),F=(e,t)=>{const n={t:0,p:e,v:t,O:new Map};return n.N=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],W.set(e,n)},H=(e,t)=>t in e,V=(e,t)=>(0,console.error)(e,t),_=new Map,z=e=>{const t=e.o.replace(/-/g,"_"),n=e.R,l=_.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(_.set(n,e),e[t])),V)},B=new Map,G=[],I=[],J=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?X(Q):o.raf(Q))},K=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){V(e)}e.length=0},Q=()=>{K(G),K(I),(n=G.length>0)&&o.raf(Q)},X=e=>r().then(e),Y=J(I,!0);export{U as b,M as g,$ as h,r as p,D as r}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-3c551592.js');
|
|
6
6
|
|
|
7
7
|
const getDevice = () => {
|
|
8
8
|
let userAgent = window.navigator.userAgent;
|
|
@@ -399,7 +399,7 @@ const CasinoTournamentButtons = class {
|
|
|
399
399
|
this.errorJoinConcurrently = false;
|
|
400
400
|
}
|
|
401
401
|
componentDidRender() {
|
|
402
|
-
if (!this.limitStylingAppends && this.
|
|
402
|
+
if (!this.limitStylingAppends && this.host) {
|
|
403
403
|
if (this.clientStyling)
|
|
404
404
|
this.setClientStyling();
|
|
405
405
|
if (this.clientStylingUrl)
|
|
@@ -408,16 +408,23 @@ const CasinoTournamentButtons = class {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
setClientStyling() {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
this.
|
|
411
|
+
const sheet = new CSSStyleSheet();
|
|
412
|
+
// @ts-ignore
|
|
413
|
+
sheet.replace(this.clientStyling);
|
|
414
|
+
// @ts-ignore
|
|
415
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
414
416
|
}
|
|
415
417
|
setClientStylingURL() {
|
|
416
|
-
let
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
418
|
+
let url = new URL(this.clientStylingUrl);
|
|
419
|
+
fetch(url.href)
|
|
420
|
+
.then((res) => res.text())
|
|
421
|
+
.then((data) => {
|
|
422
|
+
const sheet = new CSSStyleSheet();
|
|
423
|
+
// @ts-ignore
|
|
424
|
+
sheet.replace(data);
|
|
425
|
+
// @ts-ignore
|
|
426
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
427
|
+
});
|
|
421
428
|
}
|
|
422
429
|
loginAction() {
|
|
423
430
|
if (this.loginEvent) {
|
|
@@ -455,7 +462,7 @@ const CasinoTournamentButtons = class {
|
|
|
455
462
|
this.errorJoinConcurrently = false;
|
|
456
463
|
window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
|
|
457
464
|
this.joinButtonLoading = true;
|
|
458
|
-
let joinUrl = new URL(`${this.endpoint}/bonus/claim`);
|
|
465
|
+
let joinUrl = new URL(`${this.endpoint}/v1/bonus/claim`);
|
|
459
466
|
let reqHeaders = new Headers();
|
|
460
467
|
let body = {};
|
|
461
468
|
joinUrl.searchParams.append('language', this.language);
|
|
@@ -486,7 +493,7 @@ const CasinoTournamentButtons = class {
|
|
|
486
493
|
const fetcher = async () => {
|
|
487
494
|
let result;
|
|
488
495
|
try {
|
|
489
|
-
result = await fetch(`${this.endpoint}/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
496
|
+
result = await fetch(`${this.endpoint}/v1/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
490
497
|
result = await result.json();
|
|
491
498
|
}
|
|
492
499
|
catch (e) {
|
|
@@ -503,7 +510,7 @@ const CasinoTournamentButtons = class {
|
|
|
503
510
|
else {
|
|
504
511
|
if (data.errorMessage.match("VersionMismatchException")) {
|
|
505
512
|
let resultDoubleCheck;
|
|
506
|
-
resultDoubleCheck = await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`, {
|
|
513
|
+
resultDoubleCheck = await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`, {
|
|
507
514
|
headers: {
|
|
508
515
|
'X-SessionID': this.session
|
|
509
516
|
}
|
|
@@ -530,13 +537,14 @@ const CasinoTournamentButtons = class {
|
|
|
530
537
|
window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
|
|
531
538
|
}
|
|
532
539
|
render() {
|
|
533
|
-
return index.h("div", {
|
|
540
|
+
return index.h("div", { class: "TournamentButtons" }, !this.session &&
|
|
534
541
|
index.h("div", { class: "ButtonGroup" }, index.h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)), index.h("button", { class: "RegisterButton Button", part: "RegisterButton", onClick: () => this.registerAction() }, translate('register', this.language))), this.session &&
|
|
535
542
|
index.h("div", null, !this.enrolled &&
|
|
536
543
|
index.h("div", { class: "ButtonGroup" }, index.h("button", { class: "Button", onClick: () => this.joinAction(this.tournamentId, this.bonusCode) }, translate('join', this.language)), this.showReadMore && index.h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more")), this.enrolled &&
|
|
537
544
|
index.h("div", { class: "ButtonGroup" }, index.h("button", { class: "Button", onClick: () => this.detailAction(this.tournamentId) }, translate('details', this.language)), this.showReadMore && index.h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more"))), (this.errorJoin || this.errorJoinConcurrently) &&
|
|
538
545
|
index.h("span", { class: "ErrorText", part: "ErrorText" }, translate('joinerror', this.language)));
|
|
539
546
|
}
|
|
547
|
+
get host() { return index.getElement(this); }
|
|
540
548
|
};
|
|
541
549
|
CasinoTournamentButtons.style = casinoTournamentButtonsCss;
|
|
542
550
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-3c551592.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["casino-tournament-buttons.cjs",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"
|
|
18
|
+
return index.bootstrapLazy([["casino-tournament-buttons.cjs",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -234,12 +234,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
234
234
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
235
235
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
236
236
|
}
|
|
237
|
-
else if (memberName === 'ref') {
|
|
238
|
-
// minifier will clean this up
|
|
239
|
-
if (newValue) {
|
|
240
|
-
newValue(elm);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
237
|
else if ((!isProp ) &&
|
|
244
238
|
memberName[0] === 'o' &&
|
|
245
239
|
memberName[1] === 'n') {
|
|
@@ -396,7 +390,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
396
390
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
397
391
|
if ((vnode = vnodes[startIdx])) {
|
|
398
392
|
elm = vnode.$elm$;
|
|
399
|
-
callNodeRefs(vnode);
|
|
400
393
|
// remove the vnode's element from the dom
|
|
401
394
|
elm.remove();
|
|
402
395
|
}
|
|
@@ -515,12 +508,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
515
508
|
elm.data = text;
|
|
516
509
|
}
|
|
517
510
|
};
|
|
518
|
-
const callNodeRefs = (vNode) => {
|
|
519
|
-
{
|
|
520
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
521
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
511
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
525
512
|
const hostElm = hostRef.$hostElement$;
|
|
526
513
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -536,6 +523,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
536
523
|
// synchronous patch
|
|
537
524
|
patch(oldVNode, rootVnode);
|
|
538
525
|
};
|
|
526
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
539
527
|
/**
|
|
540
528
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
541
529
|
* @param elm the target of the Event
|
|
@@ -1147,6 +1135,7 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1147
1135
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1148
1136
|
|
|
1149
1137
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1138
|
+
exports.getElement = getElement;
|
|
1150
1139
|
exports.h = h;
|
|
1151
1140
|
exports.promiseResolve = promiseResolve;
|
|
1152
1141
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-3c551592.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["casino-tournament-buttons.cjs",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"
|
|
17
|
+
return index.bootstrapLazy([["casino-tournament-buttons.cjs",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, h, State } from '@stencil/core';
|
|
1
|
+
import { Component, Prop, h, State, Element } from '@stencil/core';
|
|
2
2
|
import { getDevice } from '../../utils/utils';
|
|
3
3
|
import { translate } from '../../utils/locale.utils';
|
|
4
4
|
export class CasinoTournamentButtons {
|
|
@@ -25,7 +25,7 @@ export class CasinoTournamentButtons {
|
|
|
25
25
|
this.errorJoinConcurrently = false;
|
|
26
26
|
}
|
|
27
27
|
componentDidRender() {
|
|
28
|
-
if (!this.limitStylingAppends && this.
|
|
28
|
+
if (!this.limitStylingAppends && this.host) {
|
|
29
29
|
if (this.clientStyling)
|
|
30
30
|
this.setClientStyling();
|
|
31
31
|
if (this.clientStylingUrl)
|
|
@@ -34,16 +34,23 @@ export class CasinoTournamentButtons {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
setClientStyling() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.
|
|
37
|
+
const sheet = new CSSStyleSheet();
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
sheet.replace(this.clientStyling);
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
40
42
|
}
|
|
41
43
|
setClientStylingURL() {
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
let url = new URL(this.clientStylingUrl);
|
|
45
|
+
fetch(url.href)
|
|
46
|
+
.then((res) => res.text())
|
|
47
|
+
.then((data) => {
|
|
48
|
+
const sheet = new CSSStyleSheet();
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
sheet.replace(data);
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
53
|
+
});
|
|
47
54
|
}
|
|
48
55
|
loginAction() {
|
|
49
56
|
if (this.loginEvent) {
|
|
@@ -81,7 +88,7 @@ export class CasinoTournamentButtons {
|
|
|
81
88
|
this.errorJoinConcurrently = false;
|
|
82
89
|
window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
|
|
83
90
|
this.joinButtonLoading = true;
|
|
84
|
-
let joinUrl = new URL(`${this.endpoint}/bonus/claim`);
|
|
91
|
+
let joinUrl = new URL(`${this.endpoint}/v1/bonus/claim`);
|
|
85
92
|
let reqHeaders = new Headers();
|
|
86
93
|
let body = {};
|
|
87
94
|
joinUrl.searchParams.append('language', this.language);
|
|
@@ -112,7 +119,7 @@ export class CasinoTournamentButtons {
|
|
|
112
119
|
const fetcher = async () => {
|
|
113
120
|
let result;
|
|
114
121
|
try {
|
|
115
|
-
result = await fetch(`${this.endpoint}/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
122
|
+
result = await fetch(`${this.endpoint}/v1/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
116
123
|
result = await result.json();
|
|
117
124
|
}
|
|
118
125
|
catch (e) {
|
|
@@ -129,7 +136,7 @@ export class CasinoTournamentButtons {
|
|
|
129
136
|
else {
|
|
130
137
|
if (data.errorMessage.match("VersionMismatchException")) {
|
|
131
138
|
let resultDoubleCheck;
|
|
132
|
-
resultDoubleCheck = await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`, {
|
|
139
|
+
resultDoubleCheck = await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`, {
|
|
133
140
|
headers: {
|
|
134
141
|
'X-SessionID': this.session
|
|
135
142
|
}
|
|
@@ -156,7 +163,7 @@ export class CasinoTournamentButtons {
|
|
|
156
163
|
window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
|
|
157
164
|
}
|
|
158
165
|
render() {
|
|
159
|
-
return h("div", {
|
|
166
|
+
return h("div", { class: "TournamentButtons" },
|
|
160
167
|
!this.session &&
|
|
161
168
|
h("div", { class: "ButtonGroup" },
|
|
162
169
|
h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)),
|
|
@@ -428,9 +435,9 @@ export class CasinoTournamentButtons {
|
|
|
428
435
|
}; }
|
|
429
436
|
static get states() { return {
|
|
430
437
|
"limitStylingAppends": {},
|
|
431
|
-
"stylingContainer": {},
|
|
432
438
|
"joinButtonLoading": {},
|
|
433
439
|
"errorJoin": {},
|
|
434
440
|
"errorJoinConcurrently": {}
|
|
435
441
|
}; }
|
|
442
|
+
static get elementRef() { return "host"; }
|
|
436
443
|
}
|
|
@@ -397,7 +397,7 @@ const CasinoTournamentButtons$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
397
397
|
this.errorJoinConcurrently = false;
|
|
398
398
|
}
|
|
399
399
|
componentDidRender() {
|
|
400
|
-
if (!this.limitStylingAppends && this.
|
|
400
|
+
if (!this.limitStylingAppends && this.host) {
|
|
401
401
|
if (this.clientStyling)
|
|
402
402
|
this.setClientStyling();
|
|
403
403
|
if (this.clientStylingUrl)
|
|
@@ -406,16 +406,23 @@ const CasinoTournamentButtons$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
setClientStyling() {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
this.
|
|
409
|
+
const sheet = new CSSStyleSheet();
|
|
410
|
+
// @ts-ignore
|
|
411
|
+
sheet.replace(this.clientStyling);
|
|
412
|
+
// @ts-ignore
|
|
413
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
412
414
|
}
|
|
413
415
|
setClientStylingURL() {
|
|
414
|
-
let
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
let url = new URL(this.clientStylingUrl);
|
|
417
|
+
fetch(url.href)
|
|
418
|
+
.then((res) => res.text())
|
|
419
|
+
.then((data) => {
|
|
420
|
+
const sheet = new CSSStyleSheet();
|
|
421
|
+
// @ts-ignore
|
|
422
|
+
sheet.replace(data);
|
|
423
|
+
// @ts-ignore
|
|
424
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
425
|
+
});
|
|
419
426
|
}
|
|
420
427
|
loginAction() {
|
|
421
428
|
if (this.loginEvent) {
|
|
@@ -453,7 +460,7 @@ const CasinoTournamentButtons$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
453
460
|
this.errorJoinConcurrently = false;
|
|
454
461
|
window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
|
|
455
462
|
this.joinButtonLoading = true;
|
|
456
|
-
let joinUrl = new URL(`${this.endpoint}/bonus/claim`);
|
|
463
|
+
let joinUrl = new URL(`${this.endpoint}/v1/bonus/claim`);
|
|
457
464
|
let reqHeaders = new Headers();
|
|
458
465
|
let body = {};
|
|
459
466
|
joinUrl.searchParams.append('language', this.language);
|
|
@@ -484,7 +491,7 @@ const CasinoTournamentButtons$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
484
491
|
const fetcher = async () => {
|
|
485
492
|
let result;
|
|
486
493
|
try {
|
|
487
|
-
result = await fetch(`${this.endpoint}/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
494
|
+
result = await fetch(`${this.endpoint}/v1/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
488
495
|
result = await result.json();
|
|
489
496
|
}
|
|
490
497
|
catch (e) {
|
|
@@ -501,7 +508,7 @@ const CasinoTournamentButtons$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
501
508
|
else {
|
|
502
509
|
if (data.errorMessage.match("VersionMismatchException")) {
|
|
503
510
|
let resultDoubleCheck;
|
|
504
|
-
resultDoubleCheck = await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`, {
|
|
511
|
+
resultDoubleCheck = await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`, {
|
|
505
512
|
headers: {
|
|
506
513
|
'X-SessionID': this.session
|
|
507
514
|
}
|
|
@@ -528,13 +535,14 @@ const CasinoTournamentButtons$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
528
535
|
window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
|
|
529
536
|
}
|
|
530
537
|
render() {
|
|
531
|
-
return h("div", {
|
|
538
|
+
return h("div", { class: "TournamentButtons" }, !this.session &&
|
|
532
539
|
h("div", { class: "ButtonGroup" }, h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)), h("button", { class: "RegisterButton Button", part: "RegisterButton", onClick: () => this.registerAction() }, translate('register', this.language))), this.session &&
|
|
533
540
|
h("div", null, !this.enrolled &&
|
|
534
541
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.joinAction(this.tournamentId, this.bonusCode) }, translate('join', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more")), this.enrolled &&
|
|
535
542
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.detailAction(this.tournamentId) }, translate('details', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more"))), (this.errorJoin || this.errorJoinConcurrently) &&
|
|
536
543
|
h("span", { class: "ErrorText", part: "ErrorText" }, translate('joinerror', this.language)));
|
|
537
544
|
}
|
|
545
|
+
get host() { return this; }
|
|
538
546
|
static get style() { return casinoTournamentButtonsCss; }
|
|
539
547
|
}, [1, "casino-tournament-buttons", {
|
|
540
548
|
"language": [1],
|
|
@@ -552,7 +560,6 @@ const CasinoTournamentButtons$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
552
560
|
"clientStyling": [1, "client-styling"],
|
|
553
561
|
"clientStylingUrl": [1, "client-styling-url"],
|
|
554
562
|
"limitStylingAppends": [32],
|
|
555
|
-
"stylingContainer": [32],
|
|
556
563
|
"joinButtonLoading": [32],
|
|
557
564
|
"errorJoin": [32],
|
|
558
565
|
"errorJoinConcurrently": [32]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-2a64c803.js';
|
|
2
2
|
|
|
3
3
|
const getDevice = () => {
|
|
4
4
|
let userAgent = window.navigator.userAgent;
|
|
@@ -395,7 +395,7 @@ const CasinoTournamentButtons = class {
|
|
|
395
395
|
this.errorJoinConcurrently = false;
|
|
396
396
|
}
|
|
397
397
|
componentDidRender() {
|
|
398
|
-
if (!this.limitStylingAppends && this.
|
|
398
|
+
if (!this.limitStylingAppends && this.host) {
|
|
399
399
|
if (this.clientStyling)
|
|
400
400
|
this.setClientStyling();
|
|
401
401
|
if (this.clientStylingUrl)
|
|
@@ -404,16 +404,23 @@ const CasinoTournamentButtons = class {
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
setClientStyling() {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
this.
|
|
407
|
+
const sheet = new CSSStyleSheet();
|
|
408
|
+
// @ts-ignore
|
|
409
|
+
sheet.replace(this.clientStyling);
|
|
410
|
+
// @ts-ignore
|
|
411
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
410
412
|
}
|
|
411
413
|
setClientStylingURL() {
|
|
412
|
-
let
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
414
|
+
let url = new URL(this.clientStylingUrl);
|
|
415
|
+
fetch(url.href)
|
|
416
|
+
.then((res) => res.text())
|
|
417
|
+
.then((data) => {
|
|
418
|
+
const sheet = new CSSStyleSheet();
|
|
419
|
+
// @ts-ignore
|
|
420
|
+
sheet.replace(data);
|
|
421
|
+
// @ts-ignore
|
|
422
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
423
|
+
});
|
|
417
424
|
}
|
|
418
425
|
loginAction() {
|
|
419
426
|
if (this.loginEvent) {
|
|
@@ -451,7 +458,7 @@ const CasinoTournamentButtons = class {
|
|
|
451
458
|
this.errorJoinConcurrently = false;
|
|
452
459
|
window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
|
|
453
460
|
this.joinButtonLoading = true;
|
|
454
|
-
let joinUrl = new URL(`${this.endpoint}/bonus/claim`);
|
|
461
|
+
let joinUrl = new URL(`${this.endpoint}/v1/bonus/claim`);
|
|
455
462
|
let reqHeaders = new Headers();
|
|
456
463
|
let body = {};
|
|
457
464
|
joinUrl.searchParams.append('language', this.language);
|
|
@@ -482,7 +489,7 @@ const CasinoTournamentButtons = class {
|
|
|
482
489
|
const fetcher = async () => {
|
|
483
490
|
let result;
|
|
484
491
|
try {
|
|
485
|
-
result = await fetch(`${this.endpoint}/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
492
|
+
result = await fetch(`${this.endpoint}/v1/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
486
493
|
result = await result.json();
|
|
487
494
|
}
|
|
488
495
|
catch (e) {
|
|
@@ -499,7 +506,7 @@ const CasinoTournamentButtons = class {
|
|
|
499
506
|
else {
|
|
500
507
|
if (data.errorMessage.match("VersionMismatchException")) {
|
|
501
508
|
let resultDoubleCheck;
|
|
502
|
-
resultDoubleCheck = await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`, {
|
|
509
|
+
resultDoubleCheck = await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`, {
|
|
503
510
|
headers: {
|
|
504
511
|
'X-SessionID': this.session
|
|
505
512
|
}
|
|
@@ -526,13 +533,14 @@ const CasinoTournamentButtons = class {
|
|
|
526
533
|
window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
|
|
527
534
|
}
|
|
528
535
|
render() {
|
|
529
|
-
return h("div", {
|
|
536
|
+
return h("div", { class: "TournamentButtons" }, !this.session &&
|
|
530
537
|
h("div", { class: "ButtonGroup" }, h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)), h("button", { class: "RegisterButton Button", part: "RegisterButton", onClick: () => this.registerAction() }, translate('register', this.language))), this.session &&
|
|
531
538
|
h("div", null, !this.enrolled &&
|
|
532
539
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.joinAction(this.tournamentId, this.bonusCode) }, translate('join', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more")), this.enrolled &&
|
|
533
540
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.detailAction(this.tournamentId) }, translate('details', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more"))), (this.errorJoin || this.errorJoinConcurrently) &&
|
|
534
541
|
h("span", { class: "ErrorText", part: "ErrorText" }, translate('joinerror', this.language)));
|
|
535
542
|
}
|
|
543
|
+
get host() { return getElement(this); }
|
|
536
544
|
};
|
|
537
545
|
CasinoTournamentButtons.style = casinoTournamentButtonsCss;
|
|
538
546
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-2a64c803.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["casino-tournament-buttons",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"
|
|
16
|
+
return bootstrapLazy([["casino-tournament-buttons",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -212,12 +212,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
212
212
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
213
213
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
214
214
|
}
|
|
215
|
-
else if (memberName === 'ref') {
|
|
216
|
-
// minifier will clean this up
|
|
217
|
-
if (newValue) {
|
|
218
|
-
newValue(elm);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
215
|
else if ((!isProp ) &&
|
|
222
216
|
memberName[0] === 'o' &&
|
|
223
217
|
memberName[1] === 'n') {
|
|
@@ -374,7 +368,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
374
368
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
375
369
|
if ((vnode = vnodes[startIdx])) {
|
|
376
370
|
elm = vnode.$elm$;
|
|
377
|
-
callNodeRefs(vnode);
|
|
378
371
|
// remove the vnode's element from the dom
|
|
379
372
|
elm.remove();
|
|
380
373
|
}
|
|
@@ -493,12 +486,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
493
486
|
elm.data = text;
|
|
494
487
|
}
|
|
495
488
|
};
|
|
496
|
-
const callNodeRefs = (vNode) => {
|
|
497
|
-
{
|
|
498
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
499
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
500
|
-
}
|
|
501
|
-
};
|
|
502
489
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
503
490
|
const hostElm = hostRef.$hostElement$;
|
|
504
491
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -514,6 +501,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
514
501
|
// synchronous patch
|
|
515
502
|
patch(oldVNode, rootVnode);
|
|
516
503
|
};
|
|
504
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
517
505
|
/**
|
|
518
506
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
519
507
|
* @param elm the target of the Event
|
|
@@ -1124,4 +1112,4 @@ const flush = () => {
|
|
|
1124
1112
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1125
1113
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1126
1114
|
|
|
1127
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1115
|
+
export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-2a64c803.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["casino-tournament-buttons",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"
|
|
13
|
+
return bootstrapLazy([["casino-tournament-buttons",[[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -56,10 +56,10 @@ export declare class CasinoTournamentButtons {
|
|
|
56
56
|
*/
|
|
57
57
|
clientStylingUrl?: string;
|
|
58
58
|
limitStylingAppends: boolean;
|
|
59
|
-
stylingContainer: HTMLElement;
|
|
60
59
|
joinButtonLoading: boolean;
|
|
61
60
|
errorJoin: boolean;
|
|
62
61
|
errorJoinConcurrently: boolean;
|
|
62
|
+
host: HTMLElement;
|
|
63
63
|
componentDidRender(): void;
|
|
64
64
|
setClientStyling(): void;
|
|
65
65
|
setClientStylingURL(): void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-6ef0312c.js";const i=["ro","en","zh-hk","fr","hu","tr","el","es","pt","hr"],r={en:{joined:"Joined",join:"Join",enrolled:"Enrolled",scoreCriteria:"Score Criteria",minbet:"min bet count",seegames:"You can see the games",here:"here",scheduled:"Scheduled",ongoing:"Ongoing",finished:"Finished",startingAt:"Starting at:",startedAt:"Started at:",startingAtWithTime:"Starts ",startedAtWithTime:"Started ",mostRounds:"Most Rounds",betCount:"Number of Bets",maxWinStakeRatio:"Max Win per Stake",winStakeRatio:"Total Win per Stake",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Log in",register:"Register",details:"Details",joinerror:"An error occurred while registering in the tournament, please try again."},"zh-hk":{enrolled:"已註冊",scoreCriteria:"評分標準",minbet:"最小投注數:",seegames:"你可以看比賽",here:"這裡",scheduled:"預定的",ongoing:"進行中",finished:"完成的",startingAt:"開始於",startedAt:"大多數回合",mostRounds:"投注數",betCount:"投注计数",maxWinStakeRatio:"最大勝率",winStakeRatio:"勝率",January:"一月",February:"二月",March:"行进",April:"四月",May:"可能",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月",login:"登錄",register:"登記",details:"細節",join:"加入",joinerror:"加入錦標賽時出錯,請重試"},fr:{enrolled:"Inscrits",scoreCriteria:"Critères de notation",minbet:"nombre de paris minimum",seegames:"Vous pouvez voir les jeux",here:"ici",scheduled:"Programmé",ongoing:"En cours",finished:"Fini",startingAt:"À partir de:",startedAt:"Commencé à:",mostRounds:"Le plus grand nombre de tours",betCount:"Nombre de paris",maxWinStakeRatio:"Indice maximum du gain d'une mise",winStakeRatio:"Indice du gain d'une mise",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Connexion",register:"Enregistre",details:"Détails",join:"Rejoignez",joinerror:"Une erreur s'est produite lors de l'inscription au tournoi - "},ro:{enrolled:"Înscris",scoreCriteria:"Criterii de punctaj",minbet:"număr minim de pariuri",seegames:"Vezi jocurile",here:"aici",scheduled:"Programat",ongoing:"În desfășurare",finished:"Finalizat",startingAt:"Începând de la",startedAt:"A inceput la:",startingAtWithTime:"Începând de",startedAtWithTime:"A inceput:",mostRounds:"Cele mai multe runde",betCount:"Număr de pariuri",maxWinStakeRatio:"Pondere maximă a mizei din câștig",winStakeRatio:"Câștig Total per Miză",January:"Ianuarie",February:"Februarie",March:"Martie",April:"Aprilie",May:"Mai",June:"Iunie",July:"Iulie",August:"August",September:"Septembrie",October:"Octombrie",November:"Noiembrie",December:"Decembrie",login:"Autentificare",register:"Înregistrare",details:"Detalii",join:"Participă",joinerror:"A apărut o eroare la înregistrarea în turneu, te rugăm să încerci din nou."},tr:{enrolled:"Katıldın",scoreCriteria:"Skor kriteri",minbet:"en düşük bahis sayısı",seegames:"Turnuvadaki oyunları görmek için",here:"tıklayın",scheduled:"Planlanmış",ongoing:"Devam Eden",finished:"Sona Ermiş",startingAt:"Başlangıç saati:",startedAt:"Başlangıç saati:",mostRounds:"ÇoğuRounds",betCount:"Oynanan Tur Sayısı",maxWinStakeRatio:"Maksimum Kazanç / Bahis Oranı",winStakeRatio:"Kazanç / Bahis Oranı",January:"Ocak",February:"Şubat",March:"Mart",April:"Nisan",May:"Mayıs",June:"Haziran",July:"Temmuz",August:"Ağustos",September:"Eylül",October:"Ekim",November:"Kasım",December:"Aralık",login:"Giriş",register:"Kayıt Ol",details:"Detaylar",join:"Katıl",joinerror:"Turnuvaya katılım ile ilgili bir hata oluştu - "},el:{enrolled:"Εγγεγραμμένος",scoreCriteria:"Κριτήρια Σκορ",minbet:"Ελάχιστος αριθμός πονταρισμάτων",seegames:"Μπορείς να δεις τα παιχνίδια",here:"εδώ",all:"Όλα",scheduled:"Προγραμματισμένα",ongoing:"Τρέχοντα",finished:"Ολοκληρωμένα",startingAt:"Αρχίζει στις:",startedAt:"Άρχισε στις:",startingAtWithTime:"Αρχίζει στις ",startedAtWithTime:"Άρχισε στις ",mostRounds:"Οι περισσότεροι γύροι",betCount:"Οι περισσότεροι γύροι",maxWinStakeRatio:"Μεγαλύτερο Κέρδος άνα Ποντάρισμα",winStakeRatio:"Συνολική Αναλογία Κερδών άνα Ποντάρισμα",January:"Ιανουαρίου",February:"Φεβρουαρίου",March:"Μαρτίου",April:"Απριλίου",May:"Μαΐου",June:"Ιουνίου",July:"Ιουλίου",August:"Αυγούστου",September:"Σεπτεμβρίου",October:"Οκτωβρίου",November:"Νοεμβρίου",December:"Δεκεμβρίου",login:"Είσοδος",register:"Εγγραφή",details:"Λεπτομέρειες",join:"Συμμετοχή",joinerror:"Παρουσιάστηκε σφάλμα κατά τη διαδικασία εγγραφής στο τουρνουά, παρακαλούμε δοκιμάστε ξανά."},es:{enrolled:"Inscrito",scoreCriteria:"Criterios de puntuación",minbet:"la apuesta mínima cuenta",seegames:"Puedes ver los juegos",here:"aquí",scheduled:"Programado",ongoing:"En marcha",finished:"Terminado",startingAt:"Desde",startedAt:"Empezó el:",mostRounds:"LaMayoríaDeLasRondas",betCount:"Recuento De Apuestas",maxWinStakeRatio:"Ratio De Ganancia Máxima",winStakeRatio:"Ratio De Ganancia",January:"de enero",February:"de febrero",March:"de marzo",April:"de abril",May:"de mayo",June:"de junio",July:"de julio",August:"de agosto",September:"de septiembre",October:"de octubre",November:"de noviembre",December:"de diciembre",login:"Iniciar sesión",register:"Regístrate",details:"Detalles",join:"Unirse",joinerror:"Ha ocurrido un error mientras se registra en el Torneo"},pt:{enrolled:"Inscrito",scoreCriteria:"Critérios de pontuação",minbet:"Contagens de aposta mínima",seegames:"Você pode ver os jogos",here:"Aqui",scheduled:"Agendado",ongoing:"Em progresso",finished:"Finalizado",startingAt:"Começando às:",startedAt:"Começou às:",mostRounds:"Mais rodadas",betCount:"Contagem de Apostas",maxWinStakeRatio:"Rácio máximo de vitórias",winStakeRatio:"Rácio de Vitórias",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Entrar",register:"Registro",details:"Detalhes",join:"Junte-se",joinerror:"Ocorreu um erro ao entrar no torneio -"},hu:{enrolled:"Feliratkozott",scoreCriteria:"Pontozási kritériumok",minbet:"Minimális tét",seegames:"Játékok megnézése",here:"itt",scheduled:"Ütemezés",ongoing:"Folyamatban lévő",finished:"Befejezett",startingAt:"Kezdődik",startedAt:"Started at:",mostRounds:"Legtöbb kör",betCount:"Számított tét",maxWinStakeRatio:"Maximális nyeremény tétenként",winStakeRatio:"Összes nyeremény tétenként",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Bejelentkezés",register:"Regisztráció",details:"Adatok",join:"Csatlakozás",joinerror:"Hiba történt a versenyre való regisztráció során, kérjük próbálja újra."},hr:{joined:"Pridružen",enrolled:"Upisan",scoreCriteria:"Kriteriji bodovanja",minbet:"minimalni broj beta",seegames:"Možete vidjeti igre",here:"Ovdje",scheduled:"Zakazano",ongoing:"U tijeku",finished:"Gotovo",startingAt:"S početkom u",startedAt:"Započelo u",startingAtWithTime:"Počinje ",startedAtWithTime:"Započelo ",mostRounds:"Najviše rundi",betCount:"Broj betova",maxWinStakeRatio:"Maksimalni dobitak po ulogu",winStakeRatio:"Ukupni dobitak po ulogu",January:"Siječanj",February:"Veljača",March:"Ožujak",April:"Travanj",May:"Svibanj",June:"Lipanj",July:"Srpanj",August:"Kolovoz",September:"Rujan",October:"Listopad",November:"Studeni",December:"Prosinac",login:"Prijaviti se",register:"Registracija",details:"Detalji",join:"join",joinerror:"Došlo je do pogreške prilikom registracije na turnir, pokušajte ponovno.",left:"lijevo",minutes:"minute",hours:"sati",days:"dani"}},o=(e,t)=>{const o=t;return r[void 0!==o&&i.includes(o)?o:"en"][e]},n=class{constructor(t){e(this,t),this.enrolled=!1,this.showReadMore=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.joinButtonLoading=!1,this.errorJoin=!1,this.errorJoinConcurrently=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)}setClientStylingURL(){let e=document.createElement("style");setTimeout((()=>{e.innerHTML=this.clientStylingUrl,this.stylingContainer.prepend(e)}),1)}loginAction(){this.loginEvent&&(window.postMessage({type:this.loginEvent,transition:"Login"},window.location.href),"function"==typeof gtag&>ag("event","OpenLoginModal",{context:"TournamentsThumbnailController"})),this.loginUrl&&(location.href=this.loginUrl)}registerAction(){this.registerEvent&&(window.postMessage({type:this.registerEvent,transition:"Register"},window.location.href),"function"==typeof gtag&>ag("event","OpenRegisterModal",{context:"TournamentsThumbnailController"})),this.registerUrl&&(location.href=this.registerUrl)}async joinAction(e,t){var i;this.errorJoin=!1,this.errorJoinConcurrently=!1,window.postMessage({type:"TournamentJoinRequest",tournamentId:e},window.location.href),this.joinButtonLoading=!0;let r=new URL(`${this.endpoint}/bonus/claim`),o=new Headers,n={};r.searchParams.append("language",this.language),r.searchParams.append("platform",(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})()),o.append("Content-Type","application/json"),o.append("X-SessionID",this.session),t&&(n={language:this.language,bonusCode:t,currency:this.currency});let a={method:"PUT",headers:o,body:JSON.stringify(n)};const s=()=>{this.joinButtonLoading=!1,this.enrolled=!0,window.postMessage({type:"TournamentUserEnrolled",userenrolled:this.enrolled},window.location.href)},u=()=>{this.joinButtonLoading=!1,this.errorJoin=!0},d=await(async()=>{let e;try{e=await fetch(`${this.endpoint}/bonus/claim?${r.searchParams.toString()}`,a),e=await e.json()}catch(e){u()}return e})();if(d)if(1==d.success)s();else if(d.errorMessage.match("VersionMismatchException")){let e;e=await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`,{headers:{"X-SessionID":this.session}}),e=await e.json(),(null===(i=null==e?void 0:e.item)||void 0===i?void 0:i.playerEnrolled)?s():(u(),this.errorJoinConcurrently=!0,this.errorJoin=!1)}else u()}detailAction(e){window.postMessage({type:"TournamentDetailsClicked",tournamentId:e,showLeaderboard:!0},window.location.href)}moreAction(e){window.postMessage({type:"TournamentReadMoreClicked",tournamentId:e},window.location.href)}render(){return t("div",{ref:e=>this.stylingContainer=e,class:"TournamentButtons"},!this.session&&t("div",{class:"ButtonGroup"},t("button",{class:"LoginButton Button",part:"LoginButton",onClick:()=>this.loginAction()},o("login",this.language)),t("button",{class:"RegisterButton Button",part:"RegisterButton",onClick:()=>this.registerAction()},o("register",this.language))),this.session&&t("div",null,!this.enrolled&&t("div",{class:"ButtonGroup"},t("button",{class:"Button",onClick:()=>this.joinAction(this.tournamentId,this.bonusCode)},o("join",this.language)),this.showReadMore&&t("button",{class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},"Read more")),this.enrolled&&t("div",{class:"ButtonGroup"},t("button",{class:"Button",onClick:()=>this.detailAction(this.tournamentId)},o("details",this.language)),this.showReadMore&&t("button",{class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},"Read more"))),(this.errorJoin||this.errorJoinConcurrently)&&t("span",{class:"ErrorText",part:"ErrorText"},o("joinerror",this.language)))}};n.style=':host{display:block}.ButtonGroup{display:flex;gap:4px}.Button{padding:6px 8px;border-radius:2px;border:1px solid #fff;color:#fff;background:none;position:relative;cursor:pointer}.Button.NoBorder{border:0;padding:7px 8px}.Button::after{content:"";display:block;position:absolute;border-radius:2px;left:0;top:0;width:100%;height:100%;opacity:0;transition:all 0.5s;box-shadow:0 0 10px 10px white}.Button:active::after{box-shadow:0 0 0 0 white;position:absolute;border-radius:2px;left:0;top:0;opacity:1;transition:0s}.Button:active{top:1px}';export{n as casino_tournament_buttons}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?h(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=h(e,null);return c.u=t,r.length>0&&(c.$=r),c},h=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),d={},y=(e,t,n,s,r,i)=>{if(n!==s){let c=H(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):H(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},m=/\s/,p=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||y(s,l,o[l],void 0,n,t.t);for(l in r)y(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.$[l],c=0;if(null!==i.i)o=i.m=s.createTextNode(i.i);else if(o=i.m=s.createElement(i.h),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.$)for(c=0;c<i.$.length;++c)r=w(t,i,c),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].m=i,c.insertBefore(i,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,M(l),s.remove())},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?(b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:j(c,f)?(v(c,f),c=t[++o],f=l[++r]):j(u,$)?(v(u,$),u=t[--i],$=l[--a]):j(c,$)?(v(c,$),e.insertBefore(c.m,u.m.nextSibling),c=t[++o],$=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.m,c.m),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.m.parentNode.insertBefore(s,c.m));o>i?S(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(M)},k=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},C=(e,t)=>{if(e.t|=16,!(4&e.t))return k(e,e.S),Y((()=>O(e,t)));e.t|=512},O=(e,t)=>{const n=e.g;return T(void 0,(()=>P(e,n,t)))},P=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.j,l=t.t,o=((e,t)=>{let n=u(t),l=B.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);x(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},x=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.M||h(null,null),r=(e=>e&&e.h===d)(l)?l:$(null,null,l);t=s.tagName,r.h=null,r.t|=4,n.M=r,r.m=o.m=s.shadowRoot||s,e=s["s-sc"],v(o,r)})(n,l)}catch(e){V(e,n.j)}return null},E=e=>{const t=e.j,n=e.S;R(e.g,"componentDidRender"),64&e.t||(e.t|=64,A(t),e.k(t),n||N()),e.p&&(e.p(),e.p=void 0),512&e.t&&X((()=>C(e,!1))),e.t&=-517},N=()=>{A(s.documentElement),X((()=>(e=>{const t=o.ce("appload",{detail:{namespace:"casino-tournament-buttons"}});return e.dispatchEvent(t),t})(l)))},R=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){V(e)}},T=(e,t)=>e&&e.then?e.then(t):t(),A=e=>e.classList.add("hydrated"),L=(e,t,n)=>{if(t.C){const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>q(this).O.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=q(e),o=s.O.get(t),r=s.t,i=s.g;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.C[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.O.set(t,n),i&&2==(18&r)&&C(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){o.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},U=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),h=[];let d,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],C:t[2],P:t[3]};l.C=t[2];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),F(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),y?h.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=q(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(t,t.S=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=z(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(L(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){V(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!B.has(t)){const l=()=>{};((e,t,n)=>{let l=B.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,B.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.S,r=()=>C(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return q(this).N}};l.R=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,L(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),y=!1,h.length?h.map((e=>e.connectedCallback())):o.jmp((()=>d=setTimeout(N,30)))},W=new WeakMap,q=e=>W.get(e),D=(e,t)=>W.set(t.g=e,t),F=(e,t)=>{const n={t:0,j:e,v:t,O:new Map};return n.N=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],W.set(e,n)},H=(e,t)=>t in e,V=(e,t)=>(0,console.error)(e,t),_=new Map,z=e=>{const t=e.o.replace(/-/g,"_"),n=e.R,l=_.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(_.set(n,e),e[t])),V)},B=new Map,G=[],I=[],J=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?X(Q):o.raf(Q))},K=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){V(e)}e.length=0},Q=()=>{K(G),K(I),(n=G.length>0)&&o.raf(Q)},X=e=>r().then(e),Y=J(I,!0);export{U as b,$ as h,r as p,D as r}
|