1import{u as e,_ as t,i as a,a as l}from"./POJwqv3O.js";import{_ as s}from"./3FXeCcCb.js";import{g as i}from"./ZtaZQsmX.js";import{j as r,k as o,l as m,n,Q as c,W as u,ak as d,al as g,am as p,P as v,m as w,D as h,h as x,c as f,a as b,F as y,b as _,t as j,v as B,w as D,r as k,an as G,I as T,x as $,o as N,d as M}from"./BNt15hEg.js";import{d as S}from"./fC7XZbHi.js";import"./kHmCEAxS.js";import"./BvFTTJX4.js";import"./D1hsneRB.js";import"./BCx8B9gx.js";const I={class:"news-detail bg-white text-black pt-24 lg:pt-32 pb-20 lg:pb-[8.938rem]"},A={class:"container-section"},P={class:"px-0 lg:px-24 xl:px-36 2xl:px-48"},Y={class:"text-center text-[#2D2D2D] font-sora-semibold text-2xl sm:text-4xl lg:text-[3.25rem]"},C={class:"text-center mt-8 lg:mt-[4.375rem] mb-6 lg:mb-[2.375rem]"},E={class:"text-[#33373A] text-lg"},H=["innerHTML"],R={key:1,class:"flex flex-col gap-4"},F={class:"container-section mb-16 lg:mb-[6.25rem]"},L={class:"flex justify-between items-end gap-4 mb-8 lg:mb-[2.625rem]"},Q={class:"text-2xl lg:text-4xl font-sora-semibold"},U={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-[1.3125rem]"},z=r({__name:"[slug]",async setup(r){let z,O;const W=o(),q=u(),{locale:J}=m(),K=n({id:void 0,title:"",date:"",is_top:0,cover_image:"",content:"",type:"",brand_tag:"",word_url:"",html:""}),V=n(""),X=n([]),{data:Z,pending:ee,error:te}=([z,O]=c(async()=>T(`news-detail-${q.params.slug}`,async()=>{const e=String(q.params.slug||"");if(!e)return null;try{let l,s=!1;try{const t=await i({slug:e},{silent:!0});l=t?.data}catch(t){if(!a(t))throw t}if(!l?.title&&"ko"===J.value){const t=await i({slug:e},{locale:"enUS",silent:!0});l=t?.data,l?.title&&(s=!0)}if(!l?.title)return null;let r="",o=[];try{r=await $fetch(`${l.html}?timestamp=${(new Date).getTime()}`,{parseResponse:e=>e})}catch(t){}try{const e=await i({offset:0,limit:3,type:l.type},{silent:!0});o=e?.data?.results||[]}catch(t){}return{detail:l,html:r,relatedResults:o,fellBackToEn:s}}catch(l){if(!a(l))throw l;return null}},{server:!0,lazy:!1,watch:[()=>q.params.slug,()=>J.value]})),z=await z,O(),z);e({data:Z,error:te,hasContent:e=>!!e?.detail,label:"News"});const ae=Z.value?.detail?.slug;ae&&ae!==q.params.slug&&([z,O]=c(()=>$(W(`/news/${ae}`),{replace:!0})),await z,O());const le=d();if(g(()=>{le.value=Z.value?.fellBackToEn?`https://gamebot.ai/news/${Z.value?.detail?.slug||q.params.slug}`:null}),Z.value?.detail){const e=Z.value.detail,t=`https://gamebot.ai/news/${e.slug||q.params.slug}`,a=(e.content||"").replace(/<[^>]*>/g,"").slice(0,160)||"GameBot news and updates";p({type:"NewsArticle",headline:e.title,description:a,image:e.cover_image,url:t,datePublished:e.date,section:e.type}),v([{name:"Home",url:"https://gamebot.ai"},{name:"News",url:"https://gamebot.ai/news"},{name:e.title,url:t}])}g(()=>{Z.value&&(K.value=Z.value.detail,V.value=Z.value.html,X.value=Z.value.relatedResults.filter(e=>S(e.date).isAfter(S("2022-6-16"))))});const se=w(()=>(Z.value?.detail?.content||"").replace(/<[^>]*>/g,"").slice(0,160));h({title:()=>Z.value?.detail?.title?`${Z.value.detail.title} | GameBot`:"News Detail | GameBot",description:()=>se.value||"GameBot news and updates",ogTitle:()=>Z.value?.detail?.title||"News Detail | GameBot",ogDescription:()=>se.value||"GameBot news and updates",ogImage:()=>Z.value?.detail?.cover_image||"https://gamebot.ai/og-image.jpg",ogType:"article",articleAuthor:"GameBot",articleSection:"News",articlePublishedTime:()=>{const e=Z.value?.detail?.date;return e?new Date(e).toISOString():void 0},twitterCard:"summary_large_image",twitterTitle:()=>Z.value?.detail?.title||"News Detail | GameBot",twitterDescription:()=>se.value||"GameBot news and updates",twitterImage:()=>Z.value?.detail?.cover_image||"https://gamebot.ai/og-image.jpg"}),x(()=>q.params.slug,()=>{"undefined"!=typeof window&&document?.documentElement?.scrollTo({top:0,behavior:"smooth"})});const ie=w(()=>K.value.title||"GameBot News Update");return(e,a)=>{const i=t,r=l,o=G("router-link"),m=s;return N(),f("div",I,[b("div",A,[b("div",P,[K.value.id?(N(),f(y,{key:0},[b("h2",Y,j(K.value.title),1),b("div",C,[b("span",E,j(B(S)(K.value.date).format("MMMM D, YYYY")),1)]),_(i,{title:ie.value,summary:se.value},null,8,["title","summary"]),b("div",{class:"html-container w-full max-w-[56.625rem] mx-auto",innerHTML:V.value},null,8,H)],64)):(N(),f("div",R,[_(r,{class:"h-8 w-[30%]"}),_(r,{class:"h-8 w-[50%]"}),_(r,{class:"h-8 w-[70%]"}),_(r,{class:"h-8 w-[40%]"}),_(r,{class:"h-8 w-[60%]"}),_(r,{class:"h-8 w-[30%]"}),_(r,{class:"h-8 w-[80%]"})]))])]),a[0]||(a[0]=b("div",{class:"mt-16 lg:mt-[9.375rem] mb-16 lg:mb-[6.25rem] 2xl:mx-[14.75rem] xl:mx-[10.75rem] lg:mx-[6.75rem] mx-4 h-[1px] bg-[#dadce0]"},null,-1)),b("div",F,[b("div",L,[b("span",Q,j(e.$t("related_articles")),1),_(o,{class:"text-[#007bff] text-base lg:text-[1.25rem] whitespace-nowrap",to:B(W)("/news"),type:"a-link"},{default:D(()=>[M(j(e.$t("button.view_all_news")),1)]),_:1},8,["to"])]),b("div",U,[(N(!0),f(y,null,k(X.value,e=>(N(),f("div",{key:e.id},[_(m,{class:"h-full",item:e,"is-light":""},null,8,["item"])]))),128))])])])}}});
1export{z 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.