1import{d as z,c as s,o as a,g as i,a as t,n as Y,t as f,_ as F,a6 as H,ae as O,u as Q,r as B,p as l,ao as U,ap as E,Y as I,ay as G,aw as J,y as K,f as u,j as e,N as q,e as R,P as W,a4 as X,aq as Z,I as ee,ag as V,a0 as ae}from"./eUuGUOoT.js";import{_ as se}from"./yk2p3wx6.js";import{_ as te}from"./u7-WTIog.js";import{_ as oe}from"./jU00BH5c.js";import{_ as A}from"./DCWUfD_5.js";import{_ as re}from"./D3OAjtku.js";import{p as D}from"./CiZc3jrg.js";import"./DPx3TFth.js";import"./BSM-C0hF.js";import"./DxgyrZ4s.js";import"./CrU7rsUa.js";const ne={class:"journal-search-card"},le=z({__name:"SearchResultCard",props:{item:{}},setup(d){return(p,v)=>(a(),s("div",ne,[i(oe,{article:d.item,path:d.item.type==="article"?"/magazines/":"/articles/",class:"journal-search-card__post"},null,8,["article","path"]),t("span",{class:Y(["journal-search-card__badge",`journal-search-card__badge--${d.item.type}`])},f(d.item.type==="news"?"ÐовоÑÑÑ":"СÑаÑÑÑ"),3)]))}}),ce=F(le,[["__scopeId","data-v-05ef8b7b"]]),ie={class:"blog-page journal-search"},_e={class:"blog-page__inner container"},ue={class:"blog-page__title-block"},de={key:0,class:"journal-search__heading"},pe={class:"h2 blog-page__title"},ge={key:0,class:"journal-search__meta"},me={class:"journal-search__count"},he={class:"blog-page__content-wrapper"},be={class:"blog-page__content"},fe={key:0,class:"journal-search__message"},ve={key:1,class:"journal-search__message"},ye={class:"journal-search__grid"},ke={key:0,class:"blog-page__sidebar sidebar"},je={class:"blog-page__bottom"},we=z({__name:"index",async setup(d){let p,v;const P=H(),$=O(),{isDesktop:_}=Q(),L=ee(),x=B(null),m=B(!1);function C(){x.value?.scrollIntoView({block:"start",behavior:"smooth"})}const r=l(()=>String(P.query.q??"").trim()),S=l(()=>Number(P.query.page)||1),y=l(()=>r.value.replace(/\s/g,"").length>3),{data:h,error:k,status:b}=([p,v]=U(()=>Z("journal-search-results",()=>y.value?L("/api/journal/search/results",{query:{q:r.value,page:S.value}}):Promise.resolve({elements:[],total:0,totalPages:1,currentPage:1}),{watch:[r,S]})),p=await p,v(),p);if(k.value)throw E({statusCode:D(k.value),message:"API Error"});const T=l(()=>h.value?.elements??[]),j=l(()=>h.value?.total??0),g=l(()=>h.value?.totalPages??1),w=l(()=>h.value?.currentPage??1);I(k,n=>{n&&G(E({statusCode:D(n),message:"API Error"}))}),I([w,g,j],([n,o,c])=>{c>0&&n>o&&$.replace({query:{q:r.value,...o>1?{page:String(o)}:{}}})},{immediate:!0});const M=l(()=>[{title:"ÐÑÑнал",url:"/magazines"},{title:"ÐоиÑк",url:""}]);J({title:()=>`ÐоиÑк: ${r.value} â ÐÑÑнал`,robots:"noindex, follow"}),K(()=>{setTimeout(()=>{window.scrollY<10&&C()},150)});function N(n){const o={q:r.value};n>1&&(o.page=String(n)),$.push({query:o}).then(()=>ae(C))}return(n,o)=>(a(),s("div",ie,[t("div",_e,[e(_)?(a(),s(q,{key:0},[i(se,{items:e(M),class:"blog-page__breadcrumbs"},null,8,["items"]),i(V,{position:"banner-top",class:"blog-page__top-banner"})],64)):u("",!0),t("div",{ref_key:"headerBlock",ref:x,class:"blog-page__header journal-search__header"},[t("div",ue,[!e(m)||e(_)?(a(),s("div",de,[t("h1",pe,"ÐоиÑк: «"+f(e(r))+"»",1),e(y)&&e(b)!=="error"?(a(),s("div",ge,[e(_)&&e(g)>1?(a(),R(A,{key:0,page:e(w),"total-pages":e(g),"is-loading":e(b)==="pending","is-desktop":e(_),"hide-load-more":"",class:"journal-search__header-pagination",onLoadNewPage:N},null,8,["page","total-pages","is-loading","is-desktop"])):u("",!0),t("p",me," Ðайдено: "+f(e(j)),1)])):u("",!0)])):u("",!0),i(te,{show:e(m),"onUpdate:show":o[0]||(o[0]=c=>W(m)?m.value=c:null),class:"journal-search__search"},null,8,["show"])])],512),t("section",he,[t("div",be,[e(y)?e(b)!=="pending"&&e(j)===0?(a(),s("div",ve," Ðо запÑоÑÑ Â«"+f(e(r))+"» ниÑего не найдено ",1)):(a(),s(q,{key:2},[t("ul",ye,[(a(!0),s(q,null,X(e(T),c=>(a(),s("li",{key:`${c.type}-${c.id}`,class:"journal-search__grid-item"},[i(ce,{item:c},null,8,["item"])]))),128))]),e(g)>1?(a(),R(A,{key:0,page:e(w),"total-pages":e(g),"is-loading":e(b)==="pending","is-desktop":e(_),"hide-load-more":"",class:"journal-search__pagination",onLoadNewPage:N},null,8,["page","total-pages","is-loading","is-desktop"])):u("",!0)],64)):(a(),s("div",fe," Ð
1ведиÑе запÑÐ¾Ñ Ð´Ð»Ð¸Ð½Ð½ÐµÐµ ÑÑÑÑ
Ñимволов "))]),e(_)?(a(),s("div",ke,[i(V,{position:"banner-sidebar","is-sidebar":"",class:"blog-page__sidebar-banner sidebar__banner"})])):u("",!0)])]),t("div",je,[i(re)])]))}}),Ve=F(we,[["__scopeId","data-v-fbb826fe"]]);export{Ve 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.