
/*! Pusha v2.0.0 | MIT License | https://github.com/slavanga/pusha */
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():e.Pusha=t()}(this,function(){"use strict";var d=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}return e}(),u=function(){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();return function(e,t){var n="string"==typeof e?document.querySelector(e):e;if(!n)return!1;var s=document.documentElement,o=document.getElementsByClassName("pusha-blocker")[0],i=n.querySelector("[data-close]"),a=n.querySelector(".pusha-panel__content"),l={closeOnEsc:!0,closeOnClick:!0,disableOverscroll:!0,disableBodyscroll:!1,activeClass:"pusha-active",onOpen:function(){},onClose:function(){}};for(var c in t)l.hasOwnProperty(c)&&(l[c]=t[c]);var r={isOpen:!1,open:function(e){r.isOpen||(r.isOpen=!0,n.classList.add("pusha-panel--active"),s.classList.add(l.activeClass),document.body.scrollHeight>window.innerHeight&&(s.style.paddingRight=u+"px",Array.prototype.forEach.call(document.getElementsByClassName("pusha-push"),function(e){e.style.paddingRight=u+"px"})),e&&(r.activeElement=e.currentTarget,r.activeElement.setAttribute("aria-expanded",!0)),n.setAttribute("aria-hidden",!1),a.focus(),l.onOpen(n))},close:function(e){r.isOpen&&(r.isOpen=!1,n.classList.remove("pusha-panel--active"),s.classList.remove(l.activeClass),s.style.paddingRight="",Array.prototype.forEach.call(document.getElementsByClassName("pusha-push"),function(e){e.style.paddingRight=""}),r.activeElement&&(r.activeElement.setAttribute("aria-expanded",!1),r.activeElement.focus()),n.setAttribute("aria-hidden",!0),l.onClose(n))},toggle:function(e){r.isOpen?r.close(e):r.open(e)},disableOverscroll:function(e){e.addEventListener("touchstart",function(){0===e.scrollTop?e.scrollTop=1:e.scrollTop+e.offsetHeight===e.scrollHeight&&(e.scrollTop=e.scrollTop-1)})},disableBodyscroll:function(t){document.body.addEventListener("touchmove",function(e){r.isOpen&&t.scrollHeight<=t.clientHeight&&e.preventDefault()},!!d&&{passive:!1})}};return n.addEventListener("transitionend",function(e){"opacity"==e.propertyName&&(r.isOpen?s.classList.add("pusha-animated"):s.classList.remove("pusha-animated"))}),window.CSS&&CSS.supports("overscroll-behavior","contain")||(l.disableOverscroll&&r.disableOverscroll(a),l.disableBodyscroll&&r.disableBodyscroll(a)),l.closeOnEsc&&document.addEventListener("keydown",function(e){27===e.keyCode&&r.close(e)}),void 0===o&&((o=document.createElement("div")).className="pusha-blocker",document.body.appendChild(o)),l.closeOnClick&&o.addEventListener("click",r.close),i&&i.addEventListener("click",r.close),a.setAttribute("tabindex","-1"),n.pusha=r}});
/*! tiny-slider v2.9.3 | MIT License | https://github.com/ganlanyuan/tiny-slider */
var tns=function(){var t=window,Ai=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)},e=window,Ni=e.cancelAnimationFrame||e.mozCancelAnimationFrame||function(t){clearTimeout(t)};function Li(){for(var t,e,n,i=arguments[0]||{},a=1,r=arguments.length;a<r;a++)if(null!==(t=arguments[a]))for(e in t)i!==(n=t[e])&&void 0!==n&&(i[e]=n);return i}function Bi(t){return 0<=["true","false"].indexOf(t)?JSON.parse(t):t}function Si(t,e,n,i){if(i)try{t.setItem(e,n)}catch(t){}return n}function Hi(){var t=document,e=t.body;return e||((e=t.createElement("body")).fake=!0),e}var n=document.documentElement;function Oi(t){var e="";return t.fake&&(e=n.style.overflow,t.style.background="",t.style.overflow=n.style.overflow="hidden",n.appendChild(t)),e}function Di(t,e){t.fake&&(t.remove(),n.style.overflow=e,n.offsetHeight)}function ki(t,e,n,i){"insertRule"in t?t.insertRule(e+"{"+n+"}",i):t.addRule(e,n,i)}function Ri(t){return("insertRule"in t?t.cssRules:t.rules).length}function Ii(t,e,n){for(var i=0,a=t.length;i<a;i++)e.call(n,t[i],i)}var i="classList"in document.createElement("_"),Pi=i?function(t,e){return t.classList.contains(e)}:function(t,e){return 0<=t.className.indexOf(e)},zi=i?function(t,e){Pi(t,e)||t.classList.add(e)}:function(t,e){Pi(t,e)||(t.className+=" "+e)},Wi=i?function(t,e){Pi(t,e)&&t.classList.remove(e)}:function(t,e){Pi(t,e)&&(t.className=t.className.replace(e,""))};function qi(t,e){return t.hasAttribute(e)}function Fi(t,e){return t.getAttribute(e)}function r(t){return void 0!==t.item}function ji(t,e){if(t=r(t)||t instanceof Array?t:[t],"[object Object]"===Object.prototype.toString.call(e))for(var n=t.length;n--;)for(var i in e)t[n].setAttribute(i,e[i])}function Vi(t,e){t=r(t)||t instanceof Array?t:[t];for(var n=(e=e instanceof Array?e:[e]).length,i=t.length;i--;)for(var a=n;a--;)t[i].removeAttribute(e[a])}function Gi(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function Qi(t,e){"none"!==t.style.display&&(t.style.display="none")}function Xi(t,e){"none"===t.style.display&&(t.style.display="")}function Yi(t){return"none"!==window.getComputedStyle(t).display}function Ki(e){if("string"==typeof e){var n=[e],i=e.charAt(0).toUpperCase()+e.substr(1);["Webkit","Moz","ms","O"].forEach(function(t){"ms"===t&&"transform"!==e||n.push(t+i)}),e=n}for(var t=document.createElement("fakeelement"),a=(e.length,0);a<e.length;a++){var r=e[a];if(void 0!==t.style[r])return r}return!1}function Ji(t,e){var n=!1;return/^Webkit/.test(t)?n="webkit"+e+"End":/^O/.test(t)?n="o"+e+"End":t&&(n=e.toLowerCase()+"end"),n}var a=!1;try{var o=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,o)}catch(t){}var u=!!a&&{passive:!0};function Ui(t,e,n){for(var i in e){var a=0<=["touchstart","touchmove"].indexOf(i)&&!n&&u;t.addEventListener(i,e[i],a)}}function _i(t,e){for(var n in e){var i=0<=["touchstart","touchmove"].indexOf(n)&&u;t.removeEventListener(n,e[n],i)}}function Zi(){return{topics:{},on:function(t,e){this.topics[t]=this.topics[t]||[],this.topics[t].push(e)},off:function(t,e){if(this.topics[t])for(var n=0;n<this.topics[t].length;n++)if(this.topics[t][n]===e){this.topics[t].splice(n,1);break}},emit:function(e,n){n.type=e,this.topics[e]&&this.topics[e].forEach(function(t){t(n,e)})}}}Object.keys||(Object.keys=function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}),"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var $i=function(H){H=Li({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:!1,autoWidth:!1,viewportMax:!1,slideBy:1,center:!1,controls:!0,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:!1,prevButton:!1,nextButton:!1,nav:!0,navPosition:"top",navContainer:!1,navAsThumbnails:!1,arrowKeys:!1,speed:300,autoplay:!1,autoplayPosition:"top",autoplayTimeout:5e3,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:!1,autoplayButton:!1,autoplayButtonOutput:!0,autoplayResetOnVisibility:!0,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:!1,loop:!0,rewind:!1,autoHeight:!1,responsive:!1,lazyload:!1,lazyloadSelector:".tns-lazy-img",touch:!0,mouseDrag:!1,swipeAngle:15,nested:!1,preventActionWhenRunning:!1,preventScrollOnTouch:!1,freezable:!0,onInit:!1,useLocalStorage:!0,nonce:!1},H||{});var O=document,m=window,a={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},e={},n=H.useLocalStorage;if(n){var t=navigator.userAgent,i=new Date;try{(e=m.localStorage)?(e.setItem(i,i),n=e.getItem(i)==i,e.removeItem(i)):n=!1,n||(e={})}catch(t){n=!1}n&&(e.tnsApp&&e.tnsApp!==t&&["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(t){e.removeItem(t)}),localStorage.tnsApp=t)}var y=e.tC?Bi(e.tC):Si(e,"tC",function(){var t=document,e=Hi(),n=Oi(e),i=t.createElement("div"),a=!1;e.appendChild(i);try{for(var r,o="(10px * 10)",u=["calc"+o,"-moz-calc"+o,"-webkit-calc"+o],l=0;l<3;l++)if(r=u[l],i.style.width=r,100===i.offsetWidth){a=r.replace(o,"");break}}catch(t){}return e.fake?Di(e,n):i.remove(),a}(),n),g=e.tPL?Bi(e.tPL):Si(e,"tPL",function(){var t,e=document,n=Hi(),i=Oi(n),a=e.createElement("div"),r=e.createElement("div"),o="";a.className="tns-t-subp2",r.className="tns-t-ct";for(var u=0;u<70;u++)o+="<div></div>";return r.innerHTML=o,a.appendChild(r),n.appendChild(a),t=Math.abs(a.getBoundingClientRect().left-r.children[67].getBoundingClientRect().left)<2,n.fake?Di(n,i):a.remove(),t}(),n),D=e.tMQ?Bi(e.tMQ):Si(e,"tMQ",function(){if(window.matchMedia||window.msMatchMedia)return!0;var t,e=document,n=Hi(),i=Oi(n),a=e.createElement("div"),r=e.createElement("style"),o="@media all and (min-width:1px){.tns-mq-test{position:absolute}}";return r.type="text/css",a.className="tns-mq-test",n.appendChild(r),n.appendChild(a),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(e.createTextNode(o)),t=window.getComputedStyle?window.getComputedStyle(a).position:a.currentStyle.position,n.fake?Di(n,i):a.remove(),"absolute"===t}(),n),r=e.tTf?Bi(e.tTf):Si(e,"tTf",Ki("transform"),n),o=e.t3D?Bi(e.t3D):Si(e,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=Hi(),a=Oi(i),r=n.createElement("p"),o=9<t.length?"-"+t.slice(0,-9).toLowerCase()+"-":"";return o+="transform",i.insertBefore(r,null),r.style[t]="translate3d(1px,1px,1px)",e=window.getComputedStyle(r).getPropertyValue(o),i.fake?Di(i,a):r.remove(),void 0!==e&&0<e.length&&"none"!==e}(r),n),x=e.tTDu?Bi(e.tTDu):Si(e,"tTDu",Ki("transitionDuration"),n),u=e.tTDe?Bi(e.tTDe):Si(e,"tTDe",Ki("transitionDelay"),n),b=e.tADu?Bi(e.tADu):Si(e,"tADu",Ki("animationDuration"),n),l=e.tADe?Bi(e.tADe):Si(e,"tADe",Ki("animationDelay"),n),s=e.tTE?Bi(e.tTE):Si(e,"tTE",Ji(x,"Transition"),n),c=e.tAE?Bi(e.tAE):Si(e,"tAE",Ji(b,"Animation"),n),f=m.console&&"function"==typeof m.console.warn,d=["container","controlsContainer","prevButton","nextButton","navContainer","autoplayButton"],v={};if(d.forEach(function(t){if("string"==typeof H[t]){var e=H[t],n=O.querySelector(e);if(v[t]=e,!n||!n.nodeName)return void(f&&console.warn("Can't find",H[t]));H[t]=n}}),!(H.container.children.length<1)){var k=H.responsive,R=H.nested,I="carousel"===H.mode;if(k){0 in k&&(H=Li(H,k[0]),delete k[0]);var p={};for(var h in k){var w=k[h];w="number"==typeof w?{items:w}:w,p[h]=w}k=p,p=null}if(I||function t(e){for(var n in e)I||("slideBy"===n&&(e[n]="page"),"edgePadding"===n&&(e[n]=!1),"autoHeight"===n&&(e[n]=!1)),"responsive"===n&&t(e[n])}(H),!I){H.axis="horizontal",H.slideBy="page",H.edgePadding=!1;var P=H.animateIn,z=H.animateOut,C=H.animateDelay,W=H.animateNormal}var M,q,F="horizontal"===H.axis,T=O.createElement("div"),j=O.createElement("div"),V=H.container,E=V.parentNode,A=V.outerHTML,G=V.children,Q=G.length,X=rn(),Y=!1;k&&En(),I&&(V.className+=" tns-vpfix");var N,L,B,S,K,J,U,_,Z,$=H.autoWidth,tt=sn("fixedWidth"),et=sn("edgePadding"),nt=sn("gutter"),it=un(),at=sn("center"),rt=$?1:Math.floor(sn("items")),ot=sn("slideBy"),ut=H.viewportMax||H.fixedWidthViewportWidth,lt=sn("arrowKeys"),st=sn("speed"),ct=H.rewind,ft=!ct&&H.loop,dt=sn("autoHeight"),vt=sn("controls"),pt=sn("controlsText"),ht=sn("nav"),mt=sn("touch"),yt=sn("mouseDrag"),gt=sn("autoplay"),xt=sn("autoplayTimeout"),bt=sn("autoplayText"),wt=sn("autoplayHoverPause"),Ct=sn("autoplayResetOnVisibility"),Mt=(U=null,_=sn("nonce"),Z=document.createElement("style"),U&&Z.setAttribute("media",U),_&&Z.setAttribute("nonce",_),document.querySelector("head").appendChild(Z),Z.sheet?Z.sheet:Z.styleSheet),Tt=H.lazyload,Et=H.lazyloadSelector,At=[],Nt=ft?(K=function(){{if($||tt&&!ut)return Q-1;var t=tt?"fixedWidth":"items",e=[];if((tt||H[t]<Q)&&e.push(H[t]),k)for(var n in k){var i=k[n][t];i&&(tt||i<Q)&&e.push(i)}return e.length||e.push(0),Math.ceil(tt?ut/Math.min.apply(null,e):Math.max.apply(null,e))}}(),J=I?Math.ceil((5*K-Q)/2):4*K-Q,J=Math.max(K,J),ln("edgePadding")?J+1:J):0,Lt=I?Q+2*Nt:Q+Nt,Bt=!(!tt&&!$||ft),St=tt?_n():null,Ht=!I||!ft,Ot=F?"left":"top",Dt="",kt="",Rt=tt?function(){return at&&!ft?Q-1:Math.ceil(-St/(tt+nt))}:$?function(){for(var t=0;t<Lt;t++)if(N[t]>=-St)return t}:function(){return at&&I&&!ft?Q-1:ft||I?Math.max(0,Lt-Math.ceil(rt)):Lt-1},It=en(sn("startIndex")),Pt=It,zt=(tn(),0),Wt=$?null:Rt(),qt=H.preventActionWhenRunning,Ft=H.swipeAngle,jt=!Ft||"?",Vt=!1,Gt=H.onInit,Qt=new Zi,Xt=" tns-slider tns-"+H.mode,Yt=V.id||(S=window.tnsId,window.tnsId=S?S+1:1,"tns"+window.tnsId),Kt=sn("disable"),Jt=!1,Ut=H.freezable,_t=!(!Ut||$)&&Tn(),Zt=!1,$t={click:oi,keydown:function(t){t=pi(t);var e=[a.LEFT,a.RIGHT].indexOf(t.keyCode);0<=e&&(0===e?we.disabled||oi(t,-1):Ce.disabled||oi(t,1))}},te={click:function(t){if(Vt){if(qt)return;ai()}var e=hi(t=pi(t));for(;e!==Ae&&!qi(e,"data-nav");)e=e.parentNode;if(qi(e,"data-nav")){var n=Se=Number(Fi(e,"data-nav")),i=tt||$?n*Q/Le:n*rt,a=le?n:Math.min(Math.ceil(i),Q-1);ri(a,t),He===n&&(Pe&&fi(),Se=-1)}},keydown:function(t){t=pi(t);var e=O.activeElement;if(!qi(e,"data-nav"))return;var n=[a.LEFT,a.RIGHT,a.ENTER,a.SPACE].indexOf(t.keyCode),i=Number(Fi(e,"data-nav"));0<=n&&(0===n?0<i&&vi(Ee[i-1]):1===n?i<Le-1&&vi(Ee[i+1]):ri(Se=i,t))}},ee={mouseover:function(){Pe&&(li(),ze=!0)},mouseout:function(){ze&&(ui(),ze=!1)}},ne={visibilitychange:function(){O.hidden?Pe&&(li(),qe=!0):qe&&(ui(),qe=!1)}},ie={keydown:function(t){t=pi(t);var e=[a.LEFT,a.RIGHT].indexOf(t.keyCode);0<=e&&oi(t,0===e?-1:1)}},ae={touchstart:xi,touchmove:bi,touchend:wi,touchcancel:wi},re={mousedown:xi,mousemove:bi,mouseup:wi,mouseleave:wi},oe=ln("controls"),ue=ln("nav"),le=!!$||H.navAsThumbnails,se=ln("autoplay"),ce=ln("touch"),fe=ln("mouseDrag"),de="tns-slide-active",ve="tns-slide-cloned",pe="tns-complete",he={load:function(t){kn(hi(t))},error:function(t){e=hi(t),zi(e,"failed"),Rn(e);var e}},me="force"===H.preventScrollOnTouch;if(oe)var ye,ge,xe=H.controlsContainer,be=H.controlsContainer?H.controlsContainer.outerHTML:"",we=H.prevButton,Ce=H.nextButton,Me=H.prevButton?H.prevButton.outerHTML:"",Te=H.nextButton?H.nextButton.outerHTML:"";if(ue)var Ee,Ae=H.navContainer,Ne=H.navContainer?H.navContainer.outerHTML:"",Le=$?Q:Mi(),Be=0,Se=-1,He=an(),Oe=He,De="tns-nav-active",ke="Carousel Page ",Re=" (Current Slide)";if(se)var Ie,Pe,ze,We,qe,Fe="forward"===H.autoplayDirection?1:-1,je=H.autoplayButton,Ve=H.autoplayButton?H.autoplayButton.outerHTML:"",Ge=["<span class='tns-visually-hidden'>"," animation</span>"];if(ce||fe)var Qe,Xe,Ye={},Ke={},Je=!1,Ue=F?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};$||$e(Kt||_t),r&&(Ot=r,Dt="translate",o?(Dt+=F?"3d(":"3d(0px, ",kt=F?", 0px, 0px)":", 0px)"):(Dt+=F?"X(":"Y(",kt=")")),I&&(V.className=V.className.replace("tns-vpfix","")),function(){ln("gutter");T.className="tns-outer",j.className="tns-inner",T.id=Yt+"-ow",j.id=Yt+"-iw",""===V.id&&(V.id=Yt);Xt+=g||$?" tns-subpixel":" tns-no-subpixel",Xt+=y?" tns-calc":" tns-no-calc",$&&(Xt+=" tns-autowidth");Xt+=" tns-"+H.axis,V.className+=Xt,I?((M=O.createElement("div")).id=Yt+"-mw",M.className="tns-ovh",T.appendChild(M),M.appendChild(j)):T.appendChild(j);if(dt){var t=M||j;t.className+=" tns-ah"}if(E.insertBefore(T,V),j.appendChild(V),Ii(G,function(t,e){zi(t,"tns-item"),t.id||(t.id=Yt+"-item"+e),!I&&W&&zi(t,W),ji(t,{"aria-hidden":"true",tabindex:"-1"})}),Nt){for(var e=O.createDocumentFragment(),n=O.createDocumentFragment(),i=Nt;i--;){var a=i%Q,r=G[a].cloneNode(!0);if(zi(r,ve),Vi(r,"id"),n.insertBefore(r,n.firstChild),I){var o=G[Q-1-a].cloneNode(!0);zi(o,ve),Vi(o,"id"),e.appendChild(o)}}V.insertBefore(e,V.firstChild),V.appendChild(n),G=V.children}}(),function(){if(!I)for(var t=It,e=It+Math.min(Q,rt);t<e;t++){var n=G[t];n.style.left=100*(t-It)/rt+"%",zi(n,P),Wi(n,W)}F&&(g||$?(ki(Mt,"#"+Yt+" > .tns-item","font-size:"+m.getComputedStyle(G[0]).fontSize+";",Ri(Mt)),ki(Mt,"#"+Yt,"font-size:0;",Ri(Mt))):I&&Ii(G,function(t,e){var n;t.style.marginLeft=(n=e,y?y+"("+100*n+"% / "+Lt+")":100*n/Lt+"%")}));if(D){if(x){var i=M&&H.autoHeight?hn(H.speed):"";ki(Mt,"#"+Yt+"-mw",i,Ri(Mt))}i=cn(H.edgePadding,H.gutter,H.fixedWidth,H.speed,H.autoHeight),ki(Mt,"#"+Yt+"-iw",i,Ri(Mt)),I&&(i=F&&!$?"width:"+fn(H.fixedWidth,H.gutter,H.items)+";":"",x&&(i+=hn(st)),ki(Mt,"#"+Yt,i,Ri(Mt))),i=F&&!$?dn(H.fixedWidth,H.gutter,H.items):"",H.gutter&&(i+=vn(H.gutter)),I||(x&&(i+=hn(st)),b&&(i+=mn(st))),i&&ki(Mt,"#"+Yt+" > .tns-item",i,Ri(Mt))}else{I&&dt&&(M.style[x]=st/1e3+"s"),j.style.cssText=cn(et,nt,tt,dt),I&&F&&!$&&(V.style.width=fn(tt,nt,rt));var i=F&&!$?dn(tt,nt,rt):"";nt&&(i+=vn(nt)),i&&ki(Mt,"#"+Yt+" > .tns-item",i,Ri(Mt))}if(k&&D)for(var a in k){a=parseInt(a);var r=k[a],i="",o="",u="",l="",s="",c=$?null:sn("items",a),f=sn("fixedWidth",a),d=sn("speed",a),v=sn("edgePadding",a),p=sn("autoHeight",a),h=sn("gutter",a);x&&M&&sn("autoHeight",a)&&"speed"in r&&(o="#"+Yt+"-mw{"+hn(d)+"}"),("edgePadding"in r||"gutter"in r)&&(u="#"+Yt+"-iw{"+cn(v,h,f,d,p)+"}"),I&&F&&!$&&("fixedWidth"in r||"items"in r||tt&&"gutter"in r)&&(l="width:"+fn(f,h,c)+";"),x&&"speed"in r&&(l+=hn(d)),l&&(l="#"+Yt+"{"+l+"}"),("fixedWidth"in r||tt&&"gutter"in r||!I&&"items"in r)&&(s+=dn(f,h,c)),"gutter"in r&&(s+=vn(h)),!I&&"speed"in r&&(x&&(s+=hn(d)),b&&(s+=mn(d))),s&&(s="#"+Yt+" > .tns-item{"+s+"}"),(i=o+u+l+s)&&Mt.insertRule("@media (min-width: "+a/16+"em) {"+i+"}",Mt.cssRules.length)}}(),yn();var _e=ft?I?function(){var t=zt,e=Wt;t+=ot,e-=ot,et?(t+=1,e-=1):tt&&(it+nt)%(tt+nt)&&(e-=1),Nt&&(e<It?It-=Q:It<t&&(It+=Q))}:function(){if(Wt<It)for(;zt+Q<=It;)It-=Q;else if(It<zt)for(;It<=Wt-Q;)It+=Q}:function(){It=Math.max(zt,Math.min(Wt,It))},Ze=I?function(){var e,n,i,a,t,r,o,u,l,s,c;Jn(V,""),x||!st?(ti(),st&&Yi(V)||ai()):(e=V,n=Ot,i=Dt,a=kt,t=Zn(),r=st,o=ai,u=Math.min(r,10),l=0<=t.indexOf("%")?"%":"px",t=t.replace(l,""),s=Number(e.style[n].replace(i,"").replace(a,"").replace(l,"")),c=(t-s)/r*u,setTimeout(function t(){r-=u,s+=c,e.style[n]=i+s+l+a,0<r?setTimeout(t,u):o()},u)),F||Ci()}:function(){At=[];var t={};t[s]=t[c]=ai,_i(G[Pt],t),Ui(G[It],t),ei(Pt,P,z,!0),ei(It,W,P),s&&c&&st&&Yi(V)||ai()};return{version:"2.9.3",getInfo:Ei,events:Qt,goTo:ri,play:function(){gt&&!Pe&&(ci(),We=!1)},pause:function(){Pe&&(fi(),We=!0)},isOn:Y,updateSliderHeight:Fn,refresh:yn,destroy:function(){if(Mt.disabled=!0,Mt.ownerNode&&Mt.ownerNode.remove(),_i(m,{resize:Cn}),lt&&_i(O,ie),xe&&_i(xe,$t),Ae&&_i(Ae,te),_i(V,ee),_i(V,ne),je&&_i(je,{click:di}),gt&&clearInterval(Ie),I&&s){var t={};t[s]=ai,_i(V,t)}mt&&_i(V,ae),yt&&_i(V,re);var r=[A,be,Me,Te,Ne,Ve];for(var e in d.forEach(function(t,e){var n="container"===t?T:H[t];if("object"==typeof n&&n){var i=!!n.previousElementSibling&&n.previousElementSibling,a=n.parentNode;n.outerHTML=r[e],H[t]=i?i.nextElementSibling:a.firstElementChild}}),d=P=z=C=W=F=T=j=V=E=A=G=Q=q=X=$=tt=et=nt=it=rt=ot=ut=lt=st=ct=ft=dt=Mt=Tt=N=At=Nt=Lt=Bt=St=Ht=Ot=Dt=kt=Rt=It=Pt=zt=Wt=Ft=jt=Vt=Gt=Qt=Xt=Yt=Kt=Jt=Ut=_t=Zt=$t=te=ee=ne=ie=ae=re=oe=ue=le=se=ce=fe=de=pe=he=L=vt=pt=xe=be=we=Ce=ye=ge=ht=Ae=Ne=Ee=Le=Be=Se=He=Oe=De=ke=Re=gt=xt=Fe=bt=wt=je=Ve=Ct=Ge=Ie=Pe=ze=We=qe=Ye=Ke=Qe=Je=Xe=Ue=mt=yt=null,this)"rebuild"!==e&&(this[e]=null);Y=!1},rebuild:function(){return $i(Li(H,v))}}}function $e(t){t&&(vt=ht=mt=yt=lt=gt=wt=Ct=!1)}function tn(){for(var t=I?It-Nt:It;t<0;)t+=Q;return t%Q+1}function en(t){return t=t?Math.max(0,Math.min(ft?Q-1:Q-rt,t)):0,I?t+Nt:t}function nn(t){for(null==t&&(t=It),I&&(t-=Nt);t<0;)t+=Q;return Math.floor(t%Q)}function an(){var t,e=nn();return t=le?e:tt||$?Math.ceil((e+1)*Le/Q-1):Math.floor(e/rt),!ft&&I&&It===Wt&&(t=Le-1),t}function rn(){return m.innerWidth||O.documentElement.clientWidth||O.body.clientWidth}function on(t){return"top"===t?"afterbegin":"beforeend"}function un(){var t=et?2*et-nt:0;return function t(e){if(null!=e){var n,i,a=O.createElement("div");return e.appendChild(a),i=(n=a.getBoundingClientRect()).right-n.left,a.remove(),i||t(e.parentNode)}}(E)-t}function ln(t){if(H[t])return!0;if(k)for(var e in k)if(k[e][t])return!0;return!1}function sn(t,e){if(null==e&&(e=X),"items"===t&&tt)return Math.floor((it+nt)/(tt+nt))||1;var n=H[t];if(k)for(var i in k)e>=parseInt(i)&&t in k[i]&&(n=k[i][t]);return"slideBy"===t&&"page"===n&&(n=sn("items")),I||"slideBy"!==t&&"items"!==t||(n=Math.floor(n)),n}function cn(t,e,n,i,a){var r="";if(void 0!==t){var o=t;e&&(o-=e),r=F?"margin: 0 "+o+"px 0 "+t+"px;":"margin: "+t+"px 0 "+o+"px 0;"}else if(e&&!n){var u="-"+e+"px";r="margin: 0 "+(F?u+" 0 0":"0 "+u+" 0")+";"}return!I&&a&&x&&i&&(r+=hn(i)),r}function fn(t,e,n){return t?(t+e)*Lt+"px":y?y+"("+100*Lt+"% / "+n+")":100*Lt/n+"%"}function dn(t,e,n){var i;if(t)i=t+e+"px";else{I||(n=Math.floor(n));var a=I?Lt:n;i=y?y+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"!==R?i+";":i+" !important;"}function vn(t){var e="";!1!==t&&(e=(F?"padding-":"margin-")+(F?"right":"bottom")+": "+t+"px;");return e}function pn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function hn(t){return pn(x,18)+"transition-duration:"+t/1e3+"s;"}function mn(t){return pn(b,17)+"animation-duration:"+t/1e3+"s;"}function yn(){if(ln("autoHeight")||$||!F){var t=V.querySelectorAll("img");Ii(t,function(t){var e=t.src;Tt||(e&&e.indexOf("data:image")<0?(t.src="",Ui(t,he),zi(t,"loading"),t.src=e):kn(t))}),Ai(function(){zn(Gi(t),function(){L=!0})}),ln("autoHeight")&&(t=In(It,Math.min(It+rt-1,Lt-1))),Tt?gn():Ai(function(){zn(Gi(t),gn)})}else I&&$n(),bn(),wn()}function gn(){if($&&1<Q){var i=ft?It:Q-1;!function t(){var e=G[i].getBoundingClientRect().left,n=G[i-1].getBoundingClientRect().right;Math.abs(e-n)<=1?xn():setTimeout(function(){t()},16)}()}else xn()}function xn(){F&&!$||(jn(),$?(St=_n(),Ut&&(_t=Tn()),Wt=Rt(),$e(Kt||_t)):Ci()),I&&$n(),bn(),wn()}function bn(){if(Vn(),T.insertAdjacentHTML("afterbegin",'<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">'+Hn()+"</span>  of "+Q+"</div>"),B=T.querySelector(".tns-liveregion .current"),se){var t=gt?"stop":"start";je?ji(je,{"data-action":t}):H.autoplayButtonOutput&&(T.insertAdjacentHTML(on(H.autoplayPosition),'<button type="button" data-action="'+t+'">'+Ge[0]+t+Ge[1]+bt[0]+"</button>"),je=T.querySelector("[data-action]")),je&&Ui(je,{click:di}),gt&&(ci(),wt&&Ui(V,ee),Ct&&Ui(V,ne))}if(ue){if(Ae)ji(Ae,{"aria-label":"Carousel Pagination"}),Ii(Ee=Ae.children,function(t,e){ji(t,{"data-nav":e,tabindex:"-1","aria-label":ke+(e+1),"aria-controls":Yt})});else{for(var e="",n=le?"":'style="display:none"',i=0;i<Q;i++)e+='<button type="button" data-nav="'+i+'" tabindex="-1" aria-controls="'+Yt+'" '+n+' aria-label="'+ke+(i+1)+'"></button>';e='<div class="tns-nav" aria-label="Carousel Pagination">'+e+"</div>",T.insertAdjacentHTML(on(H.navPosition),e),Ae=T.querySelector(".tns-nav"),Ee=Ae.children}if(Ti(),x){var a=x.substring(0,x.length-18).toLowerCase(),r="transition: all "+st/1e3+"s";a&&(r="-"+a+"-"+r),ki(Mt,"[aria-controls^="+Yt+"-item]",r,Ri(Mt))}ji(Ee[He],{"aria-label":ke+(He+1)+Re}),Vi(Ee[He],"tabindex"),zi(Ee[He],De),Ui(Ae,te)}oe&&(xe||we&&Ce||(T.insertAdjacentHTML(on(H.controlsPosition),'<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="'+Yt+'">'+pt[0]+'</button><button type="button" data-controls="next" tabindex="-1" aria-controls="'+Yt+'">'+pt[1]+"</button></div>"),xe=T.querySelector(".tns-controls")),we&&Ce||(we=xe.children[0],Ce=xe.children[1]),H.controlsContainer&&ji(xe,{"aria-label":"Carousel Navigation",tabindex:"0"}),(H.controlsContainer||H.prevButton&&H.nextButton)&&ji([we,Ce],{"aria-controls":Yt,tabindex:"-1"}),(H.controlsContainer||H.prevButton&&H.nextButton)&&(ji(we,{"data-controls":"prev"}),ji(Ce,{"data-controls":"next"})),ye=Qn(we),ge=Qn(Ce),Kn(),xe?Ui(xe,$t):(Ui(we,$t),Ui(Ce,$t))),An()}function wn(){if(I&&s){var t={};t[s]=ai,Ui(V,t)}mt&&Ui(V,ae,H.preventScrollOnTouch),yt&&Ui(V,re),lt&&Ui(O,ie),"inner"===R?Qt.on("outerResized",function(){Mn(),Qt.emit("innerLoaded",Ei())}):(k||tt||$||dt||!F)&&Ui(m,{resize:Cn}),dt&&("outer"===R?Qt.on("innerLoaded",Pn):Kt||Pn()),Dn(),Kt?Bn():_t&&Ln(),Qt.on("indexChanged",Wn),"inner"===R&&Qt.emit("innerLoaded",Ei()),"function"==typeof Gt&&Gt(Ei()),Y=!0}function Cn(t){Ai(function(){Mn(pi(t))})}function Mn(t){if(Y){"outer"===R&&Qt.emit("outerResized",Ei(t)),X=rn();var e,n=q,i=!1;k&&(En(),(e=n!==q)&&Qt.emit("newBreakpointStart",Ei(t)));var a,r,o,u,l=rt,s=Kt,c=_t,f=lt,d=vt,v=ht,p=mt,h=yt,m=gt,y=wt,g=Ct,x=It;if(e){var b=tt,w=dt,C=pt,M=at,T=bt;if(!D)var E=nt,A=et}if(lt=sn("arrowKeys"),vt=sn("controls"),ht=sn("nav"),mt=sn("touch"),at=sn("center"),yt=sn("mouseDrag"),gt=sn("autoplay"),wt=sn("autoplayHoverPause"),Ct=sn("autoplayResetOnVisibility"),e&&(Kt=sn("disable"),tt=sn("fixedWidth"),st=sn("speed"),dt=sn("autoHeight"),pt=sn("controlsText"),bt=sn("autoplayText"),xt=sn("autoplayTimeout"),D||(et=sn("edgePadding"),nt=sn("gutter"))),$e(Kt),it=un(),F&&!$||Kt||(jn(),F||(Ci(),i=!0)),(tt||$)&&(St=_n(),Wt=Rt()),(e||tt)&&(rt=sn("items"),ot=sn("slideBy"),(r=rt!==l)&&(tt||$||(Wt=Rt()),_e())),e&&Kt!==s&&(Kt?Bn():function(){if(!Jt)return;if(Mt.disabled=!1,V.className+=Xt,$n(),ft)for(var t=Nt;t--;)I&&Xi(G[t]),Xi(G[Lt-t-1]);if(!I)for(var e=It,n=It+Q;e<n;e++){var i=G[e],a=e<It+rt?P:W;i.style.left=100*(e-It)/rt+"%",zi(i,a)}Nn(),Jt=!1}()),Ut&&(e||tt||$)&&(_t=Tn())!==c&&(_t?(ti(Zn(en(0))),Ln()):(!function(){if(!Zt)return;et&&D&&(j.style.margin="");if(Nt)for(var t="tns-transparent",e=Nt;e--;)I&&Wi(G[e],t),Wi(G[Lt-e-1],t);Nn(),Zt=!1}(),i=!0)),$e(Kt||_t),gt||(wt=Ct=!1),lt!==f&&(lt?Ui(O,ie):_i(O,ie)),vt!==d&&(vt?xe?Xi(xe):(we&&Xi(we),Ce&&Xi(Ce)):xe?Qi(xe):(we&&Qi(we),Ce&&Qi(Ce))),ht!==v&&(ht?(Xi(Ae),Ti()):Qi(Ae)),mt!==p&&(mt?Ui(V,ae,H.preventScrollOnTouch):_i(V,ae)),yt!==h&&(yt?Ui(V,re):_i(V,re)),gt!==m&&(gt?(je&&Xi(je),Pe||We||ci()):(je&&Qi(je),Pe&&fi())),wt!==y&&(wt?Ui(V,ee):_i(V,ee)),Ct!==g&&(Ct?Ui(O,ne):_i(O,ne)),e){if(tt===b&&at===M||(i=!0),dt!==w&&(dt||(j.style.height="")),vt&&pt!==C&&(we.innerHTML=pt[0],Ce.innerHTML=pt[1]),je&&bt!==T){var N=gt?1:0,L=je.innerHTML,B=L.length-T[N].length;L.substring(B)===T[N]&&(je.innerHTML=L.substring(0,B)+bt[N])}}else at&&(tt||$)&&(i=!0);if((r||tt&&!$)&&(Le=Mi(),Ti()),(a=It!==x)?(Qt.emit("indexChanged",Ei()),i=!0):r?a||Wn():(tt||$)&&(Dn(),Vn(),Sn()),r&&!I&&function(){for(var t=It+Math.min(Q,rt),e=Lt;e--;){var n=G[e];It<=e&&e<t?(zi(n,"tns-moving"),n.style.left=100*(e-It)/rt+"%",zi(n,P),Wi(n,W)):n.style.left&&(n.style.left="",zi(n,W),Wi(n,P)),Wi(n,z)}setTimeout(function(){Ii(G,function(t){Wi(t,"tns-moving")})},300)}(),!Kt&&!_t){if(e&&!D&&(et===A&&nt===E||(j.style.cssText=cn(et,nt,tt,st,dt)),F)){I&&(V.style.width=fn(tt,nt,rt));var S=dn(tt,nt,rt)+vn(nt);u=Ri(o=Mt)-1,"deleteRule"in o?o.deleteRule(u):o.removeRule(u),ki(Mt,"#"+Yt+" > .tns-item",S,Ri(Mt))}dt&&Pn(),i&&($n(),Pt=It)}e&&Qt.emit("newBreakpointEnd",Ei(t))}}function Tn(){if(!tt&&!$)return Q<=(at?rt-(rt-1)/2:rt);var t=tt?(tt+nt)*Q:N[Q],e=et?it+2*et:it+nt;return at&&(e-=tt?(it-tt)/2:(it-(N[It+1]-N[It]-nt))/2),t<=e}function En(){for(var t in q=0,k)(t=parseInt(t))<=X&&(q=t)}function An(){!gt&&je&&Qi(je),!ht&&Ae&&Qi(Ae),vt||(xe?Qi(xe):(we&&Qi(we),Ce&&Qi(Ce)))}function Nn(){gt&&je&&Xi(je),ht&&Ae&&Xi(Ae),vt&&(xe?Xi(xe):(we&&Xi(we),Ce&&Xi(Ce)))}function Ln(){if(!Zt){if(et&&(j.style.margin="0px"),Nt)for(var t="tns-transparent",e=Nt;e--;)I&&zi(G[e],t),zi(G[Lt-e-1],t);An(),Zt=!0}}function Bn(){if(!Jt){if(Mt.disabled=!0,V.className=V.className.replace(Xt.substring(1),""),Vi(V,["style"]),ft)for(var t=Nt;t--;)I&&Qi(G[t]),Qi(G[Lt-t-1]);if(F&&I||Vi(j,["style"]),!I)for(var e=It,n=It+Q;e<n;e++){var i=G[e];Vi(i,["style"]),Wi(i,P),Wi(i,W)}An(),Jt=!0}}function Sn(){var t=Hn();B.innerHTML!==t&&(B.innerHTML=t)}function Hn(){var t=On(),e=t[0]+1,n=t[1]+1;return e===n?e+"":e+" to "+n}function On(t){null==t&&(t=Zn());var n,i,a,r=It;if(at||et?($||tt)&&(i=-(parseFloat(t)+et),a=i+it+2*et):$&&(i=N[It],a=i+it),$)N.forEach(function(t,e){e<Lt&&((at||et)&&t<=i+.5&&(r=e),.5<=a-t&&(n=e))});else{if(tt){var e=tt+nt;at||et?(r=Math.floor(i/e),n=Math.ceil(a/e-1)):n=r+Math.ceil(it/e)-1}else if(at||et){var o=rt-1;if(at?(r-=o/2,n=It+o/2):n=It+o,et){var u=et*rt/it;r-=u,n+=u}r=Math.floor(r),n=Math.ceil(n)}else n=r+rt-1;r=Math.max(r,0),n=Math.min(n,Lt-1)}return[r,n]}function Dn(){if(Tt&&!Kt){var t=On();t.push(Et),In.apply(null,t).forEach(function(t){if(!Pi(t,pe)){var e={};e[s]=function(t){t.stopPropagation()},Ui(t,e),Ui(t,he),t.src=Fi(t,"data-src");var n=Fi(t,"data-srcset");n&&(t.srcset=n),zi(t,"loading")}})}}function kn(t){zi(t,"loaded"),Rn(t)}function Rn(t){zi(t,pe),Wi(t,"loading"),_i(t,he)}function In(t,e,n){var i=[];for(n||(n="img");t<=e;)Ii(G[t].querySelectorAll(n),function(t){i.push(t)}),t++;return i}function Pn(){var t=In.apply(null,On());Ai(function(){zn(t,Fn)})}function zn(n,t){return L?t():(n.forEach(function(t,e){!Tt&&t.complete&&Rn(t),Pi(t,pe)&&n.splice(e,1)}),n.length?void Ai(function(){zn(n,t)}):t())}function Wn(){Dn(),Vn(),Sn(),Kn(),function(){if(ht&&(He=0<=Se?Se:an(),Se=-1,He!==Oe)){var t=Ee[Oe],e=Ee[He];ji(t,{tabindex:"-1","aria-label":ke+(Oe+1)}),Wi(t,De),ji(e,{"aria-label":ke+(He+1)+Re}),Vi(e,"tabindex"),zi(e,De),Oe=He}}()}function qn(t,e){for(var n=[],i=t,a=Math.min(t+e,Lt);i<a;i++)n.push(G[i].offsetHeight);return Math.max.apply(null,n)}function Fn(){var t=dt?qn(It,rt):qn(Nt,Q),e=M||j;e.style.height!==t&&(e.style.height=t+"px")}function jn(){N=[0];var n=F?"left":"top",i=F?"right":"bottom",a=G[0].getBoundingClientRect()[n];Ii(G,function(t,e){e&&N.push(t.getBoundingClientRect()[n]-a),e===Lt-1&&N.push(t.getBoundingClientRect()[i]-a)})}function Vn(){var t=On(),n=t[0],i=t[1];Ii(G,function(t,e){n<=e&&e<=i?qi(t,"aria-hidden")&&(Vi(t,["aria-hidden","tabindex"]),zi(t,de)):qi(t,"aria-hidden")||(ji(t,{"aria-hidden":"true",tabindex:"-1"}),Wi(t,de))})}function Gn(t){return t.nodeName.toLowerCase()}function Qn(t){return"button"===Gn(t)}function Xn(t){return"true"===t.getAttribute("aria-disabled")}function Yn(t,e,n){t?e.disabled=n:e.setAttribute("aria-disabled",n.toString())}function Kn(){if(vt&&!ct&&!ft){var t=ye?we.disabled:Xn(we),e=ge?Ce.disabled:Xn(Ce),n=It<=zt,i=!ct&&Wt<=It;n&&!t&&Yn(ye,we,!0),!n&&t&&Yn(ye,we,!1),i&&!e&&Yn(ge,Ce,!0),!i&&e&&Yn(ge,Ce,!1)}}function Jn(t,e){x&&(t.style[x]=e)}function Un(t){return null==t&&(t=It),$?(it-(et?nt:0)-(N[t+1]-N[t]-nt))/2:tt?(it-tt)/2:(rt-1)/2}function _n(){var t=it+(et?nt:0)-(tt?(tt+nt)*Lt:N[Lt]);return at&&!ft&&(t=tt?-(tt+nt)*(Lt-1)-Un():Un(Lt-1)-N[Lt-1]),0<t&&(t=0),t}function Zn(t){var e;if(null==t&&(t=It),F&&!$)if(tt)e=-(tt+nt)*t,at&&(e+=Un());else{var n=r?Lt:rt;at&&(t-=Un()),e=100*-t/n}else e=-N[t],at&&$&&(e+=Un());return Bt&&(e=Math.max(e,St)),e+=!F||$||tt?"px":"%"}function $n(t){Jn(V,"0s"),ti(t)}function ti(t){null==t&&(t=Zn()),V.style[Ot]=Dt+t+kt}function ei(t,e,n,i){var a=t+rt;ft||(a=Math.min(a,Lt));for(var r=t;r<a;r++){var o=G[r];i||(o.style.left=100*(r-It)/rt+"%"),C&&u&&(o.style[u]=o.style[l]=C*(r-t)/1e3+"s"),Wi(o,e),zi(o,n),i&&At.push(o)}}function ni(t,e){Ht&&_e(),(It!==Pt||e)&&(Qt.emit("indexChanged",Ei()),Qt.emit("transitionStart",Ei()),dt&&Pn(),Pe&&t&&0<=["click","keydown"].indexOf(t.type)&&fi(),Vt=!0,Ze())}function ii(t){return t.toLowerCase().replace(/-/g,"")}function ai(t){if(I||Vt){if(Qt.emit("transitionEnd",Ei(t)),!I&&0<At.length)for(var e=0;e<At.length;e++){var n=At[e];n.style.left="",l&&u&&(n.style[l]="",n.style[u]=""),Wi(n,z),zi(n,W)}if(!t||!I&&t.target.parentNode===V||t.target===V&&ii(t.propertyName)===ii(Ot)){if(!Ht){var i=It;_e(),It!==i&&(Qt.emit("indexChanged",Ei()),$n())}"inner"===R&&Qt.emit("innerLoaded",Ei()),Vt=!1,Pt=It}}}function ri(t,e){if(!_t)if("prev"===t)oi(e,-1);else if("next"===t)oi(e,1);else{if(Vt){if(qt)return;ai()}var n=nn(),i=0;if("first"===t?i=-n:"last"===t?i=I?Q-rt-n:Q-1-n:("number"!=typeof t&&(t=parseInt(t)),isNaN(t)||(e||(t=Math.max(0,Math.min(Q-1,t))),i=t-n)),!I&&i&&Math.abs(i)<rt){var a=0<i?1:-1;i+=zt<=It+i-Q?Q*a:2*Q*a*-1}It+=i,I&&ft&&(It<zt&&(It+=Q),Wt<It&&(It-=Q)),nn(It)!==nn(Pt)&&ni(e)}}function oi(t,e){if(Vt){if(qt)return;ai()}var n;if(!e){for(var i=hi(t=pi(t));i!==xe&&[we,Ce].indexOf(i)<0;)i=i.parentNode;var a=[we,Ce].indexOf(i);0<=a&&(n=!0,e=0===a?-1:1)}if(ct){if(It===zt&&-1===e)return void ri("last",t);if(It===Wt&&1===e)return void ri("first",t)}e&&(It+=ot*e,$&&(It=Math.floor(It)),ni(n||t&&"keydown"===t.type?t:null))}function ui(){Ie=setInterval(function(){oi(null,Fe)},xt),Pe=!0}function li(){clearInterval(Ie),Pe=!1}function si(t,e){ji(je,{"data-action":t}),je.innerHTML=Ge[0]+t+Ge[1]+e}function ci(){ui(),je&&si("stop",bt[1])}function fi(){li(),je&&si("start",bt[0])}function di(){Pe?(fi(),We=!0):(ci(),We=!1)}function vi(t){t.focus()}function pi(t){return mi(t=t||m.event)?t.changedTouches[0]:t}function hi(t){return t.target||m.event.srcElement}function mi(t){return 0<=t.type.indexOf("touch")}function yi(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function gi(){return a=Ke.y-Ye.y,r=Ke.x-Ye.x,t=Math.atan2(a,r)*(180/Math.PI),e=Ft,n=!1,i=Math.abs(90-Math.abs(t)),90-e<=i?n="horizontal":i<=e&&(n="vertical"),n===H.axis;var t,e,n,i,a,r}function xi(t){if(Vt){if(qt)return;ai()}gt&&Pe&&li(),Je=!0,Xe&&(Ni(Xe),Xe=null);var e=pi(t);Qt.emit(mi(t)?"touchStart":"dragStart",Ei(t)),!mi(t)&&0<=["img","a"].indexOf(Gn(hi(t)))&&yi(t),Ke.x=Ye.x=e.clientX,Ke.y=Ye.y=e.clientY,I&&(Qe=parseFloat(V.style[Ot].replace(Dt,"")),Jn(V,"0s"))}function bi(t){if(Je){var e=pi(t);Ke.x=e.clientX,Ke.y=e.clientY,I?Xe||(Xe=Ai(function(){!function t(e){if(!jt)return void(Je=!1);Ni(Xe);Je&&(Xe=Ai(function(){t(e)}));"?"===jt&&(jt=gi());if(jt){!me&&mi(e)&&(me=!0);try{e.type&&Qt.emit(mi(e)?"touchMove":"dragMove",Ei(e))}catch(t){}var n=Qe,i=Ue(Ke,Ye);if(!F||tt||$)n+=i,n+="px";else{var a=r?i*rt*100/((it+nt)*Lt):100*i/(it+nt);n+=a,n+="%"}V.style[Ot]=Dt+n+kt}}(t)})):("?"===jt&&(jt=gi()),jt&&(me=!0)),("boolean"!=typeof t.cancelable||t.cancelable)&&me&&t.preventDefault()}}function wi(i){if(Je){Xe&&(Ni(Xe),Xe=null),I&&Jn(V,""),Je=!1;var t=pi(i);Ke.x=t.clientX,Ke.y=t.clientY;var a=Ue(Ke,Ye);if(Math.abs(a)){if(!mi(i)){var n=hi(i);Ui(n,{click:function t(e){yi(e),_i(n,{click:t})}})}I?Xe=Ai(function(){if(F&&!$){var t=-a*rt/(it+nt);t=0<a?Math.floor(t):Math.ceil(t),It+=t}else{var e=-(Qe+a);if(e<=0)It=zt;else if(e>=N[Lt-1])It=Wt;else for(var n=0;n<Lt&&e>=N[n];)e>N[It=n]&&a<0&&(It+=1),n++}ni(i,a),Qt.emit(mi(i)?"touchEnd":"dragEnd",Ei(i))}):jt&&oi(i,0<a?-1:1)}}"auto"===H.preventScrollOnTouch&&(me=!1),Ft&&(jt="?"),gt&&!Pe&&ui()}function Ci(){(M||j).style.height=N[It+rt]-N[It]+"px"}function Mi(){var t=tt?(tt+nt)*Q/it:Q/rt;return Math.min(Math.ceil(t),Q)}function Ti(){if(ht&&!le&&Le!==Be){var t=Be,e=Le,n=Xi;for(Le<Be&&(t=Le,e=Be,n=Qi);t<e;)n(Ee[t]),t++;Be=Le}}function Ei(t){return{container:V,slideItems:G,navContainer:Ae,navItems:Ee,controlsContainer:xe,hasControls:oe,prevButton:we,nextButton:Ce,items:rt,slideBy:ot,cloneCount:Nt,slideCount:Q,slideCountNew:Lt,index:It,indexCached:Pt,displayIndex:tn(),navCurrentIndex:He,navCurrentIndexCached:Oe,pages:Le,pagesCached:Be,sheet:Mt,isOn:Y,event:t||{}}}f&&console.warn("No slides found in",H.container)};return $i}();
//# sourceMappingURL=../sourcemaps/tiny-slider.js.map
var Cookienotice = {
    element: document.getElementById('js-cookienotice'),
    spacer: document.getElementById('js-cookienotice-spacer'),
    btnAccept: document.getElementById('js-cookienotice-accept'),
    btnDeny: document.getElementById('js-cookienotice-deny'),
    init: function () {
        if (!localStorage.cookieAccept && !sessionStorage.cookieAccept && Cookienotice.element) {
            Cookienotice.element.classList.remove('hidden');
            Cookienotice.setSpacerHeight();
        }

        if (Cookienotice.btnAccept) {
            Cookienotice.btnAccept.addEventListener('click', Cookienotice.setAccept);
        }

        if (Cookienotice.btnDeny) {
            Cookienotice.btnDeny.addEventListener('click', Cookienotice.setDeny);
        }
    },
    setAccept: function () {
        Cookienotice.element.classList.add('hidden');
        Cookienotice.resetSpacerHeight();
        localStorage.setItem('cookieAccept', 'true');
    },
    setDeny: function () {
        Cookienotice.element.classList.add('hidden');
        Cookienotice.resetSpacerHeight();
        sessionStorage.setItem('cookieDeny', 'true');
    },
    setSpacerHeight: function () {
        Cookienotice.spacer.style.height = Cookienotice.element.offsetHeight + 'px';
    },
    resetSpacerHeight: function () {
        Cookienotice.spacer.style.height = '';
    }
};

Cookienotice.init();

var GlobalEventThrottle = {
    scrollEvent: null,
    resizeEvent: null,
    readyEvent: null,
    throttleScroll: false,
    throttleResize: false,
    init: function(event) {
        if (typeof scrollEvent === 'function') {
            window.addEventListener('scroll', GlobalEventThrottle.throttleScrollTrigger);
        }

        if (typeof loadEvent === 'function') {
            window.addEventListener('load', loadEvent);
        }

        if (typeof resizeEvent === 'function') {
            window.addEventListener('resize', GlobalEventThrottle.throttleResizeTrigger);
        }

        if (typeof readyEvent === 'function') {
            GlobalEventThrottle.readyEvent = event;
            GlobalEventThrottle.execute(readyEvent);
        }
    },
    throttleScrollTrigger: function(event) {
        GlobalEventThrottle.scrollEvent = event;
        GlobalEventThrottle.throttleScroll = GlobalEventThrottle.throttleScroll || setTimeout(GlobalEventThrottle.execute, 200, scrollEvent, 'throttleScroll');
    },
    throttleResizeTrigger: function(event) {
        GlobalEventThrottle.resizeEvent = event;
        GlobalEventThrottle.throttleResize = GlobalEventThrottle.throttleResize || setTimeout(GlobalEventThrottle.execute, 200, resizeEvent, 'throttleResize');
    },
    execute: function(func, throttle) {
        GlobalEventThrottle[throttle] = (typeof window.requestAnimationFrame === 'function' && window.requestAnimationFrame(func)) || func();
    }
};

GlobalEventThrottle.init();

var VimeoLoader = {
    jsLoaded: false,
    players: [],
    registerAjaxNotify: function() {
        typeof AjaxObserver !== 'function' || AjaxObserver.registerObject('VimeoLoader', VimeoLoader.notifyRefresh, 'js-start-vimeo-initialized', 'js-start-vimeo');
    },
    notifyRefresh: function(event) {
        VimeoLoader.init();
    },
    init: function() {
        if (document.getElementsByClassName('js-start-vimeo').length > 0) {
            if (!VimeoLoader.jsLoaded) {
                VimeoLoader.assignPlayerEvent();
                VimeoLoader.initVimeoJS();
            } else {
                VimeoLoader.assignPlayerEvent();
            }
        }
    },
    assignPlayerEvent: function() {
        Array.prototype.slice.call(document.getElementsByClassName('js-start-vimeo')).forEach(function(item) {
            item.onclick = VimeoLoader.initVideoPlayer;
        });
    },
    initVideoPlayer: function() {
        if (this.parentNode.className.indexOf('is-video-initialized') === -1) {
            var data = JSON.parse(this.getAttribute('data-params'));
            var player = new Vimeo.Player(this.previousElementSibling, data);

            VimeoLoader.players.push(player);
            this.parentNode.className += ' is-video-initialized';
        }
    },
    initVimeoJS: function() {
        var tag = document.createElement('script');
        tag.src = 'https://player.vimeo.com/api/player.js';
        var firstScriptTag = document.getElementsByTagName('script')[0];
        firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
        VimeoLoader.jsLoaded = true;
    },
    pauseVideo: function(player) {
        if (player !== this.target) {
            player.pause();
        }
    },
    pauseAllVideos: function() {
        VimeoLoader.players.forEach(VimeoLoader.pauseVideo);
    },
};

VimeoLoader.registerAjaxNotify();
VimeoLoader.init();

function onYouTubeIframeAPIReady() {
    YouTubeLoader.assignPlayerEvent();
}

const YouTubeLoader = {
    jsLoaded: false,
    players: [],
    registerAjaxNotify: function() {
        typeof AjaxObserver !== 'function' || AjaxObserver.registerObject('YouTubeLoader', YouTubeLoader.notifyRefresh, 'js-start-youtube-initialized', 'js-start-youtube');
    },
    notifyRefresh: function(event) {
        YouTubeLoader.init();
    },
    init: function() {
        if (document.getElementsByClassName('js-start-youtube').length > 0) {
            if (!YouTubeLoader.jsLoaded) {
                YouTubeLoader.initYouTubeJS();
            } else {
                YouTubeLoader.assignPlayerEvent();
            }
        }
    },
    assignPlayerEvent: function() {
        Array.prototype.slice.call(document.getElementsByClassName('js-start-youtube')).forEach(function(item) {
            item.onclick = YouTubeLoader.initVideoPlayer;
        });
    },
    initVideoPlayer: function() {
        if (this.parentNode.className.indexOf('is-video-initialized') === -1) {
            const data = JSON.parse(this.getAttribute('data-params'));
            data.events = {
                'onReady': YouTubeLoader.playVideo,
                'onStateChange': YouTubeLoader.stateChange,
            };
            YouTubeLoader.players.push(new YT.Player(this.previousElementSibling, data));
            this.parentNode.className += ' is-video-initialized';
        }
    },
    stateChange: function(event) {
        if (event.data === YT.PlayerState.PLAYING) {
            YouTubeLoader.players.forEach(YouTubeLoader.pauseVideo, event);
        }
    },
    initYouTubeJS: function() {
        const tag = document.createElement('script');
        tag.src = 'https://www.youtube.com/iframe_api';
        const firstScriptTag = document.getElementsByTagName('script')[0];
        firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
        YouTubeLoader.jsLoaded = true;
    },
    pauseVideo: function(player) {
        if (player !== this.target) {
            player.pauseVideo();
        }
    },
    pauseAllVideos: function() {
        YouTubeLoader.players.forEach(YouTubeLoader.pauseVideo);
    },
    playVideo: function(event) {
        if(event.target.getPlayerState() === YT.PlayerState.UNSTARTED){
            event.target.playVideo();
        }
        if(event.target.getPlayerState() === YT.PlayerState.UNSTARTED || event.target.getPlayerState() === YT.PlayerState.CUED){
            event.target.mute();
            event.target.playVideo();
        }
    },
    resetVideo: function(player) {
        const videoWrapper = player.getIframe().parentNode;
        const className = videoWrapper.className;

        videoWrapper.className = className.slice(0, className.length - ' is-video-initialized'.length);
        player.destroy();
        YouTubeLoader.players.pop();
    },
    resetVideos: function() {
        YouTubeLoader.players.forEach(YouTubeLoader.resetVideo);
    },
};

YouTubeLoader.registerAjaxNotify();
YouTubeLoader.init();

const Accordion = {
    init: function () {
        Array.prototype.slice.call(document.querySelectorAll('.js-accordion')).forEach(function (el) {
            el.addEventListener('click', Accordion.toggleHandling);
        });
    },
    toggleHandling: function (event) {
        if (this.nodeName === 'A') {
            event.preventDefault();
        }

        const targetClassName = 'js-accordion-target-' + this.getAttribute('data-target');
        const group = this.getAttribute('data-group');

        if (this.on !== true && group) {
            Array.prototype.slice.call(document.querySelectorAll('[data-group="' + group + '"]')).forEach(Accordion.closeGroup);
        }

        if (this.on) {
            this.setAttribute('aria-expanded', false);
            this.classList.remove('is-active');
            this.on = false;
        } else {
            this.setAttribute('aria-expanded', true);
            this.classList.add('is-active');
            this.on = true;
        }

        Array.prototype.slice.call(document.getElementsByClassName(targetClassName)).forEach(Accordion.toggleElement);

        if (this.on === true && this.classList.contains('js-accordion-scroll')) {
            const offsetPosition = document.querySelector('.js-header') ? document.querySelector('.js-header').offsetHeight : 0;
            Accordion.scroll(this.getBoundingClientRect().top - 20 - offsetPosition);
        }
    },
    toggleElement: function(item) {
        if (item.className.indexOf('is-open') === -1) {
            item.classList.add('is-open');
            item.setAttribute('aria-hidden', false);
            item.style.maxHeight = item.scrollHeight + "px";
        } else {
            item.classList.remove('is-open');
            item.setAttribute('aria-hidden', true);
            item.style.maxHeight = "0";
        }
    },
    closeGroup: function(item) {
        const target = document.querySelector('.js-accordion-target-' + item.getAttribute('data-target'));
        item.classList.remove('is-active');
        item.on = false;
        target.classList.remove('is-open');
        target.style.maxHeight = "0";
    },
    scroll: function (positionTop) {
        window.scrollBy({top: positionTop, left: 0, behavior: 'smooth'})
    },
    updateHeight: function () {
        Array.prototype.slice.call(document.querySelectorAll('.js-accordion-body')).forEach(function (el) {
            if (el.classList.contains('is-open')) {
                el.style.maxHeight = el.scrollHeight + "px";
            }
        });
    }
};

Accordion.init();
const CustomProperties = {
    props: [],
    init: function () {
        CustomProperties.props = [
            {element: window, cssVar: '--vh'}, // for viewHeight calc on mobile, e.g. for component hero -> height: calc(var(--vh) * 100)
            {element: window, cssVar: '--ih', type: 'innerHeight'}, // for innerHeight calc on mobile, e.g. for component pusha -> height: calc(var(--ih) * 100)
            {element: document.querySelector('.js-header'), cssVar: '--hh', type: 'offsetHeight'},
        ];
    },
    update: function () {
        Array.prototype.slice.call(CustomProperties.props).forEach(function (prop) {
            if (prop['element']) {
                switch (prop['type']) {
                    case 'offsetHeight':
                        CustomProperties.setVar(prop['cssVar'], prop['element'].offsetHeight);
                        break;
                    case 'innerHeight':
                        CustomProperties.setVar(prop['cssVar'], prop['element'].innerHeight * 0.01); // for overall browser support
                        break;
                    default:
                        CustomProperties.setVar(prop['cssVar'], prop['element'].document.documentElement.clientHeight * 0.01); // for overall browser support
                        break;
                }
            }
        });
    },
    getVar: function (name) {
        return Number(getComputedStyle(document.documentElement).getPropertyValue(name).replace("px", ""));
    },
    setVar: function (name, value) {
        document.documentElement.style.setProperty(name, "" + value + "px");
    }
};

CustomProperties.init();
CustomProperties.update();
const Panel = {
    init: function () {
        Panel.container = document.getElementById('navigation');
        Panel.burger = document.getElementsByClassName('js-open-panel');

        if (Panel.container) {
            const panel = Panel.container;

            if (panel.parentNode !== document.body) {
                const wrapper = document.querySelector('.pusha-push');
                wrapper.parentNode.insertBefore(panel, wrapper);
            }

            new Pusha(panel, {
                onOpen: function (panel) {
                    Array.prototype.slice.call(document.querySelectorAll('[data-panel="#' + panel.id + '"]')).forEach(function (item) {
                        item.classList.add('is-active');
                    });
                },
                onClose: function (panel) {
                    Array.prototype.slice.call(document.querySelectorAll('[data-panel="#' + panel.id + '"]')).forEach(function (item) {
                        item.classList.remove('is-active');
                    });
                }
            });
        }

        Array.prototype.slice.call(Panel.burger).forEach(function (button) {
            const panel = document.querySelector(button.getAttribute('data-panel'));

            button.addEventListener('click', function (e) {
                e.preventDefault();
                panel.pusha.toggle(e);
            });
        });
    }
}

Panel.init();

const HeroCover = {
    body: document.querySelector('body'),
    header: document.querySelector('.js-header'),
    element: document.querySelector('.js-hero-cover'),

    init: function () {
        if (HeroCover.element) {
            HeroCover.body.classList.add('l-page--hero-cover');
            HeroCover.header.classList.add('c-header--transparent');

        }
    },
    toggleHeaderClass: function () {
        if (HeroCover.element) {
            let currentScroll = window.pageYOffset;

            if (currentScroll > 200) {
                HeroCover.header.classList.remove('c-header--transparent');
            } else {
                HeroCover.header.classList.add('c-header--transparent');
            }
        }
    }
};

HeroCover.init();

const Navigation = {
    activeButton: null,
    body: document.querySelector('body'),
    overlay: document.querySelector('.js-panel-overlay'),
    btnOpenSub: document.getElementsByClassName('js-navigation-open-sub'),
    btnGoBack: document.getElementsByClassName('js-navigation-close-sub'),

    init: function() {
        // Open / close sub navigation
        Array.prototype.slice.call(Navigation.btnOpenSub).forEach(Navigation.attachOpenListeners);
        // Go back (mobile)
        Array.prototype.slice.call(Navigation.btnGoBack).forEach(Navigation.attachCloseListeners);
    },
    closeSubMenu: function(event){
        event.target.closest('li.has-sub').classList.remove('is-active');
    },
    closeMenu: function(event){
        Navigation.overlay.classList.remove('is-active');
        Navigation.body.classList.remove('is-open');
        Navigation.activeButton.closest('li.has-sub').classList.remove('is-active');
        Navigation.activeButton = null;
    },
    openMenu: function(event){
        Navigation.activeButton ? Navigation.closeMenu() : '';
        Navigation.activeButton = event.target;
        event.target.closest('li.has-sub').classList.add('is-active');
        Navigation.body.classList.add('is-open');
        Navigation.overlay.classList.add('is-active');
    },
    attachCloseListeners: function(button){
        button.addEventListener('click', Navigation.closeSubMenu);
    },
    attachOpenListeners: function(button) {
        button.addEventListener('click', Navigation.openMenu);

        // Close navigation if click on overlay
        if (Navigation.overlay) {
            Navigation.overlay.addEventListener('click', Navigation.closeMenu);
        }
    }
};

Navigation.init();

const Randomize = {
    element: document.querySelector('.js-randomize'),

    init: function () {
        if (Randomize.element) {
            const rand = Math.floor(Math.random() * Math.floor(Randomize.element.childElementCount));

            Randomize.showElement(Randomize.element.children[rand]);
        }
    },

    showElement: function (item) {
        item.classList.remove('hidden');
    }
};

Randomize.init();

const Slider = {
    init: function () {
        Array.prototype.slice.call(document.getElementsByClassName('js-slider')).forEach(function (slider) {
            if (!slider.classList.contains('tns-slider')) {
                const options = JSON.parse(slider.getAttribute('data-options')) || {};
                const defaults = {
                    container: slider,
                    nav: false,
                    preventScrollOnTouch: 'auto',
                    mouseDrag: false,
                    responsive: {
                        680: {
                            items: 2,
                            gutter: 14,
                        }
                    }
                };
                const settings = Slider.mergeOptions(defaults, options);
                const tinyslider = tns(settings);

                if (slider.classList.contains('js-slider-liveregion')) {
                    Slider.updateIndex(tinyslider.getInfo(), slider);
                    slider.parentNode.querySelector('.js-slider-index-count').innerHTML = tinyslider.getInfo().slideCount;

                    tinyslider.events.on('indexChanged', function (info) {
                        Slider.updateIndex(info, slider);
                    });
                }
            }
        });
    },
    mergeOptions: function (obj1, obj2) {
        let obj3 = {};
        for (let attrname in obj1) {
            obj3[attrname] = obj1[attrname];
        }
        for (let attrname in obj2) {
            obj3[attrname] = obj2[attrname];
        }
        return obj3;
    },
    updateIndex: function (info, slider) {
        slider.closest('.js-slider-container').querySelector('.js-slider-index-current').innerHTML = info.displayIndex;
    }
};

Slider.init();

const SliderHeroCover = {
    init: function () {
        Array.prototype.slice.call(document.getElementsByClassName('js-slider-hero-cover')).forEach(function (container) {
            var content_container = container.querySelector('.js-slider-content');
            var thumbnail_container = container.querySelector('.js-slider-thumbnail');
            var content_tinyslider = '';
            var thumbnail_tinyslider = '';
            var options = '';
            var defaults = '';
            var settings = '';

            if (!content_container.classList.contains('tns-slider')) {
                options = JSON.parse(content_container.getAttribute('data-options')) || {};
                defaults = {
                    loop: false,
                    container: content_container,
                    items: 1,
                    touch: false,
                    controls: false,
                    navContainer: thumbnail_container,
                    navAsThumbnails: true,
                    startIndex: 1,
                    mode: 'gallery'
                };
                settings = SliderHeroCover.mergeOptions(defaults, options);
                content_tinyslider = tns(settings);
            }

            if (!thumbnail_container.classList.contains('tns-slider')) {
                options = JSON.parse(thumbnail_container.getAttribute('data-options')) || {};
                defaults = {
                    loop: true,
                    container: thumbnail_container,
                    items: 3,
                    slideBy: 1,
                    touch: false,
                    controls: false,
                    nav: false,
                    axis: 'vertical',
                    gutter: 10,
                    onInit: function (info) {
                        info.container.querySelectorAll('.tns-slide-active')[1].classList.add('tns-slide-current');
                    },
                };
                settings = SliderHeroCover.mergeOptions(defaults, options);

                if (thumbnail_container.children.length <= settings.items) {
                    settings.items = thumbnail_container.children.length;
                }
                thumbnail_tinyslider = tns(settings);

                Array.prototype.slice.call(thumbnail_container.querySelectorAll('.tns-item')).forEach(function (item, i) {
                    item.setAttribute('data-index', i);

                    item.addEventListener('click', function (e) {
                        if (!this.classList.contains('tns-slide-current')) {
                            e.preventDefault();

                            if (this.nextElementSibling.classList.contains('tns-slide-current')) {
                                thumbnail_tinyslider.goTo('prev');
                            } else {
                                thumbnail_tinyslider.goTo('next');
                            }

                            Array.prototype.slice.call(thumbnail_container.querySelectorAll('.tns-item')).forEach(function (item) {
                                item.classList.remove('tns-slide-current');
                            });

                            var navIndex = this.getAttribute('data-nav');
                            Array.prototype.slice.call(thumbnail_container.querySelectorAll('[data-nav="' + navIndex + '"]')).forEach(function (item) {
                                item.classList.add('tns-slide-current');
                            });
                        }
                    });
                });
            }
        });
    },
    mergeOptions: function (obj1, obj2) {
        let obj3 = {};
        for (let attrname in obj1) {
            obj3[attrname] = obj1[attrname];
        }
        for (let attrname in obj2) {
            obj3[attrname] = obj2[attrname];
        }
        return obj3;
    },
    updateIndex: function (info, slider) {
        slider.closest('.js-slider-container').querySelector('.js-slider-index-current').innerHTML = info.displayIndex;
    }
};

SliderHeroCover.init();

const Swipe = {
    init: function () {
        const items = document.getElementsByClassName('js-swipe');
        if (items) {
            Array.prototype.slice.call(items).forEach(function (item) {
                let container = Swipe.createNewElement('div', {class: 'c-swipe'});
                let wrapper = Swipe.createNewElement('div', {class: 'c-swipe__wrapper'});
                let swipeElement = Swipe.createNewElement('div', {class: 'c-swipe__hint js-swipe-hint', 'data-content': 'Swipe'});

                Swipe.toWrap(item, wrapper);
                Swipe.toWrap(wrapper, container);
                container.insertBefore(swipeElement, wrapper);
                wrapper.addEventListener('scroll', Swipe.checkScrollPosition);
            });

            Swipe.checkScrollable();
        }
    },

    createNewElement: function (tag, attributes) {
        let e = document.createElement(tag);
        for (let a in attributes) e.setAttribute(a, attributes[a]);
        return e;
    },

    toWrap: function (el, wrapper) {
        el.parentNode.insertBefore(wrapper, el);
        wrapper.appendChild(el);
    },

    checkScrollable: function () {
        Array.prototype.slice.call(document.getElementsByClassName('js-swipe')).forEach(function (item) {
            if (Swipe.isInContainer(item) === false) {
                item.parentNode.classList.add('is-scrollable-x');
                item.parentNode.parentNode.querySelector('.js-swipe-hint').classList.add('is-visible');
            } else {
                item.parentNode.classList.remove('is-scrollable-x');
                item.parentNode.parentNode.querySelector('.js-swipe-hint').classList.remove('is-visible');
            }
        });
    },

    checkScrollPosition: function (e) {
        let scrollRight = e.target.scrollWidth - e.target.clientWidth - e.target.scrollLeft;
        if (e.target.scrollLeft >= 0 && scrollRight <= 5) {
            e.target.parentNode.querySelector('.js-swipe-hint').classList.remove('is-visible');
        } else {
            e.target.parentNode.querySelector('.js-swipe-hint').classList.add('is-visible');
        }
    },

    isInContainer: function (elem) {
        let bounding = elem.getBoundingClientRect();
        return (
            bounding.left >= 0 &&
            bounding.right <= (window.innerWidth || document.documentElement.clientWidth)
        );
    }
};

Swipe.init();




var eventLimiter = (function() {


	/**
	 * Source: http://underscorejs.org/
	 * A (possibly faster) way to get the current timestamp as an integer.
	 */
	var rightNow = Date.now || function() {
		return new Date().getTime();
	};



	/**
	 * Source: http://underscorejs.org/
	 * Returns a function, that, when invoked, will only be triggered at most once
	 * during a given window of time. Normally, the throttled function will run
	 * as much as it can, without ever going more than once per `wait` duration;
	 * but if you'd like to disable the execution on the leading edge, pass
	 * `{leading: false}`. To disable execution on the trailing edge, ditto.
	 */
	var throttle = function(func, wait, options) {
		var timeout, context, args, result;
		var previous = 0;
		if (!options) options = {};

		var later = function() {
			previous = options.leading === false ? 0 : rightNow();
			timeout = null;
			result = func.apply(context, args);
			if (!timeout) context = args = null;
		};

		var throttled = function() {
			var now = rightNow();
			if (!previous && options.leading === false) previous = now;
			var remaining = wait - (now - previous);
			context = this;
			args = arguments;
			if (remaining <= 0 || remaining > wait) {
				if (timeout) {
					clearTimeout(timeout);
					timeout = null;
				}
				previous = now;
				result = func.apply(context, args);
				if (!timeout) context = args = null;
			} else if (!timeout && options.trailing !== false) {
				timeout = setTimeout(later, remaining);
			}
			return result;
		};

		throttled.cancel = function() {
			clearTimeout(timeout);
			previous = 0;
			timeout = context = args = null;
		};

		return throttled;
	};



	// Source: http://underscorejs.org/
	// Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
	// This accumulates the arguments passed into an array, after a given index.
	var restArgs = function(func, startIndex) {
		startIndex = startIndex == null ? func.length - 1 : +startIndex;
		return function() {
			var length = Math.max(arguments.length - startIndex, 0);
			var rest = Array(length);
			for (var index = 0; index < length; index++) {
				rest[index] = arguments[index + startIndex];
			}
			switch (startIndex) {
				case 0: return func.call(this, rest);
				case 1: return func.call(this, arguments[0], rest);
				case 2: return func.call(this, arguments[0], arguments[1], rest);
			}
			var args = Array(startIndex + 1);
			for (index = 0; index < startIndex; index++) {
				args[index] = arguments[index];
			}
			args[startIndex] = rest;
			return func.apply(this, args);
		};
	};



	// Source: http://underscorejs.org/
	// Delays a function for the given number of milliseconds, and then calls
	// it with the arguments supplied.
	var delay = restArgs(function(func, wait, args) {
		return setTimeout(function() {
			return func.apply(null, args);
		}, wait);
	});



	// Source: http://underscorejs.org/
	// Returns a function, that, as long as it continues to be invoked, will not
	// be triggered. The function will be called after it stops being called for
	// N milliseconds. If `immediate` is passed, trigger the function on the
	// leading edge, instead of the trailing.
	var debounce = function(func, wait, immediate) {
		var timeout, result;

		var later = function(context, args) {
			timeout = null;
			if (args) result = func.apply(context, args);
		};

		var debounced = restArgs(function(args) {
			var callNow = immediate && !timeout;
			if (timeout) clearTimeout(timeout);
			if (callNow) {
				timeout = setTimeout(later, wait);
				result = func.apply(this, args);
			} else if (!immediate) {
				timeout = delay(later, wait, this, args);
			}

			return result;
		});

		debounced.clear = function() {
			clearTimeout(timeout);
			timeout = null;
		};

		return debounced;
	};


	return {
		throttle: throttle,
		debounce: debounce
	};


}());


var Animator = function() {
    this.scrolledToFooter = false;
    this.windowWidth = window.innerWidth;

    this.content = document.querySelector('.l-content');
    this.footer = document.querySelector('.c-footer');
};

Animator.prototype.init = function() {
    if (this.windowWidth < 1470) return;
    this.scrolledPastHero = true;
    document.body.classList.add('scrolled-past-hero');
    
    setTimeout(function() {
        this.animateInContent(function() {
            this.bindInteractions();
        }.bind(this));
    }.bind(this), 250);
};

Animator.prototype.bindInteractions = function() {
    document.body.classList.add('animated-hero-footer');
    this.onScroll();
    window.addEventListener('scroll', eventLimiter.throttle(this.onScroll.bind(this), 50));
};

Animator.prototype.onScroll = function(event) {
    var scrollPosition = this.getScrollingElement().scrollTop;
    var viewportHeight = window.innerHeight;
    var footerBounds = this.footer.getBoundingClientRect();
    
    if (scrollPosition > 5) {
        if (!this.scrolledPastHero) {
            this.scrolledPastHero = true;
            document.body.classList.add('scrolled-past-hero');
        }
        
    } else {
        if (this.scrolledPastHero) {
            this.scrolledPastHero = false;
            document.body.classList.remove('scrolled-past-hero');
        }
    }

    // if (footerBounds.top + footerBounds.height - 5 <= viewportHeight) {
    if (footerBounds.top + footerBounds.height / 2 <= viewportHeight) {
        if (!this.scrolledToFooter) {
            this.scrolledToFooter = true;
            document.body.classList.add('scrolled-to-footer');
        }
        
    } else {
        if (this.scrolledToFooter) {
            this.scrolledToFooter = false;
            document.body.classList.remove('scrolled-to-footer');
        }
    }
};

Animator.prototype.animateInContent = function(callback) {
    var scrollPosition = this.getScrollingElement().scrollTop;
    if (scrollPosition <= 300) {
        // The translateY animation of the content seems to mess up the scroll position in chrome, so we make sure it stays at the top when near the top.
        this.getScrollingElement().scrollTop = 0;
    }

    var redraw = this.content.offsetHeight;
    this.content.classList.add('is-animating-in');
    setTimeout(function() {
        this.content.classList.add('is-visible');
        this.content.classList.remove('is-animating-in');
        if (callback) callback();
    }.bind(this), 750 + 50);
};

Animator.prototype.getScrollingElement = function() {
    return document.scrollingElement || document.body || document.documentElement;
};

var animator = new Animator();
animator.init();


function scrollEvent() {
    //if (typeof Paginate !== 'undefined') {
    //    Paginate.scrollCheck(); // use this if you want to trigger pagination on scrolling
    //}

    // Put your code here
    // ScrollDirection.checkDirection();

    // Toggle header background class
    HeroCover.toggleHeaderClass();

    GlobalEventThrottle.throttleScroll = false;
    //console.log(GlobalEventThrottle.scrollEvent);
}



function resizeEvent() {
    //if (typeof Masonry !== 'undefined') {
    //    Masonry.resizeAllMasonryItems();
    //}

    // Put your code here
    CustomProperties.update(); // us this to update custom properties
    // Accordion.updateHeight();

    Swipe.checkScrollable();

    GlobalEventThrottle.throttleResize = false;
    //console.log(GlobalEventThrottle.resizeEvent);
}


/*
function loadEvent() {
    // Put your code here
}
*/


function readyEvent() {
    // Put your code here
    // objectFitPolyfill(); // required for ie 11

    Array.prototype.slice.call(document.getElementsByClassName('js-cloader')).forEach(function (item) {
        item.addEventListener('cloader.after', function () {
            Swipe.init();
        });
    });

    Array.prototype.slice.call(document.getElementsByClassName('js-partial-filters')).forEach(function (item) {
        item.addEventListener('ajaxReplace.after', function () {
            Array.prototype.slice.call(document.getElementsByClassName('js-cloader')).forEach(function (item) {
                item.addEventListener('cloader.after', function () {
                    Swipe.init();
                });
            });
        });
    });
}
