@everymatrix/casino-header-controller 1.69.2 → 1.70.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.
Files changed (37) hide show
  1. package/components/{CasinoHeaderController-CM6M7oBn.js → CasinoHeaderController-B1x--_Oq.js} +1 -1
  2. package/components/{CasinoHeaderController-wemeTpGe.cjs → CasinoHeaderController-BRa3odIv.cjs} +1 -1
  3. package/components/{CasinoHeaderController-wAuW45el.js → CasinoHeaderController-BfAseLS8.js} +1 -1
  4. package/es2015/casino-header-controller.cjs +1 -1
  5. package/es2015/casino-header-controller.js +1 -1
  6. package/esnext/casino-header-controller.js +1 -1
  7. package/package.json +1 -1
  8. package/stencil/{gamification-dropdown-8eb8a896-CAQwtT6c.cjs → gamification-dropdown-343647b2-B50uewij.cjs} +1 -1
  9. package/stencil/{gamification-dropdown-8eb8a896-B34OfAvi.js → gamification-dropdown-343647b2-BtKUznL8.js} +8 -5
  10. package/stencil/{gamification-dropdown-8eb8a896-9N51mTKJ.js → gamification-dropdown-343647b2-DuhB4qAC.js} +6 -3
  11. package/stencil/gamification-dropdown-BXoXmCVj.js +25 -0
  12. package/stencil/gamification-dropdown-BgQs3qHL.cjs +1 -0
  13. package/stencil/gamification-dropdown-CHDfyBlq.js +7 -0
  14. package/stencil/{gamification-dropdown_4-DDitkdLY.cjs → gamification-dropdown_4-BCIlNfU2.cjs} +2 -2
  15. package/stencil/{gamification-dropdown_4-DBjdoNfc.js → gamification-dropdown_4-BMYGUc6f.js} +71 -64
  16. package/stencil/{gamification-dropdown_4-YGRZ_U5s.js → gamification-dropdown_4-Bwo0uyQb.js} +73 -66
  17. package/stencil/{index-71b1bdfa-BQViYc9r.js → index-71b1bdfa-Br04T1ks.js} +4 -4
  18. package/stencil/{index-71b1bdfa-BVbjDrHk.js → index-71b1bdfa-CqHhm_K7.js} +4 -4
  19. package/stencil/{index-71b1bdfa-CG5MERSu.cjs → index-71b1bdfa-DEOwV3WT.cjs} +1 -1
  20. package/stencil/player-elevate-card-CkeeX0Fc.cjs +64 -0
  21. package/stencil/{player-elevate-card-C0e-Dx1F.js → player-elevate-card-Csrn1cq3.js} +8 -8
  22. package/stencil/{player-elevate-card-CBRZZuy4.js → player-elevate-card-Cyj2vrTT.js} +8 -8
  23. package/stencil/{player-elevate-card-items-08c6fbd8-Dsdh-okx.js → player-elevate-card-items-08c6fbd8-DvNcpL9M.js} +1 -1
  24. package/stencil/{player-elevate-card-items-08c6fbd8-BF-ixp2m.js → player-elevate-card-items-08c6fbd8-GG7yo-HJ.js} +1 -1
  25. package/stencil/{player-elevate-card-items-08c6fbd8-mzRnJo_u.cjs → player-elevate-card-items-08c6fbd8-swAJgFA-.cjs} +1 -1
  26. package/stencil/{player-elevate-pointcard-BInA3gI1.js → player-elevate-pointcard-CDT1deRp.js} +6 -6
  27. package/stencil/{player-elevate-pointcard-CD45fOUi.js → player-elevate-pointcard-CQ618787.js} +6 -6
  28. package/stencil/player-elevate-pointcard-D962b07c.cjs +1 -0
  29. package/stencil/{player-rakeback-card-BAPJWhyX.js → player-rakeback-card-D-wGOAvr.js} +3 -3
  30. package/stencil/player-rakeback-card-DI8fIhnW.cjs +1 -0
  31. package/stencil/{player-rakeback-card-CAluJyQa.js → player-rakeback-card-r5qjxDTk.js} +3 -3
  32. package/stencil/gamification-dropdown-6aOjFbd0.cjs +0 -1
  33. package/stencil/gamification-dropdown-Brwhp697.js +0 -25
  34. package/stencil/gamification-dropdown-D6fl7GGs.js +0 -7
  35. package/stencil/player-elevate-card-DpFT4Eb4.cjs +0 -64
  36. package/stencil/player-elevate-pointcard-CSPhjhiu.cjs +0 -1
  37. package/stencil/player-rakeback-card-DBnWRkcb.cjs +0 -1
@@ -16,7 +16,7 @@ var Je = (t, e, i) => new Promise((l, n) => {
16
16
  });
17
17
  import { $ as Se, a as si, b as ai, S as oi, i as ci, f as E, s as ui, c as di, d as fi, n as ae, e as I, g as r, h as H, j as S, k as p, l as gi, o as hi, m as Qe, p as _e, q as Ve, r as Ee, t as se, u as ee, v as f, w as O, x as V, y as x, z as u, A as ie, B as ue, C as mi, D as bt, E as J, F as we, G as vt, H as be, I as pi, J as _i, K as wi, L as bi } from "./CasinoHamburgerMenu-BMkeLxFw.js";
18
18
  import "../stencil/user-deposit-withdrawal-TfRJdSfc.js";
