import{a as V,_ as N}from"./WebImage-BBQZzdK6.mjs";import{o as n,b as x,w as k,c as o,F as w,a9 as E,i as r,k as O,t as b,n as m,L as P,V as v,a as f,a6 as L,v as y,aj as z,D as M,G as B,d as C,ay as _,r as I,_ as H,bi as A,aZ as R}from"./entry.DPwc-EV0.js";const X=["src"],W=["src"],F=["src"],Y=["src"],U=["src"],q={key:2},K={class:"vueperslide__content-wrapper"},G=["innerHTML"],Z=["innerHTML"],J={class:"vueperslide__content-wrapper"},Q=["innerHTML"],ee=["innerHTML"],te={key:4,class:"vueperslide__loader"};function ie(e,s,i,l,u,t){return n(),x(z(i.link?"a":"div"),{class:y(["vueperslide",t.slideClasses]),href:i.link&&!t.justDragged?i.link:!1,target:i.link&&i.openInNew?typeof i.openInNew=="boolean"?"_blank":i.openInNew:"_self",face:t.slideFace3d,style:m(t.slideStyles),"aria-hidden":t.slides.activeId===e._.uid||t.isSlideVisible?"false":"true",onMouseenter:s[0]||(s[0]=h=>e.$emit("mouse-enter",{slideIndex:t.slideIndex,title:i.title,content:i.content,image:i.image,link:i.link},e.$el)),onMouseleave:s[1]||(s[1]=h=>e.$emit("mouse-leave"))},{default:k(()=>[t.videoObj?(n(),o(w,{key:0},[t.videoObj.webm||t.videoObj.mp4?(n(),o("video",E({key:0,class:"vueperslide__video",width:"100%",height:"100%"},t.videoObj.props||{}),[t.videoObj.webm?(n(),o("source",{key:0,src:t.videoObj.webm,type:"video/webm"},null,8,X)):r("",!0),t.videoObj.mp4?(n(),o("source",{key:1,src:t.videoObj.mp4,type:"video/mp4"},null,8,W)):r("",!0),t.videoObj.ogv?(n(),o("source",{key:2,src:t.videoObj.ogv,type:"video/ogg"},null,8,F)):r("",!0),t.videoObj.avi?(n(),o("source",{key:3,src:t.videoObj.avi,type:"video/avi"},null,8,Y)):r("",!0),O(b(t.videoObj.alt||"Sorry, your browser doesn't support embedded videos."),1)],16)):t.videoObj.url?(n(),o("iframe",E({key:1,class:"vueperslide__video",src:t.videoObj.url,type:"text/html",frameborder:"0",width:"100%",height:"100%"},t.videoObj.props||{}),null,16,U)):r("",!0)],64)):r("",!0),e.imageSrc&&t.conf.slideImageInside?(n(),o("div",{key:1,class:"vueperslide__image",style:m(t.imageStyles)},null,4)):r("",!0),t.conf.slideContentOutside?P((n(),o("div",q,[v(e.$slots,"content",{},()=>[f("div",K,[i.title?(n(),o("div",{key:0,class:"vueperslide__title",innerHTML:i.title},null,8,G)):r("",!0),i.content?(n(),o("div",{key:1,class:"vueperslide__content",innerHTML:i.content},null,8,Z)):r("",!0)])])],512)),[[L,!1]]):v(e.$slots,"content",{key:3},()=>[f("div",J,[i.title?(n(),o("div",{key:0,class:"vueperslide__title",innerHTML:i.title},null,8,Q)):r("",!0),i.content?(n(),o("div",{key:1,class:"vueperslide__content",innerHTML:i.content},null,8,ee)):r("",!0)])]),t.conf.lazy&&!e.loaded?(n(),o("div",te,[v(e.$slots,"loader")])):r("",!0)]),_:3},40,["href","target","class","face","style","aria-hidden"])}const $=(e,s)=>{const i=e.__vccOpts||e;for(const[l,u]of s)i[l]=u;return i},se={inject:["slides","touch","updateSlide","addClone","addSlide","removeSlide"],props:{clone:{type:Boolean},image:{type:String,default:""},video:{type:[String,Object],default:""},title:{type:String,default:""},content:{type:String,default:""},link:{type:String,default:""},duration:{type:Number,default:0},lazyloaded:{type:Boolean},openInNew:{type:[Boolean,String]}},emits:["mouse-enter","mouse-leave"],data:()=>({imageSrc:"",loading:!1,loaded:!1}),computed:{conf(){return this.$parent.conf},slideClasses(){return{"vueperslide--active":this.slides.activeId===this._.uid,"vueperslide--previous-slide":this.isPreviousSlide,"vueperslide--next-slide":this.isNextSlide,"vueperslide--visible":this.isSlideVisible,"vueperslide--loading":this.conf.lazy&&!this.loaded,"vueperslide--has-video":this.videoObj,"vueperslide--has-image-inside":this.conf.slideImageInside,"vueperslide--no-pointer-events":this.videoObj&&this.videoObj.pointerEvents===!1}},slideStyles(){const{visibleSlides:e,fade:s,slideImageInside:i,gap:l,gapPx:u}=this.conf;return{...!i&&this.imageSrc&&{backgroundImage:`url("${this.imageSrc}")`},...e>1&&{width:(100-(l?l*(e-1):0))/e+"%"},...e>1&&s&&{[this.conf.rtl?"right":"left"]:this.slideIndex%e/e*100+"%"},...l&&{[this.conf.rtl?"marginLeft":"marginRight"]:l+(u?"px":"%")}}},videoObj(){if(!this.video)return null;let e={url:"",alt:"",props:{controls:!0}};return typeof this.video=="object"?e=Object.assign(e,this.video):typeof this.video=="string"&&(e.url=this.video),e},youtubeVideo(){return/youtube\.|youtu\.be/.test(this.videoObj.url)},imageStyles(){return{...this.conf.slideImageInside&&this.imageSrc&&{backgroundImage:`url("${this.imageSrc}")`}}},slideFace3d(){if(!this.conf["3d"])return!1;const e=["front","right","back","left"],s=(this.slides.current-1+this.slidesCount)%this.slidesCount,i=(this.slides.current+1)%this.slidesCount;let l="front";return this.slideIndex===s?l=e[(4+this.slides.current-1)%4]:this.slideIndex===i&&(l=e[(this.slides.current+1)%4]),l=e[this.slideIndex%4],this.conf.rtl&&l==="left"?l="right":this.conf.rtl&&l==="right"&&(l="left"),l},isPreviousSlide(){if(!this.conf["3d"])return!1;const e=(this.slides.current-1+this.slidesCount)%this.slidesCount;return this._.uid===this.slides.list[e].id},isNextSlide(){if(!this.conf["3d"])return!1;const e=(this.slides.current+1)%this.slidesCount;return this._.uid===this.slides.list[e].id},isSlideVisible(){return this.slideIndex>=this.slides.firstVisible&&this.slideIndex
e.id)},slidesCount(){return this.slidesList.length},slideIndex(){return this.slidesList.indexOf(this._.uid)},justDragged(){return this.touch.justDragged}},methods:{updateThisSlide(e){this.updateSlide(this._.uid,e)},loadImage(){if(!(this.loading||this.loaded))return this.loading=!0,new Promise((e,s)=>{const i=document.createElement("img");i.onload=()=>{this.imageSrc=this.image,this.loading=!1,this.loaded=!0,this.$nextTick(()=>{e({image:this.imageSrc,style:((this.$el.attributes||{}).style||{}).value})})},i.onerror=(this.loading=!1)||s,i.src=this.image})},playVideo(){!this.videoObj||(this.videoObj.url?this.$el.querySelector("iframe").contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):this.$el.querySelector("video").play())},pauseVideo(){!this.videoObj||(this.videoObj.url?this.$el.querySelector("iframe").contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"):this.$el.querySelector("video").pause())}},created(){if(this.imageSrc=this.conf.lazy?"":this.image,this.clone)return this.addClone();this.addSlide({id:this._.uid,image:this.imageSrc,video:this.videoObj&&{...this.videoObj,play:this.playVideo,pause:this.pauseVideo},title:this.title,content:this.content,contentSlot:this.$slots.content,loaderSlot:this.$slots.loader,link:this.link,style:"",loadImage:this.loadImage,duration:this.duration})},mounted(){this.clone||this.updateThisSlide({contentSlot:this.$slots.content,loaderSlot:this.$slots.loader,style:((this.$el.attributes||{}).style||{}).value})},beforeUnmount(){this.clone||this.removeSlide(this._.uid)},watch:{image(){this.imageSrc=this.conf.lazy&&!this.isSlideVisible?"":this.image,this.clone||this.updateThisSlide({image:this.imageSrc,...!this.conf.slideImageInside&&{style:this.slideStyles}})},title(){this.clone||this.updateThisSlide({title:this.title})},content(){this.clone||this.updateThisSlide({content:this.content})},link(){this.clone||this.updateThisSlide({link:this.link})},lazyloaded(){this.clone&&(this.loaded=this.lazyloaded)}}},j=$(se,[["render",ie]]),le=["innerHTML"],ne=["innerHTML"],oe={class:"vueperslides__inner"},ae={key:0,class:"vueperslides__paused"},re={key:1,class:"vueperslides__progress"},de={key:2,class:"vueperslides__fractions"},ue={viewBox:"0 0 9 18"},he=["d"],ce={viewBox:"0 0 9 18"},pe=["d"],fe={key:4,class:"vueperslides__bullets",ref:"bullets",role:"tablist","aria-label":"Slideshow navigation"},ge=["aria-label","onClick"],ve={class:"default"},me={key:1,class:"vueperslides__bullets vueperslides__bullets--outside",ref:"bullets",role:"tablist","aria-label":"Slideshow navigation"},Se=["aria-label","onClick"],ye={class:"default"},be=["innerHTML"],_e=["innerHTML"];function ke(e,s,i,l,u,t){const h=M("vnodes"),S=M("vueper-slide");return n(),o("div",{class:y(["vueperslides",t.vueperslidesClasses]),ref:"vueperslides","aria-label":"Slideshow",style:m(t.vueperslidesStyles)},[t.slidesCount&&t.conf.slideContentOutside==="top"?(n(),o("div",{key:0,class:y(["vueperslide__content-wrapper vueperslide__content-wrapper--outside-top",t.conf.slideContentOutsideClass])},[t.currentSlide.contentSlot?(n(),x(h,{key:0,vnodes:t.currentSlide.contentSlot()},null,8,["vnodes"])):(n(),o(w,{key:1},[t.currentSlide.title?(n(),o("div",{key:0,class:"vueperslide__title",innerHTML:t.currentSlide.title},null,8,le)):r("",!0),t.currentSlide.content?(n(),o("div",{key:1,class:"vueperslide__content",innerHTML:t.currentSlide.content},null,8,ne)):r("",!0)],64))],2)):r("",!0),f("div",oe,[f("div",{class:"vueperslides__parallax-wrapper",style:m(`padding-bottom: ${t.conf.slideRatio*100}%`),"aria-live":"polite"},[f("div",{class:y(["vueperslides__track",{"vueperslides__track--dragging":e.touch.dragging,"vueperslides__track--mousedown":e.mouseDown}]),ref:"track",style:m(t.trackStyles)},[f("div",{class:"vueperslides__track-inner",style:m(t.trackInnerStyles)},[v(e.$slots,"default"),e.isReady&&t.conf.infinite&&t.canSlide&&t.lastSlide?(n(),x(S,{key:0,class:"vueperslide--clone vueperslide--clone-1",clone:"",title:t.lastSlide.title,content:t.lastSlide.content,image:t.lastSlide.image,link:t.lastSlide.link,style:m(t.lastSlide.style),lazyloaded:t.lastSlide.loaded,"aria-hidden":"true"},B({_:2},[t.lastSlide.contentSlot?{name:"content",fn:k(()=>[C(h,{vnodes:t.lastSlide.contentSlot()},null,8,["vnodes"])]),key:"0"}:void 0,t.conf.lazy&&!t.lastSlide.loaded&&t.lastSlide.loaderSlot?{name:"loader",fn:k(()=>[C(h,{vnodes:t.lastSlide.loaderSlot()},null,8,["vnodes"])]),key:"1"}:void 0]),1032,["title","content","image","link","style","lazyloaded"])):r("",!0),e.isReady&&t.conf.infinite&&t.canSlide&&t.firstSlide?(n(),x(S,{key:1,class:"vueperslide--clone vueperslide--clone-2",clone:"",title:t.firstSlide.title,content:t.firstSlide.content,image:t.firstSlide.image,link:t.firstSlide.link,style:m(t.firstSlide.style),lazyloaded:t.firstSlide.loaded,"aria-hidden":"true"},B({_:2},[t.firstSlide.contentSlot?{name:"content",fn:k(()=>[C(h,{vnodes:t.firstSlide.contentSlot()},null,8,["vnodes"])]),key:"0"}:void 0,t.conf.lazy&&!t.firstSlide.loaded&&t.firstSlide.loaderSlot?{name:"loader",fn:k(()=>[C(h,{vnodes:t.firstSlide.loaderSlot()},null,8,["vnodes"])]),key:"1"}:void 0]),1032,["title","content","image","link","style","lazyloaded"])):r("",!0)],4)],6)],4),(t.conf.pauseOnHover||t.conf.pauseOnTouch)&&e.$slots.pause?(n(),o("div",ae,[v(e.$slots,"pause")])):r("",!0),t.conf.progress?(n(),o("div",re,[v(e.$slots,"progress",{current:e.slides.current+1,total:t.slidesCount},()=>[f("div",{style:m(`width: ${(e.slides.current+1)*100/t.slidesCount}%`)},null,4)])])):r("",!0),t.conf.fractions?(n(),o("div",de,[v(e.$slots,"fraction",{current:e.slides.current+1,total:t.slidesCount},()=>[O(b(`${e.slides.current+1} / ${t.slidesCount}`),1)])])):r("",!0),t.conf.arrows&&t.canSlide&&!i.disable?(n(),o("div",{key:3,class:y(["vueperslides__arrows",{"vueperslides__arrows--outside":t.conf.arrowsOutside}])},[P(f("button",{class:"vueperslides__arrow vueperslides__arrow--prev",type:"button",onClick:s[0]||(s[0]=p=>t.previous()),"aria-label":"Previous",onKeyup:[s[1]||(s[1]=_(p=>t.conf.rtl?t.next():t.previous(),["left"])),s[2]||(s[2]=_(p=>t.conf.rtl?t.previous():t.next(),["right"]))]},[v(e.$slots,`arrow-${t.conf.rtl?"right":"left"}`,{},()=>[(n(),o("svg",ue,[f("path",{"stroke-linecap":"round",d:t.conf.rtl?"m1 1 l7 8 -7 8":"m8 1 l-7 8 7 8"},null,8,he)]))])],544),[[L,!t.arrowPrevDisabled]]),P(f("button",{class:"vueperslides__arrow vueperslides__arrow--next",type:"button",onClick:s[3]||(s[3]=p=>t.next()),"aria-label":"Next",onKeyup:[s[4]||(s[4]=_(p=>t.conf.rtl?t.next():t.previous(),["left"])),s[5]||(s[5]=_(p=>t.conf.rtl?t.previous():t.next(),["right"]))]},[v(e.$slots,`arrow-${t.conf.rtl?"left":"right"}`,{},()=>[(n(),o("svg",ce,[f("path",{"stroke-linecap":"round",d:t.conf.rtl?"m8 1 l-7 8 7 8":"m1 1 l7 8 -7 8"},null,8,pe)]))])],544),[[L,!t.arrowNextDisabled]])],2)):r("",!0),t.conf.bullets&&t.canSlide&&!i.disable&&!t.conf.bulletsOutside?(n(),o("div",fe,[v(e.$slots,"bullets",{currentSlide:e.slides.current,bulletIndexes:t.bulletIndexes,goToSlide:t.goToSlide,previous:t.previous,next:t.next},()=>[(n(!0),o(w,null,I(t.bulletIndexes,(p,d)=>(n(),o("button",{class:y(["vueperslides__bullet",{"vueperslides__bullet--active":e.slides.current===p}]),type:"button",key:d,role:"tab","aria-label":`Slide ${d+1}`,onClick:c=>t.goToSlide(p),onKeyup:[s[6]||(s[6]=_(c=>t.conf.rtl?t.next():t.previous(),["left"])),s[7]||(s[7]=_(c=>t.conf.rtl?t.previous():t.next(),["right"]))]},[v(e.$slots,"bullet",{active:e.slides.current===p,slideIndex:p,index:d+1},()=>[f("div",ve,[f("span",null,b(d+1),1)])])],42,ge))),128))])],512)):r("",!0)]),t.conf.bullets&&t.canSlide&&!i.disable&&t.conf.bulletsOutside?(n(),o("div",me,[v(e.$slots,"bullets",{currentSlide:e.slides.current,bulletIndexes:t.bulletIndexes,goToSlide:t.goToSlide,previous:t.previous,next:t.next},()=>[(n(!0),o(w,null,I(t.bulletIndexes,(p,d)=>(n(),o("button",{class:y(["vueperslides__bullet",{"vueperslides__bullet--active":e.slides.current===p}]),type:"button",key:d,role:"tab","aria-label":`Slide ${d+1}`,onClick:c=>t.goToSlide(p),onKeyup:[s[8]||(s[8]=_(c=>t.conf.rtl?t.next():t.previous(),["left"])),s[9]||(s[9]=_(c=>t.conf.rtl?t.previous():t.next(),["right"]))]},[v(e.$slots,"bullet",{active:e.slides.current===p,slideIndex:p,index:d+1},()=>[f("div",ye,[f("span",null,b(d+1),1)])])],42,Se))),128))])],512)):r("",!0),t.slidesCount&&t.conf.slideContentOutside==="bottom"?(n(),o("div",{key:2,class:y(["vueperslide__content-wrapper vueperslide__content-wrapper--outside-bottom",t.conf.slideContentOutsideClass])},[t.currentSlide.contentSlot?(n(),x(h,{key:0,vnodes:t.currentSlide.contentSlot()},null,8,["vnodes"])):(n(),o(w,{key:1},[t.currentSlide.title?(n(),o("div",{key:0,class:"vueperslide__title",innerHTML:t.currentSlide.title},null,8,be)):r("",!0),t.currentSlide.content?(n(),o("div",{key:1,class:"vueperslide__content",innerHTML:t.currentSlide.content},null,8,_e)):r("",!0)],64))],2)):r("",!0)],6)}const xe={name:"vueper-slides",components:{VueperSlide:j,vnodes:{render(){return this.$attrs.vnodes}}},provide(){return{conf:this.conf,slides:this.slides,touch:this.touch,updateSlide:this.updateSlide,addClone:this.addClone,addSlide:this.addSlide,removeSlide:this.removeSlide}},props:{alwaysRefreshClones:{type:Boolean,default:!1},arrows:{type:Boolean,default:!0},arrowsOutside:{type:Boolean,default:null},autoplay:{type:Boolean,default:!1},breakpoints:{type:Object,default:()=>({})},bullets:{type:Boolean,default:!0},bulletsOutside:{type:Boolean,default:null},disable:{type:Boolean,default:!1},disableArrowsOnEdges:{type:[Boolean,String],default:!1},draggingDistance:{type:Number,default:null},duration:{type:[Number,String],default:4e3},infinite:{type:Boolean,default:!0},fade:{type:Boolean,default:!1},fixedHeight:{type:[Boolean,String],default:!1},fractions:{type:Boolean,default:!1},gap:{type:Number,default:0},initSlide:{type:Number,default:1},lazy:{type:Boolean,default:!1},lazyLoadOnDrag:{type:Boolean,default:!1},pauseOnHover:{type:Boolean,default:!0},pauseOnTouch:{type:Boolean,default:!0},parallax:{type:[Boolean,Number],default:!1},pageScrollingElement:{type:String,default:""},parallaxFixedContent:{type:Boolean,default:!1},preventYScroll:{type:Boolean,default:!1},progress:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},slideContentOutside:{type:[Boolean,String],default:!1},slideContentOutsideClass:{type:String,default:""},slideImageInside:{type:Boolean,default:!1},slideMultiple:{type:[Boolean,Number],default:!1},slideRatio:{type:Number,default:1/3},touchable:{type:Boolean,default:!0},transitionSpeed:{type:[Number,String],default:600},visibleSlides:{type:Number,default:1},"3d":{type:Boolean,default:!1}},emits:["ready","next","previous","autoplay-pause","autoplay-resume","before-slide","slide","image-loaded","image-failed"],data:()=>({isReady:!1,isPaused:!1,container:null,slides:{list:[],activeId:null,current:0,focus:0,firstVisible:0},mouseDown:!1,mouseOver:!1,touch:{enabled:!0,dragging:!1,lazyloadTriggered:!1,justDragged:!1,dragStartX:0,dragNowX:0,dragAmount:0},transition:{currentTranslation:0,speed:0,animated:!1},autoplayTimer:null,nextSlideIsClone:!1,breakpointsData:{list:[],current:null},parallaxData:{translation:0,slideshowOffsetTop:null,isVisible:!1}}),computed:{conf(){const e={...this.$props,...this.$props.breakpoints&&this.$props.breakpoints[this.breakpointsData.current]||{}};return e.slideMultiple=e.slideMultiple?e.visibleSlides:1,e.gap=this.gap&&parseInt(this.gap)||0,e.visibleSlides>1&&(e["3d"]=!1),(e.fade||e.disableArrowsOnEdges||e.visibleSlides>1||e["3d"])&&(e.infinite=!1),e.visibleSlides>1&&e.arrowsOutside===null&&(e.arrowsOutside=!0),e.visibleSlides>1&&e.bulletsOutside===null&&(e.bulletsOutside=!0),this.touch.enabled!==e.touchable&&this.toggleTouchableOption(e.touchable),e.parallax&&e.parallaxFixedContent&&(e.slideContentOutside="top",e.slideContentOutsideClass="parallax-fixed-content"),e},slidesCount(){return this.slides.list.length},gapsCount(){const{fade:e,"3d":s,slideMultiple:i,gap:l}=this.conf;if(!l||e||s||this.multipleSlides1by1&&this.slides.current
0&&(u-=this.slidePosAfterPreferred),u},slidesAfterCurrent(){return this.slidesCount-(this.slides.current+1)},preferredPosition(){return this.multipleSlides1by1?Math.ceil(this.conf.visibleSlides/2)-1:0},slidePosAfterPreferred(){return this.conf.visibleSlides-this.preferredPosition-this.slidesAfterCurrent-1},multipleSlides1by1(){return this.conf.visibleSlides>1&&this.conf.slideMultiple===1},touchEnabled:{get(){return this.slidesCount>1&&this.touch.enabled},set(e){this.touch.enabled=e}},canSlide(){return this.slidesCount/this.conf.visibleSlides>1},firstSlide(){const e=this.slidesCount?this.slides.list[0]:{};return e.style&&typeof e.style=="string"&&(e.style=e.style.replace(/width: ?\d+.*?;?/,"")),e},lastSlide(){const e=this.slidesCount?this.slides.list[this.slidesCount-1]:{};return e.style&&typeof e.style=="string"&&(e.style=e.style.replace(/width: ?\d+.*?;?/,"")),e},currentSlide(){const e=this.slidesCount&&this.slides.list[this.slides.current]||{};return this.slides.current
1,"vueperslides--bullets-outside":this.conf.bulletsOutside,"vueperslides--animated":this.transition.animated,"vueperslides--no-animation":!this.isReady}},vueperslidesStyles(){return/^-?\d/.test(this.conf.fixedHeight)?`height: ${this.conf.fixedHeight}`:null},trackStyles(){const e={};return this.conf.parallax&&(e.transform=`translate3d(0, ${this.parallaxData.translation}%, 0)`,e.willChange=this.parallaxData.isVisible?"transform":"auto"),e},trackInnerStyles(){const e={},{fade:s,"3d":i}=this.conf;if(e.transitionDuration=`${this.transition.speed}ms`,i){const l=this.transition.currentTranslation*90/100;e.transform=`rotateY(-90deg) translateX(-50%) rotateY(90deg) rotateY(${l}deg)`}else s||(e.transform=`translate3d(${this.transition.currentTranslation}%, 0, 0)`,e.willChange=this.touch.dragging||this.transition.animated?"transform":"auto");return e},bulletIndexes(){return Array(Math.ceil(this.slidesCount/this.conf.slideMultiple)).fill().map((e,s)=>s*this.conf.slideMultiple)},arrowPrevDisabled(){return!this.slides.current&&this.conf.disableArrowsOnEdges},arrowNextDisabled(){const{disableArrowsOnEdges:e,visibleSlides:s,slideMultiple:i}=this.conf;return this.slides.current+(i>1&&s>1?s-1:0)===this.slidesCount-1&&e}},methods:{init(){this.container=this.$refs.vueperslides,this.touchEnabled=this.conf.touchable,this.transition.speed=this.conf.transitionSpeed,Object.keys(this.breakpoints).length&&(this.setBreakpointsList(),this.setBreakpointConfig(this.getCurrentBreakpoint()));const e={animation:!1,autoPlaying:this.conf.autoplay};this.goToSlide(this.conf.initSlide-1,e),this.bindEvents(),this.$nextTick(()=>{this.isReady=!0,this.emit("ready")})},emit(e,s=!0,i=!1){let l=null;if((s||typeof i=="number")&&(l={},s&&this.slides.activeId&&this.slidesCount&&(l.currentSlide=this.getSlideData(this.slides.current)),typeof i=="number"&&this.slidesCount)){const{nextSlide:u}=this.getSlideInRange(i);l.nextSlide=this.getSlideData(u)}this.$emit(...l?[e,l]:[e])},getSlideData(e){const s=this.slides.list[e];let i={};return s&&(i={index:e,title:s.title,content:s.content,contentSlot:s.contentSlot,image:s.image,link:s.link}),i},setBreakpointsList(){this.breakpointsData.list=[99999,...Object.keys(this.breakpoints)].map(e=>parseInt(e)).sort((e,s)=>parseInt(s)-parseInt(e))},getCurrentBreakpoint(){const e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=[e,...this.breakpointsData.list].sort((i,l)=>parseInt(l)-parseInt(i));return this.breakpointsData.list[s.indexOf(e)-1]},hasBreakpointChanged(e){return this.breakpointsData.current!==parseInt(e)},setBreakpointConfig(e){const s=this.breakpoints&&this.breakpoints[e]||{},i=s.slideMultiple&&s.slideMultiple!==this.conf.slideMultiple,l=s.visibleSlides&&s.visibleSlides!==this.conf.visibleSlides;this.breakpointsData.current=e,this.slides.current=this.getFirstVisibleSlide(this.slides.focus),i||l?this.goToSlide(this.slides.current,{breakpointChange:!0}):this.updateTrackTranslation()},bindEvents(){const e="ontouchstart"in window;this.touchEnabled&&this.toggleTouchableOption(!0),this.conf.autoplay&&(this.conf.pauseOnHover&&!e?(this.container.addEventListener("mouseenter",this.onMouseEnter),this.container.addEventListener("mouseleave",this.onMouseLeave)):this.conf.pauseOnTouch&&e&&document.addEventListener("touchstart",s=>{this[this.$el.contains(s.target)?"onSlideshowTouch":"onOustideTouch"]()})),(this.breakpointsData.list.length||this.conf.parallax)&&window.addEventListener("resize",this.onResize),this.conf.parallax&&this.enableParallax()},getSlideshowOffsetTop(e=!1){if(this.parallaxData.slideshowOffsetTop===null||e){let s=this.container,i=s.offsetTop;for(;s=s.offsetParent;)i+=s.offsetTop;this.parallaxData.slideshowOffsetTop=i}return this.parallaxData.slideshowOffsetTop},enableParallax(){this.refreshParallax(),this.pageScrollingElement?(this.parallaxData.scrollingEl=document.querySelector(this.pageScrollingElement),this.parallaxData.scrollingEl.addEventListener("scroll",this.onScroll)):document.addEventListener("scroll",this.onScroll)},disableParallax(){(this.pageScrollingElement?document.querySelector(this.pageScrollingElement):document).removeEventListener("scroll",this.onScroll),this.parallaxData.scrollingEl=null,this.parallaxData.isVisible=!1,this.parallaxData.translation=0,this.parallaxData.slideshowOffsetTop=null},onScroll(){const{scrollingEl:e}=this.parallaxData,s=document.documentElement;let i=0;e?i=e.scrollTop:i=(window.pageYOffset||s.scrollTop)-(s.clientTop||0);const l=window.innerHeight||s.clientHeight||document.body.clientHeight,u=this.container.clientHeight,t=this.getSlideshowOffsetTop(),h=t+u-i,S=l+i-t;if(this.parallaxData.isVisible=h>0&&S>0,this.parallaxData.isVisible){const p=l+u,d=h*100/p,c=this.conf.parallax===-1?100-d:d;this.parallaxData.translation=-c/2}},onResize(){if(this.breakpointsData.list.length){const e=this.getCurrentBreakpoint();this.hasBreakpointChanged(e)&&this.setBreakpointConfig(e)}this.conf.parallax&&this.getSlideshowOffsetTop(!0)},onMouseEnter(){this.mouseOver=!0,this.conf.pauseOnHover&&this.conf.autoplay&&(this.isPaused=!0)},onMouseLeave(){this.mouseOver=!1,this.conf.pauseOnHover&&this.conf.autoplay&&(this.isPaused=!1)},onMouseDown(e){!this.touchEnabled||this.disable||(!e.touches&&this.preventYScroll&&e.preventDefault(),this.mouseDown=!0,this.touch.dragStartX=this.getCurrentMouseX(e),this.conf.draggingDistance||this.updateTrackTranslation(this.touch.dragStartX))},onMouseMove(e){if(this.mouseDown||this.touch.dragging)if(this.conf.autoplay&&(this.isPaused=!0),this.preventYScroll&&e.preventDefault(),this.mouseDown=!1,this.touch.dragging=!0,this.touch.dragNowX=this.getCurrentMouseX(e),this.conf.draggingDistance){this.touch.dragAmount=this.touch.dragNowX-this.touch.dragStartX;const s=this.touch.dragAmount/this.container.clientWidth;this.updateTrackTranslation(),this.transition.currentTranslation+=100*s}else this.updateTrackTranslation(this.touch.dragNowX)},onMouseUp(e){if(this.mouseDown=!1,this.touch.dragging)this.conf.autoplay&&(!("ontouchstart"in window)&&!this.mouseOver?this.isPaused=!1:this.conf.pauseOnTouch||(this.isPaused=!1));else return this.cancelSlideChange();this.touch.dragging=!1;const s=this.conf.draggingDistance?-this.touch.dragAmount:0,i=(this.touch.dragStartX-this.container.offsetLeft)/this.container.clientWidth,l=(this.touch.dragNowX-this.container.offsetLeft)/this.container.clientWidth,u=((i<.5?0:1)-l)*100;let t=(s||u)>0;if(this.conf.rtl&&(t=!t),[Math.abs(s)
this.touch.justDragged=!1,50),this.touch.lazyloadTriggered=!1},onSlideshowTouch(){this.isPaused=!0},onOustideTouch(){this.isPaused=!1},justDragged(){return this.touch.justDragged},cancelSlideChange(){this.conf.fade||this.updateTrackTranslation()},getCurrentMouseX(e){return"ontouchstart"in window?e.touches[0].clientX:e.clientX},getBasicTranslation(){return this.slides.current/this.conf.visibleSlides},updateTrackTranslation(e=null){let s=this.getBasicTranslation();const{infinite:i,visibleSlides:l,slideMultiple:u,gap:t,"3d":h,lazy:S,lazyLoadOnDrag:p}=this.conf;if(i&&this.nextSlideIsClone!==!1&&(s=(this.nextSlideIsClone?this.slidesCount:-1)/l),t&&(s+=this.gapsCount/(l/u)*t/100),this.touch.dragStartX&&e&&!(i&&this.nextSlideIsClone!==!1)){let d=0;const c=(this.touch.dragStartX-this.container.offsetLeft)/this.container.clientWidth;let a=(e-this.container.offsetLeft)/this.container.clientWidth;if(h){const g=Math.round(c)?[0,2]:[-1,1];a=Math.min(Math.max(a,g[0]),g[1])}if(d=(c<.5?0:1)-a,s+=d*(this.conf.rtl?-1:1),S&&p&&!this.touch.lazyloadTriggered){this.touch.lazyloadTriggered=!0;let g=this.slides.current+(d>0?1:-1)*l;i&&g===-1?g=this.slidesCount-1:i&&g===this.slidesCount&&(g=0);for(let T=0;T
0;let c=Math.min(this.preferredPosition,this.slides.current);d&&(c+=this.slidePosAfterPreferred),s-=c/l}this.transition.currentTranslation=-s*100*(this.conf.rtl?-1:1)},pauseAutoplay(){this.isPaused=!0,clearTimeout(this.autoplayTimer),this.autoplayTimer=0,this.emit("autoplay-pause")},resumeAutoplay(){this.isPaused=!1,this.doAutoplay(),this.emit("autoplay-resume")},doAutoplay(){clearTimeout(this.autoplayTimer),this.autoplayTimer=setTimeout(()=>{this.goToSlide(this.slides.current+this.conf.slideMultiple,{autoPlaying:!0})},this.currentSlide.duration||this.conf.duration)},previous(e=!0){e&&this.emit("previous"),this.goToSlide(this.slides.current-this.conf.slideMultiple)},next(e=!0){e&&this.emit("next"),this.goToSlide(this.slides.current+this.conf.slideMultiple)},refreshParallax(){setTimeout(()=>{this.onResize(),this.onScroll()},100)},getFirstVisibleSlide(e){const{slideMultiple:s,visibleSlides:i}=this.conf;let l=this.slides.current;return i>1&&s===i?l=Math.floor(e/i)*i:this.multipleSlides1by1&&(l=e-Math.min(e,this.preferredPosition)-Math.max(this.slidePosAfterPreferred,0)),l},getSlideInRange(e,s){let i=!1;this.conf.infinite&&e===-1?i=0:this.conf.infinite&&e===this.slidesCount&&(i=1);let l=(e+this.slidesCount)%this.slidesCount;if(this.conf.slideMultiple>1){const u=this.slidesCount%this.conf.slideMultiple||this.conf.slideMultiple,t=this.conf.slideMultiple-u;l+=e<0?t:0,l=this.getFirstVisibleSlide(l)}return this.conf.disableArrowsOnEdges&&(e<0||e>this.slidesCount-1)&&!s&&(l=this.slides.current),{nextSlide:l,clone:i}},goToSlide(e,{animation:s=!0,autoPlaying:i=!1,jumping:l=!1,breakpointChange:u=!1,emit:t=!0}={}){if(!this.slidesCount||this.disable)return;this.conf.autoplay&&!i&&!this.isPaused&&(this.isPaused=!0,this.$nextTick(()=>this.isPaused=!1)),this.transition.animated=s,setTimeout(()=>this.transition.animated=!1,this.transitionSpeed);const{nextSlide:h,clone:S}=this.getSlideInRange(e,i);if(this.nextSlideIsClone=S,!this.slides.list[h])return;if(this.conf.lazy)for(let d=0;d
{const d=e===-1&&this.slides.current!==this.slidesCount-1,c=e===this.slidesCount&&this.slides.current!==0;d||c||(this.transition.speed=0,this.goToSlide(S?0:this.slidesCount-1,{animation:!1,jumping:!0}),setTimeout(()=>this.transition.speed=this.conf.transitionSpeed,50))},this.transition.speed-50),this.slides.current=h,this.slides.firstVisible=this.getFirstVisibleSlide(h),u||(this.slides.focus=h),this.conf.fade||this.updateTrackTranslation(),this.slides.activeId=this.slides.list[this.slides.current].id,this.conf.autoplay&&i&&!this.isPaused&&this.doAutoplay(),this.slidesCount&&(this.isReady&&!l&&t&&this.emit("slide"),this.isReady&&this.conf.bullets&&!i&&!l&&this.$refs.bullets)){const d=this.$refs.bullets.children,c=d&&d[this.slides.current/this.conf.slideMultiple];if(c&&c.nodeName.toLowerCase()==="button"){let a=document.documentElement;this.pageScrollingElement&&(a=document.querySelector(this.pageScrollingElement));const g=a.scrollTop;c.focus({preventScroll:!0}),a.scrollTop=g}}},addSlide(e){return this.slides.list.push(e),this.isReady&&this.slidesCount===1&&this.conf.autoplay&&this.isPaused&&(this.isPaused=!1),this.slidesCount},addClone(){return this.updateTrackTranslation(),this.slidesCount},updateSlide(e,s){let i=this.slides.list.find(l=>l.id===e);i&&(i=Object.assign(i,s))},removeSlide(e){const s=this.slides.list.findIndex(i=>i.id===e);s>-1&&(this.slides.list.splice(s,1),this.slidesCount&&e===this.slides.activeId&&this.goToSlide(s-1,{autoPlaying:!0})),this.slides.current>=this.slidesCount&&this.goToSlide(0,{autoPlaying:!0})},loadSlide(e,s){e.loadImage().then(i=>{const{image:l,style:u}=i;e.loaded=!0,e.image=l,e.style=u,this.$emit("image-loaded",this.getSlideData(s))},()=>{e.loaded=!1,this.$emit("image-failed",this.getSlideData(s))})},toggleTouchableOption(e){const{track:s}=this.$refs;if(!s)return;this.touchEnabled=e;const i="ontouchstart"in window;e?(this.$refs.track.addEventListener(i?"touchstart":"mousedown",this.onMouseDown,{passive:!this.preventYScroll}),document.addEventListener(i?"touchmove":"mousemove",this.onMouseMove,{passive:!this.preventYScroll}),document.addEventListener(i?"touchend":"mouseup",this.onMouseUp,{passive:!0})):this.removeEventListeners()},removeEventListeners(){const e="ontouchstart"in window;this.$refs.track.removeEventListener(e?"touchstart":"mousedown",this.onMouseDown,{passive:!this.preventYScroll}),document.removeEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!this.preventYScroll}),document.removeEventListener(e?"touchend":"mouseup",this.onMouseUp,{passive:!0})}},watch:{isPaused(e){this[e?"pauseAutoplay":"resumeAutoplay"]()},parallax(e){this[e?"enableParallax":"disableParallax"]()}},mounted(){this.init()},beforeUnmount(){this.removeEventListeners(),this.conf.parallax&&this.disableParallax(),window.removeEventListener("resize",this.onResize),document.removeEventListener("touchstart",e=>{this[this.$el.contains(e.target)?"onSlideshowTouch":"onOustideTouch"]()}),this.container.removeEventListener("mouseenter",this.onMouseEnter),this.container.removeEventListener("mouseleave",this.onMouseLeave)}},we=$(xe,[["render",ke]]),Ce={components:{VueperSlides:we,VueperSlide:j},props:{data:{type:Object,default(){return{items:[]}}},interval:{type:Number,default:8},ctaLabel:{type:String},ctaColor:{type:String,default:"black"},ctaLabelColor:{type:String,default:"white"},showSectionDate:{type:Boolean,default:!0},showSummary:{type:Boolean,default:!0},showLabels:{type:Boolean,default:!0},imageShaping:{type:String,default:"crop"},maskSize:{type:String,default:"full"},rotationStyle:{type:String,default:"slide"},showControls:{type:Boolean,default:!0},navigationStyle:{type:String,default:"bullets"},textPosition:{type:String,default:"center"},textColor:{type:String}},data(){return{activeSlide:0}},computed:{navStyle(){return this.navigationStyle},fitParam(){switch(this.imageShaping){case"clip":return"&fit=max";case"max":return"&fit=max";case"fill-blur":return"&fit=fill&fill=blur";case"crop":default:return"&fit=crop"}}},methods:{imageUrl(e){var i;const s=(i=e==null?void 0:e.primaryImage)==null?void 0:i.src;return s?`${s.split("?")[0]}?auto=format,compress${this.fitParam}&w=900&h=500&q=45`:""},pubDate(e){return A(e)}}},Te={class:"content-wrapper"},Oe={class:"content",style:{marginBottom:0}},Me={key:0,class:"section-date"},Ie=["href"],De={key:0},Pe={key:1,class:"label"},Le={key:0},Ee=["href","target"],Be={key:2,class:"teaser"},$e={key:3,class:"cta"};function je(e,s,i,l,u,t){const h=V,S=R,p=M("VueperSlide"),d=M("VueperSlides"),c=N;return n(),o("div",{style:m({width:"100%",fontFamily:e.$ss.primaryFontFamily}),class:"web-carousel-wrapper"},[f("div",{class:y(["web-carousel","mask-"+i.maskSize,"position-"+i.textPosition])},[C(d,{ref:"vueperslides1",touchable:!1,fade:i.rotationStyle==="fade",autoplay:!0,bullets:i.navigationStyle==="bullets",arrows:i.showControls,"slide-ratio":.55,duration:i.interval*1e3,"transition-speed":900,onSlide:s[0]||(s[0]=a=>u.activeSlide=a.currentSlide.index)},{default:k(()=>[(n(!0),o(w,null,I(i.data.items,(a,g)=>(n(),x(p,{key:g,image:t.imageUrl(a)},{content:k(()=>[a.primaryImage.credit?(n(),x(h,{key:0,credit:a.primaryImage.credit},null,8,["credit"])):r("",!0),f("div",Te,[f("div",Oe,[f("div",{class:"content-inner",style:m({color:i.textColor})},[i.showSectionDate?(n(),o("div",Me,[f("a",{href:a==null?void 0:a.primarySection.alias,style:m({color:i.textColor})},b(a==null?void 0:a.primarySection.name),13,Ie),t.pubDate(a)!==null?(n(),o("span",De," | "+b(t.pubDate(a)),1)):r("",!0)])):r("",!0),i.showLabels.length&&a.labels&&(a.labels[0]==="Sponsored"||a.labels[0]==="Members Only"||a.labels[0]==="Supported"||a.labels[0]==="Sponsored Video Training"||a.labels[0]==="Opinion")?(n(),o("div",Pe,[O(b(a==null?void 0:a.labels[0].toUpperCase())+" ",1),a.labels[0]!=="Opinion"?(n(),o("span",Le,"CONTENT")):r("",!0)])):r("",!0),f("a",{href:a.siteContext.path,target:a.siteContext.path.startsWith("http")?"_blank":"_self",class:"title clamp-headline"},[f("h2",null,b(a.name),1)],8,Ee),i.showSummary?(n(),o("div",Be,b(a.teaser),1)):r("",!0),i.ctaLabel?(n(),o("div",$e,[C(S,{type:"link",color:i.ctaColor,"alt-color":i.ctaLabelColor,link:a.siteContext.path},{default:k(()=>[O(b(i.ctaLabel),1)]),_:2},1032,["color","alt-color","link"])])):r("",!0)],4)])])]),_:2},1032,["image"]))),128))]),_:1},8,["fade","bullets","arrows","duration"])],2),t.navStyle==="thumbnails"?(n(),o("div",{key:0,class:"thumbnails",style:m({gridTemplateColumns:`repeat(${i.data.items.length},1fr)`})},[(n(!0),o(w,null,I(i.data.items,(a,g)=>(n(),o("div",{key:g,class:y(["thumbnail",u.activeSlide===g?"active":""])},[C(c,{image:`${t.imageUrl(a)}&fit=crop`,"aspect-ratio":"full-teaser","ignore-styling":!0,onClick:T=>e.$refs.vueperslides1.goToSlide(g)},null,8,["image","onClick"])],2))),128))],4)):r("",!0)],4)}const ze=H(Ce,[["render",je],["__scopeId","data-v-6e58d688"]]);export{ze as default};