(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[434],{9677:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/avtokredity/[[...segments]]",function(){return l(18646)}])},94781:function(e,t){"use strict";t.Z={src:"/kredity/assets/_next/static/media/banner-2.9368ea40.svg",height:218,width:318,blurWidth:0,blurHeight:0}},93842:function(e,t){"use strict";t.Z={src:"/kredity/assets/_next/static/media/banner-4.fc5b15be.svg",height:222,width:324,blurWidth:0,blurHeight:0}},48766:function(e,t,l){"use strict";l.d(t,{B:function(){return n}});let n=e=>{let t=Number(e.split(" ")[0]);return e&&!Number.isNaN(t)?t:0}},51858:function(e,t,l){"use strict";l.d(t,{p:function(){return k}});var n,a,i=l(85893),o=l(34588),r=l(86010),s=l(67294),c=l(59457);function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(null,arguments)}var d=function(e){return s.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),n||(n=s.createElement("path",{fill:"#1F242E",fillRule:"evenodd",d:"M2 5a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1M2 12c0-.552.482-1 1.077-1h11.846c.595 0 1.077.448 1.077 1s-.482 1-1.077 1H3.077C2.482 13 2 12.552 2 12M2 19c0-.552.5-1 1-1h6c.5 0 1 .448 1 1s-.352 1-1 1H3c-.5 0-1-.448-1-1",clipRule:"evenodd"})))},p=l(30082),v=l.n(p);let m=e=>{let t=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let l=l=>{var n;let{target:a}=l;a instanceof HTMLElement&&!(null===(n=t.current)||void 0===n?void 0:n.contains(a))&&e()};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[e]),t},_=e=>{let{content:t,children:l,disabled:n,isNewSortRadios:a}=e,[o,c]=(0,s.useState)(!1),u=(0,s.useCallback)(()=>c(!0),[c]),d=(0,s.useCallback)(()=>c(!1),[c]);return(0,i.jsxs)("div",{className:(0,r.Z)(v().wrap,a&&v().newSortRadioWrap),onClick:u,ref:m(d),children:[l,o&&!n&&(0,i.jsx)("div",{className:v().content,children:t})]})};function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(null,arguments)}var b=function(e){return s.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),a||(a=s.createElement("path",{fill:"#000",d:"M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1m.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.2 1.2 0 0 0-.21.33 1 1 0 0 0 .21 1.09q.147.133.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20m0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20"})))},g=l(58177),f=l.n(g);let x=e=>{let{isNewSortRadios:t,isMobile:l,onChangeSort:n,isIncreaseSort:a}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("p",{className:(0,r.Z)(f().sortTypeHead,t&&f().newSortRadioSortTypeHead),children:[(0,i.jsx)("button",{style:{marginLeft:"0px",marginRight:l?"0px":"8px"},className:(0,r.Z)(f().sortTypeButton,t&&f().newSortRadioSortTypeButton),onClick:n,children:(0,i.jsx)(d,{className:(0,r.Z)(!a&&f().iconInverted)})}),"Сортировать"]}),t&&(0,i.jsx)("div",{className:f().divider})]})},C=(0,s.memo)(e=>{let{isMobile:t,onChangeSort:l,isIncreaseSort:n,onChangeSortType:a,sortTypeItems:s,sortTypeValue:c,isNewSortRadios:u}=e;return(0,i.jsxs)(i.Fragment,{children:[!u&&t&&(0,i.jsx)(x,{onChangeSort:l,isMobile:t,isIncreaseSort:n,isNewSortRadios:u}),(0,i.jsxs)("div",{className:(0,r.Z)(f().sortTypeContainer,u&&f().newSortRadioSortTypeContainer),onClick:e=>e.stopPropagation(),children:[u&&(0,i.jsx)(x,{onChangeSort:l,isMobile:t,isIncreaseSort:n,isNewSortRadios:u}),s.map(e=>(0,i.jsxs)("div",{"data-qa":"".concat(e.value,"_radio"),className:f().sortType,children:[u?(0,i.jsx)(o.Y8,{name:e.value,value:c,checked:e.value===c,label:e.label,onChange:()=>a(e.value)}):(0,i.jsx)(o.Y8,{name:e.value,label:e.label,checked:e.value===c,className:f().sortTypeRadio,value:e.value,onChange:()=>a(e.value)}),e.description&&(0,i.jsx)(o.u,{text:e.description,className:(0,r.Z)(f().sortTypeButton,u&&f().newSortRadioSortTypeButton),children:(0,i.jsx)(b,{})})]},e.value))]})]})});C.displayName="SortRadios";var y=l(19438),j=l(5257),N=l.n(j);let k=(0,s.memo)(e=>{let{chips:t,onClickParams:l,isIncreaseSort:n,onChangeIncreaseSort:a,sortTypeItems:u,sortTypeValue:p,onChangeSortType:v,isMobile:m,isFixed:h,portalId:b,onClickChip:g,className:f,onClickSortType:x,isNewSortRadios:j}=e,k=(0,s.useCallback)(()=>null==a?void 0:a(!n),[n,a]),T=(0,i.jsx)("div",{style:{padding:"8px",borderRadius:j?"20px":"8px",background:"white"},className:(0,r.Z)(!m&&j&&N().sortTypeDesktop),children:(0,i.jsx)(C,{isMobile:m,isIncreaseSort:n,onChangeSort:k,onChangeSortType:v,sortTypeItems:u,sortTypeValue:p,isNewSortRadios:j,portalId:b})}),A=u.find(e=>e.value===p);return(0,i.jsx)("div",{className:(0,r.Z)(N().filter,j&&N().newSortRadiosFilter,h&&N().stuck,f),children:(0,i.jsx)(y.t,{className:N().mainContainer,children:(0,i.jsxs)("div",{className:N().container,children:[(0,i.jsx)(o.cL,{className:N().chipsContainer,chips:t,value:t.map(e=>e.id),multiple:!0,activeVariant:"secondary",onChipClick:g}),(0,i.jsxs)("div",{className:N().actionsWrapper,children:[(0,i.jsxs)("button",{className:(0,r.Z)(N().action,N().actionButton),onClick:l,children:[(0,i.jsx)(c.Z,{className:N().icon}),(0,i.jsx)("span",{className:N().actionText,children:"Все параметры"})]}),(0,i.jsxs)("div",{className:N().action,children:[(0,i.jsx)("button",{className:(0,r.Z)(N().icon,N().iconButton,!n&&N().iconInverted),onClick:k,children:(0,i.jsx)(d,{})}),(0,i.jsx)(_,{content:T,disabled:m,isNewSortRadios:j,children:(0,i.jsx)("button",{onClick:x,className:(0,r.Z)(N().actionText,N().actionButton),"data-qa":"".concat(p,"_order"),children:(null==A?void 0:A.shortLabel)||(null==A?void 0:A.label)||"Сортировка"})})]})]})]})})})});k.displayName="ListFilter"},58484:function(e,t,l){"use strict";l.d(t,{V:function(){return p}});var n=l(85893),a=l(44076),i=l(86010),o=l(67294),r=l(65737),s=l(21308),c=l(94347),u=l(83226),d=l.n(u);let p=(0,o.memo)(e=>{let{region:t,town:l,subtitle:o,title:u,mainPageUrl:p}=e,{town:v,region:m}=(0,c.T)(),{handleToggleModal:_}=(0,a.ar)(),h=e=>{(0,r.l)({event:"data-event",eventAction:e,eventCategory:p})};return(0,n.jsxs)("div",{className:(0,i.Z)(d().titleWrapper,d().newTitle),children:[(0,n.jsxs)("h1",{className:d().title,children:[u," ",((null==v?void 0:v.name_p)||(null==l?void 0:l.name_p)||(null==m?void 0:m.name_p)||(null==t?void 0:t.name_p))&&(0,n.jsxs)(n.Fragment,{children:["в"," ",(0,n.jsx)("button",{onClick:()=>{_(!0),h("show_pop_up_city_modal")},className:d().link,children:(null==v?void 0:v.name_p)||(null==l?void 0:l.name_p)||(null==m?void 0:m.name_p)||(null==t?void 0:t.name_p)})]})]}),(0,n.jsx)(s.N,{tag:"p",className:d().subtitle,children:o})]})});p.displayName="RegionTitle"},77624:function(e,t,l){"use strict";l.d(t,{n:function(){return n}});let n=(e,t)=>{var l;let n=null!==(l=null==t?void 0:t.map(e=>+e))&&void 0!==l?l:[];return[...e].sort((e,t)=>{let l=n.includes(Number(e.id)),a=n.includes(Number(t.id));return!l&&a?1:l&&!a?-1:0}).map(e=>({value:e.id,label:e.name}))}},37220:function(e,t,l){"use strict";l.d(t,{z:function(){return n}});let n=(e,t)=>(t>0&&!Number.isInteger(e)&&!Number.isNaN(e)&&String(e).split(".")[1].length>t&&(e=+e.toFixed(t)),e)},30292:function(e,t,l){"use strict";l.d(t,{G:function(){return i},b:function(){return a}});var n=l(67294);let a=(e,t,l)=>{(0,n.useEffect)(()=>{let t=setTimeout(()=>{e()},l);return()=>{clearTimeout(t)}},t)},i=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,[a,i]=(0,n.useState)(l),[o,r]=(0,n.useState)(!1),[s,c]=(0,n.useState)(null);return(0,n.useEffect)(()=>{r(!0),e().then(i).catch(c).then(()=>{r(!1)})},t),[a,o,s]}},97299:function(e,t,l){"use strict";function n(e){let{url:t,priceCurrency:l,offers:n,getLowPrice:a,getHighPrice:i,offerCount:o}=e,{lowPrice:r,highPrice:s}=n.reduce((e,t)=>{e.lowPrice=Math.min(e.lowPrice,a(t));let l=i(t);return void 0!==l&&(e.highPrice=Math.max(e.highPrice,l)),e},{lowPrice:1/0,highPrice:0});return{"@type":"AggregateOffer",url:t,priceCurrency:l,lowPrice:r,highPrice:s,offerCount:o}}l.d(t,{Q:function(){return n}})},2101:function(e,t,l){"use strict";function n(e){let{ratingValue:t,reviewCount:l,bestRating:n,worstRating:a}=e;return{"@type":"AggregateRating",ratingValue:t,reviewCount:l,bestRating:n,worstRating:a}}l.d(t,{n:function(){return n}})},62855:function(e,t,l){"use strict";function n(e){let{name:t,description:l,image:n,aggregateRating:a,offers:i}=e;return{"@context":"https://schema.org","@type":"Product",name:t,description:l,image:n,aggregateRating:a,offers:i}}l.d(t,{t:function(){return n}})},18646:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return li},default:function(){return lo}});var n,a,i=l(85893),o=l(44076),r=l(67294),s=l(34588),c=l(41664),u=l.n(c),d=l(73172),p=l(84444),v=l(19438),m=l(72335),_=l(54663),h=l(20070),b=l(57696);let g=[{id:1,label:"Условия",name:b.cQ.conditions},{id:2,label:"Требования к заемщику",name:b.cQ.requirements},{id:3,label:"Требование к ТС",name:b.cQ.requirementsVehicles},{id:4,label:"Погашение",name:b.cQ.redemption}];var f=l(44727);let x=e=>{let{data:t}=e,l=(0,r.useMemo)(()=>(0,h.m8)(t),[t]),n=(0,r.useMemo)(()=>g.filter(e=>l[e.name].some(e=>(0,f.B)(e.value))),[l]);return{tabsContent:l,tabsList:n}},C=(0,r.memo)(e=>{var t,l;let{data:n,bank:a,pageUrl:o}=e,{tabsContent:r,tabsList:s}=x({data:n});return(0,i.jsx)(m.z,{scrollBlockId:_.q6,pageUrl:o,seoText:(null==n?void 0:n.short_description)&&(null==n?void 0:n.short_description.length)>5?null==n?void 0:n.short_description:void 0,title:"Об автокредите",offerUpdateData:null==n?void 0:n.m_updated_at,bank:{logoMobile:null==a?void 0:a.logo_mob,description:null==a?void 0:a.short_description,url:"/banki/".concat(null==a?void 0:a.url),name:null==a?void 0:a.name,creditRating:null==a?void 0:a.credit_rating,netAssetsPlace:null==a?void 0:null===(t=a.ratings)||void 0===t?void 0:t.net_assets_place,netProfitRating:null==a?void 0:a.net_profit_rating},tabsList:s,tabsContent:r,aboutCompanyLabel:"О банке",site:null!==(l=null==a?void 0:a.site.title)&&void 0!==l?l:void 0})});C.displayName="AutoCreditAbout";var y=l(17722),j=l(94781),N=l(93842),k=l(64062);(n=a||(a={})).LEAD="lead",n.MASS="mass";var T=l(73897),A=l(5753),S=l.n(A);let w=e=>{let{url:t,offerType:l,isMobile:n,className:o}=e,s=(0,r.useMemo)(()=>[{id:3,image:N.Z,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",types:[a.LEAD],buttonText:"Оформить на сайте банка",link:t},{id:4,image:y.Z,text:a.LEAD?"Этот кредит нельзя открыть через Финуслуги":"Этот автокредит сейчас нельзя открыть онлайн на Финуслугах",types:[a.LEAD,a.MASS],buttonText:"Выбрать другой автокредит",link:"/avtokredity"},{id:5,image:j.Z,text:"Чтобы оформить автокредит, обратитесь в банк",types:[a.MASS]}].filter(e=>e.types.find(e=>e===l)),[t,l]);return(0,i.jsx)("div",{className:S().container,children:(0,i.jsx)(k.B,{className:o,title:"Где оформить автокредит",pageUrl:T.u.AUTOCREDIT,id:_.VT,isMobile:n,slides:s})})};var L=l(86010),R=l(77019),I=l(24443),D=l(28644),F=l(48766),M=l(26024),P=l(90999),E=l(72798),O=l(17950),U=l(41262),$=l(66566),B=l(39918),Z=l(37220),W=l(6584),V=l(94466),H=l(93478),z=l(21172),q=l.n(z);let Q="Оформить на сайте банка",J="Где оформить автокредит",X=e=>{var t,l,n,o;let{offerType:c,bank:u,data:d,isMobile:p,calculator:m}=e,[h,b]=(0,r.useState)(!1),g=(0,r.useRef)(null),f=(0,r.useMemo)(()=>{let{domestic_new:e,domestic_old:t,foreign_new:l,foreign_old:n}=d.vehicle_state;return!e&&!t&&l&&n?"Иномарка любая":e||t||!l||n?e||t||l||!n?e&&t&&!l&&!n?"Отечественная любая":e||!t||l||n?!e||t||l||n?e&&!t&&l&&!n?"Любое новое":!e&&t&&!l&&n?"Любое б/у":"Любое":"Отечественная новая":"Отечественная б/у":"Иномарка б/у":"Иномарка новая"},[d.vehicle_state]),x=(0,r.useCallback)(()=>{g.current&&g.current.focus()},[]),C=(0,r.useCallback)(e=>{e&&((0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.filterCatalog,eventLabel:"Платеж",eventValue:e.label}),m.setPaymentTypeValue(e.value))},[m]),y=(0,r.useMemo)(()=>({value:m.period,max:m.periodMax,min:m.periodMin===m.periodMax?m.periodMin-1:m.periodMin,onChange:e=>{e=null!=e?e:m.periodMin,m.periodMin!==m.periodMax&&m.setPeriod(e)},step:1,ticks:[{label:(0,U.H3)(m.periodMin),value:m.periodMin},{label:(0,U.H3)(m.periodMax),value:m.periodMax}],unit:[W.mp.ONE,W.mp.FEW,W.mp.MANY]}),[m]),j=(0,r.useMemo)(()=>m.paymentTypeOptions.filter(e=>e.value===m.paymentTypeValue),[m.paymentTypeOptions,m.paymentTypeValue]),N=(0,r.useMemo)(()=>[{id:1,label:(0,U.S_)(m.period)},{id:2,label:"".concat(m.amount)}],[m.amount,m.period]),k=(0,r.useMemo)(()=>{var e;let t=(null===(e=d.application_term.custom_text)||void 0===e?void 0:e.from)!==void 0?(0,F.B)(d.application_term.custom_text.from):0,l=new Date;l.setDate(l.getDate()+t);let n=l.getDate(),a=l.getMonth()+1,i=l.getFullYear();return"Деньги у вас до ".concat(n," ").concat((0,$.$)("".concat(a,"-").concat(n,"-").concat(i)))},[null===(t=d.application_term.custom_text)||void 0===t?void 0:t.from]),A=m.amount,S=(0,r.useMemo)(()=>{let e=m.firstPayment,t=m.period,l=d.vehicle_type.text,n=m.paymentTypeValue,a=[],o=Number(e)/(Number(A)/100);Number.isInteger(o)||(o=Number(o.toFixed(5)));let r=A?(0,Z.z)(o,1):0;a.push({label:"Первый взнос",value:"".concat(r,"%").replace(".",",")}),a.push({label:"Срок погашения",value:(0,U.S_)(t)});let s=d.full_price;if(s){let e=d.interest_rate;a.push({label:"ПСК",value:(0,R.W)(s),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n    Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,V.sz)(Number(e.from),Number(e.to))})}return a.push({label:"Тип&#160;ТС",value:l},{label:"Состояние&#160;ТС",value:f,description:"Некоторые банки указывают, что получить кредит можно только на новый автомобиль, а для других это не принципиально."}),n&&a.push({label:"Тип платежа",value:n===O.T.annuity?"Аннуитетный":"Дифференцированный",description:(0,i.jsx)("div",{className:q().tooltipContent,children:(0,i.jsx)(M.a,{type:n})})}),a},[m.firstPayment,m.period,m.paymentTypeValue,d.vehicle_type.text,d.full_price,d.interest_rate,f,A]);return(0,i.jsxs)(v.t,{className:(0,L.Z)(q().container,q().containerFull),children:[(0,i.jsx)(P.F,{url:d.url,bank:{logoMob:null==u?void 0:u.logo_mob,url:"/banki/".concat(null==u?void 0:u.url),name:null!==(n=null==u?void 0:u.name)&&void 0!==n?n:d.bank_name},pageUrl:T.u.AUTOCREDIT,title:"Автокредит \xab".concat(d.title,"\xbb от ").concat(null!==(o=null==u?void 0:u.name)&&void 0!==o?o:d.bank_name),isSmall:l,isMobile:p,tagTheme:"red",className:q().promo}),(0,i.jsxs)("div",{className:q().left,children:[(0,i.jsx)(I.y,{isMobile:p,title:"Настройка автокредита",pageUrl:T.u.AUTOCREDIT,infoLink:{isShow:!p,text:"Подробнее об автокредите",idScrollBlock:_.q6,offPadding:!0,widthMaxContent:!0},items:[{elements:[{type:"moneyInput",props:{label:"Сумма",value:m.amount,onChange:m.setAmount,onFocus:()=>b(!0)}}]},{elements:[{type:"moneyInput",props:{label:"Первый взнос",value:m.firstPayment,onChange:m.setFirstPayment,onFocus:()=>b(!0)}}]},{elements:[{type:"inputRange",props:{label:"Срок погашения",...y}}]},{elements:[{type:"select",isHidden:!m.paymentTypeValue||m.paymentTypeOptions.length<=1,desription:m.paymentTypeValue&&(0,i.jsx)(M.a,{className:q().typeDescription,type:m.paymentTypeValue}),props:{label:"Платеж",options:m.paymentTypeOptions,onChange:C,value:j}}]}],chips:N,isShowChips:p&&!!(null==N?void 0:N.length)&&!h,isExpandSettings:h,onToggleSettings:()=>b(e=>!e)}),(0,i.jsx)(E.S,{isSmall:!0,className:q().qrDesc})]}),(0,i.jsxs)("div",{className:q().right,children:[(0,i.jsx)(D.y,{captionTitle:k,pageUrl:T.u.AUTOCREDIT,onEdit:x,amount:Number(m.amount),disclaimer:"Предварительные условия. Не оферта",tag:d.online_application.commercial_desc,footerActions:(0,i.jsxs)(i.Fragment,{children:[c===a.LEAD&&(0,i.jsx)(s.zx,{as:"a",onClick:()=>{(0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.link,eventActionText:Q,eventLabel:d.id})},href:d.online_application.url,target:"_blank",className:q().button,children:Q}),(0,i.jsx)(s.zx,{onClick:()=>{(0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.button,eventActionText:J}),(0,H.l)(_.VT,{offset:p?0:-100,position:"top"})},className:q().button,variant:"secondary",children:J})]}),valuesList:S}),(0,i.jsx)(E.S,{isSmall:!0,className:q().qrMobile})]})]})};var G=l(25675),K=l.n(G),Y=l(65737),ee=l(40741),et=l(30976),el=l(73654),en=l.n(el);let ea=(0,r.memo)(e=>{var t,l;let{data:n,detailData:a,className:o,onDetailInfoClick:s,onClick:c}=e,u=[],d=(0,r.useRef)(null),p=(0,r.useRef)(!1),v=(0,r.useRef)(null),m={text:"",caption:""},[_,h]=(null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.online_application.commercial)===1?["Оформить",a.data.online_application.url]:["Подробнее",n.url],b=null==a?void 0:null===(l=a.data)||void 0===l?void 0:l.full_price;b&&(m.caption="ПСК",m.text=(0,R.W)(b),m.tooltipText="ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.");let g={text:(0,V.dN)({from:n.amountFrom,to:n.amountTo},{currency:n.currency}),caption:"Сумма"},f={text:"от ".concat((0,V.uf)(n.payment),"%"),caption:"Первый взнос"};u.push({label:"Заявка через сайт банка",variant:"primary"}),n.isKascko&&u.push({label:"Потребуется каско",variant:"primary"}),n.isPermanentRegistation&&u.push({label:"Постоянная регистрация",variant:"primary"});let x=e=>{(0,Y.l)({event:"data-event",eventAction:e,eventCategory:T.u.AUTOCREDIT,eventLabel:n.id,eventValue:n.eventValue}),null==c||c(n)},C=(0,r.useCallback)(e=>{let[t]=e;1===t.intersectionRatio&&!p.current&&((0,Y.l)({event:"data-event",eventAction:"show_in_catalog",eventCategory:T.u.AUTOCREDIT,eventLabel:n.id}),p.current=!0,d.current&&v.current&&d.current.unobserve(v.current))},[n.id]);return(0,r.useEffect)(()=>{d.current&&v.current&&d.current.unobserve(v.current),!p.current&&v.current&&(d.current=new IntersectionObserver(C,{root:null,threshold:[1]}),d.current.observe(v.current))},[C]),(0,i.jsx)("div",{ref:v,className:o,onClick:()=>x("click_button_".concat((0,ee.b)("Подать заявку"))),children:(0,i.jsx)(et.J,{icon:n.logo?(0,i.jsx)("div",{className:en().logo,children:(0,i.jsx)(K(),{width:56,height:56,src:n.logo,alt:"logo"})}):(0,i.jsx)("div",{className:en().placeholderLogo}),companyName:n.bankName,productName:n.title,productUrl:n.url,buttonText:_,buttonUrl:h,tags:u,advantageAmountFrom:m,advantageAmountTo:f,advantageBonus:g,onDetailInfoClick:()=>{s(n),(0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.button,eventActionText:"open_modal"})},className:en().plate})})});ea.displayName="AutoCreditListItem";var ei=l(13442),eo=l(84135),er=l(89504),es=l(32244);let ec=e=>(null==e?void 0:e.online_application.commercial)===1?a.LEAD:a.MASS,eu=e=>{var t,l,n,a,i,o;let{banks:r,autoCredit:s,period:c}=e,u="/".concat(T.u.AUTOCREDIT,"/").concat(s.url),d="",p="",v=r.find(e=>+s.bank_id==+e.id);return 1===s.online_application.commercial&&3!==s.online_application.type&&(d="Подача заявки на сайте банка",p="non_commercial"),3===s.online_application.type?(d="Открытие онлайн на Финуслугах",p="platform"):1!==s.online_application.commercial&&3!==s.online_application.type&&(d="Открытие в банке"),{id:s.id,bankName:null!==(l=null==v?void 0:v.name)&&void 0!==l?l:s.bank_name,bankId:null!==(n=null==v?void 0:v.id)&&void 0!==n?n:"",isCard:!1,logo:null!==(a=null==v?void 0:v.logo_mob)&&void 0!==a?a:"",title:s.title,url:u,legalName:(e=>{if(e)try{let t=JSON.parse(e);if(Array.isArray(t))return t[0].name;return t.name}catch(t){return e}return""})("string"==typeof(null==v?void 0:v.legal_entities)?JSON.parse(null==v?void 0:v.legal_entities)[0].name:null==v?void 0:null===(t=v.legal_entities)||void 0===t?void 0:t[0].name),isKascko:1==+s.insurance_need.need,isPermanentRegistation:1==+s.registration_address.permanent,period:c||+s.period.to,rate:+s.interest_rate.from,rateTo:+s.interest_rate.to,payment:+s.first_payment.from||0,currency:"₽",detailUrl:"/".concat(T.u.AUTOCREDIT,"/").concat(s.url),notLoan:1===s.loan.not_required,incomeProof:0===s.income_proof.not_required,typeText:d,eventValue:p,serviceTooltip:null,amountFrom:Number(s.amount.from),amountTo:Number(s.amount.to),type:ec(s),site:{title:null!==(i=null==v?void 0:v.site.title)&&void 0!==i?i:null,url:null!==(o=null==v?void 0:v.site.url)&&void 0!==o?o:null}}};var ed=l(84053),ep=l(94347),ev=l(5569),em=l.n(ev);let e_=(0,r.memo)(e=>{let{bank:t,banks:l,currentCardId:n,autocredits:a,autocreditsFinuslugi:o,className:s}=e,{town:c}=(0,ep.T)(),[u,d]=(0,r.useState)(),p=(0,r.useCallback)(()=>{d(void 0)},[]),m=(0,r.useCallback)(e=>{(0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),_=(0,r.useMemo)(()=>{let e=a?a.filter(e=>e.id!==n):[];return(0,es.$)({productList:e,anotherList:e,count:er.NU})},[a,n]),h=(0,r.useMemo)(()=>{let e=o||[];return(0,es.$)({productList:e,anotherList:e,count:er.wo-_.length})},[_.length,o]),b=(0,r.useMemo)(()=>({bankList:_.map(e=>eu({banks:[t],autoCredit:e})),finuslugiList:h.map(e=>eu({banks:l,autoCredit:e}))}),[t,l,_,h]),g=(0,r.useCallback)(e=>{if(!e)return;let t=[_,h].reduce((e,t)=>[...e,...t],[]).find(t=>t.id===e.id);if(t){var l,n;return{...t,site:{...e.site},bankName:e.bankName,detailUrl:null!==(l=e.detailUrl)&&void 0!==l?l:"",logo:e.logo,url:null!==(n=e.url)&&void 0!==n?n:""}}},[_,h]),f=(0,r.useCallback)(e=>{d(g(e)),e&&(0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.popup,eventActionText:e.title,eventLabel:e.id})},[g]),x="".concat((0,ed.ZR)().mainBaseUrl,"/banki/").concat(t.url,"/avtokredity").concat((null==c?void 0:c.url.length)?"/reg_"+c.url:"");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("section",{className:(0,L.Z)(em().container,s),children:[(0,i.jsx)("h3",{className:em().title,children:"Другие автокредиты"}),(0,i.jsxs)(v.t,{children:[!!b.bankList.length&&(0,i.jsxs)("section",{className:em().offersListContainer,children:[(0,i.jsxs)("p",{className:em().listTitle,children:["Автокредиты от ",t.name]}),b.bankList.map(e=>(0,i.jsx)(ea,{onDetailInfoClick:f,className:em().listItem,data:e,onClick:m,text:"Подать заявку",detailData:{data:g(e),mainPageUrl:T.u.AUTOCREDIT}},e.url)),(0,i.jsx)(ei.j,{offPadding:!0,text:"Bсе предложения от банка",href:x,target:"_blank",iconColor:"light",mainPageUrl:T.u.AUTOCREDIT})]}),!!b.finuslugiList.length&&(0,i.jsxs)("section",{className:em().offersListContainer,children:[(0,i.jsx)("p",{className:em().listTitle,children:"Автокредиты на Финуслугах"}),b.finuslugiList.map(e=>(0,i.jsx)(ea,{onDetailInfoClick:f,className:em().listItem,data:e,onClick:m,text:"Подать заявку",detailData:{data:g(e),mainPageUrl:T.u.AUTOCREDIT}},e.url)),(0,i.jsx)(ei.j,{offPadding:!0,text:"Bсе предложения на Финуслугах",href:"/avtokredity",target:"_blank",iconColor:"light",mainPageUrl:T.u.AUTOCREDIT})]})]})]}),(0,i.jsx)(eo.h,{data:u,isOpen:!!u,onClose:p,mainPageUrl:T.u.AUTOCREDIT})]})});e_.displayName="AutoCreditsList";var eh=l(11163),eb=l(82080);let eg=e=>Array.isArray(e)?e[0]:e,ef=e=>{var t,l,n,a,i,o;let{asPath:s}=(0,eh.useRouter)(),[c,u]=(0,r.useState)(Number(null!==(l=e.amount.from)&&void 0!==l?l:0)),[d,p]=(0,r.useState)(0),[v,m]=(0,r.useState)(Number(null!==(n=e.period.to)&&void 0!==n?n:1)),_=Number(null!==(a=e.period.from)&&void 0!==a?a:1),h=Number(null!==(i=e.period.to)&&void 0!==i?i:1),b=(0,r.useMemo)(()=>{let t=[];return 0!==e.repayment_procedure.annuity&&t.push({label:"Аннуитетный",value:O.T.annuity}),void 0!==e.repayment_procedure.differentiated&&0!==e.repayment_procedure.differentiated&&t.push({label:"Дифференцированный",value:O.T.differentiated}),t},[e.repayment_procedure]),[g,f]=(0,r.useState)(null!==(o=null===(t=b[0])||void 0===t?void 0:t.value)&&void 0!==o?o:null),x=(0,r.useCallback)(e=>{u(null!=e?e:0)},[]),C=(0,r.useCallback)(e=>{p(null!=e?e:0)},[]),y=(0,r.useMemo)(()=>({value:c,onChange:x}),[c,x]),j=(0,r.useMemo)(()=>({value:d,onChange:C}),[d,C]);return(0,r.useEffect)(()=>{let e=(0,eb.p)(s,"#"),t=eg(e.amount),l=eg(e.first_payment),n=eg(e.period);void 0!==t&&u(+t),void 0!==l&&p(+l);let a=Number(n);!Number.isNaN(a)&&a>=_&&a<=h&&m(a)},[]),(0,r.useMemo)(()=>({amount:c,setAmount:u,amountInputProperties:y,firstPayment:d,setFirstPayment:p,firstPaymentInputProperties:j,period:v,setPeriod:m,periodMin:_,periodMax:h,paymentTypeOptions:b,paymentTypeValue:g,setPaymentTypeValue:f}),[c,y,d,j,v,_,h,b,g])};var ex=l(54228),eC=l(51469),ey=l(71276),ej=l(53487),eN=l(37502),ek=l(44215),eT=l(56381),eA=l.n(eT);function eS(e){var t;let{offer:l,posts:n,questions:a,description:o,banks:r,refererTag:c,offers:m,offersFinuslugi:_,support:h}=e,b=ec(l),g=(0,ex.S0)(),f=ef(l),{region:x,town:y}=(0,ep.T)(),j=r.find(e=>Number(e.id)===l.bank_id),N=(null==a?void 0:a.map(e=>({title:e.title,text:e.text.map(e=>e.data.html).join(""),plainText:e.text.map(e=>(0,d.MK)(e.data.html)).join("").trim()})))||[],k="Автокредит \xab".concat(l.title,"\xbb от ").concat(null!==(t=null==j?void 0:j.name_r)&&void 0!==t?t:"");return(0,i.jsxs)("main",{className:eA().page,children:[(0,i.jsx)(p.N,{productId:String(l.id),title:k,description:null!=o?o:""}),(0,i.jsx)(ey.o,{}),(0,i.jsx)(eC.g,{questions:N}),(0,i.jsx)("div",{className:eA().navigationWrapper,children:(0,i.jsx)(v.t,{children:(0,i.jsx)(s.Oo,{className:eA().breadcrumbs,items:(()=>{var e;let t=(null==y?void 0:y.name_p)||(null==x?void 0:x.name_p)?" в ".concat((null==y?void 0:y.name_p)||(null==x?void 0:x.name_p)):"",n="".concat((null==x?void 0:x.url)?"/reg_".concat(null==x?void 0:x.url):"").concat((null==y?void 0:y.url)?"/".concat(null==y?void 0:y.url):""),a=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(t),href:"/".concat(T.u.AUTOCREDIT).concat(n)}];return c&&a.push({label:"".concat(c.name).concat(t),href:"/".concat(T.u.AUTOCREDIT,"/teg_").concat(c.url).concat(n)}),a.push({label:"".concat(null!==(e=null==j?void 0:j.name)&&void 0!==e?e:l.bank_name," Автокредит ").concat(l.title)}),a})()})})}),(0,i.jsx)(X,{calculator:f,bank:j,offerType:b,data:l,isMobile:g}),(0,i.jsx)(v.t,{className:eA().about,children:(0,i.jsx)(C,{data:l,bank:j,pageUrl:T.u.AUTOCREDIT})}),(0,i.jsx)(w,{isMobile:g,offerType:b,url:l.online_application.url}),void 0!==j&&(0,i.jsx)(e_,{bank:j,banks:r,currentCardId:l.id,autocredits:m,autocreditsFinuslugi:_}),n.length>0&&(0,i.jsx)(ej.t,{posts:n,eventCategory:T.u.AUTOCREDIT}),(0,i.jsxs)("div",{className:eA().supportSection,children:[(0,i.jsx)(eN.B,{value:h}),(0,i.jsx)(ek.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,i.jsx)(u(),{...e}),dataLayerPush:Y.l,questions:N,eventCategory:"cards_support_block",href:"".concat((0,ed.ZR)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про автокредиты"})]})]})}var ew=l(98670);l(93188);var eL=l(53850),eR=l(22504);let eI={amount:"amount",firstPayment:"first_payment",period:"period",loan:"loan",incomeProof:"income_proof",insuranceNeed:"insurance_need",vehicleState:"vehicle_state",vehicleType:"vehicle_type",stateCoFinancing:"state_co_financing",bank:"bank",order:"order",sort:"sort",page:"page",payment:"payment",borrower:"borrower"},eD=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}];T.u.AUTOCREDIT;let eF=[{value:0,label:"Не имеет значения"},{value:1,label:"1 месяц"},{value:2,label:"2 месяца"},{value:3,label:"3 месяца"},{value:4,label:"4 месяца"},{value:5,label:"5 месяцев"},{value:6,label:"6 месяцев"},{value:9,label:"9 месяцев"},{value:12,label:"1 год"},{value:18,label:"1,5 года"},{value:24,label:"2 года"},{value:36,label:"3 года"},{value:48,label:"4 года"},{value:60,label:"5 лет"}],eM=[{value:"moto",label:"Мототранспорт"},{value:"car",label:"Легковое транспорт"},{value:"track",label:"Грузовое транспорт"},{value:"commercial",label:"Коммерческое транспорт"},{value:"water",label:"Водное транспорт"},{value:"custom",label:"Другое"}],eP=[{value:"moto",labelShort:"Мототранспорт"},{value:"car",labelShort:"Легковое ТС"},{value:"track",labelShort:"Грузовое ТС"},{value:"commercial",labelShort:"Коммерческое ТС"},{value:"water",labelShort:"Водное ТС"},{value:"custom",labelShort:"Другое"}],eE=[{value:"foreign_new",label:"Иномарка с завода"},{value:"foreign_old",label:"Иномарка с пробегом"},{value:"domestic_new",label:"Отечественная с завода"},{value:"domestic_old",label:"Отечественная с пробегом"}],eO=[{value:"employee_for_hire",label:"Работник по найму"},{value:"soldier",label:"Военнослужащий"},{value:"pensioner",label:"Пенсионер"},{value:"individual_entrepreneur",label:"Индивидуальный предприниматель"},{value:"civil_servant",label:"Госслужащий"},{value:"student",label:"Студент"},{value:"budgetary",label:"Бюджетник"},{value:"personal_farm_owner",label:"Владелец личного подсобного хозяйства"},{value:"nothing",label:"Иное"}],eU=[{value:"not_required",label:"Не требуется"},{value:"pledge",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"full",label:"Залог и поручительство"}],e$=[{label:"По ставке",value:"rate"},{label:"По первому взносу",value:"firstPayment"}],eB="Указали больше чем запрашиваете кредитных денег";var eZ=l(51858),eW={src:"/kredity/assets/_next/static/media/adv-auto-desktop.6c981f82.svg",height:132,width:1110,blurWidth:0,blurHeight:0},eV={src:"/kredity/assets/_next/static/media/adv-auto-mobile.07d07b83.svg",height:132,width:343,blurWidth:0,blurHeight:0},eH=l(41172),ez=l.n(eH);let eq=(0,r.memo)(e=>{let{className:t}=e,{mainBaseUrl:l}=(0,ed.ZR)();return(0,i.jsxs)(u(),{href:"".concat(l,"/osago"),target:"_blank",className:(0,L.Z)(ez().wrapper,t),children:[(0,i.jsx)(K(),{className:(0,L.Z)(ez().bg,ez().bgDesktop),src:eW,alt:""}),(0,i.jsx)(K(),{className:(0,L.Z)(ez().bg,ez().bgMobile),src:eV,alt:""}),(0,i.jsx)(s.zx,{className:ez().button,size:"s",children:"Оформить"})]})});eq.displayName="OsagoAd";var eQ=l(65848);let eJ=[],eX=(e,t)=>{let{amount:l,firstPayment:n,period:a,payment:i,incomeProof:o,vehicleType:r,vehicleState:s,banks:c,insuranceNeed:u,stateCoFinancing:d,notFirstPayment:p}=e,v=[{id:eI.amount,label:"Сумма кредита: ".concat(l?"".concat((0,V.uf)(l)," ₽"):"не имеет значения")},{id:eI.firstPayment,label:"Первый взнос: ".concat(n?"".concat((0,V.uf)(n)," ₽"):"не имеет значения")}];if("number"==typeof a){let e=eF.find(e=>e.value===a);void 0!==e&&v.push({id:eI.period,label:0===e.value?"Срок: ".concat(e.label):e.label})}if(void 0!==i&&0!==i&&v.push({id:eI.payment,label:"До ".concat((0,V.uf)(i)," ₽ в мес")}),void 0!==o&&0!==o.length){let e=eD.filter(e=>o.includes(e.value)),t=1===e.length?e[0].label:"Подтверждение дохода: (".concat(e.length,")");v.push({id:eI.period,label:t})}if(void 0!==r&&0!==r.length){let e=eM.filter(e=>r.includes(e.value)),t=1===e.length?e[0].label:"Тип транспорта: (".concat(e.length,")");v.push({id:eI.vehicleType,label:t})}if(void 0!==s&&0!==s.length){let e=eE.filter(e=>s.includes(e.value)),t=1===e.length?e[0].label:"Состояние транспорта: (".concat(e.length,")");v.push({id:eI.vehicleState,label:t})}if(void 0!==c&&0!==c.length){let e=t.filter(e=>c.includes(+e.value)),l=1===e.length?e[0].label:"Банки: (".concat(e.length,")");v.push({id:eI.bank,label:l})}return(u&&v.push({id:eI.insuranceNeed,label:"Без каско"}),d&&v.push({id:eI.stateCoFinancing,label:"С господдержкой"}),p&&v.push({id:"notFirstPayment",label:"Без первого взноса"}),eJ.length===v.length&&v.every((e,t)=>e.label===eJ[t].label&&e.id===eJ[t].id))?eJ:(eJ=v,v)},eG=e=>e?56:80;var eK=l(71147),eY=l(6252),e0=l(50586),e1=l.n(e0),e2=l(75340),e4=l(29023),e3=l(88060),e8=l(10034),e5=l.n(e8);let e6=e=>{(0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},e7=e=>{let{filter:t,className:l,isMobile:n,bankOptions:a,banks:o,town:s,region:c}=e,u=(0,e2.lJ)(),d=(0,r.useRef)(null),p=(0,r.useRef)(()=>null),[m,_]=(0,r.useState)(!1),[h,b]=(0,r.useState)(!1),{count:g,totalCount:f,increaseSort:x,sort:C,handleToggleModal:y,setIncreaseSort:j,setSort:N,isPageLoading:k,handleLoadMore:A,autoCredits:S,isLoading:w,amount:R,firstPayment:I,period:D}=t,[F,M]=(0,r.useState)(),P=(0,r.useMemo)(()=>eX(t,a),[a,t]),E=(0,r.useCallback)(()=>{y()},[y]),O=(0,r.useMemo)(()=>S.map(e=>{let t=eu({banks:o,autoCredit:e}),l={};void 0!==R&&0!==R&&(l.amount=R),void 0!==I&&0!==I&&(l.first_payment=I),void 0!==D&&0!==D&&(l.period=D);let n=(0,eY.R)(l);return Object.keys(l).length&&(t.url="".concat(t.url,"#").concat(n)),t}),[R,S,o,I,D]),U=(0,r.useCallback)(e=>{if(null===e)return;let t=S.find(t=>t.id===e.id);if(void 0!==t){var l,n;return{...t,site:{...e.site},bankName:e.bankName,detailUrl:null!==(l=e.detailUrl)&&void 0!==l?l:"",logo:e.logo,url:null!==(n=e.url)&&void 0!==n?n:""}}},[S]),$=(0,r.useCallback)(()=>{M(void 0)},[]),Z=(0,r.useCallback)(e=>{M(U(e)),null!==e&&(0,B.D)({eventCategory:T.u.AUTOCREDIT,eventAction:B.i.popup,eventActionText:e.title,eventLabel:e.id})},[U]);(0,r.useEffect)(()=>{window.removeEventListener("scroll",p.current);let e=eG(n);return p.current=()=>{if(null===d.current)return;let{top:t}=d.current.getBoundingClientRect();_(t<e-3),b(t<=e+1)},window.addEventListener("scroll",p.current),()=>window.removeEventListener("scroll",p.current)},[n]);let W=(null==c?void 0:c.name_p)!==void 0?(null==s?void 0:s.name_p)?"в ".concat(null==s?void 0:s.name_p):"в ".concat(null==c?void 0:c.name_p):null,V=10*t.page<g;return(0,i.jsxs)("section",{className:(0,L.Z)(e5().section,l),children:[(0,i.jsx)(v.t,{children:(0,i.jsxs)("p",{className:e5().title,children:["Найдено ",g," ",(0,i.jsx)("span",{className:e5().titleHide,children:(0,eK.s)(g)})," ",W,g===f||0===g?"":"из ".concat(f)]})}),(0,i.jsx)("div",{ref:d,className:(0,L.Z)(e5().filter,e5().newLayout,{[e5().filterBottom]:m}),children:(0,i.jsx)(eZ.p,{chips:P,onChangeIncreaseSort:j,onChangeSortType:N,onClickChip:E,onClickParams:y,sortTypeItems:e$,sortTypeValue:C,isIncreaseSort:x,isMobile:n,isFixed:h})}),(0,i.jsxs)(v.t,{children:[(0,i.jsx)("p",{className:e5().listTitle,ref:u,children:"Предложения рынка кредитов"}),(0,i.jsx)("div",{children:!w&&O.map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(ea,{onDetailInfoClick:Z,className:e5().listItem,data:e,onClick:e6,text:"Подать заявку",detailData:{data:U(e),mainPageUrl:T.u.AUTOCREDIT}},e.url),2===t&&(0,i.jsx)(eq,{className:e5().adv})]},e.id))}),w&&Array.from({length:6},(e,t)=>(0,i.jsx)(eQ.O,{className:e5().listItem},t)),V&&(0,i.jsx)(e3.f,{page:t.page,loading:k,onClick:A}),(0,i.jsx)(e4.i,{tag:"p",className:e1().subtitle,children:t.subtitle})]}),(0,i.jsx)(eo.h,{data:F,isOpen:!!F,onClose:$,mainPageUrl:T.u.AUTOCREDIT})]})};function e9(e){let t=(0,R.b)(e.full_price);return{...e,full_price:t}}async function te(e,t){let{tagUrl:l,regionUrl:n,townUrl:a,limit:i=10,...o}=e,r=function(e){let{limit:t,tagUrl:l,regionUrl:n,townUrl:a,amount:i,firstPayment:o,period:r,loan:s,incomeProof:c,insuranceNeed:u,vehicleState:d,vehicleType:p,stateCoFinancing:v,bank:m,sort:_,order:h,payment:b,page:g,borrower:f}=e,x=new URLSearchParams;return void 0!==t&&x.set("limit",String(t)),void 0!==l&&x.set("tag",l),void 0!==n&&x.set("region",n),void 0!==a&&x.set("town",a),void 0!==i&&x.set(eI.amount,i),void 0!==o&&x.set(eI.firstPayment,String(o)),void 0!==r&&x.set(eI.period,String(r)),void 0!==s&&x.set(eI.loan,s.join(",")),void 0!==c&&x.set(eI.incomeProof,Array.isArray(c)?c.join(","):c),void 0!==u&&x.set(eI.insuranceNeed,u?"1":"0"),void 0!==d&&x.set(eI.vehicleState,d.join(",")),void 0!==p&&x.set(eI.vehicleType,p.join(",")),void 0!==v&&x.set(eI.stateCoFinancing,v?"1":"0"),void 0!==m&&x.set(eI.bank,m.join(",")),void 0!==_&&x.set(eI.sort,_),void 0!==h&&x.set(eI.order,h),void 0!==b&&x.set(eI.payment,b),void 0!==g&&x.set(eI.page,String(g)),void 0!==f&&x.set(eI.borrower,f.join(",")),x.set("archive","0"),x.toString()}({limit:i,regionUrl:n,tagUrl:l,townUrl:a,...o}),{data:s,error:c}=await (0,ew.D)("/money_data/AutoCredits.json?".concat(r),{signal:t});if(c||null===s)throw Error(null!=c?c:"Ошибка загрузки данных");if(void 0!==o.page&&1!==o.page&&0===s.autoCredits.length)throw new eL.dR("Invalid autocredits page: ".concat(o.page));return{offers:s.autoCredits.map(e9),count:s.autoCredits_count,totalCount:s.autoCredits_total_count,title:s.title,subtitle:s.subtitle,description:s.description}}var tt=l(65709),tl=l(32368),tn=l(60007),ta=l(44735);async function ti(){return(await (0,tt.$u)("AutoCredits.json?tags&short=1")).autoCredit_tags.reduce((e,t)=>(t.name!==ta.V4&&e.set(t.url,function(e){let{name:t,url:l,url_redirect:n}=e,a={name:t,url:l},i=(0,tn.d)(n);return void 0!==i&&(a.url_redirect=i),a}(t)),e),new Map)}new tl.$(ti),l(51138),l(21952);var to=l(45752);function tr(e){let{banks:t,layout:l,refererTag:n,description:a,offer:o,posts:r,questions:s,offers:c,offersFinuslugi:u,support:d}=e;return(0,i.jsx)(to.A,{data:l,children:(0,i.jsx)(eS,{offer:o,posts:r,questions:s,description:a,banks:t,refererTag:n,offers:c,offersFinuslugi:u,support:d})})}l(48206);var ts=l(66535),tc={src:"/kredity/assets/_next/static/media/filter.0c02ec9e.svg",height:16,width:16,blurWidth:0,blurHeight:0},tu=l(65594),td=l.n(tu);let tp=(0,r.memo)(e=>{let{count:t,onClickParams:l,onClickShow:n,isLoading:a,className:o}=e;return(0,i.jsxs)("div",{className:(0,L.Z)(td().buttons,o),children:[(0,i.jsx)(s.zx,{variant:"secondary",pending:a,disabled:a,onClick:e=>l(e),iconLeft:(0,i.jsx)(K(),{src:tc,alt:""}),children:"Все параметры"}),(0,i.jsxs)(s.zx,{pending:a,disabled:a,onClick:n,children:["Показать ",t]})]})});tp.displayName="FilterActions";var tv=l(58484),tm=l(91646),t_=l(98028),th=l(7835),tb=l.n(th);let tg=(0,r.memo)(e=>{let{checkedState:t,onChange:l,className:n}=e;return(0,i.jsxs)("ul",{className:(0,L.Z)(tb().wrapper,n),children:[(0,i.jsxs)("li",{className:tb().item,children:[(0,i.jsx)(s.XZ,{className:tb().checkbox,onChange:()=>l("insuranceNeed",!t.insuranceNeed),checked:t.insuranceNeed,value:t.insuranceNeed,label:"Без каско"}),(0,i.jsx)(t_.J,{content:"По закону, каско покупать необязательно, но такая страховка компенсирует вам ущерб, даже если вы виновны в ДТП. Каско можно включить в стоимость кредита.",children:(0,i.jsx)(t_.L,{className:tb().detailIcon})})]}),(0,i.jsxs)("li",{className:tb().item,children:[(0,i.jsx)(s.XZ,{className:tb().checkbox,onChange:()=>l("stateCoFinancing",!t.stateCoFinancing),checked:t.stateCoFinancing,value:t.stateCoFinancing,label:"С господдержкой"}),(0,i.jsx)(t_.J,{content:"Поддержка, при которой часть средств предоставляет государство. Их можно потратить только на автомобили определенных марок.",children:(0,i.jsx)(t_.L,{className:tb().detailIcon})})]}),(0,i.jsx)("li",{children:(0,i.jsx)(s.XZ,{className:tb().checkbox,onChange:()=>l("notFirstPayment",!t.notFirstPayment),checked:t.notFirstPayment,value:t.notFirstPayment,label:"Без первого взноса"})})]})});tg.displayName="AutoCreditsFilterDops";var tf=l(4645),tx=l.n(tf);let tC=(0,r.memo)(e=>{let{activeIds:t=[],items:l,onChange:n,className:a}=e,o=(e,l)=>{n(l?t.filter(t=>String(e)!==t):[...t,String(e)])};return(0,i.jsx)("div",{className:(0,L.Z)(tx().tagsWrapper,a),children:l.map(e=>{let l=t.some(t=>t===e.value);return(0,i.jsx)(s.zx,{className:tx().tag,variant:l?"primary":"secondary",onClick:()=>o(e.value,l),children:e.labelShort},e.value)})})});tC.displayName="AutoCreditsTags";var ty=l(45117),tj=l(86992),tN=l(30715),tk=l.n(tN);let tT=e=>{(0,Y.l)({event:"data-event",eventAction:e,eventCategory:T.u.AUTOCREDIT})},tA=e=>{var t;let l=null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"";tT("click_button_".concat((0,ee.b)(l)))},tS=e=>{let{region:t,town:l,className:n,tag:a,isMobile:o,filter:s,subtitle:c,adFoxConfig:u}=e,{scrollSmooth:d}=(0,e2.vO)(),{count:p,isLoading:v,amount:m,firstPayment:_,vehicleType:h,setVehicleType:b,insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x,setInsuranceNeed:C,setStateCoFinancing:y,setNotFirstPayment:j,handleToggleModal:N,firstPaymentPercent:k,handleChangeFirstPayment:A,handleChangeAmount:S}=s,w=(0,r.useCallback)(e=>{tA(e),N()},[N]),R=(0,r.useCallback)(e=>{tA(e),d({offset:-90})},[d]),I=(0,r.useMemo)(()=>({insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x}),[g,x,f]),D=(0,r.useCallback)((e,t)=>{switch(e){case"insuranceNeed":C(t);break;case"notFirstPayment":j(t),A(t?0:void 0);break;case"stateCoFinancing":y(t)}},[A,C,j,y]);return(0,i.jsxs)("div",{className:(0,L.Z)(n),children:[(0,i.jsxs)("div",{className:tk().pageHeadingWrap,children:[(0,i.jsx)(tv.V,{region:t,town:l,title:a&&"DEFAULT"!==a.tag_name?null==a?void 0:a.name:"Автокредиты",subtitle:c,mainPageUrl:T.u.AUTOCREDIT}),(0,i.jsx)("div",{className:tk().banner,children:(0,i.jsx)(tm.Z,{config:u,params:ty.P3})})]}),(0,i.jsxs)(ts.W2,{className:tk().container,children:[(0,i.jsxs)("div",{className:tk().filter,children:[(0,i.jsxs)("div",{className:tk().fields,children:[(0,i.jsx)(tj.P,{className:tk().field,label:"Сумма кредита",value:m,onChange:S}),(0,i.jsx)(tj.P,{className:tk().field,label:"Первый взнос",value:_,rightLabel:"".concat(k,"%").replace(".",","),caption:k>100?eB:void 0,state:k>100?"error":void 0,onChange:A})]}),!o&&(0,i.jsx)(tp,{count:p,onClickParams:w,onClickShow:R,isLoading:v})]}),(0,i.jsx)(tC,{className:tk().tagsWrapper,items:eP,activeIds:h,onChange:b}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:tk().dopsTitle,children:"Дополнительно"}),(0,i.jsx)(tg,{className:tk().dops,onChange:D,checkedState:I})]}),o&&(0,i.jsx)(tp,{count:p,onClickParams:w,onClickShow:R,isLoading:v})]})]})};var tw=l(7766);let tL=(e,t)=>{(0,Y.l)({event:"data-event",eventAction:T.u.AUTOCREDIT,eventCategory:"filter_catalog",eventLabel:(0,ee.b)(e),eventValue:t})},tR=(e,t)=>{tL(e,(null!=t?t:[]).map(e=>e.label).join(","))};var tI=l(10622),tD=l.n(tI);let tF=e=>{let{filter:t,isMobile:l,bankOptions:n}=e,{handleToggleModal:a,resetFilter:o,amount:c,firstPayment:u,setPeriod:d,period:p,payment:v,incomeProof:m,setIncomeProof:h,vehicleType:b,setVehicleType:g,vehicleState:f,setVehicleState:x,borrower:C,setBorrower:y,loan:j,setLoan:N,banks:k,setBank:A,isLoading:S,insuranceNeed:w,stateCoFinancing:R,setInsuranceNeed:I,setStateCoFinancing:D,setSort:F,sort:M,notFirstPayment:P,setNotFirstPayment:E,firstPaymentPercent:O,handleChangeAmount:U,handleChangeFirstPayment:$,handleChangePayment:B}=t,Z=(0,r.useMemo)(()=>eF.find(e=>e.value===p),[p]),W=(0,r.useMemo)(()=>eD.filter(e=>null==m?void 0:m.includes(e.value)),[m]),V=(0,r.useMemo)(()=>eM.filter(e=>null==b?void 0:b.includes(e.value)),[b]),z=(0,r.useMemo)(()=>eE.filter(e=>null==f?void 0:f.includes(e.value)),[f]),q=(0,r.useMemo)(()=>eO.filter(e=>null==C?void 0:C.includes(e.value)),[C]),Q=(0,r.useMemo)(()=>eU.filter(e=>null==j?void 0:j.includes(e.value)),[j]),J=(0,r.useMemo)(()=>n.filter(e=>null==k?void 0:k.includes(Number(e.value))),[n,k]),X=(0,r.useCallback)(()=>{a(),(0,H.l)(_.Tm,{offset:l?0:-140,position:"top"})},[a,l]),{handleChangePeriod:G,handleChangeIncomeProf:K,handleChangeVehicleType:Y,handleChangeVehicleState:ee,handleChangeBorrower:et,handleChangeLoan:el,handleChangeBanks:en}=(0,r.useMemo)(()=>({handleChangePeriod:e=>{d(null==e?void 0:e.value),tR("Срок",eF)},handleChangeIncomeProf:e=>{var t;h(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Подтверждение дохода",e)},handleChangeVehicleType:e=>{var t;g(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Тип транспорта",e)},handleChangeVehicleState:e=>{var t;x(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Состояние транспорта",e)},handleChangeBorrower:e=>{var t;y(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Категория заемщикаа",e)},handleChangeLoan:e=>{var t;N(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Обеспечение",e)},handleChangeBanks:e=>{var t;A(null!==(t=null==e?void 0:e.map(e=>Number(e.value)))&&void 0!==t?t:[]),tR("Банки",e)}}),[A,y,h,N,d,x,g]),ea=(0,r.useMemo)(()=>({insuranceNeed:w,stateCoFinancing:R,notFirstPayment:P}),[w,P,R]),ei=(0,r.useCallback)((e,t)=>{switch(e){case"insuranceNeed":I(t);break;case"notFirstPayment":E(t);break;case"stateCoFinancing":D(t)}},[I,E,D]);return(0,i.jsx)(tw.D,{count:t.count,isMobile:l,isOpen:t.isOpenModal,pageUrl:T.u.AUTOCREDIT,title:"Все параметры",onCLickShow:X,onClose:a,onClickReset:o,isLoading:S,children:(0,i.jsxs)("div",{className:tD().wrapper,children:[(0,i.jsxs)("div",{className:tD().fields,children:[(0,i.jsx)(tj.P,{className:tD().field,label:"Сумма кредита",value:c,onChange:U}),(0,i.jsx)(tj.P,{label:"Первый взнос",value:u,rightLabel:"".concat(O,"%").replace(".",","),caption:O>100?eB:void 0,state:O>100?"error":void 0,onChange:$}),(0,i.jsx)(s.Ph,{value:Z,onChange:G,label:"Срок",optionValue:"value",optionLabel:"label",options:eF}),(0,i.jsx)(tj.P,{label:"Ежемесячный платеж до",value:v,onChange:B}),(0,i.jsx)(s.Ph,{value:W.length>0?W:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,onChange:K,multiple:!0,label:"Подтверждение дохода",optionValue:"value",optionLabel:"label",options:eD}),(0,i.jsx)(s.Ph,{value:V.length>0?V:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:Y,optionValue:"value",optionLabel:"label",label:"Тип транспорта",options:eM}),(0,i.jsx)(s.Ph,{value:z.length>0?z:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:ee,optionValue:"value",optionLabel:"label",label:"Состояние транспорта",options:eE}),(0,i.jsx)(s.Ph,{value:q.length>0?q:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,optionValue:"value",optionLabel:"label",onChange:et,label:"Категория заемщика",options:eO}),(0,i.jsx)(s.Ph,{value:Q.length>0?Q:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,optionValue:"value",optionLabel:"label",onChange:el,label:"Обеспечение",options:eU}),(0,i.jsx)(s.Ph,{value:J.length>0?J:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:en,optionValue:"value",optionLabel:"label",label:"Банки",options:n})]}),(0,i.jsxs)("div",{className:tD().checkboxWrapper,children:[(0,i.jsx)("p",{className:tD().title,children:"Дополнительно:"}),(0,i.jsx)(tg,{className:tD().dops,checkedState:ea,onChange:ei}),(0,i.jsx)("p",{className:(0,L.Z)(tD().title,tD().titleSort),children:"Сортировать"}),e$.map(e=>(0,i.jsx)(s.Y8,{label:e.label,name:e.value,value:e.value,checked:e.value===M,onChange:()=>F(e.value)},e.value))]})]})})};async function tM(e,t,l){let n=new URLSearchParams;n.set("tag_url",e),void 0!==t&&n.set("region",t),void 0!==l&&n.set("town",l);let{data:a,error:i}=await (0,ew.D)("/money_data/AutoCreditRegion.json?".concat(n));if(i||null===a)throw Error(null!=i?i:"Ошибка загрузки данных");return{...a,posts:(0,eR.yb)(a.posts)}}var tP=l(91886);async function tE(e){let t=await (0,tt.$u)("AutoCredits.json?".concat("url","=").concat(encodeURIComponent(e)));if(1!==t.length)throw new eL.dR("AutoCredits tag not found: ".concat(e));return function(e){let{url:t,name:l,tag_name:n,text:a,filter:i,default:o,region_page:r}=e,s={url:t,name:l,tag_name:n,text:a,filter:i,default:o};if(null!==r){let{region_titles:e,town_titles:t,region_content:l,town_content:n}=r;s.region_page={region_titles:e,town_titles:t,region_content:l,town_content:n}}return s}(t[0])}new tl.n(tE);let tO=(e,t)=>{var l,n,a,i,o,r,s;let c=(0,eb.p)(e),{page:u}=c,d=String(null!==(n=null!==(l=c.amount)&&void 0!==l?l:null==t?void 0:t.filter.amount)&&void 0!==n?n:""),p=String(null!==(i=null!==(a=c.first_payment)&&void 0!==a?a:null==t?void 0:t.filter.first_payment)&&void 0!==i?i:""),v=String(null!==(r=null!==(o=c.period)&&void 0!==o?o:null==t?void 0:t.filter.period)&&void 0!==r?r:""),m=String(null!==(s=c.payment)&&void 0!==s?s:""),_=null==t?void 0:t.default;return{amount:d&&!isNaN(+d)?d:void 0,firstPayment:p&&!isNaN(+p)?p:void 0,period:v&&!isNaN(+v)?+v:void 0,payment:m&&!isNaN(+m)?m:void 0,vehicleType:void 0,vehicleState:!_&&(null==t?void 0:t.filter.vehicle_state)?t.filter.vehicle_state:void 0,borrower:void 0,loan:!_&&(null==t?void 0:t.filter.loans)?t.filter.loans:void 0,insuranceNeed:_||(null==t?void 0:t.filter.insurance)===void 0?void 0:(null==t?void 0:t.filter.insurance)===1,stateCoFinancing:_||(null==t?void 0:t.filter.state_co_financing)===void 0?void 0:(null==t?void 0:t.filter.state_co_financing)===1,incomeProof:!_&&(null==t?void 0:t.filter.proof_income)?t.filter.proof_income:void 0,page:Number(u)||1}},tU=(e,t)=>{if(isNaN(e)||isNaN(t)||0===e||0===t)return 0;let l=Number(t)/(Number(e)/100);return Number.isInteger(l)||(l=Number(l.toFixed(5))),l};var t$=l(30292);let tB=e=>{var t,l,n,a;let{region:i,tag:o,town:s,init:c}=e,{asPath:u}=(0,eh.useRouter)(),d=(0,r.useMemo)(()=>tO(u,o),[u,o]),p=(0,r.useRef)(null),[v,m]=(0,r.useState)(void 0!==d.amount?Number(d.amount):void 0),[_,h]=(0,r.useState)(void 0!==d.firstPayment?Number(d.firstPayment):void 0),[b,g]=(0,r.useState)(void 0!==d.payment?Number(d.payment):void 0),f=tU(null!=v?v:0,null!=_?_:0),x=v&&v>0?(0,Z.z)(null!=f?f:0,1):0,{query:C}=(0,eh.useRouter)(),[y,j]=(0,r.useState)(Number(C.page)||1),[N,k]=(0,r.useState)(c.title),[T,A]=(0,r.useState)(c.subtitle),[S,w]=(0,r.useState)(c.description),[L,R]=(0,r.useState)(!1),[I,D]=(0,r.useState)(!1),[F,M]=(0,r.useState)(null!==(t=c.count)&&void 0!==t?t:0),[P,E]=(0,r.useState)(null!==(l=c.count)&&void 0!==l?l:0),[O,U]=(0,r.useState)(!1),[$,B]=(0,r.useState)(null!==(n=c.list)&&void 0!==n?n:[]),[W,V]=(0,r.useState)(d.period),[H,z]=(0,r.useState)(d.vehicleType),[q,Q]=(0,r.useState)(d.vehicleState),[J,X]=(0,r.useState)(d.borrower),[G,K]=(0,r.useState)(d.loan),[Y,ee]=(0,r.useState)([]),[et,el]=(0,r.useState)(d.insuranceNeed),[en,ea]=(0,r.useState)(d.stateCoFinancing),[ei,eo]=(0,r.useState)(e$[0].value),[er,es]=(0,r.useState)(!1),[ec,eu]=(0,r.useState)(null!==(a=null==o?void 0:o.filter.proof_income)&&void 0!==a?a:void 0),[ed,ep]=(0,r.useState)(!1),ev=(0,r.useRef)(!0),em=(0,r.useCallback)(()=>{U(e=>!e)},[]),e_=(0,r.useCallback)(async e=>{var t,l,n,a,r,c;p.current&&p.current.abort(),p.current=new AbortController;let u={amount:void 0!==v?String(v):"",firstPayment:void 0!==v?f:void 0,period:W,loan:G,incomeProof:ec,insuranceNeed:et,stateCoFinancing:en,vehicleState:q,vehicleType:H,bank:Y,order:ed?"desc":"asc",sort:ei,payment:void 0!==b?String(b):void 0,borrower:J};e>1?(u.page=e,D(!0)):R(!0);let d=await te({tagUrl:null==o?void 0:o.url,regionUrl:null==i?void 0:i.url,townUrl:null==s?void 0:s.url,...u},p.current.signal),m=null!==(t=null==d?void 0:d.offers)&&void 0!==t?t:[],_=null!==(l=null==d?void 0:d.title)&&void 0!==l?l:"",h=null!==(n=null==d?void 0:d.subtitle)&&void 0!==n?n:"",g=null!==(a=null==d?void 0:d.description)&&void 0!==a?a:"";M(null!==(r=null==d?void 0:d.count)&&void 0!==r?r:0),E(null!==(c=null==d?void 0:d.totalCount)&&void 0!==c?c:0),k(_),A(h),w(g),B(t=>e>1?[...t,...m]:m),D(!1),R(!1)},[v,Y,J,f,ec,ed,et,G,b,W,i,ei,en,o,s,q,H]),eb=(0,r.useCallback)(()=>{j(e=>{let t=e+1;return e_(t),t})},[e_]),eg=(0,r.useCallback)(e=>{m(void 0!==e&&0!==e?Math.abs(e):void 0)},[]),ef=(0,r.useCallback)(e=>{h(void 0!==e&&0!==e?Math.abs(e):void 0)},[]),ex=(0,r.useCallback)(e=>{g(void 0!==e&&0!==e?Math.abs(e):void 0)},[]);(0,r.useEffect)(()=>{eg(void 0!==d.amount?Number(d.amount):void 0),ef(void 0!==d.firstPayment?Number(d.firstPayment):void 0),ex(void 0!==d.payment?Number(d.payment):void 0),z(d.vehicleType),Q(d.vehicleState),V(d.period),X(d.borrower),K(d.loan),el(d.insuranceNeed),ea(d.stateCoFinancing),eu(d.incomeProof)},[d.amount,d.borrower,d.firstPayment,d.incomeProof,d.insuranceNeed,d.loan,d.payment,d.period,d.stateCoFinancing,d.vehicleState,d.vehicleType,eg,ef,ex,o]),(0,r.useEffect)(()=>{es(0===_)},[_]);let eC=(0,r.useCallback)(()=>{m(void 0),h(void 0),g(void 0),V(void 0),B([]),z(void 0),Q(void 0),X(void 0),K(void 0),ee([]),el(void 0),ea(void 0),eu(void 0),ep(!1)},[]);return(0,t$.b)(()=>{ev.current?ev.current=!1:e_(y)},[e_],300),{isLoading:L,isPageLoading:I,title:N,subtitle:T,description:S,handleLoadMore:eb,autoCredits:$,count:F,totalCount:P,page:y,period:W,setPeriod:V,amount:v,firstPayment:_,isOpenModal:O,setIsOpenModal:U,vehicleType:H,setVehicleType:z,insuranceNeed:et,stateCoFinancing:en,setInsuranceNeed:el,setStateCoFinancing:ea,handleToggleModal:em,resetFilter:eC,payment:b,incomeProof:ec,setIncomeProof:eu,vehicleState:q,setVehicleState:Q,borrower:J,setBorrower:X,loan:G,setLoan:K,banks:Y,setBank:ee,sort:ei,setSort:eo,increaseSort:ed,setIncreaseSort:ep,notFirstPayment:er,setNotFirstPayment:es,firstPaymentPercent:x,handleChangeFirstPayment:ef,handleChangeAmount:eg,handleChangePayment:ex}};var tZ=l(61929),tW=l(77624),tV=l(93259),tH=l(42968),tz=l(23259),tq=l(30942),tQ=l(423),tJ=l(97299),tX=l(2101),tG=l(62855),tK=l(23652);let tY=(0,r.memo)(e=>{let t=function(e){let{name:t,description:l,offers:n,offersCount:a}=e,{mainBaseUrl:i}=(0,ed.ZR)(),{asPath:o}=(0,eh.useRouter)();if(0===n.length)return;let r=(0,tJ.Q)({url:"".concat(i).concat(o),priceCurrency:"RUB",offers:n,getLowPrice:e=>{let{amount:t}=e;return""!==t.from?Number(t.from):1e4},getHighPrice:e=>{let{amount:t}=e;return void 0!==t.to&&""!==t.to?Number(t.to):void 0},offerCount:a});return(0,tG.t)({name:t,description:l,image:"".concat(i).concat(tQ.oQ),offers:r,aggregateRating:(0,tX.n)({ratingValue:4.9,reviewCount:1945,bestRating:5,worstRating:1})})}(e);return void 0===t?null:(0,i.jsx)(tK.V,{schema:t})});tY.displayName="AutoCreditOffersSchema";var t0=l(93890),t1=l(12261),t2=l(27480),t4=l(30975),t3=l(38090),t8=l(78575),t5=l(91500),t6=l(97647),t7=l.n(t6);let t9=e=>{var t;let l=(null==e?void 0:null===(t=e.currentTarget)||void 0===t?void 0:t.textContent)?(0,ee.b)(e.currentTarget.textContent):"glavnaya";(0,Y.l)({event:"data-event",eventAction:"click_link_".concat(l),eventCategory:T.u.AUTOCREDIT})},le=[(0,i.jsx)(r.Fragment,{children:"Используйте фильтры для указания желаемых параметров: суммы, срока и формы выдачи"},0),(0,i.jsx)(r.Fragment,{children:"Изучите и выберите подходящее предложение"},1),(0,i.jsx)(r.Fragment,{children:"Перейдите к оформлению"},2),(0,i.jsx)(r.Fragment,{children:"Заполните анкету, дождитесь одобрения и получите деньги любым удобным для вас способом"},3)],lt=e=>{var t,l,n,a,o,c,d;let{offers:m,count:_,tag:h,tags:b,townDublicates:g,posts:f,regions:x,banks:C,title:y,subtitle:j,description:N,expertQuote:k,support:A}=e,S=(0,ex.S0)(),{region:w,town:R}=(0,ep.T)(),[I,D]=(0,r.useState)(k),{asPath:F}=(0,eh.useRouter)(),M=null!==(l=null===(t=F.split("/").find(e=>e.includes("teg_")))||void 0===t?void 0:t.slice(4))&&void 0!==l?l:"DEFAULT",P=function(e,t){let[l,n]=(0,r.useState)(e);return(0,tP.rf)(()=>{(0,tt.m6)("autocredits/tag?".concat("url","=").concat(t)).then(n)},[n,t]),l}(h,M),E=function(e,t,l,n){let[a,i]=(0,r.useState)(e);return(0,tP.rf)(()=>{tM(t,l,n).then(e=>{let{posts:t}=e;return i(t)})},[t,l,n]),a}(f,M,null==w?void 0:w.url,null==R?void 0:R.url),O=tB({region:w,town:R,tag:P,init:{count:_,list:m,subtitle:j,title:y,description:N}}),U=(0,t1.iN)(F);(0,tP.rf)(()=>{(0,t3.r5)(U).then(D)},[U]);let $=(0,tz.I)(),B=(0,tq.U)(),Z=(0,r.useMemo)(()=>(0,tW.n)(C,O.banks),[C,O.banks]),{mainBaseUrl:W}=(0,ed.ZR)(),V=P&&"DEFAULT"!==P.tag_name?null==P?void 0:P.name:"Автокредиты",H=(null==R?void 0:R.name_p)||(null==w?void 0:w.name_p)?" в ".concat((null==R?void 0:R.name_p)||(null==w?void 0:w.name_p)):"",z="".concat((null==w?void 0:w.url)?"/reg_".concat(null==w?void 0:w.url):"").concat((null==R?void 0:R.url)?"/".concat(null==R?void 0:R.url):""),q=(()=>{let e=P&&"DEFAULT"!==P.tag_name?',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(V).concat(H,'","item":"').concat(W).concat(F,'"}'):"",t='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(W,'"}'),l='{"@type":"ListItem","position":2,"name":"Автокредиты'.concat(H,'","item":"').concat(W,"/").concat(T.u.AUTOCREDIT).concat(z,'"}');return"{".concat('"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":['.concat(t),",").concat(l).concat(e,"]}")})(),Q=(0,r.useMemo)(()=>{let e=[];e.push(...(0,t5.a)(T.u.AUTOCREDIT,x,P,w,R,{nominativeCase:"Автокредиты",genitiveCase:"автокредитов"}));let t=b.reduce((e,t)=>{if(void 0===t.url_redirect){let l=(0,tH.h)(T.u.AUTOCREDIT,t,w,R),n=(0,t0.q9)(l,t.name);e.push(n)}return e},[]);if(e.push({title:"Виды автокредитов",text:(0,i.jsx)(t0.oP,{children:t})}),w){var l,n;e.push(...null!==(n=null===(l=P.region_page)||void 0===l?void 0:l.town_content.map(e=>({title:(0,tV.Q)(e.title,w,R,g,void 0,P),text:(0,tV.Q)(e.content.map(tZ.Rp).join(""),w,R,g,void 0,P)})))&&void 0!==n?n:[])}else e.push(...P.text.map(e=>({title:(0,tV.Q)(e.title,w,R,g,void 0,P),text:(0,tV.Q)(e.content.map(tZ.Rp).join(""),w,R,g,void 0,P)})));return e},[w,b,x,P,R,g]);return(0,i.jsxs)("main",{className:t7().page,children:[(0,i.jsx)(p.N,{title:null!==(n=O.title)&&void 0!==n?n:"",description:null!==(a=O.description)&&void 0!==a?a:""}),(0,i.jsx)(ey.o,{}),(0,i.jsx)("div",{className:(0,L.Z)(t7().background,"bg-".concat(B))}),(0,i.jsx)("div",{className:t7().navigationWrapper,children:(0,i.jsxs)(v.t,{children:[(0,i.jsx)(s.Oo,{className:t7().breadcrumbs,items:(()=>{let e=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(H),href:"/".concat(T.u.AUTOCREDIT).concat(z)}];return"DEFAULT"!==M&&e.push({label:"".concat(V).concat(H),href:"/".concat(T.u.AUTOCREDIT,"/teg_").concat(M).concat(z)}),e.pop(),e.push({label:"".concat(V).concat((null==P?void 0:P.default)?H:"")}),e})(),onClick:t9}),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:q}})]})}),(0,i.jsx)(v.t,{children:(0,i.jsx)(tS,{region:null!=w?w:null,town:null!=R?R:null,isMobile:S,tag:P,filter:O,subtitle:null!==(o=O.subtitle)&&void 0!==o?o:"",adFoxConfig:$})}),(0,i.jsx)(e7,{banks:C,bankOptions:Z,filter:O,isMobile:S,town:R,region:w}),(0,i.jsx)(tY,{name:null!==(c=O.title)&&void 0!==c?c:"",description:null!==(d=O.description)&&void 0!==d?d:"",offers:O.autoCredits,offersCount:_}),(0,i.jsx)(t2.C,{steps:le,variant:"secondary"}),void 0!==I&&(0,i.jsx)(t8.c,{quote:I}),(0,i.jsx)(t4.n,{type:"bank"}),(0,i.jsx)(ek.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,i.jsx)(u(),{...e}),dataLayerPush:Y.l,questions:Q,eventCategory:"cards_support_block",href:"".concat(W,"/help"),checkAllText:"Читать все вопросы про автокредиты"}),(0,i.jsx)(tF,{bankOptions:Z,isMobile:S,filter:O}),E.length>0&&(0,i.jsx)(ej.t,{posts:E,eventCategory:T.u.AUTOCREDIT}),(0,i.jsx)(eN.B,{value:A})]})};function ll(e){let{layout:t,root:l,banks:n,offers:a,posts:o,tags:r,tag:s,expertQuote:c,support:u}=e;return(0,i.jsx)(to.A,{data:t,withLocationConfirm:!0,children:(0,i.jsx)(lt,{regions:l.regions,townDublicates:l.town_dublicates,banks:n,posts:o,description:a.description,offers:a.offers,count:a.count,tags:r,tag:s,totalCount:a.totalCount,title:a.title,subtitle:a.subtitle,expertQuote:null!=c?c:void 0,support:u})})}l(35388),l(45522);var ln=l(28254),la=l(80330),li=!0,lo=(0,r.memo)(function(e){var t,l;return(0,i.jsx)(o.sM,{children:e.isShowcase?(0,i.jsx)(ln.p,{region:null!==(t=e.region)&&void 0!==t?t:void 0,town:null!==(l=e.town)&&void 0!==l?l:void 0,children:(0,i.jsx)(ll,{...e})}):(0,i.jsx)(la.M,{children:(0,i.jsx)(tr,{...e})})})})},73654:function(e){e.exports={logo:"AutoCreditListItem_logo__KzLbz",placeholderLogo:"AutoCreditListItem_placeholderLogo__9xMXP"}},65594:function(e){e.exports={buttons:"FilterActions_buttons__M1NwR"}},5257:function(e){e.exports={filter:"ListFilter_filter__VuF60",newSortRadiosFilter:"ListFilter_newSortRadiosFilter__kKfmj",sortTypeDesktop:"ListFilter_sortTypeDesktop__5LQyN",container:"ListFilter_container__nvtCN",modal:"ListFilter_modal__3ZmvQ",newSortRadioModal:"ListFilter_newSortRadioModal__vNMpD",modalButton:"ListFilter_modalButton__d5V_n",chipsContainer:"ListFilter_chipsContainer__tfgri",actionsWrapper:"ListFilter_actionsWrapper__m04h1",action:"ListFilter_action__WggMr",actionText:"ListFilter_actionText__11VOZ",iconButton:"ListFilter_iconButton__9o3Q7",actionButton:"ListFilter_actionButton__I4ohH",icon:"ListFilter_icon__RsoyT",iconInverted:"ListFilter_iconInverted__1MkEe",stuck:"ListFilter_stuck___Ya2T",mainContainer:"ListFilter_mainContainer__Lb5um",chipsContainerClosed:"ListFilter_chipsContainerClosed__TNa0t"}},30082:function(e){e.exports={wrap:"Dropdown_wrap__22_5K",newSortRadioWrap:"Dropdown_newSortRadioWrap__N83gl",content:"Dropdown_content__zkeB8"}},58177:function(e){e.exports={sortTypeContainer:"SortRadios_sortTypeContainer__8lU5M",newSortRadioSortTypeContainer:"SortRadios_newSortRadioSortTypeContainer__xY7lM",divider:"SortRadios_divider__P8JRR",sortType:"SortRadios_sortType__Ad5sp",sortTypeRadio:"SortRadios_sortTypeRadio__jVmAH",sortTypeTooltip:"SortRadios_sortTypeTooltip__JJNbc",sortTypeTrigger:"SortRadios_sortTypeTrigger__BgRzq",sortTypeHead:"SortRadios_sortTypeHead__VdaJc",newSortRadioSortTypeHead:"SortRadios_newSortRadioSortTypeHead__xKHHj",sortTypeButton:"SortRadios_sortTypeButton__UY3Mp",newSortRadioSortTypeButton:"SortRadios_newSortRadioSortTypeButton__wpRlC"}},41172:function(e){e.exports={wrapper:"OsagoAd_wrapper__MOwoz",bg:"OsagoAd_bg__m4rki",bgDesktop:"OsagoAd_bgDesktop__13CJL",bgMobile:"OsagoAd_bgMobile__4zRc9",button:"OsagoAd_button__2LK3h"}},83226:function(e){e.exports={title:"RegionTitle_title__ouhKs",link:"RegionTitle_link__r_rJV",titleWrapper:"RegionTitle_titleWrapper__yuBaG",newTitle:"RegionTitle_newTitle__SeVuV",subtitle:"RegionTitle_subtitle__T8Ha1"}},56381:function(e){e.exports={page:"AutoCreditDetail_page__jr_3y",supportSection:"AutoCreditDetail_supportSection__7506m",breadcrumbs:"AutoCreditDetail_breadcrumbs__XrqGb",about:"AutoCreditDetail_about__5FUQp"}},5753:function(e){e.exports={container:"AutoCreditApplySteps_container__wmZpQ"}},21172:function(e){e.exports={container:"AutoCreditInfo_container__GOscQ",containerFull:"AutoCreditInfo_containerFull__Vw68s",promo:"AutoCreditInfo_promo__Qx6R9",left:"AutoCreditInfo_left__vBExI",right:"AutoCreditInfo_right__xYmGT",qrDesc:"AutoCreditInfo_qrDesc__u6mDR",qrMobile:"AutoCreditInfo_qrMobile__lHKp1",typeDescription:"AutoCreditInfo_typeDescription__5QoBb"}},5569:function(e){e.exports={title:"AutoCreditsList_title__kiemn",offersListContainer:"AutoCreditsList_offersListContainer__44vNc",listTitle:"AutoCreditsList_listTitle__fP1nX",container:"AutoCreditsList_container__aH3my",listItem:"AutoCreditsList_listItem__Y0xBf"}},97647:function(e){e.exports={page:"AutoCredits_page__EqZNI",sectionWrapper:"AutoCredits_sectionWrapper__QwfNp",breadcrumbs:"AutoCredits_breadcrumbs__3OKah",adFox:"AutoCredits_adFox__W0ah4",background:"AutoCredits_background__EAWXM"}},30715:function(e){e.exports={pageHeadingWrap:"AutoCreditsFilter_pageHeadingWrap__HPOkm",banner:"AutoCreditsFilter_banner___JorH",container:"AutoCreditsFilter_container__TTHj_",filter:"AutoCreditsFilter_filter__Z6nkX",fields:"AutoCreditsFilter_fields__CUFW0",field:"AutoCreditsFilter_field__YsbeF",fieldIcon:"AutoCreditsFilter_fieldIcon__JjqAx",tagsWrapper:"AutoCreditsFilter_tagsWrapper__AxhCb",tag:"AutoCreditsFilter_tag__LGfem",dopsTitle:"AutoCreditsFilter_dopsTitle__SLwD5",dops:"AutoCreditsFilter_dops__31hQ1"}},7835:function(e){e.exports={wrapper:"AutoCreditsFilterDops_wrapper__8_0qa",checkbox:"AutoCreditsFilterDops_checkbox__8RLWl",item:"AutoCreditsFilterDops_item__GdL_E",detailIcon:"AutoCreditsFilterDops_detailIcon__lVAWv"}},10622:function(e){e.exports={fields:"AutoCreditsFilterModal_fields__bbPf2",checkboxWrapper:"AutoCreditsFilterModal_checkboxWrapper__LkTSZ",title:"AutoCreditsFilterModal_title__lcyEu",titleSort:"AutoCreditsFilterModal_titleSort__5yrZq",dops:"AutoCreditsFilterModal_dops__qbJ_a",wrapper:"AutoCreditsFilterModal_wrapper__WSPtT"}},10034:function(e){e.exports={title:"AutoCreditsList_title__FbtDC",listTitle:"AutoCreditsList_listTitle__UHGag",section:"AutoCreditsList_section__kDivH",titleHide:"AutoCreditsList_titleHide__AV_Pr",filter:"AutoCreditsList_filter__2OHf2",filterBottom:"AutoCreditsList_filterBottom__1_rnT",newLayout:"AutoCreditsList_newLayout__SXcV7",subtitle:"AutoCreditsList_subtitle__SiUJT",listItem:"AutoCreditsList_listItem__8sUMu",adv:"AutoCreditsList_adv__2T4FG",listContainer:"AutoCreditsList_listContainer__2BZk8","finkit-container--narrow":"AutoCreditsList_finkit-container--narrow__ziFs_"}},4645:function(e){e.exports={tagsWrapper:"AutoCreditsTags_tagsWrapper___62bH",tag:"AutoCreditsTags_tag__KsRe2"}},50586:function(e){e.exports={title:"styles_title__cObN3",list_wrap:"styles_list_wrap__z3_y1",content:"styles_content__tWscR",sort_content:"styles_sort_content__tPWO7",right_block:"styles_right_block__XypvM",viewed_offers_toggle:"styles_viewed_offers_toggle__C0ym7",subtitle:"styles_subtitle__RcERK",sort_label:"styles_sort_label__faPeq",dropdown_wrapper:"styles_dropdown_wrapper__Aj2XD"}},83343:function(e,t,l){"use strict";l.d(t,{c:function(){return c}});var n=l(85893),a=l(66535),i=l(86010),o=l(67294);let r=(0,l(84941).g)("expert-quote","sc"),s=Object.freeze({expertQuote:r,wrapper:`${r}__wrapper`,title:`${r}__title`,card:`${r}__card`,content:`${r}__content`,aboutText:`${r}__aboutText`,about:`${r}__about`,img:`${r}__img`,name:`${r}__name`,position:`${r}__position`,text:`${r}__text`}),c=(0,o.memo)(({className:e,quote:t})=>(0,n.jsx)("section",{className:(0,i.Z)(s.wrapper,e),children:(0,n.jsxs)(a.W2,{children:[(0,n.jsx)(a.X6,{as:"h2",type:"display",weight:"bold",className:(0,i.Z)(s.title,"mb-6"),children:"Мнение эксперта"}),(0,n.jsx)("div",{className:s.card,children:(0,n.jsxs)("div",{className:s.content,children:[(0,n.jsxs)("div",{className:s.about,children:[t.expert.photo&&(0,n.jsx)("a",{href:t.expert.url,children:(0,n.jsx)("div",{className:s.img,style:{backgroundImage:`url(${t.expert.photo})`}})}),(0,n.jsxs)("div",{className:s.aboutText,children:[(0,n.jsx)("a",{href:t.expert.url,className:s.name,children:t.expert.name}),(0,n.jsx)("p",{className:s.position,children:t.expert.position})]})]}),(0,n.jsx)("p",{className:s.text,dangerouslySetInnerHTML:{__html:t.content}})]})})]})}));c.displayName="ExpertQuote"},29329:function(e,t,l){"use strict";l.d(t,{t:function(){return N}});var n=l(85893),a=l(66535),i=l(34588),o=l(86010),r=l(67294),s=l(43803),c=l(81069),u=l(59194),d=l(84941);let p=(0,d.g)("check-all","sc"),v=Object.freeze({wrapper:`${p}__wrapper`,link:`${p}__link`,icon:`${p}__icon`,iconGray:`${p}__icon--gray`}),m=({children:e,className:t,linkClassName:l,iconGrayBackground:a,Link:r,event:s,href:c,dataLayerPush:d})=>{let p=r??i.rU;return(0,n.jsx)("div",{className:(0,o.Z)(v.wrapper,t),onClick:()=>{s&&d(s)},children:(0,n.jsxs)(p,{className:(0,o.Z)(v.link,l),href:c,children:[e,(0,n.jsx)("span",{className:(0,o.Z)(v.icon,{[v.iconGray]:a}),children:(0,n.jsx)(u.IconFdsArrowUpRightSmallO,{size:24})})]})})},_=e=>{if(!e||!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e))return"";let t=new Date(e.replace(" ","T"));if(isNaN(t.getTime()))return"";let l=t.getDate(),n=t.getMonth();return`${l} ${["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"][n]}`},h=e=>!!e&&/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e),b=(0,d.g)("subscribe-block","sc"),g=Object.freeze({block:`${b}__block`,title:`${b}__title`,form:`${b}__form`,input:`${b}__input`,button:`${b}__button`,checkbox:`${b}__checkbox`,checkboxLabel:`${b}__checkbox-label`,success:`${b}__success`,error:`${b}__error`}),f=({data:e,eventCategory:t})=>{var l,a,c,u;let[d,p]=(0,r.useState)(!1),[v,m]=(0,r.useState)(!1),[_,b]=(0,r.useState)(""),[f,x]=(0,r.useState)(""),[C,y]=(0,r.useState)(!1),[j,N]=(0,r.useState)(!1),[k,T]=(0,r.useState)(!1),A=(null==e?void 0:e.title)||"Подписка на рассылку",S=(null==(l=null==e?void 0:e.params)?void 0:l.inputPlaceholder)||"Электронная почта",w=!v&&!_;return(0,n.jsxs)("div",{className:(0,o.Z)(g.block),children:[(0,n.jsx)("div",{className:g.title,children:A}),w&&(0,n.jsxs)("div",{className:g.form,children:[(0,n.jsx)(i.MA,{className:g.input,label:S,variant:"secondary",size:"s",value:f,onChange:e=>{C&&y(!(h(e)||!e)),x(e)},onClick:()=>{(0,s.h)({eventCategory:t,eventActionType:s.D.block,eventActionText:S})},state:C?"error":void 0,caption:C?"Неверный e-mail":void 0}),(0,n.jsx)(i.zx,{className:g.button,label:(null==(a=null==e?void 0:e.buttons)?void 0:a.tile)||"Подписаться",style:{background:null==(c=null==e?void 0:e.buttons)?void 0:c.background},size:"xs",onClick:()=>{var l;(0,s.h)({eventCategory:t,eventActionType:s.D.button,eventActionText:(null==(l=null==e?void 0:e.buttons)?void 0:l.tile)||"Подписаться"}),y(!h(f)),T(!j),h(f)&&j&&(p(!0),fetch("https://forms.dashamail.ru/subscribe.php?list_id=56713Embedded",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({merge_:f})}).then(e=>{!e||200===e.status||e.ok?(window.localStorage.setItem("subscribed","1"),m(!0)):b(409===e.status?'Кажется, вы уже подписаны на нашу рассылку. Если письма не приходят, рекомендуем обратиться в поддержу по телефону <span class="nowrap">8\xa0800\xa0505-32-32</span>.':401===e.status?"Неверный формат e-mail адреса":"Возникла ошибка, повторите попытку позднее")}).catch(()=>b("Возникла ошибка, повторите попытку позднее")))},disabled:C,pending:d}),(0,n.jsx)(i.XZ,{className:g.checkbox,checked:j,onChange:e=>{(0,s.d)({eventCategory:t,eventAction:"click_check_box_soglashenie_blok_check_box_soglashenie"}),k&&T(!1),N(e)},state:k?"error":"default",children:(0,n.jsx)("span",{className:g.checkboxLabel,dangerouslySetInnerHTML:{__html:(null==(u=null==e?void 0:e.params)?void 0:u.agreement)||'Я принимаю <a href="https://assets.finuslugi.ru/mp-assets/privacy-policy.pdf">условия политики</a> обработки моих данных и даю <a href="https://assets.finuslugi.ru/mp-assets/privacy-policy.pdf">согласие</a> ПАО Московская биржа на их обработку'},onClick:e=>{let l=e.target;if(!(null!=l&&l.href))return;let n=l.textContent||"";n.includes("условия")&&(n="politiki_obrabotki_personalnyh_dannyh_pao_moskovskaya_birzha"),n.includes("согласие")&&(n="dayu_soglasie_na_obrabotku_pao_moskovskaya_birzha_moih_personalnyh_dannyh"),(0,s.h)({eventCategory:t,eventActionType:s.D.link,eventActionText:n,eventLabel:l.href})}})})]}),v&&(0,n.jsx)("div",{className:g.success,children:"Подтвердите подписку по ссылке, отправленной на указанную электронную почту."}),_&&(0,n.jsx)("div",{className:g.error,dangerouslySetInnerHTML:{__html:_}})]})},x=(0,d.g)("journal","sc"),C=Object.freeze({wrapper:`${x}__wrapper`,title:`${x}__title`,subtitle:`${x}__subtitle`,scrollableWrapper:`${x}__scrollable-wrapper`,chipsWrapper:`${x}__chips-wrapper`,sliderWrapper:`${x}__slider-wrapper`,slider:`${x}__slider`,sliderItem:`${x}__slider-item`,fixed:`${x}__slider-item--fixed`,article:`${x}__article`,imgWrapper:`${x}__img-wrapper`,articleBody:`${x}__article-body`,articleTitle:`${x}__article-title`,articleDate:`${x}__article-date`,checkAllLink:`${x}__check-all-link`}),y="finkit-widgets-sc-journal",j="https://assets.finuslugi.ru/mp-assets/pl-common-blocks-renderer/journal/default_post_image.png",N=({data:e,eventCategory:t=y,className:l})=>{var u;let d=(0,i._m)("xl"),[p,v]=(0,r.useState)(!0),[h,b]=(0,r.useState)(0),g=e.chips||[],x=(null==(u=null==g?void 0:g[Number(h)])?void 0:u.items)||[];if((0,r.useEffect)(()=>{v(!d)},[d]),0===g.length||0===x.length)return null;let N=(e,l)=>()=>{(0,s.h)({eventCategory:t,eventActionType:s.D.block,eventActionText:e||"",eventLabel:l})},k=e=>{e.target.src!==j&&(e.target.src=j)};return(0,n.jsxs)("div",{className:(0,o.Z)(C.wrapper,l),children:[(0,n.jsxs)(a.W2,{children:[(0,n.jsx)("h2",{className:C.title,children:null==e?void 0:e.title}),(0,n.jsx)("div",{className:C.subtitle,children:null==e?void 0:e.description})]}),(0,n.jsx)("div",{className:C.scrollableWrapper,children:(0,n.jsx)(a.W2,{children:(0,n.jsx)("div",{className:C.chipsWrapper,children:g.length>1&&(0,n.jsx)(i.cL,{chips:g,value:h,variant:"secondary",size:p?"m":"l",onChipClick:e=>{var l;let n=(null==(l=g[Number(e)])?void 0:l.label)||"";(0,s.h)({eventCategory:t,eventActionType:s.D.tab,eventActionText:n}),b(e)}})})})}),(0,n.jsxs)(a.W2,{children:[e.subscribeBlock&&(0,n.jsx)("div",{className:C.sliderWrapper,children:(0,n.jsx)(i.wI,{className:(0,o.Z)(C.sliderItem,C.fixed),children:(0,n.jsx)("div",{className:C.article,children:(0,n.jsx)(f,{data:e.subscribeBlock,eventCategory:t})})})}),(0,n.jsxs)(i.iR,{className:C.slider,options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3500,disableOnInteraction:!0},loop:!0},pagination:!0,navigation:!0,navigationVariant:"secondary",navigationSize:"s",children:[x.map(e=>(0,n.jsx)(i.wI,{className:C.sliderItem,children:(0,n.jsxs)("a",{className:C.article,href:e.url,onClick:N(e.title,e.url),children:[(0,n.jsx)("div",{className:C.imgWrapper,children:(0,n.jsx)("img",{src:e.img,alt:`изображение: ${e.title}`,onError:k})}),(0,n.jsxs)("div",{className:C.articleBody,children:[(0,n.jsx)("div",{className:C.articleTitle,children:e.title}),(0,n.jsx)("div",{className:C.articleDate,children:_(e.dt)})]})]})},e.title)),e.subscribeBlock&&p&&(0,n.jsx)(i.wI,{className:C.sliderItem,children:(0,n.jsx)("div",{className:C.article,children:(0,n.jsx)(f,{data:e.subscribeBlock,eventCategory:t})})})]},h),(0,n.jsx)(m,{href:(null==e?void 0:e.url)||"",event:{event:"data-event",eventCategory:t,eventAction:`link_${(0,c.t)((null==e?void 0:e.urlText)||"Показать все статьи")}`,eventLabel:(null==e?void 0:e.url)||""},dataLayerPush:s.d,className:C.checkAllLink,children:(null==e?void 0:e.urlText)||"Показать все статьи"})]})]})}},6024:function(e,t,l){"use strict";l.d(t,{B:function(){return x}});var n=l(85893),a=l(66535),i=l(86010),o=l(59194),r=l(34588),s=l(43803),c=l(84941),u=l(67294);let d=(0,c.g)("support","sc"),p=Object.freeze({support:d,title:`${d}__title`,cardsContainer:`${d}__cards-container`}),v="cb-support",m=(0,c.g)("support-app-card","sc"),_=Object.freeze({supportAppCard:m,textWrapper:`${m}__text-wrapper`,imageContainer:`${m}__image-container`,title:`${m}__title`,description:`${m}__description`,icon:`${m}__icon`,imageWrapper:`${m}__image-wrapper`,image:`${m}__image`}),h=({title:e,linkUrl:t,s3Assets:l,description:a})=>{let i=(0,r.aF)("s");return(0,n.jsxs)("div",{className:_.supportAppCard,onClick:()=>{i&&((0,s.h)({eventCategory:v,eventActionType:s.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,n.jsx)(o.IconFdsArrowUpRightSmallO,{className:_.icon,size:32}),(0,n.jsxs)("div",{className:_.textWrapper,children:[(0,n.jsx)("div",{className:_.title,children:e}),!!a&&(0,n.jsx)("div",{className:_.description,children:a})]}),(0,n.jsx)("div",{className:_.imageContainer,children:(0,n.jsxs)("picture",{className:_.imageWrapper,children:[(0,n.jsx)("source",{media:"(max-width: 767px)",srcSet:`${l}/mp-assets/widgets/SupportBlock/mobile-app.png 1x, ${l}/mp-assets/widgets/SupportBlock/mobile-app@2x.png 2x`}),(0,n.jsx)("img",{className:_.image,loading:"lazy",src:`${l}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg`,srcSet:`${l}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg 1x, ${l}/mp-assets/widgets/SupportBlock/qr-code-mobile-app@2x.jpg 2x`})]})})]})},b=(0,c.g)("support-phone-card","sc"),g=Object.freeze({supportPhoneCard:b,contacts:`${b}__contacts`,phone:`${b}__phone`,chat:`${b}__chat`,info:`${b}__info`,image:`${b}__image`}),f=({phones:e,description:t,s3Assets:l})=>{let a=(0,u.useCallback)(()=>{var e,t,l;null==(l=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)||l.call(t),(0,s.h)({eventCategory:v,eventActionType:s.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),i=e=>{let t=e.replace(/[\s-]/g,"");(0,s.h)({eventCategory:v,eventActionType:s.D.link,eventActionText:"phone",eventLabel:t})};return(0,n.jsxs)("div",{className:g.supportPhoneCard,children:[(0,n.jsxs)("div",{className:g.contacts,children:[e.map(e=>(0,n.jsx)("a",{className:g.phone,href:e.href,onClick:()=>i(e.label),children:e.label},e.label)),(0,n.jsx)("span",{className:g.chat,onClick:a,children:"Онлайн чат"})]}),(0,n.jsx)("div",{className:g.info,children:t}),(0,n.jsx)("img",{className:g.image,src:`${l}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},x=({className:e,phoneCard:t,appCard:l,s3Assets:o})=>(0,n.jsx)("section",{className:(0,i.Z)(p.support,e),children:(0,n.jsxs)(a.W2,{children:[(0,n.jsx)(a.X6,{as:"h2",type:"display",weight:"bold",className:(0,i.Z)(p.title,"mb-6"),children:"Поддержка"}),(0,n.jsxs)("div",{className:p.cardsContainer,children:[(0,n.jsx)(f,{s3Assets:o,...t}),(0,n.jsx)(h,{s3Assets:o,...l})]})]})});x.displayName="Support"}},function(e){e.O(0,[6832,5249,2935,4581,5675,1127,3996,3803,3898,1936,60,3091,2888,9774,179],function(){return e(e.s=9677)}),_N_E=e.O()}]);