@everymatrix/casino-engagement-suite-modal-container 1.36.0

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 (54) hide show
  1. package/dist/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.esm.js +1 -0
  2. package/dist/casino-engagement-suite-modal-container/index.esm.js +0 -0
  3. package/dist/casino-engagement-suite-modal-container/p-0f126ad9.entry.js +1 -0
  4. package/dist/casino-engagement-suite-modal-container/p-8aa9bb7a.entry.js +1 -0
  5. package/dist/casino-engagement-suite-modal-container/p-b944b831.js +1 -0
  6. package/dist/cjs/casino-engagement-suite-modal-container.cjs.entry.js +127 -0
  7. package/dist/cjs/casino-engagement-suite-modal-container.cjs.js +19 -0
  8. package/dist/cjs/casino-engagement-suite-modal.cjs.entry.js +68 -0
  9. package/dist/cjs/index-2394967b.js +1253 -0
  10. package/dist/cjs/index.cjs.js +2 -0
  11. package/dist/cjs/loader.cjs.js +21 -0
  12. package/dist/collection/collection-manifest.json +19 -0
  13. package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.css +71 -0
  14. package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.js +223 -0
  15. package/dist/collection/index.js +1 -0
  16. package/dist/collection/models/index.js +1 -0
  17. package/dist/collection/utils/locale.utils.js +26 -0
  18. package/dist/collection/utils/utils.js +3 -0
  19. package/dist/components/casino-engagement-suite-modal-container.d.ts +11 -0
  20. package/dist/components/casino-engagement-suite-modal-container.js +156 -0
  21. package/dist/components/casino-engagement-suite-modal.js +6 -0
  22. package/dist/components/casino-engagement-suite-modal2.js +89 -0
  23. package/dist/components/index.d.ts +26 -0
  24. package/dist/components/index.js +1 -0
  25. package/dist/esm/casino-engagement-suite-modal-container.entry.js +123 -0
  26. package/dist/esm/casino-engagement-suite-modal-container.js +17 -0
  27. package/dist/esm/casino-engagement-suite-modal.entry.js +64 -0
  28. package/dist/esm/index-89c6c4a4.js +1226 -0
  29. package/dist/esm/index.js +1 -0
  30. package/dist/esm/loader.js +17 -0
  31. package/dist/esm/polyfills/core-js.js +11 -0
  32. package/dist/esm/polyfills/css-shim.js +1 -0
  33. package/dist/esm/polyfills/dom.js +79 -0
  34. package/dist/esm/polyfills/es5-html-element.js +1 -0
  35. package/dist/esm/polyfills/index.js +34 -0
  36. package/dist/esm/polyfills/system.js +6 -0
  37. package/dist/index.cjs.js +1 -0
  38. package/dist/index.js +1 -0
  39. package/dist/stencil.config.js +22 -0
  40. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-modal-container/.stencil/packages/casino-engagement-suite-modal-container/stencil.config.d.ts +2 -0
  41. package/dist/types/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.d.ts +35 -0
  42. package/dist/types/components.d.ts +64 -0
  43. package/dist/types/index.d.ts +1 -0
  44. package/dist/types/models/index.d.ts +5 -0
  45. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  46. package/dist/types/utils/locale.utils.d.ts +1 -0
  47. package/dist/types/utils/utils.d.ts +1 -0
  48. package/loader/cdn.js +3 -0
  49. package/loader/index.cjs.js +3 -0
  50. package/loader/index.d.ts +12 -0
  51. package/loader/index.es2017.js +3 -0
  52. package/loader/index.js +4 -0
  53. package/loader/package.json +10 -0
  54. package/package.json +19 -0
