@everymatrix/casino-engagement-suite-container 1.40.0 → 1.41.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.
@@ -1 +1 @@
1
- import{p as e,b as n}from"./p-9b18d150.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((e=>n([["p-d949d4a4",[[1,"casino-engagement-suite-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],orientation:[32],device:[32],showChallengesList:[32],showFreeSpinsList:[32],showJackpotsList:[32],showChallengeDetails:[32],showFreeSpinsDetails:[32],showJackpotDetails:[32],showLeaderboardWidget:[32],challengePercent:[32],highlightChallenge:[32],limitStylingAppends:[32],activeWidget:[32],challenges:[32],inProgressChallenges:[32],jackpots:[32],freeSpins:[32],leaderboards:[32],gameSlug:[32],pausedChallengeIds:[32],isChallengeLabel:[32],isForfeitedSpinsLabel:[32],isJoiningToChallenge:[32],selectedChallenge:[32],selectedJackpot:[32],selectedSpin:[32],selectedSpinId:[32],selectedChallengeId:[32],selectedJackpotId:[32],barHeight:[32],init:[64]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-tournament",{language:[1],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],leaderboardsInit:[16],tab:[32],locale:[32],tournamentItem:[32],tournamentList:[32],leaderboards:[32],isActionJoinPending:[32],isDialogOpen:[32],isShowInfo:[32],page:[32],tournamentInDialog:[32],dialog:[32],time:[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-challenges-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],challenge:[1040],inProgressChallenges:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],pausedChallengeIds:[1040],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32]}],[1,"casino-engagement-suite-challenges-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],challenges:[1040],isJoiningToChallenge:[1028,"is-joining-to-challenge"],inProgressChallenges:[1040],pausedChallengeIds:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]}],[1,"casino-engagement-suite-modal-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],device:[1],limitStylingAppends:[32],openModals:[32],rewardMessage:[32],hasError:[32],confirmationData:[32],winAmount:[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]],[1,"casino-engagement-suite-bar",{activeWidget:[1537,"active-widget"],challengePercent:[1,"challenge-percent"],highlightChallenge:[4,"highlight-challenge"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],orientation:[1],device:[1],isChallengeLabel:[4,"is-challenge-label"],isSpinForfeitedLabel:[1028,"is-spin-forfeited-label"],language:[1],jackpots:[16],freeSpins:[16],leaderboards:[16],limitStylingAppends:[32],activeJackpot:[32]}],[1,"casino-engagement-suite-free-spins-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],spin:[1040],inProgressChallenges:[16],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32],activeTab:[32],visibleGames:[32]}],[1,"casino-engagement-suite-free-spins-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],freeSpins:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32],newSpinIds:[32]}],[1,"casino-engagement-suite-jackpot-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],jackpot:[16],jackpotChangeStatusRequest:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],limitStylingAppends:[32],timer:[32],disabledStatus:[32],activeTab:[32],visibleGames:[32],enabled:[32],balance:[32],winBalance:[32],showDetails:[32],jackpotEndTime:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]],[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]}],[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],isLoading:[1028,"is-loading"],header:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],showAnimation:[4,"show-animation"],limitStylingAppends:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}],[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e)));
1
+ import{p as e,b as n}from"./p-9b18d150.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((e=>n([["p-9eb1c7e8",[[1,"casino-engagement-suite-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],orientation:[32],device:[32],showChallengesList:[32],showFreeSpinsList:[32],showJackpotsList:[32],showChallengeDetails:[32],showFreeSpinsDetails:[32],showJackpotDetails:[32],showLeaderboardWidget:[32],challengePercent:[32],highlightChallenge:[32],limitStylingAppends:[32],activeWidget:[32],challenges:[32],inProgressChallenges:[32],jackpots:[32],freeSpins:[32],leaderboards:[32],gameSlug:[32],pausedChallengeIds:[32],isChallengeLabel:[32],isForfeitedSpinsLabel:[32],isJoiningToChallenge:[32],selectedChallenge:[32],selectedJackpot:[32],selectedSpin:[32],selectedSpinId:[32],selectedChallengeId:[32],selectedJackpotId:[32],barHeight:[32],init:[64]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-tournament",{language:[1],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],leaderboardsInit:[16],tab:[32],locale:[32],tournamentItem:[32],tournamentList:[32],leaderboards:[32],isActionJoinPending:[32],isDialogOpen:[32],isShowInfo:[32],page:[32],tournamentInDialog:[32],dialog:[32],time:[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-challenges-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],challenge:[1040],inProgressChallenges:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],pausedChallengeIds:[1040],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32]}],[1,"casino-engagement-suite-challenges-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],challenges:[1040],isJoiningToChallenge:[1028,"is-joining-to-challenge"],inProgressChallenges:[1040],pausedChallengeIds:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32],activeTab:[32],historyLoading:[32],challengesHistory:[32],openedHistoryIds:[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-modal-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],device:[1],limitStylingAppends:[32],openModals:[32],rewardMessage:[32],hasError:[32],confirmationData:[32],winAmount:[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]],[1,"casino-engagement-suite-bar",{activeWidget:[1537,"active-widget"],challengePercent:[1,"challenge-percent"],highlightChallenge:[4,"highlight-challenge"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],orientation:[1],device:[1],isChallengeLabel:[4,"is-challenge-label"],isSpinForfeitedLabel:[1028,"is-spin-forfeited-label"],language:[1],jackpots:[16],freeSpins:[16],leaderboards:[16],limitStylingAppends:[32],activeJackpot:[32]}],[1,"casino-engagement-suite-free-spins-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],spin:[1040],inProgressChallenges:[16],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32],activeTab:[32],visibleGames:[32]}],[1,"casino-engagement-suite-free-spins-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],freeSpins:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32],newSpinIds:[32]}],[1,"casino-engagement-suite-jackpot-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],jackpot:[16],jackpotChangeStatusRequest:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],limitStylingAppends:[32],timer:[32],disabledStatus:[32],activeTab:[32],visibleGames:[32],enabled:[32],balance:[32],winBalance:[32],showDetails:[32],jackpotEndTime:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]],[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]}],[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],isLoading:[1028,"is-loading"],header:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],showAnimation:[4,"show-animation"],limitStylingAppends:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}],[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as e,h as t,c as i,g as n,H as s,F as o}from"./p-9b18d150.js";const a=["en"],r={en:{new:"new"}},l=class{constructor(t){e(this,t),this.highlightChallenge=!1,this.clientStyling="",this.clientStylingUrl="",this.orientation="Landscape",this.device="Mobile",this.isChallengeLabel=!1,this.isSpinForfeitedLabel=!1,this.language="en",this.jackpots=[],this.limitStylingAppends=!1,this.activeJackpot="",this.handleTileClick=e=>{const t=e.target.getAttribute("data-app");window.postMessage({type:`Bar${t}Click`}),this.activeWidget=t,"Jackpots"===t&&(this.activeJackpot=e.target.getAttribute("data-type"))},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.engagementSuiteBar.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.engagementSuiteBar.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.engagementSuiteBar&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getChallengeTile(){return t("button",{class:"Tile Reward Challenges "+("Challenges"===this.activeWidget||this.highlightChallenge?"Active":""),"data-app":"Challenges",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.challengePercent),t("div",{class:"ChallengeLabel "+(this.isChallengeLabel?"ShowChallengeLabel":"")},t("span",null,(()=>{const e=this.language;return r[void 0!==e&&a.includes(e)?e:"en"].new})())))}getFreeSpinsTile(){const{TotalNumberOfFreeSpins:e,TotalNumberOfUsedFreeSpins:i}=this.freeSpins,n=e-i;return t("button",{class:"Tile Reward FreeSpins "+("FreeSpins"===this.activeWidget?"Active":""),"data-app":"FreeSpins",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,"number"!=typeof n||n<0?"":n),t("div",{class:"ForfeitLabel "+(this.isSpinForfeitedLabel?"ShowForfeitLabel":"")},t("span",null)))}getJackpotClasses(e){return{Tile:!0,Jackpot:!0,Enabled:e.Enabled,Active:"Jackpots"===this.activeWidget&&this.activeJackpot===e.Type,[e.Type.charAt(0).toUpperCase()+e.Type.slice(1)]:!0}}getJackpotsTemplate(){return this.jackpots.map((e=>{const i=function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(e.Balance,e.Currency);return t("div",{class:this.getJackpotClasses(e),"data-app":"Jackpots","data-type":e.Type,onClick:this.handleTileClick},t("div",{class:"JackpotType"},e.Type),t("span",{class:"JackpotBalance"},i))}))}getLeaderboardsTile(){return t("button",{class:"Tile Reward Leaderboard "+("Leaderboards"===this.activeWidget?"Active":""),"data-app":"Leaderboards",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,"-"))}displayTilesInOneRow(){return this.jackpots.length+[this.leaderboards,this.challengePercent,this.freeSpins].filter((e=>!!e)).length<4}getTilesTemplate(){return this.displayTilesInOneRow()?t("div",{class:"EngagementSuiteContainer"},!!this.jackpots.length&&this.getJackpotsTemplate(),this.leaderboards&&this.getLeaderboardsTile(),this.challengePercent&&this.getChallengeTile(),this.freeSpins&&this.getFreeSpinsTile()):t("div",{class:"EngagementSuiteContainer"},t("div",{class:"Jackpots"},!!this.jackpots.length&&this.getJackpotsTemplate()),t("div",{class:"Rewards"},this.leaderboards&&this.getLeaderboardsTile(),this.challengePercent&&this.getChallengeTile(),this.freeSpins&&this.getFreeSpinsTile()))}render(){return t("div",{class:`CasinoEngagementSuiteBar ${this.orientation} ${this.device}`,ref:e=>this.engagementSuiteBar=e},this.getTilesTemplate())}};l.style=':host{display:block}*{box-sizing:border-box}button{touch-action:manipulation}.CasinoEngagementSuiteBar{height:100vh;background-color:var(--emw--color-background, #1E1638);color:var(--emw--color-typography, #FFF);display:flex;justify-content:center;position:relative;z-index:1}.CasinoEngagementSuiteBar .EngagementSuiteContainer{display:flex;align-items:center;gap:4px;scrollbar-gutter:stable;overflow-x:auto;padding:5px 9px 0;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar{width:3px;background:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{cursor:pointer;background-color:var(--emw--color-primary, #251D3E);border-radius:var(--emw--border-radius-medium, 4px);display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-x-small, 12px);font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFF)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile.Active::before{background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #2D2545 82.77%)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-medium, 4px);padding:1px;background:linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 100%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{display:flex;gap:4px;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{padding:14px 4px;flex-direction:column}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotType{display:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotBalance{font-weight:var(--emw--font-weight-semibold, 600);line-height:12px;font-size:12px;color:var(--emw--color-typography, #fff)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Mega .JackpotBalance{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Major .JackpotBalance{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Minor .JackpotBalance{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled .JackpotBalance{font-weight:var(--emw--font-weight-bold, 800)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{justify-content:space-between;padding:8px;border:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .RewardIcon{width:24px;height:24px;background-size:100%;background-position:center}.Tile.Leaderboard .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg")}.Tile.Leaderboard.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard-pressed.svg")}.Tile.Challenges .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge.svg")}.Tile.Challenges.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge-pressed.svg")}.Tile.Luckywheel .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel.svg")}.Tile.Luckywheel.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel-pressed.svg")}.Tile.FreeSpins .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins.svg")}.Tile.FreeSpins.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins-pressed.svg")}.ChallengeLabel{min-width:23px;height:11px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-4px;right:4px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:7px;line-height:7px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ForfeitLabel{width:12px;height:12px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:50%;display:none;position:absolute;top:-6px;right:8px}.ShowChallengeLabel{display:inline-flex}.ShowForfeitLabel{display:inline-flex}.Landscape.CasinoEngagementSuiteBar{width:152px;padding-top:11px;box-shadow:0 4px 4px 0 #00000040, 8px 0 10px 0 #0000004D}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer{flex-direction:column}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{width:120px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{width:120px;height:40px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{flex-direction:column}.Portrait.CasinoEngagementSuiteBar{border-radius:0 0 var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px);height:auto;padding:5px 10px 10px;box-shadow:0 4px 4px 0 #00000040, 8px 0 10px 0 #0000004D}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer{padding:5px 0 0;gap:8px;flex-wrap:wrap}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards,.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots{gap:8px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{flex:1 1 0px;height:32px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{min-width:30%;padding:10px 4px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{min-width:20%;padding:4px 8px}.CasinoEngagementSuiteBar.Desktop.Landscape{width:252px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .EngagementSuiteContainer{gap:12px}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward{padding:8px 20px;height:64px;font-size:var(--emw--font-size-medium, 16px)}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward .RewardIcon{width:48px;height:48px}.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Tile{width:212px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot{padding-top:35px;min-height:133px;background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/jackpot-bg-stars.svg")}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType{display:block;font-weight:var(--emw--font-weight-bold, 800);margin-bottom:12px;text-transform:uppercase}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotBalance{font-size:var(--emw--size-large, 24px);line-height:24px}';const p=["en"],c={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",details:"Mission Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution"}},d=(e,t)=>{const i=t;return c[void 0!==i&&p.includes(i)?i:"en"][e]};var h,g;function u(e,t){return`${t}${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}!function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(h||(h={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(g||(g={}));const m=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.resetNewLabel(),this.close.emit()},this.handleBackClick=()=>{this.resetNewLabel(),this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.changeChallengeStatus=e=>{var t,i;const n=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(n))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:n}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:n,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:n}})},this.toggle=()=>{this.showDetails=!this.showDetails}}challengePropHandler(e){!this.interval&&e&&(this.updateTimer(),this.startCountdown()),this.interval&&!e&&clearInterval(this.interval)}componentWillLoad(){this.challengePropHandler(this.challenge)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getActionsTemplate(){return t("header",{class:"ChallengeActions"},t("button",{class:"ChallengeIconButton",onClick:this.handleBackClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),t("button",{class:"ChallengeIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getChallengeHeader(){const e=this.challenge.Status===g.InProgress||this.challenge.Status===g.PendingLevelReward;return t("div",{class:"ChallengeDetailsHeader"},t("span",{class:"ChallengeName"},this.challenge.ChallengePresentation.PresentationName),this.challenge.Status!==g.Completed?t("button",{onClick:this.changeChallengeStatus,class:`ChallengeJoinButton ${e?"Joined":""}\n ${this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId)?"Disabled":""}`,"data-id":this.challenge.Id},d(e?"unjoin":"join",this.language)):null,t("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},t("span",null,d("new",this.language))))}getChallengeCountdown(){return t("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer)}getChallengeDetails(){const e=this.challenge.ChallengePresentation.Description,i=this.challenge.ChallengePresentation.Url,n=this.challenge.Games;return t("div",{class:"CollapseDetails "+(this.showDetails?"ShowDetails":"")},e&&t("div",{class:"ChallengeDescription"},e),i&&t("div",{class:"TC"},t("a",{href:i,target:"_blank"},d("tc",this.language))),(null==n?void 0:n.length)&&t("div",{class:"ChallengeGames"},n.map((e=>t("div",{class:"Game",key:e.CasinoGameId},t("img",{src:e.GameIcon,alt:e.GameName,onClick:this.onGameClick,class:e.GameSlug===this.gameSlug?"Disabled":"","data-slug":e.GameSlug}))))))}resetNewLabel(){this.resetNewChallengeLabel.emit(this.challenge.Id)}startCountdown(){this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.challenge.ExpirationTime).getTime()-(new Date).getTime();if(e<1)return clearInterval(this.interval),this.timer="",void(this.isExpiredChallenge=!0);const{days:t,hours:i,minutes:n,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${s}s`:`${t}d:${i}h:${n}m`}getLevelTarget(e){const i=u(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let n=`${d("place",this.language)} ${i}`;return 1===e.LevelTargetType?n+=` ${d("bet",this.language)}`:2===e.LevelTargetType&&(n+=` ${d("bets",this.language)} X ${e.TargetBetCount}`),t("span",{class:"ChallengeLevelTarget"},n)}getLevelBetRangesDetails(e){var i,n,s,o;if(0===e.LevelTargetType){const a=u(null===(i=e.BetRange)||void 0===i?void 0:i.MinBet,this.challenge.CurrencySymbol),r=u(null===(n=e.BetRange)||void 0===n?void 0:n.MaxBet,this.challenge.CurrencySymbol),l=e.LevelContributionPercent+"%",p=!!(null===(s=e.BetRange)||void 0===s?void 0:s.MinBet),c=!!(null===(o=e.BetRange)||void 0===o?void 0:o.MaxBet),h=100!==e.LevelContributionPercent;if(p||c||h)return t("div",{class:"ChallengeLevelBetDetails"},p&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,d("minBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},a)),c&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,d("maxBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},r)),h&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,d("contribution",this.language),": "),t("span",{class:"ChallengeLevelBetContribution"},l)))}}getChallengeLevels(){const e=this.pausedChallengeIds.includes(this.challenge.ChallengeId),i=t=>1===t.ProgressStatus&&!this.isExpiredChallenge&&!e;return t("div",{class:"ChallengeLevels"},this.challenge.LevelProgresses.map(((n,s)=>t("div",{class:"ChallengeLevelCard "+(i(n)?"InProgress":"")},t("casino-engagement-suite-progress-bar",{class:this.device,value:n.ProgressPercentage,"hide-percent":0===n.ProgressPercentage&&!i(n)||100===n.ProgressPercentage,disabled:this.isExpiredChallenge||e},t("span",{slot:"Title",class:"ChallengeLevelTitle"},t("span",null,"Level ",s+1,": "),this.getLevelTarget(n))),t("div",{class:"ChallengeRewardMessage"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg",alt:"win"}),t("span",null,d("win",this.language),": "),t("span",{class:"CustomRewardMessage"},n.CustomRewardMessage)),this.getLevelBetRangesDetails(n)))))}getToggleButton(){return t("div",{class:"ChallengeCollapseButton",onClick:this.toggle},t("span",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,d("details",this.language)))}render(){return t("div",{class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{class:"ChallengeDetails "+(this.challenge.IsNew?"IsNewChallenge":"")},this.getChallengeHeader(),this.getChallengeCountdown(),this.getToggleButton(),this.getChallengeDetails(),this.getChallengeLevels()))}get host(){return n(this)}static get watchers(){return{challenge:["challengePropHandler"]}}};var b,f,x;m.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;900&display=swap"); :host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeActions .ChallengeIconButton{width:16px;height:16px;cursor:pointer}.ChallengeActions .ChallengeIconButton img{width:100%;height:100%}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-23px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:"Montserrat", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-word}.ChallengeJoinButton.Joined::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin:12px 0 24px;color:var(--emw--color-gray-150, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-normal, 700);color:var(--emfe-w-color-white, #FFF)}.ChallengeCollapseButton{margin-bottom:14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emfe-w-color-white, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-webkit-scrollbar-thumb{border-radius:4px;background-color:var(--emw--color-background, #666178)}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:2px;cursor:pointer}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emfe-w-color-white, #FFF)}.ChallengeLevels .InProgress::before{content:"";position:absolute;inset:0;border-radius:8px;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .ChallengeIconButton,.ChallengeDetailsPopup.Desktop .ChallengeIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengeDetailsPopup.Tablet .ChallengeJoinButton,.ChallengeDetailsPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}',function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(b||(b={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(f||(f={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(x||(x={}));const w=["en"],v={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",history:"History",level:"Level",status:"Status",time:"Time",loading:"Loading...",completed:"Completed",expired:"Expired",noHistory:"No missions’ history available (last 30 days)",freeSpins:"Free Spins",luckyWheel:"Lucky Wheel",leaderboard:"Leaderboard",mission:"Mission"}},k=(e,t)=>{const i=t;return v[void 0!==i&&w.includes(i)?i:"en"][e]};function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function F(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function L(e){F(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===y(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function D(e,t){F(2,arguments);var i=L(e).getTime(),n=C(t);return new Date(i+n)}var S={};function B(){return S}function P(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function J(e){return F(1,arguments),e instanceof Date||"object"===y(e)&&"[object Date]"===Object.prototype.toString.call(e)}function T(e){if(F(1,arguments),!J(e)&&"number"!=typeof e)return!1;var t=L(e);return!isNaN(Number(t))}function M(e,t){return F(2,arguments),L(e).getTime()-L(t).getTime()}var E={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function H(e){return e?E[e]:E.trunc}function I(e,t){F(2,arguments);var i=C(t);return D(e,-i)}function z(e){F(1,arguments);var t=1,i=L(e),n=i.getUTCDay(),s=(n<t?7:0)+n-t;return i.setUTCDate(i.getUTCDate()-s),i.setUTCHours(0,0,0,0),i}function R(e){F(1,arguments);var t=L(e),i=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var s=z(n),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var a=z(o);return t.getTime()>=s.getTime()?i+1:t.getTime()>=a.getTime()?i:i-1}function j(e){F(1,arguments);var t=R(e),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var n=z(i);return n}function W(e,t){var i,n,s,o,a,r,l,p;F(1,arguments);var c=B(),d=C(null!==(i=null!==(n=null!==(s=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(r=a.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==s?s:c.weekStartsOn)&&void 0!==n?n:null===(l=c.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=L(e),g=h.getUTCDay(),u=(g<d?7:0)+g-d;return h.setUTCDate(h.getUTCDate()-u),h.setUTCHours(0,0,0,0),h}function A(e,t){var i,n,s,o,a,r,l,p;F(1,arguments);var c=L(e),d=c.getUTCFullYear(),h=B(),g=C(null!==(i=null!==(n=null!==(s=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(r=a.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==s?s:h.firstWeekContainsDate)&&void 0!==n?n:null===(l=h.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(d+1,0,g),u.setUTCHours(0,0,0,0);var m=W(u,t),b=new Date(0);b.setUTCFullYear(d,0,g),b.setUTCHours(0,0,0,0);var f=W(b,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=f.getTime()?d:d-1}function O(e,t){var i,n,s,o,a,r,l,p;F(1,arguments);var c=B(),d=C(null!==(i=null!==(n=null!==(s=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(r=a.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==s?s:c.firstWeekContainsDate)&&void 0!==n?n:null===(l=c.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1),h=A(e,t),g=new Date(0);g.setUTCFullYear(h,0,d),g.setUTCHours(0,0,0,0);var u=W(g,t);return u}function N(e,t){for(var i=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return i+n}var G={G:function(e,t,i){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(e,t,i){if("yo"===t){var n=e.getUTCFullYear();return i.ordinalNumber(n>0?n:1-n,{unit:"year"})}return function(e,t){var i=e.getUTCFullYear(),n=i>0?i:1-i;return N("yy"===t?n%100:n,t.length)}(e,t)},Y:function(e,t,i,n){var s=A(e,n),o=s>0?s:1-s;return"YY"===t?N(o%100,2):"Yo"===t?i.ordinalNumber(o,{unit:"year"}):N(o,t.length)},R:function(e,t){return N(R(e),t.length)},u:function(e,t){return N(e.getUTCFullYear(),t.length)},Q:function(e,t,i){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return N(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,i){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return N(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,i){var n=e.getUTCMonth();switch(t){case"M":case"MM":return function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):N(i+1,2)}(e,t);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,i){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return N(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,i,n){var s=function(e,t){F(1,arguments);var i=L(e),n=W(i,t).getTime()-O(i,t).getTime();return Math.round(n/6048e5)+1}(e,n);return"wo"===t?i.ordinalNumber(s,{unit:"week"}):N(s,t.length)},I:function(e,t,i){var n=function(e){F(1,arguments);var t=L(e),i=z(t).getTime()-j(t).getTime();return Math.round(i/6048e5)+1}(e);return"Io"===t?i.ordinalNumber(n,{unit:"week"}):N(n,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):function(e,t){return N(e.getUTCDate(),t.length)}(e,t)},D:function(e,t,i){var n=function(e){F(1,arguments);var t=L(e),i=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime();return Math.floor((i-n)/864e5)+1}(e);return"Do"===t?i.ordinalNumber(n,{unit:"dayOfYear"}):N(n,t.length)},E:function(e,t,i){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,i,n){var s=e.getUTCDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return N(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});case"eeee":default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,i,n){var s=e.getUTCDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return N(o,t.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});case"cccc":default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,i){var n=e.getUTCDay(),s=0===n?7:n;switch(t){case"i":return String(s);case"ii":return N(s,t.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,i){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,i){var n,s=e.getUTCHours();switch(n=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,i){var n,s=e.getUTCHours();switch(n=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",t){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,i){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return function(e,t){return N(e.getUTCHours()%12||12,t.length)}(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):function(e,t){return N(e.getUTCHours(),t.length)}(e,t)},K:function(e,t,i){var n=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(n,{unit:"hour"}):N(n,t.length)},k:function(e,t,i){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?i.ordinalNumber(n,{unit:"hour"}):N(n,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):function(e,t){return N(e.getUTCMinutes(),t.length)}(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):function(e,t){return N(e.getUTCSeconds(),t.length)}(e,t)},S:function(e,t){return function(e,t){var i=t.length,n=e.getUTCMilliseconds();return N(Math.floor(n*Math.pow(10,i-3)),t.length)}(e,t)},X:function(e,t,i,n){var s=(n._originalDate||e).getTimezoneOffset();if(0===s)return"Z";switch(t){case"X":return _(s);case"XXXX":case"XX":return U(s);case"XXXXX":case"XXX":default:return U(s,":")}},x:function(e,t,i,n){var s=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return _(s);case"xxxx":case"xx":return U(s);case"xxxxx":case"xxx":default:return U(s,":")}},O:function(e,t,i,n){var s=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$(s,":");case"OOOO":default:return"GMT"+U(s,":")}},z:function(e,t,i,n){var s=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$(s,":");case"zzzz":default:return"GMT"+U(s,":")}},t:function(e,t,i,n){return N(Math.floor((n._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,i,n){return N((n._originalDate||e).getTime(),t.length)}};function $(e,t){var i=e>0?"-":"+",n=Math.abs(e),s=Math.floor(n/60),o=n%60;if(0===o)return i+String(s);var a=t||"";return i+String(s)+a+N(o,2)}function _(e,t){return e%60==0?(e>0?"-":"+")+N(Math.abs(e)/60,2):U(e,t)}function U(e,t){var i=t||"",n=e>0?"-":"+",s=Math.abs(e);return n+N(Math.floor(s/60),2)+i+N(s%60,2)}var q=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Y=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Q={p:Y,P:function(e,t){var i,n=e.match(/(P+)(p+)?/)||[],s=n[1],o=n[2];if(!o)return q(e,t);switch(s){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",q(s,t)).replace("{{time}}",Y(o,t))}},X=["D","DD"],V=["YY","YYYY"];function K(e){return-1!==X.indexOf(e)}function Z(e){return-1!==V.indexOf(e)}function ee(e,t,i){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var te={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ie(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth,n=e.formats[i]||e.formats[e.defaultWidth];return n}}var ne={date:ie({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ie({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ie({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},se={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function oe(e){return function(t,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,o=null!=i&&i.width?String(i.width):s;n=e.formattingValues[o]||e.formattingValues[s]}else{var a=e.defaultWidth,r=null!=i&&i.width?String(i.width):e.defaultWidth;n=e.values[r]||e.values[a]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function ae(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var a,r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],p=Array.isArray(l)?le(l,(function(e){return e.test(r)})):re(l,(function(e){return e.test(r)}));a=e.valueCallback?e.valueCallback(p):p,a=i.valueCallback?i.valueCallback(a):a;var c=t.slice(r.length);return{value:a,rest:c}}}function re(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function le(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}var pe,ce={code:"en-US",formatDistance:function(e,t,i){var n,s=te[e];return n="string"==typeof s?s:1===t?s.one:s.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+n:n+" ago":n},formatLong:ne,formatRelative:function(e){return se[e]},localize:{ordinalNumber:function(e){var t=Number(e),i=t%100;if(i>20||i<10)switch(i%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:oe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:oe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:oe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:oe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:oe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(pe={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(pe.matchPattern);if(!i)return null;var n=i[0],s=e.match(pe.parsePattern);if(!s)return null;var o=pe.valueCallback?pe.valueCallback(s[0]):s[0];o=t.valueCallback?t.valueCallback(o):o;var a=e.slice(n.length);return{value:o,rest:a}}),era:ae({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ae({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ae({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ae({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ae({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},de=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,he=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ge=/^'([^]*?)'?$/,ue=/''/g,me=/[a-zA-Z]/;function be(e){var t=e.match(ge);return t?t[1].replace(ue,"'"):e}function fe(e,t){F(2,arguments);var i=L(e),n=L(t);return i.getTime()<n.getTime()}const xe=(e,i,n,s)=>0===e.length?t("p",{class:"HistoryEmptyMessage"},k("noHistory",s)):t("div",{class:"HistoryList"},e.map((e=>t("div",{key:e.ProgressId,class:"HistoryListItem "+(i.includes(e.ProgressId)?"Opened":"Closed")},t("header",{class:"HistoryListItemHeader"},e.Name,t("button",{onClick:n,"data-id":e.ProgressId,class:"HistoryListItemButton"})),t("div",{class:"HistoryListItemBody"},t("div",null,e.Levels.map(((e,i)=>t("div",{class:"HistoryListItemLevelCard"},((e,i,n)=>t("div",{class:"HistoryLevelInfo"},t("span",{class:"Level"},`${k("level",n)} ${i+1}`),t("span",{class:"Status"},k(e.IsCompleted?"completed":"expired",n)),t("span",{class:"Time"},function(e,t,i){var n,s,o,a,r,l,p,c,d,h,g,u,m,b,f,x,w,v;F(2,arguments);var k=String(t),y=B(),D=null!==(n=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:y.locale)&&void 0!==n?n:ce,S=C(null!==(o=null!==(a=null!==(r=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(p=i.locale)||void 0===p||null===(c=p.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==r?r:y.firstWeekContainsDate)&&void 0!==a?a:null===(d=y.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var J=C(null!==(g=null!==(u=null!==(m=null!==(b=null==i?void 0:i.weekStartsOn)&&void 0!==b?b:null==i||null===(f=i.locale)||void 0===f||null===(x=f.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:y.weekStartsOn)&&void 0!==u?u:null===(w=y.locale)||void 0===w||null===(v=w.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==g?g:0);if(!(J>=0&&J<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!D.localize)throw new RangeError("locale must contain localize property");if(!D.formatLong)throw new RangeError("locale must contain formatLong property");var M=L(e);if(!T(M))throw new RangeError("Invalid time value");var E=I(M,P(M)),H={firstWeekContainsDate:S,weekStartsOn:J,locale:D,_originalDate:M};return k.match(he).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Q[t])(e,D.formatLong):e})).join("").match(de).map((function(n){if("''"===n)return"'";var s=n[0];if("'"===s)return be(n);var o=G[s];if(o)return null!=i&&i.useAdditionalWeekYearTokens||!Z(n)||ee(n,t,String(e)),null!=i&&i.useAdditionalDayOfYearTokens||!K(n)||ee(n,t,String(e)),o(E,n,D.localize,H);if(s.match(me))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return n})).join("")}(new Date(e.Time),"LLL d, yyyy HH:mm:ss"))))(e,i,s),e.Rewards&&((e,i)=>t("div",{class:"HistoryRewardsList"},t("img",{class:"HistoryRewardsIcon",src:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg",alt:"Reward"}),Object.values(e.Rewards).map((e=>((e,i)=>{const n=e.Type===b.Custom,s=n?e.RewardDescription:((e,t)=>{switch(e){case 0:return k("freeSpins",t);case 1:return k("luckyWheel",t);case 2:return k("leaderboard",t);case 3:return k("mission",t)}})(e.Type,i);return t("div",{class:"HistoryRewardsItem "+(n||e.IsRewarded||n?"IsRewarded":"IsNotRewarded")},t("span",{class:"HistoryRewardsItemName"},s),!n&&t("div",{class:"HistoryRewardStatusIcon"}))})(e,i)))))(e,s)))))))))),we=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.pausedChallengeIds=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.activeTab=1,this.historyLoading=!1,this.openedHistoryIds=[],this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),2===this.activeTab&&this.sendHistoryRequest()},this.toggleChallengeHistory=e=>{const t=e.currentTarget.getAttribute("data-id"),i=this.openedHistoryIds.findIndex((e=>e===t));i>-1?this.openedHistoryIds.splice(i,1):this.openedHistoryIds.push(t),this.openedHistoryIds=[...this.openedHistoryIds]},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1,this.resetNewChallengeLabel.emit("list")},this.handleChallengeClick=e=>{const t=e.currentTarget.getAttribute("data-id");window.postMessage({type:"ChallengeClick",id:t})},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.changeChallengeStatus=e=>{var t,i;e.stopPropagation();const n=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(n))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:n}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:n,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:n}})}}handleEvent(e){const{type:t}=null==e?void 0:e.data;"ChallengesHistoryResponse"===t&&(this.challengesHistory=e.data.data,this.historyLoading=!1)}challengesPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.challengesPropHandler(this.challenges)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}sendHistoryRequest(){this.historyLoading=!0,window.postMessage({type:"ChallengesHistoryRequest"})}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.challenges.filter((e=>e.Status!==x.Expired)).reduce(((t,i)=>{const n=new Date(i.ExpirationTime).getTime()-e;let s="00h:00m:00s";if(n<1)this.removeChallenge(i.Id);else{const{days:e,hours:t,minutes:i,seconds:o}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};s="00"===e?`${t}h:${i}m:${o}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:s})}),{})}removeChallenge(e){const t=this.challenges.findIndex((t=>t.Id===e));t>-1&&(this.challenges.splice(t,1),window.postMessage({type:"ChallengeHasExpired",id:e}))}getChallengeClasses(e){return{ChallengeCard:!0,InProgress:e.Status===x.InProgress&&!this.pausedChallengeIds.includes(e.ChallengeId),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===x.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.ChallengeId)}isChallengeCompleted(e){return e.Status===x.Completed||e.Status===x.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===x.Completed)return 100;if(this.isChallengePaused(e)||e.Status===x.PendingLevelReward||e.Status===x.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===f.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===f.Fillup||e.ProgressStatus===f.Completed)).slice(-1)[0];return t?t.ProgressPercentage:i?i.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:i}=e,n=e.Status===x.InProgress||e.Status===x.PendingLevelReward;return t("div",{class:"ChallengeCardHeader"},t("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),e.Status!==x.Completed?t("button",{class:`${n?"ChallengeJoinButton Joined":"ChallengeJoinButton"} ${this.isJoiningToChallenge||this.pausedChallengeIds.includes(e.ChallengeId)?"Disabled":""}`,onClick:this.changeChallengeStatus,"data-id":i},k(n?"unjoin":"join",this.language)):null)}getChallengeTemplate(e){const i=this.getChallengeProgress(e),n=this.timers[e.Id],s=i>-1?t("casino-engagement-suite-progress-bar",{class:this.device,value:i,disabled:this.isChallengePaused(e)},t("span",{slot:"Title",class:"ChallengeCountdown"},n)):t("span",{class:"ChallengeCountdown"},n);return t("div",{class:this.getChallengeClasses(e),onClick:this.handleChallengeClick,key:e.Id,"data-id":e.Id},this.getChallengeHeaderTemplate(e),s,t("div",{class:"ChallengeLabel "+(e.IsNew?"ShowChallengeLabel":"")},t("span",null,k("new",this.language))))}getHeaderTemplate(){return t("header",{class:"ChallengesListPopupHeader"},t("button",{onClick:this.showTooltip,class:"ChallengesIconButton"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),t("div",{class:"ChallengesListPopupHeaderName"},k("missions",this.language)),t("button",{class:"ChallengesIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close missions list"})))}getListTabTemplate(){return this.challenges.length?t("div",{class:"ChallengesListWrapper"},t("div",{class:"ChallengesList"},this.challenges.map((e=>this.getChallengeTemplate(e))))):t("div",{class:"ChallengesListEmpty"},t("h2",null,k("noMissions",this.language)),t("p",null,k("tryOtherGames",this.language)))}getTooltipTemplate(){return t("div",{class:"ChallengesTooltipBackdrop"},t("div",{class:"ChallengesTooltip"},t("button",{class:"ChallengesIconButton",onClick:this.hideTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),k("tooltip",this.language)))}getHistoryTabTemplate(){return t("div",{class:"HistoryWrapper"},t("div",{class:"HistoryCols"},t("div",{class:"HistoryColName Level"},k("level",this.language)),t("div",{class:"HistoryColName Status"},k("status",this.language)),t("div",{class:"HistoryColName Time"},k("time",this.language))),this.historyLoading?(e=this.language,t("div",{class:"HistoryLoader"},t("casino-engagement-suite-progress-bar",{indeterminate:!0}),t("span",null,k("loading",e)))):xe(this.challengesHistory,this.openedHistoryIds,this.toggleChallengeHistory,this.language));var e}getTabsTemplate(){return t("div",{class:"TabsWrapper"},t("div",{class:"Tabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"Tab "+(1===this.activeTab?"Active":"")},k("missions",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"Tab "+(2===this.activeTab?"Active":"")},k("history",this.language))))}getTabsContentTemplate(){return 1===this.activeTab?this.getListTabTemplate():this.getHistoryTabTemplate()}render(){return t("div",{class:`ChallengesListPopup ${this.device}`},this.getHeaderTemplate(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{challenges:["challengesPropHandler"]}}};function ve(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i}var ke,ye;function Ce(){return window.screen.orientation.type.includes("portrait")?"Portrait":"Landscape"}we.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesIconButton{width:16px;height:16px;cursor:pointer}.ChallengesIconButton img{width:100%;height:100%}.ChallengesListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:12px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.ChallengeJoinButton.Joined::before,.ChallengeCard.InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:20px;line-height:24px;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:12px;line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:10px;line-height:10px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengesTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.ChallengesTooltipBackdrop .ChallengesTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.ChallengesTooltipBackdrop .ChallengesTooltip .ChallengesIconButton{top:12px;right:6px;position:absolute}.Tabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.TabsWrapper{padding:0 20px;margin:8px 0}.TabsWrapper .Tabs{display:flex;position:relative}.TabsWrapper .Tabs .Tab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.TabsWrapper .Tabs .Tab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-x-small, 14px);color:var(--emw--color-gray-100, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-100, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-primary, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemButton{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .HistoryListItemButton{transition:transform 0.3s ease-out;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 0}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-100, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:70px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Time{flex-grow:1;text-align:right}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardStatusIcon,.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem .HistoryRewardStatusIcon{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-background, #666178)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded .HistoryRewardStatusIcon{background-image:url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:16px;line-height:16px}.ChallengesListPopup.Tablet .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengesListEmpty,.ChallengesListPopup.Desktop .ChallengesListEmpty{padding:40px 65px}.ChallengesListPopup.Tablet .ChallengesListEmpty h2,.ChallengesListPopup.Desktop .ChallengesListEmpty h2{margin-bottom:32px;font-size:var(--emw--size-large, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-small, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengesListPopup.Tablet .ChallengeJoinButton,.ChallengesListPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:14px;line-height:14px}.ChallengesListPopup.Tablet .ChallengesTooltip,.ChallengesListPopup.Desktop .ChallengesTooltip{padding:60px 65px;font-size:16px;line-height:20px}.ChallengesListPopup.Tablet .ChallengesTooltip .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesTooltip .ChallengesIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .TabsWrapper,.ChallengesListPopup.Desktop .TabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .TabsWrapper .Tabs .Tab,.ChallengesListPopup.Desktop .TabsWrapper .Tabs .Tab{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-small, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols{gap:15px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:17px 5px;font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemButton,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemButton{width:24px;height:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-small, 16px);gap:70px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:80px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon{height:24px;flex-basis:24px}',"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(ke||(ke={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(ye||(ye={}));const Fe=class{constructor(t){e(this,t),this.openModal=i(this,"openModal",7),this.closeModal=i(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.orientation="Landscape",this.device="Mobile",this.showChallengesList=!1,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showFreeSpinsDetails=!1,this.showJackpotDetails=!1,this.showLeaderboardWidget=!1,this.highlightChallenge=!1,this.limitStylingAppends=!1,this.jackpots=[],this.gameSlug="",this.pausedChallengeIds=[],this.isChallengeLabel=!1,this.isForfeitedSpinsLabel=!1,this.isJoiningToChallenge=!1,this.barHeight=0,this.handlePopupClose=(e,t)=>()=>{this[e]=!1,this[t]=!1,this.activeWidget=""},this.handleJackpotsPopupClose=()=>{this.showJackpotsList=!1,this.showJackpotDetails=!1,this.activeWidget=""},this.handleChallengePopupBack=()=>{this.showChallengeDetails=!1,this.showChallengesList=!0},this.handleResetNewChallengeLabel=e=>{if(this.challenges){if("list"===e.detail)this.challenges.forEach((e=>e.IsNew=!1)),this.isChallengeLabel=!1;else{const t=this.challenges.find((t=>t.Id===e.detail));t&&(t.IsNew=!1)}this.challenges=[...this.challenges]}},this.handleJackpotPopupBack=()=>{this.showJackpotDetails=!1,this.showJackpotsList=!0},this.orientationChangeHandler=()=>{this.orientation=Ce(),this.barHeight=this.barWrapperEl.offsetHeight},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.jackpotChangeStatusRequest=e=>{e.stopPropagation();const t=e.currentTarget.getAttribute("data-id");if(this.jackpots=this.jackpots.map((e=>String(t)===String(e.JackpotId)?Object.assign(Object.assign({},e),{Pending:!0}):e)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}const i=this.jackpots.reduce(((e,t)=>(e[t.JackpotId]=t.Pending?!t.Enabled:t.Enabled,e)),{});window.postMessage({type:"JackpotChangeStatusRequest",data:i})},this.onLeaderboardsClose=()=>{this.showLeaderboardWidget=!1,this.activeWidget=""}}handleEvent(e){const t=null==e?void 0:e.data,{type:i}=t,n=ve(t,["type"]);switch(i){case"ChallengeGrant":{const t=e.data.data.challengeProgressData[0],i=this.challenges.findIndex((e=>function(e,t,i){F(2,arguments);var n=M(e,t)/1e3;return H(null==i?void 0:i.roundingMethod)(n)}(new Date(e.ExpirationTime),new Date(t.ExpirationTime))>0));i>-1?this.challenges.splice(i,0,t):this.challenges.push(t),this.challenges=[...this.challenges],this.isChallengeLabel=!0;break}case"ForfeitCampaign":{const t=e.data.data.toString();this.freeSpins.VendorFreeSpins.find((e=>e.Id===t)).IsForfeited=!0,this.freeSpins.VendorFreeSpins=[...this.freeSpins.VendorFreeSpins],this.isForfeitedSpinsLabel=!0;break}case"ChallengeHasExpired":this.setChallengePercent();break;case"BarLeaderboardsClick":this.showLeaderboardWidget=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.activeWidget="Leaderboards";break;case"BarChallengesClick":this.showChallengesList=!0,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="Challenges",this.isChallengeLabel=!1;break;case"BarFreeSpinsClick":this.showFreeSpinsList=!0,this.showChallengesList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.isForfeitedSpinsLabel=!1,this.activeWidget="FreeSpins";break;case"BarJackpotsClick":this.showJackpotsList=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="Jackpots";break;case"ChallengeClick":this.selectedChallengeId=e.data.id,this.selectedChallenge=this.challenges.find((e=>e.Id===this.selectedChallengeId)),this.isChallengeLabel=!1,this.showChallengesList=!1,this.showChallengeDetails=!0;break;case"FreeSpinClick":this.selectedSpinId=e.data.id,this.selectedSpin=this.freeSpins.VendorFreeSpins.find((e=>e.Id===this.selectedSpinId)),this.isForfeitedSpinsLabel=!1,this.showFreeSpinsList=!1,this.showFreeSpinsDetails=!0;break;case"JackpotClick":this.selectedJackpotId=e.data.id,this.selectedJackpot=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId)),this.showJackpotsList=!1,this.showJackpotDetails=!0;break;case"UpdateChallengeProgress":this.updateChallengeProgress(e.data.data);break;case"ChallengeChangeStatusNotification":{const{IsEnabled:t,ChallengeId:i}=e.data.data;this.pausedChallengeIds=t||this.pausedChallengeIds.includes(i)?this.pausedChallengeIds.filter((e=>e!==i)):[...this.pausedChallengeIds,i];break}case"ShowChallengeRewardModal":{const{ChallengeId:e,LevelId:t,HasError:i,ProcessedRewards:s}=n.data,o={modalType:(null==s?void 0:s.length)?"REWARD_MODAL":"SUPPORT_MODAL",rewardMessage:this.getRewardMessage(e,t),hasError:i};this.openModal.emit(o);break}case"ShowConfirmationModal":this.openModal.emit({modalType:"TARGET_MODAL",confirmationData:n});break;case"ChallengeJoinRequest":this.isJoiningToChallenge=!0;break;case"JoinChallengeResult":{const{Success:t,JoinId:i,UnjoinId:n}=e.data.data;if(t){i&&this.updateChallengeStatus(i,1,!0),n&&this.updateChallengeStatus(n,0,!1),this.challenges=[...this.challenges];const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));this.selectedChallenge=Object.assign({},e)}this.isJoiningToChallenge=!1,this.closeModal.emit("TARGET_MODAL"),this.setChallengePercent();break}case"ShowJackpotRewardModal":{const{Amount:t,Currency:i}=e.data.data;this.openModal.emit({modalType:"JACKPOT_REWARD_MODAL",winAmount:{amount:t,currency:i}});break}case"UpdateJackpotBalance":this.updateJackpotBalance(e.data.data);break;case"UpdateJackpotStatus":this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":this.joinJackpotResult(e.data.data)}}componentDidLoad(){this.orientation=Ce(),this.device=function(){const e=navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("android")?"Mobile":e.includes("ipad")?"Tablet":"Desktop"}(),window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),this.barHeight=this.barWrapperEl.offsetHeight}disconnectedCallback(){window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}async init(e){var t;this.challenges=e.challenges,this.inProgressChallenges=null===(t=e.challenges)||void 0===t?void 0:t.filter((e=>e.Status===ye.InProgress||e.Status===ye.PendingLevelReward)).map((e=>e.Id)),this.leaderboards=e.leaderboards,this.jackpots=e.jackpots||[],this.freeSpins=e.freeSpins,this.gameSlug=e.slug,this.setChallengePercent(),this.setChallengeLabel(),this.setSpinsForfeitedLabel()}setChallengeLabel(){this.challenges&&(this.isChallengeLabel=!!this.challenges.filter((e=>e.IsNew)).length)}setSpinsForfeitedLabel(){var e;this.freeSpins&&(this.isForfeitedSpinsLabel=!!(null===(e=this.freeSpins.VendorFreeSpins)||void 0===e?void 0:e.filter((e=>e.IsForfeited)).length))}setChallengePercent(){if(!this.challenges)return;this.highlightChallenge=!1;const e=this.challenges.find((e=>e.Status===ye.InProgress));if(e){const t=e.LevelProgresses.find((e=>e.ProgressStatus===ke.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===ke.Fillup||e.ProgressStatus===ke.Completed)).slice(-1)[0];this.highlightChallenge=e.LevelProgresses.every((e=>100===e.ProgressPercentage)),this.challengePercent=t?`${t.ProgressPercentage}%`:i?`${i.ProgressPercentage}%`:"0%"}else this.challengePercent="—"}updateChallengeProgress(e){var t;const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.ChallengeId===e.ChallengeId));if(i&&(e.Status===ye.Completed&&(i.Status=e.Status,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))]),i.LevelProgresses=i.LevelProgresses.map((t=>{var i;const n=null===(i=e.Levels)||void 0===i?void 0:i.find((e=>e.LevelId===t.LevelId));return n?Object.assign(Object.assign({},t),{ProgressPercentage:n.ProgressPercentage,ProgressStatus:n.ProgressStatus}):t})),this.challenges=[...this.challenges]),this.showChallengeDetails){const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));e&&(this.selectedChallenge=Object.assign({},e))}this.setChallengePercent()}updateChallengeStatus(e,t,i){var n;const s=null===(n=this.challenges)||void 0===n?void 0:n.find((t=>t.Id===e));s&&(s.Status=t,this.inProgressChallenges=i?[...this.inProgressChallenges,s.Id]:this.inProgressChallenges.filter((e=>e!==s.Id)))}updateJackpotBalance(e){if(this.jackpots=this.jackpots.map((t=>{const i=e.find((e=>e.JackpotId===t.JackpotId));return i?Object.assign(Object.assign({},t),{Balance:i.Balance,WinBalance:i.WinBalance}):t})),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}updateJackpotStatus(e){if(this.jackpots=this.jackpots.map((t=>String(t.JackpotId)===String(e.JackpotId)?Object.assign(Object.assign({},t),{IsClosed:e.IsClosed,JackpotEndTime:e.JackpotEndTime,Reason:e.Reason}):t)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}joinJackpotResult(e){if(e.Success){const t=Object.keys(e.JackpotIds);if(t.length>0&&(this.jackpots=this.jackpots.map((i=>{const n=t.find((e=>String(e)===String(i.JackpotId)));return n?Object.assign(Object.assign(Object.assign({},i),i.Enabled!==e.JackpotIds[n]&&{Pending:!1}),{Enabled:e.JackpotIds[n]}):i}))),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}}getChallengesWidgets(){return t("div",null,t("div",{class:this.showChallengesList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-challenges-list",{device:this.device,class:"CasinoEngagementSuiteDialog",onResetNewChallengeLabel:this.handleResetNewChallengeLabel,onClose:this.handlePopupClose("showChallengesList","showChallengeDetails"),challenges:this.challenges,inProgressChallenges:this.inProgressChallenges,isJoiningToChallenge:this.isJoiningToChallenge,pausedChallengeIds:this.pausedChallengeIds})),t("div",{class:this.showChallengeDetails?"Backdrop Opened":"Backdrop"},this.showChallengeDetails&&t("casino-engagement-suite-challenges-details",{device:this.device,class:"CasinoEngagementSuiteDialog",onResetNewChallengeLabel:this.handleResetNewChallengeLabel,onBack:this.handleChallengePopupBack,onClose:this.handlePopupClose("showChallengesList","showChallengeDetails"),"game-slug":this.gameSlug,challenge:this.selectedChallenge,inProgressChallenges:this.inProgressChallenges,isJoiningToChallenge:this.isJoiningToChallenge,pausedChallengeIds:this.pausedChallengeIds})))}getLeaderboardsWidgets(){return t("div",{class:this.showLeaderboardWidget?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-tournament",{class:"CasinoEngagementSuiteDialog",leaderboardsInit:this.leaderboards,onClose:this.onLeaderboardsClose}))}getFreeSpinWidgets(){return t("div",null,t("div",{class:this.showFreeSpinsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-free-spins-list",{device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),freeSpins:this.freeSpins.VendorFreeSpins})),t("div",{class:this.showFreeSpinsDetails?"Backdrop Opened":"Backdrop"},this.showFreeSpinsDetails&&t("casino-engagement-suite-free-spins-details",{device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleChallengePopupBack,onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),"game-slug":this.gameSlug,spin:this.selectedSpin})))}getJackpotsWidgets(){return t("div",null,t("div",{class:this.showJackpotsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-jackpots-list",{device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handleJackpotsPopupClose,jackpots:this.jackpots,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})),this.showJackpotDetails&&t("div",{class:"Backdrop Opened"},t("casino-engagement-suite-jackpot-details",{device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleJackpotPopupBack,onClose:this.handleJackpotsPopupClose,"game-slug":this.gameSlug,jackpot:this.selectedJackpot,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})))}getRewardMessage(e,t){var i,n,s,o;return(null===(o=null===(s=null===(n=null===(i=this.challenges)||void 0===i?void 0:i.find((t=>t.Id===e)))||void 0===n?void 0:n.LevelProgresses)||void 0===s?void 0:s.find((e=>e.LevelId===t)))||void 0===o?void 0:o.CustomRewardMessage)||""}render(){return t("div",{class:`CasinoEngagementSuiteContainer ${this.device} ${this.orientation}`,style:{"--barHeight":`${this.barHeight}px`}},t("div",{class:"barWrapper",ref:e=>this.barWrapperEl=e},t("casino-engagement-suite-bar",{orientation:this.orientation,device:this.device,"active-widget":this.activeWidget,"is-challenge-label":this.isChallengeLabel,"is-spin-forfeited-label":this.isForfeitedSpinsLabel,leaderboards:this.leaderboards,jackpots:this.jackpots,freeSpins:this.freeSpins,highlightChallenge:this.highlightChallenge,"challenge-percent":this.challengePercent})),this.challenges&&this.getChallengesWidgets(),this.freeSpins&&this.getFreeSpinWidgets(),!!this.jackpots.length&&this.getJackpotsWidgets(),this.leaderboards&&this.getLeaderboardsWidgets(),t("casino-engagement-suite-modal-container",{device:this.device,isJoiningToChallenge:this.isJoiningToChallenge}))}get host(){return n(this)}};Fe.style=":host{display:inline-block;font-family:inherit}.Backdrop{padding:20px 20px 20px 172px;display:none;position:fixed;inset:0;height:100dvh;width:100vw}.Backdrop.Opened{display:block}.Backdrop .CasinoEngagementSuiteDialog{height:calc(100dvh - 40px);max-width:600px}.CasinoEngagementSuiteContainer.Portrait{width:100vw}.CasinoEngagementSuiteContainer.Portrait .Backdrop{padding:calc(var(--barHeight) + 12px) 0 20px}.CasinoEngagementSuiteContainer.Portrait .Backdrop .CasinoEngagementSuiteDialog{max-width:initial;padding:0 4px;margin:0 auto;height:calc(100dvh - (var(--barHeight) + 20px))}.CasinoEngagementSuiteContainer.Landscape.Mobile .CasinoEngagementSuiteDialog{max-width:366px}.CasinoEngagementSuiteContainer.Landscape.Desktop .Backdrop{padding-left:272px}";const Le=["en"],De={en:{freeSpins:"Free Spins",details:"Free Spins Details",tc:"Terms & Conditions",quantityGranted:"Quantity Granted",quantityLeft:"Quantity Left",valueGranted:"Value Granted",valueLeft:"Value Left",info:"Info",games:"Games",loadMore:"Load More"}},Se=(e,t)=>{const i=t;return De[void 0!==i&&Le.includes(i)?i:"en"][e]},Be=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.activeTab=1,this.visibleGames=[],this.maxVisibleGames=0,this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),this.visibleGames=[],this.maxVisibleGames=0},this.handleLoadMore=()=>{this.visibleGames=this.spin.GamesInfo.slice(0,this.visibleGames.length+this.maxVisibleGames)},this.toggleShowDetails=()=>{this.showDetails=!this.showDetails},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()}}componentWillLoad(){this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,t),this.visibleGames=this.spin.GamesInfo.slice(0,this.maxVisibleGames)}getActionsTemplate(){return t("header",{class:"FreeSpinsActions"},t("button",{class:"FreeSpinsIconButton",onClick:this.handleBackClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),"Mobile"!==this.device&&t("div",{class:"FreeSpinsPopupName"},Se("freeSpins",this.language)),t("button",{class:"FreeSpinsIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getFreeSpinsHeader(){const{VendorName:e,NumberOfFreeSpins:i,NumberOfUsedFreeSpins:n}=this.spin;return t("div",{class:"FreeSpinsDetailsHeader"},t("span",{class:"FreeSpinsName"},e),t("div",{class:"FreeSpinsCounter"},t("div",{class:"FreeSpinsHighlightedCounter"},n),"/",i))}getFreeSpinsCountdown(){const e=this.isExpiredChallenge?"Expired":this.timer,{VendorFreeSpinsCost:i,VendorFreeSpinsRemainingCost:n,CurrencySymbol:s}=this.spin;return t("div",{class:"FreeSpinsCountdown "+(this.isExpiredChallenge?"Expired":"")},e,t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},s,n),"/",s,i))}getTabsTemplate(){return t("div",{class:"FreeSpinsDetailsTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"FreeSpinsDetailsTab "+(1===this.activeTab?"Active":"")},Se("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"FreeSpinsDetailsTab "+(2===this.activeTab?"Active":"")},Se("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getSpinInfoTemplate():this.getGamesTemplate()}getSpinsDetailsTemplate(){return t("div",null,t("div",{class:"FreeSpinsDetailsButton",onClick:this.toggleShowDetails},t("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,Se("details",this.language))),this.showDetails&&t("p",{class:"FreeSpinsDescription"},this.spin.FreeSpinCampaignPresentation.Description))}getSpinInfoTemplate(){const{NumberOfFreeSpins:e,NumberOfUsedFreeSpins:i,VendorFreeSpinsCost:n,CurrencySymbol:s,VendorFreeSpinsRemainingCost:o}=this.spin;return t("div",null,this.spin.FreeSpinCampaignPresentation.Description&&this.getSpinsDetailsTemplate(),t("div",{class:"FreeSpinsInfo"},t("div",{class:"FreeSpinsInfoItem"},Se("quantityGranted",this.language),": ",t("span",null,e)),t("div",{class:"FreeSpinsInfoItem"},Se("quantityLeft",this.language),": ",t("span",null,i)),t("div",{class:"FreeSpinsInfoItem"},Se("valueGranted",this.language),": ",t("span",null,s,n)),t("div",{class:"FreeSpinsInfoItem"},Se("valueGranted",this.language),": ",t("span",null,s,o)),this.spin.FreeSpinCampaignPresentation.Url&&t("div",{class:"FreeSpinsInfoItem"},t("a",{class:"tc",href:this.spin.FreeSpinCampaignPresentation.Url,target:"_blank"},Se("tc",this.language)))))}getGamesTemplate(){const e=this.visibleGames.map((e=>t("div",{onClick:this.onGameClick,class:"FreeSpinsGamesListItem "+(e.GameSlug===this.gameSlug?"Disabled":""),key:e.CasinoGameId,"data-slug":e.GameSlug,style:{background:`center / cover url(${e.GameIcon}) no-repeat`},title:e.GameName})));return[t("div",{class:"FreeSpinsGamesListWrapper",ref:e=>this.gamesListWrapperEl=e},t("div",{class:"FreeSpinsGamesList"},e)),this.visibleGames.length<this.spin.GamesInfo.length?t("button",{class:"PopupButton Active FreeSpinsGamesButton",onClick:this.handleLoadMore},Se("loadMore",this.language)):""]}startCountdown(){this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.spin.ExpiryDate).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:n,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${s}s`:`${t}d:${i}h:${n}m`}render(){return t("div",{class:`FreeSpinsDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{class:"FreeSpinsDetails"},this.getFreeSpinsHeader(),this.getFreeSpinsCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate()))}get host(){return n(this)}};Be.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;900&display=swap"); :host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.FreeSpinsDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.FreeSpinsDetailsPopup.Disabled .FreeSpinsDetailsHeader{opacity:0.5}.FreeSpinsDetailsPopup.Disabled .FreeSpinsDetailsTabs{cursor:default;pointer-events:none}.FreeSpinsDetailsPopup.Disabled .FreeSpinsInfoItem{color:var(--emw--color-primary, #8F8B9C)}.FreeSpinsDetails{overflow:hidden;height:100%;display:flex;flex-direction:column}.FreeSpinsActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsActions .FreeSpinsIconButton{width:16px;height:16px;cursor:pointer}.FreeSpinsActions .FreeSpinsPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small-plus, 16px);font-weight:500;line-height:16px}.FreeSpinsDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.FreeSpinsDetails::-webkit-scrollbar{display:none}.FreeSpinsDetailsHeader{display:flex;justify-content:space-between;gap:12px;min-width:0;align-items:flex-end}.FreeSpinsDetailsHeader .FreeSpinsName{font-family:"Montserrat", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-all;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.PopupButton{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.PopupButton.Active{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.PopupButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.PopupButton.Loading{opacity:0.5;pointer-events:none}.FreeSpinsGamesLoadMore::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.FreeSpinsCountdown{display:flex;justify-content:space-between;font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin:12px 0 24px;color:var(--emw--color-gray-150, #BBB9C3)}.FreeSpinsHighlightedCounter{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:var(--emw--font-size-medium, 18px);font-weight:800;margin-right:4px}.FreeSpinsCounter{display:flex;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:700;margin-right:4px}.FreeSpinsCountdown.Expired{font-weight:var(--emw--font-weight-normal, 700);color:var(--emfe-w-color-white, #FFF)}.FreeSpinsDetailsTabs{margin:20px 0 12px;display:flex;position:relative}.FreeSpinsDetailsTabs .FreeSpinsDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.FreeSpinsDetailsTabs .FreeSpinsDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.FreeSpinsDetailsTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.FreeSpinsInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.FreeSpinsInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.FreeSpinsInfoItem .tc{color:var(--emw--color-primary, #59D1FF)}.FreeSpinsDetailsButton{margin-bottom:14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.FreeSpinsDetailsButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.FreeSpinsDetailsButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.FreeSpinsDetailsButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.FreeSpinsDescription{margin-bottom:20px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.FreeSpinsGamesListWrapper{overflow:auto;flex-grow:1}.FreeSpinsGamesList{display:flex;gap:10px;flex-wrap:wrap}.FreeSpinsGamesList .FreeSpinsGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.FreeSpinsGamesList .FreeSpinsGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ShowDetails{display:block}.FreeSpinsGamesButton{margin-top:12px;align-self:center;min-width:140px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsActions,.FreeSpinsDetailsPopup.Desktop .FreeSpinsActions{padding-top:16px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsIconButton,.FreeSpinsDetailsPopup.Desktop .FreeSpinsIconButton{width:24px;height:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsDetails,.FreeSpinsDetailsPopup.Desktop .FreeSpinsDetails{padding:20px 24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsName,.FreeSpinsDetailsPopup.Desktop .FreeSpinsName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.FreeSpinsDetailsPopup.Tablet .FreeSpinsCountdown,.FreeSpinsDetailsPopup.Desktop .FreeSpinsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsCollapseButton,.FreeSpinsDetailsPopup.Desktop .FreeSpinsCollapseButton{margin-bottom:12px}.FreeSpinsDetailsPopup.Tablet .PopupButton,.FreeSpinsDetailsPopup.Desktop .PopupButton{min-height:36px;font-size:var(--emw--font-size-small-plus, 16px)}';const Pe=["en"],Je={en:{freeSpins:"Free Spins",tooltip:"Spin the game reels without using your own money",noSpins:"No FreeSpins yet\n",tryOtherGames:"Try winning FreeSpins as rewards or playing other booster games",new:"new",forfeited:"The campaign has been canceled.",support:"Please, contact support."}},Te=(e,t)=>{const i=t;return Je[void 0!==i&&Pe.includes(i)?i:"en"][e]},Me=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.freeSpins=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newSpinIds=[],this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1,this.newSpinIds=[]},this.handleSpinClick=e=>{const t=e.currentTarget.getAttribute("data-id");window.postMessage({type:"FreeSpinClick",id:t}),this.newSpinIds=this.newSpinIds.filter((e=>e!==t))},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1}}spinsPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.spinsPropHandler(this.freeSpins)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.freeSpins.reduce(((t,i)=>{const n=new Date(i.ExpiryDate).getTime()-e;let s="00h:00m:00s";if(n<1)this.removeFreeSpin(i.Id);else{const{days:e,hours:t,minutes:i,seconds:o}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};s="00"===e?`${t}h:${i}m:${o}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:s})}),{})}removeFreeSpin(e){const t=this.freeSpins.findIndex((t=>t.Id===e));t>-1&&(this.freeSpins.splice(t,1),window.postMessage({type:"FreeSpinHasExpired",id:e}))}getFreeSpinClasses(e){return{FreeSpinsCard:!0,Forfeited:e.IsForfeited}}getChallengeHeaderTemplate(e){const{VendorName:i,NumberOfUsedFreeSpins:n,NumberOfFreeSpins:s,IsForfeited:o}=e;return t("div",{class:"FreeSpinsCardHeader"},t("div",{class:"FreeSpinsName "+(o?"Forfeited":"")},i),o?null:t("div",{class:"FreeSpinsCounter"},t("div",{class:"FreeSpinsHighlightedCounter"},n),"/",s))}getFreeSpinTemplate(e){const i=this.timers[e.Id],{VendorFreeSpinsRemainingCost:n,VendorFreeSpinsCost:s,CurrencySymbol:o,IsForfeited:a}=e,r=this.newSpinIds.includes(e.Id);return t("div",{class:this.getFreeSpinClasses(e),onClick:this.handleSpinClick,key:e.Id,"data-id":e.Id},a?null:t("div",{class:"SpinLabel "+(r?"ShowSpinLabel":"")},t("span",null,Te("new",this.language))),this.getChallengeHeaderTemplate(e),a?t("div",{class:"ForfeitedMessage"},t("div",null,Te("forfeited",this.language)),t("div",null,Te("support",this.language))):t("div",{class:"FreeSpinsCountdownWrapper"},t("span",{class:"FreeSpinsCountdown"},i),";",t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},o,n),"/",o,s)))}getHeaderTemplate(){return t("header",{class:"FreeSpinsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"FreeSpinsIconButton"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),t("div",{class:"FreeSpinsListPopupHeaderName"},Te("freeSpins",this.language)),t("button",{class:"FreeSpinsIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close challenges list"})))}getListTemplate(){return this.freeSpins.length?t("div",{class:"FreeSpinsListWrapper"},t("div",{class:"FreeSpinsList"},this.freeSpins.map((e=>this.getFreeSpinTemplate(e))))):t("div",{class:"FreeSpinsListEmpty"},t("h2",null,Te("noSpins",this.language)),t("p",null,Te("tryOtherGames",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"FreeSpinsTooltipBackdrop"},t("div",{class:"FreeSpinsTooltip"},t("button",{class:"FreeSpinsIconButton",onClick:this.hideTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),Te("tooltip",this.language))):""}render(){return t("div",{class:`FreeSpinsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{freeSpins:["spinsPropHandler"]}}};Me.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.FreeSpinsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.FreeSpinsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsIconButton{width:16px;height:16px;cursor:pointer}.FreeSpinsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.FreeSpinsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.FreeSpinsListWrapper::-webkit-scrollbar{display:none}.FreeSpinsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.FreeSpinsRowWrapper{display:flex;justify-content:space-between;min-width:0}.FreeSpinsCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.FreeSpinsCard.Forfeited{cursor:auto;pointer-events:none}.FreeSpinsCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px;flex:1;min-width:0;align-items:flex-end}.FreeSpinsName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.FreeSpinsName.Forfeited{color:var(--emw--color-primary, #8F8B9C)}.FreeSpinsCounter{display:flex;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsHighlightedCounter{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:var(--emw--font-size-medium, 18px);font-weight:800;margin-right:4px}.FreeSpinsListEmpty{padding:20px 32px}.FreeSpinsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.FreeSpinsListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.FreeSpinsCountdownWrapper{display:flex;justify-content:space-between;align-items:flex-start}.FreeSpinsCountdown,.ForfeitedMessage{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ForfeitedMessage{line-height:1.2}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:700;margin-right:4px}.SpinLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.SpinLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-x-small, 10px);line-height:10px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowSpinLabel{display:inline-flex}.FreeSpinsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.FreeSpinsTooltipBackdrop .FreeSpinsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.FreeSpinsTooltipBackdrop .FreeSpinsTooltip .FreeSpinsIconButton{top:12px;right:6px;position:absolute}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeader,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeader{padding-top:16px}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeaderName,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeaderName{font-size:var(--emw--font-size-small-plus, 16px);line-height:16px}.FreeSpinsListPopup.Tablet .FreeSpinsIconButton,.FreeSpinsListPopup.Desktop .FreeSpinsIconButton{width:24px;height:24px}.FreeSpinsListPopup.Tablet .FreeSpinsList,.FreeSpinsListPopup.Desktop .FreeSpinsList{padding:20px 24px 0;row-gap:20px}.FreeSpinsListPopup.Tablet .ChallengeCardHeader,.FreeSpinsListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.FreeSpinsListPopup.Tablet .FreeSpinsName,.FreeSpinsListPopup.Desktop .FreeSpinsName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.FreeSpinsListPopup.Tablet .FreeSpinsCountdown,.FreeSpinsListPopup.Desktop .FreeSpinsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.FreeSpinsListPopup.Tablet .FreeSpinsTooltip,.FreeSpinsListPopup.Desktop .FreeSpinsTooltip{padding:60px 65px;font-size:var(--emw--font-size-small-plus, 16px);line-height:20px}.FreeSpinsListPopup.Tablet .FreeSpinsTooltip .FreeSpinsIconButton,.FreeSpinsListPopup.Desktop .FreeSpinsTooltip .FreeSpinsIconButton{top:24px;right:24px}';const Ee=["en"],He={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot is won!",loadMore:"Load More",jackpotDetails:"Jackpot Details",minBet:"Min Bet",maxBet:"Max Bet",Suspended:"Suspended",Closed:"Closed"}},Ie=(e,t)=>{const i=t;return He[void 0!==i&&Ee.includes(i)?i:"en"][e]};function ze(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}const Re=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.enabled=!1,this.showDetails=!1,this.jackpotEndTime="",this.maxVisibleGames=0,this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),this.visibleGames=[],this.maxVisibleGames=0},this.handleLoadMore=()=>{this.visibleGames=this.jackpot.GamesInfo.slice(0,this.visibleGames.length+this.maxVisibleGames)},this.toggleShowDetails=()=>{this.showDetails=!this.showDetails},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})}}handleEvent(e){const{type:t,data:i}=null==e?void 0:e.data;switch(t){case"UpdateJackpotStatus":this.jackpot.JackpotId===e.data.data.JackpotId&&this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":{const e=i;e.Success&&this.jackpot.JackpotId in e.JackpotIds&&(this.enabled=this.jackpot.Enabled=e.JackpotIds[this.jackpot.JackpotId]);break}}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames()}componentWillLoad(){this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance,this.jackpotEndTime=this.jackpot.JackpotEndTime,this.disabledStatus=this.jackpot.Reason||"",this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,t),this.visibleGames=this.jackpot.GamesInfo.slice(0,this.maxVisibleGames)}updateJackpotStatus(e){e.IsClosed?(this.clearInterval(),this.disabledStatus=e.Reason,this.activeTab=1):(this.disabledStatus="",this.jackpotEndTime=e.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return t("div",{class:"JackpotDetailsNavigation"},t("button",{class:"JackpotIconButton",onClick:this.handleBackClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),t("div",{class:"JackpotPopupName"},Ie("jackpots",this.language)),t("button",{class:"JackpotIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getJackpotBalance(){return ze(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{PopupButton:!0,Active:this.enabled,Loading:this.jackpot.Pending}}getJackpotDetailsHeaderTemplate(){const e=fe(new Date(this.jackpot.JackpotEndTime),new Date)||!!this.disabledStatus;return t("div",{class:"JackpotDetailsHeader"},t("div",null,t("div",{class:"JackpotType"},this.jackpot.Type),t("div",{class:"JackpotBalance"},this.getJackpotBalance())),t("div",{class:"JackpotDetailsHeaderSecondCol"},t("button",{disabled:e,onClick:this.jackpotChangeStatusRequest,class:this.getJoinButtonClasses(),"data-id":this.jackpot.JackpotId},Ie(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&t("div",{class:"JackpotIsWon"},Ie("jackpotIsWon",this.language))))}getTabsTemplate(){return t("div",{class:"JackpotDetailsTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(1===this.activeTab?"Active":"")},Ie("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(2===this.activeTab?"Active":"")},Ie("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getJackpotInfoTemplate():this.getGamesTemplate()}getJackpotDetailsTemplate(){return t("div",null,t("div",{class:"JackpotDetailsButton",onClick:this.toggleShowDetails},t("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,Ie("jackpotDetails",this.language))),this.showDetails&&t("div",{class:"JackpotDetailsContent"},this.jackpot.Description&&t("p",{class:"JackpotDescription"},this.jackpot.Description),this.jackpot.JackpotRulesUrl&&t("a",{class:"TermsAndConditions",href:this.jackpot.JackpotRulesUrl,target:"_blank"},Ie("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var e,i,n,s;if(this.jackpot.BetLimits){const o=this.jackpot.Currency,a=Object.keys(this.jackpot.BetLimits),r=a.find((e=>e===o))||a[0],l=this.jackpot.BetLimits&&!!(null===(e=this.jackpot.BetLimits[r])||void 0===e?void 0:e.MinBet),p=this.jackpot.BetLimits&&!!(null===(i=this.jackpot.BetLimits[r])||void 0===i?void 0:i.MaxBet),c=ze(null===(n=this.jackpot.BetLimits[r])||void 0===n?void 0:n.MinBet,r),d=ze(null===(s=this.jackpot.BetLimits[r])||void 0===s?void 0:s.MaxBet,r);return t("div",null,l&&t("div",{class:"JackpotInfoItem"},Ie("minBet",this.language),": ",t("span",null,c)),p&&t("div",{class:"JackpotInfoItem"},Ie("maxBet",this.language),": ",t("span",null,d)))}}getJackpotInfoTemplate(){return t("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),t("div",{class:"JackpotInfo"},t("div",{class:"JackpotInfoItem"},Ie("operatorContribution",this.language),": ",t("span",null,+this.jackpot.OperatorContributionPercent,"%")),t("div",{class:"JackpotInfoItem"},Ie("type",this.language),": ",t("span",null,this.jackpot.JackpotTypePresentation)),t("div",{class:"JackpotInfoItem"},Ie("winningProbability",this.language),": ",t("span",null,"1:",this.jackpot.Probability)),this.getBetLimitsRange()))}getGamesTemplate(){const e=this.visibleGames.map((e=>t("div",{onClick:this.onGameClick,class:"JackpotGamesListItem "+(e.GameSlug===this.gameSlug?"Disabled":""),key:e.CasinoGameId,"data-slug":e.GameSlug,style:{background:`center / cover url(${e.GameIcon}) no-repeat`},title:e.GameName})));return[t("div",{class:"JackpotGamesListWrapper",ref:e=>this.gamesListWrapperEl=e},t("div",{class:"JackpotGamesList"},e)),this.visibleGames.length<this.jackpot.GamesInfo.length?t("button",{class:"PopupButton Active JackpotGamesButton",onClick:this.handleLoadMore},Ie("loadMore",this.language)):""]}getJackpotCountdown(){const e=Ie(this.disabledStatus,this.language)||this.timer;return t("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},e)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.jackpotEndTime).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:n,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${s}s`:`${t}d:${i}h:${n}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus||fe(new Date(this.jackpot.JackpotEndTime),new Date),[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}render(){return t("div",{class:this.getPopupClasses()},this.getTopNavigationTemplate(),t("div",{class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate()))}get host(){return n(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};Re.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.PopupButton{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.PopupButton.Active{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.PopupButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.PopupButton.Loading{opacity:0.5;pointer-events:none}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .JackpotDetailsTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-primary, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotIconButton{width:16px;height:16px;cursor:pointer;display:flex;justify-content:center;align-items:center}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;align-items:center;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:"Montserrat", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:Montserrat, sans-serif;font-size:18px;font-weight:var(--emw--font-weight-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:Montserrat, sans-serif;font-weight:var(--emw--font-weight-bold, 700);font-size:12px;line-height:15px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotGamesLoadMore::before,.JackpotJoinButton.Joined::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-gray-150, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emfe-w-color-white, #FFF);text-transform:capitalize}.JackpotDetailsTabsWrapper{display:flex;flex-direction:column}.JackpotDetailsTabs{margin-top:20px;display:flex;position:relative}.JackpotDetailsTabs .JackpotDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.JackpotDetailsTabs .JackpotDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.JackpotDetailsTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:14px;line-height:17px}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotGamesListWrapper{overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg")}.JackpotDetailsButton .Open{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-primary, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .JackpotIconButton,.JackpotDetailsPopup.Desktop .JackpotIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:22px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .PopupButton,.JackpotDetailsPopup.Desktop .PopupButton{min-height:36px;font-size:16px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:16px;line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:14px;line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .JackpotDetailsTabs .JackpotDetailsTab,.JackpotDetailsPopup.Desktop .JackpotDetailsTabs .JackpotDetailsTab{font-size:16px;line-height:20px}';const je=["en"],We={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",tooltip:"A payout that increases each time the game is played but the jackpot is not won",mega:"Mega",major:"Major",minor:"Minor",Suspended:"Suspended Jackpot",Closed:"Closed Jackpot",allJackpotsClosed:"Unfortunately, there are no available jackpots to join. Please, try again later.",jackpotIsWon:"Jackpot is won!",termsAndConditions:"Terms and Conditions",winningProbability:"Winning Probability",type:"Type",operatorContribution:"Operator Contribution",outdatedJackpotCountdown:"We are going to remove this Jackpot in 30 days"}},Ae=(e,t)=>{const i=t;return We[void 0!==i&&je.includes(i)?i:"en"][e]},Oe=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.stopPropagation=e=>{e.stopPropagation()},this.handleJackpotClick=e=>{const t=+e.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:t})}}jackpotsPropHandler(e){!this.interval&&e.length&&this.startCountdown(),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.jackpots.reduce(((t,i)=>{const n=new Date(i.JackpotEndTime).getTime()-e;let s="00h:00m:00s";const{days:o,hours:a,minutes:r,seconds:l}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};return s="00"===o?`${a}h:${r}m:${l}s`:`${o}d:${a}h:${r}m`,Object.assign(Object.assign({},t),{[i.JackpotId]:s})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(e){return{JackpotCard:!0,JackpotCardClosed:e.IsClosed||fe(new Date(e.JackpotEndTime),new Date),InProgress:e.Enabled&&!e.IsClosed}}getJackpotHeaderTemplate(e){const i=!!e.WinBalance,n=Ae(e.Type,this.language),s=Ae(e.Reason,this.language),o=(null==e?void 0:e.IsClosed)?s:n,a=`JackpotBalance Jackpot${Ae(e.Type,this.language)}`,r=e.Enabled?"JackpotJoinButton Joined":"JackpotJoinButton",l=Ae(e.Enabled?"unjoin":"join",this.language),p=e.Pending||(null==e?void 0:e.IsClosed)||fe(new Date(e.JackpotEndTime),new Date);return t("div",{class:"JackpotCardHeader"},t("div",{class:"JackpotTitle"},t("span",{class:"JackpotName"},o),t("span",{class:a},function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(e.Balance,e.Currency))),t("div",{class:"JackpotActions"},t("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":e.JackpotId,disabled:p},l),i&&t("span",{class:"JackpotWon"},Ae("jackpotIsWon",this.language))))}getJackpotDescriptionTemplate(e){const i=+e.OperatorContributionPercent+"%",n=`1:${e.Probability}`,s=fe(new Date(e.JackpotEndTime),new Date)?Ae("outdatedJackpotCountdown",this.language):this.timers[e.JackpotId],o=Ae("operatorContribution",this.language),a=Ae("type",this.language),r=Ae("winningProbability",this.language);return t("div",{class:"JackpotCardDescription"},!e.IsClosed&&t("span",{class:"JackpotCountdown"},s),t("div",{class:"JackpotCardDescriptionBlock"},this.renderDescriptionRowInfo(`${o}:`,i),this.renderDescriptionRowInfo(`${r}:`,n),this.renderDescriptionRowInfo(`${a}:`,e.JackpotTypePresentation),t("a",{href:e.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},Ae("termsAndConditions",this.language))))}renderDescriptionRowInfo(e,i){return t("div",{class:"JackpotCardDescriptionRow"},t("span",null,e),t("span",{class:"JackpotDescriptionValue"},i))}getJackpotTemplate(e){return t("div",{class:this.getJackpotClasses(e),onClick:this.handleJackpotClick,key:e.JackpotId,"data-id":e.JackpotId},this.getJackpotHeaderTemplate(e),this.getJackpotDescriptionTemplate(e))}getHeaderTemplate(){return t("header",{class:"JackpotsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"JackpotsIconButton"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),t("div",{class:"JackpotsListPopupHeaderName"},Ae("jackpots",this.language)),t("button",{class:"JackpotsIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close jackpots list"})))}getListTemplate(){const e=this.jackpots.every((e=>e.IsClosed));return this.jackpots.length?t("div",{class:"JackpotsListWrapper"},e&&t("div",{class:"JackpotsListClosed"},t("h2",null,Ae("allJackpotsClosed",this.language))),t("div",{class:"JackpotsList"},this.jackpots.map((e=>this.getJackpotTemplate(e))))):t("div",{class:"JackpotsListClosed"},t("h2",null,Ae("allJackpotsClosed",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"JackpotsTooltipBackdrop"},t("div",{class:"JackpotsTooltip"},t("button",{class:"JackpotsIconButton",onClick:this.hideTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),Ae("tooltip",this.language))):""}render(){return t("div",{class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};Oe.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:"";position:absolute;pointer-events:none;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:"Montserrat", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.JackpotJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:6px;position:absolute}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .JackpotTooltip,.JackpotsListPopup.Desktop .JackpotTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}';const Ne=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1,this.handleCloseClick=()=>{this.isLoading||this.closeModal.emit(this.modalType)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return t("div",{class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},t("div",{class:"ModalWinAnimation"}),t("div",{class:"ModalContent GradientBorder"},t("div",{class:"IconCloseContainer"},t("button",{class:"IconCloseButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Сlose modal"}))),this.contentIcon?t("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):null,t("div",{class:"ModalHeader"},t("h1",null,this.header)),t("div",{class:"ModalBodyWrapper"},t("div",{class:"ModalBody"},t("slot",{name:"body"})),t("div",{class:"ModalFooter"},t("slot",{name:"footer"})))))}get host(){return n(this)}};Ne.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.IconCloseButton img{width:24px;height:24px}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:var(--emw--color-background, #666178)}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:"Montserrat", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:8px;width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:16px;font-family:"Inter", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .IconCloseButton img{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px;padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const Ge=["en"],$e={en:{joinHeader:"Choose another mission?",desc:"Any progress on the current mission will be kept and you can rejoin the mission at any time.",joinQuestion:"Would you still like to join another mission?",joinConfirm:"Yes, join another mission",joinReject:"No, stay at this mission",unJoinHeader:"Quit Mission?",unJoinQuestion:"Would you still like to quit the mission?",unJoinConfirm:"Yes, I want to quit this mission",unJoinReject:"No, stay at this mission",join:"Unjoin",unJoin:"Unjoin",continue:"Continue",okContinue:"Ok, continue",won:"You won",supportInfo:"However, some rewards cannot be issued. Please, contact support.",noReward:"Reward cannot be issued",contactSupport:"Please contact support.",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!",jackpotWinInfo:"Please refresh game page or place any bet to update game balance"}},_e=(e,t)=>{const i=t;return $e[void 0!==i&&Ge.includes(i)?i:"en"][e]},Ue=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewardMessage="",this.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""},this.handleCloseClick=e=>{const t=e.currentTarget.getAttribute("data-type");this.closeModal.emit(t)},this.handleChallengeAttendance=()=>{window.postMessage({type:"ChallengeJoinRequest",data:this.confirmationData})},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.isModalOpen=e=>Boolean(this.openModals.find((t=>t===e)))}openModalHandler(e){const{modalType:t,rewardMessage:i,hasError:n,confirmationData:s,winAmount:o}=e.detail;o&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+o.amount,currency:o.currency}:o),this.openModals=[...this.openModals,t],this.rewardMessage=i,this.hasError=n,s&&(this.confirmationData=s)}closeModalHandler(e){this.openModals=this.openModals.filter((t=>t!==e.detail))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){const{ProgressToActivate:e}=this.confirmationData||{};return t("div",{class:`ModalContainer ${this.device}`},t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",modalType:"REWARD_MODAL","show-animation":!0,device:this.device},t("div",{slot:"body"},t("div",null,_e("won",this.language)," ",t("span",{class:"ModalReward"},this.rewardMessage)),this.hasError&&t("div",{class:"SupportInfo"},_e("supportInfo",this.language))),t("div",{slot:"footer"},t("button",{class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},_e("continue",this.language)))),t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("JACKPOT_REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg","show-animation":!0,modalType:"JACKPOT_REWARD_MODAL",device:this.device},t("div",{slot:"body"},t("div",{class:"JackpotWinText"},_e("jackpotWin",this.language)),t("div",{class:"JackpotWinAmount"},(i=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(i)}`))),t("div",{slot:"footer"},t("button",{class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},_e("continue",this.language)),t("div",{class:"JackpotWinInfoText"},_e("jackpotWinInfo",this.language)))),t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("TARGET_MODAL"),header:_e(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},t("div",{slot:"body"},t("div",{class:"LeftAlign"},_e("desc",this.language)),t("div",{class:"LeftAlignQuestion"},_e(e?"joinQuestion":"unJoinQuestion",this.language))),t("div",{slot:"footer",class:"ManyActions"},t("button",{class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},_e(e?"joinConfirm":"unJoinConfirm",this.language)),t("button",{class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},t("div",{class:"GradientText"},_e(e?"joinReject":"unJoinReject",this.language))))),t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("SUPPORT_MODAL"),header:_e("noReward",this.language),contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",modalType:"SUPPORT_MODAL",device:this.device},t("div",{slot:"body"},t("span",null,_e("contactSupport",this.language))),t("div",{slot:"footer"},t("button",{class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},_e("okContinue",this.language)))));var i}get host(){return n(this)}};Ue.style=':host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-small-plus, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:"Montserrat", sans-serif;padding:0 12px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;border:2px solid transparent}.GradientText{background-image:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF);word-break:break-word}.JackpotWinText{margin:0;font-weight:var(--emw--font-weight-bold, 600);font-size:16px;line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;box-shadow:-0.41px 0.41px 0px 0px #00000026, -0.41px 0.41px 2px 0px #00000080;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-weight:900;font-size:16px;line-height:16px}.JackpotWinInfoText{padding:0 50px;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-gray-100, #BBB9C3)}.SupportInfo{margin-top:20px}.ModalContainer.Mobile .ModalFooterButton,.ModalContainer.Mobile .ModalFooterButtonOutlined{font-size:var(--emw--font-size-small, 14px);min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.ModalContainer.Mobile .JackpotWinText{font-size:14px;line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:14px;line-height:14px}.ModalContainer.Mobile .JackpotWinInfoText{padding:0;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-gray-100, #BBB9C3)}.LeftAlign,.LeftAlignQuestion{text-align:left;line-height:1.2}.LeftAlignQuestion{margin-top:20px}';const qe=class{constructor(t){e(this,t),this.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent||this.indeterminate}}getProgressBarLineTemplate(){return t("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return t("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},t("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},t("slot",{name:"Title"},t("div",null)),t("slot",{name:"Percent"},t("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),t("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return n(this)}};var Ye,Qe;qe.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}",function(e){e.Info="Info",e.Leaderboard="Leaderboard",e.Games="Games"}(Ye||(Ye={})),function(e){e.Starts="Starts",e.Ends="Ends"}(Qe||(Qe={}));const Xe=(e,t)=>(Object.keys(t).map((i=>{e=e.replace(`{${i}}`,t[i])})),e),Ve=Object.assign(Object.assign(Object.assign({Join:"Join",Unjoin:"Unjoin"},Ye),Qe),{TC:"Terms & Conditions",ScoreCriteria:"Score Criteria",MinimumBetCriteria:"Minimum bet criteria",Place:"place",Prizes:"Rewards",LeaderboardDetails:"Leaderboard Details",UnjoinDialog:{Title:"Quit Leaderboard?",Description:"Any progress on the current Leaderboard won’t be kept and you can not rejoin the Leaderboard any more. <br /><br />Would you still like to quit?",ButtonYes:"Yes, I want to quit leaderboard",ButtonNo:"No, Stay on the leaderboard"},JoinDialog:{Tile:"Congratulations!",Description:"You have unlocked <span>{tournamentName}</span>! <br />Would you like to join?",ButtonYes:"Join",ButtonNo:"Not interested"},NoLeaderboards:"No Leaderboards yet",NoLeaderboardsTip:"Try winning tickets to Leaderboards as rewards or launching other booster games",Leaderboards:"Leaderboards",TipPrize:"You took <span>{place}</span> place and win <span>{prize}</span>",Tip:"Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward."}),Ke=(...e)=>{let t=[];return e.map((e=>{switch(typeof e){case"string":t.push(e);break;case"object":Object.keys(e).map((i=>{e[i]&&t.push(i)}))}})),t.join(" ")};var Ze,et,tt;!function(e){e.Confirm="Confirm",e.List="List",e.Item="Item"}(Ze||(Ze={})),function(e){e.Running="Running",e.Unstarted="Unstarted",e.Closed="Closed",e.Closing="Closing"}(et||(et={})),function(e){e.Unjoin="Unjoin",e.Tip="Tip"}(tt||(tt={}));const it=e=>{var{statedClasses:i,innerHTML:n}=e,s=ve(e,["statedClasses","innerHTML"]);const{isHollow:o,isPending:a}=i;return t("button",Object.assign({},Object.assign({class:Ke("GradientRoundedButton","GradientRounded",{Hollow:o||!1,Pending:a||!1})},s)),t("span",null,n))},nt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg"}),st=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg"}),ot=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg"}),at=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg"}),rt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg"}),lt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg"}),pt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg"}),ct=e=>{const{left:i,middle:n,right:s}=e,o={left:i,middle:n,right:s};return t("div",{class:"WrapperBar"},Object.keys(o).map((e=>{return t("div",{class:"WrapperBar"+(i=e,i.split("").map(((e,t)=>0===t?e.toUpperCase():e)).join(""))},o[e]||"");var i})))};function dt(e){return e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(" at",",")}function ht(e,t){return(100*((new Date).getTime()-e.getTime())/(t.getTime()-e.getTime())).toFixed(0)}const gt=e=>{const t=["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime"],i={};return Object.keys(e).map((n=>{const s=e[n];switch(n){case"games":i[n]=s.items;break;default:i[n]=t.includes(n)?new Date(s):s}})),i};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,function(e){e.exports=function(){function e(){}function t(e){return e()}function i(){return Object.create(null)}function n(e){e.forEach(t)}function s(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function a(e,t,i){e.insertBefore(t,i||null)}function r(e){e.parentNode&&e.parentNode.removeChild(e)}function l(e){const t={};for(const i of e)t[i.name]=i.value;return t}let p;function c(e){p=e}const d=[],h=[];let g=[];const u=[],m=Promise.resolve();let b=!1;function f(e){g.push(e)}const x=new Set;let w=0;function v(){if(0!==w)return;const e=p;do{try{for(;w<d.length;){const e=d[w];w++,c(e),k(e.$$)}}catch(e){throw d.length=0,w=0,e}for(c(null),d.length=0,w=0;h.length;)h.pop()();for(let e=0;e<g.length;e+=1){const t=g[e];x.has(t)||(x.add(t),t())}g.length=0}while(d.length);for(;u.length;)u.pop()();b=!1,x.clear(),c(e)}function k(e){if(null!==e.fragment){e.update(),n(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(f)}}const y=new Set;function C(e,t){-1===e.$$.dirty[0]&&(d.push(e),b||(b=!0,m.then(v)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function F(o,a,l,d,h,g,u,m=[-1]){const b=p;c(o);const x=o.$$={fragment:null,ctx:[],props:g,update:e,not_equal:h,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(b?b.$$.context:[])),callbacks:i(),dirty:m,skip_bound:!1,root:a.target||b.$$.root};u&&u(x.root);let w=!1;if(x.ctx=l?l(o,a.props||{},((e,t,...i)=>{const n=i.length?i[0]:t;return x.ctx&&h(x.ctx[e],x.ctx[e]=n)&&(!x.skip_bound&&x.bound[e]&&x.bound[e](n),w&&C(o,e)),t})):[],x.update(),w=!0,n(x.before_update),x.fragment=!!d&&d(x.ctx),a.target){if(a.hydrate){const e=function(e){return Array.from(e.childNodes)}(a.target);x.fragment&&x.fragment.l(e),e.forEach(r)}else x.fragment&&x.fragment.c();a.intro&&(k=o.$$.fragment)&&k.i&&(y.delete(k),k.i(undefined)),function(e,i,o,a){const{fragment:r,after_update:l}=e.$$;r&&r.m(i,o),a||f((()=>{const i=e.$$.on_mount.map(t).filter(s);e.$$.on_destroy?e.$$.on_destroy.push(...i):n(i),e.$$.on_mount=[]})),l.forEach(f)}(o,a.target,a.anchor,a.customElement),v()}var k;c(b)}let L;function D(t){let i;return{c(){i=document.createElement("div"),i.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=e},m(e,n){a(e,i,n),t[3](i)},p:e,i:e,o:e,d(e){e&&r(i),t[3](null)}}}function S(e,t,i){let n,{clientstyling:s=""}=t,{clientstylingurl:o=""}=t;return e.$$set=e=>{"clientstyling"in e&&i(1,s=e.clientstyling),"clientstylingurl"in e&&i(2,o=e.clientstylingurl)},e.$$.update=()=>{3&e.$$.dirty&&s&&n&&(()=>{let e=document.createElement("style");e.innerHTML=s,n.appendChild(e)})(),5&e.$$.dirty&&o&&n&&(()=>{let e=new URL(o),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{n.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[n,s,o,function(e){h[e?"unshift":"push"]((()=>{n=e,i(0,n)}))}]}"function"==typeof HTMLElement&&(L=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(s);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){(function(e,t){const i=e.$$;null!==i.fragment&&(function(e){const t=[],i=[];g.forEach((n=>-1===e.indexOf(n)?t.push(n):i.push(n))),i.forEach((e=>e())),g=t}(i.after_update),n(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])})(this,1),this.$destroy=e}$on(t,i){if(!s(i))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const e=n.indexOf(i);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&0!==Object.keys(e).length&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class B extends L{constructor(e){super();const t=document.createElement("style");t.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(t),F(this,{target:this.shadowRoot,props:l(this.attributes),customElement:!0},S,D,o,{clientstyling:1,clientstylingurl:2},null),e&&(e.target&&a(e.target,this,e.anchor),e.props&&(this.$set(e.props),v()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),v()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),v()}}return!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",B),B}()}({path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}});const ut=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.tab=Ye.Info,this.locale=Ve,this.tournamentItem=void 0,this.tournamentList=void 0,this.leaderboards=[],this.isActionJoinPending=!1,this.isDialogOpen=!1,this.isShowInfo=!1,this.page=Ze.List,this.tournamentInDialog=void 0,this.dialog={isOpen:!1,type:void 0,data:void 0},this.time=0,this.onClickConfirmJoin=()=>{this.actionJoin(this.tournamentItem),this.nextPage=Ze.List},this.onClickConfirmUnjoin=()=>{this.close.emit()},this.onClickDialogUnjoin=()=>{this.actionJoin(this.dialog.data),this.closeDialog()},this.onClickDialogJoin=()=>{this.closeDialog()},this.onClickBarInLayout=()=>{this.close.emit()},this.onClickBarInLayoutDialog=()=>{this.closeDialog()},this.onClickShowInfo=()=>{this.isShowInfo=!this.isShowInfo},this.onClickBarTip=()=>{this.openDialog(tt.Tip)},this.onClickBarBack=()=>{this.setPage(Ze.List)}}setTimeInterval(){this.timeHolder=setInterval((()=>{this.tournamentList||this.tournamentItem?this.time+=1:this.time=0}),1e3)}updateTournamentListByItem(e){this.tournamentList=this.tournamentList.map((t=>t.id===e.id?gt(e):t))}handleEvent(e){const t=e.data,{type:i}=t,n=ve(t,["type"]);switch(i){case"ShowLeaderboardRewardModal":{const{tournament:e}=n;this.setPage(Ze.Confirm,{tournament:gt(e)}),postMessage({type:"BarLeaderboardsClick"});break}case"UpdateTournamentsItemRes":{const e=gt(n.data.item);this.tournamentItem=e,this.updateTournamentListByItem(e);break}case"UpdateLeaderboardsRes":this.leaderboards=(e=>{let{item:t,items:i}=e;return t?i.map((e=>t&&t.userID===e.userID?Object.assign(Object.assign({},e),{isMe:!0}):e)):i})(n.data);break;case"JoinTournamentRes":case"UnjoinTournamentRes":const{success:e}=n;if(e)switch(this.tournamentItem=Object.assign(Object.assign({},this.tournamentItem),{playerEnrolled:!this.tournamentItem.playerEnrolled}),this.page){case Ze.Item:break;case Ze.List:this.updateTournamentListByItem(this.tournamentItem)}this.nextPage&&(this.setPage(this.nextPage),this.nextPage=void 0),this.isActionJoinPending=!1}}get messageSender(){return{JoinTournamentReq:e=>{var t;return window.postMessage({type:"JoinTournamentReq",bonusCode:null===(t=e.wallets[0])||void 0===t?void 0:t.code})},UnjoinTournamentReq:e=>window.postMessage({type:"UnjoinTournamentReq",id:e.id}),UpdateTournamentsItemReq:e=>window.postMessage({type:"UpdateTournamentsItemReq",id:e.id}),UpdateLeaderboardsReq:e=>window.postMessage({type:"UpdateLeaderboardsReq",id:e.id})}}connectedCallback(){this.setTimeInterval()}disconnectedCallback(){clearInterval(this.timeHolder)}actionJoin(e){if(!this.isActionJoinPending){this.isActionJoinPending=!0;try{e.playerEnrolled?this.messageSender.UnjoinTournamentReq(e):this.messageSender.JoinTournamentReq(e)}catch(e){return void console.log("error",e)}}}isTournamentClosed(e){return[et.Closed,et.Closing].includes(e.state)}setPage(e,t){switch(e){case Ze.Confirm:case Ze.Item:this.tournamentItem=t.tournament,this.tournamentItem||this.messageSender.UpdateTournamentsItemReq(t.tournament),this.isTournamentClosed(this.tournamentItem)&&this.messageSender.UpdateLeaderboardsReq(this.tournamentItem)}this.tab=Ye.Info,this.page=e}renderPage(){switch(this.page){case Ze.Confirm:return this.renderPageConfirm();case Ze.Item:return this.renderPageLeaderboardItem();case Ze.List:return this.renderPageLeaderboardList()}}render(){return t(s,null,t("general-styling-wrapper",{clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,targetTranslations:Ve,translationUrl:this.translationUrl}),this.renderPage())}onClickListItemChangePage(e){this.setPage(Ze.Item,{tournament:e})}onClickItemJoin(e,t){t.stopPropagation(),e.playerEnrolled?this.openDialog(tt.Unjoin,e):(this.actionJoin(e),this.tournamentItem=e)}onClickTab(e){switch(this.tab=e,e){case Ye.Leaderboard:this.leaderboards=void 0,this.messageSender.UpdateLeaderboardsReq(this.tournamentItem);break;case Ye.Games:this.messageSender.UpdateTournamentsItemReq(this.tournamentItem)}}renderPageLeaderboardList(){var e;if(!this.tournamentList)return this.tournamentList=null===(e=this.leaderboardsInit)||void 0===e?void 0:e.map((e=>gt(e))),t("general-animation-loading",null);const{locale:i}=this;return this.tournamentList.length?this.renderLeaderboardContainer(t(o,null,t("div",{class:"Leaderboards Row"},this.tournamentList.map((e=>t("div",{class:Ke("LeaderboardsItem",e.playerEnrolled?" GradientRounded Hollow":""),onClick:this.onClickListItemChangePage.bind(this,e)},t("div",{class:"LeaderboardsItemContainer"},this.renderTitleContainer(e),this.renderTimeBar(e)))))))):t("div",{class:"NoLeaderboards Row"},t("div",null,i.NoLeaderboards),t("div",null,i.NoLeaderboardsTip))}renderPageConfirm(){if(!this.tournamentItem)return t("general-animation-loading",null);const e=this.tournamentItem.nameOrTitle,{locale:i}=this;return t("div",{class:"PageConfirmContainer"},t("div",{class:"GradientRounded Hollow PageConfirm"},t("div",null,pt),t("div",{class:"Title"},i.JoinDialog.Tile),t("div",{class:"Description",innerHTML:Xe(i.JoinDialog.Description,{tournamentName:e})}),t("div",{class:"PageConfirmButtonsGroup"},t(it,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending},onClick:this.onClickConfirmJoin,innerHTML:i.JoinDialog.ButtonYes})),t(it,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending,isHollow:!0},onClick:this.onClickConfirmUnjoin,innerHTML:i.JoinDialog.ButtonNo})))))}renderPageLeaderboardItem(){return this.tournamentItem?this.renderLeaderboardContainer(t(o,null,this.renderTitleContainer(this.tournamentItem),this.renderTabs(),this.renderTabbedContent())):t("general-animation-loading",null)}renderDialogContent(){switch(this.dialog.type){case tt.Unjoin:return this.renderDialogContentUnjoin();case tt.Tip:return t("div",{class:"Tip"},this.locale.Tip)}}renderDialogContentUnjoin(){const{locale:e}=this;return t("div",{class:"DialogContentUnjoin"},t("div",{class:"DialogContentUnjoinTitle"},e.UnjoinDialog.Title),t("div",{class:"DialogContentUnjoinDescription",innerHTML:e.UnjoinDialog.Description}),t(it,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending},onClick:this.onClickDialogUnjoin,innerHTML:e.UnjoinDialog.ButtonYes})),t(it,Object.assign({},{statedClasses:{isHollow:!0,isPending:this.isActionJoinPending},onClick:this.onClickDialogJoin,innerHTML:e.UnjoinDialog.ButtonNo})))}renderTitleContainer(e){const{locale:i}=this;return t("div",{class:"TitleContainer"},t("div",{class:"Title"},e.nameOrTitle),e.state!==et.Closed&&t("div",null,t(it,Object.assign({},{statedClasses:{isHollow:e.playerEnrolled,isPending:this.isActionJoinPending},onClick:this.onClickItemJoin.bind(this,e),innerHTML:e.playerEnrolled?i.Unjoin:i.Join}))))}renderTabbedContent(){switch(this.tab){case Ye.Info:return this.renderInfo();case Ye.Leaderboard:return this.renderLeaderboard();case Ye.Games:return this.renderGames()}}renderGames(){var e;return t("div",{class:"Games"},null===(e=this.tournamentItem.games)||void 0===e?void 0:e.map((e=>t("div",null,t("img",{src:e.defaultThumbnail,alt:""})))))}renderLeaderboard(){return this.leaderboards?this.leaderboards.length?t("table",{class:"Leaderboards"},this.leaderboards.map((e=>t("tr",{class:Ke({isMe:e.isMe})},t("td",{class:"LeaderboardRank"},t("span",null,e.rank)),t("td",{class:"LeaderboardName"},e.shortName),t("td",{class:"LeaderboardScore"},e.score),t("td",{class:"LeaderboardPrize"},e.prizeName))))):"":t("general-animation-loading",null)}renderTabs(){const{locale:e,tab:i}=this;return t("div",{class:"TabsContainer"},t("div",{class:"Tabs"},Object.keys(Ye).map((n=>t("div",Object.assign({},{class:Ke({active:i===n}),onClick:this.onClickTab.bind(this,n)}),e[n])))))}renderTimeBar(e){return t("section",{class:"TimeContainer"},t("div",{class:"Time"},e.playerEnrolled?t(o,null,t("div",null,function(e,t){const i=Math.abs(t.getTime()-e.getTime()),n=Math.floor(i/864e5),s=Math.floor(i%864e5/36e5),o=Math.floor(i%36e5/6e4);return`${String(n).padStart(2,"0")}d:${String(s).padStart(2,"0")}h:${String(o).padStart(2,"0")}m`}(function(e,t){const i=new Date(e);return i.setSeconds(i.getSeconds()+t),i}(e.startTime,this.time),e.endTime)),t("div",null,t(it,{statedClasses:{isHollow:!0,isPendding:!1},innerHTML:`${ht(e.startTime,e.endTime)}%`}))):t(o,null,t("div",null,dt(e.startTime)),t("div",null,dt(e.endTime)))),t("casino-engagement-suite-progress-bar",{value:Number(ht(e.startTime,e.endTime)),"hide-percent":!0}))}renderInfo(){var e,i;const{locale:n,tournamentItem:s,isShowInfo:o}=this;return t("div",{class:"InfoContainer"},this.renderTimeBar(s),t("section",{class:"ShowInfo",onClick:this.onClickShowInfo},t("p",null,t("span",null,o?at:ot),t("span",null,n.LeaderboardDetails))),o&&t("section",{class:"Info"},t("div",null,s.description),t("div",{class:"Criterias"},t("div",null,n.ScoreCriteria,": ",t("span",null,s.scoreCriteria)),t("div",null,n.MinimumBetCriteria,": ",t("span",null,s.minBetCount))),t("div",{class:"TC"},t("a",{href:s.termsUrl,target:"_blank"},n.TC))),this.isTournamentClosed(this.tournamentItem)&&(null===(e=this.leaderboards)||void 0===e?void 0:e.find((e=>e.isMe)))&&t("section",{class:"ResultPrize",innerHTML:Xe(n.TipPrize,this.getResultPrize(null===(i=this.leaderboards)||void 0===i?void 0:i.find((e=>e.isMe))))}),t("section",{class:"Prizes"},t("div",{class:"PrizesHeader"},lt,t("span",{class:"PrizesText"},n.Prizes)),s.prizes.map(((e,i)=>t("div",{class:"Prize"},i+1," ",n.Place,": ",t("span",{class:"PrizeText"},e.name))))))}getResultPrize(e){return{prize:e.prizeName,place:e.rank}}renderCloseBarInLayout(){const{left:e,middle:i}=this.getWrapperBarData();return t(ct,Object.assign({},{left:e,middle:i,right:t("span",Object.assign({},{onClick:this.onClickBarInLayout}),nt)}))}renderCloseBarInLayoutDialog(){return t(ct,Object.assign({},{right:t("span",Object.assign({},{onClick:this.onClickBarInLayoutDialog}),nt)}))}renderLeaderboardContainer(e){const{dialog:{isOpen:i}}=this;return t("div",{class:"Wrapper"},t("div",{class:Ke("WrapperContent",{faded:i})},this.renderCloseBarInLayout(),t("div",{class:"Root"},t("div",{class:"Main"},e))),t("div",{class:"WrapperUtil"},t("dialog",{open:i},t("div",null,this.renderCloseBarInLayoutDialog(),i&&this.renderDialogContent()))))}getWrapperBarData(){const{page:e,locale:i}=this;switch(e){case Ze.List:return{left:t("span",{onClick:this.onClickBarTip},st),middle:i.Leaderboards};case Ze.Item:return{left:t("span",{onClick:this.onClickBarBack},rt),middle:""}}}openDialog(e,t){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!0,type:e,data:t})}closeDialog(){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1})}};ut.style='.GradientRounded {\n display: block;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);\n color: rgba(30, 22, 56, 1);\n \n position: relative;\n border-radius: 16px;\n\n &.Hollow {\n background: rgba(30, 22, 56, 1);\n color: #FFFFFF;\n &::before {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: 15px;\n border: 1px solid transparent;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;\n -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n -webkit-mask-composite: destination-out;\n mask-composite: exclude;\n }\n\n }\n}\n\n.GradientRoundedButton {\n border: none;\n padding: 7px;\n \n height: 32px;\n width: 100%;\n \n font-size: 14px;\n font-weight: 700;\n line-height: 17.07px;\n text-align: center;\n \n transition: .5s opacity;\n\n cursor: pointer;\n &.Pending {\n cursor: not-allowed;\n opacity: .3;\n }\n\n &.Hollow {\n \n span {\n background: -webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n }\n}\n.Wrapper {\n height: 100%;\n position: relative;\n color: var(--emw--color-typography, #FFFFFF);\n display: flex;\n background-color: var(--emw--color-background, #1d1537);\n flex-direction: column;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.WrapperContent {\n padding-bottom: 20px;\n transition: 0.5s filter;\n}\n.WrapperContent.faded {\n filter: brightness(53.3333333333%);\n}\n\n.WrapperBar {\n display: flex;\n width: 100%;\n padding: 12px 8px 8px;\n}\n\n.WrapperBarLeft, .WrapperBarRight {\n cursor: pointer;\n}\n\n.WrapperBarMiddle {\n flex-grow: 1;\n text-align: center;\n font-size: 16px;\n line-height: 16px;\n font-weight: 500;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n\n:host {\n display: block;\n font-size: 12px;\n font-family: Inter;\n}\n\n.Row {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.LeaderboardsItem {\n margin: 10px 0;\n border: 1px solid #403956;\n border-radius: 16px;\n}\n.LeaderboardsItem.Hollow {\n border-color: transparent;\n}\n\n.LeaderboardsItemContainer {\n padding-top: 16px;\n}\n\n.Info {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.TimeContainer {\n margin: 24px 0;\n padding: 0 20px;\n}\n.TimeContainer .Time {\n display: flex;\n justify-content: space-between;\n font-size: 11px;\n align-items: center;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n.TimeContainer .Time button {\n font-size: 12px;\n height: 20px;\n padding: 0;\n}\n.TimeContainer .Time button::before {\n inset: inherit;\n border: 0;\n}\n\n.ShowInfo {\n margin: 24px 0;\n padding: 0 20px;\n cursor: pointer;\n color: #666178;\n}\n.ShowInfo p {\n display: flex;\n gap: 4px;\n}\n\n.TitleContainer {\n display: flex;\n justify-content: space-between;\n margin: 24px 0;\n padding: 0 20px;\n margin-top: 0;\n gap: 10px;\n font-family: Montserrat;\n}\n.TitleContainer .GradientRoundedButton {\n width: 120px;\n}\n\n.TabsContainer {\n margin: 24px 0;\n padding: 0 20px;\n margin: 0 20px;\n padding: 0;\n border-bottom: 1px solid #575757;\n}\n\n.Tabs {\n display: flex;\n justify-content: space-between;\n justify-content: start;\n font-size: 12px;\n margin-bottom: -1px;\n}\n.Tabs > div {\n padding: 10px;\n color: #666178;\n cursor: pointer;\n}\n.Tabs > div.active {\n color: var(--emw--color-typography, #FFF);\n border-bottom: 2px solid var(--emw--color-typography, #FFF);\n}\n\n.Title {\n font-size: 16px;\n font-weight: 700;\n line-height: 19.5px;\n text-align: left;\n word-break: break-word;\n}\n\n.TC {\n margin-top: 12px;\n}\n.TC a {\n color: #59d1ff;\n}\n\n.Criterias {\n margin: 12px 0;\n}\n.Criterias span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.ResultPrize {\n margin: 24px 0;\n padding: 0 20px;\n}\n.ResultPrize span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.Prizes {\n margin: 24px 0;\n padding: 0 20px;\n}\n.Prizes .PrizesText {\n margin-left: 3px;\n font-weight: 600;\n}\n.Prizes .PrizesHeader {\n align-items: center;\n display: flex;\n}\n.Prizes .PrizesHeader img {\n width: 12px;\n}\n.Prizes .Prize {\n margin: 8px 0;\n}\n.Prizes .Prize .PrizeText {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.Leaderboards {\n width: 100%;\n text-align: center;\n border-collapse: collapse;\n}\n.Leaderboards td {\n opacity: 0.6;\n padding: 20px 5px;\n}\n.Leaderboards td:first-child {\n padding-left: 20px;\n}\n.Leaderboards td:last-child {\n padding-right: 20px;\n}\n.Leaderboards .LeaderboardName {\n color: var(--emw--color-typography, #FFF);\n opacity: 1;\n}\n.Leaderboards tr.isMe {\n background: rgba(0, 0, 0, 0.2);\n}\n.Leaderboards tr.isMe .LeaderboardRank span {\n padding: 0px 3px;\n opacity: 1;\n border: 1px solid var(--emw--color-primary, #ffd62f);\n border-radius: 11px;\n}\n.Leaderboards tr.isMe td {\n color: var(--emw--color-primary, #ffd62f);\n}\n\n.Games {\n margin: 24px 0;\n padding: 0 20px;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-evenly;\n gap: 4px 7.25px;\n}\n.Games img {\n width: 60px;\n}\n\ndialog {\n position: absolute;\n top: 30px;\n width: 100%;\n height: 100%;\n background: transparent;\n border: 0;\n padding: 0;\n color: var(--emw--color-typography, #FFFFFF);\n}\ndialog > div {\n margin: 32px;\n border-radius: 8px;\n background: var(--emw--color-background, #1d1537);\n border: 1px solid #403956;\n align-items: center;\n}\n\n.DialogContentUnjoin {\n padding: 32px;\n padding-top: 10px;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.DialogContentUnjoinTitle {\n font-family: Montserrat;\n font-size: 20px;\n font-weight: 600;\n line-height: 24.38px;\n text-align: center;\n}\n\n.DialogContentUnjoinDescription {\n color: var(--emw--color-secondary, #bbb9c3);\n margin-bottom: 30px;\n}\n\n.Tip {\n padding: 32px;\n padding-top: 10px;\n color: var(--emw--color-secondary, #bbb9c3);\n font-size: 14px;\n}\n\n.PageConfirmContainer {\n text-align: center;\n width: 80%;\n margin: 0 auto;\n}\n\n.PageConfirm {\n padding: 40px 32px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.PageConfirm .Title {\n font-size: 20px;\n text-align: center;\n}\n.PageConfirm .Description {\n color: var(--emw--color-secondary, #bbb9c3);\n font-weight: 400;\n}\n.PageConfirm .Description span {\n color: var(--emw--color-typography, #FFF);\n font-weight: 600;\n}\n\n.PageConfirmButtonsGroup {\n width: 150px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}';const mt=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let n in t[e])i[e][n]=t[e][n]})),e(!0)}))})));e.push(n)}var t,i;return await Promise.all(e)}render(){return t("div",{class:"StyleShell"},t("slot",{name:"mainContent"}))}get el(){return n(this)}};mt.style=":host{display:block}";export{l as casino_engagement_suite_bar,m as casino_engagement_suite_challenges_details,we as casino_engagement_suite_challenges_list,Fe as casino_engagement_suite_container,Be as casino_engagement_suite_free_spins_details,Me as casino_engagement_suite_free_spins_list,Re as casino_engagement_suite_jackpot_details,Oe as casino_engagement_suite_jackpots_list,Ne as casino_engagement_suite_modal,Ue as casino_engagement_suite_modal_container,qe as casino_engagement_suite_progress_bar,ut as casino_engagement_suite_tournament,mt as general_styling_wrapper}