File: /home/salamatk/takarzan.ir/wp-content/themes/xts-luman/js/parallax-scroll.min.js
(q=>{q(function(){q(window).width()<=1024||!q("body").hasClass("elementor-editor-active")&&0===q(".xts-parallax-on-scroll").length||t.init()});var t={showLogs:!1,round:1e3,init:function(){this._log("init"),this._inited?(this._log("Already Inited"),this._inited=!0):(this._requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t,e){window.setTimeout(t,1e3/60)},this._onScroll(!0))},_inited:!1,_properties:["x","y","z","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","scale"],_requestAnimationFrame:null,_log:function(t){this.showLogs&&console.log("Parallax Scroll / "+t)},_onScroll:function(_){var Q=q(document).scrollTop(),b=q(window).height();this._log("onScroll "+Q),q(".xts-parallax-on-scroll").each(q.proxy(function(t,e){for(var u=q(e),i=[],o=!1,n=u.data("style"),a=(null==n&&(n=u.attr("style")||"",u.data("style",n)),u.attr("class").split(" ")),s=[[]],t=0;t<a.length;t++)0<=a[t].indexOf("xts_scroll")&&(d=a[t].split("_"),s[0][d[2]]=d[3]);for(h=2;u.data("parallax"+h);h++)s.push(u.data("parallax-"+h));for(var r,l,c=s.length,h=0;h<c;h++){var d,f,p,M,m=(d=s[h])["from-scroll"],w=(null==m&&(m=Math.max(0,q(e).offset().top-b)),m|=0,d.distance),g=d["to-scroll"],I=(null==w&&null==g&&(w=b),w=Math.max(0|w,1),d.easing),x=d["easing-return"],y=(null!=I&&q.easing&&q.easing[I]||(I=null),null!=x&&q.easing&&q.easing[x]||(x=I),I&&(null==(f=d.duration)&&(f=w),f=Math.max(0|f,1),null==(p=d["duration-return"])&&(p=f),w=1,null==(M=u.data("current-time")))&&(M=0),null==g&&(g=m+w),g|=0,d.smoothness),O=(null==y&&(y=30),y|=0,!_&&0!=y||(y=1),y|=0,Q),O=Math.max(O,m);O=Math.min(O,g),I&&(null==u.data("sens")&&u.data("sens","back"),m<O&&("back"==u.data("sens")?(M=1,u.data("sens","go")):M++),O<g&&("go"==u.data("sens")?(M=1,u.data("sens","back")):M++),_&&(M=f),u.data("current-time",M)),this._properties.map(q.proxy(function(t){var e,n,a,s=0,r=d[t];null!=r&&("scale"==t||"scaleX"==t||"scaleY"==t||"scaleZ"==t?s=1:r|=0,a=(e=null==(e=u.data("_"+t))?s:e)+((n=(O-m)/(g-m)*(r-s)+s)-e)/y,I&&0<M&&M<=f&&(s=s,"back"==u.data("sens")&&(r=-(s=r),I=x,f=p),a=q.easing[I](null,M,s,r,f)),(a=Math.ceil(a*this.round)/this.round)==e&&n==r&&(a=r),i[t]||(i[t]=0),i[t]+=a,e!=i[t])&&(u.data("_"+t,i[t]),o=!0)},this))}o&&(null!=i.z&&(null==(l=d.perspective)&&(l=800),(r=u.parent()).data("style")||r.data("style",r.attr("style")||""),r.attr("style","perspective:"+l+"px; -webkit-perspective:"+l+"px; "+r.data("style"))),null==i.scaleX&&(i.scaleX=1),null==i.scaleY&&(i.scaleY=1),null==i.scaleZ&&(i.scaleZ=1),null!=i.scale&&(i.scaleX*=i.scale,i.scaleY*=i.scale,i.scaleZ*=i.scale),this._log(l="translate3d("+(i.x||0)+"px, "+(i.y||0)+"px, "+(i.z||0)+"px)"+" "+("rotateX("+(i.rotateX||0)+"deg) rotateY("+(i.rotateY||0)+"deg) rotateZ("+(i.rotateZ||0)+"deg)")+" "+("scaleX("+i.scaleX+") scaleY("+i.scaleY+") scaleZ("+i.scaleZ+")")+";"),u.attr("style","transform:"+l+" -webkit-transform:"+l+" "+n))},this)),window.requestAnimationFrame?window.requestAnimationFrame(q.proxy(this._onScroll,this,!1)):this._requestAnimationFrame(q.proxy(this._onScroll,this,!1))}}})(jQuery),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(t,e,n,a,s){return jQuery.easing[jQuery.easing.def](t,e,n,a,s)},easeInQuad:function(t,e,n,a,s){return a*(e/=s)*e+n},easeOutQuad:function(t,e,n,a,s){return-a*(e/=s)*(e-2)+n},easeInOutQuad:function(t,e,n,a,s){return(e/=s/2)<1?a/2*e*e+n:-a/2*(--e*(e-2)-1)+n},easeInCubic:function(t,e,n,a,s){return a*(e/=s)*e*e+n},easeOutCubic:function(t,e,n,a,s){return a*((e=e/s-1)*e*e+1)+n},easeInOutCubic:function(t,e,n,a,s){return(e/=s/2)<1?a/2*e*e*e+n:a/2*((e-=2)*e*e+2)+n},easeInQuart:function(t,e,n,a,s){return a*(e/=s)*e*e*e+n},easeOutQuart:function(t,e,n,a,s){return-a*((e=e/s-1)*e*e*e-1)+n},easeInOutQuart:function(t,e,n,a,s){return(e/=s/2)<1?a/2*e*e*e*e+n:-a/2*((e-=2)*e*e*e-2)+n},easeInQuint:function(t,e,n,a,s){return a*(e/=s)*e*e*e*e+n},easeOutQuint:function(t,e,n,a,s){return a*((e=e/s-1)*e*e*e*e+1)+n},easeInOutQuint:function(t,e,n,a,s){return(e/=s/2)<1?a/2*e*e*e*e*e+n:a/2*((e-=2)*e*e*e*e+2)+n},easeInSine:function(t,e,n,a,s){return-a*Math.cos(e/s*(Math.PI/2))+a+n},easeOutSine:function(t,e,n,a,s){return a*Math.sin(e/s*(Math.PI/2))+n},easeInOutSine:function(t,e,n,a,s){return-a/2*(Math.cos(Math.PI*e/s)-1)+n},easeInExpo:function(t,e,n,a,s){return 0==e?n:a*Math.pow(2,10*(e/s-1))+n},easeOutExpo:function(t,e,n,a,s){return e==s?n+a:a*(1-Math.pow(2,-10*e/s))+n},easeInOutExpo:function(t,e,n,a,s){return 0==e?n:e==s?n+a:(e/=s/2)<1?a/2*Math.pow(2,10*(e-1))+n:a/2*(2-Math.pow(2,-10*--e))+n},easeInCirc:function(t,e,n,a,s){return-a*(Math.sqrt(1-(e/=s)*e)-1)+n},easeOutCirc:function(t,e,n,a,s){return a*Math.sqrt(1-(e=e/s-1)*e)+n},easeInOutCirc:function(t,e,n,a,s){return(e/=s/2)<1?-a/2*(Math.sqrt(1-e*e)-1)+n:a/2*(Math.sqrt(1-(e-=2)*e)+1)+n},easeInElastic:function(t,e,n,a,s){var r=1.70158,u=0,i=a;return 0==e?n:1==(e/=s)?n+a:(u=u||.3*s,r=i<Math.abs(a)?(i=a,u/4):u/(2*Math.PI)*Math.asin(a/i),-(i*Math.pow(2,10*--e)*Math.sin(2*Math.PI*(e*s-r)/u))+n)},easeOutElastic:function(t,e,n,a,s){var r=1.70158,u=0,i=a;return 0==e?n:1==(e/=s)?n+a:(u=u||.3*s,r=i<Math.abs(a)?(i=a,u/4):u/(2*Math.PI)*Math.asin(a/i),i*Math.pow(2,-10*e)*Math.sin(2*Math.PI*(e*s-r)/u)+a+n)},easeInOutElastic:function(t,e,n,a,s){var r=1.70158,u=0,i=a;return 0==e?n:2==(e/=s/2)?n+a:(u=u||s*(.3*1.5),r=i<Math.abs(a)?(i=a,u/4):u/(2*Math.PI)*Math.asin(a/i),e<1?i*Math.pow(2,10*--e)*Math.sin(2*Math.PI*(e*s-r)/u)*-.5+n:i*Math.pow(2,-10*--e)*Math.sin(2*Math.PI*(e*s-r)/u)*.5+a+n)},easeInBack:function(t,e,n,a,s,r){return a*(e/=s)*e*(((r=null==r?1.70158:r)+1)*e-r)+n},easeOutBack:function(t,e,n,a,s,r){return a*((e=e/s-1)*e*(((r=null==r?1.70158:r)+1)*e+r)+1)+n},easeInOutBack:function(t,e,n,a,s,r){return null==r&&(r=1.70158),(e/=s/2)<1?a/2*(e*e*((1+(r*=1.525))*e-r))+n:a/2*((e-=2)*e*((1+(r*=1.525))*e+r)+2)+n},easeInBounce:function(t,e,n,a,s){return a-jQuery.easing.easeOutBounce(t,s-e,0,a,s)+n},easeOutBounce:function(t,e,n,a,s){return(e/=s)<1/2.75?a*(7.5625*e*e)+n:e<2/2.75?a*(7.5625*(e-=1.5/2.75)*e+.75)+n:e<2.5/2.75?a*(7.5625*(e-=2.25/2.75)*e+.9375)+n:a*(7.5625*(e-=2.625/2.75)*e+.984375)+n},easeInOutBounce:function(t,e,n,a,s){return e<s/2?.5*jQuery.easing.easeInBounce(t,2*e,0,a,s)+n:.5*jQuery.easing.easeOutBounce(t,2*e-s,0,a,s)+.5*a+n}});