1import{_ as et}from"./CiyatyaP.js";import{_ as nt}from"./DIC78jUW.js";import st from"./sVWmrBH2.js";import{_ as at}from"./DmKu2Osn.js";import{d as it,w as z,i as W,k as ot,c as v,l as s,e as ct,q as A,m as p,F as B,s as P,b as n,O as F,A as h,r,o as l,I as rt,a_ as lt,_ as dt}from"./CIIKI5oo.js";import{u as mt}from"./6vudVEf2.js";import{u as ut,g as vt}from"./Bq8SYlkn.js";import"./BKxUr3ld.js";import"./DZFuRO9f.js";import"./Cuell-tj.js";import"./BV5HSEtN.js";const ht={class:"RelatedEventsContentBlock"},_t={class:"grid"},gt={class:"col-1-1 flex align-center justify-space-between mb-lg"},pt={key:1},ft={class:"col-1-1"},bt={class:"events-track"},kt={class:"swiper-nav-wrapper flex align-center mt-md"},Rt={class:"progress-bar"},wt={class:"button-wrapper"},yt=["aria-label","disabled"],Ct=["aria-label","disabled"],xt=1024,V=12,E=3,X=2,It=it({__name:"RelatedEvents",props:{content:{},breadCrumb:{},settings:{},contentblockIdx:{}},async setup(o){let d,f;lt(t=>({b547ec04:n(D),c2bd385e:n(q),v85c9b0dc:n(Y),v5563de85:n(K),v2b6654a7:n(J)}));const{translate:$}=mt(),m=o,j=([d,f]=z(()=>vt()),d=await d,f(),d),H=h(()=>{const t={};return t.genre=m.content.genreList?.map(e=>e._id)??[],t.eventAttribute=m.content.labelList?.map(e=>e._id)??[],t}),{fetchEvents:M,events:_,setPageSize:N,setItemsIncluded:U}=ut(j,{initialActiveFilters:H.value,instanceKey:m.contentblockIdx});if(N(6),m.content.eventList&&m.content.eventList!=null){const t=m.content.eventList.map(e=>e._id);U(t)}[d,f]=z(()=>M()),await d,f();const a=r(0);function R(t){a.value=Math.min(Math.max(a.value+t,0),_.value.length-1)}const w=r(null),O=r(0),S=r(0),y=r(0);function G(){return typeof window>"u"||window.innerWidth>=xt?2:1}function C(){if(!w.value)return;const t=w.value.offsetWidth;if(t===0)return;const e=G(),i=(t-e*V)/(61/47.5+e*(31/47));O.value=i,S.value=i*(61/47.5),y.value=i*(31/47)}const K=h(()=>`${S.value}px`),q=h(()=>`${y.value}px`),Y=h(()=>`${O.value}px`),D=h(()=>`translateX(${a.value*-(y.value+V)}px)`);W(()=>{C(),window.addEventListener("resize",C)}),ot(()=>{window.removeEventListener("resize",C)});let L=0;const b=[{widthRem:24.5,heightRem:42,marginTopRem:0},{widthRem:19.6,heightRem:29.2,marginTopRem:2.4},{widthRem:19.6,heightRem:29.2,marginTopRem:4.8},{widthRem:19.6,heightRem:29.2,marginTopRem:7.2}],x=r(null),I=r(1),J=h(()=>`${b[0].heightRem*I.value}rem`);W(()=>{if(!x.value)return;const t=parseFloat(getComputedStyle(document.documentElement).fontSize),e=x.value.offsetWidth;I.value=(e-E*X*t)/(b[0].widthRem*t)});function Q(t){if(t<0||t>E)return{display:"none"};const e=b[t],i=I.value,T=b[0].widthRem*i,g=e.widthRem*i,k=t===0?0:T-g+t*X;return{display:"",zIndex:E-t,width:`${g}rem`,height:`${e.heightRem*i}rem`,transform:`translateX(${k}rem) translateY(${e.marginTopRem*i}rem)`,transition:"transform 0.35s ease"}}function Z(t){L=t.touches[0].clientX}function tt(t){const e=L-t.changedTouches[0].clientX;Math.abs(e)<40||R(e>0?1:-1)}return(t,e)=>{const i=et,T=nt,g=st,k=at;return l(),v("div",ht,[s("div",_t,[s("div",gt,[o.content.title?(l(),ct(i,{key:0,class:"heading-2 mb-0","heading-type":o.content.seoHeadingtype,title:o.content.title},null,8,["heading-type","title"])):A("",!0),o.content.linkObject?(l(),v("div",pt,[p(T,{class:"btn-tertiary",tertiary:!0,name:o.content.linkObject?.name,link:o.content.linkObject?.link,target:o.content.linkObject?.target},null,8,["name","link","target"])])):A("",!0)]),s("div",ft,[s("div",{ref_key:"eventsOuterRef",ref:w,class:"events-outer"},[s("div",bt,[(l(!0),v(B,null,P(n(_),(u,c)=>(l(),v("div",{key:c,class:rt(["event-slot",{"is-active":n(a)===c}])},[p(g,{event:u,"is-active":n(a)===c},null,8,["event","is-active"])],2))),128))])],512),s("div",{ref_key:"stackRef",ref:x,class:"mobile-card-stack",onTouchstartPassive:Z,onTouchendPassive:tt},[(l(!0),v(B,null,P(n(_),(u,c)=>(l(),v("div",{key:u._id??c,class:"stack-card",style:F(Q(c-n(a)))},[p(g,{event:u,"is-active":n(a)===c},null,8,["event","is-active"])],4))),128))],544),s("div",kt,[s("div",Rt,[s("div",{class:"progress-fill",style:F({width:`${(n(a)+1)/n(_).length*100}%`})},null,4)]),s("div",wt,[s("button",{"aria-label":n($)("Vorige slide"),class:"btn btn-secondary",disabled:n(a)===0,onClick:e[0]||(e[0]=u=>R(-1))},[p(k,{name:"caret-left",weight:"duotone",size:24})],8,yt),s("button",{"aria-label":n($)("Volgende slide"),class:"btn btn-secondary",disabled:n(a)===n(_).length-1,onClick:e[1]||(e[1]=u=>R(1))},[p(k,{name:"caret-right",weight:"duotone",size:24})],8,Ct)])])])])])}}}),Ft=dt(It,[["__scopeId","data-v-3044d108"]]);export{Ft 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.