(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[45105,e=>{var t=e.i(391398),a=e.i(145246),s=e.i(191788),n=e.i(758568),i=e.i(203828),r=e.i(995545),d=e.i(842633),l=e.i(225499),o=e.i(765986),c=e.i(667803);e.i(966278);var h=e.i(318398),x=e.i(455404),b=e.i(913083),g=e.i(438311),p=e.i(823889),j=e.i(106784),f=e.i(697680),u=e.i(659497),m=e.i(770267);let _=new String(".tag-banner.jsx-91c3795e29dd64fc img.jsx-91c3795e29dd64fc{width:100%}.tag-banner-desktop.jsx-91c3795e29dd64fc{display:none}.tag-banner-mobile.jsx-91c3795e29dd64fc{display:block}@media (width>=768px){.tag-banner-desktop.jsx-91c3795e29dd64fc{display:block}.tag-banner-mobile.jsx-91c3795e29dd64fc{display:none}}.tag-content.jsx-91c3795e29dd64fc{max-width:860px;min-height:700px;margin:auto;padding:12px}.header.jsx-91c3795e29dd64fc{border-bottom:1px solid var(--border-light);margin-top:12px;margin-bottom:12px;padding:24px 0}.pagination.jsx-91c3795e29dd64fc{margin-top:24px;margin-bottom:24px}.tag-name.jsx-91c3795e29dd64fc{text-transform:capitalize;margin-bottom:12px;font-size:32px;font-weight:700}.is-loading.jsx-91c3795e29dd64fc{font-size:20px}.follow-button.jsx-91c3795e29dd64fc{background-color:var(--button-high-contrast);min-width:150px;color:var(--button-high-contrast-text);border-radius:4px;margin-top:12px;padding:6px 12px;font-size:16px;font-weight:700}.follow-button.is-followed.jsx-91c3795e29dd64fc{background-color:var(--button-dark)}.follow-button.jsx-91c3795e29dd64fc:hover{background-color:var(--button-high-contrast-hover)}.modal-title.jsx-91c3795e29dd64fc{color:var(--text-dark);font-size:18px;font-weight:700}.modal-controls.jsx-91c3795e29dd64fc{margin-top:12px;margin-bottom:12px;display:flex}.close-button-container.jsx-91c3795e29dd64fc{justify-content:flex-end;align-items:center;margin-bottom:12px;display:flex}.close-button.jsx-91c3795e29dd64fc{background-color:var(--button-light);width:30px;height:30px;color:var(--text-dark);border-radius:50%}.close-button.jsx-91c3795e29dd64fc:hover{background-color:var(--button-light-3)}.modal-button.jsx-91c3795e29dd64fc{background:var(--button-light);border-radius:4px;width:100%;margin:12px;padding:13px 10px;font-size:16px;font-weight:700}.modal-button.jsx-91c3795e29dd64fc:first-child{margin-left:0}.modal-button.jsx-91c3795e29dd64fc:nth-child(2){margin-right:0}.modal-button.jsx-91c3795e29dd64fc:hover{background-color:var(--hover-background)}.modal-button.yes.jsx-91c3795e29dd64fc{color:var(--button-high-contrast-text);background-color:var(--button-high-contrast)}.light-text.jsx-91c3795e29dd64fc{color:var(--secondary-text);font-size:12px;font-style:italic}");_.__hash="91c3795e29dd64fc";let v={content:{maxWidth:"600px",width:"95%",top:"30%",left:"50%",right:"auto",bottom:"auto",transform:"translate(-50%, -50%)",backgroundColor:"var(--post-background)"}},w=h.f.ApiConsumer(({api:e,tagSlug:n})=>{let[i,r]=(0,s.useState)(!1),[d,l]=(0,s.useState)({}),[o,c]=(0,s.useState)([]),[h,w]=(0,s.useState)(0),[k,N]=(0,s.useState)(1),[$,y]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),T=t=>{let a=`tags/${d.id}/followers`;d.isFollowed?e.del({uri:a}).then(e=>{"ok"===e.status&&(l({...d,isFollowed:!1}),r(!1))}).catch(e=>x.c.error(e.toString())):e.post({uri:a,params:{alert:t}}).then(e=>{"ok"===e.status&&(l({...d,isFollowed:!0}),r(!1))}).catch(e=>x.c.error(e.toString()))},z=e=>{N(e)};return(0,s.useEffect)(()=>{y(!0),e[k>=2?"get":"post"]({uri:"/search/tagged",params:{tag_slug:n}}).then(e=>{if(e.data){let t=Object.keys(e.search_tags);l({tagId:t,tagName:e.search_tags[t]})}}).catch(e=>{y(!1),console.log(e.message)})},[]),(0,s.useEffect)(()=>{y(!0),fetch(C.replace("&page=2&",`&page=${k}&`)).then(e=>e.json()).then(e=>{e.threads&&c(e.threads.filter(e=>"thread"===e.content_type).map(b.U)),y(!1)}).catch(e=>{console.error(e),y(!1)})},[k]),(0,s.useEffect)(()=>{d.tagId&&e.onAuthenticated(()=>{e.get({uri:`/tags/${d.tagId}/threads`}).then(e=>{if(e.threads&&(c(e.threads.filter(e=>"thread"===e.content_type).map(b.U)),e.links&&e.links.next&&(w(e.links.pages),S(e.links.next)),e.tag)){let t=(0,f.f)(e.tag);l({...d,...t}),document.title=`Nội dung về ${t.title} | Tinh tế`}}).catch(e=>{throw e}).finally(()=>{y(!1)})})},[d.tagId]),(0,s.useEffect)(()=>{$&&window.scrollTo(0,0)},[$]),(0,t.jsxs)(s.Fragment,{children:[d.bannerDesktop&&(0,t.jsx)("div",{className:`jsx-${_.__hash} tag-banner container tag-banner-desktop`,children:(0,t.jsx)("a",{href:d.bannerUrl||"#",className:`jsx-${_.__hash}`,children:(0,t.jsx)("img",{src:d.bannerDesktop,alt:d.tagName,className:`jsx-${_.__hash}`})})}),d.bannerMobile&&(0,t.jsx)("div",{className:`jsx-${_.__hash} tag-banner container tag-banner-mobile`,children:(0,t.jsx)("a",{href:d.bannerUrl||"#",className:`jsx-${_.__hash}`,children:(0,t.jsx)("img",{src:d.bannerMobile,alt:d.tagName,className:`jsx-${_.__hash}`})})}),(0,t.jsxs)("div",{className:`jsx-${_.__hash} tag-content`,children:[d&&d.id&&(0,t.jsx)(p.f,{taPageName:u.f.Tag_Content_Listing,taAttributes:[{key:"tag_id",value:d.id},{key:"page",value:k}]}),d&&d.tagId&&(0,t.jsxs)("div",{className:`jsx-${_.__hash} header`,children:[(0,t.jsx)("h1",{className:`jsx-${_.__hash} tag-name`,children:d.tagName}),(0,t.jsx)("button",{onClick:()=>{d.isFollowed?r(!i):T(1)},className:`jsx-${_.__hash} follow-button ${d.isFollowed&&"is-followed"}`,children:d.isFollowed?"Bỏ theo dõi":"Theo dõi"}),d.isFollowed&&(0,t.jsx)("div",{className:`jsx-${_.__hash} light-text`,children:" Bạn sẽ nhận được thông báo khi có bài mới từ tag này"})]}),(0,t.jsx)("div",{className:`jsx-${_.__hash} pagination`,children:(0,t.jsx)(g.f,{currentPage:k,totalPage:h,onSelected:z})}),!$&&o.map(e=>(0,t.jsxs)(s.default.Fragment,{children:[(0,t.jsx)(j.f,{thread:e},`tag-content-thread-${e.id}`),(0,t.jsx)("br",{className:`jsx-${_.__hash}`})]})),$&&(0,t.jsx)("p",{className:`jsx-${_.__hash} is-loading`,children:"Đang tải..."}),!$&&(0,t.jsx)("div",{className:`jsx-${_.__hash} pagination`,children:(0,t.jsx)(g.f,{currentPage:k,totalPage:h,onSelected:z})}),i&&(0,t.jsxs)(m.default,{isOpen:i,ariaHideApp:!1,style:v,children:[(0,t.jsx)("div",{className:`jsx-${_.__hash} close-button-container`,children:(0,t.jsx)("button",{onClick:()=>r(!1),className:`jsx-${_.__hash} close-button`,children:"X"})}),(0,t.jsxs)("h2",{className:`jsx-${_.__hash} modal-title text-center`,children:["Bạn có muốn bỏ theo dõi tag ",d.tagName,"?"]}),(0,t.jsxs)("div",{className:`jsx-${_.__hash} modal-controls`,children:[(0,t.jsx)("button",{onClick:()=>T(0),className:`jsx-${_.__hash} modal-button yes`,children:"Có"}),(0,t.jsx)("button",{onClick:()=>r(!1),className:`jsx-${_.__hash} modal-button`,children:"Không"})]})]})]}),(0,t.jsx)(a.default,{id:_.__hash,children:_})]})}),k=new String("");k.__hash="e43e7f1a484b1acb";let N=(0,i.withRouter)((0,d.f)(({router:e})=>{let s=(0,n.default)(e,"query.tagSlug",null);return(0,t.jsxs)(r.f,{title:"Nội dung về tag",description:`Nội dung, h\xecnh ảnh, video chi tiết về #${s}`,url:`https://tinhte.vn/tag/${s}/`,children:[(0,t.jsx)(o.f,{}),(0,t.jsx)(w,{tagSlug:s}),(0,t.jsx)(c.f,{}),(0,t.jsx)(l.f,{}),(0,t.jsx)(a.default,{id:k.__hash,children:k})]})}));e.s(["default",0,N],45105)},438311,e=>{var t=e.i(391398),a=e.i(145246),s=e.i(191788);let n=new String(".pagination.jsx-73e051160c8b81b3{white-space:nowrap;align-items:center;font-size:.8rem;display:flex;position:relative}.pagination.jsx-73e051160c8b81b3 .pagination--header.jsx-73e051160c8b81b3{margin-right:10px}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3{flex-flow:wrap;display:flex}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3 .page.jsx-73e051160c8b81b3{text-align:center;box-sizing:border-box;border:1px solid var(--border-dark);min-width:26px;height:26px;color:var(--text-dark);opacity:.5;background-color:#0000;border-radius:3px;outline:none;margin:0 3px 3px 0;padding:0 5px;line-height:24px;display:inline-block}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3 .page.jsx-73e051160c8b81b3:hover{background-color:var(--border-dark);border:1px solid var(--border-dark);color:var(--text-light)}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3 .current.jsx-73e051160c8b81b3{background-color:var(--border-dark);border:1px solid var(--border-dark);color:var(--text-light);opacity:1;border-radius:3px}@media (width<=500px){.pagination.jsx-73e051160c8b81b3 .pagination--header.jsx-73e051160c8b81b3{display:none}}");n.__hash="73e051160c8b81b3",e.s(["f",0,({currentPage:e,totalPage:i,onSelected:r})=>{let[d,l]=(0,s.useState)(e-3),o=e=>{r(e)};return(0,s.useEffect)(()=>{l(e-3)},[e]),(0,t.jsxs)("div",{className:`jsx-${n.__hash}`,children:[i>1?(0,t.jsx)("div",{className:`jsx-${n.__hash} pagination`,children:(0,t.jsxs)("div",{className:`jsx-${n.__hash} pagination--pages`,children:[(0,t.jsx)("button",{onClick:()=>o(1),className:`jsx-${n.__hash} page ${1===e?"current":""}`,children:"1"}),d>1&&(0,t.jsx)("button",{onClick:e=>{e.preventDefault(),d>0&&l(d-5)},className:`jsx-${n.__hash} page`,children:"←"},"window-back"),(0,t.jsx)("div",{className:`jsx-${n.__hash}`,children:Array.apply(0,{length:5}).map(Number.call,Number).map(a=>a+d+11&&(0,t.jsx)("button",{onClick:()=>o(a+d+1),className:`jsx-${n.__hash} page ${e===a+d+1?"current":""}`,children:a+d+1}))}),d+5{e.preventDefault(),do(i),className:`jsx-${n.__hash} page ${e===i?"current":""}`,children:i})]})}):(0,t.jsx)("div",{className:`jsx-${n.__hash}`}),(0,t.jsx)(a.default,{id:n.__hash,children:n})]})}],438311)},106784,e=>{var t=e.i(391398),a=e.i(145246),s=e.i(191788);e.i(966278);var n=e.i(318398),i=e.i(917849),r=e.i(251533),d=e.i(961827),l=e.i(534358);let o=new String("a.jsx-dd06cb117ef14b10{display:block}article.jsx-dd06cb117ef14b10{min-height:87px;padding-left:155px;position:relative}@media (width>=768px){article.jsx-dd06cb117ef14b10{min-height:148px;padding-left:262px}}.img.jsx-dd06cb117ef14b10{width:141px;height:87px;position:absolute;top:0;left:0}@media (width>=768px){.img.jsx-dd06cb117ef14b10{width:240px;height:148px}}.thread-title.jsx-dd06cb117ef14b10{color:var(--title-light-bg-text);font-size:18px}.forum.jsx-dd06cb117ef14b10{color:var(--secondary-text);font-size:13px;font-weight:500;line-height:18px}.subbrand.jsx-dd06cb117ef14b10{margin-left:12px}.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10{align-items:center;display:flex}.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10 .subbrand-img.jsx-dd06cb117ef14b10{width:24px;margin-right:6px}@media (width<=375px){.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10 .subbrand-img.jsx-dd06cb117ef14b10{width:20px}}.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10 .subbrand-name.jsx-dd06cb117ef14b10{color:var(--secondary-text);font-size:13px;font-weight:500;line-height:18px}.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10 .subbrand-name.jsx-dd06cb117ef14b10:hover{color:var(--hover-secondary-text);cursor:pointer}.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10 .subbrand-name.jsx-dd06cb117ef14b10 .subbrand-name-tinhte.jsx-dd06cb117ef14b10{margin-left:3px}.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10 .subbrand-name.jsx-dd06cb117ef14b10 .subbrand-name-change.jsx-dd06cb117ef14b10{display:flex}.subbrand.jsx-dd06cb117ef14b10 a.jsx-dd06cb117ef14b10 .subbrand-name.jsx-dd06cb117ef14b10 .subbrand-name-change.jsx-dd06cb117ef14b10:first-letter{text-transform:uppercase}.info.jsx-dd06cb117ef14b10{justify-content:space-between;align-items:center;margin-top:8px;display:flex}.info.jsx-dd06cb117ef14b10 .left.jsx-dd06cb117ef14b10{align-items:center;display:flex}.author.jsx-dd06cb117ef14b10{font-weight:700}.related-threads.jsx-dd06cb117ef14b10{-webkit-overflow-scrolling:touch;display:flex}.related-threads-caption-wrapper.jsx-dd06cb117ef14b10{justify-content:space-between;display:flex}@media (width<=700px){.related-threads-wrapper.jsx-dd06cb117ef14b10{padding-top:12px}}@media (width>=701px){.related-threads-wrapper.jsx-dd06cb117ef14b10{padding-bottom:12px}}.related-thread-caption.jsx-dd06cb117ef14b10{font-size:15px;font-weight:700}.related-thread-close.jsx-dd06cb117ef14b10{margin-right:15px;font-size:18px;font-weight:700}.related-thread-item.jsx-dd06cb117ef14b10{flex:1;padding:12px 0}.related-thread-title.jsx-dd06cb117ef14b10{margin-top:6px;font-size:13px;font-weight:600}.related-thread-img.jsx-dd06cb117ef14b10{border:1px solid var(--border-light);background-position:50%;background-size:cover}@media (width<=700px){.related-thread-img.jsx-dd06cb117ef14b10{width:160px;height:99px}}@media (width>=701px){.related-thread-img.jsx-dd06cb117ef14b10{width:170px;height:105px}}");o.__hash="dd06cb117ef14b10";var c=e.i(554035),h=e.i(602692);class x extends s.default.Component{constructor(e){super(e),this.state={thread:this.props.thread}}goToThread(){let{thread:e}=this.state;try{let t=parseInt(new Date().getTime()/1e3,10),a={threadId:e.id,lastLoadTime:t};window.sessionStorage.setItem("lastClickedThread",JSON.stringify(a))}catch(e){console.warn("Sessions storage is not available")}}render(){let{thread:e}=this.state,{showBookmarkButton:s}=this.props,n="var(--primary-text)";return e.author&&(n=(0,h.f)(e.author)),(0,t.jsxs)("article",{onClick:()=>this.goToThread(),className:`jsx-${o.__hash}`,children:[(0,t.jsxs)("div",{className:`jsx-${o.__hash}`,children:[(0,t.jsx)("a",{href:e.link,className:`jsx-${o.__hash}`,children:(0,t.jsx)("div",{className:`jsx-${o.__hash} img`,children:(0,t.jsx)(i.default,{height:100,offset:100,children:(0,t.jsx)(l.f,{thread:e,ratio:c.u,borderRadius:8,noBorder:!0})})})}),(0,t.jsx)("a",{href:e.link,className:`jsx-${o.__hash}`,children:(0,t.jsx)("h4",{className:`jsx-${o.__hash} thread-title`,children:e.title})}),(0,t.jsx)("a",{href:e.link,className:`jsx-${o.__hash}`,children:(0,t.jsx)("p",{className:`jsx-${o.__hash} excerpt hidden-sm`,children:e.excerpt})}),(0,t.jsxs)("div",{className:`jsx-${o.__hash} info`,children:[(0,t.jsxs)("div",{className:`jsx-${o.__hash} left`,children:[(0,t.jsx)(r.f,{src:e.author.avatar,alt:e.author.name,profile:e.author.link,userColor:n}),(0,t.jsx)("a",{href:e.author.link,target:"_blank",rel:"noreferrer",className:`jsx-${o.__hash}`,children:(0,t.jsx)("span",{style:{color:n},className:`jsx-${o.__hash} author`,children:e.author.name})}),e.tinhteContentBrand&&(0,t.jsx)("div",{className:`jsx-${o.__hash} subbrand`,children:(0,t.jsxs)("a",{href:`https://${e.tinhteContentBrand}.tinhte.vn/?utm_source=internal&utm_medium=home_latest_thread_subbrand_logo`,target:"_blank",rel:"noreferrer",className:`jsx-${o.__hash}`,children:[(0,t.jsx)("img",{src:`/static/images/${e.tinhteContentBrand}_tinhte_logo_small.png`,alt:`${e.tinhteContentBrand}.tinhte.vn`,className:`jsx-${o.__hash} subbrand-img`}),(0,t.jsx)("span",{className:`jsx-${o.__hash} subbrand-name`,children:(0,t.jsxs)("span",{className:`jsx-${o.__hash} subbrand-name-change`,children:[(0,t.jsxs)("span",{className:`jsx-${o.__hash}`,children:["xe"===e.tinhteContentBrand&&"Xe ","audio"===e.tinhteContentBrand&&"Audio "]}),(0,t.jsx)("span",{className:`jsx-${o.__hash} subbrand-name-tinhte hidden-sm`,children:"Tinh tế"})]})})]})})]}),s&&(0,t.jsx)("div",{className:`jsx-${o.__hash} right`,children:(0,t.jsx)(d.f,{thread:e,size:40})})]})]}),(0,t.jsx)(a.default,{id:o.__hash,children:o})]})}}let b=n.f.ApiConsumer(x);e.s(["f",0,b],106784)},697680,e=>{var t=e.i(90031),a=e.i(668564),s=e.i(913083);let n={links:{next:null,page:null,pages:null,banner_desktop_url:null,banner_mobile_url:null,banner_target_url:null},tag_id:null,tag_is_followed:!1,tag_text:null,tag_use_count:null,permissions:{follow:!1},latest_thread:null,tag_img:(0,a.f)()};e.s(["f",0,e=>{let i=(0,t.default)(e,n),r=i.latest_thread?(0,s.U)(i.latest_thread):null;i.threads&&(r=(0,s.U)(i.threads[0]));let d=(0,a.f)();return{id:i.tag_id,isFollowed:i.tag_is_followed,tagText:i.tag_text||i.tag_name||"",link:`https://tinhte.vn/tag/${i.tag_url||i.tag_text}`,bannerDesktop:i.links?i.links.banner_desktop_url:null,bannerMobile:i.links?i.links.banner_mobile_url:null,bannerUrl:i.links?i.links.banner_target_url:null,title:i.tag_text||i.tag_name||"",image:r&&r.image?r.image:i.tag_img||d,stats:{useCount:i.tag_use_count||0},permissions:i.permissions,latestThread:r}}])}],998738,(e,t,a)=>{let s="/tag";(window.__NEXT_P=window.__NEXT_P||[]).push([s,()=>e.r(45105)]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push([s])})},90031,(e,t,a)=>{var s=e.r(623428),n=e.r(198373),i=e.r(622986),r=e.r(473140),d=Object.prototype,l=d.hasOwnProperty;t.exports=s(function(e,t){e=Object(e);var a=-1,s=t.length,o=s>2?t[2]:void 0;for(o&&i(t[0],t[1],o)&&(s=1);++a{e.v(t=>Promise.all(["static/chunks/24rjhtswl5nv5.js","static/chunks/1np1f3cfr6hcu.js"].map(t=>e.l(t))).then(()=>t(468297)))}]);