1import{G as F,H as O,u as U,o as a,c as u,j as o,a as i,t as f,k as A,b as j,w as S,ar as G,F as P,r as R,l as Y,n as J,p as g,_ as W}from"./tzJnjie6.js";import{_ as q}from"./XfmX3Fr0.js";import{a as K}from"./D9l5TFns.js";const Q={class:"article-page font-sans"},X={key:0,class:"ap-loading"},Z={key:1,class:"ap-empty"},tt={key:2,class:"ap-layout"},et={class:"article-content"},st={key:0},it={class:"article-title"},ot={key:0,class:"cover"},nt=["src","alt"],lt=["innerHTML"],ct={key:1,class:"yt-wrap"},at={class:"yt-frame"},rt=["src"],ut={class:"post-list"},dt={class:"post-list-card"},pt={class:"post-list-head"},gt={class:"post-list-count"},mt={class:"post-list-body"},_t={class:"post-item-num"},ht={class:"post-item-title"},C="https://tudienav.com",vt=F({__name:"[[slug]]",setup(ft){const I=O(),{data:N,pending:z}=K("gioi-thieu-posts",()=>$fetch("/aboutusapi/posts").catch(()=>({posts:[]}))),h=g(()=>N.value?.posts||[]),s=g(()=>{const t=String(I.params.slug||"");if(t){const e=h.value.find(n=>n.slug===t);if(e)return e}return h.value[0]??null}),y=g(()=>s.value?.slug?`${C}/gioi-thieu/${s.value.slug}`:`${C}/gioi-thieu`),b=g(()=>s.value?s.value.seo_title||`${s.value.title} â TudienAV`:"Giá»i thiá»u â TudienAV | Từ Äiá»n Anh Viá»t"),$=g(()=>s.value?.seo_description||s.value?.excerpt||"TudienAV là ná»n tảng há»c tiếng Anh online vá»i từ Äiá»n Anh Viá»t, Viá»t Anh, tà i liá»u TOEIC, IELTS và cá»ng Äá»ng há»c tiếng Anh tại Viá»t Nam.");U(()=>({title:b.value,meta:[{name:"description",content:$.value},{property:"og:title",content:b.value},{property:"og:description",content:$.value},{property:"og:url",content:y.value},{property:"og:type",content:"website"}],link:[{rel:"canonical",href:y.value}],script:[{type:"application/ld+json",innerHTML:JSON.stringify({"@context":"https://schema.org","@type":"AboutPage",name:b.value,description:$.value,url:y.value,publisher:{"@type":"Organization",name:"TudienAV",url:C}})}]}));function L(t){if(!t)return"";const e=t.match(/(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/)|youtu\.be\/)([^&?#\s]+)/);return e?e[1]:""}function D(t){return t.replace(/<figure[^>]*class="[^"]*media[^"]*"[^>]*>\s*<oembed[^>]*url="([^"]*)"[^>]*>\s*<\/oembed>\s*<\/figure>/gi,(e,n)=>{const l=L(n);return l?`<div class="yt-embed"><iframe src="https://www.youtube.com/embed/${l}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen loading="lazy"></iframe></div>`:e})}const T=g(()=>L(s.value?.doc_link??null));function M(t){return t.normalize("NFD").replace(/[Ì-ͯ]/g,"").replace(/[ÄÄ]/g,"d").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}const B=g(()=>{let t=s.value?.content||"";t=t.replace(/(<p[^>]*>\s*<strong[^>]*>\s*Mục lục\s*<\/strong>\s*<\/p>)\s*(<ul(?:[^>]*)?>)([\s\S]*?)(<\/ul>)/gi,(w,v,d,p,_)=>{const k=/class\s*=\s*["'][^"']*muc-luc-list[^"']*["']/.test(d),r=x=>{const V=x.replace(/<[^>]+>/g,"").trim();return`<li class="toc-h2${/^\d+\s*[.)]/.test(V)?" toc-nonum":""}">${x}</li>`};return`<div class="muc-luc"><div class="muc-luc-header"><strong class="muc-luc-label">Mục lục</strong></div>${k?`${d}${p}${_}`:`<ul class="muc-luc-list">${p.replace(/<li(?:\s[^>]*)?>([\s\S]*?)<\/li>/gi,(x,V)=>r(V))}${_}`}</div>`}),t=t.replace(/<p[^>]*>\s*<strong[^>]*>\s*ð¶\s*([\s\S]*?)<\/strong>\s*<\/p>\s*(<(ul|ol)(?:[^>]*)?>[\s\S]*?<\/\3>)?/gi,(w,v,d)=>{const p=(d||"").replace(/<li(?:\s[^>]*)?>(?:\s| |<br\s*\/?>)*<\/li>/gi,"");return`<div class="box-noibat"><p class="box-noibat-title">${(v||"").trim()||"Äiá»m ná»i báºt"}</p>${p}</div>`});const e=[],n=/<li[^>]*class="toc-h[23][^"]*"[^>]*><a[^>]+href="(#[^"]+)"/gi;let l;for(;(l=n.exec(t))!==null;)e.push(l[1].slice(1));let c=0;const m={};let H=0;return t=t.replace(/<(h[23])([^>]*)>([\s\S]*?)<\/\1>/gi,(w,v,d,p)=>{if(/\bid\s*=/i.test(d))return w;let _;if(c<e.length)_=e[c];
1else{const k=p.replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim(),r=M(k)||`heading-${++H}`;m[r]=(m[r]||0)+1,_=m[r]>1?`${r}-${m[r]}`:r}return c++,`<${v}${d} id="${_}">${p}</${v}>`}),D(t)});function E(t){const e=t.target.closest("a");if(!e)return;const n=e.getAttribute("href")||"";if(!n.startsWith("#"))return;t.preventDefault();const l=document.getElementById(n.slice(1));l&&(l.scrollIntoView({behavior:"smooth",block:"start"}),history.pushState(null,"",n))}return(t,e)=>{const n=G,l=q;return a(),u("div",Q,[o(z)?(a(),u("div",X,[...e[0]||(e[0]=[i("div",{class:"spinner"},null,-1)])])):o(h).length?(a(),u("div",tt,[i("article",et,[o(s)?(a(),u("div",st,[i("h1",it,f(o(s).title),1),o(s).cover_image?(a(),u("div",ot,[i("img",{src:o(s).cover_image,alt:o(s).title,width:"400",height:"225"},null,8,nt)])):A("",!0),i("div",{class:"prose",innerHTML:o(B),onClick:E},null,8,lt),o(T)?(a(),u("div",ct,[j(n,null,{default:S(()=>[i("div",at,[i("iframe",{src:`https://www.youtube.com/embed/${o(T)}`,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:""},null,8,rt)])]),_:1})])):A("",!0)])):A("",!0)]),i("aside",ut,[i("div",dt,[i("div",pt,[e[2]||(e[2]=i("span",{class:"post-list-title"},"Danh sách bà i viết",-1)),i("span",gt,f(o(h).length),1)]),i("div",mt,[(a(!0),u(P,null,R(o(h),(c,m)=>(a(),Y(l,{key:c.id,to:c.slug?`/gioi-thieu/${c.slug}`:"/gioi-thieu",class:J(["post-item",{"post-item--active":o(s)&&c.id===o(s).id}])},{default:S(()=>[i("span",_t,f(m+1),1),i("span",ht,f(c.title),1)]),_:2},1032,["to","class"]))),128))])])])])):(a(),u("div",Z,[...e[1]||(e[1]=[i("p",null,"Äang cáºp nháºt ná»i dung...",-1)])]))])}}}),kt=W(vt,[["__scopeId","data-v-5394b802"]]);export{kt 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.