1import{_ as I,u as b,f as R,w as B,g as S,h as $,e as k,c as f,i as n,j as h,d as s,t as w,k as o,l as V,m as L,F as A,r as D,n as E,p as i,q as P,s as F,o as N,v as O,P as j,x as q,y as M}from"./B0BgnTuM.js";import{S as Z}from"./YcXYw3u8.js";import{_ as z}from"./CjCuhmtw.js";import{u as H}from"./DIUxpHLk.js";import"./DasAkklF.js";import"./BG18-sPC.js";import"./Ds9uqcOs.js";const X={class:"related-work"},G={class:"callout t-eye-m"},J={class:"header-titles t-h-m"},K={class:"recent-works"},Q={class:"related-list"},W=3,Y={__name:"WorkRelatedWork",props:{currentWork:{type:Object,required:!0}},async setup(y){let a,d;const r=y,v=b(),{locale:c}=R(),_=i(()=>({"fr-fr":"fr-FR","en-us":"en-US"})[c.value]??"*"),t=i(()=>(r.currentWork.data.related_works||[]).map(e=>e.work).filter(e=>e&&e.id)),g=i(()=>(r.currentWork?.data?.work_tags||[]).map(e=>e?.tag?.id).filter(Boolean)),{data:x}=([a,d]=B(async()=>S(()=>`related-works-${r.currentWork.id}-${c.value}`,async()=>{const e=W-t.value.length;if(e<=0)return[];if(!g.value.length)return[];const m=[r.currentWork.id,...t.value.map(p=>p.id)];return(await v.client.getByType("work",{lang:_.value,pageSize:e+m.length,filters:[$.any("my.work.work_tags.tag",g.value),$.not("document.id",r.currentWork.id)],fetchLinks:["tag.label"]})).results.filter(p=>!m.includes(p.id)).slice(0,e)},{watch:[c]})),a=await a,d(),a),u=i(()=>{const e=x.value||[];return[...t.value,...e].slice(0,W)});return(e,m)=>{const l=L,p=z,T=E;return k(),f("section",X,[n(l,{class:"related-header"},{default:h(()=>[s("div",G,[s("p",null,w(e.$t("work.related_callout")),1)]),s("div",J,[s("p",null,w(e.$t("work.related_title")),1),s("p",K,"("+w(o(V)(o(u).length))+")",1)])]),_:1}),s("ul",Q,[(k(!0),f(A,null,D(o(u),(C,U)=>(k(),f("li",{key:U},[n(l,null,{default:h(()=>[n(p,{work:C},null,8,["work"])]),_:2},1024)]))),128))]),n(l,{class:"more-link t-body-l"},{default:h(()=>[n(T,{field:{url:"/work",target:"_blank",text:e.$t("work.related_link")},"has-number":!0,"is-underlined":!0,"has-arrow":!0},null,8,["field"])]),_:1})])}}},ee=I(Y,[["__scopeId","data-v-80505ee1"]]),te={class:"page-work-uid work"},se={class:"main-content"},oe={class:"callout t-eye-m"},ae=["textContent"],ne={class:"content t-display-xl"},re={class:"sub-content t-body-l"},ce={__name:"[uid]",async setup(y){let a,d;const{pageEnter:r}=P(),v=b(),c=F(),{locale:_}=R(),{data:t}=([a,d]=B(()=>S(()=>`work-${c.params.uid}-${_.value}`,()=>v.client.getByUID("work",c.params.uid,{lang:_.value}),{watch:[_]})),a=await a,d(),a);return H({data:i(()=>t.value?.data),fallbackTitle:i(()=>t.value?.data?.work_name)}),N(()=>{r()}),(g,x)=>{const u=j,e=L,m=Z,l=ee;return k(),f("main",te,[s("section",null,[n(e,{class:"work-hero grid"},{default:h(()=>[s("div",se,[s("div",oe,[s("p",{textContent:w(o(t).data?.hero_callout)},null,8,ae)]),s("div",ne,[n(u,{field:o(t).data?.hero_title},null,8,["field"])])]),s("div",re,[o(t).data?.hero_description?(k(),q(u,{key:0,field:o(t).data?.hero_description},null,8,["field"])):M("",!0)])]),_:1})]),n(m,{slices:o(t)?.data?.slices,components:o(O)},null,8,["slices","components"]),n(l,{"current-work":o(t)},null,8,["current-work"])])}}},ke=I(ce,[["__scopeId","data-v-0273a66d"]]);export{ke 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.