function dropdownEffectData(a){var b=null,c=null,d=$(a),e=$(".dropdown-menu",a),f=d.parents("ul.nav");return f.height>0&&(b=f.data("dropdown-in")||null,c=f.data("dropdown-out")||null),{target:a,dropdown:d,dropdownMenu:e,effectIn:e.data("dropdown-in")||b,effectOut:e.data("dropdown-out")||c}}function dropdownEffectStart(a,b){b&&(a.dropdown.addClass("dropdown-animating"),a.dropdownMenu.addClass("animated"),a.dropdownMenu.addClass(b))}function dropdownEffectEnd(a,b){a.dropdown.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a.dropdown.removeClass("dropdown-animating"),a.dropdownMenu.removeClass("animated"),a.dropdownMenu.removeClass(a.effectIn),a.dropdownMenu.removeClass(a.effectOut),"function"==typeof b&&b()})}jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(1-Math.pow(2,-10*b/e))+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(2-Math.pow(2,-10*--b))+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h0&&b-1 in a))}if(!a.jQuery){var c=function(a,b){return new c.fn.init(a,b)};c.isWindow=function(a){return null!=a&&a==a.window},c.type=function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?e[g.call(a)]||"object":typeof a},c.isArray=Array.isArray||function(a){return"array"===c.type(a)},c.isPlainObject=function(a){var b;if(!a||"object"!==c.type(a)||a.nodeType||c.isWindow(a))return!1;try{if(a.constructor&&!f.call(a,"constructor")&&!f.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}for(b in a);return void 0===b||f.call(a,b)},c.each=function(a,c,d){var e=0,f=a.length,g=b(a);if(d){if(g)for(;f>e&&!1!==c.apply(a[e],d);e++);else for(e in a)if(!1===c.apply(a[e],d))break}else if(g)for(;f>e&&!1!==c.call(a[e],e,a[e]);e++);else for(e in a)if(!1===c.call(a[e],e,a[e]))break;return a},c.data=function(a,b,e){if(void 0===e){var f=a[c.expando],g=f&&d[f];if(void 0===b)return g;if(g&&b in g)return g[b]}else if(void 0!==b){var f=a[c.expando]||(a[c.expando]=++c.uuid);return d[f]=d[f]||{},d[f][b]=e,e}},c.removeData=function(a,b){var e=a[c.expando],f=e&&d[e];f&&c.each(b,function(a,b){delete f[b]})},c.extend=function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[i]||{},i++),"object"!=typeof h&&"function"!==c.type(h)&&(h={}),i===j&&(h=this,i--);j>i;i++)if(null!=(f=arguments[i]))for(e in f)a=h[e],d=f[e],h!==d&&(k&&d&&(c.isPlainObject(d)||(b=c.isArray(d)))?(b?(b=!1,g=a&&c.isArray(a)?a:[]):g=a&&c.isPlainObject(a)?a:{},h[e]=c.extend(k,g,d)):void 0!==d&&(h[e]=d));return h},c.queue=function(a,d,e){if(a){d=(d||"fx")+"queue";var f=c.data(a,d);return e?(!f||c.isArray(e)?f=c.data(a,d,function(a,c){var d=c||[];return null!=a&&(b(Object(a))?function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;)a[e++]=b[d++];if(c!==c)for(;void 0!==b[d];)a[e++]=b[d++];a.length=e}(d,"string"==typeof a?[a]:a):[].push.call(d,a)),d}(e)):f.push(e),f):f||[]}},c.dequeue=function(a,b){c.each(a.nodeType?[a]:a,function(a,d){b=b||"fx";var e=c.queue(d,b),f=e.shift();"inprogress"===f&&(f=e.shift()),f&&("fx"===b&&e.unshift("inprogress"),f.call(d,function(){c.dequeue(d,b)}))})},c.fn=c.prototype={init:function(a){if(a.nodeType)return this[0]=a,this;throw new Error("Not a DOM node.")},offset:function(){var b=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:b.top+(a.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:b.left+(a.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function a(){for(var a=this.offsetParent||document;a&&"html"===!a.nodeType.toLowerCase&&"static"===a.style.position;)a=a.offsetParent;return a||document}var b=this[0],a=a.apply(b),d=this.offset(),e=/^(?:body|html)$/i.test(a.nodeName)?{top:0,left:0}:c(a).offset();return d.top-=parseFloat(b.style.marginTop)||0,d.left-=parseFloat(b.style.marginLeft)||0,a.style&&(e.top+=parseFloat(a.style.borderTopWidth)||0,e.left+=parseFloat(a.style.borderLeftWidth)||0),{top:d.top-e.top,left:d.left-e.left}}};var d={};c.expando="velocity"+(new Date).getTime(),c.uuid=0;for(var e={},f=e.hasOwnProperty,g=e.toString,h="Boolean Number String Function Array Date RegExp Object Error".split(" "),i=0;ie;++e){var f=j(c,a,d);if(0===f)return c;c-=(i(c,a,d)-b)/f}return c}function l(){for(var b=0;t>b;++b)x[b]=i(b*u,a,d)}function m(b,c,e){var f,g,h=0;do{g=c+(e-c)/2,f=i(g,a,d)-b,f>0?e=g:c=g}while(Math.abs(f)>r&&++h=q?k(b,h):0==i?h:m(b,c,c+u)}function o(){y=!0,(a!=c||d!=e)&&l()}var p=4,q=.001,r=1e-7,s=10,t=11,u=1/(t-1),v="Float32Array"in b;if(4!==arguments.length)return!1;for(var w=0;4>w;++w)if("number"!=typeof arguments[w]||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;a=Math.min(a,1),d=Math.min(d,1),a=Math.max(a,0),d=Math.max(d,0);var x=v?new Float32Array(t):new Array(t),y=!1,z=function(b){return y||o(),a===c&&d===e?b:0===b?0:1===b?1:i(n(b),c,e)};z.getControlPoints=function(){return[{x:a,y:c},{x:d,y:e}]};var A="generateBezier("+[a,c,d,e]+")";return z.toString=function(){return A},z}function j(a,b){var c=a;return p.isString(a)?t.Easings[a]||(c=!1):c=p.isArray(a)&&1===a.length?h.apply(null,a):p.isArray(a)&&2===a.length?u.apply(null,a.concat([b])):!(!p.isArray(a)||4!==a.length)&&i.apply(null,a),!1===c&&(c=t.Easings[t.defaults.easing]?t.defaults.easing:s),c}function k(a){if(a){var b=(new Date).getTime(),c=t.State.calls.length;c>1e4&&(t.State.calls=e(t.State.calls));for(var f=0;c>f;f++)if(t.State.calls[f]){var h=t.State.calls[f],i=h[0],j=h[2],n=h[3],o=!!n,q=null;n||(n=t.State.calls[f][3]=b-16);for(var r=Math.min((b-n)/j.duration,1),s=0,u=i.length;u>s;s++){var w=i[s],y=w.element;if(g(y)){var z=!1;if(j.display!==d&&null!==j.display&&"none"!==j.display){if("flex"===j.display){var A=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];m.each(A,function(a,b){v.setPropertyValue(y,"display",b)})}v.setPropertyValue(y,"display",j.display)}j.visibility!==d&&"hidden"!==j.visibility&&v.setPropertyValue(y,"visibility",j.visibility);for(var B in w)if("element"!==B){var C,D=w[B],E=p.isString(D.easing)?t.Easings[D.easing]:D.easing;if(1===r)C=D.endValue;else{var F=D.endValue-D.startValue;if(C=D.startValue+F*E(r,j,F),!o&&C===D.currentValue)continue}if(D.currentValue=C,"tween"===B)q=C;else{if(v.Hooks.registered[B]){var G=v.Hooks.getRoot(B),H=g(y).rootPropertyValueCache[G];H&&(D.rootPropertyValue=H)}var I=v.setPropertyValue(y,B,D.currentValue+(0===parseFloat(C)?"":D.unitType),D.rootPropertyValue,D.scrollData);v.Hooks.registered[B]&&(g(y).rootPropertyValueCache[G]=v.Normalizations.registered[G]?v.Normalizations.registered[G]("extract",null,I[1]):I[1]),"transform"===I[0]&&(z=!0)}}j.mobileHA&&g(y).transformCache.translate3d===d&&(g(y).transformCache.translate3d="(0px, 0px, 0px)",z=!0),z&&v.flushTransformCache(y)}}j.display!==d&&"none"!==j.display&&(t.State.calls[f][2].display=!1),j.visibility!==d&&"hidden"!==j.visibility&&(t.State.calls[f][2].visibility=!1),j.progress&&j.progress.call(h[1],h[1],r,Math.max(0,n+j.duration-b),n,q),1===r&&l(f)}}t.State.isTicking&&x(k)}function l(a,b){if(!t.State.calls[a])return!1;for(var c=t.State.calls[a][0],e=t.State.calls[a][1],f=t.State.calls[a][2],h=t.State.calls[a][4],i=!1,j=0,k=c.length;k>j;j++){var l=c[j].element;if(b||f.loop||("none"===f.display&&v.setPropertyValue(l,"display",f.display),"hidden"===f.visibility&&v.setPropertyValue(l,"visibility",f.visibility)),!0!==f.loop&&(m.queue(l)[1]===d||!/\.velocityQueueEntryFlag/i.test(m.queue(l)[1]))&&g(l)){g(l).isAnimating=!1,g(l).rootPropertyValueCache={};var n=!1;m.each(v.Lists.transforms3D,function(a,b){var c=/^scale/.test(b)?1:0,e=g(l).transformCache[b];g(l).transformCache[b]!==d&&new RegExp("^\\("+c+"[^.]").test(e)&&(n=!0,delete g(l).transformCache[b])}),f.mobileHA&&(n=!0,delete g(l).transformCache.translate3d),n&&v.flushTransformCache(l),v.Values.removeClass(l,"velocity-animating")}if(!b&&f.complete&&!f.loop&&j===k-1)try{f.complete.call(e,e)}catch(a){setTimeout(function(){throw a},1)}h&&!0!==f.loop&&h(e),g(l)&&!0===f.loop&&!b&&(m.each(g(l).tweensContainer,function(a,b){/^rotate/.test(a)&&360===parseFloat(b.endValue)&&(b.endValue=0,b.startValue=360),/^backgroundPosition/.test(a)&&100===parseFloat(b.endValue)&&"%"===b.unitType&&(b.endValue=0,b.startValue=100)}),t(l,"reverse",{loop:!0,delay:f.delay})),!1!==f.queue&&m.dequeue(l,f.queue)}t.State.calls[a]=!1;for(var o=0,p=t.State.calls.length;p>o;o++)if(!1!==t.State.calls[o]){i=!0;break}!1===i&&(t.State.isTicking=!1,delete t.State.calls,t.State.calls=[])}var m,n=function(){if(c.documentMode)return c.documentMode;for(var a=7;a>4;a--){var b=c.createElement("div");if(b.innerHTML="\x3c!--[if IE "+a+"]>0)},isWrapped:function(a){return a&&(a.jquery||b.Zepto&&b.Zepto.zepto.isZ(a))},isSVG:function(a){return b.SVGElement&&a instanceof b.SVGElement},isEmptyObject:function(a){for(var b in a)return!1;return!0}},q=!1;if(a.fn&&a.fn.jquery?(m=a,q=!0):m=b.Velocity.Utilities,8>=n&&!q)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=n)return void(jQuery.fn.velocity=jQuery.fn.animate);var r=400,s="swing",t={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:b.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:c.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:m,Redirects:{},Easings:{},Promise:b.Promise,defaults:{queue:"",duration:r,easing:s,begin:d,complete:d,progress:d,display:d,visibility:d,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(a){m.data(a,"velocity",{isSVG:p.isSVG(a),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};b.pageYOffset!==d?(t.State.scrollAnchor=b,t.State.scrollPropertyLeft="pageXOffset",t.State.scrollPropertyTop="pageYOffset"):(t.State.scrollAnchor=c.documentElement||c.body.parentNode||c.body,t.State.scrollPropertyLeft="scrollLeft",t.State.scrollPropertyTop="scrollTop");var u=function(){function a(a){return-a.tension*a.x-a.friction*a.v}function b(b,c,d){var e={x:b.x+d.dx*c,v:b.v+d.dv*c,tension:b.tension,friction:b.friction};return{dx:e.v,dv:a(e)}}function c(c,d){var e={dx:c.v,dv:a(c)},f=b(c,.5*d,e),g=b(c,.5*d,f),h=b(c,d,g),i=1/6*(e.dx+2*(f.dx+g.dx)+h.dx),j=1/6*(e.dv+2*(f.dv+g.dv)+h.dv);return c.x=c.x+i*d,c.v=c.v+j*d,c}return function a(b,d,e){var f,g,h,i={x:-1,v:0,tension:null,friction:null},j=[0],k=0;for(b=parseFloat(b)||500,d=parseFloat(d)||20,e=e||null,i.tension=b,i.friction=d,f=null!==e,f?(k=a(b,d),g=k/e*.016):g=.016;h=c(h||i,g),j.push(1+h.x),k+=16,Math.abs(h.x)>1e-4&&Math.abs(h.v)>1e-4;);return f?function(a){return j[a*(j.length-1)|0]}:k}}();t.Easings={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},spring:function(a){return 1-Math.cos(4.5*a*Math.PI)*Math.exp(6*-a)}},m.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(a,b){t.Easings[b[0]]=i.apply(null,b[1])});var v=t.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var a=0;a=n)switch(a){case"name":return"filter";case"extract":var d=c.toString().match(/alpha\(opacity=(.*)\)/i);return c=d?d[1]/100:1;case"inject":return b.style.zoom=1,parseFloat(c)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(c),10)+")"}else switch(a){case"name":return"opacity";case"extract":case"inject":return c}}},register:function(){9>=n||t.State.isGingerbread||(v.Lists.transformsBase=v.Lists.transformsBase.concat(v.Lists.transforms3D));for(var a=0;ae&&(e=1),f=!/(\d)$/i.test(e);break;case"skew":f=!/(deg|\d)$/i.test(e);break;case"rotate":f=!/(deg|\d)$/i.test(e)}return f||(g(c).transformCache[b]="("+e+")"),g(c).transformCache[b]}}}();for(var a=0;a=n||3!==f.split(" ").length||(f+=" 1"),f;case"inject":return 8>=n?4===e.split(" ").length&&(e=e.split(/\s+/).slice(0,3).join(" ")):3===e.split(" ").length&&(e+=" 1"),(8>=n?"rgb":"rgba")+"("+e.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(a){return a.replace(/-(\w)/g,function(a,b){return b.toUpperCase()})},SVGAttribute:function(a){var b="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(n||t.State.isAndroid&&!t.State.isChrome)&&(b+="|transform"),new RegExp("^("+b+")$","i").test(a)},prefixCheck:function(a){if(t.State.prefixMatches[a])return[t.State.prefixMatches[a],!0];for(var b=["","Webkit","Moz","ms","O"],c=0,d=b.length;d>c;c++){var e;if(e=0===c?a:b[c]+a.replace(/^\w/,function(a){return a.toUpperCase()}),p.isString(t.State.prefixElement.style[e]))return t.State.prefixMatches[a]=e,[e,!0]}return[a,!1]}},Values:{hexToRgb:function(a){var b,c=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a=a.replace(c,function(a,b,c,d){return b+b+c+c+d+d}),b=d.exec(a),b?[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]:[0,0,0]},isCSSNullValue:function(a){return 0==a||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a)},getUnitType:function(a){return/^(rotate|skew)/i.test(a)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(a)?"":"px"},getDisplayType:function(a){var b=a&&a.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b)?"inline":/^(li)$/i.test(b)?"list-item":/^(tr)$/i.test(b)?"table-row":/^(table)$/i.test(b)?"table":/^(tbody)$/i.test(b)?"table-row-group":"block"},addClass:function(a,b){a.classList?a.classList.add(b):a.className+=(a.className.length?" ":"")+b},removeClass:function(a,b){a.classList?a.classList.remove(b):a.className=a.className.toString().replace(new RegExp("(^|\\s)"+b.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(a,c,e,f){function h(a,c){function e(){j&&v.setPropertyValue(a,"display","none")}var i=0;if(8>=n)i=m.css(a,c);else{var j=!1;if(/^(width|height)$/.test(c)&&0===v.getPropertyValue(a,"display")&&(j=!0,v.setPropertyValue(a,"display",v.Values.getDisplayType(a))),!f){if("height"===c&&"border-box"!==v.getPropertyValue(a,"boxSizing").toString().toLowerCase()){var k=a.offsetHeight-(parseFloat(v.getPropertyValue(a,"borderTopWidth"))||0)-(parseFloat(v.getPropertyValue(a,"borderBottomWidth"))||0)-(parseFloat(v.getPropertyValue(a,"paddingTop"))||0)-(parseFloat(v.getPropertyValue(a,"paddingBottom"))||0);return e(),k}if("width"===c&&"border-box"!==v.getPropertyValue(a,"boxSizing").toString().toLowerCase()){var l=a.offsetWidth-(parseFloat(v.getPropertyValue(a,"borderLeftWidth"))||0)-(parseFloat(v.getPropertyValue(a,"borderRightWidth"))||0)-(parseFloat(v.getPropertyValue(a,"paddingLeft"))||0)-(parseFloat(v.getPropertyValue(a,"paddingRight"))||0);return e(),l}}var o;o=g(a)===d?b.getComputedStyle(a,null):g(a).computedStyle?g(a).computedStyle:g(a).computedStyle=b.getComputedStyle(a,null),"borderColor"===c&&(c="borderTopColor"),i=9===n&&"filter"===c?o.getPropertyValue(c):o[c],(""===i||null===i)&&(i=a.style[c]),e()}if("auto"===i&&/^(top|right|bottom|left)$/i.test(c)){var p=h(a,"position");("fixed"===p||"absolute"===p&&/top|left/i.test(c))&&(i=m(a).position()[c]+"px")}return i}var i;if(v.Hooks.registered[c]){var j=c,k=v.Hooks.getRoot(j);e===d&&(e=v.getPropertyValue(a,v.Names.prefixCheck(k)[0])),v.Normalizations.registered[k]&&(e=v.Normalizations.registered[k]("extract",a,e)),i=v.Hooks.extractValue(j,e)}else if(v.Normalizations.registered[c]){var l,o;l=v.Normalizations.registered[c]("name",a),"transform"!==l&&(o=h(a,v.Names.prefixCheck(l)[0]),v.Values.isCSSNullValue(o)&&v.Hooks.templates[c]&&(o=v.Hooks.templates[c][1])),i=v.Normalizations.registered[c]("extract",a,o)}if(!/^[\d-]/.test(i))if(g(a)&&g(a).isSVG&&v.Names.SVGAttribute(c))if(/^(height|width)$/i.test(c))try{i=a.getBBox()[c]}catch(a){i=0}else i=a.getAttribute(c);else i=h(a,v.Names.prefixCheck(c)[0]);return v.Values.isCSSNullValue(i)&&(i=0),t.debug,i},setPropertyValue:function(a,c,d,e,f){var h=c;if("scroll"===c)f.container?f.container["scroll"+f.direction]=d:"Left"===f.direction?b.scrollTo(d,f.alternateValue):b.scrollTo(f.alternateValue,d);else if(v.Normalizations.registered[c]&&"transform"===v.Normalizations.registered[c]("name",a))v.Normalizations.registered[c]("inject",a,d),h="transform",d=g(a).transformCache[c];else{if(v.Hooks.registered[c]){var i=c,j=v.Hooks.getRoot(c);e=e||v.getPropertyValue(a,j),d=v.Hooks.injectValue(i,d,e),c=j}if(v.Normalizations.registered[c]&&(d=v.Normalizations.registered[c]("inject",a,d),c=v.Normalizations.registered[c]("name",a)),h=v.Names.prefixCheck(c)[0],8>=n)try{a.style[h]=d}catch(a){t.debug}else g(a)&&g(a).isSVG&&v.Names.SVGAttribute(c)?a.setAttribute(c,d):a.style[h]=d;t.debug}return[h,d]},flushTransformCache:function(a){function b(b){return parseFloat(v.getPropertyValue(a,b))}var c="";if((n||t.State.isAndroid&&!t.State.isChrome)&&g(a).isSVG){var d={translate:[b("translateX"),b("translateY")],skewX:[b("skewX")],skewY:[b("skewY")],scale:1!==b("scale")?[b("scale"),b("scale")]:[b("scaleX"),b("scaleY")],rotate:[b("rotateZ"),0,0]};m.each(g(a).transformCache,function(a){/^translate/i.test(a)?a="translate":/^scale/i.test(a)?a="scale":/^rotate/i.test(a)&&(a="rotate"),d[a]&&(c+=a+"("+d[a].join(" ")+") ",delete d[a])})}else{var e,f;m.each(g(a).transformCache,function(b){return e=g(a).transformCache[b],"transformPerspective"===b?(f=e,!0):(9===n&&"rotateZ"===b&&(b="rotate"),void(c+=b+e+" "))}),f&&(c="perspective"+f+" "+c)}v.setPropertyValue(a,"transform",c)}};v.Hooks.register(),v.Normalizations.register(),t.hook=function(a,b,c){var e=d;return a=f(a),m.each(a,function(a,f){if(g(f)===d&&t.init(f),c===d)e===d&&(e=t.CSS.getPropertyValue(f,b));else{var h=t.CSS.setPropertyValue(f,b,c);"transform"===h[0]&&t.CSS.flushTransformCache(f),e=h}}),e};var w=function(){function a(){return h?B.promise||null:i}function e(){function a(a){function l(a,b){var c=d,e=d,g=d;return p.isArray(a)?(c=a[0],!p.isArray(a[1])&&/^[\d-]/.test(a[1])||p.isFunction(a[1])||v.RegEx.isHex.test(a[1])?g=a[1]:(p.isString(a[1])&&!v.RegEx.isHex.test(a[1])||p.isArray(a[1]))&&(e=b?a[1]:j(a[1],h.duration),a[2]!==d&&(g=a[2]))):c=a,b||(e=e||h.easing),p.isFunction(c)&&(c=c.call(f,y,x)),p.isFunction(g)&&(g=g.call(f,y,x)),[c||0,e,g]}function n(a,b){var c,d;return d=(b||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(a){return c=a,""}),c||(c=v.Values.getUnitType(a)),[d,c]}if(h.begin&&0===y)try{h.begin.call(o,o)}catch(a){setTimeout(function(){throw a},1)}if("scroll"===C){var r,u,w,z=/^x$/i.test(h.axis)?"Left":"Top",A=parseFloat(h.offset)||0;h.container?p.isWrapped(h.container)||p.isNode(h.container)?(h.container=h.container[0]||h.container,r=h.container["scroll"+z],w=r+m(f).position()[z.toLowerCase()]+A):h.container=null:(r=t.State.scrollAnchor[t.State["scrollProperty"+z]],u=t.State.scrollAnchor[t.State["scrollProperty"+("Left"===z?"Top":"Left")]],w=m(f).offset()[z.toLowerCase()]+A),i={scroll:{rootPropertyValue:!1,startValue:r,currentValue:r,endValue:w,unitType:"",easing:h.easing,scrollData:{container:h.container,direction:z,alternateValue:u}},element:f},t.debug}else if("reverse"===C){if(!g(f).tweensContainer)return void m.dequeue(f,h.queue);"none"===g(f).opts.display&&(g(f).opts.display="auto"),"hidden"===g(f).opts.visibility&&(g(f).opts.visibility="visible"),g(f).opts.loop=!1,g(f).opts.begin=null,g(f).opts.complete=null,s.easing||delete h.easing,s.duration||delete h.duration,h=m.extend({},g(f).opts,h);var D=m.extend(!0,{},g(f).tweensContainer);for(var E in D)if("element"!==E){var F=D[E].startValue;D[E].startValue=D[E].currentValue=D[E].endValue,D[E].endValue=F,p.isEmptyObject(s)||(D[E].easing=h.easing),t.debug}i=D}else if("start"===C){var D;g(f).tweensContainer&&!0===g(f).isAnimating&&(D=g(f).tweensContainer),m.each(q,function(a,b){if(RegExp("^"+v.Lists.colors.join("$|^")+"$").test(a)){var c=l(b,!0),e=c[0],f=c[1],g=c[2];if(v.RegEx.isHex.test(e)){for(var h=["Red","Green","Blue"],i=v.Values.hexToRgb(e),j=g?v.Values.hexToRgb(g):d,k=0;kL;L++){var M={delay:E.delay,progress:E.progress};L===K-1&&(M.display=E.display,M.visibility=E.visibility,M.complete=E.complete),w(o,"reverse",M)}return a()}};t=m.extend(w,t),t.animate=w;var x=b.requestAnimationFrame||o;return t.State.isMobile||c.hidden===d||c.addEventListener("visibilitychange",function(){c.hidden?(x=function(a){return setTimeout(function(){a(!0)},16)},k()):x=b.requestAnimationFrame||o}),a.Velocity=t,a!==b&&(a.fn.velocity=w,a.fn.velocity.defaults=t.defaults),m.each(["Down","Up"],function(a,b){t.Redirects["slide"+b]=function(a,c,e,f,g,h){var i=m.extend({},c),j=i.begin,k=i.complete,l={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},n={};i.display===d&&(i.display="Down"===b?"inline"===t.CSS.Values.getDisplayType(a)?"inline-block":"block":"none"),i.begin=function(){j&&j.call(g,g);for(var c in l){n[c]=a.style[c];var d=t.CSS.getPropertyValue(a,c);l[c]="Down"===b?[d,0]:[0,d]}n.overflow=a.style.overflow,a.style.overflow="hidden"},i.complete=function(){for(var b in n)a.style[b]=n[b];k&&k.call(g,g),h&&h.resolver(g)},t(a,l,i)}}),m.each(["In","Out"],function(a,b){t.Redirects["fade"+b]=function(a,c,e,f,g,h){var i=m.extend({},c),j={opacity:"In"===b?1:0},k=i.complete;i.complete=e!==f-1?i.begin=null:function(){k&&k.call(g,g),h&&h.resolver(g)},i.display===d&&(i.display="In"===b?"auto":"none"),t(this,j,i)}}),t}(window.jQuery||window.Zepto||window,window,document)})),function(){"use strict";var a=this,b=a.Chart,c=function(a){this.canvas=a.canvas,this.ctx=a;var b=function(a,b){return a["offset"+b]?a["offset"+b]:document.defaultView.getComputedStyle(a).getPropertyValue(b)};this.width=b(a.canvas,"Width")||a.canvas.width,this.height=b(a.canvas,"Height")||a.canvas.height;return this.width=a.canvas.width,this.height=a.canvas.height,this.aspectRatio=this.width/this.height,d.retinaScale(this),this};c.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipTitleTemplate:"<%= label%>",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",segmentColorDefault:["#A6CEE3","#1F78B4","#B2DF8A","#33A02C","#FB9A99","#E31A1C","#FDBF6F","#FF7F00","#CAB2D6","#6A3D9A","#B4B482","#B15928"],segmentHighlightColorDefaults:["#CEF6FF","#47A0DC","#DAFFB2","#5BC854","#FFC2C1","#FF4244","#FFE797","#FFA728","#F2DAFE","#9265C2","#DCDCAA","#D98150"],onAnimationProgress:function(){},onAnimationComplete:function(){}}},c.types={};var d=c.helpers={},e=d.each=function(a,b,c){var d=Array.prototype.slice.call(arguments,3);if(a)if(a.length===+a.length){var e;for(e=0;e=0;d--){var e=a[d];if(b(e))return e}},d.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=j,a&&g(c.prototype,a),c.__super__=b.prototype,c}),k=d.noop=function(){},l=d.uid=function(){var a=0;return function(){return"chart-"+a++}}(),m=d.warn=function(a){window.console&&window.console.warn},n=d.amd="function"==typeof define&&define.amd,o=d.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},p=d.max=function(a){return Math.max.apply(Math,a)},q=d.min=function(a){return Math.min.apply(Math,a)},r=(d.cap=function(a,b,c){if(o(b)){if(a>b)return b}else if(o(c)&&a=g,i=[];e(a,function(a){null==a||i.push(a)});var j=q(i),k=p(i);k===j&&(k+=.5,j>=.5&&!d?j-=.5:k+=.5);for(var l=Math.abs(k-j),m=u(l),n=Math.ceil(k/(1*Math.pow(10,m)))*Math.pow(10,m),o=d?0:Math.floor(j/(1*Math.pow(10,m)))*Math.pow(10,m),r=n-o,s=Math.pow(10,m),t=Math.round(r/s);(t>g||2*tg)s*=2,(t=Math.round(r/s))%1!=0&&(h=!0);else if(f&&m>=0){if(s/2%1!=0)break;s/=2,t=Math.round(r/s)}else s/=2,t=Math.round(r/s);return h&&(t=2,s=r/t),{steps:t,stepValue:s,min:o,max:o+t*s}},d.template=function(a,b){if(a instanceof Function)return a(b);var c={};return function(a,b){var d=/\W/.test(a)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):c[a]=c[a];return b?d(b):d}(a,b)}),w=(d.generateLabels=function(a,b,c,d){var f=new Array(b);return a&&e(f,function(b,e){f[e]=v(a,{value:c+d*(e+1)})}),f},d.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return(a/=.5)<1?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(1-Math.pow(2,-10*a/1))},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*--a))},easeInCirc:function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var b=1.70158,c=0,d=1;return 0===a?0:1==(a/=1)?1:(c||(c=.3),dd?c:d}),d},I=d.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()};c.instances={},c.Type=function(a,b,d){this.options=b,this.chart=d,this.id=l(),c.instances[this.id]=this,b.responsive&&this.resize(),this.initialize.call(this,a)},g(c.Type.prototype,{initialize:function(){return this},clear:function(){return F(this.chart),this},stop:function(){return c.animationService.cancelAnimation(this),this},resize:function(a){this.stop();var b=this.chart.canvas,c=B(this.chart.canvas),d=this.options.maintainAspectRatio?c/this.chart.aspectRatio:C(this.chart.canvas);return b.width=this.chart.width=c,b.height=this.chart.height=d,E(this.chart),"function"==typeof a&&a.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:k,render:function(a){if(a&&this.reflow(),this.options.animation&&!a){var b=new c.Animation;b.numSteps=this.options.animationSteps,b.easing=this.options.animationEasing,b.render=function(a,b){var c=d.easingEffects[b.easing],e=b.currentStep/b.numSteps,f=c(e);a.draw(f,e,b.currentStep)},b.onAnimationProgress=this.options.onAnimationProgress,b.onAnimationComplete=this.options.onAnimationComplete,c.animationService.addAnimation(this,b)}else this.draw(),this.options.onAnimationComplete.call(this);return this},generateLegend:function(){return v(this.options.legendTemplate,this)},destroy:function(){this.clear(),A(this,this.events);var a=this.chart.canvas;a.width=this.chart.width,a.height=this.chart.height,a.style.removeProperty?(a.style.removeProperty("width"),a.style.removeProperty("height")):(a.style.removeAttribute("width"),a.style.removeAttribute("height")),delete c.instances[this.id]},showTooltip:function(a,b){if(void 0===this.activeElements&&(this.activeElements=[]),function(a){var b=!1;return a.length!==this.activeElements.length?b=!0:(e(a,function(a,c){a!==this.activeElements[c]&&(b=!0)},this),b)}.call(this,a)||b){if(this.activeElements=a,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),a.length>0)if(this.datasets&&this.datasets.length>1){for(var f,g,h=this.datasets.length-1;h>=0&&(f=this.datasets[h].points||this.datasets[h].bars||this.datasets[h].segments,-1===(g=i(f,a[0])));h--);var j=[],k=[],l=function(a){var b,c,e,f,h,i=[],l=[],m=[];return d.each(this.datasets,function(a){b=a.points||a.bars||a.segments,b[g]&&b[g].hasValue()&&i.push(b[g])}),d.each(i,function(a){l.push(a.x),m.push(a.y),j.push(d.template(this.options.multiTooltipTemplate,a)),k.push({fill:a._saved.fillColor||a.fillColor,stroke:a._saved.strokeColor||a.strokeColor})},this),h=q(m),e=p(m),f=q(l),c=p(l),{x:f>this.chart.width/2?f:c,y:(h+e)/2}}.call(this,g);new c.MultiTooltip({x:l.x,y:l.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:j,legendColors:k,legendColorBackground:this.options.multiTooltipKeyBackground,title:v(this.options.tooltipTitleTemplate,a[0]),chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else e(a,function(a){var b=a.tooltipPosition();new c.Tooltip({x:Math.round(b.x),y:Math.round(b.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:v(this.options.tooltipTemplate,a),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),c.Type.extend=function(a){var b=this,d=function(){return b.apply(this,arguments)};if(d.prototype=f(b.prototype),g(d.prototype,a),d.extend=c.Type.extend,a.name||b.prototype.name){var e=a.name||b.prototype.name,i=c.defaults[b.prototype.name]?f(c.defaults[b.prototype.name]):{};c.defaults[e]=g(i,a.defaults),c.types[e]=d,c.prototype[e]=function(a,b){var f=h(c.defaults.global,c.defaults[e],b||{});return new d(a,f,this)}}else m("Name not provided for this chart, so it hasn't been registered");return b},c.Element=function(a){g(this,a),this.initialize.apply(this,arguments),this.save()},g(c.Element.prototype,{initialize:function(){},restore:function(a){return a?e(a,function(a){this[a]=this._saved[a]},this):g(this,this._saved),this},save:function(){return this._saved=f(this),delete this._saved._saved,this},update:function(a){return e(a,function(a,b){this._saved[b]=this[b],this[b]=a},this),this},transition:function(a,b){return e(a,function(a,c){this[c]=(a-this._saved[c])*b+this._saved[c]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return o(this.value)}}),c.Element.extend=j,c.Point=c.Element.extend({display:!0,inRange:function(a,b){var c=this.hitDetectionRadius+this.radius;return Math.pow(a-this.x,2)+Math.pow(b-this.y,2)=f:e>=f&&e<=g,i=c.distance>=this.innerRadius&&c.distance<=this.outerRadius;return h&&i},tooltipPosition:function(){var a=this.startAngle+(this.endAngle-this.startAngle)/2,b=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(a)*b,y:this.y+Math.sin(a)*b}},draw:function(a){var b=this.ctx;b.beginPath(),b.arc(this.x,this.y,this.outerRadius<0?0:this.outerRadius,this.startAngle,this.endAngle),b.arc(this.x,this.y,this.innerRadius<0?0:this.innerRadius,this.endAngle,this.startAngle,!0),b.closePath(),b.strokeStyle=this.strokeColor,b.lineWidth=this.strokeWidth,b.fillStyle=this.fillColor,b.fill(),b.lineJoin="bevel",this.showStroke&&b.stroke()}}),c.Rectangle=c.Element.extend({draw:function(){var a=this.ctx,b=this.width/2,c=this.x-b,d=this.x+b,e=this.base-(this.base-this.y),f=this.strokeWidth/2;this.showStroke&&(c+=f,d-=f,e+=f),a.beginPath(),a.fillStyle=this.fillColor,a.strokeStyle=this.strokeColor,a.lineWidth=this.strokeWidth,a.moveTo(c,this.base),a.lineTo(c,e),a.lineTo(d,e),a.lineTo(d,this.base),a.fill(),this.showStroke&&a.stroke()},height:function(){return this.base-this.y},inRange:function(a,b){return a>=this.x-this.width/2&&a<=this.x+this.width/2&&b>=this.y&&b<=this.base}}),c.Animation=c.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),c.Tooltip=c.Element.extend({draw:function(){var a=this.chart.ctx;a.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var b=this.caretPadding=2,c=a.measureText(this.text).width+2*this.xPadding,d=this.fontSize+2*this.yPadding,e=d+this.caretHeight+b;this.x+c/2>this.chart.width?this.xAlign="left":this.x-c/2<0&&(this.xAlign="right"),this.y-e<0&&(this.yAlign="below");var f=this.x-c/2,g=this.y-e;if(a.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":a.beginPath(),a.moveTo(this.x,this.y-b),a.lineTo(this.x+this.caretHeight,this.y-(b+this.caretHeight)),a.lineTo(this.x-this.caretHeight,this.y-(b+this.caretHeight)),a.closePath(),a.fill();break;case"below":g=this.y+b+this.caretHeight,a.beginPath(),a.moveTo(this.x,this.y+b),a.lineTo(this.x+this.caretHeight,this.y+b+this.caretHeight),a.lineTo(this.x-this.caretHeight,this.y+b+this.caretHeight),a.closePath(),a.fill()}switch(this.xAlign){case"left":f=this.x-c+(this.cornerRadius+this.caretHeight);break;case"right":f=this.x-(this.cornerRadius+this.caretHeight)}I(a,f,g,c,d,this.cornerRadius),a.fill(),a.fillStyle=this.textColor,a.textAlign="center",a.textBaseline="middle",a.fillText(this.text,f+c/2,g+d/2)}}}),c.MultiTooltip=c.Element.extend({initialize:function(){this.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=G(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.titleHeight=this.title?1.5*this.titleFontSize:0,this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+this.titleHeight,this.ctx.font=this.titleFont;var a=this.ctx.measureText(this.title).width,b=H(this.ctx,this.font,this.labels)+this.fontSize+3,c=p([b,a]);this.width=c+2*this.xPadding;var d=this.height/2;this.y-d<0?this.y=d:this.y+d>this.chart.height&&(this.y=this.chart.height-d),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(a){var b=this.y-this.height/2+this.yPadding,c=a-1;return 0===a?b+this.titleHeight/3:b+(1.5*this.fontSize*c+this.fontSize/2)+this.titleHeight},draw:function(){if(this.custom)this.custom(this);else{I(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var a=this.ctx;a.fillStyle=this.fillColor,a.fill(),a.closePath(),a.textAlign="left",a.textBaseline="middle",a.fillStyle=this.titleTextColor,a.font=this.titleFont,a.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),a.font=this.font,d.each(this.labels,function(b,c){a.fillStyle=this.textColor,a.fillText(b,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(c+1)),a.fillStyle=this.legendColorBackground,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize),a.fillStyle=this.legendColors[c].fill,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),c.Scale=c.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var a=r(this.stepValue),b=0;b<=this.steps;b++)this.yLabels.push(v(this.templateString,{value:(this.min+b*this.stepValue).toFixed(a)}));this.yLabelWidth=this.display&&this.showLabels?H(this.ctx,this.font,this.yLabels)+10:0},addXLabel:function(a){this.xLabels.push(a),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var a,b=this.endPoint,c=this.endPoint-this.startPoint;for(this.calculateYRange(c),this.buildYLabels(),this.calculateXLabelRotation();c>this.endPoint-this.startPoint;)c=this.endPoint-this.startPoint,a=this.yLabelWidth,this.calculateYRange(c),this.buildYLabels(),athis.yLabelWidth?b/2:this.yLabelWidth,this.xLabelRotation=0,this.display){var d,e=H(this.ctx,this.font,this.xLabels);this.xLabelWidth=e;for(var f=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>f&&0===this.xLabelRotation||this.xLabelWidth>f&&this.xLabelRotation<=90&&this.xLabelRotation>0;)d=Math.cos(s(this.xLabelRotation)),a=d*b,d*c,a+this.fontSize/2>this.yLabelWidth&&(this.xScalePaddingLeft=a+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=d*e;this.xLabelRotation>0&&(this.endPoint-=Math.sin(s(this.xLabelRotation))*e+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:k,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(a){var b=this.drawingArea()/(this.min-this.max);return this.endPoint-b*(a-this.min)},calculateX:function(a){var b=(this.xLabelRotation,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),c=b/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),d=c*a+this.xScalePaddingLeft;return this.offsetGridLines&&(d+=c/2),Math.round(d)},update:function(a){d.extend(this,a),this.fit()},draw:function(){var a=this.ctx,b=(this.endPoint-this.startPoint)/this.steps,c=Math.round(this.xScalePaddingLeft);this.display&&(a.fillStyle=this.textColor,a.font=this.font,e(this.yLabels,function(e,f){var g=this.endPoint-b*f,h=Math.round(g),i=this.showHorizontalLines;a.textAlign="right",a.textBaseline="middle",this.showLabels&&a.fillText(e,c-10,g),0!==f||i||(i=!0),i&&a.beginPath(),f>0?(a.lineWidth=this.gridLineWidth,a.strokeStyle=this.gridLineColor):(a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor),h+=d.aliasPixel(a.lineWidth),i&&(a.moveTo(c,h),a.lineTo(this.width,h),a.stroke(),a.closePath()),a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor,a.beginPath(),a.moveTo(c-5,h),a.lineTo(c,h),a.stroke(),a.closePath()},this),e(this.xLabels,function(b,c){var d=this.calculateX(c)+t(this.lineWidth),e=this.calculateX(c-(this.offsetGridLines?.5:0))+t(this.lineWidth),f=this.xLabelRotation>0,g=this.showVerticalLines;0!==c||g||(g=!0),g&&a.beginPath(),c>0?(a.lineWidth=this.gridLineWidth,a.strokeStyle=this.gridLineColor):(a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor),g&&(a.moveTo(e,this.endPoint),a.lineTo(e,this.startPoint-3),a.stroke(),a.closePath()),a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor,a.beginPath(),a.moveTo(e,this.endPoint),a.lineTo(e,this.endPoint+5),a.stroke(),a.closePath(),a.save(),a.translate(d,f?this.endPoint+12:this.endPoint+8),a.rotate(-1*s(this.xLabelRotation)),a.font=this.font,a.textAlign=f?"right":"center",a.textBaseline=f?"middle":"top",a.fillText(b,0,0),a.restore()},this))}}),c.RadialScale=c.Element.extend({initialize:function(){this.size=q([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(a){var b=this.drawingArea/(this.max-this.min) ;return(a-this.min)*b},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var a=r(this.stepValue),b=0;b<=this.steps;b++)this.yLabels.push(v(this.templateString,{value:(this.min+b*this.stepValue).toFixed(a)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var a,b,c,d,e,f,g,h,i,j,k,l,m=q([this.height/2-this.pointLabelFontSize-5,this.width/2]),n=this.width,p=0;for(this.ctx.font=G(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),b=0;bn&&(n=a.x+d,e=b),a.x-dn&&(n=a.x+c,e=b):b>this.valuesCount/2&&a.x-c0){var d,e=c*(this.drawingArea/this.steps),f=this.yCenter-e;if(this.lineWidth>0)if(a.strokeStyle=this.lineColor,a.lineWidth=this.lineWidth,this.lineArc)a.beginPath(),a.arc(this.xCenter,this.yCenter,e,0,2*Math.PI),a.closePath(),a.stroke();else{a.beginPath();for(var g=0;g=0;b--){var c=null,d=null;if(this.angleLineWidth>0&&(c=this.calculateCenterOffset(this.max),d=this.getPointPosition(b,c),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(d.x,d.y),a.stroke(),a.closePath()),this.backgroundColors&&this.backgroundColors.length==this.valuesCount){null==c&&(c=this.calculateCenterOffset(this.max)),null==d&&(d=this.getPointPosition(b,c));var f=this.getPointPosition(0===b?this.valuesCount-1:b-1,c),g=this.getPointPosition(b===this.valuesCount-1?0:b+1,c),h={x:(f.x+d.x)/2,y:(f.y+d.y)/2},i={x:(d.x+g.x)/2,y:(d.y+g.y)/2};a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(h.x,h.y),a.lineTo(d.x,d.y),a.lineTo(i.x,i.y),a.fillStyle=this.backgroundColors[b],a.fill(),a.closePath()}var j=this.getPointPosition(b,this.calculateCenterOffset(this.max)+5);a.font=G(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),a.fillStyle=this.pointLabelFontColor;var k=this.labels.length,l=this.labels.length/2,m=l/2,n=bk-m,o=b===m||b===k-m;a.textAlign=0===b?"center":b===l?"center":b1&&(b=Math.floor(this.dropFrames),this.dropFrames-=b);for(var c=0;cthis.animations[c].animationObject.numSteps&&(this.animations[c].animationObject.currentStep=this.animations[c].animationObject.numSteps),this.animations[c].animationObject.render(this.animations[c].chartInstance,this.animations[c].animationObject),this.animations[c].animationObject.currentStep==this.animations[c].animationObject.numSteps&&(this.animations[c].animationObject.onAnimationComplete.call(this.animations[c].chartInstance),this.animations.splice(c,1),c--);var e=Date.now(),f=e-a-this.frameDuration,g=f/this.frameDuration;g>1&&(this.dropFrames+=g),this.animations.length>0&&d.requestAnimFrame.call(window,this.digestWrapper)}},d.addEvent(window,"resize",function(){var a;return function(){clearTimeout(a),a=setTimeout(function(){e(c.instances,function(a){a.options.responsive&&a.resize(a.render,!0)})},50)}}()),n?define(function(){return c}):"object"==typeof module&&module.exports&&(module.exports=c),a.Chart=c,c.noConflict=function(){return a.Chart=b,c}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'
    <% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>
'};b.Type.extend({name:"Bar",defaults:d,initialize:function(a){var d=this.options;this.ScaleClass=b.Scale.extend({offsetGridLines:!0,calculateBarX:function(a,b,c){var e=this.calculateBaseWidth(),f=this.calculateX(c)-e/2,g=this.calculateBarWidth(a);return f+g*b+b*d.barDatasetSpacing+g/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*d.barValueSpacing},calculateBarWidth:function(a){return(this.calculateBaseWidth()-(a-1)*d.barDatasetSpacing)/a}}),this.datasets=[],this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getBarsAtEvent(a):[];this.eachBars(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),this.BarClass=b.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),c.each(a.datasets,function(b,d){var e={label:b.label||null,fillColor:b.fillColor,strokeColor:b.strokeColor,bars:[]};this.datasets.push(e),c.each(b.data,function(c,d){e.bars.push(new this.BarClass({value:c,label:a.labels[d],datasetLabel:b.label,strokeColor:b.strokeColor,fillColor:b.fillColor,highlightFill:b.highlightFill||b.fillColor,highlightStroke:b.highlightStroke||b.strokeColor}))},this)},this),this.buildScale(a.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(a,b,d){c.extend(a,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,d,b),y:this.scale.endPoint}),a.save()},this),this.render()},update:function(){this.scale.update(),c.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachBars(function(a){a.save()}),this.render()},eachBars:function(a){c.each(this.datasets,function(b,d){c.each(b.bars,a,this,d)},this)},getBarsAtEvent:function(a){for(var b,d=[],e=c.getRelativePosition(a),f=function(a){d.push(a.bars[b])},g=0;g<% for (var i=0; i
  • <%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>'};b.Type.extend({name:"Doughnut",defaults:d,initialize:function(a){this.segments=[],this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=b.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getSegmentsAtEvent(a):[];c.each(this.segments,function(a){a.restore(["fillColor"])}),c.each(b,function(a){a.fillColor=a.highlightColor}),this.showTooltip(b)}),this.calculateTotal(a),c.each(a,function(b,c){b.color||(b.color="hsl("+360*c/a.length+", 100%, 50%)"),this.addData(b,c,!0)},this),this.render()},getSegmentsAtEvent:function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.segments,function(a){a.inRange(d.x,d.y)&&b.push(a)},this),b},addData:function(a,c,d){var e=void 0!==c?c:this.segments.length;void 0===a.color&&(a.color=b.defaults.global.segmentColorDefault[e%b.defaults.global.segmentColorDefault.length],a.highlight=b.defaults.global.segmentHighlightColorDefaults[e%b.defaults.global.segmentHighlightColorDefaults.length]),this.segments.splice(e,0,new this.SegmentArc({value:a.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:a.color,highlightColor:a.highlight||a.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(a.value),label:a.label})),d||(this.reflow(),this.update())},calculateCircumference:function(a){return this.total>0?2*Math.PI*(a/this.total):0},calculateTotal:function(a){this.total=0,c.each(a,function(a){this.total+=Math.abs(a.value)},this)},update:function(){this.calculateTotal(this.segments),c.each(this.activeElements,function(a){a.restore(["fillColor"])}),c.each(this.segments,function(a){a.save()}),this.render()},removeData:function(a){var b=c.isNumber(a)?a:this.segments.length-1;this.segments.splice(b,1),this.reflow(),this.update()},reflow:function(){c.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,c.each(this.segments,function(a){a.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(a){var b=a||1;this.clear(),c.each(this.segments,function(a,c){a.transition({circumference:this.calculateCircumference(a.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},b),a.endAngle=a.startAngle+a.circumference,a.draw(),0===c&&(a.startAngle=1.5*Math.PI),c<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>',offsetGridLines:!1};b.Type.extend({name:"Line",defaults:d,initialize:function(a){this.PointClass=b.Point.extend({offsetGridLines:this.options.offsetGridLines,strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(a){return Math.pow(a-this.x,2)0&&bthis.scale.endPoint?a.controlPoints.outer.y=this.scale.endPoint:a.controlPoints.outer.ythis.scale.endPoint?a.controlPoints.inner.y=this.scale.endPoint:a.controlPoints.inner.y0&&(d.lineTo(h[h.length-1].x,this.scale.endPoint),d.lineTo(h[0].x,this.scale.endPoint),d.fillStyle=a.fillColor,d.closePath(),d.fill()),c.each(h,function(a){a.draw()})},this))}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'
      <% for (var i=0; i
    • <%if(segments[i].label){%><%=segments[i].label%><%}%>
    • <%}%>
    '};b.Type.extend({name:"PolarArea",defaults:d,initialize:function(a){this.segments=[],this.SegmentArc=b.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new b.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:a.length}),this.updateScaleRange(a),this.scale.update(),c.each(a,function(a,b){this.addData(a,b,!0)},this),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getSegmentsAtEvent(a):[];c.each(this.segments,function(a){a.restore(["fillColor"])}),c.each(b,function(a){a.fillColor=a.highlightColor}),this.showTooltip(b)}),this.render()},getSegmentsAtEvent:function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.segments,function(a){a.inRange(d.x,d.y)&&b.push(a)},this),b},addData:function(a,b,c){var d=b||this.segments.length;this.segments.splice(d,0,new this.SegmentArc({fillColor:a.color,highlightColor:a.highlight||a.color,label:a.label,value:a.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(a.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),c||(this.reflow(),this.update())},removeData:function(a){var b=c.isNumber(a)?a:this.segments.length-1;this.segments.splice(b,1),this.reflow(),this.update()},calculateTotal:function(a){this.total=0,c.each(a,function(a){this.total+=a.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(a){var b=[];c.each(a,function(a){b.push(a.value)});var d=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:c.calculateScaleRange(b,c.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);c.extend(this.scale,d,{size:c.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),c.each(this.segments,function(a){a.save()}),this.reflow(),this.render()},reflow:function(){c.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),c.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),c.each(this.segments,function(a){a.update({outerRadius:this.scale.calculateCenterOffset(a.value)})},this)},draw:function(a){var b=a||1;this.clear(),c.each(this.segments,function(a,c){a.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(a.value)},b),a.endAngle=a.startAngle+a.circumference,0===c&&(a.startAngle=1.5*Math.PI),c<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'},initialize:function(a){this.PointClass=b.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(a),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getPointsAtEvent(a):[];this.eachPoints(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),c.each(a.datasets,function(b){var d={label:b.label||null,fillColor:b.fillColor,strokeColor:b.strokeColor,pointColor:b.pointColor,pointStrokeColor:b.pointStrokeColor,points:[]};this.datasets.push(d),c.each(b.data,function(c,e){var f;this.scale.animation||(f=this.scale.getPointPosition(e,this.scale.calculateCenterOffset(c))),d.points.push(new this.PointClass({value:c,label:a.labels[e],datasetLabel:b.label,x:this.options.animation?this.scale.xCenter:f.x,y:this.options.animation?this.scale.yCenter:f.y,strokeColor:b.pointStrokeColor,fillColor:b.pointColor,highlightFill:b.pointHighlightFill||b.pointColor,highlightStroke:b.pointHighlightStroke||b.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(a){c.each(this.datasets,function(b){c.each(b.points,a,this)},this)},getPointsAtEvent:function(a){var b=c.getRelativePosition(a),d=c.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},b),e=2*Math.PI/this.scale.valuesCount,f=Math.round((d.angle-1.5*Math.PI)/e),g=[];return(f>=this.scale.valuesCount||f<0)&&(f=0),d.distance<=this.scale.drawingArea&&c.each(this.datasets,function(a){g.push(a.points[f])}),g},buildScale:function(a){this.scale=new b.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backgroundColors:this.options.scaleBackgroundColors,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:a.labels,valuesCount:a.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(a.datasets),this.scale.buildYLabels()},updateScaleRange:function(a){var b=function(){var b=[];return c.each(a,function(a){a.data?b=b.concat(a.data):c.each(a.points,function(a){b.push(a.value)})}),b}(),d=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:c.calculateScaleRange(b,c.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);c.extend(this.scale,d)},addData:function(a,b){this.scale.valuesCount++,c.each(a,function(a,c){var d=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(a));this.datasets[c].points.push(new this.PointClass({value:a,label:b,datasetLabel:this.datasets[c].label,x:d.x,y:d.y,strokeColor:this.datasets[c].pointStrokeColor,fillColor:this.datasets[c].pointColor}))},this),this.scale.labels.push(b),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),c.each(this.datasets,function(a){a.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(a){a.save()}),this.reflow(),this.render()},reflow:function(){c.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:c.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(a){var b=a||1,d=this.chart.ctx;this.clear(),this.scale.draw(),c.each(this.datasets,function(a){c.each(a.points,function(a,c){a.hasValue()&&a.transition(this.scale.getPointPosition(c,this.scale.calculateCenterOffset(a.value)),b)},this),d.lineWidth=this.options.datasetStrokeWidth,d.strokeStyle=a.strokeColor,d.beginPath(),c.each(a.points,function(a,b){0===b?d.moveTo(a.x,a.y):d.lineTo(a.x,a.y)},this),d.closePath(),d.stroke(),d.fillStyle=a.fillColor,this.options.datasetFill&&d.fill(),c.each(a.points,function(a){a.hasValue()&&a.draw()})},this)}})}.call(this),function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;b=0)return b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;b=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}.call(this),$(window).scroll(function(){$(".navbar").offset()&&($(".navbar").offset().top>50?$(".scrolling-navbar").addClass("top-nav-collapse"):$(".scrolling-navbar").removeClass("top-nav-collapse"))}),$(function(){$("a.page-scroll").bind("click",function(a){var b=$(this);$("html, body").stop().animate({scrollTop:$(b.attr("href")).offset().top},1500,"easeInOutExpo"),a.preventDefault()})}),function(a,b){"use strict";"function"==typeof define&&define.amd?define([],function(){return b.apply(a)}):"object"==typeof exports?module.exports=b.call(a):a.Waves=b.call(a)}("object"==typeof global?global:this,function(){"use strict";function a(a){return null!==a&&a===a.window}function b(b){return a(b)?b:9===b.nodeType&&b.defaultView}function c(a){var b=typeof a;return"function"===b||"object"===b&&!!a}function d(a){return c(a)&&a.nodeType>0}function e(a){var b=m.call(a);return"[object String]"===b?l(a):c(a)&&/^\[object (Array|HTMLCollection|NodeList|Object)\]$/.test(b)&&a.hasOwnProperty("length")?a:d(a)?[a]:[]}function f(a){var c,d,e={top:0,left:0},f=a&&a.ownerDocument;return c=f.documentElement,void 0!==a.getBoundingClientRect&&(e=a.getBoundingClientRect()),d=b(f),{top:e.top+d.pageYOffset-c.clientTop,left:e.left+d.pageXOffset-c.clientLeft}}function g(a){var b="";for(var c in a)a.hasOwnProperty(c)&&(b+=c+":"+a[c]+";");return b}function h(a,b,c){if(c){c.classList.remove("waves-rippling");var d=c.getAttribute("data-x"),e=c.getAttribute("data-y"),f=c.getAttribute("data-scale"),h=c.getAttribute("data-translate"),i=Date.now()-Number(c.getAttribute("data-hold")),j=350-i;j<0&&(j=0),"mousemove"===a.type&&(j=150);var k="mousemove"===a.type?2500:o.duration;setTimeout(function(){var a={top:e+"px",left:d+"px",opacity:"0","-webkit-transition-duration":k+"ms","-moz-transition-duration":k+"ms","-o-transition-duration":k+"ms","transition-duration":k+"ms","-webkit-transform":f+" "+h,"-moz-transform":f+" "+h,"-ms-transform":f+" "+h,"-o-transform":f+" "+h,transform:f+" "+h};c.setAttribute("style",g(a)),setTimeout(function(){try{b.removeChild(c)}catch(a){return!1}},k)},j)}}function i(a){if(!1===q.allowEvent(a))return null;for(var b=null,c=a.target||a.srcElement;null!==c.parentElement;){if(c.classList.contains("waves-effect")&&!(c instanceof SVGElement)){b=c;break}c=c.parentElement}return b}function j(a){var b=i(a);if(null!==b){if(b.disabled||b.getAttribute("disabled")||b.classList.contains("disabled"))return;if(q.registerEvent(a),"touchstart"===a.type&&o.delay){var c=!1,d=setTimeout(function(){d=null,o.show(a,b)},o.delay),e=function(e){d&&(clearTimeout(d),d=null,o.show(a,b)),c||(c=!0,o.hide(e,b))},f=function(a){d&&(clearTimeout(d),d=null),e(a)};b.addEventListener("touchmove",f,!1),b.addEventListener("touchend",e,!1),b.addEventListener("touchcancel",e,!1)}else o.show(a,b),n&&(b.addEventListener("touchend",o.hide,!1),b.addEventListener("touchcancel",o.hide,!1)),b.addEventListener("mouseup",o.hide,!1),b.addEventListener("mouseleave",o.hide,!1)}}var k=k||{},l=document.querySelectorAll.bind(document),m=Object.prototype.toString,n="ontouchstart"in window,o={duration:750,delay:200,show:function(a,b,c){if(2===a.button)return!1;b=b||this;var d=document.createElement("div");d.className="waves-ripple waves-rippling",b.appendChild(d);var e=f(b),h=0,i=0;"touches"in a&&a.touches.length?(h=a.touches[0].pageY-e.top,i=a.touches[0].pageX-e.left):(h=a.pageY-e.top,i=a.pageX-e.left),i=i>=0?i:0,h=h>=0?h:0;var j="scale("+b.clientWidth/100*3+")",k="translate(0,0)";c&&(k="translate("+c.x+"px, "+c.y+"px)"),d.setAttribute("data-hold",Date.now()),d.setAttribute("data-x",i),d.setAttribute("data-y",h),d.setAttribute("data-scale",j),d.setAttribute("data-translate",k);var l={top:h+"px",left:i+"px"};d.classList.add("waves-notransition"),d.setAttribute("style",g(l)),d.classList.remove("waves-notransition"),l["-webkit-transform"]=j+" "+k,l["-moz-transform"]=j+" "+k,l["-ms-transform"]=j+" "+k,l["-o-transform"]=j+" "+k,l.transform=j+" "+k,l.opacity="1";var m="mousemove"===a.type?2500:o.duration;l["-webkit-transition-duration"]=m+"ms",l["-moz-transition-duration"]=m+"ms",l["-o-transition-duration"]=m+"ms",l["transition-duration"]=m+"ms",d.setAttribute("style",g(l))},hide:function(a,b){b=b||this;for(var c=b.getElementsByClassName("waves-rippling"),d=0,e=c.length;d=0&&null!==b.wait){var l={type:"mouseup",button:1};setTimeout(function(a,b){return function(){o.hide(a,b)}}(l,d),b.wait)}},k.calm=function(a){a=e(a);for(var b={type:"mouseup",button:1},c=0,d=a.length;c a").on("click",function(b){b.preventDefault(),a(this).parent().find("div").toggleClass("social-reveal-active"),a(this).toggleClass("share-expanded")})}),function(a){function b(){var b=+a(this).attr("length"),c=+a(this).val().length,d=c<=b;a(this).parent().find('span[class="character-counter"]').html(c+"/"+b),e(d,a(this))}function c(b){var c=a("").addClass("character-counter").css("float","right").css("font-size","12px").css("height",1);b.parent().append(c)}function d(){a(this).parent().find('span[class="character-counter"]').html("")}function e(a,b){var c=b.hasClass("invalid");a&&c?b.removeClass("invalid"):a||c||(b.removeClass("valid"),b.addClass("invalid"))}a.fn.characterCounter=function(){return this.each(function(){void 0!==a(this).attr("length")&&(a(this).on("input",b),a(this).on("focus",b),a(this).on("blur",d),c(a(this)))})},a(document).ready(function(){a("input, textarea").characterCounter()})}(jQuery),function(a){a(["jquery"],function(a){return function(){function b(a,b,c){return o({type:v.error,iconClass:p().iconClasses.error,message:a,optionsOverride:c,title:b})}function c(b,c){return b||(b=p()),r=a("#"+b.containerId),r.length?r:(c&&(r=l(b)),r)}function d(a,b,c){return o({type:v.info,iconClass:p().iconClasses.info,message:a,optionsOverride:c,title:b})}function e(a){s=a}function f(a,b,c){return o({type:v.success,iconClass:p().iconClasses.success,message:a,optionsOverride:c,title:b})}function g(a,b,c){return o({type:v.warning,iconClass:p().iconClasses.warning,message:a,optionsOverride:c,title:b})}function h(a,b){var d=p();r||c(d),k(a,d,b)||j(d)}function i(b){var d=p();if(r||c(d),b&&0===a(":focus",b).length)return void q(b);r.children().length&&r.remove()}function j(b){for(var c=r.children(),d=c.length-1;d>=0;d--)k(a(c[d]),b)}function k(b,c,d){var e=!(!d||!d.force)&&d.force;return!(!b||!e&&0!==a(":focus",b).length)&&(b[c.hideMethod]({duration:c.hideDuration,easing:c.hideEasing,complete:function(){q(b)}}),!0)}function l(b){return r=a("
    ").attr("id",b.containerId).addClass(b.positionClass).attr("aria-live","polite").attr("role","alert"),r.appendTo(a(b.target)),r}function m(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function n(a){s&&s(a)}function o(b){function d(a){return null==a&&(a=""),new String(a).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function e(){b.iconClass&&x.addClass(s.toastClass).addClass(v)}function f(){s.newestOnTop?r.prepend(x):r.append(x)}function g(){b.title&&(y.append(s.escapeHtml?d(b.title):b.title).addClass(s.titleClass),x.append(y))}function h(){b.message&&(z.append(s.escapeHtml?d(b.message):b.message).addClass(s.messageClass),x.append(z))}function i(){s.closeButton&&(B.addClass("toast-close-button").attr("role","button"),x.prepend(B))}function j(){s.progressBar&&(A.addClass("toast-progress"),x.prepend(A))}function k(b){var c=b&&!1!==s.closeMethod?s.closeMethod:s.hideMethod,d=b&&!1!==s.closeDuration?s.closeDuration:s.hideDuration,e=b&&!1!==s.closeEasing?s.closeEasing:s.hideEasing;if(!a(":focus",x).length||b)return clearTimeout(C.intervalId),x[c]({duration:d,easing:e,complete:function(){q(x),s.onHidden&&"hidden"!==D.state&&s.onHidden(),D.state="hidden",D.endTime=new Date,n(D)}})}function l(){(s.timeOut>0||s.extendedTimeOut>0)&&(w=setTimeout(k,s.extendedTimeOut),C.maxHideTime=parseFloat(s.extendedTimeOut),C.hideEta=(new Date).getTime()+C.maxHideTime)}function m(){clearTimeout(w),C.hideEta=0,x.stop(!0,!0)[s.showMethod]({duration:s.showDuration,easing:s.showEasing})}function o(){var a=(C.hideEta-(new Date).getTime())/C.maxHideTime*100;A.width(a+"%")}var s=p(),v=b.iconClass||s.iconClass;if(void 0!==b.optionsOverride&&(s=a.extend(s,b.optionsOverride),v=b.optionsOverride.iconClass||v),!function(a,b){if(a.preventDuplicates){if(b.message===t)return!0;t=b.message}return!1}(s,b)){u++,r=c(s,!0);var w=null,x=a("
    "),y=a("
    "),z=a("
    "),A=a("
    "),B=a(s.closeHtml),C={intervalId:null,hideEta:null,maxHideTime:null},D={toastId:u,state:"visible",startTime:new Date,options:s,map:b};return function(){e(),g(),h(),i(),j(),f()}(),function(){x.hide(),x[s.showMethod]({duration:s.showDuration,easing:s.showEasing,complete:s.onShown}),s.timeOut>0&&(w=setTimeout(k,s.timeOut),C.maxHideTime=parseFloat(s.timeOut),C.hideEta=(new Date).getTime()+C.maxHideTime,s.progressBar&&(C.intervalId=setInterval(o,10)))}(),function(){x.hover(m,l),!s.onclick&&s.tapToDismiss&&x.click(k),s.closeButton&&B&&B.click(function(a){a.stopPropagation?a.stopPropagation():void 0!==a.cancelBubble&&!0!==a.cancelBubble&&(a.cancelBubble=!0),k(!0)}),s.onclick&&x.click(function(a){s.onclick(a),k()})}(),n(D),s.debug&&console,x}}function p(){return a.extend({},m(),w.options)}function q(a){r||(r=c()),a.is(":visible")||(a.remove(),a=null,0===r.children().length&&(r.remove(),t=void 0))}var r,s,t,u=0,v={error:"error",info:"info",success:"success",warning:"warning"},w={clear:h,remove:i,error:b,getContainer:c,info:d,options:{},subscribe:e,success:f,version:"2.1.2",warning:g};return w}()})}("function"==typeof define&&define.amd?define:function(a,b){"undefined"!=typeof module&&module.exports?module.exports=b(require("jquery")):window.toastr=b(window.jQuery)}),$(".smooth-scroll").on("click","a",function(a){a.preventDefault();var b=$(this).attr("href"),c=$(this).attr("data-offset")?$(this).attr("data-offset"):0;$("body,html").animate({scrollTop:$(b).offset().top-c},700)}),function(a){a.fn.scrollTo=function(b){return a(this).scrollTop(a(this).scrollTop()-a(this).offset().top+a(b).offset().top),this},a.fn.dropdown=function(b){var c={inDuration:300,outDuration:225,constrain_width:!0,hover:!1,gutter:0,belowOrigin:!1,alignment:"left"};this.each(function(){function d(){void 0!==g.data("induration")&&(h.inDuration=g.data("inDuration")),void 0!==g.data("outduration")&&(h.outDuration=g.data("outDuration")),void 0!==g.data("constrainwidth")&&(h.constrain_width=g.data("constrainwidth")),void 0!==g.data("hover")&&(h.hover=g.data("hover")),void 0!==g.data("gutter")&&(h.gutter=g.data("gutter")),void 0!==g.data("beloworigin")&&(h.belowOrigin=g.data("beloworigin")),void 0!==g.data("alignment")&&(h.alignment=g.data("alignment"))}function e(b){"focus"===b&&(i=!0),d(),j.addClass("active"),g.addClass("active"),!0===h.constrain_width?j.css("width",g.outerWidth()):j.css("white-space","nowrap");var c=window.innerHeight,e=g.innerHeight(),f=g.offset().left,k=g.offset().top-a(window).scrollTop(),l=h.alignment,m=0,n=0,o=0;!0===h.belowOrigin&&(o=e);var p=0,q=g.parent();if(!q.is("body")&&q[0].scrollHeight>q[0].clientHeight&&(p=q[0].scrollTop),f+j.innerWidth()>a(window).width()?l="right":f-j.innerWidth()+g.innerWidth()<0&&(l="left"),k+j.innerHeight()>c)if(k+e-j.innerHeight()<0){var r=c-k-o;j.css("max-height",r)}else o||(o+=e),o-=j.innerHeight();if("left"===l)m=h.gutter,n=g.position().left+m;else if("right"===l){var s=g.position().left+g.outerWidth()-j.outerWidth();m=-h.gutter,n=s+m}j.css({position:"absolute",top:g.position().top+o+p,left:n}),j.stop(!0,!0).css("opacity",0).slideDown({queue:!1,duration:h.inDuration,easing:"easeOutCubic",complete:function(){a(this).css("height","")}}).animate({opacity:1},{queue:!1,duration:h.inDuration,easing:"easeOutSine"})}function f(){i=!1,j.fadeOut(h.outDuration),j.removeClass("active"),g.removeClass("active"),setTimeout(function(){j.css("max-height","")},h.outDuration)}var g=a(this),h=a.extend({},c,b),i=!1,j=a("#"+g.attr("data-activates"));if(d(),g.after(j),h.hover){var k=!1;g.unbind("click."+g.attr("id")),g.on("mouseenter",function(a){!1===k&&(e(),k=!0)}),g.on("mouseleave",function(b){var c=b.toElement||b.relatedTarget;a(c).closest(".dropdown-content").is(j)||(j.stop(!0,!0),f(),k=!1)}),j.on("mouseleave",function(b){var c=b.toElement||b.relatedTarget;a(c).closest(".dropdown-button").is(g)||(j.stop(!0,!0),f(),k=!1)})}else g.unbind("click."+g.attr("id")),g.bind("click."+g.attr("id"),function(b){i||(g[0]!=b.currentTarget||g.hasClass("active")||0!==a(b.target).closest(".dropdown-content").length?g.hasClass("active")&&(f(),a(document).unbind("click."+j.attr("id")+" touchstart."+j.attr("id"))):(b.preventDefault(),e("click")),j.hasClass("active")&&a(document).bind("click."+j.attr("id")+" touchstart."+j.attr("id"),function(b){j.is(b.target)||g.is(b.target)||g.find(b.target).length||(f(),a(document).unbind("click."+j.attr("id")+" touchstart."+j.attr("id")))}))});g.on("open",function(a,b){e(b)}),g.on("close",f)})},a(document).ready(function(){a(".dropdown-button").dropdown()})}(jQuery);var dropdownSelectors=$(".dropdown, .dropup");dropdownSelectors.on({"show.bs.dropdown":function(){var a=dropdownEffectData(this);dropdownEffectStart(a,a.effectIn)},"shown.bs.dropdown":function(){var a=dropdownEffectData(this);a.effectIn&&a.effectOut&&dropdownEffectEnd(a,function(){})},"hide.bs.dropdown":function(a){var b=dropdownEffectData(this);b.effectOut&&(a.preventDefault(),dropdownEffectStart(b,b.effectOut),dropdownEffectEnd(b,function(){b.dropdown.removeClass("open"),b.dropdown.removeClass("show")}))}}),$(".rotate-btn").on("click",function(){var a=$(this).attr("data-card");$("#"+a).toggleClass("flipped")}),function(a){function b(b){if($this=b,!1===$this.hasClass("active")){$this.addClass("active"),$this.find("ul .btn-floating").velocity({scaleY:".4",scaleX:".4",translateY:"40px"},{duration:0});var c=0;$this.find("ul .btn-floating").reverse().each(function(){a(this).velocity({opacity:"1",scaleX:"1",scaleY:"1",translateY:"0"},{duration:80,delay:c}),c+=40})}else{$this.removeClass("active");var c=0;$this.find("ul .btn-floating").velocity("stop",!0),$this.find("ul .btn-floating").velocity({opacity:"0",scaleX:".4",scaleY:".4",translateY:"40px"},{duration:80})}}a(document).ready(function(){a.fn.reverse=[].reverse,a(document).on("mouseenter.fixedActionBtn",".fixed-action-btn:not(.click-to-toggle)",function(b){var d=a(this);c(d)}),a(document).on("mouseleave.fixedActionBtn",".fixed-action-btn:not(.click-to-toggle)",function(b){var c=a(this);d(c)}),a(document).on("click.fixedActionBtn",".fixed-action-btn.click-to-toggle > a",function(b){var e=a(this),f=e.parent();f.hasClass("active")?d(f):c(f)})}),a.fn.extend({openFAB:function(){c(a(this))},closeFAB:function(){d(a(this))}});var c=function(b){if($this=b,!1===$this.hasClass("active")){var c,d,e=$this.hasClass("horizontal");!0===e?d=40:c=40,$this.addClass("active"),$this.find("ul .btn-floating").velocity({scaleY:".4",scaleX:".4",translateY:c+"px",translateX:d+"px"},{duration:0});var f=0;$this.find("ul .btn-floating").reverse().each(function(){a(this).velocity({opacity:"1",scaleX:"1",scaleY:"1",translateY:"0",translateX:"0"},{duration:80,delay:f}),f+=40})}},d=function(a){$this=a;var b,c,d=$this.hasClass("horizontal");!0===d?c=40:b=40,$this.removeClass("active");$this.find("ul .btn-floating").velocity("stop",!0),$this.find("ul .btn-floating").velocity({opacity:"0",scaleX:".4",scaleY:".4",translateY:b+"px",translateX:c+"px"},{duration:80})};a(".fixed-action-btn").on({click:function(c){return c.preventDefault(),b(a(".fixed-action-btn")),!1}})}(jQuery),function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(j(a,c),b)}function f(a,b,c){return!!Array.isArray(a)&&(g(a,c[b],c),!0)}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&ka(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==na?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),function(b){a.addEventListener(b,c,!1)})}function n(a,b,c){g(q(b),function(b){a.removeEventListener(b,c,!1)})}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=qa(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=pa(j.x)>pa(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};b.eventType!==za&&f.eventType!==Ba||(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Ca&&(i>ya||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=pa(l.x)>pa(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;c=pa(b)?a<0?Ea:Fa:b<0?Ga:Ha}function H(a,b,c){c||(c=La);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=La);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Ma)+I(a[1],a[0],Ma)}function K(a,b){return H(b[0],b[1],Ma)/H(a[0],a[1],Ma)}function L(){this.evEl=Oa,this.evWin=Pa,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Sa,this.evWin=Ta,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=Va,this.evWin=Wa,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Ba|Ca)&&(c=t(c.concat(d),"identifier",!0)),[c,d]}function P(){this.evTarget=Ya,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(za|Aa)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return o(a.target,i)}),b===za)for(e=0;e-1&&d.splice(a,1)};setTimeout(e,Za)}}function U(a){ for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;d=kb&&b(c.options.event+Y(d))},tryEmit:function(a){if(this.canEmit())return this.emit(a);this.state=32},canEmit:function(){for(var a=0;ab.threshold&&e&b.direction},attrTest:function(a){return _.prototype.attrTest.call(this,a)&&(this.state&ib||!(this.state&ib)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=Z(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i(ba,_,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[db]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&ib)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(ca,X,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[bb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Ba|Ca)&&!f)this.reset();else if(a.eventType&za)this.reset(),this._timer=e(function(){this.state=lb,this.tryEmit()},b.time,this);else if(a.eventType&Ba)return lb;return 32},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===lb&&(a&&a.eventType&Ba?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=qa(),this.manager.emit(this.options.event,this._input)))}}),i(da,_,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[db]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&ib)}}),i(ea,_,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ia|Ja,pointers:1},getTouchAction:function(){return aa.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Ia|Ja)?b=a.overallVelocity:c&Ia?b=a.overallVelocityX:c&Ja&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&pa(b)>this.options.velocity&&a.eventType&Ba},emit:function(a){var b=Z(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(fa,X,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[cb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance
    ');a("body").append(f),"left"==b.edge?(e.css("transform","translateX(-100%)"),f.css({left:0})):(e.addClass("right-aligned").css("transform","translateX(100%)"),f.css({right:0})),e.hasClass("fixed")&&window.innerWidth>1440&&e.css("transform","translateX(0)"),e.hasClass("fixed")&&a(window).resize(function(){window.innerWidth>1440?0!=a("#sidenav-overlay").length&&h?c(!0):e.css("transform","translateX(0%)"):!1===h&&("left"===b.edge?e.css("transform","translateX(-100%)"):e.css("transform","translateX(100%)"))}),!0===b.closeOnClick&&e.on("click.itemclick","a:not(.collapsible-header)",function(){c()});var g=!1,h=!1;f.on("click",function(){c()}),f.hammer({prevent_default:!1}).bind("pan",function(d){if("touch"==d.gesture.pointerType){var f=(d.gesture.direction,d.gesture.center.x),g=(d.gesture.center.y,d.gesture.velocityX,a("body")),i=g.innerWidth();if(g.css("overflow","hidden"),g.width(i),0===a("#sidenav-overlay").length){var j=a('
    ');j.css("opacity",0).click(function(){c()}),a("body").append(j)}if("left"===b.edge&&(f>b.menuWidth?f=b.menuWidth:f<0&&(f=0)),"left"===b.edge)f=b.menuWidth/2&&(h=!0),e.css("transform","translateX("+(f-b.menuWidth)+"px)");else{f=window.innerWidth-b.menuWidth/2&&(h=!1);var k=f-b.menuWidth/2;k<0&&(k=0),e.css("transform","translateX("+k+"px)")}var l;"left"===b.edge?(l=f/b.menuWidth,a("#sidenav-overlay").velocity({opacity:l},{duration:10,queue:!1,easing:"easeOutQuad"})):(l=Math.abs((f-window.innerWidth)/b.menuWidth),a("#sidenav-overlay").velocity({opacity:l},{duration:10,queue:!1,easing:"easeOutQuad"}))}}).bind("panend",function(c){if("touch"==c.gesture.pointerType){var d=c.gesture.velocityX,i=c.gesture.center.x,j=i-b.menuWidth,k=i-b.menuWidth/2;j>0&&(j=0),k<0&&(k=0),g=!1,"left"===b.edge?h&&d<=.3||d<-.5?(0!=j&&e.velocity({translateX:[0,j]},{duration:300,queue:!1,easing:"easeOutQuad"}),a("#sidenav-overlay").velocity({opacity:1},{duration:50,queue:!1,easing:"easeOutQuad"}),f.css({width:"50%",right:0,left:""})):(!h||d>.3)&&(a("body").css({overflow:"",width:""}),e.velocity({translateX:[-1*b.menuWidth-10,j]},{duration:200,queue:!1,easing:"easeOutQuad"}),a("#sidenav-overlay").velocity({opacity:0},{duration:200,queue:!1,easing:"easeOutQuad",complete:function(){a(this).remove()}}),f.css({width:"10px",right:"",left:0})):h&&d>=-.3||d>.5?(e.velocity({translateX:[0,k]},{duration:300,queue:!1,easing:"easeOutQuad"}),a("#sidenav-overlay").velocity({opacity:1},{duration:50,queue:!1,easing:"easeOutQuad"}),f.css({width:"50%",right:"",left:0})):(!h||d<-.3)&&(a("body").css({overflow:"",width:""}),e.velocity({translateX:[b.menuWidth+10,k]},{duration:200,queue:!1,easing:"easeOutQuad"}),a("#sidenav-overlay").velocity({opacity:0},{duration:200,queue:!1,easing:"easeOutQuad",complete:function(){a(this).remove()}}),f.css({width:"10px",right:0,left:""}))}}),d.click(function(){if(!0===h)h=!1,g=!1,c();else{var d=a("body"),i=d.innerWidth();d.css("overflow","hidden"),d.width(i),a("body").append(f),"left"===b.edge?(f.css({width:"50%",right:0,left:""}),e.velocity({translateX:[0,-1*b.menuWidth]},{duration:300,queue:!1,easing:"easeOutQuad"})):(f.css({width:"50%",right:"",left:0}),e.velocity({translateX:[0,b.menuWidth]},{duration:300,queue:!1,easing:"easeOutQuad"}));var j=a('
    ');j.css("opacity",0).click(function(){h=!1,g=!1,c(),j.velocity({opacity:0},{duration:300,queue:!1,easing:"easeOutQuad",complete:function(){a(this).remove()}})}),a("body").append(j),j.velocity({opacity:1},{duration:300,queue:!1,easing:"easeOutQuad",complete:function(){h=!0,g=!1}})}return!1})})},show:function(){this.trigger("click")},hide:function(){a("#sidenav-overlay").trigger("click")}};a.fn.sideNav=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist on jQuery.sideNav"):b.init.apply(this,arguments)}}(jQuery),function(a){a.fn.collapsible=function(b){var c={accordion:void 0};return b=a.extend(c,b),this.each(function(){function c(b){h=g.find("> li > .collapsible-header"),b.hasClass("active")?b.parent().addClass("active"):b.parent().removeClass("active"),b.parent().hasClass("active")?b.siblings(".collapsible-body").stop(!0,!1).slideDown({duration:350,easing:"easeOutQuart",queue:!1,complete:function(){a(this).css("height","")}}):b.siblings(".collapsible-body").stop(!0,!1).slideUp({duration:350,easing:"easeOutQuart",queue:!1,complete:function(){a(this).css("height","")}}),h.not(b).removeClass("active").parent().removeClass("active"),h.not(b).parent().children(".collapsible-body").stop(!0,!1).slideUp({duration:350,easing:"easeOutQuart",queue:!1,complete:function(){a(this).css("height","")}})}function d(b){b.hasClass("active")?b.parent().addClass("active"):b.parent().removeClass("active"),b.parent().hasClass("active")?b.siblings(".collapsible-body").stop(!0,!1).slideDown({duration:350,easing:"easeOutQuart",queue:!1,complete:function(){a(this).css("height","")}}):b.siblings(".collapsible-body").stop(!0,!1).slideUp({duration:350,easing:"easeOutQuart",queue:!1,complete:function(){a(this).css("height","")}})}function e(a){return f(a).length>0}function f(a){return a.closest("li > .collapsible-header")}var g=a(this),h=a(this).find("> li > .collapsible-header"),i=g.data("collapsible");g.off("click.collapse",".collapsible-header"),h.off("click.collapse"),b.accordion||"accordion"===i||void 0===i?(h=g.find("> li > .collapsible-header"),h.on("click.collapse",function(b){var d=a(b.target);e(d)&&(d=f(d)),d.toggleClass("active"),c(d)}),c(h.filter(".active").first())):h.each(function(){a(this).on("click.collapse",function(b){var c=a(b.target);e(c)&&(c=f(c)),c.toggleClass("active"),d(c)}),a(this).hasClass("active")&&d(a(this))})})},a(document).ready(function(){a(".collapsible").collapsible()})}(jQuery),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(0,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"object"==typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((b.rotate/180-.5)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=c<=0;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6==0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,b<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(a,b){},onStep:function(a,b,c){},onStop:function(a,b){}};if(void 0!==b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&void 0!==c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}}),$(function(){$("#accordion").on("show.bs.collapse",function(){$("#accordion .in").collapse("hide")})}),function(a){a(document).ready(function(){function b(b){var c=b.css("font-family"),e=b.css("font-size");e&&d.css("font-size",e),c&&d.css("font-family",c),"off"===b.attr("wrap")&&d.css("overflow-wrap","normal").css("white-space","pre"),d.text(b.val()+"\n");var f=d.html().replace(/\n/g,"
    ");d.html(f),b.is(":visible")?d.css("width",b.width()):d.css("width",a(window).width()/2),b.css("height",d.height())}Materialize.updateTextFields=function(){a("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea").each(function(b,c){a(c).val().length>0||c.autofocus||void 0!==a(this).attr("placeholder")||!0===a(c)[0].validity.badInput?a(this).siblings("label, i").addClass("active"):a(this).siblings("label, i").removeClass("active")})};var c="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea";a(document).on("change",c,function(){0===a(this).val().length&&void 0===a(this).attr("placeholder")||a(this).siblings("label").addClass("active"),validate_field(a(this))}),a(document).ready(function(){Materialize.updateTextFields()}),a(document).on("reset",function(b){var d=a(b.target);d.is("form")&&(d.find(c).removeClass("valid").removeClass("invalid"),d.find(c).each(function(){""===a(this).attr("value")&&a(this).siblings("label, i").removeClass("active")}),d.find("select.initialized").each(function(){var a=d.find("option[selected]").text();d.siblings("input.select-dropdown").val(a)}))}),a(document).on("focus",c,function(){a(this).siblings("label, i").addClass("active")}),a(document).on("blur",c,function(){var b=a(this);0===b.val().length&&!0!==b[0].validity.badInput&&void 0===b.attr("placeholder")&&b.siblings("label, i").removeClass("active"),0===b.val().length&&!0!==b[0].validity.badInput&&void 0!==b.attr("placeholder")&&b.siblings("i").removeClass("active"),validate_field(b)}),window.validate_field=function(a){var b=void 0!==a.attr("length"),c=parseInt(a.attr("length")),d=a.val().length;0===a.val().length&&!1===a[0].validity.badInput?a.hasClass("validate")&&(a.removeClass("valid"),a.removeClass("invalid")):a.hasClass("validate")&&(a.is(":valid")&&b&&d<=c||a.is(":valid")&&!b?(a.removeClass("invalid"),a.addClass("valid")):(a.removeClass("valid"),a.addClass("invalid")))};var d=a(".hiddendiv").first();d.length||(d=a('
    '),a("body").append(d));a(".materialize-textarea").each(function(){var c=a(this);c.val().length&&b(c)}),a("body").on("keyup keydown autoresize",".materialize-textarea",function(){b(a(this))}),a(document).on("change",'.file-field input[type="file"]',function(){for(var b=a(this).closest(".file-field"),c=b.find("input.file-path"),d=a(this)[0].files,e=[],f=0;f');a(this).after(b)});a(document).on("change",f,function(b){a(this).siblings(".thumb").find(".value").html(a(this).val())}),a(document).on("input mousedown touchstart",f,function(b){var c=a(this).siblings(".thumb"),d=a(this).outerWidth();c.length<=0&&(c=a(''),a(this).after(c)),c.find(".value").html(a(this).val()),g=!0,a(this).addClass("active"),c.hasClass("active")||c.velocity({height:"30px",width:"30px",top:"-20px",marginLeft:"-15px"},{duration:300,easing:"easeOutExpo"}),"input"!==b.type&&(e=void 0===b.pageX||null===b.pageX?b.originalEvent.touches[0].pageX-a(this).offset().left:b.pageX-a(this).offset().left,e<0?e=0:e>d&&(e=d),c.addClass("active").css("left",e)),c.find(".value").html(a(this).val())}),a(document).on("mouseup touchend",".range-field",function(){g=!1,a(this).removeClass("active")}),a(document).on("mousemove touchmove",".range-field",function(b){var c,d=a(this).children(".thumb");if(g){d.hasClass("active")||d.velocity({height:"30px",width:"30px",top:"-20px",marginLeft:"-15px"},{duration:300,easing:"easeOutExpo"}),c=void 0===b.pageX||null===b.pageX?b.originalEvent.touches[0].pageX-a(this).offset().left:b.pageX-a(this).offset().left;var e=a(this).outerWidth();c<0?c=0:c>e&&(c=e),d.addClass("active").css("left",c),d.find(".value").html(d.siblings(f).val())}}),a(document).on("mouseout touchleave",".range-field",function(){if(!g){var b=a(this).children(".thumb");b.hasClass("active")&&b.velocity({height:"0",width:"0",top:"10px",marginLeft:"-6px"},{duration:100}),b.removeClass("active")}})}),a.fn.material_select=function(b){function c(a,b,c){var e=a.indexOf(b),f=-1===e;return f?a.push(b):a.splice(e,1),c.siblings("ul.dropdown-content").find("li").eq(b).toggleClass("active"),c.find("option").eq(b).prop("selected",f),d(a,c),f}function d(a,b){for(var c="",d=0,e=a.length;d
    ');h.addClass(d.attr("class"));var i=a(''),j=d.children("option, optgroup"),k=[],l=!1,m=d.find("option:selected").html()||d.find("option:first").html()||"",n=function(b,c,d){var e=c.is(":disabled")?"disabled ":"",f=c.data("icon"),g=c.attr("class");if(f){var h="";return g&&(h=' class="'+g+'"'),"multiple"===d?i.append(a('
  • "+c.html()+"
  • ")):i.append(a('
  • "+c.html()+"
  • ")),!0}"multiple"===d?(extrangera(), i.append(a('
  • "+c.html()+"
  • "))):i.append(a('
  • '+c.html()+"
  • "))};j.length&&j.each(function(){if(a(this).is("option"))e?n(0,a(this),"multiple"):n(0,a(this));else if(a(this).is("optgroup")){var b=a(this).children("option");i.append(a('
  • '+a(this).attr("label")+"
  • ")),b.each(function(){n(0,a(this))})}}),i.find("li:not(.optgroup)").each(function(f){a(this).click(function(g){if(!a(this).hasClass("disabled")&&!a(this).hasClass("optgroup")){var h=!0;e?(a('input[type="checkbox"]',this).prop("checked",function(a,b){return!b}),h=c(k,a(this).index(),d),q.trigger("focus")):(i.find("li").removeClass("active"),a(this).toggleClass("active"),q.val(a(this).text())),activateOption(i,a(this)),d.find("option").eq(f).prop("selected",h),d.trigger("change"),void 0!==b&&b()}g.stopPropagation()})}),d.wrap(h);var o=a('');d.is(":disabled")&&o.addClass("disabled");var p=m.replace(/"/g,"""),q=a('');d.before(q),q.before(o),q.after(i),d.is(":disabled")||q.dropdown({hover:!1,closeOnClick:!1}),d.attr("tabindex")&&a(q[0]).attr("tabindex",d.attr("tabindex")),d.addClass("initialized"),q.on({focus:function(){if(a("ul.select-dropdown").not(i[0]).is(":visible")&&a("input.select-dropdown").trigger("close"),!i.is(":visible")){a(this).trigger("open",["focus"]);var b=a(this).val(),c=i.find("li").filter(function(){return a(this).text().toLowerCase()===b.toLowerCase()})[0];activateOption(i,c)}},"touchend click":function(a){a.stopPropagation()}}),q.on("blur",function(){e||a(this).trigger("close"),i.find("li.selected").removeClass("selected")}),i.hover(function(){l=!0},function(){l=!1}),a(window).on({click:function(){e&&(l||q.trigger("close"))}}),e&&d.find("option:selected:not(:disabled)").each(function(){var b=a(this).index();c(k,b,d),i.find("li").eq(b).find(":checkbox").prop("checked",!0)}),activateOption=function(b,c){if(c){b.find("li.selected").removeClass("selected");var d=a(c);d.addClass("selected"),i.scrollTo(d)}};var r=[],s=function(b){if(9==b.which)return void q.trigger("close");if(40==b.which&&!i.is(":visible"))return void q.trigger("open");if(13!=b.which||i.is(":visible")){b.preventDefault();var c=String.fromCharCode(b.which).toLowerCase(),d=[9,13,27,38,40];if(c&&-1===d.indexOf(b.which)){r.push(c);var f=r.join(""),g=i.find("li").filter(function(){return 0===a(this).text().toLowerCase().indexOf(f)})[0];g&&activateOption(i,g)}if(13==b.which){var h=i.find("li.selected:not(.disabled)")[0];h&&(a(h).trigger("click"),e||q.trigger("close"))}40==b.which&&(g=i.find("li.selected").length?i.find("li.selected").next("li:not(.disabled)")[0]:i.find("li:not(.disabled)")[0],activateOption(i,g)),27==b.which&&q.trigger("close"),38==b.which&&(g=i.find("li.selected").prev("li:not(.disabled)")[0])&&activateOption(i,g),setTimeout(function(){r=[]},1e3)}};q.on("keydown",s)}})}}(jQuery),jQuery("select").siblings("input.select-dropdown").on("mousedown",function(a){/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(a.clientX>=a.target.clientWidth||a.clientY>=a.target.clientHeight)&&a.preventDefault()}),function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):this.Picker=a(jQuery)}(function(a){function b(f,g,i,m){function n(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",B.component.nodes(w.open),y.box),y.wrap),y.frame),y.holder,'tabindex="-1"')}function o(){z.data(g,B).addClass(y.input).val(z.data("value")?B.get("select",x.format):f.value),x.editable||z.on("focus."+w.id+" click."+w.id,function(a){a.preventDefault(),B.open()}).on("keydown."+w.id,u),e(f,{haspopup:!0,expanded:!1,readonly:!1,owns:f.id+"_root"})}function p(){e(B.$root[0],"hidden",!0)}function q(){B.$holder.on({keydown:u,"focus.toOpen":t,blur:function(){z.removeClass(y.target)},focusin:function(a){B.$root.removeClass(y.focused),a.stopPropagation()},"mousedown click":function(b){var c=b.target;c!=B.$holder[0]&&(b.stopPropagation(),"mousedown"!=b.type||a(c).is("input, select, textarea, button, option")||(b.preventDefault(),B.$holder[0].focus()))}}).on("click","[data-pick], [data-nav], [data-clear], [data-close]",function(){var b=a(this),c=b.data(),d=b.hasClass(y.navDisabled)||b.hasClass(y.disabled),e=h();e=e&&(e.type||e.href),(d||e&&!a.contains(B.$root[0],e))&&B.$holder[0].focus(),!d&&c.nav?B.set("highlight",B.component.item.highlight,{nav:c.nav}):!d&&"pick"in c?(B.set("select",c.pick),x.closeOnSelect&&B.close(!0)):c.clear?(B.clear(),x.closeOnClear&&B.close(!0)):c.close&&B.close(!0)})}function r(){var b;!0===x.hiddenName?(b=f.name,f.name=""):(b=["string"==typeof x.hiddenPrefix?x.hiddenPrefix:"","string"==typeof x.hiddenSuffix?x.hiddenSuffix:"_submit"],b=b[0]+f.name+b[1]),B._hidden=a('")[0],z.on("change."+w.id,function(){B._hidden.value=f.value?B.get("select",x.formatSubmit):""})}function s(){v&&l?B.$holder.find("."+y.frame).one("transitionend",function(){B.$holder[0].focus()}):B.$holder[0].focus()}function t(a){a.stopPropagation(),z.addClass(y.target),B.$root.addClass(y.focused),B.open()}function u(a){var b=a.keyCode,c=/^(8|46)$/.test(b);if(27==b)return B.close(!0),!1;(32==b||c||!w.open&&B.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?B.clear().close():B.open())}if(!f)return b;var v=!1,w={id:f.id||"P"+Math.abs(~~(Math.random()*new Date))},x=i?a.extend(!0,{},i.defaults,m):m||{},y=a.extend({},b.klasses(),x.klass),z=a(f),A=function(){return this.start()},B=A.prototype={constructor:A,$node:z,start:function(){return w&&w.start?B:(w.methods={},w.start=!0,w.open=!1,w.type=f.type,f.autofocus=f==h(),f.readOnly=!x.editable,f.id=f.id||w.id,"text"!=f.type&&(f.type="text"),B.component=new i(B,x),B.$root=a('
    '),p(),B.$holder=a(n()).appendTo(B.$root),q(),x.formatSubmit&&r(),o(),x.containerHidden?a(x.containerHidden).append(B._hidden):z.after(B._hidden),x.container?a(x.container).append(B.$root):z.after(B.$root),B.on({start:B.component.onStart,render:B.component.onRender,stop:B.component.onStop,open:B.component.onOpen,close:B.component.onClose,set:B.component.onSet}).on({start:x.onStart,render:x.onRender,stop:x.onStop,open:x.onOpen,close:x.onClose,set:x.onSet}),v=c(B.$holder[0]),f.autofocus&&B.open(),B.trigger("start").trigger("render"))},render:function(b){return b?(B.$holder=a(n()),q(),B.$root.html(B.$holder)):B.$root.find("."+y.box).html(B.component.nodes(w.open)),B.trigger("render")},stop:function(){return w.start?(B.close(),B._hidden&&B._hidden.parentNode.removeChild(B._hidden),B.$root.remove(),z.removeClass(y.input).removeData(g),setTimeout(function(){z.off("."+w.id)},0),f.type=w.type,f.readOnly=!1,B.trigger("stop"),w.methods={},w.start=!1,B):B},open:function(c){return w.open?B:(z.addClass(y.active),e(f,"expanded",!0),setTimeout(function(){B.$root.addClass(y.opened),e(B.$root[0],"hidden",!1)},0),!1!==c&&(w.open=!0,v&&k.css("overflow","hidden").css("padding-right","+="+d()),s(),j.on("click."+w.id+" focusin."+w.id,function(a){var b=a.target;b!=f&&b!=document&&3!=a.which&&B.close(b===B.$holder[0])}).on("keydown."+w.id,function(c){var d=c.keyCode,e=B.component.key[d],f=c.target;27==d?B.close(!0):f!=B.$holder[0]||!e&&13!=d?a.contains(B.$root[0],f)&&13==d&&(c.preventDefault(),f.click()):(c.preventDefault(),e?b._.trigger(B.component.key.go,B,[b._.trigger(e)]):B.$root.find("."+y.highlighted).hasClass(y.disabled)||(B.set("select",B.component.item.highlight),x.closeOnSelect&&B.close(!0)))})),B.trigger("open"))},close:function(a){return a&&(x.editable?f.focus():(B.$holder.off("focus.toOpen").focus(),setTimeout(function(){B.$holder.on("focus.toOpen",t)},0))),z.removeClass(y.active),e(f,"expanded",!1),setTimeout(function(){B.$root.removeClass(y.opened+" "+y.focused),e(B.$root[0],"hidden",!0)},0),w.open?(w.open=!1,v&&k.css("overflow","").css("padding-right","-="+d()),j.off("."+w.id),B.trigger("close")):B},clear:function(a){return B.set("clear",null,a)},set:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(d=g&&a.isPlainObject(c)?c:d||{},b){g||(h[b]=c);for(e in h)f=h[e],e in B.component.item&&(void 0===f&&(f=null),B.component.set(e,f,d)),"select"!=e&&"clear"!=e||z.val("clear"==e?"":B.get(e,x.format)).trigger("change");B.render()}return d.muted?B:B.trigger("set",h)},get:function(a,c){if(a=a||"value",null!=w[a])return w[a];if("valueSubmit"==a){if(B._hidden)return B._hidden.value;a="value"}if("value"==a)return f.value;if(a in B.component.item){if("string"==typeof c){var d=B.component.get(a);return d?b._.trigger(B.component.formats.toString,B.component,[c,d]):""}return B.component.get(a)}},on:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(b){g||(h[b]=c);for(e in h)f=h[e],d&&(e="_"+e),w.methods[e]=w.methods[e]||[],w.methods[e].push(f)}return B},off:function(){var a,b,c=arguments;for(a=0,namesCount=c.length;a').appendTo("body"),c=b[0].offsetWidth;b.css("overflow","scroll");var d=a('
    ').appendTo(b),e=d[0].offsetWidth;return b.remove(),c-e}function e(b,c,d){if(a.isPlainObject(c))for(var e in c)f(b,e,c[e]);else f(b,c,d)}function f(a,b,c){a.setAttribute(("role"==b?"":"aria-")+b,c)}function g(b,c){a.isPlainObject(b)||(b={attribute:c}),c="";for(var d in b){var e=("role"==d?"":"aria-")+d;c+=null==b[d]?"":e+'="'+b[d]+'"'}return c}function h(){try{return document.activeElement}catch(a){}}var i=a(window),j=a(document),k=a(document.documentElement),l=null!=document.documentElement.style.transition;return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",target:a+"__input--target",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(b,c,d,e){return c?(c=a.isArray(c)?c.join(""):c,d=d?' class="'+d+'"':"",e=e?" "+e:"","<"+b+d+e+">"+c+""):""},lead:function(a){return(a<10?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&a%1==0},ariaAttr:g},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?b._.trigger(g[e],g,[f]):this.each(function(){a(this).data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b}),function(a){"function"==typeof define&&define.amd?define(["picker","jquery"],a):"object"==typeof exports?module.exports=a(require("./picker.js"),require("jquery")):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0],e=d.value,f=a.$node.data("value"),g=f||e,h=f?b.formatSubmit:b.format,i=function(){return d.currentStyle?"rtl"==d.currentStyle.direction:"rtl"==getComputedStyle(a.$root[0]).direction};c.settings=b,c.$node=a.$node,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return!0===a[0]?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),g?c.set("select",g,{format:h,defaultValue:!0}):c.set("select",null).set("highlight",c.item.now),c.key={40:7,38:-7,39:function(){return i()?-1:1},37:function(){return i()?1:-1},go:function(a){var b=c.item.highlight,d=new Date(b.year,b.month,b.date+a);c.set("highlight",d,{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){var c=this.value;c&&(a.set("highlight",[a.get("view").year,c,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).trigger("focus"))}),a.$root.find("."+b.klass.selectYear).on("change",function(){var c=this.value;c&&(a.set("highlight",[c,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).trigger("focus"))})},1).on("open",function(){var d="";c.disabled(c.get("now"))&&(d=":not(."+b.klass.buttonToday+")"),a.$root.find("button"+d+", select").attr("disabled",!1)},1).on("close",function(){a.$root.find("button, select").attr("disabled",!0)},1)}var d=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,e){var f,g=this;return c=void 0===c?a:c,c==-1/0||c==1/0?f=c:b.isPlainObject(c)&&d.isInteger(c.pick)?c=c.obj:b.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=d.isDate(c)?c:g.create().obj):c=d.isInteger(c)||d.isDate(c)?g.normalize(new Date(c),e):g.now(a,c,e),{year:f||c.getFullYear(),month:f||c.getMonth(),date:f||c.getDate(),day:f||c.getDay(),obj:f||c,pick:f||c.getTime()}},c.prototype.createRange=function(a,c){var e=this,f=function(a){return!0===a||b.isArray(a)||d.isDate(a)?e.create(a):a};return d.isInteger(a)||(a=f(a)),d.isInteger(c)||(c=f(c)),d.isInteger(a)&&b.isPlainObject(c)?a=[c.year,c.month,c.date+a]:d.isInteger(c)&&b.isPlainObject(a)&&(c=[a.year,a.month,a.date+c]),{from:f(a),to:f(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},c.prototype.navigate=function(a,c,d){var e,f,g,h,i=b.isArray(c),j=b.isPlainObject(c),k=this.item.view;if(i||j){for(j?(f=c.year,g=c.month,h=c.date):(f=+c[0],g=+c[1],h=+c[2]),d&&d.nav&&k&&k.month!==g&&(f=k.year,g=k.month),e=new Date(f,g+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth();new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},c.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},c.prototype.measure=function(a,b){var c=this;return b?"string"==typeof b?b=c.parse(a,b):d.isInteger(b)&&(b=c.now(a,b,{rel:b})):b="min"==a?-1/0:1/0,b},c.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},c.prototype.validate=function(a,c,e){var f,g,h,i,j=this,k=c,l=e&&e.interval?e.interval:1,m=-1===j.item.enable,n=j.item.min,o=j.item.max,p=m&&j.item.disable.filter(function(a){if(b.isArray(a)){var e=j.create(a).pick;ec.pick&&(g=!0)}return d.isInteger(a)}).length;if((!e||!e.nav&&!e.defaultValue)&&(!m&&j.disabled(c)||m&&j.disabled(c)&&(p||f||g)||!m&&(c.pick<=n.pick||c.pick>=o.pick)))for(m&&!p&&(!g&&l>0||!f&&l<0)&&(l*=-1);j.disabled(c)&&(Math.abs(l)>1&&(c.monthk.month)&&(c=k,l=l>0?1:-1),c.pick<=n.pick?(h=!0,l=1,c=j.create([n.year,n.month,n.date+(c.pick===n.pick?0:-1)])):c.pick>=o.pick&&(i=!0,l=-1,c=j.create([o.year,o.month,o.date+(c.pick===o.pick?0:1)])),!h||!i);)c=j.create([c.year,c.month,c.date+l]);return c},c.prototype.disabled=function(a){var c=this,e=c.item.disable.filter(function(e){return d.isInteger(e)?a.day===(c.settings.firstDay?e:e-1)%7:b.isArray(e)||d.isDate(e)?a.pick===c.create(e).pick:b.isPlainObject(e)?c.withinRange(e,a):void 0});return e=e.length&&!e.filter(function(a){return b.isArray(a)&&"inverted"==a[3]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!e:e||a.pickc.item.max.pick},c.prototype.parse=function(a,b,c){var e=this,f={};return b&&"string"==typeof b?(c&&c.format||(c=c||{},c.format=e.settings.format),e.formats.toArray(c.format).map(function(a){var c=e.formats[a],g=c?d.trigger(c,e,[b,f]):a.replace(/^!/,"").length;c&&(f[a]=b.substr(0,g)),b=b.substr(g)}),[f.yyyy||f.yy,+(f.mm||f.m)-1,f.dd||f.d]):b},c.prototype.formats=function(){function a(a,b,c){var d=a.match(/[^\x00-\x7F]+|\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)+1),d.length}function b(a){return a.match(/\w+/)[0].length}return{d:function(a,b){return a?d.digits(a):b.date},dd:function(a,b){return a?2:d.lead(b.date)},ddd:function(a,c){return a?b(a):this.settings.weekdaysShort[c.day]},dddd:function(a,c){return a?b(a):this.settings.weekdaysFull[c.day]},m:function(a,b){return a?d.digits(a):b.month+1},mm:function(a,b){return a?2:d.lead(b.month+1)},mmm:function(b,c){var d=this.settings.monthsShort;return b?a(b,d,c):d[c.month]},mmmm:function(b,c){var d=this.settings.monthsFull;return b?a(b,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return d.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}}}(),c.prototype.isDateExact=function(a,c){var e=this;return d.isInteger(a)&&d.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(d.isDate(a)||b.isArray(a))&&(d.isDate(c)||b.isArray(c))?e.create(a).pick===e.create(c).pick:!(!b.isPlainObject(a)||!b.isPlainObject(c))&&(e.isDateExact(a.from,c.from)&&e.isDateExact(a.to,c.to))},c.prototype.isDateOverlap=function(a,c){var e=this,f=e.settings.firstDay?1:0;return d.isInteger(a)&&(d.isDate(c)||b.isArray(c))?(a=a%7+f)===e.create(c).day+1:d.isInteger(c)&&(d.isDate(a)||b.isArray(a))?(c=c%7+f)===e.create(a).day+1:!(!b.isPlainObject(a)||!b.isPlainObject(c))&&e.overlapRanges(a,c)},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var e=this,f=e.item.disable.slice(0);return"flip"==c?e.flipEnable():!1===c?(e.flipEnable(1),f=[]):!0===c?(e.flipEnable(-1),f=[]):c.map(function(a){for(var c,g=0;g=l.year&&i.month>=l.month||!a&&i.year<=k.year&&i.month<=k.month?" "+c.klass.navDisabled:""),"data-nav="+(a||-1)+" "+d.ariaAttr({role:"button",controls:b.$node[0].id+"_table"})+' title="'+(a?c.labelMonthNext:c.labelMonthPrev)+'"')},o=function(){var e=c.showMonthsShort?c.monthsShort:c.monthsFull;return c.selectMonths?d.node("select",d.group({min:0,max:11,i:1,node:"option",item:function(a){return[e[a],0,"value="+a+(i.month==a?" selected":"")+(i.year==k.year&&al.month?" disabled":"")]}}),c.klass.selectMonth,(a?"":"disabled")+" "+d.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelMonthSelect+'"'):d.node("div",e[i.month],c.klass.month)},p=function(){var e=i.year,f=!0===c.selectYears?5:~~(c.selectYears/2);if(f){var g=k.year,h=l.year,j=e-f,m=e+f;if(g>j&&(m+=g-j,j=g),ho?o:n,m=h}return d.node("select",d.group({min:j,max:m,i:1,node:"option",item:function(a){return[a,0,"value="+a+(e==a?" selected":"")]}}),c.klass.selectYear,(a?"":"disabled")+" "+d.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelYearSelect+'"')}return d.node("div",e,c.klass.year)};return d.node("div",(c.selectYears?p()+o():o()+p())+n()+n(1),c.klass.header)+d.node("table",m+d.node("tbody",d.group({min:0,max:5,i:1,node:"tr",item:function(a){var e=c.firstDay&&0===b.create([i.year,i.month,1]).day?-7:0;return[d.group({min:7*a-i.day+e+1,max:function(){return this.min+7-1},i:1,node:"td",item:function(a){a=b.create([i.year,i.month,a+(c.firstDay?1:0)]);var e=g&&g.pick==a.pick,m=h&&h.pick==a.pick,n=j&&b.disabled(a)||a.pickl.pick,o=d.trigger(b.formats.toString,b,[c.format,a]);return[d.node("div",a.date,function(b){return b.push(i.month==a.month?c.klass.infocus:c.klass.outfocus),f.pick==a.pick&&b.push(c.klass.now),e&&b.push(c.klass.selected),m&&b.push(c.klass.highlighted),n&&b.push(c.klass.disabled),b.join(" ")}([c.klass.day]),"data-pick="+a.pick+" "+d.ariaAttr({role:"gridcell",label:o,selected:!(!e||b.$node.val()!==o)||null,activedescendant:!!m||null,disabled:!!n||null})),"",d.ariaAttr({role:"presentation"})]}})]}})),c.klass.table,'id="'+b.$node[0].id+'_table" '+d.ariaAttr({role:"grid",controls:b.$node[0].id,readonly:!0}))+d.node("div",d.node("button",c.today,c.klass.buttonToday,"type=button data-pick="+f.pick+(a&&!b.disabled(f)?"":" disabled")+" "+d.ariaAttr({controls:b.$node[0].id}))+d.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+d.ariaAttr({controls:b.$node[0].id}))+d.node("button",c.close,c.klass.buttonClose,"type=button data-close=true "+(a?"":" disabled")+" "+d.ariaAttr({controls:b.$node[0].id})),c.klass.footer)},c.defaults=function(a){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",closeOnSelect:!0,closeOnClear:!0,format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today",buttonClose:a+"button--close"}}}(a.klasses().picker+"__"),a.extend("pickadate",c)}),$.extend($.fn.pickadate.defaults,{selectMonths:!0,selectYears:15,onRender:function(){var a=this.$root,b=this.get("highlight","yyyy"),c=this.get("highlight","dd"),d=this.get("highlight","mmm"),e=this.get("highlight","dddd");a.find(".picker__header").prepend('
    '+e+'
    '+d+'
    '+c+'
    '+b+"
    ")}}),function(){function a(a){return document.createElementNS(i,a)}function b(a){return(a<10?"0":"")+a}function c(a){var b=++q+"";return a?a+b:b}function d(d,g){function i(a,b){var c=l.offset(),d=/^touch/.test(a.type),e=c.left+r,f=c.top+r,i=(d?a.originalEvent.touches[0]:a).pageX-e,k=(d?a.originalEvent.touches[0]:a).pageY-f,m=Math.sqrt(i*i+k*k),p=!1;if(!b||!(ms+u)){a.preventDefault();var q=setTimeout(function(){D.popover.addClass("clockpicker-moving")},200);j&&l.append(D.canvas),D.setHand(i,k,!b,!0),h.off(n).on(n,function(a){a.preventDefault();var b=/^touch/.test(a.type),c=(b?a.originalEvent.touches[0]:a).pageX-e,d=(b?a.originalEvent.touches[0]:a).pageY-f;(p||c!==i||d!==k)&&(p=!0,D.setHand(c,d,!1,!0))}),h.off(o).on(o,function(a){h.off(o),a.preventDefault();var c=/^touch/.test(a.type),d=(c?a.originalEvent.changedTouches[0]:a).pageX-e,j=(c?a.originalEvent.changedTouches[0]:a).pageY-f;(b||p)&&d===i&&j===k&&D.setHand(d,j),"hours"===D.currentView?D.toggleView("minutes",w/2):g.autoclose&&(D.minutesView.addClass("clockpicker-dial-out"),setTimeout(function(){D.done()},w/2)),l.prepend(L),clearTimeout(q),D.popover.removeClass("clockpicker-moving"),h.off(n)})}}var k=f(x),l=k.find(".clockpicker-plate"),p=k.find(".picker__holder"),q=k.find(".clockpicker-hours"),y=k.find(".clockpicker-minutes"),z=k.find(".clockpicker-am-pm-block"),A="INPUT"===d.prop("tagName"),B=A?d:d.find("input"),C=f("label[for="+B.attr("id")+"]"),D=this;if(this.id=c("cp"),this.element=d,this.holder=p,this.options=g,this.isAppended=!1,this.isShown=!1,this.currentView="hours",this.isInput=A,this.input=B,this.label=C,this.popover=k,this.plate=l,this.hoursView=q,this.minutesView=y,this.amPmBlock=z,this.spanHours=k.find(".clockpicker-span-hours"),this.spanMinutes=k.find(".clockpicker-span-minutes"),this.spanAmPm=k.find(".clockpicker-span-am-pm"),this.footer=k.find(".picker__footer"),this.amOrPm="PM",g.twelvehour){var E=['
    ','",'","
    "].join("");f(E);g.ampmclickable?(this.spanAmPm.empty(),f('
    AM
    ').on("click",function(){D.spanAmPm.children("#click-am").addClass("text-primary"),D.spanAmPm.children("#click-pm").removeClass("text-primary"),D.amOrPm="AM"}).appendTo(this.spanAmPm),f('
    PM
    ').on("click",function(){D.spanAmPm.children("#click-pm").addClass("text-primary"),D.spanAmPm.children("#click-am").removeClass("text-primary"),D.amOrPm="PM"}).appendTo(this.spanAmPm)):(f('').on("click",function(){D.amOrPm="AM",D.amPmBlock.children(".pm-button").removeClass("active"),D.amPmBlock.children(".am-button").addClass("active"),D.spanAmPm.empty().append("AM")}).appendTo(this.amPmBlock),f('').on("click",function(){D.amOrPm="PM",D.amPmBlock.children(".am-button").removeClass("active"),D.amPmBlock.children(".pm-button").addClass("active"),D.spanAmPm.empty().append("PM")}).appendTo(this.amPmBlock))}g.darktheme&&k.addClass("darktheme"),f('").click(f.proxy(this.done,this)).appendTo(this.footer),this.spanHours.click(f.proxy(this.toggleView,this,"hours")),this.spanMinutes.click(f.proxy(this.toggleView,this,"minutes")),B.on("focus.clockpicker click.clockpicker",f.proxy(this.show,this));var F,G,H,I,J=f('
    ');if(g.twelvehour)for(F=1;F<13;F+=1)G=J.clone(),H=F/6*Math.PI,I=s,G.css("font-size","140%"),G.css({left:r+Math.sin(H)*I-u,top:r-Math.cos(H)*I-u}),G.html(0===F?"00":F),q.append(G),G.on(m,i);else for(F=0;F<24;F+=1){G=J.clone(),H=F/6*Math.PI;var K=F>0&&F<13;I=K?t:s,G.css({left:r+Math.sin(H)*I-u,top:r-Math.cos(H)*I-u}),K&&G.css("font-size","120%"),G.html(0===F?"00":F),q.append(G),G.on(m,i)}for(F=0;F<60;F+=5)G=J.clone(),H=F/30*Math.PI,G.css({left:r+Math.sin(H)*s-u,top:r-Math.cos(H)*s-u}),G.css("font-size","140%"),G.html(b(F)),y.append(G),G.on(m,i);if(l.on(m,function(a){0===f(a.target).closest(".clockpicker-tick").length&&i(a,!0)}),j){var L=k.find(".clockpicker-canvas"),M=a("svg");M.setAttribute("class","clockpicker-svg"),M.setAttribute("width",v),M.setAttribute("height",v);var N=a("g");N.setAttribute("transform","translate("+r+","+r+")");var O=a("circle");O.setAttribute("class","clockpicker-canvas-bearing"),O.setAttribute("cx",0),O.setAttribute("cy",0),O.setAttribute("r",2);var P=a("line");P.setAttribute("x1",0),P.setAttribute("y1",0);var Q=a("circle");Q.setAttribute("class","clockpicker-canvas-bg"),Q.setAttribute("r",u);var R=a("circle");R.setAttribute("class","clockpicker-canvas-fg"),R.setAttribute("r",5),N.appendChild(P),N.appendChild(Q),N.appendChild(R),N.appendChild(O),M.appendChild(N),L.append(M),this.hand=P,this.bg=Q,this.fg=R,this.bearing=O,this.g=N,this.canvas=L}e(this.options.init)}function e(a){a&&"function"==typeof a&&a()}var f=window.jQuery,g=f(window),h=f(document),i="http://www.w3.org/2000/svg",j="SVGAngle"in window&&function(){var a,b=document.createElement("div");return b.innerHTML="",a=(b.firstChild&&b.firstChild.namespaceURI)==i,b.innerHTML="",a}(),k=function(){var a=document.createElement("div").style;return"transition"in a||"WebkitTransition"in a||"MozTransition"in a||"msTransition"in a||"OTransition"in a}(),l="ontouchstart"in window,m="mousedown"+(l?" touchstart":""),n="mousemove.clockpicker"+(l?" touchmove.clockpicker":""),o="mouseup.clockpicker"+(l?" touchend.clockpicker":""),p=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,q=0,r=135,s=110,t=80,u=20,v=2*r,w=k?350:1,x=['
    ','
    ','
    ','
    ','
    ','
    ','
    ','
    ','',":",'',"
    ",'
    ','
    ',"
    ","
    ","
    ",'
    ','
    ','
    ','
    ','
    ',"
    ",'
    ',"
    ","
    ",'","
    ","
    ","
    ","
    ","
    "].join("");d.DEFAULTS={default:"",fromnow:0,donetext:"Done",autoclose:!1,ampmclickable:!1,darktheme:!1,twelvehour:!0,vibrate:!0},d.prototype.toggle=function(){this[this.isShown?"hide":"show"]()},d.prototype.locate=function(){var a=this.element,b=this.popover;a.offset(),a.outerWidth(),a.outerHeight(),this.options.align;b.show()},d.prototype.show=function(a){ if(!this.isShown){e(this.options.beforeShow),f(":input").each(function(){f(this).attr("tabindex",-1)});var c=this;this.input.blur(),this.popover.addClass("picker--opened"),this.input.addClass("picker__input picker__input--active"),f(document.body).css("overflow","hidden"),this.isAppended||(this.popover.insertAfter(this.input),this.options.twelvehour&&(this.amOrPm="PM",this.options.ampmclickable?(this.spanAmPm.children("#click-pm").addClass("text-primary"),this.spanAmPm.children("#click-am").removeClass("text-primary")):(this.amPmBlock.children(".am-button").removeClass("active"),this.amPmBlock.children(".pm-button").addClass("active"),this.spanAmPm.empty().append("PM"))),g.on("resize.clockpicker"+this.id,function(){c.isShown&&c.locate()}),this.isAppended=!0);var d=((this.input.prop("value")||this.options.default||"")+"").split(":");if(this.options.twelvehour&&void 0!==d[1]&&(d[1]=d[1].replace("AM","").replace("PM","")),"now"===d[0]){var i=new Date(+new Date+this.options.fromnow);d=[i.getHours(),i.getMinutes()]}this.hours=+d[0]||0,this.minutes=+d[1]||0,this.spanHours.html(b(this.hours)),this.spanMinutes.html(b(this.minutes)),this.toggleView("hours"),this.locate(),this.isShown=!0,h.on("click.clockpicker."+this.id+" focusin.clockpicker."+this.id,function(a){var b=f(a.target);0===b.closest(c.popover.find(".picker__wrap")).length&&0===b.closest(c.input).length&&c.hide()}),h.on("keyup.clockpicker."+this.id,function(a){27===a.keyCode&&c.hide()}),e(this.options.afterShow)}},d.prototype.hide=function(){e(this.options.beforeHide),this.input.removeClass("picker__input picker__input--active"),this.popover.removeClass("picker--opened"),f(document.body).css("overflow","visible"),this.isShown=!1,f(":input").each(function(a){f(this).attr("tabindex",a+1)}),h.off("click.clockpicker."+this.id+" focusin.clockpicker."+this.id),h.off("keyup.clockpicker."+this.id),this.popover.hide(),e(this.options.afterHide)},d.prototype.toggleView=function(a,b){var c=!1;"minutes"===a&&"visible"===f(this.hoursView).css("visibility")&&(e(this.options.beforeHourSelect),c=!0);var d="hours"===a,g=d?this.hoursView:this.minutesView,h=d?this.minutesView:this.hoursView;this.currentView=a,this.spanHours.toggleClass("text-primary",d),this.spanMinutes.toggleClass("text-primary",!d),h.addClass("clockpicker-dial-out"),g.css("visibility","visible").removeClass("clockpicker-dial-out"),this.resetClock(b),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){h.css("visibility","hidden")},w),c&&e(this.options.afterHourSelect)},d.prototype.resetClock=function(a){var b=this.currentView,c=this[b],d="hours"===b,e=Math.PI/(d?6:30),f=c*e,g=d&&c>0&&c<13?t:s,h=Math.sin(f)*g,i=-Math.cos(f)*g,k=this;j&&a?(k.canvas.addClass("clockpicker-canvas-out"),setTimeout(function(){k.canvas.removeClass("clockpicker-canvas-out"),k.setHand(h,i)},a)):this.setHand(h,i)},d.prototype.setHand=function(a,c,d,e){var g,h=Math.atan2(a,-c),i="hours"===this.currentView,k=Math.PI/(i||d?6:30),l=Math.sqrt(a*a+c*c),m=this.options,n=i&&l<(s+t)/2,o=n?t:s;if(m.twelvehour&&(o=s),h<0&&(h=2*Math.PI+h),g=Math.round(h/k),h=g*k,m.twelvehour?i?0===g&&(g=12):(d&&(g*=5),60===g&&(g=0)):i?(12===g&&(g=0),g=n?0===g?12:g:0===g?0:g+12):(d&&(g*=5),60===g&&(g=0)),i?this.fg.setAttribute("class","clockpicker-canvas-fg"):g%5==0?this.fg.setAttribute("class","clockpicker-canvas-fg"):this.fg.setAttribute("class","clockpicker-canvas-fg active"),this[this.currentView]!==g&&p&&this.options.vibrate&&(this.vibrateTimer||(navigator[p](10),this.vibrateTimer=setTimeout(f.proxy(function(){this.vibrateTimer=null},this),100))),this[this.currentView]=g,this[i?"spanHours":"spanMinutes"].html(b(g)),!j)return void this[i?"hoursView":"minutesView"].find(".clockpicker-tick").each(function(){var a=f(this);a.toggleClass("active",g===+a.html())});e||!i&&g%5?(this.g.insertBefore(this.hand,this.bearing),this.g.insertBefore(this.bg,this.fg),this.bg.setAttribute("class","clockpicker-canvas-bg clockpicker-canvas-bg-trans")):(this.g.insertBefore(this.hand,this.bg),this.g.insertBefore(this.fg,this.bg),this.bg.setAttribute("class","clockpicker-canvas-bg"));var q=Math.sin(h)*(o-u),r=-Math.cos(h)*(o-u),v=Math.sin(h)*o,w=-Math.cos(h)*o;this.hand.setAttribute("x2",q),this.hand.setAttribute("y2",r),this.bg.setAttribute("cx",v),this.bg.setAttribute("cy",w),this.fg.setAttribute("cx",v),this.fg.setAttribute("cy",w)},d.prototype.done=function(){e(this.options.beforeDone),this.hide(),this.label.addClass("active");var a=this.input.prop("value"),c=b(this.hours)+":"+b(this.minutes);this.options.twelvehour&&(c+=this.amOrPm),this.input.prop("value",c),c!==a&&(this.input.triggerHandler("change"),this.isInput||this.element.trigger("change")),this.options.autoclose&&this.input.trigger("blur"),e(this.options.afterDone)},d.prototype.remove=function(){this.element.removeData("clockpicker"),this.input.off("focus.clockpicker click.clockpicker"),this.isShown&&this.hide(),this.isAppended&&(g.off("resize.clockpicker"+this.id),this.popover.remove())},f.fn.pickatime=function(a){var b=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=f(this),e=c.data("clockpicker");if(e)"function"==typeof e[a]&&e[a].apply(e,b);else{var g=f.extend({},d.DEFAULTS,c.data(),"object"==typeof a&&a);c.data("clockpicker",new d(c,g))}})}}(),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";return function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f0&&(g=parseInt(g[1],10))>=1&&8>g&&(d.isOldIOSPhone=!0)}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(4.4>i&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;4>n;n++){c=m[n];for(var o=0;3>o;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;hb-1?a-b:0>a?b+a:a},ya={},za=function(a,b){return ya[a]||(ya[a]=[]),ya[a].push(b)},Aa=function(a){var b=ya[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;df.currItem.fitRatio?va||(hc(f.currItem,!1,!0),va=!0):va&&(hc(f.currItem),va=!1)),Da(ba,ma.x,ma.y,q))},Fa=function(a){a.container&&Da(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ga=function(a,b){b[C]=s+a+"px, 0px"+t},Ha=function(a,b){if(!g.loop&&b){var c=k+(qa.x*oa-a)/qa.x,d=Math.round(a-ob.x);(0>c&&d>0||c>=Xb()-1&&0>d)&&(a=ob.x+d*g.mainScrollEndFriction)}ob.x=a,Ga(a,l)},Ia=function(a,b){var c=pb[a]-pa[a];return la[a]+ka[a]+c-c*(b/r)},Ja=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Ka=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},La=null,Ma=function(){La&&(e.unbind(document,"mousemove",Ma),e.addClass(a,"pswp--has_mouse"),g.mouseUsed=!0,Aa("mouseUsed")),La=setTimeout(function(){La=null},100)},Na=function(){e.bind(document,"keydown",f),L.transform&&e.bind(f.scrollWrap,"click",f),g.mouseUsed||e.bind(document,"mousemove",Ma),e.bind(window,"resize scroll",f),Aa("bindEvents")},Oa=function(){e.unbind(window,"resize",f),e.unbind(window,"scroll",p.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Ma),L.transform&&e.unbind(f.scrollWrap,"click",f),S&&e.unbind(window,n,f),Aa("unbindEvents")},Pa=function(a,b){var c=dc(f.currItem,na,a);return b&&(aa=c),c},Qa=function(a){return a||(a=f.currItem),a.initialZoomLevel},Ra=function(a){return a||(a=f.currItem),a.w>0?g.maxSpreadZoom:1},Sa=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=Ia(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]1?1:a.fitRatio,c=a.container.style,d=b*a.w,e=b*a.h;c.width=d+"px",c.height=e+"px",c.left=a.initialPosition.x+"px",c.top=a.initialPosition.y+"px"},Ea=function(){if(ba){var a=ba,b=f.currItem,c=b.fitRatio>1?1:b.fitRatio,d=c*b.w,e=c*b.h;a.width=d+"px",a.height=e+"px",a.left=ma.x+"px",a.top=ma.y+"px"}}},Ua=function(a){var b="";g.escKey&&27===a.keyCode?b="close":g.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next")),b&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(a.preventDefault?a.preventDefault():a.returnValue=!1,f[b]()))},Va=function(a){a&&(V||U||ca||Q)&&(a.preventDefault(),a.stopPropagation())},Wa=function(){f.setScrollOffset(0,e.getScrollY())},Xa={},Ya=0,Za=function(a){Xa[a]&&(Xa[a].raf&&G(Xa[a].raf),Ya--,delete Xa[a])},$a=function(a){Xa[a]&&Za(a),Xa[a]||(Ya++,Xa[a]={})},_a=function(){for(var a in Xa)Xa.hasOwnProperty(a)&&Za(a)},ab=function(a,b,c,d,e,f,g){var h,i=Ba();$a(a);var j=function(){if(Xa[a]){if((h=Ba()-i)>=d)return Za(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),Xa[a].raf=F(j)}};j()},bb={shout:Aa,listen:za,viewportSize:na,options:g,isMainScrollAnimating:function(){return ca},getZoomLevel:function(){return q},getCurrentIndex:function(){return k},isDragging:function(){return S},isZooming:function(){return Z},setScrollOffset:function(a,b){pa.x=a,K=pa.y=b,Aa("updateScrollOffset",pa)},applyZoomPan:function(a,b,c,d){ma.x=b,ma.y=c,q=a,Ea(d)},init:function(){if(!h&&!i){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),H=a.className,h=!0,L=e.detectFeatures(),F=L.raf,G=L.caf,C=L.transform,J=L.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),l=f.container.style,f.itemHolders=w=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],w[0].el.style.display=w[2].el.style.display="none",Ta(),p={resize:f.updateSize,scroll:Wa,keydown:Ua,click:Va};var d=L.isOldIOSPhone||L.isOldAndroid||L.isMobileOpera;for(L.animationName&&L.transform&&!d||(g.showAnimationDuration=g.hideAnimationDuration=0),c=0;ck||k>=Xb())&&(k=0),f.currItem=Wb(k),(L.isOldIOSPhone||L.isOldAndroid)&&(sa=!1),a.setAttribute("aria-hidden","false"),g.modal&&(sa?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===K&&(Aa("initialLayout"),K=I=e.getScrollY());var j="pswp--open ";for(g.mainClass&&(j+=g.mainClass+" "),g.showHideOpacity&&(j+="pswp--animate_opacity "),j+=E?"pswp--touch":"pswp--notouch",j+=L.animationName?" pswp--css_animation":"",j+=L.svg?" pswp--svg":"",e.addClass(a,j),f.updateSize(),m=-1,ra=null,c=0;3>c;c++)Ga((c+m)*qa.x,w[c].el.style);J||e.bind(f.scrollWrap,o,f),za("initialZoomInEnd",function(){f.setContent(w[0],k-1),f.setContent(w[2],k+1),w[0].el.style.display=w[2].el.style.display="block",g.focus&&a.focus(),Na()}),f.setContent(w[1],k),f.updateCurrItem(),Aa("afterInit"),sa||(u=setInterval(function(){Ya||S||Z||q!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),e.addClass(a,"pswp--visible")}},close:function(){h&&(h=!1,i=!0,Aa("close"),Oa(),Zb(f.currItem,null,!0,f.destroy))},destroy:function(){Aa("destroy"),Sb&&clearTimeout(Sb),a.setAttribute("aria-hidden","true"),a.className=H,u&&clearInterval(u),e.unbind(f.scrollWrap,o,f),e.unbind(window,"scroll",f),ub(),_a(),ya=null},panTo:function(a,b,c){c||(a>aa.min.x?a=aa.min.x:aaa.min.y?b=aa.min.y:ba;a++)w[a].item&&(w[a].item.needsUpdate=!0)},updateCurrItem:function(a){if(0!==ra){var b,c=Math.abs(ra);if(!(a&&2>c)){f.currItem=Wb(k),va=!1,Aa("beforeChange",ra),c>=3&&(m+=ra+(ra>0?-3:3),c=3);for(var d=0;c>d;d++)ra>0?(b=w.shift(),w[2]=b,m++,Ga((m+2)*qa.x,b.el.style),f.setContent(b,k-c+d+1+1)):(b=w.pop(),w.unshift(b),m--,Ga(m*qa.x,b.el.style),f.setContent(b,k+c-d-1-1));if(ba&&1===Math.abs(ra)){var e=Wb(x);e.initialZoomLevel!==q&&(dc(e,na),hc(e),Fa(e))}ra=0,f.updateCurrZoomItem(),x=k,Aa("afterChange")}}},updateSize:function(b){if(!sa&&g.modal){var c=e.getScrollY();if(K!==c&&(a.style.top=c+"px",K=c),!b&&ua.x===window.innerWidth&&ua.y===window.innerHeight)return;ua.x=window.innerWidth,ua.y=window.innerHeight,a.style.height=ua.y+"px"}if(na.x=f.scrollWrap.clientWidth,na.y=f.scrollWrap.clientHeight,Wa(),qa.x=na.x+Math.round(na.x*g.spacing),qa.y=na.y,Ha(qa.x*oa),Aa("beforeResize"),void 0!==m){for(var d,h,i,j=0;3>j;j++)d=w[j],Ga((j+m)*qa.x,d.el.style),i=k+j-1,g.loop&&Xb()>2&&(i=xa(i)),h=Wb(i),h&&(v||h.needsUpdate||!h.bounds)?(f.cleanSlide(h),f.setContent(d,i),1===j&&(f.currItem=h,f.updateCurrZoomItem(!0)),h.needsUpdate=!1):-1===d.index&&i>=0&&f.setContent(d,i),h&&h.container&&(dc(h,na),hc(h),Fa(h));v=!1}r=q=f.currItem.initialZoomLevel,aa=f.currItem.bounds,aa&&(ma.x=aa.center.x,ma.y=aa.center.y,Ea(!0)),Aa("resize")},zoomTo:function(a,b,c,d,f){b&&(r=q,pb.x=Math.abs(b.x)-ma.x,pb.y=Math.abs(b.y)-ma.y,Ja(la,ma));var g=Pa(a,!1),h={};Sa("x",g,h,a),Sa("y",g,h,a);var i=q,j={x:ma.x,y:ma.y};Ka(h);var k=function(b){1===b?(q=a,ma.x=h.x,ma.y=h.y):(q=(a-i)*b+i,ma.x=(h.x-j.x)*b+j.x,ma.y=(h.y-j.y)*b+j.y),f&&f(b),Ea(1===b)};c?ab("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},cb={},db={},eb={},fb={},gb={},hb=[],ib={},jb=[],kb={},lb=0,mb=ja(),nb=0,ob=ja(),pb=ja(),qb=ja(),rb=function(a,b){return a.x===b.x&&a.y===b.y},sb=function(a,b){return Math.abs(a.x-b.x)<25&&Math.abs(a.y-b.y)<25},tb=function(a,b){return kb.x=Math.abs(a.x-b.x),kb.y=Math.abs(a.y-b.y),Math.sqrt(kb.x*kb.x+kb.y*kb.y)},ub=function(){W&&(G(W),W=null)},vb=function(){S&&(W=F(vb),Lb())},wb=function(){return!("fit"===g.scaleMode&&q===f.currItem.initialZoomLevel)},xb=function(a,b){return!(!a||a===document)&&(!(a.getAttribute("class")&&a.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(b(a)?a:xb(a.parentNode,b)))},yb={},zb=function(a,b){return yb.prevent=!xb(a.target,g.isClickableElement),Aa("preventDragEvent",a,b,yb),yb.prevent},Ab=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Bb=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Cb=function(a,b,c){if(a-N>50){var d=jb.length>2?jb.shift():{};d.x=b,d.y=c,jb.push(d),N=a}},Db=function(){var a=ma.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(na.y/2))},Eb={},Fb={},Gb=[],Hb=function(a){for(;Gb.length>0;)Gb.pop();return D?(ia=0,hb.forEach(function(a){0===ia?Gb[0]=a:1===ia&&(Gb[1]=a),ia++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Gb[0]=Ab(a.touches[0],Eb),a.touches.length>1&&(Gb[1]=Ab(a.touches[1],Fb))):(Eb.x=a.pageX,Eb.y=a.pageY,Eb.id="",Gb[0]=Eb),Gb},Ib=function(a,b){var c,d,e,h,i=ma[a]+b[a],j=b[a]>0,k=ob.x+b.x,l=ob.x-ib.x;return c=i>aa.min[a]||iaa.min[a]&&(c=g.panEndFriction,aa.min[a]-i,d=aa.min[a]-la[a]),(0>=d||0>l)&&Xb()>1?(h=k,0>l&&k>ib.x&&(h=ib.x)):aa.min.x!==aa.max.x&&(e=i)):(i=d||l>0)&&Xb()>1?(h=k,l>0&&kf.currItem.fitRatio&&(ma[a]+=b[a]*c)):(void 0!==h&&(Ha(h,!0),X=h!==ib.x),aa.min.x!==aa.max.x&&(void 0!==e?ma.x=e:X||(ma.x+=b.x*c)),void 0!==h)},Jb=function(a){if(!("mousedown"===a.type&&a.button>0)){if(Vb)return void a.preventDefault();if(!R||"mousedown"!==a.type){if(zb(a,!0)&&a.preventDefault(),Aa("pointerDown"),D){var b=e.arraySearch(hb,a.pointerId,"id");0>b&&(b=hb.length),hb[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Hb(a),d=c.length;Y=null,_a(),S&&1!==d||(S=ea=!0,e.bind(window,n,f),P=ha=fa=Q=X=V=T=U=!1,da=null,Aa("firstTouchStart",c),Ja(la,ma),ka.x=ka.y=0,Ja(fb,c[0]),Ja(gb,fb),ib.x=qa.x*oa,jb=[{x:fb.x,y:fb.y}],N=M=Ba(),Pa(q,!0),ub(),vb()),!Z&&d>1&&!ca&&!X&&(r=q,U=!1,Z=T=!0,ka.y=ka.x=0,Ja(la,ma),Ja(cb,c[0]),Ja(db,c[1]),Bb(cb,db,qb),pb.x=Math.abs(qb.x)-ma.x,pb.y=Math.abs(qb.y)-ma.y,$=_=tb(cb,db))}}},Kb=function(a){if(a.preventDefault(),D){var b=e.arraySearch(hb,a.pointerId,"id");if(b>-1){var c=hb[b];c.x=a.pageX,c.y=a.pageY}}if(S){var d=Hb(a);if(da||V||Z)Y=d;else if(ob.x!==qa.x*oa)da="h";else{var f=Math.abs(d[0].x-fb.x)-Math.abs(d[0].y-fb.y);Math.abs(f)>=10&&(da=f>0?"h":"v",Y=d)}}},Lb=function(){if(Y){var a=Y.length;if(0!==a)if(Ja(cb,Y[0]),eb.x=cb.x-fb.x,eb.y=cb.y-fb.y,Z&&a>1){if(fb.x=cb.x,fb.y=cb.y,!eb.x&&!eb.y&&rb(Y[1],db))return;Ja(db,Y[1]),U||(U=!0,Aa("zoomGestureStarted"));var b=tb(cb,db),c=Qb(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ha=!0);var d=1,e=Qa(),h=Ra();if(e>c)if(g.pinchToClose&&!ha&&r<=f.currItem.initialZoomLevel){var i=e-c,j=1-i/(e/1.2);Ca(j),Aa("onPinchClose",j),fa=!0}else d=(e-c)/e,d>1&&(d=1),c=e-d*(e/3);else c>h&&(d=(c-h)/(6*e),d>1&&(d=1),c=h+d*e);0>d&&(d=0),$=b,Bb(cb,db,mb),ka.x+=mb.x-qb.x,ka.y+=mb.y-qb.y,Ja(qb,mb),ma.x=Ia("x",c),ma.y=Ia("y",c),P=c>q,q=c,Ea()}else{if(!da)return;if(ea&&(ea=!1,Math.abs(eb.x)>=10&&(eb.x-=Y[0].x-gb.x),Math.abs(eb.y)>=10&&(eb.y-=Y[0].y-gb.y)),fb.x=cb.x,fb.y=cb.y,0===eb.x&&0===eb.y)return;if("v"===da&&g.closeOnVerticalDrag&&!wb()){ka.y+=eb.y,ma.y+=eb.y;var k=Db();return Q=!0,Aa("onVerticalDrag",k),Ca(k),void Ea()}Cb(Ba(),cb.x,cb.y),V=!0,aa=f.currItem.bounds;var l=Ib("x",eb);l||(Ib("y",eb),Ka(ma),Ea())}}},Mb=function(a){if(L.isOldAndroid){if(R&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(R),R=setTimeout(function(){R=0},600))}Aa("pointerUp"),zb(a,!1)&&a.preventDefault();var b;if(D){var c=e.arraySearch(hb,a.pointerId,"id");if(c>-1)if(b=hb.splice(c,1)[0],navigator.pointerEnabled)b.type=a.pointerType||"mouse";else{var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}}var h,i=Hb(a),j=i.length;if("mouseup"===a.type&&(j=0),2===j)return Y=null,!0;1===j&&Ja(gb,i[0]),0!==j||da||ca||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Aa("touchRelease",a,b));var k=-1;if(0===j&&(S=!1,e.unbind(window,n,f),ub(),Z?k=0:-1!==nb&&(k=Ba()-nb)),nb=1===j?Ba():-1,h=-1!==k&&150>k?"zoom":"swipe",Z&&2>j&&(Z=!1,1===j&&(h="zoomPointerUp"),Aa("zoomGestureEnded")),Y=null,V||U||ca||Q)if(_a(),O||(O=Nb()),O.calculateSwipeSpeed("x"),Q){var l=Db();if(lf.currItem.fitRatio&&Ob(O))}},Nb=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){jb.length>1?(a=Ba()-N+50,b=jb[jb.length-2][d]):(a=Ba()-M,b=gb[d]),c.lastFlickOffset[d]=fb[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickDist[d]>20?c.lastFlickSpeed[d]=c.lastFlickOffset[d]/a:c.lastFlickSpeed[d]=0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(ma[a]>aa.min[a]?c.backAnimDestination[a]=aa.min[a]:ma[a]30&&(i||b.lastFlickOffset.x>20)?d=-1:-30>h&&(i||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(k+=d,0>k?(k=g.loop?Xb()-1:0,j=!0):k>=Xb()&&(k=g.loop?0:Xb()-1,j=!0),(!j||g.loop)&&(ra+=d,oa-=d,c=!0));var l,m=qa.x*oa,n=Math.abs(m-ob.x);return c||m>ob.x==b.lastFlickSpeed.x>0?(l=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,l=Math.min(l,400),l=Math.max(l,250)):l=333,lb===k&&(c=!1),ca=!0,Aa("mainScrollAnimStart"),ab("mainScroll",ob.x,m,l,e.easing.cubic.out,Ha,function(){_a(),ca=!1,lb=-1,(c||lb!==k)&&f.updateCurrItem(),Aa("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Qb=function(a){return 1/_*a*r},Rb=function(){var a=q,b=Qa(),c=Ra();b>q?a=b:q>c&&(a=c);var d,g=ga;return fa&&!P&&!ha&&b>q?(f.close(),!0):(fa&&(d=function(a){Ca((1-g)*a+g)}),f.zoomTo(a,0,200,e.easing.cubic.out,d),!0)};wa("Gestures",{publicMethods:{initGestures:function(){var a=function(a,b,c,d,e){y=a+b,z=a+c,A=a+d,B=e?a+e:""};D=L.pointerEvent,D&&L.touch&&(L.touch=!1),D?navigator.pointerEnabled?a("pointer","down","move","up","cancel"):a("MSPointer","Down","Move","Up","Cancel"):L.touch?(a("touch","start","move","end","cancel"),E=!0):a("mouse","down","move","up"),n=z+" "+A+" "+B,o=y,D&&!E&&(E=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=E,p[y]=Jb,p[z]=Kb,p[A]=Mb,B&&(p[B]=p[A]),L.touch&&(o+=" mousedown",n+=" mousemove mouseup",p.mousedown=p[y],p.mousemove=p[z],p.mouseup=p[A]),E||(g.allowPanToNext=!1)}}});var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=function(b,c,d,h){Sb&&clearTimeout(Sb),Vb=!0,Ub=!0;var i;b.initialLayout?(i=b.initialLayout,b.initialLayout=null):i=g.getThumbBoundsFn&&g.getThumbBoundsFn(k);var l=d?g.hideAnimationDuration:g.showAnimationDuration,m=function(){Za("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Ca(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Aa("initialZoom"+(d?"OutEnd":"InEnd"))),h&&h(),Vb=!1};if(!l||!i||void 0===i.x)return Aa("initialZoom"+(d?"Out":"In")),q=b.initialZoomLevel,Ja(ma,b.initialPosition),Ea(),a.style.opacity=d?0:1,Ca(1),void(l?setTimeout(function(){m()},l):m());!function(){var c=j,h=!f.currItem.src||f.currItem.loadError||g.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(q=i.w/b.w,ma.x=i.x,ma.y=i.y-I,f[h?"template":"bg"].style.opacity=.001,Ea()),$a("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),h&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Sb=setTimeout(function(){if(Aa("initialZoom"+(d?"Out":"In")),d){var f=i.w/b.w,g={x:ma.x,y:ma.y},j=q,k=ga,n=function(b){1===b?(q=f,ma.x=i.x,ma.y=i.y-K):(q=(f-j)*b+j,ma.x=(i.x-g.x)*b+g.x,ma.y=(i.y-K-g.y)*b+g.y),Ea(),h?a.style.opacity=1-b:Ca(k-b*k)};c?ab("initialZoom",0,1,l,e.easing.cubic.out,n,m):(n(1),Sb=setTimeout(m,l+20))}else q=b.initialZoomLevel,Ja(ma,b.initialPosition),Ea(),Ca(1),h?a.style.opacity=1:Ca(1),Sb=setTimeout(m,l+20)},d?25:90)}()},$b={},_b=[],ac={index:0,errorMsg:'
    The image could not be loaded.
    ',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Tb.length}},bc=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},cc=function(a,b,c){var d=a.bounds;d.center.x=Math.round(($b.x-b)/2),d.center.y=Math.round(($b.y-c)/2)+a.vGap.top,d.max.x=b>$b.x?Math.round($b.x-b):d.center.x,d.max.y=c>$b.y?Math.round($b.y-c)+a.vGap.top:d.center.y,d.min.x=b>$b.x?0:d.center.x,d.min.y=c>$b.y?a.vGap.top:d.center.y},dc=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Aa("parseVerticalMargin",a)),$b.x=b.x,$b.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=$b.x/a.w,f=$b.y/a.h;a.fitRatio=f>e?e:f;var h=g.scaleMode;"orig"===h?c=1:"fit"===h&&(c=a.fitRatio),c>1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=bc())}if(!c)return;return cc(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=bc(),a.initialPosition=a.bounds.center,a.bounds},ec=function(a,b,c,d,e,g){b.loadError||d&&(b.imageAppended=!0,hc(b,d,b===f.currItem&&va),c.appendChild(d),g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500))},fc=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},gc=function(a,b){return a.src&&a.loadError&&a.container?(b&&(a.container.innerHTML=""),a.container.innerHTML=g.errorMsg.replace("%url%",a.src),!0):void 0},hc=function(a,b,c){if(a.src){b||(b=a.container.lastChild);var d=c?a.w:Math.round(a.w*a.fitRatio),e=c?a.h:Math.round(a.h*a.fitRatio);a.placeholder&&!a.loaded&&(a.placeholder.style.width=d+"px",a.placeholder.style.height=e+"px"),b.style.width=d+"px",b.style.height=e+"px"}},ic=function(){if(_b.length){for(var a,b=0;b<_b.length;b++)a=_b[b],a.holder.index===a.index&&ec(a.index,a.item,a.baseDiv,a.img,0,a.clearPlaceholder);_b=[]}};wa("Controller",{publicMethods:{lazyLoadItem:function(a){a=xa(a);var b=Wb(a);b&&(!b.loaded&&!b.loading||v)&&(Aa("gettingData",a,b),b.src&&fc(b))},initController:function(){e.extend(g,ac,!0),f.items=Tb=c,Wb=f.getItemAt,Xb=g.getNumItemsFn,Yb=g.loop,Xb()<3&&(g.loop=!1),za("beforeChange",function(a){var b,c=g.preload,d=null===a||a>=0,e=Math.min(c[0],Xb()),h=Math.min(c[1],Xb());for(b=1;(d?h:e)>=b;b++)f.lazyLoadItem(k+b);for(b=1;(d?e:h)>=b;b++)f.lazyLoadItem(k-b)}),za("initialLayout",function(){f.currItem.initialLayout=g.getThumbBoundsFn&&g.getThumbBoundsFn(k)}),za("mainScrollAnimComplete",ic),za("initialZoomInEnd",ic),za("destroy",function(){for(var a,b=0;b=0&&void 0!==Tb[a]&&Tb[a]},allowProgressiveImg:function(){return g.forceProgressiveLoading||!E||g.mouseUsed||screen.width>1200},setContent:function(a,b){g.loop&&(b=xa(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,i=f.getItemAt(b);if(!i)return void(a.el.innerHTML="");Aa("gettingData",b,i),a.index=b,a.item=i;var j=i.container=e.createEl("pswp__zoom-wrap");if(!i.src&&i.html&&(i.html.tagName?j.appendChild(i.html):j.innerHTML=i.html),gc(i),dc(i,na),!i.src||i.loadError||i.loaded)i.src&&!i.loadError&&(d=e.createEl("pswp__img","img"),d.style.opacity=1,d.src=i.src,hc(i,d),ec(0,i,j,d));else{if(i.loadComplete=function(c){if(h){if(a&&a.index===b){if(gc(c,!0))return c.loadComplete=c.img=null,dc(c,na),Fa(c),void(a.index===k&&f.updateCurrZoomItem());c.imageAppended?!Vb&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):L.transform&&(ca||Vb)?_b.push({item:c,baseDiv:j,img:c.img,index:b,holder:a,clearPlaceholder:!0 }):ec(0,c,j,c.img,0,!0)}c.loadComplete=null,c.img=null,Aa("imageLoadComplete",b,c)}},e.features.transform){var l="pswp__img pswp__img--placeholder";l+=i.msrc?"":" pswp__img--placeholder--blank";var m=e.createEl(l,i.msrc?"img":"");i.msrc&&(m.src=i.msrc),hc(i,m),j.appendChild(m),i.placeholder=m}i.loading||fc(i),f.allowProgressiveImg()&&(!Ub&&L.transform?_b.push({item:i,baseDiv:j,img:i.img,index:b,holder:a}):ec(0,i,j,i.img,0,!0))}Ub||b!==k?Fa(i):(ba=j.style,Zb(i,d||i.img)),a.el.innerHTML="",a.el.appendChild(j)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var jc,kc={},lc=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};wa("Tap",{publicMethods:{initTap:function(){za("firstTouchStart",f.onTapStart),za("touchRelease",f.onTapRelease),za("destroy",function(){kc={},jc=null})},onTapStart:function(a){a.length>1&&(clearTimeout(jc),jc=null)},onTapRelease:function(a,b){if(b&&!V&&!T&&!Ya){var c=b;if(jc&&(clearTimeout(jc),jc=null,sb(c,kc)))return void Aa("doubleTap",c);if("mouse"===b.type)return void lc(a,b,"mouse");if("BUTTON"===a.target.tagName.toUpperCase()||e.hasClass(a.target,"pswp__single-tap"))return void lc(a,b);Ja(kc,c),jc=setTimeout(function(){lc(a,b),jc=null},300)}}}});var mc;wa("DesktopZoom",{publicMethods:{initDesktopZoom:function(){J||(E?za("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){mc={};var c="wheel mousewheel DOMMouseScroll";za("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),za("unbindEvents",function(){mc&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),1>q?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};za("resize",g),za("afterChange",g),za("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),za("pointerUp",h),b||g()},handleMouseWheel:function(a){if(q<=f.currItem.fitRatio)return g.modal&&(!g.closeOnScroll||Ya||S?a.preventDefault():C&&Math.abs(a.deltaY)>2&&(j=!0,f.close())),!0;if(a.stopPropagation(),mc.x=0,"deltaX"in a)1===a.deltaMode?(mc.x=18*a.deltaX,mc.y=18*a.deltaY):(mc.x=a.deltaX,mc.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(mc.x=-.16*a.wheelDeltaX),a.wheelDeltaY?mc.y=-.16*a.wheelDeltaY:mc.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;mc.y=a.detail}Pa(q,!0);var b=ma.x-mc.x,c=ma.y-mc.y;(g.modal||b<=aa.min.x&&b>=aa.max.x&&c<=aa.min.y&&c>=aa.max.y)&&a.preventDefault(),f.panTo(b,c)},toggleDesktopZoom:function(b){b=b||{x:na.x/2+pa.x,y:na.y/2+pa.y};var c=g.getDoubleTapZoom(!0,f.currItem),d=q===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var nc,oc,pc,qc,rc,sc,tc,uc,vc,wc,xc,yc,zc={history:!0,galleryUID:1},Ac=function(){return xc.hash.substring(1)},Bc=function(){nc&&clearTimeout(nc),pc&&clearTimeout(pc)},Cc=function(){var a=Ac(),b={};if(a.length<5)return b;var c,d=a.split("&");for(c=0;c-1&&(tc=tc.substring(0,b),"&"===tc.slice(-1)&&(tc=tc.slice(0,-1))),setTimeout(function(){h&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Ac()===tc?(vc=!0,void f.close()):void(qc||(rc=!0,f.goTo(Cc().pid),rc=!1))},updateURL:function(){Bc(),rc||(uc?nc=setTimeout(Dc,800):Dc())}}}),e.extend(f,bb)}}),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";return function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g
    ").width(h).height(g).addClass("sticky-placeholder"),m=d.stopper,n=a(window);n.bind("scroll",b)})}}(jQuery),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=0&&c.splice(d,1),a.className=c.join(" ")}c.add=function(a,b){a.classList?a.classList.add(b):d(a,b)},c.remove=function(a,b){a.classList?a.classList.remove(b):e(a,b)},c.list=function(a){return a.classList?Array.prototype.slice.apply(a.classList):a.className.split(" ")}},{}],3:[function(a,b,c){"use strict";function d(a,b){return window.getComputedStyle(a)[b]}function e(a,b,c){return"number"==typeof c&&(c=c.toString()+"px"),a.style[b]=c,a}function f(a,b){for(var c in b){var d=b[c];"number"==typeof d&&(d=d.toString()+"px"),a.style[c]=d}return a}var g={};g.e=function(a,b){var c=document.createElement(a);return c.className=b,c},g.appendTo=function(a,b){return b.appendChild(a),a},g.css=function(a,b,c){return"object"==typeof b?f(a,b):void 0===c?d(a,b):e(a,b,c)},g.matches=function(a,b){return void 0!==a.matches?a.matches(b):void 0!==a.matchesSelector?a.matchesSelector(b):void 0!==a.webkitMatchesSelector?a.webkitMatchesSelector(b):void 0!==a.mozMatchesSelector?a.mozMatchesSelector(b):void 0!==a.msMatchesSelector?a.msMatchesSelector(b):void 0},g.remove=function(a){void 0!==a.remove?a.remove():a.parentNode&&a.parentNode.removeChild(a)},g.queryChildren=function(a,b){return Array.prototype.filter.call(a.childNodes,function(a){return g.matches(a,b)})},b.exports=g},{}],4:[function(a,b,c){"use strict";var d=function(a){this.element=a,this.events={}};d.prototype.bind=function(a,b){void 0===this.events[a]&&(this.events[a]=[]),this.events[a].push(b),this.element.addEventListener(a,b,!1)},d.prototype.unbind=function(a,b){var c=void 0!==b;this.events[a]=this.events[a].filter(function(d){return!(!c||d===b)||(this.element.removeEventListener(a,d,!1),!1)},this)},d.prototype.unbindAll=function(){for(var a in this.events)this.unbind(a)};var e=function(){this.eventElements=[]};e.prototype.eventElement=function(a){var b=this.eventElements.filter(function(b){return b.element===a})[0];return void 0===b&&(b=new d(a),this.eventElements.push(b)),b},e.prototype.bind=function(a,b,c){this.eventElement(a).bind(b,c)},e.prototype.unbind=function(a,b,c){this.eventElement(a).unbind(b,c)},e.prototype.unbindAll=function(){for(var a=0;a1&&(k=1),h(a,"top",(b.contentHeight-b.containerHeight)*k),g(a),d.stopPropagation()}),b.settings.stopPropagationOnClick&&b.event.bind(b.scrollbarX,"click",d),b.event.bind(b.scrollbarXRail,"click",function(d){var f=e.toInt(b.scrollbarXWidth/2),i=b.railXRatio*(d.pageX-window.pageXOffset-c(b.scrollbarXRail).left-f),j=b.railXRatio*(b.railXWidth-b.scrollbarXWidth),k=i/j;k<0?k=0:k>1&&(k=1),h(a,"left",(b.contentWidth-b.containerWidth)*k-b.negativeScrollAdjustment),g(a),d.stopPropagation()})}var e=a("../../lib/helper"),f=a("../instances"),g=a("../update-geometry"),h=a("../update-scroll");b.exports=function(a){d(a,f.get(a))}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(a,b,c){"use strict";function d(a,b){function c(c){var e=d+c*b.railXRatio,g=Math.max(0,b.scrollbarXRail.getBoundingClientRect().left)+b.railXRatio*(b.railXWidth-b.scrollbarXWidth);b.scrollbarXLeft=e<0?0:e>g?g:e;var h=f.toInt(b.scrollbarXLeft*(b.contentWidth-b.containerWidth)/(b.containerWidth-b.railXRatio*b.scrollbarXWidth))-b.negativeScrollAdjustment;j(a,"left",h)}var d=null,e=null,h=function(b){c(b.pageX-e),i(a),b.stopPropagation(),b.preventDefault()},k=function(){f.stopScrolling(a,"x"),b.event.unbind(b.ownerDocument,"mousemove",h)};b.event.bind(b.scrollbarX,"mousedown",function(c){e=c.pageX,d=f.toInt(g.css(b.scrollbarX,"left"))*b.railXRatio,f.startScrolling(a,"x"),b.event.bind(b.ownerDocument,"mousemove",h),b.event.once(b.ownerDocument,"mouseup",k),c.stopPropagation(),c.preventDefault()})}function e(a,b){function c(c){var e=d+c*b.railYRatio,g=Math.max(0,b.scrollbarYRail.getBoundingClientRect().top)+b.railYRatio*(b.railYHeight-b.scrollbarYHeight);b.scrollbarYTop=e<0?0:e>g?g:e;var h=f.toInt(b.scrollbarYTop*(b.contentHeight-b.containerHeight)/(b.containerHeight-b.railYRatio*b.scrollbarYHeight));j(a,"top",h)}var d=null,e=null,h=function(b){c(b.pageY-e),i(a),b.stopPropagation(),b.preventDefault()},k=function(){f.stopScrolling(a,"y"),b.event.unbind(b.ownerDocument,"mousemove",h)};b.event.bind(b.scrollbarY,"mousedown",function(c){e=c.pageY,d=f.toInt(g.css(b.scrollbarY,"top"))*b.railYRatio,f.startScrolling(a,"y"),b.event.bind(b.ownerDocument,"mousemove",h),b.event.once(b.ownerDocument,"mouseup",k),c.stopPropagation(),c.preventDefault()})}var f=a("../../lib/helper"),g=a("../../lib/dom"),h=a("../instances"),i=a("../update-geometry"),j=a("../update-scroll");b.exports=function(a){var b=h.get(a);d(a,b),e(a,b)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(a,b,c){"use strict";function d(a,b){function c(c,d){var e=a.scrollTop;if(0===c){if(!b.scrollbarYActive)return!1;if(0===e&&d>0||e>=b.contentHeight-b.containerHeight&&d<0)return!b.settings.wheelPropagation}var f=a.scrollLeft;if(0===d){if(!b.scrollbarXActive)return!1;if(0===f&&c<0||f>=b.contentWidth-b.containerWidth&&c>0)return!b.settings.wheelPropagation}return!0}var d=!1;b.event.bind(a,"mouseenter",function(){d=!0}),b.event.bind(a,"mouseleave",function(){d=!1});var g=!1;b.event.bind(b.ownerDocument,"keydown",function(j){if(!(j.isDefaultPrevented&&j.isDefaultPrevented()||j.defaultPrevented)){var k=f.matches(b.scrollbarX,":focus")||f.matches(b.scrollbarY,":focus");if(d||k){var l=document.activeElement?document.activeElement:b.ownerDocument.activeElement;if(l){if("IFRAME"===l.tagName)l=l.contentDocument.activeElement;else for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(e.isEditable(l))return}var m=0,n=0;switch(j.which){case 37:m=-30;break;case 38:n=30;break;case 39:m=30;break;case 40:n=-30;break;case 33:n=90;break;case 32:n=j.shiftKey?90:-90;break;case 34:n=-90;break;case 35:n=j.ctrlKey?-b.contentHeight:-b.containerHeight;break;case 36:n=j.ctrlKey?a.scrollTop:b.containerHeight;break;default:return}i(a,"top",a.scrollTop-n),i(a,"left",a.scrollLeft+m),h(a),(g=c(m,n))&&j.preventDefault()}}})}var e=a("../../lib/helper"),f=a("../../lib/dom"),g=a("../instances"),h=a("../update-geometry"),i=a("../update-scroll");b.exports=function(a){d(a,g.get(a))}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(a,b,c){"use strict";function d(a,b){function c(c,d){var e=a.scrollTop;if(0===c){if(!b.scrollbarYActive)return!1;if(0===e&&d>0||e>=b.contentHeight-b.containerHeight&&d<0)return!b.settings.wheelPropagation}var f=a.scrollLeft;if(0===d){if(!b.scrollbarXActive)return!1;if(0===f&&c<0||f>=b.contentWidth-b.containerWidth&&c>0)return!b.settings.wheelPropagation}return!0}function d(a){var b=a.deltaX,c=-1*a.deltaY;return void 0!==b&&void 0!==c||(b=-1*a.wheelDeltaX/6,c=a.wheelDeltaY/6),a.deltaMode&&1===a.deltaMode&&(b*=10,c*=10),b!==b&&c!==c&&(b=0,c=a.wheelDelta),[b,c]}function e(b,c){var d=a.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(d){if("TEXTAREA"!==d.tagName&&!window.getComputedStyle(d).overflow.match(/(scroll|auto)/))return!1;var e=d.scrollHeight-d.clientHeight;if(e>0&&!(0===d.scrollTop&&c>0||d.scrollTop===e&&c<0))return!0;var f=d.scrollLeft-d.clientWidth;if(f>0&&!(0===d.scrollLeft&&b<0||d.scrollLeft===f&&b>0))return!0}return!1}function h(h){var j=d(h),k=j[0],l=j[1];e(k,l)||(i=!1,b.settings.useBothWheelAxes?b.scrollbarYActive&&!b.scrollbarXActive?(l?g(a,"top",a.scrollTop-l*b.settings.wheelSpeed):g(a,"top",a.scrollTop+k*b.settings.wheelSpeed),i=!0):b.scrollbarXActive&&!b.scrollbarYActive&&(k?g(a,"left",a.scrollLeft+k*b.settings.wheelSpeed):g(a,"left",a.scrollLeft-l*b.settings.wheelSpeed),i=!0):(g(a,"top",a.scrollTop-l*b.settings.wheelSpeed),g(a,"left",a.scrollLeft+k*b.settings.wheelSpeed)),f(a),(i=i||c(k,l))&&(h.stopPropagation(),h.preventDefault()))}var i=!1;void 0!==window.onwheel?b.event.bind(a,"wheel",h):void 0!==window.onmousewheel&&b.event.bind(a,"mousewheel",h)}var e=a("../instances"),f=a("../update-geometry"),g=a("../update-scroll");b.exports=function(a){d(a,e.get(a))}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(a,b,c){"use strict";function d(a,b){b.event.bind(a,"scroll",function(){f(a)})}var e=a("../instances"),f=a("../update-geometry");b.exports=function(a){d(a,e.get(a))}},{"../instances":18,"../update-geometry":19}],15:[function(a,b,c){"use strict";function d(a,b){function c(){var a=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===a.toString().length?null:a.getRangeAt(0).commonAncestorContainer}function d(){j||(j=setInterval(function(){return f.get(a)?(h(a,"top",a.scrollTop+k.top),h(a,"left",a.scrollLeft+k.left),void g(a)):void clearInterval(j)},50))}function i(){j&&(clearInterval(j),j=null),e.stopScrolling(a)}var j=null,k={top:0,left:0},l=!1;b.event.bind(b.ownerDocument,"selectionchange",function(){a.contains(c())?l=!0:(l=!1,i())}),b.event.bind(window,"mouseup",function(){l&&(l=!1,i())}),b.event.bind(window,"mousemove",function(b){if(l){var c={x:b.pageX,y:b.pageY},f={left:a.offsetLeft,right:a.offsetLeft+a.offsetWidth,top:a.offsetTop,bottom:a.offsetTop+a.offsetHeight};c.xf.right-3?(k.left=5,e.startScrolling(a,"x")):k.left=0,c.yf.bottom-3?(k.top=c.y-f.bottom+3<5?5:20,e.startScrolling(a,"y")):k.top=0,0===k.top&&0===k.left?i():d()}})}var e=a("../../lib/helper"),f=a("../instances"),g=a("../update-geometry"),h=a("../update-scroll");b.exports=function(a){d(a,f.get(a))}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(a,b,c){"use strict";function d(a,b,c,d){function e(c,d){var e=a.scrollTop,f=a.scrollLeft,g=Math.abs(c),h=Math.abs(d);if(h>g){if(d<0&&e===b.contentHeight-b.containerHeight||d>0&&0===e)return!b.settings.swipePropagation}else if(g>h&&(c<0&&f===b.contentWidth-b.containerWidth||c>0&&0===f))return!b.settings.swipePropagation;return!0}function i(b,c){h(a,"top",a.scrollTop-c),h(a,"left",a.scrollLeft-b),g(a)}function j(){u=!0}function k(){u=!1}function l(a){return a.targetTouches?a.targetTouches[0]:a}function m(a){return!(!a.targetTouches||1!==a.targetTouches.length)||!(!a.pointerType||"mouse"===a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE)}function n(a){if(m(a)){v=!0;var b=l(a);q.pageX=b.pageX,q.pageY=b.pageY,r=(new Date).getTime(),null!==t&&clearInterval(t),a.stopPropagation()}}function o(a){if(!v&&b.settings.swipePropagation&&n(a),!u&&v&&m(a)){var c=l(a),d={pageX:c.pageX,pageY:c.pageY},f=d.pageX-q.pageX,g=d.pageY-q.pageY;i(f,g),q=d;var h=(new Date).getTime(),j=h-r;j>0&&(s.x=f/j,s.y=g/j,r=h),e(f,g)&&(a.stopPropagation(),a.preventDefault())}}function p(){!u&&v&&(v=!1,clearInterval(t),t=setInterval(function(){return f.get(a)?Math.abs(s.x)<.01&&Math.abs(s.y)<.01?void clearInterval(t):(i(30*s.x,30*s.y),s.x*=.8,void(s.y*=.8)):void clearInterval(t)},10))} var q={},r=0,s={},t=null,u=!1,v=!1;c&&(b.event.bind(window,"touchstart",j),b.event.bind(window,"touchend",k),b.event.bind(a,"touchstart",n),b.event.bind(a,"touchmove",o),b.event.bind(a,"touchend",p)),d&&(window.PointerEvent?(b.event.bind(window,"pointerdown",j),b.event.bind(window,"pointerup",k),b.event.bind(a,"pointerdown",n),b.event.bind(a,"pointermove",o),b.event.bind(a,"pointerup",p)):window.MSPointerEvent&&(b.event.bind(window,"MSPointerDown",j),b.event.bind(window,"MSPointerUp",k),b.event.bind(a,"MSPointerDown",n),b.event.bind(a,"MSPointerMove",o),b.event.bind(a,"MSPointerUp",p)))}var e=a("../../lib/helper"),f=a("../instances"),g=a("../update-geometry"),h=a("../update-scroll");b.exports=function(a){if(e.env.supportsTouch||e.env.supportsIePointer){d(a,f.get(a),e.env.supportsTouch,e.env.supportsIePointer)}}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(a,b,c){"use strict";var d=a("../lib/helper"),e=a("../lib/class"),f=a("./instances"),g=a("./update-geometry"),h={"click-rail":a("./handler/click-rail"),"drag-scrollbar":a("./handler/drag-scrollbar"),keyboard:a("./handler/keyboard"),wheel:a("./handler/mouse-wheel"),touch:a("./handler/touch"),selection:a("./handler/selection")},i=a("./handler/native-scroll");b.exports=function(a,b){b="object"==typeof b?b:{},e.add(a,"ps-container");var c=f.add(a);c.settings=d.extend(c.settings,b),e.add(a,"ps-theme-"+c.settings.theme),c.settings.handlers.forEach(function(b){h[b](a)}),i(a),g(a)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(a,b,c){"use strict";function d(a){function b(){i.add(a,"ps-focus")}function c(){i.remove(a,"ps-focus")}var d=this;d.settings=h.clone(j),d.containerWidth=null,d.containerHeight=null,d.contentWidth=null,d.contentHeight=null,d.isRtl="rtl"===k.css(a,"direction"),d.isNegativeScroll=function(){var b=a.scrollLeft,c=null;return a.scrollLeft=-1,c=a.scrollLeft<0,a.scrollLeft=b,c}(),d.negativeScrollAdjustment=d.isNegativeScroll?a.scrollWidth-a.clientWidth:0,d.event=new l,d.ownerDocument=a.ownerDocument||document,d.scrollbarXRail=k.appendTo(k.e("div","ps-scrollbar-x-rail"),a),d.scrollbarX=k.appendTo(k.e("div","ps-scrollbar-x"),d.scrollbarXRail),d.scrollbarX.setAttribute("tabindex",0),d.event.bind(d.scrollbarX,"focus",b),d.event.bind(d.scrollbarX,"blur",c),d.scrollbarXActive=null,d.scrollbarXWidth=null,d.scrollbarXLeft=null,d.scrollbarXBottom=h.toInt(k.css(d.scrollbarXRail,"bottom")),d.isScrollbarXUsingBottom=d.scrollbarXBottom===d.scrollbarXBottom,d.scrollbarXTop=d.isScrollbarXUsingBottom?null:h.toInt(k.css(d.scrollbarXRail,"top")),d.railBorderXWidth=h.toInt(k.css(d.scrollbarXRail,"borderLeftWidth"))+h.toInt(k.css(d.scrollbarXRail,"borderRightWidth")),k.css(d.scrollbarXRail,"display","block"),d.railXMarginWidth=h.toInt(k.css(d.scrollbarXRail,"marginLeft"))+h.toInt(k.css(d.scrollbarXRail,"marginRight")),k.css(d.scrollbarXRail,"display",""),d.railXWidth=null,d.railXRatio=null,d.scrollbarYRail=k.appendTo(k.e("div","ps-scrollbar-y-rail"),a),d.scrollbarY=k.appendTo(k.e("div","ps-scrollbar-y"),d.scrollbarYRail),d.scrollbarY.setAttribute("tabindex",0),d.event.bind(d.scrollbarY,"focus",b),d.event.bind(d.scrollbarY,"blur",c),d.scrollbarYActive=null,d.scrollbarYHeight=null,d.scrollbarYTop=null,d.scrollbarYRight=h.toInt(k.css(d.scrollbarYRail,"right")),d.isScrollbarYUsingRight=d.scrollbarYRight===d.scrollbarYRight,d.scrollbarYLeft=d.isScrollbarYUsingRight?null:h.toInt(k.css(d.scrollbarYRail,"left")),d.scrollbarYOuterWidth=d.isRtl?h.outerWidth(d.scrollbarY):null,d.railBorderYWidth=h.toInt(k.css(d.scrollbarYRail,"borderTopWidth"))+h.toInt(k.css(d.scrollbarYRail,"borderBottomWidth")),k.css(d.scrollbarYRail,"display","block"),d.railYMarginHeight=h.toInt(k.css(d.scrollbarYRail,"marginTop"))+h.toInt(k.css(d.scrollbarYRail,"marginBottom")),k.css(d.scrollbarYRail,"display",""),d.railYHeight=null,d.railYRatio=null}function e(a){return a.getAttribute("data-ps-id")}function f(a,b){a.setAttribute("data-ps-id",b)}function g(a){a.removeAttribute("data-ps-id")}var h=a("../lib/helper"),i=a("../lib/class"),j=a("./default-setting"),k=a("../lib/dom"),l=a("../lib/event-manager"),m=a("../lib/guid"),n={};c.add=function(a){var b=m();return f(a,b),n[b]=new d(a),n[b]},c.remove=function(a){delete n[e(a)],g(a)},c.get=function(a){return n[e(a)]}},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(a,b,c){"use strict";function d(a,b){return a.settings.minScrollbarLength&&(b=Math.max(b,a.settings.minScrollbarLength)),a.settings.maxScrollbarLength&&(b=Math.min(b,a.settings.maxScrollbarLength)),b}function e(a,b){var c={width:b.railXWidth};b.isRtl?c.left=b.negativeScrollAdjustment+a.scrollLeft+b.containerWidth-b.contentWidth:c.left=a.scrollLeft,b.isScrollbarXUsingBottom?c.bottom=b.scrollbarXBottom-a.scrollTop:c.top=b.scrollbarXTop+a.scrollTop,h.css(b.scrollbarXRail,c);var d={top:a.scrollTop,height:b.railYHeight};b.isScrollbarYUsingRight?b.isRtl?d.right=b.contentWidth-(b.negativeScrollAdjustment+a.scrollLeft)-b.scrollbarYRight-b.scrollbarYOuterWidth:d.right=b.scrollbarYRight-a.scrollLeft:b.isRtl?d.left=b.negativeScrollAdjustment+a.scrollLeft+2*b.containerWidth-b.contentWidth-b.scrollbarYLeft-b.scrollbarYOuterWidth:d.left=b.scrollbarYLeft+a.scrollLeft,h.css(b.scrollbarYRail,d),h.css(b.scrollbarX,{left:b.scrollbarXLeft,width:b.scrollbarXWidth-b.railBorderXWidth}),h.css(b.scrollbarY,{top:b.scrollbarYTop,height:b.scrollbarYHeight-b.railBorderYWidth})}var f=a("../lib/helper"),g=a("../lib/class"),h=a("../lib/dom"),i=a("./instances"),j=a("./update-scroll");b.exports=function(a){var b=i.get(a);b.containerWidth=a.clientWidth,b.containerHeight=a.clientHeight,b.contentWidth=a.scrollWidth,b.contentHeight=a.scrollHeight;var c;a.contains(b.scrollbarXRail)||(c=h.queryChildren(a,".ps-scrollbar-x-rail"),c.length>0&&c.forEach(function(a){h.remove(a)}),h.appendTo(b.scrollbarXRail,a)),a.contains(b.scrollbarYRail)||(c=h.queryChildren(a,".ps-scrollbar-y-rail"),c.length>0&&c.forEach(function(a){h.remove(a)}),h.appendTo(b.scrollbarYRail,a)),!b.settings.suppressScrollX&&b.containerWidth+b.settings.scrollXMarginOffset=b.railXWidth-b.scrollbarXWidth&&(b.scrollbarXLeft=b.railXWidth-b.scrollbarXWidth),b.scrollbarYTop>=b.railYHeight-b.scrollbarYHeight&&(b.scrollbarYTop=b.railYHeight-b.scrollbarYHeight),e(a,b),b.scrollbarXActive?g.add(a,"ps-active-x"):(g.remove(a,"ps-active-x"),b.scrollbarXWidth=0,b.scrollbarXLeft=0,j(a,"left",0)),b.scrollbarYActive?g.add(a,"ps-active-y"):(g.remove(a,"ps-active-y"),b.scrollbarYHeight=0,b.scrollbarYTop=0,j(a,"top",0))}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(a,b,c){"use strict";var d,e,f=a("./instances"),g=document.createEvent("Event"),h=document.createEvent("Event"),i=document.createEvent("Event"),j=document.createEvent("Event"),k=document.createEvent("Event"),l=document.createEvent("Event"),m=document.createEvent("Event"),n=document.createEvent("Event"),o=document.createEvent("Event"),p=document.createEvent("Event");g.initEvent("ps-scroll-up",!0,!0),h.initEvent("ps-scroll-down",!0,!0),i.initEvent("ps-scroll-left",!0,!0),j.initEvent("ps-scroll-right",!0,!0),k.initEvent("ps-scroll-y",!0,!0),l.initEvent("ps-scroll-x",!0,!0),m.initEvent("ps-x-reach-start",!0,!0),n.initEvent("ps-x-reach-end",!0,!0),o.initEvent("ps-y-reach-start",!0,!0),p.initEvent("ps-y-reach-end",!0,!0),b.exports=function(a,b,c){if(void 0===a)throw"You must provide an element to the update-scroll function";if(void 0===b)throw"You must provide an axis to the update-scroll function";if(void 0===c)throw"You must provide a value to the update-scroll function";"top"===b&&c<=0&&(a.scrollTop=c=0,a.dispatchEvent(o)),"left"===b&&c<=0&&(a.scrollLeft=c=0,a.dispatchEvent(m));var q=f.get(a);"top"===b&&c>=q.contentHeight-q.containerHeight&&(c=q.contentHeight-q.containerHeight,c-a.scrollTop<=1?c=a.scrollTop:a.scrollTop=c,a.dispatchEvent(p)),"left"===b&&c>=q.contentWidth-q.containerWidth&&(c=q.contentWidth-q.containerWidth,c-a.scrollLeft<=1?c=a.scrollLeft:a.scrollLeft=c,a.dispatchEvent(n)),d||(d=a.scrollTop),e||(e=a.scrollLeft),"top"===b&&cd&&a.dispatchEvent(h),"left"===b&&ce&&a.dispatchEvent(j),"top"===b&&(a.scrollTop=d=c,a.dispatchEvent(k)),"left"===b&&(a.scrollLeft=e=c,a.dispatchEvent(l))}},{"./instances":18}],21:[function(a,b,c){"use strict";var d=a("../lib/helper"),e=a("../lib/dom"),f=a("./instances"),g=a("./update-geometry"),h=a("./update-scroll");b.exports=function(a){var b=f.get(a);b&&(b.negativeScrollAdjustment=b.isNegativeScroll?a.scrollWidth-a.clientWidth:0,e.css(b.scrollbarXRail,"display","block"),e.css(b.scrollbarYRail,"display","block"),b.railXMarginWidth=d.toInt(e.css(b.scrollbarXRail,"marginLeft"))+d.toInt(e.css(b.scrollbarXRail,"marginRight")),b.railYMarginHeight=d.toInt(e.css(b.scrollbarYRail,"marginTop"))+d.toInt(e.css(b.scrollbarYRail,"marginBottom")),e.css(b.scrollbarXRail,"display","none"),e.css(b.scrollbarYRail,"display","none"),g(a),h(a,"top",a.scrollTop),h(a,"left",a.scrollLeft),e.css(b.scrollbarXRail,"display",""),e.css(b.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]),$(function(){$(".arrow-r").on("click",function(){$(".arrow-r").not(this).find(".fa-angle-down").removeClass("rotate-element"),$(this).find(".fa-angle-down").toggleClass("rotate-element")})}),function(a){var b=!1,c={data:[],placeholder:"",secondaryPlaceholder:""};a(document).ready(function(){a(document).on("click",".chip .close",function(b){a(this).closest(".chips").data("initialized")||a(this).closest(".chip").remove()})}),a.fn.material_chip=function(d){var e=this;return this.$el=a(this),this.$document=a(document),this.SELS={CHIPS:".chips",CHIP:".chip",INPUT:"input",DELETE:".fa",SELECTED_CHIP:".selected"},"data"===d?this.$el.data("chips"):"options"===d?this.$el.data("options"):(this.$el.data("options",a.extend({},c,d)),this.init=function(){var b=0;e.$el.each(function(){var c=a(this);if(!c.data("initialized")){var d=c.data("options");(!d.data||!d.data instanceof Array)&&(d.data=[]),c.data("chips",d.data),c.data("index",b),c.data("initialized",!0),c.hasClass(e.SELS.CHIPS)||c.addClass("chips"),e.chips(c),b++}})},this.handleEvents=function(){var b=e.SELS;e.$document.on("click",b.CHIPS,function(c){a(c.target).find(b.INPUT).focus()}),e.$document.on("click",b.CHIP,function(c){a(b.CHIP).removeClass("selected"),a(this).toggleClass("selected")}),e.$document.on("keydown",function(c){if(!a(c.target).is("input, textarea")){var d,f=e.$document.find(b.CHIP+b.SELECTED_CHIP),g=f.closest(b.CHIPS),h=f.siblings(b.CHIP).length;if(f.length)if(8===c.which||46===c.which){c.preventDefault();var i=g.data("index");d=f.index(),e.deleteChip(i,d,g);var j=null;d+1h)return void g.find("input").focus();e.selectChip(g.data("index"),d,g)}}}),e.$document.on("focusin",b.CHIPS+" "+b.INPUT,function(c){a(c.target).closest(b.CHIPS).addClass("focus"),a(b.CHIP).removeClass("selected")}),e.$document.on("focusout",b.CHIPS+" "+b.INPUT,function(c){a(c.target).closest(b.CHIPS).removeClass("focus")}),e.$document.on("keydown",b.CHIPS+" "+b.INPUT,function(c){var d=a(c.target),f=d.closest(b.CHIPS),g=f.data("index"),h=f.children(b.CHIP).length;return 13===c.which?(c.preventDefault(),e.addChip(g,{tag:d.val()},f),void d.val("")):8!==c.keyCode&&37!==c.keyCode||""!==d.val()||!h?void 0:(e.selectChip(g,h-1,f),void d.blur())}),e.$document.on("click",b.CHIPS+" "+b.DELETE,function(c){var d=a(c.target),f=d.closest(b.CHIPS),g=d.closest(b.CHIP);c.stopPropagation(),e.deleteChip(f.data("index"),g.index(),f),f.find("input").focus()})},this.chips=function(a){var b="";a.data("options");a.data("chips").forEach(function(a){b+=e.renderChip(a)}),b+='',a.html(b),e.setPlaceholder(a)},this.renderChip=function(a){if(a.tag){var b='
    '+a.tag;return a.image&&(b+=' '),b+='',b+="
    "}},this.setPlaceholder=function(a){var b=a.data("options");a.data("chips").length&&b.placeholder?a.find("input").prop("placeholder",b.placeholder):!a.data("chips").length&&b.secondaryPlaceholder&&a.find("input").prop("placeholder",b.secondaryPlaceholder)},this.isValid=function(a,b){for(var c=a.data("chips"),d=!1,e=0;e');d.insertAfter($(this))}b.on("keyup",function(a){var e=b.val();if(d.empty(),e.length)for(var f in c)if(-1!==c[f].toLowerCase().indexOf(e.toLowerCase())){var g=$("
  • "+c[f]+"
  • ");d.append(g)}13==a.which&&(d.children(":first").trigger("click"),d.empty()),0==e.length?$(".mdb-autocomplete-clear").css("visibility","hidden"):$(".mdb-autocomplete-clear").css("visibility","visible")}),d.on("click","li",function(){b.val($(this).text()),d.empty()}),$(".mdb-autocomplete-clear").on("click",function(a){a.preventDefault(),b.val(""),$(this).css("visibility","hidden"),d.empty(),$(this).parent().find("label").removeClass("active")})})};