13 lines
41 KiB
JavaScript
13 lines
41 KiB
JavaScript
/*!
|
|
* OverlayScrollbars
|
|
* https://github.com/KingSora/OverlayScrollbars
|
|
*
|
|
* Version: 1.10.0
|
|
*
|
|
* Copyright KingSora | Rene Haas.
|
|
* https://github.com/KingSora
|
|
*
|
|
* Released under the MIT license.
|
|
* Date: 11.10.2019
|
|
*/
|
|
!function(t,r){"function"==typeof define&&define.amd?define(["jquery"],function(n){return r(t,t.document,undefined,n)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=r(t,t.document,undefined,require("jquery")):r(t,t.document,undefined,t.jQuery)}("undefined"!=typeof window?window:this,function(bt,gt,wi,n){"use strict";var o,f,c,a,mt="object",yt="function",wt="array",xt="string",_t="boolean",St="number",t="null",zt="class",xi="style",Tt="id",_i="length",kt="prototype",Si="offsetHeight",zi="clientHeight",Ti="scrollHeight",ki="offsetWidth",Oi="clientWidth",Ci="scrollWidth",Ot="hasOwnProperty",Ai="getBoundingClientRect",Ct=(o={},f={},{e:c=["-webkit-","-moz-","-o-","-ms-"],o:a=["WebKit","Moz","O","MS"],u:function(n){var t=f[n];if(f[Ot](n))return t;for(var r,e,i,o=l(n),a=gt.createElement("div")[xi],u=0;u<c.length;u++)for(i=c[u].replace(/-/g,""),r=[n,c[u]+n,i+o,l(i)+o],e=0;e<r[_i];e++)if(a[r[e]]!==wi){t=r[e];break}return f[n]=t},s:function(n,t,r){var e=0,i=o[n];if(!o[Ot](n)){for(i=bt[n];e<a[_i];e++)i=i||bt[(t?a[e]:a[e].toLowerCase())+l(n)];o[n]=i}return i||r}});function l(n){return n.charAt(0).toUpperCase()+n.slice(1)}var Hi={wW:e(r,0,!0),wH:e(r,0),mO:e(Ct.s,0,"MutationObserver",!0),rO:e(Ct.s,0,"ResizeObserver",!0),rAF:e(Ct.s,0,"requestAnimationFrame",!1,function(n){return bt.setTimeout(n,1e3/60)}),cAF:e(Ct.s,0,"cancelAnimationFrame",!1,function(n){return bt.clearTimeout(n)}),now:function(){return Date.now&&Date.now()||(new Date).getTime()},stpP:function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},prvD:function(n){n.preventDefault&&n.cancelable?n.preventDefault():n.returnValue=!1},page:function(n){var t="page",r="client",e="X",i=((n=n.originalEvent||n).target||n.srcElement||gt).ownerDocument||gt,o=i.documentElement,a=i.body;if(n.touches===wi)return!n[t+e]&&n[r+e]&&null!=n[r+e]?{x:n[r+e]+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),y:n[r+"Y"]+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}:{x:n[t+e],y:n.pageY};var u=n.touches[0];return{x:u[t+e],y:u.pageY}},mBtn:function(n){var t=n.button;return n.which||t===wi?n.which:1&t?1:2&t?3:4&t?2:0},inA:function(n,t){for(var r=0;r<t[_i];r++)try{if(t[r]===n)return r}catch(e){}return-1},isA:function(n){var t=Array.isArray;return t?t(n):this.type(n)==wt},type:function(n){return n===wi?n+"":null===n?n+"":Object[kt].toString.call(n).replace(/^\[object (.+)\]$/,"$1").toLowerCase()},bind:e};function r(n){return n?bt.innerWidth||gt.documentElement[Oi]||gt.body[Oi]:bt.innerHeight||gt.documentElement[zi]||gt.body[zi]}function e(n,t){if(typeof n!=yt)throw"Can't bind function!";function r(){}function e(){return n.apply(this instanceof r?this:t,o.concat(Array[i].slice.call(arguments)))}var i=kt,o=Array[i].slice.call(arguments,2);return n[i]&&(r[i]=n[i]),e[i]=new r,e}var i,u,Ni,s,v,L,R,d,h,p,b,g,m,Li,Ri=Math,Di=n,Ii=(n.easing,n),Mi=(i=[],u="__overlayScrollbars__",function(n,t){var r=arguments[_i];if(r<1)return i;if(t)n[u]=t,i.push(n);else{var e=Hi.inA(n,i);if(-1<e){if(!(1<r))return i[e][u];delete n[u],i.splice(e,1)}}}),y=(m=[],L=Hi.type,g={className:["os-theme-dark",[t,xt]],resize:["none","n:none b:both h:horizontal v:vertical"],sizeAutoCapable:d=[!0,_t],clipAlways:d,normalizeRTL:d,paddingAbsolute:h=[!(R=[_t,St,xt,wt,mt,yt,t]),_t],autoUpdate:[null,[t,_t]],autoUpdateInterval:[33,St],nativeScrollbarsOverlaid:{showNativeScrollbars:h,initialize:d},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,St],dragScrolling:d,clickScrolling:h,touchSupport:d,snapHandle:h},textarea:{dynWidth:h,dynHeight:h,inheritedAttrs:[["style","class"],[xt,wt,t]]},callbacks:{onInitialized:p=[null,[t,yt]],onInitializationWithdrawn:p,onDestroyed:p,onScrollStart:p,onScroll:p,onScrollStop:p,onOverflowChanged:p,onOverflowAmountChanged:p,onDirectionChanged:p,onContentSizeChanged:p,onHostSizeChanged:p,onUpdated:p}},Li={v:w(),d:w(!0),p:function(n,t,C,r){var e={},i={},o=Ii.extend(!0,{},n),A=Ii.inArray,H=Ii.isEmptyObject,N=function(n,t,r,e,i,o){for(var a in t)if(t[Ot](a)&&n[Ot](a)){var u,f,c,l,s,v,d,h,p=!1,b=!1,g=t[a],m=L(g),y=m==mt,w=L(g)!=wt?[g]:g,x=r[a],_=n[a],S=L(_),z=o?o+".":"",T='The option "'+z+a+"\" wasn't set, because",k=[],O=[];if(x=x===wi?{}:x,y&&S==mt)e[a]={},i[a]={},N(_,g,x,e[a],i[a],z+a),Ii.each([n,e,i],function(n,t){H(t[a])&&delete t[a]});else if(!y){for(v=0;v<w[_i];v++)if(s=w[v],c=(m=L(s))==xt&&-1===A(s,R))for(k.push(xt),u=s.split(" "),O=O.concat(u),d=0;d<u[_i];d++){for(l=(f=u[d].split(":"))[0],h=0;h<f[_i];h++)if(_===f[h]){p=!0;break}if(p)break}else if(k.push(s),S===s){p=!0;break}p?((b=_!==x)&&(e[a]=_),(c?A(x,f)<0:b)&&(i[a]=c?l:_)):C&&console.warn(T+" it doesn't accept the type [ "+S.toUpperCase()+' ] with the value of "'+_+'".\r\nAccepted types are: [ '+k.join(", ").toUpperCase()+" ]."+(0<O[length]?"\r\nValid strings are: [ "+O.join(", ").split(":").join(", ")+" ].":"")),delete n[a]}}};return N(o,t,r||{},e,i),!H(o)&&C&&console.warn("The following options are discarded due to invalidity:\r\n"+bt.JSON.stringify(o,null,2)),{g:e,m:i}}},(Ni=bt.OverlayScrollbars=function(n,r,e){if(0===arguments[_i])return this;var i,t,o=[],a=Ii.isPlainObject(r);return n?(n=n[_i]!=wi?n:[n[0]||n],x(),0<n[_i]&&(a?Ii.each(n,function(n,t){(i=t)!==wi&&o.push(z(i,r,e,s,v))}):Ii.each(n,function(n,t){i=Mi(t),"!"===r&&Ni.valid(i)||Hi.type(r)==yt&&r(t,i)?o.push(i):r===wi&&o.push(i)}),t=1===o[_i]?o[0]:o),t):a||!r?t:o}).globals=function(){x();var n=Ii.extend(!0,{},s);return delete n.msie,n},Ni.defaultOptions=function(n){x();var t=s.defaultOptions;if(n===wi)return Ii.extend(!0,{},t);s.defaultOptions=Ii.extend(!0,{},t,Li.p(n,Li.d,!0,t).g)},Ni.valid=function(n){return n instanceof Ni&&!n.getState().destroyed},Ni.extension=function(n,t,r){var e=Hi.type(n)==xt,i=arguments[_i],o=0;if(i<1||!e)return Ii.extend(!0,{length:m[_i]},m);if(e)if(Hi.type(t)==yt)m.push({name:n,extensionFactory:t,defaultOptions:r});else for(;o<m[_i];o++)if(m[o].name===n){if(!(1<i))return Ii.extend(!0,{},m[o]);m.splice(o,1)}},Ni);function w(i){var o=function(n){var t,r,e;for(t in n)n[Ot](t)&&(r=n[t],(e=L(r))==wt?n[t]=r[i?1:0]:e==mt&&(n[t]=o(r)));return n};return o(Ii.extend(!0,{},g))}function x(){s=s||new _(Li.v),v=v||new S(s)}function _(n){var _=this,i="overflow",S=Ii("body"),z=Ii('<div id="os-dummy-scrollbar-size"><div></div></div>'),o=z[0],e=Ii(z.children("div").eq(0));S.append(z),z.hide().show();var t,r,a,u,f,c,l,s,v,d=T(o),h={x:0===d.x,y:0===d.y},p=(r=bt.navigator.userAgent,u="substring",f=r[a="indexOf"]("MSIE "),c=r[a]("Trident/"),l=r[a]("Edge/"),s=r[a]("rv:"),v=parseInt,0<f?t=v(r[u](f+5,r[a](".",f)),10):0<c?t=v(r[u](s+3,r[a](".",s)),10):0<l&&(t=v(r[u](l+5,r[a](".",l)),10)),t);function T(n){return{x:n[Si]-n[zi],y:n[ki]-n[Oi]}}Ii.extend(_,{defaultOptions:n,msie:p,autoUpdateLoop:!1,autoUpdateRecommended:!Hi.mO(),nativeScrollbarSize:d,nativeScrollbarIsOverlaid:h,nativeScrollbarStyling:function(){var n=!1;z.addClass("os-viewport-native-scrollbars-invisible");try{n="none"===z.css("scrollbar-width")&&(9<p||!p)||"none"===bt.getComputedStyle(o,"::-webkit-scrollbar").getPropertyValue("display")}catch(t){}return n}(),overlayScrollbarDummySize:{x:30,y:30},cssCalc:function(){for(var n,t=gt.createElement("div")[xi],r=-1;r<Ct.e[_i];r++)if(n=r<0?"calc":Ct.e[r]+"calc",t.cssText="width:"+n+"(1px);",t[_i])return n;return null}(),restrictedMeasuring:function(){z.css(i,"hidden");var n=o[Ci],t=o[Ti];z.css(i,"visible");var r=o[Ci],e=o[Ti];return n-r!=0||t-e!=0}(),rtlScrollBehavior:function(){z.css({"overflow-y":"hidden","overflow-x":"scroll",direction:"rtl"}).scrollLeft(0);var n=z.offset(),t=e.offset();z.scrollLeft(999);var r=e.offset();return{i:n.left===t.left,n:t.left-r.left==0}}(),supportTransform:Ct.u("transform")!==wi,supportTransition:Ct.u("transition")!==wi,supportPassiveEvents:function(){var n=!1;try{bt.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){n=!0}}))}catch(t){}return n}(),supportResizeObserver:!!Hi.rO(),supportMutationObserver:!!Hi.mO()}),z.removeAttr(xi).remove(),function(){if(!h.x||!h.y){var g=Ri.abs,m=Hi.wW(),y=Hi.wH(),w=x();Ii(bt).on("resize",function(){if(0<Mi().length){var n=Hi.wW(),t=Hi.wH(),r=n-m,e=t-y;if(0==r&&0==e)return;var i,o=Ri.round(n/(m/100)),a=Ri.round(t/(y/100)),u=g(r),f=g(e),c=g(o),l=g(a),s=x(),v=2<u&&2<f,d=!function b(n,t){var r=g(n),e=g(t);return!(r===e||r+1===e||r-1===e)}(c,l),h=v&&d&&(s!==w&&0<w),p=_.nativeScrollbarSize;h&&(S.append(z),i=_.nativeScrollbarSize=T(z[0]),z.remove(),p.x===i.x&&p.y===i.y||Ii.each(Mi(),function(){Mi(this)&&Mi(this).update("zoom")})),m=n,y=t,w=s}})}function x(){var n=bt.screen.deviceXDPI||0,t=bt.screen.logicalXDPI||1;return bt.devicePixelRatio||n/t}}()}function S(r){var c,e=Ii.inArray,l=Hi.now,s="autoUpdate",v=_i,d=[],h=[],p=!1,b=33,g=l(),m=function(){if(0<d[v]&&p){c=Hi.rAF()(function(){m()});var n,t,r,e,i,o,a=l(),u=a-g;if(b<u){g=a-u%b,n=33;for(var f=0;f<d[v];f++)(t=d[f])!==wi&&(e=(r=t.options())[s],i=Ri.max(1,r.autoUpdateInterval),o=l(),(!0===e||null===e)&&o-h[f]>i&&(t.update("auto"),h[f]=new Date(o+=i)),n=Ri.max(1,Ri.min(n,i)));b=n}}else b=33};this.add=function(n){-1===e(n,d)&&(d.push(n),h.push(l()),0<d[v]&&!p&&(p=!0,r.autoUpdateLoop=p,m()))},this.remove=function(n){var t=e(n,d);-1<t&&(h.splice(t,1),d.splice(t,1),0===d[v]&&p&&(p=!1,r.autoUpdateLoop=p,c!==wi&&(Hi.cAF()(c),c=-1)))}}function z(r,n,t,At,Ht){var ln=Hi.type,sn=Ii.inArray,c=Ii.each,Nt=new Ni,e=Ii[kt];if(ct(r)){if(Mi(r)){var i=Mi(r);return i.options(n),i}var Lt,Rt,Dt,It,I,Mt,Wt,Et,M,vn,m,A,s,jt,Ft,Pt,Ut,qt,y,v,Bt,Vt,Xt,Yt,$t,Kt,Gt,Jt,Qt,Zt,o,a,nr,tr,rr,u,W,d,E,er,ir,or,ar,ur,fr,cr,lr,sr,vr,dr,f,l,h,p,b,g,w,H,hr,pr,br,N,gr,mr,yr,wr,xr,_r,Sr,zr,Tr,kr,Or,Cr,Ar,Hr,Nr,Lr,L,Rr,Dr,Ir,Mr,Wr,Er,jr,Fr,x,_,Pr,Ur,qr,Br,Vr,Xr,Yr,$r,Kr,Gr,Jr,Qr,Zr,ne,S,te,z,T,k,O,re,ee,C,R,ie,oe,ae,ue,fe,j,F,ce,le,se,ve,de={},dn={},hn={},he={},pe={},D="-hidden",be="margin-",ge="padding-",me="border-",ye="top",we="right",xe="bottom",_e="left",Se="min-",ze="max-",Te="width",ke="height",Oe="float",Ce="",Ae="auto",pn="sync",He="scroll",Ne="100%",bn="x",gn="y",P=".",Le=" ",U="scrollbar",q="-horizontal",B="-vertical",Re=He+"Left",De=He+"Top",V="mousedown touchstart",X="mouseup touchend touchcancel",Y="mousemove touchmove",$="mouseenter",K="mouseleave",G="keydown",J="keyup",Q="selectstart",Z="transitionend webkitTransitionEnd oTransitionEnd",nn="__overlayScrollbarsRO__",tn="os-",rn="os-html",en="os-host",on=en+"-textarea",an=en+"-"+U+q+D,un=en+"-"+U+B+D,fn=en+"-transition",Ie=en+"-rtl",Me=en+"-resize-disabled",We=en+"-scrolling",Ee=en+"-overflow",je=Ee+"-x",Fe=Ee+"-y",cn="os-textarea",mn=cn+"-cover",yn="os-padding",wn="os-viewport",Pe=wn+"-native-scrollbars-invisible",xn=wn+"-native-scrollbars-overlaid",_n="os-content",Ue="os-content-arrange",qe="os-content-glue",Be="os-size-auto-observer",Sn="os-resize-observer",zn="os-resize-observer-item",Tn=zn+"-final",kn="os-text-inherit",On=tn+U,Cn=On+"-track",An=Cn+"-off",Hn=On+"-handle",Nn=Hn+"-off",Ln=On+"-unusable",Rn=On+"-"+Ae+D,Dn=On+"-corner",Ve=Dn+"-resize",Xe=Ve+"-both",Ye=Ve+q,$e=Ve+B,In=On+q,Mn=On+B,Wn="os-dragging",Ke="os-theme-none",En=[Pe,xn,An,Nn,Ln,Rn,Ve,Xe,Ye,$e,Wn].join(Le),jn=[],Fn={},Ge={},Je=42,Pn=[],Un={},qn=["wrap","cols","rows"],Bn=[Tt,zt,xi,"open"],Vn=[];return Nt.sleep=function(){Zt=!0},Nt.update=function(n){if(!Pt){var t,r,e,i,o,a=ln(n)==xt;return a?n===Ae?(t=function u(){if(!Zt&&!re){var r,e,i,o,n=[{_:ir,S:Bn.concat(":visible")},{_:Ut?er:wi,S:qn}];return c(n,function(n,t){(e=t._)&&c(t.S,function(n,t){i=":"===t.charAt(0)?e.is(t):e.attr(t),o=Un[t],r=r||bi(i,o),Un[t]=i})}),r}}(),r=function l(){if(Zt)return!1;var n,t,r,e,i,o=hi(),a=Ut&&Tr&&!Kr?er.val().length:0,u=!re&&Tr&&!Ut,f={},c={};return jt&&(f={x:mr[Ci],y:mr[Ti]}),u&&(n=cr.css(Oe),c[Oe]=Qt?we:_e,c[Te]=Ae,cr.css(c)),i={w:o[Ci]+a,h:o[Ti]+a},u&&(c[Oe]=n,c[Te]=Ne,cr.css(c)),t=ri(),r=bi(i,x),e=bi(f,S),x=i,S=f,r||t||e}(),(e=t||r)&&ii({z:r,T:Ft?wi:nr})):n===pn?re?(i=k(z.takeRecords()),o=O(T.takeRecords())):i=Nt.update(Ae):"zoom"===n&&ii({k:!0,z:!0}):(n=Zt||n,Zt=!1,Nt.update(pn)&&!n||ii({O:n})),Ut||cr.find("img").each(function(n,t){-1===Hi.inA(t,Pn)&&Ii(t).off("load",nt).on("load",nt)}),e||i||o}},Nt.options=function(n,t){var r,e={};if(Ii.isEmptyObject(n)||!Ii.isPlainObject(n)){if(ln(n)!=xt)return a;if(!(1<arguments.length))return vt(a,n);!function f(n,t,r){for(var e=t.split(P),i=e.length,o=0,a={},u=a;o<i;o++)a=a[e[o]]=o+1<i?{}:r;Ii.extend(n,u,!0)}(e,n,t),r=rt(e)}else r=rt(n);Ii.isEmptyObject(r)||ii({T:r})},Nt.destroy=function(){if(!Pt){for(var n in Ht.remove(Nt),ni(),Qe(ar),Qe(or),Fn)Nt.removeExt(n);for(;0<Vn[_i];)Vn.pop()();ti(!0),sr&&dt(sr),lr&&dt(lr),Vt&&dt(or),ot(!0),ut(!0),et(!0);for(var t=0;t<Pn[_i];t++)Ii(Pn[t]).off("load",nt);Pn=wi,Zt=Pt=!0,Mi(r,0),si("onDestroyed")}},Nt.scroll=function(n,t,r,e){if(0===arguments.length||n===wi){var i=dn,o=hn,a=Xr&&Qt&&Dt.i,u=Xr&&Qt&&Dt.n,f=i.C,c=i.A,l=i.H;return c=a?1-c:c,f=a?l-f:f,l*=u?-1:1,{position:{x:f*=u?-1:1,y:o.C},ratio:{x:c,y:o.A},max:{x:l,y:o.H},handleOffset:{x:i.N,y:o.N},handleLength:{x:i.L,y:o.L},handleLengthRatio:{x:i.R,y:o.R},trackLength:{x:i.D,y:o.D},snappedHandleOffset:{x:i.I,y:o.I},isRTL:Qt,isRTLNormalized:Xr}}Nt.update(pn);var s,v,d,h,p,m,y,b,g,w=Xr,x=[bn,_e,"l"],_=[gn,ye,"t"],S=["+=","-=","*=","/="],z=ln(t)==mt,T=z?t.complete:e,k={},O={},C="begin",A="nearest",H="never",N="ifneeded",L=_i,R=[bn,gn,"xy","yx"],D=[C,"end","center",A],I=["always",H,N],M=n[Ot]("el"),W=M?n.el:n,E=!!(W instanceof Ii||Di)&&W instanceof Di,j=!E&&ct(W),F=ln(T)!=yt?wi:function(){v&&fi(!0),d&&fi(!1),T()};function P(n,t){for(s=0;s<t[L];s++)if(n===t[s])return!0;return!1}function U(n,t){var r=n?x:_;if(t=ln(t)==xt||ln(t)==St?[t,t]:t,ln(t)==wt)return n?t[0]:t[1];if(ln(t)==mt)for(s=0;s<r[L];s++)if(r[s]in t)return t[r[s]]}function q(n,t){var r,e,i,o,a=ln(t)==xt,u=n?dn:hn,f=u.C,c=u.H,l=Qt&&n,s=l&&Dt.n&&!w,v="replace",d=eval;if((e=a?(2<t[L]&&(o=t.substr(0,2),-1<sn(o,S)&&(r=o)),t=(t=r?t.substr(2):t)[v](/min/g,0)[v](/</g,0)[v](/max/g,(s?"-":Ce)+Ne)[v](/>/g,(s?"-":Ce)+Ne)[v](/px/g,Ce)[v](/%/g," * "+c*(l&&Dt.n?-1:1)/100)[v](/vw/g," * "+he.w)[v](/vh/g," * "+he.h),di(isNaN(t)?di(d(t),!0).toFixed():t)):t)!==wi&&!isNaN(e)&&ln(e)==St){var h=w&&l,p=f*(h&&Dt.n?-1:1),b=h&&Dt.i,g=h&&Dt.n;switch(p=b?c-p:p,r){case"+=":i=p+e;break;case"-=":i=p-e;break;case"*=":i=p*e;break;case"/=":i=p/e;break;default:i=e}i=b?c-i:i,i*=g?-1:1,i=l&&Dt.n?Ri.min(0,Ri.max(c,i)):Ri.max(0,Ri.min(c,i))}return i===f?wi:i}function B(n,t,r,e){var i,o,a=[r,r],u=ln(n);if(u==t)n=[n,n];else if(u==wt){if(2<(i=n[L])||i<1)n=a;else for(1===i&&(n[1]=r),s=0;s<i;s++)if(o=n[s],ln(o)!=t||!P(o,e)){n=a;break}}else n=u==mt?[n[bn]||r,n[gn]||r]:a;return{x:n[0],y:n[1]}}function V(n){var t,r,e=[],i=[ye,we,xe,_e];for(s=0;s<n[L]&&s!==i[L];s++)t=n[s],(r=ln(t))==_t?e.push(t?di(g.css(be+i[s])):0):e.push(r==St?t:0);return e}if(E||j){var X,Y=M?n.margin:0,$=M?n.axis:0,K=M?n.scroll:0,G=M?n.block:0,J=[0,0,0,0],Q=ln(Y);if(0<(g=E?W:Ii(W))[L]){Y=Q==St||Q==_t?V([Y,Y,Y,Y]):Q==wt?2===(X=Y[L])?V([Y[0],Y[1],Y[0],Y[1]]):4<=X?V(Y):J:Q==mt?V([Y[ye],Y[we],Y[xe],Y[_e]]):J,p=P($,R)?$:"xy",m=B(K,xt,"always",I),y=B(G,xt,C,D),b=Y;var Z=dn.C,nn=hn.C,tn=ur.offset(),rn=g.offset(),en={x:m.x==H||p==gn,y:m.y==H||p==bn};rn[ye]-=b[0],rn[_e]-=b[3];var on={x:Ri.round(rn[_e]-tn[_e]+Z),y:Ri.round(rn[ye]-tn[ye]+nn)};if(Qt&&(Dt.n||Dt.i||(on.x=Ri.round(tn[_e]-rn[_e]+Z)),Dt.n&&w&&(on.x*=-1),Dt.i&&w&&(on.x=Ri.round(tn[_e]-rn[_e]+(dn.H-Z)))),y.x!=C||y.y!=C||m.x==N||m.y==N||Qt){var an=g[0],un=vn?an[Ai]():{width:an[ki],height:an[Si]},fn={w:un[Te]+b[3]+b[1],h:un[ke]+b[0]+b[2]},cn=function(n){var t=li(n),r=t.M,e=t.W,i=t.j,o=y[i]==(n&&Qt?C:"end"),a="center"==y[i],u=y[i]==A,f=m[i]==H,c=m[i]==N,l=he[r],s=tn[e],v=fn[r],d=rn[e],h=a?2:1,p=d+v/2,b=s+l/2,g=v<=l&&s<=d&&d+v<=s+l;f?en[i]=!0:en[i]||((u||c)&&(en[i]=c&&g,o=v<l?b<p:p<b),on[i]-=o||a?(l/h-v/h)*(n&&Qt&&w?-1:1):0)};cn(!0),cn(!1)}en.y&&delete on.y,en.x&&delete on.x,n=on}}k[Re]=q(!0,U(!0,n)),k[De]=q(!1,U(!1,n)),v=k[Re]!==wi,d=k[De]!==wi,(v||d)&&(0<t||z)?z?(t.complete=F,fr.animate(k,t)):(h={duration:t,complete:F},ln(r)==wt||Ii.isPlainObject(r)?(O[Re]=r[0]||r.x,O[De]=r[1]||r.y,h.specialEasing=O):h.easing=r,fr.animate(k,h)):(v&&fr[Re](k[Re]),d&&fr[De](k[De]))},Nt.scrollStop=function(n,t,r){return fr.stop(n,t,r),Nt},Nt.getElements=function(n){var t={target:hr,host:pr,padding:gr,viewport:mr,content:yr,scrollbarHorizontal:{scrollbar:f[0],track:l[0],handle:h[0]},scrollbarVertical:{scrollbar:p[0],track:b[0],handle:g[0]},scrollbarCorner:dr[0]};return ln(n)==xt?vt(t,n):t},Nt.getState=function(n){function t(n){if(!Ii.isPlainObject(n))return n;function t(n,t){r[Ot](n)&&(r[t]=r[n],delete r[n])}var r=gi({},n);return t("w",Te),t("h",ke),delete r.c,r}var r={destroyed:!!t(Pt),sleeping:!!t(Zt),autoUpdate:t(!re),widthAuto:t(Tr),heightAuto:t(kr),padding:t(Ar),overflowAmount:t(Wr),hideOverflow:t(zr),hasOverflow:t(Sr),contentScrollSize:t(xr),viewportSize:t(he),hostSize:t(wr),documentMixed:t(y)};return ln(n)==xt?vt(r,n):r},Nt.ext=function(n){var t,r="added removed on contract".split(" "),e=0;if(ln(n)==xt){if(Fn[Ot](n))for(t=gi({},Fn[n]);e<r.length;e++)delete t[r[e]]}else for(e in t={},Fn)t[e]=gi({},Nt.ext(e));return t},Nt.addExt=function(n,t){var r,e,i,o,a=Ni.extension(n),u=!0;if(a){if(Fn[Ot](n))return Nt.ext(n);if((r=a.extensionFactory.call(Nt,gi({},a.defaultOptions),Ii,Hi))&&(i=r.contract,ln(i)==yt&&(o=i(bt),u=ln(o)==_t?o:u),u))return e=(Fn[n]=r).added,ln(e)==yt&&e(t),Nt.ext(n)}else console.warn('A extension with the name "'+n+"\" isn't registered.")},Nt.removeExt=function(n){var t,r=Fn[n];return!!r&&(delete Fn[n],t=r.removed,ln(t)==yt&&t(),!0)},Ni.valid(function pt(n,t,r){var e,i;return o=At.defaultOptions,Mt=At.nativeScrollbarStyling,Et=gi({},At.nativeScrollbarSize),Lt=gi({},At.nativeScrollbarIsOverlaid),Rt=gi({},At.overlayScrollbarDummySize),Dt=gi({},At.rtlScrollBehavior),rt(gi({},o,t)),Wt=At.cssCalc,I=At.msie,It=At.autoUpdateRecommended,M=At.supportTransition,vn=At.supportTransform,m=At.supportPassiveEvents,A=At.supportResizeObserver,s=At.supportMutationObserver,jt=At.restrictedMeasuring,W=Ii(n.ownerDocument),H=W[0],u=Ii(H.defaultView||H.parentWindow),w=u[0],d=ht(W,"html"),E=ht(d,"body"),er=Ii(n),hr=er[0],Ut=er.is("textarea"),qt=er.is("body"),y=H!==gt,v=Ut?er.hasClass(cn)&&er.parent().hasClass(_n):er.hasClass(en)&&er.children(P+yn)[_i],Lt.x&&Lt.y&&!nr.nativeScrollbarsOverlaid.initialize?(si("onInitializationWithdrawn"),v&&(et(!0),ot(!0),ut(!0)),Zt=Pt=!0):(qt&&((e={}).l=Ri.max(er[Re](),d[Re](),u[Re]()),e.t=Ri.max(er[De](),d[De](),u[De]()),i=function(){fr.removeAttr("tabindex"),Xn(fr,V,i,!0,!0)}),et(),ot(),ut(),it(),at(!0),at(!1),function l(){var r,t=w.top!==w,e={},i={},o={};function a(n){if(f(n)){var t=c(n),r={};(se||le)&&(r[Te]=i.w+(t.x-e.x)*o.x),(ve||le)&&(r[ke]=i.h+(t.y-e.y)*o.y),ir.css(r),Hi.stpP(n)}else u(n)}function u(n){var t=n!==wi;Xn(W,[Q,Y,X],[Zn,a,u],!0),yi(E,Wn),dr.releaseCapture&&dr.releaseCapture(),t&&(r&&Ze(),Nt.update(Ae)),r=!1}function f(n){var t=(n.originalEvent||n).touches!==wi;return!Zt&&!Pt&&(1===Hi.mBtn(n)||t)}function c(n){return I&&t?{x:n.screenX,y:n.screenY}:Hi.page(n)}Yn(dr,V,function(n){f(n)&&!ce&&(re&&(r=!0,ni()),e=c(n),i.w=pr[ki]-(Bt?0:Xt),i.h=pr[Si]-(Bt?0:Yt),o=ft(),Xn(W,[Q,Y,X],[Zn,a,u]),mi(E,Wn),dr.setCapture&&dr.setCapture(),Hi.prvD(n),Hi.stpP(n))})}(),$n(),Qe(ar,Kn),qt&&(fr[Re](e.l)[De](e.t),gt.activeElement==n&&mr.focus&&(fr.attr("tabindex","-1"),mr.focus(),Xn(fr,V,i,!1,!0))),Nt.update(Ae),Ft=!0,si("onInitialized"),c(jn,function(n,t){si(t.n,t.a)}),jn=[],ln(r)==xt&&(r=[r]),Hi.isA(r)?c(r,function(n,t){Nt.addExt(t)}):Ii.isPlainObject(r)&&c(r,function(n,t){Nt.addExt(n,t)}),setTimeout(function(){M&&!Pt&&mi(ir,fn)},333)),Nt}(r,n,t))&&Mi(r,Nt),Nt}function Xn(n,t,r,e,i){var o=ln(t)==wt&&ln(r)==wt,a=e?"removeEventListener":"addEventListener",u=e?"off":"on",f=!o&&t.split(Le),c=0;if(o)for(;c<t[_i];c++)Xn(n,t[c],r[c],e);else for(;c<f[_i];c++)m?n[0][a](f[c],r,{passive:i||!1}):n[u](f[c],r)}function Yn(n,t,r,e){Xn(n,t,r,!1,e),Vn.push(Hi.bind(Xn,0,n,t,r,!0,e))}function Qe(n,t){if(n){var r=Hi.rO(),e="animationstart mozAnimationStart webkitAnimationStart MSAnimationStart",i="childNodes",o=3333333,a=function(){n[De](o)[Re](Qt?Dt.n?-o:Dt.i?0:o:o),t()};if(t){if(A)((O=n.append(pi(Sn+" observed")).contents()[0])[nn]=new r(a)).observe(O);else if(9<I||!It){n.prepend(pi(Sn,pi({c:zn,dir:"ltr"},pi(zn,pi(Tn))+pi(zn,pi({c:Tn,style:"width: 200%; height: 200%"})))));var u,f,c,l,s=n[0][i][0][i][0],v=Ii(s[i][1]),d=Ii(s[i][0]),h=Ii(d[0][i][0]),p=s[ki],b=s[Si],g=At.nativeScrollbarSize,m=function(){d[Re](o)[De](o),v[Re](o)[De](o)},y=function(){f=0,u&&(p=c,b=l,a())},w=function(n){return c=s[ki],l=s[Si],u=c!=p||l!=b,n&&u&&!f?(Hi.cAF()(f),f=Hi.rAF()(y)):n||y(),m(),n&&(Hi.prvD(n),Hi.stpP(n)),!1},x={},_={};vi(_,Ce,[-2*(g.y+1),-2*g.x,-2*g.y,-2*(g.x+1)]),Ii(s).css(_),d.on(He,w),v.on(He,w),n.on(e,function(){w(!1)}),x[Te]=o,x[ke]=o,h.css(x),m()}else{var S=H.attachEvent,z=I!==wi;if(S)n.prepend(pi(Sn)),ht(n,P+Sn)[0].attachEvent("onresize",a);else{var T=H.createElement(mt);T.setAttribute("tabindex","-1"),T.setAttribute(zt,Sn),T.onload=function(){var n=this.contentDocument.defaultView;n.addEventListener("resize",a),n.document.documentElement.style.display="none"},T.type="text/html",z&&n.prepend(T),T.data="about:blank",z||n.prepend(T),n.on(e,a)}}if(n[0]===N){var k=function(){var n=ir.css("direction"),t={},r=0,e=!1;return n!==L&&(r="ltr"===n?(t[_e]=0,t[we]=Ae,o):(t[_e]=Ae,t[we]=0,Dt.n?-o:Dt.i?0:o),ar.children().eq(0).css(t),ar[Re](r)[De](o),L=n,e=!0),e};k(),Yn(n,He,function(n){return k()&&ii(),Hi.prvD(n),Hi.stpP(n),!1})}}else if(A){var O,C=(O=n.contents()[0])[nn];C&&(C.disconnect(),delete O[nn])}else dt(n.children(P+Sn).eq(0))}}function $n(){if(s){var e,i,r,o,a,u,n=Hi.mO(),f=Hi.now();O=function(n){var t=!1;return Ft&&!Zt&&(c(n,function(){return!(t=function o(n){var t=n.attributeName,r=n.target,e=n.type,i="closest";if(r===yr)return null===t;if("attributes"===e&&(t===zt||t===xi)&&!Ut){if(t===zt&&Ii(r).hasClass(en))return tt(n.oldValue,r.getAttribute(zt));if(typeof r[i]!=yt)return!0;if(null!==r[i](P+Sn)||null!==r[i](P+On)||null!==r[i](P+Dn))return!1}return!0}(this))}),t&&(o=Hi.now(),a=kr||Tr,u=function(){Pt||(f=o,Ut&&ei(),a?ii():Nt.update(Ae))},clearTimeout(r),11<o-f||!a?u():r=setTimeout(u,11))),t},z=new n(k=function(n){var t,r=!1;return Ft&&!Zt&&(c(n,function(){if(e=(t=this).target,i=t.attributeName,r=i===zt?tt(t.oldValue,e.className):i!==xi||t.oldValue!==e[xi].cssText)return!1}),r&&Nt.update(Ae)),r}),T=new n(O)}}function Ze(){s&&!re&&(z.observe(pr,{attributes:!0,attributeOldValue:!0,attributeFilter:Bn}),T.observe(Ut?hr:yr,{attributes:!0,attributeOldValue:!0,subtree:!Ut,childList:!Ut,characterData:!Ut,attributeFilter:Ut?qn:Bn}),re=!0)}function ni(){s&&re&&(z.disconnect(),T.disconnect(),re=!1)}function Kn(){if(!Zt){var n,t={w:N[Ci],h:N[Ti]};n=bi(t,_),_=t,n&&ii({k:!0})}}function Gn(){fe&&ai(!0)}function Jn(){fe&&!E.hasClass(Wn)&&ai(!1)}function Qn(){ue&&(ai(!0),clearTimeout(R),R=setTimeout(function(){ue&&!Pt&&ai(!1)},100))}function Zn(n){return Hi.prvD(n),!1}function nt(){ii({z:!0})}function ti(n){Xn(ir,Y,Qn,!ue||n,!0),Xn(ir,[$,K],[Gn,Jn],!!ue||n,!0),Ft||n||ir.one("mouseover",Gn)}function ri(){var n={};return qt&&lr&&(n.w=di(lr.css(Se+Te)),n.h=di(lr.css(Se+ke)),n.c=bi(n,ne),n.f=!0),!!(ne=n).c}function tt(n,t){var r=t!==wi&&null!==t?t.split(Le):Ce,e=n!==wi&&null!==n?n.split(Le):Ce;if(r===Ce&&e===Ce)return!1;var i,o,a,u,f,c=function h(n,t){var r,e,i=[],o=[];for(r=0;r<n.length;r++)i[n[r]]=!0;for(r=0;r<t.length;r++)i[t[r]]?delete i[t[r]]:i[t[r]]=!0;for(e in i)o.push(e);return o}(e,r),l=!1,s=$r!==wi&&null!==$r?$r.split(Le):[Ce],v=Yr!==wi&&null!==Yr?Yr.split(Le):[Ce],d=sn(Ke,c);for(-1<d&&c.splice(d,1),o=0;o<c.length;o++)if(0!==(i=c[o]).indexOf(en)){for(f=u=!0,a=0;a<s.length;a++)if(i===s[a]){u=!1;break}for(a=0;a<v.length;a++)if(i===v[a]){f=!1;break}if(u&&f){l=!0;break}}return l}function ei(){if(!Zt){var n,t,r,e,i=!Kr,o=he.w,a=he.h,u={},f=Tr||i;return u[Se+Te]=Ce,u[Se+ke]=Ce,u[Te]=Ae,er.css(u),n=hr[ki],t=f?Ri.max(n,hr[Ci]-1):1,u[Te]=Tr?Ae:Ne,u[Se+Te]=Ne,u[ke]=Ae,er.css(u),r=hr[Si],e=Ri.max(r,hr[Ti]-1),u[Te]=t,u[ke]=e,vr.css(u),u[Se+Te]=o,u[Se+ke]=a,er.css(u),{F:n,P:r,U:t,q:e}}}function ii(n){clearTimeout(rr),n=n||{},Ge.k|=n.k,Ge.z|=n.z,Ge.O|=n.O;var t,r=Hi.now(),e=!!Ge.k,i=!!Ge.z,o=!!Ge.O,a=n.T,u=0<Je&&Ft&&!Pt&&!o&&!a&&r-tr<Je&&!kr&&!Tr;if(u&&(rr=setTimeout(ii,Je)),!(Pt||u||Zt&&!a||Ft&&!o&&(t=ir.is(":hidden"))||"inline"===ir.css("display"))){tr=r,Ge={},!Mt||Lt.x&&Lt.y?Et=gi({},At.nativeScrollbarSize):(Et.x=0,Et.y=0),pe={x:3*(Et.x+(Lt.x?0:3)),y:3*(Et.y+(Lt.y?0:3))};var f=function(){return bi.apply(this,[].slice.call(arguments).concat([o]))},c={x:fr[Re](),y:fr[De]()},l=nr.scrollbars,s=nr.textarea,v=l.visibility,d=f(v,Pr),h=l.autoHide,p=f(h,Ur),b=l.clickScrolling,g=f(b,qr),m=l.dragScrolling,y=f(m,Br),w=nr.className,x=f(w,Yr),_=nr.resize,S=f(_,Vr)&&!qt,z=nr.paddingAbsolute,T=f(z,Rr),k=nr.clipAlways,O=f(k,Dr),C=nr.sizeAutoCapable&&!qt,A=f(C,Fr),H=nr.nativeScrollbarsOverlaid.showNativeScrollbars,N=f(H,Er),L=nr.autoUpdate,R=f(L,jr),D=nr.overflowBehavior,I=f(D,Mr,o),M=s.dynWidth,W=f(Zr,M),E=s.dynHeight,j=f(Qr,E);if(oe="n"===h,ae="s"===h,ue="m"===h,fe="l"===h,ie=l.autoHideDelay,$r=Yr,ce="n"===_,le="b"===_,se="h"===_,ve="v"===_,Xr=nr.normalizeRTL,H=H&&Lt.x&&Lt.y,Pr=v,Ur=h,qr=b,Br=m,Yr=w,Vr=_,Rr=z,Dr=k,Fr=C,Er=H,jr=L,Mr=gi({},D),Zr=M,Qr=E,Sr=Sr||{x:!1,y:!1},x&&(yi(ir,$r+Le+Ke),mi(ir,w!==wi&&null!==w&&0<w.length?w:Ke)),R&&(!0===L?(ni(),Ht.add(Nt)):null===L&&It?(ni(),Ht.add(Nt)):(Ht.remove(Nt),Ze())),A)if(C)if(sr?sr.show():(sr=Ii(pi(qe)),ur.before(sr)),Vt)or.show();else{or=Ii(pi(Be)),br=or[0],sr.before(or);var F={w:-1,h:-1};Qe(or,function(){var n={w:br[ki],h:br[Si]};bi(n,F)&&(Ft&&kr&&0<n.h||Tr&&0<n.w?ii():(Ft&&!kr&&0===n.h||!Tr&&0===n.w)&&ii()),F=n}),Vt=!0,null!==Wt&&or.css(ke,Wt+"(100% + 1px)")}else Vt&&or.hide(),sr&&sr.hide();o&&(ar.find("*").trigger(He),Vt&&or.find("*").trigger(He));var P,U=f(t=t===wi?ir.is(":hidden"):t,te),q=!!Ut&&"off"!==er.attr("wrap"),B=f(q,Kr),V=ir.css("direction"),X=f(V,Lr),Y=ir.css("box-sizing"),$=f(Y,Cr),K={c:o,t:di(ir.css(ge+ye)),r:di(ir.css(ge+we)),b:di(ir.css(ge+xe)),l:di(ir.css(ge+_e))};try{P=Vt?br[Ai]():null}catch(Ot){return}Bt="border-box"===Y;var G=(Qt="rtl"===V)?_e:we,J=Qt?we:_e,Q=!1,Z=!(!Vt||"none"===ir.css(Oe))&&(0===Ri.round(P.right-P.left)&&(!!z||0<pr[Oi]-Xt));if(C&&!Z){var nn=pr[ki],tn=sr.css(Te);sr.css(Te,Ae);var rn=pr[ki];sr.css(Te,tn),(Q=nn!==rn)||(sr.css(Te,nn+1),rn=pr[ki],sr.css(Te,tn),Q=nn!==rn)}var en=(Z||Q)&&C&&!t,on=f(en,Tr),an=!en&&Tr,un=!(!Vt||!C||t)&&0===Ri.round(P.bottom-P.top),fn=f(un,kr),cn=!un&&kr,ln="-"+Te,sn=en&&Bt||!Bt,vn=un&&Bt||!Bt,dn={c:o,t:vn?di(ir.css(me+ye+ln),!0):0,r:sn?di(ir.css(me+we+ln),!0):0,b:vn?di(ir.css(me+xe+ln),!0):0,l:sn?di(ir.css(me+_e+ln),!0):0},hn={c:o,t:di(ir.css(be+ye)),r:di(ir.css(be+we)),b:di(ir.css(be+xe)),l:di(ir.css(be+_e))},pn={h:String(ir.css(ze+ke)),w:String(ir.css(ze+Te))},bn={},gn={},mn=function(){return{w:pr[Oi],h:pr[zi]}},yn=function(){return{w:gr[ki]+Ri.max(0,yr[Oi]-yr[Ci]),h:gr[Si]+Ri.max(0,yr[zi]-yr[Ti])}},wn=Xt=K.l+K.r,xn=Yt=K.t+K.b;if(wn*=z?1:0,xn*=z?1:0,K.c=f(K,Ar),$t=dn.l+dn.r,Kt=dn.t+dn.b,dn.c=f(dn,Hr),Gt=hn.l+hn.r,Jt=hn.t+hn.b,hn.c=f(hn,Nr),pn.ih=di(pn.h),pn.iw=di(pn.w),pn.ch=-1<pn.h.indexOf("px"),pn.cw=-1<pn.w.indexOf("px"),pn.c=f(pn,Or),te=t,Kr=q,Lr=V,Cr=Y,Tr=en,kr=un,Ar=K,Hr=dn,Nr=hn,Or=pn,X&&Vt&&or.css(Oe,J),K.c||X||T||on||fn||$||A){var _n={},Sn={};vi(gn,be,[-K.t,-K.r,-K.b,-K.l]),z?(vi(_n,Ce,[K.t,K.r,K.b,K.l]),vi(Ut?Sn:bn,ge)):(vi(_n,Ce),vi(Ut?Sn:bn,ge,[K.t,K.r,K.b,K.l])),ur.css(_n),er.css(Sn)}he=yn();var zn=!!Ut&&ei(),Tn=Ut&&f(zn,Jr),kn=Ut&&zn?{w:M?zn.U:zn.F,h:E?zn.q:zn.P}:{};if(Jr=zn,un&&(fn||T||$||pn.c||K.c||dn.c)?bn[ke]=Ae:(fn||T)&&(bn[ze+ke]=Ce,bn[ke]=Ne),en&&(on||T||$||pn.c||K.c||dn.c||X)?(bn[Te]=Ae,gn[ze+Te]=Ne):(on||T)&&(bn[ze+Te]=Ce,bn[Te]=Ne,bn[Oe]=Ce,gn[ze+Te]=Ce),en?(pn.cw||(bn[ze+Te]=Ce),gn[Te]=Ae,bn[Te]=Ae,bn[Oe]=J):gn[Te]=Ce,un?(pn.ch||(bn[ze+ke]=Ce),gn[ke]=kn.h||yr[zi]):gn[ke]=Ce,C&&sr.css(gn),cr.css(bn),bn={},gn={},e||i||Tn||X||$||T||on||en||fn||un||pn.c||N||I||O||S||d||p||y||g||W||j||B){var On="overflow",Cn=On+"-x",An=On+"-y",Hn=jt?Lt.x||Lt.y||he.w<pe.y||he.h<pe.x||un||U:un,Nn={},Ln=Sr.y&&zr.ys&&!H&&!Mt?Lt.y?fr.css(G):-Et.y:0,Rn=Sr.x&&zr.xs&&!H&&!Mt?Lt.x?fr.css(xe):-Et.x:0;vi(Nn,Ce),fr.css(Nn),Hn&&cr.css(On,"hidden");var Dn=hi(),In=jt&&!Hn?mr:Dn,Mn={w:kn.w||Dn[Oi],h:kn.h||Dn[zi]},Wn=Ri.max(Dn[Ci],In[Ci]),En=Ri.max(Dn[Ti],In[Ti]);Nn[xe]=cn?Ce:Rn,Nn[G]=an?Ce:Ln,fr.css(Nn),he=yn();var jn=mn(),Fn={w:Ri.max((en?Mn.w:Wn)+wn,jn.w),h:Ri.max((un?Mn.h:En)+xn,jn.h)};if(Fn.c=f(Fn,Ir),Ir=Fn,C){(Fn.c||un||en)&&(gn[Te]=Fn.w,gn[ke]=Fn.h,Ut||(Mn={w:Dn[Oi],h:Dn[zi]}));var Pn={},Un=function(n){var t=li(n),r=t.M,e=t.B,i=n?en:un,o=n?$t:Kt,a=n?Xt:Yt,u=n?Gt:Jt,f=gn[e]+(Bt?o:-a);i&&(i||!dn.c)||(gn[e]=jn[r]-(Bt?0:a+o)-1-u),i&&pn["c"+r]&&pn["i"+r]===f&&(gn[e]=f+(Bt?0:a)+1),!(i&&Mn[r]<he[r])||n&&Ut&&q||(Ut&&(Pn[e]=di(vr.css(e))-1),gn[e]-=1),0<Mn[r]&&(gn[e]=Ri.max(1,gn[e]))};Un(!0),Un(!1),Ut&&vr.css(Pn),sr.css(gn)}en&&(bn[Te]=Ne),!en||Bt||re||(bn[Oe]="none"),cr.css(bn),bn={};var qn={w:Ri.max(Dn[Ci],In[Ci]),h:Ri.max(Dn[Ti],In[Ti])};qn.c=i=f(qn,xr),xr=qn,Hn&&cr.css(On,Ce),he=yn(),e=f(jn=mn(),wr),wr=jn;var Bn=Ut&&(0===he.w||0===he.h),Vn=Wr,Xn={},Yn={},$n={},Kn={},Gn={},Jn={},Qn={},Zn=gr[Ai](),nt=function(n){var t=li(n),r=li(!n).j,e=t.j,i=t.M,o=t.B,a=He+t.V+"Max",u=Zn[o]?Ri.abs(Zn[o]-he[i]):0;Xn[e]="v-s"===D[e],Yn[e]="v-h"===D[e],$n[e]="s"===D[e],Kn[e]=Ri.max(0,Ri.round(100*(qn[i]-he[i]))/100),Kn[e]*=Bn||0===mr[a]&&0<u&&u<1?0:1,Gn[e]=0<Kn[e],Jn[e]=Xn[e]||Yn[e]?Gn[r]&&!Xn[r]&&!Yn[r]:Gn[e],Jn[e+"s"]=!!Jn[e]&&($n[e]||Xn[e]),Qn[e]=Gn[e]&&Jn[e+"s"]};if(nt(!0),nt(!1),Kn.c=f(Kn,Wr),Wr=Kn,Gn.c=f(Gn,Sr),Sr=Gn,Jn.c=f(Jn,zr),zr=Jn,Lt.x||Lt.y){var tt,rt={},et={},it=o;(Gn.x||Gn.y)&&(et.w=Lt.y&&Gn.y?qn.w+Rt.y:Ce,et.h=Lt.x&&Gn.x?qn.h+Rt.x:Ce,it=f(et,_r),_r=et),(Gn.c||Jn.c||qn.c||X||on||fn||en||un||N)&&(bn[be+J]=bn[me+J]=Ce,tt=function(n){var t=li(n),r=li(!n),e=t.j,i=n?xe:G,o=n?un:en;Lt[e]&&Gn[e]&&Jn[e+"s"]?(bn[be+i]=o?H?Ce:Rt[e]:Ce,bn[me+i]=n&&o||H?Ce:Rt[e]+"px solid transparent"):(et[r.M]=bn[be+i]=bn[me+i]=Ce,it=!0)},Mt?H?yi(fr,Pe):mi(fr,Pe):(tt(!0),tt(!1))),H&&(et.w=et.h=Ce,it=!0),it&&!Mt&&(rt[Te]=Jn.y?et.w:Ce,rt[ke]=Jn.x?et.h:Ce,lr||(lr=Ii(pi(Ue)),fr.prepend(lr)),lr.css(rt)),cr.css(bn)}var ot,at={};_n={};if((e||Gn.c||Jn.c||qn.c||I||$||N||X||O||fn)&&(at[J]=Ce,(ot=function(n){function t(){at[a]=Ce,de[e.M]=0}var r=li(n),e=li(!n),i=r.j,o=r.X,a=n?xe:G;Gn[i]&&Jn[i+"s"]?(at[On+o]=He,H||Mt?t():(at[a]=-(Lt[i]?Rt[i]:Et[i]),de[e.M]=Lt[i]?Rt[e.j]:0)):(at[On+o]=Ce,t())})(!0),ot(!1),!Mt&&(he.h<pe.x||he.w<pe.y)&&(Gn.x&&Jn.x&&!Lt.x||Gn.y&&Jn.y&&!Lt.y)?(at[ge+ye]=pe.x,at[be+ye]=-pe.x,at[ge+J]=pe.y,at[be+J]=-pe.y):at[ge+ye]=at[be+ye]=at[ge+J]=at[be+J]=Ce,at[ge+G]=at[be+G]=Ce,Gn.x&&Jn.x||Gn.y&&Jn.y||Bn?Ut&&Bn&&(_n[Cn]=_n[An]="hidden"):(!k||Yn.x||Xn.x||Yn.y||Xn.y)&&(Ut&&(_n[Cn]=_n[An]=Ce),at[Cn]=at[An]="visible"),ur.css(_n),fr.css(at),at={},(Gn.c||$||on||fn)&&(!Lt.x||!Lt.y))){var ut=yr[xi];ut.webkitTransform="scale(1)",ut.display="run-in",yr[Si],ut.display=Ce,ut.webkitTransform=Ce}if(bn={},X||on||fn)if(Qt&&en){var ft=cr.css(Oe),ct=Ri.round(cr.css(Oe,Ce).css(_e,Ce).position().left);cr.css(Oe,ft),ct!==Ri.round(cr.position().left)&&(bn[_e]=ct)}else bn[_e]=Ce;if(cr.css(bn),Ut&&i){var lt=function Ct(){var n=hr.selectionStart;if(n===wi)return;var t,r,e=er.val(),i=e[_i],o=e.split("\n"),a=o[_i],u=e.substr(0,n).split("\n"),f=0,c=0,l=u[_i],s=u[u[_i]-1][_i];for(r=0;r<o[_i];r++)t=o[r][_i],c<t&&(f=r+1,c=t);return{Y:l,$:s,K:a,G:c,J:f,Q:n,Z:i}}();if(lt){var st=Gr===wi||lt.K!==Gr.K,vt=lt.Y,dt=lt.$,ht=lt.J,pt=lt.K,bt=lt.G,gt=lt.Q,mt=lt.Z<=gt&&ee,yt={x:q||dt!==bt||vt!==ht?-1:Wr.x,y:(q?mt||st&&Vn!==wi&&c.y===Vn.y:(mt||st)&&vt===pt)?Wr.y:-1};c.x=-1<yt.x?Qt&&Xr&&Dt.i?0:yt.x:c.x,c.y=-1<yt.y?yt.y:c.y}Gr=lt}Qt&&Dt.i&&Lt.y&&Gn.x&&Xr&&(c.x+=de.w||0),en&&ir[Re](0),un&&ir[De](0),fr[Re](c.x)[De](c.y);var wt="v"===v,xt="h"===v,_t="a"===v,St=Hi.bind(oi,0,!0,!0,Qn.x),zt=Hi.bind(oi,0,!1,!0,Qn.y),Tt=Hi.bind(oi,0,!0,!1,Qn.x),kt=Hi.bind(oi,0,!1,!1,Qn.y);Jn.x||Jn.y?mi(ir,Ee):yi(ir,Ee),Jn.x?mi(ir,je):yi(ir,je),Jn.y?mi(ir,Fe):yi(ir,Fe),X&&(Qt?mi(ir,Ie):yi(ir,Ie)),qt&&mi(ir,Me),S&&(yi(dr,[Ve,Xe,Ye,$e].join(Le)),ce?mi(ir,Me):(yi(ir,Me),mi(dr,Ve),le?mi(dr,Xe):se?mi(dr,Ye):ve&&mi(dr,$e))),(d||I||Jn.c||Gn.c||N)&&(H?N&&(yi(ir,We),H&&(Tt(),kt())):_t?(Qn.x?St():Tt(),Qn.y?zt():kt()):wt?(St(),zt()):xt&&(Tt(),kt())),(p||N)&&(fe||ue?(ti(!0),ti()):ti(!0),oe?ai(!0):ai(!1,!0)),(e||Kn.c||fn||on||S||$||T||N||X)&&(ui(!0),fi(!0),ui(!1),fi(!1)),g&&ci(!0,b),y&&ci(!1,m),X&&si("onDirectionChanged",{isRTL:Qt,dir:V}),e&&si("onHostSizeChanged",{width:wr.w,height:wr.h}),i&&si("onContentSizeChanged",{width:xr.w,height:xr.h}),(Gn.c||Jn.c)&&si("onOverflowChanged",{x:Gn.x,y:Gn.y,xScrollable:Jn.xs,yScrollable:Jn.ys,clipped:Jn.x||Jn.y}),Kn.c&&si("onOverflowAmountChanged",{x:Kn.x,y:Kn.y})}qt&&ne&&(Sr.c||ne.c)&&(ne.f||ri(),Lt.y&&Sr.x&&cr.css(Se+Te,ne.w+Rt.y),Lt.x&&Sr.y&&cr.css(Se+ke,ne.h+Rt.x),ne.c=!1),si("onUpdated",{forced:o})}}function rt(n){var t=Li.p(n,Li.d,!0,a);return a=gi({},a,t.g),nr=gi({},nr,t.m),t.m}function et(e){function n(){var r=e?er:ir;c(a,function(n,t){ln(t)==xt&&(n==zt?r.addClass(t):r.attr(n,t))})}var t="parent",r=cn+Le+kn,i=Ut?Le+kn:Ce,o=nr.textarea.inheritedAttrs,a={},u=[en,on,Me,Ie,an,un,fn,We,Ee,je,Fe,Ke,cn,kn,Yr].join(Le),f={};ir=ir||(Ut?v?er[t]()[t]()[t]()[t]():Ii(pi(on)):er),cr=cr||st(_n+i),fr=fr||st(wn+i),ur=ur||st(yn+i),ar=ar||st("os-resize-observer-host"),vr=vr||(Ut?st(mn):wi),e&&yi(ir,u),o=ln(o)==xt?o.split(Le):o,ln(o)==wt&&Ut&&c(o,function(n,t){ln(t)==xt&&(a[t]=e?ir.attr(t):er.attr(t))}),e?(v&&Ft?(ar.children().remove(),c([ur,fr,cr,vr],function(n,t){t&&yi(t.removeAttr(xi),En)}),mi(ir,Ut?on:en)):(dt(ar),cr.contents().unwrap().unwrap().unwrap(),Ut&&(er.unwrap(),dt(ir),dt(vr),n())),Ut&&er.removeAttr(xi),qt&&yi(d,rn)):(Ut&&(nr.sizeAutoCapable||(f[Te]=er.css(Te),f[ke]=er.css(ke)),v||er.addClass(kn).wrap(ir),ir=er[t]().css(f)),v||(mi(er,Ut?r:en),ir.wrapInner(cr).wrapInner(fr).wrapInner(ur).prepend(ar),cr=ht(ir,P+_n),fr=ht(ir,P+wn),ur=ht(ir,P+yn),Ut&&(cr.prepend(vr),n())),Mt&&mi(fr,Pe),Lt.x&&Lt.y&&mi(fr,xn),qt&&mi(d,rn),N=ar[0],pr=ir[0],gr=ur[0],mr=fr[0],yr=cr[0])}function it(){var r,t,e=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],i=[],n="focus";function o(n){ei(),Nt.update(Ae),n&&It&&clearInterval(r)}Ut?(9<I||!It?Yn(er,"input",o):Yn(er,[G,J],[function a(n){var t=n.keyCode;sn(t,e)<0&&(i[_i]||(o(),r=setInterval(o,1e3/60)),sn(t,i)<0&&i.push(t))},function u(n){var t=n.keyCode,r=sn(t,i);sn(t,e)<0&&(-1<r&&i.splice(r,1),i[_i]||o(!0))}]),Yn(er,[He,"drop",n,n+"out"],[function f(n){return er[Re](Dt.i&&Xr?9999999:0),er[De](0),Hi.prvD(n),Hi.stpP(n),!1},function c(n){setTimeout(function(){Pt||o()},50)},function l(){ee=!0,mi(ir,n)},function s(){ee=!1,i=[],yi(ir,n),o(!0)}])):Yn(cr,Z,function v(n){!0!==jr&&function s(n){if(!Ft)return!0;function t(n,t){for(var r=0;r<n[_i];r++)if(n[r]===t)return!0;return!1}var r="flex-grow",e="flex-shrink",i="flex-basis",o=[Te,Se+Te,ze+Te,be+_e,be+we,_e,we,"font-weight","word-spacing",r,e,i],a=[ge+_e,ge+we,me+_e+Te,me+we+Te],u=[ke,Se+ke,ze+ke,be+ye,be+xe,ye,xe,"line-height",r,e,i],f=[ge+ye,ge+xe,me+ye+Te,me+xe+Te],c="s"===Mr.x||"v-s"===Mr.x,l=!1;return("s"===Mr.y||"v-s"===Mr.y)&&((l=t(u,n))||Bt||(l=t(f,n))),c&&!l&&((l=t(o,n))||Bt||(l=t(a,n))),l}((n=n.originalEvent||n).propertyName)&&Nt.update(Ae)}),Yn(fr,He,function d(n){Zt||(t!==wi?clearTimeout(t):((ae||ue)&&ai(!0),lt()||mi(ir,We),si("onScrollStart",n)),F||(fi(!0),fi(!1)),si("onScroll",n),t=setTimeout(function(){Pt||(clearTimeout(t),t=wi,(ae||ue)&&ai(!1),lt()||yi(ir,We),si("onScrollStop",n))},175))},!0)}function ot(i){function o(n){var t=st(On+Le+(n?In:Mn),!0),r=st(Cn,t),e=st(Hn,t);return v||i||(t.append(r),r.append(e)),{nn:t,tn:r,rn:e}}var n,t;function r(n){var t=li(n),r=t.nn,e=t.tn,i=t.rn;v&&Ft?c([r,e,i],function(n,t){yi(t.removeAttr(xi),En)}):dt(r||o(n).nn)}i?(r(!0),r()):(n=o(!0),t=o(),f=n.nn,l=n.tn,h=n.rn,p=t.nn,b=t.tn,g=t.rn,v||(ur.after(p),ur.after(f)))}function at(_){var S,i,z,T,r=li(_),k=r.en,t=w.top!==w,O=r.j,e=r.X,C=He+r.V,o="active",a="snapHandle",A=1,u=[16,17];function f(n){return I&&t?n["screen"+e]:Hi.page(n)[O]}function c(n){return nr.scrollbars[n]}function l(){A=.5}function s(){A=1}function v(n){-1<sn(n.keyCode,u)&&l()}function H(n){-1<sn(n.keyCode,u)&&s()}function N(n){var t=(n.originalEvent||n).touches!==wi;return!(Zt||Pt||lt()||!Br||t&&!c("touchSupport"))&&(1===Hi.mBtn(n)||t)}function d(n){if(N(n)){var t=k.D,r=k.L,e=k.H*((f(n)-z)*T/(t-r));e=isFinite(e)?e:0,Qt&&_&&!Dt.i&&(e*=-1),fr[C](Ri.round(i+e)),F&&fi(_,i+e),m||Hi.prvD(n)}else L(n)}function L(n){if(n=n||n.originalEvent,Xn(W,[Y,X,G,J,Q],[d,L,v,H,Zn],!0),F&&fi(_,!0),F=!1,yi(E,Wn),yi(r.rn,o),yi(r.tn,o),yi(r.nn,o),z=i=wi,T=1,s(),S!==wi&&(Nt.scrollStop(),clearTimeout(S),S=wi),n){var t=pr[Ai]();n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom||Jn(),(ae||ue)&&ai(!1)}}function R(n){i=fr[C](),i=isNaN(i)?0:i,(Qt&&_&&!Dt.n||!Qt)&&(i=i<0?0:i),T=ft()[O],z=f(n),F=!c(a),mi(E,Wn),mi(r.rn,o),mi(r.nn,o),Xn(W,[Y,X,Q],[d,L,Zn]),!I&&y||Hi.prvD(n),Hi.stpP(n)}Yn(r.rn,V,function h(n){N(n)&&R(n)}),Yn(r.tn,[V,$,K],[function D(n){if(N(n)){var d,h=Ri.round(he[r.M]),p=r.tn.offset()[r.W],t=n.ctrlKey,b=n.shiftKey,g=b&&t,m=!0,y=function(n){F&&fi(_,n)},w=function(){y(),R(n)},x=function(){if(!Pt){var n=(z-p)*T,t=k.N,r=k.D,e=k.L,i=k.H,o=k.C,a=270*A,u=m?Ri.max(400,a):a,f=i*((n-e/2)/(r-e)),c=Qt&&_&&(!Dt.i&&!Dt.n||Xr),l=c?t<n:n<t,s={},v={easing:"linear",step:function(n){F&&(fr[C](n),fi(_,n))}};f=isFinite(f)?f:0,f=Qt&&_&&!Dt.i?i-f:f,b?(fr[C](f),g?(f=fr[C](),fr[C](o),f=c&&Dt.i?i-f:f,f=c&&Dt.n?-f:f,s[O]=f,Nt.scroll(s,gi(v,{duration:130,complete:w}))):w()):(d=m?l:d,(c?d?n<=t+e:t<=n:d?t<=n:n<=t+e)?(clearTimeout(S),Nt.scrollStop(),S=wi,y(!0)):(S=setTimeout(x,u),s[O]=(d?"-=":"+=")+h,Nt.scroll(s,gi(v,{duration:a}))),m=!1)}};t&&l(),T=ft()[O],z=Hi.page(n)[O],F=!c(a),mi(E,Wn),mi(r.tn,o),mi(r.nn,o),Xn(W,[X,G,J,Q],[L,v,H,Zn]),x(),Hi.prvD(n),Hi.stpP(n)}},function p(n){j=!0,(ae||ue)&&ai(!0)},function b(n){j=!1,(ae||ue)&&ai(!1)}]),Yn(r.nn,V,function g(n){Hi.stpP(n)}),M&&Yn(r.nn,Z,function(n){n.target===r.nn[0]&&(ui(_),fi(_))})}function oi(n,t,r){var e=n?an:un,i=n?f:p;t?yi(ir,e):mi(ir,e),r?yi(i,Ln):mi(i,Ln)}function ai(n,t){if(clearTimeout(C),n)yi(f,Rn),yi(p,Rn);else{var r,e=function(){j||Pt||(!(r=h.hasClass("active")||g.hasClass("active"))&&(ae||ue||fe)&&mi(f,Rn),!r&&(ae||ue||fe)&&mi(p,Rn))};0<ie&&!0!==t?C=setTimeout(e,ie):e()}}function ui(n){var t={},r=li(n),e=r.en,i=Ri.min(1,(wr[r.M]-(Rr?n?Xt:Yt:0))/xr[r.M]);t[r.B]=Ri.floor(100*i*1e6)/1e6+"%",lt()||r.rn.css(t),e.L=r.rn[0]["offset"+r["in"]],e.R=i}function fi(n,t){function r(n){return isNaN(n/y)?0:Ri.max(0,Ri.min(1,n/y))}function e(n){var t=g*n;return t=isNaN(t)?0:t,t=u&&!Dt.i?b-p-t:t,t=Ri.max(0,t)}var i,o,a=ln(t)==_t,u=Qt&&n,f=li(n),c=f.en,l="translate(",s=Ct.u("transform"),v=Ct.u("transition"),d=n?fr[Re]():fr[De](),h=t===wi||a?d:t,p=c.L,b=f.tn[0]["offset"+f["in"]],g=b-p,m={},y=(mr[He+f["in"]]-mr["client"+f["in"]])*(Dt.n&&u?-1:1),w=r(d),x=e(r(h)),_=e(w);c.H=y,c.C=d,c.A=w,vn?(i=u?-(b-p-x):x,o=n?l+i+"px, 0)":l+"0, "+i+"px)",m[s]=o,M&&(m[v]=a&&1<Ri.abs(x-c.N)?function S(n){var t=Ct.u("transition"),r=n.css(t);if(r)return r;for(var e,i,o,a="\\s*(([^,(]+(\\(.+?\\))?)+)[\\s,]*",u=new RegExp(a),f=new RegExp("^("+a+")+$"),c="property duration timing-function delay".split(" "),l=[],s=0,v=function(n){if(e=[],!n.match(f))return n;for(;n.match(u);)e.push(RegExp.$1),n=n.replace(u,Ce);return e};s<c[_i];s++)for(i=v(n.css(t+"-"+c[s])),o=0;o<i[_i];o++)l[o]=(l[o]?l[o]+Le:Ce)+i[o];return l.join(", ")}(f.rn)+", "+(s+Le+250)+"ms":Ce)):m[f.W]=x,lt()||(f.rn.css(m),vn&&M&&a&&f.rn.one(Z,function(){Pt||f.rn.css(v,Ce)})),c.N=x,c.I=_,c.D=b}function ci(n,t){var r=t?"removeClass":"addClass",e=n?b:g,i=n?An:Nn;(n?l:h)[r](i),e[r](i)}function li(n){return{B:n?Te:ke,"in":n?"Width":"Height",W:n?_e:ye,V:n?"Left":"Top",j:n?bn:gn,X:n?"X":"Y",M:n?"w":"h",an:n?"l":"t",tn:n?l:b,rn:n?h:g,nn:n?f:p,en:n?dn:hn}}function ut(n){dr=dr||st(Dn,!0),n?v&&Ft?yi(dr.removeAttr(xi),En):dt(dr):v||ir.append(dr)}function si(n,t){if(Ft){var r,e=nr.callbacks[n],i=n;"on"===i.substr(0,2)&&(i=i.substr(2,1).toLowerCase()+i.substr(3)),ln(e)==yt&&e.call(Nt,t),c(Fn,function(){ln((r=this).on)==yt&&r.on(i,t)})}else Pt||jn.push({n:n,a:t})}function vi(n,t,r){r===wi&&(r=[Ce,Ce,Ce,Ce]),n[t+ye]=r[0],n[t+we]=r[1],n[t+xe]=r[2],n[t+_e]=r[3]}function ft(){var n=gr[Ai]();return{x:vn&&1/(Ri.round(n.width)/gr[ki])||1,y:vn&&1/(Ri.round(n.height)/gr[Si])||1}}function ct(n){var t="ownerDocument",r="HTMLElement",e=n&&n[t]&&n[t].parentWindow||bt;return typeof e[r]==mt?n instanceof e[r]:n&&typeof n==mt&&null!==n&&1===n.nodeType&&typeof n.nodeName==xt}function di(n,t){var r=t?parseFloat(n):parseInt(n,10);return isNaN(r)?0:r}function lt(){return Er&&Lt.x&&Lt.y}function hi(){return Ut?vr[0]:yr}function pi(r,n){return"<div "+(r?ln(r)==xt?'class="'+r+'"':function(){var n,t=Ce;if(Ii.isPlainObject(r))for(n in r)t+=("c"===n?"class":n)+'="'+r[n]+'" ';return t}():Ce)+">"+(n||Ce)+"</div>"}function st(n,t){var r=ln(t)==_t,e=r?ir:t||ir;return v&&!e[_i]?null:v?e[r?"children":"find"](P+n.replace(/\s/g,P)).eq(0):Ii(pi(n))}function vt(n,t){for(var r,e=t.split(P),i=0;i<e.length;i++){if(!n[Ot](e[i]))return;r=n[e[i]],i<e.length&&ln(r)==mt&&(n=r)}return r}function bi(n,t,r){if(r)return r;if(ln(n)!=mt||ln(t)!=mt)return n!==t;for(var e in n)if("c"!==e){if(!n[Ot](e)||!t[Ot](e))return!0;if(bi(n[e],t[e]))return!0}return!1}function gi(){return Ii.extend.apply(this,[!0].concat([].slice.call(arguments)))}function mi(n,t){return e.addClass.call(n,t)}function yi(n,t){return e.removeClass.call(n,t)}function dt(n){return e.remove.call(n)}function ht(n,t){return e.find.call(n,t).eq(0)}}return Di&&Di.fn&&(Di.fn.overlayScrollbars=function(n,t){return Di.isPlainObject(n)?(Di.each(this,function(){y(this,n,t)}),this):y(this,n)}),y}); |