@@ -0,0 +1 @@
1
+ import{p as n,b as e}from"./p-b944b831.js";(()=>{const e=import.meta.url,l={};return""!==e&&(l.resourcesUrl=new URL(".",e).href),n(l)})().then((n=>e([["p-0f126ad9",[[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],header:[1],icon:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],limitStylingAppends:[32]}]]],["p-8aa9bb7a",[[1,"casino-engagement-suite-modal-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],limitStylingAppends:[32],openModals:[32],rewards:[32],confirmationData:[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]]]]],n)));
@@ -0,0 +1 @@
1
+ import{r as o,c as t,h as e,g as i}from"./p-b944b831.js";const n=class{constructor(e){o(this,e),this.closeModal=t(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.device="Mobile",this.limitStylingAppends=!1,this.handleCloseClick=()=>{this.closeModal.emit(this.modalType)},this.setClientStyling=()=>{let o=document.createElement("style");o.innerHTML=this.clientStyling,this.host.prepend(o)},this.setClientStylingURL=()=>{let o=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(o.href).then((o=>o.text())).then((o=>{t.innerHTML=o,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((o=>{console.log("Error ",o)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return e("div",{class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device}`},e("div",{class:"ModalContent GradientBorder"},e("div",{class:"IconCloseContainer"},e("button",{class:"IconCloseButton",onClick:this.handleCloseClick},e("img",{src:this.icon,alt:"Сlose modal"}))),this.contentIcon?e("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):"REWARD_MODAL"===this.modalType?e("div",{class:"ModalIcon"}):null,e("div",{class:"ModalHeader"},e("h1",null,this.header)),e("div",{class:"ModalBody"},e("slot",{name:"body"})),e("div",{class:"ModalFooter"},e("slot",{name:"footer"}))))}get host(){return i(this)}};n.style=':host{display:block}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:"Montserrat", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;background-position:center;background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg");margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:"Inter", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}';export{n as casino_engagement_suite_modal}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as o,g as n}from"./p-b944b831.js";const i=["en"],a={en:{joinHeader:"Choose another challenge?",desc:"Any progress on the current challenge will be kept and you can rejoin the challenge at any time.",joinQuestion:"Would you still like to join another challenge?",joinConfirm:"Yes, join another challenge",joinReject:"No, stay at the current challenge",unJoinHeader:"Quit Challenge?",unJoinQuestion:"Would you still like to quit the challenge?",unJoinConfirm:"Yes, I want to quit challenge",unJoinReject:"No, stay at challenge",join:"Unjoin",unJoin:"Unjoin",continue:"Continue",won:"You won",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward"}},s=(t,e)=>{const o=e;return a[void 0!==o&&i.includes(o)?o:"en"][t]},l=class{constructor(o){t(this,o),this.closeModal=e(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewards=[],this.confirmationData=null,this.handleCloseClick=t=>{const e=+t.currentTarget.getAttribute("data-type");this.closeModal.emit(e)},this.handleChallengeAttendance=()=>{window.postMessage({type:"ChallengeAttendance",confirmationData:this.confirmationData})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((t=>{console.log("Error ",t)}))},this.isModalOpen=t=>Boolean(this.openModals.find((e=>e===t)))}openModalHandler(t){const{modalType:e,rewards:o,confirmationData:n}=t.detail;this.openModals=[...this.openModals,e],(null==o?void 0:o.length)&&(this.rewards=[...o]),n&&(this.confirmationData=n)}closeModalHandler(t){this.openModals=this.openModals.filter((e=>e!==t.detail))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){const{prevId:t}=this.confirmationData||{};return o("div",{class:`ModalContainer ${this.device}`},o("casino-engagement-suite-modal",{isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",icon:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",modalType:"REWARD_MODAL",device:this.device},o("div",{slot:"body"},o("p",null,s("won",this.language)," ",o("span",{class:"ModalReward"},this.rewards))),o("div",{slot:"footer"},o("button",{class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},s("continue",this.language)))),o("casino-engagement-suite-modal",{isOpen:this.isModalOpen("TARGET_MODAL"),header:s(t?"joinHeader":"unJoinHeader",this.language),icon:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",modalType:"TARGET_MODAL",device:this.device},o("div",{slot:"body"},o("p",{class:"LeftAlign"},s("desc",this.language)),o("p",{class:"LeftAlign"},s(t?"joinQuestion":"unJoinQuestion",this.language))),o("div",{slot:"footer",class:"ManyActions"},o("button",{class:"ModalFooterButton",onClick:this.handleChallengeAttendance},s(t?"joinConfirm":"unJoinConfirm",this.language)),o("button",{class:"ModalFooterButtonOutlined",onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},o("div",{class:"GradientText"},s(t?"joinReject":"unJoinReject",this.language))))))}get host(){return n(this)}};l.style=':host{display:block}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:140px;height:36px;font-size:14px;font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:"Montserrat", sans-serif;padding:0 16px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;border:2px solid transparent}.GradientText{background-image:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF)}.ModalContainer.Mobile .ModalFooterButton{min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.LeftAlign{text-align:left;line-height:1.2}';export{l as casino_engagement_suite_modal_container}
@@ -0,0 +1 @@
1
+ let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),r=(e,t,n)=>{n&&n.map((([n,l,s])=>{const i=a(e,n),c=u(t,s),r=f(n);o.ael(i,l,c,r),(t.o=t.o||[]).push((()=>o.rel(i,l,c,r)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){J(e)}},a=(e,t)=>16&t?s.body:e,f=e=>0!=(2&e),d=new WeakMap,h=e=>"sc-"+e.h,$={},m=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,s=!1,o=!1,i=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?i[i.length-1].$+=l:i.push(s?p(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const r=p(e,null);return r.m=t,i.length>0&&(r.p=i),r},p=(e,t)=>({t:0,g:e,$:t,S:null,p:null,m:null}),b={},w=(e,t,n,s,i,c)=>{if(n!==s){let r=I(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=S(n),o=S(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)s&&null!=s[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in s)n&&s[t]===n[t]||(t.includes("-")?e.style.setProperty(t,s[t]):e.style[t]=s[t])}else if(r||"o"!==t[0]||"n"!==t[1]){const l=m(s);if((r||l&&null!==s)&&!i)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?r=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||i)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):I(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},g=/\s/,S=e=>e?e.split(g):[],j=(e,t,n,l)=>{const s=11===t.S.nodeType&&t.S.host?t.S.host:t.S,o=e&&e.m||$,i=t.m||$;for(l in o)l in i||w(s,l,o[l],void 0,n,t.t);for(l in i)w(s,l,o[l],i[l],n,t.t)},v=(t,n,l)=>{let o,i,c=n.p[l],r=0;if(null!==c.$)o=c.S=s.createTextNode(c.$);else if(o=c.S=s.createElement(c.g),j(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.p)for(r=0;r<c.p.length;++r)i=v(t,c,r),i&&o.appendChild(i);return o},M=(e,n,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=v(null,l,o),c&&(s[o].S=c,r.insertBefore(c,n)))},k=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.S.remove()},C=(e,t)=>e.g===t.g,O=(e,t)=>{const n=t.S=e.S,l=e.p,s=t.p,o=t.$;null===o?("slot"===t.g||j(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,i=0,c=t.length-1,r=t[0],u=t[c],a=l.length-1,f=l[0],d=l[a];for(;o<=c&&i<=a;)null==r?r=t[++o]:null==u?u=t[--c]:null==f?f=l[++i]:null==d?d=l[--a]:C(r,f)?(O(r,f),r=t[++o],f=l[++i]):C(u,d)?(O(u,d),u=t[--c],d=l[--a]):C(r,d)?(O(r,d),e.insertBefore(r.S,u.S.nextSibling),r=t[++o],d=l[--a]):C(u,f)?(O(u,f),e.insertBefore(u.S,r.S),u=t[--c],f=l[++i]):(s=v(t&&t[i],n,i),f=l[++i],s&&r.S.parentNode.insertBefore(s,r.S));o>c?M(e,null==l[a+1]?null:l[a+1].S,n,l,i,a):i>a&&k(t,o,c)})(n,l,t,s):null!==s?(null!==e.$&&(n.textContent=""),M(n,null,t,s,0,s.length-1)):null!==l&&k(l,0,l.length-1)):e.$!==o&&(n.data=o)},P=e=>z(e).j,x=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},N=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},R=(e,t)=>{if(e.t|=16,!(4&e.t))return N(e,e.M),se((()=>T(e,t)));e.t|=512},T=(e,t)=>{const n=e.i;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>q(n,e,t))),e.u=null)),D(void 0,(()=>A(e,n,t)))},A=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.k,n=e.j,l=t.t,o=((e,t)=>{let n=h(t),l=X.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=d.get(e=e.head||e);o||d.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);L(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>U(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},L=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.k,i=n.C||p(null,null),c=(e=>e&&e.g===b)(l)?l:y(null,null,l);t=s.tagName,o.O&&(c.m=c.m||{},o.O.map((([e,t])=>c.m[t]=s[e]))),c.g=null,c.t|=4,n.C=c,c.S=i.S=s.shadowRoot||s,e=s["s-sc"],O(i,c)})(n,l)}catch(e){J(e,n.j)}return null},U=e=>{const t=e.j,n=e.M;q(e.i,"componentDidRender"),64&e.t||(e.t|=64,F(t),e.P(t),n||W()),e.v&&(e.v(),e.v=void 0),512&e.t&&le((()=>R(e,!1))),e.t&=-517},W=()=>{F(s.documentElement),le((()=>E(l,"appload",{detail:{namespace:"casino-engagement-suite-modal-container"}})))},q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){J(e)}},D=(e,t)=>e&&e.then?e.then(t):t(),F=e=>e.classList.add("hydrated"),H=(e,t,n)=>{if(t.N){const l=Object.entries(t.N),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>z(this).R.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=z(e),o=s.R.get(t),i=s.t,c=s.i;n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.N[t][0]),8&i&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.R.set(t,n),c&&2==(18&i)&&R(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.O.push([e,s]),s}))}}return e},V=(e,t={})=>{const n=[],i=t.exclude||[],u=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let m,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],h:t[1],N:t[2],T:t[3]};l.N=t[2],l.T=t[3],l.O=[];const s=l.h,a=class extends HTMLElement{constructor(e){super(e),G(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){m&&(clearTimeout(m),m=null),y?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=z(e),n=t.k,l=()=>{};if(1&t.t)r(e,t,n.T);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){N(t,t.M=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(H(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){J(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=h(n);if(!X.has(t)){const l=()=>{};((e,t,n)=>{let l=X.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,X.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>R(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{if(0==(1&o.t)){const e=z(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return z(this).A}};l.L=e[0],i.includes(s)||u.get(s)||(n.push(s),u.define(s,H(a,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),a.insertBefore(d,f?f.nextSibling:a.firstChild),y=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>m=setTimeout(W,30)))},_=new WeakMap,z=e=>_.get(e),B=(e,t)=>_.set(t.i=e,t),G=(e,t)=>{const n={t:0,j:e,k:t,R:new Map};return n.A=new Promise((e=>n.P=e)),e["s-p"]=[],e["s-rc"]=[],r(e,n,t.T),_.set(e,n)},I=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),K=new Map,Q=e=>{const t=e.h.replace(/-/g,"_"),n=e.L,l=K.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(K.set(n,e),e[t])),J)},X=new Map,Y=[],Z=[],ee=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?le(ne):o.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){J(e)}e.length=0},ne=()=>{te(Y),te(Z),(n=Y.length>0)&&o.raf(ne)},le=e=>i().then(e),se=ee(Z,!0);export{V as b,x as c,P as g,y as h,i as p,B as r}
@@ -0,0 +1,127 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-2394967b.js');
6
+
7
+ const DEFAULT_LANGUAGE = 'en';
8
+ const SUPPORTED_LANGUAGES = ['en'];
9
+ const TRANSLATIONS = {
10
+ en: {
11
+ joinHeader: 'Choose another challenge?',
12
+ desc: 'Any progress on the current challenge will be kept and you can rejoin the challenge at any time.',
13
+ joinQuestion: 'Would you still like to join another challenge?',
14
+ joinConfirm: 'Yes, join another challenge',
15
+ joinReject: 'No, stay at the current challenge',
16
+ unJoinHeader: 'Quit Challenge?',
17
+ unJoinQuestion: 'Would you still like to quit the challenge?',
18
+ unJoinConfirm: 'Yes, I want to quit challenge',
19
+ unJoinReject: 'No, stay at challenge',
20
+ join: 'Unjoin',
21
+ unJoin: 'Unjoin',
22
+ continue: 'Continue',
23
+ won: 'You won',
24
+ noChallenges: 'No Challenges yet',
25
+ tryOtherGames: 'Try winning Challenges as rewards or launching other booster games',
26
+ tooltip: 'Competition where your real money bets contribute towards the level progress to achieve the level reward'
27
+ }
28
+ };
29
+ const translate = (key, customLang) => {
30
+ const lang = customLang;
31
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
32
+ };
33
+
34
+ const casinoEngagementSuiteModalContainerCss = ":host{display:block}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:140px;height:36px;font-size:14px;font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:\"Montserrat\", sans-serif;padding:0 16px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;border:2px solid transparent}.GradientText{background-image:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF)}.ModalContainer.Mobile .ModalFooterButton{min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.LeftAlign{text-align:left;line-height:1.2}";
35
+
36
+ const CasinoEngagementSuiteModalContainer = class {
37
+ constructor(hostRef) {
38
+ index.registerInstance(this, hostRef);
39
+ this.closeModal = index.createEvent(this, "closeModal", 7);
40
+ /**
41
+ * Client custom styling via string
42
+ */
43
+ this.clientStyling = '';
44
+ /**
45
+ * Client custom styling via url
46
+ */
47
+ this.clientStylingUrl = '';
48
+ /**
49
+ * Language of the widget
50
+ */
51
+ this.language = 'en';
52
+ this.device = 'Mobile';
53
+ this.limitStylingAppends = false;
54
+ this.openModals = [];
55
+ this.rewards = [];
56
+ this.confirmationData = null;
57
+ this.handleCloseClick = (e) => {
58
+ const type = +e.currentTarget.getAttribute('data-type');
59
+ this.closeModal.emit(type);
60
+ };
61
+ this.handleChallengeAttendance = () => {
62
+ window.postMessage({
63
+ type: 'ChallengeAttendance',
64
+ confirmationData: this.confirmationData,
65
+ });
66
+ };
67
+ this.setClientStyling = () => {
68
+ let sheet = document.createElement('style');
69
+ sheet.innerHTML = this.clientStyling;
70
+ this.host.prepend(sheet);
71
+ };
72
+ this.setClientStylingURL = () => {
73
+ let url = new URL(this.clientStylingUrl);
74
+ let cssFile = document.createElement('style');
75
+ fetch(url.href)
76
+ .then((res) => res.text())
77
+ .then((data) => {
78
+ cssFile.innerHTML = data;
79
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
80
+ })
81
+ .catch((err) => {
82
+ console.log('Error ', err);
83
+ });
84
+ };
85
+ this.isModalOpen = (type) => {
86
+ return Boolean(this.openModals.find(el => el === type));
87
+ };
88
+ }
89
+ openModalHandler(event) {
90
+ const { modalType, rewards, confirmationData } = event.detail;
91
+ this.openModals = [...this.openModals, modalType];
92
+ if (rewards === null || rewards === void 0 ? void 0 : rewards.length) {
93
+ this.rewards = [...rewards];
94
+ }
95
+ if (confirmationData) {
96
+ this.confirmationData = confirmationData;
97
+ }
98
+ }
99
+ closeModalHandler(event) {
100
+ this.openModals = this.openModals.filter(el => el !== event.detail);
101
+ }
102
+ componentDidRender() {
103
+ if (!this.limitStylingAppends && this.host) {
104
+ if (this.clientStyling)
105
+ this.setClientStyling();
106
+ if (this.clientStylingUrl)
107
+ this.setClientStylingURL();
108
+ this.limitStylingAppends = true;
109
+ }
110
+ }
111
+ render() {
112
+ const { prevId } = this.confirmationData || {};
113
+ return (index.h("div", { class: `ModalContainer ${this.device}` }, index.h("casino-engagement-suite-modal", { isOpen: this.isModalOpen("REWARD_MODAL"), header: "Congratulations!", icon: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg", modalType: "REWARD_MODAL", device: this.device }, index.h("div", { slot: "body" }, index.h("p", null, translate('won', this.language), " ", index.h("span", { class: 'ModalReward' }, this.rewards))), index.h("div", { slot: "footer" }, index.h("button", { class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'REWARD_MODAL' }, translate('continue', this.language)))), index.h("casino-engagement-suite-modal", { isOpen: this.isModalOpen("TARGET_MODAL"), header: prevId ?
114
+ translate('joinHeader', this.language) :
115
+ translate('unJoinHeader', this.language), icon: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", modalType: "TARGET_MODAL", device: this.device }, index.h("div", { slot: "body" }, index.h("p", { class: 'LeftAlign' }, translate('desc', this.language)), index.h("p", { class: 'LeftAlign' }, prevId ?
116
+ translate('joinQuestion', this.language) :
117
+ translate('unJoinQuestion', this.language))), index.h("div", { slot: "footer", class: 'ManyActions' }, index.h("button", { class: 'ModalFooterButton', onClick: this.handleChallengeAttendance }, prevId ?
118
+ translate('joinConfirm', this.language) :
119
+ translate('unJoinConfirm', this.language)), index.h("button", { class: 'ModalFooterButtonOutlined', onClick: this.handleCloseClick, "data-type": 'TARGET_MODAL' }, index.h("div", { class: 'GradientText' }, prevId ?
120
+ translate('joinReject', this.language) :
121
+ translate('unJoinReject', this.language)))))));
122
+ }
123
+ get host() { return index.getElement(this); }
124
+ };
125
+ CasinoEngagementSuiteModalContainer.style = casinoEngagementSuiteModalContainerCss;
126
+
127
+ exports.casino_engagement_suite_modal_container = CasinoEngagementSuiteModalContainer;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-2394967b.js');
4
+
5
+ /*
6
+ Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ const patchBrowser = () => {
9
+ const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('casino-engagement-suite-modal-container.cjs.js', document.baseURI).href));
10
+ const opts = {};
11
+ if (importMeta !== '') {
12
+ opts.resourcesUrl = new URL('.', importMeta).href;
13
+ }
14
+ return index.promiseResolve(opts);
15
+ };
16
+
17
+ patchBrowser().then(options => {
18
+ return index.bootstrapLazy([["casino-engagement-suite-modal.cjs",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"header":[1],"icon":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"limitStylingAppends":[32]}]]],["casino-engagement-suite-modal-container.cjs",[[1,"casino-engagement-suite-modal-container",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"limitStylingAppends":[32],"openModals":[32],"rewards":[32],"confirmationData":[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]]]]], options);
19
+ });
@@ -0,0 +1,68 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-2394967b.js');
6
+
7
+ const MODAL_TYPES = {
8
+ REWARD_MODAL: 'REWARD_MODAL',
9
+ TARGET_MODAL: 'TARGET_MODAL'
10
+ };
11
+
12
+ const casinoEngagementSuiteModalCss = ":host{display:block}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;background-position:center;background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg\");margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}";
13
+
14
+ const CasinoEngagementSuiteModal = class {
15
+ constructor(hostRef) {
16
+ index.registerInstance(this, hostRef);
17
+ this.closeModal = index.createEvent(this, "closeModal", 7);
18
+ /**
19
+ * Client custom styling via string
20
+ */
21
+ this.clientStyling = '';
22
+ /**
23
+ * Client custom styling via url
24
+ */
25
+ this.clientStylingUrl = '';
26
+ this.device = 'Mobile';
27
+ this.limitStylingAppends = false;
28
+ this.handleCloseClick = () => {
29
+ this.closeModal.emit(this.modalType);
30
+ };
31
+ this.setClientStyling = () => {
32
+ let sheet = document.createElement('style');
33
+ sheet.innerHTML = this.clientStyling;
34
+ this.host.prepend(sheet);
35
+ };
36
+ this.setClientStylingURL = () => {
37
+ let url = new URL(this.clientStylingUrl);
38
+ let cssFile = document.createElement('style');
39
+ fetch(url.href)
40
+ .then((res) => res.text())
41
+ .then((data) => {
42
+ cssFile.innerHTML = data;
43
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
44
+ })
45
+ .catch((err) => {
46
+ console.log('Error ', err);
47
+ });
48
+ };
49
+ }
50
+ componentDidRender() {
51
+ if (!this.limitStylingAppends && this.host) {
52
+ if (this.clientStyling)
53
+ this.setClientStyling();
54
+ if (this.clientStylingUrl)
55
+ this.setClientStylingURL();
56
+ this.limitStylingAppends = true;
57
+ }
58
+ }
59
+ render() {
60
+ return (index.h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device}` }, index.h("div", { class: "ModalContent GradientBorder" }, index.h("div", { class: 'IconCloseContainer' }, index.h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, index.h("img", { src: this.icon, alt: "\u0421lose modal" }))), this.contentIcon ? (index.h("div", { class: "ModalIcon", style: {
61
+ background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
62
+ } })) : this.modalType === MODAL_TYPES.REWARD_MODAL ? (index.h("div", { class: "ModalIcon" })) : null, index.h("div", { class: "ModalHeader" }, index.h("h1", null, this.header)), index.h("div", { class: "ModalBody" }, index.h("slot", { name: "body" })), index.h("div", { class: "ModalFooter" }, index.h("slot", { name: "footer" })))));
63
+ }
64
+ get host() { return index.getElement(this); }
65
+ };
66
+ CasinoEngagementSuiteModal.style = casinoEngagementSuiteModalCss;
67
+
68
+ exports.casino_engagement_suite_modal = CasinoEngagementSuiteModal;