@everymatrix/bonus-elevate-powerups-lobby 0.0.39 → 0.0.40
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/bonus-elevate-powerups-lobby/bonus-elevate-powerups-lobby-6ef0d903.js +1 -0
- package/dist/bonus-elevate-powerups-lobby/bonus-elevate-powerups_7.entry.js +1 -1
- package/dist/bonus-elevate-powerups-lobby/index.esm.js +1 -1
- package/dist/cjs/{bonus-elevate-powerups-lobby-c38947f9.js → bonus-elevate-powerups-lobby-c62c9f69.js} +1 -0
- package/dist/cjs/bonus-elevate-powerups_7.cjs.entry.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/esm/{bonus-elevate-powerups-lobby-b04a9da7.js → bonus-elevate-powerups-lobby-6ef0d903.js} +1 -0
- package/dist/esm/bonus-elevate-powerups_7.entry.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-lobby/.stencil/libs/common/src/types/casino/powerups.d.ts +3 -2
- package/package.json +1 -1
- package/dist/bonus-elevate-powerups-lobby/bonus-elevate-powerups-lobby-b04a9da7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e}from"./index-64ff3a3a.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function s(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function o(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function n(t,e,s,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return s=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),s;window[i]||(window[i]={}),s=function(t,e){return window.emMessageBus.subscribe(e,(s=>{if(!t)return;const o=t.getRootNode(),n=window[i];let a=n[e]&&n[e].sheet;a?n[e].refCount=n[e].refCount+1:(a=new CSSStyleSheet,a.replaceSync(s),n[e]={sheet:a,refCount:1});const r=o.adoptedStyleSheets||[];r.includes(a)||(o.adoptedStyleSheets=[...r,a])}))}(t,e);const n=s.unsubscribe.bind(s);return s.unsubscribe=()=>{if(window[i][e]){const t=window[i][e];t.refCount>1?t.refCount=t.refCount-1:delete window[i][e]}n()},s}const a={en:{history:"History",available:"Available"}},r=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{a[e]||(a[e]={});for(let i in t[e])a[e][i]=t[e][i]})),e(!0)}))})),l=(t,e,i)=>{let s=a[void 0!==e&&e in a?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s};var c,h,d;!function(t){t.COINS="coins",t.XP="xp"}(c||(c={})),function(t){t.TIME_PERIOD="timePeriod",t.NUMBER_OF_ROUNDS="numberOfRounds"}(h||(h={})),function(t){t[t.ACTIVE=0]="ACTIVE",t[t.ACTIVATED=1]="ACTIVATED",t[t.EXPIRED=2]="EXPIRED",t[t.CONSUMED=3]="CONSUMED",t[t.DISABLED=4]="DISABLED",t[t.ENABLED=6]="ENABLED",t[t.ACTIVATING=999]="ACTIVATING"}(d||(d={}));const b=class{constructor(e){t(this,e),this.tabsInfo={available:{tabId:"available",offset:0,limit:this.limit},history:{tabId:"history",offset:0,limit:this.limit}},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.activeTab=this.tabsInfo.available.tabId}onTabClick(t){this.activeTab=t}render(){return e("div",{key:"d02a197df9729b803c63fc618d2ce6acefca9237",class:"PowerUpsLobby",ref:t=>this.stylingContainer=t},e("div",{key:"e6a44cfe64a887aca6d23ad6cc57462639ee3631",class:"TabTitle"},e("span",{key:"09644cd28e50adbaf43347f01c08a6f6a8874c89",class:"Tab TabItem "+("available"===this.activeTab?"Active":""),onClick:this.onTabClick.bind(this,"available")},l("available",this.language)),e("span",{key:"6fc8efd978827391122130b5ea899071634003a8",class:"Tab TabItem "+("history"===this.activeTab?"Active":""),onClick:this.onTabClick.bind(this,"history")},l("history",this.language))),e("div",{key:"48a5e6a3291904f3113fa4903d3231ff59be3dd0",class:"Desc"}," ",c.XP," "),e("div",{key:"b918a55f179d1f64cf605df4ca47d93e3a6dba17",class:"TabContent"},"available"===this.activeTab&&e("bonus-elevate-powerups",{key:"f0d346fcafb0d6451fca43ec566b519173791e32",endpoint:this.endpoint,session:this.session,language:this.language,"mb-source":this.mbSource,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,limit:this.limit}),"history"===this.activeTab&&e("bonus-elevate-powerups-history",{key:"f01b6a1fed3455735bab4fe406fa05ae6c84ac00",endpoint:this.endpoint,session:this.session,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,limit:this.limit})))}handleClientStylingChange(t,e){t!=e&&s(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){r(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await r(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};b.style=':host{display:block}.PowerUpsLobby{padding:10px}.PowerUpsLobby .Desc{display:none !important}.PowerUpsLobby .TabItem{position:relative;cursor:pointer;padding:10px 20px;border-bottom:2px solid transparent}.PowerUpsLobby .TabItem::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);transform:scaleX(0)}.PowerUpsLobby .TabItem.Active::after{transform:scaleX(1)}.PowerUpsLobby .TabTitle{display:flex;flex-direction:row;text-transform:uppercase}.PowerUpsLobby .TabTitle .Tab{flex:1;padding:10px 20px;text-align:center;cursor:pointer}.PowerUpsLobby .TabTitle .Active1{border-bottom:2px solid;border-image-source:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);border-image-slice:1}.PowerUpsLobby .TabContent{margin-top:20px}';export{b as B,d as P,h as a,o as b,n as c,s}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,h as e,c as i,H as n,g as r}from"./index-64ff3a3a.js";import{P as s,a,s as o,b as h,c as l}from"./bonus-elevate-powerups-lobby-b04a9da7.js";export{B as bonus_elevate_powerups_lobby}from"./bonus-elevate-powerups-lobby-b04a9da7.js";const u={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",expiresIn:"EXPIRES IN ",playNow:"Start Now!",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups at the moment.",gotoShop:"Go to the shop to check power-ups availability.",termsCon:"Read full Terms & Conditions > ",games:"Games",selectGameToActive:"Select the game to activate power-up",days:"days"}},d=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{u[e]||(u[e]={});for(let i in t[e])u[e][i]=t[e][i]})),e(!0)}))})),c=(t,e,i)=>{let n=u[void 0!==e&&e in u?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},f={expand:"games",fields:"id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,games(id,gameId,name,slug,thumbnail)",status:`${s.ACTIVE},${s.ACTIVATED}`},m={expand:"games",fields:"id,powerUpID,games(id,gameId,slug,name,thumbnail)"},p=class{constructor(e){t(this,e),this.tableId="powerups",this.gameObservers=new Map,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.openTermsPage=!0,this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0}onReloadPageByType(t){const{limit:e,offset:i,tableId:n}=t.detail;n===this.tableId&&(this.offset=i,this.limit=e)}async loadData(){if(this.endpoint&&this.session){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const t=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit},games(limit=20,offset=0)`);let e={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};Object.entries(f).forEach((([e,i])=>{t.searchParams.append(e,i)})),t.searchParams.append("language",this.language);const i=await fetch(t,e);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:n,total:r}=await i.json();this.powerups=n,this.total=r}catch(t){"AbortError"!==t.name&&(console.error("Failed to load powerups history:",t),window.postMessage({type:"peHistoryLoaderError",error:t}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}onGameClick(t){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t.slug}})}onTermsUrlClick(t){window.postMessage({type:"onPowerupTermsUrlClicked",termsUrl:t},"*")}async loadMoreGames(t){var e;if(!(t.games.items.length>=t.games.total))try{const i=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${t.games.items.length})`),n={headers:{"x-SessionId":this.session}};i.searchParams.append("filter",`id=${t.powerUpID}`),Object.entries(m).forEach((([t,e])=>{i.searchParams.append(t,e)}));const r=await fetch(i.toString(),n);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const{data:s}=await r.json(),a=this.powerups.findIndex((e=>e.id===t.id));if(-1!==a){const t=Object.assign({},this.powerups[a]),i=null==s?void 0:s[0];if(i&&(null===(e=i.games)||void 0===e?void 0:e.items)){t.games.items=[...t.games.items,...i.games.items];const e=[...this.powerups];e[a]=t,this.powerups=e}}}catch(t){console.error("Failed to load more games:",t)}}initializeGamesObserver(t){let e=this.gameObservers.get(t.id);e&&e.disconnect(),e=new IntersectionObserver((i=>{i.forEach((i=>{i.isIntersecting&&(this.loadMoreGames(t),e.unobserve(i.target),this.gameObservers.delete(t.id))}))})),this.gameObservers.set(t.id,e),setTimeout((()=>{const i=this.stylingContainer.querySelector(`.PowerUpItem[data-powerup-id="${t.id}"] .Game:last-child`);i&&e.observe(i)}),200)}componentDidUpdate(){this.powerups.forEach((t=>{var e,i;(null===(e=t.games)||void 0===e?void 0:e.items.length)<(null===(i=t.games)||void 0===i?void 0:i.total)&&this.initializeGamesObserver(t)}))}render(){return e("div",{key:"7de60fedad83668fcff2f4a1ea02b489b80d3b12",class:"PowerUpsContainer",ref:t=>this.stylingContainer=t},this.isLoading?e("p",null,"Loading..."):this.total?[e("div",{class:"PowerUps"},this.powerups.map((t=>{var i,n;return e("div",{class:"PowerUpItem Card","data-powerup-id":t.id},e("div",{class:"CardLeft"},e("div",{class:"MainInfo"},e("div",{class:"DisplayName"}," ",t.displayName||"-"," "),e("div",{class:"Title2 PowerUpMultiplier"},e("span",{class:"BoostingPeriod"},e("span",{class:"Period"},t.boostingPeriod.minutes||t.boostingPeriod.numberOfRounds," "),c(t.boostingPeriod.mode===a.TIME_PERIOD?"min":"rounds",this.language)," "),e("span",{class:"Multiplier"},"| X ",t.multiplier.coefficient," "),e("span",{class:"MultiplierMode"},"| ",c(t.multiplier.mode,this.language)," "),t.expireTime&&[e("span",null," | "),e("span",{class:"ExpireCount"},e("time-count",{"expire-time":t.expireTime,language:this.language}))]),e("div",{class:"Description"},t.description)),e("div",{class:"TermsC"},this.openTermsPage?e("a",{href:t.termsUrl?t.termsUrl:"#",target:"_blank"},c("termsCon",this.language)):e("span",{onClick:this.onTermsUrlClick.bind(this,t.termsUrl)},c("termsCon",this.language)," "))),e("div",{class:"GamesContent CardRight"},e("div",{class:"GamesTitle"},e("span",{class:"Title2"}," ",c("games",this.language)),e("span",{class:"GamesAmount"}," ( ",(null===(i=t.games)||void 0===i?void 0:i.total)||0," ) ")),e("div",{class:"GameTitleTip"},c("selectGameToActive",this.language)),e("div",{class:"GamesList"},e("div",{class:"Games"},null===(n=t.games)||void 0===n?void 0:n.items.map((t=>e("div",{class:"Game"},e("ui-image",{src:t.thumbnail}),e("div",{class:"GameMask",onClick:this.onGameClick.bind(this,t)},e("div",{class:"GameStartBtn"},e("div",{class:"PlayIcon"}),e("span",null,c("playNow",this.language)))))))))))}))),e("div",{class:"Pagination"},this.total&&this.total>this.limit&&e("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"secondary-arrows-active":!0,"table-id":this.tableId,total:this.total}))]:e("div",{class:"EmptyPowerups"},e("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHlElEQVR4nO2daYwURRTH/4tnvPCI9xE1ahQTNZmp6gXRzar4wTtGvPWLUeIVPxgVNWbizqvZRdTAGoioEQwaFDWK0YBCvM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7AaDFFrZQ0XowgkOp/RhzbObDQeRlr5EOamne2YGc0elmlnNwv7vuJuDWrRIwi/8WXNKAppnlyShHad674Fz2o+SsBnCFEU2BfVipNLQb9P6bWkt4vGWoTCl3zmkW+cQJFolRgDYd8ROyjDvNrk145v4csvwx15grOOuWAoxKgXNCpXMSq6uoP/J4R3BeGrKHPxVw4ohR++/98nRQc1O3ORiNAMSZPYPC3Ai+EQXgyH8GI4hBfDIbwYDuHFcAgvhkN4MRzCi+EQXgyH8GI4hBcjLzfBDfDaupaDW3g4WcBbhuuieDEcEsWL4Q5hnpOfMzwej8fj8Xg8Ho/H4/GgyPwHN+MBWXHaP7AAAAAASUVORK5CYII="/>\n</defs>\n</svg>\n'}),e("span",{class:"NoPowerTitle"},c("nothingHere",this.language)),e("span",null,c("noPowerUps")),e("span",null,c("gotoShop")),e("div",null)))}handleDataConfigChange(){this.loadData().catch(console.error)}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){d(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await d(this.translationUrl),this.loadData().catch(console.error)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.gameObservers.forEach((t=>t.disconnect())),this.gameObservers.clear()}static get assetsDirs(){return["assets"]}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};p.style=':host{display:block;font-family:inherit;--game-amount-line:4}@media screen and (max-width: 768px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:32%}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{padding:8px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{margin:8px}}@media screen and (max-width: 470px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:45%}.PowerUpsContainer .PowerUps .PowerUpItem.Card{max-height:600px;height:fit-content;flex-direction:column}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft{gap:10px;min-width:320px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{height:51%;overflow:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{width:auto;margin:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft .Game,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight .Game{width:45%}}.PowerUpsContainer{font-size:0.95rem;display:flex;flex-direction:column;min-height:300px}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2em;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2em;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{width:100%;gap:12px;display:flex;flex-direction:column}.PowerUpsContainer .PowerUps time-count{margin-left:3px}.PowerUpsContainer .PowerUps .Card{width:100%;max-height:307px;gap:12px;border-radius:12px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .CardLeft,.PowerUpsContainer .PowerUps .Card .CardRight{display:flex;flex-direction:column}.PowerUpsContainer .PowerUps .Card .CardLeft{padding:20px;width:35%;display:flex;min-width:339px;flex-direction:column;justify-content:space-between}.PowerUpsContainer .PowerUps .Card .CardLeft .MainInfo{display:flex;flex-direction:column;gap:12px}.PowerUpsContainer .PowerUps .Card .CardRight{padding:10px}.PowerUpsContainer .PowerUps .Card .Description{color:var(--emw--color-gray-150, #c8d6ce);line-height:1.2rem;flex:1}.PowerUpsContainer .PowerUps .Card .CardLeft .DisplayName{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:22px;gap:12px;font-size:1.11rem}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier{text-transform:uppercase;font-size:0.85em;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Label{text-transform:uppercase}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Highlighted{-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange2, #E0A84E) 100%)}.PowerUpsContainer .PowerUps .Card .CardLeft .ExpireCount,.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{display:inline-block;-webkit-background-clip:text;background-clip:text;color:transparent}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{text-transform:uppercase;background-image:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);font-size:0.8em;font-weight:bold}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC a{color:var(--emw--color-powup-light-green, #18CE51);text-decoration:none}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC span{cursor:pointer}.PowerUpsContainer .PowerUps .Card .GamesContent{margin:20px;flex:1;gap:12px;display:flex;border-radius:8px;border:2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle{display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .Title2{text-transform:capitalize}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .GamesAmount{opacity:0.8}.PowerUpsContainer .PowerUps .Card .GamesContent .GameTitleTip{color:var(--emw--color-powup-gray-green, #C8D6CE);font-size:0.8rem}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList{display:flex;justify-content:center;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{padding:0;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line) - 1))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line));position:relative;min-width:132px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game .GameMask{display:none;transition:display;transition-duration:0.2s;position:absolute;width:70%;height:100%}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .mask-filter{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameStartBtn{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameMask{mix-blend-mode:screen;background-color:var(--emw--color-powup-green, #24B24E);display:flex;justify-content:center;align-items:center;position:absolute;width:100%;left:0;height:100%;top:0;border-radius:8px}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .GameStartBtn{width:98px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, #03832D 0%, #4DC071 100%);border:1px solid #FFFFFF;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.PowerUpsContainer .GameStartBtn .PlayIcon{background-image:url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 11 11" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 1C3.01472 1 1 3.01472 1 5.5C1 7.98528 3.01472 10 5.5 10C7.98528 10 10 7.98528 10 5.5C10 3.01472 7.98528 1 5.5 1ZM0 5.5C0 2.46243 2.46243 0 5.5 0C8.53757 0 11 2.46243 11 5.5C11 8.53757 8.53757 11 5.5 11C2.46243 11 0 8.53757 0 5.5ZM5.12255 3.21652C5.12728 3.21956 5.13199 3.22259 5.13668 3.22561L7.49698 4.74294C7.50129 4.74571 7.50562 4.74849 7.50998 4.75129C7.58551 4.79982 7.66805 4.85285 7.73381 4.90413C7.80355 4.95852 7.91363 5.05446 7.97854 5.20809C8.0574 5.39471 8.0574 5.60529 7.97854 5.79191C7.91363 5.94554 7.80355 6.04148 7.73381 6.09587C7.66805 6.14715 7.58551 6.20018 7.50998 6.24871C7.50562 6.25151 7.50129 6.25429 7.49698 6.25706L5.13668 7.77439C5.13199 7.77741 5.12727 7.78045 5.12255 7.78348C5.03469 7.84 4.9423 7.89941 4.86094 7.94176C4.77909 7.98436 4.63056 8.05332 4.44657 8.04018C4.22957 8.02468 4.02999 7.91572 3.89961 7.74157C3.78907 7.59391 3.76675 7.43167 3.75832 7.33979C3.74995 7.24844 3.74997 7.1386 3.75 7.03414C3.75 7.02852 3.75 7.02292 3.75 7.01733V3.98267C3.75 3.97708 3.75 3.97148 3.75 3.96586C3.74997 3.8614 3.74995 3.75156 3.75832 3.66021C3.76675 3.56833 3.78907 3.40609 3.89961 3.25843C4.02999 3.08428 4.22957 2.97532 4.44657 2.95982C4.63056 2.94668 4.77909 3.01564 4.86094 3.05824C4.94231 3.10059 5.03469 3.16001 5.12255 3.21652ZM4.75 4.16583V6.83417L6.82537 5.5L4.75 4.16583Z" fill="white"/> <path d="M4.75 6.83417V4.16583L6.82537 5.5L4.75 6.83417Z" fill="white"/></svg>\');height:16px;width:16px;background-repeat:no-repeat;background-size:contain}';const g={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",consumed:"Used",expired:"Expired",enabled:"Enabled",active:"Active",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups have been used at the moment.",gotoShop:"Go to shop to check power-ups availability."}},w=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{g[e]||(g[e]={});for(let i in t[e])g[e][i]=t[e][i]})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})),v=(t,e,i)=>{let n=g[void 0!==e&&e in g?e:"en"][t]||t;if(null==i?void 0:i.values)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n};
|
|
1
|
+
import{r as t,h as e,c as i,H as n,g as r}from"./index-64ff3a3a.js";import{P as s,a,s as o,b as h,c as l}from"./bonus-elevate-powerups-lobby-6ef0d903.js";export{B as bonus_elevate_powerups_lobby}from"./bonus-elevate-powerups-lobby-6ef0d903.js";const u={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",expiresIn:"EXPIRES IN ",playNow:"Start Now!",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups at the moment.",gotoShop:"Go to the shop to check power-ups availability.",termsCon:"Read full Terms & Conditions > ",games:"Games",selectGameToActive:"Select the game to activate power-up",days:"days"}},d=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{u[e]||(u[e]={});for(let i in t[e])u[e][i]=t[e][i]})),e(!0)}))})),c=(t,e,i)=>{let n=u[void 0!==e&&e in u?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},f={expand:"games",fields:"id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,games(id,gameId,name,slug,thumbnail)",status:`${s.ACTIVE},${s.ACTIVATED}`},m={expand:"games",fields:"id,powerUpID,games(id,gameId,slug,name,thumbnail)"},p=class{constructor(e){t(this,e),this.tableId="powerups",this.gameObservers=new Map,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.openTermsPage=!0,this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0}onReloadPageByType(t){const{limit:e,offset:i,tableId:n}=t.detail;n===this.tableId&&(this.offset=i,this.limit=e)}async loadData(){if(this.endpoint&&this.session){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const t=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit},games(limit=20,offset=0)`);let e={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};Object.entries(f).forEach((([e,i])=>{t.searchParams.append(e,i)})),t.searchParams.append("language",this.language);const i=await fetch(t,e);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:n,total:r}=await i.json();this.powerups=n,this.total=r}catch(t){"AbortError"!==t.name&&(console.error("Failed to load powerups history:",t),window.postMessage({type:"peHistoryLoaderError",error:t}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}onGameClick(t){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t.slug}})}onTermsUrlClick(t){window.postMessage({type:"onPowerupTermsUrlClicked",termsUrl:t},"*")}async loadMoreGames(t){var e;if(!(t.games.items.length>=t.games.total))try{const i=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${t.games.items.length})`),n={headers:{"x-SessionId":this.session}};i.searchParams.append("filter",`id=${t.powerUpID}`),Object.entries(m).forEach((([t,e])=>{i.searchParams.append(t,e)}));const r=await fetch(i.toString(),n);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const{data:s}=await r.json(),a=this.powerups.findIndex((e=>e.id===t.id));if(-1!==a){const t=Object.assign({},this.powerups[a]),i=null==s?void 0:s[0];if(i&&(null===(e=i.games)||void 0===e?void 0:e.items)){t.games.items=[...t.games.items,...i.games.items];const e=[...this.powerups];e[a]=t,this.powerups=e}}}catch(t){console.error("Failed to load more games:",t)}}initializeGamesObserver(t){let e=this.gameObservers.get(t.id);e&&e.disconnect(),e=new IntersectionObserver((i=>{i.forEach((i=>{i.isIntersecting&&(this.loadMoreGames(t),e.unobserve(i.target),this.gameObservers.delete(t.id))}))})),this.gameObservers.set(t.id,e),setTimeout((()=>{const i=this.stylingContainer.querySelector(`.PowerUpItem[data-powerup-id="${t.id}"] .Game:last-child`);i&&e.observe(i)}),200)}componentDidUpdate(){this.powerups.forEach((t=>{var e,i;(null===(e=t.games)||void 0===e?void 0:e.items.length)<(null===(i=t.games)||void 0===i?void 0:i.total)&&this.initializeGamesObserver(t)}))}render(){return e("div",{key:"7de60fedad83668fcff2f4a1ea02b489b80d3b12",class:"PowerUpsContainer",ref:t=>this.stylingContainer=t},this.isLoading?e("p",null,"Loading..."):this.total?[e("div",{class:"PowerUps"},this.powerups.map((t=>{var i,n;return e("div",{class:"PowerUpItem Card","data-powerup-id":t.id},e("div",{class:"CardLeft"},e("div",{class:"MainInfo"},e("div",{class:"DisplayName"}," ",t.displayName||"-"," "),e("div",{class:"Title2 PowerUpMultiplier"},e("span",{class:"BoostingPeriod"},e("span",{class:"Period"},t.boostingPeriod.minutes||t.boostingPeriod.numberOfRounds," "),c(t.boostingPeriod.mode===a.TIME_PERIOD?"min":"rounds",this.language)," "),e("span",{class:"Multiplier"},"| X ",t.multiplier.coefficient," "),e("span",{class:"MultiplierMode"},"| ",c(t.multiplier.mode,this.language)," "),t.expireTime&&[e("span",null," | "),e("span",{class:"ExpireCount"},e("time-count",{"expire-time":t.expireTime,language:this.language}))]),e("div",{class:"Description"},t.description)),e("div",{class:"TermsC"},this.openTermsPage?e("a",{href:t.termsUrl?t.termsUrl:"#",target:"_blank"},c("termsCon",this.language)):e("span",{onClick:this.onTermsUrlClick.bind(this,t.termsUrl)},c("termsCon",this.language)," "))),e("div",{class:"GamesContent CardRight"},e("div",{class:"GamesTitle"},e("span",{class:"Title2"}," ",c("games",this.language)),e("span",{class:"GamesAmount"}," ( ",(null===(i=t.games)||void 0===i?void 0:i.total)||0," ) ")),e("div",{class:"GameTitleTip"},c("selectGameToActive",this.language)),e("div",{class:"GamesList"},e("div",{class:"Games"},null===(n=t.games)||void 0===n?void 0:n.items.map((t=>e("div",{class:"Game"},e("ui-image",{src:t.thumbnail}),e("div",{class:"GameMask",onClick:this.onGameClick.bind(this,t)},e("div",{class:"GameStartBtn"},e("div",{class:"PlayIcon"}),e("span",null,c("playNow",this.language)))))))))))}))),e("div",{class:"Pagination"},this.total&&this.total>this.limit&&e("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"secondary-arrows-active":!0,"table-id":this.tableId,total:this.total}))]:e("div",{class:"EmptyPowerups"},e("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHlElEQVR4nO2daYwURRTH/4tnvPCI9xE1ahQTNZmp6gXRzar4wTtGvPWLUeIVPxgVNWbizqvZRdTAGoioEQw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wv6BOFZnht0J7AaDFFrZQ0XowgkOp/RhzbObDQeRlr5EOamne2YGc0elmlnNwv7vuJuDWrRIwi/8WXNKAppnlyShHad674Fz2o+SsBnCFEU2BfVipNLQb9P6bWkt4vGWoTCl3zmkW+cQJFolRgDYd8ROyjDvNrk145v4csvwx15grOOuWAoxKgXNCpXMSq6uoP/J4R3BeGrKHPxVw4ohR++/98nRQc1O3ORiNAMSZPYPC3Ai+EQXgyH8GI4hBfDIbwYDuHFcAgvhkN4MRzCi+EQXgyH8GI4hBcjLzfBDfDaupaDW3g4WcBbhuuieDEcEsWL4Q5hnpOfMzwej8fj8Xg8Ho/H4/GgyPwHN+MBWXHaP7AAAAAASUVORK5CYII="/>\n</defs>\n</svg>\n'}),e("span",{class:"NoPowerTitle"},c("nothingHere",this.language)),e("span",null,c("noPowerUps")),e("span",null,c("gotoShop")),e("div",null)))}handleDataConfigChange(){this.loadData().catch(console.error)}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){d(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await d(this.translationUrl),this.loadData().catch(console.error)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.gameObservers.forEach((t=>t.disconnect())),this.gameObservers.clear()}static get assetsDirs(){return["assets"]}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};p.style=':host{display:block;font-family:inherit;--game-amount-line:4}@media screen and (max-width: 768px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:32%}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{padding:8px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{margin:8px}}@media screen and (max-width: 470px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:45%}.PowerUpsContainer .PowerUps .PowerUpItem.Card{max-height:600px;height:fit-content;flex-direction:column}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft{gap:10px;min-width:320px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{height:51%;overflow:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{width:auto;margin:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft .Game,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight .Game{width:45%}}.PowerUpsContainer{font-size:0.95rem;display:flex;flex-direction:column;min-height:300px}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2em;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2em;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{width:100%;gap:12px;display:flex;flex-direction:column}.PowerUpsContainer .PowerUps time-count{margin-left:3px}.PowerUpsContainer .PowerUps .Card{width:100%;max-height:307px;gap:12px;border-radius:12px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .CardLeft,.PowerUpsContainer .PowerUps .Card .CardRight{display:flex;flex-direction:column}.PowerUpsContainer .PowerUps .Card .CardLeft{padding:20px;width:35%;display:flex;min-width:339px;flex-direction:column;justify-content:space-between}.PowerUpsContainer .PowerUps .Card .CardLeft .MainInfo{display:flex;flex-direction:column;gap:12px}.PowerUpsContainer .PowerUps .Card .CardRight{padding:10px}.PowerUpsContainer .PowerUps .Card .Description{color:var(--emw--color-gray-150, #c8d6ce);line-height:1.2rem;flex:1}.PowerUpsContainer .PowerUps .Card .CardLeft .DisplayName{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:22px;gap:12px;font-size:1.11rem}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier{text-transform:uppercase;font-size:0.85em;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Label{text-transform:uppercase}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Highlighted{-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange2, #E0A84E) 100%)}.PowerUpsContainer .PowerUps .Card .CardLeft .ExpireCount,.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{display:inline-block;-webkit-background-clip:text;background-clip:text;color:transparent}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{text-transform:uppercase;background-image:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);font-size:0.8em;font-weight:bold}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC a{color:var(--emw--color-powup-light-green, #18CE51);text-decoration:none}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC span{cursor:pointer}.PowerUpsContainer .PowerUps .Card .GamesContent{margin:20px;flex:1;gap:12px;display:flex;border-radius:8px;border:2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle{display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .Title2{text-transform:capitalize}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .GamesAmount{opacity:0.8}.PowerUpsContainer .PowerUps .Card .GamesContent .GameTitleTip{color:var(--emw--color-powup-gray-green, #C8D6CE);font-size:0.8rem}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList{display:flex;justify-content:center;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{padding:0;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line) - 1))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line));position:relative;min-width:132px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game .GameMask{display:none;transition:display;transition-duration:0.2s;position:absolute;width:70%;height:100%}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .mask-filter{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameStartBtn{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameMask{mix-blend-mode:screen;background-color:var(--emw--color-powup-green, #24B24E);display:flex;justify-content:center;align-items:center;position:absolute;width:100%;left:0;height:100%;top:0;border-radius:8px}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .GameStartBtn{width:98px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, #03832D 0%, #4DC071 100%);border:1px solid #FFFFFF;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.PowerUpsContainer .GameStartBtn .PlayIcon{background-image:url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 11 11" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 1C3.01472 1 1 3.01472 1 5.5C1 7.98528 3.01472 10 5.5 10C7.98528 10 10 7.98528 10 5.5C10 3.01472 7.98528 1 5.5 1ZM0 5.5C0 2.46243 2.46243 0 5.5 0C8.53757 0 11 2.46243 11 5.5C11 8.53757 8.53757 11 5.5 11C2.46243 11 0 8.53757 0 5.5ZM5.12255 3.21652C5.12728 3.21956 5.13199 3.22259 5.13668 3.22561L7.49698 4.74294C7.50129 4.74571 7.50562 4.74849 7.50998 4.75129C7.58551 4.79982 7.66805 4.85285 7.73381 4.90413C7.80355 4.95852 7.91363 5.05446 7.97854 5.20809C8.0574 5.39471 8.0574 5.60529 7.97854 5.79191C7.91363 5.94554 7.80355 6.04148 7.73381 6.09587C7.66805 6.14715 7.58551 6.20018 7.50998 6.24871C7.50562 6.25151 7.50129 6.25429 7.49698 6.25706L5.13668 7.77439C5.13199 7.77741 5.12727 7.78045 5.12255 7.78348C5.03469 7.84 4.9423 7.89941 4.86094 7.94176C4.77909 7.98436 4.63056 8.05332 4.44657 8.04018C4.22957 8.02468 4.02999 7.91572 3.89961 7.74157C3.78907 7.59391 3.76675 7.43167 3.75832 7.33979C3.74995 7.24844 3.74997 7.1386 3.75 7.03414C3.75 7.02852 3.75 7.02292 3.75 7.01733V3.98267C3.75 3.97708 3.75 3.97148 3.75 3.96586C3.74997 3.8614 3.74995 3.75156 3.75832 3.66021C3.76675 3.56833 3.78907 3.40609 3.89961 3.25843C4.02999 3.08428 4.22957 2.97532 4.44657 2.95982C4.63056 2.94668 4.77909 3.01564 4.86094 3.05824C4.94231 3.10059 5.03469 3.16001 5.12255 3.21652ZM4.75 4.16583V6.83417L6.82537 5.5L4.75 4.16583Z" fill="white"/> <path d="M4.75 6.83417V4.16583L6.82537 5.5L4.75 6.83417Z" fill="white"/></svg>\');height:16px;width:16px;background-repeat:no-repeat;background-size:contain}';const g={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",consumed:"Used",expired:"Expired",enabled:"Enabled",active:"Active",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups have been used at the moment.",gotoShop:"Go to shop to check power-ups availability."}},w=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{g[e]||(g[e]={});for(let i in t[e])g[e][i]=t[e][i]})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})),v=(t,e,i)=>{let n=g[void 0!==e&&e in g?e:"en"][t]||t;if(null==i?void 0:i.values)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n};
|
|
2
2
|
//! moment.js
|
|
3
3
|
//! version : 2.29.4
|
|
4
4
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{B as BonusElevatePowerupsLobby}from"./bonus-elevate-powerups-lobby-
|
|
1
|
+
export{B as BonusElevatePowerupsLobby}from"./bonus-elevate-powerups-lobby-6ef0d903.js";import"./index-64ff3a3a.js";
|
|
@@ -174,6 +174,7 @@ exports.PowerUpStatus = void 0;
|
|
|
174
174
|
PowerUpStatus[PowerUpStatus["CONSUMED"] = 3] = "CONSUMED";
|
|
175
175
|
PowerUpStatus[PowerUpStatus["DISABLED"] = 4] = "DISABLED";
|
|
176
176
|
PowerUpStatus[PowerUpStatus["ENABLED"] = 6] = "ENABLED";
|
|
177
|
+
PowerUpStatus[PowerUpStatus["ACTIVATING"] = 999] = "ACTIVATING";
|
|
177
178
|
})(exports.PowerUpStatus || (exports.PowerUpStatus = {}));
|
|
178
179
|
|
|
179
180
|
const bonusElevatePowerupsLobbyCss = ":host{display:block}.PowerUpsLobby{padding:10px}.PowerUpsLobby .Desc{display:none !important}.PowerUpsLobby .TabItem{position:relative;cursor:pointer;padding:10px 20px;border-bottom:2px solid transparent}.PowerUpsLobby .TabItem::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);transform:scaleX(0)}.PowerUpsLobby .TabItem.Active::after{transform:scaleX(1)}.PowerUpsLobby .TabTitle{display:flex;flex-direction:row;text-transform:uppercase}.PowerUpsLobby .TabTitle .Tab{flex:1;padding:10px 20px;text-align:center;cursor:pointer}.PowerUpsLobby .TabTitle .Active1{border-bottom:2px solid;border-image-source:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);border-image-slice:1}.PowerUpsLobby .TabContent{margin-top:20px}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d5c2977d.js');
|
|
6
|
-
const bonusElevatePowerupsLobby = require('./bonus-elevate-powerups-lobby-
|
|
6
|
+
const bonusElevatePowerupsLobby = require('./bonus-elevate-powerups-lobby-c62c9f69.js');
|
|
7
7
|
|
|
8
8
|
const DEFAULT_LANGUAGE$2 = 'en';
|
|
9
9
|
const TRANSLATIONS$2 = {
|
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 bonusElevatePowerupsLobby = require('./bonus-elevate-powerups-lobby-
|
|
5
|
+
const bonusElevatePowerupsLobby = require('./bonus-elevate-powerups-lobby-c62c9f69.js');
|
|
6
6
|
require('./index-d5c2977d.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -172,6 +172,7 @@ var PowerUpStatus;
|
|
|
172
172
|
PowerUpStatus[PowerUpStatus["CONSUMED"] = 3] = "CONSUMED";
|
|
173
173
|
PowerUpStatus[PowerUpStatus["DISABLED"] = 4] = "DISABLED";
|
|
174
174
|
PowerUpStatus[PowerUpStatus["ENABLED"] = 6] = "ENABLED";
|
|
175
|
+
PowerUpStatus[PowerUpStatus["ACTIVATING"] = 999] = "ACTIVATING";
|
|
175
176
|
})(PowerUpStatus || (PowerUpStatus = {}));
|
|
176
177
|
|
|
177
178
|
const bonusElevatePowerupsLobbyCss = ":host{display:block}.PowerUpsLobby{padding:10px}.PowerUpsLobby .Desc{display:none !important}.PowerUpsLobby .TabItem{position:relative;cursor:pointer;padding:10px 20px;border-bottom:2px solid transparent}.PowerUpsLobby .TabItem::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);transform:scaleX(0)}.PowerUpsLobby .TabItem.Active::after{transform:scaleX(1)}.PowerUpsLobby .TabTitle{display:flex;flex-direction:row;text-transform:uppercase}.PowerUpsLobby .TabTitle .Tab{flex:1;padding:10px 20px;text-align:center;cursor:pointer}.PowerUpsLobby .TabTitle .Active1{border-bottom:2px solid;border-image-source:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);border-image-slice:1}.PowerUpsLobby .TabContent{margin-top:20px}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-64ff3a3a.js';
|
|
2
|
-
import { P as PowerUpStatus, a as BoostingPeriodMode, s as setClientStyling, b as setClientStylingURL, c as setStreamStyling } from './bonus-elevate-powerups-lobby-
|
|
3
|
-
export { B as bonus_elevate_powerups_lobby } from './bonus-elevate-powerups-lobby-
|
|
2
|
+
import { P as PowerUpStatus, a as BoostingPeriodMode, s as setClientStyling, b as setClientStylingURL, c as setStreamStyling } from './bonus-elevate-powerups-lobby-6ef0d903.js';
|
|
3
|
+
export { B as bonus_elevate_powerups_lobby } from './bonus-elevate-powerups-lobby-6ef0d903.js';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_LANGUAGE$2 = 'en';
|
|
6
6
|
const TRANSLATIONS$2 = {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { B as BonusElevatePowerupsLobby } from './bonus-elevate-powerups-lobby-
|
|
1
|
+
export { B as BonusElevatePowerupsLobby } from './bonus-elevate-powerups-lobby-6ef0d903.js';
|
|
2
2
|
import './index-64ff3a3a.js';
|
|
@@ -12,7 +12,8 @@ export declare enum PowerUpStatus {
|
|
|
12
12
|
EXPIRED = 2,//'expired',
|
|
13
13
|
CONSUMED = 3,//'consumed'
|
|
14
14
|
DISABLED = 4,// 'disabled',
|
|
15
|
-
ENABLED = 6
|
|
15
|
+
ENABLED = 6,//'enabled',
|
|
16
|
+
ACTIVATING = 999
|
|
16
17
|
}
|
|
17
18
|
export interface PowerUpMultiplier {
|
|
18
19
|
mode: MultiplierMode | string;
|
|
@@ -37,7 +38,6 @@ export interface PowerUp {
|
|
|
37
38
|
multiplier: PowerUpMultiplier;
|
|
38
39
|
boostingPeriod: PowerUpBoostingPeriod;
|
|
39
40
|
triggerMethod: PowerUpTriggerMethod;
|
|
40
|
-
powerUpName?: string;
|
|
41
41
|
displayName: string;
|
|
42
42
|
description?: string;
|
|
43
43
|
validity: number;
|
|
@@ -45,6 +45,7 @@ export interface PowerUp {
|
|
|
45
45
|
universalID: string;
|
|
46
46
|
ins?: string;
|
|
47
47
|
powerUpID?: number;
|
|
48
|
+
powerUpName?: string;
|
|
48
49
|
currentTime?: string;
|
|
49
50
|
expireTime?: string;
|
|
50
51
|
activatedAt?: string;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./index-64ff3a3a.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function s(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function o(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function n(t,e,s,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return s=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),s;window[i]||(window[i]={}),s=function(t,e){return window.emMessageBus.subscribe(e,(s=>{if(!t)return;const o=t.getRootNode(),n=window[i];let a=n[e]&&n[e].sheet;a?n[e].refCount=n[e].refCount+1:(a=new CSSStyleSheet,a.replaceSync(s),n[e]={sheet:a,refCount:1});const r=o.adoptedStyleSheets||[];r.includes(a)||(o.adoptedStyleSheets=[...r,a])}))}(t,e);const n=s.unsubscribe.bind(s);return s.unsubscribe=()=>{if(window[i][e]){const t=window[i][e];t.refCount>1?t.refCount=t.refCount-1:delete window[i][e]}n()},s}const a={en:{history:"History",available:"Available"}},r=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{a[e]||(a[e]={});for(let i in t[e])a[e][i]=t[e][i]})),e(!0)}))})),l=(t,e,i)=>{let s=a[void 0!==e&&e in a?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s};var c,h,d;!function(t){t.COINS="coins",t.XP="xp"}(c||(c={})),function(t){t.TIME_PERIOD="timePeriod",t.NUMBER_OF_ROUNDS="numberOfRounds"}(h||(h={})),function(t){t[t.ACTIVE=0]="ACTIVE",t[t.ACTIVATED=1]="ACTIVATED",t[t.EXPIRED=2]="EXPIRED",t[t.CONSUMED=3]="CONSUMED",t[t.DISABLED=4]="DISABLED",t[t.ENABLED=6]="ENABLED"}(d||(d={}));const b=class{constructor(e){t(this,e),this.tabsInfo={available:{tabId:"available",offset:0,limit:this.limit},history:{tabId:"history",offset:0,limit:this.limit}},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.activeTab=this.tabsInfo.available.tabId}onTabClick(t){this.activeTab=t}render(){return e("div",{key:"d02a197df9729b803c63fc618d2ce6acefca9237",class:"PowerUpsLobby",ref:t=>this.stylingContainer=t},e("div",{key:"e6a44cfe64a887aca6d23ad6cc57462639ee3631",class:"TabTitle"},e("span",{key:"09644cd28e50adbaf43347f01c08a6f6a8874c89",class:"Tab TabItem "+("available"===this.activeTab?"Active":""),onClick:this.onTabClick.bind(this,"available")},l("available",this.language)),e("span",{key:"6fc8efd978827391122130b5ea899071634003a8",class:"Tab TabItem "+("history"===this.activeTab?"Active":""),onClick:this.onTabClick.bind(this,"history")},l("history",this.language))),e("div",{key:"48a5e6a3291904f3113fa4903d3231ff59be3dd0",class:"Desc"}," ",c.XP," "),e("div",{key:"b918a55f179d1f64cf605df4ca47d93e3a6dba17",class:"TabContent"},"available"===this.activeTab&&e("bonus-elevate-powerups",{key:"f0d346fcafb0d6451fca43ec566b519173791e32",endpoint:this.endpoint,session:this.session,language:this.language,"mb-source":this.mbSource,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,limit:this.limit}),"history"===this.activeTab&&e("bonus-elevate-powerups-history",{key:"f01b6a1fed3455735bab4fe406fa05ae6c84ac00",endpoint:this.endpoint,session:this.session,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,limit:this.limit})))}handleClientStylingChange(t,e){t!=e&&s(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){r(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await r(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};b.style=':host{display:block}.PowerUpsLobby{padding:10px}.PowerUpsLobby .Desc{display:none !important}.PowerUpsLobby .TabItem{position:relative;cursor:pointer;padding:10px 20px;border-bottom:2px solid transparent}.PowerUpsLobby .TabItem::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);transform:scaleX(0)}.PowerUpsLobby .TabItem.Active::after{transform:scaleX(1)}.PowerUpsLobby .TabTitle{display:flex;flex-direction:row;text-transform:uppercase}.PowerUpsLobby .TabTitle .Tab{flex:1;padding:10px 20px;text-align:center;cursor:pointer}.PowerUpsLobby .TabTitle .Active1{border-bottom:2px solid;border-image-source:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);border-image-slice:1}.PowerUpsLobby .TabContent{margin-top:20px}';export{b as B,d as P,h as a,o as b,n as c,s}
|