!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=document,a=window,c=n(a),d=[],u=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||!1,h=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.mozCancelAnimationFrame||!1;if(u)a.cancelAnimationFrame||(h=function(e){});else{var p=0;u=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-p)),i=a.setTimeout(function(){e(t+r)},r);return p=t+r,i},h=function(e){a.clearTimeout(e)}}var m=a.MutationObserver||a.WebKitMutationObserver||!1,f=Date.now||function(){return(new Date).getTime()},g={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},v=!1,w=function(){if(v)return v;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in a,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(a.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in a&&9===l.documentMode,i.isie10=i.isie&&"performance"in a&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in a,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in a,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in a,i.hasw3ctouch=(a.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(a.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&a.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t<r;t++)if(void 0!==o[e[t]]){i.trstyle=e[t];break}i.hastransform=!!i.trstyle}(),i.hastransform&&(o[i.trstyle]="translate3d(1px,2px,3px)",i.hastranslate3d=/translate3d/.test(o[i.trstyle])),i.transitionstyle="transition",i.prefixstyle="",i.transitionend="transitionend",i.hastransition="transition"in o||function(){i.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],t=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],r=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,n=e.length;s<n;s++)if(e[s]in o){i.transitionstyle=e[s],i.prefixstyle=t[s],i.transitionend=r[s];break}i.ischrome26&&(i.prefixstyle=t[1]),i.hastransition=i.transitionstyle}(),i.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(i.ischrome&&!i.ischrome38||i.isie)&&(e=[]);for(var t=0,r=e.length;t<r;t++){var s=e[t];if(o.cursor=s,o.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),i.hasmousecapture="setCapture"in e,i.hasMutationObserver=!1!==m,e=null,v=i,i},b=function(e,p){function v(){var e=T.doc.css(P.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function b(){var e=T.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}function x(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=I[r]||0)?t?T.win.outerHeight()-T.win.innerHeight():T.win.outerWidth()-T.win.innerWidth():1;return T.isie8&&i&&(i+=1),s?i:0}return i}function S(e,o,t,r){T._bind(e,o,function(r){var i={original:r=r||a.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function z(e,o,t,r){T.scrollrunning||(T.newscrolly=T.getScrollTop(),T.newscrollx=T.getScrollLeft(),D=f());var i=f()-D;if(D=f(),i>350?A=1:A+=(2-A)/10,e=e*A|0,o=o*A|0,e){if(r)if(e<0){if(T.getScrollLeft()>=T.page.maxw)return!0}else if(T.getScrollLeft()<=0)return!0;var s=e>0?1:-1;X!==s&&(T.scrollmom&&T.scrollmom.stop(),T.newscrollx=T.getScrollLeft(),X=s),T.lastdeltax-=e}if(o){if(function(){var e=T.getScrollTop();if(o<0){if(e>=T.page.maxh)return!0}else if(e<=0)return!0}()){if(M.nativeparentscrolling&&t&&!T.ispage&&!T.zoomactive)return!0;var n=T.view.h>>1;T.newscrolly<-n?(T.newscrolly=-n,o=-1):T.newscrolly>T.page.maxh+n?(T.newscrolly=T.page.maxh+n,o=1):o=0}var l=o>0?1:-1;B!==l&&(T.scrollmom&&T.scrollmom.stop(),T.newscrolly=T.getScrollTop(),B=l),T.lastdeltay-=o}(o||e)&&T.synched("relativexy",function(){var e=T.lastdeltay+T.newscrolly;T.lastdeltay=0;var o=T.lastdeltax+T.newscrollx;T.lastdeltax=0,T.rail.drag||T.doScrollPos(o,e)})}function k(e,o,t){var r,i;return!(t||!q)||(0===e.deltaMode?(r=-e.deltaX*(M.mousescrollstep/54)|0,i=-e.deltaY*(M.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*M.mousescrollstep*50/80|0,i=-e.deltaY*M.mousescrollstep*50/80|0),o&&M.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?T.getScrollLeft()>=T.page.maxw:T.getScrollLeft()<=0)&&(i=r,r=0)),T.isrtlmode&&(r=-r),z(r,i,t,!0)?void(t&&(q=!0)):(q=!1,e.stopImmediatePropagation(),e.preventDefault()))}var T=this;this.version="3.7.6",this.name="nicescroll",this.me=p;var E=n("body"),M=this.opt={doc:E,win:!1};if(n.extend(M,g),M.snapbackspeed=80,e)for(var L in M)void 0!==e[L]&&(M[L]=e[L]);if(M.disablemutationobserver&&(m=!1),this.doc=M.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(M.win?M.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==M.win,this.win=M.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=E,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=M.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==M.rtlmode){var C=this.win[0]==a?this.body:this.win,N=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==N||"lr-tb"==N||""===N?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==N||"tb"==N||"tb-rl"==N||"rl-tb"==N,this.isvertical="vertical-rl"==N||"tb"==N||"tb-rl"==N)}else this.isrtlmode=!0===M.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==M.scrollbarid)this.id=M.scrollbarid;else do{this.id="ascrail"+i++}while(l.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=M.overflowx,this.overflowy=M.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=w();var P=n.extend({},this.detected);this.canhwscroll=P.hastransform&&M.hwacceleration,this.ishwscroll=this.canhwscroll&&T.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(P.iswebkit||P.isie||P.isie11):this.hasreversehr=!(P.iswebkit||P.isie&&!P.isie10&&!P.isie11):this.hasreversehr=!1,this.istouchcapable=!1,P.cantouch||!P.hasw3ctouch&&!P.hasmstouch?!P.cantouch||P.isios||P.isandroid||!P.iswebkit&&!P.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,M.enablemouselockapi||(P.hasmousecapture=!1,P.haspointerlock=!1),this.debounced=function(e,o,t){T&&(T.delaylist[e]||!1||(T.delaylist[e]={h:u(function(){T.delaylist[e].fn.call(T),T.delaylist[e]=!1},t)},o.call(T)),T.delaylist[e].fn=o)},this.synched=function(e,o){T.synclist[e]?T.synclist[e]=o:(T.synclist[e]=o,u(function(){T&&(T.synclist[e]&&T.synclist[e].call(T),T.synclist[e]=null)}))},this.unsynched=function(e){T.synclist[e]&&(T.synclist[e]=!1)},this.css=function(e,o){for(var t in o)T.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?T.getScrollTop():T.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?T.getScrollLeft():T.setScrollLeft(e)};var R=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=f(),this.df=o-e};if(R.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(f()-this.ts)/this.spd},getNow:function(){var e=(f()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e>=1?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=f(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},P.hastranslate3d&&P.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[13]:-o[5];if(T.timerscroll&&T.timerscroll.bz)return T.timerscroll.bz.getNow()}return T.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[12]:-o[4];if(T.timerscroll&&T.timerscroll.bh)return T.timerscroll.bh.getNow()}return T.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,a,1),o.niceevent=!0,e.dispatchEvent(o)};var _=this.isrtlmode?1:-1;P.hastranslate3d&&M.enabletranslate3d?(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])}):(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])})}else this.getScrollTop=function(){return T.docscroll.scrollTop()},this.setScrollTop=function(e){T.docscroll.scrollTop(e)},this.getScrollLeft=function(){return T.hasreversehr?T.detected.ismozilla?T.page.maxw-Math.abs(T.docscroll.scrollLeft()):T.page.maxw-T.docscroll.scrollLeft():T.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(T)return T.hasreversehr&&(e=T.detected.ismozilla?-(T.page.maxw-e):T.page.maxw-e),T.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var I={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:a.pageYOffset||l.documentElement.scrollTop,left:a.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(T.isfixed){var e=T.win.offset(),o=T.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=T.win.offset();if(!T.viewport)return t;var r=T.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(T.ishwscroll)T.rail.css({height:T.win.innerHeight()-(M.railpadding.top+M.railpadding.bottom)}),T.railh&&T.railh.css({width:T.win.innerWidth()-(M.railpadding.left+M.railpadding.right)});else{var r=T.getOffset();if(o={top:r.top,left:r.left-(M.railpadding.left+M.railpadding.right)},o.top+=x(T.win,"border-top-width",!0),o.left+=T.rail.align?T.win.outerWidth()-x(T.win,"border-right-width")-T.rail.width:x(T.win,"border-left-width"),(t=M.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),T.railslocked||T.rail.css({top:o.top,left:o.left,height:(e?e.h:T.win.innerHeight())-(M.railpadding.top+M.railpadding.bottom)}),T.zoom&&T.zoom.css({top:o.top+1,left:1==T.rail.align?o.left-20:o.left+T.rail.width+4}),T.railh&&!T.railslocked){o={top:r.top,left:r.left},(t=M.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=T.railh.align?o.top+x(T.win,"border-top-width",!0)+T.win.innerHeight()-T.railh.height:o.top+x(T.win,"border-top-width",!0),s=o.left+x(T.win,"border-left-width");T.railh.css({top:i-(M.railpadding.top+M.railpadding.bottom),left:s,width:T.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;T.railslocked||(T.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?T.doScrollLeft:T.doScrollTop,s=t?(e.pageX-T.railh.offset().left-T.cursorwidth/2)*T.scrollratio.x:(e.pageY-T.rail.offset().top-T.cursorheight/2)*T.scrollratio.y,T.unsynched("relativexy"),r(0|s)):(r=t?T.doScrollLeftBy:T.doScrollBy,s=t?T.scroll.x:T.scroll.y,n=t?e.pageX-T.railh.offset().left:e.pageY-T.rail.offset().top,i=t?T.view.w:T.view.h,r(s>=n?i:-i)))},T.newscrolly=T.newscrollx=0,T.hasanimationframe="requestAnimationFrame"in a,T.hascancelanimationframe="cancelAnimationFrame"in a,T.hasborderbox=!1,this.init=function(){if(T.saved.css=[],P.isoperamini)return!0;if(P.isandroid&&!("hidden"in l))return!0;M.emulatetouch=M.emulatetouch||M.touchbehavior,T.hasborderbox=a.getComputedStyle&&"border-box"===a.getComputedStyle(l.body)["box-sizing"];var e={"overflow-y":"hidden"};if((P.isie11||P.isie10)&&(e["-ms-overflow-style"]="none"),T.ishwscroll&&(this.doc.css(P.transitionstyle,P.prefixstyle+"transform 0ms ease-out"),P.transitionend&&T.bind(T.doc,P.transitionend,T.onScrollTransitionEnd,!1)),T.zindex="auto",T.ispage||"auto"!=M.zindex?T.zindex=M.zindex:T.zindex=b()||"auto",!T.ispage&&"auto"!=T.zindex&&T.zindex>s&&(s=T.zindex),T.isie&&0===T.zindex&&"auto"==M.zindex&&(T.zindex="auto"),!T.ispage||!P.isieold){var i=T.docscroll;T.ispage&&(i=T.haswrapper?T.win:T.doc),T.css(i,e),T.ispage&&(P.isie11||P.isie)&&T.css(n("html"),e),!P.isios||T.ispage||T.haswrapper||T.css(E,{"-webkit-overflow-scrolling":"touch"});var d=n(l.createElement("div"));d.css({position:"relative",top:0,float:"right",width:M.cursorwidth,height:0,"background-color":M.cursorcolor,border:M.cursorborder,"background-clip":"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),d.addClass("nicescroll-cursors"),T.cursor=d;var u=n(l.createElement("div"));u.attr("id",T.id),u.addClass("nicescroll-rails nicescroll-rails-vr");var h,p,f=["left","right","top","bottom"];for(var g in f)p=f[g],(h=M.railpadding[p]||0)&&u.css("padding-"+p,h+"px");u.append(d),u.width=Math.max(parseFloat(M.cursorwidth),d.outerWidth()),u.css({width:u.width+"px",zIndex:T.zindex,background:M.background,cursor:"default"}),u.visibility=!0,u.scrollable=!0,u.align="left"==M.railalign?0:1,T.rail=u,T.rail.drag=!1;var v=!1;!M.boxzoom||T.ispage||P.isieold||(v=l.createElement("div"),T.bind(v,"click",T.doZoom),T.bind(v,"mouseenter",function(){T.zoom.css("opacity",M.cursoropacitymax)}),T.bind(v,"mouseleave",function(){T.zoom.css("opacity",M.cursoropacitymin)}),T.zoom=n(v),T.zoom.css({cursor:"pointer",zIndex:T.zindex,backgroundImage:"url("+M.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),M.dblclickzoom&&T.bind(T.win,"dblclick",T.doZoom),P.cantouch&&M.gesturezoom&&(T.ongesturezoom=function(e){return e.scale>1.5&&T.doZoomIn(e),e.scale<.8&&T.doZoomOut(e),T.cancelEvent(e)},T.bind(T.win,"gestureend",T.ongesturezoom))),T.railh=!1;var w;if(M.horizrailenabled&&(T.css(i,{overflowX:"hidden"}),(d=n(l.createElement("div"))).css({position:"absolute",top:0,height:M.cursorwidth,width:0,backgroundColor:M.cursorcolor,border:M.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),P.isieold&&d.css("overflow","hidden"),d.addClass("nicescroll-cursors"),T.cursorh=d,(w=n(l.createElement("div"))).attr("id",T.id+"-hr"),w.addClass("nicescroll-rails nicescroll-rails-hr"),w.height=Math.max(parseFloat(M.cursorwidth),d.outerHeight()),w.css({height:w.height+"px",zIndex:T.zindex,background:M.background}),w.append(d),w.visibility=!0,w.scrollable=!0,w.align="top"==M.railvalign?0:1,T.railh=w,T.railh.drag=!1),T.ispage)u.css({position:"fixed",top:0,height:"100%"}),u.css(u.align?{right:0}:{left:0}),T.body.append(u),T.railh&&(w.css({position:"fixed",left:0,width:"100%"}),w.css(w.align?{bottom:0}:{top:0}),T.body.append(w));else{if(T.ishwscroll){"static"==T.win.css("position")&&T.css(T.win,{position:"relative"});var x="HTML"==T.win[0].nodeName?T.body:T.win;n(x).scrollTop(0).scrollLeft(0),T.zoom&&(T.zoom.css({position:"absolute",top:1,right:0,"margin-right":u.width+4}),x.append(T.zoom)),u.css({position:"absolute",top:0}),u.css(u.align?{right:0}:{left:0}),x.append(u),w&&(w.css({position:"absolute",left:0,bottom:0}),w.css(w.align?{bottom:0}:{top:0}),x.append(w))}else{T.isfixed="fixed"==T.win.css("position");var S=T.isfixed?"fixed":"absolute";T.isfixed||(T.viewport=T.getViewport(T.win[0])),T.viewport&&(T.body=T.viewport,/fixed|absolute/.test(T.viewport.css("position"))||T.css(T.viewport,{position:"relative"})),u.css({position:S}),T.zoom&&T.zoom.css({position:S}),T.updateScrollBar(),T.body.append(u),T.zoom&&T.body.append(T.zoom),T.railh&&(w.css({position:S}),T.body.append(w))}P.isios&&T.css(T.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),M.disableoutline&&(P.isie&&T.win.attr("hideFocus","true"),P.iswebkit&&T.win.css("outline","none"))}if(!1===M.autohidemode?(T.autohidedom=!1,T.rail.css({opacity:M.cursoropacitymax}),T.railh&&T.railh.css({opacity:M.cursoropacitymax})):!0===M.autohidemode||"leave"===M.autohidemode?(T.autohidedom=n().add(T.rail),P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursor)),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh)),T.railh&&P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"scroll"==M.autohidemode?(T.autohidedom=n().add(T.rail),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh))):"cursor"==M.autohidemode?(T.autohidedom=n().add(T.cursor),T.railh&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"hidden"==M.autohidemode&&(T.autohidedom=!1,T.hide(),T.railslocked=!1),P.cantouch||T.istouchcapable||M.emulatetouch||P.hasmstouch){T.scrollmom=new y(T);T.ontouchstart=function(e){if(T.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(T.hasmoving=!1,T.scrollmom.timer&&(T.triggerScrollEnd(),T.scrollmom.stop()),!T.railslocked){var o=T.getTarget(e);if(o&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return T.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),T.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,st:T.getScrollTop(),sl:T.getScrollLeft(),pt:2,dl:!1,tg:o},T.ispage||!M.directionlockdeadzone)T.rail.drag.dl="f";else{var i={w:c.width(),h:c.height()},s=T.getContentSize(),l=s.h-i.h,a=s.w-i.w;T.rail.scrollable&&!T.railh.scrollable?T.rail.drag.ck=l>0&&"v":!T.rail.scrollable&&T.railh.scrollable?T.rail.drag.ck=a>0&&"h":T.rail.drag.ck=!1}if(M.emulatetouch&&T.isiframe&&P.isie){var d=T.win.position();T.rail.drag.x+=d.left,T.rail.drag.y+=d.top}if(T.hasmoving=!1,T.lastmouseup=!1,T.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return P.hasmousecapture&&o.setCapture(),M.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(T.hasmoving)return!1;o._onclick.call(this,e)}),T.cancelEvent(e)):T.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(T.preventclick={tg:o,click:!1})}}},T.ontouchend=function(e){if(!T.rail.drag)return!0;if(2==T.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;T.rail.drag=!1;var o="mouseup"===e.type;if(T.hasmoving&&(T.scrollmom.doMomentum(),T.lastmouseup=!0,T.hideCursor(),P.hasmousecapture&&l.releaseCapture(),o))return T.cancelEvent(e)}else if(1==T.rail.drag.pt)return T.onmouseup(e)};var z=M.emulatetouch&&T.isiframe&&!P.hasmousecapture,k=.3*M.directionlockdeadzone|0;T.ontouchmove=function(e,o){if(!T.rail.drag)return!0;if(e.targetTouches&&M.preventmultitouchscrolling&&e.targetTouches.length>1)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2==T.rail.drag.pt){"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY);var t,r;if(r=t=0,z&&!o){var i=T.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-T.rail.drag.y,a=e.clientX+r,c=a-T.rail.drag.x,d=T.rail.drag.st-n;if(T.ishwscroll&&M.bouncescroll)d<0?d=Math.round(d/2):d>T.page.maxh&&(d=T.page.maxh+Math.round((d-T.page.maxh)/2));else if(d<0?(d=0,s=0):d>T.page.maxh&&(d=T.page.maxh,s=0),0===s&&!T.hasmoving)return T.ispage||(T.rail.drag=!1),!0;var u=T.getScrollLeft();if(T.railh&&T.railh.scrollable&&(u=T.isrtlmode?c-T.rail.drag.sl:T.rail.drag.sl-c,T.ishwscroll&&M.bouncescroll?u<0?u=Math.round(u/2):u>T.page.maxw&&(u=T.page.maxw+Math.round((u-T.page.maxw)/2)):(u<0&&(u=0,a=0),u>T.page.maxw&&(u=T.page.maxw,a=0))),!T.hasmoving){if(T.rail.drag.y===e.clientY&&T.rail.drag.x===e.clientX)return T.cancelEvent(e);var h=Math.abs(n),p=Math.abs(c),m=M.directionlockdeadzone;if(T.rail.drag.ck?"v"==T.rail.drag.ck?p>m&&h<=k?T.rail.drag=!1:h>m&&(T.rail.drag.dl="v"):"h"==T.rail.drag.ck&&(h>m&&p<=k?T.rail.drag=!1:p>m&&(T.rail.drag.dl="h")):h>m&&p>m?T.rail.drag.dl="f":h>m?T.rail.drag.dl=p>k?"f":"v":p>m&&(T.rail.drag.dl=h>k?"f":"h"),!T.rail.drag.dl)return T.cancelEvent(e);T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0}return T.preventclick&&!T.preventclick.click&&(T.preventclick.click=T.preventclick.tg.onclick||!1,T.preventclick.tg.onclick=T.onpreventclick),T.rail.drag.dl&&("v"==T.rail.drag.dl?u=T.rail.drag.sl:"h"==T.rail.drag.dl&&(d=T.rail.drag.st)),T.synched("touchmove",function(){T.rail.drag&&2==T.rail.drag.pt&&(T.prepareTransition&&T.resetTransition(),T.rail.scrollable&&T.setScrollTop(d),T.scrollmom.update(a,s),T.railh&&T.railh.scrollable?(T.setScrollLeft(u),T.showCursor(d,u)):T.showCursor(d),P.isie10&&l.selection.clear())}),T.cancelEvent(e)}return 1==T.rail.drag.pt?T.onmousemove(e):void 0},T.ontouchstartCursor=function(e,o){if(!T.rail.drag||3==T.rail.drag.pt){if(T.locked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:T.scroll.x,sy:T.scroll.y,pt:3,hr:!!o};var t=T.getTarget(e);return!T.ispage&&P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.cancelEvent(e)}},T.ontouchendCursor=function(e){if(T.rail.drag){if(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),3!=T.rail.drag.pt)return;return T.rail.drag=!1,T.cancelEvent(e)}},T.ontouchmoveCursor=function(e){if(T.rail.drag){if(3!=T.rail.drag.pt)return;if(T.cursorfreezed=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.touches[0].clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.touches[0].clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("touchmove",function(){T.rail.drag&&3==T.rail.drag.pt&&(T.showCursor(),T.rail.drag.hr?T.doScrollLeft(Math.round(T.scroll.x*T.scrollratio.x),M.cursordragspeed):T.doScrollTop(Math.round(T.scroll.y*T.scrollratio.y),M.cursordragspeed))}),T.cancelEvent(e)}}}if(T.onmousedown=function(e,o){if(!T.rail.drag||1==T.rail.drag.pt){if(T.railslocked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,pt:1,hr:o||!1};var t=T.getTarget(e);return P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.hasmoving=!1,T.cancelEvent(e)}},T.onmouseup=function(e){if(T.rail.drag)return 1!=T.rail.drag.pt||(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),T.rail.drag=!1,T.cursorfreezed=!1,T.hasmoving&&T.triggerScrollEnd(),T.cancelEvent(e))},T.onmousemove=function(e){if(T.rail.drag){if(1!==T.rail.drag.pt)return;if(P.ischrome&&0===e.which)return T.onmouseup(e);if(T.cursorfreezed=!0,T.hasmoving||T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("mousemove",function(){T.cursorfreezed&&(T.showCursor(),T.rail.drag.hr?T.scrollLeft(Math.round(T.scroll.x*T.scrollratio.x)):T.scrollTop(Math.round(T.scroll.y*T.scrollratio.y)))}),T.cancelEvent(e)}T.checkarea=0},P.cantouch||M.emulatetouch)T.onpreventclick=function(e){if(T.preventclick)return T.preventclick.tg.onclick=T.preventclick.click,T.preventclick=!1,T.cancelEvent(e)},T.onclick=!P.isios&&function(e){return!T.lastmouseup||(T.lastmouseup=!1,T.cancelEvent(e))},M.grabcursorenabled&&P.cursorgrabvalue&&(T.css(T.ispage?T.doc:T.win,{cursor:P.cursorgrabvalue}),T.css(T.rail,{cursor:P.cursorgrabvalue}));else{var L=function(e){if(T.selectiondrag){if(e){var o=T.win.outerHeight(),t=e.pageY-T.selectiondrag.top;t>0&&t<o&&(t=0),t>=o&&(t-=o),T.selectiondrag.df=t}if(0!==T.selectiondrag.df){var r=-2*T.selectiondrag.df/6|0;T.doScrollBy(r),T.debounced("doselectionscroll",function(){L()},50)}}};T.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},T.onselectionstart=function(e){T.ispage||(T.selectiondrag=T.win.offset())},T.onselectionend=function(e){T.selectiondrag=!1},T.onselectiondrag=function(e){T.selectiondrag&&T.hasTextSelected()&&T.debounced("selectionscroll",function(){L(e)},250)}}if(P.hasw3ctouch?(T.css(T.ispage?n("html"):T.win,{"touch-action":"none"}),T.css(T.rail,{"touch-action":"none"}),T.css(T.cursor,{"touch-action":"none"}),T.bind(T.win,"pointerdown",T.ontouchstart),T.bind(l,"pointerup",T.ontouchend),T.delegate(l,"pointermove",T.ontouchmove)):P.hasmstouch?(T.css(T.ispage?n("html"):T.win,{"-ms-touch-action":"none"}),T.css(T.rail,{"-ms-touch-action":"none"}),T.css(T.cursor,{"-ms-touch-action":"none"}),T.bind(T.win,"MSPointerDown",T.ontouchstart),T.bind(l,"MSPointerUp",T.ontouchend),T.delegate(l,"MSPointerMove",T.ontouchmove),T.bind(T.cursor,"MSGestureHold",function(e){e.preventDefault()}),T.bind(T.cursor,"contextmenu",function(e){e.preventDefault()})):P.cantouch&&(T.bind(T.win,"touchstart",T.ontouchstart,!1,!0),T.bind(l,"touchend",T.ontouchend,!1,!0),T.bind(l,"touchcancel",T.ontouchend,!1,!0),T.delegate(l,"touchmove",T.ontouchmove,!1,!0)),M.emulatetouch&&(T.bind(T.win,"mousedown",T.ontouchstart,!1,!0),T.bind(l,"mouseup",T.ontouchend,!1,!0),T.bind(l,"mousemove",T.ontouchmove,!1,!0)),(M.cursordragontouch||!P.cantouch&&!M.emulatetouch)&&(T.rail.css({cursor:"default"}),T.railh&&T.railh.css({cursor:"default"}),T.jqbind(T.rail,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.rail,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.rail,"click",function(e){T.doRailClick(e,!1,!1)}),T.bind(T.rail,"dblclick",function(e){T.doRailClick(e,!0,!1)}),T.bind(T.cursor,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursor,"dblclick",function(e){T.cancelEvent(e)})),T.railh&&(T.jqbind(T.railh,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.railh,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.railh,"click",function(e){T.doRailClick(e,!1,!0)}),T.bind(T.railh,"dblclick",function(e){T.doRailClick(e,!0,!0)}),T.bind(T.cursorh,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursorh,"dblclick",function(e){T.cancelEvent(e)})))),M.cursordragontouch&&(this.istouchcapable||P.cantouch)&&(T.bind(T.cursor,"touchstart",T.ontouchstartCursor),T.bind(T.cursor,"touchmove",T.ontouchmoveCursor),T.bind(T.cursor,"touchend",T.ontouchendCursor),T.cursorh&&T.bind(T.cursorh,"touchstart",function(e){T.ontouchstartCursor(e,!0)}),T.cursorh&&T.bind(T.cursorh,"touchmove",T.ontouchmoveCursor),T.cursorh&&T.bind(T.cursorh,"touchend",T.ontouchendCursor)),M.emulatetouch||P.isandroid||P.isios?(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.ontouchend),T.onclick&&T.bind(l,"click",T.onclick),M.cursordragontouch?(T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.cursorh&&T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onmouseup)):(T.bind(T.rail,"mousedown",function(e){e.preventDefault()}),T.railh&&T.bind(T.railh,"mousedown",function(e){e.preventDefault()}))):(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.onmouseup),T.bind(l,"mousemove",T.onmousemove),T.onclick&&T.bind(l,"click",T.onclick),T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.railh&&(T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.bind(T.cursorh,"mouseup",T.onmouseup)),!T.ispage&&M.enablescrollonselection&&(T.bind(T.win[0],"mousedown",T.onselectionstart),T.bind(l,"mouseup",T.onselectionend),T.bind(T.cursor,"mouseup",T.onselectionend),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onselectionend),T.bind(l,"mousemove",T.onselectiondrag)),T.zoom&&(T.jqbind(T.zoom,"mouseenter",function(){T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.zoom,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}))),M.enablemousewheel&&(T.isiframe||T.mousewheel(P.isie&&T.ispage?l:T.win,T.onmousewheel),T.mousewheel(T.rail,T.onmousewheel),T.railh&&T.mousewheel(T.railh,T.onmousewheelhr)),T.ispage||P.cantouch||/HTML|^BODY/.test(T.win[0].nodeName)||(T.win.attr("tabindex")||T.win.attr({tabindex:++r}),T.bind(T.win,"focus",function(e){o=T.getTarget(e).id||T.getTarget(e)||!1,T.hasfocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"blur",function(e){o=!1,T.hasfocus=!1}),T.bind(T.win,"mouseenter",function(e){t=T.getTarget(e).id||T.getTarget(e)||!1,T.hasmousefocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"mouseleave",function(e){t=!1,T.hasmousefocus=!1,T.rail.drag||T.hideCursor()})),T.onkeypress=function(e){if(T.railslocked&&0===T.page.maxh)return!0;e=e||a.event;var r=T.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!(r.getAttribute("type")||r.type||!1)||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(T.hasfocus||T.hasmousefocus&&!o||T.ispage&&!o&&!t){var i=e.keyCode;if(T.railslocked&&27!=i)return T.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,c=!1;switch(i){case 38:case 63233:T.doScrollBy(72),c=!0;break;case 40:case 63235:T.doScrollBy(-72),c=!0;break;case 37:case 63232:T.railh&&(s?T.doScrollLeft(0):T.doScrollLeftBy(72),c=!0);break;case 39:case 63234:T.railh&&(s?T.doScrollLeft(T.page.maxw):T.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:T.doScrollBy(T.view.h),c=!0;break;case 34:case 63277:T.doScrollBy(-T.view.h),c=!0;break;case 36:case 63273:T.railh&&s?T.doScrollPos(0,0):T.doScrollTo(0),c=!0;break;case 35:case 63275:T.railh&&s?T.doScrollPos(T.page.maxw,T.page.maxh):T.doScrollTo(T.page.maxh),c=!0;break;case 32:M.spacebarenabled&&(l?T.doScrollBy(T.view.h):T.doScrollBy(-T.view.h),c=!0);break;case 27:T.zoomactive&&(T.doZoom(),c=!0)}if(c)return T.cancelEvent(e)}},M.enablekeyboard&&T.bind(l,P.isopera&&!P.isopera12?"keypress":"keydown",T.onkeypress),T.bind(l,"keydown",function(e){(e.ctrlKey||!1)&&(T.wheelprevented=!0)}),T.bind(l,"keyup",function(e){e.ctrlKey||!1||(T.wheelprevented=!1)}),T.bind(a,"blur",function(e){T.wheelprevented=!1}),T.bind(a,"resize",T.onscreenresize),T.bind(a,"orientationchange",T.onscreenresize),T.bind(a,"load",T.lazyResize),P.ischrome&&!T.ispage&&!T.haswrapper){var C=T.win.attr("style"),N=parseFloat(T.win.css("width"))+1;T.win.css("width",N),T.synched("chromefix",function(){T.win.attr("style",C)})}if(T.onAttributeChange=function(e){T.lazyResize(T.isieold?250:30)},M.enableobserver&&(T.isie11||!1===m||(T.observerbody=new m(function(e){if(e.forEach(function(e){if("attributes"==e.type)return E.hasClass("modal-open")&&E.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],T.doc[0])?T.hide():T.show()}),T.me.clientWidth!=T.page.width||T.me.clientHeight!=T.page.height)return T.lazyResize(30)}),T.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!T.ispage&&!T.haswrapper)){var R=T.win[0];!1!==m?(T.observer=new m(function(e){e.forEach(T.onAttributeChange)}),T.observer.observe(R,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),T.observerremover=new m(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(T&&e.removedNodes[o]===R)return T.remove()})}),T.observerremover.observe(R.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(T.bind(R,P.isie&&!P.isie9?"propertychange":"DOMAttrModified",T.onAttributeChange),P.isie9&&R.attachEvent("onpropertychange",T.onAttributeChange),T.bind(R,"DOMNodeRemoved",function(e){e.target===R&&T.remove()}))}!T.ispage&&M.boxzoom&&T.bind(a,"resize",T.resizeZoom),T.istextarea&&(T.bind(T.win,"keydown",T.lazyResize),T.bind(T.win,"mouseup",T.lazyResize)),T.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var _=function(){T.iframexd=!1;var o;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){T.iframexd=!0,o=!1}if(T.iframexd)return"console"in a&&console.log("NiceScroll error: policy restriced iframe"),!0;if(T.forcescreen=!0,T.isiframe&&(T.iframe={doc:n(o),html:T.doc.contents().find("html")[0],body:T.doc.contents().find("body")[0]},T.getContentSize=function(){return{w:Math.max(T.iframe.html.scrollWidth,T.iframe.body.scrollWidth),h:Math.max(T.iframe.html.scrollHeight,T.iframe.body.scrollHeight)}},T.docscroll=n(T.iframe.body)),!P.isios&&M.iframeautoresize&&!T.isiframe){T.win.scrollTop(0),T.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);T.doc.height(t)}T.lazyResize(30),T.css(n(T.iframe.body),e),P.isios&&T.haswrapper&&T.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?T.bind(this.contentWindow,"scroll",T.onscroll):T.bind(o,"scroll",T.onscroll),M.enablemousewheel&&T.mousewheel(o,T.onmousewheel),M.enablekeyboard&&T.bind(o,P.isopera?"keypress":"keydown",T.onkeypress),P.cantouch?(T.bind(o,"touchstart",T.ontouchstart),T.bind(o,"touchmove",T.ontouchmove)):M.emulatetouch&&(T.bind(o,"mousedown",T.ontouchstart),T.bind(o,"mousemove",function(e){return T.ontouchmove(e,!0)}),M.grabcursorenabled&&P.cursorgrabvalue&&T.css(n(o.body),{cursor:P.cursorgrabvalue})),T.bind(o,"mouseup",T.ontouchend),T.zoom&&(M.dblclickzoom&&T.bind(o,"dblclick",T.doZoom),T.ongesturezoom&&T.bind(o,"gestureend",T.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){_.call(T.doc[0],!1)},500),T.bind(this.doc,"load",_)}},this.showCursor=function(e,o){if(T.cursortimeout&&(clearTimeout(T.cursortimeout),T.cursortimeout=0),T.rail){if(T.autohidedom&&(T.autohidedom.stop().css({opacity:M.cursoropacitymax}),T.cursoractive=!0),T.rail.drag&&1==T.rail.drag.pt||(void 0!==e&&!1!==e&&(T.scroll.y=e/T.scrollratio.y|0),void 0!==o&&(T.scroll.x=o/T.scrollratio.x|0)),T.cursor.css({height:T.cursorheight,top:T.scroll.y}),T.cursorh){var t=T.hasreversehr?T.scrollvaluemaxw-T.scroll.x:T.scroll.x;T.cursorh.css({width:T.cursorwidth,left:!T.rail.align&&T.rail.visibility?t+T.rail.width:t}),T.cursoractive=!0}T.zoom&&T.zoom.stop().css({opacity:M.cursoropacitymax})}},this.hideCursor=function(e){T.cursortimeout||T.rail&&T.autohidedom&&(T.hasmousefocus&&"leave"===M.autohidemode||(T.cursortimeout=setTimeout(function(){T.rail.active&&T.showonmouseevent||(T.autohidedom.stop().animate({opacity:M.cursoropacitymin}),T.zoom&&T.zoom.stop().animate({opacity:M.cursoropacitymin}),T.cursoractive=!1),T.cursortimeout=0},e||M.hidecursordelay)))},this.noticeCursor=function(e,o,t){T.showCursor(o,t),T.rail.active||T.hideCursor(e)},this.getContentSize=T.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:T.haswrapper?function(){return{w:T.doc[0].offsetWidth,h:T.doc[0].offsetHeight}}:function(){return{w:T.docscroll[0].scrollWidth,h:T.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!T||!T.win)return!1;var t=T.page.maxh,r=T.page.maxw,i=T.view.h,s=T.view.w;if(T.view={w:T.ispage?T.win.width():T.win[0].clientWidth,h:T.ispage?T.win.height():T.win[0].clientHeight},T.page=o||T.getContentSize(),T.page.maxh=Math.max(0,T.page.h-T.view.h),T.page.maxw=Math.max(0,T.page.w-T.view.w),T.page.maxh==t&&T.page.maxw==r&&T.view.w==s&&T.view.h==i){if(T.ispage)return T;var n=T.win.offset();if(T.lastposition){var l=T.lastposition;if(l.top==n.top&&l.left==n.left)return T}T.lastposition=n}return 0===T.page.maxh?(T.hideRail(),T.scrollvaluemax=0,T.scroll.y=0,T.scrollratio.y=0,T.cursorheight=0,T.setScrollTop(0),T.rail&&(T.rail.scrollable=!1)):(T.page.maxh-=M.railpadding.top+M.railpadding.bottom,T.rail.scrollable=!0),0===T.page.maxw?(T.hideRailHr(),T.scrollvaluemaxw=0,T.scroll.x=0,T.scrollratio.x=0,T.cursorwidth=0,T.setScrollLeft(0),T.railh&&(T.railh.scrollable=!1)):(T.page.maxw-=M.railpadding.left+M.railpadding.right,T.railh&&(T.railh.scrollable=M.horizrailenabled)),T.railslocked=T.locked||0===T.page.maxh&&0===T.page.maxw,T.railslocked?(T.ispage||T.updateScrollBar(T.view),!1):(T.hidden||(T.rail.visibility||T.showRail(),T.railh&&!T.railh.visibility&&T.showRailHr()),T.istextarea&&T.win.css("resize")&&"none"!=T.win.css("resize")&&(T.view.h-=20),T.cursorheight=Math.min(T.view.h,Math.round(T.view.h*(T.view.h/T.page.h))),T.cursorheight=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorheight),T.cursorwidth=Math.min(T.view.w,Math.round(T.view.w*(T.view.w/T.page.w))),T.cursorwidth=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorwidth),T.scrollvaluemax=T.view.h-T.cursorheight-(M.railpadding.top+M.railpadding.bottom),T.hasborderbox||(T.scrollvaluemax-=T.cursor[0].offsetHeight-T.cursor[0].clientHeight),T.railh&&(T.railh.width=T.page.maxh>0?T.view.w-T.rail.width:T.view.w,T.scrollvaluemaxw=T.railh.width-T.cursorwidth-(M.railpadding.left+M.railpadding.right)),T.ispage||T.updateScrollBar(T.view),T.scrollratio={x:T.page.maxw/T.scrollvaluemaxw,y:T.page.maxh/T.scrollvaluemax},T.getScrollTop()>T.page.maxh?T.doScrollTop(T.page.maxh):(T.scroll.y=T.getScrollTop()/T.scrollratio.y|0,T.scroll.x=T.getScrollLeft()/T.scrollratio.x|0,T.cursoractive&&T.noticeCursor()),T.scroll.y&&0===T.getScrollTop()&&T.doScrollTo(T.scroll.y*T.scrollratio.y|0),T)},this.resize=T.onResize;var O=0;this.onscreenresize=function(e){clearTimeout(O);var o=!T.ispage&&!T.haswrapper;o&&T.hideRails(),O=setTimeout(function(){T&&(o&&T.showRails(),T.resize()),O=0},120)},this.lazyResize=function(e){return clearTimeout(O),e=isNaN(e)?240:e,O=setTimeout(function(){T&&T.resize(),O=0},e),T},this.jqbind=function(e,o,t){T.events.push({e:e,n:o,f:t,q:!0}),n(e).on(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))T._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";S(r,i,o,t||!1),"DOMMouseScroll"==i&&S(r,"MozMousePixelScroll",o,t||!1)}};var Y=!1;if(P.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){Y=!0}});a.addEventListener("test",null,H)}catch(e){}this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},a.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},a.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||a.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||a.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=d[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;r>=0;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},T.bind(e,o,s.f,r,i),d[o]=s),T.ispage?(s.a=[T.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(T.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=d[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===T.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(T._unbind(e,o,s.l.f),d[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;T._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){T.events.push({e:e,n:o,f:t,b:r,q:!1}),Y&&i?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){d[o]?T.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<T.events.length;e++){var o=T.events[e];o.q?o.e.unbind(o.n,o.f):T._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return T.showRail().showRailHr()},this.showRail=function(){return 0===T.page.maxh||!T.ispage&&"none"==T.win.css("display")||(T.rail.visibility=!0,T.rail.css("display","block")),T},this.showRailHr=function(){return T.railh&&(0===T.page.maxw||!T.ispage&&"none"==T.win.css("display")||(T.railh.visibility=!0,T.railh.css("display","block"))),T},this.hideRails=function(){return T.hideRail().hideRailHr()},this.hideRail=function(){return T.rail.visibility=!1,T.rail.css("display","none"),T},this.hideRailHr=function(){return T.railh&&(T.railh.visibility=!1,T.railh.css("display","none")),T},this.show=function(){return T.hidden=!1,T.railslocked=!1,T.showRails()},this.hide=function(){return T.hidden=!0,T.railslocked=!0,T.hideRails()},this.toggle=function(){return T.hidden?T.show():T.hide()},this.remove=function(){T.stop(),T.cursortimeout&&clearTimeout(T.cursortimeout);for(var e in T.delaylist)T.delaylist[e]&&h(T.delaylist[e].h);T.doZoomOut(),T.unbindAll(),P.isie9&&T.win[0].detachEvent("onpropertychange",T.onAttributeChange),!1!==T.observer&&T.observer.disconnect(),!1!==T.observerremover&&T.observerremover.disconnect(),!1!==T.observerbody&&T.observerbody.disconnect(),T.events=null,T.cursor&&T.cursor.remove(),T.cursorh&&T.cursorh.remove(),T.rail&&T.rail.remove(),T.railh&&T.railh.remove(),T.zoom&&T.zoom.remove();for(var o=0;o<T.saved.css.length;o++){var t=T.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}T.saved=!1,T.me.data("__nicescroll","");var r=n.nicescroll;r.each(function(e){if(this&&this.id===T.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];--r.length&&delete r[r.length]}});for(var i in T)T[i]=null,delete T[i];T=null},this.scrollstart=function(e){return this.onscrollstart=e,T},this.scrollend=function(e){return this.onscrollend=e,T},this.scrollcancel=function(e){return this.onscrollcancel=e,T},this.zoomin=function(e){return this.onzoomin=e,T},this.zoomout=function(e){return this.onzoomout=e,T},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(t.getNiceScroll().length>0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(T.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:T.newscrollx,y:T.newscrolly},speed:i};T.onscrollstart.call(T,s)}},this.triggerScrollEnd=function(){if(T.onscrollend){var e=T.getScrollLeft(),o=T.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};T.onscrollend.call(T,t)}};var B=0,X=0,D=0,A=1,q=!1;if(this.onmousewheel=function(e){if(T.wheelprevented||T.locked)return!1;if(T.railslocked)return T.debounced("checkunlock",T.resize,250),!1;if(T.rail.drag)return T.cancelEvent(e);if("auto"===M.oneaxismousemode&&0!==e.deltaX&&(M.oneaxismousemode=!1),M.oneaxismousemode&&0===e.deltaX&&!T.rail.scrollable)return!T.railh||!T.railh.scrollable||T.onmousewheelhr(e);var o=f(),t=!1;if(M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,T.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(T.checkarea=0),r},this.onmousewheelhr=function(e){if(!T.wheelprevented){if(T.railslocked||!T.railh.scrollable)return!0;if(T.rail.drag)return T.cancelEvent(e);var o=f(),t=!1;return M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,!!T.nativescrollingarea||(T.railslocked?T.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return T.cancelScroll(),T.scrollmon&&T.scrollmon.stop(),T.cursorfreezed=!1,T.scroll.y=Math.round(T.getScrollTop()*(1/T.scrollratio.y)),T.noticeCursor(),T},this.getTransitionSpeed=function(e){return 80+e/72*M.scrollspeed|0},M.smoothscroll)if(T.ishwscroll&&P.hastransition&&M.usetransition&&M.smoothscroll){var j="";this.resetTransition=function(){j="",T.doc.css(P.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:T.getTransitionSpeed(e),r=t+"ms";return j!==r&&(j=r,T.doc.css(P.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&u(o),T.showCursor(T.getScrollTop(),T.getScrollLeft()),T.notifyScrollEvent(T.win[0])};u(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();if(((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll(),M.bouncescroll?(o<0?o=o/2|0:o>T.page.maxh&&(o=T.page.maxh+(o-T.page.maxh)/2|0),e<0?e=e/2|0:e>T.page.maxw&&(e=T.page.maxw+(e-T.page.maxw)/2|0)):(o<0?o=0:o>T.page.maxh&&(o=T.page.maxh),e<0?e=0:e>T.page.maxw&&(e=T.page.maxw)),T.scrollrunning&&e==T.newscrollx&&o==T.newscrolly)return!1;T.newscrolly=o,T.newscrollx=e;var s=T.getScrollTop(),n=T.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=T.prepareTransition(a);T.scrollrunning||(T.scrollrunning=!0,T.triggerScrollStart(n,s,e,o,c),T.cursorupdate.start()),T.scrollendtrapped=!0,P.transitionend||(T.scrollendtrapped&&clearTimeout(T.scrollendtrapped),T.scrollendtrapped=setTimeout(T.onScrollTransitionEnd,c)),T.setScrollTop(T.newscrolly),T.setScrollLeft(T.newscrollx)},this.cancelScroll=function(){if(!T.scrollendtrapped)return!0;var e=T.getScrollTop(),o=T.getScrollLeft();return T.scrollrunning=!1,P.transitionend||clearTimeout(P.transitionend),T.scrollendtrapped=!1,T.resetTransition(),T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.timerscroll&&T.timerscroll.tm&&clearInterval(T.timerscroll.tm),T.timerscroll=!1,T.cursorfreezed=!1,T.cursorupdate.stop(),T.showCursor(e,o),T},this.onScrollTransitionEnd=function(){if(T.scrollendtrapped){var e=T.getScrollTop(),o=T.getScrollLeft();if(e<0?e=0:e>T.page.maxh&&(e=T.page.maxh),o<0?o=0:o>T.page.maxw&&(o=T.page.maxw),e!=T.newscrolly||o!=T.newscrollx)return T.doScrollPos(o,e,M.snapbackspeed);T.scrollrunning&&T.triggerScrollEnd(),T.scrollrunning=!1,T.scrollendtrapped=!1,T.resetTransition(),T.timerscroll=!1,T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.cursorupdate.stop(),T.noticeCursor(!1,e,o),T.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll();var s=!1;if(T.bouncescroll&&T.rail.visibility||(o<0?(o=0,s=!0):o>T.page.maxh&&(o=T.page.maxh,s=!0)),T.bouncescroll&&T.railh.visibility||(e<0?(e=0,s=!0):e>T.page.maxw&&(e=T.page.maxw,s=!0)),T.scrollrunning&&T.newscrolly===o&&T.newscrollx===e)return!0;T.newscrolly=o,T.newscrollx=e,T.dst={},T.dst.x=e-i,T.dst.y=o-r,T.dst.px=i,T.dst.py=r;var n=0|Math.sqrt(T.dst.x*T.dst.x+T.dst.y*T.dst.y),l=T.getTransitionSpeed(n);T.bzscroll={};var a=s?1:.58;T.bzscroll.x=new R(i,T.newscrollx,l,0,0,a,1),T.bzscroll.y=new R(r,T.newscrolly,l,0,0,a,1);f();var c=function(){if(T.scrollrunning){var e=T.bzscroll.y.getPos();T.setScrollLeft(T.bzscroll.x.getNow()),T.setScrollTop(T.bzscroll.y.getNow()),e<=1?T.timer=u(c):(T.scrollrunning=!1,T.timer=0,T.triggerScrollEnd())}};T.scrollrunning||(T.triggerScrollStart(i,r,e,o,l),T.scrollrunning=!0,T.timer=u(c))},this.cancelScroll=function(){return T.timer&&h(T.timer),T.timer=0,T.bzscroll=!1,T.scrollrunning=!1,T};else this.doScrollLeft=function(e,o){var t=T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>T.page.maxw?T.page.maxw:e;r<0&&(r=0);var i=o>T.page.maxh?T.page.maxh:o;i<0&&(i=0),T.synched("scroll",function(){T.setScrollTop(i),T.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){z(0,e)},this.doScrollLeftBy=function(e,o){z(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*T.scrollratio.y):e;t<0?t=0:t>T.page.maxh&&(t=T.page.maxh),T.cursorfreezed=!1,T.doScrollTop(e)},this.checkContentSize=function(){var e=T.getContentSize();e.h==T.page.h&&e.w==T.page.w||T.resize(!1,e)},T.onscroll=function(e){T.rail.drag||T.cursorfreezed||T.synched("scroll",function(){T.scroll.y=Math.round(T.getScrollTop()/T.scrollratio.y),T.railh&&(T.scroll.x=Math.round(T.getScrollLeft()/T.scrollratio.x)),T.noticeCursor()})},T.bind(T.docscroll,"scroll",T.onscroll),this.doZoomIn=function(e){if(!T.zoomactive){T.zoomactive=!0,T.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=T.win[0].style;for(var r in o){var i=o[r];T.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}T.zoomrestore.style.width=T.win.css("width"),T.zoomrestore.style.height=T.win.css("height"),T.zoomrestore.padding={w:T.win.outerWidth()-T.win.width(),h:T.win.outerHeight()-T.win.height()},P.isios4&&(T.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),T.win.css({position:P.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=T.win.css("backgroundColor");return(""===n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&T.win.css("backgroundColor","#fff"),T.rail.css({zIndex:s+101}),T.zoom.css({zIndex:s+102}),T.zoom.css("backgroundPosition","0 -18px"),T.resizeZoom(),T.onzoomin&&T.onzoomin.call(T),T.cancelEvent(e)}},this.doZoomOut=function(e){if(T.zoomactive)return T.zoomactive=!1,T.win.css("margin",""),T.win.css(T.zoomrestore.style),P.isios4&&c.scrollTop(T.zoomrestore.scrollTop),T.rail.css({"z-index":T.zindex}),T.zoom.css({"z-index":T.zindex}),T.zoomrestore=!1,T.zoom.css("backgroundPosition","0 0"),T.onResize(),T.onzoomout&&T.onzoomout.call(T),T.cancelEvent(e)},this.doZoom=function(e){return T.zoomactive?T.doZoomOut(e):T.doZoomIn(e)},this.resizeZoom=function(){if(T.zoomactive){var e=T.getScrollTop();T.win.css({width:c.width()-T.zoomrestore.padding.w+"px",height:c.height()-T.zoomrestore.padding.h+"px"}),T.onResize(),T.setScrollTop(Math.min(T.page.maxh,e))}},this.init(),n.nicescroll.push(this)},y=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=f(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=f();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=f(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var p=o.lastscrollx,m=o.lastscrolly,g=function(){var e=f()-t>600?.04:.02;o.speedx&&(p=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=p,(p<0||p>l)&&(e=.1)),o.speedy&&(m=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=m,(m<0||m>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){if(o.speedx){o.nc.getScrollLeft();o.chkx=p,o.nc.setScrollLeft(p)}if(o.speedy){o.nc.getScrollTop();o.chky=m,o.nc.setScrollTop(m)}o.timer||(o.nc.hideCursor(),o.doSnapy(p,m))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(p,m))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},x=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():x.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):x.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():x.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):x.call(n(this),e)})};var S=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():S.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):S.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():S.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):S.call(n(this),e)})};var z=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=n.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(z.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new z(this):this[e]&&n.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==n.data(e,"__nicescroll")},n.fn.niceScroll=function(e,o){void 0!==o||"object"!=typeof e||"jquery"in e||(o=e,e=!1);var t=new z;return this.each(function(){var r=n(this),i=n.extend({},o);if(e){var s=n(e);i.doc=s.length>1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new b(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},a.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new z,n.nicescroll.options=g)});
document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",(()=>{for(var e=["-webkit-","-moz-","-ms-","-o-",""],t=0;t<e.length;t++)e[t]+"transform"in document.documentElement.style&&(document.documentElement.className+=" vc_transform ")})(),(c=>{"function"!=typeof window.vc_js&&(window.vc_js=function(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),vc_ttaToggleBehaviour(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}),"function"!=typeof window.vc_plugin_flexslider&&(window.vc_plugin_flexslider=function(e){(e?e.find(".wpb_flexslider"):jQuery(".wpb_flexslider")).each(function(){var e=jQuery(this),t=1e3*parseInt(e.attr("data-interval"),10),i=e.attr("data-flex_fx"),o=0==t?!1:!0;e.is(":visible")&&setTimeout(function(){e.flexslider({animation:i,slideshow:o,slideshowSpeed:t,sliderSpeed:800,smoothHeight:!0})},1)})}),"function"!=typeof window.vc_googleplus&&(window.vc_googleplus=function(){var e,t;0<jQuery(".wpb_googleplus").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_pinterest&&(window.vc_pinterest=function(){var e,t;0<jQuery(".wpb_pinterest").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://assets.pinterest.com/js/pinit.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_progress_bar&&(window.vc_progress_bar=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".vc_progress_bar").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.find(".vc_single_bar").each(function(e){var t=jQuery(this).find(".vc_bar"),i=t.data("percentage-value");setTimeout(function(){t.css({width:i+"%"})},200*e)})},{offset:"85%"})})}),"function"!=typeof window.vc_waypoints&&(window.vc_waypoints=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.addClass("wpb_start_animation animated")},{offset:"85%"})})}),"function"!=typeof window.vc_toggleBehaviour&&(window.vc_toggleBehaviour=function(e){function t(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(this).closest(".vc_toggle"),e=t.find(".vc_toggle_content");t.hasClass("vc_toggle_active")?e.slideUp({duration:300,complete:function(){t.removeClass("vc_toggle_active")}}):e.slideDown({duration:300,complete:function(){t.addClass("vc_toggle_active")}})}(e?e.hasClass("vc_toggle_title")?e.unbind("click"):e.find(".vc_toggle_title").off("click"):jQuery(".vc_toggle_title").off("click")).on("click",t)}),"function"!=typeof window.vc_ttaToggleBehaviour&&(window.vc_ttaToggleBehaviour=function(e){function t(){var e=jQuery(this);e.toggleClass("wpb-tta-toggle-active"),e.parent().parent().parent().find(".vc_pagination-item").each(function(){if(!c(this).hasClass("vc_active"))return c(this).find("a").click(),!1})}(e?e.find(".wpb-tta-toggle"):jQuery(".wpb-tta-toggle")).off("click").on("click",t),setTimeout(function(){jQuery(".wpb-tta-toggle").each(function(){var e=jQuery(this);e.parent().parent().parent().find(".vc_tta-panels-container .vc_pagination li:first").hasClass("vc_active")||e.addClass("wpb-tta-toggle-active")})},1e3)}),"function"!=typeof window.vc_tabsBehaviour&&(window.vc_tabsBehaviour=function(e){var t,o;jQuery.ui&&(e=e||jQuery(".wpb_tabs, .wpb_tour"),t=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split("."):"1.10",o=1===parseInt(t[0],10)&&parseInt(t[1],10)<9,e.each(function(){var e=jQuery(this).attr("data-interval"),t=[],i=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(e,t){wpb_prepare_tab_content(e,t)},activate:function(e,t){wpb_prepare_tab_content(e,t)}});if(e&&0<e)try{i.tabs("rotate",1e3*e)}catch(e){window.console&&window.console.warn&&console.warn("tabs behaviours error",e)}jQuery(this).find(".wpb_tab").each(function(){t.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").on("click",function(e){return e&&e.preventDefault&&e.preventDefault(),o?i.tabs("select",jQuery("a",this).attr("href")):i.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").on("click",function(e){var t;e&&e.preventDefault&&e.preventDefault(),o?(t=i.tabs("option","selected"),jQuery(this).parent().hasClass("wpb_next_slide")?t++:t--,t<0?t=i.tabs("length")-1:t>=i.tabs("length")&&(t=0),i.tabs("select",t)):(t=i.tabs("option","active"),e=i.find(".wpb_tab").length,t=jQuery(this).parent().hasClass("wpb_next_slide")?e<=t+1?0:t+1:t-1<0?e-1:t-1,i.tabs("option","active",t))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(){var e=jQuery(this),t=(e.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0<parseInt(e.data("active-tab"),10)&&parseInt(e.data("active-tab"),10)-1),i=!1===t||"yes"===e.data("collapsible"),t=e.find(".wpb_accordion_wrapper").accordion({header:"> div > h3",autoHeight:!1,heightStyle:"content",active:t,collapsible:i,navigation:!0,activate:vc_accordionActivate,change:function(e,t){void 0!==jQuery.fn.isotope&&t.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(t.newPanel)}});!0===e.data("vcDisableKeydown")&&(t.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var o={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var e=jQuery(this),t=e.find(".wpb_thumbnails"),i=t.attr("data-layout-mode");t.isotope({itemSelector:".isotope-item",layoutMode:void 0===o[i]?"fitRows":o[i]}),e.find(".categories_filter a").data("isotope",t).on("click",function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),e.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){t.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function(e){(e?e.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var e=jQuery(this);!0!==e.data("carousel_enabled")&&e.is(":visible")&&(e.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(e=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":e.css("margin-left"),"margin-left":0}),(e=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(e.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(){var e,t,i=jQuery(this);i.hasClass("wpb_slider_nivo")?(0===(t=1e3*i.attr("data-interval"))&&(t=9999999999),jQuery.fn.nivoSlider&&!i.data("nivo-initialized")&&(i.data("nivo-initialized",!0),i.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:t,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"}))):i.hasClass("wpb_image_grid")&&i.find(".wpb_image_grid_ul")&&i.find(".wpb_image_grid_ul").isotope&&(jQuery.fn.imagesLoaded?e=i.find(".wpb_image_grid_ul").imagesLoaded(function(){e.isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0})}):i.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1<location.href.indexOf("#!prettyPhoto")&&(location.hash="")},social_tools:""})}catch(e){window.console&&window.console.warn&&window.console.warn("vc_prettyPhoto initialize error",e)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return window.console&&window.console.warn&&window.console.warn("function vc_google_fonts is deprecated, no need to use it"),!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){var s=window.jQuery;function e(){var e;void 0!==window.wpb_disable_full_width_row_js&&window.wpb_disable_full_width_row_js||(e=s('[data-vc-full-width="true"]'),s.each(e,function(){var e,t,i,o,n,a,r,c=s(this),d=(c.addClass("vc_hidden"),c.next(".vc_row-full-width"));(d=d.length?d:c.parent().next(".vc_row-full-width")).length&&(c.removeAttr("data-vc-full-width-temp"),e=parseInt(c.css("margin-left"),10),t=parseInt(c.css("margin-right"),10),i=0-d.offset().left-e,o=s(window).width(),n={position:"relative",left:i="rtl"===c.css("direction")?(i=i-d.width()+o)+e+t:i,"box-sizing":"border-box",width:o,"max-width":o},c.css(n),c.data("vcStretchContent")||("rtl"===c.css("direction")?((a=i)<0&&(a=0),(r=i)<0&&(r=0)):(r=o-(a=(a=-1*i)<0?0:a)-d.width()+e+t)<0&&(r=0),c.css({"padding-left":a+"px","padding-right":r+"px"})),c.attr("data-vc-full-width-init","true"),c.removeClass("vc_hidden"),s(document).trigger("vc-full-width-row-single",{el:c,offset:i,marginLeft:e,marginRight:t,elFull:d,width:o,maxWidth:o}))}),s(document).trigger("vc-full-width-row",e))}function t(){var e,t,i=s(".vc_row-o-full-height:first");i.length&&(e=s(window).height(),(t=i.offset().top)<e)&&i.css("min-height",100-t/(e/100)+"vh"),s(document).trigger("vc-full-height-row",i)}s(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",e).on("resize.vcRowBehaviour",t),e(),t(),(0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./))&&s(".vc_row-o-full-height").each(function(){"flex"===s(this).css("display")&&s(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')}),vc_initVideoBackgrounds();var n=!1;if(window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),s(".vc_parallax-inner").remove(),s("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),s("[data-vc-parallax]").each(function(){var e,t,i,o;n=!0,"on"===s(this).data("vcParallaxOFade")&&s(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),e=100*s(this).data("vcParallax"),(t=s("<div />").addClass("vc_parallax-inner").appendTo(s(this))).height(e+"%"),i=s(this).data("vcParallaxImage"),(o=vcExtractYoutubeId(i))?insertYoutubeVideoAsBackground(t,o):void 0!==i&&t.css("background-image","url("+i+")"),t.attr("data-bottom-top","top: "+-(e-100)+"%;").attr("data-top-bottom","top: 0%;")}),n&&window.skrollr)window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),window.vcParallaxSkroll}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(e){for(var t=!1,i=1;!1===t;){if(e.hasClass("columns_count_"+i))return t=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(e,t){var i=t.panel||t.newPanel,o=i.find(".vc_pie_chart:not(.vc_ready)"),n=i.find(".vc_round-chart"),a=i.find(".vc_line-chart"),r=i.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(i),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),i.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&i.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),o.length&&jQuery.fn.vcChat&&o.vcChat(),n.length&&jQuery.fn.vcRoundChart&&n.vcRoundChart({reload:!1}),a.length&&jQuery.fn.vcLineChart&&a.vcLineChart({reload:!1}),r.length&&jQuery.fn.carousel&&r.carousel("resizeAction"),t=i.find(".isotope, .wpb_image_grid_ul"),o=i.find(".wpb_gmaps_widget"),0<t.length&&t.isotope("layout"),o.length&&!o.is(".map_ready")&&((n=o.find("iframe")).attr("src",n.attr("src")),o.addClass("map_ready")),i.parents(".isotope").length&&i.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),c(document).trigger("wpb_prepare_tab_content",i)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var t=window.jQuery,i={};i.newPanel=t(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,i)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(e,t){var i,o,n,a;t.newPanel.length&&t.newHeader.length&&(i=t.newPanel.find(".vc_pie_chart:not(.vc_ready)"),o=t.newPanel.find(".vc_round-chart"),n=t.newPanel.find(".vc_line-chart"),a=t.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&t.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),vc_carouselBehaviour(t.newPanel),vc_plugin_flexslider(t.newPanel),i.length&&jQuery.fn.vcChat&&i.vcChat(),o.length&&jQuery.fn.vcRoundChart&&o.vcRoundChart({reload:!1}),n.length&&jQuery.fn.vcLineChart&&n.vcLineChart({reload:!1}),a.length&&jQuery.fn.carousel&&a.carousel("resizeAction"),t.newPanel.parents(".isotope").length)&&t.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){c(".vc_video-bg").remove(),c("[data-vc-video-bg]").each(function(){var e,i=jQuery(this);i.data("vcVideoBg")?(e=i.data("vcVideoBg"),(e=vcExtractYoutubeId(e))&&(i.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground(i,e)),jQuery(window).on("grid:items:added",function(e,t){i.has(t).length&&vcResizeVideoBackground(i)})):i.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function(e,t,i){if("undefined"==typeof YT||void 0===YT.Player)return 100<(i=void 0===i?0:i)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground(e,t,i++)},100);var o=e.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find(".inner");new YT.Player(o[0],{width:"100%",height:"100%",videoId:t,playerVars:{playlist:t,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,mute:1,wmode:"transparent"},events:{onReady:function(e){e.target.mute().setLoop(!0)}}}),vcResizeVideoBackground(e),jQuery(window).on("resize",function(){vcResizeVideoBackground(e)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function(e){var t,i,o,n,a=e.innerWidth(),r=e.innerHeight();a/r<16/9?(t=r*(16/9),i=r,o=-Math.round((t-a)/2)+"px",n=-Math.round((i-r)/2)+"px"):(i=(t=a)*(9/16),n=-Math.round((i-r)/2)+"px",o=-Math.round((t-a)/2)+"px"),t+="px",i+="px",e.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:o,marginTop:n,width:t,height:i})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(e){return void 0!==e&&null!==(e=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/))&&e[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var e=window.jQuery,t=e(".wpb_gmaps_widget");t.on("click",function(){e("iframe",this).css("pointer-events","auto")}),t.on("mouseleave",function(){e("iframe",this).css("pointer-events","none")}),e(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(e){e.each(function(){var e=jQuery(this),t=e.width();e.css("perspective",4*t+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(e){e.each(function(){var e=jQuery(this),t=e.find(".vc-hoverbox-inner"),i=(t.css("min-height",0),e.find(".vc-hoverbox-front-inner").outerHeight()),e=e.find(".vc-hoverbox-back-inner").outerHeight(),i=e<i?i:e;t.css("min-height",(i=i<250?250:i)+"px")})}),"function"!=typeof window.vc_prepareHoverBox&&(window.vc_prepareHoverBox=function(){var e=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(e),vc_setHoverBoxPerspective(e)}),jQuery(document).ready(window.vc_prepareHoverBox),jQuery(window).on("resize",window.vc_prepareHoverBox),jQuery(document).ready(function(){window.vc_js()})})(window.jQuery);
(a=>{var r,t,e,n;function o(n,i){var o=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=a(this),e=t.data("vc.accordion");e||(e=new r(t,a.extend(!0,{},i)),t.data("vc.accordion",e)),"string"==typeof n&&e[n].apply(e,o)})}(r=function(t){this.$element=t,this.activeClass="vc_active",this.animatingClass="vc_animating",this.useCacheFlag=void 0,this.$target=void 0,this.$targetContent=void 0,this.selector=void 0,this.$container=void 0,this.animationDuration=void 0,this.index=0}).transitionEvent=function(){var t,e=document.createElement("vcFakeElement"),n={transition:"transitionend",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in n)if(void 0!==e.style[t])return n[t]},r.emulateTransitionEnd=function(t,e){var n=!1;e=e||250,t.one(r.transitionName,function(){n=!0}),setTimeout(function(){n||t.trigger(r.transitionName)},e)},r.DEFAULT_TYPE="collapse",r.transitionName=r.transitionEvent(),r.prototype.controller=function(t){var e=this.$element,n=t;"string"==typeof(n=void 0===(n="string"!=typeof n?e.data("vcAction")||this.getContainer().data("vcAction"):n)?r.DEFAULT_TYPE:n)&&o.call(e,n,t)},r.prototype.isCacheUsed=function(){var t=this;return void 0===this.useCacheFlag&&(this.useCacheFlag=function(){return!1!==t.$element.data("vcUseCache")}()),this.useCacheFlag},r.prototype.getSelector=function(){var e=this.$element,t=function(){var t=e.data("vcTarget");return t=t||e.attr("href")};return this.isCacheUsed()?(void 0===this.selector&&(this.selector=t()),this.selector):t()},r.prototype.findContainer=function(){var t=this.$element.closest(this.$element.data("vcContainer"));return t=t.length?t:a("body")},r.prototype.getContainer=function(){return this.isCacheUsed()?(void 0===this.$container&&(this.$container=this.findContainer()),this.$container):this.findContainer()},r.prototype.getTarget=function(){var e=this,n=e.getSelector(),t=function(){var t=e.getContainer().find(n);return t=t.length?t:e.getContainer().filter(n)};return this.isCacheUsed()?(void 0===this.$target&&(this.$target=t()),this.$target):t()},r.prototype.getTargetContent=function(){var t,e=this.getTarget();return this.isCacheUsed()?(void 0===this.$targetContent&&((t=e).data("vcContent")&&!(t=e.find(e.data("vcContent"))).length&&(t=e),this.$targetContent=t),this.$targetContent):e.data("vcContent")&&(t=e.find(e.data("vcContent"))).length?t:e},r.prototype.getTriggers=function(){var n=0;return this.getContainer().find("[data-vc-accordion]").each(function(){var t=a(this),e=t.data("vc.accordion");void 0===e&&(t.vcAccordion(),e=t.data("vc.accordion")),e&&e.setIndex&&e.setIndex(n++)})},r.prototype.setIndex=function(t){this.index=t},r.prototype.getIndex=function(){return this.index},r.prototype.triggerEvent=function(t,e){"string"==typeof t&&(t=a.Event(t),this.$element.trigger(t,e))},r.prototype.getActiveTriggers=function(){return this.getTriggers().filter(function(){var t=a(this).data("vc.accordion");return t.getTarget().hasClass(t.activeClass)})},r.prototype.changeLocationHash=function(){var t,e=this.getTarget();(t=e.length?e.attr("id"):t)&&(history.pushState?history.pushState(null,null,"#"+t):location.hash="#"+t)},r.prototype.isActive=function(){return this.getTarget().hasClass(this.activeClass)},r.prototype.getAnimationDuration=function(){var t=this,e=function(){return void 0===r.transitionName?"0s":t.getTargetContent().css("transition-duration").split(",")[0]};return this.isCacheUsed()?(void 0===this.animationDuration&&(this.animationDuration=e()),this.animationDuration):e()},r.prototype.getAnimationDurationMilliseconds=function(){var t=this.getAnimationDuration();return"ms"===t.substr(-2)?parseInt(t):"s"===t.substr(-1)?Math.round(1e3*parseFloat(t)):void 0},r.prototype.isAnimated=function(){return 0<parseFloat(this.getAnimationDuration())},r.prototype.show=function(e){var n=this,i=n.getTarget(),o=n.getTargetContent();n.isActive()||(n.isAnimated()?(n.triggerEvent("beforeShow.vc.accordion"),i.queue(function(t){o.one(r.transitionName,function(){i.removeClass(n.animatingClass),o.attr("style",""),n.triggerEvent("afterShow.vc.accordion",e)}),r.emulateTransitionEnd(o,n.getAnimationDurationMilliseconds()+100),t()}).queue(function(t){o.attr("style",""),o.css({position:"absolute",visibility:"hidden",display:"block"});var e=o.height();o.data("vcHeight",e),o.attr("style",""),t()}).queue(function(t){o.height(0),o.css({"padding-top":0,"padding-bottom":0}),t()}).queue(function(t){i.addClass(n.animatingClass),i.addClass(n.activeClass),("object"==typeof e&&e.hasOwnProperty("changeHash")&&e.changeHash||void 0===e)&&n.changeLocationHash(),n.triggerEvent("show.vc.accordion",e),t()}).queue(function(t){var e=o.data("vcHeight");o.animate({height:e},{duration:n.getAnimationDurationMilliseconds(),complete:function(){o.data("events")||o.attr("style","")}}),o.css({"padding-top":"","padding-bottom":""}),t()})):(i.addClass(n.activeClass),n.triggerEvent("show.vc.accordion",e)))},r.prototype.hide=function(e){var n=this,i=n.getTarget(),o=n.getTargetContent();n.isActive()&&(n.isAnimated()?(n.triggerEvent("beforeHide.vc.accordion"),i.queue(function(t){o.one(r.transitionName,function(){i.removeClass(n.animatingClass),o.attr("style",""),n.triggerEvent("afterHide.vc.accordion",e)}),r.emulateTransitionEnd(o,n.getAnimationDurationMilliseconds()+100),t()}).queue(function(t){i.addClass(n.animatingClass),i.removeClass(n.activeClass),n.triggerEvent("hide.vc.accordion",e),t()}).queue(function(t){var e=o.height();o.height(e),t()}).queue(function(t){o.animate({height:0},n.getAnimationDurationMilliseconds()),o.css({"padding-top":0,"padding-bottom":0}),t()})):(i.removeClass(n.activeClass),n.triggerEvent("hide.vc.accordion",e)))},r.prototype.toggle=function(t){var e=this.$element;this.isActive()?o.call(e,"hide",t):o.call(e,"show",t)},r.prototype.dropdown=function(e){var n=this.$element;this.isActive()?o.call(n,"hide",e):(o.call(n,"show",e),a(document).on("click.vc.accordion.data-api.dropdown",function(t){o.call(n,"hide",e),a(document).off(t)}))},r.prototype.collapse=function(t){var e=this.$element,n=this.getActiveTriggers().filter(function(){return e[0]!==this});n.length&&o.call(n,"hide",t),o.call(e,"show",t)},r.prototype.collapseAll=function(t){var e=this.$element,n=this.getActiveTriggers().filter(function(){return e[0]!==this});n.length&&o.call(n,"hide",t),o.call(e,"toggle",t)},r.prototype.showNext=function(t){var e,n=this.getTriggers(),i=this.getActiveTriggers();n.length&&(-1<(e=i.length&&(i=i.eq(i.length-1).vcAccordion().data("vc.accordion"))&&i.getIndex?i.getIndex():e)&&e+1<n.length?o.call(n.eq(e+1),"controller",t):o.call(n.eq(0),"controller",t))},r.prototype.showPrev=function(t){var e,n=this.getTriggers(),i=this.getActiveTriggers();n.length&&(i.length&&(i=i.eq(i.length-1).vcAccordion().data("vc.accordion"))&&i.getIndex&&(e=i.getIndex()),o.call(-1<e?0<=e-1?n.eq(e-1):n.eq(n.length-1):n.eq(0),"controller",t))},r.prototype.showAt=function(t,e){var n=this.getTriggers();n.length&&t&&t<n.length&&o.call(n.eq(t),"controller",e)},r.prototype.scrollToActive=function(t){var e,n;(void 0===t||void 0===t.scrollTo||t.scrollTo)&&(0,(n=a((e=this).getTarget())).length)&&this.$element.length&&setTimeout(function(){n.offset().top-a(window).scrollTop()-+e.$element.outerHeight()<0&&a("html, body").animate({scrollTop:n.offset().top-+e.$element.outerHeight()},300)},300)},e=a.fn.vcAccordion,a.fn.vcAccordion=o,a.fn.vcAccordion.Constructor=r,a.fn.vcAccordion.noConflict=function(){return a.fn.vcAccordion=e,this},t=function(t){var e=a(this);t.preventDefault(),o.call(e,"controller")},n=function(){var t,e=window.location.hash;e&&(t=a(e)).length&&(e=t.find('[data-vc-accordion][href="'+e+'"],[data-vc-accordion][data-vc-target="'+e+'"]')).length&&(setTimeout(function(){a("html, body").animate({scrollTop:t.offset().top-.2*a(window).height()},0)},300),e.trigger("click"))},a(window).on("hashchange.vc.accordion",n),a(document).on("click.vc.accordion.data-api","[data-vc-accordion]",t),a(document).ready(n),a(document).on("afterShow.vc.accordion",function(t,e){o.call(a(t.target),"scrollToActive",e)})})(window.jQuery);
(n=>{var o,s,t;o=function(a,o){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=n(this),e=t.data("vc.tta.autoplay");e||(e=new s(t,n.extend(!0,{},s.DEFAULTS,t.data("vc-tta-autoplay"),o)),t.data("vc.tta.autoplay",e)),"string"==typeof a?e[a].apply(e,i):e.start(i)})},(s=function(t,e){this.$element=t,this.options=e}).DEFAULTS={delay:5e3,pauseOnHover:!0,stopOnClick:!0},s.prototype.show=function(){this.$element.find("[data-vc-accordion]:eq(0)").vcAccordion("showNext",{changeHash:!1,scrollTo:!1})},s.prototype.hasTimer=function(){return void 0!==this.$element.data("vc.tta.autoplay.timer")},s.prototype.setTimer=function(t){this.$element.data("vc.tta.autoplay.timer",t)},s.prototype.getTimer=function(){return this.$element.data("vc.tta.autoplay.timer")},s.prototype.deleteTimer=function(){this.$element.removeData("vc.tta.autoplay.timer")},s.prototype.start=function(){var e,a;e=this.$element,(a=this).hasTimer()||(this.setTimer(window.setInterval(this.show.bind(this),this.options.delay)),this.options.stopOnClick&&e.on("click.vc.tta.autoplay.data-api","[data-vc-accordion]",function(t){t&&t.preventDefault&&t.preventDefault(),a.hasTimer()&&o.call(e,"stop")}),this.options.pauseOnHover&&e.hover(function(t){t&&t.preventDefault&&t.preventDefault(),a.hasTimer()&&o.call(e,"mouseleave"===t.type?"resume":"pause")}))},s.prototype.resume=function(){this.hasTimer()&&this.setTimer(window.setInterval(this.show.bind(this),this.options.delay))},s.prototype.stop=function(){this.pause(),this.deleteTimer(),this.$element.off("click.vc.tta.autoplay.data-api mouseenter mouseleave")},s.prototype.pause=function(){var t=this.getTimer();void 0!==t&&window.clearInterval(t)},t=n.fn.vcTtaAutoPlay,n.fn.vcTtaAutoPlay=o,n.fn.vcTtaAutoPlay.Constructor=s,n.fn.vcTtaAutoPlay.noConflict=function(){return n.fn.vcTtaAutoPlay=t,this},n(document).ready(function(){n("[data-vc-tta-autoplay]").each(function(){n(this).vcTtaAutoPlay()})})})(window.jQuery);
(function($){
jQuery(document).ready(function($){
custom_cat_colors();
$(".ect-accordion-view").each(function (){
var thisElement=$(this);
thisElement.find(".ect-accordion-footer:first").addClass('show-event');
thisElement.find('.ect-accordion-header:first').addClass('active-event');
thisElement.find('.ect-accordion-event:first').addClass('active-event');
ectAccordion(thisElement);
});
$(document).on("click", ".ect-load-more-btn", function(){
const thisEle=$(this);
let type, thisParent;
if(thisEle.closest(".ectt-list-wrapper").length){
type="list";
thisParent=thisEle.parents("#ect-events-list-content").find("div.ect-list-wrapper");
}else if(thisEle.closest(".ectt-simple-list-wrapper").length){
type="minimal-list";
const wrapper=thisEle.closest(".ectt-simple-list-wrapper");
const wrpId="#" + wrapper.attr("id");
thisParent=$(wrpId).find("#ect-minimal-list-wrp");
}else if(thisEle.closest(".ect-accordion-view").length){
type="accordion";
const wrapper=thisEle.closest(".ect-accordion-view");
thisParent=wrapper.find(".ect-accordion-container");
}else if(thisEle.closest(".tect-grid-wrapper").length){
type="grid";
const wrapper=thisEle.closest(".tect-grid-wrapper");
thisParent=wrapper.find("div.row");
}else if(thisEle.closest(".ect-masonry-template-cont").length){
type="masonry";
const wrapper=thisEle.closest(".ect-masonry-template-cont");
thisParent=wrapper.find(".ect-masonary-cont");
}
if(type&&thisParent){
ectLoadMoreContent($(thisParent), thisEle, type);
}
return false;
});
});
function ectLoadMoreContent(contentWrapper,thisEle,type){
var values=contentWrapper.find('.ect-month-header').last().text();
var settingContainer=thisEle.parents('.ect-load-more').find('#ect-lm-settings');
var ajaxUrl=settingContainer.data('ajax-url');
var nonce_val=settingContainer.data('load-nonce');
var settings=settingContainer.data('settings');
var excludeEventsJson=settingContainer.attr('data-exclude-events');
var loadMore=settingContainer.data('load-more');
var loading=settingContainer.data('loading');
var noEvent=settingContainer.data('loaded');
var json_query=settingContainer.siblings('#ect-query-arg').html();
var query=JSON.parse(json_query);
var paged=thisEle.attr('data-paged');
thisEle.find('.ect-preloader').show();
thisEle.find('span').text(loading);
var data={};
if(settings['filterbar']==="yes"){
const wrapper=thisEle.closest(".ect-event-wrapper");
const selectedCat=wrapper.find("#ect-fb-category").val();
const selectedTag=wrapper.find("#ect-fb-tags").val();
const selectedVenue=wrapper.find("#ect-fb-venue").val();
const selectedOrg=wrapper.find("#ect-fb-org").val();
const searchInput=wrapper.find("#ect-fb-search").val();
data={
'action': 'ect_common_load_more',
'query':query,
'last_year_val':values,
'load_ajax_nonce':nonce_val,
'exclude_events':excludeEventsJson,
'settings':settings,
'selectedTag': selectedTag,
'selectedVenue': selectedVenue,
'selectedOrg': selectedOrg,
'searchInput': searchInput,
'selectedCat': selectedCat,
}}else{
data={
'action': 'ect_common_load_more',
'query':query,
'last_year_val':values,
'load_ajax_nonce':nonce_val,
'exclude_events':excludeEventsJson,
'settings':settings,
};}
jQuery.post(ajaxUrl, data, function(response){
var rs=JSON.parse(response);
if(rs.events=="yes"){
setTimeout(function(){
var content=rs.content;
if(settings.template==='masonry-view'){
var elements=[];
$.each(content, function(key, val){
var html=$(val);
contentWrapper.append(html);
elements.push(html[0]);
});
contentWrapper.masonry('appended', elements);
}else{
$.each(content, function(key, val){
var html=$(val);
contentWrapper.append(html);
});
}
paged=parseInt(paged)+1;
if(rs.exclude_events){
var oldlist=JSON.parse(excludeEventsJson);
newExcludeList=oldlist.concat(JSON.parse(rs.exclude_events));
settingContainer.attr('data-exclude-events','['+newExcludeList+']');
}
custom_cat_colors();
thisEle.find('span').text(loadMore);
thisEle.find('.ect-preloader').hide();
},200);
}else{
thisEle.find('.ect-preloader').hide();
thisEle.find('span').text(noEvent);
setTimeout(function(){
thisEle.hide().find('span').text(loadMore);
settingContainer.find('#ect-cat-load-more').hide();
},1500);
}});
}
function ectAccordion(thisElement){
var parentEle=thisElement;
parentEle.on("click",'.ect-accordion-header',function (){
var accordionHeader=$(this);
if(accordionHeader.hasClass("active-event")){
accordionHeader.parent(".ect-accordion-event").find(".ect-accordion-footer").removeClass('show-event');
accordionHeader.removeClass('active-event');
accordionHeader.parent(".ect-accordion-event").removeClass('active-event');
return;
}
parentEle.find(".ect-accordion-footer").removeClass('show-event');
parentEle.find(".ect-accordion-header").removeClass('active-event');
parentEle.find(".ect-accordion-event").removeClass('active-event');
accordionHeader.parent(".ect-accordion-event").find(".ect-accordion-footer").addClass('show-event');
accordionHeader.addClass('active-event');
accordionHeader.parent(".ect-accordion-event").addClass('active-event');
var offset=accordionHeader.offset();
offset.top -=90;
$('html, body').stop().animate({
scrollTop: offset.top,
}, 1000);
});
}
function custom_cat_colors(){
$("body").find(".ect-list-post,.ect-timeline-post,.ect-slider-event,.ect-carousel-event,.ect-grid-event,.ect-accordion-event").each(function(){
var thisElement=jQuery(this);
var bgcolor=thisElement.data("cat-bgcolor");
var txtcolor=thisElement.data("cat-txtcolor");
if(bgcolor!=null){
thisElement.find(".ect-event-category ul.tribe_events_cat li a").css({
"color": "#" + txtcolor,
"background": convertHex("#" + bgcolor, 0.9),
"border-color":"#" + bgcolor
});
}});
}
function convertHex(hex, opacity){
hex=hex.replace('#', '');
r=parseInt(hex.substring(0, 2), 16);
g=parseInt(hex.substring(2, 4), 16);
b=parseInt(hex.substring(4, 6), 16);
result='rgba(' + r + ',' + g + ',' + b + ',' + opacity + ')';
return result;
}
})(jQuery);
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global="undefined"!=typeof globalThis?globalThis:global||self).flatpickr=factory()}(this,(function(){"use strict";
var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)};function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r}var HOOKS=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],defaults={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(err){return"undefined"!=typeof console&&console.warn(err)},getWeek:function(givenDate){var date=new Date(givenDate.getTime());date.setHours(0,0,0,0),date.setDate(date.getDate()+3-(date.getDay()+6)%7);var week1=new Date(date.getFullYear(),0,4);return 1+Math.round(((date.getTime()-week1.getTime())/864e5-3+(week1.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},english={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(nth){var s=nth%100;if(s>3&&s<21)return"th";switch(s%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},pad=function(number,length){return void 0===length&&(length=2),("000"+number).slice(-1*length)},int=function(bool){return!0===bool?1:0};function debounce(fn,wait){var t;return function(){var _this=this,args=arguments;clearTimeout(t),t=setTimeout((function(){return fn.apply(_this,args)}),wait)}}var arrayify=function(obj){return obj instanceof Array?obj:[obj]};function toggleClass(elem,className,bool){if(!0===bool)return elem.classList.add(className);elem.classList.remove(className)}function createElement(tag,className,content){var e=window.document.createElement(tag);return className=className||"",content=content||"",e.className=className,void 0!==content&&(e.textContent=content),e}function clearNode(node){for(;node.firstChild;)node.removeChild(node.firstChild)}function findParent(node,condition){return condition(node)?node:node.parentNode?findParent(node.parentNode,condition):void 0}function createNumberInput(inputClassName,opts){var wrapper=createElement("div","numInputWrapper"),numInput=createElement("input","numInput "+inputClassName),arrowUp=createElement("span","arrowUp"),arrowDown=createElement("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?numInput.type="number":(numInput.type="text",numInput.pattern="\\d*"),void 0!==opts)for(var key in opts)numInput.setAttribute(key,opts[key]);return wrapper.appendChild(numInput),wrapper.appendChild(arrowUp),wrapper.appendChild(arrowDown),wrapper}function getEventTarget(event){try{var path;return"function"==typeof event.composedPath?event.composedPath()[0]:event.target}catch(error){return event.target}}var doNothing=function(){},monthToStr=function(monthNumber,shorthand,locale){return locale.months[shorthand?"shorthand":"longhand"][monthNumber]},revFormat={D:doNothing,F:function(dateObj,monthName,locale){dateObj.setMonth(locale.months.longhand.indexOf(monthName))},G:function(dateObj,hour){dateObj.setHours((dateObj.getHours()>=12?12:0)+parseFloat(hour))},H:function(dateObj,hour){dateObj.setHours(parseFloat(hour))},J:function(dateObj,day){dateObj.setDate(parseFloat(day))},K:function(dateObj,amPM,locale){dateObj.setHours(dateObj.getHours()%12+12*int(new RegExp(locale.amPM[1],"i").test(amPM)))},M:function(dateObj,shortMonth,locale){dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth))},S:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds))},U:function(_,unixSeconds){return new Date(1e3*parseFloat(unixSeconds))},W:function(dateObj,weekNum,locale){var weekNumber=parseInt(weekNum),date=new Date(dateObj.getFullYear(),0,2+7*(weekNumber-1),0,0,0,0);return date.setDate(date.getDate()-date.getDay()+locale.firstDayOfWeek),date},Y:function(dateObj,year){dateObj.setFullYear(parseFloat(year))},Z:function(_,ISODate){return new Date(ISODate)},d:function(dateObj,day){dateObj.setDate(parseFloat(day))},h:function(dateObj,hour){dateObj.setHours((dateObj.getHours()>=12?12:0)+parseFloat(hour))},i:function(dateObj,minutes){dateObj.setMinutes(parseFloat(minutes))},j:function(dateObj,day){dateObj.setDate(parseFloat(day))},l:doNothing,m:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1)},n:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1)},s:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds))},u:function(_,unixMillSeconds){return new Date(parseFloat(unixMillSeconds))},w:doNothing,y:function(dateObj,year){dateObj.setFullYear(2e3+parseFloat(year))}},tokenRegex={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},formats={Z:function(date){return date.toISOString()},D:function(date,locale,options){return locale.weekdays.shorthand[formats.w(date,locale,options)]},F:function(date,locale,options){return monthToStr(formats.n(date,locale,options)-1,!1,locale)},G:function(date,locale,options){return pad(formats.h(date,locale,options))},H:function(date){return pad(date.getHours())},J:function(date,locale){return void 0!==locale.ordinal?date.getDate()+locale.ordinal(date.getDate()):date.getDate()},K:function(date,locale){return locale.amPM[int(date.getHours()>11)]},M:function(date,locale){return monthToStr(date.getMonth(),!0,locale)},S:function(date){return pad(date.getSeconds())},U:function(date){return date.getTime()/1e3},W:function(date,_,options){return options.getWeek(date)},Y:function(date){return pad(date.getFullYear(),4)},d:function(date){return pad(date.getDate())},h:function(date){return date.getHours()%12?date.getHours()%12:12},i:function(date){return pad(date.getMinutes())},j:function(date){return date.getDate()},l:function(date,locale){return locale.weekdays.longhand[date.getDay()]},m:function(date){return pad(date.getMonth()+1)},n:function(date){return date.getMonth()+1},s:function(date){return date.getSeconds()},u:function(date){return date.getTime()},w:function(date){return date.getDay()},y:function(date){return String(date.getFullYear()).substring(2)}},createDateFormatter=function(_a){var _b=_a.config,config=void 0===_b?defaults:_b,_c=_a.l10n,l10n=void 0===_c?english:_c,_d=_a.isMobile,isMobile=void 0!==_d&&_d;return function(dateObj,frmt,overrideLocale){var locale=overrideLocale||l10n;return void 0===config.formatDate||isMobile?frmt.split("").map((function(c,i,arr){return formats[c]&&"\\"!==arr[i-1]?formats[c](dateObj,locale,config):"\\"!==c?c:""})).join(""):config.formatDate(dateObj,frmt,locale)}},createDateParser=function(_a){var _b=_a.config,config=void 0===_b?defaults:_b,_c=_a.l10n,l10n=void 0===_c?english:_c;return function(date,givenFormat,timeless,customLocale){if(0===date||date){var locale=customLocale||l10n,parsedDate,dateOrig=date;if(date instanceof Date)parsedDate=new Date(date.getTime());else if("string"!=typeof date&&void 0!==date.toFixed)parsedDate=new Date(date);else if("string"==typeof date){var format=givenFormat||(config||defaults).dateFormat,datestr=String(date).trim();if("today"===datestr)parsedDate=new Date,timeless=!0;else if(config&&config.parseDate)parsedDate=config.parseDate(date,format);else if(/Z$/.test(datestr)||/GMT$/.test(datestr))parsedDate=new Date(date);else{for(var matched=void 0,ops=[],i=0,matchIndex=0,regexStr="";i<format.length;i++){var token_1=format[i],isBackSlash="\\"===token_1,escaped="\\"===format[i-1]||isBackSlash;if(tokenRegex[token_1]&&!escaped){regexStr+=tokenRegex[token_1];var match=new RegExp(regexStr).exec(date);match&&(matched=!0)&&ops["Y"!==token_1?"push":"unshift"]({fn:revFormat[token_1],val:match[++matchIndex]})}else isBackSlash||(regexStr+=".")}parsedDate=config&&config.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),ops.forEach((function(_a){var fn=_a.fn,val=_a.val;return parsedDate=fn(parsedDate,val,locale)||parsedDate})),parsedDate=matched?parsedDate:void 0}}if(parsedDate instanceof Date&&!isNaN(parsedDate.getTime()))return!0===timeless&&parsedDate.setHours(0,0,0,0),parsedDate;config.errorHandler(new Error("Invalid date provided: "+dateOrig))}}};function compareDates(date1,date2,timeless){return void 0===timeless&&(timeless=!0),!1!==timeless?new Date(date1.getTime()).setHours(0,0,0,0)-new Date(date2.getTime()).setHours(0,0,0,0):date1.getTime()-date2.getTime()}var isBetween=function(ts,ts1,ts2){return ts>Math.min(ts1,ts2)&&ts<Math.max(ts1,ts2)},calculateSecondsSinceMidnight=function(hours,minutes,seconds){return 3600*hours+60*minutes+seconds},parseSeconds=function(secondsSinceMidnight){var hours=Math.floor(secondsSinceMidnight/3600),minutes=(secondsSinceMidnight-3600*hours)/60;return[hours,minutes,secondsSinceMidnight-3600*hours-60*minutes]},duration_DAY=864e5;function getDefaultHours(config){var hours=config.defaultHour,minutes=config.defaultMinute,seconds=config.defaultSeconds;if(void 0!==config.minDate){var minHour=config.minDate.getHours(),minMinutes=config.minDate.getMinutes(),minSeconds=config.minDate.getSeconds();hours<minHour&&(hours=minHour),hours===minHour&&minutes<minMinutes&&(minutes=minMinutes),hours===minHour&&minutes===minMinutes&&seconds<minSeconds&&(seconds=config.minDate.getSeconds())}if(void 0!==config.maxDate){var maxHr=config.maxDate.getHours(),maxMinutes=config.maxDate.getMinutes();(hours=Math.min(hours,maxHr))===maxHr&&(minutes=Math.min(maxMinutes,minutes)),hours===maxHr&&minutes===maxMinutes&&(seconds=config.maxDate.getSeconds())}return{hours:hours,minutes:minutes,seconds:seconds}}"function"!=typeof Object.assign&&(Object.assign=function(target){for(var args=[],_i=1;_i<arguments.length;_i++)args[_i-1]=arguments[_i];if(!target)throw TypeError("Cannot convert undefined or null to object");for(var _loop_1=function(source){source&&Object.keys(source).forEach((function(key){return target[key]=source[key]}))},_a=0,args_1=args;_a<args_1.length;_a++){var source=args_1[_a];_loop_1(source)}return target});var DEBOUNCED_CHANGE_MS=300;function FlatpickrInstance(element,instanceConfig){var self={config:__assign(__assign({},defaults),flatpickr.defaultConfig),l10n:english};function setupHelperFunctions(){self.utils={getDaysInMonth:function(month,yr){return void 0===month&&(month=self.currentMonth),void 0===yr&&(yr=self.currentYear),1===month&&(yr%4==0&&yr%100!=0||yr%400==0)?29:self.l10n.daysInMonth[month]}}}function init(){self.element=self.input=element,self.isOpen=!1,parseConfig(),setupLocale(),setupInputs(),setupDates(),setupHelperFunctions(),self.isMobile||build(),bindEvents(),(self.selectedDates.length||self.config.noCalendar)&&(self.config.enableTime&&setHoursFromDate(self.config.noCalendar?self.latestSelectedDateObj:void 0),updateValue(!1)),setCalendarWidth();var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!self.isMobile&&isSafari&&positionCalendar(),triggerEvent("onReady")}function getClosestActiveElement(){var _a;return(null===(_a=self.calendarContainer)||void 0===_a?void 0:_a.getRootNode()).activeElement||document.activeElement}function bindToInstance(fn){return fn.bind(self)}function setCalendarWidth(){var config=self.config;!1===config.weekNumbers&&1===config.showMonths||!0!==config.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==self.calendarContainer&&(self.calendarContainer.style.visibility="hidden",self.calendarContainer.style.display="block"),void 0!==self.daysContainer){var daysWidth=(self.days.offsetWidth+1)*config.showMonths;self.daysContainer.style.width=daysWidth+"px",self.calendarContainer.style.width=daysWidth+(void 0!==self.weekWrapper?self.weekWrapper.offsetWidth:0)+"px",self.calendarContainer.style.removeProperty("visibility"),self.calendarContainer.style.removeProperty("display")}}))}function updateTime(e){if(0===self.selectedDates.length){var defaultDate=void 0===self.config.minDate||compareDates(new Date,self.config.minDate)>=0?new Date:new Date(self.config.minDate.getTime()),defaults=getDefaultHours(self.config);defaultDate.setHours(defaults.hours,defaults.minutes,defaults.seconds,defaultDate.getMilliseconds()),self.selectedDates=[defaultDate],self.latestSelectedDateObj=defaultDate}void 0!==e&&"blur"!==e.type&&timeWrapper(e);var prevValue=self._input.value;setHoursFromInputs(),updateValue(),self._input.value!==prevValue&&self._debouncedChange()}function ampm2military(hour,amPM){return hour%12+12*int(amPM===self.l10n.amPM[1])}function military2ampm(hour){switch(hour%24){case 0:case 12:return 12;default:return hour%12}}function setHoursFromInputs(){if(void 0!==self.hourElement&&void 0!==self.minuteElement){var hours=(parseInt(self.hourElement.value.slice(-2),10)||0)%24,minutes=(parseInt(self.minuteElement.value,10)||0)%60,seconds=void 0!==self.secondElement?(parseInt(self.secondElement.value,10)||0)%60:0;void 0!==self.amPM&&(hours=ampm2military(hours,self.amPM.textContent));var limitMinHours=void 0!==self.config.minTime||self.config.minDate&&self.minDateHasTime&&self.latestSelectedDateObj&&0===compareDates(self.latestSelectedDateObj,self.config.minDate,!0),limitMaxHours=void 0!==self.config.maxTime||self.config.maxDate&&self.maxDateHasTime&&self.latestSelectedDateObj&&0===compareDates(self.latestSelectedDateObj,self.config.maxDate,!0);if(void 0!==self.config.maxTime&&void 0!==self.config.minTime&&self.config.minTime>self.config.maxTime){var minBound=calculateSecondsSinceMidnight(self.config.minTime.getHours(),self.config.minTime.getMinutes(),self.config.minTime.getSeconds()),maxBound=calculateSecondsSinceMidnight(self.config.maxTime.getHours(),self.config.maxTime.getMinutes(),self.config.maxTime.getSeconds()),currentTime=calculateSecondsSinceMidnight(hours,minutes,seconds);if(currentTime>maxBound&&currentTime<minBound){var result=parseSeconds(minBound);hours=result[0],minutes=result[1],seconds=result[2]}}else{if(limitMaxHours){var maxTime=void 0!==self.config.maxTime?self.config.maxTime:self.config.maxDate;(hours=Math.min(hours,maxTime.getHours()))===maxTime.getHours()&&(minutes=Math.min(minutes,maxTime.getMinutes())),minutes===maxTime.getMinutes()&&(seconds=Math.min(seconds,maxTime.getSeconds()))}if(limitMinHours){var minTime=void 0!==self.config.minTime?self.config.minTime:self.config.minDate;(hours=Math.max(hours,minTime.getHours()))===minTime.getHours()&&minutes<minTime.getMinutes()&&(minutes=minTime.getMinutes()),minutes===minTime.getMinutes()&&(seconds=Math.max(seconds,minTime.getSeconds()))}}setHours(hours,minutes,seconds)}}function setHoursFromDate(dateObj){var date=dateObj||self.latestSelectedDateObj;date&&date instanceof Date&&setHours(date.getHours(),date.getMinutes(),date.getSeconds())}function setHours(hours,minutes,seconds){void 0!==self.latestSelectedDateObj&&self.latestSelectedDateObj.setHours(hours%24,minutes,seconds||0,0),self.hourElement&&self.minuteElement&&!self.isMobile&&(self.hourElement.value=pad(self.config.time_24hr?hours:(12+hours)%12+12*int(hours%12==0)),self.minuteElement.value=pad(minutes),void 0!==self.amPM&&(self.amPM.textContent=self.l10n.amPM[int(hours>=12)]),void 0!==self.secondElement&&(self.secondElement.value=pad(seconds)))}function onYearInput(event){var eventTarget=getEventTarget(event),year=parseInt(eventTarget.value)+(event.delta||0);(year/1e3>1||"Enter"===event.key&&!/[^\d]/.test(year.toString()))&&changeYear(year)}function bind(element,event,handler,options){return event instanceof Array?event.forEach((function(ev){return bind(element,ev,handler,options)})):element instanceof Array?element.forEach((function(el){return bind(el,event,handler,options)})):(element.addEventListener(event,handler,options),void self._handlers.push({remove:function(){return element.removeEventListener(event,handler,options)}}))}function triggerChange(){triggerEvent("onChange")}function bindEvents(){if(self.config.wrap&&["open","close","toggle","clear"].forEach((function(evt){Array.prototype.forEach.call(self.element.querySelectorAll("[data-"+evt+"]"),(function(el){return bind(el,"click",self[evt])}))})),self.isMobile)setupMobile();else{var debouncedResize=debounce(onResize,50);if(self._debouncedChange=debounce(triggerChange,300),self.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&bind(self.daysContainer,"mouseover",(function(e){"range"===self.config.mode&&onMouseOver(getEventTarget(e))})),bind(self._input,"keydown",onKeyDown),void 0!==self.calendarContainer&&bind(self.calendarContainer,"keydown",onKeyDown),self.config.inline||self.config.static||bind(window,"resize",debouncedResize),void 0!==window.ontouchstart?bind(window.document,"touchstart",documentClick):bind(window.document,"mousedown",documentClick),bind(window.document,"focus",documentClick,{capture:!0}),!0===self.config.clickOpens&&(bind(self._input,"focus",self.open),bind(self._input,"click",self.open)),void 0!==self.daysContainer&&(bind(self.monthNav,"click",onMonthNavClick),bind(self.monthNav,["keyup","increment"],onYearInput),bind(self.daysContainer,"click",selectDate)),void 0!==self.timeContainer&&void 0!==self.minuteElement&&void 0!==self.hourElement){var selText=function(e){return getEventTarget(e).select()};bind(self.timeContainer,["increment"],updateTime),bind(self.timeContainer,"blur",updateTime,{capture:!0}),bind(self.timeContainer,"click",timeIncrement),bind([self.hourElement,self.minuteElement],["focus","click"],selText),void 0!==self.secondElement&&bind(self.secondElement,"focus",(function(){return self.secondElement&&self.secondElement.select()})),void 0!==self.amPM&&bind(self.amPM,"click",(function(e){updateTime(e)}))}self.config.allowInput&&bind(self._input,"blur",onBlur)}}function jumpToDate(jumpDate,triggerChange){var jumpTo=void 0!==jumpDate?self.parseDate(jumpDate):self.latestSelectedDateObj||(self.config.minDate&&self.config.minDate>self.now?self.config.minDate:self.config.maxDate&&self.config.maxDate<self.now?self.config.maxDate:self.now),oldYear=self.currentYear,oldMonth=self.currentMonth;try{void 0!==jumpTo&&(self.currentYear=jumpTo.getFullYear(),self.currentMonth=jumpTo.getMonth())}catch(e){e.message="Invalid date supplied: "+jumpTo,self.config.errorHandler(e)}triggerChange&&self.currentYear!==oldYear&&(triggerEvent("onYearChange"),buildMonthSwitch()),!triggerChange||self.currentYear===oldYear&&self.currentMonth===oldMonth||triggerEvent("onMonthChange"),self.redraw()}function timeIncrement(e){var eventTarget=getEventTarget(e);~eventTarget.className.indexOf("arrow")&&incrementNumInput(e,eventTarget.classList.contains("arrowUp")?1:-1)}function incrementNumInput(e,delta,inputElem){var target=e&&getEventTarget(e),input=inputElem||target&&target.parentNode&&target.parentNode.firstChild,event=createEvent("increment");event.delta=delta,input&&input.dispatchEvent(event)}function build(){var fragment=window.document.createDocumentFragment();if(self.calendarContainer=createElement("div","flatpickr-calendar"),self.calendarContainer.tabIndex=-1,!self.config.noCalendar){if(fragment.appendChild(buildMonthNav()),self.innerContainer=createElement("div","flatpickr-innerContainer"),self.config.weekNumbers){var _a=buildWeeks(),weekWrapper=_a.weekWrapper,weekNumbers=_a.weekNumbers;self.innerContainer.appendChild(weekWrapper),self.weekNumbers=weekNumbers,self.weekWrapper=weekWrapper}self.rContainer=createElement("div","flatpickr-rContainer"),self.rContainer.appendChild(buildWeekdays()),self.daysContainer||(self.daysContainer=createElement("div","flatpickr-days"),self.daysContainer.tabIndex=-1),buildDays(),self.rContainer.appendChild(self.daysContainer),self.innerContainer.appendChild(self.rContainer),fragment.appendChild(self.innerContainer)}self.config.enableTime&&fragment.appendChild(buildTime()),toggleClass(self.calendarContainer,"rangeMode","range"===self.config.mode),toggleClass(self.calendarContainer,"animate",!0===self.config.animate),toggleClass(self.calendarContainer,"multiMonth",self.config.showMonths>1),self.calendarContainer.appendChild(fragment);var customAppend=void 0!==self.config.appendTo&&void 0!==self.config.appendTo.nodeType;if((self.config.inline||self.config.static)&&(self.calendarContainer.classList.add(self.config.inline?"inline":"static"),self.config.inline&&(!customAppend&&self.element.parentNode?self.element.parentNode.insertBefore(self.calendarContainer,self._input.nextSibling):void 0!==self.config.appendTo&&self.config.appendTo.appendChild(self.calendarContainer)),self.config.static)){var wrapper=createElement("div","flatpickr-wrapper");self.element.parentNode&&self.element.parentNode.insertBefore(wrapper,self.element),wrapper.appendChild(self.element),self.altInput&&wrapper.appendChild(self.altInput),wrapper.appendChild(self.calendarContainer)}self.config.static||self.config.inline||(void 0!==self.config.appendTo?self.config.appendTo:window.document.body).appendChild(self.calendarContainer)}function createDay(className,date,_dayNumber,i){var dateIsEnabled=isEnabled(date,!0),dayElement=createElement("span",className,date.getDate().toString());return dayElement.dateObj=date,dayElement.$i=i,dayElement.setAttribute("aria-label",self.formatDate(date,self.config.ariaDateFormat)),-1===className.indexOf("hidden")&&0===compareDates(date,self.now)&&(self.todayDateElem=dayElement,dayElement.classList.add("today"),dayElement.setAttribute("aria-current","date")),dateIsEnabled?(dayElement.tabIndex=-1,isDateSelected(date)&&(dayElement.classList.add("selected"),self.selectedDateElem=dayElement,"range"===self.config.mode&&(toggleClass(dayElement,"startRange",self.selectedDates[0]&&0===compareDates(date,self.selectedDates[0],!0)),toggleClass(dayElement,"endRange",self.selectedDates[1]&&0===compareDates(date,self.selectedDates[1],!0)),"nextMonthDay"===className&&dayElement.classList.add("inRange")))):dayElement.classList.add("flatpickr-disabled"),"range"===self.config.mode&&isDateInRange(date)&&!isDateSelected(date)&&dayElement.classList.add("inRange"),self.weekNumbers&&1===self.config.showMonths&&"prevMonthDay"!==className&&i%7==6&&self.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+self.config.getWeek(date)+"</span>"),triggerEvent("onDayCreate",dayElement),dayElement}function focusOnDayElem(targetNode){targetNode.focus(),"range"===self.config.mode&&onMouseOver(targetNode)}function getFirstAvailableDay(delta){for(var startMonth=delta>0?0:self.config.showMonths-1,endMonth=delta>0?self.config.showMonths:-1,m=startMonth;m!=endMonth;m+=delta)for(var month=self.daysContainer.children[m],startIndex=delta>0?0:month.children.length-1,endIndex=delta>0?month.children.length:-1,i=startIndex;i!=endIndex;i+=delta){var c=month.children[i];if(-1===c.className.indexOf("hidden")&&isEnabled(c.dateObj))return c}}function getNextAvailableDay(current,delta){for(var givenMonth=-1===current.className.indexOf("Month")?current.dateObj.getMonth():self.currentMonth,endMonth=delta>0?self.config.showMonths:-1,loopDelta=delta>0?1:-1,m=givenMonth-self.currentMonth;m!=endMonth;m+=loopDelta)for(var month=self.daysContainer.children[m],startIndex=givenMonth-self.currentMonth===m?current.$i+delta:delta<0?month.children.length-1:0,numMonthDays=month.children.length,i=startIndex;i>=0&&i<numMonthDays&&i!=(delta>0?numMonthDays:-1);i+=loopDelta){var c=month.children[i];if(-1===c.className.indexOf("hidden")&&isEnabled(c.dateObj)&&Math.abs(current.$i-i)>=Math.abs(delta))return focusOnDayElem(c)}self.changeMonth(loopDelta),focusOnDay(getFirstAvailableDay(loopDelta),0)}function focusOnDay(current,offset){var activeElement=getClosestActiveElement(),dayFocused=isInView(activeElement||document.body),startElem=void 0!==current?current:dayFocused?activeElement:void 0!==self.selectedDateElem&&isInView(self.selectedDateElem)?self.selectedDateElem:void 0!==self.todayDateElem&&isInView(self.todayDateElem)?self.todayDateElem:getFirstAvailableDay(offset>0?1:-1);void 0===startElem?self._input.focus():dayFocused?getNextAvailableDay(startElem,offset):focusOnDayElem(startElem)}function buildMonthDays(year,month){for(var firstOfMonth=(new Date(year,month,1).getDay()-self.l10n.firstDayOfWeek+7)%7,prevMonthDays=self.utils.getDaysInMonth((month-1+12)%12,year),daysInMonth=self.utils.getDaysInMonth(month,year),days=window.document.createDocumentFragment(),isMultiMonth=self.config.showMonths>1,prevMonthDayClass=isMultiMonth?"prevMonthDay hidden":"prevMonthDay",nextMonthDayClass=isMultiMonth?"nextMonthDay hidden":"nextMonthDay",dayNumber=prevMonthDays+1-firstOfMonth,dayIndex=0;dayNumber<=prevMonthDays;dayNumber++,dayIndex++)days.appendChild(createDay("flatpickr-day "+prevMonthDayClass,new Date(year,month-1,dayNumber),dayNumber,dayIndex));for(dayNumber=1;dayNumber<=daysInMonth;dayNumber++,dayIndex++)days.appendChild(createDay("flatpickr-day",new Date(year,month,dayNumber),dayNumber,dayIndex));for(var dayNum=daysInMonth+1;dayNum<=42-firstOfMonth&&(1===self.config.showMonths||dayIndex%7!=0);dayNum++,dayIndex++)days.appendChild(createDay("flatpickr-day "+nextMonthDayClass,new Date(year,month+1,dayNum%daysInMonth),dayNum,dayIndex));var dayContainer=createElement("div","dayContainer");return dayContainer.appendChild(days),dayContainer}function buildDays(){if(void 0!==self.daysContainer){clearNode(self.daysContainer),self.weekNumbers&&clearNode(self.weekNumbers);for(var frag=document.createDocumentFragment(),i=0;i<self.config.showMonths;i++){var d=new Date(self.currentYear,self.currentMonth,1);d.setMonth(self.currentMonth+i),frag.appendChild(buildMonthDays(d.getFullYear(),d.getMonth()))}self.daysContainer.appendChild(frag),self.days=self.daysContainer.firstChild,"range"===self.config.mode&&1===self.selectedDates.length&&onMouseOver()}}function buildMonthSwitch(){if(!(self.config.showMonths>1||"dropdown"!==self.config.monthSelectorType)){var shouldBuildMonth=function(month){return!(void 0!==self.config.minDate&&self.currentYear===self.config.minDate.getFullYear()&&month<self.config.minDate.getMonth())&&!(void 0!==self.config.maxDate&&self.currentYear===self.config.maxDate.getFullYear()&&month>self.config.maxDate.getMonth())};self.monthsDropdownContainer.tabIndex=-1,self.monthsDropdownContainer.innerHTML="";for(var i=0;i<12;i++)if(shouldBuildMonth(i)){var month=createElement("option","flatpickr-monthDropdown-month");month.value=new Date(self.currentYear,i).getMonth().toString(),month.textContent=monthToStr(i,self.config.shorthandCurrentMonth,self.l10n),month.tabIndex=-1,self.currentMonth===i&&(month.selected=!0),self.monthsDropdownContainer.appendChild(month)}}}function buildMonth(){var container=createElement("div","flatpickr-month"),monthNavFragment=window.document.createDocumentFragment(),monthElement;self.config.showMonths>1||"static"===self.config.monthSelectorType?monthElement=createElement("span","cur-month"):(self.monthsDropdownContainer=createElement("select","flatpickr-monthDropdown-months"),self.monthsDropdownContainer.setAttribute("aria-label",self.l10n.monthAriaLabel),bind(self.monthsDropdownContainer,"change",(function(e){var target=getEventTarget(e),selectedMonth=parseInt(target.value,10);self.changeMonth(selectedMonth-self.currentMonth),triggerEvent("onMonthChange")})),buildMonthSwitch(),monthElement=self.monthsDropdownContainer);var yearInput=createNumberInput("cur-year",{tabindex:"-1"}),yearElement=yearInput.getElementsByTagName("input")[0];yearElement.setAttribute("aria-label",self.l10n.yearAriaLabel),self.config.minDate&&yearElement.setAttribute("min",self.config.minDate.getFullYear().toString()),self.config.maxDate&&(yearElement.setAttribute("max",self.config.maxDate.getFullYear().toString()),yearElement.disabled=!!self.config.minDate&&self.config.minDate.getFullYear()===self.config.maxDate.getFullYear());var currentMonth=createElement("div","flatpickr-current-month");return currentMonth.appendChild(monthElement),currentMonth.appendChild(yearInput),monthNavFragment.appendChild(currentMonth),container.appendChild(monthNavFragment),{container:container,yearElement:yearElement,monthElement:monthElement}}function buildMonths(){clearNode(self.monthNav),self.monthNav.appendChild(self.prevMonthNav),self.config.showMonths&&(self.yearElements=[],self.monthElements=[]);for(var m=self.config.showMonths;m--;){var month=buildMonth();self.yearElements.push(month.yearElement),self.monthElements.push(month.monthElement),self.monthNav.appendChild(month.container)}self.monthNav.appendChild(self.nextMonthNav)}function buildMonthNav(){return self.monthNav=createElement("div","flatpickr-months"),self.yearElements=[],self.monthElements=[],self.prevMonthNav=createElement("span","flatpickr-prev-month"),self.prevMonthNav.innerHTML=self.config.prevArrow,self.nextMonthNav=createElement("span","flatpickr-next-month"),self.nextMonthNav.innerHTML=self.config.nextArrow,buildMonths(),Object.defineProperty(self,"_hidePrevMonthArrow",{get:function(){return self.__hidePrevMonthArrow},set:function(bool){self.__hidePrevMonthArrow!==bool&&(toggleClass(self.prevMonthNav,"flatpickr-disabled",bool),self.__hidePrevMonthArrow=bool)}}),Object.defineProperty(self,"_hideNextMonthArrow",{get:function(){return self.__hideNextMonthArrow},set:function(bool){self.__hideNextMonthArrow!==bool&&(toggleClass(self.nextMonthNav,"flatpickr-disabled",bool),self.__hideNextMonthArrow=bool)}}),self.currentYearElement=self.yearElements[0],updateNavigationCurrentMonth(),self.monthNav}function buildTime(){self.calendarContainer.classList.add("hasTime"),self.config.noCalendar&&self.calendarContainer.classList.add("noCalendar");var defaults=getDefaultHours(self.config);self.timeContainer=createElement("div","flatpickr-time"),self.timeContainer.tabIndex=-1;var separator=createElement("span","flatpickr-time-separator",":"),hourInput=createNumberInput("flatpickr-hour",{"aria-label":self.l10n.hourAriaLabel});self.hourElement=hourInput.getElementsByTagName("input")[0];var minuteInput=createNumberInput("flatpickr-minute",{"aria-label":self.l10n.minuteAriaLabel});if(self.minuteElement=minuteInput.getElementsByTagName("input")[0],self.hourElement.tabIndex=self.minuteElement.tabIndex=-1,self.hourElement.value=pad(self.latestSelectedDateObj?self.latestSelectedDateObj.getHours():self.config.time_24hr?defaults.hours:military2ampm(defaults.hours)),self.minuteElement.value=pad(self.latestSelectedDateObj?self.latestSelectedDateObj.getMinutes():defaults.minutes),self.hourElement.setAttribute("step",self.config.hourIncrement.toString()),self.minuteElement.setAttribute("step",self.config.minuteIncrement.toString()),self.hourElement.setAttribute("min",self.config.time_24hr?"0":"1"),self.hourElement.setAttribute("max",self.config.time_24hr?"23":"12"),self.hourElement.setAttribute("maxlength","2"),self.minuteElement.setAttribute("min","0"),self.minuteElement.setAttribute("max","59"),self.minuteElement.setAttribute("maxlength","2"),self.timeContainer.appendChild(hourInput),self.timeContainer.appendChild(separator),self.timeContainer.appendChild(minuteInput),self.config.time_24hr&&self.timeContainer.classList.add("time24hr"),self.config.enableSeconds){self.timeContainer.classList.add("hasSeconds");var secondInput=createNumberInput("flatpickr-second");self.secondElement=secondInput.getElementsByTagName("input")[0],self.secondElement.value=pad(self.latestSelectedDateObj?self.latestSelectedDateObj.getSeconds():defaults.seconds),self.secondElement.setAttribute("step",self.minuteElement.getAttribute("step")),self.secondElement.setAttribute("min","0"),self.secondElement.setAttribute("max","59"),self.secondElement.setAttribute("maxlength","2"),self.timeContainer.appendChild(createElement("span","flatpickr-time-separator",":")),self.timeContainer.appendChild(secondInput)}return self.config.time_24hr||(self.amPM=createElement("span","flatpickr-am-pm",self.l10n.amPM[int((self.latestSelectedDateObj?self.hourElement.value:self.config.defaultHour)>11)]),self.amPM.title=self.l10n.toggleTitle,self.amPM.tabIndex=-1,self.timeContainer.appendChild(self.amPM)),self.timeContainer}function buildWeekdays(){self.weekdayContainer?clearNode(self.weekdayContainer):self.weekdayContainer=createElement("div","flatpickr-weekdays");for(var i=self.config.showMonths;i--;){var container=createElement("div","flatpickr-weekdaycontainer");self.weekdayContainer.appendChild(container)}return updateWeekdays(),self.weekdayContainer}function updateWeekdays(){if(self.weekdayContainer){var firstDayOfWeek=self.l10n.firstDayOfWeek,weekdays=__spreadArrays(self.l10n.weekdays.shorthand);firstDayOfWeek>0&&firstDayOfWeek<weekdays.length&&(weekdays=__spreadArrays(weekdays.splice(firstDayOfWeek,weekdays.length),weekdays.splice(0,firstDayOfWeek)));for(var i=self.config.showMonths;i--;)self.weekdayContainer.children[i].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+weekdays.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function buildWeeks(){self.calendarContainer.classList.add("hasWeeks");var weekWrapper=createElement("div","flatpickr-weekwrapper");weekWrapper.appendChild(createElement("span","flatpickr-weekday",self.l10n.weekAbbreviation));var weekNumbers=createElement("div","flatpickr-weeks");return weekWrapper.appendChild(weekNumbers),{weekWrapper:weekWrapper,weekNumbers:weekNumbers}}function changeMonth(value,isOffset){void 0===isOffset&&(isOffset=!0);var delta=isOffset?value:value-self.currentMonth;delta<0&&!0===self._hidePrevMonthArrow||delta>0&&!0===self._hideNextMonthArrow||(self.currentMonth+=delta,(self.currentMonth<0||self.currentMonth>11)&&(self.currentYear+=self.currentMonth>11?1:-1,self.currentMonth=(self.currentMonth+12)%12,triggerEvent("onYearChange"),buildMonthSwitch()),buildDays(),triggerEvent("onMonthChange"),updateNavigationCurrentMonth())}function clear(triggerChangeEvent,toInitial){if(void 0===triggerChangeEvent&&(triggerChangeEvent=!0),void 0===toInitial&&(toInitial=!0),self.input.value="",void 0!==self.altInput&&(self.altInput.value=""),void 0!==self.mobileInput&&(self.mobileInput.value=""),self.selectedDates=[],self.latestSelectedDateObj=void 0,!0===toInitial&&(self.currentYear=self._initialDate.getFullYear(),self.currentMonth=self._initialDate.getMonth()),!0===self.config.enableTime){var _a=getDefaultHours(self.config),hours,minutes,seconds;setHours(_a.hours,_a.minutes,_a.seconds)}self.redraw(),triggerChangeEvent&&triggerEvent("onChange")}function close(){self.isOpen=!1,self.isMobile||(void 0!==self.calendarContainer&&self.calendarContainer.classList.remove("open"),void 0!==self._input&&self._input.classList.remove("active")),triggerEvent("onClose")}function destroy(){void 0!==self.config&&triggerEvent("onDestroy");for(var i=self._handlers.length;i--;)self._handlers[i].remove();if(self._handlers=[],self.mobileInput)self.mobileInput.parentNode&&self.mobileInput.parentNode.removeChild(self.mobileInput),self.mobileInput=void 0;else if(self.calendarContainer&&self.calendarContainer.parentNode)if(self.config.static&&self.calendarContainer.parentNode){var wrapper=self.calendarContainer.parentNode;if(wrapper.lastChild&&wrapper.removeChild(wrapper.lastChild),wrapper.parentNode){for(;wrapper.firstChild;)wrapper.parentNode.insertBefore(wrapper.firstChild,wrapper);wrapper.parentNode.removeChild(wrapper)}}else self.calendarContainer.parentNode.removeChild(self.calendarContainer);self.altInput&&(self.input.type="text",self.altInput.parentNode&&self.altInput.parentNode.removeChild(self.altInput),delete self.altInput),self.input&&(self.input.type=self.input._type,self.input.classList.remove("flatpickr-input"),self.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(k){try{delete self[k]}catch(_){}}))}function isCalendarElem(elem){return self.calendarContainer.contains(elem)}function documentClick(e){if(self.isOpen&&!self.config.inline){var eventTarget_1=getEventTarget(e),isCalendarElement=isCalendarElem(eventTarget_1),isInput,lostFocus=!(eventTarget_1===self.input||eventTarget_1===self.altInput||self.element.contains(eventTarget_1)||e.path&&e.path.indexOf&&(~e.path.indexOf(self.input)||~e.path.indexOf(self.altInput)))&&!isCalendarElement&&!isCalendarElem(e.relatedTarget),isIgnored=!self.config.ignoredFocusElements.some((function(elem){return elem.contains(eventTarget_1)}));lostFocus&&isIgnored&&(self.config.allowInput&&self.setDate(self._input.value,!1,self.config.altInput?self.config.altFormat:self.config.dateFormat),void 0!==self.timeContainer&&void 0!==self.minuteElement&&void 0!==self.hourElement&&""!==self.input.value&&void 0!==self.input.value&&updateTime(),self.close(),self.config&&"range"===self.config.mode&&1===self.selectedDates.length&&self.clear(!1))}}function changeYear(newYear){if(!(!newYear||self.config.minDate&&newYear<self.config.minDate.getFullYear()||self.config.maxDate&&newYear>self.config.maxDate.getFullYear())){var newYearNum=newYear,isNewYear=self.currentYear!==newYearNum;self.currentYear=newYearNum||self.currentYear,self.config.maxDate&&self.currentYear===self.config.maxDate.getFullYear()?self.currentMonth=Math.min(self.config.maxDate.getMonth(),self.currentMonth):self.config.minDate&&self.currentYear===self.config.minDate.getFullYear()&&(self.currentMonth=Math.max(self.config.minDate.getMonth(),self.currentMonth)),isNewYear&&(self.redraw(),triggerEvent("onYearChange"),buildMonthSwitch())}}function isEnabled(date,timeless){var _a;void 0===timeless&&(timeless=!0);var dateToCheck=self.parseDate(date,void 0,timeless);if(self.config.minDate&&dateToCheck&&compareDates(dateToCheck,self.config.minDate,void 0!==timeless?timeless:!self.minDateHasTime)<0||self.config.maxDate&&dateToCheck&&compareDates(dateToCheck,self.config.maxDate,void 0!==timeless?timeless:!self.maxDateHasTime)>0)return!1;if(!self.config.enable&&0===self.config.disable.length)return!0;if(void 0===dateToCheck)return!1;for(var bool=!!self.config.enable,array=null!==(_a=self.config.enable)&&void 0!==_a?_a:self.config.disable,i=0,d=void 0;i<array.length;i++){if("function"==typeof(d=array[i])&&d(dateToCheck))return bool;if(d instanceof Date&&void 0!==dateToCheck&&d.getTime()===dateToCheck.getTime())return bool;if("string"==typeof d){var parsed=self.parseDate(d,void 0,!0);return parsed&&parsed.getTime()===dateToCheck.getTime()?bool:!bool}if("object"==typeof d&&void 0!==dateToCheck&&d.from&&d.to&&dateToCheck.getTime()>=d.from.getTime()&&dateToCheck.getTime()<=d.to.getTime())return bool}return!bool}function isInView(elem){return void 0!==self.daysContainer&&(-1===elem.className.indexOf("hidden")&&-1===elem.className.indexOf("flatpickr-disabled")&&self.daysContainer.contains(elem))}function onBlur(e){var isInput=e.target===self._input,valueChanged=self._input.value.trimEnd()!==getDateStr();!isInput||!valueChanged||e.relatedTarget&&isCalendarElem(e.relatedTarget)||self.setDate(self._input.value,!0,e.target===self.altInput?self.config.altFormat:self.config.dateFormat)}function onKeyDown(e){var eventTarget=getEventTarget(e),isInput=self.config.wrap?element.contains(eventTarget):eventTarget===self._input,allowInput=self.config.allowInput,allowKeydown=self.isOpen&&(!allowInput||!isInput),allowInlineKeydown=self.config.inline&&isInput&&!allowInput;if(13===e.keyCode&&isInput){if(allowInput)return self.setDate(self._input.value,!0,eventTarget===self.altInput?self.config.altFormat:self.config.dateFormat),self.close(),eventTarget.blur();self.open()}else if(isCalendarElem(eventTarget)||allowKeydown||allowInlineKeydown){var isTimeObj=!!self.timeContainer&&self.timeContainer.contains(eventTarget);switch(e.keyCode){case 13:isTimeObj?(e.preventDefault(),updateTime(),focusAndClose()):selectDate(e);break;case 27:e.preventDefault(),focusAndClose();break;case 8:case 46:isInput&&!self.config.allowInput&&(e.preventDefault(),self.clear());break;case 37:case 39:if(isTimeObj||isInput)self.hourElement&&self.hourElement.focus();else{e.preventDefault();var activeElement=getClosestActiveElement();if(void 0!==self.daysContainer&&(!1===allowInput||activeElement&&isInView(activeElement))){var delta_1=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),changeMonth(delta_1),focusOnDay(getFirstAvailableDay(1),0)):focusOnDay(void 0,delta_1)}}break;case 38:case 40:e.preventDefault();var delta=40===e.keyCode?1:-1;self.daysContainer&&void 0!==eventTarget.$i||eventTarget===self.input||eventTarget===self.altInput?e.ctrlKey?(e.stopPropagation(),changeYear(self.currentYear-delta),focusOnDay(getFirstAvailableDay(1),0)):isTimeObj||focusOnDay(void 0,7*delta):eventTarget===self.currentYearElement?changeYear(self.currentYear-delta):self.config.enableTime&&(!isTimeObj&&self.hourElement&&self.hourElement.focus(),updateTime(e),self._debouncedChange());break;case 9:if(isTimeObj){var elems=[self.hourElement,self.minuteElement,self.secondElement,self.amPM].concat(self.pluginElements).filter((function(x){return x})),i=elems.indexOf(eventTarget);if(-1!==i){var target=elems[i+(e.shiftKey?-1:1)];e.preventDefault(),(target||self._input).focus()}}else!self.config.noCalendar&&self.daysContainer&&self.daysContainer.contains(eventTarget)&&e.shiftKey&&(e.preventDefault(),self._input.focus())}}if(void 0!==self.amPM&&eventTarget===self.amPM)switch(e.key){case self.l10n.amPM[0].charAt(0):case self.l10n.amPM[0].charAt(0).toLowerCase():self.amPM.textContent=self.l10n.amPM[0],setHoursFromInputs(),updateValue();break;case self.l10n.amPM[1].charAt(0):case self.l10n.amPM[1].charAt(0).toLowerCase():self.amPM.textContent=self.l10n.amPM[1],setHoursFromInputs(),updateValue()}(isInput||isCalendarElem(eventTarget))&&triggerEvent("onKeyDown",e)}function onMouseOver(elem,cellClass){if(void 0===cellClass&&(cellClass="flatpickr-day"),1===self.selectedDates.length&&(!elem||elem.classList.contains(cellClass)&&!elem.classList.contains("flatpickr-disabled"))){for(var hoverDate=elem?elem.dateObj.getTime():self.days.firstElementChild.dateObj.getTime(),initialDate=self.parseDate(self.selectedDates[0],void 0,!0).getTime(),rangeStartDate=Math.min(hoverDate,self.selectedDates[0].getTime()),rangeEndDate=Math.max(hoverDate,self.selectedDates[0].getTime()),containsDisabled=!1,minRange=0,maxRange=0,t=rangeStartDate;t<rangeEndDate;t+=duration_DAY)isEnabled(new Date(t),!0)||(containsDisabled=containsDisabled||t>rangeStartDate&&t<rangeEndDate,t<initialDate&&(!minRange||t>minRange)?minRange=t:t>initialDate&&(!maxRange||t<maxRange)&&(maxRange=t));var hoverableCells;Array.from(self.rContainer.querySelectorAll("*:nth-child(-n+"+self.config.showMonths+") > ."+cellClass)).forEach((function(dayElem){var date,timestamp=dayElem.dateObj.getTime(),outOfRange=minRange>0&&timestamp<minRange||maxRange>0&&timestamp>maxRange;if(outOfRange)return dayElem.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(c){dayElem.classList.remove(c)}));containsDisabled&&!outOfRange||(["startRange","inRange","endRange","notAllowed"].forEach((function(c){dayElem.classList.remove(c)})),void 0!==elem&&(elem.classList.add(hoverDate<=self.selectedDates[0].getTime()?"startRange":"endRange"),initialDate<hoverDate&&timestamp===initialDate?dayElem.classList.add("startRange"):initialDate>hoverDate&&timestamp===initialDate&&dayElem.classList.add("endRange"),timestamp>=minRange&&(0===maxRange||timestamp<=maxRange)&&isBetween(timestamp,initialDate,hoverDate)&&dayElem.classList.add("inRange")))}))}}function onResize(){!self.isOpen||self.config.static||self.config.inline||positionCalendar()}function open(e,positionElement){if(void 0===positionElement&&(positionElement=self._positionElement),!0===self.isMobile){if(e){e.preventDefault();var eventTarget=getEventTarget(e);eventTarget&&eventTarget.blur()}return void 0!==self.mobileInput&&(self.mobileInput.focus(),self.mobileInput.click()),void triggerEvent("onOpen")}if(!self._input.disabled&&!self.config.inline){var wasOpen=self.isOpen;self.isOpen=!0,wasOpen||(self.calendarContainer.classList.add("open"),self._input.classList.add("active"),triggerEvent("onOpen"),positionCalendar(positionElement)),!0===self.config.enableTime&&!0===self.config.noCalendar&&(!1!==self.config.allowInput||void 0!==e&&self.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return self.hourElement.select()}),50))}}function minMaxDateSetter(type){return function(date){var dateObj=self.config["_"+type+"Date"]=self.parseDate(date,self.config.dateFormat),inverseDateObj=self.config["_"+("min"===type?"max":"min")+"Date"];void 0!==dateObj&&(self["min"===type?"minDateHasTime":"maxDateHasTime"]=dateObj.getHours()>0||dateObj.getMinutes()>0||dateObj.getSeconds()>0),self.selectedDates&&(self.selectedDates=self.selectedDates.filter((function(d){return isEnabled(d)})),self.selectedDates.length||"min"!==type||setHoursFromDate(dateObj),updateValue()),self.daysContainer&&(redraw(),void 0!==dateObj?self.currentYearElement[type]=dateObj.getFullYear().toString():self.currentYearElement.removeAttribute(type),self.currentYearElement.disabled=!!inverseDateObj&&void 0!==dateObj&&inverseDateObj.getFullYear()===dateObj.getFullYear())}}function parseConfig(){var boolOpts=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],userConfig=__assign(__assign({},JSON.parse(JSON.stringify(element.dataset||{}))),instanceConfig),formats={};self.config.parseDate=userConfig.parseDate,self.config.formatDate=userConfig.formatDate,Object.defineProperty(self.config,"enable",{get:function(){return self.config._enable},set:function(dates){self.config._enable=parseDateRules(dates)}}),Object.defineProperty(self.config,"disable",{get:function(){return self.config._disable},set:function(dates){self.config._disable=parseDateRules(dates)}});var timeMode="time"===userConfig.mode;if(!userConfig.dateFormat&&(userConfig.enableTime||timeMode)){var defaultDateFormat=flatpickr.defaultConfig.dateFormat||defaults.dateFormat;formats.dateFormat=userConfig.noCalendar||timeMode?"H:i"+(userConfig.enableSeconds?":S":""):defaultDateFormat+" H:i"+(userConfig.enableSeconds?":S":"")}if(userConfig.altInput&&(userConfig.enableTime||timeMode)&&!userConfig.altFormat){var defaultAltFormat=flatpickr.defaultConfig.altFormat||defaults.altFormat;formats.altFormat=userConfig.noCalendar||timeMode?"h:i"+(userConfig.enableSeconds?":S K":" K"):defaultAltFormat+" h:i"+(userConfig.enableSeconds?":S":"")+" K"}Object.defineProperty(self.config,"minDate",{get:function(){return self.config._minDate},set:minMaxDateSetter("min")}),Object.defineProperty(self.config,"maxDate",{get:function(){return self.config._maxDate},set:minMaxDateSetter("max")});var minMaxTimeSetter=function(type){return function(val){self.config["min"===type?"_minTime":"_maxTime"]=self.parseDate(val,"H:i:S")}};Object.defineProperty(self.config,"minTime",{get:function(){return self.config._minTime},set:minMaxTimeSetter("min")}),Object.defineProperty(self.config,"maxTime",{get:function(){return self.config._maxTime},set:minMaxTimeSetter("max")}),"time"===userConfig.mode&&(self.config.noCalendar=!0,self.config.enableTime=!0),Object.assign(self.config,formats,userConfig);for(var i=0;i<boolOpts.length;i++)self.config[boolOpts[i]]=!0===self.config[boolOpts[i]]||"true"===self.config[boolOpts[i]];HOOKS.filter((function(hook){return void 0!==self.config[hook]})).forEach((function(hook){self.config[hook]=arrayify(self.config[hook]||[]).map(bindToInstance)})),self.isMobile=!self.config.disableMobile&&!self.config.inline&&"single"===self.config.mode&&!self.config.disable.length&&!self.config.enable&&!self.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var i=0;i<self.config.plugins.length;i++){var pluginConf=self.config.plugins[i](self)||{};for(var key in pluginConf)HOOKS.indexOf(key)>-1?self.config[key]=arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]):void 0===userConfig[key]&&(self.config[key]=pluginConf[key])}userConfig.altInputClass||(self.config.altInputClass=getInputElem().className+" "+self.config.altInputClass),triggerEvent("onParseConfig")}function getInputElem(){return self.config.wrap?element.querySelector("[data-input]"):element}function setupLocale(){var userConfig;"object"!=typeof self.config.locale&&void 0===flatpickr.l10ns[self.config.locale]&&self.config.errorHandler(new Error("flatpickr: invalid locale "+self.config.locale)),self.l10n=__assign(__assign({},flatpickr.l10ns.default),"object"==typeof self.config.locale?self.config.locale:"default"!==self.config.locale?flatpickr.l10ns[self.config.locale]:void 0),tokenRegex.D="("+self.l10n.weekdays.shorthand.join("|")+")",tokenRegex.l="("+self.l10n.weekdays.longhand.join("|")+")",tokenRegex.M="("+self.l10n.months.shorthand.join("|")+")",tokenRegex.F="("+self.l10n.months.longhand.join("|")+")",tokenRegex.K="("+self.l10n.amPM[0]+"|"+self.l10n.amPM[1]+"|"+self.l10n.amPM[0].toLowerCase()+"|"+self.l10n.amPM[1].toLowerCase()+")",void 0===__assign(__assign({},instanceConfig),JSON.parse(JSON.stringify(element.dataset||{}))).time_24hr&&void 0===flatpickr.defaultConfig.time_24hr&&(self.config.time_24hr=self.l10n.time_24hr),self.formatDate=createDateFormatter(self),self.parseDate=createDateParser({config:self.config,l10n:self.l10n})}function positionCalendar(customPositionElement){if("function"!=typeof self.config.position){if(void 0!==self.calendarContainer){triggerEvent("onPreCalendarPosition");var positionElement=customPositionElement||self._positionElement,calendarHeight=Array.prototype.reduce.call(self.calendarContainer.children,(function(acc,child){return acc+child.offsetHeight}),0),calendarWidth=self.calendarContainer.offsetWidth,configPos=self.config.position.split(" "),configPosVertical=configPos[0],configPosHorizontal=configPos.length>1?configPos[1]:null,inputBounds=positionElement.getBoundingClientRect(),distanceFromBottom=window.innerHeight-inputBounds.bottom,showOnTop="above"===configPosVertical||"below"!==configPosVertical&&distanceFromBottom<calendarHeight&&inputBounds.top>calendarHeight,top=window.pageYOffset+inputBounds.top+(showOnTop?-calendarHeight-2:positionElement.offsetHeight+2);if(toggleClass(self.calendarContainer,"arrowTop",!showOnTop),toggleClass(self.calendarContainer,"arrowBottom",showOnTop),!self.config.inline){var left=window.pageXOffset+inputBounds.left,isCenter=!1,isRight=!1;"center"===configPosHorizontal?(left-=(calendarWidth-inputBounds.width)/2,isCenter=!0):"right"===configPosHorizontal&&(left-=calendarWidth-inputBounds.width,isRight=!0),toggleClass(self.calendarContainer,"arrowLeft",!isCenter&&!isRight),toggleClass(self.calendarContainer,"arrowCenter",isCenter),toggleClass(self.calendarContainer,"arrowRight",isRight);var right=window.document.body.offsetWidth-(window.pageXOffset+inputBounds.right),rightMost=left+calendarWidth>window.document.body.offsetWidth,centerMost=right+calendarWidth>window.document.body.offsetWidth;if(toggleClass(self.calendarContainer,"rightMost",rightMost),!self.config.static)if(self.calendarContainer.style.top=top+"px",rightMost)if(centerMost){var doc=getDocumentStyleSheet();if(void 0===doc)return;var bodyWidth=window.document.body.offsetWidth,centerLeft=Math.max(0,bodyWidth/2-calendarWidth/2),centerBefore=".flatpickr-calendar.centerMost:before",centerAfter=".flatpickr-calendar.centerMost:after",centerIndex=doc.cssRules.length,centerStyle="{left:"+inputBounds.left+"px;right:auto;}";toggleClass(self.calendarContainer,"rightMost",!1),toggleClass(self.calendarContainer,"centerMost",!0),doc.insertRule(centerBefore+","+centerAfter+centerStyle,centerIndex),self.calendarContainer.style.left=centerLeft+"px",self.calendarContainer.style.right="auto"}else self.calendarContainer.style.left="auto",self.calendarContainer.style.right=right+"px";else self.calendarContainer.style.left=left+"px",self.calendarContainer.style.right="auto"}}}else self.config.position(self,customPositionElement)}function getDocumentStyleSheet(){for(var editableSheet=null,i=0;i<document.styleSheets.length;i++){var sheet=document.styleSheets[i];if(sheet.cssRules){try{sheet.cssRules}catch(err){continue}editableSheet=sheet;break}}return null!=editableSheet?editableSheet:createStyleSheet()}function createStyleSheet(){var style=document.createElement("style");return document.head.appendChild(style),style.sheet}function redraw(){self.config.noCalendar||self.isMobile||(buildMonthSwitch(),updateNavigationCurrentMonth(),buildDays())}function focusAndClose(){self._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(self.close,0):self.close()}function selectDate(e){e.preventDefault(),e.stopPropagation();var isSelectable=function(day){return day.classList&&day.classList.contains("flatpickr-day")&&!day.classList.contains("flatpickr-disabled")&&!day.classList.contains("notAllowed")},t=findParent(getEventTarget(e),isSelectable);if(void 0!==t){var target=t,selectedDate=self.latestSelectedDateObj=new Date(target.dateObj.getTime()),shouldChangeMonth=(selectedDate.getMonth()<self.currentMonth||selectedDate.getMonth()>self.currentMonth+self.config.showMonths-1)&&"range"!==self.config.mode;if(self.selectedDateElem=target,"single"===self.config.mode)self.selectedDates=[selectedDate];else if("multiple"===self.config.mode){var selectedIndex=isDateSelected(selectedDate);selectedIndex?self.selectedDates.splice(parseInt(selectedIndex),1):self.selectedDates.push(selectedDate)}else"range"===self.config.mode&&(2===self.selectedDates.length&&self.clear(!1,!1),self.latestSelectedDateObj=selectedDate,self.selectedDates.push(selectedDate),0!==compareDates(selectedDate,self.selectedDates[0],!0)&&self.selectedDates.sort((function(a,b){return a.getTime()-b.getTime()})));if(setHoursFromInputs(),shouldChangeMonth){var isNewYear=self.currentYear!==selectedDate.getFullYear();self.currentYear=selectedDate.getFullYear(),self.currentMonth=selectedDate.getMonth(),isNewYear&&(triggerEvent("onYearChange"),buildMonthSwitch()),triggerEvent("onMonthChange")}if(updateNavigationCurrentMonth(),buildDays(),updateValue(),shouldChangeMonth||"range"===self.config.mode||1!==self.config.showMonths?void 0!==self.selectedDateElem&&void 0===self.hourElement&&self.selectedDateElem&&self.selectedDateElem.focus():focusOnDayElem(target),void 0!==self.hourElement&&void 0!==self.hourElement&&self.hourElement.focus(),self.config.closeOnSelect){var single="single"===self.config.mode&&!self.config.enableTime,range="range"===self.config.mode&&2===self.selectedDates.length&&!self.config.enableTime;(single||range)&&focusAndClose()}triggerChange()}}self.parseDate=createDateParser({config:self.config,l10n:self.l10n}),self._handlers=[],self.pluginElements=[],self.loadedPlugins=[],self._bind=bind,self._setHoursFromDate=setHoursFromDate,self._positionCalendar=positionCalendar,self.changeMonth=changeMonth,self.changeYear=changeYear,self.clear=clear,self.close=close,self.onMouseOver=onMouseOver,self._createElement=createElement,self.createDay=createDay,self.destroy=destroy,self.isEnabled=isEnabled,self.jumpToDate=jumpToDate,self.updateValue=updateValue,self.open=open,self.redraw=redraw,self.set=set,self.setDate=setDate,self.toggle=toggle;var CALLBACKS={locale:[setupLocale,updateWeekdays],showMonths:[buildMonths,setCalendarWidth,buildWeekdays],minDate:[jumpToDate],maxDate:[jumpToDate],positionElement:[updatePositionElement],clickOpens:[function(){!0===self.config.clickOpens?(bind(self._input,"focus",self.open),bind(self._input,"click",self.open)):(self._input.removeEventListener("focus",self.open),self._input.removeEventListener("click",self.open))}]};function set(option,value){if(null!==option&&"object"==typeof option)for(var key in Object.assign(self.config,option),option)void 0!==CALLBACKS[key]&&CALLBACKS[key].forEach((function(x){return x()}));else self.config[option]=value,void 0!==CALLBACKS[option]?CALLBACKS[option].forEach((function(x){return x()})):HOOKS.indexOf(option)>-1&&(self.config[option]=arrayify(value));self.redraw(),updateValue(!0)}function setSelectedDate(inputDate,format){var dates=[];if(inputDate instanceof Array)dates=inputDate.map((function(d){return self.parseDate(d,format)}));else if(inputDate instanceof Date||"number"==typeof inputDate)dates=[self.parseDate(inputDate,format)];else if("string"==typeof inputDate)switch(self.config.mode){case"single":case"time":dates=[self.parseDate(inputDate,format)];break;case"multiple":dates=inputDate.split(self.config.conjunction).map((function(date){return self.parseDate(date,format)}));break;case"range":dates=inputDate.split(self.l10n.rangeSeparator).map((function(date){return self.parseDate(date,format)}))}else self.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(inputDate)));self.selectedDates=self.config.allowInvalidPreload?dates:dates.filter((function(d){return d instanceof Date&&isEnabled(d,!1)})),"range"===self.config.mode&&self.selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}function setDate(date,triggerChange,format){if(void 0===triggerChange&&(triggerChange=!1),void 0===format&&(format=self.config.dateFormat),0!==date&&!date||date instanceof Array&&0===date.length)return self.clear(triggerChange);setSelectedDate(date,format),self.latestSelectedDateObj=self.selectedDates[self.selectedDates.length-1],self.redraw(),jumpToDate(void 0,triggerChange),setHoursFromDate(),0===self.selectedDates.length&&self.clear(!1),updateValue(triggerChange),triggerChange&&triggerEvent("onChange")}function parseDateRules(arr){return arr.slice().map((function(rule){return"string"==typeof rule||"number"==typeof rule||rule instanceof Date?self.parseDate(rule,void 0,!0):rule&&"object"==typeof rule&&rule.from&&rule.to?{from:self.parseDate(rule.from,void 0),to:self.parseDate(rule.to,void 0)}:rule})).filter((function(x){return x}))}function setupDates(){self.selectedDates=[],self.now=self.parseDate(self.config.now)||new Date;var preloadedDate=self.config.defaultDate||("INPUT"!==self.input.nodeName&&"TEXTAREA"!==self.input.nodeName||!self.input.placeholder||self.input.value!==self.input.placeholder?self.input.value:null);preloadedDate&&setSelectedDate(preloadedDate,self.config.dateFormat),self._initialDate=self.selectedDates.length>0?self.selectedDates[0]:self.config.minDate&&self.config.minDate.getTime()>self.now.getTime()?self.config.minDate:self.config.maxDate&&self.config.maxDate.getTime()<self.now.getTime()?self.config.maxDate:self.now,self.currentYear=self._initialDate.getFullYear(),self.currentMonth=self._initialDate.getMonth(),self.selectedDates.length>0&&(self.latestSelectedDateObj=self.selectedDates[0]),void 0!==self.config.minTime&&(self.config.minTime=self.parseDate(self.config.minTime,"H:i")),void 0!==self.config.maxTime&&(self.config.maxTime=self.parseDate(self.config.maxTime,"H:i")),self.minDateHasTime=!!self.config.minDate&&(self.config.minDate.getHours()>0||self.config.minDate.getMinutes()>0||self.config.minDate.getSeconds()>0),self.maxDateHasTime=!!self.config.maxDate&&(self.config.maxDate.getHours()>0||self.config.maxDate.getMinutes()>0||self.config.maxDate.getSeconds()>0)}function setupInputs(){self.input=getInputElem(),self.input?(self.input._type=self.input.type,self.input.type="text",self.input.classList.add("flatpickr-input"),self._input=self.input,self.config.altInput&&(self.altInput=createElement(self.input.nodeName,self.config.altInputClass),self._input=self.altInput,self.altInput.placeholder=self.input.placeholder,self.altInput.disabled=self.input.disabled,self.altInput.required=self.input.required,self.altInput.tabIndex=self.input.tabIndex,self.altInput.type="text",self.input.setAttribute("type","hidden"),!self.config.static&&self.input.parentNode&&self.input.parentNode.insertBefore(self.altInput,self.input.nextSibling)),self.config.allowInput||self._input.setAttribute("readonly","readonly"),updatePositionElement()):self.config.errorHandler(new Error("Invalid input element specified"))}function updatePositionElement(){self._positionElement=self.config.positionElement||self._input}function setupMobile(){var inputType=self.config.enableTime?self.config.noCalendar?"time":"datetime-local":"date";self.mobileInput=createElement("input",self.input.className+" flatpickr-mobile"),self.mobileInput.tabIndex=1,self.mobileInput.type=inputType,self.mobileInput.disabled=self.input.disabled,self.mobileInput.required=self.input.required,self.mobileInput.placeholder=self.input.placeholder,self.mobileFormatStr="datetime-local"===inputType?"Y-m-d\\TH:i:S":"date"===inputType?"Y-m-d":"H:i:S",self.selectedDates.length>0&&(self.mobileInput.defaultValue=self.mobileInput.value=self.formatDate(self.selectedDates[0],self.mobileFormatStr)),self.config.minDate&&(self.mobileInput.min=self.formatDate(self.config.minDate,"Y-m-d")),self.config.maxDate&&(self.mobileInput.max=self.formatDate(self.config.maxDate,"Y-m-d")),self.input.getAttribute("step")&&(self.mobileInput.step=String(self.input.getAttribute("step"))),self.input.type="hidden",void 0!==self.altInput&&(self.altInput.type="hidden");try{self.input.parentNode&&self.input.parentNode.insertBefore(self.mobileInput,self.input.nextSibling)}catch(_a){}bind(self.mobileInput,"change",(function(e){self.setDate(getEventTarget(e).value,!1,self.mobileFormatStr),triggerEvent("onChange"),triggerEvent("onClose")}))}function toggle(e){if(!0===self.isOpen)return self.close();self.open(e)}function triggerEvent(event,data){if(void 0!==self.config){var hooks=self.config[event];if(void 0!==hooks&&hooks.length>0)for(var i=0;hooks[i]&&i<hooks.length;i++)hooks[i](self.selectedDates,self.input.value,self,data);"onChange"===event&&(self.input.dispatchEvent(createEvent("change")),self.input.dispatchEvent(createEvent("input")))}}function createEvent(name){var e=document.createEvent("Event");return e.initEvent(name,!0,!0),e}function isDateSelected(date){for(var i=0;i<self.selectedDates.length;i++){var selectedDate=self.selectedDates[i];if(selectedDate instanceof Date&&0===compareDates(selectedDate,date))return""+i}return!1}function isDateInRange(date){return!("range"!==self.config.mode||self.selectedDates.length<2)&&(compareDates(date,self.selectedDates[0])>=0&&compareDates(date,self.selectedDates[1])<=0)}function updateNavigationCurrentMonth(){self.config.noCalendar||self.isMobile||!self.monthNav||(self.yearElements.forEach((function(yearElement,i){var d=new Date(self.currentYear,self.currentMonth,1);d.setMonth(self.currentMonth+i),self.config.showMonths>1||"static"===self.config.monthSelectorType?self.monthElements[i].textContent=monthToStr(d.getMonth(),self.config.shorthandCurrentMonth,self.l10n)+" ":self.monthsDropdownContainer.value=d.getMonth().toString(),yearElement.value=d.getFullYear().toString()})),self._hidePrevMonthArrow=void 0!==self.config.minDate&&(self.currentYear===self.config.minDate.getFullYear()?self.currentMonth<=self.config.minDate.getMonth():self.currentYear<self.config.minDate.getFullYear()),self._hideNextMonthArrow=void 0!==self.config.maxDate&&(self.currentYear===self.config.maxDate.getFullYear()?self.currentMonth+1>self.config.maxDate.getMonth():self.currentYear>self.config.maxDate.getFullYear()))}function getDateStr(specificFormat){var format=specificFormat||(self.config.altInput?self.config.altFormat:self.config.dateFormat);return self.selectedDates.map((function(dObj){return self.formatDate(dObj,format)})).filter((function(d,i,arr){return"range"!==self.config.mode||self.config.enableTime||arr.indexOf(d)===i})).join("range"!==self.config.mode?self.config.conjunction:self.l10n.rangeSeparator)}function updateValue(triggerChange){void 0===triggerChange&&(triggerChange=!0),void 0!==self.mobileInput&&self.mobileFormatStr&&(self.mobileInput.value=void 0!==self.latestSelectedDateObj?self.formatDate(self.latestSelectedDateObj,self.mobileFormatStr):""),self.input.value=getDateStr(self.config.dateFormat),void 0!==self.altInput&&(self.altInput.value=getDateStr(self.config.altFormat)),!1!==triggerChange&&triggerEvent("onValueUpdate")}function onMonthNavClick(e){var eventTarget=getEventTarget(e),isPrevMonth=self.prevMonthNav.contains(eventTarget),isNextMonth=self.nextMonthNav.contains(eventTarget);isPrevMonth||isNextMonth?changeMonth(isPrevMonth?-1:1):self.yearElements.indexOf(eventTarget)>=0?eventTarget.select():eventTarget.classList.contains("arrowUp")?self.changeYear(self.currentYear+1):eventTarget.classList.contains("arrowDown")&&self.changeYear(self.currentYear-1)}function timeWrapper(e){e.preventDefault();var isKeyDown="keydown"===e.type,eventTarget=getEventTarget(e),input=eventTarget;void 0!==self.amPM&&eventTarget===self.amPM&&(self.amPM.textContent=self.l10n.amPM[int(self.amPM.textContent===self.l10n.amPM[0])]);var min=parseFloat(input.getAttribute("min")),max=parseFloat(input.getAttribute("max")),step=parseFloat(input.getAttribute("step")),curValue=parseInt(input.value,10),delta,newValue=curValue+step*(e.delta||(isKeyDown?38===e.which?1:-1:0));if(void 0!==input.value&&2===input.value.length){var isHourElem=input===self.hourElement,isMinuteElem=input===self.minuteElement;newValue<min?(newValue=max+newValue+int(!isHourElem)+(int(isHourElem)&&int(!self.amPM)),isMinuteElem&&incrementNumInput(void 0,-1,self.hourElement)):newValue>max&&(newValue=input===self.hourElement?newValue-max-int(!self.amPM):min,isMinuteElem&&incrementNumInput(void 0,1,self.hourElement)),self.amPM&&isHourElem&&(1===step?newValue+curValue===23:Math.abs(newValue-curValue)>step)&&(self.amPM.textContent=self.l10n.amPM[int(self.amPM.textContent===self.l10n.amPM[0])]),input.value=pad(newValue)}}return init(),self}function _flatpickr(nodeList,config){for(var nodes=Array.prototype.slice.call(nodeList).filter((function(x){return x instanceof HTMLElement})),instances=[],i=0;i<nodes.length;i++){var node=nodes[i];try{if(null!==node.getAttribute("data-fp-omit"))continue;void 0!==node._flatpickr&&(node._flatpickr.destroy(),node._flatpickr=void 0),node._flatpickr=FlatpickrInstance(node,config||{}),instances.push(node._flatpickr)}catch(e){console.error(e)}}return 1===instances.length?instances[0]:instances}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(config){return _flatpickr(this,config)},HTMLElement.prototype.flatpickr=function(config){return _flatpickr([this],config)});var flatpickr=function(selector,config){return"string"==typeof selector?_flatpickr(window.document.querySelectorAll(selector),config):selector instanceof Node?_flatpickr([selector],config):_flatpickr(selector,config)};return flatpickr.defaultConfig={},flatpickr.l10ns={en:__assign({},english),default:__assign({},english)},flatpickr.localize=function(l10n){flatpickr.l10ns.default=__assign(__assign({},flatpickr.l10ns.default),l10n)},flatpickr.setDefaults=function(config){flatpickr.defaultConfig=__assign(__assign({},flatpickr.defaultConfig),config)},flatpickr.parseDate=createDateParser({}),flatpickr.formatDate=createDateFormatter({}),flatpickr.compareDates=compareDates,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(config){return _flatpickr(this,config)}),Date.prototype.fp_incr=function(days){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof days?parseInt(days,10):days))},"undefined"!=typeof window&&(window.flatpickr=flatpickr),flatpickr}));
(function($){
$(".ect-event-wrapper").each(function(){
const wrapper=$(this);
const random=wrapper.data('random');
const postAttributes=window['ect_event_wrapper_' + random];
const masonry_filter=wrapper.find('.ect-fitlers-wrapper');
masonry_filter.hide();
const handleAjax=function(){
ect_filter_bar_ajax(wrapper);
};
const checkFilters=function(){
const selectedCat=wrapper.find("#ect-fb-category").val();
const selectedTag=wrapper.find("#ect-fb-tags").val();
const selectedVenue=wrapper.find("#ect-fb-venue").val();
const selectedOrg=wrapper.find("#ect-fb-org").val();
const searchInput=wrapper.find("#ect-fb-search").val();
const filtterbatStyle=postAttributes.attribute.filterbarstyle;
const selectedDateRange=wrapper.find("#ect-fb-calendar").val();
const todayButton=wrapper.find("#ect-fb-todaydate").hasClass('active');
const tomorrowButton=wrapper.find("#ect-fb-tomorrowdate").hasClass('active');
const thisWeekButton=wrapper.find("#ect-fb-thisweekdate").hasClass('active');
const nextWeekButton=wrapper.find("#ect-fb-nextweekdate").hasClass('active');
const thisMonthButton=wrapper.find("#ect-fb-thismonthdate").hasClass('active');
const nextMonthButton=wrapper.find("#ect-fb-nextmonthdate").hasClass('active');
const thisWeekendButton=wrapper.find("#ect-fb-thisweekenddate").hasClass('active');
const nextWeekendButton=wrapper.find("#ect-fb-nextweekenddate").hasClass('active');
if(filtterbatStyle==='both'||filtterbatStyle==='filter'){
if((selectedCat&&selectedCat!==(getFirstValue(postAttributes.attribute.category)||'all')) ||
(selectedTag!==(getFirstValue(postAttributes.attribute.tags)||'')) ||
(selectedVenue&&selectedVenue!==(getFirstValue(postAttributes.attribute.venues)||'')) ||
(selectedOrg&&selectedOrg!==(getFirstValue(postAttributes.attribute.organizers)||'')) ||
(searchInput&&searchInput!=='')||(selectedDateRange&&selectedDateRange!=='')||(todayButton) ||
(tomorrowButton)||(thisWeekButton)||(nextWeekButton)||(thisMonthButton)||(nextMonthButton) ||
(thisWeekendButton)||(nextWeekendButton)
){
wrapper.find('.ect-clear-filter').css('display', 'block');
}else{
wrapper.find('.ect-clear-filter').css('display', 'none');
}}else if(filtterbatStyle==='search'){
if(searchInput&&searchInput!==''){
wrapper.find('.ect-filter-bar').css('flex-wrap', 'nowrap');
wrapper.find('.ect-clear-filter').css('display', 'block');
}else{
wrapper.find('.ect-filter-bar').css('flex-wrap', 'wrap');
wrapper.find('.ect-clear-filter').css('display', 'none');
}}
};
wrapper.find("#ect-fb-category, #ect-fb-tags, #ect-fb-venue, #ect-fb-org").on("change", function(){
handleAjax();
checkFilters();
});
wrapper.find("#ect-fb-search").on("keypress", function(event){
if(event.key==="Enter"){
handleAjax();
checkFilters();
}});
const getFirstValue=(str)=> str.split(',')[0];
wrapper.find(".ect-clear-filter").on("click", function(){
const defaultCat=(postAttributes.attribute.category) ? getFirstValue(postAttributes.attribute.category):'all';
const defaultTag=(postAttributes.attribute.tags) ? getFirstValue(postAttributes.attribute.tags):'';
const defaultVenue=(postAttributes.attribute.venues) ? getFirstValue(postAttributes.attribute.venues):'';
const defaultOrg=(postAttributes.attribute.organizers) ? getFirstValue(postAttributes.attribute.organizers):'';
wrapper.find("#ect-fb-category").val(defaultCat);
wrapper.find("#ect-fb-tags").val(defaultTag);
wrapper.find("#ect-fb-venue").val(defaultVenue);
wrapper.find("#ect-fb-org").val(defaultOrg);
wrapper.find("#ect-fb-search").val('');
wrapper.find(".ect-date-buttons").removeClass('active');
resetDateRange();
handleAjax();
checkFilters();
});
wrapper.find(".ect-showfilter-btn").on("click", function(){
wrapper.find(".ect-filterbar-filters").toggleClass("active");
const btnText=wrapper.find(".ect-filterbar-filters").hasClass("active") ? postAttributes.hideFiltersText:postAttributes.showFiltersText;
$(this).html(btnText);
});
wrapper.find(".ect-date-buttons").on("click", function(){
var $this=$(this);
if($this.hasClass('active')){
$this.removeClass('active');
}else{
wrapper.find(".ect-date-buttons").removeClass("active");
$this.addClass("active");
}
handleAjax();
checkFilters();
});
const ect_daterange_input=wrapper.find("#ect-fb-calendar");
const fp=flatpickr(ect_daterange_input, {
dateFormat: "Y-m-d H:i",
placeholder: "Select a date",
mode: "range",
enableTime: true,
defaultDate: [postAttributes.attribute.startDate, postAttributes.attribute.endDate],
});
const ect_daterange_popup=$(".flatpickr-calendar");
ect_daterange_input.on("click", function(){
if(ect_daterange_popup.find(".ect-daterange-wrapper").length===0){
ect_daterange_popup.append('<div class="ect-daterange-wrapper" ><div class="ect-daterange-close">Close</div><div class="ect-daterange-reset">Reset</div></div>');
}
ect_daterange_popup.find(".ect-daterange-reset").on("click", resetDateRange);
ect_daterange_popup.find(".ect-daterange-close").on("click", function(){
if(ect_daterange_popup.hasClass('open')){
ect_daterange_popup.removeClass('open');
}});
})
ect_daterange_input.on("change", function(){
if(ect_daterange_input.val()!==''){
handleAjax();
checkFilters();
}});
const resetDateRange=function (){
if(fp.length!==0){
fp.setDate([postAttributes.attribute.startDate, postAttributes.attribute.endDate]);
handleAjax();
checkFilters();
}};
wrapper.find(".eicon-close").on("click", resetDateRange);
function ect_filter_bar_ajax(wrapper){
const selectedCat=wrapper.find("#ect-fb-category").val();
const selectedTag=wrapper.find("#ect-fb-tags").val();
const selectedVenue=wrapper.find("#ect-fb-venue").val();
const selectedOrg=wrapper.find("#ect-fb-org").val();
const searchInput=wrapper.find("#ect-fb-search").val();
const random=wrapper.data('random');
const dateFilter=wrapper.find(".ect-date-buttons.active").attr('id');
const selectedDateRange=wrapper.find("#ect-fb-calendar").val();
const postAttributes=window['ect_event_wrapper_' + random];
const ajaxUrl=postAttributes.url;
const query=postAttributes.query;
const nonce=postAttributes.nonce;
const dateFormat=postAttributes.dateFormat;
const hideVenue=postAttributes.hideVenue;
const showDescription=postAttributes.showDescription;
const socialShare=postAttributes.socialShare;
const loadmore_nonce=postAttributes.loadmore_nonce;
const style=postAttributes.style;
const template=postAttributes.template;
const attribute=postAttributes.attribute;
let ect_masonry_cls=`ect-masonry-view-${attribute['style']}`;
const data={
'action': 'ect_filterbar_change',
'selectedCat': selectedCat,
'query': query,
'selectedTag': selectedTag,
'selectedVenue': selectedVenue,
'selectedOrg': selectedOrg,
'searchInput': searchInput,
'date_filter': dateFilter,
'selectedDateRange': selectedDateRange,
'_ajax_nonce': nonce,
'style': style,
'template': template,
'socialShare': socialShare,
'showDescription': showDescription,
'hideVenue': hideVenue,
'dateFormat': dateFormat,
'attribute': attribute,
'loadmore_data': loadmore_nonce,
};
wrapper.find("#ect-filter-loader").show();
wrapper.find('.ect-list-wrapper, .tect-grid-wrapper, .ect-minimal-list-wrapper, .ect-accordion-container, .cool-event-timeline, .slick-track, .ect-masonary-cont, .ect-advance-list').css('opacity', '0.5');
if(selectedDateRange){
if(selectedDateRange!==(postAttributes.attribute.startDate||'') ||
selectedDateRange!==(postAttributes.attribute.endDate||'')){
wrapper.find('.ect-daterange-close').css('display', 'block');
wrapper.find(".ect-date-buttons").removeClass('active');
}else{
wrapper.find('.ect-daterange-close').css('display', 'none');
}}else{
wrapper.find('.ect-daterange-close').css('display', 'none');
}
$.ajax({
type: 'POST',
url: ajaxUrl,
data: data,
dataType: 'json',
success: function(response){
let contentdiv;
const default_no_evt_found_div=wrapper.next('.ect-no-events');
const timelinecontentdiv=wrapper.find('.cool-event-timeline');
if(default_no_evt_found_div.length){
timelinecontentdiv.addClass('ect-remove-before-style');
default_no_evt_found_div.remove();
}else{
timelinecontentdiv.removeClass('ect-remove-before-style');
}
var oldpaginationdiv;
const check=['timeline', 'classic-timeline', 'timeline-view'];
if(response.template==='default'){
contentdiv=wrapper.find('.ect-list-wrapper');
}else if(response.template==='grid-view'){
contentdiv=wrapper.find('.tect-grid-wrapper').find('.row');
}else if(response.template==='minimal-list'){
contentdiv=wrapper.find('.ect-minimal-list-wrapper');
}else if(response.template==='accordion-view'){
contentdiv=wrapper.find('.ect-accordion-container');
}else if(check.includes(response.template)){
contentdiv=wrapper.find('.cool-event-timeline');
if(!wrapper.find('.event-timeline-wrapper').length&&response.content!==''){
wrapper.append(`<div id="event-timeline-wrapper" class="${selectedCat} ${style} event-timeline-wrapper"><div class="cool-event-timeline"></div></div>`);
contentdiv=wrapper.find('.cool-event-timeline');
wrapper.find('.ect-no-events').remove();
}}else if(response.template==='slider-view'||response.template==='carousel-view'){
contentdiv=wrapper.find('.slick-track');
}else if(response.template==='masonry-view'){
contentdiv=wrapper.find('.ect-masonary-cont');
}else if(response.template==='advance-list'){
contentdiv=wrapper.find('.ect-advance-list tbody');
}else if(response.template==='highlighted-layout'){
contentdiv=wrapper.find('.ect-show-events');
}
if(response.content!==''){
if(response.template==='slider-view'||response.template==='carousel-view'){
const slickCarousel=wrapper.find('.ect-slider-view, .ect-carousel');
if(slickCarousel.length){
slickCarousel.slick("slickRemove");
contentdiv.html(response.content);
slickCarousel.slick("slickAdd");
const autoplayOption1=attribute['autoplay']==='true';
const autoplayOption=attribute['autoplay']==='true';
slickCarousel.slick("slickSetOption", "autoplay", autoplayOption1, autoplayOption);
}}else if(response.template==='masonry-view'){
if(contentdiv.length===0){
contentdiv=$(`<div  id="ect-grid-wrapper" class="ect-masonary-cont ${ect_masonry_cls}"></div>`).appendTo(wrapper.find('.ect-masonry-template-cont'));
}
if(contentdiv.data('masonry')){
contentdiv.masonry('destroy');
}
contentdiv.empty();
contentdiv.html(response.content);
contentdiv.imagesLoaded(function(){
contentdiv.masonry({
itemSelector: '.ect-grid-event',
percentPosition: true,
columnWidth: '.ect-grid-event'
});
});
}else{
contentdiv.html(response.content);
}
var paginationdiv='';
if(response['template']==='masonry-view'){
oldpaginationdiv=wrapper.find('.ect-masonay-load-more');
}
if(response['pagination']!=''){
paginationdiv=wrapper.find('.ect-load-more');
if(response['template']==='default'){
contentparentDiv=wrapper.find('.ectt-list-wrapper');
}else if(response['template']==='grid-view'){
contentparentDiv=wrapper.find('.tect-grid-wrapper');
}else if(response['template']==='minimal-list'){
contentparentDiv=wrapper.find('.ectt-simple-list-wrapper');
}else if(response['template']==='accordion-view'){
contentparentDiv=wrapper.find('#ect-accordion-wrapper');
}else if(response['template']==='masonry-view'){
contentparentDiv=wrapper.find('.ect-masonry-template-cont');
}
if(response['template']!='highlighted-layout'){
if(paginationdiv.length){
paginationdiv.hide();
contentparentDiv.append(response['pagination']);
}else{
if((response['template']==='masonry-view')&&oldpaginationdiv){
oldpaginationdiv.remove();
}
contentparentDiv.append(response['pagination']);
}}
}else{
if((response['template']==='masonry-view')&&oldpaginationdiv){
oldpaginationdiv.remove();
}
paginationdiv=wrapper.find('.ect-load-more');
paginationdiv.remove();
}
if(response.template==='highlighted-layout'){
if(wrapper.find('.ect-no-events').length > 0){
wrapper.find('.ect-right').remove();
}else{
if(wrapper.find('.ect-right').length===0&&style!=='style-4'){
wrapper.find('.ect-highlighted-wrapper').append(`
<div class="ect-right">
<div class="ect-highlighted-img">
<a id="ect-featured-event-link" href="">
<img id="ect-featured-event-image-right" src="" title="" alt="">
</a>
</div>
</div>
`);
}}
}
if(response.template==='timeline-view'){
if(wrapper.find('.ect-no-events').length > 0){
wrapper.find('.event-timeline-wrapper').removeClass('event-timeline-line');
wrapper.find('.cool-event-timeline').removeClass('cool-event-timeline-line');
}else{
wrapper.find('.event-timeline-wrapper').addClass('event-timeline-line');
wrapper.find('.cool-event-timeline').addClass('cool-event-timeline-line');
}}
}else{
contentdiv.html(response.noEvents);
if(response.template==='timeline-view'){
wrapper.find('.event-timeline-wrapper').remove();
wrapper.find('.event-timeline-line').remove();
}
if(response.template==='highlighted-layout'){
const ectRightDiv=wrapper[0].querySelector('.ect-right');
if(ectRightDiv&&wrapper.data('style')!==4){
ectRightDiv.classList.remove("ect-img-show");
ectRightDiv.classList.add("ect-img-hide");
}}
const slickCarousel=wrapper.find('.ect-slider-view, .ect-carousel');
if(slickCarousel.length){
slickCarousel.slick("slickSetOption", "autoplay", false, true);
}
const paginationDiv=wrapper.find('.ect-load-more');
paginationDiv.remove();
oldpaginationdiv=wrapper.find('.ect-masonay-load-more');
if((response['template']==='masonry-view')&&oldpaginationdiv){
oldpaginationdiv.remove();
}
if(response.template==='masonry-view'&&contentdiv.data('masonry')){
contentdiv.masonry('destroy');
}}
wrapper.find("#ect-filter-loader").hide();
wrapper.find('.ect-list-wrapper, .tect-grid-wrapper, .ect-minimal-list-wrapper, .ect-accordion-container, .cool-event-timeline, .slick-track, .ect-masonary-cont, .ect-advance-list').css('opacity', '1');
},
error: function(xhr, status, error){
console.error("AJAX Error:", status, error);
wrapper.find("#ect-filter-loader").hide();
wrapper.find('.ect-list-wrapper, .tect-grid-wrapper, .ect-minimal-list-wrapper, .ect-accordion-container, .cool-event-timeline, .slick-track, .ect-masonary-cont, .ect-advance-list').css('opacity', '1');
}});
}});
})(jQuery);
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0},100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focusHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});