1import{_}from"./IeWHhHgp.js";import{y as m,k as a,e as W,n as b,h as p,b as x,o as c,i as T,F as E,r as B,j as w,d as t,l as I,aj as S}from"./undBNpYC.js";import"./7lA2ma5w.js";import"./CaBSkhOB.js";import"./BbLdXTaM.js";import"./CqkleIqs.js";import"./B_B9BdO8.js";import"./S88ML_lo.js";import"./DlAUqK2U.js";import"./CY9uPDIN.js";const M={key:0,class:"overflow-hidden"},$=60,P={__name:"BuilderImageSlider",props:{sliderType:{type:String,default:"small"},smallItemWidth:{type:String,default:"15vw"},images:{type:Array,default:()=>[]}},setup(u){const e=u,i=m(null),r=m(0),l=m(2),v=a(()=>Array.from({length:l.value},()=>e.images).flat()),h=a(()=>r.value?`${Math.round(r.value/$)}s`:"60s"),g=a(()=>e.sliderType==="portrait"?"w-[55vw] sm:w-[40vw] lg:w-[30vw] aspect-[620/827]":e.sliderType==="landscape"?"w-[75vw] sm:w-[55vw] lg:w-[45vw] aspect-[827/620]":e.smallItemWidth==="30vw"?"w-[30vw]":"w-[45vw] lg:w-[15vw]"),f=a(()=>e.sliderType==="portrait"?{desktop:"700",mobile:"500"}:e.sliderType==="landscape"?{desktop:"900",mobile:"600"}:e.smallItemWidth==="30vw"?{desktop:"700",mobile:"500"}:{desktop:"400",mobile:"280"}),y=a(()=>e.sliderType==="small"?"gap-[100px]":"gap-[44px]");return W(()=>{b(()=>{if(!i.value)return;const o=i.value.children[e.images.length];if(!o)return;const s=o.offsetLeft;if(!s)return;const d=i.value.parentElement?.offsetWidth??window.innerWidth,n=Math.ceil(d/s)+1;n>l.value&&(l.value=n),r.value=s})}),(o,s)=>{const d=_;return u.images?.length?(c(),p("div",M,[T("div",{ref_key:"trackEl",ref:i,class:w(["flex will-change-transform",t(y)]),style:S({animation:`image-slider-marquee ${t(h)} linear infinite`,"--anim-distance":`${t(r)}px`})},[(c(!0),p(E,null,B(t(v),(n,k)=>(c(),p("div",{key:k,class:w(["shrink-0 overflow-hidden",t(g)])},[I(d,{media:n,width:t(f).desktop,"mobile-width":t(f).mobile},null,8,["media","width","mobile-width"])],2))),128))],6)])):x("",!0)}}};export{P 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.