芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/lupusm.pulsehost.co.uk/wp-content/plugins/uicore-animate/assets/js/scroll.js
function _defineProperty(t,e,i){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var i=0;i
{"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):("undefined"!=typeof globalThis?globalThis:self).Lenis=t()})(function(){function p(t,e,i){return Math.max(t,Math.min(e,i))}var w=(()=>_createClass(function t(){_classCallCheck(this,t)},[{key:"advance",value:function(t){var e,i,n,o,s;this.isRunning&&(e=!1,this.lerp?(this.value=(i=this.value,n=this.to,o=60*this.lerp,s=t,i=i,n=n,(1-(o=1-Math.exp(-o*s)))*i+o*n),Math.round(this.value)===this.to&&(this.value=this.to,e=!0)):(this.currentTime+=t,i=(e=1<=(s=p(0,this.currentTime/this.duration,1)))?1:this.easing(s),this.value=this.from+(this.to-this.from)*i),null!=(o=this.onUpdate)&&o.call(this,this.value,e),e)&&this.stop()}},{key:"stop",value:function(){this.isRunning=!1}},{key:"fromTo",value:function(t,e,i){var n=i.lerp,n=void 0===n?.1:n,o=i.duration,o=void 0===o?1:o,s=i.easing,s=void 0===s?function(t){return t}:s,r=i.onStart,i=i.onUpdate;this.from=this.value=t,this.to=e,this.lerp=n,this.duration=o,this.easing=s,this.currentTime=0,this.isRunning=!0,null!=r&&r(),this.onUpdate=i}}]))();var b=(()=>_createClass(function t(){var i,n,o,e=this,s=0
_createClass(function t(){_classCallCheck(this,t),this.events={}},[{key:"emit",value:function(t){for(var e=this.events[t]||[],i=arguments.length,n=new Array(1
_createClass(function t(e,i){var s=this,n=i.wheelMultiplier,n=void 0===n?1:n,o=i.touchMultiplier,o=void 0===o?2:o,i=i.normalizeWheel,i=void 0!==i&&i;_classCallCheck(this,t),_defineProperty(this,"onTouchStart",function(t){var e=(i=t.targetTouches?t.targetTouches[0]:t).clientX,i=i.clientY;s.touchStart.x=e,s.touchStart.y=i,s.lastDelta={x:0,y:0},s.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})}),_defineProperty(this,"onTouchMove",function(t){var e=(i=t.targetTouches?t.targetTouches[0]:t).clientX,i=i.clientY,n=-(e-s.touchStart.x)*s.touchMultiplier,o=-(i-s.touchStart.y)*s.touchMultiplier;s.touchStart.x=e,s.touchStart.y=i,s.lastDelta={x:n,y:o},s.emitter.emit("scroll",{deltaX:n,deltaY:o,event:t})}),_defineProperty(this,"onTouchEnd",function(t){s.emitter.emit("scroll",{deltaX:s.lastDelta.x,deltaY:s.lastDelta.y,event:t})}),_defineProperty(this,"onWheel",function(t){var e=t.deltaX,i=t.deltaY;s.normalizeWheel&&(e=p(-100,e,100),i=p(-100,i,100)),e*=s.wheelMultiplier,i*=s.wheelMultiplier,s.emitter.emit("scroll",{deltaX:e,deltaY:i,event:t})}),this.element=e,this.wheelMultiplier=n,this.touchMultiplier=o,this.normalizeWheel=i,this.touchStart={x:null,y:null},this.emitter=new k,this.element.addEventListener("wheel",this.onWheel,{passive:!1}),this.element.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.addEventListener("touchend",this.onTouchEnd,{passive:!1})},[{key:"on",value:function(t,e){return this.emitter.on(t,e)}},{key:"destroy",value:function(){this.emitter.destroy(),this.element.removeEventListener("wheel",this.onWheel,{passive:!1}),this.element.removeEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.removeEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.removeEventListener("touchend",this.onTouchEnd,{passive:!1})}}]))();return(()=>_createClass(function t(){var r=this,e=0
Math.abs(o)?s:o:"horizontal"===r.options.gestureOrientation&&(e=o),s=i&&r.options.syncTouch,(o=i&&"touchend"===t.type&&5