1import{Et as e,F as t,G as n,I as r,In as i,Kn as a,L as o,Mt as s,O as c,P as l,R as u,Rt as d,Vt as f,dn as p,gr as m,on as h,pn as g,vt as _,w as v,yr as y,yt as b}from"./BLgLKhu-.js";import{Bt as x,Tt as S,wt as C}from"./9sedMJ78.js";import{T as w,_ as T,c as E,i as D,o as O}from"./rPh1uN6N.js";import{C as ee,E as k,a as A,c as j,s as M,t as N}from"./BGcCPlsh.js";import{t as P}from"./BM-ZOL4J.js";import{t as F}from"./BLYTv1WP.js";import{n as I,r as L}from"./BjUk7vfn.js";import{n as R,t as z}from"./CCwgc6Fp.js";var B=[`innerHTML`],V={__name:`SetDescription`,props:{setId:String,set:Object},setup(e){let t=e,n=N(),r=l(()=>t.set||n.graph.get(t.setId)),i=l(()=>{let e=n.getItemLocalizedProperty(r,`schema:description`);return e?E.parse(e):null});return O([...i.value?[D({description:n.getItemLocalizedProperty(r,`schema:description`),inLanguage:n.locale})]:[]]),(e,t)=>{let n=f(`internal-links`);return a(i)?g((s(),u(`div`,{key:0,class:`set-description k-md`,innerHTML:a(i)},null,8,B)),[[n]]):o(``,!0)}}},H={__name:`SetListItem`,props:{recordId:String,record:Object,setId:String,setUri:String,stackPart:Boolean,asList:Boolean,columnCount:Number,listIndex:Number},setup(t){let i=t,o=C(),c=N(),f=l(()=>i.record||c.graph.get(i.recordId)),m=l(()=>c.hasStackField&&!i.stackPart&&f.value?.[`kleioapi:stack_count`]>1),g=l(()=>m.value&&(o.query[`dc:isPartOf`]&&M(o.query[`dc:isPartOf`])||[]).includes(f.value[`dc:isPartOf`])),b=l(()=>g.value&&c.lists.get(j(`threems:searchVia/dc:isPartOf`,{"dc:isPartOf":f.value[`dc:isPartOf`],"kleioapi:in_set":i.setUri||i.setId}))),S=l(()=>m.value&&f.value[`kleioapi:stack_count`]);return h(g,e=>{e&&F(i.setUri||i.setId,f.value[`dc:isPartOf`])}),e(async()=>{g.value&&F(i.setUri||i.setId,f.value[`dc:isPartOf`])}),(e,t)=>{let o=R;return s(),u(v,null,[n(o,_(e.$attrs,{"record-id":i.recordId,"set-id":i.setId,"set-uri":i.setUri,"column-count":i.columnCount,"as-list":i.asList,"stack-open":!!a(b)?.length,"list-index":i.listIndex}),null,16,[`record-id`,`set-id`,`set-uri`,`column-count`,`as-list`,`stack-open`,`list-index`]),n(x,{name:`bundle`},{default:p(()=>[(s(!0),u(v,null,d(a(b),(e,t)=>(s(),r(o,{key:`srp`+e,class:`set-record-stack-item`,style:y({"--total":a(S),"--i":t}),"record-id":e,"set-id":i.setId,"set-uri":i.setUri,"column-count":i.columnCount,"as-list":i.asList,"stack-part":``},null,8,[`style`,`record-id`,`set-id`,`set-uri`,`column-count`,`as-list`]))),128))]),_:1})],64)}}},U={__name:`SetList`,setup(f){let p=C(),h=S(),g=N(),_=i(),x=l(()=>{if(p.name==`slug`)return{uri:g.getSpaceChildrenFirstSetId};{let{user_id:e,uri:t}=A(p.params.set)||{};return e&&!t&&(t=g.user_ids.get(`kleio:Set`)?.get(e)),{user_id:e,uri:t}}}),E=l(()=>!!g.getItemLocalizedProperty(x,`schema:description`)),D=l(()=>{let e=j(`/${ee}/${x.value.uri}/${k}/`);if(g.lists.has(e))return e}),O=l(()=>D.value&&g.lists.get(D.value)),F=i(!1),R=i(!1),B=l(()=>g.paginations.get(D.value)?.first||0),U=l(()=>B.value>0),W=l(()=>B.value+O.value?.size<g.paginations.get(D.value)?.count),G=l(()=>{if(!g.hasStackField)return!1;let e=new Set(M(p.query[`dc:isPartOf`])||[]);if(!e)return!1;for(let t of O.value||[]){let n=g.graph.get(t)?.[`dc:isPartOf`];if(n&&e.has(n))return!0}return!1}),K=l(()=>x.value.uri),q=l(()=>x.value.uri),J=l(()=>g.graph.get(K.value)?.[`kleio:display_as_list`]),Y=l(()=>p.query?.search),X=()=>_.value&&parseInt(window.getComputedStyle(_.value).getPropertyValue(`--k-grid-count`)?.trim()||1),Z=i(X()),Q=l(()=>Z.value?(B.value-1)%Z.value:1);T(_,()=>{Z.value=X()});let te=l(()=>({"--k-column-count":Z.value,"--k-column-align":Q.value})),ne=l(()=>{let{contact:e,imprint:t,lang:n,page:r,"dc:isPartOf":i}=p.query,a;return a=e||t?`${g.getCanonicalBase}${h.resolve({name:`slug`,query:{lang:n,contact:e,imprint:t}}).fullPath}`:`${g.getCanonicalBase}${h.resolve({query:{page:r,lang:n,...i&&{"dc:isPartOf":i},...!p.name===`slug`&&g.canCollapseMenu&&{nav:!0}}}).fullPath}`,I(a)}),re=l(()=>{let e=g.paginations.get(D.value);return[...ne.value,(p.query.page||1)*25<e?.count&&{rel:`next`,href:h.resolve({query:{...p.query,page:p.query.page+1}}).href},(p.query.page||1)>1&&e?.count>25&&{rel:`prev`,href:h.resolve({query:{...p.query,page:p.query.page-1}}).href}].filter(e=>!!e)});w({link:re});let $=async(e=!1)=>
1{if(!(e&&!U.value)){if(e){let e=D.value.includes(x.value.user_id)?x.value.user_id:x.value.uri,t=_.value.querySelector(`a.set-record:first-of-type`)?.id,n=_.value.querySelector(`#`+t)?.getBoundingClientRect()?.y||0;F.value=!0,await P(e,{from:B.value-25,size:25,sidecars:!0},!0,!1),F.value=!1,await b(),await b(),window?.scrollTo({left:0,top:_.value.querySelector(`#`+t)?.getBoundingClientRect()?.top-n,behavior:`instant`}),await b()}else{let e=D.value.includes(x.value.user_id)?x.value.user_id:x.value.uri;R.value=!0,await P(e,{from:B.value+O.value.size,size:25,sidecars:!0},!0,!1),R.value=!1,await b()}}};return z(async({isTop:e,isBottom:t,direction:n})=>{g.pending.has(D.value)||(e&&n===`up`&&U.value?await $(!0):t&&(n===`down`||!U.value)&&W.value&&await $())},{offset:5,immediate:!1,canLoadMore:()=>!g.pending.has(D.value)&&(W.value||U.value)}),e(async()=>{!g.route_from.name&&U.value&&window?.scrollTo(0,20)}),(e,i)=>{let l=V,f=H,p=L;return s(),u(`div`,{ref_key:`list_element_ref`,ref:_,class:m([`set-record-list`,[{"as-list":a(J),"as-grid":!a(J),"open-stack":a(G),"has-description":a(E),"has-more-end":a(W),"has-more-start":a(U)},...a(g).getSpaceStylingClasses,`columns-${a(Z)}`]]),style:y(a(te))},[a(U)?o(``,!0):(s(),r(l,{key:0,"set-id":a(x).uri},null,8,[`set-id`])),a(U)?(s(),u(`button`,{key:1,type:`button`,class:`set-record-list-placeholder top`,onClick:i[0]||=()=>$(!0)},[t(`div`,{class:m([`dots`,{"loading-dots":a(F)}])},null,2)])):o(``,!0),(s(!0),u(v,null,d(a(O),(e,t)=>(s(),r(f,{id:`setindex${a(B)+t}`,key:`sl`+e,"record-id":e,"as-list":a(J),"set-id":a(K),"set-uri":a(q),"column-count":a(Z),"list-index":a(B)+t},null,8,[`id`,`record-id`,`as-list`,`set-id`,`set-uri`,`column-count`,`list-index`]))),128)),a(W)?(s(),u(`button`,{key:2,type:`button`,class:`set-record-list-placeholder bottom`,onClick:i[1]||=()=>$()},[t(`div`,{class:m([`dots`,{"loading-dots":a(R)}])},null,2)])):o(``,!0),a(Y)?(s(),r(c,{key:3,to:`body`},[n(p)])):o(``,!0)],6)}}};export{U as t};
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.