PageSourceSearch

https://mst.ru/_nuxt/bml5FRpq.js

js mst.ru collected 2026-10-05 03:41:21 UTC 3,569 bytes, 1 lines download raw bytes

1import{q as b,ar as M,U as v,k as E,h as r,aH as A,ac as c,o as l,b as P,n as g,j as x,af as q,aE as S,J as B}from"./7k1903kh.js";import{u}from"./CnmNZWVW.js";import{_ as R}from"./CB21zOxs.js";const K=b("news",{state:()=>({newsList:[],newsSections:[],detailNews:{},currentSection:0,sort:"DATE"}),getters:{getNewsList:e=>e.newsList,getNewsSections:e=>e.newsSections,getCurrentSection:e=>e.currentSection,getSort:e=>e.sort,getDetailNews:e=>e.detailNews},actions:{async setNewsList(e={}){try{const{data:t,error:s}=await u("getElements",{query:{iblock_id:28,...e}});if(s.value)throw new Error(s.value.message);t.value&&t.value?.result&&(this.newsList=t.value.result)}catch(t){throw t}},async setNewsSections(){try{const{data:e,error:t}=await u("getSetions",{query:{iblock_id:28}});if(t.value)throw new Error(t.value.message);e.value&&e.value?.result&&(this.newsSections=e.value.result)}catch(e){throw e}},async setCurrentSection(e){this.currentSection=e;try{const{data:t,error:s}=await u("getSetionElements",{query:{iblock_id:28,section_id:e}});if(s.value)throw new Error(s.value.message);t.value&&t.value?.result&&(this.newsList=t.value.result)}catch(t){throw t}},async setDetailNews(e){try{const{data:t,error:s}=await u("getElementById",{query:{element_id:e}});if(s.value)throw new Error(s.value.message);t.value&&t.value?.result&&(this.detailNews=t.value?.result)}catch(t){throw t}},setSearchNewsList(e){const t=[];return e&&this.newsList.map(s=>{s.NAME.toLowerCase().indexOf(e.value.toLowerCase())>=0&&t.push(s)}),t},setTagNewsList(e){const t=[];if(e)this.newsList.map(s=>{s.IBLOCK_SECTION_ID===e&&t.push(s)});else return this.newsList;return t},setSort(e){this.sort=e}}}),V={class:"news-card"},$={class:"news-card__top"},j={class:"news-card__meta"},G={key:0,class:"news-card__duration"},H={class:"news-card__date"},U={class:"news-card__bottom"},Q={__name:"card",props:{news:{type:Object,required:!0},isGray:{type:Boolean,default:!1}},setup(e){const t=e;function s(a){if(!a)return null;const n=String(a).trim(),[i,o]=n.split(/\s+/),[h,p,I]=(i||"").split("."),N=parseInt(h,10),_=parseInt(p,10)-1,f=parseInt(I,10);if(Number.isNaN(N)||Number.isNaN(_)||Number.isNaN(f))return null;const d=new Date(f,_,N);if(Number.isNaN(d.getTime()))return null;if(o){const[L,O,T]=o.split(":").map(D=>parseInt(D,10)||0);d.setHours(L,O,T,0)}return d}const w=s(t.news?.DATE_ACTIVE_FROM),y=w?w.toLocaleString("ru-RU",{year:"numeric",month:"numeric",day:"numeric"}):"",m=M(),k=a=>{m.push({path:"/news/",query:{tag:a}})},C=()=>{m.push({path:`/news/${t.news.CODE}/`})};return(a,n)=>{const i=P,o=R;return v(),E("div",V,[r("div",{onClick:C,class:B(["news-card__inner",{"--is-gray":e.isGray}])},[r("div",$,[r("div",j,[r("div",{class:"news-card__type",onClick:n[0]||(n[0]=A(h=>k(e.news.SECTION.ID),["stop"]))},c(e.news.SECTION.NAME),1),e.news.PROPS?.TIME?(v(),E("div",G,[l(i,{name:"clock"}),n[1]||(n[1]=r("span",{class:"--read"}," Читать ",-1)),g(" "+c(e.news.PROPS?.TIME?e.news.PROPS?.TIME:"~ 4")+" мин ",1)])):x("",!0),r("div",H,
1c(q(y)),1)]),l(o,{to:`/news/${e.news.CODE}/`,class:"news-card__title link"},{default:S(()=>[g(c(e.news.NAME.length<91?e.news.NAME:e.news.NAME.slice(0,91)+"..."),1)]),_:1},8,["to"])]),r("div",U,[n[2]||(n[2]=r("div",{class:"news-card__author"},[r("div",{class:"news-card__default-author"},"М"),r("div",{class:"news-card__author-info --just-center"},[r("div",{class:"news-card__author-name"},"МСТ")])],-1)),l(o,{to:`/news/${e.news.CODE}/`,class:"news-card__link link"},{default:S(()=>[l(i,{name:"ui/link"})]),_:1},8,["to"])])],2)])}}};export{Q as _,K as u};

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.