(window.blocksyJsonP=window.blocksyJsonP||[]).push([[5],{36:function(t,e,i){"use strict";i.r(e),i.d(e,"mount",(function(){return b}));var n=i(1),s=i.n(n);function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e"vertical"===e.options.orientation?t.top+t.height:t.right,d=(t,e)=>"vertical"===e.options.orientation?t.top:t.left,p=(t,e)=>"vertical"===e.options.orientation?t.height:t.width;function u(t,e=null){if(!t)return null;if(t.getBoundingClientRect&&!t.firstElementChild)return t.getBoundingClientRect();e||(e=t);let{top:i,left:n,right:s,width:r,height:o}=t.getBoundingClientRect(),l=window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map(t=>parseFloat(t));if(6!=l.length)return t.getBoundingClientRect();var a=l;let h=a[0]*a[3]-a[1]*a[2];return{width:r/a[0],height:o/a[3],left:(n*a[3]-i*a[2]+a[2]*a[5]-a[4]*a[3])/h,right:(s*a[3]-i*a[2]+a[2]*a[5]-a[4]*a[3])/h,top:(-n*a[1]+i*a[0]+a[4]*a[1]-a[0]*a[5])/h}}const f=(t,e)=>{let i=[...t.sliderContainer.children].indexOf([...t.sliderContainer.children].reduce((e,i)=>{let n=d(u(e,t.options.nullifyTransformEl),t),s=d(u(i,t.options.nullifyTransformEl),t);return Math.abs(s-d(u(t.sliderContainer,t.options.nullifyTransformEl),t))({left:1e11,top:1e11})})),n=e(i);n<0&&(n=t.sliderContainer.children.length-1),n>t.sliderContainer.children.length-1&&(n=0);let s=Math.abs(n-i),r=Math.min(i,n)+(t.sliderContainer.children.length-Math.max(i,n)),l=Math.min(s,r)*(r>s?i>n?1:-1:i>n?-1:1),a=100*Math.round(100*t.state.positionX/p(u(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100)*p(u(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100+p(u(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)*l;t.state=o(o({},t.state),{},{positionTarget:a})},c=t=>{if(!t.options.adjustHeight)return;let e=t.sliderContainer.children[t.state.previousCurrentIndex];t.sliderContainer.style.setProperty("--sliderHeight",(e.firstElementChild||e).getBoundingClientRect().height+"px")};class m{constructor(t,e={}){var i;a(this,"getDefaultState",()=>({elementsOnBehind:1,positionSnapshot:0,positionX:0,positionTarget:0,velocity:0,containerInnerWidth:this.sliderContainer?p(u(this.sliderContainer,this.nullifyTransformEl),this):0,slideWidth:this.sliderContainer?p(u(this.sliderContainer.firstElementChild,this.sliderContainer),this):0,previousCurrentIndex:0,startX:0,endX:0,mouseDown:!1,lastTimeAnimated:1/0})),a(this,"state",this.getDefaultState()),a(this,"options",{onDragStart:()=>{},autoplay:!1,scaleRotateEffect:!1,pillsContainerSelector:null,pillsFlexyInstance:null,flexyAttributeEl:null,adjustHeight:!1,wrapAroundMode:"container",orientation:"horizontal",nullifyTransformEl:null,elementsThatDoNotStartDrag:[],hasDragAndDrop:!0}),a(this,"sliderContainer",null),a(this,"drawLoop",(t=!1)=>{let e=t?1/0:this.state.positionX;if("__DESTROYED__"!==this.state.sliderActivated){if(this.state.containerInnerWidth!==u(this.sliderContainer,this.nullifyTransformEl).width&&this.refreshActivation(),this.state=o(o(o(o({},this.state),this.state.sliderActivated?((t,e)=>e(this.state.velocity+(this.state.mouseDown?this.state.positionSnapshot+(this.state.endX-this.state.startX)-this.state.positionX-this.state.velocity:(this.state.positionTarget-this.state.positionX)*.02)))(0,t=>({velocity:.72*t,positionX:this.state.positionX+t})):{}),this.state.sliderActivated&&Math.abs(this.state.containerInnerWidth-p(u(this.sliderContainer,this.nullifyTransformEl),this))>1?{positionX:Math.round(p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)*(100*Math.round(this.state.positionX/this.state.slideWidth))/100),positionTarget:Math.round(p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)*(100*Math.round(this.state.positionX/this.state.slideWidth))/100)}:{}),{},{scrollPosition:{x:window.pageXOffset,y:window.pageYOffset},containerInnerWidth:p(u(this.sliderContainer,this.nullifyTransformEl),this),slideWidth:p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)}),(e!==this.state.positionX||Math.abs(this.state.positionX-this.state.positionTarget)>.1)&&!t&&this.state.sliderActivated){let{relativeDelta:t,elementsOnBehind:e}=((t,e,i="left",n="container")=>{const s=t.sliderContainer;let r=0;if("left"===i){let i=[...s.children].reduce((e,i)=>{let n=d(u(e,t.options.nullifyTransformEl),t);return d(u(i,t.options.nullifyTransformEl),t)({left:1e11,bottom:1e11,top:1e11,right:1e11})});d(u(i,t.options.nullifyTransformEl),t)>("container"===n?d(u(s,t.options.nullifyTransformEl),t):0)&&(r=-1*p(u(s.firstElementChild,t.options.nullifyTransformEl),t),e=e===s.children.length?1:e+1)}if("right"===i){let i=[...s.children].reduce((e,i)=>h(u(e,t.options.nullifyTransformEl),t)>h(u(i,t.options.nullifyTransformEl),t)?e:i,{getBoundingClientRect:()=>({left:-1,bottom:-9999999999999,top:-1,right:-1})});h(u(i,t.options.nullifyTransformEl),t)<("container"===n?h(u(s,t.options.nullifyTransformEl),t):window.innerWidth)&&(r=p(u(s.firstElementChild,t.options.nullifyTransformEl),t),e=1===e?s.children.length:e-1)}return{relativeDelta:r,elementsOnBehind:e}})(this,this.state.elementsOnBehind,this.state.mouseDown?this.state.endX<=this.state.startX?"right":"left":this.state.positionX>=this.state.positionTarget?"right":"left",this.options.wrapAroundMode);this.state=o(o({},this.state),{},{elementsOnBehind:e,positionTarget:this.state.positionTarget+t,positionX:this.state.positionX+t,positionSnapshot:this.state.positionSnapshot+t})}if(this.options.autoplay&&this.state.sliderActivated&&Math.abs(this.state.positionX-this.state.positionTarget)<.5&&(new Date).getTime()/1e3-this.state.lastTimeAnimated/1e3>(parseFloat(this.options.autoplay,10)?parseFloat(this.options.autoplay,10):3)&&(this.state=o(o({},this.state),{},{positionTarget:this.state.positionX-p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)})),!this.state.mouseDown&&this.state.sliderActivated){Math.abs(this.state.positionX-this.state.positionTarget)<.2&&(this.state=o(o({},this.state),{},{positionX:this.state.positionTarget,velocity:0}));let t=this.state.previousCurrentIndex;this.state=o(o({},this.state),{},{previousCurrentIndex:(i=this.state.elementsOnBehind>Math.round(Math.abs(this.state.positionTarget)/p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this))?Math.round(Math.abs(this.state.positionTarget)/p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this))+(this.sliderContainer.children.length-this.state.elementsOnBehind):Math.abs(Math.round(Math.abs(this.state.positionTarget)/p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this))-this.state.elementsOnBehind),n=0,s=this.sliderContainer.children.length-1,Math.min(Math.max(i,n),s))}),t!==this.state.previousCurrentIndex&&((t=>{if(t.options.pillsContainerSelector&&(t.options.pillsContainerSelector.querySelector(".active")&&t.options.pillsContainerSelector.querySelector(".active").classList.remove("active"),t.options.pillsContainerSelector.children[t.state.previousCurrentIndex].classList.add("active"),t.options.pillsFlexyInstance)){let e=t.options.pillsFlexyInstance.flexy,i=[...t.options.pillsContainerSelector.children],n=[...e.sliderContainer.children].indexOf([...e.sliderContainer.children].reduce((t,i)=>{let n=d(u(t,e.options.nullifyTransformEl),e),s=d(u(i,e.options.nullifyTransformEl),e);return Math.abs(s-d(u(e.sliderContainer,e.options.nullifyTransformEl),e))({left:1e11,top:1e11})})),s=0;if("horizontal"===e.options.orientation){let n=Math.round(u(e.sliderContainer).width/u(e.sliderContainer.firstElementChild).width);s=t.state.previousCurrentIndex,5===n&&(t.state.previousCurrentIndex>2&&(s=t.state.previousCurrentIndex-2),i.length-1-t.state.previousCurrentIndex<3&&(s=i.length-5)),3===n&&(t.state.previousCurrentIndex>=1&&(s=t.state.previousCurrentIndex-1),i.length-1-t.state.previousCurrentIndex<1&&(s=i.length-3))}else s=t.state.previousCurrentIndex;let r=Math.abs(s-n),l=Math.min(n,s)+(i.length-Math.max(n,s)),a=Math.min(r,l)*(l>=r?n>s?1:-1:n>s?-1:1),h=100*Math.round(100*e.state.positionX/p(u(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)/100)*p(u(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)/100+p(u(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)*a;e.state=o(o({},e.state),{},{positionTarget:h})}})(this),c(this))}var i,n,s;this.state.positionX!==e&&this.state.sliderActivated&&(this.render(),this.state=o(o({},this.state),{},{lastTimeAnimated:(new Date).getTime()})),requestAnimationFrame(()=>this.drawLoop())}}),this.options=o(o({},this.options),{},{flexyAttributeEl:t,nullifyTransformEl:t},e),this.sliderContainer=t,(t=>{if(!t.options.pillsContainerSelector)return;let e=[...t.options.pillsContainerSelector.children];e.map(i=>i.addEventListener("click",n=>{n.preventDefault();let s=[...t.sliderContainer.children].indexOf([...t.sliderContainer.children].reduce((e,i)=>{let n=d(u(e,t.options.nullifyTransformEl),t),s=d(u(i,t.options.nullifyTransformEl),t);return Math.abs(s-d(u(t.sliderContainer,t.options.nullifyTransformEl),t))({left:1e11})})),r=e.indexOf(i);t.options.pillsContainerSelector.querySelector(".active")&&t.options.pillsContainerSelector.querySelector(".active").classList.remove("active"),i.classList.add("active");let l=Math.abs(r-s),a=Math.min(s,r)+(e.length-Math.max(s,r)),h=Math.min(l,a)*(a>=l?s>r?1:-1:s>r?-1:1),f=100*Math.round(100*t.state.positionX/p(u(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100)*p(u(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100+p(u(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)*h;t.state=o(o({},t.state),{},{positionTarget:f})}))})(this),(i=this).options.leftArrow&&i.options.leftArrow.addEventListener("click",t=>{t.preventDefault(),f(i,t=>t-1)}),i.options.rightArrow&&i.options.rightArrow.addEventListener("click",t=>{t.preventDefault(),f(i,t=>t+1)}),(t=>{const e=t.sliderContainer;t.options.autoplay&&(e.addEventListener("mouseenter",()=>t.options=o(o({},t.options),{},{autoplay:!1,_autoplay:t.options.autoplay})),e.addEventListener("mouseleave",()=>{t.options=o(o({},t.options),{},{autoplay:t.options._autoplay,_autoplay:!1}),t.state=o(o({},t.state),{},{lastTimeAnimated:(new Date).getTime()})}))})(this),((t,e,i)=>{if(!t.options.hasDragAndDrop)return;const n=t.sliderContainer,s=s=>{if(!e().sliderActivated)return;if(t.options.elementsThatDoNotStartDrag.reduce((t,e)=>!!t||(s.target.matches(e)||s.target.closest(e)),!1))return;s.stopPropagation(),"touchstart"!==s.type&&s.preventDefault(),t.options.onDragStart(s),i(o(o({},e()),{},{startX:s.pageX||s.touches[0].pageX,endX:s.pageX||s.touches[0].pageX,mouseDown:!0,downScrollPosition:{x:window.pageXOffset,y:window.pageYOffset},positionSnapshot:e().positionX}));const r=s=>{if(!e().mouseDown)return;s.stopPropagation(),i(o(o({},e()),{},{mouseDown:!1})),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",l),document.removeEventListener("touchend",r);let a=e(),h=100*a.positionX/u(n.firstElementChild,t.options.nullifyTransformEl).width;i(o(o({},e()),{},{positionTarget:u(n.firstElementChild,t.options.nullifyTransformEl).width*(Math.abs(a.endX-a.startX)>50?a.endX-a.startX<0?100*Math.floor(h/100):100*Math.ceil(h/100):100*Math.round(h/100))/100}))},l=t=>{let{pageX:n}=t;if(n||(n=t.touches[0].pageX),!e().mouseDown)return;let s=e();i(o(o({},s),{},{endX:n})),(Math.abs(s.downScrollPosition.x-s.scrollPosition.x)>3||Math.abs(s.downScrollPosition.y-s.scrollPosition.y)>5)&&r(t)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",r),document.addEventListener("touchmove",l),document.addEventListener("touchend",r)};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s)})(this,()=>this.state,t=>this.state=t),[...this.sliderContainer.children].map(t=>t.addEventListener("click",t=>Math.abs(this.state.startX-this.state.endX)>3&&t.preventDefault())),this.state=o(o({},this.state),{},{elementsOnBehind:1,positionX:-1*p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this),positionTarget:-1*p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this),containerInnerWidth:p(u(this.sliderContainer,this.nullifyTransformEl),this),slideWidth:p(u(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)}),this.refreshActivation(),requestAnimationFrame(()=>this.drawLoop(!0)),c(this)}destroy(){this.state=o(o({},this.state),{},{sliderActivated:"__DESTROYED__"})}refreshActivation(){let t=p(u(this.sliderContainer.children[0],this.options.nullifyTransformEl)||{width:0,height:0},this)*this.sliderContainer.children.length;this.state=o(o({},this.state),{},{sliderActivated:!!this.sliderContainer&&(-1===getComputedStyle(this.sliderContainer,":after").content.indexOf("no-flexy")&&t>p(u(this.sliderContainer,this.options.nullifyTransformEl),this)+10)}),this.state.sliderActivated?this.options.flexyAttributeEl.dataset.flexy="":(this.options.flexyAttributeEl.removeAttribute("data-flexy"),[...this.sliderContainer.children].map(t=>t.removeAttribute("style")))}render(){[...this.sliderContainer.children].map(t=>{"vertical"===this.options.orientation?t.style.transform=`translate3d(0, ${this.state.positionX}px, 0)`:t.style.transform=`translate3d(${this.state.positionX}px, 0, 0)`}),this.state.mouseDown?this.options.flexyAttributeEl.dataset.flexyDragging="":this.options.flexyAttributeEl.removeAttribute("data-flexy-dragging"),this.state.elementsOnBehind>0?([...this.sliderContainer.children].slice(0,-1*this.state.elementsOnBehind).map(t=>t.style.order=2),[...this.sliderContainer.children].slice(-1*this.state.elementsOnBehind).map(t=>t.style.order=1)):[...this.sliderContainer.children].map(t=>t.style.order=1)}}var y=i(5),g=i(0),C=i.n(g),E=i(3);function v(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function w(t){for(var e=1;e{if(t.flexy)return;Object(y.a)(t.querySelector(".flexy-items")),Object(y.a)(t.querySelector(".flexy-pills"));let e=t.querySelector(".flexy-pills [data-flexy]");const i=new m(t.querySelector(".flexy-items"),w({flexyAttributeEl:t,elementsThatDoNotStartDrag:[".twentytwenty-handle"],adjustHeight:!!t.querySelector(".flexy-items").dataset.height,autoplay:!!(Object.keys(t.dataset).indexOf("autoplay")>-1&&parseInt(t.dataset.autoplay,10))&&t.dataset.autoplay,pillsContainerSelector:t.querySelector(".flexy-pills").firstElementChild,leftArrow:t.querySelector(".flexy .flexy-arrow-prev"),rightArrow:t.querySelector(".flexy .flexy-arrow-next"),scaleRotateEffect:!1,onDragStart:t=>{Array.from(t.target.closest(".flexy-items").querySelectorAll(".zoomImg")).map(t=>{s()(t).stop().fadeTo(120,0)})},wrapAroundMode:"viewport"===t.dataset.wrap?"viewport":"container"},e?{pillsFlexyInstance:e}:{}));if(e){const t=new m(e,w({elementsThatDoNotStartDrag:[".twentytwenty-handle"],wrapAroundMode:"viewport"===e.dataset.wrap?"viewport":"container",leftArrow:e.parentNode.querySelector(".flexy-arrow-prev"),rightArrow:e.parentNode.querySelector(".flexy-arrow-next"),hasDragAndDrop:!1},e.closest(".thumbs-left")&&"mobile"!==Object(E.a)({withTablet:!0})?{orientation:"vertical"}:{}));e.flexy=t}t.flexy=i};C.a.on("ct:flexy:update-height",()=>{[...document.querySelectorAll(".flexy-container")].map(t=>{t.flexy&&c(t.flexy)})})}}]);