PageSourceSearch

https://bogoslov.ru/_nuxt/ulGvuqRn.js

js bogoslov.ru collected 2026-09-24 19:02:20 UTC 5,918 bytes, 1 lines download raw bytes

1import{_ as O}from"./BtVwK_Af.js";import{_ as P}from"./C8TL9Op-.js";import{_ as G}from"./DRF1wdmo.js";import{N as Q}from"./DYRaMkt2.js";import{u as U}from"./BZlevG6M.js";import{_ as z,s as H,a9 as K,u as J,$ as W,x as w,r as A,l as X,a0 as Z,w as ee,a as te,d as b,j as ae,e as oe,b as re,f as l,Q as ie,g as se,n as ne,o as q,L as le}from"./B4qULXKb.js";import"./Bv5HIE0N.js";import"./B1pOtH-a.js";import"./CWw8izbq.js";import"./DbtKwoZy.js";import"./BA8p9DNP.js";import"./BxaH3A2M.js";import"./DNAf06WT.js";import"./pQOboDyy.js";import"./2I-WHKmz.js";import"./CkqeHXhJ.js";import"./BblF1Uz_.js";import"./pGoweWCd.js";import"./B9TKuNe0.js";import"./DRLp1z1D.js";import"./DkVs8YXg.js";import"./CvrfRuSM.js";import"./BB42LPwD.js";import"./CXUm6fS1.js";import"./C5gho-o9.js";import"./Q_DQoT9j.js";import"./C7iPLhrI.js";import"./Dy5et9RW.js";import"./DAnGitr_.js";import"./cj2oybHl.js";import"./DIBqDUQ0.js";import"./BM4yDqmK.js";import"./D9g3XlR8.js";import"./9WHSMhfl.js";const E="news:scrollY",x="news",ce={__name:"index",async setup(pe){let v,h;const{setSeoMeta:F}=U(),c=H(),S=K(),D=J(),V=W("targetElement"),N={titleHeading:!0,title:"Новости",link:{text:"Главная",url:"/"},disableCounter:!0},o=w({count:0,portion:16,offset:0,limit:16,page:1});let f=0,p=null;const u=w({}),n={filterExternal:{fields:[{saveFilter:!0,label:"Тип материала",fixedTabs:!0,component:"FieldRadioGroup",size:"sm",name:"uuid_voc_news_type",itemText:"full_label",itemTextShort:"label",itemValue:"id",defaultValue:{id:"0",full_label:"Все новости"},value:{id:"0",full_label:"Все новости"},items:[{id:"0",full_label:"Все новости"}]},{label:"Тематика",name:"rubrics",component:"FieldCombobox",multiple:!0,dataUrl:"?type=rubrics&part=list",dataType:"rubrics",itemValue:"uuid",itemText:"title",sort:{direction:"asc",field:"title"}},{label:"Период",name:"published_at",operator:"between",component:"FilterDate",items:[{id:"all",period:[],label:"За всё время"},{id:"week",period:["2024-11-11","2024-11-11"],label:"За неделю"},{id:"month",period:["2024-11-01","2024-11-30"],label:"За месяц"},{id:"year",period:["2024-11-18","2024-11-24"],label:"За год"}],vocYearsUrl:"?type=api_url",vocYearsType:"api_url",minYear:2007,radio:{id:"all",label:"В любое время"},defaultRadio:{id:"all",label:"В любое время"},value:[]}]}};let _=A(!0),k=A(!0);const m=w({items:[]}),$=async r=>{Object.assign(u,r),o.page=1,o.offset=0,o.limit=o.portion,c.query.page&&S.replace({query:{...c.query,page:void 0}}),await y()},C=r=>{const t={type:x,searchLogic:"AND",search:[{field:"is_deleted",operator:"is",value:0},{field:"published_at",operator:"not null",value:""},{field:"is_active",operator:"is",value:"1"},{field:"is_schrod",operator:"is",value:0}],sort:[{field:"published_at",direction:"desc"}],limit:o.limit,offset:o.offset};return Object.keys(r).map(e=>{if(e!=="sort"){const a=n.filterExternal.fields.find(s=>s.name===e);let i=r[e];Array.isArray(r[e])&&a?a.component!=="FilterDate"&&(i=r[e].map(s=>s[a.itemValue||"id"])):typeof r[e]=="object"&&a&&(i=r[e][a.itemValue||"id"]),(Array.isArray(i)&&i.length||!Array.isArray(i)&&i!=="0"&&i)&&t.search.push({field:e,operator:a&&a.operator?a.operator:"in",value:i})}}),t};async function y({append:r=!1}={}){var a,i,s,d,g;const t=C(u);_.value=!0;const e=await D.$queryApi(`?type=${x}`,t,{ssr:!1});if((a=e.data)!=null&&a.success&&((i=e.data)!=null&&i.content)){const T=((d=(s=e.data)==null?void 0:s.content)==null?void 0:d[x])||[];r?m.items.push(...T):m.items=T,o.count=+((g=e.data)==null?void 0:g.content.cnt)}return _.value=!1,e}const Y=async()=>{o.page+=1,o.offset=(o.page-1)*o.portion,o.limit=o.portion,S.replace({query:{...c.query,page:String(o.page)}}),await y({append:!0})},B=async()=>{o.page<=1||!f||(await le(),requestAnimationFrame(()=>window.scrollTo({top:f})))};function L(){const r=n.filterExternal.fields.find(a=>a.component==="FilterDate"),t=new Date;let e=new Date(t);r&&r.items.map(a=>{let i=[];switch(a.id){case"week":e=new Date(t),e.setDate(e.getDate()-7);break;case"month":e=new Date(t),e.setDate(e.getDate()-30);break;case"year":e=new Date(t),e.setDate(e.getDate()-365);break}if(a.id!=="all"){const s=e.getDate().toString().padStart(2,"0"),d=("0"+(e.getMonth()+1)).slice(-2);i=[`${e.getFullYear().toString()}-${d}-${s}`,t.toISOString().slice(0,10)]}a.period=i})}const R=async(r=!1)=>{var a,i,s;const t="voc_news_types",e=await D.$queryApi(`?type=${t}`,{},{ssr:r});(a=e==null?void 0:e.data)!=null&&a.success&&((s=(i=e==null?void 0:e.data)==null?void 0:i.content)!=null&&s[t])&&j(e.data.content[t]),k.value=!1},j=r=>{var e;const t=(((e=n==null?void 0:n.filterExternal)==null?void 0:e.fields)||[]).find(a=>a.name==="uuid_voc_news_type");t&&t.items.push(...r.map(a=>({id:a.uuid,[t.itemText]:a[t.itemText],[t.itemTextShort]:a[t.itemTextShort]})))},I=()=>{const r=+c.query.page;o.page=r&&r>0?r:1,o.offset=0,o.limit=o.page*o.portion},M=async r=>{var e;Object.assign(u,r),I();const t=await y();return o.offset=(o.page-1)*o.portion,o.limit=o.portion,B(),(t==null?void 0:t.status)===200&&((e=t==null?void 0:t.data)==null?void 0:e.success)};return X(()=>{f=+(sessionStorage.getItem(E)||0),p=()=>
1sessionStorage.setItem(E,String(window.scrollY)),window.addEventListener("scroll",p,{passive:!0})}),Z(()=>{p&&window.removeEventListener("scroll",p)}),L(),[v,h]=ee(()=>R(!0)),await v,h(),F("news"),(r,t)=>{const e=O,a=P,i=G;return q(),te("div",{ref_key:"targetElement",ref:V,class:"news-page"},[b(e,{params:N}),l(k)?oe("",!0):(q(),ae(a,{key:0,data:n,values:l(u),onFilter:$,onInit:M},null,8,["values"])),re("div",{class:ne(["mt-40 mt-md-48 container",{"--loading":l(_)}])},[b(Q,{class:"news-page__list",data:l(m)},ie({_:2},[l(o).count>l(m).items.length?{name:"more",fn:se(()=>[b(i,{onClick:Y})]),key:"0"}:void 0]),1032,["data"])],2)],512)}}},Qe=z(ce,[["__scopeId","data-v-b544cce6"]]);export{Qe 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.