(window.blocksyJsonP=window.blocksyJsonP||[]).push([[10],{37:function(e,t,n){"use strict";n.r(t),n.d(t,"rel",(function(){return b})),n.d(t,"mount",(function(){return g}));var i=n(3);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=5?5:r,a&&d){var b=0;b=r>0?l(.5,r):l(window.innerHeight/(a.clientHeight+window.innerHeight),r)-l(.5,r),b=2*Math.abs(b),n.parentNode.style.height=c?"calc(100% + ".concat(b,"px)"):"100%"}var g=f(a||n),v=g.top,O=g.height;return{parallaxBehavior:h,shouldSetHeightToIncrease:d,fitInsideContainer:a,el:n,top:pageYOffset+v,height:O,speed:r,isVisible:c}};function u(e){var t=e.getBoundingClientRect();return t.bottom>-450&&t.top-450<(window.innerHeight||document.documentElement.clientHeight)}function f(e){if(!e)return null;var t=e.getBoundingClientRect(),n=t.top,i=t.left,r=t.right,o=t.width,a=t.height,s=window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map((function(e){return parseFloat(e)}));if(6!=s.length)return e.getBoundingClientRect();var l=s,c=l[0]*l[3]-l[1]*l[2];return{width:o/l[0],height:a/l[3],left:(i*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/c,right:(r*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/c,top:(-i*l[1]+n*l[0]+l[4]*l[1]-l[0]*l[5])/c}}var d=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.blocks=[],this.oldPosY=!1,this.intersectionObserver=new IntersectionObserver((function(e){e.map((function(e){var n=e.target,r=e.isIntersecting;e.intersectionRatio;t.blocks.filter((function(e){var t=e.fitInsideContainer,i=e.el;return i.closest("svg")?i.closest("svg")===n:t===n||i===n})).map((function(e){e.isVisible=r&&e.parallaxBehavior.indexOf(Object(i.a)({withTablet:!0}))>-1,t.blocks=t.blocks.map((function(t){return t.el===e.el?e:t})),e.isVisible||e.el.removeAttribute("style")}))}))}),{rootMargin:"450px"}),window.addEventListener("resize",(function(){t.oldPosY=!1,t.blocks=t.blocks.map((function(e){return c(o(o({},e),{},{isVisible:u(e.fitInsideContainer?e.fitInsideContainer:e.el)&&e.parallaxBehavior.indexOf(Object(i.a)({withTablet:!0}))>-1}))})),t.animate()})),this.update(),this.animate()}var t,n,r;return t=e,(n=[{key:"removeEl",value:function(e){var t=e.el;t.removeAttribute("style"),this.blocks=this.blocks.filter((function(e){return e.el!==t}))}},{key:"addEl",value:function(e){var t=e.el,n=e.speed,r=e.fitInsideContainer,o=void 0===r?null:r,a=e.shouldSetHeightToIncrease,s=void 0===a||a,l=e.parallaxBehavior,f=void 0===l?"desktop:tablet:mobile":l;o?this.intersectionObserver.observe(o):this.intersectionObserver.observe(t.closest("svg")?t.closest("svg"):t),this.blocks.push(c({el:t,speed:n,fitInsideContainer:o,isVisible:u(o||t)&&f.indexOf(Object(i.a)({withTablet:!0}))>-1,shouldSetHeightToIncrease:s,parallaxBehavior:f}))}},{key:"update",value:function(){this.oldPosY||0===this.oldPosY||this.animate(),this.setPosition()&&this.animate(),requestAnimationFrame(this.update.bind(this))}},{key:"setPosition",value:function(){if(0===this.blocks.length)return!1;var e=this.oldPosY;return this.oldPosY=pageYOffset,e!=pageYOffset}},{key:"animate",value:function(){this.blocks.map((function(e){if(e.isVisible){var t=(pageYOffset-e.top+window.innerHeight)/(e.height+window.innerHeight),n=f(e.fitInsideContainer?e.fitInsideContainer:e.el),i=n.top,r=n.height;r||(r=(e.fitInsideContainer?e.fitInsideContainer:e.el).getBoundingClientRect().height);var o=1-(i+(e.el.dataset.percentage&&0===parseInt(e.el.dataset.percentage,10)?0:r/2))/innerHeight,a=l(e.fitInsideContainer?t:o,e.speed)-l(e.el.dataset.percentage?parseInt(e.el.dataset.percentage,10):.5,e.speed);e.el.style.transform="translate3d(0, ".concat(a,"px, 0)")}else e.el.removeAttribute("style")}))}}])&&s(t.prototype,n),r&&s(t,r),e}();n(2);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=new d,g=function(e){e.ctHasParallax&&e.querySelector("figure .ct-image-container > img")&&b.removeEl({el:e.querySelector("figure .ct-image-container > img")}),!e.matches("[data-parallax]")||e.dataset.parallax?(e.ctHasParallax=!0,e.querySelector("figure .ct-image-container > img")?setTimeout((function(){b.addEl(function(e){for(var t=1;t img"),speed:-5,fitInsideContainer:e},e.dataset.parallax?{parallaxBehavior:e.dataset.parallax}:{}))}),0):b.addEl({el:e,speed:+e.dataset.parallax,shouldSetHeightToIncrease:!1})):e.removeAttribute("data-parallax")}}}]);