芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/clients/carotiti/wp-content/themes/boal/assets/js/plugins/jquery.nanoscroller.min.js
!function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=t(require("jquery"),window,document):t(jQuery,window,document)}(function(t,e,i){"use strict";var s,o,n,l,r,h,c,a,p,d,u,g,v,f,S,m,T,y,b,w,x,$,C,H,O,A,E;w={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},S="scroll",c="mousedown",a="mouseenter",p="mousemove",u="mousewheel",d="mouseup",f="resize",r="drag",h="enter",T="up",v="panedown",n="DOMMouseScroll",l="down",y="wheel",m="touchmove",s="Microsoft Internet Explorer"===e.navigator.appName&&/msie 7./i.test(e.navigator.appVersion)&&e.ActiveXObject,o=null,H=e.requestAnimationFrame,b=e.cancelAnimationFrame,A=i.createElement("div").style,E=function(){var t,e,i,s;for(t=i=0,s=(e=["t","webkitT","MozT","msT","OT"]).length;s>i;t=++i)if(e[t],e[t]+"ransform"in A)return e[t].substr(0,e[t].length-1);return!1}(),O=function(t){return!1!==E&&(""===E?t:E+t.charAt(0).toUpperCase()+t.substr(1))}("transform"),$=!1!==O,x=function(){var t,e,s;return t=i.createElement("div"),e=t.style,e.position="absolute",e.width="100px",e.height="100px",e.overflow=S,e.top="-9999px",i.body.appendChild(t),s=t.offsetWidth-t.clientWidth,i.body.removeChild(t),s},C=function(){var t,i,s;return i=e.navigator.userAgent,!!(t=/(?=.+Mac OS X)(?=.+Firefox)/.test(i))&&((s=/Firefox\/\d{2}\./.exec(i))&&(s=s[0].replace(/\D+/g,"")),t&&+s>23)},g=function(){function g(s,n){this.el=s,this.options=n,o||(o=x()),this.$el=t(this.el),this.doc=t(this.options.documentContext||i),this.win=t(this.options.windowContext||e),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return g.prototype.preventScrolling=function(t,e){if(this.isActive)if(t.type===n)(e===l&&t.originalEvent.detail>0||e===T&&t.originalEvent.detail<0)&&t.preventDefault();else if(t.type===u){if(!t.originalEvent||!t.originalEvent.wheelDelta)return;(e===l&&t.originalEvent.wheelDelta<0||e===T&&t.originalEvent.wheelDelta>0)&&t.preventDefault()}},g.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},g.prototype.updateScrollValues=function(){var t,e;t=this.content,this.maxScrollTop=t.scrollHeight-t.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=t.scrollTop,e=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop
=t.maxScrollTop&&t.prevScrollTop!==t.maxScrollTop?t.$el.trigger("scrollend"):0===t.contentScrollTop&&0!==t.prevScrollTop&&t.$el.trigger("scrolltop"),!1}}(this),up:function(t){return function(e){return t.isBeingDragged=!1,t.pane.removeClass(t.options.activeClass),t.doc.unbind(p,t.events[r]).unbind(d,t.events[T]),t.body.unbind(a,t.events[h]),!1}}(this),resize:function(t){return function(e){t.reset()}}(this),panedown:function(t){return function(e){return t.sliderY=(e.offsetY||e.originalEvent.layerY)-.5*t.sliderHeight,t.scroll(),t.events.down(e),!1}}(this),scroll:function(t){return function(e){t.updateScrollValues(),t.isBeingDragged||(t.iOSNativeScrolling||(t.sliderY=t.sliderTop,t.setOnScrollStyles()),null!=e&&(t.contentScrollTop>=t.maxScrollTop?(t.options.preventPageScrolling&&t.preventScrolling(e,l),t.prevScrollTop!==t.maxScrollTop&&t.$el.trigger("scrollend")):0===t.contentScrollTop&&(t.options.preventPageScrolling&&t.preventScrolling(e,T),0!==t.prevScrollTop&&t.$el.trigger("scrolltop"))))}}(this),wheel:function(t){return function(e){var i;if(null!=e)return(i=e.delta||e.wheelDelta||e.originalEvent&&e.originalEvent.wheelDelta||-e.detail||e.originalEvent&&-e.originalEvent.detail)&&(t.sliderY+=-i/3),t.scroll(),!1}}(this),enter:function(t){return function(e){var i;if(t.isBeingDragged)return 1!==(e.buttons||e.which)?(i=t.events)[T].apply(i,arguments):void 0}}(this)}},g.prototype.addEvents=function(){var t;this.removeEvents(),t=this.events,this.options.disableResize||this.win.bind(f,t[f]),this.iOSNativeScrolling||(this.slider.bind(c,t[l]),this.pane.bind(c,t[v]).bind(u+" "+n,t[y])),this.$content.bind(S+" "+u+" "+n+" "+m,t[S])},g.prototype.removeEvents=function(){var t;t=this.events,this.win.unbind(f,t[f]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(S+" "+u+" "+n+" "+m,t[S])},g.prototype.generate=function(){var t,i,s,n,l,r;return s=this.options,l=s.paneClass,r=s.sliderClass,s.contentClass,(n=this.$el.children("."+l)).length||n.children("."+r).length||this.$el.append('
'),this.pane=this.$el.children("."+l),this.slider=this.pane.find("."+r),0===o&&C()?(i=e.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),t={right:-14,paddingRight:+i+14}):o&&(t={right:-o},this.$el.addClass(s.enabledClass)),null!=t&&this.$content.css(t),this},g.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},g.prototype.reset=function(){var t,e,i,n,l,r,h,c,a,p,d,u;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),t=this.content,n=t.style,l=n.overflowY,s&&this.$content.css({height:this.$content.height()}),e=t.scrollHeight+o,(p=parseInt(this.$el.css("max-height"),10))>0&&(this.$el.height(""),this.$el.height(t.scrollHeight>p?p:t.scrollHeight)),h=this.pane.outerHeight(!1),a=parseInt(this.pane.css("top"),10),r=parseInt(this.pane.css("bottom"),10),c=h+a+r,u=Math.round(c/e*h),u
this.options.sliderMaxHeight&&(u=this.options.sliderMaxHeight),l===S&&n.overflowX!==S&&(u+=o),this.maxSliderTop=c-u,this.contentHeight=e,this.paneHeight=h,this.paneOuterHeight=c,this.sliderHeight=u,this.paneTop=a,this.slider.height(u),this.events.scroll(),this.pane.show(),this.isActive=!0,t.scrollHeight===t.clientHeight||this.pane.outerHeight(!0)>=t.scrollHeight&&l!==S?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===t.scrollHeight&&l===S?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),("static"===(i=this.$content.css("position"))||"relative"===i)&&(d=parseInt(this.$content.css("right"),10))&&this.$content.css({right:"",marginRight:d}),this)},g.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},g.prototype.scrollBottom=function(t){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-t).trigger(u),this.stop().restore(),this):void 0},g.prototype.scrollTop=function(t){return this.isActive?(this.$content.scrollTop(+t).trigger(u),this.stop().restore(),this):void 0},g.prototype.scrollTo=function(t){return this.isActive?(this.scrollTop(this.$el.find(t).get(0).offsetTop),this):void 0},g.prototype.stop=function(){return b&&this.scrollRAF&&(b(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},g.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),s&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},g.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout(function(t){return function(){t.pane.removeClass(t.options.flashedClass)}}(this),this.options.flashDelay),this):void 0},g}(),t.fn.nanoScroller=function(e){return this.each(function(){var i,s;if((s=this.nanoscroller)||(i=t.extend({},w,e),this.nanoscroller=s=new g(this,i)),e&&"object"==typeof e){if(t.extend(s.options,e),null!=e.scrollBottom)return s.scrollBottom(e.scrollBottom);if(null!=e.scrollTop)return s.scrollTop(e.scrollTop);if(e.scrollTo)return s.scrollTo(e.scrollTo);if("bottom"===e.scroll)return s.scrollBottom(0);if("top"===e.scroll)return s.scrollTop(0);if(e.scroll&&e.scroll instanceof t)return s.scrollTo(e.scroll);if(e.stop)return s.stop();if(e.destroy)return s.destroy();if(e.flash)return s.flash()}return s.reset()})},t.fn.nanoScroller.Constructor=g});