/* Than Vu - chuan hoa trinh bay noi dung, menu mobile, schema co so 1 (v1) */ (function(){ var css=[ /* --- Doc noi dung: bai viet (.des) va mo ta san pham (.tab_content) --- */ ".des,.tab_content{font-size:16px!important;line-height:1.75!important;color:#1f2937!important;text-rendering:optimizeLegibility}", ".tab_content{max-width:880px;margin-left:auto!important;margin-right:auto!important}", ".des p,.des li,.des td,.des th,.des dd,.tab_content p,.tab_content li,.tab_content td,.tab_content th{font-size:inherit!important;line-height:inherit!important}", ".des p,.tab_content p{margin:0 0 14px!important}", ".des ul,.des ol,.tab_content ul,.tab_content ol{padding-left:24px;margin:0 0 16px}", ".des li,.tab_content li{margin:5px 0}", ".des p,.des li,.tab_content p,.tab_content li{color:inherit}", "html body .des .tvdk,html body .tab_content .tvdk,html body .tvdk p,html body .tvdk li,html body .tvdk span,html body .tvdk div,html body .tvdk td,html body .tvdk th,html body .tvdk em,html body .tvdk h2,html body .tvdk h3,html body .tvdk h4,html body .tvdk strong,html body .tvdk b{color:#fff!important}", "html body .des th strong,html body .des th b,html body .tab_content th strong,html body .tab_content th b{color:inherit!important}", ".tvdk h2,.tvdk h3,.tvdk h4{border-left-color:#ffd43b!important}", "html body .tvdk a:not([class]),html body .tvdk a:not([class]) *{color:#ffd43b!important;text-decoration:underline}", ".tvdk a:hover{color:#fff!important}", "html body a.btn,html body .ctas a,html body .tvdm-cta a,html body .tvft-so a,html body a[class*=cta],html body .tvlc a{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;text-shadow:none!important;font-weight:700!important;letter-spacing:.2px;text-decoration:none!important;opacity:1!important;filter:none!important;backdrop-filter:none!important}", "html body .ctas a.btn{font-size:15.5px!important;min-height:46px;display:inline-flex!important;align-items:center;justify-content:center;padding:0 22px!important;border-radius:10px!important;border:0!important;box-shadow:0 3px 10px rgba(0,0,0,.18)}", "html body .ctas a.btn.call{background:#d62828!important;color:#fff!important}", "html body .ctas a.btn.zalo{background:#0068ff!important;color:#fff!important}", "html body .ctas a.btn.ghost{background:#ffd43b!important;color:#14284b!important}", "html body .ctas a.btn.blue{background:#fff!important;color:#14284b!important}", "html body .ctas a.btn:hover{filter:brightness(1.07)!important;transform:translateY(-1px)}", "html body .tvft-so a{background:#fff!important;color:#14284b!important;border:0!important}", "html body .tvdm-cta a.c3{background:#ffd43b!important;color:#14284b!important;border:0!important}", "html body .tvdm-cta a.c3:hover{filter:brightness(1.06)!important}", ".des h2,.tab_content h2{font-size:23px!important;font-weight:700!important;color:#14284b!important;line-height:1.35!important;margin:32px 0 12px!important;padding:0 0 0 12px!important;border-left:4px solid #d62828}", ".des h3,.tab_content h3{font-size:19px!important;font-weight:700!important;color:#1f4178!important;line-height:1.4!important;margin:24px 0 10px!important}", ".des h4,.tab_content h4{font-size:17px!important;font-weight:700!important;color:#14284b!important;margin:18px 0 8px!important}", ".des strong,.des b,.tab_content strong,.tab_content b{color:#14284b;font-weight:700}", ".des p a:not([class]),.des li a:not([class]),.des td a:not([class]),.tab_content p a:not([class]),.tab_content li a:not([class]),.tab_content td a:not([class]){color:#c81e1e;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}", ".des p a:not([class]):hover,.des li a:not([class]):hover,.tab_content p a:not([class]):hover,.tab_content li a:not([class]):hover{color:#14284b}", ".des img,.tab_content img{max-width:100%!important;height:auto!important;border-radius:10px}", ".des p img,.tab_content p img{max-height:560px;width:auto!important;object-fit:contain;display:block;margin:8px auto}", ".des em,.tab_content em{color:#4b5563}", ".des blockquote,.tab_content blockquote{border-left:4px solid #ffd43b;background:#fffbea;padding:12px 16px;margin:16px 0;border-radius:0 8px 8px 0}", "@media(max-width:767px){.des,.tab_content{font-size:16px!important;line-height:1.7!important}.des h2,.tab_content h2{font-size:20px!important}.des h3,.tab_content h3{font-size:17.5px!important}}", /* --- Tab san pham ve tong navy --- */ ".tab-list a,.tab-list li a{background:#14284b!important;color:#fff!important;border-color:#14284b!important}", ".tab-list{border-color:#14284b!important}", /* --- Nhan Hot/Ban chay khong de len chu --- */ "#product-nav-tree>ul>li.tvdm-hot>a,#product-nav-tree-slideshow>ul>li.tvdm-hot>a,li.tvdm-hot>a{padding-right:74px!important}", "#product-nav-tree li.tvdm-hot>a .tvdm-b,#product-nav-tree-slideshow li.tvdm-hot>a .tvdm-b{top:50%!important;bottom:auto!important;right:24px!important;transform:translateY(-50%)!important}", /* --- Menu mobile ve tong navy, gon --- */ "@media(max-width:991px){#nav-menu li.mobile>ul>li>a{background:#1b335e!important;color:#fff!important;border-bottom:1px solid rgba(255,255,255,.08)!important;padding-right:56px!important}#nav-menu li.mobile>ul>li>ul a{background:#22406f!important;color:#fff!important}#nav-menu li.mobile>ul>li>a:hover{background:#d62828!important}#nav-menu li.mobile .tvm-p{display:none!important}#nav-menu li.tvacc-c>ul{display:none!important}#nav-menu li.tvacc-o>ul{display:block!important}#nav-menu li.mobile>ul>li.tvacc-c,#nav-menu li.mobile>ul>li.tvacc-o{position:relative!important}#nav-menu li.mobile>ul>li>a .tvdm-b{right:54px!important;left:auto!important}#nav-menu .tvacc{position:absolute;right:0;top:0;width:46px;height:38px;line-height:38px;text-align:center;color:#ffd43b;font-weight:700;font-size:20px;cursor:pointer;z-index:20!important;background:rgba(0,0,0,.15)}}" ].join("\n"); var st=document.createElement("style");st.id="tv-chuanhoa";st.textContent=css;document.head.appendChild(st); function ready(f){if(document.readyState!="loading")f();else document.addEventListener("DOMContentLoaded",f)} ready(function(){ /* Menu mobile: thu gon danh muc con, bam + de mo */ if(window.innerWidth<992){ var mob=document.querySelector("#nav-menu li.mobile"); if(mob){[].forEach.call(mob.querySelectorAll(":scope>ul>li"),function(li){var sub=li.querySelector(":scope>ul");if(!sub||li.querySelector(":scope>.tvacc"))return;li.classList.add("tvacc-c");var b=document.createElement("span");b.className="tvacc";b.textContent="+";b.setAttribute("role","button");b.setAttribute("aria-label","Mở danh mục con");b.addEventListener("click",function(e){e.preventDefault();e.stopPropagation();var o=li.classList.toggle("tvacc-o");li.classList.toggle("tvacc-c",!o);b.textContent=o?"–":"+"});li.insertBefore(b,li.firstChild)})} } /* Anh trong noi dung: tai dan, giam tai trang */ [].forEach.call(document.querySelectorAll(".des img,.tab_content img"),function(im,i){if(i>0&&!im.getAttribute("loading"))im.setAttribute("loading","lazy");im.setAttribute("decoding","async")}); }); /* Schema: co so chinh = Co so 1 Bac Tu Liem, khu vuc phuc vu trong ban kinh ~20km */ var AREA=["Bắc Từ Liêm","Nam Từ Liêm","Cầu Giấy","Ba Đình","Tây Hồ","Đống Đa","Thanh Xuân","Hoàn Kiếm","Hai Bà Trưng","Hà Đông","Hoài Đức","Đan Phượng","Long Biên","Hoàng Mai","Đông Anh","Thanh Trì","Mê Linh","Quốc Oai","Gia Lâm"]; function patch(){var done=false;[].forEach.call(document.querySelectorAll('script[type="application/ld+json"]'),function(s){var j;try{j=JSON.parse(s.textContent)}catch(e){return}var list=j["@graph"]||[j];var ch=false;list.forEach(function(n){var t=[].concat(n["@type"]||[]);if(t.indexOf("LocalBusiness")<0||n.tvcs1)return; var cs2=n.address;n.name="Máy In Máy Tính Thần Vũ";n.address={"@type":"PostalAddress","streetAddress":"Số nhà 14, 15 Ngách 76, Ngõ 172 Phú Diễn","addressLocality":"Bắc Từ Liêm","addressRegion":"Hà Nội","addressCountry":"VN"}; n.geo={"@type":"GeoCoordinates","latitude":21.0465,"longitude":105.76}; n.areaServed=AREA.map(function(a){return {"@type":"AdministrativeArea","name":a+", Hà Nội"}}); var deps=(n.department||[]).filter(function(d){return !/Phú Diễn/.test(JSON.stringify(d.address||""))}); if(cs2&&!/Phú Diễn/.test(JSON.stringify(cs2))&&!deps.some(function(d){return JSON.stringify(d.address)==JSON.stringify(cs2)}))deps.unshift({"@type":"LocalBusiness","name":"Thần Vũ – Cơ sở 2 Long Biên","address":cs2,"telephone":n.telephone}); n.department=deps; var sa=[].concat(n.sameAs||[]);["https://www.facebook.com/muabanmayincugiarehanoi","https://www.tiktok.com/@banmayincuthanvu","https://www.youtube.com/@chuyenmayin"].forEach(function(u){if(sa.indexOf(u)<0)sa.push(u)});n.sameAs=sa; n.tvcs1=undefined;ch=true});if(ch){s.textContent=JSON.stringify(j);done=true}});return done} var tries=0;(function loop(){if(patch()||++tries>20)return;setTimeout(loop,500)})(); })(); /* Muc luc bai viet v3 - gon, hien dai (thay hien thi #tvtoc) */ (function(){ var css=[ "#tvtoc{display:none!important}", "#tvtoc3{margin:20px 0 28px;background:#f8fafc;border-radius:12px;padding:14px 18px 10px;font-family:inherit}", "#tvtoc3 .h{display:flex;align-items:center;gap:10px;cursor:pointer;user-select:none;padding-bottom:8px}", "#tvtoc3 .h .l{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#14284b;flex:1}", "#tvtoc3 .h .m{font-size:12.5px;color:#64748b}", "#tvtoc3 .h .c{width:20px;height:20px;display:flex;align-items:center;justify-content:center;color:#14284b;transition:transform .2s}", "#tvtoc3 .h .c:before{content:\"\";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-4px}", "#tvtoc3.off .h .c{transform:rotate(-90deg)}", "#tvtoc3 ol{list-style:none;margin:0!important;padding:0!important;column-count:2;column-gap:32px;counter-reset:t3}", "#tvtoc3.off ol,#tvtoc3.off .x{display:none}", "#tvtoc3 li{counter-increment:t3;margin:0!important;padding:0!important;break-inside:avoid}", "#tvtoc3 li.z{display:none}", "#tvtoc3 li a{display:flex;gap:10px;padding:6px 0;font-size:14.5px!important;line-height:1.45!important;color:#334155!important;text-decoration:none!important;transition:color .15s}", "#tvtoc3 li a:before{content:counter(t3,decimal-leading-zero);font-size:12px;font-weight:700;color:#a3adbd;min-width:20px;padding-top:2px;font-variant-numeric:tabular-nums}", "#tvtoc3 li a:hover{color:#d62828!important}", "#tvtoc3 li a:hover:before,#tvtoc3 li.on a:before{color:#d62828}", "#tvtoc3 li.on a{color:#14284b!important;font-weight:600}", "#tvtoc3 .x{display:inline-block;margin:4px 0 4px 30px;font-size:13px;font-weight:600;color:#d62828;cursor:pointer}", "#tvtoc3 .x:hover{text-decoration:underline}", ".des h2,.des h3,.tab_content h2,.tab_content h3{scroll-margin-top:72px}", "#tvrp{position:fixed;left:0;top:0;height:3px;width:0;background:linear-gradient(90deg,#d62828,#ffb020);z-index:100000;transition:width .1s linear}", "#tvtf{position:fixed;right:18px;bottom:88px;z-index:998;display:none;font-family:inherit}", "#tvtf .b{display:flex;align-items:center;gap:8px;background:#fff;color:#14284b;border-radius:24px;padding:7px 14px 7px 8px;font-size:13px;font-weight:700;box-shadow:0 4px 16px rgba(20,40,75,.18);border:1px solid #e3e8ef;cursor:pointer;max-width:260px}", "#tvtf .b svg{flex:0 0 26px}", "#tvtf .b span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}", "#tvtf .p{display:none;position:absolute;right:0;bottom:48px;width:310px;max-height:62vh;overflow:auto;background:#fff;border-radius:14px;box-shadow:0 16px 40px rgba(20,40,75,.22);padding:10px 6px}", "#tvtf.op .p{display:block}", "#tvtf .p .t{font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8a94a6;padding:4px 12px 8px}", "#tvtf .p a{display:block;padding:8px 12px;border-radius:8px;font-size:14px;line-height:1.4;color:#334155;text-decoration:none}", "#tvtf .p a:hover{background:#f4f6fa}", "#tvtf .p a.on{background:#fff1f1;color:#d62828;font-weight:600}", "@media(max-width:767px){#tvtoc3{padding:12px 14px 8px}#tvtoc3 ol{column-count:1}#tvtf{right:12px;bottom:150px}#tvtf .p{width:calc(100vw - 24px)}}" ].join("\n"); function init(){ var old=document.getElementById("tvtoc");if(!old||document.getElementById("tvtoc3"))return !!old; var links=[].slice.call(old.querySelectorAll(":scope>ol>li>a"));if(links.length<3)return true; var st=document.createElement("style");st.textContent=css;document.head.appendChild(st); var body=document.querySelector(".des,.tab_content");var words=body?body.textContent.trim().split(/\s+/).length:0;var mins=Math.max(1,Math.round(words/230)); var box=document.createElement("nav");box.id="tvtoc3";box.setAttribute("aria-label","Mục lục bài viết"); var mob=window.innerWidth<768;if(mob)box.className="off"; var h=document.createElement("div");h.className="h";h.setAttribute("role","button"); var l=document.createElement("span");l.className="l";l.textContent="Trong bài này"; var m=document.createElement("span");m.className="m";m.textContent=links.length+" mục · "+mins+" phút đọc"; var c=document.createElement("span");c.className="c";h.appendChild(l);h.appendChild(m);h.appendChild(c);box.appendChild(h); var ol=document.createElement("ol");var LIM=6;var items=[]; links.forEach(function(a,i){var li=document.createElement("li");var x=document.createElement("a");x.href=a.getAttribute("href");x.textContent=a.textContent.replace(/^\s*\d+[\.\)]\s*/,"");li.appendChild(x);if(i>=LIM)li.className="z";ol.appendChild(li);items.push({li:li,t:x.textContent,href:x.getAttribute("href"),id:decodeURIComponent((a.getAttribute("href")||"").replace(/^.*#/,""))})}); box.appendChild(ol); if(links.length>LIM){var more=document.createElement("span");more.className="x";more.textContent="+ Xem thêm "+(links.length-LIM)+" mục";more.addEventListener("click",function(){[].forEach.call(ol.querySelectorAll("li.z"),function(z){z.classList.remove("z")});more.remove()});box.appendChild(more)} h.addEventListener("click",function(){box.classList.toggle("off")}); old.parentNode.insertBefore(box,old); /* thanh tien do doc */ var rp=document.createElement("div");rp.id="tvrp";document.body.appendChild(rp); /* nut muc luc noi */ var f=document.createElement("div");f.id="tvtf";var fb=document.createElement("div");fb.className="b"; var NS="http"+"://www.w3.org/2000/svg";var sv=document.createElementNS(NS,"svg");sv.setAttribute("width","26");sv.setAttribute("height","26");sv.setAttribute("viewBox","0 0 36 36"); var c1=document.createElementNS(NS,"circle");c1.setAttribute("cx","18");c1.setAttribute("cy","18");c1.setAttribute("r","15");c1.setAttribute("fill","none");c1.setAttribute("stroke","#e8edf5");c1.setAttribute("stroke-width","4"); var c2=document.createElementNS(NS,"circle");c2.setAttribute("cx","18");c2.setAttribute("cy","18");c2.setAttribute("r","15");c2.setAttribute("fill","none");c2.setAttribute("stroke","#d62828");c2.setAttribute("stroke-width","4");c2.setAttribute("stroke-linecap","round");c2.setAttribute("stroke-dasharray","94.25");c2.setAttribute("stroke-dashoffset","94.25");c2.setAttribute("transform","rotate(-90 18 18)"); sv.appendChild(c1);sv.appendChild(c2);var lab=document.createElement("span");lab.textContent="Mục lục";fb.appendChild(sv);fb.appendChild(lab); var fp=document.createElement("div");fp.className="p";var tt=document.createElement("div");tt.className="t";tt.textContent="Trong bài này";fp.appendChild(tt); items.forEach(function(it){var x=document.createElement("a");x.href=it.href;x.textContent=it.t;x.addEventListener("click",function(){f.classList.remove("op")});fp.appendChild(x);it.fa=x}); fb.addEventListener("click",function(e){e.stopPropagation();f.classList.toggle("op");var on=fp.querySelector("a.on");if(on)on.scrollIntoView({block:"nearest"})}); document.addEventListener("click",function(e){if(!f.contains(e.target))f.classList.remove("op")}); f.appendChild(fp);f.appendChild(fb);document.body.appendChild(f); var heads=items.map(function(it){return document.getElementById(it.id)||document.getElementsByName(it.id)[0]}); var tk=false;function onS(){if(tk)return;tk=true;requestAnimationFrame(function(){tk=false; var br=body?body.getBoundingClientRect():null;var p=0;if(br){var tot=br.height-window.innerHeight*0.6;p=Math.min(1,Math.max(0,-br.top/(tot>0?tot:1)))} rp.style.width=(p*100)+"%";rp.style.display=(br&&br.top<0&&br.bottom>0)?"block":"none";c2.setAttribute("stroke-dashoffset",String(94.25*(1-p))); var r=box.getBoundingClientRect();f.style.display=(r.bottom<0&&br&&br.bottom>250)?"block":"none";if(f.style.display=="none")f.classList.remove("op"); var cur=-1;heads.forEach(function(hd,i){if(hd&&hd.getBoundingClientRect().top<130)cur=i}); items.forEach(function(it,i){it.li.classList.toggle("on",i==cur);it.fa.classList.toggle("on",i==cur)}); lab.textContent=cur>=0?items[cur].t:"Mục lục"})} window.addEventListener("scroll",onS,{passive:true});window.addEventListener("resize",onS);onS(); return true} var k=0;(function loop(){if(init()||++k>30)return;setTimeout(loop,300)})(); })(); /* Tu nhan khoi nen toi trong noi dung -> chu trang */ (function(){function lum(c){var m=c.match(/[\d.]+/g);if(!m||m.length<3)return 1;if(m.length>3&&+m[3]<0.5)return -1;var a=m.slice(0,3).map(function(v){v/=255;return v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4)});return .2126*a[0]+.7152*a[1]+.0722*a[2]} function bgL(e){var cs=getComputedStyle(e);var L=lum(cs.backgroundColor);if(L>=0)return L;var g=cs.backgroundImage;if(g&&g.indexOf("gradient")>=0){var m=g.match(/rgba?\([^)]+\)/);if(m)return lum(m[0])}return -1} function run(){[].forEach.call(document.querySelectorAll(".des *,.tab_content *,.des,.tab_content"),function(e){if(e.closest("#tvtoc3,#tvtf"))return;if(/^(A|SPAN|B|STRONG|EM|I|IMG|BR|SVG|PATH)$/.test(e.tagName))return;var L=bgL(e);if(L>=0&&L<0.25&&e.textContent.trim().length)e.classList.add("tvdk")})} if(document.readyState=="loading")document.addEventListener("DOMContentLoaded",run);else run();setTimeout(run,1500)})();