import{A as e,B as t,D as n,H as r,M as i,U as a,W as o,_ as s,a as c,c as l,f as u,g as d,i as f,m as p,v as m,x as h}from"./index-HVdHQ9Gs.js";import{n as g}from"./utils-eoENTS7j.js";var _={id:`Friends`,class:`general-page`},v={key:0,class:`friends`},y=[`src`],b={class:`info`},x={class:`name unselectable`},S={class:`links`},C=[`href`],w=l(h({__name:`Friends`,setup(l){let h=new Set([`name`,`avatar`,`banner`,`desc`]),w={blog:`fas fa-book`},T=t([]),E=e=>e.banner?{"background-image":`url("${e.banner}")`}:{},D=e=>Object.entries(e).filter(([e,t])=>!h.has(e)&&typeof t==`string`).map(([e,t])=>({link:t,icon:f.includes(e)?`fab fa-${e}`:e in w?w[e]:e}));return n(async()=>{T.value=await(await fetch(`${c.content}/content/generated/friends/friends.json`)).json(),T.value.forEach(e=>{e.avatar.startsWith(`http`)||(e.avatar=`${c.content}/${e.avatar}`),e.banner&&!e.banner.startsWith(`http`)&&(e.banner=`${c.content}/${e.banner}`)}),T.value=g(T.value)}),(t,n)=>(e(),s(`div`,_,[n[0]||=p(`div`,{class:`title`},[p(`h2`,null,`朋友们`),p(`div`,{class:`subtitle`},[m(` 是小桂桂的朋友们（欢迎补充`),p(`br`),m(` 每次刷新都会打乱顺序！ `)])],-1),T.value?(e(),s(`div`,v,[(e(!0),s(u,null,i(T.value,t=>(e(),s(`div`,{class:`friend card`,key:t.name},[p(`div`,{class:`banner`,style:a(E(t))},null,4),p(`img`,{class:`avatar`,src:t.avatar,alt:``},null,8,y),p(`div`,b,[p(`div`,x,o(t.name),1),p(`div`,S,[(e(!0),s(u,null,i(D(t),t=>(e(),s(`a`,{href:t.link},[p(`i`,{class:r(t.icon)},null,2)],8,C))),256))])])]))),128))])):d(``,!0)]))}}),[[`__scopeId`,`data-v-ccf99b59`]]);export{w as default};