@everymatrix/bonus-elevate-shop-item 1.94.52 → 1.94.53

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 (22) hide show
  1. package/dist/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider_5.entry.js +1 -0
  2. package/dist/bonus-elevate-shop-item/bonus-elevate-shop-item.esm.js +1 -1
  3. package/dist/cjs/bonus-elevate-shop-assets-slider_5.cjs.entry.js +918 -0
  4. package/dist/cjs/bonus-elevate-shop-item.cjs.js +1 -1
  5. package/dist/cjs/index-ad2fddb6.js +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +12 -0
  8. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider.js +5 -5
  9. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.css +92 -1
  10. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.js +85 -4
  11. package/dist/collection/utils/locale.utils.js +1 -0
  12. package/dist/esm/bonus-elevate-shop-assets-slider_5.entry.js +910 -0
  13. package/dist/esm/bonus-elevate-shop-item.js +1 -1
  14. package/dist/esm/index-fca048d8.js +2 -2
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/libs/common/src/types/casino/tournaments.d.ts +111 -0
  17. package/dist/types/components/bonus-elevate-shop-item/bonus-elevate-shop-item.d.ts +11 -0
  18. package/dist/types/models/bonus-elevate-shop-item.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/dist/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider_3.entry.js +0 -1
  21. package/dist/cjs/bonus-elevate-shop-assets-slider_3.cjs.entry.js +0 -600
  22. package/dist/esm/bonus-elevate-shop-assets-slider_3.entry.js +0 -594
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["bonus-elevate-shop-assets-slider_3",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
19
+ return bootstrapLazy([["bonus-elevate-shop-assets-slider_5",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32],"powerUpGames":[32],"isLoadingGames":[32]}],[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,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}],[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);
20
20
  });
@@ -49,10 +49,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
49
49
  }
50
50
  switch(bundleId) {
51
51
 
52
- case 'bonus-elevate-shop-assets-slider_3':
52
+ case 'bonus-elevate-shop-assets-slider_5':
53
53
  return import(
54
54
  /* webpackMode: "lazy" */
55
- './bonus-elevate-shop-assets-slider_3.entry.js').then(processMod, consoleError);
55
+ './bonus-elevate-shop-assets-slider_5.entry.js').then(processMod, consoleError);
56
56
  }
57
57
  }
