function inputFocusLost(n,t){document.getElementById(t).classList.remove("js-input-focus")}function inputFocusGained(n,t){document.getElementById(t).classList.add("js-input-focus")}function updateSliderSetting(n,t,i){var r=n.parentNode.parentNode;i?r.classList.add(t):r.classList.remove(t)}function checkSliderFit(n){updateSliderSetting(n,"js-slider-fits",n.scrollWidth<=n.clientWidth)}function updateSlideIndex(n,t){var r=parseInt(n.getAttribute("data-slide-index")),u=n.children.length-1,i=Math.max(Math.min(r+t,u),0);return n.setAttribute("data-slide-index",i),i}function updateArrows(n,t){var u=n.children.length-1,i=u===t,r;i||(r=n.children[t].offsetLeft*-1,i=calcMaxOffset(n)>r);updateSliderSetting(n,"js-slider-at-start",t===0);updateSliderSetting(n,"js-slider-at-end",i)}function sliderSwipeLeft(n){var t=updateSlideIndex(n,-1);sliderMove(n);updateArrows(n,t)}function sliderSwipeRight(n){var t=updateSlideIndex(n,1);sliderMove(n);updateArrows(n,t)}function calcMaxOffset(n){return n.clientWidth-n.scrollWidth-64}function sliderMove(n){var i=16,f=calcMaxOffset(n),r=parseInt(n.getAttribute("data-slide-index")),e=r===0?i:i*3,t,u;n.children.length!==0&&(t=n.children[r],u=Math.min(Math.max(f,t.offsetLeft*-1),0)+e,t.parentNode.style.transform="translateX("+u+"px)")}function updateSliders(){$(".slider-block__list").each(function(){sliderMove(this)})}function rand(){return Math.floor(Math.random()*1e4+1)}function initSliders(){$(".slider-block__area").each(function(){var n=$(this).find(".slider-block__list").get(0),r=$(this).find(".slider-block__viewport").get(0),t,i;$(n).attr("data-slide-index",0);t=new Hammer.Manager(r);i=new Hammer.Swipe({direction:Hammer.DIRECTION_HORIZONTAL,threshold:0});t.add(i);t.on("swipeleft",function(){sliderSwipeRight(n)});t.on("swiperight",function(){sliderSwipeLeft(n)});$(this).find(".slider-block--left").click(function(){sliderSwipeLeft(n)});$(this).find(".slider-block--right").click(function(){sliderSwipeRight(n)});checkSliderFit(n)})}function initVideoModal(){var n=$("[data-video-id]"),t;n.length<=0||(t=n[0].getAttribute("data-video-id"),videoPlayer=new Vimeo.Player("js-video-wrapper",{id:t}),n.click(function(){playVimeoVideo(this)}))}function initVideoBlocks(){var n=$('[data-video-id][id="js-video-wrapper-large"]');n.length<=0||$.each(n,function(){var n=this.getAttribute("data-video-id"),t=this.getAttribute("data-video-muted"),i=this.getAttribute("data-vimeo-controls"),r=new Vimeo.Player(this,{id:n,muted:t,controls:i})})}function playVimeoVideo(n){var t=n.getAttribute("data-video-id"),i=t.lastIndexOf("/"),r=t.substring(i+1);showVideoModal(t);videoPlayer.loadVideo(r).then(function(){videoPlayer.play()}).catch(function(){})}function showVideoModal(){var n=document.getElementById("js-video-modal");document.body.classList.add("js-modal-active");n.classList.add("video-modal--shown");n.classList.remove("video-modal--hidden")}function hideVideoModal(n){videoPlayer.pause();document.body.classList.remove("js-modal-active");n.classList.remove("video-modal--shown");n.classList.add("video-modal--hidden")}function showEmployeeAbout(n){n.parentNode.parentNode.classList.add("js-show-text")}function hideEmployeeAbout(n){n.parentNode.parentNode.classList.remove("js-show-text")}function toggleFaq(n){n.parentNode.classList.toggle("js-faq-expand")}function ToggleRegionalSites(){$(".fa.fa-chevron-down.regional").toggleClass("rotate");$(".regional-sites__list").toggleClass("show")}function ToggleMegaMenu(n,t){n.stopPropagation();hideOnClickOutside(".mega-menu__list-container",t);innerToggle(t)}function ToggleLanguageMenu(n){n.stopPropagation();$(".language-menu__list-container").toggleClass("show")}function innerToggle(n){var t="#"+n;$(t).toggleClass("cross");$(".mega-menu__list-container").toggleClass("show");$(".left-menu__list").toggleClass("hide");$(".icon-bar").toggleClass("rotate");updateMergeStatus()}function hideOnClickOutside(n,t){var i=function(i){if(!$(n).hasClass("show")){r();return}$(i.target).closest(n).length||$(n).hasClass("show")&&(innerToggle(t),r())},r=function(){document.removeEventListener("click",i)};document.addEventListener("click",i)}function ToggleList(n,t,i){var r,u,f;n!==undefined&&n!==""&&(r="#"+n+"-chrevron",$(r).toggleClass("rotate"),i!==undefined&&i!==""&&(u=i+n,$(u).toggleClass("show")),t!==undefined&&t!==""&&(f=t+n,$(f).toggleClass("show")))}function updateMergeStatus(){function c(){$logo2Id.removeClass("show-me");$logoId.removeClass("hide-logo");$leftMenuBarId.removeClass("shrink");$leftMenuListId.removeClass("remove");$middleContainerId.removeClass("active");$contactPage.removeClass("hidden");$languageToggle.removeClass("hidden");$secondaryMenuId.removeClass("top")}function l(){$logo2Id.addClass("show-me");$logoId.addClass("hide-logo");$leftMenuBarId.addClass("shrink");$leftMenuListId.addClass("remove");$middleContainerId.addClass("active");$contactPage.addClass("hidden");$languageToggle.addClass("hidden");$secondaryMenuId.addClass("top")}function a(){l();$secondaryMenuId.appendTo($middleContainerId)}function e(){c();$secondaryMenuId.appendTo($secondaryContainerId)}var n=$(this).scrollTop(),h=$menuId.outerHeight(),r="",i=!1,u,f,t,o,s;$secondaryContainerId.offset()!==undefined&&(u=$secondaryContainerId.offset().top,f=$secondaryContainerId.outerHeight(),r=u+f,i=!0);t=window.matchMedia("(min-width: 1024px)").matches;o=$(".js-hide-on-search-overlay").hasClass("hide");n+h>r&&t&&i&&!o?a():(t||n===0)&&i?e():t===!1&&e();s=$(".mega-menu__list-container").hasClass("show");n<=90&&!s?$logoId.removeClass("shrink"):$logoId.addClass("shrink");n<1?$(".parallax-mirror").removeClass("header-scrolled"):$(".parallax-mirror").addClass("header-scrolled")}function initMapContainer(n,t){var r=t.getElementsByClassName(n+"__metadata")[0].innerHTML.split(","),i={lat:parseFloat(r[0]),lng:parseFloat(r[1])},f=t.getElementsByClassName(n+"__map-container")[0],u=new google.maps.Map(f,{center:i,scrollwheel:!1,zoom:15,mapTypeControlOptions:{mapTypeIds:[]},disableDefaultUI:!0,mapTypeControl:!0,scaleControl:!0,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.LARGE},mapTypeId:google.maps.MapTypeId.ROADMAP}),e=new google.maps.Marker({map:u,position:i});return[u,e,i]}function initOfficeMap(){return initHnMap("office-preview")}function initHnMap(n){var t=[],i=document.getElementsByClassName(n+"__container"),r=Array.prototype.slice.call(i);return r.forEach(function(i){t.push(initMapContainer(n,i))}),t}var videoPlayer;(function(){$(document).ready(function(){initSliders();initVideoModal();initVideoBlocks();$(window).resize(updateSliders)})})();$(document).ready(function(){function u(){var u=t.width()-2*n,c=Math.abs(f-u),s,h;c<=n||(f=u,s=0,h=!1,i.children().each(function(){var n=$(this);n.addClass(o);n.removeClass(e);t.append(n)}),t.children().each(function(){var t=$(this);s+=t.width()+n;s>=u&&(t.removeClass(o),t.addClass(e),i.append(t),h=!0)}),h?r.removeClass("hidden"):r.addClass("hidden"))}var n=55,t=$(".secondary-nav__visible-list"),i=$(".secondary-nav__hidden-list"),r=$(".secondary-nav__more-button"),f=0,e="secondary-nav__hidden-list__item",o="secondary-nav__visible-list__item";$(window).resize(function(){u()});$(window).scroll(function(){u()});r.on("click",function(){i.toggleClass("show")});u()});var $logoId=$("#logo"),$logo2Id=$("#logo2"),$menuId=$("#menu"),$leftMenuBarId=$("#leftMenu"),$leftMenuListId=$("#leftMenuList"),$middleContainerId=$("#middleContainer"),$contactPage=$("#contactPage"),$languageToggle=$("#languageToggle"),$secondaryMenuId=$("#secondaryMenu"),$secondaryContainerId=$("#secondaryContainer"),$headerContainer=$("#header-container-id");$(window).scroll(function(){updateMergeStatus()});$(window).resize(function(){updateMergeStatus();$(".js-show-search").bind("click",updateMergeStatus)});$(document).ready(function(){function t(){var f=r.offset().left-60,e=i.offset().left+20,u,t;(distance=f-e,distance<=0)||(u=Math.abs(n-distance),u<=20)||(n=distance,t=0,i.children().each(function(){var i=$(this);t+=i.width()+20;t>=n?i.addClass("hide-item"):i.removeClass("hide-item")}))}var i=$("#leftMenuList"),r=$("#logo"),n=0;$(window).resize(function(){t()});$(window).scroll(function(){t()});t()}),function(n){function r(){var n=f(t);return n?!1:!0}function u(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toUTCString();document.cookie=n+"="+t+";"+u+";path=/"}function f(n){for(var t,r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function i(n){$(n).closest(".js-cookie-root").toggleClass("js-modal-active")}function e(n,t){n.target==t&&i(t)}function o(n){u(t,!0,365);$(n).closest(".js-cookie-root").removeClass("js-active-message")}var t="hide-cookie-message";r()&&$(document).find(".js-cookie-root").addClass("js-active-message");n.LeroyScripts=n.LeroyScripts||{};n.LeroyScripts.cookieMessage=n.LeroyScripts.cookieMessage||{};n.LeroyScripts.cookieMessage.toggleModal=i;n.LeroyScripts.cookieMessage.layerClicked=e;n.LeroyScripts.cookieMessage.closeMessage=o}(window);!function(n,t,i,r){function u(t,i){var e=this,f,o,s;if("object"==typeof i&&(delete i.refresh,delete i.render,n.extend(this,i)),this.$element=n(t),!this.imageSrc&&this.$element.is("img")&&(this.imageSrc=this.$element.attr("src")),f=(this.position+"").toLowerCase().match(/\S+/g)||[],f.length<1&&f.push("center"),1==f.length&&f.push(f[0]),"top"!=f[0]&&"bottom"!=f[0]&&"left"!=f[1]&&"right"!=f[1]||(f=[f[1],f[0]]),this.positionX!==r&&(f[0]=this.positionX.toLowerCase()),this.positionY!==r&&(f[1]=this.positionY.toLowerCase()),e.positionX=f[0],e.positionY=f[1],"left"!=this.positionX&&"right"!=this.positionX&&(this.positionX=isNaN(parseInt(this.positionX))?"center":parseInt(this.positionX)),"top"!=this.positionY&&"bottom"!=this.positionY&&(this.positionY=isNaN(parseInt(this.positionY))?"center":parseInt(this.positionY)),this.position=this.positionX+(isNaN(this.positionX)?"":"px")+" "+this.positionY+(isNaN(this.positionY)?"":"px"),navigator.userAgent.match(/(iPod|iPhone|iPad)/))return this.imageSrc&&this.iosFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;if(navigator.userAgent.match(/(Android)/))return this.imageSrc&&this.androidFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;this.$mirror=n("<div />").prependTo(this.mirrorContainer);o=this.$element.find(">.parallax-slider");s=!1;0==o.length?this.$slider=n("<img />").prependTo(this.$mirror):(this.$slider=o.prependTo(this.$mirror),s=!0);this.$mirror.addClass("parallax-mirror").css({visibility:"hidden",zIndex:this.zIndex,position:"fixed",top:0,left:0,overflow:"hidden"});this.$slider.addClass("parallax-slider").one("load",function(){e.naturalHeight&&e.naturalWidth||(e.naturalHeight=this.naturalHeight||this.height||1,e.naturalWidth=this.naturalWidth||this.width||1);e.aspectRatio=e.naturalWidth/e.naturalHeight;u.isSetup||u.setup();u.sliders.push(e);u.isFresh=!1;u.requestRender()});s||(this.$slider[0].src=this.imageSrc||"/Content/img/black-placeholder.png");(this.naturalHeight&&this.naturalWidth||this.$slider[0].complete||o.length>0)&&this.$slider.trigger("load")}!function(){for(var r=0,i=["ms","moz","webkit","o"],n=0;n<i.length&&!t.requestAnimationFrame;++n)t.requestAnimationFrame=t[i[n]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[i[n]+"CancelAnimationFrame"]||t[i[n]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(n){var i=(new Date).getTime(),u=Math.max(0,16-(i-r)),f=t.setTimeout(function(){n(i+u)},u);return r=i+u,f});t.cancelAnimationFrame||(t.cancelAnimationFrame=function(n){clearTimeout(n)})}();n.extend(u.prototype,{speed:.2,bleed:0,zIndex:-100,iosFix:!0,androidFix:!0,position:"center",overScrollFix:!1,mirrorContainer:"body",refresh:function(){this.boxWidth=this.$element.outerWidth();this.boxHeight=this.$element.outerHeight()+2*this.bleed;this.boxOffsetTop=this.$element.offset().top-this.bleed;this.boxOffsetLeft=this.$element.offset().left;this.boxOffsetBottom=this.boxOffsetTop+this.boxHeight;var n,r=u.winHeight,e=u.docHeight,f=Math.min(this.boxOffsetTop,e-r),o=Math.max(this.boxOffsetTop+this.boxHeight-r,0),i=this.boxHeight+(f-o)*(1-this.speed)|0,t=(this.boxOffsetTop-f)*(1-this.speed)|0;i*this.aspectRatio>=this.boxWidth?(this.imageWidth=i*this.aspectRatio|0,this.imageHeight=i,this.offsetBaseTop=t,n=this.imageWidth-this.boxWidth,this.offsetLeft="left"==this.positionX?0:"right"==this.positionX?-n:isNaN(this.positionX)?-n/2|0:Math.max(this.positionX,-n)):(this.imageWidth=this.boxWidth,this.imageHeight=this.boxWidth/this.aspectRatio|0,this.offsetLeft=0,n=this.imageHeight-i,this.offsetBaseTop="top"==this.positionY?t:"bottom"==this.positionY?t-n:isNaN(this.positionY)?t-n/2|0:t+Math.max(this.positionY,-n))},render:function(){var n=u.scrollTop,t=u.scrollLeft,i=this.overScrollFix?u.overScroll:0,r=n+u.winHeight;this.boxOffsetBottom>n&&this.boxOffsetTop<=r?(this.visibility="visible",this.mirrorTop=this.boxOffsetTop-n,this.mirrorLeft=this.boxOffsetLeft-t,this.offsetTop=this.offsetBaseTop-this.mirrorTop*(1-this.speed)):this.visibility="hidden";this.$mirror.css({transform:"translate3d("+this.mirrorLeft+"px, "+(this.mirrorTop-i)+"px, 0px)",visibility:this.visibility,height:this.boxHeight,width:this.boxWidth});this.$slider.css({transform:"translate3d("+this.offsetLeft+"px, "+this.offsetTop+"px, 0px)",position:"absolute",height:this.imageHeight,width:this.imageWidth,maxWidth:"none"})}});n.extend(u,{scrollTop:0,scrollLeft:0,winHeight:0,winWidth:0,docHeight:1073741824,docWidth:1073741824,sliders:[],isReady:!1,isFresh:!1,isBusy:!1,setup:function(){function f(){if(e==t.pageYOffset)return t.requestAnimationFrame(f),!1;e=t.pageYOffset;o.render();t.requestAnimationFrame(f)}var e;if(!this.isReady){var o=this,s=n(i),r=n(t),h=function(){u.winHeight=r.height();u.winWidth=r.width();u.docHeight=s.height();u.docWidth=s.width()},c=function(){var n=r.scrollTop(),t=u.docHeight-u.winHeight,i=u.docWidth-u.winWidth;u.scrollTop=Math.max(0,Math.min(t,n));u.scrollLeft=Math.max(0,Math.min(i,r.scrollLeft()));u.overScroll=Math.max(n-t,Math.min(n,0))};r.on("resize.px.parallax load.px.parallax",function(){h();o.refresh();u.isFresh=!1;u.requestRender()}).on("scroll.px.parallax load.px.parallax",function(){c();u.requestRender()});h();c();this.isReady=!0;e=-1;f()}},configure:function(t){"object"==typeof t&&(delete t.refresh,delete t.render,n.extend(this.prototype,t))},refresh:function(){n.each(this.sliders,function(){this.refresh()});this.isFresh=!0},render:function(){this.isFresh||this.refresh();n.each(this.sliders,function(){this.render()})},requestRender:function(){var n=this;n.render();n.isBusy=!1},destroy:function(i){var r,f=n(i).data("px.parallax");for(f.$mirror.remove(),r=0;r<this.sliders.length;r+=1)this.sliders[r]==f&&this.sliders.splice(r,1);n(i).data("px.parallax",!1);0===this.sliders.length&&(n(t).off("scroll.px.parallax resize.px.parallax load.px.parallax"),this.isReady=!1,u.isSetup=!1)}});var f=n.fn.parallax;n.fn.parallax=function(r){return this.each(function(){var f=n(this),e="object"==typeof r&&r;this==t||this==i||f.is("body")?u.configure(e):f.data("px.parallax")?"object"==typeof r&&n.extend(f.data("px.parallax"),e):(e=n.extend({},f.data(),e),f.data("px.parallax",new u(this,e)));"string"==typeof r&&("destroy"==r?u.destroy(this):u[r]())})};n.fn.parallax.Constructor=u;n.fn.parallax.noConflict=function(){return n.fn.parallax=f,this};n(function(){n('[data-parallax="scroll"]').parallax()})}(jQuery,window,document),function(n,t,i,r){"use strict";function ci(n,t,i){return setTimeout(ai(n,i),t)}function ut(n,t,i){return Array.isArray(n)?(v(n,i[t],i),!0):!1}function v(n,t,i){var u;if(n)if(n.forEach)n.forEach(t,i);else if(n.length!==r)for(u=0;u<n.length;)t.call(i,n[u],u,n),u++;else for(u in n)n.hasOwnProperty(u)&&t.call(i,n[u],u,n)}function or(t,i,r){var u="DEPRECATED METHOD: "+i+"\n"+r+" AT \n";return function(){var i=new Error("get-stack-trace"),f=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=n.console&&(n.console.warn||n.console.log);return r&&r.call(n.console,u,f),t.apply(this,arguments)}}function o(n,t,i){var u=t.prototype,r;r=n.prototype=Object.create(u);r.constructor=n;r._super=u;i&&y(r,i)}function ai(n,t){return function(){return n.apply(t,arguments)}}function vi(n,t){return typeof n==bu?n.apply(t?t[0]||r:r,t):n}function hr(n,t){return n===r?t:n}function pt(n,t,i){v(bt(t),function(t){n.addEventListener(t,i,!1)})}function wt(n,t,i){v(bt(t),function(t){n.removeEventListener(t,i,!1)})}function cr(n,t){while(n){if(n==t)return!0;n=n.parentNode}return!1}function g(n,t){return n.indexOf(t)>-1}function bt(n){return n.trim().split(/\s+/g)}function ft(n,t,i){if(n.indexOf&&!i)return n.indexOf(t);for(var r=0;r<n.length;){if(i&&n[r][i]==t||!i&&n[r]===t)return r;r++}return-1}function kt(n){return Array.prototype.slice.call(n,0)}function lr(n,t,i){for(var u=[],e=[],r=0,f;r<n.length;)f=t?n[r][t]:n[r],ft(e,f)<0&&u.push(n[r]),e[r]=f,r++;return i&&(u=t?u.sort(function(n,i){return n[t]>i[t]}):u.sort()),u}function dt(n,t){for(var i,u,e=t[0].toUpperCase()+t.slice(1),f=0;f<er.length;){if(i=er[f],u=i?i+e:t,u in n)return u;f++}return r}function ku(){return ar++}function vr(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||n}function s(n,t){var i=this;this.manager=n;this.callback=t;this.element=n.element;this.target=n.options.inputTarget;this.domHandler=function(t){vi(n.options.enable,[n])&&i.handler(t)};this.init()}function tf(n){var t,i=n.options.inputClass;return t=i?i:du?wi:gu?ri:yr?ki:ii,new t(n,rf)}function rf(n,t,i){var r=i.pointers.length,o=i.changedPointers.length,s=t&f&&r-o==0,h=t&(u|e)&&r-o==0;i.isFirst=!!s;i.isFinal=!!h;s&&(n.session={});i.eventType=t;uf(n,i);n.emit("hammer.input",i);n.recognize(i);n.session.prevInput=i}function uf(n,t){var i=n.session,f=t.pointers,o=f.length,r,e;i.firstInput||(i.firstInput=br(t));o>1&&!i.firstMultiple?i.firstMultiple=br(t):o===1&&(i.firstMultiple=!1);var s=i.firstInput,u=i.firstMultiple,h=u?u.center:s.center,c=t.center=kr(f);t.timeStamp=hi();t.deltaTime=t.timeStamp-s.timeStamp;t.angle=pi(h,c);t.distance=ti(h,c);ff(i,t);t.offsetDirection=gr(t.deltaX,t.deltaY);r=dr(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=r.x;t.overallVelocityY=r.y;t.overallVelocity=d(r.x)>d(r.y)?r.x:r.y;t.scale=u?sf(u.pointers,f):1;t.rotation=u?of(u.pointers,f):0;t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length;ef(i,t);e=n.element;cr(t.srcEvent.target,e)&&(e=t.srcEvent.target);t.target=e}function ff(n,t){var i=t.center,r=n.offsetDelta||{},e=n.prevDelta||{},o=n.prevInput||{};(t.eventType===f||o.eventType===u)&&(e=n.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=n.offsetDelta={x:i.x,y:i.y});t.deltaX=e.x+(i.x-r.x);t.deltaY=e.y+(i.y-r.y)}function ef(n,t){var i=n.lastInterval||t,c=t.timeStamp-i.timeStamp,f,o,s,h;if(t.eventType!=e&&(c>nf||i.velocity===r)){var l=t.deltaX-i.deltaX,a=t.deltaY-i.deltaY,u=dr(c,l,a);o=u.x;s=u.y;f=d(u.x)>d(u.y)?u.x:u.y;h=gr(l,a);n.lastInterval=t}else f=i.velocity,o=i.velocityX,s=i.velocityY,h=i.direction;t.velocity=f;t.velocityX=o;t.velocityY=s;t.direction=h}function br(n){for(var i=[],t=0;t<n.pointers.length;)i[t]={clientX:rt(n.pointers[t].clientX),clientY:rt(n.pointers[t].clientY)},t++;return{timeStamp:hi(),pointers:i,center:kr(i),deltaX:n.deltaX,deltaY:n.deltaY}}function kr(n){var t=n.length;if(t===1)return{x:rt(n[0].clientX),y:rt(n[0].clientY)};for(var r=0,u=0,i=0;i<t;)r+=n[i].clientX,u+=n[i].clientY,i++;return{x:rt(r/t),y:rt(u/t)}}function dr(n,t,i){return{x:t/n||0,y:i/n||0}}function gr(n,t){return n===t?gt:d(n)>=d(t)?n<0?st:ht:t<0?ct:lt}function ti(n,t,i){i||(i=wr);var r=t[i[0]]-n[i[0]],u=t[i[1]]-n[i[1]];return Math.sqrt(r*r+u*u)}function pi(n,t,i){i||(i=wr);var r=t[i[0]]-n[i[0]],u=t[i[1]]-n[i[1]];return Math.atan2(u,r)*180/Math.PI}function of(n,t){return pi(t[1],t[0],ni)+pi(n[1],n[0],ni)}function sf(n,t){return ti(t[0],t[1],ni)/ti(n[0],n[1],ni)}function ii(){this.evEl=cf;this.evWin=lf;this.pressed=!1;s.apply(this,arguments)}function wi(){this.evEl=nu;this.evWin=tu;s.apply(this,arguments);this.store=this.manager.session.pointerEvents=[]}function iu(){this.evTarget=pf;this.evWin=wf;this.started=!1;s.apply(this,arguments)}function bf(n,t){var i=kt(n.touches),r=kt(n.changedTouches);return t&(u|e)&&(i=lr(i.concat(r),"identifier",!0)),[i,r]}function ri(){this.evTarget=uu;this.targetIds={};s.apply(this,arguments)}function kf(n,t){var r=kt(n.touches),o=this.targetIds;if(t&(f|nt)&&r.length===1)return o[r[0].identifier]=!0,[r,r];var i,s,h=kt(n.changedTouches),c=[],l=this.target;if(s=r.filter(function(n){return cr(n.target,l)}),t===f)for(i=0;i<s.length;)o[s[i].identifier]=!0,i++;for(i=0;i<h.length;)o[h[i].identifier]&&c.push(h[i]),t&(u|e)&&delete o[h[i].identifier],i++;if(c.length)return[lr(s.concat(c),"identifier",!0),c]}function ki(){s.apply(this,arguments);var n=ai(this.handler,this);this.touch=new ri(this.manager,n);this.mouse=new ii(this.manager,n);this.primaryTouch=null;this.lastTouches=[]}function df(n,t){n&f?(this.primaryTouch=t.changedPointers[0].identifier,eu.call(this,t)):n&(u|e)&&eu.call(this,t)}function eu(n){var t=n.changedPointers[0],i,r,u;t.identifier===this.primaryTouch&&(i={x:t.clientX,y:t.clientY},this.lastTouches.push(i),r=this.lastTouches,u=function(){var n=r.indexOf(i);n>-1&&r.splice(n,1)},setTimeout(u,fu))}function gf(n){for(var r=n.srcEvent.clientX,u=n.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var i=this.lastTouches[t],f=Math.abs(r-i.x),e=Math.abs(u-i.y);if(f<=bi&&e<=bi)return!0}return!1}function gi(n,t){this.manager=n;this.set(t)}function ne(n){if(g(n,it))return it;var t=g(n,at),i=g(n,vt);return t&&i?it:t||i?t?at:vt:g(n,di)?di:cu}function te(){if(!su)return!1;var t={},i=n.CSS&&n.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(r){t[r]=i?n.CSS.supports("touch-action",r):!0}),t}function w(n){this.options=y({},this.defaults,n||{});this.id=ku();this.manager=null;this.options.enable=hr(this.options.enable,!0);this.state=fi;this.simultaneous={};this.requireFail=[]}function lu(n){return n&yt?"cancel":n&k?"end":n&et?"move":n&h?"start":""}function au(n){return n==lt?"down":n==ct?"up":n==st?"left":n==ht?"right":""}function ei(n,t){var i=t.manager;return i?i.get(n):n}function c(){w.apply(this,arguments)}function oi(){c.apply(this,arguments);this.pX=null;this.pY=null}function nr(){c.apply(this,arguments)}function tr(){w.apply(this,arguments);this._timer=null;this._input=null}function ir(){c.apply(this,arguments)}function rr(){c.apply(this,arguments)}function si(){w.apply(this,arguments);this.pTime=!1;this.pCenter=!1;this._timer=null;this._input=null;this.count=0}function b(n,t){return t=t||{},t.recognizers=hr(t.recognizers,b.defaults.preset),new fr(n,t)}function fr(n,t){this.options=y({},b.defaults,t||{});this.options.inputTarget=this.options.inputTarget||n;this.handlers={};this.session={};this.recognizers=[];this.oldCssProps={};this.element=n;this.input=tf(this);this.touchAction=new gi(this,this.options.touchAction);yu(this,!0);v(this.options.recognizers,function(n){var t=this.add(new n[0](n[1]));n[2]&&t.recognizeWith(n[2]);n[3]&&t.requireFailure(n[3])},this)}function yu(n,t){var r=n.element,i;r.style&&(v(n.options.cssProps,function(u,f){i=dt(r.style,f);t?(n.oldCssProps[i]=r.style[i],r.style[i]=u):r.style[i]=n.oldCssProps[i]||""}),t||(n.oldCssProps={}))}function ie(n,i){var r=t.createEvent("Event");r.initEvent(n,!0,!0);r.gesture=i;i.target.dispatchEvent(r)}var er=["","webkit","Moz","MS","ms","o"],wu=t.createElement("div"),bu="function",rt=Math.round,d=Math.abs,hi=Date.now,y,li,sr,ar,ru,uu,fu,bi,vu,ur,pu;y=typeof Object.assign!="function"?function(n){var f,i,t,u;if(n===r||n===null)throw new TypeError("Cannot convert undefined or null to object");for(f=Object(n),i=1;i<arguments.length;i++)if(t=arguments[i],t!==r&&t!==null)for(u in t)t.hasOwnProperty(u)&&(f[u]=t[u]);return f}:Object.assign;li=or(function(n,t,i){for(var f=Object.keys(t),u=0;u<f.length;)(!i||i&&n[f[u]]===r)&&(n[f[u]]=t[f[u]]),u++;return n},"extend","Use `assign`.");sr=or(function(n,t){return li(n,t,!0)},"merge","Use `assign`.");ar=1;var yr="ontouchstart"in n,du=dt(n,"PointerEvent")!==r,gu=yr&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),ot="touch",yi="mouse",nf=25,f=1,nt=2,u=4,e=8,gt=1,st=2,ht=4,ct=8,lt=16,l=st|ht,tt=ct|lt,pr=l|tt,wr=["x","y"],ni=["clientX","clientY"];s.prototype={handler:function(){},init:function(){this.evEl&&pt(this.element,this.evEl,this.domHandler);this.evTarget&&pt(this.target,this.evTarget,this.domHandler);this.evWin&&pt(vr(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&wt(this.element,this.evEl,this.domHandler);this.evTarget&&wt(this.target,this.evTarget,this.domHandler);this.evWin&&wt(vr(this.element),this.evWin,this.domHandler)}};var hf={mousedown:f,mousemove:nt,mouseup:u},cf="mousedown",lf="mousemove mouseup";o(ii,s,{handler:function(n){var t=hf[n.type];(t&f&&n.button===0&&(this.pressed=!0),t&nt&&n.which!==1&&(t=u),this.pressed)&&(t&u&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[n],changedPointers:[n],pointerType:yi,srcEvent:n}))}});var af={pointerdown:f,pointermove:nt,pointerup:u,pointercancel:e,pointerout:e},vf={2:ot,3:"pen",4:yi,5:"kinect"},nu="pointerdown",tu="pointermove pointerup pointercancel";n.MSPointerEvent&&!n.PointerEvent&&(nu="MSPointerDown",tu="MSPointerMove MSPointerUp MSPointerCancel");o(wi,s,{handler:function(n){var t=this.store,o=!1,h=n.type.toLowerCase().replace("ms",""),r=af[h],s=vf[n.pointerType]||n.pointerType,c=s==ot,i=ft(t,n.pointerId,"pointerId");(r&f&&(n.button===0||c)?i<0&&(t.push(n),i=t.length-1):r&(u|e)&&(o=!0),i<0)||(t[i]=n,this.callback(this.manager,r,{pointers:t,changedPointers:[n],pointerType:s,srcEvent:n}),o&&t.splice(i,1))}});var yf={touchstart:f,touchmove:nt,touchend:u,touchcancel:e},pf="touchstart",wf="touchstart touchmove touchend touchcancel";o(iu,s,{handler:function(n){var i=yf[n.type],t;(i===f&&(this.started=!0),this.started)&&(t=bf.call(this,n,i),i&(u|e)&&t[0].length-t[1].length==0&&(this.started=!1),this.callback(this.manager,i,{pointers:t[0],changedPointers:t[1],pointerType:ot,srcEvent:n}))}});ru={touchstart:f,touchmove:nt,touchend:u,touchcancel:e};uu="touchstart touchmove touchend touchcancel";o(ri,s,{handler:function(n){var i=ru[n.type],t=kf.call(this,n,i);t&&this.callback(this.manager,i,{pointers:t[0],changedPointers:t[1],pointerType:ot,srcEvent:n})}});fu=2500;bi=25;o(ki,s,{handler:function(n,t,i){var u=i.pointerType==ot,r=i.pointerType==yi;if(!r||!i.sourceCapabilities||!i.sourceCapabilities.firesTouchEvents){if(u)df.call(this,t,i);else if(r&&gf.call(this,i))return;this.callback(n,t,i)}},destroy:function(){this.touch.destroy();this.mouse.destroy()}});var ou=dt(wu.style,"touchAction"),su=ou!==r,hu="compute",cu="auto",di="manipulation",it="none",at="pan-x",vt="pan-y",ui=te();gi.prototype={set:function(n){n==hu&&(n=this.compute());su&&this.manager.element.style&&ui[n]&&(this.manager.element.style[ou]=n);this.actions=n.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var n=[];return v(this.manager.recognizers,function(t){vi(t.options.enable,[t])&&(n=n.concat(t.getTouchAction()))}),ne(n.join(" "))},preventDefaults:function(n){var i=n.srcEvent,r=n.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var t=this.actions,u=g(t,it)&&!ui[it],f=g(t,vt)&&!ui[vt],e=g(t,at)&&!ui[at];if(u){var o=n.pointers.length===1,s=n.distance<2,h=n.deltaTime<250;if(o&&s&&h)return}if(!e||!f)return u||f&&r&l||e&&r&tt?this.preventSrc(i):void 0},preventSrc:function(n){this.manager.session.prevented=!0;n.preventDefault()}};var fi=1,h=2,et=4,k=8,p=k,yt=16,a=32;w.prototype={defaults:{},set:function(n){return y(this.options,n),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(n){if(ut(n,"recognizeWith",this))return this;var t=this.simultaneous;return n=ei(n,this),t[n.id]||(t[n.id]=n,n.recognizeWith(this)),this},dropRecognizeWith:function(n){return ut(n,"dropRecognizeWith",this)?this:(n=ei(n,this),delete this.simultaneous[n.id],this)},requireFailure:function(n){if(ut(n,"requireFailure",this))return this;var t=this.requireFail;return n=ei(n,this),ft(t,n)===-1&&(t.push(n),n.requireFailure(this)),this},dropRequireFailure:function(n){if(ut(n,"dropRequireFailure",this))return this;n=ei(n,this);var t=ft(this.requireFail,n);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(n){return!!this.simultaneous[n.id]},emit:function(n){function r(i){t.manager.emit(i,n)}var t=this,i=this.state;i<k&&r(t.options.event+lu(i));r(t.options.event);n.additionalEvent&&r(n.additionalEvent);i>=k&&r(t.options.event+lu(i))},tryEmit:function(n){if(this.canEmit())return this.emit(n);this.state=a},canEmit:function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(a|fi)))return!1;n++}return!0},recognize:function(n){var t=y({},n);if(!vi(this.options.enable,[this,t])){this.reset();this.state=a;return}this.state&(p|yt|a)&&(this.state=fi);this.state=this.process(t);this.state&(h|et|k|yt)&&this.tryEmit(t)},process:function(){},getTouchAction:function(){},reset:function(){}};o(c,w,{defaults:{pointers:1},attrTest:function(n){var t=this.options.pointers;return t===0||n.pointers.length===t},process:function(n){var t=this.state,i=n.eventType,r=t&(h|et),f=this.attrTest(n);return r&&(i&e||!f)?t|yt:r||f?i&u?t|k:(t&h)?t|et:h:a}});o(oi,c,{defaults:{event:"pan",threshold:10,pointers:1,direction:pr},getTouchAction:function(){var t=this.options.direction,n=[];return t&l&&n.push(vt),t&tt&&n.push(at),n},directionTest:function(n){var i=this.options,r=!0,u=n.distance,t=n.direction,f=n.deltaX,e=n.deltaY;return t&i.direction||(i.direction&l?(t=f===0?gt:f<0?st:ht,r=f!=this.pX,u=Math.abs(n.deltaX)):(t=e===0?gt:e<0?ct:lt,r=e!=this.pY,u=Math.abs(n.deltaY))),n.direction=t,r&&u>i.threshold&&t&i.direction},attrTest:function(n){return c.prototype.attrTest.call(this,n)&&(this.state&h||!(this.state&h)&&this.directionTest(n))},emit:function(n){this.pX=n.deltaX;this.pY=n.deltaY;var t=au(n.direction);t&&(n.additionalEvent=this.options.event+t);this._super.emit.call(this,n)}});o(nr,c,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[it]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&h)},emit:function(n){if(n.scale!==1){var t=n.scale<1?"in":"out";n.additionalEvent=this.options.event+t}this._super.emit.call(this,n)}});o(tr,w,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[cu]},process:function(n){var t=this.options,i=n.pointers.length===t.pointers,r=n.distance<t.threshold,o=n.deltaTime>t.time;if(this._input=n,!r||!i||n.eventType&(u|e)&&!o)this.reset();else if(n.eventType&f)this.reset(),this._timer=ci(function(){this.state=p;this.tryEmit()},t.time,this);else if(n.eventType&u)return p;return a},reset:function(){clearTimeout(this._timer)},emit:function(n){this.state===p&&(n&&n.eventType&u?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=hi(),this.manager.emit(this.options.event,this._input)))}});o(ir,c,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[it]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&h)}});o(rr,c,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:l|tt,pointers:1},getTouchAction:function(){return oi.prototype.getTouchAction.call(this)},attrTest:function(n){var t=this.options.direction,i;return t&(l|tt)?i=n.overallVelocity:t&l?i=n.overallVelocityX:t&tt&&(i=n.overallVelocityY),this._super.attrTest.call(this,n)&&t&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers==this.options.pointers&&d(i)>this.options.velocity&&n.eventType&u},emit:function(n){var t=au(n.offsetDirection);t&&this.manager.emit(this.options.event+t,n);this.manager.emit(this.options.event,n)}});o(si,w,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[di]},process:function(n){var t=this.options,o=n.pointers.length===t.pointers,s=n.distance<t.threshold,c=n.deltaTime<t.time,i,r,e;if(this.reset(),n.eventType&f&&this.count===0)return this.failTimeout();if(s&&c&&o){if(n.eventType!=u)return this.failTimeout();if(i=this.pTime?n.timeStamp-this.pTime<t.interval:!0,r=!this.pCenter||ti(this.pCenter,n.center)<t.posThreshold,this.pTime=n.timeStamp,this.pCenter=n.center,r&&i?this.count+=1:this.count=1,this._input=n,e=this.count%t.taps,e===0)return this.hasRequireFailures()?(this._timer=ci(function(){this.state=p;this.tryEmit()},t.interval,this),h):p}return a},failTimeout:function(){return this._timer=ci(function(){this.state=a},this.options.interval,this),a},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==p&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});b.VERSION="2.0.8";b.defaults={domEvents:!1,touchAction:hu,enable:!0,inputTarget:null,inputClass:null,preset:[[ir,{enable:!1}],[nr,{enable:!1},["rotate"]],[rr,{direction:l}],[oi,{direction:l},["swipe"]],[si],[si,{event:"doubletap",taps:2},["tap"]],[tr]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};vu=1;ur=2;fr.prototype={set:function(n){return y(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},stop:function(n){this.session.stopped=n?ur:vu},recognize:function(n){var r=this.session,i,f,t,u;if(!r.stopped)for(this.touchAction.preventDefaults(n),f=this.recognizers,t=r.curRecognizer,(!t||t&&t.state&p)&&(t=r.curRecognizer=null),u=0;u<f.length;)i=f[u],r.stopped!==ur&&(!t||i==t||i.canRecognizeWith(t))?i.recognize(n):i.reset(),!t&&i.state&(h|et|k)&&(t=r.curRecognizer=i),u++},get:function(n){var i,t;if(n instanceof w)return n;for(i=this.recognizers,t=0;t<i.length;t++)if(i[t].options.event==n)return i[t];return null},add:function(n){if(ut(n,"add",this))return this;var t=this.get(n.options.event);return t&&this.remove(t),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},remove:function(n){if(ut(n,"remove",this))return this;if(n=this.get(n),n){var t=this.recognizers,i=ft(t,n);i!==-1&&(t.splice(i,1),this.touchAction.update())}return this},on:function(n,t){if(n!==r&&t!==r){var i=this.handlers;return v(bt(n),function(n){i[n]=i[n]||[];i[n].push(t)}),this}},off:function(n,t){if(n!==r){var i=this.handlers;return v(bt(n),function(n){t?i[n]&&i[n].splice(ft(i[n],t),1):delete i[n]}),this}},emit:function(n,t){var i,r;if(this.options.domEvents&&ie(n,t),i=this.handlers[n]&&this.handlers[n].slice(),i&&i.length)for(t.type=n,t.preventDefault=function(){t.srcEvent.preventDefault()},r=0;r<i.length;)i[r](t),r++},destroy:function(){this.element&&yu(this,!1);this.handlers={};this.session={};this.input.destroy();this.element=null}};y(b,{INPUT_START:f,INPUT_MOVE:nt,INPUT_END:u,INPUT_CANCEL:e,STATE_POSSIBLE:fi,STATE_BEGAN:h,STATE_CHANGED:et,STATE_ENDED:k,STATE_RECOGNIZED:p,STATE_CANCELLED:yt,STATE_FAILED:a,DIRECTION_NONE:gt,DIRECTION_LEFT:st,DIRECTION_RIGHT:ht,DIRECTION_UP:ct,DIRECTION_DOWN:lt,DIRECTION_HORIZONTAL:l,DIRECTION_VERTICAL:tt,DIRECTION_ALL:pr,Manager:fr,Input:s,TouchAction:gi,TouchInput:ri,MouseInput:ii,PointerEventInput:wi,TouchMouseInput:ki,SingleTouchInput:iu,Recognizer:w,AttrRecognizer:c,Tap:si,Pan:oi,Swipe:rr,Pinch:nr,Rotate:ir,Press:tr,on:pt,off:wt,each:v,merge:sr,extend:li,assign:y,inherit:o,bindFn:ai,prefixed:dt});pu=typeof n!="undefined"?n:typeof self!="undefined"?self:{};pu.Hammer=b;typeof define=="function"&&define.amd?define(function(){return b}):typeof module!="undefined"&&module.exports?module.exports=b:n[i]=b}(window,document,"Hammer");!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n.Vimeo=n.Vimeo||{},n.Vimeo.Player=t())}(this,function(){"use strict";function h(n,t){return 0===n.indexOf(t.toLowerCase())?n:""+t.toLowerCase()+n.substr(0,1).toUpperCase()+n.substr(1)}function k(n){return n instanceof window.HTMLElement}function d(n){return!isNaN(parseFloat(n))&&isFinite(n)&&Math.floor(n)==n}function i(n){return/^(https?:)?\/\/((player|www).)?vimeo.com(?=$|\/)/.test(n)}function c(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.id,u=r.url,n=t||u;if(!n)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(d(n))return"https://vimeo.com/"+n;if(i(n))return n.replace("http:","https:");if(t)throw new TypeError("“"+t+"” is not a valid video id.");throw new TypeError("“"+n+"” is not a vimeo.com url.");}function l(n,t){return t={exports:{}},n(t,t.exports),t.exports}function r(t,i,r){var u=n.get(t.element)||{};i in u||(u[i]=[]);u[i].push(r);n.set(t.element,u)}function u(t,i){return(n.get(t.element)||{})[i]||[]}function o(t,i,r){var u=n.get(t.element)||{},f;return u[i]?r?(f=u[i].indexOf(r),-1!==f&&u[i].splice(f,1),n.set(t.element,u),u[i]&&0===u[i].length):(u[i]=[],n.set(t.element,u),!0):!0}function g(n,t){var r=u(n,t),i;return r.length<1?!1:(i=r.shift(),o(n,t,i),i)}function nt(t,i){var r=n.get(t);n.set(i,r);n.delete(t)}function a(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ft.reduce(function(t,i){var r=n.getAttribute("data-vimeo-"+i);return(r||""===r)&&(t[i]=""===r?1:r),t},t)}function v(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(r,u){var o,e,f;if(!i(n))throw new TypeError("“"+n+"” is not a vimeo.com url.");o="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(n);for(e in t)t.hasOwnProperty(e)&&(o+="&"+e+"="+encodeURIComponent(t[e]));f="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;f.open("GET",o,!0);f.onload=function(){if(404===f.status)return void u(new Error("“"+n+"” was not found."));if(403===f.status)return void u(new Error("“"+n+"” is not embeddable."));try{var t=JSON.parse(f.responseText);r(t)}catch(n){u(n)}};f.onerror=function(){var n=f.status?" ("+f.status+")":"";u(new Error("There was an error fetching the embed code from Vimeo"+n+"."))};f.send()})}function y(n,t){var r=n.html,i;if(!t)throw new TypeError("An element must be provided");return null!==t.getAttribute("data-vimeo-initialized")?t.querySelector("iframe"):(i=document.createElement("div"),i.innerHTML=r,t.appendChild(i.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe"))}function p(n){return"string"==typeof n&&(n=JSON.parse(n)),n}function f(n,t,i){var r,u;n.element.contentWindow&&n.element.contentWindow.postMessage&&(r={method:t},void 0!==i&&(r.value=i),u=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1")),u>=8&&u<10&&(r=JSON.stringify(r)),n.element.contentWindow.postMessage(r,n.origin))}function tt(n,t){var r,i,f;t=p(t);r=[];i=void 0;t.event?("error"===t.event&&u(n,t.data.method).forEach(function(i){var r=new Error(t.data.message);r.name=t.data.name;i.reject(r);o(n,t.data.method,i)}),r=u(n,"event:"+t.event),i=t.data):t.method&&(f=g(n,t.method),f&&(r.push(f),i=t.value));r.forEach(function(t){try{if("function"==typeof t)return void t.call(n,i);t.resolve(i)}catch(n){}})}function it(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var w="undefined"!=typeof global&&"[object global]"==={}.toString.call(global),rt=void 0!==Array.prototype.indexOf,ut="undefined"!=typeof window&&void 0!==window.postMessage;if(!(w||rt&&ut))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var s="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(l(function(){!function(n){function i(n,t){function i(n){if(!this||this.constructor!==i)return new i(n);this._keys=[];this._values=[];this._itp=[];this.objectOnly=t;n&&y.call(this,n)}return t||d(n,"size",{get:k}),n.constructor=i,i.prototype=n,i}function y(n){this.add?n.forEach(this.add,this):n.forEach(function(n){this.set(n[0],n[1])},this)}function r(n){return this.has(n)&&(this._keys.splice(t,1),this._values.splice(t,1),this._itp.forEach(function(n){t<n[0]&&n[0]--})),-1<t}function o(n){if(this.has(n))return this._values[t]}function s(n,i){if(this.objectOnly&&i!==Object(i))throw new TypeError("Invalid value used as weak collection key");if(i!=i||0===i)for(t=n.length;t--&&!g(n[t],i););else t=n.indexOf(i);return-1<t}function h(n){return s.call(this,this._values,n)}function c(n){return s.call(this,this._keys,n)}function l(n,i){return this.has(n)?this._values[t]=i:this._values[this._keys.push(n)-1]=i,this}function a(n){return this.has(n)||this._values.push(n),this}function u(){(this._keys||0).length=this._values.length=0}function p(){return f(this._itp,this._keys)}function e(){return f(this._itp,this._values)}function w(){return f(this._itp,this._keys,this._values)}function b(){return f(this._itp,this._values,this._values)}function f(n,t,i){var r=[0],u=!1;return n.push(r),{next:function(){var e,f=r[0];return!u&&f<t.length?(e=i?[t[f],i[f]]:t[f],r[0]++):(u=!0,n.splice(n.indexOf(r),1)),{done:u,value:e}}}}function k(){return this._values.length}function v(n,t){for(var i,r=this.entries();;){if(i=r.next(),i.done)break;n.call(t,i.value[1],i.value[0],this)}}var t,d=Object.defineProperty,g=function(n,t){return n===t||n!==n&&t!==t};"undefined"==typeof WeakMap&&(n.WeakMap=i({"delete":r,clear:u,get:o,has:c,set:l},!0));"undefined"!=typeof Map&&"function"==typeof(new Map).values&&(new Map).values().next||(n.Map=i({"delete":r,has:c,get:o,set:l,keys:p,values:e,entries:w,forEach:v,clear:u}));"undefined"!=typeof Set&&"function"==typeof(new Set).values&&(new Set).values().next||(n.Set=i({has:h,add:a,"delete":r,clear:u,keys:e,values:e,entries:b,forEach:v}));"undefined"==typeof WeakSet&&(n.WeakSet=i({"delete":r,add:a,clear:u,has:h},!0))}(void 0!==s?s:window)}),l(function(n){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};!function(t,i,r){i[t]=i[t]||r();n.exports&&(n.exports=i[t])}("Promise",s,function(){function r(n,t){o.add(n,t);e||(e=w(o.drain))}function h(n){var i,r=void 0===n?"undefined":t(n);return null==n||"object"!=r&&"function"!=r||(i=n.then),"function"==typeof i&&i}function f(){for(var n=0;n<this.chain.length;n++)y(this,1===this.state?this.chain[n].success:this.chain[n].failure,this.chain[n]);this.chain.length=0}function y(n,t,i){var r,u;try{!1===t?i.reject(n.msg):(r=!0===t?n.msg:t.call(void 0,n.msg),r===i.promise?i.reject(TypeError("Promise-chain cycle")):(u=h(r))?u.call(r,i.resolve,i.reject):i.resolve(r))}catch(n){i.reject(n)}}function c(n){var i,t=this;if(!t.triggered){t.triggered=!0;t.def&&(t=t.def);try{(i=h(n))?r(function(){var r=new a(t);try{i.call(n,function(){c.apply(r,arguments)},function(){u.apply(r,arguments)})}catch(n){u.call(r,n)}}):(t.msg=n,t.state=1,t.chain.length>0&&r(f,t))}catch(r){u.call(new a(t),r)}}}function u(n){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=n,t.state=2,t.chain.length>0&&r(f,t))}function l(n,t,i,r){for(var u=0;u<t.length;u++)!function(u){n.resolve(t[u]).then(function(n){i(u,n)},r)}(u)}function a(n){this.def=n;this.triggered=!1}function p(n){this.promise=n;this.state=0;this.triggered=!1;this.chain=[];this.msg=void 0}function i(n){if("function"!=typeof n)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new p(this);this.then=function(n,i){var u={success:"function"!=typeof n||n,failure:"function"==typeof i&&i};return u.promise=new this.constructor(function(n,t){if("function"!=typeof n||"function"!=typeof t)throw TypeError("Not a function");u.resolve=n;u.reject=t}),t.chain.push(u),0!==t.state&&r(f,t),u.promise};this.catch=function(n){return this.then(void 0,n)};try{n.call(void 0,function(n){c.call(t,n)},function(n){u.call(t,n)})}catch(r){u.call(t,r)}}var n,e,o,v=Object.prototype.toString,w="undefined"!=typeof setImmediate?function(n){return setImmediate(n)}:setTimeout,s;try{Object.defineProperty({},"x",{});n=function(n,t,i,r){return Object.defineProperty(n,t,{value:i,writable:!0,configurable:!1!==r})}}catch(r){n=function(n,t,i){return n[t]=i,n}}return o=function(){function r(n,t){this.fn=n;this.self=t;this.next=void 0}var i,t,n;return{add:function(u,f){n=new r(u,f);t?t.next=n:i=n;t=n;n=void 0},drain:function(){var n=i;for(i=t=e=void 0;n;)n.fn.call(n.self),n=n.next}}}(),s=n({},"constructor",i,!1),i.prototype=s,n(s,"__NPO__",0,!1),n(i,"resolve",function(n){var i=this;return n&&"object"==(void 0===n?"undefined":t(n))&&1===n.__NPO__?n:new i(function(t,i){if("function"!=typeof t||"function"!=typeof i)throw TypeError("Not a function");t(n)})}),n(i,"reject",function(n){return new this(function(t,i){if("function"!=typeof t||"function"!=typeof i)throw TypeError("Not a function");i(n)})}),n(i,"all",function(n){var t=this;return"[object Array]"!=v.call(n)?t.reject(TypeError("Not an array")):0===n.length?t.resolve([]):new t(function(i,r){if("function"!=typeof i||"function"!=typeof r)throw TypeError("Not a function");var u=n.length,f=Array(u),e=0;l(t,n,function(n,t){f[n]=t;++e===u&&i(f)},r)})}),n(i,"race",function(n){var t=this;return"[object Array]"!=v.call(n)?t.reject(TypeError("Not an array")):new t(function(i,r){if("function"!=typeof i||"function"!=typeof r)throw TypeError("Not a function");l(t,n,function(n,t){i(t)},r)})}),i})})),n=new WeakMap,ft=["id","url","width","maxwidth","height","maxheight","portrait","title","byline","color","autoplay","autopause","loop","responsive","speed","background","transparent"],et=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),e=new WeakMap,b=new WeakMap,ot=function(){function n(r){var u=this,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o,s;if(it(this,n),window.jQuery&&r instanceof jQuery&&(r.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),r=r[0]),"string"==typeof r&&(r=document.getElementById(r)),!k(r))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==r.nodeName&&(o=r.querySelector("iframe"),o&&(r=o)),"IFRAME"===r.nodeName&&!i(r.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");return e.has(r)?e.get(r):(this.element=r,this.origin="*",s=new t(function(n,t){var o=function(t){if(i(t.origin)&&u.element.contentWindow===t.source){"*"===u.origin&&(u.origin=t.origin);var r=p(t.data),f="event"in r&&"ready"===r.event,e="method"in r&&"ping"===r.method;if(f||e)return u.element.setAttribute("data-ready","true"),void n();tt(u,r)}},f;(window.addEventListener?window.addEventListener("message",o,!1):window.attachEvent&&window.attachEvent("onmessage",o),"IFRAME"!==u.element.nodeName)&&(f=a(r,h),v(c(f),f).then(function(n){var t=y(n,r);return u.element=t,nt(r,t),e.set(u.element,u),n}).catch(function(n){return t(n)}))}),b.set(this,s),e.set(this.element,this),"IFRAME"===this.element.nodeName&&f(this,"ping"),this)}return et(n,[{key:"callMethod",value:function(n){var i=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new t(function(t,e){return i.ready().then(function(){r(i,n,{resolve:t,reject:e});f(i,n,u)})})}},{key:"get",value:function(n){var i=this;return new t(function(t,u){return n=h(n,"get"),i.ready().then(function(){r(i,n,{resolve:t,reject:u});f(i,n)})})}},{key:"set",value:function(n,i){var u=this;return t.resolve(i).then(function(i){if(n=h(n,"set"),void 0===i||null===i)throw new TypeError("There must be a value to set.");return u.ready().then(function(){return new t(function(t,e){r(u,n,{resolve:t,reject:e});f(u,n,i)})})})}},{key:"on",value:function(n,t){if(!n)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===u(this,"event:"+n).length&&this.callMethod("addEventListener",n).catch(function(){});r(this,"event:"+n,t)}},{key:"off",value:function(n,t){if(!n)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");o(this,"event:"+n,t)&&this.callMethod("removeEventListener",n).catch(function(){})}},{key:"loadVideo",value:function(n){return this.callMethod("loadVideo",n)}},{key:"ready",value:function(){var n=b.get(this);return t.resolve(n)}},{key:"addCuePoint",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:n,data:t})}},{key:"removeCuePoint",value:function(n){return this.callMethod("removeCuePoint",n)}},{key:"enableTextTrack",value:function(n,t){if(!n)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:n,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(n){return this.set("autopause",n)}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(n){return this.set("color",n)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(n){return this.set("currentTime",n)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(n){return this.set("loop",n)}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(n){return this.set("playbackRate",n)}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(n){return this.set("volume",n)}}]),n}();return w||(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,i=[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(n){"console"in window&&console.error&&console.error("There was an error creating an embed: "+n)};i.forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var i=a(t);v(c(i),i).then(function(n){return y(n,t)}).catch(n)}catch(t){n(t)}})}(),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=function(n){var u,r,f;if(i(n.origin)&&n.data&&"spacechange"===n.data.event)for(u=t.querySelectorAll("iframe"),r=0;r<u.length;r++)if(u[r].contentWindow===n.source){f=u[r].parentElement;f&&-1!==f.className.indexOf("vimeo-space")&&(f.style.paddingBottom=n.data.data[0].bottom+"px");break}};window.addEventListener?window.addEventListener("message",n,!1):window.attachEvent&&window.attachEvent("onmessage",n)}()),ot})