@everymatrix/casino-engagement-suite-container 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/casino-engagement-suite-container/casino-engagement-suite-container.esm.js +1 -0
  2. package/dist/casino-engagement-suite-container/index.esm.js +0 -0
  3. package/dist/casino-engagement-suite-container/p-2c9a2139.entry.js +1 -0
  4. package/dist/casino-engagement-suite-container/p-e1255160.js +1 -0
  5. package/dist/casino-engagement-suite-container/p-efde3fd4.js +2 -0
  6. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  7. package/dist/cjs/casino-engagement-suite-bar_11.cjs.entry.js +4833 -0
  8. package/dist/cjs/casino-engagement-suite-container.cjs.js +25 -0
  9. package/dist/cjs/index-4ca644e2.js +1348 -0
  10. package/dist/cjs/index.cjs.js +2 -0
  11. package/dist/cjs/loader.cjs.js +15 -0
  12. package/dist/collection/collection-manifest.json +73 -0
  13. package/dist/collection/components/casino-engagement-suite-container/casino-engagement-suite-container.css +39 -0
  14. package/dist/collection/components/casino-engagement-suite-container/casino-engagement-suite-container.js +745 -0
  15. package/dist/collection/components/casino-engagement-suite-container/index.js +1 -0
  16. package/dist/collection/index.js +1 -0
  17. package/dist/collection/models/casino-engagement-suite-config.js +17 -0
  18. package/dist/collection/utils/constants.js +6 -0
  19. package/dist/collection/utils/utils.js +24 -0
  20. package/dist/esm/app-globals-0f993ce5.js +3 -0
  21. package/dist/esm/casino-engagement-suite-bar_11.entry.js +4819 -0
  22. package/dist/esm/casino-engagement-suite-container.js +20 -0
  23. package/dist/esm/index-2bd77432.js +1320 -0
  24. package/dist/esm/index.js +1 -0
  25. package/dist/esm/loader.js +11 -0
  26. package/dist/index.cjs.js +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/stencil.config.dev.js +17 -0
  29. package/dist/stencil.config.js +17 -0
  30. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-container/.stencil/packages/stencil/casino-engagement-suite-container/stencil.config.d.ts +2 -0
  31. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-container/.stencil/packages/stencil/casino-engagement-suite-container/stencil.config.dev.d.ts +2 -0
  32. package/dist/types/components/casino-engagement-suite-container/casino-engagement-suite-container.d.ts +98 -0
  33. package/dist/types/components/casino-engagement-suite-container/index.d.ts +1 -0
  34. package/dist/types/components.d.ts +86 -0
  35. package/dist/types/index.d.ts +1 -0
  36. package/dist/types/models/casino-engagement-suite-config.d.ts +163 -0
  37. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  38. package/dist/types/utils/constants.d.ts +6 -0
  39. package/dist/types/utils/utils.d.ts +2 -0
  40. package/loader/cdn.js +1 -0
  41. package/loader/index.cjs.js +1 -0
  42. package/loader/index.d.ts +24 -0
  43. package/loader/index.es2017.js +1 -0
  44. package/loader/index.js +2 -0
  45. package/loader/package.json +11 -0
  46. package/package.json +36 -0
