(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{"0F5R":function(t,e,i){},HDcy:function(t,e,i){"use strict";i.r(e);i("rB9j"),i("ALS0");var n=i("n2vZ"),s=i("n+LH"),o=i("JQPg"),a=(i("ma9I"),i("EV/r")),r=i("Tqq3"),l={name:"TestimonialSlide",components:{SharedSubHeading:a.a},data:function(){return{isOverflow:!1,expand:!1}},props:{testimonial:{type:Object,required:!0},slide:{type:Object,required:!0}},methods:{setCssVars:function(){var t=this.testimonial.testimonialSettings.testimonialContentBox.testimonialBoxColor,e=Object(r.g)(t);return{"--testimonial-slide-gradient-col":e?"linear-gradient( rgba( ".concat(e.r,", ").concat(e.g,", ").concat(e.b,", 0.5) , ").concat(t," 50%)"):"linear-gradient(rgba(255,255,255, 0.5), white 50%)"}},setImage:function(){return this.slide.testimonialImage},setSrc:function(){return this.image?this.image.mediaDetails.sizes.largeSquare?this.image.mediaDetails.sizes.largeSquare.sourceUrl:this.image.sourceUrl:""},overflowOn:function(){this.isOverflow=!0},overflowOff:function(){this.isOverflow=!1},toggleExpand:function(){this.expand=!this.expand,this.$emit("toggleAuto",!this.expand)},closeExpand:function(){this.expand=!1,this.$emit("toggleAuto",!0)}},created:function(){this.cssVars=this.setCssVars(),this.image=this.setImage(),this.src=this.setSrc()}},d=(i("LOX5"),i("KHd+")),c=Object(d.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"testimonial-slide",style:t.cssVars},[t.slide.testimonialImage?e("SharedImage",{staticClass:"testimonial-slide__img",attrs:{image:t.slide.testimonialImage,sizes:"(max-width: 768px) 100vw, 25vw"}}):t._e(),e("div",{ref:"content",staticClass:"testimonial-slide__content",class:{"testimonial-slide__content--expand":t.expand&&t.isOverflow}},[e("div",{ref:"content-inner"},[t._l(t.slide.testimonialSlidesTitle,(function(t,i){return e("SharedSubHeading",{key:i,staticClass:"testimonial-slide__content__title",attrs:{heading:t.testimonialTitle}})})),e("div",{staticClass:"testimonial-slide__content__text"},[e("div",{directives:[{name:"g-image",rawName:"v-g-image"}],staticClass:"trim-last",domProps:{innerHTML:t._s(t.slide.testimonialContent)}})])],2),e("a",{ref:"expand",staticClass:"testimonial-slide__content__expand",class:{"testimonial-slide__content__expand--visible":t.isOverflow,"testimonial-slide__content__expand--expand":t.expand&&t.isOverflow},on:{click:t.toggleExpand}},[e("font-awesome",{attrs:{icon:["fas","chevron-down"]}})],1)])],1)}),[],!1,null,null,null).exports,m={name:"SegmentTestimonial",components:{SharedHeading:n.a,SharedCarousel:s.a,SharedCarouselSlide:o.a,TestimonialSlide:c},props:{segmentData:{type:Object,required:!0,validator:function(t){return/^\d+$/.test(t.id)}}},data:function(){return{autoSlide:!0,index:0,prevIndex:0,resizeTimer:null}},methods:{setCssVars:function(){var t=this.segmentData.flexibleContent.testimonialSettings,e=t.testimonialPadding,i=e.testimonialTopPadding,n=e.testimonialBottomPadding,s=t.testimonialContentBox,o=s.testimonialBoxColor,a=s.testimonialTestimonialCarouselHeight,r=t.testimonialArrow,l=r.testimonialArrowColor,d=r.testimonialArrowBackgroundColor,c=r.testimonialArrowBackgroundColorHover;return{"--testimonial-top-padding":i?"".concat(i,"px"):null,"--testimonial-bottom-padding":n?"".concat(n,"px"):null,"--testimonial-slide-bg-col":o||"white","--testimonial-carousel-height":a?"".concat(a,"px"):null,"--testimonial-arrow-col":l||null,"--testimonial-arrow-bg-col":d||"transparent","--testimonial-arrow-bg-col-hover":c||"inherit"}},resize:function(){var t=this;clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((function(){t.checkOverflow()}),250)},onChangeEvent:function(t){this.prevIndex=this.index,this.index=t.index,this.prevIndex!==this.index&&this.checkOverflow()},onAfterChangeEvent:function(){this.autoSlide=!0,this.$refs.slides[this.prevIndex].closeExpand()},toggleAuto:function(t){this.autoSlide=t},checkOverflow:function(){var t=this.$refs.slides[this.index];t.expand||requestAnimationFrame((function(){var e=t.$refs.content,i=t.$refs["content-inner"],n=getComputedStyle(e),s=Math.max(e.clientHeight-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom),0);i.clientHeight-16>s?t.overflowOn():t.overflowOff()}))}},created:function(){this.testimonial=this.segmentData.flexibleContent,this.background=this.testimonial.testimonialBackground,this.cssVars=this.setCssVars(),this.override=this.testimonial.testimonialSettings.testimonialStyling,this.duration=this.testimonial.testimonialSettings.testimonialCarousel.testimonialDuration,this.heading=this.testimonial.testimonialHeading;var t=this.testimonial.testimonialSettings.testimonialIndicator;this.indicators={indicatorToggle:!0,indicatorActiveColor:t.testimonialIndicatorColorActive,indicatorPassiveColor:t.testimonialIndicatorColor,indicatorBorder:t.testimonialIndicatorBorderColor};var e=this.testimonial.testimonialSettings.testimonialArrow;this.arrows={arrowsToggle:e.testimonialArrowToggle,arrowColor:e.testimonialArrowColor,arrowBackgroundColor:e.testimonialArrowBackgroundColor,arrowBackgroundColorHover:e.testimonialArrowBackgroundColorHover}},mounted:function(){window.addEventListener("resize",this.resize),document.fonts.ready.then(this.checkOverflow())},beforeDestroy:function(){window.removeEventListener("resize",this.resize)}},g=(i("ih9O"),Object(d.a)(m,(function(){var t=this,e=t._self._c;return e("SharedSegmentRoot",{staticClass:"segment-testimonial",style:t.cssVars,attrs:{override:t.override}},[e("SharedBackground",{attrs:{data:t.background}}),e("div",{staticClass:"container"},[t.heading.heading?e("SharedHeading",{staticClass:"segment-testimonial__heading",attrs:{heading:t.heading}}):t._e()],1),e("div",{staticClass:"segment-testimonial__carousel-container"},[e("SharedCarousel",{staticClass:"container segment-testimonial__carousel",attrs:{"hold-duration":parseInt(1e3*t.duration),auto:t.autoSlide,arrows:t.arrows,indicators:t.indicators},on:{changeevent:t.onChangeEvent,afterchangeevent:t.onAfterChangeEvent}},[e("div",{staticClass:"segment-testimonial__carousel__slide-container"},t._l(t.testimonial.testimonialSlides,(function(i,n){return e("SharedCarouselSlide",{key:"testimonial-slide--".concat(n)},[e("TestimonialSlide",{ref:"slides",refInFor:!0,attrs:{testimonial:t.testimonial,slide:i},on:{toggleAuto:t.toggleAuto}})],1)})),1)])],1)],1)}),[],!1,null,null,null));e.default=g.exports},LOX5:function(t,e,i){"use strict";i("NvwT")},NvwT:function(t,e,i){},ih9O:function(t,e,i){"use strict";i("0F5R")}}]);