(function(){"use strict";function e(e){var t="wheel";var i,n;e.event.special.mousewheel={setup:function(){if(this.addEventListener){this.addEventListener(t,l,false)}else{this.onmousewheel=l}},teardown:function(){if(this.removeEventListener){this.removeEventListener(t,l,false)}else{this.onmousewheel=null}}};function l(t){var l=t||window.event,s=[].slice.call(arguments,1),f=0,h=0,o=0,u=0;t=e.event.fix(l);t.type="mousewheel";if("detail"in l){o=l.detail*-1}if("wheelDelta"in l){o=l.wheelDelta}if("wheelDeltaY"in l){o=l.wheelDeltaY}if("wheelDeltaX"in l){h=l.wheelDeltaX*-1}if("axis"in l&&l.axis===l.HORIZONTAL_AXIS){h=o*-1;o=0}f=o===0?h:o;if("deltaY"in l){o=l.deltaY*-1;f=o}if("deltaX"in l){h=l.deltaX;if(o===0){f=h*-1}}if(o===0&&h===0){return undefined}u=Math.max(Math.abs(o),Math.abs(h));if(!n||u<n){n=u}f=Math[f>=1?"floor":"ceil"](f/n);h=Math[h>=1?"floor":"ceil"](h/n);o=Math[o>=1?"floor":"ceil"](o/n);t.delta=f;t.deltaX=h;t.deltaY=o;s.unshift(t,f,h,o);if(i){clearTimeout(i)}i=setTimeout(a,200);return(e.event.dispatch||e.event.handle).apply(this,s)}function a(){n=null}}u8.Base._Window.extend("mousewheel",function(t){var i=t.$;if(i){e(i)}})})();