@everymatrix/casino-collections-providers 0.0.417 → 0.0.419
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.
@@ -636,7 +636,7 @@ return t.stopPropagation(),n.call(this,t)})),o=!0)},p(o,i){t=o,/*gameCategories*
|
|
636
636
|
function Tn(t){let e,r,n,o,i,s,a,l,c;function m(t,e){/*titletype*/
|
637
637
|
return"logo"==t[1]?En:/*titletype*/"title"==t[1]?vn:void 0}let v=m(t),_=v&&v(t),T=/*category*/t[37].games,w=[];for(let e=0;e<T.length;e+=1)w[e]=_n(yn(t,T,e));function A(){/*click_handler_3*/
|
638
638
|
return t[20](/*category*/t[37])}return{c(){e=d("div"),r=d("div"),n=d("div"),_&&_.c(),o=y(),i=d("div");for(let t=0;t<w.length;t+=1)w[t].c();a=y(),g(n,"class","CategorySlideTopContainer"),g(i,"class","CategorySlideGameContainer"),g(r,"class",s="CategorySlide "+(/*category*/"vendor"==t[37]?.flag[0]?"CategorySlideNoHighlight":"")),E(r,"background-image","url("+/*category*/t[37]?.background+")"),g(e,"class","CategoriesSliderWrapper Animation")},m(t,s){h(t,e,s),u(e,r),u(r,n),_&&_.m(n,null),u(r,o),u(r,i);for(let t=0;t<w.length;t+=1)w[t].m(i,null);u(e,a),l||(c=b(r,"click",A),l=!0)},p(e,o){if(v===(v=m(t=e))&&_?_.p(t,o):(_&&_.d(1),_=v&&v(t),_&&(_.c(),_.m(n,null))),/*gameCategories, openGame*/1028&o[0]){let e;for(T=/*category*/t[37].games,e=0;e<T.length;e+=1){const r=yn(t,T,e);w[e]?w[e].p(r,o):(w[e]=_n(r),w[e].c(),w[e].m(i,null))}for(;e<w.length;e+=1)w[e].d(1);w.length=T.length}/*gameCategories*/4&o[0]&&s!==(s="CategorySlide "+(/*category*/"vendor"==t[37]?.flag[0]?"CategorySlideNoHighlight":""))&&g(r,"class",s),/*gameCategories*/4&o[0]&&E(r,"background-image","url("+/*category*/t[37]?.background+")")},d(t){t&&f(e),_&&_.d(),p(w,t),l=!1,c()}}}function wn(e){let r;function n(t,e){/*isLoading*/
|
639
|
-
return t[
|
639
|
+
return t[5]?gn:bn}let o=n(e),i=o(e);return{c(){r=d("div"),i.c(),this.c=t},m(t,n){h(t,r,n),i.m(r,null),
|
640
640
|
/*div_binding*/e[22](r)},p(t,e){o===(o=n(t))&&i?i.p(t,e):(i.d(1),i=o(t),i&&(i.c(),i.m(r,null)))},i:t,o:t,d(t){t&&f(r),i.d(),
|
641
641
|
/*div_binding*/e[22](null)}}}function An(t,e,r){let n;var o,i;o=ir,i=t=>r(7,n=t),t.$$.on_destroy.push(c(o,i));let s,a,l,u,h,{endpoint:f=""}=e,{datasource:p=""}=e,{lang:d=""}=e,{type:m=""}=e,{titletype:y=""}=e,{clientstyling:b=""}=e,{clientstylingurl:g=""}=e,v=[],E=!0,_=0,T=0,A=0,S=window.navigator.userAgent;Object.keys(sr).forEach((t=>{!function(t,e){Ie(t,e)}(t,sr[t])}));const H=t=>{
|
642
642
|
//store each slide HTML element in an array
|
@@ -646,7 +646,7 @@ l.forEach(((e,r)=>{e.style.transform=`translateX(${100*(t?r-t:r)}%)`})),l.map((t
|
|
646
646
|
//needed for finding the beginning and end of the slider
|
647
647
|
A=Math.round(s.offsetWidth/a)},C=()=>{
|
648
648
|
//in order to go to a specific slide, position all the slides relative to one of them, one which is determined by sliderScrollLeft and sliderScrollRight
|
649
|
-
H(_)},L=()=>{A>=T||(0===_?_=T-A:_-A<-1?_=0:_--,C())},O=()=>{A>=T||(_===T-A?_=0:T-A<_+1?_=T-A:_++,C())},I=(t,e,r)=>{window.postMessage({type:"OpenCollectionsProvidersGame",gameId:t,launchUrl:e,gameName:r},window.location.href)},N=t=>{window.postMessage({type:"OpenCollectionsProvidersCategory",categoryId:t},window.location.href)},R=()=>{var t;t=d,Ke.set(t)};w((()=>{r(6,h=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(S))}));return t.$$set=t=>{"endpoint"in t&&r(12,f=t.endpoint),"datasource"in t&&r(13,p=t.datasource),"lang"in t&&r(14,d=t.lang),"type"in t&&r(0,m=t.type),"titletype"in t&&r(1,y=t.titletype),"clientstyling"in t&&r(15,b=t.clientstyling),"clientstylingurl"in t&&r(16,g=t.clientstylingurl)},t.$$.update=()=>{/*endpoint, datasource, lang*/28672&t.$$.dirty[0]&&f&&p&&d&&(()=>{const t=new URL(`${f}/v2/casino/groups/${p}`);t.searchParams.append("language",d),t.searchParams.append("expand","games"),fetch(t.href).then((t=>t.json())).then((t=>{r(
|
649
|
+
H(_)},L=()=>{A>=T||(0===_?_=T-A:_-A<-1?_=0:_--,C())},O=()=>{A>=T||(_===T-A?_=0:T-A<_+1?_=T-A:_++,C())},I=(t,e,r)=>{window.postMessage({type:"OpenCollectionsProvidersGame",gameId:t,launchUrl:e,gameName:r},window.location.href)},N=t=>{window.postMessage({type:"OpenCollectionsProvidersCategory",categoryId:t},window.location.href)},R=()=>{var t;t=d,Ke.set(t)};w((()=>{r(6,h=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(S))}));return t.$$set=t=>{"endpoint"in t&&r(12,f=t.endpoint),"datasource"in t&&r(13,p=t.datasource),"lang"in t&&r(14,d=t.lang),"type"in t&&r(0,m=t.type),"titletype"in t&&r(1,y=t.titletype),"clientstyling"in t&&r(15,b=t.clientstyling),"clientstylingurl"in t&&r(16,g=t.clientstylingurl)},t.$$.update=()=>{/*endpoint, datasource, lang*/28672&t.$$.dirty[0]&&f&&p&&d&&(()=>{const t=new URL(`${f}/v2/casino/groups/${p}`);t.searchParams.append("language",d),t.searchParams.append("expand","games"),fetch(t.href).then((t=>t.json())).then((t=>{r(5,E=!1);let e=t.items.filter((t=>t.flags==m));r(2,v=e.map((t=>({id:t.id,name:t.name,icon:t.icon,games:t.games.items.slice(0,4).map((t=>t)),background:t.background,flag:t.flags})))),T=v.length}))})(),/*gameCategories, categoriesSlider*/12&t.$$.dirty[0]&&
|
650
650
|
//making sure we have something to position, before trying to
|
651
|
-
v&&s&&H(),/*lang*/16384&t.$$.dirty[0]&&d&&R(),/*clientstyling*/
|
651
|
+
v&&s&&H(),/*lang*/16384&t.$$.dirty[0]&&d&&R(),/*clientstyling, customStylingContainer*/32784&t.$$.dirty[0]&&b&&u&&(()=>{let t=document.createElement("style");t.innerHTML=b,u.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/65552&t.$$.dirty[0]&&g&&u&&(()=>{let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,u&&(setTimeout((()=>{u.appendChild(e)}),1),setTimeout((()=>{}),500))}))})()},[m,y,v,s,u,E,h,n,L,O,I,N,f,p,d,b,g,()=>L(),()=>O(),t=>I(t.gameId,t.launchUrl,t.name),t=>N(t.id),function(t){B[t?"unshift":"push"]((()=>{s=t,r(3,s)}))},function(t){B[t?"unshift":"push"]((()=>{u=t,r(4,u)}))}]}class Bn extends G{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CasinoCollectionsProviders{background:var(--emfe-w-color-contrast, #07072A);width:100%;height:330px;margin:0 auto;margin-top:24px}.CategoriesHeader{display:flex;justify-content:space-between;height:70px}.CategoriesHeader .Title{color:var(--emfe-w-color-white, #FFFFFF);font-size:22px;font-weight:500}.CategoriesHeader .ButtonsContainer button{border:1px solid rgba(255, 255, 255, 0.2);border-radius:5px;background-color:rgba(0, 0, 25, 0.2);height:40px;width:40px;cursor:pointer}.CategoriesHeader .ButtonsContainer button:active{opacity:0.7}.CategoriesSlider{position:relative;height:230px;overflow:hidden}.CategoriesSliderWrapper{position:absolute;top:0;left:0}.CategoriesSlider .Animation{transition:transform 0.8s}.CategoriesSlider .CategorySlide{border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;height:200px;width:400px;margin-right:15px;background-size:cover}.CategoriesSlider .CategorySlide:not(.CategorySlideNoHighlight){background-color:#808080;background-blend-mode:multiply}.CategoriesSlider .CategorySlideTopContainer{height:100px;display:flex;align-items:center}.CategoriesSlider .CategorySlideLogo{max-height:100px}.CategoriesSlider .CategorySlideTitle{color:var(--emfe-w-color-white, #FFFFFF);font-size:18px;letter-spacing:1px}.CategoriesSlider .CategorySlideGameContainer{display:flex;justify-content:center;gap:3%;min-height:70px}.CategoriesSlider .CategorySlideGameImage{border-radius:10px;width:22%;height:55px;object-fit:cover}.Mobile.CasinoCollectionsProviders{padding:25px 10px}.Mobile .CategoriesSlider{overflow:auto;scroll-snap-type:x mandatory;-ms-overflow-style:none;scrollbar-width:none}.Mobile .CategoriesSlider::-webkit-scrollbar{display:none}.Mobile .CategorySlide{width:85vw;scroll-snap-align:start}.Mobile .ButtonsContainer{display:none}</style>",x(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},An,wn,i,{endpoint:12,datasource:13,lang:14,type:0,titletype:1,clientstyling:15,clientstylingurl:16},null,[-1,-1]),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["endpoint","datasource","lang","type","titletype","clientstyling","clientstylingurl"]}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),N()}get datasource(){return this.$$.ctx[13]}set datasource(t){this.$$set({datasource:t}),N()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),N()}get type(){return this.$$.ctx[0]}set type(t){this.$$set({type:t}),N()}get titletype(){return this.$$.ctx[1]}set titletype(t){this.$$set({titletype:t}),N()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(t){this.$$set({clientstyling:t}),N()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),N()}}return!customElements.get("casino-collections-providers")&&customElements.define("casino-collections-providers",Bn),Bn}));
|
652
652
|
//# sourceMappingURL=casino-collections-providers.js.map
|