@everymatrix/casino-engagement-suite-jackpots-list 1.43.4 → 1.45.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 (51) hide show
  1. package/dist/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.esm.js +1 -1
  2. package/dist/casino-engagement-suite-jackpots-list/p-d1d09602.js +2 -0
  3. package/dist/casino-engagement-suite-jackpots-list/p-dd59b3d3.entry.js +1 -0
  4. package/dist/casino-engagement-suite-jackpots-list/p-e1255160.js +1 -0
  5. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  6. package/dist/cjs/casino-engagement-suite-jackpots-list.cjs.entry.js +185 -198
  7. package/dist/cjs/casino-engagement-suite-jackpots-list.cjs.js +17 -11
  8. package/dist/cjs/index-d6d19ec7.js +1221 -0
  9. package/dist/cjs/loader.cjs.js +7 -13
  10. package/dist/collection/collection-manifest.json +3 -3
  11. package/dist/collection/components/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.css +62 -60
  12. package/dist/collection/components/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.js +314 -355
  13. package/dist/collection/components/casino-engagement-suite-jackpots-list/index.js +1 -0
  14. package/dist/collection/utils/locale.utils.js +21 -21
  15. package/dist/collection/utils/utils.js +3 -3
  16. package/dist/esm/app-globals-0f993ce5.js +3 -0
  17. package/dist/esm/casino-engagement-suite-jackpots-list.entry.js +185 -198
  18. package/dist/esm/casino-engagement-suite-jackpots-list.js +14 -11
  19. package/dist/esm/index-b84e2464.js +1193 -0
  20. package/dist/esm/loader.js +7 -13
  21. package/dist/stencil.config.dev.js +17 -0
  22. package/dist/stencil.config.js +14 -19
  23. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpots-list/.stencil/packages/stencil/casino-engagement-suite-jackpots-list/stencil.config.d.ts +2 -0
  24. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpots-list/.stencil/packages/stencil/casino-engagement-suite-jackpots-list/stencil.config.dev.d.ts +2 -0
  25. package/dist/types/components/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.d.ts +52 -52
  26. package/dist/types/components/casino-engagement-suite-jackpots-list/index.d.ts +1 -0
  27. package/dist/types/components.d.ts +17 -1
  28. package/dist/types/models/jackpot.d.ts +32 -32
  29. package/dist/types/stencil-public-runtime.d.ts +142 -33
  30. package/loader/cdn.js +1 -3
  31. package/loader/index.cjs.js +1 -3
  32. package/loader/index.d.ts +13 -1
  33. package/loader/index.es2017.js +1 -3
  34. package/loader/index.js +1 -3
  35. package/loader/package.json +1 -0
  36. package/package.json +9 -2
  37. package/dist/casino-engagement-suite-jackpots-list/p-d22cb483.js +0 -1
  38. package/dist/casino-engagement-suite-jackpots-list/p-e00a160c.entry.js +0 -1
  39. package/dist/cjs/index-45de0ae1.js +0 -1242
  40. package/dist/components/casino-engagement-suite-jackpots-list.d.ts +0 -11
  41. package/dist/components/casino-engagement-suite-jackpots-list.js +0 -340
  42. package/dist/components/index.d.ts +0 -26
  43. package/dist/components/index.js +0 -1
  44. package/dist/esm/index-3e26d96a.js +0 -1215
  45. package/dist/esm/polyfills/core-js.js +0 -11
  46. package/dist/esm/polyfills/css-shim.js +0 -1
  47. package/dist/esm/polyfills/dom.js +0 -79
  48. package/dist/esm/polyfills/es5-html-element.js +0 -1
  49. package/dist/esm/polyfills/index.js +0 -34
  50. package/dist/esm/polyfills/system.js +0 -6
  51. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-jackpots-list/.stencil/packages/casino-engagement-suite-jackpots-list/stencil.config.d.ts +0 -2
