PageSourceSearch

https://planetazap.ru/_next/static/chunks/app/(main)/layout-ddaed75d93204fc0.js

js planetazap.ru collected 2026-10-07 16:50:43 UTC 53,467 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2076],{2282:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useCompaniesQuery:()=>i});var s=a(78227),r=a(46112),n=a(47198);let l={list:()=>"companies"},i=e=>{let t=(0,r.useGetSessionQuery)();return(0,s.Ay)(t.data?l.list():null,()=>(0,n.mm)(),{shouldRetryOnError:!1,keepPreviousData:!0,revalidateIfStale:!1,revalidateOnMount:!0,...e})}},5228:()=>{},12326:(e,t,a)=>{"use strict";a.d(t,{D:()=>s});let s=()=>["session"]},16578:(e,t,a)=>{"use strict";a.d(t,{B:()=>r});var s=a(78227);let r={list:()=>"collections",listProducts:(e,t)=>(0,s.WI)(["collection-products",e,t])}},17376:(e,t,a)=>{"use strict";a.d(t,{z:()=>r.MainCallback,TU:()=>s.useCallbackDialog}),a(88904);var s=a(41801),r=a(97131)},19807:(e,t,a)=>{"use strict";a.r(t),a.d(t,{PhoneFieldProvider:()=>l});var s=a(54568),r=a(82600),n=a(85091);let l=e=>{let{children:t}=e;return(0,s.jsx)(r.e,{metadata:n.A,children:t})}},20232:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useValueDebounce:()=>r});var s=a(7620);let r=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{leading:!1,trailing:!0},{leading:r=!1,trailing:n=!0}=a,l=(0,s.useRef)(!0),[i,o]=(0,s.useState)(e);return(0,s.useEffect)(()=>{l.current&&(l.current=!1,r&&o(e));let a=setTimeout(()=>{l.current=!0,n&&o(e)},t);return()=>{clearTimeout(a)}},[e,t,r,n]),i}},24749:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useYandexMetrika:()=>n});var s=a(7620),r=a(57417);function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{t.trackOnmount&&r.A.dispatch({type:"detail",data:e})},[t.trackOnmount]),(0,s.useCallback)(t=>{t?(a.current=t,r.A.dispatch({type:"mount",node:t,data:e})):a.current&&(r.A.dispatch({type:"unmount",node:a.current}),a.current=null)},[])}},26868:()=>{},28697:(e,t,a)=>{"use strict";a.d(t,{f:()=>r});let s={tabletXS:640,desktopXS:1024},r={values:s,up:e=>"(width >= ".concat(s[e],"px)"),down:e=>"(width < ".concat(s[e],"px)")}},29134:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useCategoryGraphQuery:()=>i});var s=a(7620),r=a(78227);let n=(e,t)=>e.ordering!==t.ordering?e.ordering-t.ordering:e.name.localeCompare(t.name,"ru"),l=(e,t)=>{if(!t.has(e.slug)){let a={...e,parent:void 0,children:[]};t.set(e.slug,a),t.set(e.id,a)}return t.get(e.slug)};function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:t}=(0,r.Ay)("categoriesGraph");return(0,s.useMemo)(()=>((e,t)=>{let a=new Map,s=[],r=e;if(t.skipSingleRoot){let t=0,a="";r.forEach(e=>{e.categoryId||(t++,a=e.id)}),1===t&&(r=e.filter(e=>e.id!==a).map(e=>e.categoryId===a?{...e,categoryId:null}:e))}return r.forEach(e=>{let t=l(e,a);e.categoryId||s.push(t)}),r.forEach(e=>{let t=l(e,a);if(e.categoryId){let s=a.get(e.categoryId);t.parent=s,s&&s.children.push(t)}}),{map:a,tree:(e=>{let t=e=>({slug:e.slug,name:e.name,title:e.title,id:e.id,ordering:e.ordering,image:e.image,seoImageAlt:e.seoImageAlt,seoImageTitle:e.seoImageTitle,children:e.children.map(t).sort(n)});return e.map(t).sort(n)})(s)}})(t,e),[t])}},29270:(e,t,a)=>{"use strict";a.d(t,{Pr:()=>c,Pt:()=>l,oo:()=>o,zh:()=>i});var s=a(7620),r=a(43419);let n=e=>{var t;let{images:a,categories:s,variants:r,...n}=e;return{...n,category:(null==(t=s[0])?void 0:t.name)||"",images:a.map(e=>({isMain:e.isMain,"catalog-lg-webp":e["product-lg-webp"],"catalog-sm-webp":e["product-sm-webp"]})),variants:r.map(e=>({...e,stock:e.stocks.reduce((e,t)=>e+(t.stock||0),0)}))}},l=(0,s.cache)(e=>{var t;return(null==(t=e.ids)?void 0:t.length)?r.o.get("/products",{params:e}).then(e=>e.data).then(t=>e.ids?e.ids.map(e=>t.find(t=>t.id===e)).filter(Boolean):t).then(e=>e.map(n)):Promise.resolve([])}),i=(0,s.cache)(e=>r.o.get("/product/search",{params:e}).then(e=>e.data)),o=(0,s.cache)(e=>r.o.get("/products/".concat(e)).then(e=>e.data)),c=(0,s.cache)((e,t)=>r.o.get("/products/".concat(e,"/suggestions"),{params:{type:t}}).then(e=>e.data).then(e=>({total:e.total,results:e.results.map(n)})))},30719:()=>{},32086:(e,t,a)=>{Promise.resolve().then(a.bind(a,41081)),Promise.resolve().then(a.bind(a,54175)),Promise.resolve().then(a.bind(a,60621)),Promise.resolve().then(a.bind(a,63533)),Promise.resolve().then(a.bind(a,19807)),Promise.resolve().then(a.bind(a,44409)),Promise.resolve().then(a.bind(a,75443)),Promise.resolve().then(a.bind(a,87929)),Promise.resolve().then(a.bind(a,91372)),Promise.resolve().then(a.bind(a,97159)),Promise.resolve().then(a.bind(a,24749)),Promise.resolve().then(a.bind(a,42850)),Promise.resolve().then(a.t.bind(a,45165,23)),Promise.resolve().then(a.bind(a,69885)),Promise.resolve().then(a.bind(a,91145))},33016:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CartContext:()=>n,useCart:()=>i,useCartActions:()=>l,useCartCount:()=>o,useCartProductCount:()=>c,useCartProductPath:()=>d,useCartProductWarehouseId:()=>h});var s=a(7620),r=a(56978);let n=(0,s.createContext)(r.O),l=()=>{let e=(0,s.useContext)(n);return{add:e.add,rem:e.rem,del:e.del,delMany:e.delMany,set:e.set,clear:e.clear}},i=()=>
1(0,s.useSyncExternalStore)(r.O.subscribe,()=>r.O.getSnapshot(),()=>new Map),o=()=>(0,s.useSyncExternalStore)(r.O.subscribe,()=>Array.from(r.O.getSnapshot().values()).reduce((e,t)=>e+t,0),()=>0),c=e=>(0,s.useSyncExternalStore)(r.O.subscribe,()=>{var t;return null!=(t=r.O.getSnapshot().get((0,r.lK)(e)))?t:0},()=>0),d=e=>(0,s.useSyncExternalStore)(r.O.subscribe,()=>Array.from(r.O.getSnapshot().keys()).find(t=>t.startsWith(e.join(",")))||"",()=>""),h=e=>d(e).split(",")[2]},35281:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useMyOrdersInfiniteQuery:()=>o,useWaitingPaymentOrderQuery:()=>c});var s=a(78227),r=a(95845),n=a(46112),l=a(77150);let i={waitingPayment:e=>["waiting-payment-order",e]},o=(e,t)=>(0,r.Ay)((t,a)=>a&&!a.results.length?null:["my-orders",{page:t,...e}],e=>(0,l.MV)(e[1]),{revalidateFirstPage:!0,revalidateOnMount:!1,keepPreviousData:!0,...t}),c=e=>{let t=(0,n.useGetSessionQuery)();return(0,s.Ay)(t.data?i.waitingPayment(t.data.id):null,()=>(0,l.cf)(),{shouldRetryOnError:!1,revalidateIfStale:!1,revalidateOnMount:!0,...e})}},38850:(e,t,a)=>{"use strict";a.d(t,{$y:()=>r,V1:()=>l,cO:()=>n});var s=a(43419);let r=()=>(0,s.c)("/location/dadata/current-city").then(e=>e.data).catch(()=>null),n=e=>(0,s.c)("/location/dadata/cities",{params:e}).then(e=>e.data),l=e=>(0,s.c)("/location/dadata/address",{params:e}).then(e=>e.data)},39005:(e,t,a)=>{"use strict";a.d(t,{l:()=>s.DropDownArrow});var s=a(60621)},41081:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CookieBanner:()=>c});var s=a(54568);a(75786);var r=a(49526),n=a(16749),l=a(17553),i=a(19664),o=a.n(i);let c=e=>{let{onAccept:t,onReject:a}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-8",children:[(0,s.jsx)(r.Z,{})," ",(0,s.jsx)("p",{className:"body200-w40",children:"Мы используем cookie"})]}),(0,s.jsxs)("p",{className:"body100 mt-8 mb-16",children:["Мы используем cookie-файлы, чтобы улучшить сайт для вас. Продолжая пользоваться сайтом вы соглашаетесь с"," ",(0,s.jsx)(n.N,{color:"var(--es-mono-a-a900)",component:o(),href:"/legal/privacy",target:"_blank",children:"Политикой конфиденциальности"})]}),(0,s.jsxs)("div",{className:"flex gap-8",children:[(0,s.jsx)(l.Button,{color:"tertiary",variant:"outlined",onClick:a,children:"Отклонить"}),(0,s.jsx)(l.Button,{color:"primary",variant:"contained",onClick:t,children:"Принять"})]})]})}},41801:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useCallbackDialog:()=>l});var s=a(54568),r=a(63348);let n=(0,a(96442).default)(()=>Promise.all([a.e(909),a.e(4787),a.e(5644),a.e(8077),a.e(6250),a.e(1737),a.e(6383),a.e(4853),a.e(7024),a.e(3604),a.e(3149),a.e(8258),a.e(6046),a.e(2853),a.e(2670),a.e(6597),a.e(6433)]).then(a.bind(a,66433)).then(e=>e.CallbackDialog),{loadableGenerated:{webpack:()=>[66433]},ssr:!1}),l=e=>{let t=(0,r.C)();return()=>t.open(t=>{let{close:a}=t;return(0,s.jsx)(n,{...e,close:a})})}},42850:(e,t,a)=>{"use strict";a.d(t,{default:()=>s});let s=(0,a(96442).default)(()=>a.e(2102).then(a.bind(a,52102)).then(e=>e.YandexMetrika),{loadableGenerated:{webpack:()=>[52102]},ssr:!1})},43419:(e,t,a)=>{"use strict";a.d(t,{o:()=>d,c:()=>h});var s=a(71208),r=a(77011);let n=["url","method","baseURL","headers","params","data","timeout","timeoutErrorMessage","withCredentials","auth","responseType","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","maxRedirects","socketPath","proxy","decompress"],l=["data","status","statusText","headers"];function i(e){return"true"!==r.env.BROWSER&&e instanceof a(27924).Readable?"[Readable]":e}function o(e){if(!(null==e?void 0:e.isAxiosError))return e;let t=Error(e.message);for(let s of(t.name=e.name,t.stack=e.stack,t.status=e.status,t.code=e.code,t.isAxiosError=e.isAxiosError,t.config={},n)){var a;(null==(a=e.config)?void 0:a[s])!==void 0&&(t.config[s]="data"===s?i(e.config[s]):e.config[s])}if(e.response)for(let a of(t.response={},l))void 0!==e.response[a]&&(t.response[a]="data"===a?i(e.response[a]):e.response[a]);return t}var c=a(86900);let d=s.A.create({baseURL:c.H$,headers:void 0,paramsSerializer:{indexes:null},withCredentials:!0}),h=s.A.create({baseURL:c.OW,paramsSerializer:{indexes:null},withCredentials:!0});d.interceptors.response.use(e=>e,e=>Promise.reject(o(e))),h.interceptors.response.use(e=>e,e=>Promise.reject(o(e)))},44409:(e,t,a)=>{"use strict";a.r(t),a.d(t,{AccountBanner:()=>x});var s=a(54568);a(99242);var r=a(23921),n=a(17553),l=a(78848),i=a(92762),o=a(46112),c=a(2282),d=a(19664),h=a.n(d),u=a(7620);let m="account-banner",x=()=>{var e;let t=(0,o.useGetSessionQuery)().data,a=(0,c.useCompaniesQuery)(),d=null==(e=a.data)?void 0:e[0],x=null==d?void 0:d.company,p=!!((null==t?void 0:t.surname)&&(null==t?void 0:t.name)&&(null==x?void 0:x.name)&&(null==x?void 0:x.inn)),[g,j]=(0,u.useState)(!1),[v,f]=(0,u.useState)(!1);return((0,u.useEffect)(()=>{try{j(!!window.sessionStorage.getItem(m))}catch(e){}f(!0)},[]),a.isLoading||!t||!v||p||g)?null:(0,s.jsx)(r.l,{action:(0,s.jsx)(n.Button,{"aria-label":"Закрыть",color:"mono-a",size:"400",variant:"text",onClick:()=>{try{window.sessionStorage.setItem(m,"1")}
1catch(e){}j(!0)},children:(0,s.jsx)(l.T,{})}),actions:(0,s.jsx)(i.q,{children:(0,s.jsx)(n.Button,{color:"mono-a",component:h(),href:"/account",size:"400",variant:"contained",children:"Перейти в профиль"})}),breakpoint:"sm",className:"account-banner",color:"mono-a",severity:"info",children:"Заполните профиль — заказы быстрее и со скидкой"})}},45562:()=>{},46112:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useGetSessionQuery:()=>l});var s=a(78227),r=a(75352),n=a(12326);let l=()=>(0,s.Ay)((0,n.D)(),()=>(0,r.Ht)(),{shouldRetryOnError:!1,keepPreviousData:!0,revalidateIfStale:!1,revalidateOnMount:!0})},47198:(e,t,a)=>{"use strict";a.d(t,{eK:()=>n,mm:()=>r});var s=a(43419);let r=()=>s.o.get("/companies").then(e=>e.data),n=e=>s.o.post("/companies",e).then(e=>e.data)},47285:()=>{},53330:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});let s=e=>(+e||0).toLocaleString("ru-RU",{maximumFractionDigits:2})},54175:(e,t,a)=>{"use strict";a.r(t),a.d(t,{DialogStackProvider:()=>n});var s=a(54568),r=a(988);let n=e=>{let{children:t}=e;return(0,s.jsx)(r.e,{children:t})}},56112:()=>{},56978:(e,t,a)=>{"use strict";a.d(t,{O:()=>d,iu:()=>o,lK:()=>i});var s=a(29270),r=a(57417),n=a(61867);let l=(e,t,a)=>(0,n.uv)("x-product-".concat(e),()=>(0,s.Pt)({ids:[e]})).then(e=>{if(e.length){var s,r;let[n]=e;return{id:n.id,name:n.name,category:n.category,quantity:a,price:(null==(r=n.variants)||null==(s=r.find(e=>e.id===t))?void 0:s.price)||0}}});function i(e){return e.join(",")}function o(e){return e.split(",")}class c{persist(){let e=Object.fromEntries(this.cart.entries());window.localStorage.setItem(this.localStorageKey,JSON.stringify(e))}readPersisted(){try{let e=JSON.parse(window.localStorage.getItem(this.localStorageKey));this.cart=new Map(Object.entries(e))}catch(e){this.cart=new Map}}constructor(){var e=this;this.localStorageKey="cart_v2",this.cart=new Map,this.listeners=new Set,this.emit=()=>{this.persist(),this.listeners.forEach(e=>e())},this.getSnapshot=()=>this.cart,this.subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e)),this.add=function(t){var a;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=i(t);e.cart.set(n,(null!=(a=e.cart.get(n))?a:0)+s),e.emit(),l(t[0],t[1],s).then(e=>{e&&r.A.dispatch({type:"add",data:e})})},this.set=(e,t)=>{let a=i(e);this.cart.set(a,t),this.emit(),l(e[0],e[1],t).then(e=>{e&&r.A.dispatch({type:"add",data:e})})},this.rem=function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=i(t);if(!e.cart.has(s))return;let n=e.cart.get(s)-a;n<1?e.cart.delete(s):e.cart.set(s,n),e.emit(),l(t[0],t[1],a).then(e=>{e&&r.A.dispatch({type:"remove",data:e})})},this.del=e=>{let t=i(e);if(!this.cart.has(t))return;let a=this.cart.get(t);this.cart.delete(t),this.emit(),l(e[0],e[1],a).then(e=>{e&&r.A.dispatch({type:"remove",data:e})})},this.delMany=e=>{e.forEach(e=>{let t=i(e);this.cart.delete(t)}),this.emit()},this.clear=e=>{e?Array.from(this.cart.keys()).filter(t=>e.some(e=>t.startsWith(e))).forEach(e=>{this.cart.delete(e)}):this.cart=new Map,this.emit()},this.readPersisted(),window.addEventListener("storage",e=>{e.key===this.localStorageKey&&(this.readPersisted(),this.listeners.forEach(e=>e()))})}}let d=new c},57417:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});class s{dispatch(e){this.handler?this.handler(e):this.queue.push(e)}connect(e){this.handler=e,this.queue.forEach(this.handler),this.queue=[]}constructor(){this.queue=[],this.handler=null}}let r=new s},60621:(e,t,a)=>{"use strict";a.r(t),a.d(t,{DropDownArrow:()=>l});var s=a(54568),r=a(79564),n=a(72902);let l=e=>{let{className:t,...a}=e;return(0,s.jsx)(r.x,{className:(0,n.A)(t,"mono-a-a500","ml-8"),...a})}},61780:()=>{},63533:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MobileMenu:()=>o});var s=a(54568);a(83774);var r=a(94725),n=a(72902),l=a(7620),i=a(94432);let o=e=>{let{children:t}=e;(0,r.K)(!0,document.body);let a=(0,l.useRef)(null),{isScrollable:o,isScroll:c,onScroll:d}=(0,i.M)(a);return(0,s.jsx)("div",{className:"mobile-menu",children:(0,s.jsx)("div",{ref:a,className:(0,n.A)("mobile-menu__wrapper",o&&c&&"mobile-menu__wrapper--mask"),onScroll:d,children:t})})}},63863:()=>{},64946:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useGetCurrentCityQuery:()=>o,useListTopCityQuery:()=>d,useSearchCityQuery:()=>c});var s=a(78227),r=a(20232),n=a(38850);let l="current-city",i=async()=>{let e=localStorage.getItem(l);if(e)try{return{city:JSON.parse(e),isConfirmed:!0}}catch(e){}return{city:await (0,n.$y)().then(e=>e||{type:"dadata",name:"Москва",cityFiasId:"0c5b2444-70a0-4932-980c-b4dc0d3f02b5",cityKladrId:"7700000000000"}),isConfirmed:!1}},o=()=>{let{data:e,isLoading:t,mutate:a}=(0,s.Ay)(l,i,{revalidateIfStale:!1});return{city:null==e?void 0:e.city,isConfirmed:null==e?void 0:e.isConfirmed,isLoading:t,setCity:e=>{localStorage.setItem(l,JSON.stringify(e)),a({city:e,isConfirmed:!0},!1)}}},c=e=>{let t=(0,r.useValueDebounce)(e,300),a=t&&t.length>=2,{data:l,isLoading:i}=(0,s.Ay)(a?["search-city",t]:null,e=>
1{let[t,a]=e;return(0,n.cO)({query:a})},{revalidateIfStale:!1,keepPreviousData:!0});return{cities:l,isLoading:i}},d=()=>{let{data:e}=(0,s.Ay)("list-top-city",()=>(0,n.cO)({top:!0}),{revalidateIfStale:!1});return e}},68800:()=>{},73107:(e,t,a)=>{"use strict";a.d(t,{I:()=>l});var s=a(54568),r=a(63348);let n=(0,a(96442).default)(()=>Promise.all([a.e(9281),a.e(5644),a.e(6383),a.e(7024),a.e(3604),a.e(3149),a.e(8258),a.e(2853),a.e(2670),a.e(9898)]).then(a.bind(a,59898)).then(e=>e.PricingDialog),{loadableGenerated:{webpack:()=>[59898]},ssr:!1}),l=()=>{let e=(0,r.C)();return()=>{e.open(e=>{let{close:t}=e;return(0,s.jsx)(n,{close:t})})}}},73244:()=>{},75352:(e,t,a)=>{"use strict";a.d(t,{Ht:()=>n,K:()=>i,ri:()=>r,w7:()=>l});var s=a(43419);let r=()=>s.o.delete("/session").then(e=>e.data),n=()=>s.o.get("/session").then(e=>e.data).catch(e=>{var t;if((null==(t=e.response)?void 0:t.status)===401)return null;throw e}),l=e=>s.o.post("/sms",{acceptOfferAgreement:!0,acceptPrivacyPolicy:!0,...e}).then(e=>e.data),i=e=>s.o.patch("/sms/auth",e).then(e=>e.data)},75443:(e,t,a)=>{"use strict";a.d(t,{FooterView:()=>x});var s=a(54568);a(73244);var r=a(17553),n=a(16749),l=a(29134),i=a(19664),o=a.n(i),c=a(27541),d=a(17376),h=a(73107),u=a(83526),m=a(85196);let x=e=>{let{staticPages:t}=e,{tree:a}=(0,l.useCategoryGraphQuery)({skipSingleRoot:!0}),i=(0,d.TU)(),x=(0,h.I)(),p=(0,c.usePathname)();return p.startsWith("/account")||p.startsWith("/cart")?null:(0,s.jsxs)("footer",{className:"footer",children:[(0,s.jsxs)("div",{className:"footer__name flex flex-col lg:flex-row align-items-center justify-content-between gap-32 lg:gap-24 pt-24 lg:pt-32 pb-32",children:[(0,s.jsx)(m.H_,{height:"40px",width:"168px"}),(0,s.jsx)(r.Button,{color:"tertiary",size:"500",variant:"outlined",onClick:x,children:"Проценка товаров"})]}),(0,s.jsxs)("div",{className:"footer__main pb-32 lg:pt-32 px-24 lg:px-0",children:[(0,s.jsxs)("nav",{"aria-labelledby":"footer-static-pages",style:{gridArea:"static-pages"}
1,children:[(0,s.jsx)("h6",{className:"body200-w40 lg:h6 mb-16",id:"footer-static-pages",children:"Информация"}),(0,s.jsxs)("ul",{className:"flex flex-col align-items-center lg:align-items-start gap-12",children:[(0,s.jsx)("li",{children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",component:o(),href:"/blog",underline:"hover",variant:"body100",children:"Блог"})}),t.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",component:o(),href:"/pages/".concat(e.slug),underline:"hover",variant:"body100",children:e.name})},e.slug)),(0,s.jsx)("li",{children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",component:o(),href:"/reviews",underline:"hover",variant:"body100",children:"Отзывы"})}),(0,s.jsx)("li",{children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",component:o(),href:"/faq",underline:"hover",variant:"body100",children:"Частые вопросы"})}),(0,s.jsx)("li",{children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",component:o(),href:"/legal/privacy",underline:"hover",variant:"body100",children:"Политика обработки персональных данных"})}),(0,s.jsx)("li",{children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",component:o(),href:"/legal/offer",underline:"hover",variant:"body100",children:"Публичная оферта"})})]})]}),(0,s.jsxs)("nav",{"aria-labelledby":"footer-categories",style:{gridArea:"categories"},children:[(0,s.jsx)("h6",{className:"mb-16",id:"footer-categories",children:(0,s.jsx)(n.N,{color:"inherit",component:o(),href:"/catalog",underline:"hover",children:(0,s.jsx)("span",{className:"body200-w40 lg:h6",children:"Каталог"})})}),(0,s.jsx)("ul",{className:"footer__categories",children:a.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",component:o(),href:"/catalog/".concat(e.slug),underline:"hover",variant:"body100",children:e.name})},e.slug))})]}),(0,s.jsxs)("section",{"aria-labelledby":"footer-contacts",className:"flex flex-col align-items-center lg:align-items-end",style:{gridArea:"contacts"}
1,children:[(0,s.jsx)("h6",{className:"body200-w40 lg:h6 mb-16",id:"footer-contacts",children:"Контакты"}),(0,s.jsx)("div",{className:"mb-12 lg:mb-16",children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",href:u.EK.href,underline:"hover",variant:"body100",children:u.EK.text})}),(0,s.jsx)("div",{className:"mb-12 lg:mb-16",children:(0,s.jsx)(n.N,{color:"var(--es-mono-a-a800)",href:u.WF.href,underline:"hover",variant:"body100",children:u.WF.text})}),(0,s.jsxs)("div",{className:"flex gap-8 mb-12 lg:mb-16",children:[(0,s.jsx)(r.Button,{"aria-label":"Vk",className:"footer__social",color:"tertiary",component:"a",href:u.oY.vk,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(m.eL,{})}),(0,s.jsx)(r.Button,{"aria-label":"Telegram",className:"footer__social",color:"tertiary",component:"a",href:u.oY.telegram,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(m.EA,{})}),(0,s.jsx)(r.Button,{"aria-label":"WhatsApp",className:"footer__social",color:"tertiary",component:"a",href:u.oY.whatsApp,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(m.Tw,{})}),(0,s.jsx)(r.Button,{"aria-label":"Max",className:"footer__social",color:"tertiary",component:"a",href:u.oY.max,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(m.tP,{})})]}),(0,s.jsx)(r.Button,{color:"mono-a",size:"500",variant:"contained",onClick:i,children:"Заказать звонок"})]})]}),(0,s.jsxs)("div",{className:"footer__copyright caption px-20 py-20 mono-a-a600",children:["\xa9 ",new Date().getFullYear()," Планета запчастей. Все права защищены."]})]})}},75786:()=>{},77150:(e,t,a)=>{"use strict";a.d(t,{GI:()=>i,MV:()=>l,N4:()=>o,cf:()=>c,fS:()=>r,pe:()=>n});var s=a(43419);let r=(e,t)=>s.o.post("/orders",e,t?{headers:{"x-captcha-token":t}}:void 0).then(e=>e.data),n=e=>s.o.post("/my/orders",e).then(e=>e.data),l=e=>s.o.get("/orders",{params:e}).then(e=>e.data),i=e=>s.o.get("/orders/".concat(e)).then(e=>e.data),o=e=>s.o.delete("/orders/".concat(e)).then(e=>e.data),c=()=>s.o.get("/orders/waiting-payment").then(e=>e.data)},78261:(e,t,a)=>{"use strict";a.d(t,{L:()=>v});var s=a(54568);a(26868);var r=a(73485),n=a(70213),l=a(16749),i=a(52503),o=a(599),c=a(59021),d=a(29270),h=a(72902),u=a(19664),m=a.n(u),x=a(7620),p=a(78227),g=a(85196),j=a(53330);let v=e=>{let{className:t,search:a,onClose:u}=e,v=(0,r.u)(a,400),f=(0,p.Ay)(["product-search",v],()=>v.length>1?(0,d.zh)({q:v}):Promise.resolve([]),{keepPreviousData:!0});return(0,s.jsx)("div",{className:(0,h.A)(t,"search-results flex flex-col flex-grow"),children:f.isLoading||!f.data?(0,s.jsx)("div",{className:"mx-auto my-auto",style:{paddingBlock:"70px"},children:(0,s.jsx)(n.B,{size:48})}):f.data.length?(0,s.jsxs)("div",{className:"search-results__wrapper flex flex-col",children:[(0,s.jsxs)("div",{className:"flex align-items-center justify-content-between px-12 lg:px-16 pt-8 lg:pt-16 pb-4",children:[(0,s.jsx)("div",{className:"caption mono-a-a600"}),f.data.length>8&&(0,s.jsx)(l.N,{component:m(),href:"/catalog/search?q=".concat(encodeURI(a)),underline:"hover",variant:"caption",onClick:u,children:"Показать всё"})]}),(0,s.jsx)("div",{className:"scrollbar-overlay-mono-a pt-2 pb-2 lg:pt-6 lg:pb-8",children:f.data.map((e,t)=>{var a,r;return(0,s.jsxs)(x.Fragment,{children:[t>0&&(0,s.jsx)(i.c,{color:"var(--es-mono-a-a200)"}),(0,s.jsxs)(o.c,{button:!0,className:"search-results__product py-6 px-8 lg:px-24 flex align-items-center",component:m(),href:"/product/".concat(e.slug),onClick:u,children:[(null==(a=e.images[0])?void 0:a["catalog-sm-webp"])?(0,s.jsx)("img",{className:"search-results__img mr-12",src:null==(r=e.images[0])?void 0:r["catalog-sm-webp"]}):(0,s.jsx)(g.eK,{className:"mr-12 mono-a-a200",height:"56px",width:"56px"}),(0,s.jsxs)("div",{className:"py-4",children:[(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-x-8 gap-y-4 mb-4",children:[(0,s.jsxs)("div",{className:"flex align-items-center gap-6",children:[(0,s.jsx)("div",{className:(0,h.A)("search-results__stock-badge",e.stock?"green-400":"red-300")}),e.stock?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"caption mono-a-a500",children:"В наличии:"}),(0,s.jsxs)("span",{className:"caption mono-a-a500",children:[e.stock||0," шт"]})]}):(0,s.jsx)("span",{className:"caption red-500",children:"Нет в наличии"})]}),(0,s.jsx)(i.c,{flexItem:!0,className:"my-2 hidden lg:block",color:"var(--es-mono-a-a500)",orientation:"vertical"}),(0,s.jsx)("div",{className:"caption mono-a-a500",children:e.sku})]}),(0,s.jsx)("div",{className:"body100 mb-4",children:e.name}),(0,s.jsxs)("div",{className:"h6",children:[(0,j.Z)(e.price||0)," ",(0,s.jsx)("span",{className:"mono-a-a500",children:"₽"})]})]})]})]},e.id)})})]}):(0,s.jsxs)("div",{className:"flex flex-col align-items-center mx-auto my-auto py-48",children:[(0,s.jsx)(c.u,{className:"mb-12 mono-a-a150"}),(0,s.jsx)("div",{className:"body200",children:"По запросу ничего не найдено"})]})})}},83526:(e,t,a)=>{"use strict";a.d(t,{WF:()=>r,EK:()=>n,oY:()=>s});let s={vk:"https://vk.com/planetazpch",telegram:"https://t.me/+79270839815",whatsApp:"https://api.whatsapp.com/se
1nd/?phone=79273086279&text&type=phone_number&app_absent=0",max:"https://max.ru/u/f9LHodD0cOJ79_lXYzr4FzkSR0lAWsfgAjLq5IBQUwhHUbhtw4p8VLqOcV8"},r={text:"[email protected]",href:"mailto:[email protected]"},n={text:"+7 (901) 634-65-82",international:"+79016346582",href:"tel:+79016346582"}},83588:()=>{},83774:()=>{},86630:(e,t,a)=>{"use strict";a.d(t,{eo:()=>r.PhoneFieldProvider,qe:()=>s.q}),a(54175),a(39005);var s=a(88175),r=a(19807)},86900:(e,t,a)=>{"use strict";a.d(t,{H$:()=>r,OW:()=>n,TR:()=>l});var s=a(77011);let r="/api/v1",n="/public/v1";s.env.PROJECT,s.env.INTERNAL_API_HOST;let l="ysc1_OFbU28LRgTsbsZzYVh8UvkqZm9ss4MGLaODRKrrWe39147b0"},87810:()=>{},87929:(e,t,a)=>{"use strict";a.d(t,{HeaderView:()=>ec});var s=a(54568);a(5228);var r=a(6461),n=a(71965),l=a(27509),i=a(17553),o=a(7523),c=a(19155),d=a(75777),h=a(64364),u=a(77599),m=a(65696),x=a(57134),p=a(18947),g=a(47706),j=a(98031),v=a(15917),f=a(50961),b=a(52503),y=a(46112),k=a(75352),w=a(12326),C=a(72902),N=a(19664),_=a.n(N),S=a(27541),A=a(7620),z=a(61867),P=a(96890),B=a(17376),E=a(73107),I=a(83526),O=a(85196),M=a(28697);a(56112);var L=a(94725),R=a(29134),D=a(98148);a(87810);let F=(0,A.memo)(e=>{let{columns:t=4,children:a,className:r,rowGap:n,columnGap:l}=e,[i,o]=(0,A.useState)(t),c=(0,A.useRef)(null),d=(0,A.useCallback)(()=>{o(()=>t)},[t]),h=(0,A.useCallback)(()=>{if(!window.requestAnimationFrame)return d();c.current&&window.cancelAnimationFrame(c.current),c.current=window.requestAnimationFrame(()=>{d()})},[d]);return(0,A.useEffect)(()=>(d(),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h),c.current&&window.cancelAnimationFrame(c.current)}),[h,d]),(0,s.jsx)("div",{className:(0,C.A)("masonry",r),style:{"--masonry-row-gap":(n||0)+"px","--masonry-column-gap":(l||0)+"px"},children:(()=>{let e=(()=>{let e=A.Children.toArray(a),t=Array.from({length:i},()=>[]);return e.forEach((e,a)=>t[a%i].push(e)),t})();return e.map((t,a)=>(0,s.jsx)("div",{className:"masonry-item",style:{"--masonry-item-counts":e.length},children:t},a))})()})});var T=a(94432);a(63863);var W=a(75507),q=a(599),Z=a(30401),Q=a(38696);let K=(0,A.memo)(function(e){let{category:t,onClose:a}=e,[r,l]=(0,n.C)(!1);return(0,s.jsxs)("div",{className:"catalog-menu-category",children:[(0,s.jsx)(W.TooltipEllipsis,{disableInteractive:!0,title:t.name,children:e=>{let{ref:r,childrenRef:n}=e;return(0,s.jsx)(q.c,{button:!0,component:_(),href:"/catalog/".concat(t.slug),size:"100",onClick:a,children:(0,s.jsx)(f.Z,{primaryTypographyClassName:"body200-w40",children:(0,s.jsx)("span",{ref:r,children:(0,s.jsx)("span",{ref:n,children:t.name})})})})}}),t.children.map((e,t)=>(0,s.jsx)(W.TooltipEllipsis,{disableInteractive:!0,title:e.name,children:n=>{let{ref:l,childrenRef:i}=n;return(0,s.jsx)(q.c,{button:!0,component:_(),href:"/catalog/".concat(e.slug),size:"100",style:{display:!r&&t>=6?"none":"flex"},onClick:a,children:(0,s.jsx)(f.Z,{children:(0,s.jsx)("span",{ref:l,children:(0,s.jsx)("span",{ref:i,children:e.name})})})})}},e.id)),t.children.length>6&&(0,s.jsx)(i.Button,{color:"tertiary",endIcon:r?(0,s.jsx)(Z.M,{}):(0,s.jsx)(Q.R,{}),size:"400",variant:"text",onClick:l,children:r?"Свернуть":"Еще"})]})}),G=(0,A.memo)(function(e){let{collections:t,onClose:a}=e,[r,l]=(0,n.C)(!1);return(0,s.jsxs)("div",{className:"catalog-menu-category",children:[(0,s.jsx)(W.TooltipEllipsis,{disableInteractive:!0,title:"Подборки",children:e=>{let{ref:t,childrenRef:r}=e;return(0,s.jsx)(q.c,{button:!0,component:_(),href:"/selections",size:"100",onClick:a,children:(0,s.jsx)(f.Z,{primaryTypographyClassName:"body200-w40",children:(0,s.jsx)("span",{ref:t,children:(0,s.jsx)("span",{ref:r,children:"Подборки"})})})})}}),t.map((e,t)=>(0,s.jsx)(W.TooltipEllipsis,{disableInteractive:!0,title:e.name,children:n=>{let{ref:l,childrenRef:i}=n;return(0,s.jsx)(q.c,{button:!0,component:_(),href:"/selections/".concat(e.slug),size:"100",style:{display:!r&&t>=6?"none":"flex"},onClick:a,children:(0,s.jsx)(f.Z,{children:(0,s.jsx)("span",{ref:l,children:(0,s.jsx)("span",{ref:i,children:e.name})})})})}},e.id)),t.length>6&&(0,s.jsx)(i.Button,{color:"tertiary",endIcon:r?(0,s.jsx)(Z.M,{}):(0,s.jsx)(Q.R,{}),size:"400",variant:"text",onClick:l,children:r?"Свернуть":"Еще"})]})}),U=(0,A.memo)(e=>{var t;let{top:a,onClose:r}=e,n=(0,E.I)(),l=(0,A.useRef)(null),{tree:o}=(0,R.useCategoryGraphQuery)({skipSingleRoot:!0}),c=(0,D.useCollectionsQuery)();(0,L.K)(!0,document.body);let{isScrollable:d,isScroll:h,onScroll:u}=(0,T.M)(l);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"catalog-menu",style:{"--catalog-menu-top":a+"px"},children:(0,s.jsx)("div",{ref:l,className:(0,C.A)("container scrollbar-overlay-mono-a",d&&h&&"catalog-menu--mask"),onScroll:u,children:(0,s.jsxs)("div",{className:"flex gap-24",children:[(0,s.jsx)("div",{className:"catalog-menu__left flex-grow",children:(0,s.jsx)(F,{columnGap:24,columns:4,rowGap:16,children:(0,A.useMemo)(()=>o.map(e=>(0,s.jsx)(K,{category:e,onClose:r},e.id)),[])})}),(0,s.jsxs)("div",{className:"catalog-menu__right flex flex-col gap-16",children:[!!(null==(t=c.data)?void 0:t.length)&&(0,s.jsx)(G,{collections:c.data,onClose:r}),(0,s.jsxs)("div",{className:"flex flex-col gap-16 px-12",children:[(0,s.jsx)("p",{className:"body200-w40",children:"Полезно"}),(0,s.jsx)(i.Button,{size:"600",variant:"outlined",onClick:n,children:"Проценка товаров"}),(0,s.jsx)(i.Button,{size:"600",variant:"outlined",children:"Частые вопросы"})]})]})]})})}),(0,s.jsx)("div",{className:"catalog-menu-overlay",onClick:r})]})});var Y=a(72465),H=a(86630);let V=e=>{let{staticPages:t,onClose:a}=e,r=(0,B.TU)(),n=(0,E.I)();return(0,s.jsxs)(H.qe,{children:[(0,s.jsx)(Y.h,{endAdornment:(0,s.jsx)(i.Button,{"aria-label":"Закрыть",color:"black",variant:"outlined",onClick:a,children:(0,s.jsx)(d.g,{})}),startAdornment:(0,s.jsx)(O.H_,{height:"32px",width:"135px"})}),(0,s.jsxs)("div",{className:"px-8",children:[(0,s.jsxs)("div",{className:"px-8 py-8",children:[(0,s.jsx)(i.Button,{className:"mb-8",color:"black",component:"a",href:I.EK.href,startIcon:(0,s.jsx)(c.y,{}),children:(0,s.jsx)("span",{className:"body100-w40",children:I.EK.text})}),(0,s.jsxs)("div",{className:"flex gap-8",children:[(0,s.jsx)(i.Button,{"aria-label":"Vk",color:"black",component:"a",href:I.oY.vk,target:"_blank",variant:"text",children:(0,s.jsx)(O.Lt,{})}),(0,s.jsx)(i.Button,{"aria-label":"Telegram",color:"black",component:"a",href:I.oY.telegram,target:"_blank",variant:"text",children:(0,s.jsx)(O.Js,{})}),(0,s.jsx)(i.Button,{"aria-label":"WhatsApp",color:"black",component:"a",href:I.oY.whatsApp,target:"_blank",variant:"text",children:(0,s.jsx)(O.uq,{})}),(0,s.jsx)(i.Button,{"aria-label":"Max",color:"black",component:"a",href:I.oY.max,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(O.m4,{})})]})]}),(0,s.jsx)("div",{className:"py-8 px-8",children:(0,s.jsx)(i.Button,{color:"black",variant:"outlined",children:(0,s.jsx)("span",{className:"body100-w50",onClick:r,children:"Заказать звонок"})})}),(0,s.jsxs)("div",{className:"py-8",children:[(0,s.jsx)(q.c,{button:!0,size:"300",onClick:n,children:(0,s.jsx)(f.Z,{children:"Проценка товаров"})}),(0,s.jsx)(q.c,{button:!0,component:_(),href:"/blog",size:"300",onClick:a,children:(0,s.jsx)(f.Z,{children:"Блог"})}),t.map(e=>(0,s.jsx)(q.c,{button:!0,component:_(),href:"/pages/".concat(e.slug),size:"300",onClick:a,children:(0,s.jsx)(f.Z,{children:e.name})},e.slug)),(0,s.jsx)(q.c,{button:!0,component:_(),href:"/reviews",size:"300",onClick:a,children:(0,s.jsx)(f.Z,{children:"Отзывы"})}),(0,s.jsx)(q.c,{button:!0,component:_(),href:"/faq",size:"300",onClick:a,children:(0,s.jsx)(f.Z,{children:"Частые вопросы"})})]})]})]})};var X=a(78261),J=a(30773);a(30719);var $=a(89576),ee=a(64946);let et=(0,a(96442).default)(()=>Promise.all([a.e(6447),a.e(6383),a.e(3149),a.e(3016)]).then(a.bind(a,3016)).then(e=>
1e.LocationDialog),{loadableGenerated:{webpack:()=>[3016]},ssr:!1}),ea=()=>{let[e,t]=(0,n.C)(!1),[a,l]=(0,A.useState)(!1),o=(0,r.U)(M.f.down("desktopXS")),{city:c,isLoading:h,isConfirmed:u,setCity:m}=(0,ee.useGetCurrentCityQuery)();return(0,A.useEffect)(()=>{!h&&c&&l(!u)},[h,c,u]),(0,s.jsxs)("div",{className:"location",children:[(0,s.jsx)("div",{className:"lg:hidden",children:(0,s.jsx)(i.Button,{color:"black",variant:"outlined",onClick:t,children:(0,s.jsx)(O.Hk,{})})}),(0,s.jsx)("div",{className:"hidden lg:block ",children:(0,s.jsx)(i.Button,{className:"location__btn",size:"400",startIcon:(0,s.jsx)($.h,{}),onClick:t,children:u?null==c?void 0:c.name:"Выберите город"})}),(0,s.jsxs)("div",{className:(0,C.A)("location__popper px-16 py-16",!a&&"hidden"),style:{...o?{top:"54px",right:"56px"}:{top:"40px"}},children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsxs)("div",{className:"location__popper__group",children:[(0,s.jsx)("p",{className:"caption mono-a-a800",children:"Ваш город"}),(0,s.jsxs)("p",{className:"body100-w40 mono-a-a900",children:[null==c?void 0:c.name,"?"]})]}),(0,s.jsx)(i.Button,{className:"align-self-start",size:"200",onClick:()=>l(!1),children:(0,s.jsx)(d.g,{height:"16px",width:"16px"})})]}),(0,s.jsx)("p",{className:"caption mono-a-a800 mt-8",children:"От выбора зависит срок доставки"}),(0,s.jsxs)("div",{className:"mt-16 flex gap-8 ",children:[(0,s.jsx)(i.Button,{className:"location__popper__btn",color:"primary",variant:"contained",onClick:()=>m(c),children:"Да, верно"}),(0,s.jsx)(i.Button,{className:"location__popper__btn",variant:"outlined",onClick:()=>{l(!1),t()},children:"Изменить"})]})]}),(0,s.jsx)(et,{open:e,onClose:()=>t(!1)})]})};var es=a(77399),er=a(90647),en=a(24063),el=a(81341),ei=a(33016);let eo=(0,A.memo)(()=>{let e=(0,ei.useCartCount)();return(0,s.jsx)(es.s,{badge:e>0?(0,s.jsx)(er.E,{color:"primary",size:"500",children:e}):null,offset:[-9,9],placement:"top-right",children:(0,s.jsx)(i.Button,{"aria-label":"Корзина",color:"black",component:_(),href:"/cart",size:"500",variant:"text",children:e?(0,s.jsx)(en.s,{}):(0,s.jsx)(el.q,{})})})}),ec=e=>{let{staticPages:t}=e,a=!!(0,y.useGetSessionQuery)().data,N=[{name:"Блог",href:"blog"},...t,{name:"Отзывы",href:"reviews"},{name:"Частые вопросы",href:"faq"}],L=(0,r.U)(M.f.down("desktopXS")),R=(0,S.useRouter)(),D=(0,S.usePathname)(),F=(0,S.useSearchParams)().has("success"),T=D.startsWith("/cart")&&!F,[W,q]=(0,n.C)(!1),[Z,Q]=(0,n.C)(!1),{ref:K,toHide:G,menuAnchor:Y,openMenu:H,closeMenu:$}=(()=>{let e=(0,A.useRef)(null),[t,a]=(0,A.useState)(0),[s,r,n]=(0,l.b)();return(0,J.w)(e,()=>{let t=window.document.querySelectorAll("a[data-links]"),s=[...t].reduce((e,t)=>(t.style.display="",e+t.offsetWidth),(t.length-1)*4);s>e.current.offsetWidth&&(s+=76);let r=t.length-1;for(;r>-1&&s>e.current.offsetWidth;)s-=t[r].offsetWidth+4,t[r].style.display="none",r--;a(t.length-1-r),n()}),{ref:e,toHide:t,menuAnchor:s,openMenu:r,closeMenu:n}})(),{headerRef:ee,isHidden:et}=(()=>{let e=(0,S.usePathname)(),t=(0,S.useSearchParams)(),a=(0,A.useRef)(null),s=e.startsWith("/cart"),r=t.has("success"),[n,l]=(0,A.useState)(null);return(0,A.useEffect)(()=>{let e=!1,t=0,a=()=>{var a,s;if(e)return;let r=null!=(s=null==(a=window.visualViewport)?void 0:a.pageTop)?s:window.scrollY;window.requestAnimationFrame(()=>{let a=r-t;Math.abs(a)>20&&(l(a>0?"down":"up"),t=Math.max(0,r)),e=!1}),e=!0};return window.addEventListener("scroll",a),()=>{window.removeEventListener("scroll",a),e=!1,t=0}},[]),(0,A.useEffect)(()=>{if(!s){var e;null==(e=a.current)||e.classList.toggle("header--half","down"===n)}},[n]),{headerRef:a,scrollDirection:n,isHidden:e.startsWith("/account")||s&&!r}})(),{top:es,measure:er}=((e,t)=>{let[a,s]=(0,A.useState)(0),r=(0,A.useCallback)(()=>{let t=e.current;t&&s(Math.max(0,t.getBoundingClientRect().bottom))},[]);return(0,A.useEffect)(()=>{let a=e.current;if(!t||!a)return;r();let s=window.setTimeout(r,200),n=new ResizeObserver(r);return n.observe(a),a.addEventListener("transitionend",r),window.addEventListener("resize",r),window.addEventListener("scroll",r,{passive:!0}),()=>{window.clearTimeout(s),n.disconnect(),a.removeEventListener("transitionend",r),window.removeEventListener("resize",r),window.removeEventListener("scroll",r)}},[t,r]),{top:a,measure:r}})(ee,Z),en=(0,E.I)(),[el,ei]=(0,A.useState)(""),[ec,ed]=(0,A.useState)(!1);(0,A.useEffect)(()=>{ei("")},[D]);let{open:eh}=(0,P.A)(),eu=(0,B.TU)(),em=(0,A.useCallback)(()=>Q(!1),[]),ex=(0,A.useCallback)(()=>{er(),Q()},[er]),[ep,eg,ej]=(0,l.b)(),{mutate:ev}=(0,z.iX)();return(0,A.useEffect)(()=>{L?em():q(!1)},[L]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("header",{ref:ee,className:(0,C.$)("header",et&&"header--mobile-hidden"),children:[!T&&(0,s.jsx)("div",{className:"container hidden lg:block",children:(0,s.jsxs)("div",{className:"header__nav",children:[(0,s.jsxs)("nav",{className:"flex align-items-center",children:[(0,s.jsx)("div",{className:"mr-8",style:{flexShrink:0},children:(0,s.jsx)(ea,{})}),(0,s.jsxs)("ul",{ref:K,className:"flex gap-4",children:[N.map(e=>(0,s.jsx)(i.Button,{"data-links":!0,component:_(),href:e.href?"/".concat(e.href):"/pages/".concat(e.slug),size:"400",children:e.name},e.href||e.slug)),(0,s.jsx)(i.Button,{"data-links-more":!0,component:"li",endIcon:(0,s.jsx)(o.K,{}),size:"400",style:{display:G?"":"none"},onClick:H,children:"Ещё"})]})]}),(0,s.jsxs)("div",{className:"flex gap-4 align-items-center",style:{flexShrink:0},children:[(0,s.jsx)(i.Button,{size:"400",onClick:en,children:"Проценка товаров"}),(0,s.jsx)(i.Button,{size:"400",onClick:eu,children:"Заказать звонок"}),(0,s.jsx)(i.Button,{color:"black",component:"a",href:I.EK.href,size:"400",startIcon:(0,s.jsx)(c.y,{}),children:(0,s.jsx)("span",{className:"body100-w40",children:I.EK.text})}),(0,s.jsx)(i.Button,{"aria-label":"Vk",color:"black",component:"a",href:I.oY.vk,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(O.qP,{})}),(0,s.jsx)(i.Button,{"aria-label":"Telegram",color:"black",component:"a",href:I.oY.telegram,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(O.Aw,{})}),(0,s.jsx)(i.Button,{"aria-label":"WhatsApp",color:"black",component:"a",href:I.oY.whatsApp,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(O.bM,{})}),(0,s.jsx)(i.Button,{"aria-label":"Max",color:"black",component:"a",href:I.oY.max,size:"400",target:"_blank",variant:"text",children:(0,s.jsx)(O.j2,{})})]})]})}),(0,s.jsx)("div",{className:(0,C.$)("header__bar",T&&"header__bar--compact"),children:(0,s.jsxs)("div",{className:"container flex align-items-center",children:[(0,s.jsxs)("div",{className:"flex align-items-center",children:[(0,s.jsx)(_(),{"aria-label":"Планета запчастей",className:"header__logo-link flex",href:"/",children:(0,s.jsx)(O.H_,{className:"header__logo"})}),!T&&(0,s.jsx)("div",{className:"hidden lg:flex",children:(0,s.jsx)(i.Button,{color:"primary",startIcon:Z?(0,s.jsx)(d.g,{}):(0,s.jsx)(h.P,{}),variant:"contained",onClick:ex,children:"Каталог"})})]}),T?(0,s.jsx)("div",{className:"flex-grow"}):(0,s.jsxs)("div",{className:"header__search-wrapper flex-grow",children:[(0,s.jsx)(u.A,{fullWidth:!0,autoComplete:"off",className:"header__search",endAdornment:(0,s.jsxs)(m.z,{position:"end",children:[!!el&&(0,s.jsx)(i.Button,{"arial-label":"Сбросить поиск",className:"header__search-clear",color:"tertiary",size:"200",variant:"text",onClick:()=>{ei(""),ed(!1)},children:(0,s.jsx)(x.d,{className:"mono-a-a500"})}),(0,s.jsx)(i.Button,{color:"primary",size:"400",variant:"contained",onClick:()=>{el.length>1&&(R.push(encodeURI("/catalog/search?q=".concat(el))),ed(!1),ei(""))},children:(0,s.jsx)("span",{className:"body100-w40",children:"Найти"})})]}
1),name:"search",placeholder:"Название или артикул",size:"500",type:"search",value:el,onChange:e=>{ei(e.target.value),ed(e.target.value.length>1)}}),!L&&ec&&(0,s.jsx)(p.x,{onClickAway:e=>{e.target.closest(".header__search")||ed(!1)},children:(0,s.jsx)("div",{className:"header__search-results flex flex-col",children:(0,s.jsx)(X.L,{search:el,onClose:()=>{ed(!1),ei("")}})})})]}),(0,s.jsxs)("div",{className:(0,C.$)("hidden lg:flex ml-24 gap-".concat(T?24:8)),children:[T?(0,s.jsx)(i.Button,{color:"black",component:"a",href:I.EK.href,size:"400",startIcon:(0,s.jsx)(c.y,{}),children:(0,s.jsx)("span",{className:"body100-w40",children:I.EK.text})}):(0,s.jsxs)(s.Fragment,{children:[!1,(0,s.jsx)(eo,{})]}),a?(0,s.jsx)(i.Button,{color:"black",variant:"text",onClick:eg,children:(0,s.jsx)(g.X,{})}):(0,s.jsx)(i.Button,{color:"black",startIcon:(0,s.jsx)(g.X,{}),variant:"outlined",onClick:eh,children:"Войти"})]}),(0,s.jsxs)("div",{className:"lg:hidden ml-auto flex gap-8",children:[(0,s.jsx)(ea,{}),(0,s.jsx)(i.Button,{color:"black",variant:"outlined",onClick:q,children:(0,s.jsx)(h.P,{})})]})]})})]}),(0,s.jsx)(j.W,{anchorEl:Y,open:!!Y,onClose:$,children:N.slice(-G).map(e=>(0,s.jsx)(v.D,{component:_(),href:e.href?"/".concat(e.href):"/pages/".concat(e.slug),children:(0,s.jsx)(f.Z,{children:e.name})},e.href||e.slug))}),(0,s.jsxs)(j.W,{anchorEl:ep,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!!ep,slotProps:{root:{style:{zIndex:1700}},paper:{style:{minWidth:196}}},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ej,children:[(0,s.jsx)(v.D,{component:_(),href:"/account",onClick:ej,children:"Профиль"}),(0,s.jsx)(v.D,{component:_(),href:"/account/orders",onClick:ej,children:"Заказы"}),(0,s.jsx)(v.D,{component:_(),href:"/account/recents",onClick:ej,children:"История просмотров"}),(0,s.jsx)(v.D,{component:_(),href:"/account/loyalty",onClick:ej,children:"Программа лояльности"}),(0,s.jsx)(b.c,{className:"my-8"}),(0,s.jsx)(v.D,{onClick:()=>{ej(),(0,k.ri)().then(()=>ev((0,w.D)())).then(e=>{void 0!==e&&R.replace("/")})},children:"Выйти"})]}),Z&&(0,s.jsx)(U,{top:es,onClose:em}),W&&(0,s.jsx)(V,{staticPages:t,onClose:q})]})}},88175:(e,t,a)=>{"use strict";a.d(t,{q:()=>s.MobileMenu});var s=a(63533)},88904:(e,t,a)=>{"use strict";a.d(t,{H:()=>i});var s=a(54568);a(47285);var r=a(17553),n=a(72902),l=a(17376);let i=e=>{let{name:t,cardSize:a,size:i="600",...o}=e,c=(0,l.TU)({subject:"".concat(t)});return(0,s.jsx)(r.Button,{className:(0,n.A)("product-stock-callback",a&&"product-stock-callback--card-size-".concat(a)),color:"mono-a",fullWidth:!a,size:i,variant:"outlined",onClick:c,...o,children:a||"600"!==i?(0,s.jsx)(s.Fragment,{children:"Узнать о поступлении"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"sm:hidden",children:"Поступление"}),(0,s.jsx)("span",{className:"hidden sm:block",children:"Узнать о поступлении"})]})})}},91372:(e,t,a)=>{"use strict";a.r(t),a.d(t,{TabBar:()=>W});var s=a(54568);a(45562);var r=a(6461),n=a(71965),l=a(52053),i=a(92892),o=a(77399),c=a(90647),d=a(81341),h=a(47706),u=a(46112),m=a(33016),x=a(72902),p=a(19664),g=a.n(p),j=a(27541),v=a(7620),f=a(96890),b=a(85196),y=a(28697),k=a(72465),w=a(17553),C=a(75777),N=a(23217),_=a(599),S=a(50961),A=a(52503),z=a(88175);let P=e=>{let{onClose:t}=e;return(0,s.jsxs)(z.q,{children:[(0,s.jsx)(k.h,{prominent:!0,endAdornment:(0,s.jsx)(w.Button,{"aria-label":"Закрыть",color:"tertiary",size:"500",variant:"outlined",onClick:t,children:(0,s.jsx)(C.g,{})}),startAdornment:(0,s.jsx)(w.Button,{"aria-label":"Закрыть",color:"tertiary",size:"500",variant:"outlined",onClick:t,children:(0,s.jsx)(N.A,{})}),children:"Личный кабинет"}),(0,s.jsx)(_.c,{button:!0,component:g(),href:"/account",size:"400",onClick:t,children:(0,s.jsx)(S.Z,{children:"Профиль"})}),(0,s.jsx)(A.c,{}),(0,s.jsx)(_.c,{button:!0,component:g(),href:"/account/orders",size:"400",onClick:t,children:(0,s.jsx)(S.Z,{children:"Заказы"})}),(0,s.jsx)(A.c,{}),(0,s.jsx)(_.c,{button:!0,component:g(),href:"/account/recents",size:"400",onClick:t,children:(0,s.jsx)(S.Z,{children:"История просмотров"})}),(0,s.jsx)(A.c,{}),(0,s.jsx)(_.c,{button:!0,component:g(),href:"/account/loyalty",size:"400",onClick:t,children:(0,s.jsx)(S.Z,{children:"Программа лояльности"})}),(0,s.jsx)(A.c,{}),(0,s.jsx)(_.c,{button:!0,size:"400",onClick:t,children:(0,s.jsx)(S.Z,{children:"Выйти"})})]})};a(61780);var B=a(77599),E=a(65696),I=a(57134),O=a(82781),M=a(76390),L=a(29134),R=a(98148),D=a(73107),F=a(78261);let T=e=>{var t,a;let{onClose:r}=e,l=(0,D.I)(),i=(0,L.useCategoryGraphQuery)({skipSingleRoot:!0}),[o,c]=(0,v.useState)(null),d=(0,R.useCollectionsQuery)(),[h,u]=(0,n.C)(!1),[m,x]=(0,v.useState)(""),[p,j]=(0,v.useState)(!1);return(0,s.jsxs)(z.q,{children:[(0,s.jsx)(k.h,{prominent:!0,endAdornment:(0,s.jsx)(w.Button,{"aria-label":"Закрыть",color:"tertiary",size:"500",variant:"outlined",onClick:r,children:(0,s.jsx)(C.g,{})}
1),startAdornment:(0,s.jsx)(w.Button,{"aria-label":"Назад",color:"tertiary",size:"500",variant:"outlined",onClick:()=>{o?c(o.parent?i.map.get(o.parent.id):null):h?u():r()},children:(0,s.jsx)(N.A,{})}),children:h?"Подборки":(null==o?void 0:o.name)||"Каталог"}),!o&&(0,s.jsx)("div",{className:"px-16 py-8",children:(0,s.jsx)(B.A,{fullWidth:!0,className:"flex-grow",endAdornment:m?(0,s.jsx)(E.z,{className:"mr-0",position:"end",children:(0,s.jsx)(w.Button,{"arial-label":"Сбросить поиск",color:"tertiary",size:"400",variant:"text",onClick:()=>x(""),children:(0,s.jsx)(I.d,{className:"mono-a-a500"})})}):null,placeholder:"Название или артикул",size:"500",type:"search",value:m,onBlur:()=>j(!1),onChange:e=>{x(e.target.value)},onFocus:()=>j(!0)})}),p||m?m.length>1&&(0,s.jsx)(F.L,{className:"mobile-catalog-menu__search-results",search:m,onClose:r}):(0,s.jsxs)(s.Fragment,{children:[h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.c,{button:!0,component:g(),href:"/selections",size:"400",onClick:r,children:(0,s.jsx)(S.Z,{children:"Перейти в подборки"})}),(0,s.jsx)(A.c,{}),null==(t=d.data)?void 0:t.map((e,t)=>{var a,n,l,i;return(0,s.jsxs)(v.Fragment,{children:[t>0&&(0,s.jsx)(A.c,{}),(0,s.jsxs)(_.c,{button:!0,component:g(),href:"/selections/".concat(e.slug),size:"400",onClick:r,children:[!!(null==(n=e.image)||null==(a=n[0])?void 0:a.url)&&(0,s.jsx)(O.L,{children:(0,s.jsx)("img",{className:"mobile-catalog-menu__img",src:null==(i=e.image)||null==(l=i[0])?void 0:l.url})}),(0,s.jsx)(S.Z,{children:e.name})]})]},e.id)})]}):(0,s.jsxs)(s.Fragment,{children:[!!o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.c,{button:!0,component:g(),href:"/catalog/".concat(o.slug),size:"400",onClick:r,children:(0,s.jsx)(S.Z,{children:"Перейти в категорию"})}),(0,s.jsx)(A.c,{})]}),(o?o.children:i.tree).map((e,t)=>(0,s.jsxs)(v.Fragment,{children:[t>0&&(0,s.jsx)(A.c,{}),(0,s.jsxs)(_.c,{button:!0,size:"400",...e.children.length?{onClick:()=>c(i.map.get(e.id))}:{component:g(),href:"/catalog/".concat(e.slug),onClick:r},children:[!!e.image&&(0,s.jsx)(O.L,{children:(0,s.jsx)("img",{className:"mobile-catalog-menu__img",src:e.image.url})}),(0,s.jsx)(S.Z,{children:e.name}),!!e.children.length&&(0,s.jsx)(O.L,{children:(0,s.jsx)(M.D,{})})]})]},e.id)),(0,s.jsx)(A.c,{}),!!(null==(a=d.data)?void 0:a.length)&&(0,s.jsxs)(_.c,{button:!0,size:"400",onClick:u,children:[(0,s.jsx)(S.Z,{children:"Подборки"}),(0,s.jsx)(O.L,{children:(0,s.jsx)(M.D,{})})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-16 px-16 py-16 mb-12",children:[(0,s.jsx)(w.Button,{size:"600",variant:"outlined",onClick:l,children:"Проценка товаров"}),(0,s.jsx)(w.Button,{size:"600",variant:"outlined",children:"Частые вопросы"})]})]})]})},W=()=>{let e=!!(0,u.useGetSessionQuery)().data,t=(0,r.U)(y.f.down("desktopXS")),{open:a}=(0,f.A)(),p=(0,m.useCartCount)(),k=(0,j.usePathname)(),w=(0,j.useSearchParams)(),C="/cart/order"===k&&!w.has("success"),[N,_]=(0,n.C)(!1),[S,A]=(0,n.C)(!1);return(0,v.useEffect)(()=>{t||A(!1)},[t]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:(0,x.A)("lg:hidden tabbar",C&&"hidden"),children:(0,s.jsxs)(l.V,{children:[(0,s.jsx)(i.k,{component:g(),href:"/",icon:(0,s.jsx)(b.kj,{}),selected:"/"===k}),(0,s.jsx)(i.k,{icon:(0,s.jsx)(b.uY,{}),selected:"/catalog"===k,onClick:A}),!1,(0,s.jsx)(i.k,{component:g(),href:"/cart",icon:(0,s.jsx)(o.s,{badge:p?(0,s.jsx)(c.E,{color:"primary",size:"500",children:p}):null,offset:[-1,1],placement:"top-right",children:(0,s.jsx)(d.q,{})}),selected:"/cart"===k}),(0,s.jsx)(i.k,{icon:(0,s.jsx)(h.X,{}),selected:k.startsWith("/account"),onClick:e?_:a})]})}),N&&(0,s.jsx)(P,{onClose:()=>_(!1)}),S&&(0,s.jsx)(T,{onClose:()=>A(!1)})]})}},94432:(e,t,a)=>{"use strict";a.d(t,{M:()=>n});var s=a(30773),r=a(7620);let n=e=>{let[t,a]=(0,r.useState)(!1),[n,l]=(0,r.useState)(!0);return(0,s.w)(e,()=>{e.current&&a(e.current.scrollHeight>e.current.clientHeight)}),{isScrollable:t,isScroll:n,onScroll:()=>{if(e.current){let{scrollTop:t,scrollHeight:a,clientHeight:s}=e.current;l(!(t>=a-s-1))}}}}},96890:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(54568),r=a(63348);let n=(0,a(96442).default)(()=>Promise.all([a.e(5737),a.e(6383),a.e(7024),a.e(3604),a.e(3149),a.e(8258),a.e(1168)]).then(a.bind(a,21168)).then(e=>
1e.AuthDialog),{loadableGenerated:{webpack:()=>[21168]},ssr:!1}),l=function(){let{onSuccess:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,r.C)();return{open:()=>{t.open(e=>{let{close:t}=e;return(0,s.jsx)(n,{close:t})}).afterClosed.then(t=>{t&&(null==e||e())})}}}},97131:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MainCallback:()=>d});var s=a(54568);a(83588);var r=a(58449),n=a(17553),l=a(72902),i=a(7620),o=a(17376);let c={default:{title:"Нужна помощь в подборе запчасти?",subtitle:"Закажите звонок — наш менеджер перезвонит и подробно проконсультирует по любому вопросу"},tires:{title:(0,s.jsxs)(s.Fragment,{children:["Нужны шины",(0,s.jsx)("br",{}),"для погрузчика?"]}),subtitle:"Подберём подходящие шины под вашу технику. Закажите звонок — менеджер перезвонит и поможет с выбором"}},d=e=>{let{className:t,variant:a="default"}=e,d=(0,o.TU)(),h=(0,i.useRef)(!1);return(0,r.U)("hashchange",()=>{"#callback"!==window.location.hash||h.current||(h.current=!0,window.history.replaceState(window.history.state,"",window.location.pathname+window.location.search),d().afterClosed.then(()=>{h.current=!1}))}),(0,s.jsx)("div",{className:(0,l.A)("main-callback",t),children:(0,s.jsxs)("div",{className:"main-callback__banner main-callback__banner--".concat(a," flex flex-col"),children:[(0,s.jsx)("div",{className:"main-callback__title",children:c[a].title}),(0,s.jsx)("div",{className:"main-callback__subtitle",children:c[a].subtitle}),(0,s.jsx)(n.Button,{className:"main-callback__button",color:"white",size:"700",variant:"contained",onClick:d,children:"Заказать звонок"})]})})}},97159:(e,t,a)=>{"use strict";a.r(t),a.d(t,{WaitingPaymentBanner:()=>m});var s=a(54568);a(68800);var r=a(23921),n=a(17553),l=a(78848),i=a(92762),o=a(35281),c=a(19664),d=a.n(c),h=a(7620);let u="waiting-payment-banner",m=()=>{let{data:e}=(0,o.useWaitingPaymentOrderQuery)(),[t,a]=(0,h.useState)(null),[c,m]=(0,h.useState)(!1);return((0,h.useEffect)(()=>{try{a(window.sessionStorage.getItem(u))}catch(e){}m(!0)},[]),c&&e&&t!==e.id)?(0,s.jsxs)(r.l,{action:(0,s.jsx)(n.Button,{"aria-label":"Закрыть",color:"mono-b",size:"400",variant:"text",onClick:()=>{try{window.sessionStorage.setItem(u,e.id)}catch(e){}a(e.id)},children:(0,s.jsx)(l.T,{})}),actions:(0,s.jsx)(i.q,{children:(0,s.jsx)(n.Button,{color:"mono-b",component:d(),href:"/account/orders/".concat(e.id),size:"400",variant:"contained",children:"Перейти к заказу"})}),breakpoint:"sm",className:"waiting-payment-banner",severity:"warning",children:["У вас есть неоплаченный счёт по заказу №",e.iid]}):null}},98148:(e,t,a)=>{"use strict";a.r(t),a.d(t,{useCollectionProductsQuery:()=>h,useCollectionsQuery:()=>d});var s=a(78227),r=a(7620),n=a(43419);let l=e=>{var t;let{images:a,categories:s,variants:r,...n}=e;return{...n,category:(null==(t=s[0])?void 0:t.name)||"",images:a.map(e=>({isMain:e.isMain,"catalog-lg-webp":e["product-lg-webp"],"catalog-sm-webp":e["product-sm-webp"]})),variants:r.map(e=>({...e,stock:e.stocks.reduce((e,t)=>e+(t.stock||0),0)}))}},i=(0,r.cache)(()=>n.o.get("/collections").then(e=>e.data));(0,r.cache)(e=>n.o.get("/collections/".concat(e)).then(e=>e.data));let o=(0,r.cache)((e,t)=>n.o.get("/collections/".concat(e,"/products"),{params:t}).then(e=>e.data).then(e=>({total:e.total,results:e.results.map(l)})));var c=a(16578);let d=e=>(0,s.Ay)(c.B.list(),()=>i(),{revalidateOnMount:!1,keepPreviousData:!0,...e}),h=(e,t,a)=>(0,s.Ay)(c.B.listProducts(e,t),()=>o(e,t),{revalidateOnMount:!1,keepPreviousData:!0,...a})},99242:()=>{}},e=>{e.O(0,[5095,4787,4615,8024,2374,3241,4698,1734,1867,4643,8227,2825,8077,6250,6247,1737,4853,6046,6597,5050,5196,587,18,7358],()=>e(e.s=32086)),_N_E=e.O()}]);

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.