@everymatrix/casino-engagement-suite-luckywheel 0.8.2 → 0.8.4
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-562beee7.entry.js +1 -0
- package/dist/casino-engagement-suite-luckywheel/{p-a50d208a.js → p-84fdebf3.js} +1 -1
- package/dist/cjs/{casino-engagement-suite-luckywheel-2b06fa4a.js → casino-engagement-suite-luckywheel-81cc1b36.js} +29 -27
- package/dist/cjs/casino-engagement-suite-luckywheel.cjs.entry.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.js +28 -26
- package/dist/collection/utils/class.svgcalc.js +1 -1
- package/dist/esm/{casino-engagement-suite-luckywheel-45c7f146.js → casino-engagement-suite-luckywheel-ddd29595.js} +29 -27
- package/dist/esm/casino-engagement-suite-luckywheel.entry.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/casino-engagement-suite-luckywheel/p-6b36a6f1.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
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-
|
|
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-562beee7",[[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-84fdebf3.js";import"./p-7d1170ae.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{C as casino_engagement_suite_luckywheel}from"./p-84fdebf3.js";import"./p-7d1170ae.js";
|
|
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var s,r,n,a,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"}(r||(r={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(n||(n={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(a||(a={})),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])}))},l=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})),d=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 l(t)}:{})(t.Image))))),e},p={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))}},f={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},m={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}},v=[{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}],y=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:n}){this.arrowmode=r.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 r.DownFromTop:case r.UpFromCenter:return-Math.PI/2;case r.DownFromCenter:case r.UpFromBottom:return Math.PI/2}},this.contentdirection=n,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,a.outward)),{width:e,height:e})}getSvgTextProps(t,i){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Image?this.radius-e-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,s,void 0,i))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t,this.options[t].Image?80:100);return Object.assign({},i)}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:a[this.contentdirection])}getPartitionPositions(t,i,e){const s=this.angleTransform(this.arrowmode)+this.direction*t*2*Math.PI/this.length,r=((t,i,e)=>{const s=d(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(r,e.transform),point:u(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:n,transformOrigin:a}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},n),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg) translate(${"clockwise"===this.contentdirection?n.x:n.x-100}px, ${n.y-50}px)`,"transform-origin":`${o=a,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=d(this.center),e=d(this.radius),{point:s,pointNext:r}=((t,i,e,s)=>{const r=t=>((t,i,e,s)=>{const r=Math.PI/180*(360/i*(t-.5)-90),n=d(s),a=d(e);return{x:n.x+a.x*Math.cos(r),y:n.y+a.y*Math.sin(r)}})(t,i,e,s);return{point:r(t),pointNext:r(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...y(i),"L",...y(s),"A",...y(e),"0 0 1",...y(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(length-(t||this.length-1),length)}getSpinnerProps(){const t=d(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=v[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*f[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,p.in[this.easingType],m.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,p.out[this.easingType],m.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,f[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,f[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[o.halt]:()=>{this.deg===360-t?s():r()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,r)=>{let n=null;const a=()=>{let o=(new Date).getTime();n||(n=o);const h=o-n,c=e*s(h/t)+i,l=Math.abs(r(h/t));this.setDeg(c,l),h<t?setTimeout((()=>a()),30):this.cb()};a()},this.animate=(t,i,e,s,r)=>{let n=null;window.cancelAnimationFrame(n);let a=null;const o=h=>{a||(a=h);const c=h-a,l=e*s(c/t)+i,d=Math.abs(r(c/t));this.setDeg(l,d),c<t?n=window.requestAnimationFrame(o):this.cb()};n=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 r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)i.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(e[s[r]]=t[s[r]])}return e}(i,["type"]);if("SpinLuckyWheelRes"===e){const t=!1===s.success,i=+s.data.Result.WheelOfFortunePartitionIndex;this.spinner.halt(this.settings.getDeg(i),(()=>{var e;this.isSpinning=!1,this.updateSpinable();let s="";if(!t){const t=null===(e=this.luckywheel.Program.WheelOfFortune.Partitions[i])||void 0===e?void 0:e.PrizeText;s=t[this.language]||t["*"],this.luckywheel.Current.RemainingTimes=+this.luckywheel.Current.RemainingTimes-1}window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:s,HasError:t}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,n.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:"ea47ff81b5aa4173b448295e474f94e8c2799aec",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"6c486c941b63b79a0e33ef2a078b225869080b9d",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",Object.assign({key:"4dd2fc761bc1914e3e5104fdfaf03c126f481e5d"},t,{style:e,class:"Bottom Customable"}),i("div",{key:"621ea705e477cadafa8be17108e0ccab3a8833f3",style:e})),i("g",Object.assign({key:"61642e6056a75a114c8d3d4bab22bde7fe17afff",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"53cc83c283e3d7eb625c4d9687c2862173bdee86",class:"PartitionsBackgrounds"},this.options.map(((t,s)=>i("foreignObject",{"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:Object.assign({"--index":s.toString()},e)},i("div",{style:e}))))),i("g",{key:"51ca18f5b7c877357a60d2ceb8f9b99cafcf6818",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:"cc81bbe2e72960ced6562702ab7be1dc7973480c",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:"d126a5bde2af4b31f32ec029c117637fa5983e20",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition1 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("g",{key:"abb7544782eb40d08fa1304612f69ed389e10dcf",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition2 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("foreignObject",Object.assign({key:"a76b670602be3050180ab71b2e4e424937865358",class:"Middle Customable"},t,{style:e}),i("div",{key:"1d074b872c29092a51ce7a8c2c8cf2e4a84c1381",style:e})),i("foreignObject",Object.assign({key:"b8525ca3463cbde5a12f47655bc82451ef648012",class:"Top Customable"},t,{style:e}),i("div",{key:"ddbe297ea9947778975248dd111faed457bb9433",style:e})),i("g",{key:"0d247fcbc8734643bc36f9f457876d3b4cb462fa",class:{spinning:this.isSpinning,Center:!0},onClick:this.eventSpin},i("foreignObject",{key:"b63e7d4e9f73c101305c4854565ad9ce9c11c171",style:{width:"100px",height:"100px",transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}})),i("g",{key:"d3e9be9a11f4c6d8c6abff35936c33ff5cf8c26d"},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}
|
|
15
|
+
***************************************************************************** */var s,r,a,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"}(r||(r={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(a||(a={})),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))}},p={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},m={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}},v=[{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}],y=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:a}){this.arrowmode=r.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 r.DownFromTop:case r.UpFromCenter:return-Math.PI/2;case r.DownFromCenter:case r.UpFromBottom:return Math.PI/2}},this.contentdirection=a,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,i){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Image?this.radius-e-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,s,void 0,i))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t,this.options[t].Image?80:100);return Object.assign({},i)}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,r=((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(r,e.transform),point:u(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:a,transformOrigin:n}=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) translate(${"clockwise"===this.contentdirection?a.x:a.x-100}px, ${a.y-50}px)`,"transform-origin":`${o=n,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=l(this.center),e=l(this.radius),{point:s,pointNext:r}=((t,i,e,s)=>{const r=t=>((t,i,e,s)=>{const r=Math.PI/180*(360/i*(t-.5)-90),a=l(s),n=l(e);return{x:a.x+n.x*Math.cos(r),y:a.y+n.y*Math.sin(r)}})(t,i,e,s);return{point:r(t),pointNext:r(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...y(i),"L",...y(s),"A",...y(e),"0 0 1",...y(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(this.length-(t||this.length-1),this.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=v[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*p[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],m.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,f.out[this.easingType],m.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,p[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,p[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[o.halt]:()=>{this.deg===360-t?s():r()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,r)=>{let a=null;const n=()=>{let o=(new Date).getTime();a||(a=o);const h=o-a,c=e*s(h/t)+i,d=Math.abs(r(h/t));this.setDeg(c,d),h<t?setTimeout((()=>n()),30):this.cb()};n()},this.animate=(t,i,e,s,r)=>{let a=null;window.cancelAnimationFrame(a);let n=null;const o=h=>{n||(n=h);const c=h-n,d=e*s(c/t)+i,l=Math.abs(r(c/t));this.setDeg(d,l),c<t?a=window.requestAnimationFrame(o):this.cb()};a=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 r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)i.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(e[s[r]]=t[s[r]])}return e}(i,["type"]);if("SpinLuckyWheelRes"===e&&this.luckywheel.Program.Id===s.data.LotteryProgramID){const t=!1===s.success,i=+s.data.Result.WheelOfFortunePartitionIndex;this.spinner.halt(this.settings.getDeg(i),(()=>{var e;this.isSpinning=!1,this.updateSpinable();let s="";if(!t){const t=null===(e=this.luckywheel.Program.WheelOfFortune.Partitions[i])||void 0===e?void 0:e.PrizeText;s=t[this.language]||t["*"],this.luckywheel.Current.RemainingTimes=+this.luckywheel.Current.RemainingTimes-1}window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:s,HasError:t}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,a.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:"3820d08a8d1a5efc25485f446476ca06385adf8c",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"d6e943e251ca9d89ec9254ea8a8addfcc0780e26",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",Object.assign({key:"a7f6f5c11debf357b3a8962f19b4e22f76b9bafb"},t,{style:e,class:"Bottom Customable"}),i("div",{key:"53e485d5618a95127d0665561b9b508293a07906",style:e})),i("g",Object.assign({key:"3623809f60594fffec3c1868209899a0a8217826",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"2f94f7de9633855a9ebebdc834e8e0876b17c779",class:"PartitionsBackgrounds"},this.options.map(((t,s)=>i("foreignObject",{"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:Object.assign({"--index":s.toString()},e)},i("div",{style:e}))))),i("g",{key:"46f516b004f6ac09ee29df83648f9e96c4dd3c45",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:"fc9c6f8fcf6a4cd8762be0e10039277009b67ce9",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:"809b6b9ac7e288e821b6eb6f6319dae5a2a45baf",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition1 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("g",{key:"5320636da9ef1a3e82eadccc963222c679d8bbee",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition2 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("foreignObject",Object.assign({key:"a664c21985e9201cd823d12026ed7e1e1d3bc7eb",class:"Middle Customable"},t,{style:e}),i("div",{key:"2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468",style:e})),i("foreignObject",Object.assign({key:"7ec8a7c17e18a8820e4b75726fc436bcd33154f4",class:"Top Customable"},t,{style:e}),i("div",{key:"9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f",style:e})),i("g",{key:"13091e93777f225a52e27346a233789d1b43676f",class:{spinning:this.isSpinning,Center:!0},onClick:this.eventSpin},i("foreignObject",{key:"df4d32b1dea119e4d843987a2f31292d03eed485",style:{width:"100px",height:"100px",transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}})),i("g",{key:"17b172145a7bb8f523f4ea4f3e70f875b565cb20"},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}
|
|
@@ -424,7 +424,7 @@ class SvgCalc {
|
|
|
424
424
|
}
|
|
425
425
|
getDeg(index) {
|
|
426
426
|
const i = index || this.length - 1;
|
|
427
|
-
return this.findDeg(length - i, length);
|
|
427
|
+
return this.findDeg(this.length - i, this.length);
|
|
428
428
|
}
|
|
429
429
|
getSpinnerProps() {
|
|
430
430
|
const centerPoint = getSymmetricalPointFromScalar(this.center);
|
|
@@ -635,26 +635,28 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
635
635
|
const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
636
636
|
switch (type) {
|
|
637
637
|
case 'SpinLuckyWheelRes':
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
window.postMessage({
|
|
651
|
-
type: 'ShowLuckywheelRewardModal',
|
|
652
|
-
data: {
|
|
653
|
-
PrizeMessage: prizeText,
|
|
654
|
-
HasError: hasError
|
|
638
|
+
if (this.luckywheel.Program.Id === rest.data.LotteryProgramID) {
|
|
639
|
+
const hasError = rest.success === false;
|
|
640
|
+
const index = +rest.data.Result.WheelOfFortunePartitionIndex;
|
|
641
|
+
this.spinner.halt(this.settings.getDeg(index), () => {
|
|
642
|
+
var _a;
|
|
643
|
+
this.isSpinning = false;
|
|
644
|
+
this.updateSpinable();
|
|
645
|
+
let prizeText = '';
|
|
646
|
+
if (!hasError) {
|
|
647
|
+
const partition = (_a = this.luckywheel.Program.WheelOfFortune.Partitions[index]) === null || _a === void 0 ? void 0 : _a.PrizeText;
|
|
648
|
+
prizeText = partition[this.language] || partition['*'];
|
|
649
|
+
this.luckywheel.Current.RemainingTimes = +this.luckywheel.Current.RemainingTimes - 1;
|
|
655
650
|
}
|
|
651
|
+
window.postMessage({
|
|
652
|
+
type: 'ShowLuckywheelRewardModal',
|
|
653
|
+
data: {
|
|
654
|
+
PrizeMessage: prizeText,
|
|
655
|
+
HasError: hasError
|
|
656
|
+
}
|
|
657
|
+
});
|
|
656
658
|
});
|
|
657
|
-
}
|
|
659
|
+
}
|
|
658
660
|
break;
|
|
659
661
|
}
|
|
660
662
|
}
|
|
@@ -696,26 +698,26 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
696
698
|
render() {
|
|
697
699
|
const sizeProps = { height: this.size, width: this.size };
|
|
698
700
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
699
|
-
return (index.h("div", { key: '
|
|
701
|
+
return (index.h("div", { key: '3820d08a8d1a5efc25485f446476ca06385adf8c', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, index.h("svg", { key: 'd6e943e251ca9d89ec9254ea8a8addfcc0780e26', width: this.size, height: this.size, ref: (el) => {
|
|
700
702
|
this.svg = el;
|
|
701
|
-
} }, index.h("foreignObject", Object.assign({ key: '
|
|
703
|
+
} }, index.h("foreignObject", Object.assign({ key: 'a7f6f5c11debf357b3a8962f19b4e22f76b9bafb' }, sizeProps, { style: foreignObjectAgentProps, class: "Bottom Customable" }), index.h("div", { key: '53e485d5618a95127d0665561b9b508293a07906', style: foreignObjectAgentProps })), index.h("g", Object.assign({ key: '3623809f60594fffec3c1868209899a0a8217826', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), index.h("g", { key: '2f94f7de9633855a9ebebdc834e8e0876b17c779', class: "PartitionsBackgrounds" }, this.options.map((_el, index$1) => {
|
|
702
704
|
return (index.h("foreignObject", { "clip-path": `url(#clip${index$1})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index$1.toString() }, foreignObjectAgentProps) }, index.h("div", { style: foreignObjectAgentProps })));
|
|
703
|
-
})), index.h("g", { key: '
|
|
705
|
+
})), index.h("g", { key: '46f516b004f6ac09ee29df83648f9e96c4dd3c45', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index$1) => {
|
|
704
706
|
return (index.h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index$1), { width: this.size, height: this.size })));
|
|
705
|
-
})), index.h("g", { key: '
|
|
707
|
+
})), index.h("g", { key: 'fc9c6f8fcf6a4cd8762be0e10039277009b67ce9', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index$1) => {
|
|
706
708
|
return [
|
|
707
709
|
el.Image && (index.h("g", { class: `PartitionImage PartitionImage${index$1}`, ref: (el) => this.renderImage(el, index$1) })),
|
|
708
710
|
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 }))))
|
|
709
711
|
];
|
|
710
|
-
}))), index.h("g", { key: '
|
|
712
|
+
}))), index.h("g", { key: '809b6b9ac7e288e821b6eb6f6319dae5a2a45baf', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index$1) => {
|
|
711
713
|
return (index.h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
|
|
712
|
-
})), index.h("g", { key: '
|
|
714
|
+
})), index.h("g", { key: '5320636da9ef1a3e82eadccc963222c679d8bbee', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index$1) => {
|
|
713
715
|
return (index.h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
|
|
714
|
-
})), index.h("foreignObject", Object.assign({ key: '
|
|
716
|
+
})), index.h("foreignObject", Object.assign({ key: 'a664c21985e9201cd823d12026ed7e1e1d3bc7eb', class: "Middle Customable" }, sizeProps, { style: foreignObjectAgentProps }), index.h("div", { key: '2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468', style: foreignObjectAgentProps })), index.h("foreignObject", Object.assign({ key: '7ec8a7c17e18a8820e4b75726fc436bcd33154f4', class: "Top Customable" }, sizeProps, { style: foreignObjectAgentProps }), index.h("div", { key: '9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f', style: foreignObjectAgentProps })), index.h("g", { key: '13091e93777f225a52e27346a233789d1b43676f', class: { spinning: this.isSpinning, Center: true }, onClick: this.eventSpin }, index.h("foreignObject", { key: 'df4d32b1dea119e4d843987a2f31292d03eed485', style: {
|
|
715
717
|
width: '100px',
|
|
716
718
|
height: '100px',
|
|
717
719
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
718
|
-
} })), index.h("g", { key: '
|
|
720
|
+
} })), index.h("g", { key: '17b172145a7bb8f523f4ea4f3e70f875b565cb20' }, this.options.map((_el, index$1) => {
|
|
719
721
|
return (index.h("clipPath", { id: `clip${index$1}` }, index.h("path", Object.assign({}, this.settings.getPartitionDraw(index$1)))));
|
|
720
722
|
})))));
|
|
721
723
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-
|
|
5
|
+
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-81cc1b36.js');
|
|
6
6
|
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-
|
|
5
|
+
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-81cc1b36.js');
|
|
6
6
|
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -82,26 +82,28 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
82
82
|
const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
83
83
|
switch (type) {
|
|
84
84
|
case 'SpinLuckyWheelRes':
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
window.postMessage({
|
|
98
|
-
type: 'ShowLuckywheelRewardModal',
|
|
99
|
-
data: {
|
|
100
|
-
PrizeMessage: prizeText,
|
|
101
|
-
HasError: hasError
|
|
85
|
+
if (this.luckywheel.Program.Id === rest.data.LotteryProgramID) {
|
|
86
|
+
const hasError = rest.success === false;
|
|
87
|
+
const index = +rest.data.Result.WheelOfFortunePartitionIndex;
|
|
88
|
+
this.spinner.halt(this.settings.getDeg(index), () => {
|
|
89
|
+
var _a;
|
|
90
|
+
this.isSpinning = false;
|
|
91
|
+
this.updateSpinable();
|
|
92
|
+
let prizeText = '';
|
|
93
|
+
if (!hasError) {
|
|
94
|
+
const partition = (_a = this.luckywheel.Program.WheelOfFortune.Partitions[index]) === null || _a === void 0 ? void 0 : _a.PrizeText;
|
|
95
|
+
prizeText = partition[this.language] || partition['*'];
|
|
96
|
+
this.luckywheel.Current.RemainingTimes = +this.luckywheel.Current.RemainingTimes - 1;
|
|
102
97
|
}
|
|
98
|
+
window.postMessage({
|
|
99
|
+
type: 'ShowLuckywheelRewardModal',
|
|
100
|
+
data: {
|
|
101
|
+
PrizeMessage: prizeText,
|
|
102
|
+
HasError: hasError
|
|
103
|
+
}
|
|
104
|
+
});
|
|
103
105
|
});
|
|
104
|
-
}
|
|
106
|
+
}
|
|
105
107
|
break;
|
|
106
108
|
}
|
|
107
109
|
}
|
|
@@ -143,26 +145,26 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
143
145
|
render() {
|
|
144
146
|
const sizeProps = { height: this.size, width: this.size };
|
|
145
147
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
146
|
-
return (h("div", { key: '
|
|
148
|
+
return (h("div", { key: '3820d08a8d1a5efc25485f446476ca06385adf8c', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: 'd6e943e251ca9d89ec9254ea8a8addfcc0780e26', width: this.size, height: this.size, ref: (el) => {
|
|
147
149
|
this.svg = el;
|
|
148
|
-
} }, h("foreignObject", Object.assign({ key: '
|
|
150
|
+
} }, h("foreignObject", Object.assign({ key: 'a7f6f5c11debf357b3a8962f19b4e22f76b9bafb' }, sizeProps, { style: foreignObjectAgentProps, class: "Bottom Customable" }), h("div", { key: '53e485d5618a95127d0665561b9b508293a07906', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '3623809f60594fffec3c1868209899a0a8217826', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: '2f94f7de9633855a9ebebdc834e8e0876b17c779', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
149
151
|
return (h("foreignObject", { "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
|
|
150
|
-
})), h("g", { key: '
|
|
152
|
+
})), h("g", { key: '46f516b004f6ac09ee29df83648f9e96c4dd3c45', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
151
153
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
152
|
-
})), h("g", { key: '
|
|
154
|
+
})), h("g", { key: 'fc9c6f8fcf6a4cd8762be0e10039277009b67ce9', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
153
155
|
return [
|
|
154
156
|
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
155
157
|
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
156
158
|
];
|
|
157
|
-
}))), h("g", { key: '
|
|
159
|
+
}))), h("g", { key: '809b6b9ac7e288e821b6eb6f6319dae5a2a45baf', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
|
|
158
160
|
return (h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
159
|
-
})), h("g", { key: '
|
|
161
|
+
})), h("g", { key: '5320636da9ef1a3e82eadccc963222c679d8bbee', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
|
|
160
162
|
return (h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
161
|
-
})), h("foreignObject", Object.assign({ key: '
|
|
163
|
+
})), h("foreignObject", Object.assign({ key: 'a664c21985e9201cd823d12026ed7e1e1d3bc7eb', class: "Middle Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468', style: foreignObjectAgentProps })), h("foreignObject", Object.assign({ key: '7ec8a7c17e18a8820e4b75726fc436bcd33154f4', class: "Top Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f', style: foreignObjectAgentProps })), h("g", { key: '13091e93777f225a52e27346a233789d1b43676f', class: { spinning: this.isSpinning, Center: true }, onClick: this.eventSpin }, h("foreignObject", { key: 'df4d32b1dea119e4d843987a2f31292d03eed485', style: {
|
|
162
164
|
width: '100px',
|
|
163
165
|
height: '100px',
|
|
164
166
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
165
|
-
} })), h("g", { key: '
|
|
167
|
+
} })), h("g", { key: '17b172145a7bb8f523f4ea4f3e70f875b565cb20' }, this.options.map((_el, index) => {
|
|
166
168
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
167
169
|
})))));
|
|
168
170
|
}
|
|
@@ -170,7 +170,7 @@ export class SvgCalc {
|
|
|
170
170
|
}
|
|
171
171
|
getDeg(index) {
|
|
172
172
|
const i = index || this.length - 1;
|
|
173
|
-
return this.findDeg(length - i, length);
|
|
173
|
+
return this.findDeg(this.length - i, this.length);
|
|
174
174
|
}
|
|
175
175
|
getSpinnerProps() {
|
|
176
176
|
const centerPoint = getSymmetricalPointFromScalar(this.center);
|
|
@@ -422,7 +422,7 @@ class SvgCalc {
|
|
|
422
422
|
}
|
|
423
423
|
getDeg(index) {
|
|
424
424
|
const i = index || this.length - 1;
|
|
425
|
-
return this.findDeg(length - i, length);
|
|
425
|
+
return this.findDeg(this.length - i, this.length);
|
|
426
426
|
}
|
|
427
427
|
getSpinnerProps() {
|
|
428
428
|
const centerPoint = getSymmetricalPointFromScalar(this.center);
|
|
@@ -633,26 +633,28 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
633
633
|
const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
634
634
|
switch (type) {
|
|
635
635
|
case 'SpinLuckyWheelRes':
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
window.postMessage({
|
|
649
|
-
type: 'ShowLuckywheelRewardModal',
|
|
650
|
-
data: {
|
|
651
|
-
PrizeMessage: prizeText,
|
|
652
|
-
HasError: hasError
|
|
636
|
+
if (this.luckywheel.Program.Id === rest.data.LotteryProgramID) {
|
|
637
|
+
const hasError = rest.success === false;
|
|
638
|
+
const index = +rest.data.Result.WheelOfFortunePartitionIndex;
|
|
639
|
+
this.spinner.halt(this.settings.getDeg(index), () => {
|
|
640
|
+
var _a;
|
|
641
|
+
this.isSpinning = false;
|
|
642
|
+
this.updateSpinable();
|
|
643
|
+
let prizeText = '';
|
|
644
|
+
if (!hasError) {
|
|
645
|
+
const partition = (_a = this.luckywheel.Program.WheelOfFortune.Partitions[index]) === null || _a === void 0 ? void 0 : _a.PrizeText;
|
|
646
|
+
prizeText = partition[this.language] || partition['*'];
|
|
647
|
+
this.luckywheel.Current.RemainingTimes = +this.luckywheel.Current.RemainingTimes - 1;
|
|
653
648
|
}
|
|
649
|
+
window.postMessage({
|
|
650
|
+
type: 'ShowLuckywheelRewardModal',
|
|
651
|
+
data: {
|
|
652
|
+
PrizeMessage: prizeText,
|
|
653
|
+
HasError: hasError
|
|
654
|
+
}
|
|
655
|
+
});
|
|
654
656
|
});
|
|
655
|
-
}
|
|
657
|
+
}
|
|
656
658
|
break;
|
|
657
659
|
}
|
|
658
660
|
}
|
|
@@ -694,26 +696,26 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
694
696
|
render() {
|
|
695
697
|
const sizeProps = { height: this.size, width: this.size };
|
|
696
698
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
697
|
-
return (h("div", { key: '
|
|
699
|
+
return (h("div", { key: '3820d08a8d1a5efc25485f446476ca06385adf8c', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: 'd6e943e251ca9d89ec9254ea8a8addfcc0780e26', width: this.size, height: this.size, ref: (el) => {
|
|
698
700
|
this.svg = el;
|
|
699
|
-
} }, h("foreignObject", Object.assign({ key: '
|
|
701
|
+
} }, h("foreignObject", Object.assign({ key: 'a7f6f5c11debf357b3a8962f19b4e22f76b9bafb' }, sizeProps, { style: foreignObjectAgentProps, class: "Bottom Customable" }), h("div", { key: '53e485d5618a95127d0665561b9b508293a07906', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '3623809f60594fffec3c1868209899a0a8217826', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: '2f94f7de9633855a9ebebdc834e8e0876b17c779', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
700
702
|
return (h("foreignObject", { "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
|
|
701
|
-
})), h("g", { key: '
|
|
703
|
+
})), h("g", { key: '46f516b004f6ac09ee29df83648f9e96c4dd3c45', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
702
704
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
703
|
-
})), h("g", { key: '
|
|
705
|
+
})), h("g", { key: 'fc9c6f8fcf6a4cd8762be0e10039277009b67ce9', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
704
706
|
return [
|
|
705
707
|
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
706
708
|
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
707
709
|
];
|
|
708
|
-
}))), h("g", { key: '
|
|
710
|
+
}))), h("g", { key: '809b6b9ac7e288e821b6eb6f6319dae5a2a45baf', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
|
|
709
711
|
return (h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
710
|
-
})), h("g", { key: '
|
|
712
|
+
})), h("g", { key: '5320636da9ef1a3e82eadccc963222c679d8bbee', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
|
|
711
713
|
return (h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
712
|
-
})), h("foreignObject", Object.assign({ key: '
|
|
714
|
+
})), h("foreignObject", Object.assign({ key: 'a664c21985e9201cd823d12026ed7e1e1d3bc7eb', class: "Middle Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468', style: foreignObjectAgentProps })), h("foreignObject", Object.assign({ key: '7ec8a7c17e18a8820e4b75726fc436bcd33154f4', class: "Top Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f', style: foreignObjectAgentProps })), h("g", { key: '13091e93777f225a52e27346a233789d1b43676f', class: { spinning: this.isSpinning, Center: true }, onClick: this.eventSpin }, h("foreignObject", { key: 'df4d32b1dea119e4d843987a2f31292d03eed485', style: {
|
|
713
715
|
width: '100px',
|
|
714
716
|
height: '100px',
|
|
715
717
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
716
|
-
} })), h("g", { key: '
|
|
718
|
+
} })), h("g", { key: '17b172145a7bb8f523f4ea4f3e70f875b565cb20' }, this.options.map((_el, index) => {
|
|
717
719
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
718
720
|
})))));
|
|
719
721
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-
|
|
1
|
+
export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-ddd29595.js';
|
|
2
2
|
import './index-48c42d04.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CasinoEngagementSuiteLuckywheel } from './casino-engagement-suite-luckywheel-
|
|
1
|
+
export { C as CasinoEngagementSuiteLuckywheel } from './casino-engagement-suite-luckywheel-ddd29595.js';
|
|
2
2
|
import './index-48c42d04.js';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{C as casino_engagement_suite_luckywheel}from"./p-a50d208a.js";import"./p-7d1170ae.js";
|