/*! * imagesLoaded PACKAGED v4.1.4 * JavaScript is all like "You images are done yet or what?" * MIT License */ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;ob&&(b+=1);1b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+ 255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1=g.currentTime)for(var G=0;G=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime= 0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0=== n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25, .46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)? d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;db&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q}); {class Uncover{constructor(el,options){this.DOM={el:el};this.options={covered:true,slicesTotal:3,slicesColor:'#FFF',orientation:'vertical',slicesOrigin:{show:'bottom',hide:'bottom'}};Object.assign(this.options,options);this.isCovered=this.options.covered;this.layout();if(!this.isCovered){this.show();}} layout(){this.DOM.el.classList.add('uncover');let inner='';inner+=`
`;for(let i=0;i<=this.options.slicesTotal-1;++i){inner+=`
`;} inner+=`
`;this.DOM.el.innerHTML=inner;this.DOM.img=this.DOM.el.querySelector('.uncover__img');this.DOM.slices=Array.from(this.DOM.el.querySelectorAll('.uncover__slice'));this.slicesTotal=this.DOM.slices.length;} show(animation=false,animationSettings={}){if(!this.isCovered)return;return this.toggle(animation,animationSettings);} hide(animation=false,animationSettings={}){if(this.isCovered)return;return this.toggle(animation,animationSettings);} toggle(animation,animationSettings){this.isCovered=!this.isCovered;if(!animation){this.DOM.slices.forEach((slice)=>{slice.style.transform=!this.isCovered?this.options.orientation==='vertical'?'translateY(100%)':'translateX(100%)':'none';});} else{let settings={slices:{targets:this.DOM.slices,duration:800,delay:(_,i)=>i*80,easing:'easeInOutQuart',translateX:this.options.orientation==='vertical'?'0%':!this.isCovered?this.options.slicesOrigin.show==='right'?'100%':'-100%':this.options.slicesOrigin.hide==='right'?['100%','0%']:['-100%','0%'],translateY:this.options.orientation==='vertical'?!this.isCovered?this.options.slicesOrigin.show==='bottom'?'100%':'-100%':this.options.slicesOrigin.hide==='bottom'?['100%','0%']:['-100%','0%']:'0%'},image:{targets:this.DOM.img}};Object.assign(settings.slices,animationSettings.slices);Object.assign(settings.image,animationSettings.image);anime.remove(this.DOM.slices);anime.remove(this.DOM.img);let promises=[anime(settings.slices).finished];if(settings.image.duration){promises.push(anime(settings.image).finished);} return Promise.all(promises);}}} window.Uncover=Uncover;} {const uncoverOpts=[{slicesTotal:3,slicesColor:'',orientation:'vertical',slicesOrigin:{show:'top',hide:'bottom'}},{slicesTotal:7,slicesColor:'#111',orientation:'horizontal',slicesOrigin:{show:'right',hide:'right'}},{slicesTotal:9,slicesColor:'#111',orientation:'vertical',slicesOrigin:{show:'bottom',hide:'bottom'}},{slicesTotal:5,slicesColor:'#111',orientation:'horizontal',slicesOrigin:{show:'left',hide:'left'}},{slicesTotal:6,slicesColor:'#111',orientation:'vertical',slicesOrigin:{show:'bottom',hide:'bottom'}}];class Slideshow{constructor(el){this.DOM={el:el};this.DOM.slides=Array.from(this.DOM.el.querySelectorAll('.banner-slide'));this.slidesTotal=this.DOM.slides.length;this.current=0;this.uncoverItems=[];this.DOM.slides.forEach((slide,pos)=>this.uncoverItems.push(new Uncover(slide.querySelector('.slide__img'),uncoverOpts[pos])));this.init();} init(){this.isAnimating=true;this.DOM.slides[this.current].classList.add('slide--current');this.uncoverItems[this.current].show(true,{image:{duration:800,delay:350,easing:'easeOutCubic',scale:[1.3,1]}}).then(()=>this.isAnimating=false);} navigate(pos){if(this.isAnimating||this.current===pos||pos<0||pos>this.slidesTotal-1)return;this.isAnimating=true;this.uncoverItems[this.current].hide(true).then(()=>{this.DOM.slides[this.current].classList.remove('slide--current');this.current=pos;const newItem=this.uncoverItems[this.current];newItem.hide();this.DOM.slides[this.current].classList.add('slide--current');newItem.show(true,{image:{duration:800,delay:350,easing:'easeOutCubic',scale:[1.3,1]}}).then(()=>this.isAnimating=false);});}} imagesLoaded(document.querySelectorAll('.slide__img'),{background:true},()=>{document.body.classList.remove('loading');const slideshow=new Slideshow(document.querySelector('.banner'));const pagination=document.querySelector('.pagination');const triggers=Array.from(pagination.querySelectorAll('.pagination__item'));triggers.forEach((trigger,pos)=>{if(pos===0){trigger.classList.add('pagination__item--current');} trigger.addEventListener('click',()=>{if(slideshow.isAnimating)return;slideshow.navigate(pos);pagination.querySelector('.pagination__item--current').classList.remove('pagination__item--current');trigger.classList.add('pagination__item--current');})});document.addEventListener('keydown',(ev)=>{if(slideshow.isAnimating)return;const keyCode=ev.keyCode||ev.which;let newpos;if(keyCode===37){newpos=slideshow.current>0?slideshow.current-1:slideshow.slidesTotal-1;slideshow.navigate(newpos);} else if(keyCode===39){newpos=slideshow.current<slideshow.slidesTotal-1?slideshow.current+1:0;slideshow.navigate(newpos);} else return;pagination.querySelector('.pagination__item--current').classList.remove('pagination__item--current');triggers[newpos].classList.add('pagination__item--current');});});}