@everymatrix/bonus-elevate-levels-jojogroup 1.80.3

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 (73) hide show
  1. package/dist/bonus-elevate-levels-jojogroup/app-globals-0f993ce5.js +1 -0
  2. package/dist/bonus-elevate-levels-jojogroup/bonus-elevate-levels-jojogroup.esm.js +1 -0
  3. package/dist/bonus-elevate-levels-jojogroup/bonus-elevate-levels-jojogroup_4.entry.js +1 -0
  4. package/dist/bonus-elevate-levels-jojogroup/elevate-level-list.entry.js +1 -0
  5. package/dist/bonus-elevate-levels-jojogroup/index-88ecbb5b.js +2 -0
  6. package/dist/bonus-elevate-levels-jojogroup/index.esm.js +0 -0
  7. package/dist/bonus-elevate-levels-jojogroup/locale.utils-3a9c8e78.js +1 -0
  8. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  9. package/dist/cjs/bonus-elevate-levels-jojogroup.cjs.js +25 -0
  10. package/dist/cjs/bonus-elevate-levels-jojogroup_4.cjs.entry.js +322 -0
  11. package/dist/cjs/elevate-level-list.cjs.entry.js +147 -0
  12. package/dist/cjs/index-09a798bf.js +1612 -0
  13. package/dist/cjs/index.cjs.js +2 -0
  14. package/dist/cjs/loader.cjs.js +15 -0
  15. package/dist/cjs/locale.utils-942322b6.js +54 -0
  16. package/dist/collection/collection-manifest.json +22 -0
  17. package/dist/collection/components/bonus-elevate-levels-jojogroup/bonus-elevate-levels-jojogroup.css +18 -0
  18. package/dist/collection/components/bonus-elevate-levels-jojogroup/bonus-elevate-levels-jojogroup.js +231 -0
  19. package/dist/collection/components/bonus-elevate-levels-jojogroup/index.js +1 -0
  20. package/dist/collection/components/elevate-level-list/elevate-level-list.css +70 -0
  21. package/dist/collection/components/elevate-level-list/elevate-level-list.js +241 -0
  22. package/dist/collection/components/elevate-level-presentation/elevate-level-presentation.css +21 -0
  23. package/dist/collection/components/elevate-level-presentation/elevate-level-presentation.js +45 -0
  24. package/dist/collection/components/elevate-levels-data/elevate-levels-data.css +3 -0
  25. package/dist/collection/components/elevate-levels-data/elevate-levels-data.js +89 -0
  26. package/dist/collection/index.js +1 -0
  27. package/dist/collection/models/elevate-levels.js +1 -0
  28. package/dist/collection/utils/locale.utils.js +49 -0
  29. package/dist/collection/utils/prototype-collector.js +5 -0
  30. package/dist/collection/utils/utils.js +41 -0
  31. package/dist/esm/app-globals-0f993ce5.js +3 -0
  32. package/dist/esm/bonus-elevate-levels-jojogroup.js +20 -0
  33. package/dist/esm/bonus-elevate-levels-jojogroup_4.entry.js +315 -0
  34. package/dist/esm/elevate-level-list.entry.js +143 -0
  35. package/dist/esm/index-88ecbb5b.js +1583 -0
  36. package/dist/esm/index.js +1 -0
  37. package/dist/esm/loader.js +11 -0
  38. package/dist/esm/locale.utils-3a9c8e78.js +51 -0
  39. package/dist/index.cjs.js +1 -0
  40. package/dist/index.js +1 -0
  41. package/dist/stencil.config.dev.js +17 -0
  42. package/dist/stencil.config.js +19 -0
  43. package/dist/storybook/main.js +47 -0
  44. package/dist/storybook/preview.js +9 -0
  45. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  46. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/packages/stencil/bonus-elevate-levels-jojogroup/stencil.config.d.ts +2 -0
  47. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/packages/stencil/bonus-elevate-levels-jojogroup/stencil.config.dev.d.ts +2 -0
  48. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/packages/stencil/bonus-elevate-levels-jojogroup/storybook/main.d.ts +3 -0
  49. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/packages/stencil/bonus-elevate-levels-jojogroup/storybook/preview.d.ts +70 -0
  50. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/tools/plugins/index.d.ts +4 -0
  51. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  52. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  53. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  54. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels-jojogroup/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  55. package/dist/types/components/bonus-elevate-levels-jojogroup/bonus-elevate-levels-jojogroup.d.ts +19 -0
  56. package/dist/types/components/bonus-elevate-levels-jojogroup/index.d.ts +1 -0
  57. package/dist/types/components/elevate-level-list/elevate-level-list.d.ts +46 -0
  58. package/dist/types/components/elevate-level-presentation/elevate-level-presentation.d.ts +8 -0
  59. package/dist/types/components/elevate-levels-data/elevate-levels-data.d.ts +10 -0
  60. package/dist/types/components.d.ts +166 -0
  61. package/dist/types/index.d.ts +1 -0
  62. package/dist/types/models/elevate-levels.d.ts +12 -0
  63. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  64. package/dist/types/utils/locale.utils.d.ts +10 -0
  65. package/dist/types/utils/prototype-collector.d.ts +1 -0
  66. package/dist/types/utils/utils.d.ts +20 -0
  67. package/loader/cdn.js +1 -0
  68. package/loader/index.cjs.js +1 -0
  69. package/loader/index.d.ts +24 -0
  70. package/loader/index.es2017.js +1 -0
  71. package/loader/index.js +2 -0
  72. package/loader/package.json +11 -0
  73. package/package.json +26 -0
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1 @@
1
+ import{p as e,b as l}from"./index-88ecbb5b.js";export{s as setNonce}from"./index-88ecbb5b.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((async e=>(await t(),l([["elevate-level-list",[[0,"elevate-level-list",{levels:[16],language:[1],selectedLevelId:[1537,"selected-level-id"],showSliderButton:[32],touchPosStart:[32],touchPosEnd:[32],offset:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{selectedLevelId:["levelsChangedHandler"]}]]],["bonus-elevate-levels-jojogroup_4",[[1,"bonus-elevate-levels-jojogroup",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],endpoint:[513],language:[513],translationUrl:[513,"translation-url"],selectedLevelId:[1537,"selected-level-id"],showDefault:[4,"show-default"],elevateLevelParamProxy:[32],elevateLevels:[32],errorMessage:[32]},[[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"elevate-level-presentation",{elevateLevel:[16]}],[0,"elevate-levels-data",{scopeParams:[1544,"scope-params"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],targetTranslations:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as e,h as t,H as i,c as s,g as n}from"./index-88ecbb5b.js";import{t as l,T as a}from"./locale.utils-3a9c8e78.js";const o=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.endpoint=void 0,this.language="en",this.translationUrl="",this.selectedLevelId=void 0,this.showDefault=void 0,this.elevateLevelParamProxy=void 0,this.elevateLevels=[],this.errorMessage=void 0}elevateLevelsDataChangeHandler(e){e.detail&&(e.detail.elevateLevels&&(this.elevateLevels=[...e.detail.elevateLevels]),e.detail.clearError&&(this.errorMessage=null),e.detail.errorMessage&&e.detail.errorMessage.errorWhenLoadElevateLevels&&(this.errorMessage=l("loadElevateLevelErrorMessage",this.language)))}onSessionOrEndpointChange(){this.elevateLevelParamProxy=Object.assign(Object.assign({},this.elevateLevelParamProxy),{endpoint:this.endpoint,language:this.language})}onTCClick(){window.postMessage({type:"termAndConditionClicked"},window.location.href)}componentWillLoad(){this.elevateLevelParamProxy={endpoint:this.endpoint,language:this.language,selectedLevelId:this.selectedLevelId,showDefault:this.showDefault}}render(){var e;return t("div",{key:"3cdca540038915c73a99cca214d1d8091a928cb8",class:"ElevateLevelContent"},t("elevate-levels-data",{key:"1e1a73074ceb36ce5554b7796ca07c2efb4f73ce",scopeParams:this.elevateLevelParamProxy}),t("div",{key:"a1c66508053cac8549d23fabb291ff273079786c",class:"LevelContent"},(null===(e=this.elevateLevels)||void 0===e?void 0:e.length)?this.elevateLevels.map((e=>t("elevate-level-presentation",{elevateLevel:e}))):t("div",null,l("noLevelsSet",this.language))),this.errorMessage&&t("div",{key:"ed47949b39a95528d1a7f5acb9fe5ea1b596d6aa",class:"ErrorMessage"},this.errorMessage),t("general-styling-wrapper",{key:"c033776c424e2bc697f23a5a7abe34746fd6af7f",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:a,translationUrl:this.translationUrl,mbSource:this.mbSource}))}static get watchers(){return{endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};o.style=":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}";const c=class{constructor(t){e(this,t),this.elevateLevel=void 0}render(){return t(i,{key:"c02f0c4ca19226058b810f279273affa7b3398cc"},t("div",{key:"da5e3ce17167447ee462b1318f7d407f48781062",class:"Row Desc"},t("h3",{key:"6f811514d8f72b7484795e8a181c8e18446a52fe"},this.elevateLevel.presentation.displayName),t("p",{key:"fd0f78d172f027c79d542d630467e0f24099328f"},t("span",{key:"5eec8c85f146739d7e01b7112e1b1cf886c83310",class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};c.style=":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";var r,h,d,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},v={exports:{}};r=v,h=v.exports,d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==f)return f;throw new Error("unable to locate global object")}(),r.exports=h=d.fetch,d.fetch&&(h.default=d.fetch.bind(d)),h.Headers=d.Headers,h.Request=d.Request,h.Response=d.Response;const g=v.exports,p=class{constructor(t){e(this,t),this.elevateLevelsDataChange=s(this,"elevateLevelsDataChange",7),this.scopeParams=void 0}async componentWillRender(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await g(e.href).then((e=>e.json())).then((e=>{const t=e.data.sort(((e,t)=>e.firstEntryPoints<t.firstEntryPoints?-1:1));let i=this.scopeParams.selectedLevelId;if(!i&&this.scopeParams.showDefault&&t.length>0&&(i=t[0].id),i){const e=t.filter((e=>e.id==i))[0];this.elevateLevelsDataChange.emit({currentLevel:e})}this.elevateLevelsDataChange.emit({clearError:!0}),this.elevateLevelsDataChange.emit({elevateLevels:t})})).catch((e=>{this.elevateLevelsDataChange.emit({errorMessage:{type:"errorWhenLoadElevateLevels",err:e}}),console.error(e)}))}};function b(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function y(e,t){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)}))}p.style=":host{display:block}";const u=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&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,e&&e.appendChild(i)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&b(this.el,this.clientStyling),this.clientStylingUrl&&y(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&b(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&y(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&b(this.el,this.clientStyling),this.clientStylingUrl&&y(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(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((s=>{if(!i.en[s])return;const n=i.en[s];"object"==typeof t[e][s]?(i[e][s]=i[e][s]||Object.assign({},n),Object.keys(t[e][s]).forEach((n=>{i[e][s][n]=t[e][s][n]}))):i[e][s]=t[e][s]||Object.assign({},n)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},t("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return n(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};u.style=":host{display:block}";export{o as bonus_elevate_levels_jojogroup,c as elevate_level_presentation,p as elevate_levels_data,u as general_styling_wrapper}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as i,H as s,g as o}from"./index-88ecbb5b.js";import{t as l}from"./locale.utils-3a9c8e78.js";var h;!function(e){e[e.slideToRight=1]="slideToRight",e[e.slideToLeft=-1]="slideToLeft"}(h||(h={}));const r=class{constructor(i){var s;e(this,i),this.selectedLevelChanged=t(this,"selectedLevelChanged",7),this.minOffset=0,this.isMobile=!!((s=window.navigator.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.levels=void 0,this.language=void 0,this.selectedLevelId=void 0,this.showSliderButton=!1,this.touchPosStart=void 0,this.touchPosEnd=void 0,this.offset=0}onLevelClicked(e){this.selectedLevelChanged.emit({level:e}),this.selectedLevelId=e.id}levelsChangedHandler(){this.initOffsetOfLevelItems()}initOffsetOfLevelItems(){if(!this.levels||0===this.levels.length||!this.selectedLevelId)return;const e=this.levels.findIndex((e=>this.selectedLevelId===e.id));if(this.onLevelClicked(this.levels[-1===e?0:e]),this.levels.length<=this.moveCountForOneTouch)return;let t=Math.floor((-1===e?1:e+1)/this.moveCountForOneTouch)*this.moveCountForOneTouch*this.childElementWidth*-1;this.offset=t<=this.minOffset?this.minOffset:t>=0?0:t}onTouchStart(e){this.touchPosStart={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}onTouchMove(e){this.touchPosEnd={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};const t=this.touchPosEnd.clientX-this.touchPosStart.clientX,i=this.touchPosEnd.clientY-this.touchPosStart.clientY;Math.abs(t)>Math.abs(i)&&this.slideTo(t>0?h.slideToRight:h.slideToLeft)}slideTo(e){let t=this.levelsElement.offsetLeft+this.childElementWidth*this.moveCountForOneTouch*e;if(t%this.childElementWidth!=0){const i=Math.floor(t/this.childElementWidth)*this.childElementWidth,s=Math.ceil(t/this.childElementWidth)*this.childElementWidth;t=e===h.slideToRight?i:s}this.offset=t<this.minOffset?this.minOffset:t>=0?0:t}initLevelSlider(){var e;if(!(null===(e=this.levelsElement)||void 0===e?void 0:e.firstElementChild))return void console.log("Widget[elevate-level-list] DOM is not ready.");this.showSliderButton=!this.isMobile&&this.levelsElement.clientWidth>this.levelsElement.parentElement.clientWidth,this.minOffset=this.levelsElement.parentElement.clientWidth-this.levelsElement.clientWidth,this.childElementWidth=this.levelsElement.firstElementChild.clientWidth,this.moveCountForOneTouch=Math.ceil(this.levelsElement.parentElement.clientWidth/this.childElementWidth)-1;const t=this.levelsElement.childElementCount;this.childElementWidth+=(this.levelsElement.clientWidth-this.childElementWidth*t)/(t-1)}debounce(e,t){{let i;return()=>{clearTimeout(i),i=setTimeout((()=>{e()}),t)}}}convertNumberToCompactForm(e){return e>=1e9?(e/1e9).toFixed(1).replace(/\.0$/,"")+"b":e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"m":e>=1e3?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":e.toFixed(1)}handleResize(){this.debounce(this.initLevelSlider.bind(this),200)()}componentDidRender(){this.host.componentOnReady().then((()=>{this.initLevelSlider()}))}render(){return i(s,{key:"44b0d5811a2207a53f95c5a50d6ed89d70f42d01"},this.levels&&[i("div",{key:"fec6de26b8622dac4649df5e0346e8ef4138465e",class:`SliderButton LeftButton ${0===this.offset?"Disabled":""} ${this.showSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(h.slideToRight)},i("svg",{key:"84cf364bdddfb7cd9a83b9808622332ab01729cd",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{key:"fd358448630ac184528b38e3a88db50b628be3de","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),i("div",{key:"4a32485c3440261265060a3298ab56e49f602006",class:"LevelItemsWrapper"},i("div",{key:"f5b7f896452375e04031e1db6c56cfd8b5e4909d",style:{left:`${this.offset}px`},class:"LevelItems "+(this.isMobile?"Mobile":""),id:"levelItems",ref:e=>{this.levelsElement=e}},this.levels.map(((e,t)=>i("div",{class:"Item "+(this.selectedLevelId===e.id?"Active":""),onClick:this.onLevelClicked.bind(this,e)},i("img",{alt:`Presentation Icon for ${e.presentation.displayName}`,class:"LevelImg",src:e.presentation.asset}),i("span",{class:"LevelName",title:e.presentation.displayName},e.presentation.displayName),i("span",{class:"LevelPoints"},0===t?"":">",this.convertNumberToCompactForm(e.firstEntryPoints)," ",l("points",this.language))))))),i("div",{key:"3444fcf3b46239e9ee6b84aa35f5637d9bee66ea",class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.showSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(h.slideToLeft)},i("svg",{key:"b86e73ad5f0f6114af9fe13452c5c6193b3a026b",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{key:"18f15ddeb747db3c80c6c16b2e0e727f45bbb986","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))])}get host(){return o(this)}static get watchers(){return{selectedLevelId:["levelsChangedHandler"]}}};r.style="elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emw--color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emw--color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emw--color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";export{r as elevate_level_list}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="undefined"!=typeof window?window:{},u=f.document||{head:{}},a={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},d=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&a.o?w(b):a.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(m),$(v),(p=m.length>0)&&a.raf(b)},w=e=>d().then(e),g=y(v,!0),j={},S=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>T});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,R,x,P=e=>{if(e.isOk)return e.value;throw e.value},T=e=>{if(e.isErr)return e.value;throw e.value},A=(e,t,...n)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof e&&!S(o))&&(o+=""),i&&r?c[c.length-1].i+=o:c.push(i?L(null,o):o),r=i)};if(f(n),t){t.key&&(l=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=L(e,null);return u.u=t,c.length>0&&(u.h=c),u.p=l,u.m=s,u},L=(e,t)=>({o:0,v:e,i:t,$:null,h:null,u:null,p:null,m:null}),N={},W=e=>n(e).$hostElement$,D=(e,t,n)=>{const o=W(e);return{emit:e=>H(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},H=(e,t,n)=>{const o=a.ce(t,n);return e.dispatchEvent(o),o},U=new WeakMap,F=e=>"sc-"+e.j,q=(e,t,n,o,s,i)=>{if(n!==o){let r=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=V(n),s=V(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if("ref"===t)o&&o(e);else if(r||"o"!==t[0]||"n"!==t[1]){const l=S(o);if((r||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?r=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(f,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(_);t=t.replace(z,""),n&&a.rel(e,t,n,l),o&&a.ael(e,t,o,l)}}},G=/\s/,V=e=>e?e.split(G):[],_="Capture",z=RegExp(_+"$"),B=(e,t,n)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,l=e&&e.u||j,s=t.u||j;for(const e of I(Object.keys(l)))e in s||q(o,e,l[e],void 0,n,t.o);for(const e of I(Object.keys(s)))q(o,e,l[e],s[e],n,t.o)};function I(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var J=!1,K=!1,Q=!1,X=!1,Y=(e,t,n,o)=>{var l;const s=t.h[n];let i,r,c,f=0;if(J||(Q=!0,"slot"===s.v&&(M&&o.classList.add(M+"-s"),s.o|=s.h?2:1)),null!==s.i)i=s.$=u.createTextNode(s.i);else if(1&s.o)i=s.$=u.createTextNode("");else{if(X||(X="svg"===s.v),i=s.$=u.createElementNS(X?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!J&&2&s.o?"slot-fb":s.v),X&&"foreignObject"===s.v&&(X=!1),B(null,s,X),null!=M&&i["s-si"]!==M&&i.classList.add(i["s-si"]=M),s.h)for(f=0;f<s.h.length;++f)r=Y(e,s,f,i),r&&i.appendChild(r);"svg"===s.v?X=!1:"foreignObject"===i.tagName&&(X=!0)}return i["s-hn"]=x,3&s.o&&(i["s-sr"]=!0,i["s-cr"]=R,i["s-sn"]=s.m||"",i["s-rf"]=null==(l=s.u)?void 0:l.ref,c=e&&e.h&&e.h[n],c&&c.v===s.v&&e.$&&Z(e.$,!1)),i},Z=(e,t)=>{a.o|=1;const n=Array.from(e.childNodes);for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==x&&o["s-ol"]&&(ae(le(o),o,oe(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Q=!0),t&&Z(o,t)}a.o&=-2},ee=(e,t,n,o,l,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===x&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=Y(null,n,l,e),i&&(o[l].$=i,ae(r,i,oe(t))))},te=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.$;ue(t),e&&(K=!0,e["s-ol"]?e["s-ol"].remove():Z(e,!0),e.remove())}}},ne=(e,t,n=!1)=>e.v===t.v&&("slot"===e.v?e.m===t.m:!!n||e.p===t.p),oe=e=>e&&e["s-ol"]||e,le=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,se=(e,t,n=!1)=>{const o=t.$=e.$,l=e.h,s=t.h,i=t.v,r=t.i;let c;null===r?(X="svg"===i||"foreignObject"!==i&&X,("slot"!==i||J)&&B(e,t,X),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=t.length-1,d=t[0],h=t[a],p=o.length-1,m=o[0],v=o[p];for(;r<=a&&c<=p;)if(null==d)d=t[++r];else if(null==h)h=t[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(ne(d,m,l))se(d,m,l),d=t[++r],m=o[++c];else if(ne(h,v,l))se(h,v,l),h=t[--a],v=o[--p];else if(ne(d,v,l))"slot"!==d.v&&"slot"!==v.v||Z(d.$.parentNode,!1),se(d,v,l),ae(e,d.$,h.$.nextSibling),d=t[++r],v=o[--p];else if(ne(h,m,l))"slot"!==d.v&&"slot"!==v.v||Z(h.$.parentNode,!1),se(h,m,l),ae(e,h.$,d.$),h=t[--a],m=o[++c];else{for(f=-1,u=r;u<=a;++u)if(t[u]&&null!==t[u].p&&t[u].p===m.p){f=u;break}f>=0?(i=t[f],i.v!==m.v?s=Y(t&&t[c],n,f,e):(se(i,m,l),t[f]=void 0,s=i.$),m=o[++c]):(s=Y(t&&t[c],n,c,e),m=o[++c]),s&&ae(le(d.$),s,oe(d.$))}r>a?ee(e,null==o[p+1]?null:o[p+1].$,n,o,c,p):c>p&&te(t,r,a)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),ee(o,null,t,s,0,s.length-1)):null!==l&&te(l,0,l.length-1),X&&"svg"===i&&(X=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:e.i!==r&&(o.data=r)},ie=e=>{const t=e.childNodes;for(const e of t)if(1===e.nodeType){if(e["s-sr"]){const n=e["s-sn"];e.hidden=!1;for(const o of t)if(o!==e)if(o["s-hn"]!==e["s-hn"]||""!==n){if(1===o.nodeType&&(n===o.getAttribute("slot")||n===o["s-sn"])||3===o.nodeType&&n===o["s-sn"]){e.hidden=!0;break}}else if(1===o.nodeType||3===o.nodeType&&""!==o.textContent.trim()){e.hidden=!0;break}}ie(e)}},re=[],ce=e=>{let t,n,o;for(const l of e.childNodes){if(l["s-sr"]&&(t=l["s-cr"])&&t.parentNode){n=t.parentNode.childNodes;const e=l["s-sn"];for(o=n.length-1;o>=0;o--)if(t=n[o],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==l["s-hn"])if(fe(t,e)){let n=re.find((e=>e.S===t));K=!0,t["s-sn"]=t["s-sn"]||e,n?(n.S["s-sh"]=l["s-hn"],n.k=l):(t["s-sh"]=l["s-hn"],re.push({k:l,S:t})),t["s-sr"]&&re.map((e=>{fe(e.S,t["s-sn"])&&(n=re.find((e=>e.S===t)),n&&!e.k&&(e.k=n.k))}))}else re.some((e=>e.S===t))||re.push({S:t})}1===l.nodeType&&ce(l)}},fe=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,ue=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(ue)},ae=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),de=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},he=(e,t)=>{if(e.o|=16,!(4&e.o))return de(e,e.C),g((()=>pe(e,t)));e.o|=512},pe=(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 o;return t&&(e.o|=256,e.M&&(e.M.map((([e,t])=>ge(n,e,t))),e.M=void 0),o=ge(n,"componentWillLoad")),o=me(o,(()=>ge(n,"componentWillRender"))),me(o,(()=>ye(e,n,t)))},me=(e,t)=>ve(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ve=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ye=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.R,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=F(t),l=r.get(o);if(e=11===e.nodeType?e:u,l)if("string"==typeof l){let s,i=U.get(e=e.head||e);if(i||U.set(e,i=new Set),!i.has(o)){{s=u.createElement("style"),s.innerHTML=l;const t=null!=(n=a.P)?n:k(u);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.o&&(s.innerHTML+=c),i&&i.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);$e(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>be(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},$e=(e,t,n,o)=>{try{t=t.render&&t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{var o,l,s,i;const r=e.$hostElement$,c=e.R,f=e.T||L(null,null),d=(e=>e&&e.v===N)(t)?t:A(null,null,t);if(x=r.tagName,c.A&&(d.u=d.u||{},c.A.map((([e,t])=>d.u[t]=r[e]))),n&&d.u)for(const e of Object.keys(d.u))r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(d.u[e]=r[e]);if(d.v=null,d.o|=4,e.T=d,d.$=f.$=r.shadowRoot||r,M=r["s-sc"],J=!!(1&c.o),R=r["s-cr"],K=!1,se(f,d,n),a.o|=1,Q){ce(d.$);for(const e of re){const t=e.S;if(!t["s-ol"]){const e=u.createTextNode("");e["s-nr"]=t,ae(t.parentNode,t["s-ol"]=e,t)}}for(const e of re){const t=e.S,r=e.k;if(r){const e=r.parentNode;let n=r.nextSibling;{let s=null==(o=t["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===t["s-sn"]&&e===o.parentNode){for(o=o.nextSibling;o===t||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&e!==t.parentNode||t.nextSibling!==n)&&t!==n&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),ae(e,t,n),1===t.nodeType&&(t.hidden=null!=(s=t["s-ih"])&&s)),t&&"function"==typeof r["s-rf"]&&r["s-rf"](t)}else 1===t.nodeType&&(n&&(t["s-ih"]=null!=(i=t.hidden)&&i),t.hidden=!0)}}K&&ie(d.$),a.o&=-2,re.length=0,R=void 0})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},be=e=>{const t=e.$hostElement$,n=e.t,o=e.C;ge(n,"componentDidRender"),64&e.o||(e.o|=64,je(t),ge(n,"componentDidLoad"),e.L(t),o||we()),e.O&&(e.O(),e.O=void 0),512&e.o&&w((()=>he(e,!1))),e.o&=-517},we=()=>{je(u.documentElement),w((()=>H(f,"appload",{detail:{namespace:"bonus-elevate-levels-jojogroup"}})))},ge=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},je=e=>e.classList.add("hydrated"),Se=(e,t,o)=>{var l,i;const r=e.prototype;if(t.N||t.W||e.watchers){e.watchers&&!t.W&&(t.W=e.watchers);const c=Object.entries(null!=(l=t.N)?l:{});if(c.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).D.get(t))(0,e)},set(o){((e,t,o,l)=>{const i=n(e);if(!i)throw Error(`Couldn't find host element for "${l.j}" 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 r=i.$hostElement$,c=i.D.get(t),f=i.o,u=i.t;if(o=((e,t)=>null==e||S(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(o,l.N[t][0]),(!(8&f)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.D.set(t,o),u)){if(l.W&&128&f){const e=l.W[t];e&&e.map((e=>{try{u[e](o,c,t)}catch(e){s(e,r)}}))}2==(18&f)&&he(i,!1)}})(this,e,o,t)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;r.attributeChangedCallback=function(e,l,s){a.jmp((()=>{var i;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),r=null==o?void 0:o.o;if(r&&!(8&r)&&128&r&&s!==l){const n=o.t,r=null==(i=t.W)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=t.W)?i:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.A)||l.push([e,s])),s}))]))}}return e},ke=e=>{ge(e,"disconnectedCallback")},Oe=(e,o={})=>{var l;const d=[],p=o.exclude||[],m=f.customElements,v=u.head,y=v.querySelector("meta[charset]"),$=u.createElement("style"),b=[];let w,g=!0;Object.assign(a,o),a.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let j=!1;if(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],j:o[1],N:o[2],H:o[3]};4&c.o&&(j=!0),c.N=o[2],c.H=o[3],c.A=[],c.W=null!=(l=o[4])?l:{};const f=c.j,v=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,R:n,D:new Map};o.U=new Promise((e=>o.L=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,c),1&c.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.j}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Ee(this,e,c.H)),w&&(clearTimeout(w),w=null),g?b.push(this):a.jmp((()=>(e=>{if(!(1&a.o)){const t=n(e),o=t.R,l=()=>{};if(1&t.o)Ee(e,t,o.H),(null==t?void 0:t.t)||(null==t?void 0:t.U)&&t.U.then((()=>{}));else{t.o|=1,12&o.o&&(e=>{const t=e["s-cr"]=u.createComment("");t["s-cn"]=!0,ae(e,t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){de(t,t.C=n);break}}o.N&&Object.entries(o.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.F){const e=(e=>{const t=e.j.replace(/-/g,"_"),n=e.F;if(!n)return;const o=i.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(i.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.j}#${t.q}" was not found`);o.isProxied||(n.W=o.watchers,Se(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){s(e)}t.o&=-9,t.o|=128,l()}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=F(n);if(!r.has(t)){const o=()=>{};((e,t,n)=>{let o=r.get(e);h&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,r.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.C,c=()=>he(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.o)){const e=n(this);e.G&&(e.G.map((e=>e())),e.G=void 0),(null==e?void 0:e.t)?ke(e.t):(null==e?void 0:e.U)&&e.U.then((()=>ke(e.t)))}})()))}componentOnReady(){return n(this).U}};c.F=e[0],p.includes(f)||m.get(f)||(d.push(f),m.define(f,Se(v,c,1)))}))})),d.length>0&&(j&&($.textContent+=c),$.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(l=a.P)?l:k(u);null!=e&&$.setAttribute("nonce",e),v.insertBefore($,y?y.nextSibling:v.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):a.jmp((()=>w=setTimeout(we,30)))},Ee=(e,t,n)=>{n&&n.map((([n,o,l])=>{const s=Me(e,n),i=Ce(t,l),r=Re(n);a.ael(s,o,i,r),(t.G=t.G||[]).push((()=>a.rel(s,o,i,r)))}))},Ce=(e,t)=>n=>{var o;try{256&e.o?null==(o=e.t)||o[t](n):(e.M=e.M||[]).push([t,n])}catch(e){s(e)}},Me=(e,t)=>8&t?f:e,Re=e=>({passive:!!(1&e),capture:!!(2&e)}),xe=e=>a.P=e;export{N as H,Oe as b,D as c,W as g,A as h,d as p,o as r,xe as s}
@@ -0,0 +1 @@
1
+ const e={en:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},fr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set",points:"Points"},ro:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},tr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"}},l=(l,s)=>{var o;const n=s||"en";return e[n]=e[n]||{},null!==(o=e[n][l])&&void 0!==o?o:""};export{e as T,l as t}
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-09a798bf.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-elevate-levels-jojogroup.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([["elevate-level-list.cjs",[[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"showSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}]]],["bonus-elevate-levels-jojogroup_4.cjs",[[1,"bonus-elevate-levels-jojogroup",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"errorMessage":[32]},[[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
23
+ });
24
+
25
+ exports.setNonce = index.setNonce;
@@ -0,0 +1,322 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-09a798bf.js');
6
+ const locale_utils = require('./locale.utils-942322b6.js');
7
+
8
+ const bonusElevateLevelsJojogroupCss = ":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}";
9
+ const BonusElevateLevelsJojogroupStyle0 = bonusElevateLevelsJojogroupCss;
10
+
11
+ const BonusElevateLevelsJojogroup = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.clientStyling = '';
15
+ this.clientStylingUrl = '';
16
+ this.mbSource = undefined;
17
+ this.endpoint = undefined;
18
+ this.language = 'en';
19
+ this.translationUrl = '';
20
+ this.selectedLevelId = undefined;
21
+ this.showDefault = undefined;
22
+ this.elevateLevelParamProxy = undefined;
23
+ this.elevateLevels = [];
24
+ this.errorMessage = undefined;
25
+ }
26
+ elevateLevelsDataChangeHandler(event) {
27
+ if (!event.detail)
28
+ return;
29
+ if (event.detail.elevateLevels) {
30
+ this.elevateLevels = [...event.detail.elevateLevels];
31
+ }
32
+ if (event.detail.clearError) {
33
+ this.errorMessage = null;
34
+ }
35
+ if (event.detail.errorMessage) {
36
+ if (event.detail.errorMessage['errorWhenLoadElevateLevels']) {
37
+ this.errorMessage = locale_utils.translate('loadElevateLevelErrorMessage', this.language);
38
+ }
39
+ }
40
+ }
41
+ onSessionOrEndpointChange() {
42
+ this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
43
+ }
44
+ onTCClick() {
45
+ window.postMessage({ type: 'termAndConditionClicked' }, window.location.href);
46
+ }
47
+ componentWillLoad() {
48
+ this.elevateLevelParamProxy = {
49
+ endpoint: this.endpoint,
50
+ language: this.language,
51
+ selectedLevelId: this.selectedLevelId,
52
+ showDefault: this.showDefault,
53
+ };
54
+ }
55
+ render() {
56
+ var _a;
57
+ return (index.h("div", { key: '3cdca540038915c73a99cca214d1d8091a928cb8', class: "ElevateLevelContent" }, index.h("elevate-levels-data", { key: '1e1a73074ceb36ce5554b7796ca07c2efb4f73ce', scopeParams: this.elevateLevelParamProxy }), index.h("div", { key: 'a1c66508053cac8549d23fabb291ff273079786c', class: "LevelContent" }, ((_a = this.elevateLevels) === null || _a === void 0 ? void 0 : _a.length) ? (this.elevateLevels.map((level) => (index.h("elevate-level-presentation", { elevateLevel: level })))) : (index.h("div", null, locale_utils.translate('noLevelsSet', this.language)))), this.errorMessage && index.h("div", { key: 'ed47949b39a95528d1a7f5acb9fe5ea1b596d6aa', class: "ErrorMessage" }, this.errorMessage), index.h("general-styling-wrapper", { key: 'c033776c424e2bc697f23a5a7abe34746fd6af7f', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource })));
58
+ }
59
+ static get watchers() { return {
60
+ "endpoint": ["onSessionOrEndpointChange"],
61
+ "language": ["onSessionOrEndpointChange"]
62
+ }; }
63
+ };
64
+ BonusElevateLevelsJojogroup.style = BonusElevateLevelsJojogroupStyle0;
65
+
66
+ const elevateLevelPresentationCss = ":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";
67
+ const ElevateLevelPresentationStyle0 = elevateLevelPresentationCss;
68
+
69
+ const ElevateLevelPresentation = class {
70
+ constructor(hostRef) {
71
+ index.registerInstance(this, hostRef);
72
+ this.elevateLevel = undefined;
73
+ }
74
+ render() {
75
+ return index.h(index.Host, { key: 'c02f0c4ca19226058b810f279273affa7b3398cc' }, index.h("div", { key: 'da5e3ce17167447ee462b1318f7d407f48781062', class: "Row Desc" }, index.h("h3", { key: '6f811514d8f72b7484795e8a181c8e18446a52fe' }, this.elevateLevel.presentation.displayName), index.h("p", { key: 'fd0f78d172f027c79d542d630467e0f24099328f' }, index.h("span", { key: '5eec8c85f146739d7e01b7112e1b1cf886c83310', class: "TxtDesc", innerHTML: this.elevateLevel.presentation.description }))));
76
+ }
77
+ };
78
+ ElevateLevelPresentation.style = ElevateLevelPresentationStyle0;
79
+
80
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
81
+
82
+ var browser = {exports: {}};
83
+
84
+ (function (module, exports) {
85
+
86
+ // ref: https://github.com/tc39/proposal-global
87
+ var getGlobal = function () {
88
+ // the only reliable means to get the global object is
89
+ // `Function('return this')()`
90
+ // However, this causes CSP violations in Chrome apps.
91
+ if (typeof self !== 'undefined') { return self; }
92
+ if (typeof window !== 'undefined') { return window; }
93
+ if (typeof commonjsGlobal !== 'undefined') { return commonjsGlobal; }
94
+ throw new Error('unable to locate global object');
95
+ };
96
+
97
+ var globalObject = getGlobal();
98
+
99
+ module.exports = exports = globalObject.fetch;
100
+
101
+ // Needed for TypeScript and Webpack.
102
+ if (globalObject.fetch) {
103
+ exports.default = globalObject.fetch.bind(globalObject);
104
+ }
105
+
106
+ exports.Headers = globalObject.Headers;
107
+ exports.Request = globalObject.Request;
108
+ exports.Response = globalObject.Response;
109
+ }(browser, browser.exports));
110
+
111
+ const fetch$1 = browser.exports;
112
+
113
+ const elevateLevelsDataCss = ":host{display:block}";
114
+ const ElevateLevelsDataStyle0 = elevateLevelsDataCss;
115
+
116
+ const ElevateLevelsData = class {
117
+ constructor(hostRef) {
118
+ index.registerInstance(this, hostRef);
119
+ this.elevateLevelsDataChange = index.createEvent(this, "elevateLevelsDataChange", 7);
120
+ this.scopeParams = undefined;
121
+ }
122
+ async componentWillRender() {
123
+ //load data
124
+ if (!this.scopeParams.endpoint) {
125
+ return;
126
+ }
127
+ const endpoint = this.scopeParams.endpoint;
128
+ let url = new URL(`${endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);
129
+ await fetch$1(url.href)
130
+ .then((res) => res.json())
131
+ .then((res) => {
132
+ const elevateLevels = res.data.sort((a, b) => {
133
+ return a.firstEntryPoints < b.firstEntryPoints ? -1 : 1;
134
+ });
135
+ let selectedLevelId = this.scopeParams.selectedLevelId;
136
+ // if selected level is not set, set first(basic) as default
137
+ if (!selectedLevelId && this.scopeParams.showDefault && elevateLevels.length > 0) {
138
+ selectedLevelId = elevateLevels[0].id;
139
+ }
140
+ if (selectedLevelId) {
141
+ // get current level by name
142
+ const currentLevel = elevateLevels.filter((item) => {
143
+ return item.id == selectedLevelId;
144
+ })[0];
145
+ this.elevateLevelsDataChange.emit({ currentLevel: currentLevel });
146
+ }
147
+ this.elevateLevelsDataChange.emit({ 'clearError': true });
148
+ this.elevateLevelsDataChange.emit({ 'elevateLevels': elevateLevels });
149
+ }).catch((err) => {
150
+ this.elevateLevelsDataChange.emit({ errorMessage: { type: 'errorWhenLoadElevateLevels', err } });
151
+ console.error(err);
152
+ });
153
+ }
154
+ };
155
+ ElevateLevelsData.style = ElevateLevelsDataStyle0;
156
+
157
+ const mergeTranslations = (url, target) => {
158
+ return new Promise((resolve) => {
159
+ fetch(url)
160
+ .then((res) => res.json())
161
+ .then((data) => {
162
+ Object.keys(data).forEach((item) => {
163
+ target[item] = target[item] || {};
164
+ Object.keys(data[item]).forEach((key) => {
165
+ //if there is no key in target, do nothing
166
+ if (!target['en'][key]) {
167
+ return;
168
+ }
169
+ const defaultTranslation = target['en'][key];
170
+ if (typeof data[item][key] === 'object') {
171
+ // if the key is not in target, then take from en
172
+ target[item][key] = target[item][key] || Object.assign({}, defaultTranslation);
173
+ Object.keys(data[item][key]).forEach((subKey) => {
174
+ target[item][key][subKey] = data[item][key][subKey];
175
+ });
176
+ }
177
+ else {
178
+ target[item][key] = data[item][key] || Object.assign({}, defaultTranslation);
179
+ }
180
+ });
181
+ });
182
+ resolve(true);
183
+ })
184
+ .catch(err => {
185
+ console.error("Failed to load translations:", err);
186
+ resolve(false);
187
+ });
188
+ });
189
+ };
190
+
191
+ /**
192
+ * @name setClientStyling
193
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
194
+ * @param {HTMLElement} stylingContainer The reference element of the widget
195
+ * @param {string} clientStyling The style content
196
+ */
197
+ function setClientStyling(stylingContainer, clientStyling) {
198
+ if (stylingContainer) {
199
+ const sheet = document.createElement('style');
200
+ sheet.innerHTML = clientStyling;
201
+ stylingContainer.appendChild(sheet);
202
+ }
203
+ }
204
+
205
+ /**
206
+ * @name setClientStylingURL
207
+ * @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
208
+ * @param {HTMLElement} stylingContainer The reference element of the widget
209
+ * @param {string} clientStylingUrl The URL of the style content
210
+ */
211
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
212
+ const url = new URL(clientStylingUrl);
213
+
214
+ fetch(url.href)
215
+ .then((res) => res.text())
216
+ .then((data) => {
217
+ const cssFile = document.createElement('style');
218
+ cssFile.innerHTML = data;
219
+ if (stylingContainer) {
220
+ stylingContainer.appendChild(cssFile);
221
+ }
222
+ })
223
+ .catch((err) => {
224
+ console.error('There was an error while trying to load client styling from URL', err);
225
+ });
226
+ }
227
+
228
+ /**
229
+ * @name setStreamLibrary
230
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
231
+ * @param {HTMLElement} stylingContainer The highest element of the widget
232
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
233
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
234
+ */
235
+ function setStreamStyling(stylingContainer, domain, subscription) {
236
+ if (window.emMessageBus) {
237
+ const sheet = document.createElement('style');
238
+
239
+ window.emMessageBus.subscribe(domain, (data) => {
240
+ sheet.innerHTML = data;
241
+ if (stylingContainer) {
242
+ stylingContainer.appendChild(sheet);
243
+ }
244
+ });
245
+ }
246
+ }
247
+
248
+ const generalStylingWrapperCss = ":host{display:block}";
249
+ const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
250
+
251
+ const GeneralStylingWrapper = class {
252
+ constructor(hostRef) {
253
+ index.registerInstance(this, hostRef);
254
+ this.stylingAppends = false;
255
+ this.clientStyling = '';
256
+ this.clientStylingUrl = '';
257
+ this.mbSource = undefined;
258
+ this.translationUrl = '';
259
+ this.targetTranslations = undefined;
260
+ }
261
+ componentDidLoad() {
262
+ if (this.el) {
263
+ if (window.emMessageBus != undefined) {
264
+ setStreamStyling(this.el, `${this.mbSource}.Style`);
265
+ }
266
+ else {
267
+ if (this.clientStyling)
268
+ setClientStyling(this.el, this.clientStyling);
269
+ if (this.clientStylingUrl)
270
+ setClientStylingURL(this.el, this.clientStylingUrl);
271
+ this.stylingAppends = true;
272
+ }
273
+ }
274
+ }
275
+ disconnectedCallback() {
276
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
277
+ }
278
+ handleClientStylingChange(newValue, oldValue) {
279
+ if (newValue != oldValue) {
280
+ setClientStyling(this.el, this.clientStyling);
281
+ }
282
+ }
283
+ handleClientStylingUrlChange(newValue, oldValue) {
284
+ if (newValue != oldValue) {
285
+ if (this.clientStylingUrl)
286
+ setClientStylingURL(this.el, this.clientStylingUrl);
287
+ }
288
+ }
289
+ componentDidRender() {
290
+ // start custom styling area
291
+ if (!this.stylingAppends) {
292
+ if (this.clientStyling)
293
+ setClientStyling(this.el, this.clientStyling);
294
+ if (this.clientStylingUrl)
295
+ setClientStylingURL(this.el, this.clientStylingUrl);
296
+ this.stylingAppends = true;
297
+ }
298
+ // end custom styling area
299
+ }
300
+ async componentWillLoad() {
301
+ const promises = [];
302
+ if (this.translationUrl) {
303
+ const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
304
+ promises.push(translationPromise);
305
+ }
306
+ return await Promise.all(promises);
307
+ }
308
+ render() {
309
+ return (index.h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, index.h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
310
+ }
311
+ get el() { return index.getElement(this); }
312
+ static get watchers() { return {
313
+ "clientStyling": ["handleClientStylingChange"],
314
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
315
+ }; }
316
+ };
317
+ GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
318
+
319
+ exports.bonus_elevate_levels_jojogroup = BonusElevateLevelsJojogroup;
320
+ exports.elevate_level_presentation = ElevateLevelPresentation;
321
+ exports.elevate_levels_data = ElevateLevelsData;
322
+ exports.general_styling_wrapper = GeneralStylingWrapper;
@@ -0,0 +1,147 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-09a798bf.js');
6
+ const locale_utils = require('./locale.utils-942322b6.js');
7
+
8
+ /**
9
+ * @name isMobile
10
+ * @description A method that returns if the browser used to access the app is from a mobile device or not
11
+ * @param {String} userAgent window.navigator.userAgent
12
+ * @returns {Boolean} true or false
13
+ */
14
+ const isMobile = (userAgent) => {
15
+ return !!(userAgent.toLowerCase().match(/android/i) ||
16
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
17
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
18
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
19
+ };
20
+ var MOVE_TO;
21
+ (function (MOVE_TO) {
22
+ MOVE_TO[MOVE_TO["slideToRight"] = 1] = "slideToRight";
23
+ MOVE_TO[MOVE_TO["slideToLeft"] = -1] = "slideToLeft";
24
+ })(MOVE_TO || (MOVE_TO = {}));
25
+
26
+ const elevateLevelListCss = "elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emw--color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emw--color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emw--color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";
27
+ const ElevateLevelListStyle0 = elevateLevelListCss;
28
+
29
+ const ElevateLevelList = class {
30
+ constructor(hostRef) {
31
+ index.registerInstance(this, hostRef);
32
+ this.selectedLevelChanged = index.createEvent(this, "selectedLevelChanged", 7);
33
+ this.minOffset = 0;
34
+ this.isMobile = isMobile(window.navigator.userAgent);
35
+ this.levels = undefined;
36
+ this.language = undefined;
37
+ this.selectedLevelId = undefined;
38
+ this.showSliderButton = false;
39
+ this.touchPosStart = undefined;
40
+ this.touchPosEnd = undefined;
41
+ this.offset = 0;
42
+ }
43
+ onLevelClicked(elevateLevel) {
44
+ this.selectedLevelChanged.emit({ level: elevateLevel });
45
+ this.selectedLevelId = elevateLevel.id;
46
+ }
47
+ levelsChangedHandler() {
48
+ this.initOffsetOfLevelItems();
49
+ }
50
+ initOffsetOfLevelItems() {
51
+ if (!this.levels || this.levels.length === 0 || !this.selectedLevelId) {
52
+ return;
53
+ }
54
+ const currentLevelIndex = this.levels.findIndex((item) => {
55
+ return this.selectedLevelId === item.id;
56
+ });
57
+ this.onLevelClicked(this.levels[currentLevelIndex === -1 ? 0 : currentLevelIndex]);
58
+ //do not need change the slider offset when level items less than moveCountForOneTouch
59
+ if (this.levels.length <= this.moveCountForOneTouch) {
60
+ return;
61
+ }
62
+ //to avoid the slider do not move when currentLevelIndex = moveCountForOneTouch - 1
63
+ let newOffset = Math.floor((currentLevelIndex === -1 ? 1 : currentLevelIndex + 1) / this.moveCountForOneTouch)
64
+ * this.moveCountForOneTouch * this.childElementWidth * (-1);
65
+ this.offset = newOffset <= this.minOffset ? this.minOffset : (newOffset >= 0 ? 0 : newOffset);
66
+ }
67
+ onTouchStart(e) {
68
+ this.touchPosStart = { clientX: e.touches[0].clientX, clientY: e.touches[0].clientY };
69
+ }
70
+ onTouchMove(e) {
71
+ this.touchPosEnd = { clientX: e.touches[0].clientX, clientY: e.touches[0].clientY };
72
+ const diffX = this.touchPosEnd.clientX - this.touchPosStart.clientX;
73
+ const diffY = this.touchPosEnd.clientY - this.touchPosStart.clientY;
74
+ if (Math.abs(diffX) > Math.abs(diffY)) {
75
+ this.slideTo(diffX > 0 ? MOVE_TO.slideToRight : MOVE_TO.slideToLeft);
76
+ }
77
+ }
78
+ slideTo(direction) {
79
+ let newOffset = this.levelsElement.offsetLeft +
80
+ (this.childElementWidth) * this.moveCountForOneTouch * direction;
81
+ if (newOffset % this.childElementWidth != 0) {
82
+ const leftOfPreNode = (Math.floor(newOffset / this.childElementWidth)) * this.childElementWidth;
83
+ const leftOfNextNode = (Math.ceil(newOffset / this.childElementWidth)) * this.childElementWidth;
84
+ //touchmove to right, get left of pre-node; touchmove to left, get left of next-node
85
+ newOffset = direction === MOVE_TO.slideToRight ? leftOfPreNode : leftOfNextNode;
86
+ }
87
+ this.offset = newOffset < this.minOffset ? this.minOffset : (newOffset >= 0 ? 0 : newOffset);
88
+ }
89
+ initLevelSlider() {
90
+ var _a;
91
+ if (!((_a = this.levelsElement) === null || _a === void 0 ? void 0 : _a.firstElementChild)) {
92
+ console.log('Widget[elevate-level-list] DOM is not ready.');
93
+ return;
94
+ }
95
+ this.showSliderButton = !this.isMobile && (this.levelsElement.clientWidth > this.levelsElement.parentElement.clientWidth);
96
+ this.minOffset = this.levelsElement.parentElement.clientWidth - this.levelsElement.clientWidth;
97
+ this.childElementWidth = this.levelsElement.firstElementChild.clientWidth;
98
+ this.moveCountForOneTouch = Math.ceil(this.levelsElement.parentElement.clientWidth / this.childElementWidth) - 1;
99
+ const childElementCount = this.levelsElement.childElementCount;
100
+ this.childElementWidth += (this.levelsElement.clientWidth - this.childElementWidth * childElementCount) / (childElementCount - 1);
101
+ }
102
+ debounce(callback, delay) {
103
+ {
104
+ let timer;
105
+ return () => {
106
+ clearTimeout(timer);
107
+ timer = setTimeout(() => {
108
+ callback();
109
+ }, delay);
110
+ };
111
+ }
112
+ }
113
+ ;
114
+ convertNumberToCompactForm(num) {
115
+ if (num >= 1000000000)
116
+ return (num / 1000000000).toFixed(1).replace(/\.0$/, '') + 'b';
117
+ if (num >= 1000000)
118
+ return (num / 1000000).toFixed(1).replace(/\.0$/, '') + 'm';
119
+ if (num >= 1000)
120
+ return (num / 1000).toFixed(1).replace(/\.0$/, '') + 'k';
121
+ return num.toFixed(1);
122
+ }
123
+ handleResize() {
124
+ this.debounce(this.initLevelSlider.bind(this), 200)();
125
+ }
126
+ componentDidRender() {
127
+ this.host.componentOnReady().then(() => {
128
+ this.initLevelSlider();
129
+ });
130
+ }
131
+ render() {
132
+ return (index.h(index.Host, { key: '44b0d5811a2207a53f95c5a50d6ed89d70f42d01' }, this.levels && [
133
+ index.h("div", { key: 'fec6de26b8622dac4649df5e0346e8ef4138465e', class: `SliderButton LeftButton ${this.offset === 0 ? 'Disabled' : ''} ${this.showSliderButton ? '' : 'Hidden'}`, onClick: () => this.slideTo(MOVE_TO.slideToRight) }, index.h("svg", { key: '84cf364bdddfb7cd9a83b9808622332ab01729cd', fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'fd358448630ac184528b38e3a88db50b628be3de', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" }))),
134
+ index.h("div", { key: '4a32485c3440261265060a3298ab56e49f602006', class: 'LevelItemsWrapper' }, index.h("div", { key: 'f5b7f896452375e04031e1db6c56cfd8b5e4909d', style: { 'left': `${this.offset}px` }, class: `LevelItems ${this.isMobile ? 'Mobile' : ''}`, id: 'levelItems', ref: (el) => { this.levelsElement = el; } }, this.levels.map((level, idx) => {
135
+ return (index.h("div", { class: `Item ${this.selectedLevelId === level.id ? 'Active' : ''}`, onClick: this.onLevelClicked.bind(this, level) }, index.h("img", { alt: `Presentation Icon for ${level.presentation.displayName}`, class: "LevelImg", src: level.presentation.asset }), index.h("span", { class: "LevelName", title: level.presentation.displayName }, level.presentation.displayName), index.h("span", { class: "LevelPoints" }, idx === 0 ? '' : '>', this.convertNumberToCompactForm(level.firstEntryPoints), ' ', locale_utils.translate('points', this.language))));
136
+ }))),
137
+ index.h("div", { key: '3444fcf3b46239e9ee6b84aa35f5637d9bee66ea', class: `SliderButton RightButton ${this.offset <= this.minOffset ? 'Disabled' : ''} ${this.showSliderButton ? '' : 'Hidden'}`, onClick: () => this.slideTo(MOVE_TO.slideToLeft) }, index.h("svg", { key: 'b86e73ad5f0f6114af9fe13452c5c6193b3a026b', fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '18f15ddeb747db3c80c6c16b2e0e727f45bbb986', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" })))
138
+ ]));
139
+ }
140
+ get host() { return index.getElement(this); }
141
+ static get watchers() { return {
142
+ "selectedLevelId": ["levelsChangedHandler"]
143
+ }; }
144
+ };
145
+ ElevateLevelList.style = ElevateLevelListStyle0;
146
+
147
+ exports.elevate_level_list = ElevateLevelList;