PageSourceSearch

https://shop.tastycoffee.ru/_nuxt/FpL1n7aG.js

js tastycoffee.ru collected 2026-09-24 10:11:34 UTC 49,195 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./-2IxFlK7.js","./BO-m3fan.js","./yKFJWOPc.css"])))=>i.map(i=>d[i]);
2import{_ as Ee}from"./BnCOO0KX.js";import{H as ee,V as l,ag as s,Z as n,a0 as L,a1 as E,U as t,_ as be,aJ as ke,aY as Ye,o as ue,$ as Q,aI as Z,aD as pe,ah as q,B as e,a7 as d,f as C,r as z,aE as ne,L as Xe,a8 as we,a9 as Ge,w as ae,e as ye,af as He,X as w,i as me,am as de,aM as Ze,aj as te,a6 as se,u as $e,J as et,F as Ce,b as ge,c as re,al as tt,aH as st,A as lt,aX as ot,m as nt,aK as at,aL as it,ac as Se,ad as rt,ae as ze,ai as ct}from"./BO-m3fan.js";import{u as ut,_ as dt}from"./j6sjW17n.js";import{a as mt,M as pt}from"./BR4dxWv1.js";import{u as _t,h as xt,c as gt,g as ft}from"./z93jB_6N.js";import{_ as _e,u as vt}from"./35Z5fSTL.js";import{_ as ht}from"./Cvu-8Z51.js";import{_ as bt}from"./Darw6XhC.js";import{u as Oe,a as qe,b as kt}from"./Dta3o89F.js";import{P as je}from"./Dwk7P_TB.js";import{_ as ve}from"./DUe72QUd.js";import{p as ce}from"./Cdzd1P_r.js";import{s as he}from"./BkECrVEm.js";import{T as k}from"./qgjdOqWZ.js";import{_ as wt,a as yt}from"./CJ8bGhXW.js";import{F as $t}from"./DBcMHxs2.js";import{T as De}from"./CH3Sldp3.js";import{a as Le,t as Be}from"./CCCGbRCN.js";import{c as Ct,w as qt}from"./CRgjCJ80.js";import{S as Fe,h as Ue}from"./Cm2dyKsY.js";import{f as Tt}from"./GMIQ7Mo8.js";import{g as St}from"./DzQ74mgK.js";import{_ as zt}from"./0iWEtjm7.js";import{N as Lt}from"./CGudBdL0.js";import{P as Bt}from"./BMn3OWS0.js";import{A as It}from"./RZ7tI9NF.js";import{T as Ie}from"./0-XSX2Vn.js";import{T as fe}from"./CkB4nh1U.js";import{T as Mt}from"./rLwRK9X-.js";import{u as Ne}from"./B9hcXGYz.js";import{a as At}from"./mK2y_bH0.js";import{u as Pt}from"./CmcCvfYe.js";import{u as Rt}from"./Ctefn08h.js";import{u as Me}from"./CbOFH5Vb.js";import"./BN_U4KcZ.js";import"./CSmehjHJ.js";import"./CVmkfZf2.js";import"./uBuOnvKF.js";import"./BytUgYNg.js";import"./Cx1HHmkd.js";import"./DFfpkfMv.js";import"./f8oB8bsL.js";import"./1W3hiBuL.js";import"./BEWLORzu.js";import"./Cwu94jF0.js";import"./C_xTNGO3.js";import"./CMfAClo_.js";import"./tX2o6jbS.js";import"./pmYFtj1Z.js";import"./CfVvZvuk.js";try{(function(){var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new o.Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="075bc1f3-30c4-4ce1-9c06-157d0edad206",o._sentryDebugIdIdentifier="sentry-dbid-075bc1f3-30c4-4ce1-9c06-157d0edad206")})()}catch{}const Et={class:"card-article space-y-3 md:space-y-2 relative h-full"},Ht={class:"card-article__img relative w-full md:pt-[60%] pt-[65%] rounded-2xl overflow-hidden cursor-pointer block"},Ot={class:"card-article__text space-y-3 md:space-y-2 z-10"},jt={class:"w-full space-y-1"},Dt={class:"w-full space-y-1"},Ft={class:"flex items-center space-x-2 max-md:pt-1"},Ut=ee({__name:"SkeletonCardArticle",setup(o){return(i,p)=>(t(),l("div",Et,[s("div",Ht,[n(k,{loading:!0,variant:"h-full",class:"w-full h-full absolute top-0 left-0"})]),s("div",Ot,[s("div",jt,[n(k,{loading:!0,variant:"h-[16.8px]",class:"w-2/3 max-w-48"}),n(k,{loading:!0,variant:"h-[16.8px]",class:"w-1/2 max-w-32"})]),s("div",Dt,[n(k,{loading:!0,variant:"h-[26.8px]",class:"w-full"}),n(k,{loading:!0,variant:"h-[26.8px]",class:"w-1/4"})]),n(k,{loading:!0,variant:"h-[33.6px]",class:"w-full"}),s("div",Ft,[(t(),l(L,null,E(3,g=>n(k,{key:`skeleton-${g}`,loading:!0,variant:"h-8",class:"w-8"})),64)),(t(),l(L,null,E(2,g=>n(k,{key:`skeleton-${g}`,loading:!0,variant:"h-6",class:"w-12"})),64))])])]))}}),Ae=Object.assign(be(Ut,[["__scopeId","data-v-160efaa4"]]),{__name:"SkeletonsSkeletonCardArticle"}),Nt={class:"blog-nav"},Vt=["textContent"],Qt={key:0},Jt=["textContent"],Wt=ee({__name:"List",props:{categories:{}},setup(o){const{isAuth:i}=ke(),p=Ye(),g=C(()=>i.value&&p.counter?.bookmarks||0),f=()=>{i.value&&p.fetchCounter({pick:"bookmarks"})};_t(window,mt,f),ue(()=>{f()});const m=z(null);return ut(m,{onlyMobile:!0}),(h,_)=>{const R=pe;return o.categories.length>0?(t(),l("div",{key:0,ref_key:"listRef",ref:m,class:"flex overflow-auto px-4 sm:px-0 -mx-4 sm:mx-0 mb-6 md:mb-10 scrollbar-touch-hide group-[.is-app]:max-xl:mb-[18px]"},[s("ul",Nt,[s("li",null,[n(R,{class:"blog-nav__link duration-0",to:"/blog"},{default:Q(()=>[..._[0]||(_[0]=[Z("Все темы",-1)])]),_:1})]),(t(!0),l(L,null,E(o.categories,B=>(t(),l("li",{key:`category-${B.id}`},[n(R,{class:"blog-nav__link duration-0",to:`/blog/${B.slug}`},{default:Q(()=>[Z(q(B.name)+" ",1),s("span",{class:"text-[var(--black-50)] pl-1",textContent:q(B.blogs_count)},null,8,Vt)]),_:2},1032,["to"])]))),128)),e(i)?(t(),l("li",Qt,[n(R,{class:"blog-nav__link duration-0",to:"/my-favorites?tab=journal"},{default:Q(()=>[_[1]||(_[1]=Z(" Закладки ",-1)),e(g)?(t(),l("span",{key:0,class:"text-[var(--black-50)] pl-1",textContent:q(e(g))},null,8,Jt)):d("",!0)]),_:1})])):d("",!0)])],512)):d("",!0)}}}),Kt=Object.assign(be(Wt,[["__scopeId","data-v-d3bc751e"]]),{__name:"BlogCategoryList"}),Yt={key:0},Xt=ee({__name:"Index",props:{posts:{}},setup(o){const i=p=>p%5===0;return(p,g)=>{const f=_e;return o.posts.length>0?(t(),l("div",Yt,[(t(!0),l(L,null,E(o.posts,(m,h)=>(t(),l("div",{key:m.id,class:ne(["col-span-12 md:col-span-6",[i(h)?"2xl:col-span-8":"2xl:col-span-4"]])},[n(f,{post:m,class:ne({"xxl:card-lg":i(h)})},null,8,["post","class"])],2))),128))])):d("",!0)}}}),Gt=Object.assign(Xt,{__name:"BlogList"}),Zt={class:"container xl:pt-8 mb-10 md:mb-20"},es={class:"flex flex-wrap xl:block xl:relative xl:min-h-[1665px]"},ts={class:"w-full float-left xl:w-[316px] flex flex-col order-1"},ss={key:0,class:"flex items-center min-h-[38px] mb-6 py-1 border-b border-[var(--black-5)] px-4 -mx-4 sm:mx-0 md:mb-10 sm:p-0 xl:border-0 xl:min-h-[auto]"},ls={class:"text-[24px] m-0 xl:text-[40px]"},os={key:1,class:"flex flex-wrap mb-6 md:mb-10 w-full xl:space-y-4"},ns={key:0,class:"w-full float-right 2xl:w-[1000px] xl:w-[660px] order-3"},as={class:"min-w-[100%] mb-10 md:mb-14 sm:mx-0 -mx-4"},is={key:0,class:"w-full mb-16 md:mb-10"},rs={class:"overflow-auto px-4 -mx-4 sm:px-0 sm:mx-0"},cs={class:"grid grid-cols-12 gap-6 min-w-[1000px] md:min-w-[auto]"},us={class:"w-full float-right 2xl:w-[1000px] xl:w-[660px] order-6"},ds={key:1,class:"mb-4"},ms={key:2,class:"grid grid-cols-9 gap-6 mb-10 md:mb-6"},ps={class:"col-span-9 md:col-span-6"},_s=["textContent"],xs=["innerHTML"],gs={key:3,class:"w-full flex items-center mb-4 md:mb-6"},fs={key:4,class:"w-full flex items-center mb-4 md:mb-6"}
2,vs=["textContent"],hs={key:5,class:"grid grid-cols-12 gap-6"},bs={key:7,class:"w-full pt-6 relative z-10"},ks={key:1,class:"w-full float-left xl:w-[316px] order-4 xl:absolute xl:top-[560px]"},ws={class:"w-full flex flex-wrap mb-16 md:mb-10"},ys={key:2,class:"list-none p-0 -mb-2 flex flex-wrap items-center w-full"},$s={key:3,class:"list-none p-0 -mb-2 flex flex-wrap items-center w-full"},Cs={key:1,class:"w-full mb-10"},qs={key:0,class:"xl:space-y-4 max-md:space-y-4 max-md:block max-xl:grid grid-cols-2 gap-6"},Ts={key:1,class:"xl:space-y-4 max-md:space-y-4 max-md:block max-xl:grid grid-cols-2 gap-6"},Pe=10,Ss=ee({__name:"List",props:{slug:{}},setup(o){Xe({bodyAttrs:{class:"grey-theme"}});const i=o,{sort:p,orderBy:g,orderTo:f}=Oe(),m=we(),h=Ge(),_=qe(),R=z(!1),B=C(()=>_.postList),j=C(()=>_.postSeries),a=C(()=>_.currentCategory),c=C(()=>_.meta),x=C(()=>_.loadingFetchBlog),I=C(()=>_.loadingFetchCategories),U=C(()=>R.value?_.tags:_.tags.slice(0,Pe)),M=C(()=>!R.value&&_.tags.length>Pe),y=C(()=>_.categories),A=C(()=>_.recentlyReadPostList),v=C(()=>_.mainPost),P=C(()=>!m.params.type),r=C(()=>_.wasLoadedBlog),H=async(F=1,O=!1)=>{await _.fetchBlog({slug:i.slug,page:F,order_to:f.value,order_by:g.value,no_quiz:Number(m.query.no_quiz)||0},O),O&&he("#blog-list"),await h.replace({query:{...m.query,page:F}})},X=C(()=>{const F=[{title:"Журнал о кофе"}];return a.value&&(F[F.length-1].link="/blog",F.push({title:a.value.name})),F});ae(p,()=>{h.push({query:{...m.query,order_by:g.value,order_to:f.value}}),H(1)}),ae(a,()=>{oe()});const{isMobileApp:W,setHeaderTitle:K,setHeaderActions:le}=ye(),oe=()=>{K(a.value?.name||"Журнал о кофе"),le({search:{callback:()=>dispatchEvent(new CustomEvent(pt))}})};return He(()=>{oe(),_.wasLoadedBlog=!1}),(F,O)=>{const T=Ee,u=Kt,N=_e,Y=de,G=pe,ie=ht,$=Gt,D=bt;return t(),l("div",Zt,[s("div",es,[n(T,{items:e(X)},null,8,["items"]),s("div",ts,[e(W)?d("",!0):(t(),l("div",ss,[s("h1",ls,q(Number(e(m).query.no_quiz)?"Статьи с квизом":"Журнал о кофе"),1)])),e(I)?(t(),l("div",os,[(t(),l(L,null,E(12,b=>s("div",{key:`skeleton-${b}`,class:"hidden xl:flex last:flex w-full"},[n(k,{loading:!0,variant:"h-11 xl:h-[17px] ",class:"w-full xl:w-2/3"})])),64))])):(t(),w(u,{key:2,categories:e(y)},null,8,["categories"]))]),e(P)&&(!e(r)&&e(x)||e(v))?(t(),l("div",ns,[s("div",as,[!e(r)&&e(x)?(t(),w(Ae,{key:0,class:"card-xl"})):e(v)?(t(),w(N,{key:1,post:e(v),class:"card-xl"},null,8,["post"])):d("",!0)]),e(A).length>0?(t(),l("div",is,[n(G,{to:"/journal/in_progress",class:"mb-4 group text-[24px] font-din-black uppercase leading-[1.2] md:tracking-[0.02em] inline-block no-underline text-[var(--black)] active:text-[var(--black)] duration-300"},{default:Q(()=>[O[2]||(O[2]=s("span",{class:"mr-1 group-hover:decoration-[var(--black)] decoration-[transparent] underline-offset-8 underline"}," Вы недавно читали ",-1)),n(Y,{class:"h-[14px] w-[14px] -mt-1 inline",name:"icons/arr-right-bold"})]),_:1}),s("div",rs,[s("div",cs,[(t(!0),l(L,null,E(e(A),b=>(t(),l("div",{key:b.id,class:"col-span-4 2xl:col-span-4 md:col-span-6"},[n(N,{post:b},null,8,["post"])]))),128))])])])):d("",!0)])):d("",!0),s("div",us,[!e(r)&&e(x)?(t(),w(k,{key:0,loading:!0,variant:"h-[28.8px]",class:"w-20 mb-4"})):!e(a)&&e(P)?(t(),l("h2",ds," Все статьи ")):!e(x)&&e(a)?(t(),l("div",ms,[s("div",ps,[s("p",{class:"text-[40px] font-din-black uppercase leading-[1.2] md:tracking-[0.01em] mb-4 md:hidden",textContent:q(e(a).name)},null,8,_s),s("div",{class:"w-full m-0",innerHTML:e(a).mini_description},null,8,xs)]),d("",!0)])):d("",!0),!e(r)&&e(x)?(t(),l("div",gs,[n(k,{loading:!0,variant:"h-11",class:"w-48"}),n(k,{loading:!0,variant:"h-[18px]",class:"w-20 ml-auto"})])):(t(),l("div",fs,[n(ie,{modelValue:e(p),"onUpdate:modelValue":O[0]||(O[0]=b=>me(p)?p.value=b:null),options:e(kt),class:"select-white w-auto min-w-[190px]",value:"Сначала новые"},null,8,["modelValue","options"]),e(c)?(t(),l("p",{key:0,class:"text-[14px] leading-[1.3] medium mb-0 ml-auto pl-2",textContent:q(e(ce)(e(c).total,["статья","статьи","статей"],!0))},null,8,vs)):d("",!0)])),!e(r)&&e(x)?(t(),l("div",hs,[(t(),l(L,null,E(16,b=>s("div",{key:`skeleton-${b}`,class:"col-span-12 md:col-span-12 2xl:col-span-12"},[n(Ae)])),64))])):(t(),w($,{key:6,id:"blog-list",class:"grid grid-cols-12 gap-6",posts:e(B)},null,8,["posts"])),e(c)&&e(c).last_page!==e(c).current_page?(t(),l("div",bs,[O[3]||(O[3]=s("div",{class:"absolute bottom-[calc(100%-44px)] -left-2 w-[calc(100%+16px)] h-[450px] blur-lg bg-linear-gradient-white -z-10 pointer-events-none"},null,-1)),n(je,{meta:e(c),"with-pages":"",loading:e(x),"infinity-scroll":!0,onPaginate:O[1]||(O[1]=b=>H(b.page,b.replace))},null,8,["meta","loading"])])):d("",!0)]),e(x)||e(U).length>0?(t(),l("div",ks,[s("div",ws,[e(x)?(t(),w(k,{key:0,loading:!0,variant:"h-[28.8px]",class:"w-20 mb-4"})):(t(),w(G,{key:1,to:"/blog/tags",class:"mb-4 group text-[24px] font-din-black uppercase leading-[1.2] md:tracking-[0.02em] inline-block no-underline text-[var(--black)] active:text-[var(--black)] duration-300"},{default:Q(()=>[O[4]||(O[4]=s("span",{class:"mr-1 group-hover:decoration-[var(--black)] decoration-[transparent] underline-offset-8 underline"},"Теги",-1)),n(Y,{class:"h-[14px] w-[14px] -mt-1 inline",name:"icons/arr-right-bold"})]),_:1})),e(x)?(t(),l("div",ys,[(t(),l(L,null,E(11,b=>n(k,{key:`skeleton-${b}`,loading:!0,variant:"h-8 md:h-10",class:"w-24 mr-2 mb-2"})),64))])):e(U).length>0?(t(),l("ul",$s,[(t(!0),l(L,null,E(e(U),b=>(t(),l("li",{key:`tag-${b.id}`},[n(ve,{text:b.name,link:`/blog/tags?tags=${b.id}`,class:"tag-sm tag-white mr-2 mb-2",hashtag:""},null,8,["text","link"])]))),128)),s("li",null,[n(ve,{text:e(M)?"Показать еще":"Все теги",callback:e(M)?()=>R.value=!0:void 0,link:e(M)?void 0:"/blog/tags",class:"tag-sm tag-white mr-2 mb-2"},null,8,["text","callback","link"])])])):d("",!0)]),e(x)?(t(),w(k,{key:0,loading:!0,variant:"h-[28.8px]",class:"w-20 mb-4"})):e(x)||e(j).length>0?(t(),l("div",Cs,[O[5]||(O[5]=s("h2",{class:"mb-4"}," Серии статей ",-1)),e(x)?(t(),l("div",qs,[(t(),l(L,null,E(2,b=>n(k,{key:`skeleton-${b}`,loading:!0,variant:"h-[406px]",class:"w-full"})),64))])):(t(),l("div",Ts,[(t(!0),l(L,null,E(e(j),b=>(t(),w(D,{key:`series-${b.id}`,group:b},null,8,["group"]))),128))]))])):d("",!0)])):d("",!0),O[6]||(O[6]=s("div",{class:"clear-both"},null,-1))])])}}}),zs=Object.assign(Ss,{__name:"BlogPageList"}),Ls={class:"container xl:pt-8 mb-10 md:mb-20"},Bs={key:0,class:"min-w-[100%] flex items-center min-h-[38px] mb-4 py-1 border-b border-[var(--black-5)] -mx-4 sm:mx-0 md:mb-5 md:py-0 xl:border-0 xl:min-h-[auto]"},Is={class:"flex w-full items-center relative"},Ms={class:"absolute left-4 xl:relative sm:left-0"},As={class:"flex flex-col"},Ps={class:"w-full pt-[61%] md:pt-[56%] relative mb-6 md:mb-8 md:order-4 -mx-4 sm:mx-0 max-sm:min-w-[calc(100%+32px)]"},Rs={class:"w-full flex items-center flex-wrap max-md:mb-1 md:order-1"},Es={class:"flex items-center space-x-2 md:order-3 mb-6"},Hs={class:"grid grid-cols-12 gap-x-6"},Os={class:"col-span-12 xl:col-span-3 xl:order-2"},js={class:"flex items-center xl:mb-8 mb-10"},Ds={class:"flex-1 md:pl-3.5 pl-3"},Fs={class:"col-span-12 xl:col-span-9 xl:order-1 space-y-10 md:space-y-8"},Us=ee({__name:"SkeletonArticlePage",setup(o){const{isMobileApp:i}=ye();return(p,g)=>(t(),l("div",Ls,[e(i)?d("",!0):(t(),l("div",Bs,[s("div",Is,[s("div",Ms,[n(k,{loading:!0,variant:"xl:h-[16.8px] h-[21.6px]",class:"xl:w-48 w-24 mb-0"})])])])),s("div",As,[s("div",Ps,[n(k,{loading:!0,variant:"h-full",class:"w-full h-full absolute top-0 left-0"})]),s("div",Rs,[n(k,{loading:!0,variant:"h-8 xl:h-6",class:"w-12 mr-4 mb-2"}),n(k,{loading:!0,variant:"h-8 xl:h-6",class:"w-32 mr-4 mb-2"})]),n(k,{loading:!0,variant:"h-12 xl:h-[88px]",class:"w-2/3 xl:w-1/2 mb-3 md:mb-6 md:order-2"}),s("div",Es,[(t(),l(L,null,E(3,f=>n(k,{key:`skeleton-${f}`,loading:!0,variant:"h-8",class:"w-10"})),64)),(t(),l(L,null,E(2,f=>n(k,{key:`skeleton-${f}`,loading:!0,variant:"h-6",class:"w-12"})),64))])]),s("div",Hs,[s("div",Os,[s("div",js,[n(k,{loading:!0,variant:"h-[60px] md:h-20 rounded-full",class:"w-[60px] md:w-20"}),s("div",Ds,[n(k,{loading:!0,variant:"h-[16.8px] md:h-[19.2px]  mb-1",class:"w-full max-w-48"}),n(k,{loading:!0,variant:"h-[16.8px]",class:"w-2/3 max-w-32"})])])]),s("div",Fs,[(t(),l(L,null,E(4,f=>n(k,{key:`skeleton-${f}`,loading:!0,variant:"h-[140px]",class:"w-full"})),64))])])]))}}),Ns=Object.assign(Us,{__name:"SkeletonsSkeletonArticlePage"}),Vs=["innerHTML"],Qs={class:"w-4 h-4"},Js=["textContent"],Ws={class:"flex items-center"},Ks=ee({__name:"Item",props:{comment:{},callbackReport:{type:Function},callbackRemove:{type:Function},callbackStoreReview:{type:Function}},emits:["comment:like"],setup(o,{emit:i}){const p=o,g=i,{isAuth:f}=ke(),m=z(!1),h=z(!1),_=c=>({id:c.id,user:c.user,message:c.message,created_at:c.created_at,parent_id:p.comment.id!==c.parent_id?c.parent_id:null,parent:null,children:c.children?c.children.map(_):[],descendants:c.descendants?c.descendants.map(_):[],likes_count:c.likes_count,dislikes_count:c.dislikes_count,like_type:c.like_type}),R=C(()=>_(p.comment)),B=C(()=>p.comment.children?.map(_)||[]),j=c=>{if(!c)return null;for(const x of B.value){if(x.id===c)return x;if(x.descendants){for(const I of x.descendants)if(I.id===c)return I}}return null},a=c=>(m.value=!0,p.callbackStoreReview(c));return(c,x)=>{const I=de,U=wt;return t(),w(U,{"show-comments":e(m),"onUpdate:showComments":x[2]||(x[2]=M=>me(m)?m.value=M:null),"show-add-comment":e(h),"onUpdate:showAddComment":x[3]||(x[3]=M=>me(h)?h.value=M:null),post:e(R),comments:e(B),"comments-total":o.comment.descendants_count||0,"callback-find-parent-comment":j,"callback-report":o.callbackReport,"callback-store-review":a,"callback-remove":o.callbackRemove,"comment-list-class":"md:pl-8","second-comment-list-class":"max-md:pl-4","remove-title":"УДАЛЕНИЕ КОММЕНТАРИЯ","remove-text":"Вы уверены, что хотите удалить комментарий?","onComment:like":x[4]||(x[4]=M=>g("comment:like",M))},Ze({default:Q(()=>[o.comment.message?(t(),l("div",{key:0,innerHTML:o.comment.message},null,8,Vs)):d("",!0),!e(m)&&o.comment.descendants_count&&o.comment.children?.length?(t(),l("div",{key:1,class:"flex items-center space-x-1.5 medium link cursor-pointer text-[14px] leading-[1.3] reply-link z-10 relative pt-4",onClick:x[0]||(x[0]=se(M=>m.value=!e(m),["prevent","stop"]))},[n(I,{class:"h-[16px] w-[16px]",name:"icons/reply"}
2),s("div",Qs,[o.comment.children?.[0]?(t(),w(De,{key:0,size:"16",class:"!text-[12px]",user:o.comment.children[0].user},null,8,["user"])):d("",!0)]),s("span",{textContent:q(e(ce)(o.comment.descendants_count,["ответ","ответа","ответов"],!0))},null,8,Js)])):d("",!0)]),_:2},[e(f)?{name:"actions",fn:Q(()=>[s("div",Ws,[n(te,{class:"btn-secondary-sm px-2 h-full medium",text:"Ответить",onClick:x[1]||(x[1]=se(M=>h.value=!e(h),["stop","prevent"]))})])]),key:"0"}:void 0]),1032,["show-comments","show-add-comment","post","comments","comments-total","callback-report","callback-remove"])}}}),Ys=Object.assign(Ks,{__name:"BlogCommentItem"}),Xs=["textContent"],Gs={class:"max-w-[610px]"},Zs={class:"mb-3"},el=ee({__name:"List",props:{post:{}},setup(o){const i=o,p=$e(),g=z([]),f=z(!1),m=z(!1),h=z(!1),_=z(),{status:R}=et(),B=z(null),j=z(!1),a=()=>{if(!Ct||!B.value||j.value)return;const{stop:y}=xt(B,A=>{A[0]?.isIntersecting&&!j.value&&(j.value=!0,c(),y())},{root:null,rootMargin:"200px",threshold:.1});Ce(()=>{try{y()}catch{}})},c=(y=1,A=!1)=>{ge(()=>p.blog.comments.get(i.post.id,y),f).then(v=>{v.meta.current_page===1?g.value=v.data:A?g.value=g.value.map(P=>v.data.find(H=>H.id===P.id)||P):g.value.push(...v.data),_.value=v.meta}).catch(re)},x=y=>{const A=y.type==="like"?p.blog.comments.like:p.blog.comments.dislike;function v(P,r){P.id===y.comment.id&&(P.likes_count=r.likes,P.dislikes_count=r.dislikes,P.like_type=r.me_like?"like":r.me_dislike?"dislike":""),P.children&&P.children.forEach(H=>
2v(H,r)),P.descendants&&P.descendants.forEach(H=>v(H,r))}ge(()=>A(i.post.id,y.comment.id),h).then(P=>{g.value.forEach(r=>v(r,P))}).catch(re)},I=async y=>{const A={message:y.message,parent_id:"parent_id"in y?y.parent_id:null};await ge(()=>p.blog.comments.add(i.post.id,A),m).then(()=>{c(_.value?.current_page||1,!0)}).catch(re)},U=y=>{p.blog.comments.report(i.post.id,y.id).then(({success:A,message:v})=>{A?Le(v||"Вы пожаловались на комментарий пользователя. Обязательно проверим."):Be(v||"Ошибка при отправке жалобы на комментарий")}).catch(re)},M=y=>{p.blog.comments.remove(i.post.id,y.id).then(({success:A})=>{A?(Le("Комментарий успешно удален"),g.value=g.value.filter(v=>v.id!==y.id)):Be("Ошибка при удалении комментария")}).catch(re)};return ue(()=>{a()}),(y,A)=>{const v=yt,P=$t,r=Ys;return t(),l("div",{ref_key:"containerRef",ref:B,class:"w-full space-y-4 break-words"},[s("h2",null,[A[1]||(A[1]=Z(" Комментарии ",-1)),s("span",{class:"text-[var(--black-50)]",textContent:q(o.post.count_comments)},null,8,Xs)]),s("div",Gs,[s("div",Zs,[e(R)==="authenticated"?(t(),w(v,{key:0,"callback-store-review":I})):(t(),w(P,{key:1}))]),(t(!0),l(L,null,E(e(g),H=>(t(),w(r,{key:H.id,class:"w-full space-y-3 mb-3 before:h-[1px] before:block before:w-full before:bg-[var(--black-4)] before:mb-3",comment:H,"callback-report":()=>U(H),"callback-remove":()=>M(H),"callback-store-review":I,"onComment:like":x},null,8,["comment","callback-report","callback-remove"]))),128)),e(_)?(t(),w(je,{key:0,"btn-variant":"btn-secondary",meta:e(_),loading:e(f),onPaginate:A[0]||(A[0]=H=>c(H.page))},null,8,["meta","loading"])):d("",!0)])],512)}}}),tl=Object.assign(el,{__name:"BlogCommentList"}),sl=o=>{const i=document.createElement("html");i.innerHTML="";const p=document.querySelectorAll("table"),g=document.querySelectorAll("iframe"),f=document.querySelectorAll("video");for(let m=0;m<p.length;m++)p[m].outerHTML='<div class="table-wrap">'+p[m].outerHTML+"</div>";for(let m=0;m<g.length;m++)g[m].outerHTML='<div class="iframe-wrap">'+g[m].outerHTML+"</div>";for(let m=0;m<f.length;m++)f[m].outerHTML='<div class="video-wrap">'+f[m].outerHTML+"</div>";return i.outerHTML},ll={class:"text-[14px] leading-[1.3] flex items-center space-x-2"},ol={class:"flex items-center pl-1"},nl=["textContent"],al={key:1,class:"flex items-center pl-1"},il=["textContent"],rl={key:2,class:"flex items-center pl-1"},cl=["title"],ul=ee({__name:"BlogInfoIcons",props:{localLike:{type:Boolean},localCountLikes:{default:"0"},countComments:{default:"0"},localFavorite:{type:Boolean},viewsCount:{default:"0"},readingTime:{},isQuizActive:{type:Boolean,default:!1},hasQuizResult:{type:Boolean,default:!1}},emits:["likeClicked","commentClicked","favoriteClicked"],setup(o){const i=o;return(p,g)=>{const f=de;return t(),l("div",ll,[n(te,{class:"btn-secondary-sm btn-ic-sm","ic-left":i.localLike?"icons/like-fill":"icons/like-stroke-light",text:i.localCountLikes,onClick:g[0]||(g[0]=se(m=>p.$emit("likeClicked"),["prevent","stop"]))},null,8,["ic-left","text"]),i.countComments?(t(),w(te,{key:0,class:"btn-secondary-sm btn-ic-sm","ic-left":"icons/comments-stroke-light",text:i.countComments,onClick:g[1]||(g[1]=se(m=>p.$emit("commentClicked"),["stop","prevent"]))},null,8,["text"])):d("",!0),n(te,{class:"btn-secondary-sm btn-ic-sm","ic-left":i.localFavorite?"icons/bookmark-fill":"icons/bookmark-stroke-light",onClick:g[2]||(g[2]=se(m=>p.$emit("favoriteClicked"),["stop","prevent"]))},null,8,["ic-left"]),s("div",ol,[n(f,{class:"h-[24px] w-[24px] mr-0.5",name:"icons/viewing-stroke-light"}),s("span",{class:"offset-text-mac-os",textContent:q(i.viewsCount)},null,8,nl)]),i.readingTime?(t(),l("div",al,[n(f,{class:"h-[24px] w-[24px] mr-0.5",name:"icons/time-light"}),s("span",{class:"offset-text-mac-os",textContent:q(`${i.readingTime}′`)},null,8,il)])):d("",!0),i.isQuizActive||i.hasQuizResult?(t(),l("div",rl,[s("div",{title:i.hasQuizResult?"Квиз пройдет":"В статье есть квиз",class:"relative"},[i.hasQuizResult?(t(),w(f,{key:1,class:"h-[24px] w-[24px] mr-0.5",name:"icons/edu-light-check"})):(t(),w(f,{key:0,class:"h-[24px] w-[24px] mr-0.5",name:"icons/edu-light"}))],8,cl)])):d("",!0)])}}}),Re=Object.assign(ul,{__name:"BlogPageBlogInfoIcons"}),dl={key:0,class:"w-full space-y-8"},ml={class:"text-[40px] font-din-black uppercase leading-[1.2] md:tracking-[0.01em] mb
2-4 flex items-center justify-between"},pl={class:"w-full space-y-2"},_l={class:"grid grid-cols-12 gap-2"},xl={key:0,class:"text-[var(--red)]"},gl={class:"w-full max-md:space-y-2 md:space-x-2 md:flex"},fl={key:1,class:"w-full space-y-6"},vl={class:"flex items-center justify-between w-full max-md:flex-wrap"},hl={class:"text-[40px] font-din-black uppercase leading-[1.2] md:tracking-[0.01em] max-md:-mb-2 flex items-center justify-between w-full flex-wrap"},bl={class:"text-[var(--black-50)] max-md:text-[24px] max-md:w-full max-md:mt-6"},kl={key:1,class:"w-full space-y-6"},wl={class:"grid grid-cols-12 gap-y-4 sm:gap-x-10"},yl={class:"space-y-2 col-span-12 sm:col-span-4 lg:col-span-3"},$l={class:"w-full text-[14px] leading-[1.3] medium"},Cl={class:"space-y-2 col-span-12 sm:col-span-4 lg:col-span-3"},ql={class:"w-full text-[14px] leading-[1.3] medium"},Tl={key:2},Sl={class:"w-full space-y-2"},zl=["onClick"],Ll={class:"w-full text-[18px] bold flex items-center"},Bl={class:"w-full"},Il={key:0},Ml={class:"w-full space-y-4"},Al={class:"flex items-center w-full md:w-[248px]"},Pl={class:"text-[14px] medium min-w-8"},Rl={key:3,class:"flex justify-between flex-col w-full max-md:flex-wrap pt-[8px]"},El={class:"text-[30px] font-din-black uppercase leading-[1.2] md:tracking-[0.01em] max-md:-mb-2 flex items-center justify-between w-full flex-wrap"},Hl={class:"w-full relative mt-6 md:mt-4"},Ol={class:"col-span-12 md:col-span-4"},jl={key:4,class:"w-full max-md:flex-wrap pt-[8px]"},Dl={class:"md:grid grid-cols-12 gap-4 mt-6 md:mt-4"},Fl={class:"relative w-full md:pt-[60%] pt-[65%] block"},Ul={class:"space-y-3 md:space-y-2"},Nl={class:"w-full max-md:space-y-2 md:space-x-2 md:flex"},Vl={key:2,class:"w-full space-y-6 text-center relative z-10"},Ql={class:"w-[195px] mx-auto relative -z-10 img-wrap"},Jl=["src"],Wl={class:"mx-auto space-y-2"},Kl={class:"w-full text-[24px] text-black font-din-black uppercase leading-[1.2] tracking-[0.4px] max-md:-mb-2"},Yl=["innerHTML"],Xl={class:"w-full xl:pt-2 max-md:space-y-2 md:space-x-2 md:flex"},Gl={key:1},Zl=ee({__name:"Quiz",props:{isOpen:{type:Boolean,default:!1},blogId:{default:0}},emits:["close"],setup(o,{emit:i}){const p=$e(),g=[Bt,It,Lt],f=z(null),m=z(null),h=o,_=i,R=[{key:"result",text:"Итоги"},{key:"answer",text:"Ответы"}],B=z("result"),{isMobile:j}=Ne(),a=z(null),c=z([]),x=z([]),I=z(null),U=z([]),M=z(!1),y=()=>{const T=localStorage.getItem(`blog.${h.blogId}.available`);if(new Date(T)<new Date&&(localStorage.removeItem(`blog.${h.blogId}.result`),localStorage.removeItem(`blog.${h.blogId}.available`)),a.value=JSON.parse(localStorage.getItem(`blog.${h.blogId}.result`)||"null"),c.value=[],a.value){const u=JSON.parse(localStorage.getItem(`blog.question.${a.value?.next_question?.id}`)||"null");a.value.next_question&&(a.value.next_question.user_answers=a.value.next_question?.user_answers?.length?a.value.next_question?.user_answers:u),c.value=a.value.next_question?.user_answers||[],x.value=a.value?.finished_result?.finished_at?[]:X(a.value)}a.value||W({blog_id:h.blogId})},A=()=>{if(localStorage.removeItem(`blog.question.${a.value?.next_question?.id}`),I.value=null,!c.value.length){I.value="Выберите хотя бы один вариант ответа";return}W({blog_id:h.blogId,answer_result_id:a.value?.next_question?.answer_result_id,result_id:a.value?.id,answers:c.value})},v=(T,u)=>{a.value?.next_question?.is_alone?c.value=[T]:u?c.value=[...c.value,T]:c.value=c.value.filter(N=>N!==T),localStorage.setItem(`blog.question.${a.value?.next_question?.id}`,JSON.stringify(c.value)),I.value=null},P=()=>{M.value=!0,a.value?.finished_result&&(a.value.finished_result.achievements=[]),localStorage.setItem(`blog.${h.blogId}.result`,JSON.stringify(a.value))},r=()=>{I.value=null,_("close")},H=()=>{W({blog_id:h.blogId,answer_result_id:a.value?.next_question?.answer_result_id,result_id:a.value?.id})},X=T=>{const u=[];return T?.finished_result?.answers?.forEach(()=>{u.push(!1)}),u},W=T=>{p.blog.processQuiz(T).then(({data:u})=>{const N=new Date;N.setDate(N.getDate()+1),localStorage.setItem(`blog.${h.blogId}.result`,JSON.stringify(u)),localStorage.setItem(`blog.${h.blogId}.available`,N.toISOString());const Y=JSON.parse(localStorage.getItem(`blog.question.${u?.next_question?.id}`)||"null");u.next_question&&(u.next_question.user_answers=u.next_question?.user_answers?.length?u.next_question?.user_answers:Y),c.value=u.next_question?.user_answers||[],x.value=u.finished_result?.finished_at?[]:X(u),a.value=u,a.value?.finished_result?.finished_at&&K()}).catch(()=>{_("close")})},K=()=>{p.blog.get({no_quiz:1,order_by:"date",order_to:"desc"}).then(T=>{"meta"in T&&(U.value=T.data.slice(0,5))})},le=T=>{const u=Math.floor(T/3600),N=Math.floor(T%3600/60),Y=T%60,G=[];return u>0&&G.push(ce(u,["час","часа","часов"],!0)),N>0&&G.push(ce(N,["минута","минуты","минут"],!0)),(Y>0||G.length===0)&&G.push(ce(Y,["секунда","секунды","секунд"],!0)),G.join(" ")},oe=T=>T*100>100?100:T*100,F=T=>Math.round((T.user_check_count||0)/(T.user_saw_count||1)*100),O=()=>{localStorage.removeItem(`blog.${h.blogId}.result`),localStorage.removeItem(`blog.${h.blogId}.available`),y()};return Ce(()=>{P()}),ue(()=>{y(),a.value?.finished_result?.finished_at&&K()}),(T,u)=>{const N=dt,Y=de,G=pe,ie=_e;return t(),w(Mt,{"model-value":o.isOpen,variant:!e(a)?.finished_result?.finished_at||e(M)||!e(a)?.finished_result?.achievements?.length?"md:max-w-[886px]":"md:max-w-[408px] md:overflow-hidden","variant-slot":!e(a)?.finished_result?.finished_at||e(M)||!e(a)?.finished_result?.achievements?.length?"":"max-md:!overflow-x-hidden","onUpdate:modelValue":u[2]||(u[2]=$=>_("close"))},{default:Q(()=>[e(a)?(t(),l(L,{key:0},[e(a).finished_result?.finished_at?e(M)||!e(a)?.finished_result?.achievements?.length?(t(),l("div",fl,[s("div",vl,[s("p",hl,[u[6]||(u[6]=s("span",{class:"mr-4"},"Результат квиза",-1)),s("span",bl,"Попытка №"+q(e(a).finished_result.attempt),1)])]),e(j)?(t(),w(N,{key:0,modelValue:e(B),"onUpdate:modelValue":u[0]||(u[0]=$=>me(B)?B.value=$:null),items:R,class:"not-scroll mb-8 pb-2"},null,8,["modelValue"])):d("",!0),e(B)==="result"&&e(a).finished_result||!e(j)?(t(),l("div",kl,[s("ul",wl,[s("li",yl,[s("p",$l,q(e(a).finished_result.correct_count)+" из 5 вопросов ",1),n(fe,{class:"flex-1 !h-1.5",length:`${oe(e(a).finished_result.correct_count/5)}%`,"variant-object":"!bg-gradient-to-r from-[#BFF3DF] via-[#C8DCFF] to-[#DA8FDD]"},null,8,["length"])]),s("li",Cl,[s("p",ql,q(le(e(a).finished_result.total_time)),1),n(fe,{class:"flex-1 !h-1.5",length:`${oe(e(a).finished_result.total_time/300)}%`},null,8,["length"])])])])):d("",!0),e(B)==="answer"||!e(j)?(t(),l("div",Tl,[s("ul",Sl,[(t(!0),l(L,null,E(e(a).finished_result?.answers||[],($,D)=>(t(),l("li",{key:D,class:"w-full space-y-4 bg-[var(--black-4)] rounded-2xl p-4"}
2,[s("div",{class:"relative space-y-2 pr-7 cursor-pointer",onClick:se(b=>e(x)[D]=!e(x)[D],["prevent","stop"])},[s("p",Ll,[s("span",{class:ne(["block mr-2 h-4 min-w-4 w-4 rounded-full text-white",$.is_correct?"bg-[var(--green)]":"bg-[var(--red)]"])},[n(Y,{class:"h-full w-full",name:$.is_correct?"icons/approve":"icons/x"},null,8,["name"])],2),Z(" Вопрос "+q(D+1),1)]),s("p",Bl,q($.question),1),n(Y,{class:ne(["h-4 w-4 absolute top-0 bottom-0 !my-auto right-0",{"-rotate-90":!e(x)[D]}]),name:"icons/arr-bottom"},null,8,["class"])],8,zl),e(x)[D]?(t(),l("div",Il,[s("ul",Ml,[(t(!0),l(L,null,E($?.answers,(b,S)=>(t(),l("li",{key:S,class:"pb-4 border-b border-[var(--opacity-12)] last:pb-0 last:border-none space-y-2 md:flex items-center"},[s("p",{class:ne(["text-[var(--black-50)] md:flex-1 md:pr-8",{"text-[var(--green)]":$.correct_answer_ids.includes(b.id),"text-[var(--red)]":$.made_answer_ids.includes(b.id)&&!$.correct_answer_ids.includes(b.id)}])},q(b.answer),3),s("div",Al,[n(fe,{class:"flex-1 !h-1.5 md:mr-4 mr-3 !bg-white",length:`${F(b)}%`},null,8,["length"]),s("p",Pl,q(F(b))+"% ",1)])]))),128))])])):d("",!0)]))),128))])])):d("",!0),e(U).length?(t(),l("div",Rl,[s("div",El,[n(G,{class:"text-[var(--black)] no-underline mr-4 flex items-center w-fit gap-2 group",to:"/blog?no_quiz=1"},{default:Q(()=>[u[7]||(u[7]=s("span",{class:"group-hover:decoration-[var(--black)] decoration-[transparent] underline-offset-8 underline"},"Больше статей",-1)),n(Y,{class:"h-4 w-4",name:"icons/arr-right-bold"})]),_:1})]),s("div",Hl,[(t(),w(e(Fe),{key:e(U)?.length||0,"slides-per-view":e(j)?1:2,"space-between":16,loop:!0,modules:g,navigation:{prevEl:e(f),nextEl:e(m)},class:"h-full"},{default:Q(()=>[(t(!0),l(L,null,E(e(U),($,D)=>(t(),w(e(Ue),{key:D},{default:Q(()=>[s("div",Ol,[n(ie,{post:$,"hide-statistic":""},null,8,["post"])])]),_:2},1024))),128))]),_:1},8,["slides-per-view","navigation"]))])])):(t(),l("div",jl,[n(k,{class:"w-[202px] md:w-[206px]",variant:"h-9 rounded"}),s("div",Dl,[(t(),l(L,null,E(2,$=>s("div",{key:`skeleton-${$}`,class:"col-span-12 md:col-span-6 space-y-3 md:space-y-2 h-full max-md:last:hidden"},[s("div",Fl,[n(k,{class:"w-full h-full absolute top-0 left-0",variant:"h-full rounded-2xl"})]),s("div",Ul,[n(k,{class:"w-1/4",variant:"h-[20.8px] rounded"}),n(k,{class:"w-[90%]",variant:"h-[28.8px] rounded"}),n(k,{class:"w-1/2",variant:"h-[16.8px] rounded"})])])),64))])])),s("div",Nl,[n(te,{text:"Завершить",class:"btn-dark max-md:w-full",onClick:u[1]||(u[1]=se($=>_("close"),["prevent","stop"]))}),n(te,{text:"Пройти еще раз",class:"btn-secondary max-md:w-full",onClick:O})])])):(t(),l("div",Vl,[u[9]||(u[9]=s("div",{class:"flex items-center justify-between w-full max-md:flex-wrap"},[s("p",{class:"text-[40px] font-din-black uppercase leading-[1.2] md:tracking-[0.01em] max-md:-mb-2 flex items-center justify-between w-full flex-wrap"}," Вы получили новую награду! ")],-1)),(t(!0),l(L,null,E(e(a)?.finished_result?.achievements,($,D)=>(t(),l("div",{key:D,class:"flex items-center flex-col justify-between w-full max-md:flex-wrap"},[s("div",Ql,[u[8]||(u[8]=s("img",{class:"object-contain m-0 absolute top-2/4 right-2/4 -translate-y-2/4 translate-x-2/4 max-w-max",src:zt,alt:"Лучи"},null,-1)),s("img",{src:$.icon,class:"w-full object-contain m-0 relative",alt:"Монитор"},null,8,Jl)]),s("div",Wl,[s("p",Kl,q($.name),1),s("p",{class:"w-full xl:text-[14px] xl:leading-[1.2]",innerHTML:$.description},null,8,Yl)])]))),128)),s("div",Xl,[n(te,{text:"К результатам",class:"btn-secondary w-full",onClick:se(P,["prevent","stop"])})])])):(t(),l("div",dl,[s("p",ml,[u[5]||(u[5]=Z(" Квиз ",-1)),s("span",null,[u[3]||(u[3]=s("span",{class:"max-md:hidden"},"вопрос",-1)),Z(" "+q(e(a).step),1),u[4]||(u[4]=s("span",{class:"text-[var(--black-50)]"},"/5",-1))])]),(t(),l("form",{key:e(a).next_question?.id,action:"#",class:"w-full space-y-6"},[s("p",null,q(e(a).next_question?.question),1),s("div",pl,[s("ul",_l,[(t(!0),l(L,null,E(e(a).next_question?.answers,$=>(t(),l("li",{key:$.id,class:"col-span-12 md:col-span-6"},[e(a).next_question?.is_alone?(t(),w(Ie,{key:0,"model-value":e(a).next_question?.user_answers?.includes($.id)?1:void 0,name:"cook",text:$.answer,type:"radio",value:"1",class:"!flex-row !min-h-[initial] !rounded-xl h-full","variant-input"
2:(e(a).next_question?.is_alone?"!rounded-full":"")+" max-xl:mr-3","variant-text":"!pr-0",onChange:D=>v($.id,D)},null,8,["model-value","text","variant-input","onChange"])):(t(),w(Ie,{key:1,"model-value":!!e(a).next_question?.user_answers?.includes($.id),name:"cook",text:$.answer,type:"checkbox",value:"1",class:"!flex-row !min-h-[initial] !rounded-xl h-full","variant-input":(e(a).next_question?.is_alone?"!rounded-full":"")+" max-xl:mr-3","variant-text":"!pr-0","onUpdate:modelValue":D=>v($.id,D)},null,8,["model-value","text","variant-input","onUpdate:modelValue"]))]))),128))]),e(I)?(t(),l("p",xl,q(e(I)),1)):d("",!0)])])),s("div",gl,[!e(a)?.finished_result?.finished_at&&e(a)?.step!==1?(t(),w(te,{key:0,text:"Назад",class:"btn-secondary max-md:w-full",onClick:se(H,["prevent","stop"])})):(t(),w(te,{key:1,text:"Закрыть",class:"btn-secondary max-md:w-full",onClick:se(r,["prevent","stop"])})),n(te,{text:"Далее",class:"btn-dark max-md:w-full",onClick:A})])]))],64)):(t(),l("div",Gl,[n(k,{loading:!0,variant:"h-[320px]",class:"flex-1 mr-2"})]))]),_:1},8,["model-value","variant","variant-slot"])}}}),eo=Object.assign(Zl,{__name:"BlogPageQuiz"}),to=at(()=>it(()=>import("./-2IxFlK7.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.default||o)),so={class:"w-full"},lo={class:"container xl:pt-8 mb-10 md:mb-20"},oo={key:0,class:"min-w-[100%] flex items-center min-h-[38px] mb-4 py-1 border-b border-[var(--black-5)] -mx-4 sm:mx-0 md:mb-5 md:py-0 xl:border-0 xl:min-h-[auto]"},no={class:"flex w-full items-center relative"},ao={class:"absolute left-4 xl:relative sm:left-0"},io={class:"flex flex-col"},ro={class:"mb-6 md:mb-8 md:order-4 -mx-4 sm:mx-0"},co=["srcset"],uo=["srcset"],mo=["srcset"],po=["src","alt"],_o={class:"w-full flex items-center flex-wrap max-md:mb-1 md:order-1"},xo=["textContent"],go=["textContent"],fo={class:"grid grid-cols-12 gap-x-6"},vo={key:0,class:"col-span-12 xl:col-span-3 xl:order-2"},ho={key:0,class:"flex items-center xl:mb-8 mb-10"},bo={class:"w-[60px] md:w-20"},ko={class:"flex-1 md:pl-3.5 pl-3"},wo=["textContent"],yo=["textContent"],$o={key:1,class:"bg-[var(--black-4)] p-4 rounded-xl space-y-3 xl:mb-8 mb-10"},Co={class:"text-[18px] font-din-medium uppercase leading-[1.2] md:tracking-[0.05em] w-full"},qo={class:"block"},To={class:"col-span-12 xl:col-span-9 xl:order-1 space-y-10 md:space-y-8"},So=["innerHTML"],zo=["innerHTML"],Lo={key:1,class:"accent-block content-static bg-[var(--black-4)] md:!mt-14 rounded-2xl p-4 md:rounded-3xl md:p-6 max-md:-mx-4"},Bo=["innerHTML"],Io={class:"text-[14px] leading-[1.3] flex items-center md:order-3 mb-6 flex-wrap gap-2 max-md:!mt-4"},Mo={class:"flex gap-2 mr-auto"},Ao={class:"quiz-button w-full pt-4"},Po={class:"space-y-1 md:space-y-2 flex-1"},Ro={class:"w-full"},Eo={key:0},Ho={key:1},Oo={key:2,class:"w-full space-y-4 md:pt-6"},jo={class:"text-[var(--black-50)]"},Do={class:"list-none p-0 !-mb-2 flex flex-wrap items-center"},Fo={key:3,class:"w-full space-y-4 max-md:!mt-20"},Uo={class:"xl-stretch-screen 2xl:!w-full min-w-[100%] -mx-4 sm:mx-0"},No={class:"max-w-[610px] mx-auto max-md:!mt-16"},Vo=ee({__name:"Detail",props:{post:{}},setup(o){const i=o,{isAuth:p}=ke(),g=$e(),{isDesktop:f}=Ne(),m=qe(),h=we(),_=z(!1),R=z(i.post.is_favorite),B=z(h.query.action==="quiz"),j=z(!1),a=z(i.post.read_percent),c=z(null),{y:x,height:I}=gt(c),{height:U}=ft(),{localLike:M,localCountLikes:y,toggleLike:A}=vt(i.post),v=C(()=>Math.floor((U.value-x.value-100)/(I.value/100))),P=()=>p.value&&i.post.read_percent<100&&v.value>0&&v.value>a.value;ae(()=>i.post,S=>{R.value=S.is_favorite,M.value=S.me_like,y.value=S.count_likes||0,a.value=S.read_percent});const H=st(()=>{if(!P())return;const S=Math.min(v.value,100);g.blog.updatePercent(i.post.id,S).then(({success:J})=>{J&&(a.value=S,S===100&&X.stop())})},500),X=ae(v,()=>{P()&&H()},{immediate:!0});ue(()=>{(i.post.read_percent>=100||!p.value)&&X.stop(),h.query.action==="quiz"&&he(".quiz-button")});const W=()=>{he("#comments")},K=C(()=>{const S=[{title:f.value?"Журнал о кофе":"В Журнал",link:"/blog"}];return i.post.group&&S.push({title:`Серия статей «${i.post.group.name}»`,link:`/blog/series/${i.post.group.slug}`}),S.push({title:i.post.title}),S}),le=C(()=>m.similarPosts),oe=`${St()+"//"+Pt().host}/blog/${i.post.slug}`,F=()=>{R.value=!R.value,!_.value&&(_.value=!0,g.blog.toggleFavorite(i.post.id).then(S=>R.value=S.status).catch(S=>{lt().$toast.error(ot(S)),R.value=!R.value}).finally(()=>_.value=!1))},O=S=>S>=1e6?(S/1e6).toFixed(1)+"M":S>=1e3?Math.floor(S/1e3)+"K":`${S}`,T=C(()=>O(i.post.views??0)),u=C(()=>O(y.value??0)),N=C(()=>O(i.post.count_comments??0)),{isMobileApp:Y,setHeaderTitle:G,setHeaderActions:ie}=ye(),$=()=>{G(),ie({share:{callback:()=>nt("share",`${i.post.title} - ${location.origin}${location.pathname}`)},bookmark:{active:R,callback:F}})},D=()=>{B.value=!1;const S=`/blog/${h.params.type}`;window.history.pushState({path:S},"",S)};He(()=>{$()});let b=null;return ue(()=>{sl(),b=At(),h.hash==="#comments"&&setTimeout(W,1e3)}),Ce(()=>{b&&b()}),(S,J)=>{const Ve=Ee,Te=pe,xe=de,Qe=to,Je=_e,We=tl,Ke=tt;return t(),l(L,null,[s("div",so,[d("",!0),s("div",lo,[e(Y)?d("",!0):(t(),l("div",oo,[s("div",no,[s("div",ao,[n(Ve,{"show-max-xl":"",items:e(K)},null,8,["items"])])])])),s("div",io,[s("picture",ro,[o.post.image_preview_sizes?.size480?(t(),l("source",{key:0,media:"(max-width: 480px)",srcset:o.post.image_preview_sizes.size480},null,8,co)):d("",!0),o.post.image_preview_sizes?.size768?(t(),l("source",{key:1,media:"(max-width: 758px)",srcset:o.post.image_preview_sizes.size768},null,8,uo)):d("",!0),o.post.image_preview_sizes?.size1024?(t(),l("source",{key:2,media:"(max-width: 1024px)",srcset:o.post.image_preview_sizes.size1024},null,8,mo)):d("",!0),o.post.image_preview?(t(),l("img",{key:3,class:"rounded-t-2xl md:rounded-2xl w-full object-cover max-h-[calc(100vh-170px)]",src:o.post.image_preview,alt:o.post.title},null,8,po)):d("",!0)]),s("div",_o,[(t(!0),l(L,null,E(o.post.categories,V=>(t(),w(Te,{key:`category-${V.id}`,class:"tc-btn btn-secondary-xs mr-4 mb-2",to:`/blog/${V.slug}`},{default:Q(()=>[Z(q(V.name),1)]),_:2},1032,["to"]))),128)),o.post.published_at?(t(),l("p",{key:0,class:"mb-2 mr-4 text-[14px] md:text-[16
2px] text-[var(--black-50)]",textContent:q(e(Tt)(o.post.published_at,"dayMonthYear"))},null,8,xo)):d("",!0)]),s("h1",{class:"text-[40px] mb-3 md:tracking-[0.02em] xl:leading-[1.1] xl:text-[80px] md:mb-6 md:order-2",textContent:q(o.post.title)},null,8,go),n(Re,{class:"md:order-3 mb-6","local-like":e(M),"local-count-likes":e(u)||"0","count-comments":e(N)||"0","local-favorite":e(R),"views-count":e(T)||"0","reading-time":e(a)<100?o.post.min_for_reading:0,"is-quiz-active":o.post.is_quiz_active||!1,"has-quiz-result":o.post.has_quiz_result||!1,onLikeClicked:e(A),onCommentClicked:W,onFavoriteClicked:F},null,8,["local-like","local-count-likes","count-comments","local-favorite","views-count","reading-time","is-quiz-active","has-quiz-result","onLikeClicked"])]),s("div",fo,[o.post.author||(o.post.group_blogs||[]).length?(t(),l("div",vo,[o.post.author?(t(),l("div",ho,[s("div",bo,[n(De,{src:o.post.author.avatar,letter:o.post.author.full_name[0],size:"80"},null,8,["src","letter"])]),s("div",ko,[s("p",{class:"bold text-[14px] leading-[1.2] md:text-[16px] mb-1",textContent:q(o.post.author.full_name)},null,8,wo),o.post.author.position?(t(),l("p",{key:0,class:"text-[14px] leading-[1.2] text-[var(--black-50)] m-0",textContent:q(o.post.author.position)},null,8,yo)):d("",!0)])])):d("",!0),o.post.group&&(o.post.group_blogs||[]).length>0?(t(),l("div",$o,[s("div",{class:"flex items-center",onClick:J[0]||(J[0]=V=>j.value=!e(j))},[s("p",Co,[J[2]||(J[2]=Z(" Это статья из серии ",-1)),s("span",qo,"«"+q(o.post.group.name)+"»",1)]),n(xe,{class:ne([{"rotate-180":e(j)},"h-4 w-4 min-w-[16px] ml-3 text-[var(--opacity-30)] xl:hidden"]),name:"icons/arr-bottom"},null,8,["class"])]),s("ol",{class:ne([{"max-xl:hidden":!e(j)},"text-[14px] leading-[1.3] medium space-y-3 list-decimal-wrap"])},[(t(!0),l(L,null,E(o.post.group_blogs,V=>(t(),l("li",{key:`group-${V.id}`},[n(Te,{class:"text-list [&.active]:text-black",to:`/blog/${V.slug}`},{default:Q(()=>[Z(q(V.title),1)]),_:2},1032,["to"])]))),128))],2)])):d("",!0)])):d("",!0),s("div",To,[o.post.mini_description?(t(),l("div",{key:0,class:"content-static xl:text-[32px] text-[24px] -mb-4 md:mb-0",innerHTML:o.post.mini_description},null,8,So)):d("",!0),s("div",{ref_key:"contentRef",ref:c,class:"content-static image-limits",innerHTML:o.post.description},null,8,zo),o.post.resume?(t(),l("div",Lo,[s("div",{class:"space-y-4",innerHTML:o.post.resume},null,8,Bo)])):d("",!0),s("div",Io,[s("div",Mo,[n(Re,{class:"mr-auto","local-like":e(M),"local-count-likes":e(u)||"0","count-comments":e(N)||"0","local-favorite":e(R),"views-count":e(T)||"0","reading-time":e(a)<100?o.post.min_for_reading:0,"is-quiz-active":o.post.is_quiz_active||!1,"has-quiz-result":o.post.has_quiz_result||!1,onLikeClicked:e(A),onCommentClicked:W,onFavoriteClicked:F},null,8,["local-like","local-count-likes","count-comments","local-favorite","views-count","reading-time","is-quiz-active","has-quiz-result","onLikeClicked"])]),n(Qe,{title:"","wrapper-class":"flex","item-class":"mr-3","share-title":o.post.title,"share-url":oe},null,8,["share-title"])]),s("div",Ao,[o.post.is_quiz_active?(t(),l("div",{key:0,class:"w-full bg-[var(--black-4)] hover:bg-[--black-5] active:bg-[--black-6] p-4 md:p-6 rounded-2xl md:rounded-3xl flex items-center space-x-4 cursor-pointer duration-300",onClick:J[1]||(J[1]=V=>B.value=!0)},[n(xe,{class:"w-8 h-8 min-w-8 md:w-16 md:h-16 md:min-w-16",name:"icons/edu"}),s("div",Po,[J[3]||(J[3]=s("p",{class:"text-[24px] font-din-black uppercase leading-[1.2] md:tracking-[0.02em]"}," Проверьте знания ",-1)),s("p",Ro,[e(p)?(t(),l("span",Eo," Ответьте правильно на пять вопросов по материалам статьи и получите новое достижение ")):(t(),l("span",Ho," Ответьте на пять вопросов, собранных по материалам статьи "))])]),n(xe,{class:"w-8 h-8 min-w-8 md:w-16 md:h-16 md:min-w-16 -rotate-90",name:"icons/arr-bottom-sm"})])):d("",!0)]),o.post.tags&&o.post.tags.length>0?(t(),l("div",Oo,[s("h2",null,[J[4]||(J[4]=Z(" Теги ",-1)),s("span",jo,q(o.post.tags.length),1)]),s("ul",Do,[(t(!0),l(L,null,E(o.post.tags,V=>(t(),l("li",{key:`tag-${V.id}`},[n(ve,{hashtag:"",class:"tag-sm mr-2 mb-2",text:V.name,link:`/blog/tags?tags=${V.id}`},null,8,["text","link"])]))),128))])])):d("",!0),e(le).length>
20?(t(),l("div",Fo,[J[5]||(J[5]=s("h2",null,"Читайте также",-1)),s("div",Uo,[n(e(Fe),{"grab-cursor":!0,"space-between":24,breakpoints:{0:{slidesPerView:"auto"},757:{slidesPerView:"auto"},1440:{slidesPerView:3}},class:"w-full px-4 sm:!px-0"},{default:Q(()=>[(t(!0),l(L,null,E(e(le),V=>(t(),w(e(Ue),{key:`post-${V.id}`,class:"max-md:!w-[calc(100dvw-52px)] max-2xl:max-w-[320px]"},{default:Q(()=>[n(Je,{post:V},null,8,["post"])]),_:2},1024))),128))]),_:1})])])):d("",!0),s("div",No,[n(Ke,null,{default:Q(()=>[n(We,{id:"comments",post:o.post},null,8,["post"])]),_:1})])])])])]),e(B)?(t(),w(eo,{key:0,"is-open":e(B),"blog-id":o.post.id,onClose:D},null,8,["is-open","blog-id"])):d("",!0)],64)}}}),Qo=Object.assign(be(Vo,[["__scopeId","data-v-000e0dba"]]),{__name:"BlogPageDetail"}),Nn=ee({__name:"[[action]]",async setup(o){let i,p;const g=we(),f=qe(),{orderBy:m,orderTo:h}=Oe(),_=C(()=>g.params.type),R=C(()=>g.params.action),B=C(()=>`blog-page-data-${_.value||""}-${R.value||""}`),{data:j,error:a,status:c}=([i,p]=Se(async()=>ze(B,async()=>{const r={slug:_.value,page:Number(g.query.page)||1,order_to:h.value,order_by:m.value,no_quiz:Number(g.query.no_quiz)||0};return await f.fetchBlog(r)},{server:!0,lazy:!0})),i=await i,p(),i),{data:x}=([i,p]=Se(()=>ze("fetchBlogCategories",f.fetchCategories,{server:!0,lazy:!0})),i=await i,p(),i),I=z(null);ae(j,()=>{j.value&&(I.value=j.value,f.applyBlogResponse(I.value,!0))},{immediate:!0}),ae(x,()=>{Array.isArray(x.value)&&f.applyCategories(x.value)},{immediate:!0});const U=r=>{throw rt({fatal:!0,statusCode:r?.statusCode||500})};ae(c,r=>{r==="error"&&U(a.value)});const M=C(()=>_.value?!!I.value&&"meta"in I.value:!0),y=C(()=>I.value&&!("meta"in I.value)?I.value.data:f.post),A=C(()=>({title:f.seoTitle||"Журнал о кофе. Блог Tasty Coffee",description:f.seoDescription||void 0,keywords:f.seoKeyword||void 0}));qt(A,r=>{ct(r)});const v=Rt(),P=r=>({"@type":"BlogPosting",headline:r.seo_title,url:v.getUrl(`blog/${r.slug}`),datePublished:r.published_at,dateModified:r.published_at,description:r.seo_description||"",author:{"@type":"Person",name:r.author?.full_name},publisher:{"@type":"Organization",name:"Tasty Coffee",logo:{"@type":"ImageObject",url:v.getUrl("favicon.svg")}}});return Me(()=>{if(!M.value)return{"@context":"https://schema.org","@type":"Blog"};const r=f.postList.slice(0,10);return{"@context":"https://schema.org","@type":"Blog",name:"Журнал о кофе. Блог Tasty Coffee",description:"Статьи о кофе, чае и правильном заваривании. Обзоры сортов, рецепты, новости кофейной индустрии и советы от экспертов Tasty Coffee",url:v.getUrl("blog"),publisher:{"@type":"Organization",name:"Tasty Coffee",url:v.getUrl(),logo:{"@type":"ImageObject",url:v.getUrl("favicon.svg")}},mainEntityOfPage:{"@type":"WebPage","@id":v.getUrl("blog")},blogPost:r.map(P)}}),Me(()=>{if(M.value||!y.value)return{"@context":"https://schema.org","@type":"BlogPosting"};const r=y.value,H=v.getUrl(`blog/${r.slug}`),X=r.min_for_reading,W={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#160;":" ","&mdash;":"—","&ndash;":"–","&laquo;":"«","&raquo;":"»","&hellip;":"…"},K=r.description?r.description.replace(/<[^>]+>/g," ").replace(/&[a-z]+;|&#\d+;/gi,F=>W[F]??"").replace(/\s+/g," ").trim():"",le=K?K.split(" ").filter(Boolean).length:0,oe=r.categories?.[0]?.name||"Кофе";return{"@context":"https://schema.org","@type":"BlogPosting",headline:r.seo_title||r.title,url:H,mainEntityOfPage:{"@type":"WebPage","@id":H},description:r.seo_description||"",datePublished:r.published_at,dateModified:r.published_at,author:{"@type":"Person",name:r.author?.full_name},publisher:{"@type":"Organization",name:"Tasty Coffee",url:v.getUrl(),logo:{"@type":"ImageObject",url:v.getUrl("favicon.svg"),width:"200",height:"60"}},...r.image_preview?{image:{"@type":"ImageObject",url:r.image_preview}}:{},keywords:r.seo_keyword,wordCount:le>0?String(le):void 0,inLanguage:"ru-RU",articleSection:oe,...K?{articleBody:K}:{},...X?{timeRequired:`PT${X}M`}:{}}}),(r,H)=>{const X=zs,W=Ns,K=Qo;return e(M)?(t(),w(X,{key:0,slug:e(_)},null,8,["slug"])):e(c)!=="success"?(t(),w(W,{key:1})):e(y)?(t(),w(K,{key:2,post:e(y)},null,8,["post"])):d("",!0)}}});
2export{Nn 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.