PageSourceSearch

https://assets.prod.prolicht.at/build/assets/BenefitsSlider-B0T8M2ZU.js

js prolicht.at collected 2026-10-04 18:04:48 UTC 6,629 bytes, 1 lines download raw bytes

1import{_ as Z}from"./SliderNavigation-nI-7DbmZ.js";import{_ as G}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{p as c,e as D,v as j,y as J,z as P,f as a,a as l,b as Q,i as g,n as O,m,t as p,F as I,r as V,k as _,o as s}from"./app-f0MxXKHs.js";import"./AnimatedButton-Czi8AioW.js";const W={class:"relative overflow-hidden w-full h-80 md:w-[537px] md:h-[478px] md:shrink-0 lg:w-auto lg:h-auto lg:flex-1 lg:min-w-0"},X=["src","poster"],ee=["src","alt"],te={key:2,class:"absolute bottom-2.5 right-2.5 z-10 md:bottom-5 md:right-5"},ae={key:0,class:"self-stretch flex flex-col justify-start items-start gap-3"},le={key:0,class:"inline-flex justify-start items-center gap-1"},se={class:"text-dark text-xs font-narrow uppercase leading-4 tracking-[0.12px]"},ie={key:1,class:"self-stretch text-dark text-[32px] font-light font-narrow leading-[38px] tracking-[-0.96px] md:text-[40px] md:leading-[46px] md:tracking-[-1.2px]"},ne={key:1,class:"self-stretch flex flex-col justify-start items-start gap-8"},oe={class:"flex-1 text-dark text-base font-light font-narrow"},re={key:2,class:"relative flex-1 self-stretch min-h-0"},de={class:"flex-1"},ce={class:"text-dark text-base font-light font-narrow"},ue={key:0,class:"text-gray-500 text-base font-light font-narrow"},fe=.28,ge={__name:"BenefitsSlider",props:{title:{type:String,default:"BENEFIT
1S [MOCK TEST]"},headline:{type:String,default:""},slides:{type:Array,required:!0,validator:e=>e.every(u=>(u.image||u.video)&&u.benefits&&Array.isArray(u.benefits))},background:{type:String,default:"pearl",validator:e=>["pearl","marble","white","dark","ivory","darker"].includes(e)},autoRotate:{type:Boolean,default:!0},autoRotateInterval:{type:Number,default:5e3},showNavigation:{type:Boolean,default:!1},alignBenefits:{type:String,default:"stretch",validator:e=>["stretch","end"].includes(e)},paddingTop:{type:String,default:""},paddingBottom:{type:String,default:""}},emits:["slideChange"],setup(e,{emit:u}){const n=e,q=u,v=c(0),b=c(0),z=c(null),C=c(null),h=c(0),x=c(null),E=c([]);let w=null,S=null;const d=D(()=>n.slides[v.value]||n.slides[0]),N=D(()=>!!(n.title||n.headline)),B=()=>{const i=z.value||C.value;i&&(h.value=i.clientHeight)},f=()=>{const i=x.value;if(!i)return;const t=i.getBoundingClientRect(),o=t.top,r=t.height,k=r*fe,K=i.querySelectorAll("[data-benefit-item]"),H=[];K.forEach(U=>{const M=U.getBoundingClientRect(),y=M.top+M.height/2-o;let T=1;if(y<k)T=Math.max(0,y/k);else if(y>r-k){const Y=r-y;T=Math.max(0,Y/k)}H.push(T)}),E.value=H},$=()=>{f()},R={pearl:"bg-pearl",marble:"bg-marble",white:"bg-white",dark:"bg-dark",ivory:"bg-ivory",darker:"bg-[#10100E]"},L=()=>{if(!n.autoRotate||n.autoRotateInterval===0||n.slides.length<=1)return;const i=Date.now();S=setInterval(()=>{const t=Date.now()-i;b.value=Math.min(t/n.autoRotateInterval,1)},16),w=setTimeout(()=>{F()},n.autoRotateInterval)},A=()=>{w&&clearTimeout(w),S&&clearInterval(S),b.value=0},F=()=>{A();const i=(v.value+1)%n.slides.length;v.value=i,q("slideChange",i),L()};return j(()=>n.slides.length,i=>{i>1&&L()},{immediate:!0}),j(v,()=>{setTimeout(()=>{B(),x.value&&(x.value.scrollTop=0),f()},50)}),j(h,()=>{requestAnimationFrame(f)}),J(()=>{f(),window.addEventListener("resize",f)}),P(()=>{A(),window.removeEventListener("resize",f)}),(i,t)=>(s(),a("section",{class:m(["w-full overflow-hidden",R[e.background]])},[l("div",{class:m(["max-w-[1600px] mx-auto px-5 flex flex-col gap-8 md:max-w-[1194px] md:px-10 md:flex-row md:justify-between md:gap-10 lg:max-w-[1600px] lg:px-[50px] lg:gap-[50px]",e.paddingTop||"pt-10 md:pt-20 lg:pt-28",e.paddingBottom||"pb-10 md:pb-20 lg:pb-28",e.alignBenefits==="end"?"md:items-end":"md:items-stretch"])},[l("div",W,[d.value.video?(s(),a("video",{key:d.value.video,ref_key:"videoRef",ref:C,src:d.value.video,poster:d.value.image||void 0,autoplay:"",muted:"",loop:"",playsinline:"",preload:"metadata",class:"w-full h-full bg-dark object-contain p-4 md:p-8 lg:p-16 lg:h-auto lg:block lg:max-w-full",onLoadedmetadata:B},null,40,X)):(s(),a("img",{key:1,ref_key:"imageRef",ref:z,src:d.value.image,alt:e.headline,class:"w-full h-full object-cover lg:h-auto lg:block lg:max-w-full",onLoad:B},null,40,ee)),e.slides.length>1||e.showNavigation?(s(),a("div",te,[Q(Z,{progress:b.value,"spinner-size":20,variant:"light",onClick:F},null,8,["progress"])])):g("",!0)]),l("div",{class:m(["flex flex-col items-start gap-8 overflow-hidden lg:w-[725px] lg:flex-none lg:shrink-0 benefits-content-col",e.alignBenefits==="end"?"md:w-[537px] justify-end":["md:flex-1 md:gap-20",N.value?"justify-start":"justify-end"]]),style:O(e.alignBenefits!=="end"&&h.value>0?`height: ${h.value}px;`:"")},[N.value?(s(),a("div",ae,[e.title?(s(),a("div",le,[t[0]||(t[0]=l("div",{class:"text-dark text-xs font-narrow uppercase leading-4 tracking-[0.12px]"},"✺",-1)),l("div",se,p(e.title),1)])):g("",!0),e.headline?(s(),a("div",ie,p(e.headline),1)):g("",!0)])):g("",!0),e.alignBenefits==="end"?(s(),a("div",ne,[(s(!0),a(I,null,V(d.value.benefits,(o,r)=>(s(),a("div",{key:r,class:"self-stretch inline-flex justify-start items-start gap-2"},[t[1]||(t[1]=l("div",{class:"text-base font-light font-narrow text-dark shrink-0"},"✺",-1)),l("div",oe,p(o.title),1)]))),128))])):(s(),a("div",re,[l("div",{class:m(["hidden md:block absolute top-0 left-0 right-0 h-20 pointer-events-none z-10",R[e.background]]),style:{"mask-image":"linear-gradient(to bottom, black 0%, transparent 100%)","-webkit-mask-image":"linear-gradient(to bottom, black 0%, transparent 100%)"}},null,2),l("div",{class:m(["hidden md:block absolute bottom-0 left-0 right-0 h-20 pointer-events-none z-10",R[e.background]]),style:{"mask-image":"linear-gradient(to top, black 0%, transparent 100%)","-webkit-mask-image":"linear-gradient(to top, black 0%, transparent 100%)"}}
1,null,2),l("div",{ref_key:"benefitsListRef",ref:x,class:"h-auto overflow-visible md:h-full md:overflow-y-scroll flex flex-col justify-start items-start gap-8 benefits-scroll",onScroll:$},[t[3]||(t[3]=l("div",{class:"h-10 w-full shrink-0"},null,-1)),(s(!0),a(I,null,V(d.value.benefits,(o,r)=>(s(),a("div",{key:r,"data-benefit-item":"",class:"self-stretch inline-flex justify-start items-start gap-2 transition-opacity duration-150",style:O({opacity:E.value[r]??1})},[t[2]||(t[2]=l("div",{class:"text-base font-light font-narrow text-dark shrink-0"}," ✺ ",-1)),l("div",de,[l("span",ce,[_(p(o.title),1),o.description?(s(),a(I,{key:0},[_(": ")],64)):g("",!0)]),o.description?(s(),a("span",ue,p(o.description),1)):g("",!0)])],4))),128)),t[4]||(t[4]=l("div",{class:"h-10 w-full shrink-0"},null,-1))],544)]))],6)],2)],2))}},xe=G(ge,[["__scopeId","data-v-afa078c0"]]);export{xe 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.