1import{d as k,u as v,r as S,w as R,o as $,g as N,c as w,a as x,b as B,e as r,f as O,h as P,i as j,j as D}from"./CX6cA52T.js";import{u as E}from"./CG9PeCJP.js";import{u as G}from"./DJ4u_RNH.js";import{u as U}from"./DdgJIgAO.js";import{u as L}from"./CpWHPebq.js";import"./CJ6TGr5M.js";const I="Discover the best AI tools, ChatGPT prompts and AI news, curated and reviewed by the Top AI Tools team.",q=k({__name:"[...slug]",async setup(V){var h,d,T;let a,f;const A=j(),i=v();let{slug:l}=v().params;const b=["tool.author","news.author","article.author"],C=G(),u=U(),{siteConfig:s}=L(),p=S();let t;try{t=([a,f]=R(()=>E(l&&l.length>0?l.join("/"):"home",{version:A.public.STORYBLOK_CONTENT_VERSION,resolve_links:"url",resolve_relations:b})),a=await a,f(),a)}catch(e){console.error("[storyblok] client-side story fetch failed for",i.path,e)}$(async()=>{var n;try{p.value=await N(),p.value&&u.updateAccount(p.value);const o=await((n=u.account)==null?void 0:n.getIdToken());o&&(u.userToken=o)}catch(o){console.error("[auth] could not resolve the current user",o)}let e=localStorage.getItem("activeResource");e&&(e=JSON.parse(e),C.activeResource=e)});const m=w(()=>{var e,n,o;return(o=(n=(e=t==null?void 0:t.value)==null?void 0:e.content)==null?void 0:n.seo)!=null&&o.title?t.value.content.seo.title:"Best AI Tools, ChatGPT Prompts & AI News | Top AI Tools"}),g=w(()=>{var _;const e=(_=t==null?void 0:t.value)==null?void 0:_.content;if(!e)return I;if(e.seo&&typeof e.seo.description=="string"&&e.seo.description.trim())return e.seo.description.trim();const n=[e.snippet,e.tagline,e.intro,e.excerpt,e.summary].find(y=>typeof y=="string"&&y.trim());if(n)return n.trim();const o=e.name||e.title||"";if(o)switch(e.component){case"tool":return`${o} â features, pricing, reviews and alternatives on Top AI Tools.`;case"prompt":return`${o} â a ready-to-use ChatGPT prompt on Top AI Tools.`;case"article":return`${o} â read this article on Top AI Tools.`;case"news":return`${o} â the latest AI news on Top AI Tools.`;case"author":return`${o} â author profile and articles on Top AI Tools.`;case"category":return`Browse the best ${o} AI tools on Top AI Tools.`;default:return`${o} | Top AI Tools`}return I});let c=(T=(d=(h=t==null?void 0:t.value)==null?void 0:h.content)==null?void 0:d.og_image)!=null&&T.filename?t.value.content.og_image.filename+"/m/1000x593/filters:format(jpg)":s&&s.content&&s.content.header_logo&&s.content.header_logo.filename?s.content.header_logo.filename+"/m/fit-in/1000x593/filters:fill(000):format(jpg)":"";return x({title:m.value,meta:[{property:"og:image",content:c},{property:"og:image:width",content:"1000"},{property:"og:image:height",content:"593"},{property:"og:image:url",content:c},{property:"og:image:secure_url",content:c},{name:"twitter:image",content:c},{name:"description",content:g.value},{property:"og:title",content:m},{property:"og:url",content:`https://topaitools.com${i.path}`},{property:"og:description",content:g.value},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:m},{name:"twitter:url",content:`https://topaitools.com${i.path}`},{name:"twitter:description",content:g.value}],link:[{rel:"canonical",href:"https://topaitools.com"+i.path}]}),(e,n)=>{const o=B("StoryblokComponent");return r(t)&&r(t).content?(D(),O(o,{key:0,blok:r(t).content,slug:r(l),"full-slug":r(t).full_slug,uuid:r(t).uuid,"published-date":r(t).published_at},null,8,["blok","slug","full-slug","uuid","published-date"])):P("",!0)}}});export{q 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.