1import{_ as R}from"./Dvp5eJYn.js";import{g as U,a as V,_ as X}from"./BoEdflDy.js";import{_ as T,c,o as i,h as m,u as a,F as q,i as H,t as g,j as f,b as r,k as J,g as A,l as W,f as k,x as G,r as K,m as Y,a as $,y as Z,w as D,d as b,H as ee}from"./BvL-IYYn.js";import{_ as te}from"./DepTpV_w.js";import{_ as se}from"./BZkpJWio.js";import{_ as ae}from"./CxSa0lRe.js";import{g as I}from"./DD0Ei5De.js";import{u as ne}from"./CPrPTZq8.js";import{u as oe}from"./g2nX5RMs.js";import"./B54DC8i5.js";import"./ds4r58ay.js";import"./oghThegB.js";import"./pXe82bQ1.js";/* empty css */import"./dYF520A0.js";import"./CznL0vnw.js";import"./CN-YOjgK.js";import"./NKa09wbT.js";import"./wJ78FdQw.js";import"./DfvuLAVA.js";const re={class:"news-item-header content-container"},ie={key:0,class:"news-item-header__tags"},ce={class:"news-item-header__inner"},le={class:"news-item-header__column"},ue={class:"news-item-header__title"},me={class:"news-item-header__column news-item-header__column--right"},de={class:"news-item-header__date-wrap"},_e={class:"news-item-header__date"},pe={class:"news-item-header__date-time"},he={key:0,class:"news-item-header__source-wrap"},we=["href"],ge={key:1,class:"news-item-header__source"},ye={__name:"news-item-header",props:{newsItem:{type:Object,required:!0}},setup(s){const e=s,n=c(()=>new Date(e.newsItem.publishedAt).toLocaleString("ru-RU",{month:"long",day:"numeric",year:"numeric"})),l=c(()=>new Date(e.newsItem.publishedAt).toLocaleString("ru-RU",{hour:"numeric",minute:"numeric"})),p=c(()=>{var o;return((o=e.newsItem.tags)==null?void 0:o.length)>0}),d=c(()=>{var o;return!!((o=e.newsItem.source)!=null&&o.name)});return(o,u)=>(i(),m("div",re,[a(p)?(i(),m("ul",ie,[(i(!0),m(q,null,H(s.newsItem.tags,h=>(i(),m("li",{key:h._id,class:"news-item-header__tag"},g(h.name),1))),128))])):f("",!0),r("div",ce,[r("div",le,[r("h1",ue,g(s.newsItem.title),1)]),r("div",me,[r("div",de,[u[0]||(u[0]=r("div",{class:"news-item-header__caption"},"ÐÑбликаÑиÑ",-1)),r("div",_e,[J(g(a(n))+" ",1),r("span",pe,g(a(l)),1)])]),a(d)?(i(),m("div",he,[u[1]||(u[1]=r("div",{class:"news-item-header__caption"},"ÐÑÑоÑник",-1)),s.newsItem.source.link?(i(),m("a",{key:0,class:"news-item-header__source news-item-header__source--link",href:s.newsItem.source.link,target:"_blank"},g(s.newsItem.source.name),9,we)):(i(),m("div",ge,g(s.newsItem.source.name),1))])):f("",!0)])])]))}},fe=T(ye,[["__scopeId","data-v-0471892a"]]);function ve({slug:s,isDraft:e=!1,previewId:n}={}){return e?I`*[_type == "news" && slug.current == "${s}" && uuid == "${n}"] | order(_updatedAt desc)[0]{ 2 ..., 3 'uuid': false, 4 seoTitle, 5 seoDescription, 6 tags[]->{..., tag->}, 7 content[]{ 8 _type != 'recommendedArticle' && _type != 'recommendedNewsItem' && _type != 'authorOpinion' => @, 9 _type == 'recommendedArticle' => {..., article-> { 10 _type, 11 slug, 12 image, 13 publishedAt, 14 size, 15 title, 16 subtitle, 17 titleColor, 18 subtitleColor, 19 shadowColor, 20 isFullImage, 21 backgroundColor[]{hex->}, 22 crew[]{staff->, speciality->}, 23 } 24 }, 25 _type == 'recommendedNewsItem' => {..., newsItem-> { 26 _type, 27 slug, 28 publishedAt, 29 title, 30 titleColor, 31 backgroundColor[]{hex->}, 32 } 33 }, 34 _type == 'authorOpinion' => {..., author->} 35 } 36 }`:I`*[_type == "news" && slug.current == "${s}" && !(_id in path('drafts.**'))][0]{ 37 ..., 38 'uuid': false, 39 seoTitle, 40 seoDescription, 41 tags[]->{..., tag->}, 42 content[]{ 43 _type != 'recommendedArticle' && _type != 'recommendedNewsItem' && _type != 'authorOpinion' => @, 44 _type == 'recommendedArticle' => {..., article-> { 45 _type, 46 slug, 47 image, 48 publishedAt, 49 size, 50 title, 51 subtitle, 52 titleColor, 53 subtitleColor, 54 shadowColor, 55 isFullImage, 56 backgroundColor[]{hex->}, 57 crew[]{staff->, speciality->}, 58 } 59 }, 60 _type == 'recommendedNewsItem' => {..., newsItem-> { 61 _type, 62 slug, 63 publishedAt, 64 title, 65 titleColor, 66 backgroundColor[]{hex->}, 67 } 68 }, 69 _type == 'authorOpinion' => {..., author->} 70 } 71 }`}function be({slug:s,tags:e=[]}={}){return e.length>0?I`*[_type == "news" && !(_id in path('drafts.**')) && slug.current != "${s}" && references(*[_type=="tag" && name in ${JSON.stringify(e)}
71]._id)] | order(publishedAt desc) [0...30] { 72 slug, 73 title, 74 publishedAt 75 }`:I`*[_type == "news" && !(_id in path('drafts.**')) && slug.current != "${s}"] | order(publishedAt desc) [0...30] { 76 slug, 77 title, 78 publishedAt 79 }`}async function Ie({slug:s,newsItem:e}={}){var o;const n=e.value.isOtherNewsByTag;let l={slug:s};if(n){const u=(o=e.value.tags)==null?void 0:o.map(({name:h})=>h);l={...l,tags:u}}const p=be(l);return await A(p)}const xe={key:0,class:"news-page"},ke={class:"news-page__other-news content-container"},Ae={__name:"[slug]",async setup(s){let e,n;ne();const l=W(),{slug:p}=l.params,{previewId:d}=l.query,o=c(()=>!!d),u=c(()=>d?"previewClient":"default"),h=ve({slug:p,isDraft:!!d,previewId:d}),S=U(),{data:t,refresh:B}=([e,n]=k(()=>A(h,{},{client:u.value})),e=await e,n(),e),v=c(()=>{var _;return!((_=t.value)!=null&&_._id)});v.value&&G({statusCode:404,message:"СÑÑаниÑа не найдена"});const{data:P}=([e,n]=k(()=>Ie({slug:p,newsItem:t})),e=await e,n(),e),{data:C}=([e,n]=k(()=>A(S,{},{client:u.value})),e=await e,n(),e),x=K(!0),Q=c(()=>`${t.value.seoTitle||t.value.title} â DOXA`),N=c(()=>oe({image:t.value.ogImage}));Y({title:Q,meta:v.value?[]:V({ogImageUrl:N.value,ogType:"article",author:"DOXA team",path:l.fullPath,...t.value}),script:[{type:"application/ld+json",key:"ld-article",children:JSON.stringify({"@context":"https://schema.org","@type":"NewsArticle",headline:t.value.title,description:t.value.description||t.value.title,datePublished:t.value.publishedAt,dateModified:t.value._updatedAt||t.value.publishedAt,author:{"@type":"Organization",name:"DOXA"},publisher:{"@type":"Organization",name:"DOXA",url:"https://doxa.team",logo:{"@type":"ImageObject",url:"https://doxa.team/logo.png"}},image:N.value,url:`https://doxa.team/news/${t.value.slug.current}`,mainEntityOfPage:{"@type":"WebPage","@id":`https://doxa.team/news/${t.value.slug.current}`}})}]});const F=c(()=>{const{tags:_,title:O}=t.value,w=_&&_.length>0?_[0]:null,y=[{text:"ÐлавнаÑ",href:"/"},{text:"ÐовоÑÑи",href:"/news"}];return w&&w.name&&y.push({text:w.name,href:`/news?tag=${w.name}`}),y.push({text:O}),y}),j=async()=>{x.value=!1,await ee(),await B(),x.value=!0};return(_,O)=>{const w=R,y=X,z=fe,E=te,L=se,M=ae;return a(v)?f("",!0):(i(),m("div",xe,[!a(v)&&a(x)?(i(),$(M,{key:0,"is-animated-header":"","is-header-shown":"","breadcrumb-items":a(F)},Z({default:D(()=>[a(C).isShowDisclaimer?(i(),$(y,{key:0,disclaimer:a(C)},null,8,["disclaimer"])):f("",!0),b(z,{"news-item":a(t)},null,8,["news-item"]),b(E,{content:a(t),class:"news-page__article-content"},null,8,["content"]),r("div",ke,[b(L,{news:a(P),title:"ÐÑÑгие новоÑÑи","white-background":""},null,8,["news"])])]),_:2},[a(o)?{name:"progress-bar",fn:D(()=>[b(w,{onClick:j})]),key:"0"}:void 0]),1032,["breadcrumb-items"])):f("",!0)]))}}},qe=T(Ae,[["__scopeId","data-v-d7e505c9"]]);export{qe as default}; 80//# sourceMappingURL=Bb0kQMAM.js.map
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.