PageSourceSearch

https://autocode.ru/dist/assets/Zapchasti-higxkmsh.js

js autocode.ru collected 2026-10-08 13:17:12 UTC 3,268 bytes, 1 lines download raw bytes

1import{s as g}from"./carStepsService-cfxzy4i0.js";import{_ as w,c as u,i as d,n as r,b as n,h as f,v as y,F as b,d as E,w as m,f as k,r as h,o as c,a as N,t as v,e as B}from"./client-cf8arc8p.js";const P="anZLhPikXgaa",C="jFeoEFfFXraX",L="jxuiTwiAbaGM",A="mZqRqhkguwmQ",S={zapchasti__title:P,zapchasti__search:C,zapchasti__result:L,zapchasti__item:A,"zapchasti__show-all":"iBoYPnmVvWpa","item-result":"ajtOFtcPzzEu","item-result__title":"hCNSjjbRwMky"};function $(e){return e.sort(function(t,s){let i=t.brandNameEn.toLowerCase(),l=s.brandNameEn.toLowerCase();return t.isPopular&&!s.isPopular?-1:!t.isPopular&&s.isPopular?1:i<l?-1:i>l?1:0}),e}const I={data(){return{...this.$store.state.pageObject,search:"",currentItems:40,isShowBtnAll:!0,placehold:"Поиск по наименованию"}},computed:{result(){let e,t=new RegExp(`^${this.search}`,"i");return e=this.brands.filter(s=>s.brandNameEn.toLowerCase().search(t)!==-1?!0:s.brandNameRu.toLowerCase().search(t)!==-1),e.slice(0,this.currentItems)},currentLang(){return this.$store.state.currentLang}},methods:{localizeField(e,t){return this.$store.dispatch("localization/getValue",{resourseName:e,key:t}).then(s=>s)},showAll(){this.currentItems=this.brands.length,this.isShowBtnAll=!1},newImage(e){if(e){const t=/small/gi;return e.replace(t,"big")}return"/img/no-imag.jpeg"},newUrl(e){return`/zapchasti/${e}`}},mounted(){this.currentLang!=="ru"&&this.localizeField("Vue.PartsAuto.Placehold","placehold").then(e=>{this.placehold=e})},async asyncData({store:e,route:t}){let s;await g.getBrands().then(i=>{s=$(i.data)}),e.commit("SET_PAGE",{brands:s}),e.commit("SET_TITLE","Автозапчасти для 167 марок автомобилей и 4947 моделей автомобилей"),e.commit("SET_DESCRIPTION","Выбрать автозапчасти для 167 марок автомобилей")}},T=["placeholder"],V=["src","alt"];function F(e,t,s,i,l,o){const p=h("page-title"),_=h("localize-router-link"),z=h("localize");return c(),u("div",{class:r(e.$style.zapchasti)},[d(p,{class:r(e.$style.zapchasti__title),title:"Автозапчасти для 167 марок автомобилей и 4947 моделей автомобилей"},null,8,["class"]),n("div",{class:r(e.$style.zapchasti__search)},[f(n("input",{type:"text",placeholder:l.placehold,"onUpdate:modelValue":t[0]||(t[0]=a=>l.search=a)},null,8,T),[[y,l.search]])],2),n("div",{class:r(e.$style.zapchasti__result)},[(c(!0),u(b,null,E(o.result,(a,M)=>(c(),N(_,{tag:"div",class:r([e.$style.zapchasti__item,e.$style["item-result"]]),key:a.brandId,to:o.newUrl(a.brandUrl)},{default:m(()=>[n("div",{class:r(e.$style["item-result__image"])},[n("img",{src:o.newImage(a.brandLogo),alt:a.brandNameEn},null,8,V)],2),n("div",{class:r(e.$style["item-result__title"])},v(a.brandNameEn),3)]),_:2},1032,["class","to"]))),128))],2),l.isShowBtnAll?(c(),u("button",{key:0,onClick:t[1]||(t[1]=(...a)=>o.showAll&&o.showAll(...a)),class:r(e.$style["zapchasti__show-all"])},[d(z,{tag:"span","localize-name":"Vue.Parts.Brands","localize-key":"Показать все","show-default":""},{default:m(()=>[...t[2]||(t[2]=[B("Показать все",-1)])]),_:1})],2)):k("",!0)],2)}const j={$style:S},U=w(I,[["render",F],["__cssModules",j]]);export{U 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.