1/*! 2 * jScrollPane - v2.0.21 - 2015-02-24 3 * http://jscrollpane.kelvinluck.com/ 4 * 5 * Copyright (c) 2014 Kelvin Luck 6 * Dual licensed under the MIT or GPL licenses. 7 */ 8(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?module.exports=n(require("jquery")):n(jQuery)})(function(n){n.fn.jScrollPane=function(t){function i(t,i){function ci(i){var s,k,d,v,y,b,g=!1,nt=!1;if(r=i,f===undefined)y=t.scrollTop(),b=t.scrollLeft(),t.css({overflow:"hidden",padding:0}),o=t.innerWidth()+it,e=t.innerHeight(),t.width(o),f=n('<div class="jspPane" />').css("padding",oi).append(t.children()),u=n('<div class="jspContainer" />').css({width:o+"px",height:e+"px"}).append(f).appendTo(t);else{if(t.css("width",""),g=r.stickToBottom&&fr(),nt=r.stickToRight&&er(),v=t.innerWidth()+it!=o||t.outerHeight()!=e,v&&(o=t.innerWidth()+it,e=t.innerHeight(),u.css({width:o+"px",height:e+"px"})),!v&&vi==a&&f.outerHeight()==l){t.width(o);return}vi=a;f.css("width","");t.width(o);u.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}f.css("overflow","auto");a=i.contentWidth?i.contentWidth:f[0].scrollWidth;l=f[0].scrollHeight;f.css("overflow","");fi=a/o;kt=l/e;w=kt>1;p=fi>1;p||w?(t.addClass("jspScrollable"),s=r.maintainPosition&&(h||c),s&&(k=ft(),d=et()),di(),gi(),nr(),s&&(at(nt?a-o:k,!1),ut(g?l-e:d,!1)),hr(),or(),pr(),r.enableKeyboardNavigation&&lr(),r.clickOnTrack&&ir(),vr(),r.hijackInternalLinks&&yr()):(t.removeClass("jspScrollable"),f.css({top:0,left:0,width:u.width()-it}),sr(),cr(),ar(),bi());r.autoReinitialise&&!ct?ct=setInterval(function(){ci(r)},r.autoReinitialiseDelay):!r.autoReinitialise&&ct&&clearInterval(ct);y&&t.scrollTop(0)&&ut(y,!1);b&&t.scrollLeft(0)&&at(b,!1);t.trigger("jsp-initialised",[p||w])}function di(){w&&(u.append(n('<div class="jspVerticalBar" />').append(n('<div class="jspCap jspCapTop" />'),n('<div class="jspTrack" />').append(n('<div class="jspDrag" />').append(n('<div class="jspDragTop" />'),n('<div class="jspDragBottom" />'))),n('<div class="jspCap jspCapBottom" />'))),dt=u.find(">.jspVerticalBar"),k=dt.find(">.jspTrack"),v=k.find(">.jspDrag"),r.showArrows&&(yt=n('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",rt(0,-1)).bind("click.jsp",vt),pt=n('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",rt(0,1)).bind("click.jsp",vt),r.arrowScrollOnHover&&(yt.bind("mouseover.jsp",rt(0,-1,yt)),pt.bind("mouseover.jsp",rt(0,1,pt))),wi(k,r.verticalArrowPositions,yt,pt)),ht=e,u.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){ht-=n(this).outerHeight()}),v.hover(function(){v.addClass("jspHover")},function(){v.removeClass("jspHover")}).bind("mousedown.jsp",function(t){n("html").bind("dragstart.jsp selectstart.jsp",vt);v.addClass("jspActive");var i=t.pageY-v.position().top;return n("html").bind("mousemove.jsp",function(n){st(n.pageY-i,!1)}).bind("mouseup.jsp mouseleave.jsp",ki),!1}),yi())}function yi(){k.height(ht+"px");h=0;ei=r.verticalGutter+k.outerWidth();f.width(o-ei-it);try{dt.position().left===0&&f.css("margin-left",ei+"px")}catch(n){}}function gi(){p&&(u.append(n('<div class="jspHorizontalBar" />').append(n('<div class="jspCap jspCapLeft" />'),n('<div class="jspTrack" />').append(n('<div class="jspDrag" />').append(n('<div class="jspDragLeft" />'),n('<div class="jspDragRight" />'))),n('<div class="jspCap jspCapRight" />'))),gt=u.find(">.jspHorizontalBar"),d=gt.find(">.jspTrack"),y=d.find(">.jspDrag"),r.showArrows&&(wt=n('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",rt(-1,0)).bind("click.jsp",vt),bt=n('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",rt(1,0)).bind("click.jsp",vt),r.arrowScrollOnHover&&(wt.bind("mouseover.jsp",rt(-1,0,wt)),bt.bind("mouseover.jsp",rt(1,0,bt))),wi(d,r.horizontalArrowPositions,wt,bt)),y.hover(function(){y.addClass("jspHover")},function(){y.removeClass("jspHover")}).bind("mousedown.jsp",function(t){n("html").bind("dragstart.jsp selectstart.jsp",vt);y.addClass("jspActive");var i=t.pageX-y.position().left;return n("html").bind("mousemove.jsp",function(n){lt(n.pageX-i,!1)}).bind("mouseup.jsp mouseleave.jsp",ki),!1}),ot=u.innerWidth(),pi())}function pi(){u.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){ot-=n(this).outerWidth()});d.width(ot+"px");c=0}function nr(){if(p&&w){var t=d.outerHeight(),i=k.outerWidth();ht-=t;n(gt).find(">.jspCap:visible,>.jspArrow").each(function(){ot+=n(this).outerWidth()});ot-=i;e-=i;o-=t;d.parent().append(n('<div class="jspCorner" />').css("width",t+"px"));yi();pi()}p&&f.width(u.outerWidth()-it+"px");l=f.outerHeight();kt=l/e;p&&(tt=Math.ceil(1/fi*ot),tt>r.horizontalDragMaxWidth?tt=r.horizontalDragMaxWidth:tt<r.horizontalDragMinWidth&&(tt=r.horizontalDragMinWidth),y.width(tt+"px"),g=ot-tt,ai(c));w&&(nt=Math.ceil(1/kt*ht),nt>r.verticalDragMaxHeight?nt=r.verticalDragMaxHeight:nt<r.verticalDragMinHeight&&(nt=r.verticalDragMinHeight),v.height(nt+"px"),b=ht-nt,li(h))}function wi(n,t,i,r){var u="before",f="after",e;t=="os"&&(t=/Mac/.test(navigator.platform)?"after":"split");t==u?f=t:t==f&&(u=t,e=i,i=r,r=e);n[u](i)[f](r)}function rt(n,t,i){return function(){return tr(n,t,this,i),this.blur(),!1}}function tr(t,i,u,f){u=n(u).addClass("jspActive");var o,e,h=!0,c=function(){t!==0&&s.scrollByX(t*r.arrowButtonSpeed);i!==0&&s.scrollByY(i*r.arrowButtonSpeed);e=setTimeout(c,h?r.initialDelay:r.arrowRepeatFreq);h=!1};c();
8o=f?"mouseout.jsp":"mouseup.jsp";f=f||n("html");f.bind(o,function(){u.removeClass("jspActive");e&&clearTimeout(e);e=null;f.unbind(o)})}function ir(){bi();w&&k.bind("mousedown.jsp",function(t){if(t.originalTarget===undefined||t.originalTarget==t.currentTarget){var f=n(this),v=f.offset(),o=t.pageY-v.top-h,i,c=!0,a=function(){var p=f.offset(),n=t.pageY-p.top-nt/2,v=e*r.scrollPagePercent,y=b*v/(l-e);if(o<0)h-y>n?s.scrollByY(-v):st(n);else if(o>0)h+y<n?s.scrollByY(v):st(n);else{u();return}i=setTimeout(a,c?r.initialDelay:r.trackClickRepeatFreq);c=!1},u=function(){i&&clearTimeout(i);i=null;n(document).unbind("mouseup.jsp",u)};return a(),n(document).bind("mouseup.jsp",u),!1}});p&&d.bind("mousedown.jsp",function(t){if(t.originalTarget===undefined||t.originalTarget==t.currentTarget){var f=n(this),v=f.offset(),e=t.pageX-v.left-c,i,h=!0,l=function(){var p=f.offset(),n=t.pageX-p.left-tt/2,v=o*r.scrollPagePercent,y=g*v/(a-o);if(e<0)c-y>n?s.scrollByX(-v):lt(n);else if(e>0)c+y<n?s.scrollByX(v):lt(n);else{u();return}i=setTimeout(l,h?r.initialDelay:r.trackClickRepeatFreq);h=!1},u=function(){i&&clearTimeout(i);i=null;n(document).unbind("mouseup.jsp",u)};return l(),n(document).bind("mouseup.jsp",u),!1}})}function bi(){d&&d.unbind("mousedown.jsp");k&&k.unbind("mousedown.jsp")}function ki(){n("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");v&&v.removeClass("jspActive");y&&y.removeClass("jspActive")}function st(n,t){w&&(n<0?n=0:n>b&&(n=b),t===undefined&&(t=r.animateScroll),t?s.animate(v,"top",n,li):(v.css("top",n),li(n)))}function li(n){n===undefined&&(n=v.position().top);u.scrollTop(0);h=n||0;var i=h===0,r=h==b,s=n/b,o=-s*(l-e);(ni!=i||ii!=r)&&(ni=i,ii=r,t.trigger("jsp-arrow-change",[ni,ii,ti,ri]));rr(i,r);f.css("top",o);t.trigger("jsp-scroll-y",[-o,i,r]).trigger("scroll")}function lt(n,t){p&&(n<0?n=0:n>g&&(n=g),t===undefined&&(t=r.animateScroll),t?s.animate(y,"left",n,ai):(y.css("left",n),ai(n)))}function ai(n){n===undefined&&(n=y.position().left);u.scrollTop(0);c=n||0;var i=c===0,r=c==g,s=n/g,e=-s*(a-o);(ti!=i||ri!=r)&&(ti=i,ri=r,t.trigger("jsp-arrow-change",[ni,ii,ti,ri]));ur(i,r);f.css("left",e);t.trigger("jsp-scroll-x",[-e,i,r]).trigger("scroll")}function rr(n,t){r.showArrows&&(yt[n?"addClass":"removeClass"]("jspDisabled"),pt[t?"addClass":"removeClass"]("jspDisabled"))}function ur(n,t){r.showArrows&&(wt[n?"addClass":"removeClass"]("jspDisabled"),bt[t?"addClass":"removeClass"]("jspDisabled"))}function ut(n,t){var i=n/(l-e);st(i*b,t)}function at(n,t){var i=n/(a-o);lt(i*g,t)}function ui(t,i,f){var s,v,y,h=0,c=0,p,w,b,k,l,a;try{s=n(t)}catch(d){return}for(v=s.outerHeight(),y=s.outerWidth(),u.scrollTop(0),u.scrollLeft(0);!s.is(".jspPane");)if(h+=s.position().top,c+=s.position().left,s=s.offsetParent(),/^body|html$/i.test(s[0].nodeName))return;p=et();b=p+e;h<p||i?l=h-r.horizontalGutter:h+v>b&&(l=h-e+v+r.horizontalGutter);isNaN(l)||ut(l,f);w=ft();k=w+o;c<w||i?a=c-r.horizontalGutter:c+y>k&&(a=c-o+y+r.horizontalGutter);isNaN(a)||at(a,f)}function ft(){return-f.position().left}function et(){return-f.position().top}function fr(){var n=l-e;return n>20&&n-et()<10}function er(){var n=a-o;return n>20&&n-ft()<10}function or(){u.unbind(hi).bind(hi,function(n,t,i,u){c||(c=0);h||(h=0);var e=c,o=h,f=n.deltaFactor||r.mouseWheelSpeed;return s.scrollBy(i*f,-u*f,!1),e==c&&o==h})}function sr(){u.unbind(hi)}function vt(){return!1}function hr(){f.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(n){ui(n.target,!1)})}function cr(){f.find(":input,a").unbind("focus.jsp")}function lr(){function v(){var n=c,t=h;switch(i){case 40:s.scrollByY(r.keyboardSpeed,!1);break;case 38:s.scrollByY(-r.keyboardSpeed,!1);break;case 34:case 32:s.scrollByY(e*r.scrollPagePercent,!1);break;case 33:s.scrollByY(-e*r.scrollPagePercent,!1);break;case 39:s.scrollByX(r.keyboardSpeed,!1);break;case 37:s.scrollByX(-r.keyboardSpeed,!1)}return o=n!=c||t!=h}var i,o,a=[];p&&a.push(gt[0]);w&&a.push(dt[0]);f.focus(function(){t.focus()});t.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(t){if(t.target===this||a.length&&n(t.target).closest(a).length){var r=c,u=h;switch(t.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:i=t.keyCode;v();break;case 35:ut(l-e);i=null;break;case 36:ut(0);i=null}return o=t.keyCode==i&&r!=c||u!=h,!o}}).bind("keypress.jsp",function(n){return n.keyCode==i&&v(),!o});r.hideFocus?(t.css("outline","none"),"hideFocus"in u[0]&&t.attr("hideFocus",!0)):(t.css("outline",""),"hideFocus"in u[0]&&t.attr("hideFocus",!1))}function ar(){t.attr("tabindex","-1").removeAttr("tabindex").unbind("
8keydown.jsp keypress.jsp")}function vr(){if(location.hash&&location.hash.length>1){var t,r,i=escape(location.hash.substr(1));try{t=n("#"+i+', a[name="'+i+'"]')}catch(e){return}t.length&&f.find(i)&&(u.scrollTop()===0?r=setInterval(function(){u.scrollTop()>0&&(ui(t,!0),n(document).scrollTop(u.position().top),clearInterval(r))},50):(ui(t,!0),n(document).scrollTop(u.position().top)))}}function yr(){n(document.body).data("jspHijack")||(n(document.body).data("jspHijack",!0),n(document.body).delegate("a[href*=#]","click",function(t){var h=this.href.substr(0,this.href.indexOf("#")),o=location.href,u,i,r,s,f,e;if(location.href.indexOf("#")!==-1&&(o=location.href.substr(0,location.href.indexOf("#"))),h===o){u=escape(this.href.substr(this.href.indexOf("#")+1));i;try{i=n("#"+u+', a[name="'+u+'"]')}catch(c){return}i.length&&(r=i.closest(".jspScrollable"),s=r.data("jsp"),s.scrollToElement(i,!0),r[0].scrollIntoView&&(f=n(window).scrollTop(),e=i.offset().top,(e<f||e>f+n(window).height())&&r[0].scrollIntoView()),t.preventDefault())}}))}function pr(){var f,e,t,i,n,r=!1;u.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(u){var o=u.originalEvent.touches[0];f=ft();e=et();t=o.pageX;i=o.pageY;n=!1;r=!0}).bind("touchmove.jsp",function(u){if(r){var o=u.originalEvent.touches[0],l=c,a=h;return s.scrollTo(f+t-o.pageX,e+i-o.pageY),n=n||Math.abs(t-o.pageX)>5||Math.abs(i-o.pageY)>5,l==c&&a==h}}).bind("touchend.jsp",function(){r=!1}).bind("click.jsp-touchclick",function(){if(n)return n=!1,!1})}function wr(){var n=et(),i=ft();t.removeClass("jspScrollable").unbind(".jsp");t.replaceWith(si.append(f.children()));si.scrollTop(n);si.scrollLeft(i);ct&&clearInterval(ct)}var r,s=this,f,o,e,u,a,l,fi,kt,w,p,v,b,h,y,g,c,dt,k,ei,ht,nt,yt,pt,gt,d,ot,tt,wt,bt,ct,oi,it,vi,ni=!0,ti=!0,ii=!1,ri=!1,si=t.clone(!1,!1).empty(),hi=n.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";t.css("box-sizing")==="border-box"?(oi=0,it=0):(oi=t.css("paddingTop")+" "+t.css("paddingRight")+" "+t.css("paddingBottom")+" "+t.css("paddingLeft"),it=(parseInt(t.css("paddingLeft"),10)||0)+(parseInt(t.css("paddingRight"),10)||0));n.extend(s,{reinitialise:function(t){t=n.extend({},r,t);ci(t)},scrollToElement:function(n,t,i){ui(n,t,i)},scrollTo:function(n,t,i){at(n,i);ut(t,i)},scrollToX:function(n,t){at(n,t)},scrollToY:function(n,t){ut(n,t)},scrollToPercentX:function(n,t){at(n*(a-o),t)},scrollToPercentY:function(n,t){ut(n*(l-e),t)},scrollBy:function(n,t,i){s.scrollByX(n,i);s.scrollByY(t,i)},scrollByX:function(n,t){var i=ft()+Math[n<0?"floor":"ceil"](n),r=i/(a-o);lt(r*g,t)},scrollByY:function(n,t){var i=et()+Math[n<0?"floor":"ceil"](n),r=i/(l-e);st(r*b,t)},positionDragX:function(n,t){lt(n,t)},positionDragY:function(n,t){st(n,t)},animate:function(n,t,i,u){var f={};f[t]=i;n.animate(f,{duration:r.animateDuration,easing:r.animateEase,queue:!1,step:u})},getContentPositionX:function(){return ft()},getContentPositionY:function(){return et()},getContentWidth:function(){return a},getContentHeight:function(){return l},getPercentScrolledX:function(){return ft()/(a-o)},getPercentScrolledY:function(){return et()/(l-e)},getIsScrollableH:function(){return p},getIsScrollableV:function(){return w},getContentPane:function(){return f},scrollToBottom:function(n){st(b,n)},hijackInternalLinks:n.noop,destroy:function(){wr()}});ci(i)}return t=n.extend({},n.fn.jScrollPane.defaults,t),n.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){t[this]=t[this]||t.speed}),this.each(function(){var r=n(this),u=r.data("jsp");u?u.reinitialise(t):(n("script",r).filter('[type="text/javascript"],:not([type])').remove(),u=new i(r,t),r.data("jsp",u))})};n.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:undefined,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:0,horizontalGutter:4,mouseWheelSpeed:30,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.