@@ -1 +1 @@
1
- import{p as t,b as e}from"./p-d22cb483.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),t(i)})().then((t=>e([["p-e00a160c",[[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]}]]]],t)));
1
+ import{p as t,b as e}from"./p-d1d09602.js";export{s as setNonce}from"./p-d1d09602.js";import{g as n}from"./p-e1255160.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),t(s)})().then((async t=>(await n(),e([["p-dd59b3d3",[[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]},null,{jackpots:["jackpotsPropHandler"]}]]]],t))));
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,p=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(p),b(y),(m=p.length>0)&&f.raf(w)},v=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>E,unwrap:()=>x,unwrapErr:()=>P});var E=e=>({isOk:!0,isErr:!1,value:e}),O=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=>E(e))):E(n)}if(e.isErr)return O(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,i.length>0&&(u.h=i),u.m=o,u},A=(e,t)=>({l:0,p:e,i:t,$:null,h:null,u:null,m:null}),T={},D=e=>n(e).$hostElement$,H=(e,t,n)=>{const l=D(e);return{emit:e=>L(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},L=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},N=new WeakMap,U=e=>"sc-"+e.v,W=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},F=/\s/,q=e=>e?e.split(F):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of z(Object.keys(o)))e in s||W(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))W(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.p),_(null,l,B),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=I(e,l,r),s&&o.appendChild(s);return o["s-hn"]=M,o},J=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=I(null,n,o),r&&(l[o].$=r,Y(i,r,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;e&&e.remove()}}},Q=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),X=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(_(e,t,B),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],m=l.length-1,p=l[0],y=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(Q(h,p,o))X(h,p,o),h=t[++i],p=l[++c];else if(Q(d,y,o))X(d,y,o),d=t[--f],y=l[--m];else if(Q(h,y,o))X(h,y,o),Y(e,h.$,d.$.nextSibling),h=t[++i],y=l[--m];else if(Q(d,p,o))X(d,p,o),Y(e,d.$,h.$),d=t[--f],p=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===p.m){u=a;break}u>=0?(r=t[u],r.p!==p.p?s=I(t&&t[c],n,u):(X(r,p,o),t[u]=void 0,s=r.$),p=l[++c]):(s=I(t&&t[c],n,c),p=l[++c]),s&&Y(h.$.parentNode,s,h.$)}i>f?J(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&K(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),J(l,null,t,s,0,s.length-1)):!n&&null!==o&&K(o,0,o.length-1)):e.i!==r&&(l.data=r)},Y=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Z=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ee=(e,t)=>{if(e.l|=16,!(4&e.l))return Z(e,e.j),g((()=>te(e,t)));e.l|=512},te=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ce(n,"componentWillLoad")),ne(l,(()=>oe(e,n,t)))},ne=(e,t)=>le(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),le=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,oe=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=U(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=N.get(e=e.head||e);if(r||N.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=f.O)?n:k(a);null!=l&&s.setAttribute("nonce",l),(!(1&t.l)||1&t.l&&"HEAD"!==e.nodeName)&&e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);se(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>re(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},se=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||A(null,null),r=(e=>e&&e.p===T)(t)?t:R(null,null,t);if(M=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.p=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,X(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},re=e=>{const t=e.$hostElement$,n=e.j;ce(e.t,"componentDidRender"),64&e.l||(e.l|=64,ue(t),e.P(t),n||ie()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>ee(e,!1))),e.l&=-517},ie=()=>{ue(a.documentElement),v((()=>L(u,"appload",{detail:{namespace:"casino-engagement-suite-jackpots-list"}})))},ce=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,l)=>{var o,r;const i=e.prototype;if(t.R||t.A||e.watchers){e.watchers&&!t.A&&(t.A=e.watchers);const c=Object.entries(null!=(o=t.R)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:1&t?e+"":e)(l,o.R[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.A&&128&u){const e=o.A[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&ee(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.A)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.A)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},fe=e=>{ce(e,"disconnectedCallback")},he=(e,l={})=>{var o;const h=[],m=l.exclude||[],p=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],R:l[2],D:l[3]};4&c.l&&(S=!0),c.R=l[2],c.M=[],c.A=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,T:new Map};l.H=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.H)&&t.H.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(t,t.j=n);break}}l.R&&Object.entries(l.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.L){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.L;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.N}" was not found`);l.isProxied||(n.A=l.watchers,ae(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=U(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>ee(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?fe(e.t):(null==e?void 0:e.H)&&e.H.then((()=>fe(e.t)))}})()))}componentOnReady(){return n(this).H}};c.L=e[0],m.includes(u)||p.get(u)||(h.push(u),p.define(u,ae(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ie,30)))},de=e=>f.O=e;export{he as b,H as c,D as g,R as h,h as p,l as r,de as s}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as o,g as i}from"./p-d1d09602.js";function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function s(t){n(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t,e){n(2,arguments);var o=s(t),i=s(e);return o.getTime()<i.getTime()}const r=["en"],c={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",tooltip:"A payout that increases each time the game is played but the jackpot is not won",mega:"Mega",major:"Major",minor:"Minor",Suspended:"Suspended Jackpot",Closed:"Closed Jackpot",allJackpotsClosed:"Unfortunately, there are no available jackpots to join. Please, try again later.",jackpotIsWon:"Jackpot is won!",termsAndConditions:"Terms and Conditions",winningProbability:"Winning Probability",type:"Type",operatorContribution:"Operator Contribution",outdatedJackpotCountdown:"We are going to remove this Jackpot in 30 days",contributionTooltip:"A % of the bet that will be contributed by the casino to the jackpot amount."}},l=(t,e)=>{const o=e;return c[void 0!==o&&r.includes(o)?o:"en"][t]},d=class{constructor(o){t(this,o),this.close=e(this,"close",7),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.handleCloseClick=()=>{this.close.emit(),this.tooltip=null},this.toggleTooltip=t=>{t.stopPropagation(),this.tooltip=this.tooltip?null:l(t.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=t=>{t.stopPropagation()},this.handleJackpotClick=t=>{const e=+t.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:e})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.jackpotChangeStatusRequest=void 0,this.tooltip=null,this.timers={},this.limitStylingAppends=!1}jackpotsPropHandler(t){!this.interval&&t.length&&this.startCountdown(),this.interval&&!t.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const t=(new Date).getTime();this.timers=this.jackpots.reduce(((e,o)=>{const i=new Date(o.JackpotEndTime).getTime()-t;let a="00h:00m:00s";const{days:n,hours:s,minutes:p,seconds:r}={days:String(Math.floor(i/864e5)).padStart(2,"0"),hours:String(Math.floor(i%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(i%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(i%6e4/1e3)).padStart(2,"0")};return a="00"===n?`${s}h:${p}m:${r}s`:`${n}d:${s}h:${p}m`,Object.assign(Object.assign({},e),{[o.JackpotId]:a})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(t){return{JackpotCard:!0,JackpotCardClosed:t.IsClosed||p(new Date(t.JackpotEndTime),new Date),InProgress:t.Enabled&&!t.IsClosed}}getJackpotHeaderTemplate(t){const e=!!t.WinBalance,i=l(t.Type,this.language),a=l(t.Reason,this.language),n=(null==t?void 0:t.IsClosed)?a:i,s=`JackpotBalance Jackpot${l(t.Type,this.language)}`,r=t.Enabled?"EngagementSuiteButton Active":"EngagementSuiteButton",c=l(t.Enabled?"unjoin":"join",this.language),d=t.Pending||(null==t?void 0:t.IsClosed)||p(new Date(t.JackpotEndTime),new Date);return o("div",{class:"JackpotCardHeader"},o("div",{class:"JackpotTitle"},o("span",{class:"JackpotName"},n),o("span",{class:s},function(t,e,o=99999999){return t=Math.min(t,o),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}(t.Balance,t.Currency))),o("div",{class:"JackpotActions"},o("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":t.JackpotId,disabled:d},c)),e&&o("span",{class:"JackpotWon"},l("jackpotIsWon",this.language)))}getJackpotDescriptionTemplate(t){const e=+t.OperatorContributionPercent+"%",i=`1:${t.Probability}`,a=p(new Date(t.JackpotEndTime),new Date)?l("outdatedJackpotCountdown",this.language):this.timers[t.JackpotId],n=l("operatorContribution",this.language),s=l("type",this.language),r=l("winningProbability",this.language);return o("div",{class:"JackpotCardDescription"},!t.IsClosed&&o("span",{class:"JackpotCountdown"},a),o("div",{class:"JackpotCardDescriptionBlock"},o("div",{class:"JackpotCardDescriptionRow"},o("span",null,n,":"),o("span",{class:"JackpotDescriptionValue"},e,o("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,i),this.renderDescriptionRowInfo(`${s}:`,t.JackpotTypePresentation),o("a",{href:t.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},l("termsAndConditions",this.language))))}renderDescriptionRowInfo(t,e){return o("div",{class:"JackpotCardDescriptionRow"},o("span",null,t),o("span",{class:"JackpotDescriptionValue"},e))}getJackpotTemplate(t){return o("div",{class:this.getJackpotClasses(t),onClick:this.handleJackpotClick,key:t.JackpotId,"data-id":t.JackpotId},this.getJackpotHeaderTemplate(t),this.getJackpotDescriptionTemplate(t))}getHeaderTemplate(){return o("header",{class:"JackpotsListPopupHeader"},o("button",{onClick:this.toggleTooltip,"data-tooltip":"tooltip",class:"EngagementSuiteIconButton Help"}),o("div",{class:"JackpotsListPopupHeaderName"},l("jackpots",this.language)),o("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){const t=this.jackpots.every((t=>t.IsClosed));return this.jackpots.length?o("div",{class:"JackpotsListWrapper"},t&&o("div",{class:"JackpotsListClosed"},o("h2",null,l("allJackpotsClosed",this.language))),o("div",{class:"JackpotsList"},this.jackpots.map((t=>this.getJackpotTemplate(t))))):o("div",{class:"JackpotsListClosed"},o("h2",null,l("allJackpotsClosed",this.language)))}getTooltipTemplate(){return o("div",{class:"EngagementSuiteTooltipBackdrop"},o("div",{class:"EngagementSuiteTooltip"},o("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return o("div",{key:"9fd4d384af0ee639e14925c797fe28bc71beb586",class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return i(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};d.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.JackpotsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.JackpotCard.InProgress::before{content:"";position:absolute;pointer-events:none;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-x-small, 12px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));position:absolute;right:0;bottom:-6px}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px;position:relative}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.JackpotMega{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%))}.JackpotMajor{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%))}.JackpotMinor{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%))}.JackpotBalance,.JackpotWon{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-bold, 700);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium-plus, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:var(--emw--font-weight-semibold, 600);margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{border-radius:99px}.EngagementSuiteButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);font-weight:var(--emw--font-weight-normal, 400)}.JackpotCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-bottom:12px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Mobile .JackpotCardDescriptionRow:nth-child(3){flex-basis:50%}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotsListPopup.Tablet .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotsListPopup.Tablet .EngagementSuiteButton,.JackpotsListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large-plus, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotsListPopup.Tablet .EngagementSuiteTooltip,.JackpotsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}';export{d as casino_engagement_suite_jackpots_list}
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-45de0ae1.js');
5
+ const index = require('./index-d6d19ec7.js');
6
6
 
7
7
  function _typeof(o) {
8
8
  "@babel/helpers - typeof";
@@ -99,218 +99,205 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
99
99
  const DEFAULT_LANGUAGE = 'en';
100
100
  const SUPPORTED_LANGUAGES = ['en'];
101
101
  const TRANSLATIONS = {
102
- en: {
103
- jackpots: 'Jackpots',
104
- join: 'Join',
105
- unjoin: 'Unjoin',
106
- tooltip: 'A payout that increases each time the game is played but the jackpot is not won',
107
- mega: 'Mega',
108
- major: 'Major',
109
- minor: 'Minor',
110
- Suspended: 'Suspended Jackpot',
111
- Closed: 'Closed Jackpot',
112
- allJackpotsClosed: 'Unfortunately, there are no available jackpots to join. Please, try again later.',
113
- jackpotIsWon: 'Jackpot is won!',
114
- termsAndConditions: 'Terms and Conditions',
115
- winningProbability: 'Winning Probability',
116
- type: 'Type',
117
- operatorContribution: 'Operator Contribution',
118
- outdatedJackpotCountdown: 'We are going to remove this Jackpot in 30 days',
119
- contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
120
- }
102
+ en: {
103
+ jackpots: 'Jackpots',
104
+ join: 'Join',
105
+ unjoin: 'Unjoin',
106
+ tooltip: 'A payout that increases each time the game is played but the jackpot is not won',
107
+ mega: 'Mega',
108
+ major: 'Major',
109
+ minor: 'Minor',
110
+ Suspended: 'Suspended Jackpot',
111
+ Closed: 'Closed Jackpot',
112
+ allJackpotsClosed: 'Unfortunately, there are no available jackpots to join. Please, try again later.',
113
+ jackpotIsWon: 'Jackpot is won!',
114
+ termsAndConditions: 'Terms and Conditions',
115
+ winningProbability: 'Winning Probability',
116
+ type: 'Type',
117
+ operatorContribution: 'Operator Contribution',
118
+ outdatedJackpotCountdown: 'We are going to remove this Jackpot in 30 days',
119
+ contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
120
+ }
121
121
  };
122
122
  const translate = (key, customLang) => {
123
- const lang = customLang;
124
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
123
+ const lang = customLang;
124
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
125
125
  };
126
126
 
127
127
  function formatBalance(amount, currency, maxAmount = 99999999) {
128
- amount = Math.min(amount, maxAmount);
129
- return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
130
- .format(amount)}`;
128
+ amount = Math.min(amount, maxAmount);
129
+ return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
130
+ .format(amount)}`;
131
131
  }
132
132
 
133
- const casinoEngagementSuiteJackpotsListCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsIconButton img{width:100%;height:100%}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px);position:absolute;right:0;bottom:-6px}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px;position:relative}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:\"Montserrat\", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotJoinButton{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:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.JackpotJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Mobile .JackpotCardDescriptionRow:nth-child(3){flex-basis:50%}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .JackpotsTooltipBackdrop,.JackpotsListPopup.Desktop .JackpotsTooltipBackdrop{padding:90px 75px 0}.JackpotsListPopup.Tablet .JackpotsTooltip,.JackpotsListPopup.Desktop .JackpotsTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotsTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}";
133
+ const casinoEngagementSuiteJackpotsListCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.JackpotsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-x-small, 12px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));position:absolute;right:0;bottom:-6px}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px;position:relative}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.JackpotMega{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%))}.JackpotMajor{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%))}.JackpotMinor{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%))}.JackpotBalance,.JackpotWon{font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-weight:var(--emw--font-weight-bold, 700);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium-plus, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:var(--emw--font-weight-semibold, 600);margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{border-radius:99px}.EngagementSuiteButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);font-weight:var(--emw--font-weight-normal, 400)}.JackpotCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-bottom:12px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Mobile .JackpotCardDescriptionRow:nth-child(3){flex-basis:50%}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotsListPopup.Tablet .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotsListPopup.Tablet .EngagementSuiteButton,.JackpotsListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large-plus, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotsListPopup.Tablet .EngagementSuiteTooltip,.JackpotsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}";
134
+ const CasinoEngagementSuiteJackpotsListStyle0 = casinoEngagementSuiteJackpotsListCss;
134
135
 
135
136
  const CasinoEngagementSuiteJackpotsList = class {
136
- constructor(hostRef) {
137
- index.registerInstance(this, hostRef);
138
- this.close = index.createEvent(this, "close", 7);
139
- /**
140
- * Client custom styling via string
141
- */
142
- this.clientStyling = '';
143
- /**
144
- * Client custom styling via url
145
- */
146
- this.clientStylingUrl = '';
147
- /**
148
- * Language of the widget
149
- */
150
- this.language = 'en';
151
- /**
152
- * User's device type
153
- */
154
- this.device = 'Mobile';
155
- /**
156
- * List of jackpots
157
- */
158
- this.jackpots = [];
159
- this.tooltip = null;
160
- this.timers = {};
161
- this.limitStylingAppends = false;
162
- this.setClientStyling = () => {
163
- let sheet = document.createElement('style');
164
- sheet.innerHTML = this.clientStyling;
165
- this.host.prepend(sheet);
166
- };
167
- this.setClientStylingURL = () => {
168
- let url = new URL(this.clientStylingUrl);
169
- let cssFile = document.createElement('style');
170
- fetch(url.href)
171
- .then((res) => res.text())
172
- .then((data) => {
173
- cssFile.innerHTML = data;
174
- setTimeout(() => {
175
- this.host.prepend(cssFile);
176
- }, 1);
177
- })
178
- .catch((err) => {
179
- console.log('Error ', err);
180
- });
181
- };
182
- this.handleCloseClick = () => {
183
- this.close.emit();
184
- this.tooltip = null;
185
- };
186
- this.toggleTooltip = (ev) => {
187
- ev.stopPropagation();
188
- if (this.tooltip) {
137
+ constructor(hostRef) {
138
+ index.registerInstance(this, hostRef);
139
+ this.close = index.createEvent(this, "close", 7);
140
+ this.setClientStyling = () => {
141
+ let sheet = document.createElement('style');
142
+ sheet.innerHTML = this.clientStyling;
143
+ this.host.prepend(sheet);
144
+ };
145
+ this.setClientStylingURL = () => {
146
+ let url = new URL(this.clientStylingUrl);
147
+ let cssFile = document.createElement('style');
148
+ fetch(url.href)
149
+ .then((res) => res.text())
150
+ .then((data) => {
151
+ cssFile.innerHTML = data;
152
+ setTimeout(() => {
153
+ this.host.prepend(cssFile);
154
+ }, 1);
155
+ })
156
+ .catch((err) => {
157
+ console.log('Error ', err);
158
+ });
159
+ };
160
+ this.handleCloseClick = () => {
161
+ this.close.emit();
162
+ this.tooltip = null;
163
+ };
164
+ this.toggleTooltip = (ev) => {
165
+ ev.stopPropagation();
166
+ if (this.tooltip) {
167
+ this.tooltip = null;
168
+ }
169
+ else {
170
+ const el = ev.currentTarget;
171
+ this.tooltip = translate(el.getAttribute('data-tooltip'), this.language);
172
+ }
173
+ };
174
+ this.stopPropagation = (ev) => {
175
+ ev.stopPropagation();
176
+ };
177
+ this.handleJackpotClick = (ev) => {
178
+ const id = +ev.currentTarget.getAttribute('data-id');
179
+ window.postMessage({ type: 'JackpotClick', id });
180
+ };
181
+ this.clientStyling = '';
182
+ this.clientStylingUrl = '';
183
+ this.language = 'en';
184
+ this.device = 'Mobile';
185
+ this.jackpots = [];
186
+ this.jackpotChangeStatusRequest = undefined;
189
187
  this.tooltip = null;
190
- }
191
- else {
192
- const el = ev.currentTarget;
193
- this.tooltip = translate(el.getAttribute('data-tooltip'), this.language);
194
- }
195
- };
196
- this.stopPropagation = (ev) => {
197
- ev.stopPropagation();
198
- };
199
- this.handleJackpotClick = (ev) => {
200
- const id = +ev.currentTarget.getAttribute('data-id');
201
- window.postMessage({ type: 'JackpotClick', id });
202
- };
203
- }
204
- jackpotsPropHandler(value) {
205
- if (!this.interval && value.length) {
206
- this.startCountdown();
188
+ this.timers = {};
189
+ this.limitStylingAppends = false;
207
190
  }
208
- if (this.interval && !value.length) {
209
- clearInterval(this.interval);
191
+ jackpotsPropHandler(value) {
192
+ if (!this.interval && value.length) {
193
+ this.startCountdown();
194
+ }
195
+ if (this.interval && !value.length) {
196
+ clearInterval(this.interval);
197
+ }
210
198
  }
211
- }
212
- componentWillLoad() {
213
- this.jackpotsPropHandler(this.jackpots);
214
- }
215
- startCountdown() {
216
- this.updateTimers();
217
- this.interval = setInterval(() => {
218
- this.updateTimers();
219
- }, 1000);
220
- }
221
- updateTimers() {
222
- const now = new Date().getTime();
223
- this.timers = this.jackpots.reduce((acc, jackpot) => {
224
- const expirationDate = new Date(jackpot.JackpotEndTime).getTime();
225
- const diff = expirationDate - now;
226
- let countdown = '00h:00m:00s';
227
- const { days, hours, minutes, seconds } = {
228
- days: String(Math.floor(diff / (1000 * 60 * 60 * 24))).padStart(2, '0'),
229
- hours: String(Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
230
- minutes: String(Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
231
- seconds: String(Math.floor((diff % (1000 * 60)) / 1000)).padStart(2, '0'),
232
- };
233
- countdown =
234
- days === '00'
235
- ? `${hours}h:${minutes}m:${seconds}s`
236
- : `${days}d:${hours}h:${minutes}m`;
237
- return Object.assign(Object.assign({}, acc), { [jackpot.JackpotId]: countdown });
238
- }, {});
239
- }
240
- componentDidRender() {
241
- if (!this.limitStylingAppends && this.host) {
242
- if (this.clientStyling)
243
- this.setClientStyling();
244
- if (this.clientStylingUrl)
245
- this.setClientStylingURL();
246
- this.limitStylingAppends = true;
199
+ componentWillLoad() {
200
+ this.jackpotsPropHandler(this.jackpots);
247
201
  }
248
- }
249
- disconnectedCallback() {
250
- this.interval && clearInterval(this.interval);
251
- }
252
- getJackpotClasses(jackpot) {
253
- return {
254
- JackpotCard: true,
255
- JackpotCardClosed: jackpot.IsClosed || isBefore(new Date(jackpot.JackpotEndTime), new Date()),
256
- InProgress: jackpot.Enabled && !jackpot.IsClosed,
257
- };
258
- }
259
- getJackpotHeaderTemplate(jackpot) {
260
- const jackpotIsWon = !!jackpot.WinBalance;
261
- const jackpotTypeLabel = translate(jackpot.Type, this.language);
262
- const jackpotClosedLabel = translate(jackpot.Reason, this.language);
263
- const jackpotLabel = (jackpot === null || jackpot === void 0 ? void 0 : jackpot.IsClosed) ? jackpotClosedLabel : jackpotTypeLabel;
264
- const jackpotClasses = `JackpotBalance Jackpot${translate(jackpot.Type, this.language)}`;
265
- const buttonClass = jackpot.Enabled
266
- ? 'JackpotJoinButton Joined'
267
- : 'JackpotJoinButton';
268
- const buttonText = jackpot.Enabled
269
- ? translate('unjoin', this.language)
270
- : translate('join', this.language);
271
- const actionButtonIsDisabled = jackpot.Pending || (jackpot === null || jackpot === void 0 ? void 0 : jackpot.IsClosed) || isBefore(new Date(jackpot.JackpotEndTime), new Date());
272
- return (index.h("div", { class: "JackpotCardHeader" }, index.h("div", { class: "JackpotTitle" }, index.h("span", { class: "JackpotName" }, jackpotLabel), index.h("span", { class: jackpotClasses }, formatBalance(jackpot.Balance, jackpot.Currency))), index.h("div", { class: "JackpotActions" }, index.h("button", { class: buttonClass, onClick: this.jackpotChangeStatusRequest, "data-id": jackpot.JackpotId, disabled: actionButtonIsDisabled }, buttonText)), jackpotIsWon && (index.h("span", { class: "JackpotWon" }, translate('jackpotIsWon', this.language)))));
273
- }
274
- getJackpotDescriptionTemplate(jackpot) {
275
- const operatorContributionPercent = `${+jackpot.OperatorContributionPercent}%`;
276
- const winingProbabilityPercent = `1:${jackpot.Probability}`;
277
- const countdownValue = isBefore(new Date(jackpot.JackpotEndTime), new Date())
278
- ? translate('outdatedJackpotCountdown', this.language)
279
- : this.timers[jackpot.JackpotId];
280
- const operatorContributionLabel = translate('operatorContribution', this.language);
281
- const typeLabel = translate('type', this.language);
282
- const winningProbabilityLabel = translate('winningProbability', this.language);
283
- return (index.h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && index.h("span", { class: "JackpotCountdown" }, countdownValue), index.h("div", { class: "JackpotCardDescriptionBlock" }, index.h("div", { class: "JackpotCardDescriptionRow" }, index.h("span", null, operatorContributionLabel, ":"), index.h("span", { class: "JackpotDescriptionValue" }, operatorContributionPercent, index.h("button", { class: "JackpotContributionTooltipButton", "data-tooltip": "contributionTooltip", onClick: this.toggleTooltip }))), this.renderDescriptionRowInfo(`${winningProbabilityLabel}:`, winingProbabilityPercent), this.renderDescriptionRowInfo(`${typeLabel}:`, jackpot.JackpotTypePresentation), index.h("a", { href: jackpot.JackpotRulesUrl, target: "_blank", onClick: this.stopPropagation }, translate('termsAndConditions', this.language)))));
284
- }
285
- renderDescriptionRowInfo(title, value) {
286
- return (index.h("div", { class: "JackpotCardDescriptionRow" }, index.h("span", null, title), index.h("span", { class: "JackpotDescriptionValue" }, value)));
287
- }
288
- getJackpotTemplate(jackpot) {
289
- return (index.h("div", { class: this.getJackpotClasses(jackpot), onClick: this.handleJackpotClick, key: jackpot.JackpotId, "data-id": jackpot.JackpotId }, this.getJackpotHeaderTemplate(jackpot), this.getJackpotDescriptionTemplate(jackpot)));
290
- }
291
- getHeaderTemplate() {
292
- return (index.h("header", { class: "JackpotsListPopupHeader" }, index.h("button", { onClick: this.toggleTooltip, "data-tooltip": "tooltip", class: "JackpotsIconButton" }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg", alt: "Show tooltip" })), index.h("div", { class: "JackpotsListPopupHeaderName" }, translate('jackpots', this.language)), index.h("button", { class: "JackpotsIconButton", onClick: this.handleCloseClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close jackpots list" }))));
293
- }
294
- getListTemplate() {
295
- const areAllJackpotsClosed = this.jackpots.every((item) => item.IsClosed);
296
- if (this.jackpots.length) {
297
- return (index.h("div", { class: "JackpotsListWrapper" }, areAllJackpotsClosed && (index.h("div", { class: "JackpotsListClosed" }, index.h("h2", null, translate('allJackpotsClosed', this.language)))), index.h("div", { class: "JackpotsList" }, this.jackpots.map((jackpot) => this.getJackpotTemplate(jackpot)))));
202
+ startCountdown() {
203
+ this.updateTimers();
204
+ this.interval = setInterval(() => {
205
+ this.updateTimers();
206
+ }, 1000);
298
207
  }
299
- else {
300
- return (index.h("div", { class: "JackpotsListClosed" }, index.h("h2", null, translate('allJackpotsClosed', this.language))));
208
+ updateTimers() {
209
+ const now = new Date().getTime();
210
+ this.timers = this.jackpots.reduce((acc, jackpot) => {
211
+ const expirationDate = new Date(jackpot.JackpotEndTime).getTime();
212
+ const diff = expirationDate - now;
213
+ let countdown = '00h:00m:00s';
214
+ const { days, hours, minutes, seconds } = {
215
+ days: String(Math.floor(diff / (1000 * 60 * 60 * 24))).padStart(2, '0'),
216
+ hours: String(Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
217
+ minutes: String(Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
218
+ seconds: String(Math.floor((diff % (1000 * 60)) / 1000)).padStart(2, '0'),
219
+ };
220
+ countdown =
221
+ days === '00'
222
+ ? `${hours}h:${minutes}m:${seconds}s`
223
+ : `${days}d:${hours}h:${minutes}m`;
224
+ return Object.assign(Object.assign({}, acc), { [jackpot.JackpotId]: countdown });
225
+ }, {});
301
226
  }
302
- }
303
- getTooltipTemplate() {
304
- return (index.h("div", { class: "JackpotsTooltipBackdrop" }, index.h("div", { class: "JackpotsTooltip" }, index.h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), this.tooltip)));
305
- }
306
- render() {
307
- return (index.h("div", { class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.tooltip && this.getTooltipTemplate()));
308
- }
309
- get host() { return index.getElement(this); }
310
- static get watchers() { return {
311
- "jackpots": ["jackpotsPropHandler"]
312
- }; }
227
+ componentDidRender() {
228
+ if (!this.limitStylingAppends && this.host) {
229
+ if (this.clientStyling)
230
+ this.setClientStyling();
231
+ if (this.clientStylingUrl)
232
+ this.setClientStylingURL();
233
+ this.limitStylingAppends = true;
234
+ }
235
+ }
236
+ disconnectedCallback() {
237
+ this.interval && clearInterval(this.interval);
238
+ }
239
+ getJackpotClasses(jackpot) {
240
+ return {
241
+ JackpotCard: true,
242
+ JackpotCardClosed: jackpot.IsClosed || isBefore(new Date(jackpot.JackpotEndTime), new Date()),
243
+ InProgress: jackpot.Enabled && !jackpot.IsClosed,
244
+ };
245
+ }
246
+ getJackpotHeaderTemplate(jackpot) {
247
+ const jackpotIsWon = !!jackpot.WinBalance;
248
+ const jackpotTypeLabel = translate(jackpot.Type, this.language);
249
+ const jackpotClosedLabel = translate(jackpot.Reason, this.language);
250
+ const jackpotLabel = (jackpot === null || jackpot === void 0 ? void 0 : jackpot.IsClosed) ? jackpotClosedLabel : jackpotTypeLabel;
251
+ const jackpotClasses = `JackpotBalance Jackpot${translate(jackpot.Type, this.language)}`;
252
+ const buttonClass = jackpot.Enabled
253
+ ? 'EngagementSuiteButton Active'
254
+ : 'EngagementSuiteButton';
255
+ const buttonText = jackpot.Enabled
256
+ ? translate('unjoin', this.language)
257
+ : translate('join', this.language);
258
+ const actionButtonIsDisabled = jackpot.Pending || (jackpot === null || jackpot === void 0 ? void 0 : jackpot.IsClosed) || isBefore(new Date(jackpot.JackpotEndTime), new Date());
259
+ return (index.h("div", { class: "JackpotCardHeader" }, index.h("div", { class: "JackpotTitle" }, index.h("span", { class: "JackpotName" }, jackpotLabel), index.h("span", { class: jackpotClasses }, formatBalance(jackpot.Balance, jackpot.Currency))), index.h("div", { class: "JackpotActions" }, index.h("button", { class: buttonClass, onClick: this.jackpotChangeStatusRequest, "data-id": jackpot.JackpotId, disabled: actionButtonIsDisabled }, buttonText)), jackpotIsWon && (index.h("span", { class: "JackpotWon" }, translate('jackpotIsWon', this.language)))));
260
+ }
261
+ getJackpotDescriptionTemplate(jackpot) {
262
+ const operatorContributionPercent = `${+jackpot.OperatorContributionPercent}%`;
263
+ const winingProbabilityPercent = `1:${jackpot.Probability}`;
264
+ const countdownValue = isBefore(new Date(jackpot.JackpotEndTime), new Date())
265
+ ? translate('outdatedJackpotCountdown', this.language)
266
+ : this.timers[jackpot.JackpotId];
267
+ const operatorContributionLabel = translate('operatorContribution', this.language);
268
+ const typeLabel = translate('type', this.language);
269
+ const winningProbabilityLabel = translate('winningProbability', this.language);
270
+ return (index.h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && index.h("span", { class: "JackpotCountdown" }, countdownValue), index.h("div", { class: "JackpotCardDescriptionBlock" }, index.h("div", { class: "JackpotCardDescriptionRow" }, index.h("span", null, operatorContributionLabel, ":"), index.h("span", { class: "JackpotDescriptionValue" }, operatorContributionPercent, index.h("button", { class: "JackpotContributionTooltipButton", "data-tooltip": "contributionTooltip", onClick: this.toggleTooltip }))), this.renderDescriptionRowInfo(`${winningProbabilityLabel}:`, winingProbabilityPercent), this.renderDescriptionRowInfo(`${typeLabel}:`, jackpot.JackpotTypePresentation), index.h("a", { href: jackpot.JackpotRulesUrl, target: "_blank", onClick: this.stopPropagation }, translate('termsAndConditions', this.language)))));
271
+ }
272
+ renderDescriptionRowInfo(title, value) {
273
+ return (index.h("div", { class: "JackpotCardDescriptionRow" }, index.h("span", null, title), index.h("span", { class: "JackpotDescriptionValue" }, value)));
274
+ }
275
+ getJackpotTemplate(jackpot) {
276
+ return (index.h("div", { class: this.getJackpotClasses(jackpot), onClick: this.handleJackpotClick, key: jackpot.JackpotId, "data-id": jackpot.JackpotId }, this.getJackpotHeaderTemplate(jackpot), this.getJackpotDescriptionTemplate(jackpot)));
277
+ }
278
+ getHeaderTemplate() {
279
+ return (index.h("header", { class: "JackpotsListPopupHeader" }, index.h("button", { onClick: this.toggleTooltip, "data-tooltip": "tooltip", class: "EngagementSuiteIconButton Help" }), index.h("div", { class: "JackpotsListPopupHeaderName" }, translate('jackpots', this.language)), index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })));
280
+ }
281
+ getListTemplate() {
282
+ const areAllJackpotsClosed = this.jackpots.every((item) => item.IsClosed);
283
+ if (this.jackpots.length) {
284
+ return (index.h("div", { class: "JackpotsListWrapper" }, areAllJackpotsClosed && (index.h("div", { class: "JackpotsListClosed" }, index.h("h2", null, translate('allJackpotsClosed', this.language)))), index.h("div", { class: "JackpotsList" }, this.jackpots.map((jackpot) => this.getJackpotTemplate(jackpot)))));
285
+ }
286
+ else {
287
+ return (index.h("div", { class: "JackpotsListClosed" }, index.h("h2", null, translate('allJackpotsClosed', this.language))));
288
+ }
289
+ }
290
+ getTooltipTemplate() {
291
+ return (index.h("div", { class: "EngagementSuiteTooltipBackdrop" }, index.h("div", { class: "EngagementSuiteTooltip" }, index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), this.tooltip)));
292
+ }
293
+ render() {
294
+ return (index.h("div", { key: '9fd4d384af0ee639e14925c797fe28bc71beb586', class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.tooltip && this.getTooltipTemplate()));
295
+ }
296
+ get host() { return index.getElement(this); }
297
+ static get watchers() { return {
298
+ "jackpots": ["jackpotsPropHandler"]
299
+ }; }
313
300
  };
314
- CasinoEngagementSuiteJackpotsList.style = casinoEngagementSuiteJackpotsListCss;
301
+ CasinoEngagementSuiteJackpotsList.style = CasinoEngagementSuiteJackpotsListStyle0;
315
302
 
316
303
  exports.casino_engagement_suite_jackpots_list = CasinoEngagementSuiteJackpotsList;
@@ -1,19 +1,25 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-45de0ae1.js');
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-d6d19ec7.js');
6
+ const appGlobals = require('./app-globals-3a1e7e63.js');
4
7
 
5
8
  /*
6
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
7
10
  */
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-jackpots-list.cjs.js', document.baseURI).href));
10
- const opts = {};
11
- if (importMeta !== '') {
12
- opts.resourcesUrl = new URL('.', importMeta).href;
13
- }
14
- return index.promiseResolve(opts);
11
+ var patchBrowser = () => {
12
+ const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('casino-engagement-suite-jackpots-list.cjs.js', document.baseURI).href));
13
+ const opts = {};
14
+ if (importMeta !== "") {
15
+ opts.resourcesUrl = new URL(".", importMeta).href;
16
+ }
17
+ return index.promiseResolve(opts);
15
18
  };
16
19
 
17
- patchBrowser().then(options => {
18
- return index.bootstrapLazy([["casino-engagement-suite-jackpots-list.cjs",[[1,"casino-engagement-suite-jackpots-list",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"jackpots":[1040],"jackpotChangeStatusRequest":[1040],"tooltip":[32],"timers":[32],"limitStylingAppends":[32]}]]]], options);
20
+ patchBrowser().then(async (options) => {
21
+ await appGlobals.globalScripts();
22
+ return index.bootstrapLazy([["casino-engagement-suite-jackpots-list.cjs",[[1,"casino-engagement-suite-jackpots-list",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"jackpots":[1040],"jackpotChangeStatusRequest":[1040],"tooltip":[32],"timers":[32],"limitStylingAppends":[32]},null,{"jackpots":["jackpotsPropHandler"]}]]]], options);
19
23
  });
24
+
25
+ exports.setNonce = index.setNonce;