mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-05 05:12:27 +03:00
13 lines
39 KiB
JavaScript
13 lines
39 KiB
JavaScript
/*!
|
|
* OverlayScrollbars
|
|
* https://github.com/KingSora/OverlayScrollbars
|
|
*
|
|
* Version: 1.4.4
|
|
*
|
|
* Copyright KingSora.
|
|
* https://github.com/KingSora
|
|
*
|
|
* Released under the MIT license.
|
|
* Date: 06.05.2018
|
|
*/
|
|
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t,t.document,undefined,require("jquery")):e(t,t.document,undefined,t.jQuery)}("undefined"!=typeof window?window:this,function(t,e,n,r){"use strict";var o="OverlayScrollbars",i={o:"object",f:"function",a:"array",s:"string",b:"boolean",n:"number",u:"undefined",z:"null"},a={c:"class",s:"style",i:"id",oH:"offsetHeight",cH:"clientHeight",sH:"scrollHeight",oW:"offsetWidth",cW:"clientWidth",sW:"scrollWidth"},s=r,l=r,c=function(r,l,c){var u,f,h,d,v,p,y,x,w,m,b,g,S,z=(h=[i.b,i.n,i.s,i.a,i.o,i.f,i.z],d=" ",v=":",p=[i.z,i.s],y=i.b,x=i.n,w=[i.z,y],m=[i.z,i.f],g={className:["os-theme-dark",p],resize:["none","n:none b:both h:horizontal v:vertical"],sizeAutoCapable:[!0,y],clipAlways:[!0,y],normalizeRTL:[!0,y],paddingAbsolute:[!1,y],autoUpdate:[null,w],autoUpdateInterval:[33,x],nativeScrollbarsOverlaid:{showNativeScrollbars:[!1,y],initialize:[!0,y]},overflowBehavior:{x:["scroll",b="v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden"],y:["scroll",b]},scrollbars:{visibility:["auto","v:visible h:hidden a:auto"],autoHide:["never","n:never s:scroll l:leave m:move"],autoHideDelay:[800,x],dragScrolling:[!0,y],clickScrolling:[!1,y],touchSupport:[!0,y]},textarea:{dynWidth:[!1,y],dynHeight:[!1,y]},callbacks:{onInitialized:[null,m],onInitializationWithdrawn:[null,m],onDestroyed:[null,m],onScrollStart:[null,m],onScroll:[null,m],onScrollStop:[null,m],onOverflowChanged:[null,m],onOverflowAmountChanged:[null,m],onDirectionChanged:[null,m],onContentSizeChanged:[null,m],onHostSizeChanged:[null,m],onUpdated:[null,m]}},{d:(S=function(t){var e=function(n){var r,o,a;for(r in n)n.hasOwnProperty(r)&&(o=n[r],(a=c.type(o))===i.a?n[r]=o[t?1:0]:a===i.o&&(n[r]=e(o)));return n};return e(c.extend(!0,{},g))})(),t:S(!0),v:function(t,e,n,r,o){var a={},s=c.extend(!0,{},t),l=function(t,e,o,a){for(var s in e)if(e.hasOwnProperty(s)&&t.hasOwnProperty(s)){var u,f,p,y,x,w,m,b,g=!1,S=e[s],z=c.type(S),O=c.type(S)!==i.a?[S]:S,C=t[s],M=c.type(C),H=a?a+".":"",W='The option "'+H+s+"\" wasn't set, because",k=[],A=[];if(z===i.o)o[s]={},l(C,S,o[s],H+s),c.isEmptyObject(C)&&delete t[s];else{for(w=0;w<O.length;w++)if(x=O[w],p=(z=c.type(x))===i.s&&-1===c.inArray(x,h))for(k.push(i.s),u=x.split(d),A=A.concat(u),m=0;m<u.length;m++){for(y=(f=u[m].split(v))[0],b=0;b<f.length;b++)if(C===f[b]){g=!0;break}if(g)break}else if(k.push(x),M===x){g=!0;break}g?o[s]=p&&r?y:C:n&&console.warn(W+" it doesn't accept the type [ "+M.toUpperCase()+' ] with the value of "'+C+'".\r\nAccepted types are: [ '+k.join(", ").toUpperCase()+" ]."+(A.length>0?"\r\nValid strings are: [ "+A.join(", ").split(v).join(", ")+" ].":"")),delete t[s]}}};return l(s,e,a),o?c.extend(!0,a,s):!c.isEmptyObject(s)&&n&&console.warn("The following options are discarded due to invalidity:\r\n"+JSON.stringify(s,null,2)),a}});function O(){u||(u=new C(z.d)),f||(f=new M(u))}function C(o){var i=this,s="overflow",u="hidden",f="scroll",h=c("body"),d=c('<div id="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>'),v=d[0],p=c(d.children("div").first()),y=v[a.oH];h.append(d),0===y&&d.hide().show();var x,w,m,b,g,S,z,O,C,M=k(v),H={x:0===M.x,y:0===M.y};function W(t){var r=!1,o="Webkit Moz ms O".split(" "),i=e.createElement("div"),a=null,s=0;if(t=t.toLowerCase(),i.style[t]!==n&&(r=!0),!r)for(a=t.charAt(0).toUpperCase()+t.substr(1);s<o.length;s++)if(i.style[o[s]+a]!==n){r=!0;break}return r}function k(t){return{x:t[a.oH]-t[a.cH],y:t[a.oW]-t[a.cW]}}c.extend(i,{defaultOptions:o,autoUpdateLoop:!1,autoUpdateRecommended:!r.mO(),nativeScrollbarSize:M,nativeScrollbarIsOverlaid:H,nativeScrollbarStyling:(d.addClass("os-viewport-native-scrollbars-invisible"),d.css(s,u).hide().css(s,f).show(),v[a.oH]-v[a.cH]==0&&v[a.oW]-v[a.cW]==0),overlayScrollbarDummySize:{x:30,y:30},msie:(x=t.navigator.userAgent,w="indexOf",m="substring",b=x[w]("MSIE "),g=x[w]("Trident/"),S=x[w]("Edge/"),z=x[w]("rv:"),O=!1,C=t.parseInt,b>0?O=C(x[m](b+5,x[w](".",b)),10):g>0?O=C(x[m](z+3,x[w](".",z)),10):S>0&&(O=C(x[m](S+5,x[w](".",S)),10)),O),cssCalc:function(){var t,n,r=e.createElement("div"),o=["calc","-webkit-calc","-moz-calc","-o-calc"];for(t=0;t<o.length;++t)if(n=o[t],r.style.cssText="width:"+n+"(1px);",r.style.length)return n;return null}(),restrictedMeasuring:function(){d.css(s,u);var t={w:v[a.sW],h:v[a.sH]};d.css(s,"visible");var e={w:v[a.sW],h:v[a.sH]};return t.w-e.w!=0||t.h-e.h!=0}(),rtlScrollBehavior:function(){d.css({"overflow-y":u,"overflow-x":f,direction:"rtl"}).scrollLeft(0);var t=d.offset(),e=p.offset();d.scrollLeft(999);var n=p.offset();return{i:t.left===e.left,n:e.left-n.left==0}}(),supportTransform:W("transform"),supportTransition:W("transition"),supportPassiveEvents:function(){var e=!1;try{t.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(n){}return e}(),supportResizeObserver:!!r.rO(),supportMutationObserver:!!r.mO()}),d.removeAttr(a.s).remove(),function(){if(!H.x||!H.y){var e=r.wW(),n=r.wH(),o=s();c(t).on("resize",function(){if(l.all().length>0){var t=r.wW(),u=r.wH(),f=t-e,v=u-n;if(0===f&&0===v)return;var p=Math.round(t/(e/100)),y=Math.round(u/(n/100)),x=Math.abs(f),w=Math.abs(v),m=Math.abs(p),b=Math.abs(y),g=s(),S=x>2&&w>2,z=!a(m,b);!(S&&z&&(g!==o&&o>0))||(h.append(d),i.nativeScrollbarSize=k(d[0]),d.remove(),c.each(l.all(),function(){l.has(this)&&l.get(this).update("zoom")})),e=t,n=u,o=g}})}function a(t,e){var n=Math.abs(t),r=Math.abs(e);return!(n===r||n+1===r||n-1===r)}function s(){var e=t.screen.deviceXDPI||0,n=t.screen.logicalXDPI||1;return t.devicePixelRatio||e/n}}()}function M(t){var e,o=this,i="autoUpdate",a=i+"Interval",s=[],l=[],u=!1,f=33,h=f,d=r.now(),v=function(){if(s.length>0&&u){e=r.rAF()(function(){v()});var t=r.now(),o=t-d;if(o>h){d=t-o%h;for(var c=f,p=0;p<s.length;p++){var y=s[p];if(y!==n){var x=y.options(),w=x[i],m=Math.max(1,x[a]),b=r.now();(!0===w||null===w)&&b-l[p]>m&&(y.update("auto"),l[p]=new Date(b+=m)),c=Math.max(1,Math.min(c,m))}}h=c}}else h=f};o.add=function(e){-1===c.inArray(e,s)&&(s.push(e),l.push(r.now()),s.length>0&&!u&&(u=!0,t.autoUpdateLoop=u,v()))},o.remove=function(o){var i=c.inArray(o,s);i>-1&&(l.splice(i,1),s.splice(i,1),0===s.length&&u&&(u=!1,t.autoUpdateLoop=u,e!==n&&(r.cAF()(e),e=-1)))}}function H(e,u,f,h){if(ro(e)){if(l.has(e)){var d=l.get(e);return d.options(u),d}var v,p,y,x,w,m,b,g,S,O,C,M,H,W,k,A,T,E,L,R,D,P,N,_,F,I,j,U,B,V,q,X,Y,K,J,Q,G,Z,$,tt,et,nt,rt,ot,it,at,st,lt,ct,ut,ft,ht,dt,vt,pt,yt,xt,wt,mt,bt,gt,St,zt,Ot,Ct,Mt,Ht,Wt,kt,At,Tt,Et,Lt,Rt,Dt,Pt,Nt,_t,Ft,It,jt,Ut,Bt,Vt,qt,Xt,Yt,Kt,Jt,Qt,Gt,Zt,$t,te,ee,ne,re,oe,ie,ae,se,le,ce,ue,fe,he,de,ve,pe,ye,xe,we,me,be,ge,Se,ze,Oe,Ce=new t[o],Me={},He={},We={},ke={},Ae={},Te=175,Ee="-hidden",Le="margin-",Re="padding-",De="border-",Pe="top",Ne="right",_e="bottom",Fe="left",Ie="min-",je="max-",Ue="width",Be="height",Ve="float",qe="",Xe="auto",Ye="scroll",Ke="100%",Je="x",Qe="y",Ge=".",Ze=" ",$e="scrollbar",tn="-horizontal",en="-vertical",nn=Ye+"Left",rn=Ye+"Top",on="mousedown touchstart",an="mouseup touchend",sn="mousemove touchmove",ln="mouseenter",cn="mouseleave",un="keydown",fn="keyup",hn="selectstart",dn="transitionend webkitTransitionEnd oTransitionEnd",vn="__overlayScrollbarsRO__",pn="os-",yn=pn+"html",xn=pn+"host",wn=xn+"-textarea",mn=xn+"-"+$e+tn+Ee,bn=xn+"-"+$e+en+Ee,gn=xn+"-transition",Sn=xn+"-rtl",zn=xn+"-resize-disabled",On=xn+"-scrolling",Cn=xn+"-overflow",Mn=Cn+"-x",Hn=Cn+"-y",Wn=pn+"textarea",kn=Wn+"-cover",An=pn+"padding",Tn=pn+"viewport",En=Tn+"-native-scrollbars-invisible",Ln=Tn+"-native-scrollbars-overlaid",Rn=pn+"content",Dn=pn+"content-arrange",Pn=pn+"content-glue",Nn=pn+"size-auto-observer",_n=pn+"resize-observer",Fn=pn+"resize-observer-item",In=Fn+"-final",jn=pn+"text-inherit",Un=pn+$e,Bn=Un+"-track",Vn=Bn+"-off",qn=Un+"-handle",Xn=qn+"-off",Yn=Un+"-unusable",Kn=Un+"-"+Xe+Ee,Jn=Un+"-corner",Qn=Jn+"-resize",Gn=Qn+"-both",Zn=Qn+tn,$n=Qn+en,tr=Un+tn,er=Un+en,nr=pn+"dragging",rr=pn+"theme-none",or={},ir=33,ar=[],sr=11,lr=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],cr=[],ur={},fr={};if(Ce.sleep=function(){j=!0},Ce.update=function(t){var e,n,r="zoom"===t,o="img",i="load";t===Xe?(e=Ur(),n=jr(),(e||n)&&qr(!1,n)):r?qr(!0,!0):(t=j||t,j=!1,qr(!1,!1,t)),A||r||at.find(o).each(function(t,e){-1===c.inArray(e,ar)&&(e=c(e)).off(i,Nr).on(i,Nr)})},Ce.options=function(t,e){if(c.isEmptyObject(t)||!c.isPlainObject(t)){if(wo(t)===i.s){if(arguments.length>=2){var n={};return vo(n,t,e),Xr(n),void qr()}return ho(V,t)}return V}Xr(t);var r=j||!1;j=!1,qr(),j=r},Ce.destroy=function(){k=!0,h.remove(Ce),mr(),pr(et),L&&pr(tt),So(et),nt!==n&&So(nt),it!==n&&So(it),L&&So(tt),C?(dr($,sn,zr),dr($,ln,gr),dr($,cn,Sr)):$.off(sn,zr).off(ln,gr).off(cn,Sr),So(ct),So(ht),lt&&So(lt),ge||Dr(),at.contents().unwrap().unwrap().unwrap(),T&&go(Q,yn),A?(Z.off(Ye,Er).off("drop",kr).off("focus",Ar).off("focusout",Tr),w>9||!x?Z.off("input",Mr):Z.off(un,Hr).off(fn,Wr),So(st),go(Z,Wn+Ze+jn).unwrap().removeAttr(a.s),So($)):(go(Z,xn),go($,[xn,zn,Sn,mn,bn,gn,On,Cn,Mn,Hn,rr,te].join(Ze)));for(var t=0;t<ar.length;t++)c(ar[t]).off("load",Nr);for(var r in ar=n,l.rem(e),eo(q.callbacks.onDestroyed),Ce)delete Ce[r];Ce=n},Ce.scroll=function(e,r,o,l){if(0===arguments.length||e===n){var u=He,f=We,h=$t&&I&&y.i,d=$t&&I&&y.n,v=u.cs,p=u.csr,x=u.ms;return v=h?x-v:v,{x:{position:v*=d?-1:1,ratio:p=h?1-p:p,max:x*=d?-1:1,handleOffset:u.ho,handleLength:u.hl,handleLengthRatio:u.hlr,trackLength:u.tl,isRTL:I,isRTLNormalized:$t},y:{position:f.cs,ratio:f.csr,max:f.ms,handleOffset:f.ho,handleLength:f.hl,handleLengthRatio:f.hlr,trackLength:f.tl}}}var w,m=[Je,Fe,"l"],b=[Qe,Pe,"t"],g=["+=","-=","*=","/="],S={},z=wo(r)===i.o,C="end",M="begin",H="center",W="nearest",k={axis:"xy",block:[M,M],margin:[0,0,0,0]},A=[Je,Qe,"xy","yx"],T=[M,C,H,W],E=e.hasOwnProperty("el"),L=E?e.el:e,R=!!(L instanceof c||s)&&L instanceof s,D=!R&&ro(L),P=function(t,e){for(w=0;w<e.length;w++)if(t===e[w])return!0;return!1},N=function(t){var e={};if(wo(t)===i.a&&t.length>0)e.x=t[0],e.y=t[1];else if(wo(t)===i.s||wo(t)===i.n)e.x=t,e.y=t;else if(wo(t)===i.o){for(var n in t=mo({},t),w=0,t)t.hasOwnProperty(n)&&(w>2&&delete t[n],w++);var r=function(e){var n=e?m:b;for(w=0;w<n.length;w++)if(n[w]in t)return t[n[w]]};e.x=r(!0),e.y=r(!1)}return e},_=function(e,r){var o,a,s,l=e?He:We,c=l.cs,u=l.ms,f=" * ",h=I&&e,d=h&&y.n&&!$t,v="replace";if(wo(r)===i.s){if(r.length>2){var p=r.substr(0,2);for(w=0;w<g.length;w++)if(p===g[w]){o=g[w];break}}r=(r=(r=(r=(r=(r=(r=(r=(r=o!==n?r.substr(2):r)[v](/min/g,0))[v](/</g,0))[v](/max/g,(d?"-":qe)+Ke))[v](/>/g,(d?"-":qe)+Ke))[v](/px/g,qe))[v](/%/g,f+u*(h&&y.n?-1:1)/100))[v](/vw/g,f+ke.w))[v](/vh/g,f+ke.h),a=io(t.parseFloat(t.eval(r)).toFixed())}else wo(r)===i.n&&(a=r);if(!isNaN(a)&&a!==n&&wo(a)===i.n){var x=$t&&h,m=c*(x&&y.n?-1:1),b=x&&y.i,S=x&&y.n;switch(m=b?u-m:m,o){case"+=":s=m+a;break;case"-=":s=m-a;break;case"*=":s=m*a;break;case"/=":s=m/a;break;default:s=a}b&&(s=u-s),S&&(s*=-1),h&&y.n?(s=Math.max(u,s),s=Math.min(0,s)):(s=Math.min(u,s),s=Math.max(0,s)),s===c&&(s=n)}return s};if(R||D){var F=R?L:c(L);if(0===F.length)return;if(E){var j,U,B,V=e.axis,q=e.block,X=wo(q),Y=e.margin,K=wo(Y);if(X===i.s)q=[q,q];else if(X===i.a)if((U=q.length)>2||U<1)q=n;else{for(j=!0,1===U&&(q[1]=M),w=0;w<U;w++){var J=q[w];if(wo(J)!==i.s||!P(J,T)){j=!1;break}}j||(q=n)}else q=n;if(K===i.n)Y=[Y,Y,Y,Y];else if(K===i.b)Y=Y?[io(F.css(Le+Pe)),io(F.css(Le+Ne)),io(F.css(Le+_e)),io(F.css(Le+Fe))]:[0,0,0,0];else if(K===i.a)if(2!==(B=Y.length)&&4!==B)Y=n;else{for(j=!0,w=0;w<B;w++)if(wo(Y[w])!==i.n){j=!1;break}j?2===B&&(Y=[Y[0],Y[1],Y[0],Y[1]]):Y=n}else Y=n;k.axis=P(V,A)?V:k.axis,k.block=q||k.block,k.margin=Y||k.margin}var Q=F.offset(),G=rt.offset(),Z={l:He.cs,t:We.cs},$=k.axis,tt=k.block,et=k.margin,nt={x:tt[0]===(I?M:C),y:tt[1]===C},it={x:tt[0]===H,y:tt[1]===H},at={x:tt[0]===W,y:tt[1]===W},st={},lt=nt.x||nt.y||it.x||it.y||at.x||at.y;Q.top-=et[0],Q.left-=et[3];var ct={x:Math.round(Q.left-G.left+Z.l),y:Math.round(Q.top-G.top+Z.t)};if(I&&(y.n||y.i||(ct.x=Math.round(G.left-Q.left+Z.l)),y.n&&$t&&(ct.x*=-1),y.i&&$t&&(ct.x=Math.round(G.left-Q.left+(He.ms-Z.l)))),lt){var ut,ft={},ht={w:(ft=O?{w:(ut=F[0].getBoundingClientRect())[Ue],h:ut[Be]}:{w:F[0][a.oW],h:F[0][a.oH]}).w+et[3]+et[1],h:ft.h+et[0]+et[2]},dt=function(t){var e=to(t),n=it[e.xy]?2:1,r=Q[e.lt]+ht[e._wh]/2,o=G[e.lt]+ke[e._wh]/2;at[e.xy]&&(st[e.xy]=ht[e._wh]<=ke[e._wh]&&Q[e.lt]>=G[e.lt]&&Q[e.lt]+ht[e._wh]<=G[e.lt]+ke[e._wh],nt[e.xy]=ht[e._wh]<ke[e._wh]?r>o:r<o),(nt[e.xy]||it[e.xy])&&(ct[e.xy]-=(ke[e._wh]/n-ht[e._wh]/n)*(t&&I&&$t?-1:1))};dt(!0),dt(!1)}($===Je||st.y)&&delete ct.y,($===Qe||st.x)&&delete ct.x,e=ct}S.x=_(!0,N(e).x),S.y=_(!1,N(e).y);var vt=S.x!==n,pt=S.y!==n;if(r>0||z){var yt={};if(vt&&(yt[nn]=S.x),pt&&(yt[rn]=S.y),z)ot.animate(yt,r);else{var xt={duration:r,complete:l};if(wo(o)===i.a){var wt={};wt[nn]=o[0],wt[rn]=o[1],xt.specialEasing=wt}else xt.easing=o;ot.animate(yt,xt)}}else vt&&ot[nn](S.x),pt&&ot[rn](S.y)},Ce.scrollStop=function(t,e,n){ot.stop(t,e,n)},Ce.getElements=function(){return{target:Z[0],host:$[0],padding:rt[0],viewport:ot[0],content:at[0],scrollbarHorizontal:{scrollbar:ct[0],track:ut[0],handle:ft[0]},scrollbarVertical:{scrollbar:ht[0],track:dt[0],handle:vt[0]},scrollbarCorner:lt}},Ce.getState=function(t){var e=function(t){if(!c.isPlainObject(t))return t;var e=mo(!0,{},t),n=function(t,n){e.hasOwnProperty(t)&&(e[n]=e[t],delete e[t])};return n("w",Ue),n("h",Be),delete e.c,e},n={sleeping:e(j)||!1,autoUpdate:e(!se),widthAuto:e(bt),heightAuto:e(gt),padding:e(Ot),overflowAmount:e(Lt),hideOverflow:e(mt),hasOverflow:e(wt),contentScrollSize:e(yt),viewportSize:e(ke),hostSize:e(pt)};return wo(t)===i.s?ho(n,t):n},zo(e,u))return l.add(e,Ce),Ce;Ce=n}function hr(t,e,n){for(var r=e.split(Ze),o=0;o<r.length;o++)t[0].addEventListener(r[o],n,{passive:!0})}function dr(t,e,n){for(var r=e.split(Ze),o=0;o<r.length;o++)t[0].removeEventListener(r[o],n)}function vr(t,e){var n=3333333,o=r.rO(),s="animationstart mozAnimationStart webkitAnimationStart MSAnimationStart",l="childNodes",u=function(){t[rn](n)[nn](I?y.n?-n:y.i?0:n:n),e()};if(M){var h=t.append(fo(_n+" observed")).contents()[0];(h[vn]=new o(u)).observe(h)}else if(w>9||!x){t.prepend(fo(_n,fo({className:Fn,dir:"ltr"},fo(Fn,fo(In))+fo(Fn,fo({className:In,style:"width: 200%; height: 200%"})))));var d,v,p,m,b=t[0][l][0][l][0],g=c(b[l][1]),S=c(b[l][0]),z=c(S[0][l][0]),O=b[a.oW],C=b[a.oH],H=2,W=f.nativeScrollbarSize,k=function(){S[nn](n)[rn](n),g[nn](n)[rn](n)},A=function(){v=0,d&&(O=p,C=m,u())},T=function(t){return p=b[a.oW],m=b[a.oH],d=p!=O||m!=C,t&&d&&!v?(r.cAF()(v),v=r.rAF()(A)):t||A(),k(),t&&(r.prvD(t),r.stpP(t)),!1},E={},L={};L[Pe]=-(W.y+1)*H,L[Ne]=W.x*-H,L[_e]=W.y*-H,L[Fe]=-(W.x+1)*H,c(b).css(L),S.on(Ye,T),g.on(Ye,T),t.on(s,function(){T(!1)}),E[Ue]=n,E[Be]=n,z.css(E),k()}else{var R=J[0],D=R.attachEvent,P=!1!==w;if(D)t.prepend(fo(_n)),uo(t,Ge+_n)[0].attachEvent("onresize",u);else{var N=R.createElement(i.o);N.setAttribute("tabindex","-1"),N.setAttribute(a.c,_n),N.onload=function(){var t=this.contentDocument.defaultView;t.addEventListener("resize",u),t.document.documentElement.style.display="none"},N.type="text/html",P&&t.prepend(N),N.data="about:blank",P||t.prepend(N),t.on(s,u)}}if(t[0]===et[0]){var _=function(){var e=$.css("direction"),r={},o=0,i=!1;return e!==Wt&&("ltr"===e?(r[Fe]=0,r[Ne]=Xe,o=n):(r[Fe]=Xe,r[Ne]=0,o=y.n?-n:y.i?0:n),et.children().first().css(r),t[nn](o)[rn](n),Wt=e,i=!0),i};_(),t.on(Ye,function(t){return _()&&qr(),r.prvD(t),r.stpP(t),!1})}}function pr(t){if(M){var e=t.contents()[0];e[vn].disconnect(),delete e[vn]}else So(t.children(Ge+_n).first())}function yr(t){if(t!==n&&M){var e=t.contents()[0];e[vn].unobserve(e)}}function xr(t){if(t!==n&&M){var e=t.contents()[0];e[vn].observe(e)}}function wr(){le&&!se&&(ie.observe($[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[a.i,a.c,a.s]}),ae.observe(A?Z[0]:at[0],{attributes:!0,attributeOldValue:!0,subtree:!A,childList:!A,characterData:!A,attributeFilter:A?["wrap","cols","rows"]:[a.i,a.c,a.s]}),se=!0)}function mr(){le&&se&&(ie.disconnect(),ae.disconnect(),se=!1)}function br(){if(!j){var t=et[0],e={w:t[a.sW],h:t[a.sH]};if(W){var n=yo(e,Yt);Yt=e,n&&qr(!0,!1)}else Yt=e}}function gr(){xe&&Qr(!0)}function Sr(){xe&&!G.hasClass(nr)&&Qr(!1)}function zr(){ye&&(Qr(!0),clearTimeout(he),he=setTimeout(function(){ye&&Qr(!1)},100))}function Or(t){var e=q.callbacks;j||(U!==n?clearTimeout(U):((pe||ye)&&Qr(!0),lo()||$.addClass(On),eo(e.onScrollStart,t)),Zr(!0,ot[nn]()),Zr(!1,ot[rn]()),eo(e.onScroll,t),U=setTimeout(function(){Cr(),eo(e.onScrollStop,t)},Te))}function Cr(){clearTimeout(U),U=n,(pe||ye)&&Qr(!1),lo()||$.removeClass(On)}function Mr(){Vr(),Ce.update(Xe)}function Hr(t){var e=t.keyCode;if(!so(e)){if(0===cr.length){var n=function(){Vr(),Ce.update(Xe)};n(),ce=setInterval(n,1e3/60)}-1===c.inArray(e,cr)&&cr.push(e)}}function Wr(t){var e=t.keyCode;if(!so(e)){var n=c.inArray(e,cr);n>-1&&cr.splice(n,1),0===cr.length&&(Vr(),Ce.update(Xe),clearInterval(ce))}}function kr(){setTimeout(function(){Vr(),Ce.update(Xe)},50)}function Ar(){ue=!0}function Tr(){ue=!1,clearInterval(ce),cr=[],Vr(),Ce.update(Xe)}function Er(t){return Z[nn](y.i&&$t?9999999:0),Z[rn](0),r.prvD(t),r.stpP(t),!1}function Lr(t){if(!j){var e=(t.originalEvent||t).touches!==n;(1===r.mBtn(t)||e)&&(se&&(be=!0,mr()),ur=r.page(t),fr.w=$[0][a.oW]-(E?0:R),fr.h=$[0][a.oH]-(E?0:D),J.on(hn,Pr).on(sn,Rr).on(an,Dr),G.addClass(nr),lt.setCapture&<.setCapture(),r.prvD(t),r.stpP(t))}}function Rr(t){var e=r.page(t),n={};(ze||Se)&&(n[Ue]=fr.w+e.x-ur.x),(Oe||Se)&&(n[Be]=fr.h+e.y-ur.y),$.css(n),r.stpP(t)}function Dr(t){var e=t!==n;J.off(hn,Pr).off(sn,Rr).off(an,Dr),G.removeClass(nr),lt.releaseCapture&<.releaseCapture(),e&&(be&&wr(),Ce.update(Xe)),be=!1}function Pr(t){return r.prvD(t),!1}function Nr(){qr()}function _r(){var t={};return T&&it&&(t.w=io(it.css(Ie+Ue)),t.h=io(it.css(Ie+Be)),t.c=yo(t,oe),t.f=!0),oe=t,t.c}function Fr(t,e){var r=e!==n&&null!==e?e.split(Ze):qe,o=t!==n&&null!==t?t.split(Ze):qe;if(r===qe&&o===qe)return!1;var i,a,s,l,u=oo(o,r),f=!1,h=ee!==n&&null!==ee?ee.split(Ze):[qe],d=te!==n&&null!==te?te.split(Ze):[qe],v=c.inArray(rr,u),p=u[i];for(v>-1&&u.splice(v,1),i=0;i<u.length;i++)if(0!==(p=u[i]).indexOf(xn)){for(s=!0,l=!0,a=0;a<h.length;a++)if(p===h[a]){s=!1;break}for(a=0;a<d.length;a++)if(p===d[a]){l=!1;break}if(s&&l){f=!0;break}}return f}function Ir(t){var e=t.attributeName,n=t.target,r=t.type,o="closest";if(n===at[0])return null===e;if("attributes"===r&&(e===a.c||e===a.s)&&!A){if(typeof n[o]!==i.f)return!0;if(null!==n[o](Ge+_n)||null!==n[o](Ge+Un)||null!==n[o](Ge+Jn))return!1}return!0}function jr(){if(j)return!1;var t,e=A&&bt&&!Nt?Z.val().length:0,n=!se&&bt&&!A,r={};n&&(t=at.css(Ve),r[Ve]=I?Ne:Fe,r[Ue]=Xe,at.css(r));var o={w:co()[a.sW]+e,h:co()[a.sH]+e};n&&(r[Ve]=t,r[Ue]=Ke,at.css(r));var i=_r(),s=yo(o,Xt)||i;return Xt=o,s}function Ur(){if(j||se)return!1;var t=$.attr(a.i)||qe,e=po(t,Ft),n=$.attr(a.c)||qe,r=po(n,It),o=$.attr(a.s)||qe,i=po(o,jt),s=$.is(":visible")||qe,l=po(s,Ut),c=A&&Z.attr("rows")||qe,u=po(c,Bt),f=A&&Z.attr("cols")||qe,h=po(f,Vt),d=A&&Z.attr("wrap")||qe,v=po(d,qt);return Ft=t,r&&(r=Fr(It,n)),It=n,jt=o,Ut=s,Bt=c,Vt=f,qt=d,e||r||i||l||u||h||v}function Br(t){if(!W)return!0;var e=[Ue,Ie+Ue,je+Ue,Le+Fe,Le+Ne,Fe,Ne,"font-weight","word-spacing"],n=[Re+Fe,Re+Ne,De+Fe+Ue,De+Ne+Ue],r=[Be,Ie+Be,je+Be,Le+Pe,Le+_e,Pe,_e,"line-height"],o=[Re+Pe,Re+_e,De+Pe+Ue,De+_e+Ue],i="s",a="v-s",s=Et.x===i||Et.x===a,l=!1,c=function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1};return(Et.y===i||Et.y===a)&&((l=c(r,t))||E||(l=c(o,t))),s&&!l&&((l=c(e,t))||E||(l=c(n,t))),l}function Vr(){if(!j){var t,e,n,r,o=!Nt,i=ke.w-(E||kt||!bt?0:D+N),s=ke.h-(E||kt||!gt?0:D+N),l={},c=bt||o,u=Z[0];return l[Ie+Ue]=qe,l[Ie+Be]=qe,l[Ue]=Xe,Z.css(l),t=u[a.oW],e=c?Math.max(t,u[a.sW]-1):1,e+=bt?_+(E?0:o?0:R+P):0,l[Ue]=bt?e:Ke,l[Be]=Xe,Z.css(l),n=u[a.oH],r=Math.max(n,u[a.sH]-1),l[Ue]=e,l[Be]=r,st.css(l),l[Ie+Ue]=i+(!E&&bt?R+P:0),l[Ie+Be]=s+(!E&>?D+N:0),Z.css(l),{ow:t,oh:n,dw:e,dh:r}}}function qr(t,e,o){var i=r.now(),s=ir>0&&W&&i-X<ir&&!gt&&!bt;if(clearTimeout(Y),s&&(or.h=t,or.c=e,or.f=o,Y=setTimeout(qr,ir)),!(s||j||W&&!o&&$.is(":hidden")||"inline"===$.css("display"))){X=i,t=t||or.h,e=e||or.c,o=o||or.f,or={},t=t!==n&&t,e=e!==n&&e,o=o!==n&&o,!m||v.x&&v.y?g=mo(!0,{},f.nativeScrollbarSize):(g.x=0,g.y=0),Ae={x:3*(g.x+(v.x?0:3)),y:3*(g.y+(v.y?0:3))},yr(et),yr(tt);var l={l:ot[nn](),t:ot[rn]()},u=q.callbacks,d=q.scrollbars,w=q.textarea,S=u.onUpdated,z=u.onOverflowChanged,O=u.onOverflowAmountChanged,M=u.onDirectionChanged,k=u.onContentSizeChanged,U=u.onHostSizeChanged,B=d.visibility,V=po(B,Kt,o),K=d.autoHide,J=po(K,Jt,o),Q=d.clickScrolling,G=po(Q,Qt,o),ct=d.dragScrolling,ut=po(ct,Gt,o),ft=q.className,ht=po(ft,te,o),dt=q.resize,vt=po(dt,Zt,o)&&!T,Wt=!!A&&"off"!==Z.attr("wrap"),Ft=po(Wt,Nt,o),It=q.paddingAbsolute,jt=po(It,kt,o),Ut=q.clipAlways,Bt=po(Ut,At,o),Vt=q.sizeAutoCapable&&!T,qt=po(Vt,Pt,o),Xt=q.nativeScrollbarsOverlaid.showNativeScrollbars,Yt=po(Xt,Rt),ie=q.autoUpdate,ae=po(ie,Dt),le=q.overflowBehavior,ce=yo(le,Et,Je,Qe,o),fe=w.dynWidth,he=po(re,me),me=w.dynHeight,be=po(ne,me);if(ve="n"===K,pe="s"===K,ye="m"===K,xe="l"===K,de=d.autoHideDelay,we=d.touchSupport,ee=te,ge="n"===dt,Se="b"===dt,ze="h"===dt,Oe="v"===dt,$t=q.normalizeRTL,Xt=Xt&&v.x&&v.y,Kt=B,Jt=K,Qt=Q,Gt=ct,te=ft,Zt=dt,Nt=Wt,kt=It,At=Ut,Pt=Vt,Rt=Xt,Dt=ie,Et=mo(!0,{},le),re=fe,ne=me,ht&&(go($,ee+Ze+rr),bo($,ft!==n&&null!==ft&&ft.length>0?ft:rr)),ae&&(!0===ie?(mr(),h.add(Ce)):null===ie&&x?(mr(),h.add(Ce)):(h.remove(Ce),wr())),qt)if(Vt)if(nt===n&&(nt=c(fo(Pn)),rt.before(nt)),L)tt.show();else{tt=c(fo(Nn)),nt.before(tt);var He={w:-1,h:-1};vr(tt,function(){var t={w:tt[0][a.oW],h:tt[0][a.oH]};yo(t,He)&&(W&>&&t.h>0||bt&&t.w>0?qr():(W&&!gt&&0===t.h||!bt&&0===t.w)&&qr()),He=t}),L=!0,null!==b&&tt.css(Be,b+"(100% + 1px)")}else L&&tt.hide();o&&(et.find("*").trigger(Ye),L&&tt.find("*").trigger(Ye));var We,Te=$.css("direction"),Ee=po(Te,Ht,o),Ge=$.css("box-sizing"),$e=po(Ge,zt,o),tn={c:o,t:io($.css(Re+Pe)),r:io($.css(Re+Ne)),b:io($.css(Re+_e)),l:io($.css(Re+Fe))};try{We=L?tt[0].getBoundingClientRect():null}catch(jo){return}E="border-box"===Ge;var en=(I="rtl"===Te)?Fe:Ne,an=I?Ne:Fe,un=$[0],fn=rt[0],hn=!1,dn=!(!L||"none"===$.css(Ve))&&(0===Math.round(We.right-We.left)&&(!!It||un[a.cW]-R>0));if(Vt&&!dn){var vn=un[a.oW],pn=nt.css(Ue);nt.css(Ue,Xe);var yn=un[a.oW];nt.css(Ue,pn),(hn=vn!==yn)||(nt.css(Ue,vn+1),yn=un[a.oW],nt.css(Ue,pn),hn=vn!==yn)}var xn=(dn||hn)&&Vt,wn=po(xn,bt,o),mn=!xn&&bt,bn=!!L&&0===Math.round(We.bottom-We.top),gn=po(bn,gt,o),Wn=!bn&>,kn="-"+Ue,An=xn&&E||!E,Tn=bn&&E||!E,En={c:o,t:Tn?io($.css(De+Pe+kn)):0,r:An?io($.css(De+Ne+kn)):0,b:Tn?io($.css(De+_e+kn)):0,l:An?io($.css(De+Fe+kn)):0},Ln={c:o,t:io($.css(Le+Pe)),r:io($.css(Le+Ne)),b:io($.css(Le+_e)),l:io($.css(Le+Fe))},Rn={h:String($.css(je+Be)),w:String($.css(je+Ue))},_n={},Fn={};if(R=tn.l+tn.r,D=tn.t+tn.b,tn.c=xo(tn,Ot),P=En.l+En.r,N=En.t+En.b,En.c=xo(En,Ct),_=Ln.l+Ln.r,F=Ln.t+Ln.b,Ln.c=xo(Ln,Mt),Rn.ih=io(Rn.h),Rn.iw=io(Rn.w),Rn.ch=Rn.h.indexOf("px")>-1,Rn.cw=Rn.w.indexOf("px")>-1,Rn.c=yo(Rn,St,o),Ht=Te,zt=Ge,bt=xn,gt=bn,Ot=tn,Ct=En,Mt=Ln,St=Rn,Ee&&L&&tt.css(Ve,an),tn.c||Ee||jt||wn||gn||$e||qt){var In={},jn={};no(Fn,Le,[-tn.t,-tn.r,-tn.b,-tn.l]),It?(no(In,qe,[tn.t,tn.r,tn.b,tn.l]),no(A?jn:_n,Re)):(no(In,qe),no(A?jn:_n,Re,[tn.t,tn.r,tn.b,tn.l])),rt.css(In),Z.css(jn)}ke={w:fn[a.oW],h:fn[a.oH]};var Un=!!A&&Vr();if(bn&&(gn||jt||$e||Rn.c||tn.c||En.c)?(Rn.cw&&(_n[je+Be]=Rn.ch?Rn.ih-(It?D:0)+(E?-N:D):qe),_n[Be]=Xe):(gn||jt)&&(_n[je+Be]=qe,_n[Be]=Ke),xn&&(wn||jt||$e||Rn.c||tn.c||En.c||Ee)?(Rn.cw&&(_n[je+Ue]=Rn.cw?Rn.iw-(It?R:0)+(E?-P:R)+(v.y?p.y:0):qe),_n[Ue]=Xe,Fn[je+Ue]=Ke):(wn||jt)&&(_n[je+Ue]=qe,_n[Ue]=Ke,_n[Ve]=qe,Fn[je+Ue]=qe),xn&&(Rn.cw||(_n[je+Ue]=qe),Fn[Ue]=A&&fe?Un.dw:Xe,_n[Ue]=Xe,_n[Ve]=an),bn&&(Rn.ch||(_n[je+Be]=qe),Fn[Be]=A?me?Un.dh:Xe:at[0][a.cH]),Vt&&nt.css(Fn),at.css(_n),_n={},Fn={},wt=wt||{x:!1,y:!1},t||e||Ee||$e||jt||wn||xn||gn||bn||Rn.c||Yt||ce||Bt||vt||V||he||be||Ft||jt||he||be||o){var Bn="overflow",Vn=Bn+"-x",qn=Bn+"-y",Xn="hidden",Yn="visible",Kn=H&&(v.x||v.y||ke.w<Ae.y||ke.h<Ae.x)||bn,Jn={},tr=wt.y&&mt.ys&&!Xt?v.y?ot.css(en):-g.y:0,er=wt.x&&mt.xs&&!Xt?v.x?ot.css(_e):-g.x:0;no(Jn,qe),ot.css(Jn),Kn&&at.css(Bn,Xn);var nr=co(),ar=H&&!Kn?ot[0]:nr,sr={w:nr[a.cW],h:nr[a.cH]},lr={w:Math.max(nr[a.sW],ar[a.sW]),h:Math.max(nr[a.sH],ar[a.sH])},cr={w:A&&Un&&!fe?Un.ow:xn?sr.w:lr.w,h:A&&Un&&!me?Un.oh:bn?sr.h:lr.h};Jn[_e]=Wn?qe:er,Jn[en]=mn?qe:tr,ot.css(Jn);var ur={w:un[a.cW],h:un[a.cH]},fr={w:Math.max(cr.w+(It?R:0),ur.w-R)-(fe&&A&&xn?_+(E?0:R+P):0),h:Math.max(cr.h+(It?D:0),ur.h-D)};if(fr.c=yo(fr,Tt,o),Tt=fr,Vt){(fr.c||bn||xn)&&(Fn[Ue]=fr.w,Fn[Be]=fr.h);var pr=Fn[Ue]+(E?P:-R),br=Fn[Be]+(E?N:-R),Or={};(!xn||!xn&&En.c)&&(Fn[Ue]=ur.w-(E?0:R+P)-1-_),(!bn||!bn&&En.c)&&(Fn[Be]=ur.h-(E?0:D+N)-1-F),Rn.cw&&Rn.iw===pr&&(Fn[Ue]=pr+(E?0:R)+1),Rn.ch&&Rn.ih===br&&(Fn[Be]=br+(E?0:D)+1),xn&&(sr.w<ke.w||A&&!Wt)&&0===R&&(A&&(Or[Ue]=io(st.css(Ue))-1),Fn[Ue]-=1),bn&&(sr.h<ke.h||A)&&0===D&&(A&&(Or[Be]=io(st.css(Be))-1),Fn[Be]-=1),cr.h>0&&(Fn[Ue]=Math.max(1,Fn[Ue]),Fn[Be]=Math.max(1,Fn[Be])),A&&st.css(Or),nt.css(Fn)}xn&&(_n[Ue]=Ke),!xn||E||se||(_n[Ve]="none"),at.css(_n),_n={};var Cr=nr.getBoundingClientRect(),Mr={w:Math.max(nr[a.sW],ar[a.sW]),h:Math.max(nr[a.sH],ar[a.sH])};if(Kn&&at.css(Bn,qe),Cr.width){var Hr=Cr.width,Wr=Cr.height,kr=.001;Mr.w+=io(Hr+kr)-Hr,Mr.h+=io(Wr+kr)-Wr}Mr.c=e=yo(Mr,yt,o),yt=Mr,t=yo(ur={w:un[a.cW],h:un[a.cH]},pt),pt=ur,ke={w:fn[a.oW],h:fn[a.oH]};var Ar={x:"v-s"===le.x,y:"v-s"===le.y},Tr={x:"v-h"===le.x,y:"v-h"===le.y},Er={x:"s"===le.x,y:"s"===le.y},Rr={x:Math.max(0,Math.round(100*(Mr.w-ur.w+(It?R:0)))/100),y:Math.max(0,Math.round(100*(Mr.h-ur.h+(It?D:0)))/100)},Dr=A&&(0===ke.w||0===ke.h);Dr&&(Rr.x=0,Rr.y=0);var Pr={x:Rr.x>0,y:Rr.y>0},Nr={x:Pr.x,y:Pr.y};(Ar.x||Tr.x)&&(Nr.x=Pr.y&&!Ar.y&&!Tr.y),(Ar.y||Tr.y)&&(Nr.y=Pr.x&&!Ar.x&&!Tr.x),Nr.xs=!!Nr.x&&(Er.x||Ar.x),Nr.ys=!!Nr.y&&(Er.y||Ar.y);var Fr={x:Pr.x&&Nr.xs,y:Pr.y&&Nr.ys},Ir=Lt;if(Rr.c=yo(Rr,Lt,Je,Qe,o),Lt=Rr,Pr.c=yo(Pr,wt,Je,Qe,o),wt=Pr,Nr.c=yo(Nr,mt,Je,Qe,o),mt=Nr,v.x||v.y){var jr=o,Ur={};if((Pr.x||Pr.y)&&(Ur.w=v.y&&Pr.y?Mr.w+p.y:qe,Ur.h=v.x&&Pr.x?Mr.h+p.x:qe,jr=po(Ur,xt,o),xt=Ur),Pr.c||Nr.c||Mr.c||Ee||wn||gn||xn||bn||Yt){var Br="px solid transparent";_n[De+an]=qe,_n[Le+an]=qe,v.x&&Pr.x&&Nr.xs?(bn&&(_n[Le+_e]=Xt?qe:p.x),_n[De+_e]=bn||Xt?qe:p.x+Br):(Ur.h=qe,jr=!0,_n[De+_e]=qe,_n[Le+_e]=qe),v.y&&Pr.y&&Nr.ys?(xn&&(_n[Le+en]=Xt?qe:p.y),_n[De+en]=Xt?qe:p.y+Br):(Ur.w=qe,jr=!0,_n[De+en]=qe,_n[Le+en]=qe)}if(Xt&&(Ur.w=qe,Ur.h=qe,jr=!0),jr){var Xr={};Xr[Ue]=Nr.y?Ur.w:qe,Xr[Be]=Nr.x?Ur.h:qe,it===n&&(it=c(fo(Dn)),ot.prepend(it)),it.css(Xr)}at.css(_n)}var Yr={};In={};if(t||Pr.c||Nr.c||Mr.c||ce||$e||Yt||Ee||Bt||gn){Yr[an]=qe;var Kr=function(){Yr[_e]=qe,Me.h=0},to=function(){Yr[en]=qe,Me.w=0};if(Pr.x&&Nr.xs?(Yr[Vn]=Ye,Xt?Kr():(Yr[_e]=-(v.x?p.x:g.x),Me.h=v.x?p.y:0)):(Yr[Vn]=qe,Kr()),Pr.y&&Nr.ys?(Yr[qn]=Ye,Xt?to():(Yr[en]=-(v.y?p.y:g.y),Me.w=v.y?p.x:0)):(Yr[qn]=qe,to()),(ke.h<Ae.x||ke.w<Ae.y)&&(Pr.x&&Nr.x&&!v.x||Pr.y&&Nr.y&&!v.y)?(Yr[Re+Pe]=Ae.x,Yr[Le+Pe]=-Ae.x,Yr[Re+an]=Ae.y,Yr[Le+an]=-Ae.y):(Yr[Re+Pe]=qe,Yr[Le+Pe]=qe,Yr[Re+an]=qe,Yr[Le+an]=qe),Yr[Re+en]=qe,Yr[Le+en]=qe,Pr.x&&Nr.x||Pr.y&&Nr.y||Dr?A&&Dr&&(In[Vn]=Xn,In[qn]=Xn):(!Ut||Tr.x||Ar.x||Tr.y||Ar.y)&&(A&&(In[Vn]=qe,In[qn]=qe),Yr[Vn]=Yn,Yr[qn]=Yn),rt.css(In),ot.css(Yr),Yr={},(Pr.c||$e||wn||gn)&&(!v.x||!v.y)){var ro=at[0],oo=ro.style;oo.webkitTransform="scale(1)",oo.display="run-in";ro[a.oH];oo.display=qe,oo.webkitTransform=qe}if(Yt&&Xt){$.hide();un[a.oH];$.show()}}if(_n={},Ee||wn||gn)if(I&&xn){var so=at.css(Ve),lo=Math.round(at.css(Ve,qe).css(Fe,qe).position().left);at.css(Ve,so),lo!==Math.round(at.position().left)&&(_n[Fe]=lo)}else _n[Fe]=qe;at.css(_n);var uo="v"===B,ho="h"===B,vo="a"===B,wo=r.bind(Jr,0,!0,!0,Fr.x),So=r.bind(Jr,0,!1,!0,Fr.y),zo=r.bind(Jr,0,!0,!1,Fr.x),Oo=r.bind(Jr,0,!1,!1,Fr.y);if(Nr.x||Nr.y?bo($,Cn):go($,Cn),Nr.x?bo($,Mn):go($,Mn),Nr.y?bo($,Hn):go($,Hn),Ee&&(I?bo($,Sn):go($,Sn)),T&&bo($,zn),vt){var Co=function(){lt.on(on,Lr)},Mo=function(){lt.off(on,Lr)};ge?(bo($,zn),go(lt,[Qn,Gn,Zn,$n].join(Ze)),Mo()):(go($,zn),bo(lt,Qn),Se?bo(lt,Gn):ze?bo(lt,Zn):Oe&&bo(lt,$n),Mo(),Co())}if((V||ce||Nr.c||Pr.c||Yt)&&(Xt?Yt&&(go($,On),Xt&&(zo(),Oo())):vo?(Fr.x?wo():zo(),Fr.y?So():Oo()):uo?(wo(),So()):ho&&(zo(),Oo())),J||Yt){var Ho=function(t){C?t?hr($,sn,zr):(hr($,ln,gr),hr($,cn,Sr)):t?$.on(sn,zr):$.on(ln,gr).on(cn,Sr)},Wo=function(){C?(dr($,sn,zr),dr($,ln,gr),dr($,cn,Sr)):$.off(sn,zr).off(ln,gr).off(cn,Sr)};xe||ye?(Wo(),Ho(ye)):Wo(),ve?Qr(!0):Qr(!1,!0)}if((t||Rr.c||gn||wn||vt||$e||jt||Yt||Ee)&&(Gr(!0),Zr(!0,l.l),Gr(!1),Zr(!1,l.t)),G&&$r(!0,Q),ut&&$r(!1,ct),A&&e){var ko=ao();if(ko!==n){var Ao=_t===n||ko.rows!==_t.rows,To=ko.wRow,Eo=ko.cursorRow,Lo=ko.cursorCol,Ro=ko.rows,Do=ko.cols,Po=ko.pos,No=ko.max===Po&&ue,_o={x:Wt||Lo!==Do||Eo!==To?-1:Lt.x,y:(Wt?No||Ao&&Ir!==n&&l.t===Ir.y:(No||Ao)&&Eo===Ro)?Lt.y:-1},Fo=_o.x>-1,Io=_o.y>-1;(Fo||Io)&&(Io&&ot[rn](_o.y),Fo&&(I&&$t&&y.i?ot[nn](0):ot[nn](_o.x)))}_t=ko}else A||(I&&y.i&&v.y&&Pr.x&&$t&&(l.l+=Me.w||0),ot[nn](l.l),ot[rn](l.t));Ee&&eo(M,{isRTL:I,dir:Te}),t&&eo(U,{width:pt.w,height:pt.h}),e&&eo(k,{width:yt.w,height:yt.h}),(Pr.c||Nr.c)&&eo(z,{x:Pr.x,y:Pr.y,xScrollable:Nr.xs,yScrollable:Nr.ys,clipped:Nr.x||Nr.y}),Rr.c&&eo(O,{x:Rr.x,y:Rr.y})}T&&(Pr.c||oe.c)&&(oe.f||_r(),v.y&&Pr.x&&at.css(Ie+Ue,oe.w+p.y),v.x&&Pr.y&&at.css(Ie+Be,oe.h+p.x),oe.c=!1),xr(et),xr(tt),eo(S,{forced:o})}}function Xr(t){V=mo(!0,{},V,z.v(t,z.t,!0)),q=mo(!0,{},q,z.v(t,z.t,!1,!0))}function Yr(){ct=c(fo(Un+Ze+tr)),ut=c(fo(Bn)),ft=c(fo(qn)),ht=c(fo(Un+Ze+er)),dt=c(fo(Bn)),vt=c(fo(qn)),ct.append(ut),ut.append(ft),ht.append(dt),dt.append(vt),rt.after(ht),rt.after(ct),S&&(ct.on(dn,function(t){t.target===ct[0]&&(Gr(!0),Zr(!0,ot[nn]()))}),ht.on(dn,function(t){t.target===ht[0]&&(Gr(!1),Zr(!1,ot[rn]()))})),Kr(!0),Kr(!1),lt=c(fo(Jn)),$.append(lt)}function Kr(t){var e,o,i,a=to(t),s=a.xy,l=Ye+a.LT,c="active",u=1,f=function(){u=.5},h=function(){u=1},d=function(n){var i=a.i.tl,c=a.i.hl,u=a.i.ms*((c/2+r.page(n)[s]-o-c/2)/(i-c));u=isFinite(u)?u:0,I&&t&&(y.n||!y.n&&!y.i)&&(u*=-1),ot[l](e+u),C||r.prvD(n)},v=function(t){t=t||t.originalEvent,go(G,nr),go(a.h,c),go(a.t,c),go(a.s,c),C?(dr(J,sn,d),dr(J,an,v),dr(J,un,p),dr(J,fn,x)):J.off(sn,d).off(an,v).off(un,p).off(fn,x),J.off(hn,Pr),h(),e=n,o=n,i!==n&&(Ce.scrollStop(),clearTimeout(i),i=n);var r=$[0].getBoundingClientRect();t.clientX>=r.left&&t.clientX<=r.right&&t.clientY>=r.top&&t.clientY<=r.bottom||Sr(),(pe||ye)&&Qr(!1)},p=function(t){16==t.keyCode&&f()},x=function(t){16==t.keyCode&&h()};a.h.on(on,function(i){if(!j){var u=(i.originalEvent||i).touches!==n;lo()||!Gt||u&&!we||(1===r.mBtn(i)||u)&&(e=(e=ot[l]())===n?0:e,(I&&t&&!y.n||!I)&&(e=e<0?0:e),o=r.page(i)[s],bo(G,nr),bo(a.h,c),bo(a.s,c),C?(hr(J,sn,d),hr(J,an,v)):J.on(sn,d).on(an,v),J.on(hn,Pr),r.prvD(i))}}),a.t.on(on,function(e){if(!j){var l=(e.originalEvent||e).touches!==n;if(!lo()&&Qt&&(!l||we)&&(1===r.mBtn(e)||l)){var h,d=ke[a._wh],w=a.t.offset()[a.lt],m=!0;e.shiftKey&&f();var b=function(){var e=a.i.ho,r=a.i.hl,s=o-w,l=200*u,c=m?Math.max(333,l):l,f={},v=I&&t&&(!y.i&&!y.n||$t),p=e>s;v&&(p=e<s),p?(h===n&&(h=!0),f[a.xy]="-="+d):(h===n&&(h=!1),f[a.xy]="+="+d),Ce.scrollStop(),Ce.scroll(f,l,"linear");var x=h?e<=s:e+r>=s;v&&(x=h?e+r>=s:e<=s),x?(clearTimeout(i),Ce.scrollStop(),i=n):i=setTimeout(b,c),m=!1};o=r.page(e)[s],bo(G,nr),bo(a.t,c),bo(a.s,c),C?(hr(J,an,v),hr(J,un,p),hr(J,fn,x)):J.on(an,v).on(un,p).on(fn,x),J.on(hn,Pr),b(),r.prvD(e)}}}).hover(function(){(pe||ye)&&(me=!0,Qr(!0))},function(){(pe||ye)&&(me=!1,Qr(!1))}),a.s.on(on,function(t){r.stpP(t)})}function Jr(t,e,n){var r=t?mn:bn,o=t?ct:ht;e?$.removeClass(r):$.addClass(r),n?o.removeClass(Yn):o.addClass(Yn)}function Qr(t,e){if(clearTimeout(fe),t)ct.removeClass(Kn),ht.removeClass(Kn);else{var n="active",r=function(){if(!me){var t=ft.hasClass(n)||vt.hasClass(n);!t&&(pe||ye||xe)&&ct.addClass(Kn),!t&&(pe||ye||xe)&&ht.addClass(Kn)}};de>0&&!0!==e?fe=setTimeout(r,de):r()}}function Gr(t){var e={},n=to(t),r=Math.min(1,(pt[n._wh]-(kt?t?R:D:0))/yt[n._wh]);e[n.wh]=Math.floor(100*r*1e5)/1e5+"%",lo()||n.h.css(e),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=r}function Zr(t,e){var n,r,o=I&&t,i={},a=to(t),s="translate(",l="transform",c=ot[0][Ye+a.WH]-ot[0]["client"+a.WH],u=a.i.hl,f=a.t[0]["offset"+a.WH],h=f-u;y.n&&o&&(c*=-1),r=e/c,r=isNaN(r)?0:Math.min(1,r),a.i.ms=c,a.i.cs=e,a.i.csr=r,h*=r,h=isNaN(h)?0:h,o&&(y.n||!y.n&&!y.i)&&(h=f-u-h),h=Math.max(0,h),O?(o&&(h=-(f-u-h)),n=t?s+h+"px, 0px)":s+"0px, "+h+"px)",i["-webkit-"+l]=n,i["-moz-"+l]=n,i["-ms-"+l]=n,i["-o-"+l]=n,i[l]=n):i[a.lt]=h,lo()||a.h.css(i),a.i.ho=h,a.i.tl=f}function $r(t,e){var n=e?"removeClass":"addClass",r=t?dt:vt,o=t?Vn:Xn;(t?ut:ft)[n](o),r[n](o)}function to(t){return{wh:t?Ue:Be,WH:t?"Width":"Height",lt:t?Fe:Pe,LT:t?"Left":"Top",xy:t?Je:Qe,XY:t?"X":"Y",_wh:t?"w":"h",_lt:t?"l":"t",t:t?ut:dt,h:t?ft:vt,s:t?ct:ht,i:t?He:We}}function eo(t,e){W&&c.isFunction(t)&&t.call(Ce,e)}function no(t,e,r){r===n&&(r=[qe,qe,qe,qe]),t[e+Pe]=r[0],t[e+Ne]=r[1],t[e+_e]=r[2],t[e+Fe]=r[3]}function ro(e){return typeof t.HTMLElement===i.o?e instanceof t.HTMLElement:e&&typeof e===i.o&&null!==e&&1===e.nodeType&&typeof e.nodeName===i.s}function oo(t,e){var n,r=[],o=[];for(n=0;n<t.length;n++)r[t[n]]=!0;for(n=0;n<e.length;n++)r[e[n]]?delete r[e[n]]:r[e[n]]=!0;for(var i in r)o.push(i);return o}function io(e){var n=t.parseInt(e);return isNaN(n)?0:n}function ao(){var t=Z.prop("selectionStart");if(t!==n){var e,r,o=Z.val(),i=o.length,a=o.split("\n"),s=a.length,l=o.substr(0,t).split("\n"),c=0,u=0,f=l.length,h=l[l.length-1].length;for(r=0;r<a.length;r++)(e=a[r].length)>u&&(c=r+1,u=e);return{cursorRow:f,cursorCol:h,rows:s,cols:u,wRow:c,pos:t,max:i}}}function so(t){for(var e=0;e<lr.length;e++)if(t===lr[e])return!0;return!1}function lo(){return Rt&&v.x&&v.y}function co(){return A?st[0]:at[0]}function uo(t,e){return c.prototype.find.call(t,e).first()}function fo(t,e){return"<div "+(t?wo(t)===i.s?'class="'+t+'"':function(){var e,n="";if(c.isPlainObject(t))for(e in t)n+=("className"===e?"class":e)+'="'+t[e]+'" ';return n}():qe)+">"+(e||qe)+"</div>"}function ho(t,e){for(var n,r=e.split(Ge),o=0;o<r.length;o++){if(!t.hasOwnProperty(r[o]))return;n=t[r[o]],o<r.length&&wo(n)===i.o&&(t=n)}return n}function vo(t,e,n){for(var r=e.split(Ge),o=r.length,i=0,a={},s=a;i<o;i++)a=a[r[i]]=i+1<o?{}:n;c.extend(t,s,!0)}function po(t,e,r){return!0===r?r:e===n||t!==e}function yo(t,e,r,o,i){if(!0===i)return i;if(o===n&&i===n){if(!0===r)return r;r=n}return r=r===n?"w":r,o=o===n?"h":o,e===n||(t[r]!==e[r]||t[o]!==e[o])}function xo(t,e){return e===n||(t.t!==e.t||t.r!==e.r||t.b!==e.b||t.l!==e.l)}function wo(t){return c.type(t)}function mo(){return c.extend.apply(this,arguments)}function bo(t,e){return c.prototype.addClass.call(t,e)}function go(t,e){return c.prototype.removeClass.call(t,e)}function So(t){return c.prototype.remove.call(t)}function zo(t,e){B=f.defaultOptions,m=f.nativeScrollbarStyling,g=mo(!0,{},f.nativeScrollbarSize),v=mo(!0,{},f.nativeScrollbarIsOverlaid),p=mo(!0,{},f.overlayScrollbarDummySize),y=mo(!0,{},f.rtlScrollBehavior),Xr(mo(!0,{},B,e));var n,o=q.callbacks;if(v.x&&v.x&&!q.nativeScrollbarsOverlaid.initialize)return eo(o.onInitializationWithdrawn),!1;if(b=f.cssCalc,w=f.msie,x=f.autoUpdateRecommended,S=f.supportTransition,O=f.supportTransform,C=f.supportPassiveEvents,M=f.supportResizeObserver,le=f.supportMutationObserver,H=f.restrictedMeasuring,J=c(t.ownerDocument),K=c(J[0].defaultView||J[0].parentWindow),Q=uo(J,"html"),G=uo(Q,"body"),Z=c(t),A=Z.is("textarea"),(T=Z.is("body"))&&((n={}).l=Math.max(Z[nn](),Q[nn](),K[nn]()),n.t=Math.max(Z[rn](),Q[rn](),K[rn]())),A){Z.wrap(fo(wn)),bo(Z,Wn+Ze+jn),$=Z.parent();var i={};q.sizeAutoCapable||(i[Ue]=Z.css(Ue),i[Be]=Z.css(Be)),$.css(i).wrapInner(fo(Rn+Ze+jn)).wrapInner(fo(Tn+Ze+jn)).wrapInner(fo(An+Ze+jn)),at=uo($,Ge+Rn),ot=uo($,Ge+Tn),rt=uo($,Ge+An),st=c(fo(kn)),at.prepend(st),Z.on(Ye,Er).on("drop",kr).on("focus",Ar).on("focusout",Tr),w>9||!x?Z.on("input",Mr):Z.on(un,Hr).on(fn,Wr)}else bo(Z,xn),($=Z).wrapInner(fo(Rn)).wrapInner(fo(Tn)).wrapInner(fo(An)),at=uo($,Ge+Rn),ot=uo($,Ge+Tn),rt=uo($,Ge+An),at.on(dn,function(t){!0!==Dt&&Br((t=t.originalEvent||t).propertyName)&&qr(Xe)});if(Yr(),C?hr(ot,Ye,Or):ot.on(Ye,Or),m&&bo(ot,v.x&&v.y?Ln:En),le){var s,l,u,h,d,z,E=r.mO(),L=r.now();ie=new E(function(t){if(W&&!j){var e,n=!1;c.each(t,function(){if(s=(e=this).target,l=e.attributeName,n=l===a.c?Fr(e.oldValue,s.className):l!==a.s||e.oldValue!==s.style.cssText)return!1}),n&&Ce.update(Xe)}}),ae=new E(function(t){if(W&&!j){var e=!1;c.each(t,function(){return!(e=Ir(this))}),e&&(h=r.now(),d=gt||bt,z=function(){L=h,A&&Vr(),d?Ce.update():Ce.update(Xe)},clearTimeout(u),sr<=0||h-L>sr||!d?z():u=setTimeout(z,sr))}})}return T&&(bo(Q,yn),ot[nn](n.l),ot[rn](n.t)),et=c(fo("os-resize-observer-host")),$.prepend(et),vr(et,br),br(),Ce.update(Xe),setTimeout(function(){S&&!k&&bo($,gn)},333),W=!0,eo(o.onInitialized),W}}return t[o]=function(e,r){if(0===arguments.length)return this;O();var i,a,s=[];return c.isPlainObject(r)?e&&e.length?(c.each(e,function(){i=this,console.log(i),i!==n&&s.push(H(i,r,u,f))}),a=s.length>1?s:s[0]):a=H(e,r,u,f):e&&(e.length&&e.length>0?(c.each(e,function(){i=l.get(this),"!"===r?i instanceof t[o]&&s.push(i):s.push(i)}),a=s.length>1?s:s[0]):a=l.get(e)),a},t[o].globals=function(){O();var t=c.extend(!0,{},u);return delete t.msie,t},t[o].defaultOptions=function(t){O();var e=u.defaultOptions;if(t===n)return c.extend(!0,{},e);u.defaultOptions=c.extend(!0,{},e,z.v(t,z.t,!0))},t[o]}({wW:function(){return t.innerWidth||e.documentElement[a.cW]||e.body[a.cW]},wH:function(){return t.innerHeight||e.documentElement[a.cH]||e.body[a.cH]},mO:function(){return t.MutationObserver||t.WebKitMutationObserver||t.WebkitMutationObserver||t.MozMutationObserver||n},rO:function(){return t.ResizeObserver||t.WebKitResizeObserver||t.WebkitResizeObserver||t.MozResizeObserver||n},rAF:function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}},cAF:function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame||function(e){return t.clearTimeout(e)}},now:function(){return Date.now()||(new Date).getTime()},stpP:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},prvD:function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},page:function(t){var r="page",o="client",i="X",a="Y",s=((t=t.originalEvent||t).target||t.srcElement||e).ownerDocument||e,l=s.documentElement,c=s.body;if(t.touches!==n){var u=t.touches[0];return{x:u[r+i],y:u[r+a]}}return!t[r+i]&&t[o+i]&&null!=t[o+i]?{x:t[o+i]+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0),y:t[o+a]+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}:{x:t[r+i],y:t[r+a]}},mBtn:function(t){return t.which||t.button===n?t.which:1&t.button?1:2&t.button?3:4&t.button?2:0},bind:function(t,e){if(typeof t!==i.f)throw"Can't bind function!";var n=Array.prototype.slice.call(arguments,2),r=function(){},o=function(){return t.apply(this instanceof r?this:e,n.concat(Array.prototype.slice.call(arguments)))};return t.prototype&&(r.prototype=t.prototype),o.prototype=new r,o}},function(t){var e=[],r="__overlayScrollbars__";function o(t,n){t[r]=n,e.push(t)}function i(n){var o=t.inArray(n,e);o>-1&&(delete n[r],e.splice(o,1))}function a(t){return s(t)!==n}function s(t){for(var n=0;n<e.length;n++)if(t===e[n])return t[r]}return{all:function(){return e},add:o,rem:i,has:a,get:s}}(l),l);return s&&s.fn&&(s.fn.overlayScrollbars=function(t){var e=this;return s.isPlainObject(t)?(s.each(e,function(){c(this,t)}),e):c(e,t)}),c}); |