@everymatrix/casino-challenges-overlay-drawer 0.5.18 → 0.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-challenges-overlay-drawer/casino-challenge-details-events_21.entry.js +1 -1
- package/dist/casino-challenges-overlay-drawer/casino-challenges-overlay-drawer-f0d4fe54.js +1 -0
- package/dist/casino-challenges-overlay-drawer/index.esm.js +1 -1
- package/dist/cjs/casino-challenge-details-events_21.cjs.entry.js +38 -21
- package/dist/cjs/{casino-challenges-overlay-drawer-9a977344.js → casino-challenges-overlay-drawer-4a7b7ebd.js} +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/utils/general-info-utils.js +3 -0
- package/dist/collection/utils/types.js +3 -1
- package/dist/esm/casino-challenge-details-events_21.entry.js +39 -22
- package/dist/esm/{casino-challenges-overlay-drawer-2e167783.js → casino-challenges-overlay-drawer-f0d4fe54.js} +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/types/utils/types.d.ts +2 -1
- package/package.json +1 -1
- package/dist/casino-challenges-overlay-drawer/casino-challenges-overlay-drawer-2e167783.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i}from"./index-25fd45d2.js";const t="__WIDGET_GLOBAL_STYLE_CACHE__";function n(e,i){if(e){const t=document.createElement("style");t.innerHTML=i,e.appendChild(t)}}function s(e,i){if(!e||!i)return;const t=new URL(i);fetch(t.href).then((e=>e.text())).then((i=>{const t=document.createElement("style");t.innerHTML=i,e&&e.appendChild(t)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function a(e,i,n,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return n=function(e,i){const t=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{e&&(t.innerHTML=i,e.appendChild(t))}))}(e,i),n;window[t]||(window[t]={}),n=function(e,i){return window.emMessageBus.subscribe(i,(n=>{if(!e)return;const s=e.getRootNode(),a=window[t];let o=a[i]&&a[i].sheet;o?a[i].refCount=a[i].refCount+1:(o=new CSSStyleSheet,o.replaceSync(n),a[i]={sheet:o,refCount:1});const l=s.adoptedStyleSheets||[];l.includes(o)||(s.adoptedStyleSheets=[...l,o])}))}(e,i);const a=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[t][i]){const e=window[t][i];e.refCount>1?e.refCount=e.refCount-1:delete window[t][i]}a()},n}const o={en:{title:"Challenges",promo:"Promo",active:"Active",pendingTab:"Pending",finishedTab:"Finished",level:"Level",codeTab:"Code",endsIn:"Ends In",expired:"Expired",placeBetsOf:"Place bets of",place:"Place",bet:"bet",bets:"bets",minBet:"min bet",forfeited:"Forfeited",finished:"Finished",suspended:"Suspended",completed:"Completed",unavailable:"Unavailable",optOutModalTitle:"Opt out of challenge?",optOutModalDescription:"Current progress will be lost, but you will keep earned rewards. You will not be able to opt in for this challenge again.",optOutModalConfirm:"Opt Out",optOutModalCancel:"Cancel",optOutSuccessMessage:"You’ve opted out of the challenge.",deposit:"Deposit",depositAmountDescription:"to unlock the Challenge",noDepositAmountDescription:"Deposit any amount to unlock the Challenge",terms:"Terms & Conditions",time:"time",times:"times",winStakeRatio:"Win/Stake Ratio",promoTabEmptyHeader:"Nothing here - yet!",promoTabEmptyDescription:"No challenges at the moment. Try exploring events or keep playing to unlock new ones.",activeTabEmptyHeader:"No active challenges yet",activeTabEmptyDescription:"Check Promo tab to find available offers",pendingTabEmptyHeader:"No pending challenges yet",pendingTabEmptyDescription:"Check Promo tab to find available offers",finishedTabEmptyHeader:"No finished challenges yet",finishedTabEmptyDescription:"Check Promo tab to find available offers",claimCodeTitle:"Enter the secret code to unlock hidden quests and rewards.",claimCodeSuccessMessage:"The code was successfully applied.",claimCodeInputLabel:"3–30 characters, no spaces",claimCodeBtnText:"Apply Code",claimCodeError:"Invalid format. Use Latin letters, numbers, or symbols.",claimCodeDescription:"Enter code to unlock the challenge",status:"Status",grantClaimByButtonSuccessMessage:"Challenge has been triggered successfully and is now available on the Active tab"}},l=(e,i)=>o[void 0!==i&&i in o?i:"en"][e],r=async e=>{if(e)try{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const n=await t.json();i=n,Object.keys(i).forEach((e=>{o[e]||(o[e]={});for(let t in i[e])o[e][t]=i[e][t]}))}catch(e){console.error("Failed to fetch or parse translations from URL:",e)}var i};var h,c,d,g,M,u,p,b,m,z,w,v,y,f,x,C;!function(e){e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize",e[e.BetMultiplier=3]="BetMultiplier"}(h||(h={})),function(e){e[e.Single=0]="Single",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly"}(c||(c={})),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"}(d||(d={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(g||(g={})),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",e[e.Awaiting=6]="Awaiting",e[e.Paused=7]="Paused",e[e.Unavailable=8]="Unavailable"}(M||(M={})),function(e){e[e.Draft=0]="Draft",e[e.Enabled=1]="Enabled",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted"}(u||(u={})),function(e){e[e.GameLaunch=0]="GameLaunch",e[e.Reward=1]="Reward",e[e.Manual=2]="Manual",e[e.Claim=3]="Claim",e[e.Event=4]="Event",e[e.Deposit=5]="Deposit",e[e.ClaimByButton=6]="ClaimByButton"}(p||(p={})),function(e){e[e.Period=0]="Period",e[e.Date=1]="Date"}(b||(b={})),function(e){e[e.Casino=0]="Casino",e[e.Any=1]="Any",e[e.Sportsbook=2]="Sportsbook"}(m||(m={})),function(e){e[e.Any=0]="Any",e[e.Live=1]="Live",e[e.PreLive=2]="PreLive"}(z||(z={})),function(e){e[e.Single=0]="Single",e[e.Multiple=1]="Multiple",e[e.System=2]="System"}(w||(w={})),function(e){e[e.Any=0]="Any",e[e.BankerOnly=1]="BankerOnly",e[e.NotBankerOnly=2]="NotBankerOnly"}(v||(v={})),function(e){e[e.Any=0]="Any",e[e.BetBuilderOnly=1]="BetBuilderOnly",e[e.NotBetBuilderOnly=2]="NotBetBuilderOnly"}(y||(y={})),function(e){e[e.RealCash=0]="RealCash",e[e.BonusMoney=1]="BonusMoney",e[e.Mixed=2]="Mixed"}(f||(f={})),function(e){e[e.Promo=0]="Promo",e[e.Active=1]="Active",e[e.Pending=2]="Pending",e[e.Finished=3]="Finished",e[e.Code=4]="Code"}(x||(x={})),function(e){e[e.Levels=0]="Levels",e[e.Games=1]="Games",e[e.Events=2]="Events",e[e.Rules=3]="Rules"}(C||(C={}));const N=["Completed","Expired","Forfeited"];var j,D,I,_;!function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(j||(j={})),function(e){e.ChallengesHistory="ChallengesHistoryRequest",e.ChallengePromoTab="ChallengePromoTabRequest",e.ClaimChallengeByCode="ClaimChallengeByCodeRequest",e.ChallengeJoin="ChallengeJoinRequest",e.RedirectToDepositPage="RedirectToDepositPage",e.ClaimChallengeByButton="ClaimChallengeByButtonRequest",e.GetChallengeGames="GetChallengeGamesRequest",e.ChallengeIsNew="ChallengeIsNewRequest",e.ChallengeInGameRedirect="ChallengeInGameRedirect",e.ForfeitChallenge="ForfeitChallengeRequest"}(D||(D={})),function(e){e.ChallengesHistory="ChallengesHistoryResponse",e.ChallengePromoTab="ChallengePromoTabResponse",e.ClaimChallengeByCode="ClaimChallengeByCodeResponse",e.ChallengeJoin="ChallengeJoinResponse",e.ClaimChallengeByButton="ClaimChallengeByButtonResponse",e.GetChallengeGames="GetChallengeGamesResponse",e.ChallengeIsNew="ChallengeIsNewResponse",e.ForfeitChallenge="ForfeitChallengeResponse",e.ChangeChallengeProgressStatus="ChangeChallengeProgressStatus",e.ChallengeChangeStatusNotification="ChallengeChangeStatusNotification",e.ChallengeForfeitNotification="ChallengeForfeitNotification",e.UpdateChallengeProgress="UpdateChallengeProgress",e.NewChallengeProgressGranted="NewChallengeProgressGranted"}(I||(I={})),function(e){e.PromoTab="promo",e.PendingTab="pending",e.FinishedTab="finished",e.CodeTab="code"}(_||(_={}));const A=class{constructor(t){e(this,t),this.EMPTY_STATE_PAGE_DESCRIPTION_MAP={[x.Promo]:{header:"promoTabEmptyHeader",description:"promoTabEmptyDescription"},[x.Active]:{header:"activeTabEmptyHeader",description:"activeTabEmptyDescription"},[x.Pending]:{header:"pendingTabEmptyHeader",description:"pendingTabEmptyDescription"},[x.Finished]:{header:"finishedTabEmptyHeader",description:"finishedTabEmptyDescription"}},this.onActiveChallengeChange=e=>{var i,t,n;(null==e?void 0:e.detail)&&(this.removeOptedOutChallenge(),this.updateActiveChallenge(this.activeTabIndex===x.Active?null===(i=this.activeChallenges)||void 0===i?void 0:i.find((i=>(null==i?void 0:i.Id)===e.detail)):this.activeTabIndex===x.Pending?null===(t=this.pendingChallenges)||void 0===t?void 0:t.find((i=>(null==i?void 0:i.Id)===e.detail)):null===(n=this.promoChallenges)||void 0===n?void 0:n.find((i=>(null==i?void 0:i.Id)===e.detail))))},this.onSeeMoreClick=e=>{this.detailsSubPageInfo={open:e.detail.open,tab:e.detail.tab}},this.onLoadMorePlayerHistory=e=>{window.postMessage({type:D.ChallengesHistory,data:e.detail})},this.isInactiveChallenge=e=>[M.Awaiting,M.Forfeited,M.Completed,M.Expired].includes(e.Status)||e.ChallengeStatus===u.Paused,this.updateActiveChallenge=e=>{var i;this.activeChallenge=e,this.activeProgressId=null===(i=this.activeChallenge)||void 0===i?void 0:i.Id},this.removeOptedOutChallenge=()=>{var e;this.isOptedOut&&(this.isOptedOut=!1,this.activeChallenges=null===(e=this.activeChallenges)||void 0===e?void 0:e.filter((e=>{var i;return(null==e?void 0:e.Id)!==(null===(i=this.activeChallenge)||void 0===i?void 0:i.Id)})),this.activeChallenge=null)},this.handleTabClick=e=>{e.detail!==this.activeTabIndex&&(this.removeOptedOutChallenge(),this.activeTabIndex=e.detail,this.activeTabIndex===x.Promo&&window.postMessage({type:D.ChallengePromoTab,data:{}}),this.activeTabIndex===x.Active&&this.updateActiveChallenge(this.activeChallenges[0]),this.activeTabIndex===x.Pending&&this.updateActiveChallenge(this.pendingChallenges[0]),this.activeTabIndex===x.Finished&&window.postMessage({type:D.ChallengesHistory,data:{PageSize:20,PageNumber:0}}),e.detail!==x.Code&&(this.emptyState=this.EMPTY_STATE_PAGE_DESCRIPTION_MAP[e.detail]))},this.openNotification=e=>{this.notification=e,setTimeout((()=>this.notification=null),1e4)},this.renderNotification=()=>{var e,t,n;return i("div",{class:"notification "+((null===(e=this.notification)||void 0===e?void 0:e.errored)?"errored":"")},i("div",{class:"row"},i("img",{src:(null===(t=this.notification)||void 0===t?void 0:t.errored)?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjMzMzMzIDEuMzMzMzNDNC4wMTk2MiAxLjMzMzMzIDEuMzMzMzMgNC4wMTk2MiAxLjMzMzMzIDcuMzMzMzNDMS4zMzMzMyAxMC42NDcgNC4wMTk2MiAxMy4zMzMzIDcuMzMzMzMgMTMuMzMzM0MxMC42NDcgMTMuMzMzMyAxMy4zMzMzIDEwLjY0NyAxMy4zMzMzIDcuMzMzMzNDMTMuMzMzMyA0LjAxOTYyIDEwLjY0NyAxLjMzMzMzIDcuMzMzMzMgMS4zMzMzM1pNMCA3LjMzMzMzQzAgMy4yODMyNSAzLjI4MzI1IDAgNy4zMzMzMyAwQzExLjM4MzQgMCAxNC42NjY3IDMuMjgzMjUgMTQuNjY2NyA3LjMzMzMzQzE0LjY2NjcgMTEuMzgzNCAxMS4zODM0IDE0LjY2NjcgNy4zMzMzMyAxNC42NjY3QzMuMjgzMjUgMTQuNjY2NyAwIDExLjM4MzQgMCA3LjMzMzMzWk03LjMzMzMzIDRDNy43MDE1MiA0IDggNC4yOTg0OCA4IDQuNjY2NjdWNy4zMzMzM0M4IDcuNzAxNTIgNy43MDE1MiA4IDcuMzMzMzMgOEM2Ljk2NTE0IDggNi42NjY2NyA3LjcwMTUyIDYuNjY2NjcgNy4zMzMzM1Y0LjY2NjY3QzYuNjY2NjcgNC4yOTg0OCA2Ljk2NTE0IDQgNy4zMzMzMyA0Wk02LjY2NjY3IDEwQzYuNjY2NjcgOS42MzE4MSA2Ljk2NTE0IDkuMzMzMzMgNy4zMzMzMyA5LjMzMzMzSDcuMzRDNy43MDgxOSA5LjMzMzMzIDguMDA2NjcgOS42MzE4MSA4LjAwNjY3IDEwQzguMDA2NjcgMTAuMzY4MiA3LjcwODE5IDEwLjY2NjcgNy4zNCAxMC42NjY3SDcuMzMzMzNDNi45NjUxNCAxMC42NjY3IDYuNjY2NjcgMTAuMzY4MiA2LjY2NjY3IDEwWiIgZmlsbD0iI0ZGNEQ0RiIvPgo8L3N2Zz4K":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjMzMzMzIDEuMzMzMzNDNC4wMTk2MiAxLjMzMzMzIDEuMzMzMzMgNC4wMTk2MiAxLjMzMzMzIDcuMzMzMzNDMS4zMzMzMyAxMC42NDcgNC4wMTk2MiAxMy4zMzMzIDcuMzMzMzMgMTMuMzMzM0MxMC42NDcgMTMuMzMzMyAxMy4zMzMzIDEwLjY0NyAxMy4zMzMzIDcuMzMzMzNDMTMuMzMzMyA0LjAxOTYyIDEwLjY0NyAxLjMzMzMzIDcuMzMzMzMgMS4zMzMzM1pNMCA3LjMzMzMzQzAgMy4yODMyNSAzLjI4MzI1IDAgNy4zMzMzMyAwQzExLjM4MzQgMCAxNC42NjY3IDMuMjgzMjUgMTQuNjY2NyA3LjMzMzMzQzE0LjY2NjcgMTEuMzgzNCAxMS4zODM0IDE0LjY2NjcgNy4zMzMzMyAxNC42NjY3QzMuMjgzMjUgMTQuNjY2NyAwIDExLjM4MzQgMCA3LjMzMzMzWk0xMC44MDQ3IDQuODYxOTNDMTEuMDY1MSA1LjEyMjI4IDExLjA2NTEgNS41NDQzOSAxMC44MDQ3IDUuODA0NzRMNi44MDQ3NCA5LjgwNDc0QzYuNTQ0MzkgMTAuMDY1MSA2LjEyMjI4IDEwLjA2NTEgNS44NjE5MyA5LjgwNDc0TDMuODYxOTMgNy44MDQ3NEMzLjYwMTU4IDcuNTQ0MzkgMy42MDE1OCA3LjEyMjI4IDMuODYxOTMgNi44NjE5M0M0LjEyMjI4IDYuNjAxNTggNC41NDQzOSA2LjYwMTU4IDQuODA0NzQgNi44NjE5M0w2LjMzMzMzIDguMzkwNTJMOS44NjE5MyA0Ljg2MTkzQzEwLjEyMjMgNC42MDE1OCAxMC41NDQ0IDQuNjAxNTggMTAuODA0NyA0Ljg2MTkzWiIgZmlsbD0iIzAwRkE1QSIvPgo8L3N2Zz4K",class:"notification__icon",alt:""}),i("p",{class:"notification__message"},null===(n=this.notification)||void 0===n?void 0:n.message)))},this.renderHeader=e=>i("div",null,i("h1",{class:"challenges__drawer__title"},i("span",null,l("title",this.language)),i("button",{class:"challenges__drawer__close",onClick:this.onCloseClick},i("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuNSAxNy41TDE3LjUgMi41IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjEuMDA0NTkiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yLjUgMi41TDE3LjUgMTcuNSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjAwNDU5IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",alt:""}))),this.enabledWidgetTabs.length>0&&i("casino-challenges-overlay-tabs",{onTabClick:this.handleTabClick,activeTabIndex:this.activeTabIndex,activeTabHasNotification:!1,pendingTabHasNotification:!1,language:this.language,"is-mobile":e,enabledWidgetTabs:this.enabledWidgetTabs})),this.isEmptyState=()=>{if(!this.loading&&this.activeTabIndex!==x.Code){if(this.activeTabIndex===x.Active&&!this.activeChallenges.length)return!0;if(this.activeTabIndex===x.Pending&&!this.pendingChallenges.length)return!0;if(this.activeTabIndex===x.Promo&&!this.promoChallenges.length)return!0;if(this.activeTabIndex===x.Finished&&!this.playerHistory.length)return!0}return!1},this.renderEmptyState=e=>{var t,n;return i("div",null,this.renderHeader(e),i("casino-challenges-empty-state",{header:l(null===(t=this.emptyState)||void 0===t?void 0:t.header,this.language),description:l(null===(n=this.emptyState)||void 0===n?void 0:n.description,this.language),"is-mobile":e}))},this.renderFinishedTab=e=>i("div",null,this.renderHeader(e),i("casino-challenges-overlay-drawer-history",{mbSource:this.mbSource,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,translationUrl:this.translationUrl,language:this.language,isMobile:e,historyItems:this.playerHistory,hasMore:this.hasMorePlayerHistory,onLoadMore:this.onLoadMorePlayerHistory,loading:this.loading})),this.renderCodeTab=e=>i("div",null,this.renderHeader(e),i("casino-challenges-claim-code",{"is-mobile":e,translationUrl:this.translationUrl,language:this.language})),this.renderChallengeDetails=(e,t=!1)=>i("casino-challenges-overlay-drawer-details",{translationUrl:this.translationUrl,language:this.language,challenge:this.activeChallenge,swipped:this.swipped,progress:this.progress,"is-mobile":e,"is-unique":t,"is-opted-out":this.isOptedOut,"active-challenges-tab-index":this.activeTabIndex,onSeeMoreClick:this.onSeeMoreClick,detailsSubPageInfo:this.detailsSubPageInfo,challengeGames:this.challengeGames,onCloseClick:this.onCloseClick}),this.renderChallengesTabs=e=>{const t=this.activeTabIndex===x.Active?this.activeChallenges:this.activeTabIndex===x.Pending?this.pendingChallenges:this.promoChallenges,n=1===t.length;return i("swipe-up",{onSwippedUp:e=>{this.swipped=e.detail.swipped,this.progress=e.detail.progress},isMobile:e,isOneSlider:n},i("div",{class:"content-header",slot:"header"},this.renderHeader(e),i("div",{class:{"content-spacer":this.swipped||!e,"one-slide":n&&this.swipped}},i("casino-challenges-overlay-slider",{mbSource:this.mbSource,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,translationUrl:this.translationUrl,language:this.language,challenges:t,isMobile:e,onActiveChallengeChange:this.onActiveChallengeChange,initialProgressId:this.activeProgressId,activeTabIndex:this.activeTabIndex}))),i("div",{class:"content-details",slot:"details",style:{overflow:this.swipped?"auto":"hidden"}},this.renderChallengeDetails(e,n)))},this.onCloseClick=()=>{var e,i;this.pendingChallenges=null===(e=this.pendingChallenges)||void 0===e?void 0:e.filter((e=>e.Status===M.Awaiting)),this.activeChallenges=null===(i=this.activeChallenges)||void 0===i?void 0:i.filter((e=>!this.isInactiveChallenge(e))),this.detailsSubPageInfo={open:!1,tab:null},this.loading=!1,this.isOptedOut=!1,this.handleClose()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.isOpen=!1,this.handleClose=()=>{},this.challenges=[],this.initialProgressId="",this.enabledWidgetTabs=void 0,this.activeChallenge=null,this.activeProgressId="",this.activeTabIndex=x.Active,this.error="",this.hasError=!1,this.swipped=!1,this.detailsSubPageInfo=void 0,this.progress=0,this.loading=!1,this.notification=null,this.optOutModaIsOpen=!1,this.isOptedOut=!1,this.prevUpdateEvent=void 0,this.challengeGames=[],this.activeChallenges=[],this.pendingChallenges=[],this.promoChallenges=[],this.playerHistory=[],this.hasMorePlayerHistory=!1,this.emptyState={header:"activeTabEmptyHeader",description:"activeTabEmptyDescription"}}handleClientStylingChange(e,i){e!=i&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,i){e!=i&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,i){e!=i&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleIsOpenChange(e){var i;if(e)if(this.initialProgressId&&this.challenges.length||!this.enabledWidgetTabs.includes(_.PromoTab)){this.activeTabIndex=x.Active,this.activeProgressId=this.initialProgressId;const e=(null===(i=this.activeChallenges)||void 0===i?void 0:i.find((e=>e.Id===this.activeProgressId)))||this.activeChallenges[0];this.updateActiveChallenge(e||null)}else this.activeTabIndex=x.Promo,window.postMessage({type:D.ChallengePromoTab,data:{}})}onActiveChallengeChanged(){this.challengeGames=[]}onOpenOptOut(){this.optOutModaIsOpen=!0}onCloseOptOut(){this.optOutModaIsOpen=!1}onConfirmOptOut(){window.postMessage({type:D.ForfeitChallenge,data:{ChallengeId:this.activeChallenge.ChallengeId}})}onChallengeExpired(e){if(null==e?void 0:e.detail)switch(this.activeTabIndex){case x.Active:this.activeChallenges=this.updateChallenge(this.activeChallenges,e.detail,{Status:M.Expired});break;case x.Pending:this.pendingChallenges=this.updateChallenge(this.pendingChallenges,e.detail,{Status:M.Expired});break;case x.Promo:this.promoChallenges=this.updateChallenge(this.promoChallenges,e.detail,{Status:M.Expired})}}handleEvent(e){var i,t,n,s;const{type:a,data:o,success:r,errorMessage:h}=null==e?void 0:e.data;switch(console.log("\nReceived event: ",null==e?void 0:e.data.type),console.log(e),a){case I.ChallengePromoTab:r?(this.promoChallenges=o||[],this.updateActiveChallenge(this.promoChallenges[0])):(this.promoChallenges=[],this.updateActiveChallenge(null),this.openNotification({message:h,errored:!0})),this.loading=!1;break;case I.ChallengesHistory:r?(this.playerHistory=this.playerHistory.length<(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.totalItem)?[...this.playerHistory,...o]:o,this.hasMorePlayerHistory=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.totalItem)>this.playerHistory.length):this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ClaimChallengeByCode:r?(this.openNotification({message:l("claimCodeSuccessMessage",this.language)}),this.activeChallenges=[...this.activeChallenges,o]):this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ChallengeJoin:if(r){const e=[M.Paused,M.Started].includes(null===(n=this.activeChallenge)||void 0===n?void 0:n.Status);this.activeChallenges=this.updateChallenge(this.activeChallenges,e?null==o?void 0:o.joinId:null==o?void 0:o.unjoinId,{Status:e?M.InProgress:M.Paused})}else this.openNotification({message:h,errored:!0});this.loading=!1;break;case I.ChallengeIsNew:r?this.updateChallengeByProgressId(null==o?void 0:o.challengeProgressId,{IsNew:!1}):this.openNotification({message:h,errored:!0});break;case I.GetChallengeGames:r?this.challengeGames=o:this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ClaimChallengeByButton:if(r){const e=Array.isArray(o)?o[0]:o;e&&(e.IsNew=!1,this.activeChallenges=[...this.activeChallenges,e],this.updateActiveChallenge(e),this.activeTabIndex=x.Active,this.openNotification({message:l("grantClaimByButtonSuccessMessage",this.language)}))}else this.openNotification({message:h,errored:!0});this.loading=!1;break;case I.ForfeitChallenge:this.optOutModaIsOpen=!1,r?(this.openNotification({message:l("optOutSuccessMessage",this.language)}),this.detailsSubPageInfo={open:!1,tab:null},this.isOptedOut=!0):this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ChangeChallengeProgressStatus:this.updateChallengeByProgressId(null==o?void 0:o.ChallengeProgressId,{Status:null==o?void 0:o.ChallengeProgressStatus});break;case I.ChallengeChangeStatusNotification:this.updateChallengeById(null==o?void 0:o.ChallengeId,{ChallengeStatus:(null==o?void 0:o.IsEnabled)?u.Enabled:u.Paused});break;case I.ChallengeForfeitNotification:this.updateChallengeById(null==o?void 0:o.ChallengeId,{Status:M.Forfeited});break;case I.UpdateChallengeProgress:{const e=o;if(!((e,i)=>{if(!e)return!0;if(e.ProgressId!==i.ProgressId)return!0;if(e.Levels.length!==i.Levels.length)return!0;for(let t=0;t<i.Levels.length;t++){const n=e.Levels[t],s=i.Levels[t];if(n.LevelId!==s.LevelId||n.ProgressStatus!==s.ProgressStatus||n.ProgressPercentage!==s.ProgressPercentage)return!0}return!1})(this.prevUpdateEvent,e))return;this.prevUpdateEvent=e,this.activeChallenges=null===(s=this.activeChallenges)||void 0===s?void 0:s.map((i=>{if(i.Id!==(null==e?void 0:e.ProgressId))return i;const t=i.LevelProgresses.map((i=>{const t=null==e?void 0:e.Levels.find((e=>e.LevelId===i.LevelId));return t?Object.assign(Object.assign({},i),{ProgressStatus:t.ProgressStatus,ProgressPercentage:t.ProgressPercentage}):i}));return Object.assign(Object.assign({},i),{Status:null==e?void 0:e.Status,LevelProgresses:t})}));break}case I.NewChallengeProgressGranted:const a=(null==o?void 0:o.Status)===M.Awaiting,c=a?this.pendingChallenges:this.activeChallenges;if(null==c?void 0:c.some((e=>e.Id===(null==o?void 0:o.Id))))break;a?(this.pendingChallenges=[...c,o],this.activeTabIndex===x.Pending&&1===this.pendingChallenges.length&&this.updateActiveChallenge(o)):(this.activeChallenges=[...c,o],this.activeTabIndex===x.Active&&1===this.activeChallenges.length&&this.updateActiveChallenge(o));break;case D.ChallengeJoin:case D.GetChallengeGames:case D.ClaimChallengeByButton:case D.RedirectToDepositPage:case D.ChallengeInGameRedirect:case D.ChallengesHistory:case D.ChallengePromoTab:case D.ClaimChallengeByCode:case D.ForfeitChallenge:this.loading=!0}}componentWillLoad(){var e;if(this.translationUrl&&r(this.translationUrl),null===(e=this.challenges)||void 0===e?void 0:e.length){const e=[...this.challenges];this.pendingChallenges=e.filter((e=>e.Status===M.Awaiting)),this.activeChallenges=e.filter((e=>!this.isInactiveChallenge(e)))}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}updateChallenge(e,i,t){var n;return(null===(n=this.activeChallenge)||void 0===n?void 0:n.Id)===i&&(this.activeChallenge=Object.assign(Object.assign({},this.activeChallenge),t)),e.map((e=>e.Id===i?Object.assign(Object.assign({},e),t):e))}updateChallengeList(e,i,t){let n=!1;const s=e.map((e=>e.ChallengeId===i?(n=!0,Object.assign(Object.assign({},e),t)):e));return n?s:e}updateChallengeById(e,i){var t;(null===(t=this.activeChallenge)||void 0===t?void 0:t.ChallengeId)===e&&(this.activeChallenge=Object.assign(Object.assign({},this.activeChallenge),i)),this.activeChallenges=this.updateChallengeList(this.activeChallenges,e,i),this.pendingChallenges=this.updateChallengeList(this.pendingChallenges,e,i),this.promoChallenges=this.updateChallengeList(this.promoChallenges,e,i)}updateChallengeByProgressId(e,i){var t;(null===(t=this.activeChallenge)||void 0===t?void 0:t.Id)===e&&(this.activeChallenge=Object.assign(Object.assign({},this.activeChallenge),i)),this.activeChallenges.find((i=>i.Id===e))?this.activeChallenges=this.activeChallenges.map((t=>t.Id===e?Object.assign(Object.assign({},t),i):t)):this.pendingChallenges.find((i=>i.Id===e))?this.pendingChallenges=this.pendingChallenges.map((t=>t.Id===e?Object.assign(Object.assign({},t),i):t)):this.promoChallenges=this.promoChallenges.map((t=>t.Id===e?Object.assign(Object.assign({},t),i):t))}renderContent(e,t){var n;if(t)return this.renderEmptyState(e);if(null===(n=this.detailsSubPageInfo)||void 0===n?void 0:n.open)return i("div",{class:"content-sub-page",slot:"details"},this.renderChallengeDetails(e));switch(this.activeTabIndex){case x.Promo:case x.Active:case x.Pending:return this.renderChallengesTabs(e);case x.Code:return this.renderCodeTab(e);case x.Finished:return this.renderFinishedTab(e);default:return}}render(){if(!this.isOpen)return;const e=(()=>{let e=window.navigator.userAgent;return!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i))})()||window.innerWidth<=768,t=this.isEmptyState();return i("div",{ref:e=>this.stylingContainer=e,class:{container:!0,open:this.isOpen,mobile:e}},i("div",{class:"challenges__backdrop",onClick:this.onCloseClick}),i("div",{class:"challenges__drawer"},i("casino-challenge-overlay-background",{empty:t}),i("div",{class:"challenges__drawer__content"},this.renderContent(e,t)),this.loading&&i("casino-challenges-overlay-loader",{"full-size":!0,"is-mobile":e}),i("casino-challenge-opt-out-modal",{open:this.optOutModaIsOpen,"is-mobile":e,language:this.language})),this.notification&&this.renderNotification())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],isOpen:["handleIsOpenChange"],activeChallenge:["onActiveChallengeChanged"]}}};A.style='@import url("https://fonts.googleapis.com/css2?family=Teachers:ital,wght@0,400..800;1,400..800&display=swap");\n.container {\n z-index: 301;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n container-name: challenges-game-page;\n container-type: size;\n}\n.container.open {\n pointer-events: auto;\n}\n\n.mobile .challenges__drawer {\n width: 100%;\n height: 100%;\n left: 0;\n bottom: 0;\n border-radius: 0;\n backdrop-filter: blur(16px);\n border: none;\n max-width: none;\n min-width: initial;\n}\n.mobile .challenges__drawer .content-spacer {\n margin-bottom: 32px;\n}\n.mobile .challenges__drawer .content-spacer.one-slide {\n margin-bottom: 38px;\n}\n.mobile .challenges__drawer__content {\n padding: 16px 0 0;\n}\n.mobile .challenges__drawer__content .content-details {\n height: calc(100% - 30px);\n}\n.mobile .challenges__drawer__title {\n height: 26px;\n font-size: var(--emw--font-size-large, 18px);\n}\n.mobile .challenges__drawer__close {\n right: 16px;\n width: 26px;\n height: 26px;\n}\n.mobile .challenges__drawer__close img {\n width: 14px;\n}\n.mobile .challenges__backdrop {\n display: none;\n}\n.mobile .notification {\n padding: 8px 16px;\n gap: 8px;\n}\n.mobile .notification .row {\n margin: 15px 0 14px 0;\n}\n.mobile .notification__icon {\n width: 16px;\n height: 16px;\n}\n.mobile .notification__message {\n font-size: var(--emw--font-size-small, 14px);\n}\n\n.challenges__drawer {\n z-index: 302;\n position: fixed;\n left: 62px;\n bottom: 76px;\n border: 1px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-Overlay-Background, rgba(9, 9, 9, 0.8));\n backdrop-filter: blur(11px);\n box-sizing: border-box;\n width: 35%;\n min-width: 400px;\n max-width: 600px;\n height: calc(100% - 20px - 76px);\n border-radius: 30px;\n opacity: 1;\n font-family: var(--emw--font-family-primary, "Teachers"), sans-serif;\n container-name: challenges-drawer;\n container-type: size;\n}\n.challenges__drawer__title {\n height: 36px;\n color: var(--emw--color-title, #edeff2);\n text-align: center;\n font-size: var(--emw--font-size-large-xl, 22px);\n font-weight: var(--emw--font-weight-semibold, 600);\n margin: 0;\n position: relative;\n z-index: 1;\n align-content: center;\n}\n.challenges__drawer__close {\n outline: none;\n background: transparent;\n border-radius: 20px;\n border: 1.5px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n backdrop-filter: blur(6.882352829px);\n cursor: pointer;\n width: 36px;\n height: 36px;\n min-width: 36px;\n min-height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n right: 24px;\n}\n.challenges__drawer__content {\n height: 100%;\n position: relative;\n z-index: 2;\n padding: 24px 0 0;\n box-sizing: border-box;\n}\n.challenges__drawer__content .content-header {\n width: 100%;\n flex-shrink: 0;\n}\n.challenges__drawer__content .content-details {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n}\n.challenges__drawer__content .content-sub-page {\n display: flex;\n height: 100%;\n}\n.challenges__drawer .content-spacer {\n margin-bottom: 24px;\n}\n.challenges__drawer, .challenges__drawer * {\n scrollbar-width: thin;\n scrollbar-color: var(--emw--color-gray-250, rgba(255, 255, 255, 0.3)) transparent;\n}\n.challenges__drawer::-webkit-scrollbar, .challenges__drawer *::-webkit-scrollbar {\n width: 3px;\n}\n.challenges__drawer::-webkit-scrollbar-track, .challenges__drawer *::-webkit-scrollbar-track {\n background: transparent;\n}\n.challenges__drawer::-webkit-scrollbar-thumb, .challenges__drawer *::-webkit-scrollbar-thumb {\n background: var(--emw--color-gray-250, rgba(255, 255, 255, 0.3));\n opacity: 0.3;\n border-radius: 999px;\n transition: none;\n width: 3px;\n}\n.challenges__drawer::-webkit-scrollbar-thumb:hover, .challenges__drawer *::-webkit-scrollbar-thumb:hover {\n background: var(--emw--color-gray-250, rgba(255, 255, 255, 0.3));\n opacity: 0.3;\n width: 3px;\n}\n.challenges__drawer::-webkit-scrollbar-button, .challenges__drawer *::-webkit-scrollbar-button {\n display: none;\n}\n.challenges__backdrop {\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-backdrop, rgba(0, 0, 0, 0.6));\n box-shadow: -5px 0 0 0 var(--emw--color-gray-backdrop, rgba(0, 0, 0, 0.6));\n z-index: 301;\n opacity: 1;\n}\n\n.notification {\n display: flex;\n position: fixed;\n z-index: 400;\n align-items: center;\n bottom: 76px;\n right: 0;\n padding: 24px;\n gap: 12px;\n max-width: 445px;\n box-sizing: border-box;\n border-radius: 20px 0 0 20px;\n border-top: 1px solid var(--emw--status-badge-success-color, #d6fff0);\n border-bottom: 1px solid var(--emw--status-badge-success-color, #d6fff0);\n border-left: 1px solid var(--emw--status-badge-success-color, #d6fff0);\n background: var(--emw--background-success-notification, linear-gradient(112deg, rgba(74, 255, 135, 0.2) 0%, rgba(74, 255, 135, 0) 100%));\n backdrop-filter: blur(16px);\n color: var(--emw--color-white, #ffffff);\n font-family: var(--emw--font-family-primary, "Teachers"), sans-serif;\n}\n.notification.errored {\n border-top: 1px solid var(--emw--status-badge-red-bg, #d63d1e);\n border-bottom: 1px solid var(--emw--status-badge-red-bg, #d63d1e);\n border-left: 1px solid var(--emw--status-badge-red-bg, #d63d1e);\n background: var(--emw--background-error-notification, rgba(9, 9, 9, 0.4));\n}\n.notification .row {\n display: flex;\n align-items: flex-start;\n}\n.notification__icon {\n width: 18px;\n height: 18px;\n margin-right: 12px;\n}\n.notification__message {\n margin: 0;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: var(--emw--font-weight-medium, 500);\n}\n.notification__message .active-tab {\n color: var(--emw--border-success-color, #00b74f);\n text-decoration-line: underline;\n cursor: pointer;\n}\n\ncasino-challenges-overlay-drawer-details {\n flex: 1;\n}\n\n@container challenges-game-page (width <= 1430px) {\n .challenges__drawer {\n width: 40%;\n left: 45px;\n }\n}\n@container challenges-game-page (width <= 1250px) {\n .challenges__drawer {\n width: 45%;\n }\n}\n@container challenges-game-page (width <= 1000px) {\n .challenges__drawer {\n width: 50%;\n left: 25px;\n }\n}\n@container challenges-game-page (width <= 800px) {\n .challenges__drawer__content {\n padding: 20px 0 0;\n }\n}\n@container challenges-game-page (height <= 850px) {\n .challenges__drawer {\n bottom: 36px;\n height: calc(100% - 20px - 36px);\n }\n .challenges__drawer .content-spacer {\n margin-bottom: 18px;\n }\n}\n@container challenges-drawer (height <= 760px) {\n .challenges__drawer .content-spacer {\n margin-bottom: 12px;\n }\n}';export{A as C,j as E,N as H,D as a,s as b,a as c,x as d,_ as e,r,n as s,l as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CasinoChallengesOverlayDrawer}from"./casino-challenges-overlay-drawer-
|
|
1
|
+
export{C as CasinoChallengesOverlayDrawer}from"./casino-challenges-overlay-drawer-f0d4fe54.js";import"./index-25fd45d2.js";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d2288c94.js');
|
|
6
|
-
const casinoChallengesOverlayDrawer = require('./casino-challenges-overlay-drawer-
|
|
6
|
+
const casinoChallengesOverlayDrawer = require('./casino-challenges-overlay-drawer-4a7b7ebd.js');
|
|
7
7
|
|
|
8
8
|
function _typeof(o) {
|
|
9
9
|
"@babel/helpers - typeof";
|
|
@@ -2413,6 +2413,7 @@ var EChallengeProgressStatus$1;
|
|
|
2413
2413
|
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
2414
2414
|
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
2415
2415
|
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
2416
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
|
|
2416
2417
|
})(EChallengeProgressStatus$1 || (EChallengeProgressStatus$1 = {}));
|
|
2417
2418
|
var EChallengeStatus$1;
|
|
2418
2419
|
(function (EChallengeStatus) {
|
|
@@ -2430,7 +2431,8 @@ const ChallengeStatusDictionary$1 = [
|
|
|
2430
2431
|
'expired',
|
|
2431
2432
|
'forfeited',
|
|
2432
2433
|
'awaiting',
|
|
2433
|
-
'paused'
|
|
2434
|
+
'paused',
|
|
2435
|
+
'unavailable'
|
|
2434
2436
|
];
|
|
2435
2437
|
var EChallengeTriggerType;
|
|
2436
2438
|
(function (EChallengeTriggerType) {
|
|
@@ -2608,25 +2610,27 @@ const CasinoChallengeDetailsLevels = class {
|
|
|
2608
2610
|
render() {
|
|
2609
2611
|
var _a, _b;
|
|
2610
2612
|
return (index.h(index.Host, { key: '6fb977a939b727af9277cd332ff105be64cb7f00' }, index.h("div", { key: '99dbdaadc719c8b4b6fd52586bd76ee19a9ae5c3', class: { Mobile: this.isMobile, 'levels-tab tab': true, visible: this.open }, ref: (el) => (this.scrollContainerRef = el) }, (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses) === null || _b === void 0 ? void 0 : _b.map((level, index$1) => {
|
|
2611
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2613
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2612
2614
|
const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
|
|
2613
2615
|
const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
2616
|
+
((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
2614
2617
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
2615
2618
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
2616
2619
|
this.isOptedOut;
|
|
2617
2620
|
const isActiveMatch = level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress;
|
|
2618
2621
|
return (index.h("div", { class: {
|
|
2619
2622
|
level: true,
|
|
2620
|
-
forfeited: ((
|
|
2623
|
+
forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
2624
|
+
((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
2621
2625
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
2622
2626
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
2623
2627
|
this.isOptedOut,
|
|
2624
|
-
suspended: ((
|
|
2628
|
+
suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$1.Paused,
|
|
2625
2629
|
active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress,
|
|
2626
2630
|
completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.Completed
|
|
2627
2631
|
}, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, index.h("div", { class: {
|
|
2628
2632
|
level__title: true
|
|
2629
|
-
} }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((
|
|
2633
|
+
} }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language, true)), level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress && (index.h("div", { class: "level__progress" }, index.h("casino-challenge-level-progress-bar", { height: "8px", value: level.ProgressPercentage, active: activeChallenge }))), index.h("casino-challenge-expandable-paragraph", { "max-height": "42", active: level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress && activeChallenge, style: { width: '100%' } }, index.h("div", { class: {
|
|
2630
2634
|
level__bonus: true
|
|
2631
2635
|
} }, index.h("span", { class: "level__icon" }, index.h("img", { class: {
|
|
2632
2636
|
grayed: isGrayed
|
|
@@ -2638,7 +2642,7 @@ const CasinoChallengeDetailsLevels = class {
|
|
|
2638
2642
|
grayed: isGrayed
|
|
2639
2643
|
}, src: targetSvg, alt: "target-icon", title: "target-icon" })), index.h("span", { class: {
|
|
2640
2644
|
level__value: true
|
|
2641
|
-
} }, getTarget(level, (
|
|
2645
|
+
} }, getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language))))));
|
|
2642
2646
|
}))));
|
|
2643
2647
|
}
|
|
2644
2648
|
};
|
|
@@ -2679,7 +2683,9 @@ const CasinoChallengeDetailsProgressBar = class {
|
|
|
2679
2683
|
progress: true,
|
|
2680
2684
|
Mobile: this.isMobile,
|
|
2681
2685
|
paused: Status === EChallengeProgressStatus$1.Paused,
|
|
2682
|
-
grayed: Status === EChallengeProgressStatus$1.Forfeited ||
|
|
2686
|
+
grayed: Status === EChallengeProgressStatus$1.Forfeited ||
|
|
2687
|
+
Status === EChallengeProgressStatus$1.Unavailable ||
|
|
2688
|
+
ChallengeStatus === EChallengeStatus$1.Paused
|
|
2683
2689
|
} }, index.h("div", { class: {
|
|
2684
2690
|
progress__point: true,
|
|
2685
2691
|
start: true,
|
|
@@ -2691,7 +2697,7 @@ const CasinoChallengeDetailsProgressBar = class {
|
|
|
2691
2697
|
} }, secondImgSrc ? index.h("img", { class: "progress__icon", src: secondImgSrc }) : currLevel.OrderNumber + 2)));
|
|
2692
2698
|
}
|
|
2693
2699
|
render() {
|
|
2694
|
-
return index.h(index.Host, { key: '
|
|
2700
|
+
return index.h(index.Host, { key: '8f3de4c26bad9f23b9873469d004ae7cff048302' }, this.challengeProgress);
|
|
2695
2701
|
}
|
|
2696
2702
|
};
|
|
2697
2703
|
CasinoChallengeDetailsProgressBar.style = CasinoChallengeDetailsProgressBarStyle0;
|
|
@@ -3196,6 +3202,7 @@ var EChallengeProgressStatus;
|
|
|
3196
3202
|
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
3197
3203
|
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
3198
3204
|
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
3205
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
|
|
3199
3206
|
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
3200
3207
|
var EChallengeLevelTargetType;
|
|
3201
3208
|
(function (EChallengeLevelTargetType) {
|
|
@@ -3211,7 +3218,8 @@ const ChallengeStatusDictionary = [
|
|
|
3211
3218
|
'expired',
|
|
3212
3219
|
'forfeited',
|
|
3213
3220
|
'awaiting',
|
|
3214
|
-
'paused'
|
|
3221
|
+
'paused',
|
|
3222
|
+
'unavailable'
|
|
3215
3223
|
];
|
|
3216
3224
|
|
|
3217
3225
|
const DEFAULT_LANGUAGE = 'en';
|
|
@@ -3294,6 +3302,8 @@ const CasinoChallengesOverlaySlider$1 = class {
|
|
|
3294
3302
|
return index.h("span", { class: "status" }, translate('unavailable', this.language));
|
|
3295
3303
|
}
|
|
3296
3304
|
switch (this.challenge.Status) {
|
|
3305
|
+
case EChallengeProgressStatus.Unavailable:
|
|
3306
|
+
return index.h("span", { class: "status" }, translate('unavailable', this.language));
|
|
3297
3307
|
case EChallengeProgressStatus.Expired:
|
|
3298
3308
|
return index.h("span", { class: "status" }, translate('expired', this.language));
|
|
3299
3309
|
case EChallengeProgressStatus.Forfeited:
|
|
@@ -3345,20 +3355,21 @@ const CasinoChallengesOverlaySlider$1 = class {
|
|
|
3345
3355
|
render() {
|
|
3346
3356
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3347
3357
|
const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
|
|
3348
|
-
return (index.h(index.Host, { key: '
|
|
3358
|
+
return (index.h(index.Host, { key: '7285d0d026a4b6c469f4e86ff6678f00e02b47d8' }, index.h("div", { class: {
|
|
3349
3359
|
challenges__slide: true,
|
|
3350
3360
|
active: this.isItemActive(),
|
|
3351
3361
|
grayed: [
|
|
3352
3362
|
EChallengeProgressStatus.Expired,
|
|
3353
3363
|
EChallengeProgressStatus.Forfeited,
|
|
3354
|
-
EChallengeProgressStatus.Completed
|
|
3364
|
+
EChallengeProgressStatus.Completed,
|
|
3365
|
+
EChallengeProgressStatus.Unavailable
|
|
3355
3366
|
].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
|
|
3356
3367
|
isChallengePaused ||
|
|
3357
3368
|
this.isOptedOut
|
|
3358
|
-
}, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, index.h("div", { key: '
|
|
3369
|
+
}, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, index.h("div", { key: '23f5f7ae37c0cfe64cb4f88f9686247d5670164a', class: "challenges__slide__image-wrapper", style: {
|
|
3359
3370
|
width: `${this.slideWidth}px`,
|
|
3360
3371
|
height: `${this.slideHeight}px`
|
|
3361
|
-
} }, index.h("img", { key: '
|
|
3372
|
+
} }, index.h("img", { key: '4d98f3fdfadd1c25a28776cec70cc54ae000e637', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), index.h("h1", { key: 'fb3ce642a878feb26008b4c663bdbe48650597b0', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), index.h("div", { key: 'c38663e47c9aa7a7acf4b40535bd809c3a81ef6f', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
|
|
3362
3373
|
? ChallengeStatusDictionary[this.challenge.Status]
|
|
3363
3374
|
: 'unavailable'}` }, this.getBadgeContent()))));
|
|
3364
3375
|
}
|
|
@@ -3406,6 +3417,7 @@ const actionButtonIsVisible = (challenge, isPromo, isOptedOut) => {
|
|
|
3406
3417
|
!(isOptedOut ||
|
|
3407
3418
|
(challenge === null || challenge === void 0 ? void 0 : challenge.ChallengeStatus) === EChallengeStatus$1.Paused ||
|
|
3408
3419
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
3420
|
+
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
3409
3421
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Completed ||
|
|
3410
3422
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Expired)));
|
|
3411
3423
|
};
|
|
@@ -3482,6 +3494,8 @@ const getBadgeContent = (challenge, language, timeLeft) => {
|
|
|
3482
3494
|
return index.h("span", { class: "status" }, translate$1('unavailable', language));
|
|
3483
3495
|
}
|
|
3484
3496
|
switch (challenge === null || challenge === void 0 ? void 0 : challenge.Status) {
|
|
3497
|
+
case EChallengeProgressStatus$1.Unavailable:
|
|
3498
|
+
return index.h("span", { class: "status" }, translate$1('unavailable', language));
|
|
3485
3499
|
case EChallengeProgressStatus$1.Expired:
|
|
3486
3500
|
return index.h("span", { class: "status" }, translate$1('expired', language));
|
|
3487
3501
|
case EChallengeProgressStatus$1.Forfeited:
|
|
@@ -3779,7 +3793,8 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3779
3793
|
grayed: [
|
|
3780
3794
|
EChallengeProgressStatus$1.Expired,
|
|
3781
3795
|
EChallengeProgressStatus$1.Forfeited,
|
|
3782
|
-
EChallengeProgressStatus$1.Completed
|
|
3796
|
+
EChallengeProgressStatus$1.Completed,
|
|
3797
|
+
EChallengeProgressStatus$1.Unavailable
|
|
3783
3798
|
].includes((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status) ||
|
|
3784
3799
|
this.isChallengePaused ||
|
|
3785
3800
|
this.isOptedOut
|
|
@@ -3813,9 +3828,10 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3813
3828
|
var _a, _b, _c;
|
|
3814
3829
|
return (index.h("div", { class: { 'challenge-block': true, 'challenge-levels': true } }, index.h("div", { class: "challenge-block-header" }, index.h("div", { class: "total-levels" }, index.h("h3", null, translate$1('levels', this.language)), index.h("span", null, "(", (_a = this.challenge) === null || _a === void 0 ? void 0 :
|
|
3815
3830
|
_a.LevelProgresses.length, ")")), index.h("button", { class: "row button", onClick: this.handleClickSeeAll({ open: true, tab: EChallengeDetailsTabs.Levels }) }, index.h("p", null, translate$1('seeAll', this.language)), index.h("div", { class: "chevron-button" }, index.h("img", { src: chevronSvg })))), index.h("div", { class: 'row levels-row', ref: (el) => (this.scrollContainerRef = el) }, (_c = (_b = this.challenge) === null || _b === void 0 ? void 0 : _b.LevelProgresses) === null || _c === void 0 ? void 0 : _c.map((level, index$1) => {
|
|
3816
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3831
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3817
3832
|
const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
|
|
3818
3833
|
const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
3834
|
+
((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
3819
3835
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
3820
3836
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
3821
3837
|
this.isOptedOut;
|
|
@@ -3823,17 +3839,18 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3823
3839
|
return (index.h("div", { class: {
|
|
3824
3840
|
'challenge-level': true,
|
|
3825
3841
|
level: true,
|
|
3826
|
-
forfeited: ((
|
|
3842
|
+
forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
3843
|
+
((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
3827
3844
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
3828
3845
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
3829
3846
|
this.isOptedOut,
|
|
3830
|
-
suspended: ((
|
|
3847
|
+
suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$1.Paused,
|
|
3831
3848
|
active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress,
|
|
3832
3849
|
completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.Completed
|
|
3833
3850
|
}, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, index.h("div", { class: {
|
|
3834
3851
|
level__title: true,
|
|
3835
3852
|
grayed: isGrayed
|
|
3836
|
-
} }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((
|
|
3853
|
+
} }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language)), index.h("div", { class: {
|
|
3837
3854
|
level__bonus: true
|
|
3838
3855
|
} }, index.h("span", { class: "level__icon" }, index.h("img", { class: {
|
|
3839
3856
|
grayed: isGrayed
|
|
@@ -3849,7 +3866,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3849
3866
|
level__value: true,
|
|
3850
3867
|
description: true,
|
|
3851
3868
|
ellipsed: true
|
|
3852
|
-
} }, this.challenge && getTarget(level, (
|
|
3869
|
+
} }, this.challenge && getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language)))));
|
|
3853
3870
|
}))));
|
|
3854
3871
|
}
|
|
3855
3872
|
renderEvents() {
|
|
@@ -3914,7 +3931,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3914
3931
|
var _a, _b;
|
|
3915
3932
|
const fullScreen = (this.swipping && this.progress > 0) || ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.open);
|
|
3916
3933
|
const footerIsVisible = !this.isMobile || (this.isMobile && fullScreen);
|
|
3917
|
-
return (index.h("div", { key: '
|
|
3934
|
+
return (index.h("div", { key: 'a973e58403665544dbe1068760e63ff2e41b0c8a', class: {
|
|
3918
3935
|
Mobile: this.isMobile,
|
|
3919
3936
|
swipped: (this.isMobile && this.swipping && this.progress > 0) || !this.isMobile,
|
|
3920
3937
|
moved: this.progress > 0,
|
|
@@ -267,6 +267,7 @@ var EChallengeProgressStatus;
|
|
|
267
267
|
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
268
268
|
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
269
269
|
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
270
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
|
|
270
271
|
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
271
272
|
var EChallengeStatus;
|
|
272
273
|
(function (EChallengeStatus) {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoChallengesOverlayDrawer = require('./casino-challenges-overlay-drawer-
|
|
5
|
+
const casinoChallengesOverlayDrawer = require('./casino-challenges-overlay-drawer-4a7b7ebd.js');
|
|
6
6
|
require('./index-d2288c94.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -15,6 +15,7 @@ export const actionButtonIsVisible = (challenge, isPromo, isOptedOut) => {
|
|
|
15
15
|
!(isOptedOut ||
|
|
16
16
|
(challenge === null || challenge === void 0 ? void 0 : challenge.ChallengeStatus) === EChallengeStatus.Paused ||
|
|
17
17
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus.Forfeited ||
|
|
18
|
+
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus.Unavailable ||
|
|
18
19
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus.Completed ||
|
|
19
20
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus.Expired));
|
|
20
21
|
};
|
|
@@ -91,6 +92,8 @@ export const getBadgeContent = (challenge, language, timeLeft) => {
|
|
|
91
92
|
return h("span", { class: "status" }, translate('unavailable', language));
|
|
92
93
|
}
|
|
93
94
|
switch (challenge === null || challenge === void 0 ? void 0 : challenge.Status) {
|
|
95
|
+
case EChallengeProgressStatus.Unavailable:
|
|
96
|
+
return h("span", { class: "status" }, translate('unavailable', language));
|
|
94
97
|
case EChallengeProgressStatus.Expired:
|
|
95
98
|
return h("span", { class: "status" }, translate('expired', language));
|
|
96
99
|
case EChallengeProgressStatus.Forfeited:
|
|
@@ -37,6 +37,7 @@ export var EChallengeProgressStatus;
|
|
|
37
37
|
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
38
38
|
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
39
39
|
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
40
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
|
|
40
41
|
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
41
42
|
export var EChallengeStatus;
|
|
42
43
|
(function (EChallengeStatus) {
|
|
@@ -54,7 +55,8 @@ export const ChallengeStatusDictionary = [
|
|
|
54
55
|
'expired',
|
|
55
56
|
'forfeited',
|
|
56
57
|
'awaiting',
|
|
57
|
-
'paused'
|
|
58
|
+
'paused',
|
|
59
|
+
'unavailable'
|
|
58
60
|
];
|
|
59
61
|
export var EChallengeTriggerType;
|
|
60
62
|
(function (EChallengeTriggerType) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-25fd45d2.js';
|
|
2
|
-
import { E as EHistoryItemLevelStatus$1, t as translate$2, H as HistoryItemLevelStatusDictionary, a as EPostMessageRequestType$1, s as setClientStyling, b as setClientStylingURL, c as setStreamStyling, r as resolveTranslationUrl$2, d as EChallengesTabs$1, e as EFeatureFlags } from './casino-challenges-overlay-drawer-
|
|
3
|
-
export { C as casino_challenges_overlay_drawer } from './casino-challenges-overlay-drawer-
|
|
2
|
+
import { E as EHistoryItemLevelStatus$1, t as translate$2, H as HistoryItemLevelStatusDictionary, a as EPostMessageRequestType$1, s as setClientStyling, b as setClientStylingURL, c as setStreamStyling, r as resolveTranslationUrl$2, d as EChallengesTabs$1, e as EFeatureFlags } from './casino-challenges-overlay-drawer-f0d4fe54.js';
|
|
3
|
+
export { C as casino_challenges_overlay_drawer } from './casino-challenges-overlay-drawer-f0d4fe54.js';
|
|
4
4
|
|
|
5
5
|
function _typeof(o) {
|
|
6
6
|
"@babel/helpers - typeof";
|
|
@@ -2410,6 +2410,7 @@ var EChallengeProgressStatus$1;
|
|
|
2410
2410
|
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
2411
2411
|
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
2412
2412
|
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
2413
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
|
|
2413
2414
|
})(EChallengeProgressStatus$1 || (EChallengeProgressStatus$1 = {}));
|
|
2414
2415
|
var EChallengeStatus$1;
|
|
2415
2416
|
(function (EChallengeStatus) {
|
|
@@ -2427,7 +2428,8 @@ const ChallengeStatusDictionary$1 = [
|
|
|
2427
2428
|
'expired',
|
|
2428
2429
|
'forfeited',
|
|
2429
2430
|
'awaiting',
|
|
2430
|
-
'paused'
|
|
2431
|
+
'paused',
|
|
2432
|
+
'unavailable'
|
|
2431
2433
|
];
|
|
2432
2434
|
var EChallengeTriggerType;
|
|
2433
2435
|
(function (EChallengeTriggerType) {
|
|
@@ -2605,25 +2607,27 @@ const CasinoChallengeDetailsLevels = class {
|
|
|
2605
2607
|
render() {
|
|
2606
2608
|
var _a, _b;
|
|
2607
2609
|
return (h(Host, { key: '6fb977a939b727af9277cd332ff105be64cb7f00' }, h("div", { key: '99dbdaadc719c8b4b6fd52586bd76ee19a9ae5c3', class: { Mobile: this.isMobile, 'levels-tab tab': true, visible: this.open }, ref: (el) => (this.scrollContainerRef = el) }, (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses) === null || _b === void 0 ? void 0 : _b.map((level, index) => {
|
|
2608
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2610
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2609
2611
|
const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
|
|
2610
2612
|
const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
2613
|
+
((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
2611
2614
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
2612
2615
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
2613
2616
|
this.isOptedOut;
|
|
2614
2617
|
const isActiveMatch = level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress;
|
|
2615
2618
|
return (h("div", { class: {
|
|
2616
2619
|
level: true,
|
|
2617
|
-
forfeited: ((
|
|
2620
|
+
forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
2621
|
+
((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
2618
2622
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
2619
2623
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
2620
2624
|
this.isOptedOut,
|
|
2621
|
-
suspended: ((
|
|
2625
|
+
suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$1.Paused,
|
|
2622
2626
|
active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress,
|
|
2623
2627
|
completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.Completed
|
|
2624
2628
|
}, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, h("div", { class: {
|
|
2625
2629
|
level__title: true
|
|
2626
|
-
} }, h("span", null, "Level ", index + 1), getLevelStatus((
|
|
2630
|
+
} }, h("span", null, "Level ", index + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language, true)), level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress && (h("div", { class: "level__progress" }, h("casino-challenge-level-progress-bar", { height: "8px", value: level.ProgressPercentage, active: activeChallenge }))), h("casino-challenge-expandable-paragraph", { "max-height": "42", active: level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress && activeChallenge, style: { width: '100%' } }, h("div", { class: {
|
|
2627
2631
|
level__bonus: true
|
|
2628
2632
|
} }, h("span", { class: "level__icon" }, h("img", { class: {
|
|
2629
2633
|
grayed: isGrayed
|
|
@@ -2635,7 +2639,7 @@ const CasinoChallengeDetailsLevels = class {
|
|
|
2635
2639
|
grayed: isGrayed
|
|
2636
2640
|
}, src: targetSvg, alt: "target-icon", title: "target-icon" })), h("span", { class: {
|
|
2637
2641
|
level__value: true
|
|
2638
|
-
} }, getTarget(level, (
|
|
2642
|
+
} }, getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language))))));
|
|
2639
2643
|
}))));
|
|
2640
2644
|
}
|
|
2641
2645
|
};
|
|
@@ -2676,7 +2680,9 @@ const CasinoChallengeDetailsProgressBar = class {
|
|
|
2676
2680
|
progress: true,
|
|
2677
2681
|
Mobile: this.isMobile,
|
|
2678
2682
|
paused: Status === EChallengeProgressStatus$1.Paused,
|
|
2679
|
-
grayed: Status === EChallengeProgressStatus$1.Forfeited ||
|
|
2683
|
+
grayed: Status === EChallengeProgressStatus$1.Forfeited ||
|
|
2684
|
+
Status === EChallengeProgressStatus$1.Unavailable ||
|
|
2685
|
+
ChallengeStatus === EChallengeStatus$1.Paused
|
|
2680
2686
|
} }, h("div", { class: {
|
|
2681
2687
|
progress__point: true,
|
|
2682
2688
|
start: true,
|
|
@@ -2688,7 +2694,7 @@ const CasinoChallengeDetailsProgressBar = class {
|
|
|
2688
2694
|
} }, secondImgSrc ? h("img", { class: "progress__icon", src: secondImgSrc }) : currLevel.OrderNumber + 2)));
|
|
2689
2695
|
}
|
|
2690
2696
|
render() {
|
|
2691
|
-
return h(Host, { key: '
|
|
2697
|
+
return h(Host, { key: '8f3de4c26bad9f23b9873469d004ae7cff048302' }, this.challengeProgress);
|
|
2692
2698
|
}
|
|
2693
2699
|
};
|
|
2694
2700
|
CasinoChallengeDetailsProgressBar.style = CasinoChallengeDetailsProgressBarStyle0;
|
|
@@ -3193,6 +3199,7 @@ var EChallengeProgressStatus;
|
|
|
3193
3199
|
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
3194
3200
|
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
3195
3201
|
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
3202
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
|
|
3196
3203
|
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
3197
3204
|
var EChallengeLevelTargetType;
|
|
3198
3205
|
(function (EChallengeLevelTargetType) {
|
|
@@ -3208,7 +3215,8 @@ const ChallengeStatusDictionary = [
|
|
|
3208
3215
|
'expired',
|
|
3209
3216
|
'forfeited',
|
|
3210
3217
|
'awaiting',
|
|
3211
|
-
'paused'
|
|
3218
|
+
'paused',
|
|
3219
|
+
'unavailable'
|
|
3212
3220
|
];
|
|
3213
3221
|
|
|
3214
3222
|
const DEFAULT_LANGUAGE = 'en';
|
|
@@ -3291,6 +3299,8 @@ const CasinoChallengesOverlaySlider$1 = class {
|
|
|
3291
3299
|
return h("span", { class: "status" }, translate('unavailable', this.language));
|
|
3292
3300
|
}
|
|
3293
3301
|
switch (this.challenge.Status) {
|
|
3302
|
+
case EChallengeProgressStatus.Unavailable:
|
|
3303
|
+
return h("span", { class: "status" }, translate('unavailable', this.language));
|
|
3294
3304
|
case EChallengeProgressStatus.Expired:
|
|
3295
3305
|
return h("span", { class: "status" }, translate('expired', this.language));
|
|
3296
3306
|
case EChallengeProgressStatus.Forfeited:
|
|
@@ -3342,20 +3352,21 @@ const CasinoChallengesOverlaySlider$1 = class {
|
|
|
3342
3352
|
render() {
|
|
3343
3353
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3344
3354
|
const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
|
|
3345
|
-
return (h(Host, { key: '
|
|
3355
|
+
return (h(Host, { key: '7285d0d026a4b6c469f4e86ff6678f00e02b47d8' }, h("div", { class: {
|
|
3346
3356
|
challenges__slide: true,
|
|
3347
3357
|
active: this.isItemActive(),
|
|
3348
3358
|
grayed: [
|
|
3349
3359
|
EChallengeProgressStatus.Expired,
|
|
3350
3360
|
EChallengeProgressStatus.Forfeited,
|
|
3351
|
-
EChallengeProgressStatus.Completed
|
|
3361
|
+
EChallengeProgressStatus.Completed,
|
|
3362
|
+
EChallengeProgressStatus.Unavailable
|
|
3352
3363
|
].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
|
|
3353
3364
|
isChallengePaused ||
|
|
3354
3365
|
this.isOptedOut
|
|
3355
|
-
}, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '
|
|
3366
|
+
}, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '23f5f7ae37c0cfe64cb4f88f9686247d5670164a', class: "challenges__slide__image-wrapper", style: {
|
|
3356
3367
|
width: `${this.slideWidth}px`,
|
|
3357
3368
|
height: `${this.slideHeight}px`
|
|
3358
|
-
} }, h("img", { key: '
|
|
3369
|
+
} }, h("img", { key: '4d98f3fdfadd1c25a28776cec70cc54ae000e637', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), h("h1", { key: 'fb3ce642a878feb26008b4c663bdbe48650597b0', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), h("div", { key: 'c38663e47c9aa7a7acf4b40535bd809c3a81ef6f', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
|
|
3359
3370
|
? ChallengeStatusDictionary[this.challenge.Status]
|
|
3360
3371
|
: 'unavailable'}` }, this.getBadgeContent()))));
|
|
3361
3372
|
}
|
|
@@ -3403,6 +3414,7 @@ const actionButtonIsVisible = (challenge, isPromo, isOptedOut) => {
|
|
|
3403
3414
|
!(isOptedOut ||
|
|
3404
3415
|
(challenge === null || challenge === void 0 ? void 0 : challenge.ChallengeStatus) === EChallengeStatus$1.Paused ||
|
|
3405
3416
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
3417
|
+
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
3406
3418
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Completed ||
|
|
3407
3419
|
(challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$1.Expired)));
|
|
3408
3420
|
};
|
|
@@ -3479,6 +3491,8 @@ const getBadgeContent = (challenge, language, timeLeft) => {
|
|
|
3479
3491
|
return h("span", { class: "status" }, translate$1('unavailable', language));
|
|
3480
3492
|
}
|
|
3481
3493
|
switch (challenge === null || challenge === void 0 ? void 0 : challenge.Status) {
|
|
3494
|
+
case EChallengeProgressStatus$1.Unavailable:
|
|
3495
|
+
return h("span", { class: "status" }, translate$1('unavailable', language));
|
|
3482
3496
|
case EChallengeProgressStatus$1.Expired:
|
|
3483
3497
|
return h("span", { class: "status" }, translate$1('expired', language));
|
|
3484
3498
|
case EChallengeProgressStatus$1.Forfeited:
|
|
@@ -3776,7 +3790,8 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3776
3790
|
grayed: [
|
|
3777
3791
|
EChallengeProgressStatus$1.Expired,
|
|
3778
3792
|
EChallengeProgressStatus$1.Forfeited,
|
|
3779
|
-
EChallengeProgressStatus$1.Completed
|
|
3793
|
+
EChallengeProgressStatus$1.Completed,
|
|
3794
|
+
EChallengeProgressStatus$1.Unavailable
|
|
3780
3795
|
].includes((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status) ||
|
|
3781
3796
|
this.isChallengePaused ||
|
|
3782
3797
|
this.isOptedOut
|
|
@@ -3810,9 +3825,10 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3810
3825
|
var _a, _b, _c;
|
|
3811
3826
|
return (h("div", { class: { 'challenge-block': true, 'challenge-levels': true } }, h("div", { class: "challenge-block-header" }, h("div", { class: "total-levels" }, h("h3", null, translate$1('levels', this.language)), h("span", null, "(", (_a = this.challenge) === null || _a === void 0 ? void 0 :
|
|
3812
3827
|
_a.LevelProgresses.length, ")")), h("button", { class: "row button", onClick: this.handleClickSeeAll({ open: true, tab: EChallengeDetailsTabs.Levels }) }, h("p", null, translate$1('seeAll', this.language)), h("div", { class: "chevron-button" }, h("img", { src: chevronSvg })))), h("div", { class: 'row levels-row', ref: (el) => (this.scrollContainerRef = el) }, (_c = (_b = this.challenge) === null || _b === void 0 ? void 0 : _b.LevelProgresses) === null || _c === void 0 ? void 0 : _c.map((level, index) => {
|
|
3813
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3828
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3814
3829
|
const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
|
|
3815
3830
|
const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
3831
|
+
((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
3816
3832
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
3817
3833
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
3818
3834
|
this.isOptedOut;
|
|
@@ -3820,17 +3836,18 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3820
3836
|
return (h("div", { class: {
|
|
3821
3837
|
'challenge-level': true,
|
|
3822
3838
|
level: true,
|
|
3823
|
-
forfeited: ((
|
|
3839
|
+
forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$1.Forfeited ||
|
|
3840
|
+
((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$1.Unavailable ||
|
|
3824
3841
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Closed ||
|
|
3825
3842
|
level.ProgressStatus === EChallengeProgressLevelStatus$1.Fillup ||
|
|
3826
3843
|
this.isOptedOut,
|
|
3827
|
-
suspended: ((
|
|
3844
|
+
suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$1.Paused,
|
|
3828
3845
|
active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.InProgress,
|
|
3829
3846
|
completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$1.Completed
|
|
3830
3847
|
}, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, h("div", { class: {
|
|
3831
3848
|
level__title: true,
|
|
3832
3849
|
grayed: isGrayed
|
|
3833
|
-
} }, h("span", null, "Level ", index + 1), getLevelStatus((
|
|
3850
|
+
} }, h("span", null, "Level ", index + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language)), h("div", { class: {
|
|
3834
3851
|
level__bonus: true
|
|
3835
3852
|
} }, h("span", { class: "level__icon" }, h("img", { class: {
|
|
3836
3853
|
grayed: isGrayed
|
|
@@ -3846,7 +3863,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3846
3863
|
level__value: true,
|
|
3847
3864
|
description: true,
|
|
3848
3865
|
ellipsed: true
|
|
3849
|
-
} }, this.challenge && getTarget(level, (
|
|
3866
|
+
} }, this.challenge && getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language)))));
|
|
3850
3867
|
}))));
|
|
3851
3868
|
}
|
|
3852
3869
|
renderEvents() {
|
|
@@ -3911,7 +3928,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
|
|
|
3911
3928
|
var _a, _b;
|
|
3912
3929
|
const fullScreen = (this.swipping && this.progress > 0) || ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.open);
|
|
3913
3930
|
const footerIsVisible = !this.isMobile || (this.isMobile && fullScreen);
|
|
3914
|
-
return (h("div", { key: '
|
|
3931
|
+
return (h("div", { key: 'a973e58403665544dbe1068760e63ff2e41b0c8a', class: {
|
|
3915
3932
|
Mobile: this.isMobile,
|
|
3916
3933
|
swipped: (this.isMobile && this.swipping && this.progress > 0) || !this.isMobile,
|
|
3917
3934
|
moved: this.progress > 0,
|
|
@@ -265,6 +265,7 @@ var EChallengeProgressStatus;
|
|
|
265
265
|
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
266
266
|
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
267
267
|
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
268
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
|
|
268
269
|
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
269
270
|
var EChallengeStatus;
|
|
270
271
|
(function (EChallengeStatus) {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CasinoChallengesOverlayDrawer } from './casino-challenges-overlay-drawer-
|
|
1
|
+
export { C as CasinoChallengesOverlayDrawer } from './casino-challenges-overlay-drawer-f0d4fe54.js';
|
|
2
2
|
import './index-25fd45d2.js';
|