PageSourceSearch

https://mohrfunevents.com/_nuxt/a9yw37dI.js

js mohrfunevents.com collected 2026-09-30 13:39:52 UTC 3,855 bytes, 1 lines download raw bytes

1import{r as p}from"./Dvf0lcIP.js";import{_ as S,a as d,o as c,e as o,F as v,r as f,b as g,h as C,n as a,z as m,y}from"./Do1nZpFk.js";import"./BM5aYONo.js";const b={name:"ElCarouselV2",props:{section:{type:Object,required:!0}},data(){return{currentIndex:0,ignoreScrollEvents:!1,timer:null,timer2:null,pauseOnHover:!0,isHover:!1,interval:!1}},computed:{autoplay(){return this.section.options.content.carousel.autoplay},speed(){return this.section.options.content.carousel.speed}},watch:{autoplay(e){clearInterval(this.interval),e&&this.autoPlay()},speed(){this.autoplay&&(clearInterval(this.interval),this.autoPlay())}},beforeMount(){p()},mounted(){this.setActiveSlide(0),window.addEventListener("onSlideChange",e=>this.onSlideChange(e.detail)),this.$refs.slider.addEventListener("scroll",this.onScroll),this.autoplay&&this.autoPlay()},beforeDestroy(){this.$refs.slider.removeEventListener("scroll",this.onScroll),window.removeEventListener("onSlideChange",this.onSlideChange),clearInterval(this.interval),clearTimeout(this.timer),clearTimeout(this.timer2)},methods:{goToSlide(e){if(!this.$refs.slider)return;const s=[...this.$refs.slider.children][e];this.$refs.slider.scroll({left:s.offsetLeft,behavior:"smooth"}),this.setActiveSlide(e)},nextSlide(){this.ignoreScrollEvents=!0,this.currentIndex<this.section.options.content.carousel.slides.length-1?this.goToSlide(this.currentIndex+1):this.goToSlide(0)},previousSlide(){this.ignoreScrollEvents=!0,this.currentIndex-1>=0&&this.goToSlide(this.currentIndex-1)},onSlideChange({slide:e,uid:t}){this.section.uid!==t&&this.section.pickedUid===t&&this.goToSlide(e)},setActiveSlide(e){window.dispatchEvent(new CustomEvent("onSlideChange",{detail:{slide:e,uid:this.section.uid}}));const t=[...this.$refs.slider.children];t.forEach(s=>{s.classList.remove("active"),s.classList.remove("prev"),s.classList.remove("next")}),t[e].classList.add("active"),e>0&&t[e-1].classList.add("prev"),e<this.section.options.content.carousel.slides.length-1&&t[e+1].classList.add("next"),this.currentIndex=e},onScroll(){clearTimeout(this.timer),clearTimeout(this.timer2),this.timer2=setTimeout(()=>this.ignoreScrollEvents=!1,1e3),!this.ignoreScrollEvents&&(this.timer=setTimeout(()=>{const e=[...this.$refs.slider.children],t=e.reduce((s,u)=>{const l=u.getBoundingClientRect(),n=this.$refs.slider.getBoundingClientRect(),i=l.left+l.width/2,h=n.left+n.width/2,r=Math.abs(i-h);return r<s.distance?{slide:u,distance:r}:s},{slide:null,distance:1/0}).slide;e.indexOf(t)!==this.currentIndex&&this.setActiveSlide(e.indexOf(t))},100))},autoPlay(){this.interval=y(()=>{this.section.options.content.carousel.pauseOnHover&&this.isHover||this.nextSlide()},this.section.options.content.carousel.speed)}}},x=["data-sid"],E={class:"slide w-100 h-100"},I={class:"slide-btn-wrapper"};function w(e,t,s,u,l,n){return c(),d("div",{class:"position-relative",onMouseenter:t[2]||(t[2]=()=>l.isHover=!0),onMouseleave:t[3]||(t[3]=()=>l.isHover=!1)},[o("div",{ref:"slider",class:a(["es-slider",`--${s.section.sid}--slider`])},[(c(!0),d(v,null,f(s.section.options.content.carousel.slides,(i,h)=>(c(),d("div",{key:h,class:"slide-container","data-sid":`${s.section.sid}--${i.uid}`},[o("div",E,[(c(!0),d(v,null,f(i.content,r=>(c(),g(C(r.component),{key:r.uid,section:r},null,8,["section"]))),128))])],8,x))),128))],2),o("div",I,[o("button",{class:a(["slide-btn slide-prev-btn custom",`--${s.section.sid}--prev-btn`]),onClick:t[0]||(t[0]=m((...i)=>n.previousSlide&&n.previousSlide(...i),["stop"]))},[o("i",{class:a(s.section.options.content.carousel.prevIcon)},null,2)],2),o("button",{class:a(["slide-btn slide-next-btn custom",`--${s.section.sid}--next-btn`]),onClick:t[1]||(t[1]=m((...i)=>n.nextSlide&&n.nextSlide(...i),["stop"]))},[o("i",{class:a(s.section.options.content.carousel.nextIcon)},null,2)],2)])],32)}const _=S(b,[["render",w]]);export{_ as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.