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