1import{b0 as H,c9 as Y,aT as X,aL as Z,aW as J,a$ as Q,aU as ee,aV as te,bh as se,bc as ae}from"#entry";import{_ as oe}from"./DhBjolzu.js";import{d as re,ae as B,c,r as G,e as ne,E as l,V as g,a3 as u,a2 as o,a8 as t,ag as S,j as A,I as r,ac as y,F as j,ad as z,a4 as C,a6 as k,ah as le,y as ie,ai as de}from"./BQmUMq8P.js";import{u as ue}from"./ByCM5PZ5.js";import{u as ce}from"./zqs-p1Ef.js";import{u as me,d as pe,a as fe}from"./TGajTHYM.js";import"./DJlyOly4.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};m.SENTRY_RELEASE={id:"6be9758297c19841282f0f2f141a80fdd4e83eee"};var i=new m.Error().stack;i&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[i]="fa8495e5-a750-4746-9ab5-ec60b4e6128a",m._sentryDebugIdIdentifier="sentry-dbid-fa8495e5-a750-4746-9ab5-ec60b4e6128a")}catch{}})();const ge={class:"flex flex-col lg:flex-row gap-6"},ye={class:"order-2 lg:order-1 w-full lg:w-1/3"},be={class:"bg-gray-800/60 backdrop-blur-md border border-white/10 rounded-xl p-5 sticky"},_e={class:"text-sm font-semibold text-gray-400"},ve={class:"flex items-center gap-2 min-w-0"},he={class:"truncate"},xe={class:"text-sm font-semibold text-gray-400 shrink-0"},we={class:"order-1 lg:order-2 w-full lg:w-2/3"},ke={class:"relative mb-6"},Ee={key:0,class:"mb-4 flex items-center gap-2"},Se={class:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium bg-primary/20 text-primary"},Ce={key:1,class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Ie={class:"bg-gray-800 rounded-lg overflow-hidden h-full transition-transform duration-300 group-hover:-translate-y-1"},Le={key:0,class:"h-40 bg-gray-700"},Ne={key:1,class:"h-40 bg-linear-to-br from-gray-700 to-gray-800 flex items-center justify-center"},De={class:"p-5"},Oe={key:0,class:"text-gray-400 text-sm line-clamp-2 mb-3"},Be={class:"text-gray-500 text-xs"},Ge={key:2,class:"text-center py-12 bg-gray-800 rounded-lg"},Ke=re({__name:"index",async setup(m){let i,v;const R=Z(),b=H(),W=Y(),{t:p}=X(),T=R.public.apiUrl,{data:$}=([i,v]=B(()=>Q(`${T}/public/knowledgebase?summary=1`,{key:"kb-articles",default:()=>({data:[]})},"$_cYXP8Ziio")),i=await i,v(),i),h=c(()=>$.value?.data||[]);J({title:p("SEO_KNOWLEDGEBASE"),meta:[{name:"description",content:p("SEO_KNOWLEDGEBASE_DESCRIPTION")},{property:"og:title",content:p("SEO_KNOWLEDGEBASE")},{property:"og:description",content:p("SEO_KNOWLEDGEBASE_DESCRIPTION")},{property:"og:type",content:"website"}],script:b.query.embedded==="true"?[{src:"https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.2/iframeResizer.contentWindow.min.js",async:!0}]:[]});const x=ue();[i,v]=B(()=>x.fetchGames()),await i,v();const d=G(""),n=G(b.query.game||null),E=s=>s.replace(/-server-hosting$/,""),_=c(()=>n.value&&x.games.find(e=>E(e.slug)===n.value||e.slug===n.value)?.id||null),L=c(()=>{if(!_.value)return null;const s=x.games.find(e=>e.id===_.value);return s?E(s.slug):null});ce(()=>L.value?`${b.path}?game=${L.value}`:b.path),ne(n,s=>{const e={};s&&(e.game=s),b.query.embedded==="true"&&(e.embedded="true"),W.replace({query:e})});const N=c(()=>{if(!h.value||!x.games)return[];const s={};return h.value.forEach(e=>{e.gameId&&(s[e.gameId]=(s[e.gameId]||0)+1)}),x.games.filter(e=>s[e.id]).map(e=>({id:e.id,slug:e.slug,name:e.name,logoImage:e.logoImage,articleCount:s[e.id]})).sort((e,w)=>e.name.localeCompare(w.name))}),V=c(()=>_.value&&N.value.find(e=>e.id===_.value)?.name||"");function K(s){n.value=E(s)}function I(){d.value="",n.value=null}const M=c(()=>d.value||n.value),D=c(()=>h.value?h.value.filter(s=>{if(d.value){const e=d.value.toLowerCase();if(!(s.title.toLowerCase().includes(e)||s.excerpt?.toLowerCase().includes(e)||s.category?.toLowerCase().includes(e)||s.tags?.some(f=>f.toLowerCase().includes(e))))return!1}return!(_.value&&s.gameId!==_.value)}):[]),P=c(()=>b.query.embedded==="true");function U(s){return s?new Intl.DateTimeFormat(void 0,{day:"numeric",month:"long",year:"numeric"}).format(new Date(s)):""}return me([pe({"@type":"CollectionPage",name:p("SEO_KNOWLEDGEBASE"),description:p("SEO_KNOWLEDGEBASE_DESCRIPTION")}),fe({itemListElement:[{name:"Home",item:"/"},{name:p("SEO_KNOWLEDGEBASE")}]})]),(s,e)=>{const w=ee,f=te,O=se,F=ae,q=oe;return o(),l("div",null,[g(q,{variant:"light",size:"sm"},{default:u(()=>[t("div",ge,[t("div",ye,[t("div",be,[g(w,{level:"3",size:"xs",class:"font-semibold! mb-4 pb-3 border-b border-primary"},{default:u(()=>[...e[2]||(e[2]=[S("Games",-1)])]),_:1}),g(f,{variant:"text",class:A(["w-full! justify-between! text-left! rounded-md! px-3! py-2.5! mb-1 normal-case! not-italic! font-normal! h-auto!",r(n)?"text-gray-300 hover:bg-gray-700":"bg-primary/20 text-primary"]),onClick:I},{default:u(()=>[e[3]||(e[3]=t("span",null,"All Articles",-1)),t("span",_e,y(r(h).length),1)]),_:1},8,["class"]),(o(!0),l(j,null,z(r(N),a=>(o(),C(f,{key:a.id,variant:"text",class:A(["w-full! justify-between! text-left! rounded-md! px-3! py-2.5! mb-1 normal-case! not-italic! font-normal! gap-2 h-auto!",r(n)===E(a.slug)?"bg-primary/20 text-primary":"text-gray-300 hover:bg-gray-700"]),onClick:Ae=>K(a.slug)},{default:u(()=>[t("span",ve,[a.logoImage?(o(),C(O,{key:0,src:a.logoImage,alt:a.name,width:"20",height:"20",loading:"lazy",format:"webp",class:"w-5 h-5 rounded object-cover shrink-0"},null,8,["src","alt"])):k("",!0),t("span",he,y(a.name),1)]),t("span",xe,y(a.articleCount),1)]),_:2},1032,["class","onClick"]))),128))])]),t("div",we,[t("div",ke,[e[5]||
1(e[5]=t("label",{for:"kb-search",class:"sr-only"},"Search articles",-1)),le(t("input",{id:"kb-search","onUpdate:modelValue":e[0]||(e[0]=a=>ie(d)?d.value=a:null),type:"text",placeholder:"Search articles...",class:"w-full bg-gray-700 text-sm border border-gray-600 rounded-md px-4 py-2.5 pl-12 text-white placeholder-gray-400 focus:border-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/20 transition-colors"},null,512),[[de,r(d)]]),e[6]||(e[6]=t("svg",{class:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),r(d)?(o(),C(f,{key:0,variant:"text",color:"secondary",size:"sm",class:"absolute right-4 top-1/2 -translate-y-1/2 p-0! normal-case! not-italic!",onClick:e[1]||(e[1]=a=>d.value="")},{default:u(()=>[...e[4]||(e[4]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])]),_:1})):k("",!0)]),r(n)?(o(),l("div",Ee,[e[8]||(e[8]=t("span",{class:"text-gray-400 text-sm"},"Showing:",-1)),t("span",Se,[S(y(r(V))+" ",1),g(f,{variant:"text",size:"sm",class:"p-0! hover:text-white normal-case! not-italic!",onClick:I},{default:u(()=>[...e[7]||(e[7]=[t("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])]),_:1})])])):k("",!0),r(D).length>0?(o(),l("div",Ce,[(o(!0),l(j,null,z(r(D),a=>(o(),l("div",{key:a.id},[g(F,{to:`/knowledgebase/${a.slug}${r(P)?"?embedded=true":""}`,class:"block group h-full"},{default:u(()=>[t("div",Ie,[a.featuredImage?(o(),l("div",Le,[g(O,{src:a.featuredImage,alt:a.title,class:"w-full h-full object-cover",width:"320",height:"160",loading:"lazy",format:"webp"},null,8,["src","alt"])])):(o(),l("div",Ne,[...e[9]||(e[9]=[t("span",{class:"text-4xl"},"ð°",-1)])])),t("div",De,[g(w,{level:"3",size:"xs",class:"font-semibold! mb-2 group-hover:text-primary transition-colors"},{default:u(()=>[S(y(a.title),1)]),_:2},1024),a.excerpt?(o(),l("p",Oe,y(a.excerpt),1)):k("",!0),t("p",Be,y(U(a.publishedAt)),1)])])]),_:2},1032,["to"])]))),128))])):(o(),l("div",Ge,[e[11]||(e[11]=t("svg",{class:"w-12 h-12 text-gray-600 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)),e[12]||(e[12]=t("p",{class:"text-gray-400 text-lg mb-4"},"No articles found",-1)),r(M)?(o(),C(f,{key:0,variant:"link",color:"primary",class:"normal-case! not-italic!",onClick:I},{default:u(()=>[...e[10]||(e[10]=[S("Clear filters",-1)])]),_:1})):k("",!0)]))])])]),_:1})])}}});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.