58
58
  return import(
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["bonus-elevate-shop-assets-slider_3",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
8
+ return bootstrapLazy([["bonus-elevate-shop-assets-slider_5",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32],"powerUpGames":[32],"isLoadingGames":[32]}],[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,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}],[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);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -0,0 +1,111 @@
1
+ export type CasinoGame = {
2
+ gameCode?: string;
3
+ id: string;
4
+ gameId: string;
5
+ name: string;
6
+ launchUrl?: string;
7
+ width?: number;
8
+ height?: number;
9
+ hasFunMode?: boolean;
10
+ platform?: string[];
11
+ backgroundImageUrl?: string;
12
+ popularity?: number;
13
+ isNew?: boolean;
14
+ hasAnonymousFunMode?: boolean;
15
+ defaultThumbnail?: string;
16
+ thumbnail?: string;
17
+ type: string;
18
+ logo?: string;
19
+ htmlDescription?: string;
20
+ vendor?: {
21
+ href: string;
22
+ id: string;
23
+ name: string;
24
+ displayName: string;
25
+ image: string;
26
+ logo: string;
27
+ };
28
+ slug?: string;
29
+ href?: string;
30
+ };
31
+ export type Tournament = {
32
+ href: string;
33
+ id: string;
34
+ nameOrTitle?: string;
35
+ description: string;
36
+ termsUrl?: string;
37
+ baseCurrency: string;
38
+ thumbnail?: string;
39
+ thumbnails?: any[];
40
+ startTime: string;
41
+ endTime: string;
42
+ closeTime: string;
43
+ exhibitionStartTime?: string;
44
+ exhibitionEndTime?: string;
45
+ state: string;
46
+ tags?: string;
47
+ minBetCount?: number;
48
+ scoreCriteria?: string;
49
+ enrollCriteria?: string;
50
+ prizes?: TournamentPrize[] | null;
51
+ playerEnrolled?: boolean;
52
+ overview?: {
53
+ participants: number;
54
+ };
55
+ metadata?: {
56
+ sports?: {
57
+ rules?: string;
58
+ };
59
+ };
60
+ wallet?: {
61
+ casino?: any;
62
+ sports?: any;
63
+ };
64
+ wallets?: Array<{
65
+ code: string;
66
+ [key: string]: any;
67
+ }>;
68
+ games?: {
69
+ count: number;
70
+ items: CasinoGame[] | null;
71
+ total: number;
72
+ };
73
+ presentPeriod?: {
74
+ start: string;
75
+ end: string;
76
+ };
77
+ };
78
+ export declare enum TournamentState {
79
+ Unstarted = "Unstarted",
80
+ Ongoing = "Running",
81
+ Closing = "Closing",
82
+ Closed = "Closed"
83
+ }
84
+ export type TournamentPrize = {
85
+ rank?: number;
86
+ count: number;
87
+ name: string;
88
+ bonusProgramID?: string;
89
+ };
90
+ export type LeaderboardItem = {
91
+ id: number;
92
+ insTicks?: string;
93
+ rank?: number;
94
+ rankWithoutUnqualified?: number;
95
+ prizeName?: string;
96
+ domainID: number;
97
+ userID?: string;
98
+ shortName?: string;
99
+ countryCode?: string;
100
+ betCount: number;
101
+ score: number;
102
+ formattedScore?: string;
103
+ unqualified: boolean;
104
+ totalRank?: number;
105
+ };
106
+ export type PthApiResponse = {
107
+ errorCode?: number;
108
+ errorMessage?: string;
109
+ success: boolean;
110
+ [key: string]: any;
111
+ };
@@ -1,6 +1,8 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import "../../../../../../dist/packages/stencil/general-styling-wrapper/dist/types/index";
3
3
  import { BonusElevateShopItemInfo } from '../../models/bonus-elevate-shop-item';
4
+ import "../../../../../../dist/packages/stencil/ui-image/dist/types/index";
5
+ import { CasinoGame } from "../../../../../../libs/common/src/types/casino/tournaments";
4
6
  export declare class BonusElevateShopItem {
5
7
  /**
6
8
  * NorWAy endpoint
@@ -47,16 +49,25 @@ export declare class BonusElevateShopItem {
47
49
  isGiftNotFound: boolean;
48
50
  redeemErrorMsg: string;
49
51
  isRedeeming: boolean;
52
+ powerUpGames: any;
53
+ isLoadingGames: boolean;
50
54
  redeemGiftButton: EventEmitter<Object>;
51
55
  private bindedHandler;
56
+ private loadMoreGamesObserver;
57
+ private lastGameElement;
52
58
  deviceType: string;
59
+ private powerUpGameSearchConditions;
53
60
  redeemGiftConfirm(): void;
54
61
  private handleMessage;
55
62
  onBackClicked(): void;
56
63
  redeemGift(): void;
57
64
  loadElevateGift(): Promise<void>;
65
+ private loadMoreGames;
66
+ private initializeGamesObserver;
67
+ onGameClick(game: CasinoGame): void;
58
68
  disconnectedCallback(): void;
59
69
  componentDidLoad(): void;
60
70
  componentWillLoad(): Promise<void>;
71
+ componentDidUpdate(): void;
61
72
  render(): any;
62
73
  }
@@ -12,5 +12,6 @@ export interface BonusElevateShopItemInfo {
12
12
  monetaryValue: number;
13
13
  excludeEarnedTypes: Array<string>;
14
14
  displayName?: string;
15
+ powerUpID?: string;
15
16
  presentation: ElevateShopItemPresentation;
16
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-elevate-shop-item",
3
- "version": "1.94.52",
3
+ "version": "1.94.53",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,h as t,g as i,c as a,F as s,H as o}from"./index-fca048d8.js";const n=class{constructor(t){e(this,t),this.xDown=null,this.yDown=null,this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.showSliderDots=!1,this.showSliderArrows=!0,this.itemsPerPage=1,this.sliderItems=[],this.activeIndex=0}setActive(e){var t;const i=null===(t=this.sliderItems)||void 0===t?void 0:t.length;this.activeIndex=e>=0?e>=i-1?i-1:e:0}move(e){this.setActive(this.activeIndex+e)}goTo(e){let t=this.activeIndex-e;if(t>0)for(let e=0;e<t;e++)this.move(-1);else for(let e=0;e>t;e--)this.move(1)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.move(t>0?1:-1),this.xDown=null,this.yDown=null}recalculateItemsPerPage(){this.sliderItemsElement&&(this.itemElementWidth=this.sliderItemsElement.clientWidth,this.sliderItemsElementWidth=(this.sliderItems.length-1)*this.itemElementWidth)}renderDots(){var e;const i=[];for(let a=0;a<(null===(e=this.sliderItems)||void 0===e?void 0:e.length)/this.itemsPerPage;a++)i.push(t("li",{class:a==this.activeIndex?"active":"default",onClick:()=>{this.goTo(a),this.setActive(a)}}));return i}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage()}componentDidUpdate(){this.recalculateItemsPerPage()}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}render(){var e;const i={transform:`translate(${this.sliderItemsElementWidth/((null===(e=this.sliderItems)||void 0===e?void 0:e.length)-1)*this.activeIndex*-1}px, 0px)`},a={width:this.itemElementWidth/this.itemsPerPage+"px"};return t("div",{key:"3740bd5b367f4e24f0b4391dc7f25c63ccb12958",class:"SliderWrapper"},t("div",{key:"6aac842f54de59cea8b2f2655e8408a8778702d4",class:"MainContent "},this.showSliderArrows&&t("div",{key:"94de38b6a631824bbe15964d70377639af769917",class:`SliderNavButton LeftArrow ${0===this.activeIndex?"DisabledArrow ":""} ${1===this.sliderItems.length?"HiddenArrow ":""}`,onClick:()=>this.move(-1)},t("svg",{key:"382d3d0c54932b359b2be4b9ed8c3db3c6da49ec",fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"9b4d592aa650ddff2fbd8625a8b0a5d1b604c723","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"b3ec493624a11931eb48e44eb620373b2613d0a8",class:"ItemsWrapper",ref:e=>this.sliderItemsElement=e},t("div",{key:"724e11f1b3899c0f4bb179fff9b60f40c363e7f1",class:"Items AssetsItems",style:i},this.sliderItems.map((e=>t("img",{class:`img${this.itemsPerPage}`,alt:"Gift Thumbnails",style:a,src:e}))))),this.showSliderArrows&&t("div",{key:"2791a14781f73619c122401a97a9833e33787282",class:`SliderNavButton RightArrow ${1===this.sliderItems.length?"HiddenArrow ":""}\n ${this.activeIndex===this.sliderItems.length-1||this.itemsPerPage==this.sliderItems.length?"DisabledArrow":""}`,onClick:()=>this.move(1)},t("svg",{key:"3810b14f2a0fc436601186335a01b7af90aabab5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"18178c52a74cf77c856f65b6f377a350fc672db8","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))),this.showSliderDots&&this.sliderItems.length>1&&t("div",{key:"83964fb11e6728adb065958ebfbf17902e301b2e",class:"DotsWrapper"},t("ul",{key:"cafab68d463e25a0847306314c64041bc3f107f7",class:"Dots"},this.renderDots())))}get el(){return i(this)}},r={en:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},tr:{coins:"Coin",noGiftPresentation:"Açıklama yok",redeemGift:"Hediye Al",noDataFound:"Veri bulunamadı",error4003:"Geçersiz Oturum",redeemFailed:"Kullanım başarısız",back:"Geri"},ro:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},fr:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},ar:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},hu:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"}},d=(e,t)=>r[t||"en"][e]||r.en[e],l=class{constructor(t){e(this,t),this.redeemGiftButton=a(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.deviceType=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})(),this.endpoint=void 0,this.language="en",this.itemId=void 0,this.elevateGift=void 0,this.session=void 0,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showSliderDots=!1,this.showSliderArrows=!0,this.isGiftNotFound=!1,this.redeemErrorMsg="",this.isRedeeming=!1}redeemGiftConfirm(){this.isRedeeming||"true"!=this.elevateGift.available||window.postMessage({type:"BEERedeemConfirm",shopItem:this.elevateGift},window.location.href)}handleMessage(e){e.data&&"bee-redeem-confirmed"===e.data.type&&e.data.id==this.elevateGift.id&&this.redeemGift()}onBackClicked(){window.postMessage({type:"OnGiftDetailsBackButtonClicked"},window.location.href)}redeemGift(){if("false"===this.elevateGift.available.toLowerCase()||this.isRedeeming)return;let e=new URL(`${this.endpoint}/v1/elevate/redeem`),t={method:"PUT",headers:{"x-SessionId":this.session,"Content-Type":"application/json-patch+json"},body:JSON.stringify({giftId:this.elevateGift.id})};this.redeemErrorMsg="",this.isRedeeming=!0,fetch(e.toString(),t).then((e=>e.json())).then((e=>{if(e.success)this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:this.elevateGift.id},window.location.href);else{let t=d(`error${e.errorCode}`,this.language);this.redeemErrorMsg=t||d("redeemFailed",this.language),window.postMessage({type:"BEEGiftRedeemFailed",itemId:this.elevateGift.id,res:e},window.location.href)}})).catch((e=>{window.postMessage({type:"BEEGiftClaimFailed",itemId:this.elevateGift.id,err:e},window.location.href)})).finally((()=>{this.isRedeeming=!1}))}async loadElevateGift(){let e=new URL(`${this.endpoint}/v1/elevate/shop?language=${this.language}&filter=id=${this.itemId}`),t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET"};await new Promise((i=>{fetch(e.href,t).then((e=>e.json())).then((e=>{let t=e.data;t&&1==t.length?(this.elevateGift=t[0],this.isGiftNotFound=!1):this.isGiftNotFound=!0,i(!0)}))}))}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}async componentWillLoad(){var e;this.translationUrl.length>2&&await(e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{r[t]=r[t]||{};for(let i in e[t])r[t][i]=e[t][i]})),t(!0)})).catch((e=>{console.error("Failed to load translations:",e),t(!1)}))}))),this.elevateGift?this.isGiftNotFound=!1:await this.loadElevateGift()}render(){return t(o,{key:"059f0eb449e36b30ce271306a9faf85b79197f36"},t("general-styling-wrapper",{key:"4b857c7d532d288c660fc9b9cfc28c17ba80c400",clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,mbSource:this.mbSource}),t("div",{key:"b400e365431afc6af40c11010b708a72525d4af6",class:"ElevateDetails"},this.isGiftNotFound&&t(s,{key:"93a532a9d25137fe02aca600c98237f08dbc5347"},t("div",{key:"b423b7b20c4e6829ecd5cf53ab860b909ac639d5",class:"Row ThumbnailRow"},t("div",{key:"eaafe445f831699a1f4a22bc951a68e211bc1eb1",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"70105de7173a933b921bd4a78c62c4d6e5cf847e",class:"BackArrow",innerHTML:"<"}),t("span",{key:"d695e223a899ae130355d5ee083a622b7cf131dd",class:"BackTxt"}," ",d("back",this.language)," "))),t("div",{key:"f9624e689b03b06c0937f81821ff4e00c0911851",class:"Thumnails GiftNotFound"},d("noDataFound",this.language),".")),this.elevateGift&&t(s,{key:"5c104bba7cd29706418cffa9ffdd20d13714bf2a"},t("div",{key:"c100262b2d4547e1a81108426fa07e6a66e8f560",class:"ThumbnailRow"},t("div",{key:"bf573c9685c7afe71239faced77bfaef4fab2a37",class:"Row"},t("div",{key:"10ff56e0df5eca9792428fc5279a79d79f619c56",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"899bbe9f1288b49743d51f4afec8b9237052b7f1",class:"BackArrow",innerHTML:"<"}),t("span",{key:"f4dd1b849114f4fd9743b6726394aacf444a6e7b",class:"BackTxt"}," ",d("back",this.language)," ")),t("bonus-elevate-shop-assets-slider",{key:"b11de8226e28e3038e70615093e07dd7ae896730",class:"Thumbnails",itemsPerPage:1,sliderItems:this.elevateGift.presentation.assets,showSliderDots:this.showSliderDots})),t("div",{key:"4084bea351593009e0a3a9dd3e3cb70b9d1a864c",class:"Col Details"},t("h3",{key:"2346e29ead91d6ace97f99fa768c46db704d1ab9",class:"GiftName"},this.elevateGift.presentation.displayName||this.elevateGift.displayName),t("div",{key:"835a0b059b2c0399cdb442a8376b0ef8ddf1c9e2",class:"GiftPoints"},t("span",{key:"73afb596b3b493736e67c3b62207b2dc7dbc27d9",class:"Points"},this.elevateGift.points," "),t("span",{key:"7a484d65195a5e6e32b079ca31410eefd239a240",class:" PointsLabel"},d("coins",this.language))))),t("div",{key:"f318deaf612752dc61b49e57b5751755800291ea",class:"ShopItemDetail Details"},t("div",{key:"2a7b77649b74baad93816eabf8413d0b45930f83",class:"GiftPresentation"},t("p",{key:"3ce1a1a6adb36127b3526e005a3ac49349349bfd"},this.elevateGift.presentation.description?this.elevateGift.presentation.description:d("noGiftPresentation",this.language))),t("div",{key:"e8f61acba748c582288e2053f61c7efc754bb8f9",class:`RedeemButton ${"false"===this.elevateGift.available||this.isRedeeming?"Disabled deactive":" active "}\n ${"dk"==this.deviceType?"DkButton":""}`,onClick:this.redeemGiftConfirm.bind(this)},d("redeemGift",this.language)),t("span",{key:"8cfe770fbbe29d1aebab26826146590cc1ecd177",class:"RedeemError Error"}," ",this.redeemErrorMsg," ")))))}};l.style=":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emw--color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:100px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:rgb(227, 222, 222)}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emw--color-gray-300, rgb(78, 90, 55));font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton{width:150px;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px)}.ElevateDetails .RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.ElevateDetails .RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.ElevateDetails .RedeemButton.deactive,.ElevateDetails .RedeemButton.disabled{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:rgb(239, 239, 239);border:1px solid rgb(239, 239, 239);border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emw--color-secondary, #FD2839);background:var(--emw--color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emw--color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emw--color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emw--color-secondary, #FD2839);pointer-events:none}";const c="__WIDGET_GLOBAL_STYLE_CACHE__";function h(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function f(e,t){if(!e||!t)return;const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function p(e,t,i,a=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!a)return i=function(e,t){const i=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(i.innerHTML=t,e.appendChild(i))}))}(e,t),i;window[c]||(window[c]={}),i=function(e,t){return window.emMessageBus.subscribe(t,(i=>{if(!e)return;const a=e.getRootNode(),s=window[c];let o=s[t]&&s[t].sheet;o?s[t].refCount=s[t].refCount+1:(o=new CSSStyleSheet,o.replaceSync(i),s[t]={sheet:o,refCount:1});const n=a.adoptedStyleSheets||[];n.includes(o)||(a.adoptedStyleSheets=[...n,o])}))}(e,t);const s=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[c][t]){const e=window[c][t];e.refCount>1?e.refCount=e.refCount-1:delete window[c][t]}s()},i}const b=class{constructor(t){e(this,t),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(this.mbSource&&p(this.el,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&h(this.el,this.clientStyling),this.clientStylingUrl&&f(this.el,this.clientStylingUrl),this.stylingAppends=!0)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleMbSourceChange(e,t){e!=t&&p(this.el,`${this.mbSource}.Style`,this.stylingSubscription)}handleClientStylingChange(e,t){e!=t&&h(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&f(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&h(this.el,this.clientStyling),this.clientStylingUrl&&f(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const a=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]||{},Object.keys(t[e]).forEach((a=>{if(!i.en[a])return;const s=i.en[a];"object"==typeof t[e][a]?(i[e][a]=i[e][a]||Object.assign({},s),Object.keys(t[e][a]).forEach((s=>{i[e][a][s]=t[e][a][s]}))):i[e][a]=t[e][a]||Object.assign({},s)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(a)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"e660ceb69f5e848c788c3924fc814c0fa7a777a2",class:"StyleShell"},t("slot",{key:"35014b6c0c32532af11e6a629ba9b13942504d21",name:"mainContent"}))}get el(){return i(this)}static get watchers(){return{mbSource:["handleMbSourceChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};b.style=":host{display:block}";export{n as bonus_elevate_shop_assets_slider,l as bonus_elevate_shop_item,b as general_styling_wrapper}