@everymatrix/casino-engagement-suite-luckywheel 0.2.0 → 0.2.2
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.
- package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.esm.js +1 -1
- package/dist/casino-engagement-suite-luckywheel/index.esm.js +1 -1
- package/dist/casino-engagement-suite-luckywheel/p-7d1170ae.js +2 -0
- package/dist/casino-engagement-suite-luckywheel/p-927567e0.js +15 -0
- package/dist/casino-engagement-suite-luckywheel/p-d8bd2f95.entry.js +1 -0
- package/dist/cjs/{casino-engagement-suite-luckywheel-cc8d37c2.js → casino-engagement-suite-luckywheel-9aaa09f9.js} +49 -80
- package/dist/cjs/casino-engagement-suite-luckywheel.cjs.entry.js +2 -2
- package/dist/cjs/casino-engagement-suite-luckywheel.cjs.js +2 -2
- package/dist/cjs/{index-b46604f4.js → index-6096cc4b.js} +70 -207
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.js +37 -77
- package/dist/collection/utils/utils.js +11 -11
- package/dist/esm/{casino-engagement-suite-luckywheel-cf7e798a.js → casino-engagement-suite-luckywheel-88d531c4.js} +49 -80
- package/dist/esm/casino-engagement-suite-luckywheel.entry.js +2 -2
- package/dist/esm/casino-engagement-suite-luckywheel.js +3 -3
- package/dist/esm/{index-8ce51859.js → index-48c42d04.js} +70 -207
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.d.ts +0 -1
- package/dist/types/models/luckywheel.d.ts +24 -24
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/dist/types/utils/types.d.ts +4 -4
- package/package.json +1 -1
- package/dist/casino-engagement-suite-luckywheel/p-2a6e103b.entry.js +0 -1
- package/dist/casino-engagement-suite-luckywheel/p-781c5f2a.js +0 -1
- package/dist/casino-engagement-suite-luckywheel/p-eaad80fd.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-
|
|
1
|
+
import{p as e,b as n}from"./p-7d1170ae.js";export{s as setNonce}from"./p-7d1170ae.js";import{g as i}from"./p-e1255160.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((async e=>(await i(),n([["p-d8bd2f95",[[1,"casino-engagement-suite-luckywheel",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],luckywheel:[16],size:[1],contentdirection:[1],limitStylingAppends:[32],isPartitionsCustomableReady:[32],isSpinning:[32],options:[32],radius:[32],speed:[32],settings:[32],svg:[32],spinContainer:[32],spinable:[32],spinner:[32]},[[8,"message","handleEvent"]]]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CasinoEngagementSuiteLuckywheel}from"./p-
|
|
1
|
+
export{C as CasinoEngagementSuiteLuckywheel}from"./p-927567e0.js";import"./p-7d1170ae.js";
|
|
@@ -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="http://www.w3.org/1999/xlink",a="undefined"!=typeof window?window:{},f=a.document||{head:{}},h={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)},p=e=>Promise.resolve(e),m=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),d=!1,w=[],y=[],v=(e,t)=>n=>{e.push(n),d||(d=!0,t&&4&h.l?g(b):h.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(w),$(y),(d=w.length>0)&&h.raf(b)},g=e=>p().then(e),S=v(y,!0),j={},k=e=>"object"==(e=typeof e)||"function"===e;function O(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:()=>x,map:()=>C,ok:()=>E,unwrap:()=>R,unwrapErr:()=>T});var E=e=>({isOk:!0,isErr:!1,value:e}),x=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 x(e.value);throw"should never get here"}var M,P,R=e=>{if(e.isOk)return e.value;throw e.value},T=e=>{if(e.isErr)return e.value;throw e.value},A=(e,t,...n)=>{let 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&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?L(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=L(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},L=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),N={},U=e=>n(e).$hostElement$,W=new WeakMap,D=e=>"sc-"+e.$,F=(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("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(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){}let a=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,a=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(a?e.removeAttributeNS(u,t):e.removeAttribute(t)):(!i||4&r||s)&&!o&&(l=!0===l?"":l,a?e.setAttributeNS(u,t,l):e.setAttribute(t,l))}else if(t="-"===t[2]?t.slice(3):o(a,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&h.rel(e,t,n,o),l&&h.ael(e,t,l,o)}}},H=/\s/,q=e=>e?e.split(H):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||j,s=t.u||j;for(const e of z(Object.keys(o)))e in s||F(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))F(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.v=f.createTextNode(l.i);else{if(B||(B="svg"===l.m),o=l.v=f.createElementNS(B?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),B&&"foreignObject"===l.m&&(B=!1),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=I(e,l,r),s&&o.appendChild(s);"svg"===l.m?B=!1:"foreignObject"===o.tagName&&(B=!0)}return o["s-hn"]=P,o},J=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===P&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=I(null,n,o),r&&(l[o].v=r,Z(i,r,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;Y(t),e&&e.remove()}}},Q=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),X=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(_(e,t,B="svg"===r||"foreignObject"!==r&&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],p=t[f],m=l.length-1,d=l[0],w=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==d)d=l[++c];else if(null==w)w=l[--m];else if(Q(h,d,o))X(h,d,o),h=t[++i],d=l[++c];else if(Q(p,w,o))X(p,w,o),p=t[--f],w=l[--m];else if(Q(h,w,o))X(h,w,o),Z(e,h.v,p.v.nextSibling),h=t[++i],w=l[--m];else if(Q(p,d,o))X(p,d,o),Z(e,p.v,h.v),p=t[--f],d=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===d.p){u=a;break}u>=0?(r=t[u],r.m!==d.m?s=I(t&&t[c],n,u):(X(r,d,o),t[u]=void 0,s=r.v),d=l[++c]):(s=I(t&&t[c],n,c),d=l[++c]),s&&Z(h.v.parentNode,s,h.v)}i>f?J(e,null==l[m+1]?null:l[m+1].v,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)):null!==o&&K(o,0,o.length-1),B&&"svg"===r&&(B=!1)):e.i!==i&&(l.data=i)},Y=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Y)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},te=(e,t)=>{if(e.l|=16,!(4&e.l))return ee(e,e.j),S((()=>ne(e,t)));e.l|=512},ne=(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&&(e.l|=256,e.k&&(e.k.map((([e,t])=>ue(n,e,t))),e.k=void 0),l=ue(n,"componentWillLoad")),le(l,(()=>se(e,n,t)))},le=(e,t)=>oe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),oe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,se=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=D(t),o=i.get(l);if(e=11===e.nodeType?e:f,o)if("string"==typeof o){let s,r=W.get(e=e.head||e);if(r||W.set(e,r=new Set),!r.has(l)){{s=f.createElement("style"),s.innerHTML=o;const t=null!=(n=h.C)?n:O(f);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);re(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ie(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},re=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||L(null,null),r=(e=>e&&e.m===N)(t)?t:A(null,null,t);if(P=l.tagName,o.P&&(r.u=r.u||{},o.P.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.M=r,r.v=s.v=l.shadowRoot||l,M=l["s-sc"],X(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.j;ue(e.t,"componentDidRender"),64&e.l||(e.l|=64,ae(t),e.R(t),n||ce()),e.S&&(e.S(),e.S=void 0),512&e.l&&g((()=>te(e,!1))),e.l&=-517},ce=()=>{ae(f.documentElement),g((()=>(e=>{const t=h.ce("appload",{detail:{namespace:"casino-engagement-suite-luckywheel"}});return e.dispatchEvent(t),t})(a)))},ue=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ae=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,s;const r=e.prototype;if(t.T){const i=Object.entries(null!=(o=t.T)?o:{});if(i.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(l){((e,t,l,o)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=s.A.get(t),i=s.l,c=s.t;l=((e,t)=>null==e||k(e)?e:1&t?e+"":e)(l,o.T[t][0]),8&i&&void 0!==r||l===r||Number.isNaN(r)&&Number.isNaN(l)||(s.A.set(t,l),c&&2==(18&i)&&te(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;r.attributeChangedCallback=function(e,o,s){h.jmp((()=>{var i;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),r=null==l?void 0:l.l;if(r&&!(8&r)&&128&r&&s!==o){const n=l.t,r=null==(i=t.L)?void 0:i[e];null==r||r.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!=(s=t.L)?s:{}),...i.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.P)||o.push([e,s])),s}))]))}}return e},he=(e,l={})=>{var o;const u=[],p=l.exclude||[],d=a.customElements,w=f.head,y=w.querySelector("meta[charset]"),v=f.createElement("style"),$=[];let b,g=!0;Object.assign(h,l),h.o=new URL(l.resourcesUrl||"./",f.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{const o={l:l[0],$:l[1],T:l[2],N:l[3]};4&o.l&&(S=!0),o.T=l[2],o.N=l[3],o.P=[];const c=o.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,A:new Map};l.U=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,o),1&o.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,pe(this,e,o.N)),b&&(clearTimeout(b),b=null),g?$.push(this):h.jmp((()=>(e=>{if(!(1&h.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)pe(e,t,l.N),(null==t?void 0:t.t)||(null==t?void 0:t.U)&&t.U.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.j=n);break}}l.T&&Object.entries(l.T).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.W){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.W;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.$}#${t.D}" was not found`);l.isProxied||(fe(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,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=D(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);m&&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=()=>te(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){h.jmp((()=>(async()=>{if(!(1&h.l)){const e=n(this);e.F&&(e.F.map((e=>e())),e.F=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.U)&&e.U.then((()=>{}))}})()))}componentOnReady(){return n(this).U}};o.W=e[0],p.includes(c)||d.get(c)||(u.push(c),d.define(c,fe(a,o,1)))}))})),u.length>0&&(S&&(v.textContent+=c),v.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(o=h.C)?o:O(f);null!=e&&v.setAttribute("nonce",e),w.insertBefore(v,y?y.nextSibling:w.firstChild)}g=!1,$.length?$.map((e=>e.connectedCallback())):h.jmp((()=>b=setTimeout(ce,30)))},pe=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=de(e,n),r=me(t,o),i=we(n);h.ael(s,l,r,i),(t.F=t.F||[]).push((()=>h.rel(s,l,r,i)))}))},me=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},de=(e,t)=>8&t?a:e,we=e=>({passive:!!(1&e),capture:!!(2&e)}),ye=e=>h.C=e;export{he as b,U as g,A as h,p,l as r,ye as s}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{r as t,h as i,g as e}from"./p-7d1170ae.js";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var s,a,r,n,o,h;!function(t){t.Arrow="Arrow",t.Partition="Partition"}(s||(s={})),function(t){t.DownFromTop="DownFromTop",t.UpFromCenter="UpFromCenter",t.DownFromCenter="DownFromCenter",t.UpFromBottom="UpFromBottom"}(a||(a={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(r||(r={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(n||(n={})),function(t){t.launch="launch",t.loop="loop",t.halt="halt"}(o||(o={})),function(t){t.quad="quad",t.cubic="cubic",t.quart="quart",t.quint="quint",t.expo="expo",t.sine="sine",t.circ="circ"}(h||(h={}));const c=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},d=t=>new Promise((i=>{let e=document.createElementNS("http://www.w3.org/2000/svg","image");e.onload=()=>i(e),e.onerror=()=>i(e),e.href.baseVal=t})),l=t=>({x:t,y:t}),u=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),g={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},b=async(t,i)=>{let e=((t,i)=>{const e=t.map((t=>{const e={};return Object.keys(t).map((s=>{"object"==typeof t[s]&&t[s]&&(e["Image1"===s?"Image":s]=t[s][i]||t[s]["*"])})),e}));return(t=>{let i=0;return t.map((t=>{i+=Number(t.probability)})),i})(t)<1&&e.push(g),e})(t.Program.WheelOfFortune.Partitions,i);return e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?e.map((t=>{if(t.Image){const i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.href.baseVal=t.Image,Object.assign(Object.assign({},t),{Image:i})}return t})):await Promise.all(e.map((async t=>Object.assign(Object.assign({},t),await(async t=>t?{image:await d(t)}:{})(t.Image))))),e},f={in:{quad:t=>Math.pow(t,2),cubic:t=>Math.pow(t,3),quart:t=>Math.pow(t,4),quint:t=>Math.pow(t,5),sine:t=>1-Math.cos(t*Math.PI/2),expo:t=>0===t?0:Math.pow(2,10*t-10),circ:t=>1-Math.sqrt(1-Math.pow(t,2))},out:{quad:t=>1-Math.pow(1-t,2),cubic:t=>1-Math.pow(1-t,3),quart:t=>1-Math.pow(1-t,4),quint:t=>1-Math.pow(1-t,5),sine:t=>Math.sin(t*Math.PI/2),expo:t=>1===t?1:1-Math.pow(2,-10*t),circ:t=>Math.sqrt(1-Math.pow(t-1,2))}},m={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},p={in:{quad:t=>2*t,cubic:t=>3*t**2,quart:t=>4*t**3,quint:t=>5*t**4,sine:t=>Math.PI/2*Math.sin(Math.PI/2*t),expo:t=>10*Math.LN2*2**(10*t-10),circ:t=>-.5*(1-t**2)**-.5},out:{cubic:t=>3*t**2-6*t+3}},y=[{launchTurns:5,launchSpeed:.2,loopSpeed:15,haltTurns:2,haltSpeed:.16},{launchTurns:2,launchSpeed:.5,loopSpeed:20,haltTurns:2,haltSpeed:.22},{launchTurns:6,launchSpeed:1.38,loopSpeed:45,haltTurns:6,haltSpeed:.5}],v=t=>Object.keys(t).map((i=>t[i]));var x;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(x||(x={}));class k{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:r}){this.arrowmode=a.DownFromTop,this.convertDegToArc=t=>t*Math.PI/180,this.convertArcToDeg=t=>180*t/Math.PI%360,this.getArcDelta=t=>2*Math.PI/t,this.findDeg=(t,i)=>t*this.convertArcToDeg(this.getArcDelta(i)),this.angleTransform=t=>{switch(t){case a.DownFromTop:case a.UpFromCenter:return-Math.PI/2;case a.DownFromCenter:case a.UpFromBottom:return Math.PI/2}},this.contentdirection=r||"anticlockwise",this.center=t/2,this.ratio=t/375,this.options=e,this.length=e.length,this.themeIndex=s,this.radius=i}get sizeImage(){const t=t=>48*this.ratio*5/t;if(this.length<=3)return t(4);switch(this.length){case 8:case 7:return 24*this.ratio;case 6:return 36*this.ratio;case 5:return 48*this.ratio;case 4:return 56*this.ratio;default:return t(this.length)}}getSizeImageByPartition(t){return this.options[t].name?this.sizeImage/2:this.sizeImage}getSvgImageProps(t,i=1.25){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].name?this.radius-e/2-3*this.ratio:(this.radius-e/2)/Number(i)-3*this.ratio,Object.assign(Object.assign({},this.getPropsForPartitionInfo(t,this.getOffsetImage(e),s,n.outward)),{width:e,height:e})}getSvgTextProps(t){const i=this.getSizeImageByPartition(t);let e;return e=this.options[t].image?this.radius-i-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,e))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t),e=this.options[t].image?80:100,s={width:e,height:e};return Object.assign(Object.assign(Object.assign({},i),s),{x:"clockwise"===this.contentdirection?i.x:i.x-s.width,y:i.y-s.height/2})}get offsetText(){return{center:0,position:{x:0,y:0},transform:{x:0,y:0}}}getOffsetImage(t){return{center:0,position:{x:-1*t/2,y:-1*t/2},transform:{x:0,y:0}}}get direction(){return x.clockwise}getAngleSelf(t,i){return 360*t/this.length*this.direction+90*(void 0!==i?i:n[this.contentdirection])}getPartitionPositions(t,i,e){const s=this.angleTransform(this.arrowmode)+this.direction*t*2*Math.PI/this.length,a=((t,i,e)=>{const s=l(e);return{x:s.x+t*Math.cos(i),y:s.y+t*Math.sin(i)}})(i||this.radius-9*this.ratio,s,this.center+e.center);return{transformOrigin:u(a,e.transform),point:u(a,e.position)}}getPropsForPartitionInfo(t,i,e,s){const{point:a,transformOrigin:r}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},a),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg)`,"transform-origin":`${n=r,Object.keys(n).map((t=>`${n[t]}px`)).join(" ")}`}});var n}getPartitionDraw(t){const i=l(this.center),e=l(this.radius),{point:s,pointNext:a}=((t,i,e,s)=>{const a=t=>((t,i,e,s)=>{const a=Math.PI/180*(360/i*(t-.5)-90),r=l(s),n=l(e);return{x:r.x+n.x*Math.cos(a),y:r.y+n.y*Math.sin(a)}})(t,i,e,s);return{point:a(t),pointNext:a(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...v(i),"L",...v(s),"A",...v(e),"0 0 1",...v(a),"Z"].join(" ")}}getDeg(t){return this.findDeg(length-(t||this.length-1),length)}getSpinnerProps(){const t=l(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class w{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=h.cubic,this.param=y[2],this.halt=(t,i=(()=>{}))=>{this.shouldHalt=()=>{this.step=o.halt,this.cb=()=>{i(),this.setDeg(t,0)},this.degTarget=t+360*this.param.haltTurns,this.continueRepeat()}},this.continueRepeat=()=>setTimeout((()=>this.ticker()),30),this.ticker=()=>{const t=this.param.loopSpeed,i=t=>33*m[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,f.in[this.easingType],p.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,f.out[this.easingType],p.out[this.easingType])},a=()=>{this.setDeg((this.deg+t)%360,m[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,m[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():a()},[o.halt]:()=>{this.deg===360-t?s():a()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,a)=>{let r=null;const n=()=>{let o=(new Date).getTime();r||(r=o);const h=o-r,c=e*s(h/t)+i,d=Math.abs(a(h/t));this.setDeg(c,d),h<t?setTimeout((()=>n()),30):this.cb()};n()},this.animate=(t,i,e,s,a)=>{let r=null;window.cancelAnimationFrame(r);let n=null;const o=h=>{n||(n=h);const c=h-n,d=e*s(c/t)+i,l=Math.abs(a(c/t));this.setDeg(d,l),c<t?r=window.requestAnimationFrame(o):this.cb()};r=window.requestAnimationFrame(o)},this.tick=t.tick}launch(){this.shouldHalt=void 0,this.step=o.launch,this.ticker()}}const P=class{constructor(i){t(this,i),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.host.prepend(i)}),1)})).catch((t=>{console.log("Error ",t)}))},this.renderImage=(t,i)=>{const e=this.options[i].Image;c(e,this.settings.getSvgImageProps(i)),t.innerHTML=null,t.appendChild(e)},this.updateSpinable=()=>{if(this.luckywheel.Current){if(Number(this.luckywheel.Current.RemainingTimes)>0)return void(this.spinable=!0);window.postMessage({type:"ShowNoSpinLeftModal"})}this.spinable=!1},this.eventSpin=()=>{this.updateSpinable(),this.spinable&&!this.isSpinning&&(this.isSpinning=!0,this.spinContainer=this.svg.querySelector("g.PartitionsContainer"),this.spinner.launch(),window.postMessage({type:"SpinLuckyWheel",data:{lotteryProgramID:this.luckywheel.Program.Id}}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckywheel=void 0,this.size="440",this.contentdirection="anticlockwise",this.limitStylingAppends=!1,this.isPartitionsCustomableReady=!1,this.isSpinning=!1,this.options=void 0,this.radius=.85*Number(this.size)/2,this.speed=0,this.settings=void 0,this.svg=void 0,this.spinContainer=void 0,this.spinable=void 0,this.spinner=void 0}handleEvent(t){const i=null==t?void 0:t.data,{type:e}=i,s=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(t);a<s.length;a++)i.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(e[s[a]]=t[s[a]])}return e}(i,["type"]);"SpinLuckyWheelRes"===e&&this.spinner.halt(this.settings.getDeg(s.data.Result.WheelOfFortunePartitionIndex),(()=>{this.isSpinning=!1,this.updateSpinable();const t=this.luckywheel.Program.WheelOfFortune.Partitions[s.data.Result.WheelOfFortunePartitionIndex].PrizeText;window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:t.en||t["*"],HasError:s.success}})}))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,r.en),this.settings=new k({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new w({tick:(t,i)=>{c(this.spinContainer,{style:[`transform: rotate(${t}deg)`,`height: ${this.size}px`,`width: ${this.size}px`].join(";")}),this.speed=.5*i}})}defineGeneralVariables(){return{"--length":`${this.options.length}`,"--radius":`${this.radius}`,"--ratio":""+Number(this.size)/480,"--size":`${this.size}`}}render(){const t={height:this.size,width:this.size},e={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"014cf34ad67ed718b064797ec5497f93cd8e8fc8",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"b7eedc15f6290740b3cfa85b784dcb3ed6c59b9b",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",Object.assign({key:"ae62d34ee98360bd6da52cad54819813fb714555"},t,{class:"Bottom Customable"}),i("div",{key:"ec3ae09161a1a20956ebf9bb91340c3f77647770",style:e})),i("g",Object.assign({key:"ca9edc54e36206aaf04d8645efa9aeb8b2a7aa9a",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"99ca797756be5a290f0951127904489ad6b21c9e",class:"PartitionsBackgrounds"},this.options.map(((t,s)=>i("foreignObject",{"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:{"--index":s.toString()},width:this.size,height:this.size},i("div",{style:e}))))),i("g",{key:"b197f9f51c2a8a1b2337ae180b987ad0896d42ae",class:"PartitionsBackgroundStrokes"},this.options.map(((t,e)=>i("path",Object.assign({class:"PartitionBackgroundStroke"},this.settings.getPartitionDraw(e),{width:this.size,height:this.size}))))),i("g",{key:"00435c08f614ae78ab63d2f9fee0c81ff29730ac",class:"Partitions",style:{filter:this.speed>.3?`blur(${this.speed}px)`:""}},this.options.map(((t,e)=>[t.Image&&i("g",{class:`PartitionImage PartitionImage${e}`,ref:t=>this.renderImage(t,e)}),t.Name&&i("foreignObject",Object.assign({class:"PartitionText"},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.Name})))])))),i("g",{key:"a89ea859fd16d72ec6a38c780548a4aade0b26db",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((s,a)=>i("foreignObject",Object.assign({class:"Partition1 Customable",style:{"--index":a.toString()}},t),i("div",{style:e}))))),i("g",{key:"b77eaeb0043f72ab39c5bcec7b76543871057c28",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((s,a)=>i("foreignObject",Object.assign({class:"Partition2 Customable",style:{"--index":a.toString()}},t),i("div",{style:e}))))),i("foreignObject",Object.assign({key:"f5fbab79d3c2867c20d9aa05a026be3838fcd39b",class:"Middle Customable"},t),i("div",{key:"b6ad416c3ebfd53e2cbbec6de17b085424a15b0e",style:e})),i("foreignObject",Object.assign({key:"fafc4d94ce9fd81eb57cef4670d0a2bee763128a",class:"Top Customable"},t),i("div",{key:"e1fd86da7c3657863271643354bdf6bd8a325791",style:e})),i("g",{key:"383cf401f171986ec7799e98ca048b8aca8dea83",class:{spinning:this.isSpinning,Center:!0},onClick:this.eventSpin},i("foreignObject",{key:"13f1eecbb754f80c6a649f4a57339ae84f4fb09e",x:Number(this.size)/2-50,y:Number(this.size)/2-50,width:100,height:100})),i("g",{key:"b739f94ed6f4d63eeb30ee2c905ad638fa79694a"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};P.style=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.LotteryProgramWof{background:var(--emw--color-contrast, #07072A);display:flex;align-items:center;flex-direction:column;padding:20px 0}main{max-width:600px;width:100%;display:flex;justify-content:space-around;min-height:200px}svg{transition:opacity 0.3s}.WheelContainer{text-align:center}.FortuneContainer{width:100%;display:flex;align-items:center;flex-direction:column}.Center{cursor:pointer;transition:filter;transition-duration:1s}.Center.disabled{filter:grayscale(80%)}.Center .CenterCircle{fill:#3CE4BB;stroke:rgb(150, 54, 88);stroke-width:2px;cursor:pointer;transition:fill;transition-duration:1s}.Center .CenterText{fill:#FFFFFF}.PointerPartition{opacity:0.3;fill:lightgoldenrodyellow;stroke:red;stroke-width:6px;stroke-dasharray:12}.Current{color:#FFFFFF}.PartitionText{color:#FFFFFF;font-style:normal;font-weight:700;text-anchor:end;text-shadow:0px 3px #000;dominant-baseline:central}.PartitionsShadow{background-blend-mode:multiply;mix-blend-mode:multiply}.PartitionTextEntityContainer{height:100%;display:flex;align-items:center}.PartitionTextEntity{width:100%}.PartitionTextEntity.Anticlockwise{text-align:end}foreignObject.Bottom div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-bg.svg");background-size:calc(var(--radius) * 2px + var(--ratio) * 20px);background-position:center}foreignObject.Middle div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-spin.svg"), url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-pointer.svg");background-position:center, center 5px}foreignObject.Top{mix-blend-mode:multiply}foreignObject.Top div{background-image:var(--img-theme-shadow);background-position:center;background-size:calc(var(--radius) * 2px)}foreignObject.Partition1 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc(var(--index) * 360deg / var(--length)))}foreignObject.Partition2 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc((var(--index) + 0.5) * 360deg / var(--length)))}foreignObject.PointerArea{mix-blend-mode:screen}foreignObject.PointerArea div{background-image:var(--img-theme-pointer-area);background-position:center -3px;background-size:51%}foreignObject.Partition1 div,foreignObject.Partition2 div{transform-origin:center}.PartitionsCustomable1 div,.PartitionsCustomable2 div{visibility:hidden}.PartitionsCustomable1 div.active,.PartitionsCustomable2 div.active{visibility:visible}foreignObject.Customable{overflow:visible}foreignObject.Customable div{background-repeat:no-repeat}.PartitionBackground div{background-size:calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);background-position:center}.PartitionBackground:nth-child(2n) div{background:var(--emw--color-primary, #3F2E75)}.PartitionBackground:nth-child(2n+1) div{background:var(--emw--color-secondary, #9482CE)}.PartitionBackground div{transform-origin:center}.PartitionBackgroundStroke{fill:transparent;stroke:var(--emw--color-background-secondary, #251D3E);stroke-width:3px;stroke-dasharray:none}.PointerPartitionFrame{stroke:#FFDD64;fill:transparent;stroke-dasharray:var(--radius) calc(6.2831853072 / var(--length) * var(--radius));stroke-width:0px}.PointerPartitionFrame.active{stroke-width:3px}.WheelContainer.Mobile foreignObject.Middle div{background-size:95px, 38px}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity{text-align:center;text-transform:uppercase;text-shadow:none;font-size:var(--emw--font-size-small, 14px);font-weight:900}';export{P as C}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{C as casino_engagement_suite_luckywheel}from"./p-927567e0.js";import"./p-7d1170ae.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-6096cc4b.js');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
7
7
|
|
|
8
8
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -27,12 +27,7 @@ function __rest(s, e) {
|
|
|
27
27
|
t[p[i]] = s[p[i]];
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
33
|
-
var e = new Error(message);
|
|
34
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
35
|
-
};
|
|
30
|
+
}
|
|
36
31
|
|
|
37
32
|
var PointerMode;
|
|
38
33
|
(function (PointerMode) {
|
|
@@ -131,10 +126,10 @@ const pointPlus = (point1, point2) => ({
|
|
|
131
126
|
y: point1.y + point2.y
|
|
132
127
|
});
|
|
133
128
|
const optionCompliment = {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
Image: '',
|
|
130
|
+
Name: 'Thank you',
|
|
131
|
+
PrizeText: '',
|
|
132
|
+
PrizeImage: ''
|
|
138
133
|
};
|
|
139
134
|
const getSumProbability = (partitions) => {
|
|
140
135
|
let probabilityAll = 0;
|
|
@@ -148,8 +143,8 @@ const getOptionsFromPartitions = (partitions, lang) => {
|
|
|
148
143
|
const option = {};
|
|
149
144
|
Object.keys(_partition).map((_key) => {
|
|
150
145
|
if (typeof _partition[_key] === 'object' &&
|
|
151
|
-
_partition[_key]
|
|
152
|
-
const targetKey = _key === '
|
|
146
|
+
!!_partition[_key]) {
|
|
147
|
+
const targetKey = _key === 'Image1' ? 'Image' : _key;
|
|
153
148
|
option[targetKey] = _partition[_key][lang] || _partition[_key]['*'];
|
|
154
149
|
}
|
|
155
150
|
});
|
|
@@ -168,14 +163,14 @@ const preloadImage = async (src) => {
|
|
|
168
163
|
};
|
|
169
164
|
};
|
|
170
165
|
const getOptions = async (bonus, lang) => {
|
|
171
|
-
const
|
|
166
|
+
const partitions = bonus.Program.WheelOfFortune.Partitions;
|
|
172
167
|
let options = getOptionsFromPartitions(partitions, lang);
|
|
173
168
|
if (isSafari()) {
|
|
174
169
|
options = options.map(option => {
|
|
175
|
-
if (option.
|
|
170
|
+
if (option.Image) {
|
|
176
171
|
const img = document.createElementNS('http://www.w3.org/2000/svg', 'image');
|
|
177
|
-
img.href.baseVal = option.
|
|
178
|
-
return Object.assign(Object.assign({}, option), {
|
|
172
|
+
img.href.baseVal = option.Image;
|
|
173
|
+
return Object.assign(Object.assign({}, option), { Image: img });
|
|
179
174
|
}
|
|
180
175
|
else {
|
|
181
176
|
return option;
|
|
@@ -183,7 +178,7 @@ const getOptions = async (bonus, lang) => {
|
|
|
183
178
|
});
|
|
184
179
|
}
|
|
185
180
|
else {
|
|
186
|
-
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.
|
|
181
|
+
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.Image))))));
|
|
187
182
|
}
|
|
188
183
|
return options;
|
|
189
184
|
};
|
|
@@ -558,35 +553,6 @@ const CasinoEngagementSuiteLuckywheelStyle0 = casinoEngagementSuiteLuckywheelCss
|
|
|
558
553
|
const CasinoEngagementSuiteLuckywheel = class {
|
|
559
554
|
constructor(hostRef) {
|
|
560
555
|
index.registerInstance(this, hostRef);
|
|
561
|
-
/**
|
|
562
|
-
* Client custom styling via string
|
|
563
|
-
*/
|
|
564
|
-
this.clientStyling = '';
|
|
565
|
-
/**
|
|
566
|
-
* Client custom styling via url
|
|
567
|
-
*/
|
|
568
|
-
this.clientStylingUrl = '';
|
|
569
|
-
/**
|
|
570
|
-
* Language of the widget
|
|
571
|
-
*/
|
|
572
|
-
this.language = 'en';
|
|
573
|
-
/**
|
|
574
|
-
* User's device type
|
|
575
|
-
*/
|
|
576
|
-
this.device = 'Mobile';
|
|
577
|
-
/**
|
|
578
|
-
* Wheel size
|
|
579
|
-
*/
|
|
580
|
-
this.size = '440';
|
|
581
|
-
/**
|
|
582
|
-
* Content Direction
|
|
583
|
-
*/
|
|
584
|
-
this.contentdirection = 'anticlockwise';
|
|
585
|
-
this.limitStylingAppends = false;
|
|
586
|
-
this.isPartitionsCustomableReady = false;
|
|
587
|
-
this.isSpinning = false;
|
|
588
|
-
this.radius = 0.85 * Number(this.size) / 2;
|
|
589
|
-
this.speed = 0;
|
|
590
556
|
this.setClientStyling = () => {
|
|
591
557
|
let sheet = document.createElement('style');
|
|
592
558
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -606,14 +572,14 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
606
572
|
});
|
|
607
573
|
};
|
|
608
574
|
this.renderImage = (node, index) => {
|
|
609
|
-
const image = this.options[index].
|
|
575
|
+
const image = this.options[index].Image;
|
|
610
576
|
setProps(image, this.settings.getSvgImageProps(index));
|
|
611
577
|
node.innerHTML = null;
|
|
612
578
|
node.appendChild(image);
|
|
613
579
|
};
|
|
614
580
|
this.updateSpinable = () => {
|
|
615
|
-
if (!!this.luckywheel.
|
|
616
|
-
if (Number(this.luckywheel.
|
|
581
|
+
if (!!this.luckywheel.Current) {
|
|
582
|
+
if (Number(this.luckywheel.Current.RemainingTimes) > 0) {
|
|
617
583
|
this.spinable = true;
|
|
618
584
|
return;
|
|
619
585
|
}
|
|
@@ -633,40 +599,43 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
633
599
|
this.spinner.launch();
|
|
634
600
|
window.postMessage({
|
|
635
601
|
type: 'SpinLuckyWheel',
|
|
636
|
-
|
|
602
|
+
data: {
|
|
603
|
+
lotteryProgramID: this.luckywheel.Program.Id,
|
|
604
|
+
}
|
|
637
605
|
});
|
|
638
|
-
// todo: this code below simulates the server response,
|
|
639
|
-
// delete after implementation with GLС
|
|
640
|
-
setTimeout(() => {
|
|
641
|
-
window.postMessage({
|
|
642
|
-
type: 'SpinLuckyWheelRes',
|
|
643
|
-
data: {
|
|
644
|
-
item: { result: { wheelOfFortunePartitionIndex: 1 } },
|
|
645
|
-
success: false
|
|
646
|
-
}
|
|
647
|
-
});
|
|
648
|
-
}, 2500);
|
|
649
|
-
};
|
|
650
|
-
this.handleSpinClick = () => {
|
|
651
|
-
if (isSafari()) {
|
|
652
|
-
return;
|
|
653
|
-
}
|
|
654
|
-
this.eventSpin();
|
|
655
606
|
};
|
|
607
|
+
this.clientStyling = '';
|
|
608
|
+
this.clientStylingUrl = '';
|
|
609
|
+
this.language = 'en';
|
|
610
|
+
this.device = 'Mobile';
|
|
611
|
+
this.luckywheel = undefined;
|
|
612
|
+
this.size = '440';
|
|
613
|
+
this.contentdirection = 'anticlockwise';
|
|
614
|
+
this.limitStylingAppends = false;
|
|
615
|
+
this.isPartitionsCustomableReady = false;
|
|
616
|
+
this.isSpinning = false;
|
|
617
|
+
this.options = undefined;
|
|
618
|
+
this.radius = 0.85 * Number(this.size) / 2;
|
|
619
|
+
this.speed = 0;
|
|
620
|
+
this.settings = undefined;
|
|
621
|
+
this.svg = undefined;
|
|
622
|
+
this.spinContainer = undefined;
|
|
623
|
+
this.spinable = undefined;
|
|
624
|
+
this.spinner = undefined;
|
|
656
625
|
}
|
|
657
626
|
handleEvent(e) {
|
|
658
627
|
const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
659
628
|
switch (type) {
|
|
660
629
|
case 'SpinLuckyWheelRes':
|
|
661
|
-
this.spinner.halt(this.settings.getDeg(rest.data.
|
|
630
|
+
this.spinner.halt(this.settings.getDeg(rest.data.Result.WheelOfFortunePartitionIndex), () => {
|
|
662
631
|
this.isSpinning = false;
|
|
663
632
|
this.updateSpinable();
|
|
664
|
-
const prizeText = this.luckywheel.
|
|
633
|
+
const prizeText = this.luckywheel.Program.WheelOfFortune.Partitions[rest.data.Result.WheelOfFortunePartitionIndex].PrizeText;
|
|
665
634
|
window.postMessage({
|
|
666
635
|
type: 'ShowLuckywheelRewardModal',
|
|
667
636
|
data: {
|
|
668
637
|
PrizeMessage: prizeText['en'] || prizeText['*'],
|
|
669
|
-
HasError: rest.
|
|
638
|
+
HasError: rest.success,
|
|
670
639
|
}
|
|
671
640
|
});
|
|
672
641
|
});
|
|
@@ -715,20 +684,20 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
715
684
|
render() {
|
|
716
685
|
const sizeProps = { height: this.size, width: this.size };
|
|
717
686
|
const foreignObjectAgentProps = { 'height': `${this.size}px`, 'width': `${this.size}px` };
|
|
718
|
-
return (index.h("div", { key: '
|
|
687
|
+
return (index.h("div", { key: '014cf34ad67ed718b064797ec5497f93cd8e8fc8', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, index.h("svg", { key: 'b7eedc15f6290740b3cfa85b784dcb3ed6c59b9b', width: this.size, height: this.size, ref: (el) => { this.svg = el; } }, index.h("foreignObject", Object.assign({ key: 'ae62d34ee98360bd6da52cad54819813fb714555' }, sizeProps, { class: "Bottom Customable" }), index.h("div", { key: 'ec3ae09161a1a20956ebf9bb91340c3f77647770', style: foreignObjectAgentProps })), index.h("g", Object.assign({ key: 'ca9edc54e36206aaf04d8645efa9aeb8b2a7aa9a', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), index.h("g", { key: '99ca797756be5a290f0951127904489ad6b21c9e', class: "PartitionsBackgrounds" }, this.options.map((_el, index$1) => {
|
|
719
688
|
return (index.h("foreignObject", { "clip-path": `url(#clip${index$1})`, class: "PartitionBackground Customable", style: { '--index': index$1.toString() }, width: this.size, height: this.size }, index.h("div", { style: foreignObjectAgentProps })));
|
|
720
|
-
})), index.h("g", { key: '
|
|
689
|
+
})), index.h("g", { key: 'b197f9f51c2a8a1b2337ae180b987ad0896d42ae', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index$1) => {
|
|
721
690
|
return (index.h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index$1), { width: this.size, height: this.size })));
|
|
722
|
-
})), index.h("g", { key: '
|
|
691
|
+
})), index.h("g", { key: '00435c08f614ae78ab63d2f9fee0c81ff29730ac', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index$1) => {
|
|
723
692
|
return ([
|
|
724
|
-
el.
|
|
725
|
-
el.
|
|
693
|
+
el.Image && (index.h("g", { class: `PartitionImage PartitionImage${index$1}`, ref: (el) => this.renderImage(el, index$1) })),
|
|
694
|
+
el.Name && (index.h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index$1)), index.h("div", { class: "PartitionTextEntityContainer" }, index.h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
726
695
|
]);
|
|
727
|
-
}))), index.h("g", { key: '
|
|
696
|
+
}))), index.h("g", { key: 'a89ea859fd16d72ec6a38c780548a4aade0b26db', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable1': true } }, this.options.map((_el, index$1) => {
|
|
728
697
|
return (index.h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
|
|
729
|
-
})), index.h("g", { key: '
|
|
698
|
+
})), index.h("g", { key: 'b77eaeb0043f72ab39c5bcec7b76543871057c28', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable2': true } }, this.options.map((_el, index$1) => {
|
|
730
699
|
return (index.h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
|
|
731
|
-
})), index.h("foreignObject", Object.assign({ key: '
|
|
700
|
+
})), index.h("foreignObject", Object.assign({ key: 'f5fbab79d3c2867c20d9aa05a026be3838fcd39b', class: "Middle Customable" }, sizeProps), index.h("div", { key: 'b6ad416c3ebfd53e2cbbec6de17b085424a15b0e', style: foreignObjectAgentProps })), index.h("foreignObject", Object.assign({ key: 'fafc4d94ce9fd81eb57cef4670d0a2bee763128a', class: "Top Customable" }, sizeProps), index.h("div", { key: 'e1fd86da7c3657863271643354bdf6bd8a325791', style: foreignObjectAgentProps })), index.h("g", { key: '383cf401f171986ec7799e98ca048b8aca8dea83', class: { 'spinning': this.isSpinning, 'Center': true }, onClick: this.eventSpin }, index.h("foreignObject", { key: '13f1eecbb754f80c6a649f4a57339ae84f4fb09e', x: Number(this.size) / 2 - 100 / 2, y: Number(this.size) / 2 - 100 / 2, width: 100, height: 100 })), index.h("g", { key: 'b739f94ed6f4d63eeb30ee2c905ad638fa79694a' }, this.options.map((_el, index$1) => {
|
|
732
701
|
return (index.h("clipPath", { id: `clip${index$1}` }, index.h("path", Object.assign({}, this.settings.getPartitionDraw(index$1)))));
|
|
733
702
|
})))));
|
|
734
703
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-
|
|
6
|
-
require('./index-
|
|
5
|
+
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-9aaa09f9.js');
|
|
6
|
+
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-6096cc4b.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('casino-engagement-suite-luckywheel.cjs.js', document.baseURI).href));
|