@@ -0,0 +1 @@
1
+ import{p as e,b as i}from"./p-efde3fd4.js";export{s as setNonce}from"./p-efde3fd4.js";import{g as l}from"./p-e1255160.js";(()=>{const i=import.meta.url,l={};return""!==i&&(l.resourcesUrl=new URL(".",i).href),e(l)})().then((async e=>(await l(),i([["p-2c9a2139",[[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],remainingFreeSpins:[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],isForfeitedChallengeLabel:[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-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]},null,{challenge:["challengePropHandler"]}],[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"]],{challenges:["challengesPropHandler"]}],[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"],isForfeitedChallengeLabel:[4,"is-forfeited-challenge-label"],isSpinForfeitedLabel:[1028,"is-spin-forfeited-label"],language:[1],jackpots:[16],remainingFreeSpins:[1,"remaining-free-spins"],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],tooltip:[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]},null,{freeSpins:["spinsPropHandler"]}],[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],showTooltip:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{jackpot:["handleJackpotUpdate"]}],[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]},null,{jackpots:["jackpotsPropHandler"]}],[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]}],[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}from"./p-efde3fd4.js";import"@everymatrix/casino-engagement-suite-tournament";const a=["en"],s={en:{new:"new"}},o=class{constructor(t){e(this,t),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)}))},this.activeWidget=void 0,this.challengePercent=void 0,this.highlightChallenge=!1,this.clientStyling="",this.clientStylingUrl="",this.orientation="Landscape",this.device="Mobile",this.isChallengeLabel=!1,this.isForfeitedChallengeLabel=!1,this.isSpinForfeitedLabel=!1,this.language="en",this.jackpots=[],this.remainingFreeSpins=void 0,this.leaderboards=void 0,this.limitStylingAppends=!1,this.activeJackpot=""}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&&!this.isForfeitedChallengeLabel?"ShowChallengeLabel":"")},t("span",null,(()=>{const e=this.language;return s[void 0!==e&&a.includes(e)?e:"en"].new})())),t("div",{class:"ForfeitLabel "+(this.isForfeitedChallengeLabel?"ShowForfeitChallengeLabel":"")}))}getFreeSpinsTile(){return t("button",{class:"Tile Reward FreeSpins "+("FreeSpins"===this.activeWidget?"Active":""),"data-app":"FreeSpins",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.remainingFreeSpins),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.remainingFreeSpins].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.remainingFreeSpins&&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.remainingFreeSpins&&this.getFreeSpinsTile()))}render(){return t("div",{key:"f90aab0bf55c9016600be3ab90199de6c31874ee",class:`CasinoEngagementSuiteBar ${this.orientation} ${this.device}`,ref:e=>this.engagementSuiteBar=e},this.getTilesTemplate())}};o.style=':host{display:block}*{box-sizing:border-box}.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:0 9px;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 .Jackpot{padding:14px 8px;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)}.ShowChallengeLabel{display:inline-flex}.Landscape.CasinoEngagementSuiteBar{width:152px;padding-top:16px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer{flex-direction:column}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{width:120px;height:40px}.Portrait.CasinoEngagementSuiteBar{border-radius:0 0 var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px);height:auto;padding:10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer{gap:8px;flex-wrap:wrap}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{flex:1 1 0px;height:32px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{min-width:30%;padding:10px 8px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{min-width:20%;padding:4px 8px}.CasinoEngagementSuiteBar.Desktop.Landscape{width:252px}.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 .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 r=["en"],l={en:{challenges:"Challenges",join:"Join",unjoin:"Unjoin",details:"Challenge Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution"}},p=(e,t)=>{const i=t;return l[void 0!==i&&r.includes(i)?i:"en"][e]};var c,h;function d(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"}(c||(c={})),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",e[e.Forfeited=5]="Forfeited"}(h||(h={}));const u=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.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},this.clientStyling="",this.clientStylingUrl="",this.challenge=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.isJoiningToChallenge=void 0,this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1}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.ChallengePresentation.PresentationName,i=this.challenge.Status===h.InProgress||this.challenge.Status===h.PendingLevelReward,n=this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId),a=![h.Completed,h.Forfeited].includes(this.challenge.Status);return t("div",{class:"ChallengeDetailsHeader"},t("span",{class:"ChallengeName"},e),a?t("button",{onClick:this.changeChallengeStatus,class:`ChallengeJoinButton ${i?"Joined":""}\n ${n?"Disabled":""}`,"data-id":this.challenge.Id},p(i?"unjoin":"join",this.language)):null,t("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},t("span",null,p("new",this.language))))}getChallengeCountdown(){return this.challenge.Status!==h.Forfeited?t("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer):null}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"},p("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:a}={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:${a}s`:`${t}d:${i}h:${n}m`}getLevelTarget(e){const i=d(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let n=`${p("place",this.language)} ${i}`;return 1===e.LevelTargetType?n+=` ${p("bet",this.language)}`:2===e.LevelTargetType&&(n+=` ${p("bets",this.language)} X ${e.TargetBetCount}`),t("span",{class:"ChallengeLevelTarget"},n)}getLevelBetRangesDetails(e){var i,n,a,s;if(0===e.LevelTargetType){const o=d(null===(i=e.BetRange)||void 0===i?void 0:i.MinBet,this.challenge.CurrencySymbol),r=d(null===(n=e.BetRange)||void 0===n?void 0:n.MaxBet,this.challenge.CurrencySymbol),l=e.LevelContributionPercent+"%",c=!!(null===(a=e.BetRange)||void 0===a?void 0:a.MinBet),h=!!(null===(s=e.BetRange)||void 0===s?void 0:s.MaxBet),u=100!==e.LevelContributionPercent;if(c||h||u)return t("div",{class:"ChallengeLevelBetDetails"},c&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,p("minBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},o)),h&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,p("maxBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},r)),u&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,p("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,a)=>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 ",a+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,p("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,p("details",this.language)))}render(){return t("div",{key:"413a8354c03545a336b044a26f33275423548ee2",class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{key:"e58aac0709effc8ed9df011c07b52ee6a0c4fa66",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 g,m,b,f;u.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}.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 .ChallengePopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetailsHeader{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 .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"}(g||(g={})),function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(m||(m={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(b||(b={})),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",e[e.Forfeited=5]="Forfeited"}(f||(f={}));const v=["en"],w={en:{challenges:"Challenges",join:"Join",unjoin:"Unjoin",new:"new",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward"}},k=(e,t)=>{const i=t;return w[void 0!==i&&v.includes(i)?i:"en"][e]};function x(e){return x="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},x(e)}function F(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 C(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function y(e){C(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===x(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))}var D={};function S(){return D}var J={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function B(e,t,i){C(2,arguments);var n,a=function(e,t){return C(2,arguments),y(e).getTime()-y(t).getTime()}(e,t)/1e3;return((n=null==i?void 0:i.roundingMethod)?J[n]:J.trunc)(a)}function L(e){C(1,arguments);var t=y(e),i=t.getUTCDay(),n=(i<1?7:0)+i-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function P(e){C(1,arguments);var t=y(e),i=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var a=L(n),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var o=L(s);return t.getTime()>=a.getTime()?i+1:t.getTime()>=o.getTime()?i:i-1}function T(e,t){var i,n,a,s,o,r,l,p;C(1,arguments);var c=S(),h=F(null!==(i=null!==(n=null!==(a=null!==(s=null==t?void 0:t.weekStartsOn)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==a?a: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(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=y(e),u=d.getUTCDay(),g=(u<h?7:0)+u-h;return d.setUTCDate(d.getUTCDate()-g),d.setUTCHours(0,0,0,0),d}function M(e,t){var i,n,a,s,o,r,l,p;C(1,arguments);var c=y(e),h=c.getUTCFullYear(),d=S(),u=F(null!==(i=null!==(n=null!==(a=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==a?a:d.firstWeekContainsDate)&&void 0!==n?n:null===(l=d.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(h+1,0,u),g.setUTCHours(0,0,0,0);var m=T(g,t),b=new Date(0);b.setUTCFullYear(h,0,u),b.setUTCHours(0,0,0,0);var f=T(b,t);return c.getTime()>=m.getTime()?h+1:c.getTime()>=f.getTime()?h:h-1}function E(e,t){for(var i=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return i+n}const I=function(e,t){var i=e.getUTCFullYear(),n=i>0?i:1-i;return E("yy"===t?n%100:n,t.length)},A=function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):E(i+1,2)},z=function(e,t){return E(e.getUTCDate(),t.length)},j=function(e,t){return E(e.getUTCHours()%12||12,t.length)},R=function(e,t){return E(e.getUTCHours(),t.length)},O=function(e,t){return E(e.getUTCMinutes(),t.length)},H=function(e,t){return E(e.getUTCSeconds(),t.length)},W=function(e,t){var i=t.length,n=e.getUTCMilliseconds();return E(Math.floor(n*Math.pow(10,i-3)),t.length)};var N={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"});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 I(e,t)},Y:function(e,t,i,n){var a=M(e,n),s=a>0?a:1-a;return"YY"===t?E(s%100,2):"Yo"===t?i.ordinalNumber(s,{unit:"year"}):E(s,t.length)},R:function(e,t){return E(P(e),t.length)},u:function(e,t){return E(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 E(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"});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 E(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"});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 A(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"});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 E(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"});default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,i,n){var a=function(e,t){C(1,arguments);var i=y(e),n=T(i,t).getTime()-function(e,t){var i,n,a,s,o,r,l,p;C(1,arguments);var c=S(),h=F(null!==(i=null!==(n=null!==(a=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==a?a: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),d=M(e,t),u=new Date(0);return u.setUTCFullYear(d,0,h),u.setUTCHours(0,0,0,0),T(u,t)}(i,t).getTime();return Math.round(n/6048e5)+1}(e,n);return"wo"===t?i.ordinalNumber(a,{unit:"week"}):E(a,t.length)},I:function(e,t,i){var n=function(e){C(1,arguments);var t=y(e),i=L(t).getTime()-function(e){C(1,arguments);var t=P(e),i=new Date(0);return i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0),L(i)}(t).getTime();return Math.round(i/6048e5)+1}(e);return"Io"===t?i.ordinalNumber(n,{unit:"week"}):E(n,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):z(e,t)},D:function(e,t,i){var n=function(e){C(1,arguments);var t=y(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"}):E(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"});default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,i,n){var a=e.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return E(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,i,n){var a=e.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return E(s,t.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,i){var n=e.getUTCDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return E(a,t.length);case"io":return i.ordinalNumber(a,{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"});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"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,i){var n,a=e.getUTCHours();switch(n=12===a?"noon":0===a?"midnight":a/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"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,i){var n,a=e.getUTCHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=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"});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 j(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):R(e,t)},K:function(e,t,i){var n=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(n,{unit:"hour"}):E(n,t.length)},k:function(e,t,i){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?i.ordinalNumber(n,{unit:"hour"}):E(n,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):O(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):H(e,t)},S:function(e,t){return W(e,t)},X:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return $(a);case"XXXX":case"XX":return _(a);default:return _(a,":")}},x:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return $(a);case"xxxx":case"xx":return _(a);default:return _(a,":")}},O:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+G(a,":");default:return"GMT"+_(a,":")}},z:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+G(a,":");default:return"GMT"+_(a,":")}},t:function(e,t,i,n){return E(Math.floor((n._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,i,n){return E((n._originalDate||e).getTime(),t.length)}};function G(e,t){var i=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),s=n%60;if(0===s)return i+String(a);var o=t||"";return i+String(a)+o+E(s,2)}function $(e,t){return e%60==0?(e>0?"-":"+")+E(Math.abs(e)/60,2):_(e,t)}function _(e,t){var i=t||"",n=e>0?"-":"+",a=Math.abs(e);return n+E(Math.floor(a/60),2)+i+E(a%60,2)}const q=N;var U=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"});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"});default:return t.time({width:"full"})}},Q={p:Y,P:function(e,t){var i,n=e.match(/(P+)(p+)?/)||[],a=n[1],s=n[2];if(!s)return U(e,t);switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",U(a,t)).replace("{{time}}",Y(s,t))}};const V=Q;var X=["D","DD"],K=["YY","YYYY"];function Z(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 ee={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 te(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth;return e.formats[i]||e.formats[e.defaultWidth]}}var ie,ne={date:te({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:te({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:te({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ae={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function se(e){return function(t,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=null!=i&&i.width?String(i.width):a;n=e.formattingValues[s]||e.formattingValues[a]}else{var o=e.defaultWidth,r=null!=i&&i.width?String(i.width):e.defaultWidth;n=e.values[r]||e.values[o]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function oe(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,a=t.match(n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth]);if(!a)return null;var s,o=a[0],r=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e){for(var t=0;t<e.length;t++)if(e[t].test(o))return t}(r):function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t].test(o))return t}(r);return s=e.valueCallback?e.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:t.slice(o.length)}}}const re={code:"en-US",formatDistance:function(e,t,i){var n,a=ee[e];return n="string"==typeof a?a:1===t?a.one:a.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 ae[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:se({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:se({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:se({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:se({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:se({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:(ie={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(ie.matchPattern);if(!i)return null;var n=i[0],a=e.match(ie.parsePattern);if(!a)return null;var s=ie.valueCallback?ie.valueCallback(a[0]):a[0];return{value:s=t.valueCallback?t.valueCallback(s):s,rest:e.slice(n.length)}}),era:oe({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:oe({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:oe({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:oe({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:oe({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}};var le=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ce=/^'([^]*?)'?$/,he=/''/g,de=/[a-zA-Z]/;function ue(e,t,i){var n,a,s,o,r,l,p,c,h,d,u,g,m,b,f,v,w,k;C(2,arguments);var D=String(t),J=S(),B=null!==(n=null!==(a=null==i?void 0:i.locale)&&void 0!==a?a:J.locale)&&void 0!==n?n:re,L=F(null!==(s=null!==(o=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:J.firstWeekContainsDate)&&void 0!==o?o:null===(h=J.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=F(null!==(u=null!==(g=null!==(m=null!==(b=null==i?void 0:i.weekStartsOn)&&void 0!==b?b:null==i||null===(f=i.locale)||void 0===f||null===(v=f.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:J.weekStartsOn)&&void 0!==g?g:null===(w=J.locale)||void 0===w||null===(k=w.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==u?u:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!B.localize)throw new RangeError("locale must contain localize property");if(!B.formatLong)throw new RangeError("locale must contain formatLong property");var T=y(e);if(!function(e){if(C(1,arguments),!function(e){return C(1,arguments),e instanceof Date||"object"===x(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=y(e);return!isNaN(Number(t))}(T))throw new RangeError("Invalid time value");var M=function(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()}(T),E=function(e,t){return C(2,arguments),function(e,t){C(2,arguments);var i=y(e).getTime(),n=F(t);return new Date(i+n)}(e,-F(t))}(T,M),I={firstWeekContainsDate:L,weekStartsOn:P,locale:B,_originalDate:T};return D.match(pe).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,V[t])(e,B.formatLong):e})).join("").match(le).map((function(n){if("''"===n)return"'";var a,s,o=n[0];if("'"===o)return(s=(a=n).match(ce))?s[1].replace(he,"'"):a;var r=q[o];if(r)return null!=i&&i.useAdditionalWeekYearTokens||-1===K.indexOf(n)||Z(n,t,String(e)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==X.indexOf(n))||Z(n,t,String(e)),r(E,n,B.localize,I);if(o.match(de))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return n})).join("")}function ge(e,t){C(2,arguments);var i=y(e),n=y(t);return i.getTime()<n.getTime()}const me=(e,i,n,a)=>0===e.length?t("p",{class:"HistoryEmptyMessage"},k("noHistory",a)):t("div",{class:"HistoryList"},e.map((e=>t("div",{key:e.ProgressId,class:"HistoryListItem "+(i.includes(e.ProgressId)?"Opened":"Closed")},t("header",{class:"HistoryListItemHeader","data-id":e.ProgressId,onClick:n},e.Name,t("button",{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"},((e,t)=>{switch(e){case m.Completed:return k("completed",t);case m.Expired:return k("expired",t);case m.Forfeited:return k("forfeited",t);default:return e}})(e.Status,n)),t("span",{class:"Time"},ue(new Date(e.Time),"LLL d, yyyy HH:mm:ss"))))(e,i,a),(e=>!!e.Rewards&&e.Status===m.Completed)(e)&&((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===g.Custom,a=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"},a),!n&&t("div",{class:"HistoryRewardStatusIcon"}))})(e,i)))))(e,a)))))))))),be=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),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}})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.isJoiningToChallenge=void 0,this.inProgressChallenges=void 0,this.pausedChallengeIds=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.activeTab=1,this.historyLoading=!1,this.challengesHistory=void 0,this.openedHistoryIds=[]}handleEvent(e){const{type:t}=null==e?void 0:e.data;"ChallengesHistoryResponse"===t&&(this.openedHistoryIds=[],this.challengesHistory=e.data.data||[],this.historyLoading=!1),"BarChallengesClick"===t&&(this.activeTab=1,this.openedHistoryIds=[])}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!==f.Expired)).reduce(((t,i)=>{const n=new Date(i.ExpirationTime).getTime()-e;let a="00h:00m:00s";if(n<1)this.removeChallenge(i.Id);else{const{days:e,hours:t,minutes:i,seconds:s}={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")};a="00"===e?`${t}h:${i}m:${s}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:a})}),{})}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===f.InProgress&&!this.pausedChallengeIds.includes(e.ChallengeId),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===f.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.ChallengeId)}isChallengeCompleted(e){return e.Status===f.Completed||e.Status===f.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===f.Completed)return 100;if(this.isChallengePaused(e)||e.Status===f.PendingLevelReward||e.Status===f.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===b.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===b.Fillup||e.ProgressStatus===b.Completed)).slice(-1)[0];return t?t.ProgressPercentage:i?i.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:i}=e,n=e.Status===f.InProgress||e.Status===f.PendingLevelReward;return t("div",{class:"ChallengeCardHeader"},t("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),e.Status!==f.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=e.Status===f.Forfeited,n=this.getChallengeProgress(e),a=this.timers[e.Id],s=n>-1?t("casino-engagement-suite-progress-bar",{class:this.device,value:n,disabled:this.isChallengePaused(e)},t("span",{slot:"Title",class:"ChallengeCountdown"},a)):t("span",{class:"ChallengeCountdown"},a);return i?this.getForfeitedChallengeTemplate(e):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))))}getForfeitedChallengeTemplate(e){return t("div",{class:"ChallengeCard ForfeitedChallengeCard"},t("div",{class:"ForfeitedChallengeName"},e.ChallengePresentation.PresentationName),t("div",{class:"ForfeitedChallengeInfo"},t("div",null,t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg",alt:"Forfeited"})),t("div",{class:"ForfeitedChallengeMessage"},t("div",null,k("missionHasBeenForfeited",this.language)),t("div",null,k("support",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].sort((e=>e.Status===f.InProgress?-1:0)).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)))):me(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",{key:"c97094033153bc81185e96ab77da5f3bd7618d36",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"]}}};var fe,ve;function we(){return window.screen.orientation.type.includes("portrait")?"Portrait":"Landscape"}be.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}.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}.ChallengesListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:8px 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}.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 .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}',"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"}(fe||(fe={})),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",e[e.Forfeited=5]="Forfeited"}(ve||(ve={}));const ke="TARGET_MODAL",xe=class{constructor(t){e(this,t),this.openModal=i(this,"openModal",7),this.closeModal=i(this,"closeModal",7),this.handlePopupClose=(e,t)=>()=>{"showChallengesList"===e&&this.isForfeitedChallengeLabel&&(this.isForfeitedChallengeLabel=!1,this.setChallengePercent()),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.handleFreeSpinsPopupBack=()=>{this.showFreeSpinsDetails=!1,this.showFreeSpinsList=!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=we(),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=""},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.challengePercent=void 0,this.remainingFreeSpins=void 0,this.highlightChallenge=!1,this.limitStylingAppends=!1,this.activeWidget=void 0,this.challenges=void 0,this.inProgressChallenges=void 0,this.jackpots=[],this.freeSpins=void 0,this.leaderboards=void 0,this.gameSlug="",this.pausedChallengeIds=[],this.isChallengeLabel=!1,this.isForfeitedSpinsLabel=!1,this.isForfeitedChallengeLabel=!1,this.isJoiningToChallenge=!1,this.selectedChallenge=void 0,this.selectedJackpot=void 0,this.selectedSpin=void 0,this.selectedSpinId=void 0,this.selectedChallengeId=void 0,this.selectedJackpotId=void 0,this.barHeight=0}handleEvent(e){var t;const i=null==e?void 0:e.data,{type:n}=i,a=function(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 a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(i[n[a]]=e[n[a]])}return i}(i,["type"]);switch(n){case"ChallengeGrant":{const t=e.data.data.challengeProgressData[0],i=this.challenges.findIndex((e=>B(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"CampaignGrant":this.grantFreeSpinCampaigns(e.data.data);break;case"ForfeitCampaign":{const t=e.data.data.toString();this.freeSpins.find((e=>e.Id===t)).IsForfeited=!0,this.freeSpins=[...this.freeSpins],this.isForfeitedSpinsLabel=!0,this.setRemainingFreeSpins();break}case"ChallengeForfeitNotification":{const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.ChallengeId===e.data.data.ChallengeId));i&&(i.Status=5,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))],this.challenges=[...this.challenges],this.isForfeitedChallengeLabel=!0,this.setChallengePercent());break}case"ChallengeHasExpired":this.setChallengePercent();break;case"FreeSpinHasExpired":this.setRemainingFreeSpins();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.find((e=>e.AwardBonusId===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"UpdateFreeSpinsProgress":this.updateFreeSpinsProgress(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:n}=a.data,s={modalType:(null==n?void 0:n.length)?"REWARD_MODAL":"SUPPORT_MODAL",rewardMessage:this.getRewardMessage(e,t),hasError:i};this.openModal.emit(s);break}case"ShowConfirmationModal":this.openModal.emit({modalType:ke,confirmationData:a});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(ke),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=we(),this.device=function(){const e=navigator.userAgent.toLowerCase(),t=screen.availWidth,i=screen.availHeight;if(e.includes("iphone"))return"Mobile";if(e.includes("ipad"))return"Tablet";if(e.includes("android")){if(i>t&&t<800)return"Mobile";if(t>i&&i<800)return"Tablet"}return"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===ve.InProgress||e.Status===ve.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.setRemainingFreeSpins(),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)||void 0===e?void 0:e.filter((e=>e.IsForfeited)).length))}setChallengePercent(){if(!this.challenges)return;this.highlightChallenge=this.isForfeitedChallengeLabel;const e=this.challenges.find((e=>e.Status===ve.InProgress));if(e){const t=e.LevelProgresses.find((e=>e.ProgressStatus===fe.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===fe.Fillup||e.ProgressStatus===fe.Completed)).slice(-1)[0];this.highlightChallenge=e.LevelProgresses.every((e=>100===e.ProgressPercentage))||this.isForfeitedChallengeLabel,this.challengePercent=t?`${t.ProgressPercentage}%`:i?`${i.ProgressPercentage}%`:"0%"}else this.challengePercent="—"}setRemainingFreeSpins(){this.freeSpins&&(this.remainingFreeSpins=this.freeSpins.length?this.freeSpins.filter((e=>!e.IsForfeited)).reduce(((e,t)=>e+(t.NumberOfFreeSpins-t.NumberOfUsedFreeSpins)),0).toString():"—")}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===ve.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()}updateFreeSpinsProgress(e){var t;const i=null===(t=this.freeSpins)||void 0===t?void 0:t.find((t=>t.AwardBonusId===e.AwardBonusId));if(i&&(i.NumberOfUsedFreeSpins=e.NumberOfUsedFreeSpins,i.VendorFreeSpinsRemainingCost=e.VendorFreeSpinsRemainingCost,this.freeSpins=[...this.freeSpins]),this.showFreeSpinsDetails&&this.selectedSpinId===e.AwardBonusId){const e=this.freeSpins.find((e=>e.AwardBonusId===this.selectedSpinId));e&&(this.selectedSpin=Object.assign({},e))}this.setRemainingFreeSpins()}updateChallengeStatus(e,t,i){var n;const a=null===(n=this.challenges)||void 0===n?void 0:n.find((t=>t.Id===e));a&&(a.Status=t,this.inProgressChallenges=i?[...this.inProgressChallenges,a.Id]:this.inProgressChallenges.filter((e=>e!==a.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))}}}grantFreeSpinCampaigns(e){e.forEach((e=>{const t=this.freeSpins.findIndex((t=>B(new Date(t.ExpiryDate),new Date(e.ExpiryDate))>0));t>-1?this.freeSpins.splice(t,0,e):this.freeSpins.push(e),this.freeSpins=[...this.freeSpins]})),this.setRemainingFreeSpins()}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})),t("div",{class:this.showFreeSpinsDetails?"Backdrop Opened":"Backdrop"},this.showFreeSpinsDetails&&t("casino-engagement-suite-free-spins-details",{device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleFreeSpinsPopupBack,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,a,s;return(null===(s=null===(a=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===a?void 0:a.find((e=>e.LevelId===t)))||void 0===s?void 0:s.CustomRewardMessage)||""}render(){return t("div",{key:"70922a17bf1ca3ac0f1a02b42a1963437037b76f",class:`CasinoEngagementSuiteContainer ${this.device} ${this.orientation}`,style:{"--barHeight":`${this.barHeight}px`}},t("div",{key:"77f2b9e4f14ea09a453760225117ed228986c5f8",class:"barWrapper",ref:e=>this.barWrapperEl=e},t("casino-engagement-suite-bar",{key:"d01b26a0945b4ad0d828d3740dfbf17fc1f9cbda",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,remainingFreeSpins:this.remainingFreeSpins,highlightChallenge:this.highlightChallenge,"challenge-percent":this.challengePercent,"is-forfeited-challenge-label":this.isForfeitedChallengeLabel})),this.challenges&&this.getChallengesWidgets(),this.freeSpins&&this.getFreeSpinWidgets(),!!this.jackpots.length&&this.getJackpotsWidgets(),this.leaderboards&&this.getLeaderboardsWidgets(),t("casino-engagement-suite-modal-container",{key:"9551803550c768a85c85861a1d2619050684943f",device:this.device,isJoiningToChallenge:this.isJoiningToChallenge}))}get host(){return n(this)}};xe.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 Fe=["en"],Ce={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"}},ye=(e,t)=>{const i=t;return Ce[void 0!==i&&Fe.includes(i)?i:"en"][e]},De=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),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.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},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()},this.clientStyling="",this.clientStylingUrl="",this.spin=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.isJoiningToChallenge=void 0,this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.activeTab=1,this.visibleGames=[],this.tooltip=!1}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"},ye("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"},i-n),"/",i))}getFreeSpinsCountdown(){const e=this.isExpiredChallenge?"Expired":this.timer,{VendorFreeSpinsCost:i,VendorFreeSpinsRemainingCost:n,CurrencySymbol:a}=this.spin;return t("div",{class:"FreeSpinsCountdown "+(this.isExpiredChallenge?"Expired":"")},e,t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},a,n),"/",a,i))}getTabsTemplate(){return t("div",{class:"FreeSpinsDetailsTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"FreeSpinsDetailsTab "+(1===this.activeTab?"Active":"")},ye("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"FreeSpinsDetailsTab "+(2===this.activeTab?"Active":"")},ye("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,ye("details",this.language))),this.showDetails&&t("p",{class:"FreeSpinsDescription"},this.spin.FreeSpinCampaignPresentation.Description))}getSpinInfoTemplate(){var e;const{NumberOfFreeSpins:i,NumberOfUsedFreeSpins:n,VendorFreeSpinsCost:a,CurrencySymbol:s,VendorFreeSpinsRemainingCost:o}=this.spin,r="GreenTube"===(null===(e=this.spin)||void 0===e?void 0:e.VendorName);return t("div",null,this.spin.FreeSpinCampaignPresentation.Description&&this.getSpinsDetailsTemplate(),t("div",{class:"FreeSpinsInfo"},t("div",{class:"FreeSpinsInfoItem"},ye("quantityGranted",this.language),": ",t("span",null,i)),t("div",{class:"FreeSpinsInfoItem"},ye("quantityLeft",this.language),": ",t("span",null,i-n)),t("div",{class:"FreeSpinsInfoItem"},ye("valueGranted",this.language),": ",t("span",null,s,a),r&&t("button",{onClick:this.showTooltip,class:"FreeSpinsIconButton FreeSpinsValueGrantedTooltip"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"}))),t("div",{class:"FreeSpinsInfoItem"},ye("valueLeft",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"},ye("tc",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"})),t("p",{class:"FreeSpinsTooltipText"},ye("tooltip",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},ye("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:a}={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:${a}s`:`${t}d:${i}h:${n}m`}render(){return t("div",{key:"fcdbb870ec56eef160f1849f63feb110a78188eb",class:`FreeSpinsDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{key:"0c2f99e4717a06e0062c93a7c3f0070d352b3d76",class:"FreeSpinsDetails"},this.getFreeSpinsHeader(),this.getFreeSpinsCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.getTooltipTemplate()))}get host(){return n(this)}};De.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 Se=["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"}},Be=(e,t)=>{const i=t;return Je[void 0!==i&&Se.includes(i)?i:"en"][e]},Le=class{constructor(t){e(this,t),this.close=i(this,"close",7),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},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.freeSpins=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newSpinIds=[]}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 a="00h:00m:00s";if(n<1)this.removeFreeSpin(i.AwardBonusId);else{const{days:e,hours:t,minutes:i,seconds:s}={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")};a="00"===e?`${t}h:${i}m:${s}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.AwardBonusId]:a})}),{})}removeFreeSpin(e){const t=this.freeSpins.findIndex((t=>t.AwardBonusId===e));t>-1&&(this.freeSpins.splice(t,1),window.postMessage({type:"FreeSpinHasExpired",awardBonusId:e}))}getFreeSpinClasses(e){return{FreeSpinsCard:!0,Forfeited:e.IsForfeited,FreeSpinsEmptyNumber:e.NumberOfFreeSpins===e.NumberOfUsedFreeSpins}}getChallengeHeaderTemplate(e){const{VendorName:i,NumberOfUsedFreeSpins:n,NumberOfFreeSpins:a,IsForfeited:s}=e,o=a-n;return t("div",{class:"FreeSpinsCardHeader"},t("div",{class:"FreeSpinsName "+(s?"Forfeited":"")},i),s?null:t("div",{class:"FreeSpinsCounter"},t("div",{class:o?"FreeSpinsHighlightedCounter":"FreeSpinsEmptyCounter"},o),"/",a))}getFreeSpinTemplate(e){const i=this.timers[e.AwardBonusId],{VendorFreeSpinsRemainingCost:n,VendorFreeSpinsCost:a,CurrencySymbol:s,IsForfeited:o}=e,r=this.newSpinIds.includes(e.AwardBonusId);return t("div",{class:this.getFreeSpinClasses(e),onClick:this.handleSpinClick,key:e.AwardBonusId,"data-id":e.AwardBonusId},o?null:t("div",{class:"SpinLabel "+(r?"ShowSpinLabel":"")},t("span",null,Be("new",this.language))),this.getChallengeHeaderTemplate(e),o?t("div",{class:"ForfeitedMessage"},t("div",null,Be("forfeited",this.language)),t("div",null,Be("support",this.language))):t("div",{class:"FreeSpinsCountdownWrapper"},t("span",{class:"FreeSpinsCountdown"},i),t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},s,n),"/",s,a)))}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"},Be("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,Be("noSpins",this.language)),t("p",null,Be("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"})),Be("tooltip",this.language))):""}render(){return t("div",{key:"bf31b3cb6a4e8c73f3ccabe3c11929e100517f84",class:`FreeSpinsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{freeSpins:["spinsPropHandler"]}}};Le.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}.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}.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{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.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 Pe=["en"],Te={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot’s won!",loadMore:"Load More",jackpotDetails:"Jackpot Details"}},Me=(e,t)=>{const i=t;return Te[void 0!==i&&Pe.includes(i)?i:"en"][e]};function Ee(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}const Ie=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),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.toggleTooltip=()=>{this.showTooltip=!this.showTooltip},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}})},this.clientStyling="",this.clientStylingUrl="",this.jackpot=void 0,this.jackpotChangeStatusRequest=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.enabled=!1,this.balance=void 0,this.winBalance=void 0,this.showDetails=!1,this.jackpotEndTime="",this.showTooltip=!1}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":i.Success&&this.jackpot.JackpotId in i.JackpotIds&&(this.enabled=this.jackpot.Enabled=i.JackpotIds[this.jackpot.JackpotId])}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames(),this.showTooltip=!1}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"},Me("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 Ee(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{PopupButton:!0,Active:this.enabled,Loading:this.jackpot.Pending}}getJackpotDetailsHeaderTemplate(){const e=ge(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},Me(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&t("div",{class:"JackpotIsWon"},Me("jackpotIsWon",this.language))))}getTabsTemplate(){return t("div",{class:"JackpotDetailsTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(1===this.activeTab?"Active":"")},Me("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(2===this.activeTab?"Active":"")},Me("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,Me("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"},Me("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var e,i,n,a;if(this.jackpot.BetLimits){const s=this.jackpot.Currency,o=Object.keys(this.jackpot.BetLimits),r=o.find((e=>e===s))||o[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=Ee(null===(n=this.jackpot.BetLimits[r])||void 0===n?void 0:n.MinBet,r),h=Ee(null===(a=this.jackpot.BetLimits[r])||void 0===a?void 0:a.MaxBet,r);return t("div",null,l&&t("div",{class:"JackpotInfoItem"},Me("minBet",this.language),": ",t("span",null,c)),p&&t("div",{class:"JackpotInfoItem"},Me("maxBet",this.language),": ",t("span",null,h)))}}getJackpotInfoTemplate(){return t("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),t("div",{class:"JackpotInfo"},t("div",{class:"JackpotInfoItem"},Me("betContribution",this.language),": ",t("span",null,+this.jackpot.ContributionPercent,"%")),t("div",{class:"JackpotInfoItem"},Me("type",this.language),": ",t("span",null,this.jackpot.JackpotTypePresentation)),t("div",{class:"JackpotInfoItem"},Me("winningProbability",this.language),": ",t("span",null,"1:",this.jackpot.Probability)),t("div",{class:"JackpotInfoItem"},Me("operatorContribution",this.language),": ",t("span",null,+this.jackpot.OperatorContributionPercent,"%"),t("button",{class:"JackpotContributionTooltipButton",onClick:this.toggleTooltip})),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},Me("loadMore",this.language)):""]}getJackpotCountdown(){const e=Me(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:a}={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:${a}s`:`${t}d:${i}h:${n}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus||ge(new Date(this.jackpot.JackpotEndTime),new Date),[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}getTooltipTemplate(){return t("div",{class:"JackpotsTooltipBackdrop"},t("div",{class:"JackpotsTooltip"},t("button",{class:"JackpotsIconButton",onClick:this.toggleTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),Me("contributionTooltip",this.language)))}render(){return t("div",{key:"1588370db82c0c7d4118fce75e60cb2e1204c9f3",class:this.getPopupClasses()},this.getTopNavigationTemplate(),t("div",{key:"320b03501c86164369fc715590cfbbfa6dc8bf3e",class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.showTooltip&&this.getTooltipTemplate()))}get host(){return n(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};Ie.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none}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 .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:20px 0 12px;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)}.JackpotInfoItem .tc{color:var(--emw--color-primary, #59D1FF)}.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-bottom: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")}.JackpotDescription{margin-bottom:20px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-bottom: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 .JackpotDetailsTabs,.JackpotDetailsPopup.Desktop .JackpotDetailsTabs{margin-bottom:20px}.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 Ae=["en"],ze={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",allJackpotsSuspended:"Unfortunately, there are no available jackpots to join. Please, try again later.",jackpotIsWon:"Jackpot is Won",termsAndConditions:"Terms and Conditions",winingProbability:"Winning Probability",type:"Type",operatorContribution:"Operator Contribution",outdatedJackpotCountdown:"We are going to remove this Jackpot in 30 days"}},je=(e,t)=>{const i=t;return ze[void 0!==i&&Ae.includes(i)?i:"en"][e]},Re=class{constructor(t){e(this,t),this.close=i(this,"close",7),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=null},this.toggleTooltip=e=>{e.stopPropagation(),this.tooltip=this.tooltip?null:je(e.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=e=>{e.stopPropagation()},this.handleJackpotClick=e=>{const t=+e.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:t})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.jackpotChangeStatusRequest=void 0,this.tooltip=null,this.timers={},this.limitStylingAppends=!1}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 a="00h:00m:00s";const{days:s,hours:o,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 a="00"===s?`${o}h:${r}m:${l}s`:`${s}d:${o}h:${r}m`,Object.assign(Object.assign({},t),{[i.JackpotId]:a})}),{})}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||ge(new Date(e.JackpotEndTime),new Date),InProgress:e.Enabled&&!e.IsClosed}}getJackpotHeaderTemplate(e){const i=!!e.WinBalance,n=je(e.Type,this.language),a=je(e.Reason,this.language),s=(null==e?void 0:e.IsClosed)?a:n,o=`JackpotBalance Jackpot${je(e.Type,this.language)}`,r=e.Enabled?"JackpotJoinButton Joined":"JackpotJoinButton",l=je(e.Enabled?"unjoin":"join",this.language),p=e.Pending||(null==e?void 0:e.IsClosed)||ge(new Date(e.JackpotEndTime),new Date);return t("div",{class:"JackpotCardHeader"},t("div",{class:"JackpotTitle"},t("span",{class:"JackpotName"},s),t("span",{class:o},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"},je("jackpotIsWon",this.language)))}getJackpotDescriptionTemplate(e){const i=+e.OperatorContributionPercent+"%",n=`1:${e.Probability}`,a=ge(new Date(e.JackpotEndTime),new Date)?je("outdatedJackpotCountdown",this.language):this.timers[e.JackpotId],s=je("operatorContribution",this.language),o=je("type",this.language),r=je("winningProbability",this.language);return t("div",{class:"JackpotCardDescription"},!e.IsClosed&&t("span",{class:"JackpotCountdown"},a),t("div",{class:"JackpotCardDescriptionBlock"},t("div",{class:"JackpotCardDescriptionRow"},t("span",null,s,":"),t("span",{class:"JackpotDescriptionValue"},i,t("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,n),this.renderDescriptionRowInfo(`${o}:`,e.JackpotTypePresentation),t("a",{href:e.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},je("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.toggleTooltip,"data-tooltip":"tooltip",class:"JackpotsIconButton"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),t("div",{class:"JackpotsListPopupHeaderName"},je("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,je("allJackpotsClosed",this.language))),t("div",{class:"JackpotsList"},this.jackpots.map((e=>this.getJackpotTemplate(e))))):t("div",{class:"JackpotsListClosed"},t("h2",null,je("allJackpotsClosed",this.language)))}getTooltipTemplate(){return t("div",{class:"JackpotsTooltipBackdrop"},t("div",{class:"JackpotsTooltip"},t("button",{class:"JackpotsIconButton",onClick:this.toggleTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),this.tooltip))}render(){return t("div",{key:"6023f09563b6f9161bbcf8426610cf17233cdc4d",class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};Re.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}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: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:not([disabled]).Joined::before,.JackpotCard.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}.JackpotCard.JackpotCardSuspended *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardSuspended .JackpotBalance,.JackpotCard.JackpotCardSuspended .JackpotWon{-webkit-text-fill-color:var(--emw--color-primary, #8F8B9C)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle{display:flex;flex-direction:column;justify-content:space-between}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word;margin-bottom:4px}.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-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:12px;line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px}.JackpotCardDescriptionColumn{display:flex;flex-direction:column;row-gap:4px}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size: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: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:not([disabled])::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;pointer-events:none;cursor:auto}.JackpotsListSuspended{padding:20px 19px}.JackpotsListSuspended h2{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size: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: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 .JackpotCardHeader,.JackpotsListPopup.Desktop .JackpotCardHeader{margin-bottom:16px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:22px}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:14px;line-height: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}';const Oe=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),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)}))},this.clientStyling="",this.clientStylingUrl="",this.isOpen=void 0,this.isLoading=void 0,this.header=void 0,this.contentIcon=void 0,this.modalType=void 0,this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return t("div",{key:"8285e9a45ca4c3ce4fb17e67d5804bc9b6c503a5",class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},t("div",{key:"9c0fca26014ebe7fa8ed9c5304ff2508b872f358",class:"ModalWinAnimation"}),t("div",{key:"7281f0aef2ae65ba58a7afee7d070c1caf34f1c3",class:"ModalContent GradientBorder"},t("div",{key:"7db7f93904c057b80e78d982ee73baed6b91fc7b",class:"IconCloseContainer"},t("button",{key:"9ea9de79010807ff507c88897acddb4ca3d1ddcf",class:"IconCloseButton",onClick:this.handleCloseClick},t("img",{key:"75f3155c2ccc0c98c0ae195057dd1ccf80939549",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",{key:"11dc59541107ba88928c8d56d87bf4c1e879b28a",class:"ModalHeader"},t("h1",{key:"0587e3a15ef19b4e087e5c0262f974709d269baf"},this.header)),t("div",{key:"826992ac3be61bbdff34f51e9e089efb18d07ce5",class:"ModalBodyWrapper"},t("div",{key:"a80b16956ef7a1941638e99fb0c0ad7166137037",class:"ModalBody"},t("slot",{key:"41882aa05cea337febb2b2c4dad7c0089239b181",name:"body"})),t("div",{key:"6f4e855d70851eaa7ba3f58389110aa35431f03f",class:"ModalFooter"},t("slot",{key:"737fe84975e121d5162d7824c577b4028dc327eb",name:"footer"})))))}get host(){return n(this)}};Oe.style=':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}.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}.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}.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);margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;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}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const He=["en"],We={en:{joinHeader:"Choose another challenge?",desc:"Any progress on the current challenge will be kept and you can rejoin the challenge at any time.",joinQuestion:"Would you still like to join another challenge?",joinConfirm:"Yes, join another challenge",joinReject:"No, stay at current challenge",unJoinHeader:"Quit Challenge?",unJoinQuestion:"Would you still like to quit the challenge?",unJoinConfirm:"Yes, I want to quit challenge",unJoinReject:"No, stay at challenge",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",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!"}},Ne=(e,t)=>{const i=t;return We[void 0!==i&&He.includes(i)?i:"en"][e]},Ge=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),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))),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.isJoiningToChallenge=void 0,this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewardMessage="",this.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""}}openModalHandler(e){const{modalType:t,rewardMessage:i,hasError:n,confirmationData:a,winAmount:s}=e.detail;s&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+s.amount,currency:s.currency}:s),this.openModals=[...this.openModals,t],this.rewardMessage=i,this.hasError=n,a&&(this.confirmationData=a)}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",{key:"136c2521b6ce142d9c0dddf9300526e156b937d6",class:`ModalContainer ${this.device}`},t("casino-engagement-suite-modal",{key:"151a21ef6d3b0e5f3d82ebe45f0a22aa519821bb",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",{key:"00d4a4ea4d1a790d68a06156b4829b1b181c072f",slot:"body"},t("div",{key:"dff1a278e656acaec2aa5045a54dd12226f5ac61"},Ne("won",this.language)," ",t("span",{key:"bf8eccf6e0221fab5fb319ca05a61917956dc2b0",class:"ModalReward"},this.rewardMessage)),this.hasError&&t("div",{key:"b9ab84114f91fc3e2d80bc5871afd804abb3daab",class:"SupportInfo"},Ne("supportInfo",this.language))),t("div",{key:"e45e9a072f5cf1bb5d36d232896dffbeff110621",slot:"footer"},t("button",{key:"c76d8b69e2ceef4f93fd01319b79e09e638e4212",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},Ne("continue",this.language)))),t("casino-engagement-suite-modal",{key:"cd1500c95db9670004deaee3f374aff36dbdb156",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",{key:"a6832af4eb48940d5c573ed906a7511082c1b59e",slot:"body"},t("div",{key:"ad484526c5fbfcd2aa8280f6050c573022b6c04e",class:"JackpotWinText"},Ne("jackpotWin",this.language)),t("div",{key:"3475b1d2824afd37f07cfbbe7db97b15f56f9772",class:"JackpotWinAmount"},(i=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(i)}`))),t("div",{key:"d5da13989c807d509a307fe21e5eb37d2f417926",slot:"footer"},t("button",{key:"43b080260542d91712e8ae956e6e97e4d51ba4ac",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},Ne("continue",this.language)),t("div",{key:"145b2a136d92cdf575267d9350ea8c673cac6a21",class:"JackpotWinInfoText"},Ne("jackpotWinInfo",this.language)))),t("casino-engagement-suite-modal",{key:"ef905b8a730bdae1f03711fecef7b32b15b8d98d",isOpen:this.isModalOpen("TARGET_MODAL"),header:Ne(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},t("div",{key:"cf234ba1fef13cade20db68b8a5c8973fe7a2285",slot:"body"},t("div",{key:"1ed85c4005cf467491b96e4a1ecc76f635bae15d",class:"LeftAlign"},Ne("desc",this.language)),t("div",{key:"1cbad96502b6fc3d730ae7301e062728e1030cd6",class:"LeftAlignQuestion"},Ne(e?"joinQuestion":"unJoinQuestion",this.language))),t("div",{key:"c288c8eddba30f36c4aa9d59c12c47c84033cecd",slot:"footer",class:"ManyActions"},t("button",{key:"184eddbe4d080628f87ab863b2f045d85a2122d5",class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},Ne(e?"joinConfirm":"unJoinConfirm",this.language)),t("button",{key:"aa165d256092a64d907645cc62102156d4caf02b",class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},t("div",{key:"5bb286abafdd1676ddb3080fc1e96adfd68af39f",class:"GradientText"},Ne(e?"joinReject":"unJoinReject",this.language))))),t("casino-engagement-suite-modal",{key:"44ab65b8618af413b70e647ba6d497a581dbff91",isOpen:this.isModalOpen("SUPPORT_MODAL"),header:Ne("noReward",this.language),contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",modalType:"SUPPORT_MODAL",device:this.device},t("div",{key:"fe6cff805502a17e61d4c9bae8a434635f708e58",slot:"body"},t("span",{key:"aae084da0430fc62a484f16c1fe7dc1278955b5e"},Ne("contactSupport",this.language))),t("div",{key:"ff10b11d061bfafe306491afe8461da76dfd991c",slot:"footer"},t("button",{key:"ae2a9345e70d5dd24c7c52aa15a3734464074f81",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},Ne("okContinue",this.language)))));var i}get host(){return n(this)}};Ge.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 16px;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 rgba(0, 0, 0, 0.1490196078), -0.41px 0.41px 2px 0px rgba(0, 0, 0, 0.5019607843);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}.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}.LeftAlign{text-align:left;line-height:1.2}';const $e=class{constructor(t){e(this,t),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.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1}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",{key:"ecce3a26a92d2e090c1db84bdc1bdbeb505080ed",class:this.getProgressBarClasses(),part:"ProgressBar"},t("div",{key:"649fe1103d222200f2a1ad3b5967e37da1f1ab3d",class:"ProgressBarInfo",part:"ProgressBarInfo"},t("slot",{key:"49dc180eedd823f0027f75099813fb9d91bcd938",name:"Title"},t("div",{key:"e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5"})),t("slot",{key:"3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e",name:"Percent"},t("div",{key:"6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad",class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),t("div",{key:"141106e77caad7b04bb199f911e87c0c6f0adc2d",class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return n(this)}};$e.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.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}.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)}";export{o as casino_engagement_suite_bar,u as casino_engagement_suite_challenges_details,be as casino_engagement_suite_challenges_list,xe as casino_engagement_suite_container,De as casino_engagement_suite_free_spins_details,Le as casino_engagement_suite_free_spins_list,Ie as casino_engagement_suite_jackpot_details,Re as casino_engagement_suite_jackpots_list,Oe as casino_engagement_suite_modal,Ge as casino_engagement_suite_modal_container,$e as casino_engagement_suite_progress_bar}
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?w(b):f.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(m),$(y),(p=m.length>0)&&f.raf(b)},w=e=>h().then(e),g=v(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>x});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,P=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),D={},L=e=>n(e).$hostElement$,T=(e,t,n)=>{const l=L(e);return{emit:e=>F(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},F=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},H=new WeakMap,N=e=>"sc-"+e.$,U=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},W=/\s/,q=e=>e?e.split(W):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||S,s=t.u||S;for(const e of z(Object.keys(o)))e in s||U(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))U(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=!1,J=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else if(o=l.v=a.createElement(l.m),_(null,l,I),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=J(e,l,r),s&&o.appendChild(s);return o["s-hn"]=M,o},K=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=J(null,n,o),r&&(l[o].v=r,ee(i,r,t)))},Q=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;Z(t),e&&e.remove()}}},X=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Y=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.i;null===r?(("slot"!==t.m||B)&&_(e,t,I),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(X(h,m,o))Y(h,m,o),h=t[++i],m=l[++c];else if(X(d,y,o))Y(d,y,o),d=t[--f],y=l[--p];else if(X(h,y,o))Y(h,y,o),ee(e,h.v,d.v.nextSibling),h=t[++i],y=l[--p];else if(X(d,m,o))Y(d,m,o),ee(e,d.v,h.v),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=J(t&&t[c],n,u):(Y(r,m,o),t[u]=void 0,s=r.v),m=l[++c]):(s=J(t&&t[c],n,c),m=l[++c]),s&&ee(h.v.parentNode,s,h.v)}i>f?K(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&Q(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),K(l,null,t,s,0,s.length-1)):!n&&null!==o&&Q(o,0,o.length-1)):e.i!==r&&(l.data=r)},Z=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Z)},ee=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),te=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ne=(e,t)=>{if(e.l|=16,!(4&e.l))return te(e,e.j),g((()=>le(e,t)));e.l|=512},le=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(e.l|=256,e.k&&(e.k.map((([e,t])=>ae(n,e,t))),e.k=void 0),l=ae(n,"componentWillLoad")),oe(l,(()=>re(e,n,t)))},oe=(e,t)=>se(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),se=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,re=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=N(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=H.get(e=e.head||e);if(r||H.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=f.C)?n:k(a);null!=l&&s.setAttribute("nonce",l),(!(1&t.l)||1&t.l&&"HEAD"!==e.nodeName)&&e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ie(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ce(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ie=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||A(null,null),r=(e=>e&&e.m===D)(t)?t:R(null,null,t);if(M=l.tagName,o.P&&(r.u=r.u||{},o.P.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.M=r,r.v=s.v=l.shadowRoot||l,B=!!(1&o.l),Y(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ce=e=>{const t=e.$hostElement$,n=e.t,l=e.j;ae(n,"componentDidRender"),64&e.l||(e.l|=64,fe(t),ae(n,"componentDidLoad"),e.R(t),l||ue()),e.A(t),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>ne(e,!1))),e.l&=-517},ue=()=>{fe(a.documentElement),w((()=>F(u,"appload",{detail:{namespace:"casino-engagement-suite-container"}})))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},fe=e=>e.classList.add("hydrated"),he=(e,t,l)=>{var o,r;const i=e.prototype;if(t.D||t.L||e.watchers){e.watchers&&!t.L&&(t.L=e.watchers);const c=Object.entries(null!=(o=t.D)?o:{});if(c.map((([e,[o]])=>{31&o||2&l&&32&o?Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.D[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.L&&128&u){const e=o.L[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&ne(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&o&&Object.defineProperty(i,e,{value(...t){var l;const o=n(this);return null==(l=null==o?void 0:o.F)?void 0:l.then((()=>{var n;return null==(n=o.t)?void 0:n[e](...t)}))}})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.L)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.L)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.P)||o.push([e,s])),s}))]))}}return e},de=e=>{ae(e,"disconnectedCallback")},pe=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],D:l[2],H:l[3]};4&c.l&&(S=!0),c.D=l[2],c.H=l[3],c.P=[],c.L=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,T:new Map};l.F=new Promise((e=>l.A=e)),l.N=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,me(this,e,c.H)),w&&(clearTimeout(w),w=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)me(e,t,l.H),(null==t?void 0:t.t)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){te(t,t.j=n);break}}l.D&&Object.entries(l.D).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.U){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.W}" was not found`);l.isProxied||(n.L=l.watchers,he(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=N(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>ne(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);e.q&&(e.q.map((e=>e())),e.q=void 0),(null==e?void 0:e.t)?de(e.t):(null==e?void 0:e.N)&&e.N.then((()=>de(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,he(a,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=f.C)?o:k(a);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,v?v.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(ue,30)))},me=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=ve(e,n),r=ye(t,o),i=$e(n);f.ael(s,l,r,i),(t.q=t.q||[]).push((()=>f.rel(s,l,r,i)))}))},ye=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},ve=(e,t)=>8&t?u:16&t?a.body:e,$e=e=>({passive:!!(1&e),capture:!!(2&e)}),be=e=>f.C=e;export{pe as b,T as c,L as g,R as h,h as p,l as r,be as s}
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;