1import{e as $,an as me,k as N,D as ae,ai as ge,l as Be,s as st,C as oe,ao as ut,ap as A,I as b,aq as J,n as ct,ar as dt,as as vt,Y as ft,at as gt,au as je}from"./BPQXxfPy.js";const Pe=["viewport","carousel"],re={"bottom-to-top":"btt","left-to-right":"ltr","right-to-left":"rtl","top-to-bottom":"ttb"},Ve=["ltr","left-to-right","rtl","right-to-left","ttb","top-to-bottom","btt","bottom-to-top"],mt={ariaGallery:"Gallery",ariaNavigateToPage:"Navigate to page {slideNumber}",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",iconArrowDown:"Arrow pointing downwards",iconArrowLeft:"Arrow pointing to the left",iconArrowRight:"Arrow pointing to the right",iconArrowUp:"Arrow pointing upwards",itemXofY:"Item {currentSlide} of {slidesCount}"},Fe=["slide","fade"],ze=["center","start","end","center-even","center-odd"],Ie=10,ie=.3,y={autoplay:0,breakpointMode:Pe[0],breakpoints:void 0,dir:Ve[0],enabled:!0,gap:0,height:"auto",i18n:mt,ignoreAnimations:!1,itemsToScroll:1,itemsToShow:1,modelValue:0,mouseDrag:!0,mouseWheel:!1,pauseAutoplayOnHover:!1,preventExcessiveDragging:!1,slideEffect:Fe[0],snapAlign:ze[0],touchDrag:!0,transition:300,wrapAround:!1},j=Symbol("carousel"),ht=e=>{const t=me([]),n=i=>{i!==void 0?t.slice(i).forEach((l,d)=>{var u;(u=l.exposed)===null||u===void 0||u.setIndex(i+d)}):t.forEach((l,d)=>{var u;(u=l.exposed)===null||u===void 0||u.setIndex(d)})};return{cleanup:()=>{t.splice(0,t.length)},getSlides:()=>t,registerSlide:(i,l)=>{if(!i||i.props.isClone)return;const d=l??t.length;t.splice(d,0,i),n(d),e("slide-registered",{slide:i,index:d})},unregisterSlide:i=>{const l=t.indexOf(i);l!==-1&&(e("slide-unregistered",{slide:i,index:l}),t.splice(l,1),n(l))}}};function pt(e){return e.length===0?0:e.reduce((n,i)=>n+i,0)/e.length}function Oe({slides:e,position:t,toShow:n}){const i=[],l=t==="before",d=l?-n:0,u=l?0:n;if(e.length<=0)return i;for(let s=d;s<u;s++){const w={index:l?s:s+e.length,isClone:!0,id:void 0,key:`clone-${t}-${s}`},c=e[(s%e.length+e.length)%e.length].vnode,f=gt(c,w);f.el=null,i.push(f)}return i}const bt='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';function Me(e){if(!e.el||!(e.el instanceof Element))return;const t=e.el.querySelectorAll(bt);for(const n of t)n instanceof HTMLElement&&!n.hasAttribute("disabled")&&n.getAttribute("aria-hidden")!=="true"&&n.setAttribute("tabindex","-1")}function St(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>(n[i]=e[i],n),{})}function wt(e){const{isVertical:t,isReversed:n,dragged:i,effectiveSlideSize:l,threshold:d}=e,u=t?i.y:i.x;if(u===0)return 0;const s=u/l,m=Math.abs(s);if(m<d)return 0;const w=m<1?Math.sign(s):Math.round(s);return n?w:-w}function O({val:e,max:t,min:n}){return t<n?e:Math.min(Math.max(e,isNaN(n)?e:n),isNaN(t)?e:t)}function yt(e){const{transform:t}=window.getComputedStyle(e);return t.split(/[(,)]/).slice(1,-1).map(n=>parseFloat(n))}function xt(e){let t=1,n=1;return e.forEach(i=>{const l=yt(i);l.length===6&&(t/=l[0],n/=l[3])}),{widthMultiplier:t,heightMultiplier:n}}function At(e,t){switch(e){case"start":return 0;case"center":case"center-odd":return(t-1)/2;case"center-even":return(t-2)/2;case"end":return t-1;default:return 0}}function _t(e,t,n){switch(e){case"start":return 0;case"center":case"center-odd":return(n-t)/2;case"center-even":return n/2-t;case"end":return n-t;default:return 0}}function he({slideSize:e,viewportSize:t,align:n,itemsToShow:i}){return i!==void 0?At(n,i):e!==void 0&&t!==void 0?_t(n,e,t):0}function Ue(e="",t={}){return Object.entries(t).reduce((n,[i,l])=>n.replace(`{${i}}`,String(l)),e)}function We({val:e,max:t,min:n=0}){const i=t-n+1;return((e-n)%i+i)%i+n}function pe(e,t=0){let n=!1,i=0,l=null;function d(...u){if(n)return;n=!0;const s=()=>{l=requestAnimationFrame(m=>{m-i>t?(i=m,e(...u),n=!1):s()})};s()}return d.cancel=()=>{l&&(cancelAnimationFrame(l),l=null,n=!1)},d}function le(e,t="px"){if(!(e==null||e===""))return typeof e=="number"||parseFloat(e).toString()===e?`${e}${t}`:e}const Tt=$({name:"CarouselAria",setup(){const e=J(j);return e?()=>A("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},Ue(e.config.i18n.itemXofY,{currentSlide:e.currentSlide+1,slidesCount:e.slidesCount})):()=>""}});function Et(e){let t=!1;const n={x:0,y:0},i=oe({x:0,y:0}),l=N(!1),{isSliding:d}=e,u=b(()=>typeof d=="boolean"?d:d.value),s=c=>{var f;const a=c.target.tagName;if(["INPUT","TEXTAREA","SELECT"].includes(a)||u.value||(t=c.type==="touchstart",t&&c.touches.length>1))return;if(!t&&(c.preventDefault(),c.button!==0))return;n.x=t?c.touches[0].clientX:c.clientX,n.y=t?c.touches[0].clientY:c.clientY;
1const g=t?"touchmove":"mousemove",S=t?"touchend":"mouseup";document.addEventListener(g,m,{passive:!1}),document.addEventListener(S,w,{passive:!0}),(f=e.onDragStart)===null||f===void 0||f.call(e)},m=pe(c=>{var f;if(t&&c.touches.length>1)return;l.value=!0;const a=t?c.touches[0].clientX:c.clientX,g=t?c.touches[0].clientY:c.clientY;i.x=a-n.x,i.y=g-n.y,(f=e.onDrag)===null||f===void 0||f.call(e,{deltaX:i.x,deltaY:i.y,isTouch:t})}),w=()=>{var c;m.cancel();const f=Math.abs(i.x)+Math.abs(i.y);!t&&f>10&&window.addEventListener("click",S=>{S.preventDefault(),S.stopPropagation()},{once:!0,capture:!0}),(c=e.onDragEnd)===null||c===void 0||c.call(e),i.x=0,i.y=0,l.value=!1;const a=t?"touchmove":"mousemove",g=t?"touchend":"mouseup";document.removeEventListener(a,m),document.removeEventListener(g,w)};return{dragged:i,isDragging:l,handleDragStart:s}}function Dt(){const e=N(!1);return{isHover:e,handleMouseEnter:()=>{e.value=!0},handleMouseLeave:()=>{e.value=!1}}}function Nt(e){const{isVertical:t,isSliding:n,config:i}=e,l=b(()=>typeof t=="boolean"?t:t.value),d=b(()=>typeof n=="boolean"?n:n.value);return{handleScroll:s=>{var m,w;if(s.preventDefault(),!i.mouseWheel||d.value)return;const c=typeof i.mouseWheel=="object"&&(m=i.mouseWheel.threshold)!==null&&m!==void 0?m:Ie,f=Math.abs(s.deltaY)>c?s.deltaY:0,a=Math.abs(s.deltaX)>c?s.deltaX:0;if(f===0&&a===0)return;const g=l.value?f:a,E=(g!==0?g:l.value?a:f)>0;(w=e.onWheel)===null||w===void 0||w.call(e,{deltaX:a,deltaY:f,isScrollingForward:E})}}}const Ct={autoplay:{default:y.autoplay,type:Number},breakpoints:{default:y.breakpoints,type:Object},breakpointMode:{default:y.breakpointMode,validator(e){return Pe.includes(e)}},clamp:{type:Boolean},dir:{type:String,default:y.dir,validator(e,t){if(!Ve.includes(e))return!1;const n=e in re?re[e]:e;return["ttb","btt"].includes(n)&&(!t.height||t.height==="auto")&&console.warn(`[vue3-carousel]: The dir "${e}" is not supported with height "auto".`),!0}},enabled:{default:y.enabled,type:Boolean},gap:{default:y.gap,type:Number},height:{default:y.height,type:[Number,String]},i18n:{default:y.i18n,type:Object},ignoreAnimations:{default:!1,type:[Array,Boolean,String]},itemsToScroll:{default:y.itemsToScroll,type:Number},itemsToShow:{default:y.itemsToShow,type:[Number,String]},modelValue:{default:void 0,type:Number},mouseDrag:{default:y.mouseDrag,type:[Boolean,Object]},mouseWheel:{default:y.mouseWheel,type:[Boolean,Object]},mouseScrollThreshold:{default:y.mouseScrollThreshold,type:Number},pauseAutoplayOnHover:{default:y.pauseAutoplayOnHover,type:Boolean},preventExcessiveDragging:{default:!1,type:Boolean,validator(e,t){return e&&t.wrapAround&&console.warn('[vue3-carousel]: "preventExcessiveDragging" cannot be used with wrapAround. The setting will be ignored.'),!0}},slideEffect:{type:String,default:y.slideEffect,validator(e){return Fe.includes(e)}},snapAlign:{default:y.snapAlign,validator(e){return ze.includes(e)}},touchDrag:{default:y.touchDrag,type:[Boolean,Object]},transition:{default:y.transition,type:Number},wrapAround:{default:y.wrapAround,type:Boolean}},Rt=$({name:"VueCarousel",props:Ct,emits:["before-init","drag","init","loop","slide-end","slide-registered","slide-start","slide-unregistered","update:modelValue","wheel"],setup(e,{slots:t,emit:n,expose:i}){var l;const d=ht(n),u=d.getSlides(),s=b(()=>u.length),m=N(null),w=N(null),c=N(0),f=b(()=>Object.assign(Object.assign(Object.assign({},y),St(e,["breakpoints","modelValue"])),{i18n:Object.assign(Object.assign({},y.i18n),e.i18n)}
1)),a=me(Object.assign({},f.value)),g=N((l=e.modelValue)!==null&&l!==void 0?l:0),S=N(g.value);ae(g,o=>S.value=o);const E=N(0),$e=b(()=>Math.ceil((s.value-1)/2)),P=b(()=>s.value-1),V=b(()=>0);let F=null,se=null,H=null;const Q=b(()=>c.value+a.gap),X=b(()=>{const o=a.dir||"ltr";return o in re?re[o]:o}),M=b(()=>["rtl","btt"].includes(X.value)),I=b(()=>["ttb","btt"].includes(X.value)),L=b(()=>a.itemsToShow==="auto"),_=b(()=>I.value?"height":"width");function Y(){var o;if(!te.value)return;const r=(f.value.breakpointMode==="carousel"?(o=m.value)===null||o===void 0?void 0:o.getBoundingClientRect().width:typeof window<"u"?window.innerWidth:0)||0,v=Object.keys(e.breakpoints||{}).map(p=>Number(p)).sort((p,x)=>+x-+p),h={};v.some(p=>r>=p?(Object.assign(h,e.breakpoints[p]),h.i18n&&Object.assign(h.i18n,f.value.i18n,e.breakpoints[p].i18n),!0):!1),Object.assign(a,f.value,h),L.value||(a.itemsToShow=O({val:Number(a.itemsToShow),max:e.clamp?s.value:1/0,min:1}))}const He=pe(()=>{Y(),ee(),R()}),Z=me(new Set),C=N([]);function Xe({widthMultiplier:o,heightMultiplier:r}){C.value=u.map(v=>{var h;const p=(h=v.exposed)===null||h===void 0?void 0:h.getBoundingRect();return{width:p.width*o,height:p.height*r}})}const G=N({width:0,height:0});function Ye({widthMultiplier:o,heightMultiplier:r}){var v;const h=((v=w.value)===null||v===void 0?void 0:v.getBoundingClientRect())||{width:0,height:0};G.value={width:h.width*o,height:h.height*r}}function R(){if(!w.value)return;const o=xt(Z);if(Ye(o),Xe(o),L.value)c.value=pt(C.value.map(r=>r[_.value]));else{const r=Number(a.itemsToShow),v=(r-1)*a.gap;c.value=(G.value[_.value]-v)/r}}function ee(){!a.wrapAround&&s.value>0&&(g.value=O({val:g.value,max:P.value,min:V.value}))}const ue=b(()=>typeof e.ignoreAnimations=="string"?e.ignoreAnimations.split(","):Array.isArray(e.ignoreAnimations)?e.ignoreAnimations:e.ignoreAnimations?!1:[]);ge(()=>ee()),ge(()=>{R()});let z;const Se=o=>{const r=o.target;if(!(!r?.contains(m.value)||Array.isArray(ue.value)&&ue.value.includes(o.animationName))&&(Z.add(r),!z)){const v=()=>{z=requestAnimationFrame(()=>{R(),v()})};v()}},we=o=>{const r=o.target;r&&Z.delete(r),z&&Z.size===0&&(cancelAnimationFrame(z),R())},te=N(!1);typeof document<"u"&&ge(()=>{te.value&&ue.value!==!1?(document.addEventListener("animationstart",Se),document.addEventListener("animationend",we)):(document.removeEventListener("animationstart",Se),document.removeEventListener("animationend",we))}),Be(()=>{te.value=!0,Y(),_e(),m.value&&(H=new ResizeObserver(He),H.observe(m.value)),n("init")}),st(()=>{te.value=!1,d.cleanup(),se&&clearTimeout(se),z&&cancelAnimationFrame(z),F&&clearInterval(F),H&&(H.disconnect(),H=null),typeof document<"u"&&Ae(),m.value&&(m.value.removeEventListener("transitionend",R),m.value.removeEventListener("animationiteration",R))});const{isHover:ye,handleMouseEnter:Ge,handleMouseLeave:qe}=Dt(),xe=pe(o=>{if(!o.ctrlKey)switch(o.key){case"ArrowLeft":case"ArrowUp":I.value===o.key.endsWith("Up")&&(M.value?B(!0):U(!0));break;case"ArrowRight":case"ArrowDown":I.value===o.key.endsWith("Down")&&(M.value?U(!0):B(!0));break}},200),Ae=()=>{document.removeEventListener("keydown",xe)},Ke=()=>{document.addEventListener("keydown",xe)};function _e(){!a.autoplay||a.autoplay<=0||(F=setInterval(()=>{a.pauseAutoplayOnHover&&ye.value||B()},a.autoplay))}function ce(){Te(),_e()}function Te(){F&&(clearInterval(F),F=null)}const k=N(!1),Je=({deltaX:o,deltaY:r,isTouch:v})=>{var h,p,x,T;n("drag",{deltaX:o,deltaY:r});const D=v?typeof a.touchDrag=="object"&&(p=(h=a.touchDrag)===null||h===void 0?void 0:h.threshold)!==null&&p!==void 0?p:ie:typeof a.mouseDrag=="object"&&(T=(x=a.mouseDrag)===null||x===void 0?void 0:x.threshold)!==null&&T!==void 0?T:ie,K=wt({isVertical:I.value,isReversed:M.value,dragged:{x:o,y:r},effectiveSlideSize:Q.value,threshold:D});K!==0&&(S.value=a.wrapAround?g.value+K:O({val:g.value+K,max:P.value,min:V.value}))},Qe=()=>W(S.value),{dragged:Ee,isDragging:Ze,handleDragStart:De}=Et({isSliding:k,onDrag:Je,onDragEnd:Qe}),et=({deltaX:o,deltaY:r,isScrollingForward:v})=>{n("wheel",{deltaX:o,deltaY:r}),v?M.value?U():B():M.value?B():U()},{handleScroll:tt}=Nt({isVertical:I,isSliding:k,config:a,onWheel:et});function B(o=!1){W(g.value+a.itemsToScroll,o)}function U(o=!1){W(g.value-a.itemsToScroll,o)}function W(o,r=!1){if(!r&&k.value)return;let v=o,h=o;E.value=g.value,a.wrapAround?h=We({val:v,max:P.value,min:V.value}):v=O({val:v,max:P.value,min:V.value}),n("slide-start",{slidingToIndex:o,currentSlideIndex:g.value,prevSlideIndex:E.value,slidesCount:s.value}),Te(),k.value=!0,g.value=v,h!==v&&Ne.pause(),n("update:modelValue",h),se=setTimeout(()=>{a.wrapAround&&h!==v&&(Ne.resume(),g.value=h,n("loop",{currentSlideIndex:g.value,slidingToIndex:o})),n("slide-end",{currentSlideIndex:g.value,prevSlideIndex:E.value,slidesCount:s.value}),k.value=!1,ce()},a.transition)}function nt(){Y(),ee(),R(),ce()}ae(()=>[f.value,e.breakpoints],()=>Y(),{deep:!0}),ae(()=>e.autoplay,()=>ce());const Ne=ae(()=>e.modelValue,o=>{o!==g.value&&W(Number(o),!0)});n("before-init");const q=b(()=>{if(!a.wrapAround)return{before:0,after:0};if(L.value)return{before:u.length,after:u.length};const o=Number(a.itemsToShow),r=Math.ceil(o+(a.itemsToScroll-1)),v=r-S.value,h=r-(s.value-(S.value+1));return{before:Math.max(0,v),after:Math.max(0,h)}}),de=b(()=>q.value.before?L.value?C.value.slice(-1*q.value.before).reduce((o,r)=>o+r[_.value]+a.gap,0)*-1:q.value.before*Q.value*-1:0),ve=b(()=>{var o;if(L.value){const r=(g.value%u.length+u.length)%u.length;return he({slideSize:(o=C.value[r])===null||o===void 0?void 0:o[_.value],viewportSize:G.value[_.value],align:a.snapAlign})}return he({align:a.snapAlign,itemsToShow:+a.itemsToShow})}),ne=b(()=>{let o=0;if(L.value){if(g.value<0?o=C.value.slice(g.value).reduce((r,v)=>r+v[_.value]+a.gap,0)*-1:o=C.value.slice(0,g.value).reduce((r,v)=>r+v[_.value]+a.gap,0),o-=ve.value,!a.wrapAround){const r=C.value.reduce((v,h)=>v+h[_.value]+a.gap,0)-G.value[_.value]-a.gap;o=O({val:o,max:r,min:0})}}else{let r=g.value-ve.value;a.wrapAround||(r=O({val:r,max:s.value-+a.itemsToShow,min:0})),o=r*Q.value}return o*(M.value?1:-1)}),at=b(()=>{var o,r;if(!L.value){const p=g.value-ve.value;return a.wrapAround?{min:Math.floor(p),max:Math.ceil(p+Number(a.itemsToShow)-1)}:{min:Math.floor(O({val:p,max:s.value-Number(a.itemsToShow),min:0})),max:Math.ceil(O({val:p+Number(a.itemsToShow)-1,max:s.value-1,min:0}))}}let v=0;{let p=0,x=0-q.value.before;const T=Math.abs(ne.value+de.value);for(;p<=T;){const D=(x%u.length+u.length)%u.length;p+=((o=C.value[D])===null||o===void 0?void 0:o[_.value])+a.gap,x++}v=x-1}let h=0;{let p=v,x=0;for(p<0?x=C.value.slice(0,p).reduce((T,D)=>T+D[_.value]+a.gap,0)-Math.abs(ne.value+de.value):x=C.value.slice(0,p).reduce((T,D)=>T+D[_.value]+a.gap,0)-Math.abs(ne.value);x<G.value[_.value];){const T=(p%u.length+u.length)%u.length;x+=((r=C.value[T])===null||r===void 0?void 0:r[_.value])+a.gap,p++}h=p-1}return{min:Math.floor(v),max:Math.ceil(h)}}),it=b(()=>{if(a.slideEffect==="fade")return;const o=I.value?"Y":"X",r=I.value?Ee.y:Ee.x;let v=ne.value+r;if(!a.wrapAround&&a.preventExcessiveDragging){let h=0;L.value?h=C.value.reduce((T,D)=>T+D[_.value],0):h=(s.value-Number(a.itemsToShow))*Q.value;const p=M.value?0:-1*h,x=M.value?h:0;v=O({val:v,min:p,max:x})}return`translate${o}(${v}px)`}),lt=b(()=>({"--vc-carousel-height":le(a.height),"--vc-cloned-offset":le(de.value),"--vc-slide-gap":le(a.gap),"--vc-transition-duration":k.value?le(a.transition,"ms"):void 0})),Ce=oe({activeSlide:S,config:a,currentSlide:g,isSliding:k,isVertical:I,maxSlide:P,minSlide:V,nav:{slideTo:W,next:B,prev:U},normalizedDir:X,slideRegistry:d,slideSize:c,slides:u,slidesCount:s,viewport:w,visibleRange:at});je(j,Ce);const fe=oe({config:a,currentSlide:g,maxSlide:P,middleSlide:$e,minSlide:V,slideSize:c,slidesCount:s});return i(oe(Object.assign({data:fe,next:B,prev:U,restartCarousel:nt,slideTo:W,updateBreakpointsConfig:Y,updateSlideSize:R,updateSlidesData:ee},ut(Ce)))),()=>{var o;const r=t.default||t.slides,v=r?.(fe)||[],{before:h,after:p}=q.value,x=Oe({slides:u,position:"before",toShow:h}),T=Oe({slides:u,position:"after",toShow:p}),D=[...x,...v,...T];
1if(!a.enabled||!D.length)return A("section",{ref:m,class:["carousel","is-disabled"]},D);const K=((o=t.addons)===null||o===void 0?void 0:o.call(t,fe))||[],ot=A("ol",{class:"carousel__track",onMousedownCapture:a.mouseDrag?De:null,onTouchstartPassiveCapture:a.touchDrag?De:null,onWheel:a.mouseWheel?tt:null,style:{transform:it.value}},D),rt=A("div",{class:"carousel__viewport",ref:w},ot);return A("section",{ref:m,class:["carousel",`is-${X.value}`,`is-effect-${a.slideEffect}`,{"is-dragging":Ze.value,"is-hover":ye.value,"is-sliding":k.value,"is-vertical":I.value}],dir:X.value,style:lt.value,"aria-label":a.i18n.ariaGallery,tabindex:"0",onBlur:Ae,onFocus:Ke,onMouseenter:Ge,onMouseleave:qe},[rt,K,A(Tt)])}}});var be;(function(e){e.arrowDown="arrowDown",e.arrowLeft="arrowLeft",e.arrowRight="arrowRight",e.arrowUp="arrowUp"})(be||(be={}));const Le=e=>`icon${e.charAt(0).toUpperCase()+e.slice(1)}`,It={arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"};function Ot(e){return e in be}const Re=e=>e&&Ot(e),ke=$({props:{name:{type:String,required:!0,validator:Re},title:{type:String,default:e=>
1e.name?y.i18n[Le(e.name)]:""}},setup(e){const t=J(j,null);return()=>{const n=e.name;if(!n||!Re(n))return;const i=It[n],l=A("path",{d:i}),d=t?.config.i18n[Le(n)]||e.title,u=A("title",d);return A("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":d},[u,l])}}}),kt=$({name:"CarouselNavigation",inheritAttrs:!1,props:{carousel:{type:Object}},setup(e,{slots:t,attrs:n}){let i=J(j,null);const{next:l,prev:d}=t,u=()=>({btt:"arrowDown",ltr:"arrowLeft",rtl:"arrowRight",ttb:"arrowUp"})[i.normalizedDir],s=()=>({btt:"arrowUp",ltr:"arrowRight",rtl:"arrowLeft",ttb:"arrowDown"})[i.normalizedDir],m=b(()=>!i.config.wrapAround&&i.currentSlide<=i.minSlide),w=b(()=>!i.config.wrapAround&&i.currentSlide>=i.maxSlide);return()=>{if(e.carousel&&(i=e.carousel),!i)return console.warn("[vue3-carousel]: A carousel component must be provided for the navigation component to display"),"";const{i18n:c}=i.config,f=A("button",Object.assign(Object.assign({type:"button",disabled:m.value,"aria-label":c.ariaPreviousSlide,title:c.ariaPreviousSlide,onClick:i.nav.prev},n),{class:["carousel__prev",{"carousel__prev--disabled":m.value},n.class]}),d?.()||A(ke,{name:u()})),a=A("button",Object.assign(Object.assign({type:"button",disabled:w.value,"aria-label":c.ariaNextSlide,title:c.ariaNextSlide,onClick:i.nav.next},n),{class:["carousel__next",{"carousel__next--disabled":w.value},n.class]}),l?.()||A(ke,{name:s()}));return[f,a]}}}),Bt=$({name:"CarouselPagination",props:{disableOnClick:{type:Boolean},paginateByItemsToShow:{type:Boolean},carousel:{type:Object}},setup(e){let t=J(j,null);const n=b(()=>t.config.itemsToShow),i=b(()=>he({align:t.config.snapAlign,itemsToShow:n.value})),l=b(()=>e.paginateByItemsToShow&&n.value>1),d=b(()=>Math.ceil((t.activeSlide-i.value)/n.value)),u=b(()=>Math.ceil(t.slidesCount/n.value)),s=m=>We(l.value?{val:d.value,max:u.value-1,min:0}:{val:t.activeSlide,max:t.maxSlide,min:t.minSlide})===m;return()=>{var m,w;if(e.carousel&&(t=e.carousel),!t)return console.warn("[vue3-carousel]: A carousel component must be provided for the pagination component to display"),"";const c=[];for(let f=l.value?0:t.minSlide;f<=(l.value?u.value-1:t.maxSlide);f++){const a=Ue(t.config.i18n[l.value?"ariaNavigateToPage":"ariaNavigateToSli
1de"],{slideNumber:f+1}),g=s(f),S=A("button",{type:"button",class:{"carousel__pagination-button":!0,"carousel__pagination-button--active":g},"aria-label":a,"aria-pressed":g,"aria-controls":(w=(m=t.slides[f])===null||m===void 0?void 0:m.exposed)===null||w===void 0?void 0:w.id,title:a,disabled:e.disableOnClick,onClick:()=>t.nav.slideTo(l.value?Math.floor(f*+t.config.itemsToShow+i.value):f)}),E=A("li",{class:"carousel__pagination-item",key:f},S);c.push(E)}return A("ol",{class:"carousel__pagination"},c)}}}),jt=$({name:"CarouselSlide",props:{id:{type:String,default:e=>e.isClone?void 0:vt()},index:{type:Number,default:void 0},isClone:{type:Boolean,default:!1}},setup(e,{attrs:t,slots:n,expose:i}){const l=J(j);if(je(j,void 0),!l)return()=>"";const d=N(e.index),u=S=>{d.value=S},s=ft(),m=()=>{const S=s.vnode.el;return S?S.getBoundingClientRect():{width:0,height:0}};i({id:e.id,setIndex:u,getBoundingRect:m});const w=b(()=>d.value===l.activeSlide),c=b(()=>d.value===l.activeSlide-1),f=b(()=>d.value===l.activeSlide+1),a=b(()=>d.value>=l.visibleRange.min&&d.value<=l.visibleRange.max),g=b(()=>{if(l.config.itemsToShow==="auto")return;const S=l.config.itemsToShow,E=l.config.gap>0&&S>1?`calc(${100/S}% - ${l.config.gap*(S-1)/S}px)`:`${100/S}%`;return l.isVertical?{height:E}:{width:E}});return l.slideRegistry.registerSlide(s,e.index),ct(()=>{l.slideRegistry.unregisterSlide(s)}),e.isClone&&(Be(()=>{Me(s.vnode)}),dt(()=>{Me(s.vnode)})),()=>{var S,E;return l.config.enabled?A("li",{style:[t.style,Object.assign({},g.value)],class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":a.value,"carousel__slide--active":w.value,"carousel__slide--prev":c.value,"carousel__slide--next":f.value,"carousel__slide--sliding":l.isSliding},onFocusin:()=>{l.viewport&&(l.viewport.scrollLeft=0),l.nav.slideTo(d.value)},id:e.isClone?void 0:e.id,"aria-hidden":e.isClone||void 0},(E=n.default)===null||E===void 0?void 0:E.call(n,{currentIndex:d.value,isActive:w.value,isClone:e.isClone,isPrev:c.value,isNext:f.value,isSliding:l.isSliding,isVisible:a.value})):(S=n.default)===null||S===void 0?void 0:S.call(n)}}});export{Rt as C,kt as N,Bt as P,jt as S};
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.