class FlipJackpotNumbers{constructor({node:e,from:t,seperateOnly:n}){this.node=e,this.currentValue=String(Math.max(1,t||1)),this.seperateOnly=n||0,this.animationFrame=null,this.init()}init(){this.updateDisplay(this.currentValue)}updateDisplay(e){if(!this.node)return;let t=Math.max(1,Math.floor(parseFloat(e)||1));let s=String(t).replace(/^0+/,"").split("");if(s.length===0)s=["1"];let n=Array.from(this.node.children).filter(e=>e.classList.contains("component_jackpot_slider_number_wrapper"));if(n.length===0)return;let i=s.length-1,u=n.length-s.length;for(let e=n.length-1;e>=0;e--){let r=0;if(i>=0){let a=parseInt(s[i]);isNaN(a)||(r=a),i--}let o=n[e];if(er&&r>=0){let e=-r*(window.innerWidth<=767?15:45);o.style.transform=`translateY(${e}px)`,o.style.transition="transform 0.6s cubic-bezier(0.4, 0, 0.2, 1)",o.classList.remove("hide")}}let c=this.node.querySelector(".sprtr");c&&(c.style.display=this.seperateOnly>0?"inline-block":"none")}flipTo({to:e,direct:t=!1}){let n=parseFloat(this.currentValue)||0,s=parseFloat(e)||0;if(n===s)return void this.updateDisplay(s);if(n<=0)n=Math.max(1,Math.floor(s*0.7));if(t){this.currentValue=String(s),this.updateDisplay(s);return}let i=s>n?1:-1,o=Math.abs(s-n),r=Math.min(Math.max(o/50,1),50),a=n;const c=()=>{a+=i*r,i>0?a>=s&&(a=s):a<=s&&(a=s),this.currentValue=String(Math.floor(Math.max(1,a))),this.updateDisplay(this.currentValue),a!==s?(this.animationFrame=requestAnimationFrame(c)):(this.currentValue=String(s),this.updateDisplay(s))};this.animationFrame=requestAnimationFrame(c)}destroy(){this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.node=null}}class Jackpot{"use strict";constructor({contNodeId:e,jackpotNodesClass:t,jackpotNumbers:n,jackpotType:s,stepCount:o,digitsAfterPoint:i}){if(this.contNode=document.getElementById(e),this.contNode.Jackpot=this,this.flipInterval=0,this.contNode===void 0)return;if(this.jackpotNodes=this.contNode.getElementsByClassName(t),this.jackpotNodes===void 0||this.jackpotNodes.length==0)return;this.jackpotNumbers=n,this.jackpotType=s,this.digitsAfterPoint=i,this.stepCount=this.#calculateFirstStepCount(this.jackpotNumbers,this.digitsAfterPoint),this.#startJack(this.jackpotNodes,this.jackpotNumbers)}#calculateFirstStepCount(e,t){let s=0;for(const t of e)(s==0||parseInt(t)1e4?1e4:n;case 2:return n>1e5?1e5:n;case 3:return n>1e6?1e6:n;case 4:return n>1e7?1e7:n;default:return n>1e3?1e3:n}}#startJack(e,t){let n=e.length;for(let s=0;sthis.stepCount?i-this.stepCount:Math.max(3,Math.floor(i*0.85));let a=String(r);if(a.lengtho?(t[s].jackWon=!0,t[s].classList.add("blink")):(t[s].jackWon&&(t[s].jackpot.destroy(),t[s].jackpot=new FlipJackpotNumbers({node:t[s],from:Math.max(1,i),seperateOnly:this.digitsAfterPoint}),t[s].jackWon=!1),(t[s].number-this.stepCount).toString().length{let e=this;$.ajax({url:"/Common/GetJack?type="+e.jackpotType,type:"POST",datatype:"json",showLoader:!1,success:function(n){n!=""&&n.length>0&&e.#flip(n,t)}})},30050)}destroy(){let e=this.jackpotNodes.length;if(e>0)for(let t=0;t