19
- import "../stencil/gamification-dropdown-Brwhp697.js";
19
+ import "../stencil/gamification-dropdown-BXoXmCVj.js";
20
20
  const vi = (t, e = {}) => {
21
21
  const i = new CustomEvent("track-custom-event", {
22
22
  detail: {
@@ -1,4 +1,4 @@
1
- "use strict";var Ie=(a,t,n)=>new Promise((l,s)=>{var i=u=>{try{_(n.next(u))}catch(d){s(d)}},r=u=>{try{_(n.throw(u))}catch(d){s(d)}},_=u=>u.done?l(u.value):Promise.resolve(u.value).then(i,r);_((n=n.apply(a,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenu-CrZ5l9tM.cjs");require("../stencil/user-deposit-withdrawal-CrFUxhuF.cjs");require("../stencil/gamification-dropdown-6aOjFbd0.cjs");const Ot=(a,t={})=>{const n=new CustomEvent("track-custom-event",{detail:{type:a,data:t},bubbles:!0,composed:!0});document.dispatchEvent(n)};function zt({withLocale:a,translations:t}){e.$locale.subscribe(n=>{n==null&&(e.$dictionary.set(t),e.$locale.set(a))})}function He(a,t){e.addMessages(a,t)}function Dt(a){e.$locale.set(a)}const Ae={en:{login:"Login",register:"Register",deposit:"Deposit",promotions:"Promotions"},"zh-hk":{login:"登錄",register:"登記",deposit:"訂金",promotions:"促销活动"},fr:{login:"Connexion",register:"Enregistrer",deposit:"Dépôt",promotions:"Promotions"},tr:{login:"Giriş",register:"Kayıt",deposit:"Yatır",promotions:"Promosyonlar"},ro:{login:"Autentificare",register:"Inregistrare",deposit:"Depozit",promotions:"Promotii"},es:{login:"Iniciar sesión",register:"Regístrate",deposit:"Deposita",promotions:"Promociones"},pt:{login:"Entrar",register:"Registro",deposit:"Depósito",promotions:"Promoções"},hr:{login:"Prijava",register:"Registracija",deposit:"Uplata",promotions:"Promocije"},"pt-br":{login:"Entrar",register:"Registro",deposit:"Depósito",promotions:"Promoções"},"es-mx":{login:"Ingresar",register:"Registro",deposit:"Depósito",promotions:"Promociones"},"en-us":{login:"Login",register:"Register",deposit:"Deposit",promotions:"Promotions"}};if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./CasinoSlider-DqTtsMWh.cjs")).then(({default:t})=>{!customElements.get("casino-slider")&&customElements.define("casino-slider",t.element)})}if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./CasinoHamburgerMenu-CrZ5l9tM.cjs")).then(t=>t.CasinoHamburgerMenu_ce).then(({default:t})=>{!customElements.get("casino-hamburger-menu")&&customElements.define("casino-hamburger-menu",t.element)})}if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./PlayerAccountBalanceModal-BFDpI9Sy.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal")&&customElements.define("player-account-balance-modal",t.element)})}if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./PlayerDeposit-BXwT7NVp.cjs")).then(({default:t})=>{!customElements.get("player-deposit")&&customElements.define("player-deposit",t.element)})}const ae="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDcuMS1jMDAwIDc5LjljY2M0ZGU5MywgMjAyMi8wMy8xNC0xNDowNzoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjMgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjMzQjhCMTgyRUNBMzExRUM5M0JCRDIzRjhFMEY0NjE0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjMzQjhCMTgzRUNBMzExRUM5M0JCRDIzRjhFMEY0NjE0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MzNCOEIxODBFQ0EzMTFFQzkzQkJEMjNGOEUwRjQ2MTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzNCOEIxODFFQ0EzMTFFQzkzQkJEMjNGOEUwRjQ2MTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7HvIqyAAAAEElEQVR42mL4//8/A0CAAQAI/AL+26JNFgAAAABJRU5ErkJggg==";function Wt(a){e.append_styles(a,"svelte-ho1ide",`*,*::before,*::after{font-family:inherit}:host{font-family:inherit}@keyframes ModalBounce{0%{opacity:0;transform:translateY(20px)}50%{transform:translateY(-6px);opacity:0.8}100%{transform:translateY(0);opacity:1}}input,textarea,button{font-family:inherit}.HeaderSlider{width:100%;height:400px}.LanguageDropdown{margin-right:16px;position:relative;display:inline-block}.ClosePopUpButtonShortCashier{margin-left:auto;cursor:pointer}.ClosePopUpButtonShortCashier svg{position:absolute;top:10px;right:10px}.ShortCashierWindow{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}.ShortCashierContainerWrapper{position:relative;animation:ModalBounce 0.5s forwards;z-index:17;right:60%}.ShortCashierContainer{background-color:var(--emw--color-white, #FFFFFF);position:absolute;width:360px;top:16px;transform:translateX(-60%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.ShortCashierContainer:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:84%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.GamificationWrapper{margin-right:16px}.ShortCashierContainerWrapperMobile{position:relative;animation:ModalBounce 0.5s forwards;right:110%;z-index:17}.ShortCashierContainerMobile{background-color:var(--emw--color-white, #FFFFFF);position:absolute;width:80vw;top:14px;left:50%;transform:translateX(-60%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.ShortCashierContainerMobile:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:84%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.SelectedOption,.OptionList{border:1px solid var(--emw--header-color-primary);padding:8px;cursor:pointer;width:76px;border-radius:4px}.SelectedOption{display:flex;align-items:center}.FlagIcon img{width:20px;height:14px;margin-right:8px;border-radius:2px}.OptionList{position:absolute;z-index:1;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--header-color-secondary-menu-bg, var(--emw--color-background-secondary, #050518));max-height:150px;overflow-y:auto}.LanguageOption{display:flex;align-items:center;padding:4px}.TriangleInactive{display:block;color:currentColor;margin:0 0 0 10px;transition:all 0.5s}.TriangleInactive svg{margin:2px 0px}.TriangleActive{transform:rotate(180deg);position:relative}.TriangleActive svg{margin:2px 0px}.LanguageOption:hover{background-color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:2px}.HeaderWrapper{background:var(--emw--header-color-menu-bg, var(--emw--color-background-secondary, #050518))}.HeaderContainer{max-width:1300px;display:flex;flex-direction:row;align-items:center;height:84px;margin:0 auto}.HeaderMobileMainNav{display:flex;align-items:center}.HeaderBranding{width:140px;margin-right:15px;cursor:pointer}.HeaderBranding img{width:100%}@media only screen and (max-width: 360px){.HeaderBranding{margin-right:0}}.HeaderMainNav{text-align:left}.HeaderTopActions{text-align:right;margin-left:auto}.HeaderSecondaryNav{flex-direction:row;width:100%;background:var(--emw--header-color-secondary-menu-bg, var(--emw--color-background-secondary, #050518));border-top:1px solid var(--emw--color-gray-300, #58586B)}.HeaderItemsMenu{gap:8px;display:flex;align-content:flex-start;list-style:none;text-transform:uppercase;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));font-size:16px;align-items:center}.HeaderItemsMenu .Item:hover .HeaderSecondaryNav{display:block}.HeaderItemsMenu .Item{gap:2px;padding:0 12px;display:flex;align-items:center}.HeaderItemsMenu.PrimaryMenu{gap:10px}.Item a{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;border-top:1px solid transparent}.Item a:hover{color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-top:1px solid var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));padding-top:5px}.ItemLogin{border-radius:5px;background:transparent;font-size:14px;font-weight:600;border:solid 1px var(--emw--header-typography, var(--emw--color-white, #FFFFFF));height:44px;text-align:center;line-height:44px;margin-right:10px;cursor:pointer}.ItemRegister,.ItemDeposit{border-radius:5px;background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:14px;height:44px;text-align:center;line-height:44px;cursor:pointer}.ItemDeposit{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.ItemLanguage{height:44px;width:74px;text-align:center;line-height:44px;background:transparent;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));border:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ItemLanguage option{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF))}.ItemLanguage.NoFlag{background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23FFFFFF' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emw--header-color-menu-bg, var(--emw--color-background-secondary, #050518));background-position:calc(100% - 0.75rem) center;width:90px;margin-right:6px}.ItemBalance{background:transparent;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));border:0}.ItemAccount{cursor:pointer}.ItemAccount svg{width:20px;height:20px}.HeaderItemsMenuSecondary{display:flex;flex-direction:row;align-content:flex-start;align-items:center;height:60px;list-style:none;text-transform:uppercase;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));font-size:14px;max-width:1280px;margin:0 auto;overflow-y:hidden;overflow-x:auto;padding:0}.HeaderItemsMenuSecondary .ItemSecondary{width:auto;height:100%;display:flex;justify-content:center;padding:0 15px;font-weight:600;transition-duration:0.15s}.HeaderItemsMenuSecondary .ItemSecondary button{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;border:none;background:none;font-size:14px;font-weight:600;text-transform:uppercase;cursor:pointer}.HeaderItemsMenuSecondary .ItemSecondary button:hover{color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.HeaderItemsMenuSecondary .ItemSecondary button:focus{color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.HeaderItemsMenuSecondary .ItemSecondary button:visited{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF))}.HeaderItemsMenuSecondary .ItemSecondary button:focus-visible{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));outline:none}.HeaderItemsMenuSecondary .ItemSecondary.active{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.HeaderSliderMobile{background-position:bottom}.HeaderMobileWrapper .HeaderContainer{height:55px;padding:0 15px;gap:10px}@media only screen and (max-width: 360px){.HeaderMobileWrapper .HeaderContainer{padding:0 5px}}.HeaderMobileWrapper .HeaderBranding{width:110px;display:flex;align-items:center}.HeaderMobileWrapper .HeaderItemsMenu .Item{padding:0 10px;display:block;width:unset}.HeaderMobileWrapper .HeaderItemsMenu .ItemBalance{font-size:12px}.HeaderMobileWrapper .HeaderItemsMenu .ItemAccount{padding:0}.HeaderMobileWrapper .ItemRegister,.HeaderMobileWrapper .ItemDeposit,.HeaderMobileWrapper .ItemLogin{height:30px;line-height:30px;font-size:12px}.HeaderMobileWrapper .ItemLogin{margin-right:10px}`)}function Ce(a,t,n){const l=a.slice();return l[113]=t[n],l}function Se(a,t,n){const l=a.slice();return l[116]=t[n],l}function Le(a,t,n){const l=a.slice();return l[116]=t[n],l}function Ee(a,t,n){const l=a.slice();return l[113]=t[n],l}function Re(a,t,n){const l=a.slice();return l[116]=t[n],l}function Be(a,t,n){const l=a.slice();return l[116]=t[n],l}function Tt(a){let t,n,l,s,i,r,_,u,d,o=a[49]("login")+"",m,p,h,k=a[49]("register")+"",B,S,L,b,M,F,z;function O(f,H){return f[41]?Gt:Zt}let E=O(a),I=E(a),g=!a[35]&&Ne(a),v=a[45].length>1&&Pe(a),R=e.ensure_array_like(a[38]),y=[];for(let f=0;f<R.length;f+=1)y[f]=We(Ce(a,R,f));return{c(){t=e.element("header"),n=e.element("div"),l=e.element("div"),I.c(),s=e.space(),i=e.element("nav"),g&&g.c(),r=e.space(),_=e.element("div"),u=e.element("div"),d=e.element("div"),m=e.text(o),p=e.space(),h=e.element("div"),B=e.text(k),S=e.space(),v&&v.c(),L=e.space(),b=e.element("nav"),M=e.element("ul");for(let f=0;f<y.length;f+=1)y[f].c();e.attr(l,"class","HeaderBranding"),e.attr(i,"class","HeaderMainNav"),e.attr(d,"class","Item ItemLogin"),e.attr(d,"tabindex","0"),e.attr(h,"class","Item ItemRegister"),e.attr(h,"tabindex","0"),e.attr(u,"class","HeaderItemsMenu"),e.attr(_,"class","HeaderTopActions"),e.attr(n,"class","HeaderContainer"),e.attr(M,"class","HeaderItemsMenuSecondary"),e.attr(b,"class","HeaderSecondaryNav"),e.attr(t,"class","HeaderWrapper")},m(f,H){e.insert(f,t,H),e.append(t,n),e.append(n,l),I.m(l,null),e.append(n,s),e.append(n,i),g&&g.m(i,null),e.append(n,r),e.append(n,_),e.append(_,u),e.append(u,d),e.append(d,m),e.append(u,p),e.append(u,h),e.append(h,B),e.append(u,S),v&&v.m(u,null),e.append(t,L),e.append(t,b),e.append(b,M);for(let A=0;A<y.length;A+=1)y[A]&&y[A].m(M,null);a[92](t),F||(z=[e.listen(l,"click",a[84]),e.listen(d,"click",a[85]),e.listen(h,"click",a[86])],F=!0)},p(f,H){if(E===(E=O(f))&&I?I.p(f,H):(I.d(1),I=E(f),I&&(I.c(),I.m(l,null))),f[35]?g&&(g.d(1),g=null):g?g.p(f,H):(g=Ne(f),g.c(),g.m(i,null)),H[1]&262144&&o!==(o=f[49]("login")+"")&&e.set_data(m,o),H[1]&262144&&k!==(k=f[49]("register")+"")&&e.set_data(B,k),f[45].length>1?v?v.p(f,H):(v=Pe(f),v.c(),v.m(u,null)):v&&(v.d(1),v=null),H[1]&8388800){R=e.ensure_array_like(f[38]);let A;for(A=0;A<R.length;A+=1){const j=Ce(f,R,A);y[A]?y[A].p(j,H):(y[A]=We(j),y[A].c(),y[A].m(M,null))}for(;A<y.length;A+=1)y[A].d(1);y.length=R.length}},d(f){f&&e.detach(t),I.d(),g&&g.d(),v&&v.d(),e.destroy_each(y,f),a[92](null),F=!1,e.run_all(z)}}}function Ut(a){let t,n,l,s,i,r,_,u,d,o,m,p,h,k,B,S,L,b=a[49]("login")+"",M,F,z,O=a[49]("register")+"",E,I,g;function v(f,H){return f[41]?Qt:Jt}let R=v(a),y=R(a);return{c(){t=e.element("header"),n=e.element("div"),l=e.element("div"),s=e.svg_element("svg"),i=e.svg_element("defs"),r=e.svg_element("style"),_=e.text(`.a {
1
+ "use strict";var Ie=(a,t,n)=>new Promise((l,s)=>{var i=u=>{try{_(n.next(u))}catch(d){s(d)}},r=u=>{try{_(n.throw(u))}catch(d){s(d)}},_=u=>u.done?l(u.value):Promise.resolve(u.value).then(i,r);_((n=n.apply(a,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenu-CrZ5l9tM.cjs");require("../stencil/user-deposit-withdrawal-CrFUxhuF.cjs");require("../stencil/gamification-dropdown-BgQs3qHL.cjs");const Ot=(a,t={})=>{const n=new CustomEvent("track-custom-event",{detail:{type:a,data:t},bubbles:!0,composed:!0});document.dispatchEvent(n)};function zt({withLocale:a,translations:t}){e.$locale.subscribe(n=>{n==null&&(e.$dictionary.set(t),e.$locale.set(a))})}function He(a,t){e.addMessages(a,t)}function Dt(a){e.$locale.set(a)}const Ae={en:{login:"Login",register:"Register",deposit:"Deposit",promotions:"Promotions"},"zh-hk":{login:"登錄",register:"登記",deposit:"訂金",promotions:"促销活动"},fr:{login:"Connexion",register:"Enregistrer",deposit:"Dépôt",promotions:"Promotions"},tr:{login:"Giriş",register:"Kayıt",deposit:"Yatır",promotions:"Promosyonlar"},ro:{login:"Autentificare",register:"Inregistrare",deposit:"Depozit",promotions:"Promotii"},es:{login:"Iniciar sesión",register:"Regístrate",deposit:"Deposita",promotions:"Promociones"},pt:{login:"Entrar",register:"Registro",deposit:"Depósito",promotions:"Promoções"},hr:{login:"Prijava",register:"Registracija",deposit:"Uplata",promotions:"Promocije"},"pt-br":{login:"Entrar",register:"Registro",deposit:"Depósito",promotions:"Promoções"},"es-mx":{login:"Ingresar",register:"Registro",deposit:"Depósito",promotions:"Promociones"},"en-us":{login:"Login",register:"Register",deposit:"Deposit",promotions:"Promotions"}};if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./CasinoSlider-DqTtsMWh.cjs")).then(({default:t})=>{!customElements.get("casino-slider")&&customElements.define("casino-slider",t.element)})}if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./CasinoHamburgerMenu-CrZ5l9tM.cjs")).then(t=>t.CasinoHamburgerMenu_ce).then(({default:t})=>{!customElements.get("casino-hamburger-menu")&&customElements.define("casino-hamburger-menu",t.element)})}if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./PlayerAccountBalanceModal-BFDpI9Sy.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal")&&customElements.define("player-account-balance-modal",t.element)})}if(typeof window!="undefined"){let a=function(t){return function(...n){try{return t.apply(this,n)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=a(customElements.define),Promise.resolve().then(()=>require("./PlayerDeposit-BXwT7NVp.cjs")).then(({default:t})=>{!customElements.get("player-deposit")&&customElements.define("player-deposit",t.element)})}const ae="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDcuMS1jMDAwIDc5LjljY2M0ZGU5MywgMjAyMi8wMy8xNC0xNDowNzoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjMgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjMzQjhCMTgyRUNBMzExRUM5M0JCRDIzRjhFMEY0NjE0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjMzQjhCMTgzRUNBMzExRUM5M0JCRDIzRjhFMEY0NjE0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MzNCOEIxODBFQ0EzMTFFQzkzQkJEMjNGOEUwRjQ2MTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzNCOEIxODFFQ0EzMTFFQzkzQkJEMjNGOEUwRjQ2MTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7HvIqyAAAAEElEQVR42mL4//8/A0CAAQAI/AL+26JNFgAAAABJRU5ErkJggg==";function Wt(a){e.append_styles(a,"svelte-ho1ide",`*,*::before,*::after{font-family:inherit}:host{font-family:inherit}@keyframes ModalBounce{0%{opacity:0;transform:translateY(20px)}50%{transform:translateY(-6px);opacity:0.8}100%{transform:translateY(0);opacity:1}}input,textarea,button{font-family:inherit}.HeaderSlider{width:100%;height:400px}.LanguageDropdown{margin-right:16px;position:relative;display:inline-block}.ClosePopUpButtonShortCashier{margin-left:auto;cursor:pointer}.ClosePopUpButtonShortCashier svg{position:absolute;top:10px;right:10px}.ShortCashierWindow{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}.ShortCashierContainerWrapper{position:relative;animation:ModalBounce 0.5s forwards;z-index:17;right:60%}.ShortCashierContainer{background-color:var(--emw--color-white, #FFFFFF);position:absolute;width:360px;top:16px;transform:translateX(-60%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.ShortCashierContainer:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:84%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.GamificationWrapper{margin-right:16px}.ShortCashierContainerWrapperMobile{position:relative;animation:ModalBounce 0.5s forwards;right:110%;z-index:17}.ShortCashierContainerMobile{background-color:var(--emw--color-white, #FFFFFF);position:absolute;width:80vw;top:14px;left:50%;transform:translateX(-60%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.ShortCashierContainerMobile:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:84%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.SelectedOption,.OptionList{border:1px solid var(--emw--header-color-primary);padding:8px;cursor:pointer;width:76px;border-radius:4px}.SelectedOption{display:flex;align-items:center}.FlagIcon img{width:20px;height:14px;margin-right:8px;border-radius:2px}.OptionList{position:absolute;z-index:1;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--header-color-secondary-menu-bg, var(--emw--color-background-secondary, #050518));max-height:150px;overflow-y:auto}.LanguageOption{display:flex;align-items:center;padding:4px}.TriangleInactive{display:block;color:currentColor;margin:0 0 0 10px;transition:all 0.5s}.TriangleInactive svg{margin:2px 0px}.TriangleActive{transform:rotate(180deg);position:relative}.TriangleActive svg{margin:2px 0px}.LanguageOption:hover{background-color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:2px}.HeaderWrapper{background:var(--emw--header-color-menu-bg, var(--emw--color-background-secondary, #050518))}.HeaderContainer{max-width:1300px;display:flex;flex-direction:row;align-items:center;height:84px;margin:0 auto}.HeaderMobileMainNav{display:flex;align-items:center}.HeaderBranding{width:140px;margin-right:15px;cursor:pointer}.HeaderBranding img{width:100%}@media only screen and (max-width: 360px){.HeaderBranding{margin-right:0}}.HeaderMainNav{text-align:left}.HeaderTopActions{text-align:right;margin-left:auto}.HeaderSecondaryNav{flex-direction:row;width:100%;background:var(--emw--header-color-secondary-menu-bg, var(--emw--color-background-secondary, #050518));border-top:1px solid var(--emw--color-gray-300, #58586B)}.HeaderItemsMenu{gap:8px;display:flex;align-content:flex-start;list-style:none;text-transform:uppercase;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));font-size:16px;align-items:center}.HeaderItemsMenu .Item:hover .HeaderSecondaryNav{display:block}.HeaderItemsMenu .Item{gap:2px;padding:0 12px;display:flex;align-items:center}.HeaderItemsMenu.PrimaryMenu{gap:10px}.Item a{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;border-top:1px solid transparent}.Item a:hover{color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-top:1px solid var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));padding-top:5px}.ItemLogin{border-radius:5px;background:transparent;font-size:14px;font-weight:600;border:solid 1px var(--emw--header-typography, var(--emw--color-white, #FFFFFF));height:44px;text-align:center;line-height:44px;margin-right:10px;cursor:pointer}.ItemRegister,.ItemDeposit{border-radius:5px;background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:14px;height:44px;text-align:center;line-height:44px;cursor:pointer}.ItemDeposit{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.ItemLanguage{height:44px;width:74px;text-align:center;line-height:44px;background:transparent;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));border:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ItemLanguage option{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF))}.ItemLanguage.NoFlag{background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23FFFFFF' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emw--header-color-menu-bg, var(--emw--color-background-secondary, #050518));background-position:calc(100% - 0.75rem) center;width:90px;margin-right:6px}.ItemBalance{background:transparent;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));border:0}.ItemAccount{cursor:pointer}.ItemAccount svg{width:20px;height:20px}.HeaderItemsMenuSecondary{display:flex;flex-direction:row;align-content:flex-start;align-items:center;height:60px;list-style:none;text-transform:uppercase;color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));font-size:14px;max-width:1280px;margin:0 auto;overflow-y:hidden;overflow-x:auto;padding:0}.HeaderItemsMenuSecondary .ItemSecondary{width:auto;height:100%;display:flex;justify-content:center;padding:0 15px;font-weight:600;transition-duration:0.15s}.HeaderItemsMenuSecondary .ItemSecondary button{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;border:none;background:none;font-size:14px;font-weight:600;text-transform:uppercase;cursor:pointer}.HeaderItemsMenuSecondary .ItemSecondary button:hover{color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.HeaderItemsMenuSecondary .ItemSecondary button:focus{color:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.HeaderItemsMenuSecondary .ItemSecondary button:visited{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF))}.HeaderItemsMenuSecondary .ItemSecondary button:focus-visible{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));outline:none}.HeaderItemsMenuSecondary .ItemSecondary.active{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E))}.HeaderSliderMobile{background-position:bottom}.HeaderMobileWrapper .HeaderContainer{height:55px;padding:0 15px;gap:10px}@media only screen and (max-width: 360px){.HeaderMobileWrapper .HeaderContainer{padding:0 5px}}.HeaderMobileWrapper .HeaderBranding{width:110px;display:flex;align-items:center}.HeaderMobileWrapper .HeaderItemsMenu .Item{padding:0 10px;display:block;width:unset}.HeaderMobileWrapper .HeaderItemsMenu .ItemBalance{font-size:12px}.HeaderMobileWrapper .HeaderItemsMenu .ItemAccount{padding:0}.HeaderMobileWrapper .ItemRegister,.HeaderMobileWrapper .ItemDeposit,.HeaderMobileWrapper .ItemLogin{height:30px;line-height:30px;font-size:12px}.HeaderMobileWrapper .ItemLogin{margin-right:10px}`)}function Ce(a,t,n){const l=a.slice();return l[113]=t[n],l}function Se(a,t,n){const l=a.slice();return l[116]=t[n],l}function Le(a,t,n){const l=a.slice();return l[116]=t[n],l}function Ee(a,t,n){const l=a.slice();return l[113]=t[n],l}function Re(a,t,n){const l=a.slice();return l[116]=t[n],l}function Be(a,t,n){const l=a.slice();return l[116]=t[n],l}function Tt(a){let t,n,l,s,i,r,_,u,d,o=a[49]("login")+"",m,p,h,k=a[49]("register")+"",B,S,L,b,M,F,z;function O(f,H){return f[41]?Gt:Zt}let E=O(a),I=E(a),g=!a[35]&&Ne(a),v=a[45].length>1&&Pe(a),R=e.ensure_array_like(a[38]),y=[];for(let f=0;f<R.length;f+=1)y[f]=We(Ce(a,R,f));return{c(){t=e.element("header"),n=e.element("div"),l=e.element("div"),I.c(),s=e.space(),i=e.element("nav"),g&&g.c(),r=e.space(),_=e.element("div"),u=e.element("div"),d=e.element("div"),m=e.text(o),p=e.space(),h=e.element("div"),B=e.text(k),S=e.space(),v&&v.c(),L=e.space(),b=e.element("nav"),M=e.element("ul");for(let f=0;f<y.length;f+=1)y[f].c();e.attr(l,"class","HeaderBranding"),e.attr(i,"class","HeaderMainNav"),e.attr(d,"class","Item ItemLogin"),e.attr(d,"tabindex","0"),e.attr(h,"class","Item ItemRegister"),e.attr(h,"tabindex","0"),e.attr(u,"class","HeaderItemsMenu"),e.attr(_,"class","HeaderTopActions"),e.attr(n,"class","HeaderContainer"),e.attr(M,"class","HeaderItemsMenuSecondary"),e.attr(b,"class","HeaderSecondaryNav"),e.attr(t,"class","HeaderWrapper")},m(f,H){e.insert(f,t,H),e.append(t,n),e.append(n,l),I.m(l,null),e.append(n,s),e.append(n,i),g&&g.m(i,null),e.append(n,r),e.append(n,_),e.append(_,u),e.append(u,d),e.append(d,m),e.append(u,p),e.append(u,h),e.append(h,B),e.append(u,S),v&&v.m(u,null),e.append(t,L),e.append(t,b),e.append(b,M);for(let A=0;A<y.length;A+=1)y[A]&&y[A].m(M,null);a[92](t),F||(z=[e.listen(l,"click",a[84]),e.listen(d,"click",a[85]),e.listen(h,"click",a[86])],F=!0)},p(f,H){if(E===(E=O(f))&&I?I.p(f,H):(I.d(1),I=E(f),I&&(I.c(),I.m(l,null))),f[35]?g&&(g.d(1),g=null):g?g.p(f,H):(g=Ne(f),g.c(),g.m(i,null)),H[1]&262144&&o!==(o=f[49]("login")+"")&&e.set_data(m,o),H[1]&262144&&k!==(k=f[49]("register")+"")&&e.set_data(B,k),f[45].length>1?v?v.p(f,H):(v=Pe(f),v.c(),v.m(u,null)):v&&(v.d(1),v=null),H[1]&8388800){R=e.ensure_array_like(f[38]);let A;for(A=0;A<R.length;A+=1){const j=Ce(f,R,A);y[A]?y[A].p(j,H):(y[A]=We(j),y[A].c(),y[A].m(M,null))}for(;A<y.length;A+=1)y[A].d(1);y.length=R.length}},d(f){f&&e.detach(t),I.d(),g&&g.d(),v&&v.d(),e.destroy_each(y,f),a[92](null),F=!1,e.run_all(z)}}}function Ut(a){let t,n,l,s,i,r,_,u,d,o,m,p,h,k,B,S,L,b=a[49]("login")+"",M,F,z,O=a[49]("register")+"",E,I,g;function v(f,H){return f[41]?Qt:Jt}let R=v(a),y=R(a);return{c(){t=e.element("header"),n=e.element("div"),l=e.element("div"),s=e.svg_element("svg"),i=e.svg_element("defs"),r=e.svg_element("style"),_=e.text(`.a {
2
2
  fill: var(--emw--color-white, #FFFFFF);
3
3
  }
4
4
  `),u=e.svg_element("g"),d=e.svg_element("rect"),o=e.svg_element("rect"),m=e.svg_element("rect"),p=e.space(),h=e.element("div"),y.c(),k=e.space(),B=e.element("div"),S=e.element("div"),L=e.element("div"),M=e.text(b),F=e.space(),z=e.element("div"),E=e.text(O),e.attr(d,"class","a"),e.attr(d,"width","18"),e.attr(d,"height","2"),e.attr(d,"transform","translate(14 13)"),e.attr(o,"class","a"),e.attr(o,"width","22"),e.attr(o,"height","2"),e.attr(o,"transform","translate(14 20)"),e.attr(m,"class","a"),e.attr(m,"width","22"),e.attr(m,"height","2"),e.attr(m,"transform","translate(14 27)"),e.attr(u,"transform","translate(-14 -13)"),e.attr(s,"xmlns","http://www.w3.org/2000/svg"),e.attr(s,"width","22"),e.attr(s,"height","16"),e.attr(s,"viewBox","0 0 22 16"),e.attr(l,"class","HeaderMobileMainNav"),e.attr(h,"class","HeaderBranding"),e.attr(L,"class","Item ItemLogin"),e.attr(z,"class","Item ItemRegister"),e.attr(S,"class","HeaderItemsMenu"),e.attr(B,"class","HeaderTopActions"),e.attr(n,"class","HeaderContainer"),e.attr(t,"class","HeaderWrapper HeaderMobileWrapper")},m(f,H){e.insert(f,t,H),e.append(t,n),e.append(n,l),e.append(l,s),e.append(s,i),e.append(i,r),e.append(r,_),e.append(s,u),e.append(u,d),e.append(u,o),e.append(u,m),e.append(n,p),e.append(n,h),y.m(h,null),e.append(n,k),e.append(n,B),e.append(B,S),e.append(S,L),e.append(L,M),e.append(S,F),e.append(S,z),e.append(z,E),a[83](t),I||(g=[e.listen(s,"click",a[79]),e.listen(h,"click",a[80]),e.listen(L,"click",a[81]),e.listen(z,"click",a[82])],I=!0)},p(f,H){R===(R=v(f))&&y?y.p(f,H):(y.d(1),y=R(f),y&&(y.c(),y.m(h,null))),H[1]&262144&&b!==(b=f[49]("login")+"")&&e.set_data(M,b),H[1]&262144&&O!==(O=f[49]("register")+"")&&e.set_data(E,O)},d(f){f&&e.detach(t),y.d(),a[83](null),I=!1,e.run_all(g)}}}function jt(a){let t;function n(i,r){return i[43]?Xt:Vt}let l=n(a),s=l(a);return{c(){s.c(),t=e.empty()},m(i,r){s.m(i,r),e.insert(i,t,r)},p(i,r){l===(l=n(i))&&s?s.p(i,r):(s.d(1),s=l(i),s&&(s.c(),s.m(t.parentNode,t)))},d(i){i&&e.detach(t),s.d(i)}}}function Zt(a){let t,n;return{c(){t=e.element("img"),e.src_url_equal(t.src,n=ae)||e.attr(t,"src",n),e.attr(t,"alt","Logo")},m(l,s){e.insert(l,t,s)},p:e.noop,d(l){l&&e.detach(t)}}}function Gt(a){let t,n;return{c(){t=e.element("img"),e.src_url_equal(t.src,n=a[47])||e.attr(t,"src",n),e.attr(t,"alt","Logo")},m(l,s){e.insert(l,t,s)},p(l,s){s[1]&65536&&!e.src_url_equal(t.src,n=l[47])&&e.attr(t,"src",n)},d(l){l&&e.detach(t)}}}function Ne(a){let t,n,l;return{c(){t=e.element("casino-slider"),e.set_custom_element_data(t,"class","HeaderItemsMenu"),e.set_custom_element_data(t,"identity",te),e.set_custom_element_data(t,"isprimarymenu","true"),e.set_custom_element_data(t,"actionevent",a[24]),e.set_custom_element_data(t,"mbsource",a[26]),e.set_custom_element_data(t,"activeindex",a[36]),e.set_custom_element_data(t,"location","headerMain"),e.set_custom_element_data(t,"endpoint",a[2]),e.set_custom_element_data(t,"lang",a[3]),e.set_custom_element_data(t,"clientstyling",a[27]),e.set_custom_element_data(t,"clientstylingurl",a[28])},m(s,i){e.insert(s,t,i),n||(l=e.action_destroyer(a[53].call(null,t)),n=!0)},p(s,i){i[0]&16777216&&e.set_custom_element_data(t,"actionevent",s[24]),i[0]&67108864&&e.set_custom_element_data(t,"mbsource",s[26]),i[1]&32&&e.set_custom_element_data(t,"activeindex",s[36]),i[0]&4&&e.set_custom_element_data(t,"endpoint",s[2]),i[0]&8&&e.set_custom_element_data(t,"lang",s[3]),i[0]&134217728&&e.set_custom_element_data(t,"clientstyling",s[27]),i[0]&268435456&&e.set_custom_element_data(t,"clientstylingurl",s[28])},d(s){s&&e.detach(t),n=!1,l()}}}function Pe(a){let t;function n(i,r){return i[9]!=="true"?Yt:qt}let l=n(a),s=l(a);return{c(){s.c(),t=e.empty()},m(i,r){s.m(i,r),e.insert(i,t,r)},p(i,r){l===(l=n(i))&&s?s.p(i,r):(s.d(1),s=l(i),s&&(s.c(),s.m(t.parentNode,t)))},d(i){i&&e.detach(t),s.d(i)}}}function qt(a){let t,n,l,s,i,r,_,u=a[39].slice(-2)+"",d,o,m,p,h,k,B,S,L,b=a[42]&&Oe(a);return{c(){t=e.element("div"),n=e.element("div"),l=e.element("span"),s=e.element("img"),r=e.space(),_=e.element("span"),d=e.text(u),o=e.space(),m=e.element("span"),p=e.svg_element("svg"),h=e.svg_element("path"),B=e.space(),b&&b.c(),e.src_url_equal(s.src,i=`http://purecatamphetamine.github.io/country-flag-icons/3x2/${a[57](a[39].slice(-2))}.svg`)||e.attr(s,"src",i),e.attr(l,"class","FlagIcon"),e.attr(_,"class","LanguageName"),e.attr(h,"id","arrow"),e.attr(h,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),e.attr(h,"transform","translate(-274.511 -441.088)"),e.attr(h,"fill","#d1d1d1"),e.attr(p,"xmlns","http://www.w3.org/2000/svg"),e.attr(p,"width","14"),e.attr(p,"height","6.835"),e.attr(p,"viewBox","0 0 14 6.835"),e.attr(m,"class",k="TriangleInactive "+(a[42]?"TriangleActive":"")),e.attr(n,"class","SelectedOption Item ItemLanguage"),e.attr(t,"class","LanguageDropdown")},m(M,F){e.insert(M,t,F),e.append(t,n),e.append(n,l),e.append(l,s),e.append(n,r),e.append(n,_),e.append(_,d),e.append(n,o),e.append(n,m),e.append(m,p),e.append(p,h),e.append(t,B),b&&b.m(t,null),S||(L=e.listen(n,"click",a[89]),S=!0)},p(M,F){F[1]&16640&&!e.src_url_equal(s.src,i=`http://purecatamphetamine.github.io/country-flag-icons/3x2/${M[57](M[39].slice(-2))}.svg`)&&e.attr(s,"src",i),F[1]&256&&u!==(u=M[39].slice(-2)+"")&&e.set_data(d,u),F[1]&2048&&k!==(k="TriangleInactive "+(M[42]?"TriangleActive":""))&&e.attr(m,"class",k),M[42]?b?b.p(M,F):(b=Oe(M),b.c(),b.m(t,null)):b&&(b.d(1),b=null)},d(M){M&&e.detach(t),b&&b.d(),S=!1,L()}}}function Yt(a){let t,n,l,s=e.ensure_array_like(a[45]),i=[];for(let r=0;r<s.length;r+=1)i[r]=De(Le(a,s,r));return{c(){t=e.element("select");for(let r=0;r<i.length;r+=1)i[r].c();e.attr(t,"class","Item ItemLanguage NoFlag"),a[39]===void 0&&e.add_render_callback(()=>a[87].call(t))},m(r,_){e.insert(r,t,_);for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(t,null);e.select_option(t,a[39],!0),n||(l=[e.listen(t,"change",a[87]),e.listen(t,"change",a[88])],n=!0)},p(r,_){if(_[1]&16384){s=e.ensure_array_like(r[45]);let u;for(u=0;u<s.length;u+=1){const d=Le(r,s,u);i[u]?i[u].p(d,_):(i[u]=De(d),i[u].c(),i[u].m(t,null))}for(;u<i.length;u+=1)i[u].d(1);i.length=s.length}_[1]&16640&&e.select_option(t,r[39])},d(r){r&&e.detach(t),e.destroy_each(i,r),n=!1,e.run_all(l)}}}function Oe(a){let t,n=e.ensure_array_like(a[45]),l=[];for(let s=0;s<n.length;s+=1)l[s]=ze(Se(a,n,s));return{c(){t=e.element("div");for(let s=0;s<l.length;s+=1)l[s].c();e.attr(t,"class","OptionList")},m(s,i){e.insert(s,t,i);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(t,null)},p(s,i){if(i[1]&83902464){n=e.ensure_array_like(s[45]);let r;for(r=0;r<n.length;r+=1){const _=Se(s,n,r);l[r]?l[r].p(_,i):(l[r]=ze(_),l[r].c(),l[r].m(t,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=n.length}},d(s){s&&e.detach(t),e.destroy_each(l,s)}}}function ze(a){let t,n,l,s,i,r,_=a[116].slice(-2)+"",u,d,o,m;function p(){return a[90](a[116])}return{c(){t=e.element("div"),n=e.element("span"),l=e.element("img"),i=e.space(),r=e.element("span"),u=e.text(_),d=e.space(),e.src_url_equal(l.src,s=`http://purecatamphetamine.github.io/country-flag-icons/3x2/${a[57](a[116].slice(-2))}.svg`)||e.attr(l,"src",s),e.attr(n,"class","FlagIcon"),e.attr(r,"class","LanguageName"),e.attr(t,"class","LanguageOption")},m(h,k){e.insert(h,t,k),e.append(t,n),e.append(n,l),e.append(t,i),e.append(t,r),e.append(r,u),e.append(t,d),o||(m=e.listen(t,"click",p),o=!0)},p(h,k){a=h,k[1]&16384&&!e.src_url_equal(l.src,s=`http://purecatamphetamine.github.io/country-flag-icons/3x2/${a[57](a[116].slice(-2))}.svg`)&&e.attr(l,"src",s),k[1]&16384&&_!==(_=a[116].slice(-2)+"")&&e.set_data(u,_)},d(h){h&&e.detach(t),o=!1,m()}}}function De(a){let t,n=a[116].slice(-2)+"",l,s;return{c(){t=e.element("option"),l=e.text(n),t.__value=s=a[116],e.set_input_value(t,t.__value)},m(i,r){e.insert(i,t,r),e.append(t,l)},p(i,r){r[1]&16384&&n!==(n=i[116].slice(-2)+"")&&e.set_data(l,n),r[1]&16384&&s!==(s=i[116])&&(t.__value=s,e.set_input_value(t,t.__value))},d(i){i&&e.detach(t)}}}function We(a){let t,n,l=a[113].label+"",s,i,r,_,u;function d(){return a[91](a[113])}return{c(){var o,m;t=e.element("li"),n=e.element("button"),s=e.text(l),i=e.space(),e.attr(t,"class",r="ItemSecondary "+(((o=a[37])==null?void 0:o.toString().indexOf("$"))>-1?((m=a[37])==null?void 0:m.split("$").pop())==a[113].id.split("$").pop()?"active":"":a[37]==a[113].id?"active":""))},m(o,m){e.insert(o,t,m),e.append(t,n),e.append(n,s),e.append(t,i),_||(u=e.listen(n,"click",d),_=!0)},p(o,m){var p,h;a=o,m[1]&128&&l!==(l=a[113].label+"")&&e.set_data(s,l),m[1]&192&&r!==(r="ItemSecondary "+(((p=a[37])==null?void 0:p.toString().indexOf("$"))>-1?((h=a[37])==null?void 0:h.split("$").pop())==a[113].id.split("$").pop()?"active":"":a[37]==a[113].id?"active":""))&&e.attr(t,"class",r)},d(o){o&&e.detach(t),_=!1,u()}}}function Jt(a){let t,n;return{c(){t=e.element("img"),e.src_url_equal(t.src,n=ae)||e.attr(t,"src",n),e.attr(t,"alt","Logo")},m(l,s){e.insert(l,t,s)},p:e.noop,d(l){l&&e.detach(t)}}}function Qt(a){let t,n;return{c(){t=e.element("img"),e.src_url_equal(t.src,n=a[47])||e.attr(t,"src",n),e.attr(t,"alt","Logo")},m(l,s){e.insert(l,t,s)},p(l,s){s[1]&65536&&!e.src_url_equal(t.src,n=l[47])&&e.attr(t,"src",n)},d(l){l&&e.detach(t)}}}function Vt(a){let t,n,l,s,i,r,_,u,d,o,m,p,h,k=a[49]("deposit")+"",B,S,L,b,M,F,z,O,E,I;function g(w,C){return w[41]?xt:Kt}let v=g(a),R=v(a),y=!a[35]&&Te(a),f=a[33]==="true"&&!a[43]&&Ue(a),H=a[48]&&je(a),A=a[45].length>1&&Ze(a),j=e.ensure_array_like(a[38]),D=[];for(let w=0;w<j.length;w+=1)D[w]=Je(Ee(a,j,w));return{c(){t=e.element("header"),n=e.element("div"),l=e.element("div"),R.c(),s=e.space(),i=e.element("nav"),y&&y.c(),r=e.space(),f&&f.c(),_=e.space(),u=e.element("div"),d=e.element("div"),o=e.element("player-account-balance-modal"),m=e.space(),p=e.element("div"),h=e.element("div"),B=e.text(k),S=e.space(),H&&H.c(),L=e.space(),b=e.element("div"),b.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429"><defs><style>.a {
@@ -1,6 +1,6 @@
1
1
  import { $ as Se, a as ri, b as si, c as ai, S as oi, i as ci, s as ui, f as E, d as di, n as ae, e as I, g as n, h as H, j as S, k as p, l as fi, o as gi, m as Je, p as _e, q as Qe, r as Ee, t as se, u as $, v as d, w as O, x as V, y as K, z as c, A as ie, B as ue, C as hi, D as wt, E as J, F as we, G as bt, H as be, I as mi, J as pi, K as _i, L as wi } from "./CasinoHamburgerMenu-CTVc2-UF.js";
2
2
  import "../stencil/user-deposit-withdrawal-BvYavTHs.js";
3
- import "../stencil/gamification-dropdown-D6fl7GGs.js";
3
+ import "../stencil/gamification-dropdown-CHDfyBlq.js";
4
4
  const bi = (t, e = {}) => {
5
5
  const i = new CustomEvent("track-custom-event", {
6
6
  detail: {
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderController-wemeTpGe.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller")&&customElements.define("casino-header-controller",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderController-BRa3odIv.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller")&&customElements.define("casino-header-controller",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CasinoHeaderController-CM6M7oBn.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CasinoHeaderController-B1x--_Oq.js").then(({ default: t }) => {
14
14
  !customElements.get("casino-header-controller") && customElements.define("casino-header-controller", t.element);
15
15
  });
16
16
  }
@@ -1,4 +1,4 @@
1
- import { C as s } from "../components/CasinoHeaderController-wAuW45el.js";
1
+ import { C as s } from "../components/CasinoHeaderController-BfAseLS8.js";
2
2
  function r(t) {
3
3
  return function(...n) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-header-controller",
3
- "version": "1.69.2",
3
+ "version": "1.70.0",
4
4
  "type": "module",
5
5
  "main": "es2015/casino-header-controller.cjs",
6
6
  "module": "esnext/casino-header-controller.js",
@@ -1 +1 @@
1
- "use strict";var p=(i,n,t)=>new Promise((e,o)=>{var s=r=>{try{l(t.next(r))}catch(d){o(d)}},c=r=>{try{l(t.throw(r))}catch(d){o(d)}},l=r=>r.done?e(r.value):Promise.resolve(r.value).then(s,c);l((t=t.apply(i,n)).next())});const a=require("./index-71b1bdfa-CG5MERSu.cjs"),y="en";let h={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const g=i=>new Promise(n=>{fetch(i).then(t=>t.json()).then(t=>{Object.keys(t).forEach(e=>{h[e]||(h[e]={});for(let o in t[e])h[e][o]=t[e][o]}),n(!0)})}),w=(i,n)=>{const t=n;return h[t!==void 0&&t in h?t:y][i]};function f(i,n){if(i){const t=document.createElement("style");t.innerHTML=n,i.appendChild(t)}}function u(i,n){const t=new URL(n);fetch(t.href).then(e=>e.text()).then(e=>{const o=document.createElement("style");o.innerHTML=e,i&&i.appendChild(o)}).catch(e=>{console.error("There was an error while trying to load client styling from URL",e)})}function v(i,n,t){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(n,o=>{e.innerHTML=o,i&&i.appendChild(e)})}}const S=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}",C=S,m=class{constructor(i){a.registerInstance(this,i),this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=n=>{n.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=n=>{n.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)},this.endpoint=void 0,this.language="en",this.session="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,g(this.translationUrl).then(()=>{this.isLoading=!1})}handleClientStylingChange(i,n){i!=n&&f(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,n){i!=n&&this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return p(this,null,function*(){if(this.translationUrl.length>2&&(yield g(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?v(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&f(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchPointsData(){let i=new URL(`${this.endpoint}/v1/elevate/playerInfo`);i.searchParams.append("language",this.language);const n=new Headers;n.append("X-SessionId",this.session);const t={method:"GET",headers:n};return new Promise((e,o)=>{this.isLoading=!0,fetch(i.href,t).then(s=>s.json()).then(s=>{var c,l;this.loyaltyPoints=(l=(c=s==null?void 0:s.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,e(!0)}).catch(s=>{console.error(s),o(s)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:a.h("div",{ref:i=>this.stylingContainer=i,class:"GamificationDropdownContainer"},a.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:i=>this.handleDropdownClick(i),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):w("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",a.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},a.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},a.h("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&a.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},a.h("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling})))}get el(){return a.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};m.style=C;exports.GamificationDropdown=m;
1
+ "use strict";var f=(i,n,t)=>new Promise((e,o)=>{var s=r=>{try{l(t.next(r))}catch(d){o(d)}},c=r=>{try{l(t.throw(r))}catch(d){o(d)}},l=r=>r.done?e(r.value):Promise.resolve(r.value).then(s,c);l((t=t.apply(i,n)).next())});const a=require("./index-71b1bdfa-DEOwV3WT.cjs"),w="en";let h={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const u=i=>new Promise(n=>{fetch(i).then(t=>t.json()).then(t=>{Object.keys(t).forEach(e=>{h[e]||(h[e]={});for(let o in t[e])h[e][o]=t[e][o]}),n(!0)})}),v=(i,n)=>{const t=n;return h[t!==void 0&&t in h?t:w][i]};function p(i,n){if(i){const t=document.createElement("style");t.innerHTML=n,i.appendChild(t)}}function g(i,n){const t=new URL(n);fetch(t.href).then(e=>e.text()).then(e=>{const o=document.createElement("style");o.innerHTML=e,i&&i.appendChild(o)}).catch(e=>{console.error("There was an error while trying to load client styling from URL",e)})}function m(i,n,t){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(n,o=>{e.innerHTML=o,i&&i.appendChild(e)})}}const S=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}",C=S,y=class{constructor(i){a.registerInstance(this,i),this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=n=>{n.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=n=>{n.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)},this.endpoint=void 0,this.language="en",this.session="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,u(this.translationUrl).then(()=>{this.isLoading=!1})}handleClientStylingChange(i,n){i!=n&&p(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,n){i!=n&&this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return f(this,null,function*(){if(this.translationUrl.length>2&&(yield u(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?m(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&p(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchPointsData(){let i=new URL(`${this.endpoint}/v1/elevate/playerInfo`);i.searchParams.append("language",this.language);const n=new Headers;n.append("X-SessionId",this.session);const t={method:"GET",headers:n};return new Promise((e,o)=>{this.isLoading=!0,fetch(i.href,t).then(s=>s.json()).then(s=>{var c,l;this.loyaltyPoints=(l=(c=s==null?void 0:s.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,e(!0)}).catch(s=>{console.error(s),o(s)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:a.h("div",{ref:i=>this.stylingContainer=i,class:"GamificationDropdownContainer"},a.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:i=>this.handleDropdownClick(i),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):v("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",a.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},a.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},a.h("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&a.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},a.h("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling,"mb-source":this.mbSource})))}get el(){return a.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};y.style=C;exports.GamificationDropdown=y;exports.setClientStyling=p;exports.setClientStylingURL=g;exports.setStreamStyling=m;
@@ -14,7 +14,7 @@ var p = (i, n, t) => new Promise((e, o) => {
14
14
  }, a = (l) => l.done ? e(l.value) : Promise.resolve(l.value).then(s, c);
15
15
  a((t = t.apply(i, n)).next());
16
16
  });
17
- import { r as m, h as r, g as y } from "./index-71b1bdfa-BVbjDrHk.js";
17
+ import { r as m, h as r, g as y } from "./index-71b1bdfa-CqHhm_K7.js";
18
18
  const w = "en";
19
19
  let h = {
20
20
  en: {
@@ -71,7 +71,7 @@ function S(i, n, t) {
71
71
  });
72
72
  }
73
73
  }
74
- const C = ":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}", D = C, G = class {
74
+ const C = ":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}", b = C, D = class {
75
75
  constructor(i) {
76
76
  m(this, i), this.navigateToGamification = () => {
77
77
  window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
@@ -125,7 +125,7 @@ const C = ":host{display:block}.GamificationDropdownContainer{position:relative}
125
125
  });
126
126
  }
127
127
  render() {
128
- return this.isLoading ? null : r("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, r("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : v("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", r("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, r("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && r("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, r("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })));
128
+ return this.isLoading ? null : r("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, r("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : v("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", r("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, r("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && r("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, r("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "mb-source": this.mbSource })));
129
129
  }
130
130
  get el() {
131
131
  return y(this);
@@ -138,7 +138,10 @@ const C = ":host{display:block}.GamificationDropdownContainer{position:relative}
138
138
  };
139
139
  }
140
140
  };
141
- G.style = D;
141
+ D.style = b;
142
142
  export {
143
- G
143
+ D as G,
144
+ f as a,
145
+ u as b,
146
+ S as s
144
147
  };
@@ -1,4 +1,4 @@
1
- import { r as g, h as a, g as f } from "./index-71b1bdfa-BQViYc9r.js";
1
+ import { r as g, h as a, g as f } from "./index-71b1bdfa-Br04T1ks.js";
2
2
  const u = "en";
3
3
  let l = {
4
4
  en: {
@@ -107,7 +107,7 @@ const w = ":host{display:block}.GamificationDropdownContainer{position:relative}
107
107
  });
108
108
  }
109
109
  render() {
110
- return this.isLoading ? null : a("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, a("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : m("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", a("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, a("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, a("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && a("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, a("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })));
110
+ return this.isLoading ? null : a("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, a("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : m("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", a("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, a("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, a("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && a("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, a("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "mb-source": this.mbSource })));
111
111
  }
112
112
  get el() {
113
113
  return f(this);
@@ -122,5 +122,8 @@ const w = ":host{display:block}.GamificationDropdownContainer{position:relative}
122
122
  };
123
123
  S.style = v;
124
124
  export {
125
- S as G
125
+ S as G,
126
+ d as a,
127
+ p as b,
128
+ y as s
126
129
  };
@@ -0,0 +1,25 @@
1
+ var o = (n, a, l) => new Promise((s, i) => {
2
+ var g = (e) => {
3
+ try {
4
+ t(l.next(e));
5
+ } catch (r) {
6
+ i(r);
7
+ }
8
+ }, p = (e) => {
9
+ try {
10
+ t(l.throw(e));
11
+ } catch (r) {
12
+ i(r);
13
+ }
14
+ }, t = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(g, p);
15
+ t((l = l.apply(n, a)).next());
16
+ });
17
+ import { b as d, p as y } from "./index-71b1bdfa-CqHhm_K7.js";
18
+ import { g as c } from "./app-globals-0f993ce5-B6nNHmA4.js";
19
+ var u = () => {
20
+ const n = import.meta.url, a = {};
21
+ return n !== "" && (a.resourcesUrl = new URL(".", n).href), y(a);
22
+ };
23
+ u().then((n) => o(void 0, null, function* () {
24
+ return yield c(), d([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], mbSource: [1, "mb-source"], translationUrl: [1, "translation-url"], targetTranslations: [16] }, null, { clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingUrlChange"] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], mbSource: [513, "mb-source"], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-rakeback-card", [[1, "player-rakeback-card", { endpoint: [513], theme: [513], session: [513], language: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], show: [516], rakebackInfo: [32], isLoading: [32], coolingOffPeriod: [32], showTheWidget: [32] }, [[8, "message", "handleMessage"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"], show: ["onShowOrHasRakebackWalletChange"], rakebackInfo: ["onShowOrHasRakebackWalletChange"] }]]]], n);
25
+ }));
@@ -0,0 +1 @@
1
+ "use strict";var s=(n,a,t)=>new Promise((d,o)=>{var p=e=>{try{l(t.next(e))}catch(r){o(r)}},c=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(p,c);l((t=t.apply(n,a)).next())});const g=require("./index-71b1bdfa-DEOwV3WT.cjs"),y=require("./app-globals-0f993ce5-DgOnOgxM.cjs");var i=typeof document!="undefined"?document.currentScript:null,u=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:i&&i.tagName.toUpperCase()==="SCRIPT"&&i.src||new URL("stencil/gamification-dropdown-BgQs3qHL.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),g.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield y.globalScripts(),g.bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],targetTranslations:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],mbSource:[513,"mb-source"],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],n)}));
@@ -0,0 +1,7 @@
1
+ import { b as a, p as l } from "./index-71b1bdfa-Br04T1ks.js";
2
+ import { g as t } from "./app-globals-0f993ce5-B6nNHmA4.js";
3
+ var r = () => {
4
+ const e = import.meta.url, n = {};
5
+ return e !== "" && (n.resourcesUrl = new URL(".", e).href), l(n);
6
+ };
7
+ r().then(async (e) => (await t(), a([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], mbSource: [1, "mb-source"], translationUrl: [1, "translation-url"], targetTranslations: [16] }, null, { clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingUrlChange"] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], mbSource: [513, "mb-source"], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-rakeback-card", [[1, "player-rakeback-card", { endpoint: [513], theme: [513], session: [513], language: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], show: [516], rakebackInfo: [32], isLoading: [32], coolingOffPeriod: [32], showTheWidget: [32] }, [[8, "message", "handleMessage"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"], show: ["onShowOrHasRakebackWalletChange"], rakebackInfo: ["onShowOrHasRakebackWalletChange"] }]]]], e)));
@@ -1,4 +1,4 @@
1
- "use strict";var x=(e,t,a)=>new Promise((n,l)=>{var r=c=>{try{s(a.next(c))}catch(h){l(h)}},d=c=>{try{s(a.throw(c))}catch(h){l(h)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(r,d);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./gamification-dropdown-8eb8a896-CAQwtT6c.cjs"),i=require("./index-71b1bdfa-CG5MERSu.cjs"),y=require("./locale-B_6Rn5-v.cjs"),o=require("./player-elevate-card-items-08c6fbd8-mzRnJo_u.cjs"),M=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]||t.en,Object.keys(n[l]).forEach(r=>{t.en[r]&&(t[l][r]=t[l][r]||t.en[r],typeof n[l][r]=="object"?Object.keys(n[l][r]).forEach(d=>{t[l][r][d]=n[l][r][d]}):t[l][r]=n[l][r])})}),a(!0)}).catch(n=>{console.error("Failed to load translations:",n),a(!1)})}),R=":host{display:block}",O=R,L=class{constructor(e){i.registerInstance(this,e),this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{a.innerHTML=n,setTimeout(()=>{this.el.prepend(a)},1)}).catch(n=>{console.log("error ",n)})},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}componentWillLoad(){return x(this,null,function*(){const e=[];if(this.translationUrl){const t=M(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return i.h("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},i.h("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return i.getElement(this)}};L.style=O;function b(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var $=864e5;function N(e,t){o.requiredArgs(2,arguments);var a=b(e),n=b(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),r=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-r)/$)}var q=6e4,W=36e5;function E(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},z="trunc";function w(e){return e?m[e]:m[z]}function U(e,t,a){o.requiredArgs(2,arguments);var n=E(e,t)/W;return w(a==null?void 0:a.roundingMethod)(n)}function F(e,t,a){o.requiredArgs(2,arguments);var n=E(e,t)/q;return w(a==null?void 0:a.roundingMethod)(n)}function j(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function H(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,r=a.getBBox().width,d=t>1?1:t,s=d*r-n<0?0:d*r-n,c=e.querySelector("#current_level"),h=e.querySelector("#filter_current_level"),p=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),c.setAttribute("width",`${s}`),p.setAttribute("cx",`${s<l?l:s}`),h.setAttribute("x",`${s-8}`);const g=e.querySelector("#lock"),C=e.querySelector("#filter_heart_ball"),S=e.querySelector("#filter_ball"),k=e.querySelector("#filter_heart"),T=e.querySelector("#filter_lock"),u=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),A=e.querySelector("#lock_box"),D=e.querySelector("#heart_box"),_=10,v=r-_;g.setAttribute("cx",`${v}`),f.setAttribute("x1",`${v}`),f.setAttribute("x2",`${v}`),u.setAttribute("x1",`${v-6}`),u.setAttribute("x2",`${v-6+11.2}`),T.setAttribute("x",`${v-6}`),k.setAttribute("x",`${v-6-2}`),S.setAttribute("x",`${v-6-2-2}`),C.setAttribute("x",`${v-6-2-2-4}`),A.setAttribute("x",`${v-6}`),D.setAttribute("x",`${v-6}`),a.parentElement.style.opacity="1"}const G=`:host {
1
+ "use strict";var x=(e,t,a)=>new Promise((n,l)=>{var r=c=>{try{s(a.next(c))}catch(h){l(h)}},d=c=>{try{s(a.throw(c))}catch(h){l(h)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(r,d);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./gamification-dropdown-343647b2-B50uewij.cjs"),i=require("./index-71b1bdfa-DEOwV3WT.cjs"),u=require("./locale-B_6Rn5-v.cjs"),o=require("./player-elevate-card-items-08c6fbd8-swAJgFA-.cjs"),R=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]||t.en,Object.keys(n[l]).forEach(r=>{t.en[r]&&(t[l][r]=t[l][r]||t.en[r],typeof n[l][r]=="object"?Object.keys(n[l][r]).forEach(d=>{t[l][r][d]=n[l][r][d]}):t[l][r]=n[l][r])})}),a(!0)}).catch(n=>{console.error("Failed to load translations:",n),a(!1)})}),M=":host{display:block}",O=M,E=class{constructor(e){i.registerInstance(this,e),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(window.emMessageBus!=null?p.setStreamStyling(this.el,`${this.mbSource}.Style`):(this.clientStyling&&p.setClientStyling(this.el,this.clientStyling),this.clientStylingUrl&&p.setClientStylingURL(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&p.setClientStyling(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&p.setClientStylingURL(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&p.setClientStyling(this.el,this.clientStyling),this.clientStylingUrl&&p.setClientStylingURL(this.el,this.clientStylingUrl),this.stylingAppends=!0)}componentWillLoad(){return x(this,null,function*(){const e=[];if(this.translationUrl){const t=R(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return i.h("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},i.h("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return i.getElement(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};E.style=O;function m(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var $=864e5;function U(e,t){o.requiredArgs(2,arguments);var a=m(e),n=m(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),r=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-r)/$)}var N=6e4,q=36e5;function w(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var L={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},W="trunc";function I(e){return e?L[e]:L[W]}function z(e,t,a){o.requiredArgs(2,arguments);var n=w(e,t)/q;return I(a==null?void 0:a.roundingMethod)(n)}function F(e,t,a){o.requiredArgs(2,arguments);var n=w(e,t)/N;return I(a==null?void 0:a.roundingMethod)(n)}function j(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function H(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,r=a.getBBox().width,d=t>1?1:t,s=d*r-n<0?0:d*r-n,c=e.querySelector("#current_level"),h=e.querySelector("#filter_current_level"),g=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),c.setAttribute("width",`${s}`),g.setAttribute("cx",`${s<l?l:s}`),h.setAttribute("x",`${s-8}`);const y=e.querySelector("#lock"),C=e.querySelector("#filter_heart_ball"),k=e.querySelector("#filter_ball"),T=e.querySelector("#filter_heart"),A=e.querySelector("#filter_lock"),f=e.querySelector("#paint0_linear_ball"),b=e.querySelector("#paint1_linear_lock"),D=e.querySelector("#lock_box"),_=e.querySelector("#heart_box"),B=10,v=r-B;y.setAttribute("cx",`${v}`),b.setAttribute("x1",`${v}`),b.setAttribute("x2",`${v}`),f.setAttribute("x1",`${v-6}`),f.setAttribute("x2",`${v-6+11.2}`),A.setAttribute("x",`${v-6}`),T.setAttribute("x",`${v-6-2}`),k.setAttribute("x",`${v-6-2-2}`),C.setAttribute("x",`${v-6-2-2-4}`),D.setAttribute("x",`${v-6}`),_.setAttribute("x",`${v-6}`),a.parentElement.style.opacity="1"}const G=`:host {
2
2
  display: block;
3
3
  width: 360px;
4
4
  height: 230px;
@@ -189,4 +189,4 @@
189
189
  text-align: right;
190
190
  font-weight: bold;
191
191
  color: var(--emw--color-red, #9e595f);
192
- }`,X=G,I=class{constructor(e){i.registerInstance(this,e),this.playerElevateLeveLoaded=i.createEvent(this,"playerElevateLeveLoaded"),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e,t){let a="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return a;e.aboutToExpire.sort((c,h)=>j(new Date(c.expireTime),new Date(h.expireTime))?-1:1);const n=e.aboutToExpire[0],l=N(new Date(n.expireTime),new Date);let r=0,d=0,s=l===0?`${t}Day`:t;return l<=0&&(r=U(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),s=r>1?`${t}Hours`:`${t}Hour`,r<=0&&(d=F(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),s=d>1?`${t}Minutes`:`${t}Minute`)),a=y.translateWithParams(s,{expirationPoints:n.points,expireDay:Math.max(l,r,d),lang:this.params.language}),a}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,r,d;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=((l=s.spendableWallet)===null||l===void 0?void 0:l.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const c=(r=n.data.spendableWallet)===null||r===void 0?void 0:r.total,h=(d=n.data.loyaltyWallet)===null||d===void 0?void 0:d.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:c,loyaltyWalletTotal:h});let p=this.calcuatePointsToBeExpired(c,"coinsToBeExpired"),g=this.calcuatePointsToBeExpired(h,"pointsToBeExpired");(p||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:p,xpExpireString:g}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){H(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout(()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)},80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,r)=>l.firstEntryPoints>r.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,r)=>{a>l.firstEntryPoints&&(n=r)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return i.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};I.style=X;const Y=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}",J=Y,P=class{constructor(e){i.registerInstance(this,e),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return y.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=i.getAssetPath("../static/card-ground.svg"),t=i.getAssetPath("../static/card-ground-over.svg");return i.h("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},i.h("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},i.h("general-styling-wrapper",{key:"24dc58d3f4f6026b113239d1cc9ccfd316142ff9",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:y.TRANSLATIONS,translationUrl:this.translationUrl}),i.h("player-elevate-card-data",{key:"0cbffe246628e3927bf76ce5b125b7419cafc25d",params:this.paramProxy}),i.h("div",{key:"36253daeadefe0b3ee2eb2eccb361e5033364202",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},i.h("div",{key:"49f97f2c1cafa39556c34432557e000690698105",class:"Content Row"},this.playerElevateLevel&&i.h(i.Fragment,{key:"4eab6948bc49da8f28acd5d85364246495f81af5"},i.h("div",{key:"5f95c9bbafc6f20df602adf279cfcbd069ab2319",class:"PlayerImg"},i.h(o.PlayerAvatar,{key:"53c37a7676b053ea9447e833053aa13fb67e0392",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i.h("div",{key:"ce9b24f9bf2b87878edd04ac75ec64545fa62711",class:`LevelInfo ${this.playerElevateLevel.name}`},i.h("div",{key:"79ab8fc735a7ddeb9b8786e3f832ec4188d5942f",class:"CardCell ElevateLevel"},i.h("span",{key:"e7cf27215748ce93683ce95dde701dd991e6854b",class:"LevelName",title:this.playerElevateLevel.name},this.playerElevateLevel.name)),i.h("div",{key:"0c4bfe25c728722d5e97e9728b642e3503940908",class:"PointsRange"},i.h(o.PlayerPoints,{key:"f2fba862e377beafb8e7a682503cfce682fb863f",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),i.h(o.PlayerPoints,{key:"a6fa3560bfb9acf7abc3bdb23acb6cb1f51ff0df",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),i.h(o.PlayerLoyaltyProcess,{key:"c185c3ac46e10ec9715fb081a05f9a8d4d8007f9"}),i.h("div",{key:"d0f85005176bd8acc499cd8e5efe53b9ec2a3b80",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&i.h("div",{key:"763be6168567973ad3df88d116a97dd00d53a6d8",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),this.playerElevateLevel.expireTime&&i.h(o.LoyaltyLevelExpireDay,{key:"662982c38dd920149566a87503b5de1b123ee414",expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language})))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};P.style=J;exports.gamification_dropdown=B.GamificationDropdown;exports.general_styling_wrapper=L;exports.player_elevate_card_data=I;exports.player_elevate_loyaltycard=P;
192
+ }`,X=G,S=class{constructor(e){i.registerInstance(this,e),this.playerElevateLeveLoaded=i.createEvent(this,"playerElevateLeveLoaded"),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e,t){let a="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return a;e.aboutToExpire.sort((c,h)=>j(new Date(c.expireTime),new Date(h.expireTime))?-1:1);const n=e.aboutToExpire[0],l=U(new Date(n.expireTime),new Date);let r=0,d=0,s=l===0?`${t}Day`:t;return l<=0&&(r=z(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),s=r>1?`${t}Hours`:`${t}Hour`,r<=0&&(d=F(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),s=d>1?`${t}Minutes`:`${t}Minute`)),a=u.translateWithParams(s,{expirationPoints:n.points,expireDay:Math.max(l,r,d),lang:this.params.language}),a}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,r,d;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=((l=s.spendableWallet)===null||l===void 0?void 0:l.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const c=(r=n.data.spendableWallet)===null||r===void 0?void 0:r.total,h=(d=n.data.loyaltyWallet)===null||d===void 0?void 0:d.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:c,loyaltyWalletTotal:h});let g=this.calcuatePointsToBeExpired(c,"coinsToBeExpired"),y=this.calcuatePointsToBeExpired(h,"pointsToBeExpired");(g||y)&&this.playerElevateLeveLoaded.emit({pointExpireString:g,xpExpireString:y}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){H(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout(()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)},80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,r)=>l.firstEntryPoints>r.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,r)=>{a>l.firstEntryPoints&&(n=r)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return i.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};S.style=X;const Y=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}",J=Y,P=class{constructor(e){i.registerInstance(this,e),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return u.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=i.getAssetPath("../static/card-ground.svg"),t=i.getAssetPath("../static/card-ground-over.svg");return i.h("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},i.h("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},i.h("general-styling-wrapper",{key:"3648821972ac115a1c33705463cdc2cdb427a95b",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:u.TRANSLATIONS,translationUrl:this.translationUrl,mbSource:this.mbSource}),i.h("player-elevate-card-data",{key:"7b36c46a869bd4b014d1f04dbb718445b23ec964",params:this.paramProxy}),i.h("div",{key:"f4e5aa453459f693e07c166028aec9b0b696c907",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},i.h("div",{key:"d5f1894120cba3e7cf3c54b838a025f469bc445e",class:"Content Row"},this.playerElevateLevel&&i.h(i.Fragment,{key:"112ee04598b23dda6911f043101c0c1631454d7f"},i.h("div",{key:"7af4b6e937bbe73cc00aae0f27f8c93da47bb626",class:"PlayerImg"},i.h(o.PlayerAvatar,{key:"1b5037bfa196063f56cccd947c988a3aca0781b0",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i.h("div",{key:"7b714e446f4e01edd4f4aefcc035d070b7d6a47b",class:`LevelInfo ${this.playerElevateLevel.name}`},i.h("div",{key:"37ad8ce5dae374685e74f6772d28e79d251932e3",class:"CardCell ElevateLevel"},i.h("span",{key:"2d9dcf4b08fcecc927d3e8bdca74c75ff4336480",class:"LevelName",title:this.playerElevateLevel.name},this.playerElevateLevel.name)),i.h("div",{key:"cc89cbaa70d9583b9626da15e98f9fd61d82f81f",class:"PointsRange"},i.h(o.PlayerPoints,{key:"32de4cac05a4fd5610af857b25e096a7cb9ba34d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),i.h(o.PlayerPoints,{key:"298f492c8991384547c31396fc930b5c21f41501",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),i.h(o.PlayerLoyaltyProcess,{key:"aca4f5642c41db1c4b7fa04411331a5c25c655dd"}),i.h("div",{key:"d841c5df319de105376c6eee24bc685757916aae",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&i.h("div",{key:"774279829f3f52ee5696550a855a833b39df8c81",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),this.playerElevateLevel.expireTime&&i.h(o.LoyaltyLevelExpireDay,{key:"3a4319e502e85b26cb220942492b161ad842be82",expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language})))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};P.style=J;exports.gamification_dropdown=p.GamificationDropdown;exports.general_styling_wrapper=E;exports.player_elevate_card_data=S;exports.player_elevate_loyaltycard=P;