@everymatrix/bonus-powerups-ingame-games 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/bonus-powerups-ingame-games/app-globals-0f993ce5.js +1 -0
  2. package/dist/bonus-powerups-ingame-games/bonus-powerups-ingame-games-b2c0935f.js +1 -0
  3. package/dist/bonus-powerups-ingame-games/bonus-powerups-ingame-games.esm.js +1 -0
  4. package/dist/bonus-powerups-ingame-games/bonus-powerups-ingame-games_3.entry.js +1 -0
  5. package/dist/bonus-powerups-ingame-games/index-fd928daa.js +2 -0
  6. package/dist/bonus-powerups-ingame-games/index.esm.js +1 -0
  7. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  8. package/dist/cjs/bonus-powerups-ingame-games-7de80a10.js +317 -0
  9. package/dist/cjs/bonus-powerups-ingame-games.cjs.js +25 -0
  10. package/dist/cjs/bonus-powerups-ingame-games_3.cjs.entry.js +247 -0
  11. package/dist/cjs/index-e3184c85.js +1246 -0
  12. package/dist/cjs/index.cjs.js +10 -0
  13. package/dist/cjs/loader.cjs.js +15 -0
  14. package/dist/collection/assets/Arrow Curve Left.svg +11 -0
  15. package/dist/collection/assets/double-right.svg +4 -0
  16. package/dist/collection/assets/gotoPage.svg +3 -0
  17. package/dist/collection/assets/return.svg +15 -0
  18. package/dist/collection/collection-manifest.json +25 -0
  19. package/dist/collection/components/bonus-powerups-ingame-games/bonus-powerups-ingame-games.css +279 -0
  20. package/dist/collection/components/bonus-powerups-ingame-games/bonus-powerups-ingame-games.js +335 -0
  21. package/dist/collection/components/bonus-powerups-ingame-games/index.js +1 -0
  22. package/dist/collection/index.js +1 -0
  23. package/dist/collection/utils/constants.js +4 -0
  24. package/dist/collection/utils/locale.utils.js +38 -0
  25. package/dist/collection/utils/utils.js +3 -0
  26. package/dist/esm/app-globals-0f993ce5.js +3 -0
  27. package/dist/esm/bonus-powerups-ingame-games-b2c0935f.js +315 -0
  28. package/dist/esm/bonus-powerups-ingame-games.js +20 -0
  29. package/dist/esm/bonus-powerups-ingame-games_3.entry.js +241 -0
  30. package/dist/esm/index-fd928daa.js +1217 -0
  31. package/dist/esm/index.js +2 -0
  32. package/dist/esm/loader.js +11 -0
  33. package/dist/index.cjs.js +1 -0
  34. package/dist/index.js +1 -0
  35. package/dist/stencil.config.dev.js +20 -0
  36. package/dist/stencil.config.js +20 -0
  37. package/dist/storybook/main.js +43 -0
  38. package/dist/storybook/preview.js +9 -0
  39. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  40. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/libs/common/src/types/casino/powerups.d.ts +60 -0
  41. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/packages/stencil/bonus-powerups-ingame-games/stencil.config.d.ts +2 -0
  42. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/packages/stencil/bonus-powerups-ingame-games/stencil.config.dev.d.ts +2 -0
  43. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/packages/stencil/bonus-powerups-ingame-games/storybook/main.d.ts +3 -0
  44. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/packages/stencil/bonus-powerups-ingame-games/storybook/preview.d.ts +70 -0
  45. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/tools/plugins/index.d.ts +4 -0
  46. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  47. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  48. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  49. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-games/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  50. package/dist/types/components/bonus-powerups-ingame-games/bonus-powerups-ingame-games.d.ts +34 -0
  51. package/dist/types/components/bonus-powerups-ingame-games/index.d.ts +1 -0
  52. package/dist/types/components.d.ts +69 -0
  53. package/dist/types/index.d.ts +1 -0
  54. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  55. package/dist/types/utils/constants.d.ts +4 -0
  56. package/dist/types/utils/locale.utils.d.ts +2 -0
  57. package/dist/types/utils/utils.d.ts +1 -0
  58. package/loader/cdn.js +1 -0
  59. package/loader/index.cjs.js +1 -0
  60. package/loader/index.d.ts +24 -0
  61. package/loader/index.es2017.js +1 -0
  62. package/loader/index.js +2 -0
  63. package/loader/package.json +11 -0
  64. package/package.json +27 -0
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1 @@
1
+ import{r as e,c as a,h as t}from"./index-fd928daa.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function n(e,a){if(e){const t=document.createElement("style");t.innerHTML=a,e.appendChild(t)}}function r(e,a){if(!e||!a)return;const t=new URL(a);fetch(t.href).then((e=>e.text())).then((a=>{const t=document.createElement("style");t.innerHTML=a,e&&e.appendChild(t)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function o(e,a,t,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return t=function(e,a){const t=document.createElement("style");return window.emMessageBus.subscribe(a,(a=>{e&&(t.innerHTML=a,e.appendChild(t))}))}(e,a),t;window[i]||(window[i]={}),t=function(e,a){return window.emMessageBus.subscribe(a,(t=>{if(!e)return;const n=e.getRootNode(),r=window[i];let o=r[a]&&r[a].sheet;o?r[a].refCount=r[a].refCount+1:(o=new CSSStyleSheet,o.replaceSync(t),r[a]={sheet:o,refCount:1});const s=n.adoptedStyleSheets||[];s.includes(o)||(n.adoptedStyleSheets=[...s,o])}))}(e,a);const r=t.unsubscribe.bind(t);return t.unsubscribe=()=>{if(window[i][a]){const e=window[i][a];e.refCount>1?e.refCount=e.refCount-1:delete window[i][a]}r()},t}const s={expand:"games",fields:"id,powerUpID,powerUpName,displayName,games(id,gameId,slug,name,thumbnail)"},l={en:{playNow:"Play Now",games:"Games",noDataFound:"No data found",loading:"Loading",loadingMore:"Loading More"}},d=(e,a,t)=>{let i=l[void 0!==a&&a in l?a:"en"][e];if(void 0!==t)for(const[e,a]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");i=i.replace(t,a)}return i},m=class{constructor(t){e(this,t),this.backFromPowerupGamesEvent=a(this,"backFromPowerupGames",7),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.powerupId=void 0,this.isLoadingGames=!1,this.powerUpGames={items:[],total:0},this.powerUp=void 0,this.limit=30}initializeGamesObserver(){this.loadMoreGamesObserver&&this.loadMoreGamesObserver.disconnect(),this.loadMoreGamesObserver=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&this.loadMoreGames().catch(console.error)}))})),this.lastGameElement&&this.loadMoreGamesObserver.observe(this.lastGameElement)}async loadMoreGames(){var e,a,t,i;if(!(this.isLoadingGames||this.powerUpGames.total>0&&this.powerUpGames.items.length>=this.powerUpGames.total)){this.isLoadingGames=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const n=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=${this.limit},offset=${(null===(a=null===(e=this.powerUpGames)||void 0===e?void 0:e.items)||void 0===a?void 0:a.length)||0})`),r={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};n.searchParams.append("filter",`id=${this.powerupId}`),Object.entries(s).forEach((([e,a])=>{n.searchParams.append(e,a)})),n.searchParams.append("language",this.language);const o=await fetch(n,r);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const l=await o.json();this.powerUp=l.data[0];const d=(null===(t=this.powerUp.games)||void 0===t?void 0:t.items)||[];this.powerUpGames={items:[...this.powerUpGames.items,...d],total:(null===(i=this.powerUp.games)||void 0===i?void 0:i.total)||this.powerUpGames.total}}catch(e){"AbortError"!==e.name&&console.error("Failed to load more games:",e)}finally{this.abortController.signal.aborted||(this.isLoadingGames=!1)}}}onGameClick(e){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e.slug}})}componentDidUpdate(){this.powerUpGames.items.length<this.powerUpGames.total&&this.initializeGamesObserver()}render(){var e,a;return t("div",{key:"0d034307e070a8ba1d88303c3e3093ba567444b2",class:"IngamePowerUpGamesContainer",ref:e=>this.stylingContainer=e},t("div",{key:"7b01f05d91d274da4ae0de3fc63e55927946b095",class:"TopBar"},t("div",{key:"f8664bf99bb12513f281fe67ee24cd0794d9ba66",class:"ReturnIcon CircleLinearBorder",onClick:this.backFromPowerupGamesEvent.emit,innerHTML:'<svg width="14" height="14" viewBox="0 0 14 14"\n fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_4119_5439)">\n <path d="M11.1533 12.8332C11.8242 11.9932 12.25 10.9315 12.25 9.759C12.25 6.959 9.7475 4.6665 6.69667 4.6665H1.75"\n stroke="currentColor" stroke-width="0.952264" stroke-miterlimit="10" stroke-linecap="round"\n stroke-linejoin="round" />\n <path d="M5.25 1.16699L1.75 4.66699L5.25 8.16699" stroke="currentColor" stroke-width="0.952264" stroke-miterlimit="10"\n stroke-linecap="round" stroke-linejoin="round" />\n </g>\n <defs>\n <clipPath id="clip0_4119_5439">\n <rect width="14" height="14" fill="white" />\n </clipPath>\n </defs>\n</svg>\n'}),this.powerUp&&t("div",{key:"56083e9dfbc469875b0448f471c455ef8e1fb613",class:"Title TextContent"},t("span",{key:"6cde7a32b98c4f8d240cfda6f715e2d3fd4b0a25",class:"Name"},this.powerUp.displayName)," /",t("div",{key:"a2045a41ad40665fa553b7f1e2a25628344188fc",class:"Label"},d("games",this.language)),t("div",{key:"a2cc2c8a5ebb29b097da802984099860410e0c25",class:"GamesTotal"},"( ",this.powerUpGames.total||""," )"))),t("div",{key:"b335d598aeea740b4e4a2e58a4061bf092abb773",class:"GamesWrapper Card "},this.isLoadingGames&&0===this.powerUpGames.items.length&&t("div",{key:"fced976e5554f7864fcf8755494c0cfd74f19a0f",class:"Loading"},t("div",{key:"8653c05c761078e11d6c060e5f1d519a133f2d8a",class:"smart-loader"},t("div",{key:"4404881893636a48de508d95ab8d6bd09d05acae",class:"smart-item"}),t("div",{key:"8aeafd883609d5840f7603b58300ee9c9350746c",class:"smart-item"}),t("div",{key:"ded309b5a38d7775c27b3b38dd78746caf5aa557",class:"smart-item"}))),this.isLoadingGames||this.powerUp?t("div",{class:"CircleInner GamesList"},t("div",{class:"Games FlexRow"},this.powerUpGames.total>0&&this.powerUpGames.items.map(((e,a)=>t("div",{class:"Game",ref:a===this.powerUpGames.items.length-1?e=>this.lastGameElement=e:null},t("ui-image",{src:e.thumbnail,alt:e.name}),t("div",{class:"GameMask",onClick:this.onGameClick.bind(this,e)},t("div",{class:"GameStartBtn"},t("div",{class:"PlayIcon"}),t("span",null,d("playNow",this.language))))))),this.isLoadingGames&&(null===(a=null===(e=this.powerUpGames)||void 0===e?void 0:e.items)||void 0===a?void 0:a.length)>this.limit&&t("p",{class:"LoadingMore"},d("loadingMore",this.language)))):t("div",{class:"NoData"},d("noDataFound",this.language)," ")))}handleClientStylingChange(e,a){e!=a&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,a){e!=a&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,a){e!=a&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.loadMoreGames()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.abortController&&this.abortController.abort(),this.loadMoreGamesObserver&&this.loadMoreGamesObserver.disconnect()}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};m.style=':host{display:block;height:100%;--game-amount-line:3}.IngamePowerUpGamesContainer{height:100%;display:flex;padding:var(--emw--ingame-power-container-padding, 8px);justify-content:flex-start;flex-direction:column}.IngamePowerUpGamesContainer .CircleLinearBorder{background:rgba(9, 9, 9, 0.5019607843);position:relative;width:26px;height:26px;border-radius:20px;background:none;overflow:hidden;border:1.5px solid transparent;display:flex;align-items:center;justify-content:center;cursor:pointer}.IngamePowerUpGamesContainer .CircleLinearBorder svg{border-radius:20px;padding:4.5px;background:var(--emw--ingame-color-powerup-bg, rgba(9, 9, 9, 0.8980392157));z-index:1}.IngamePowerUpGamesContainer .CircleLinearBorder::before{content:"";position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;z-index:-1;border-radius:21.5px;background:linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667))), linear-gradient(35.22deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.5490196078)) 89.19%)}.IngamePowerUpGamesContainer .TopBar,.IngamePowerUpGamesContainer .Loading{padding:15px}.IngamePowerUpGamesContainer .TopBar{display:flex;align-items:center;gap:5px}.IngamePowerUpGamesContainer .TopBar .ReturnIcon{width:26px;height:26px;display:flex;border-radius:20px;padding:0;backdrop-filter:blur(13.7647px);justify-content:center;align-items:center}.IngamePowerUpGamesContainer .TopBar .ReturnIcon svg{color:var(--emw--ingame-color-white60, #f0f0f0)}.IngamePowerUpGamesContainer .TopBar .Title{font-weight:600;font-size:0.9rem;line-height:100%;text-align:center;vertical-align:middle;color:var(--emw--ingame-color-neutural-95, #EDEFF2);display:flex;flex-direction:row}.IngamePowerUpGamesContainer .TopBar .Title .Name{font-size:1.1rem}.IngamePowerUpGamesContainer .TopBar .Title .Label{font-size:1.1rem;font-weight:bold;color:var(--emw--ingame-color-neutural-95, #EDEFF2)}.IngamePowerUpGamesContainer .TopBar .TextContent{font-weight:400;font-size:0.9rem;line-height:1.1rem;vertical-align:middle;color:var(--emw--ingame-color-white70, rgba(255, 255, 255, 0.6980392157))}.IngamePowerUpGamesContainer .GamesWrapper{height:calc(100% - 90px);overflow:hidden;width:100%;margin-bottom:10px;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpGamesContainer .Games{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpGamesContainer .GamesList{display:flex;height:100%;justify-content:center;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.IngamePowerUpGamesContainer .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.IngamePowerUpGamesContainer .GamesList .Games{padding:15px;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line, 3) - 1))}.IngamePowerUpGamesContainer .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line, 3));cursor:pointer;position:relative}.IngamePowerUpGamesContainer .GamesList .Games .Game:hover .mask-filter{opacity:1}.IngamePowerUpGamesContainer .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.IngamePowerUpGamesContainer .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%;opacity:1;left:0;height:100%;top:0;border-radius:8px}.IngamePowerUpGamesContainer .GamesList .Games .Game:hover .GameMask .GameStartBtn{opacity:1}.IngamePowerUpGamesContainer .GameMask{display:none;transition:display;transition-duration:0.2s;opacity:0;position:absolute;width:70%;height:100%}.IngamePowerUpGamesContainer .GameMask .GameStartBtn{width:80px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);border:1px solid var(--emw--ingame-color-white, #FFFFFF);display:flex;align-items:center;justify-content:space-between;cursor:pointer}.IngamePowerUpGamesContainer .GameMask .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}.Games .Container{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;height:calc(100% - 120px);overflow:auto}.Games .Container .Game{width:105px}@keyframes smart-animate1{0%{opacity:0.15;transform:translateX(0px)}35%{opacity:1;transform:translateX(36px)}75%{opacity:1;transform:translateX(0px)}100%{opacity:0.15;transform:translateX(0px)}}@keyframes smart-animate2{0%{opacity:1}35%{opacity:0.15}75%{opacity:0.5}100%{opacity:1}}@keyframes smart-animate3{0%{opacity:0.5;transform:translateX(0px)}35%{opacity:0.15;transform:translateX(-36px)}75%{opacity:0.15;transform:translateX(0px)}100%{opacity:0.5;transform:translateX(0px)}}.smart-loader{margin:50px auto;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100px;gap:10px}.smart-loader .smart-item{width:3px;height:20px;opacity:0.15;animation-delay:200ms;animation-duration:1000ms;animation-timing-function:ease-out;animation-fill-mode:forwards;padding:1px;margin:5px 0;background:var(--emw--ingame-color-powerup-brightgreen, #00FA5A);border-radius:4px;animation-iteration-count:infinite;animation-direction:normal}.smart-loader .smart-item:nth-child(1){animation-name:smart-animate1}.smart-loader .smart-item:nth-child(2){animation-name:smart-animate2;height:36px}.smart-loader .smart-item:nth-child(3){animation-name:smart-animate3}';export{m as B}
@@ -0,0 +1 @@
1
+ import{p as e,b as n}from"./index-fd928daa.js";export{s as setNonce}from"./index-fd928daa.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),e(t)})().then((async e=>(await t(),n([["bonus-powerups-ingame-games_3",[[1,"bonus-powerups-ingame-games",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],endpoint:[513],session:[513],powerupId:[513,"powerup-id"],isLoadingGames:[32],powerUpGames:[32],powerUp:[32],limit:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],e))));
@@ -0,0 +1 @@
1
+ export{B as bonus_powerups_ingame_games}from"./bonus-powerups-ingame-games-b2c0935f.js";import{r as e,h as t,H as i,g as n}from"./index-fd928daa.js";const s=class{constructor(t){e(this,t),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const e=new Image;e.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,e.onload=null)},e.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.__uxComponent;t&&(t.shouldLoad=!0,t.handleSrc()),window.EMUxObserver.unobserve(e.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return t(i,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&t("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),t("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:e=>this.image=e,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return n(this)}static get watchers(){return{src:["handleSrc"]}}};s.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";const r=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,i)=>t("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(i,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};r.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{s as ui_image,r as ui_skeleton}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),d=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),d||(d=!0,t&&4&f.l?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(m),b(y),(d=m.length>0)&&f.raf(w)},v=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),U={},A=e=>n(e).$hostElement$,D=(e,t,n)=>{const l=A(e);return{emit:e=>F(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},F=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},H=new WeakMap,N=e=>"sc-"+e.v,W=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=G(n),s=G(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(V);t=t.replace(_,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},q=/\s/,G=e=>e?e.split(q):[],V="Capture",_=RegExp(V+"$"),z=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of B(Object.keys(o)))e in s||W(l,e,o[e],void 0,n,t.l);for(const e of B(Object.keys(s)))W(l,e,o[e],s[e],n,t.l)};function B(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var I=!1,J=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),z(null,l,I),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=J(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},K=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=J(null,n,o),r&&(l[o].$=r,ee(i,r,t)))},Q=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Z(t),e&&e.remove()}}},X=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Y=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(z(e,t,I),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],d=l.length-1,m=l[0],y=l[d];for(;i<=f&&c<=d;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--d];else if(X(h,m,o))Y(h,m,o),h=t[++i],m=l[++c];else if(X(p,y,o))Y(p,y,o),p=t[--f],y=l[--d];else if(X(h,y,o))Y(h,y,o),ee(e,h.$,p.$.nextSibling),h=t[++i],y=l[--d];else if(X(p,m,o))Y(p,m,o),ee(e,p.$,h.$),p=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=J(t&&t[c],n,u):(Y(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=J(t&&t[c],n,c),m=l[++c]),s&&ee(h.$.parentNode,s,h.$)}i>f?K(e,null==l[d+1]?null:l[d+1].$,n,l,c,d):c>d&&Q(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),K(l,null,t,s,0,s.length-1)):null!==o&&Q(o,0,o.length-1)):e.i!==r&&(l.data=r)},Z=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Z)},ee=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),te=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ne=(e,t)=>{if(e.l|=16,!(4&e.l))return te(e,e.j),g((()=>le(e,t)));e.l|=512},le=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ae(n,"componentWillLoad")),oe(l,(()=>re(e,n,t)))},oe=(e,t)=>se(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),se=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,re=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=N(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=H.get(e=e.head||e);if(r||H.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ie(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ce(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ie=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||T(null,null),r=(e=>e&&e.m===U)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],Y(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ce=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l?ae(n,"componentDidUpdate"):(e.l|=64,fe(t),ae(n,"componentDidLoad"),e.P(t),l||ue()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>ne(e,!1))),e.l&=-517},ue=()=>{fe(a.documentElement),v((()=>F(u,"appload",{detail:{namespace:"bonus-powerups-ingame-games"}})))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},fe=e=>e.classList.add("hydrated"),he=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&ne(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.R)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},pe=e=>{ae(e,"disconnectedCallback")},de=(e,l={})=>{var o;const h=[],d=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],U:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,T:new Map};l.A=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.A)&&t.A.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){te(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.D){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.D;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.F}" was not found`);l.isProxied||(n.R=l.watchers,he(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=N(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>ne(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?pe(e.t):(null==e?void 0:e.A)&&e.A.then((()=>pe(e.t)))}})()))}componentOnReady(){return n(this).A}};c.D=e[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,he(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ue,30)))},me=e=>f.O=e;export{U as H,de as b,D as c,A as g,R as h,h as p,l as r,me as s}
@@ -0,0 +1 @@
1
+ export{B as BonusPowerupsIngameGames}from"./bonus-powerups-ingame-games-b2c0935f.js";import"./index-fd928daa.js";
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -0,0 +1,317 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-e3184c85.js');
4
+
5
+ const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
6
+
7
+ /**
8
+ * @name setClientStyling
9
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
10
+ * @param {HTMLElement} stylingContainer The reference element of the widget
11
+ * @param {string} clientStyling The style content
12
+ */
13
+ function setClientStyling(stylingContainer, clientStyling) {
14
+ if (stylingContainer) {
15
+ const sheet = document.createElement('style');
16
+ sheet.innerHTML = clientStyling;
17
+ stylingContainer.appendChild(sheet);
18
+ }
19
+ }
20
+
21
+ /**
22
+ * @name setClientStylingURL
23
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
24
+ * @param {HTMLElement} stylingContainer The reference element of the widget
25
+ * @param {string} clientStylingUrl The URL of the style content
26
+ */
27
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
28
+ if (!stylingContainer || !clientStylingUrl) return;
29
+
30
+ const url = new URL(clientStylingUrl);
31
+
32
+ fetch(url.href)
33
+ .then((res) => res.text())
34
+ .then((data) => {
35
+ const cssFile = document.createElement('style');
36
+ cssFile.innerHTML = data;
37
+ if (stylingContainer) {
38
+ stylingContainer.appendChild(cssFile);
39
+ }
40
+ })
41
+ .catch((err) => {
42
+ console.error('There was an error while trying to load client styling from URL', err);
43
+ });
44
+ }
45
+
46
+ /**
47
+ * @name setStreamLibrary
48
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
49
+ * @param {HTMLElement} stylingContainer The highest element of the widget
50
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
51
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
52
+ * @param {boolean} useAdoptedStyleSheets A flag to gradually enable testing of adoptedStyleSheets
53
+ */
54
+ function setStreamStyling(stylingContainer, domain, subscription, useAdoptedStyleSheets = false) {
55
+ if (!window.emMessageBus) return;
56
+
57
+ const supportAdoptStyle = 'adoptedStyleSheets' in Document.prototype;
58
+
59
+ if (!supportAdoptStyle || !useAdoptedStyleSheets) {
60
+ subscription = getStyleTagSubscription(stylingContainer, domain);
61
+
62
+ return subscription;
63
+ }
64
+
65
+ if (!window[StyleCacheKey]) {
66
+ window[StyleCacheKey] = {};
67
+ }
68
+ subscription = getAdoptStyleSubscription(stylingContainer, domain);
69
+
70
+ const originalUnsubscribe = subscription.unsubscribe.bind(subscription);
71
+ const wrappedUnsubscribe = () => {
72
+ if (window[StyleCacheKey][domain]) {
73
+ const cachedObject = window[StyleCacheKey][domain];
74
+ cachedObject.refCount > 1
75
+ ? (cachedObject.refCount = cachedObject.refCount - 1)
76
+ : delete window[StyleCacheKey][domain];
77
+ }
78
+
79
+ originalUnsubscribe();
80
+ };
81
+ subscription.unsubscribe = wrappedUnsubscribe;
82
+
83
+ return subscription;
84
+ }
85
+
86
+ function getStyleTagSubscription(stylingContainer, domain) {
87
+ const sheet = document.createElement('style');
88
+
89
+ return window.emMessageBus.subscribe(domain, (data) => {
90
+ if (stylingContainer) {
91
+ sheet.innerHTML = data;
92
+ stylingContainer.appendChild(sheet);
93
+ }
94
+ });
95
+ }
96
+
97
+ function getAdoptStyleSubscription(stylingContainer, domain) {
98
+ return window.emMessageBus.subscribe(domain, (data) => {
99
+ if (!stylingContainer) return;
100
+
101
+ const shadowRoot = stylingContainer.getRootNode();
102
+ const cacheStyleObject = window[StyleCacheKey];
103
+ let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
104
+
105
+ if (!cachedStyle) {
106
+ cachedStyle = new CSSStyleSheet();
107
+ cachedStyle.replaceSync(data);
108
+ cacheStyleObject[domain] = {
109
+ sheet: cachedStyle,
110
+ refCount: 1
111
+ };
112
+ } else {
113
+ cacheStyleObject[domain].refCount = cacheStyleObject[domain].refCount + 1;
114
+ }
115
+
116
+ const currentSheets = shadowRoot.adoptedStyleSheets || [];
117
+ if (!currentSheets.includes(cachedStyle)) {
118
+ shadowRoot.adoptedStyleSheets = [...currentSheets, cachedStyle];
119
+ }
120
+ });
121
+ }
122
+
123
+ const powerUpGameSearchConditions = {
124
+ expand: "games",
125
+ fields: "id,powerUpID,powerUpName,displayName,games(id,gameId,slug,name,thumbnail)"
126
+ };
127
+
128
+ const ReturnSvg = `<svg width="14" height="14" viewBox="0 0 14 14"
129
+ fill="none" xmlns="http://www.w3.org/2000/svg">
130
+ <g clip-path="url(#clip0_4119_5439)">
131
+ <path d="M11.1533 12.8332C11.8242 11.9932 12.25 10.9315 12.25 9.759C12.25 6.959 9.7475 4.6665 6.69667 4.6665H1.75"
132
+ stroke="currentColor" stroke-width="0.952264" stroke-miterlimit="10" stroke-linecap="round"
133
+ stroke-linejoin="round" />
134
+ <path d="M5.25 1.16699L1.75 4.66699L5.25 8.16699" stroke="currentColor" stroke-width="0.952264" stroke-miterlimit="10"
135
+ stroke-linecap="round" stroke-linejoin="round" />
136
+ </g>
137
+ <defs>
138
+ <clipPath id="clip0_4119_5439">
139
+ <rect width="14" height="14" fill="white" />
140
+ </clipPath>
141
+ </defs>
142
+ </svg>
143
+ `;
144
+
145
+ const DEFAULT_LANGUAGE = 'en';
146
+ const TRANSLATIONS = {
147
+ en: {
148
+ playNow: 'Play Now',
149
+ games: 'Games',
150
+ noDataFound: 'No data found',
151
+ loading: 'Loading',
152
+ loadingMore: 'Loading More'
153
+ }
154
+ };
155
+ const translate = (key, customLang, values) => {
156
+ const lang = customLang;
157
+ let translation = TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
158
+ if (values !== undefined) {
159
+ for (const [key, value] of Object.entries(values.values)) {
160
+ const regex = new RegExp(`{${key}}`, 'g');
161
+ translation = translation.replace(regex, value);
162
+ }
163
+ }
164
+ return translation;
165
+ };
166
+
167
+ const bonusPowerupsIngameGamesCss = ":host{display:block;height:100%;--game-amount-line:3}.IngamePowerUpGamesContainer{height:100%;display:flex;padding:var(--emw--ingame-power-container-padding, 8px);justify-content:flex-start;flex-direction:column}.IngamePowerUpGamesContainer .CircleLinearBorder{background:rgba(9, 9, 9, 0.5019607843);position:relative;width:26px;height:26px;border-radius:20px;background:none;overflow:hidden;border:1.5px solid transparent;display:flex;align-items:center;justify-content:center;cursor:pointer}.IngamePowerUpGamesContainer .CircleLinearBorder svg{border-radius:20px;padding:4.5px;background:var(--emw--ingame-color-powerup-bg, rgba(9, 9, 9, 0.8980392157));z-index:1}.IngamePowerUpGamesContainer .CircleLinearBorder::before{content:\"\";position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;z-index:-1;border-radius:21.5px;background:linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667))), linear-gradient(35.22deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.5490196078)) 89.19%)}.IngamePowerUpGamesContainer .TopBar,.IngamePowerUpGamesContainer .Loading{padding:15px}.IngamePowerUpGamesContainer .TopBar{display:flex;align-items:center;gap:5px}.IngamePowerUpGamesContainer .TopBar .ReturnIcon{width:26px;height:26px;display:flex;border-radius:20px;padding:0;backdrop-filter:blur(13.7647px);justify-content:center;align-items:center}.IngamePowerUpGamesContainer .TopBar .ReturnIcon svg{color:var(--emw--ingame-color-white60, #f0f0f0)}.IngamePowerUpGamesContainer .TopBar .Title{font-weight:600;font-size:0.9rem;line-height:100%;text-align:center;vertical-align:middle;color:var(--emw--ingame-color-neutural-95, #EDEFF2);display:flex;flex-direction:row}.IngamePowerUpGamesContainer .TopBar .Title .Name{font-size:1.1rem}.IngamePowerUpGamesContainer .TopBar .Title .Label{font-size:1.1rem;font-weight:bold;color:var(--emw--ingame-color-neutural-95, #EDEFF2)}.IngamePowerUpGamesContainer .TopBar .TextContent{font-weight:400;font-size:0.9rem;line-height:1.1rem;vertical-align:middle;color:var(--emw--ingame-color-white70, rgba(255, 255, 255, 0.6980392157))}.IngamePowerUpGamesContainer .GamesWrapper{height:calc(100% - 90px);overflow:hidden;width:100%;margin-bottom:10px;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpGamesContainer .Games{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpGamesContainer .GamesList{display:flex;height:100%;justify-content:center;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.IngamePowerUpGamesContainer .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.IngamePowerUpGamesContainer .GamesList .Games{padding:15px;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line, 3) - 1))}.IngamePowerUpGamesContainer .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line, 3));cursor:pointer;position:relative}.IngamePowerUpGamesContainer .GamesList .Games .Game:hover .mask-filter{opacity:1}.IngamePowerUpGamesContainer .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.IngamePowerUpGamesContainer .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%;opacity:1;left:0;height:100%;top:0;border-radius:8px}.IngamePowerUpGamesContainer .GamesList .Games .Game:hover .GameMask .GameStartBtn{opacity:1}.IngamePowerUpGamesContainer .GameMask{display:none;transition:display;transition-duration:0.2s;opacity:0;position:absolute;width:70%;height:100%}.IngamePowerUpGamesContainer .GameMask .GameStartBtn{width:80px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);border:1px solid var(--emw--ingame-color-white, #FFFFFF);display:flex;align-items:center;justify-content:space-between;cursor:pointer}.IngamePowerUpGamesContainer .GameMask .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}.Games .Container{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;height:calc(100% - 120px);overflow:auto}.Games .Container .Game{width:105px}@keyframes smart-animate1{0%{opacity:0.15;transform:translateX(0px)}35%{opacity:1;transform:translateX(36px)}75%{opacity:1;transform:translateX(0px)}100%{opacity:0.15;transform:translateX(0px)}}@keyframes smart-animate2{0%{opacity:1}35%{opacity:0.15}75%{opacity:0.5}100%{opacity:1}}@keyframes smart-animate3{0%{opacity:0.5;transform:translateX(0px)}35%{opacity:0.15;transform:translateX(-36px)}75%{opacity:0.15;transform:translateX(0px)}100%{opacity:0.5;transform:translateX(0px)}}.smart-loader{margin:50px auto;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100px;gap:10px}.smart-loader .smart-item{width:3px;height:20px;opacity:0.15;animation-delay:200ms;animation-duration:1000ms;animation-timing-function:ease-out;animation-fill-mode:forwards;padding:1px;margin:5px 0;background:var(--emw--ingame-color-powerup-brightgreen, #00FA5A);border-radius:4px;animation-iteration-count:infinite;animation-direction:normal}.smart-loader .smart-item:nth-child(1){animation-name:smart-animate1}.smart-loader .smart-item:nth-child(2){animation-name:smart-animate2;height:36px}.smart-loader .smart-item:nth-child(3){animation-name:smart-animate3}";
168
+ const BonusPowerupsIngameGamesStyle0 = bonusPowerupsIngameGamesCss;
169
+
170
+ const BonusPowerupsIngameGames = class {
171
+ constructor(hostRef) {
172
+ index.registerInstance(this, hostRef);
173
+ this.backFromPowerupGamesEvent = index.createEvent(this, "backFromPowerupGames", 7);
174
+ this.mbSource = undefined;
175
+ this.clientStyling = undefined;
176
+ this.clientStylingUrl = undefined;
177
+ this.translationUrl = undefined;
178
+ this.language = 'en';
179
+ this.endpoint = undefined;
180
+ this.session = undefined;
181
+ this.powerupId = undefined;
182
+ this.isLoadingGames = false;
183
+ this.powerUpGames = { items: [], total: 0 };
184
+ this.powerUp = undefined;
185
+ this.limit = 30;
186
+ }
187
+ initializeGamesObserver() {
188
+ if (this.loadMoreGamesObserver) {
189
+ this.loadMoreGamesObserver.disconnect();
190
+ }
191
+ this.loadMoreGamesObserver = new IntersectionObserver((entries) => {
192
+ entries.forEach((entry) => {
193
+ if (entry.isIntersecting) {
194
+ this.loadMoreGames().catch(console.error);
195
+ }
196
+ });
197
+ });
198
+ if (this.lastGameElement) {
199
+ this.loadMoreGamesObserver.observe(this.lastGameElement);
200
+ }
201
+ }
202
+ async loadMoreGames() {
203
+ var _a, _b, _c, _d;
204
+ if (this.isLoadingGames || (this.powerUpGames.total > 0 && this.powerUpGames.items.length >= this.powerUpGames.total)) {
205
+ return;
206
+ }
207
+ this.isLoadingGames = true;
208
+ if (this.abortController) {
209
+ this.abortController.abort();
210
+ }
211
+ this.abortController = new AbortController();
212
+ try {
213
+ const url = new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=${this.limit},offset=${((_b = (_a = this.powerUpGames) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.length) || 0})`);
214
+ const options = {
215
+ headers: {
216
+ 'Content-Type': 'application/json',
217
+ 'x-SessionId': this.session
218
+ },
219
+ method: 'GET',
220
+ signal: this.abortController.signal
221
+ };
222
+ url.searchParams.append('filter', `id=${this.powerupId}`);
223
+ Object.entries(powerUpGameSearchConditions).forEach(([key, value]) => {
224
+ url.searchParams.append(key, value);
225
+ });
226
+ url.searchParams.append('language', this.language);
227
+ const response = await fetch(url, options);
228
+ if (!response.ok) {
229
+ throw new Error(`HTTP error! status: ${response.status}`);
230
+ }
231
+ const res = await response.json();
232
+ this.powerUp = res.data[0];
233
+ const newGames = ((_c = this.powerUp.games) === null || _c === void 0 ? void 0 : _c.items) || [];
234
+ this.powerUpGames = {
235
+ items: [...this.powerUpGames.items, ...newGames],
236
+ total: ((_d = this.powerUp.games) === null || _d === void 0 ? void 0 : _d.total) || this.powerUpGames.total
237
+ };
238
+ }
239
+ catch (e) {
240
+ if (e.name !== 'AbortError') {
241
+ console.error('Failed to load more games:', e);
242
+ }
243
+ }
244
+ finally {
245
+ if (!this.abortController.signal.aborted) {
246
+ this.isLoadingGames = false;
247
+ }
248
+ }
249
+ }
250
+ onGameClick(game) {
251
+ window.postMessage({ type: 'EngagementSuiteGameRedirect', data: { Slug: game.slug } });
252
+ }
253
+ componentDidUpdate() {
254
+ if (this.powerUpGames.items.length < this.powerUpGames.total) {
255
+ this.initializeGamesObserver();
256
+ }
257
+ }
258
+ render() {
259
+ var _a, _b;
260
+ return index.h("div", { key: '0d034307e070a8ba1d88303c3e3093ba567444b2', class: 'IngamePowerUpGamesContainer', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '7b01f05d91d274da4ae0de3fc63e55927946b095', class: 'TopBar' }, index.h("div", { key: 'f8664bf99bb12513f281fe67ee24cd0794d9ba66', class: 'ReturnIcon CircleLinearBorder', onClick: this.backFromPowerupGamesEvent.emit, innerHTML: ReturnSvg }), this.powerUp &&
261
+ index.h("div", { key: '56083e9dfbc469875b0448f471c455ef8e1fb613', class: 'Title TextContent' }, index.h("span", { key: '6cde7a32b98c4f8d240cfda6f715e2d3fd4b0a25', class: 'Name' }, this.powerUp.displayName), " /", index.h("div", { key: 'a2045a41ad40665fa553b7f1e2a25628344188fc', class: 'Label' }, translate('games', this.language)), index.h("div", { key: 'a2cc2c8a5ebb29b097da802984099860410e0c25', class: 'GamesTotal' }, "( ", this.powerUpGames.total || '', " )"))), index.h("div", { key: 'b335d598aeea740b4e4a2e58a4061bf092abb773', class: 'GamesWrapper Card ' }, this.isLoadingGames && this.powerUpGames.items.length === 0 &&
262
+ index.h("div", { key: 'fced976e5554f7864fcf8755494c0cfd74f19a0f', class: 'Loading' }, index.h("div", { key: '8653c05c761078e11d6c060e5f1d519a133f2d8a', class: 'smart-loader' }, index.h("div", { key: '4404881893636a48de508d95ab8d6bd09d05acae', class: "smart-item" }), index.h("div", { key: '8aeafd883609d5840f7603b58300ee9c9350746c', class: "smart-item" }), index.h("div", { key: 'ded309b5a38d7775c27b3b38dd78746caf5aa557', class: "smart-item" }))), !this.isLoadingGames && !this.powerUp ?
263
+ index.h("div", { class: 'NoData' }, translate('noDataFound', this.language), " ")
264
+ :
265
+ index.h("div", { class: 'CircleInner GamesList' }, index.h("div", { class: 'Games FlexRow' }, this.powerUpGames.total > 0 &&
266
+ this.powerUpGames.items.map((g, index$1) => {
267
+ const isLastItem = index$1 === this.powerUpGames.items.length - 1;
268
+ return index.h("div", { class: 'Game', ref: isLastItem ? (el) => (this.lastGameElement = el) : null }, index.h("ui-image", { src: g.thumbnail, alt: g.name }), index.h("div", { class: 'GameMask', onClick: this.onGameClick.bind(this, g) }, index.h("div", { class: 'GameStartBtn' }, index.h("div", { class: 'PlayIcon' }), index.h("span", null, translate('playNow', this.language)))));
269
+ }), this.isLoadingGames && ((_b = (_a = this.powerUpGames) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.length) > this.limit &&
270
+ index.h("p", { class: 'LoadingMore' }, translate('loadingMore', this.language))))));
271
+ }
272
+ handleClientStylingChange(newValue, oldValue) {
273
+ if (newValue != oldValue) {
274
+ setClientStyling(this.stylingContainer, this.clientStyling);
275
+ }
276
+ }
277
+ handleClientStylingUrlChange(newValue, oldValue) {
278
+ if (newValue != oldValue) {
279
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
280
+ }
281
+ }
282
+ handleMbSourceChange(newValue, oldValue) {
283
+ if (newValue != oldValue) {
284
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
285
+ }
286
+ }
287
+ componentWillLoad() {
288
+ this.loadMoreGames();
289
+ }
290
+ componentDidLoad() {
291
+ if (this.stylingContainer) {
292
+ if (this.mbSource)
293
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
294
+ if (this.clientStyling)
295
+ setClientStyling(this.stylingContainer, this.clientStyling);
296
+ if (this.clientStylingUrl)
297
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
298
+ }
299
+ }
300
+ disconnectedCallback() {
301
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
302
+ if (this.abortController) {
303
+ this.abortController.abort();
304
+ }
305
+ if (this.loadMoreGamesObserver) {
306
+ this.loadMoreGamesObserver.disconnect();
307
+ }
308
+ }
309
+ static get watchers() { return {
310
+ "clientStyling": ["handleClientStylingChange"],
311
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
312
+ "mbSource": ["handleMbSourceChange"]
313
+ }; }
314
+ };
315
+ BonusPowerupsIngameGames.style = BonusPowerupsIngameGamesStyle0;
316
+
317
+ exports.BonusPowerupsIngameGames = BonusPowerupsIngameGames;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-e3184c85.js');
6
+ const appGlobals = require('./app-globals-3a1e7e63.js');
7
+
8
+ /*
9
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
10
+ */
11
+ var patchBrowser = () => {
12
+ const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('bonus-powerups-ingame-games.cjs.js', document.baseURI).href));
13
+ const opts = {};
14
+ if (importMeta !== "") {
15
+ opts.resourcesUrl = new URL(".", importMeta).href;
16
+ }
17
+ return index.promiseResolve(opts);
18
+ };
19
+
20
+ patchBrowser().then(async (options) => {
21
+ await appGlobals.globalScripts();
22
+ return index.bootstrapLazy([["bonus-powerups-ingame-games_3.cjs",[[1,"bonus-powerups-ingame-games",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"powerupId":[513,"powerup-id"],"isLoadingGames":[32],"powerUpGames":[32],"powerUp":[32],"limit":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
23
+ });
24
+
25
+ exports.setNonce = index.setNonce;