(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(82198)}])},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 j}});var n,i,a=l(85893),o=l(34588),r=l(86010),s=l(67294),u=l(59457);function c(){return(c=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",c({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:i}=l;i instanceof HTMLElement&&!(null===(n=t.current)||void 0===n?void 0:n.contains(i))&&e()};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[e]),t},_=e=>{let{content:t,children:l,disabled:n,isNewSortRadios:i}=e,[o,u]=(0,s.useState)(!1),c=(0,s.useCallback)(()=>u(!0),[u]),d=(0,s.useCallback)(()=>u(!1),[u]);return(0,a.jsxs)("div",{className:(0,r.Z)(v().wrap,i&&v().newSortRadioWrap),onClick:c,ref:m(d),children:[l,o&&!n&&(0,a.jsx)("div",{className:v().content,children:t})]})};function b(){return(b=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 h=function(e){return s.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),i||(i=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:i}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:(0,r.Z)(f().sortTypeHead,t&&f().newSortRadioSortTypeHead),children:[(0,a.jsx)("button",{style:{marginLeft:"0px",marginRight:l?"0px":"8px"},className:(0,r.Z)(f().sortTypeButton,t&&f().newSortRadioSortTypeButton),onClick:n,children:(0,a.jsx)(d,{className:(0,r.Z)(!i&&f().iconInverted)})}),"Сортировать"]}),t&&(0,a.jsx)("div",{className:f().divider})]})},C=(0,s.memo)(e=>{let{isMobile:t,onChangeSort:l,isIncreaseSort:n,onChangeSortType:i,sortTypeItems:s,sortTypeValue:u,isNewSortRadios:c}=e;return(0,a.jsxs)(a.Fragment,{children:[!c&&t&&(0,a.jsx)(x,{onChangeSort:l,isMobile:t,isIncreaseSort:n,isNewSortRadios:c}),(0,a.jsxs)("div",{className:(0,r.Z)(f().sortTypeContainer,c&&f().newSortRadioSortTypeContainer),onClick:e=>e.stopPropagation(),children:[c&&(0,a.jsx)(x,{onChangeSort:l,isMobile:t,isIncreaseSort:n,isNewSortRadios:c}),s.map(e=>(0,a.jsxs)("div",{"data-qa":"".concat(e.value,"_radio"),className:f().sortType,children:[c?(0,a.jsx)(o.Y8,{name:e.value,value:u,checked:e.value===u,label:e.label,onChange:()=>i(e.value)}):(0,a.jsx)(o.Y8,{name:e.value,label:e.label,checked:e.value===u,className:f().sortTypeRadio,value:e.value,onChange:()=>i(e.value)}),e.description&&(0,a.jsx)(o.u,{text:e.description,className:(0,r.Z)(f().sortTypeButton,c&&f().newSortRadioSortTypeButton),children:(0,a.jsx)(h,{})})]},e.value))]})]})});C.displayName="SortRadios";var y=l(19438),T=l(5257),N=l.n(T);let j=(0,s.memo)(e=>{let{chips:t,onClickParams:l,isIncreaseSort:n,onChangeIncreaseSort:i,sortTypeItems:c,sortTypeValue:p,onChangeSortType:v,isMobile:m,isFixed:b,portalId:h,onClickChip:g,className:f,onClickSortType:x,isNewSortRadios:T}=e,j=(0,s.useCallback)(()=>null==i?void 0:i(!n),[n,i]),A=(0,a.jsx)("div",{style:{padding:"8px",borderRadius:T?"20px":"8px",background:"white"},className:(0,r.Z)(!m&&T&&N().sortTypeDesktop),children:(0,a.jsx)(C,{isMobile:m,isIncreaseSort:n,onChangeSort:j,onChangeSortType:v,sortTypeItems:c,sortTypeValue:p,isNewSortRadios:T,portalId:h})}),k=c.find(e=>e.value===p);return(0,a.jsx)("div",{className:(0,r.Z)(N().filter,T&&N().newSortRadiosFilter,b&&N().stuck,f),children:(0,a.jsx)(y.t,{className:N().mainContainer,children:(0,a.jsxs)("div",{className:N().container,children:[(0,a.jsx)(o.cL,{className:N().chipsContainer,chips:t,value:t.map(e=>e.id),multiple:!0,activeVariant:"secondary",onChipClick:g}),(0,a.jsxs)("div",{className:N().actionsWrapper,children:[(0,a.jsxs)("button",{className:(0,r.Z)(N().action,N().actionButton),onClick:l,children:[(0,a.jsx)(u.Z,{className:N().icon}),(0,a.jsx)("span",{className:N().actionText,children:"Все параметры"})]}),(0,a.jsxs)("div",{className:N().action,children:[(0,a.jsx)("button",{className:(0,r.Z)(N().icon,N().iconButton,!n&&N().iconInverted),onClick:j,children:(0,a.jsx)(d,{})}),(0,a.jsx)(_,{content:A,disabled:m,isNewSortRadios:T,children:(0,a.jsx)("button",{onClick:x,className:(0,r.Z)(N().actionText,N().actionButton),"data-qa":"".concat(p,"_order"),children:(null==k?void 0:k.shortLabel)||(null==k?void 0:k.label)||"Сортировка"})})]})]})]})})})});j.displayName="ListFilter"},58484:function(e,t,l){"use strict";l.d(t,{V:function(){return p}});var n=l(85893),i=l(44076),a=l(86010),o=l(67294),r=l(65737),s=l(21308),u=l(94347),c=l(83226),d=l.n(c);let p=(0,o.memo)(e=>{let{region:t,town:l,subtitle:o,title:c,mainPageUrl:p}=e,{town:v,region:m}=(0,u.T)(),{handleToggleModal:_}=(0,i.ar)(),b=e=>{(0,r.l)({event:"data-event",eventAction:e,eventCategory:p})};return(0,n.jsxs)("div",{className:(0,a.Z)(d().titleWrapper,d().newTitle),children:[(0,n.jsxs)("h1",{className:d().title,children:[c," ",((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),b("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"},37771:function(e,t,l){"use strict";l.d(t,{$m:function(){return p},F$:function(){return c},Ht:function(){return r},N2:function(){return v},PY:function(){return s},QN:function(){return u},Z3:function(){return d},eT:function(){return a},oA:function(){return i},vw:function(){return o}});var n=l(73897);let i={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"},a=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}];n.u.AUTOCREDIT;let o=[{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 лет"}],r=[{value:"moto",label:"Мототранспорт"},{value:"car",label:"Легковое транспорт"},{value:"track",label:"Грузовое транспорт"},{value:"commercial",label:"Коммерческое транспорт"},{value:"water",label:"Водное транспорт"},{value:"custom",label:"Другое"}],s=[{value:"moto",labelShort:"Мототранспорт"},{value:"car",labelShort:"Легковое ТС"},{value:"track",labelShort:"Грузовое ТС"},{value:"commercial",labelShort:"Коммерческое ТС"},{value:"water",labelShort:"Водное ТС"},{value:"custom",labelShort:"Другое"}],u=[{value:"foreign_new",label:"Иномарка с завода"},{value:"foreign_old",label:"Иномарка с пробегом"},{value:"domestic_new",label:"Отечественная с завода"},{value:"domestic_old",label:"Отечественная с пробегом"}],c=[{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:"Иное"}],d=[{value:"not_required",label:"Не требуется"},{value:"pledge",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"full",label:"Залог и поручительство"}],p=[{label:"По ставке",value:"rate"},{label:"По первому взносу",value:"firstPayment"}],v="Указали больше чем запрашиваете кредитных денег"},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)),i=n.includes(Number(t.id));return!l&&i?1:l&&!i?-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 a},b:function(){return i}});var n=l(67294);let i=(e,t,l)=>{(0,n.useEffect)(()=>{let t=setTimeout(()=>{e()},l);return()=>{clearTimeout(t)}},t)},a=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,[i,a]=(0,n.useState)(l),[o,r]=(0,n.useState)(!1),[s,u]=(0,n.useState)(null);return(0,n.useEffect)(()=>{r(!0),e().then(a).catch(u).then(()=>{r(!1)})},t),[i,o,s]}},82198:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return t1},default:function(){return t2}});var n=l(85893),i=l(44076),a=l(67294),o=l(34588),r=l(25675),s=l.n(r),u=l(41664),c=l.n(u),d=l(44895),p=l(73172),v=l(368),m=l(84444),_=l(19438),b=l(54663),h=l(72335),g=l(20070),f=l(57696);let x=[{id:1,label:"Условия",name:f.cQ.conditions},{id:2,label:"Требования к заемщику",name:f.cQ.requirements},{id:3,label:"Требование к ТС",name:f.cQ.requirementsVehicles},{id:4,label:"Погашение",name:f.cQ.redemption}];var C=l(44727);let y=e=>{let{data:t}=e,l=(0,a.useMemo)(()=>(0,g.m8)(t),[t]),n=(0,a.useMemo)(()=>x.filter(e=>l[e.name].some(e=>(0,C.B)(e.value))),[l]);return{tabsContent:l,tabsList:n}},T=(0,a.memo)(e=>{var t,l;let{data:i,bank:a,offerType:o,pageUrl:r}=e,{tabsContent:s,tabsList:u}=y({data:i});return(0,n.jsx)(h.z,{scrollBlockId:b.q6,pageUrl:r,seoText:(null==i?void 0:i.short_description)&&(null==i?void 0:i.short_description.length)>5?null==i?void 0:i.short_description:void 0,title:"Об автокредите",offerType:o,offerUpdateData:null==i?void 0:i.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:u,tabsContent:s,aboutCompanyLabel:"О банке",site:null!==(l=null==a?void 0:a.site.title)&&void 0!==l?l:void 0})});T.displayName="AutoCreditAbout";var N=l(17722),j=l(94781),A=l(93842),k=l(64062),S=l(54636),w=l(73897),L=l(5753),R=l.n(L);let F=e=>{let{url:t,offerType:l,isMobile:i,className:o}=e,r=(0,a.useMemo)(()=>[{id:3,image:A.Z,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",types:[S.A.LEAD],buttonText:"Оформить на сайте банка",link:t},{id:4,image:N.Z,text:S.A.LEAD?"Этот кредит нельзя открыть через Финуслуги":"Этот автокредит сейчас нельзя открыть онлайн на Финуслугах",types:[S.A.LEAD,S.A.MASS],buttonText:"Выбрать другой автокредит",link:"/avtokredity"},{id:5,image:j.Z,text:"Чтобы оформить автокредит, обратитесь в банк",types:[S.A.MASS]}].filter(e=>e.types.find(e=>e===l)),[t,l]);return(0,n.jsx)("div",{className:R().container,children:(0,n.jsx)(k.B,{className:o,title:"Где оформить автокредит",pageUrl:w.u.AUTOCREDIT,id:b.VT,isMobile:i,slides:r})})};var M=l(86010),I=l(77019),D=l(24443),E=l(28644),P=l(48766),U=l(26024),O=l(90999),B=l(72798),Z=l(17950),V=l(41262),W=l(66566),H=l(39918),q=l(37220),Q=l(6584),z=l(94466),J=l(93478),X=l(21172),K=l.n(X);let Y="Оформить на сайте банка",$="Где оформить автокредит",G=e=>{var t,l,i,r;let{offerType:s,bank:u,data:c,isMobile:d,calculator:p}=e,[v,m]=(0,a.useState)(!1),h=(0,a.useRef)(null),g=(0,a.useMemo)(()=>{let{domestic_new:e,domestic_old:t,foreign_new:l,foreign_old:n}=c.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?"Любое б/у":"Любое":"Отечественная новая":"Отечественная б/у":"Иномарка б/у":"Иномарка новая"},[c.vehicle_state]),f=(0,a.useCallback)(()=>{h.current&&h.current.focus()},[]),x=(0,a.useCallback)(e=>{e&&((0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.filterCatalog,eventLabel:"Платеж",eventValue:e.label}),p.setPaymentTypeValue(e.value))},[p]),C=(0,a.useMemo)(()=>({value:p.period,max:p.periodMax,min:p.periodMin===p.periodMax?p.periodMin-1:p.periodMin,onChange:e=>{e=null!=e?e:p.periodMin,p.periodMin!==p.periodMax&&p.setPeriod(e)},step:1,ticks:[{label:(0,V.H3)(p.periodMin),value:p.periodMin},{label:(0,V.H3)(p.periodMax),value:p.periodMax}],unit:[Q.mp.ONE,Q.mp.FEW,Q.mp.MANY]}),[p]),y=(0,a.useMemo)(()=>p.paymentTypeOptions.filter(e=>e.value===p.paymentTypeValue),[p.paymentTypeOptions,p.paymentTypeValue]),T=(0,a.useMemo)(()=>[{id:1,label:(0,V.S_)(p.period)},{id:2,label:"".concat(p.amount)}],[p.amount,p.period]),N=(0,a.useMemo)(()=>{var e;let t=(null===(e=c.application_term.custom_text)||void 0===e?void 0:e.from)!==void 0?(0,P.B)(c.application_term.custom_text.from):0,l=new Date;l.setDate(l.getDate()+t);let n=l.getDate(),i=l.getMonth()+1,a=l.getFullYear();return"Деньги у вас до ".concat(n," ").concat((0,W.$)("".concat(i,"-").concat(n,"-").concat(a)))},[null===(t=c.application_term.custom_text)||void 0===t?void 0:t.from]),j=p.amount,A=(0,a.useMemo)(()=>{let e=p.firstPayment,t=p.period,l=c.vehicle_type.text,i=p.paymentTypeValue,a=[],o=Number(e)/(Number(j)/100);Number.isInteger(o)||(o=Number(o.toFixed(5)));let r=j?(0,q.z)(o,1):0;a.push({label:"Первый взнос",value:"".concat(r,"%").replace(".",",")}),a.push({label:"Срок погашения",value:(0,V.S_)(t)});let s=c.full_price;if(s){let e=c.interest_rate;a.push({label:"ПСК",value:(0,I.W)(s),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n    Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,z.sz)(Number(e.from),Number(e.to))})}return a.push({label:"Тип&#160;ТС",value:l},{label:"Состояние&#160;ТС",value:g,description:"Некоторые банки указывают, что получить кредит можно только на новый автомобиль, а для других это не принципиально."}),i&&a.push({label:"Тип платежа",value:i===Z.T.annuity?"Аннуитетный":"Дифференцированный",description:(0,n.jsx)("div",{className:K().tooltipContent,children:(0,n.jsx)(U.a,{type:i})})}),a},[p.firstPayment,p.period,p.paymentTypeValue,c.vehicle_type.text,c.full_price,c.interest_rate,g,j]);return(0,n.jsxs)(_.t,{className:(0,M.Z)(K().container,K().containerFull),children:[(0,n.jsx)(O.F,{url:c.url,bank:{logoMob:null==u?void 0:u.logo_mob,url:"/banki/".concat(null==u?void 0:u.url),name:null!==(i=null==u?void 0:u.name)&&void 0!==i?i:c.bank_name},pageUrl:w.u.AUTOCREDIT,title:"Автокредит \xab".concat(c.title,"\xbb от ").concat(null!==(r=null==u?void 0:u.name)&&void 0!==r?r:c.bank_name),isSmall:l,isMobile:d,tagTheme:"red",className:K().promo}),(0,n.jsxs)("div",{className:K().left,children:[(0,n.jsx)(D.y,{isMobile:d,title:"Настройка автокредита",pageUrl:w.u.AUTOCREDIT,infoLink:{isShow:!d,text:"Подробнее об автокредите",idScrollBlock:b.q6,offPadding:!0,widthMaxContent:!0},items:[{elements:[{type:"moneyInput",props:{label:"Сумма",value:p.amount,onChange:p.setAmount,onFocus:()=>m(!0)}}]},{elements:[{type:"moneyInput",props:{label:"Первый взнос",value:p.firstPayment,onChange:p.setFirstPayment,onFocus:()=>m(!0)}}]},{elements:[{type:"inputRange",props:{label:"Срок погашения",...C}}]},{elements:[{type:"select",isHidden:!p.paymentTypeValue||p.paymentTypeOptions.length<=1,desription:p.paymentTypeValue&&(0,n.jsx)(U.a,{className:K().typeDescription,type:p.paymentTypeValue}),props:{label:"Платеж",options:p.paymentTypeOptions,onChange:x,value:y}}]}],chips:T,isShowChips:d&&!!(null==T?void 0:T.length)&&!v,isExpandSettings:v,onToggleSettings:()=>m(e=>!e)}),(0,n.jsx)(B.S,{isSmall:!0,className:K().qrDesc})]}),(0,n.jsxs)("div",{className:K().right,children:[(0,n.jsx)(E.y,{captionTitle:N,pageUrl:w.u.AUTOCREDIT,onEdit:f,amount:Number(p.amount),disclaimer:"Предварительные условия. Не оферта",tag:c.online_application.commercial_desc,footerActions:(0,n.jsxs)(n.Fragment,{children:[s===S.A.LEAD&&(0,n.jsx)(o.zx,{as:"a",onClick:()=>{(0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.link,eventActionText:Y,eventLabel:c.id})},href:c.online_application.url,target:"_blank",className:K().button,children:Y}),(0,n.jsx)(o.zx,{onClick:()=>{(0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.button,eventActionText:$}),(0,J.l)(b.VT,{offset:d?0:-100,position:"top"})},className:K().button,variant:"secondary",children:$})]}),valuesList:A}),(0,n.jsx)(B.S,{isSmall:!0,className:K().qrMobile})]})]})};var ee=l(65737),et=l(40741),el=l(30976),en=l(73654),ei=l.n(en);let ea=(0,a.memo)(e=>{var t,l;let{data:i,detailData:o,className:r,onDetailInfoClick:u,onClick:c}=e,d=[],p=(0,a.useRef)(null),v=(0,a.useRef)(!1),m=(0,a.useRef)(null),_={text:"",caption:""},[b,h]=(null==o?void 0:null===(t=o.data)||void 0===t?void 0:t.online_application.commercial)===1?["Оформить",o.data.online_application.url]:["Подробнее",i.url],g=null==o?void 0:null===(l=o.data)||void 0===l?void 0:l.full_price;g&&(_.caption="ПСК",_.text=(0,I.W)(g),_.tooltipText="ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.");let f={text:(0,z.dN)({from:i.amountFrom,to:i.amountTo},{currency:i.currency}),caption:"Сумма"},x={text:"от ".concat((0,z.uf)(i.payment),"%"),caption:"Первый взнос"};d.push({label:"Заявка через сайт банка",variant:"primary"}),i.isKascko&&d.push({label:"Потребуется каско",variant:"primary"}),i.isPermanentRegistation&&d.push({label:"Постоянная регистрация",variant:"primary"});let C=e=>{(0,ee.l)({event:"data-event",eventAction:e,eventCategory:w.u.AUTOCREDIT,eventLabel:i.id,eventValue:i.eventValue}),null==c||c(i)},y=(0,a.useCallback)(e=>{let[t]=e;1===t.intersectionRatio&&!v.current&&((0,ee.l)({event:"data-event",eventAction:"show_in_catalog",eventCategory:w.u.AUTOCREDIT,eventLabel:i.id}),v.current=!0,p.current&&m.current&&p.current.unobserve(m.current))},[i.id]);return(0,a.useEffect)(()=>{p.current&&m.current&&p.current.unobserve(m.current),!v.current&&m.current&&(p.current=new IntersectionObserver(y,{root:null,threshold:[1]}),p.current.observe(m.current))},[y]),(0,n.jsx)("div",{ref:m,className:r,onClick:()=>C("click_button_".concat((0,et.b)("Подать заявку"))),children:(0,n.jsx)(el.J,{icon:i.logo?(0,n.jsx)("div",{className:ei().logo,children:(0,n.jsx)(s(),{width:56,height:56,src:i.logo,alt:"logo"})}):(0,n.jsx)("div",{className:ei().placeholderLogo}),companyName:i.bankName,productName:i.title,productUrl:i.url,buttonText:b,buttonUrl:h,tags:d,advantageAmountFrom:_,advantageAmountTo:x,advantageBonus:f,onDetailInfoClick:()=>{u(i),(0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.button,eventActionText:"open_modal"})},className:ei().plate})})});ea.displayName="AutoCreditListItem";var eo=l(13442),er=l(84135),es=l(89504),eu=l(32244);let ec=e=>(null==e?void 0:e.online_application.commercial)===1?S.A.LEAD:S.A.MASS,ed=e=>{var t,l,n,i,a,o;let{banks:r,autoCredit:s,period:u}=e,c="/".concat(w.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!==(i=null==v?void 0:v.logo_mob)&&void 0!==i?i:"",title:s.title,url:c,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:u||+s.period.to,rate:+s.interest_rate.from,rateTo:+s.interest_rate.to,payment:+s.first_payment.from||0,currency:"₽",detailUrl:"/".concat(w.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!==(a=null==v?void 0:v.site.title)&&void 0!==a?a:null,url:null!==(o=null==v?void 0:v.site.url)&&void 0!==o?o:null}}};var ep=l(84053),ev=l(94347),em=l(5569),e_=l.n(em);let eb=(0,a.memo)(e=>{let{bank:t,banks:l,currentCardId:i,autocredits:o,autocreditsFinuslugi:r,className:s}=e,{town:u}=(0,ev.T)(),[c,d]=(0,a.useState)(),[p,v]=(0,a.useState)(null),m=(0,a.useCallback)(()=>{d(void 0)},[]),b=(0,a.useCallback)(e=>{(0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),h=(0,a.useMemo)(()=>{let e=o?o.filter(e=>e.id!==i):[];return(0,eu.$)({productList:e,anotherList:e,count:es.NU})},[o,i]),g=(0,a.useMemo)(()=>{let e=r||[];return(0,eu.$)({productList:e,anotherList:e,count:es.wo-h.length})},[h.length,r]),f=(0,a.useMemo)(()=>({bankList:h.map(e=>ed({banks:[t],autoCredit:e})),finuslugiList:g.map(e=>ed({banks:l,autoCredit:e}))}),[t,l,h,g]),x=(0,a.useCallback)(e=>{if(!e)return;let t=[h,g].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,g]),C=(0,a.useCallback)(e=>{var t;d(x(e)),v(null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null),e&&(0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.popup,eventActionText:e.title,eventLabel:e.id})},[x]),y="".concat((0,ep.ZR)().mainBaseUrl,"/banki/").concat(t.url,"/avtokredity").concat((null==u?void 0:u.url.length)?"/reg_"+u.url:"");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("section",{className:(0,M.Z)(e_().container,s),children:[(0,n.jsx)("h3",{className:e_().title,children:"Другие автокредиты"}),(0,n.jsxs)(_.t,{children:[!!f.bankList.length&&(0,n.jsxs)("section",{className:e_().offersListContainer,children:[(0,n.jsxs)("p",{className:e_().listTitle,children:["Автокредиты от ",t.name]}),f.bankList.map(e=>(0,n.jsx)(ea,{onDetailInfoClick:C,className:e_().listItem,data:e,onClick:b,text:"Подать заявку",detailData:{data:x(e),mainPageUrl:w.u.AUTOCREDIT}},e.url)),(0,n.jsx)(eo.j,{offPadding:!0,text:"Bсе предложения от банка",href:y,target:"_blank",iconColor:"light",mainPageUrl:w.u.AUTOCREDIT})]}),!!f.finuslugiList.length&&(0,n.jsxs)("section",{className:e_().offersListContainer,children:[(0,n.jsx)("p",{className:e_().listTitle,children:"Автокредиты на Финуслугах"}),f.finuslugiList.map(e=>(0,n.jsx)(ea,{onDetailInfoClick:C,className:e_().listItem,data:e,onClick:b,text:"Подать заявку",detailData:{data:x(e),mainPageUrl:w.u.AUTOCREDIT}},e.url)),(0,n.jsx)(eo.j,{offPadding:!0,text:"Bсе предложения на Финуслугах",href:"/avtokredity",target:"_blank",iconColor:"light",mainPageUrl:w.u.AUTOCREDIT})]})]})]}),(0,n.jsx)(er.h,{data:c,isOpen:!!c,onClose:m,mainPageUrl:w.u.AUTOCREDIT,offerType:p})]})});eb.displayName="AutoCreditsList";var eh=l(11163),eg=l(82080);let ef=e=>Array.isArray(e)?e[0]:e,ex=e=>{var t,l,n,i,o,r;let{asPath:s}=(0,eh.useRouter)(),[u,c]=(0,a.useState)(Number(null!==(l=e.amount.from)&&void 0!==l?l:0)),[d,p]=(0,a.useState)(0),[v,m]=(0,a.useState)(Number(null!==(n=e.period.to)&&void 0!==n?n:1)),_=Number(null!==(i=e.period.from)&&void 0!==i?i:1),b=Number(null!==(o=e.period.to)&&void 0!==o?o:1),h=(0,a.useMemo)(()=>{let t=[];return 0!==e.repayment_procedure.annuity&&t.push({label:"Аннуитетный",value:Z.T.annuity}),void 0!==e.repayment_procedure.differentiated&&0!==e.repayment_procedure.differentiated&&t.push({label:"Дифференцированный",value:Z.T.differentiated}),t},[e.repayment_procedure]),[g,f]=(0,a.useState)(null!==(r=null===(t=h[0])||void 0===t?void 0:t.value)&&void 0!==r?r:null),x=(0,a.useCallback)(e=>{c(null!=e?e:0)},[]),C=(0,a.useCallback)(e=>{p(null!=e?e:0)},[]),y=(0,a.useMemo)(()=>({value:u,onChange:x}),[u,x]),T=(0,a.useMemo)(()=>({value:d,onChange:C}),[d,C]);return(0,a.useEffect)(()=>{let e=(0,eg.p)(s,"#"),t=ef(e.amount),l=ef(e.first_payment),n=ef(e.period);void 0!==t&&c(+t),void 0!==l&&p(+l);let i=Number(n);!Number.isNaN(i)&&i>=_&&i<=b&&m(i)},[]),(0,a.useMemo)(()=>({amount:u,setAmount:c,amountInputProperties:y,firstPayment:d,setFirstPayment:p,firstPaymentInputProperties:T,period:v,setPeriod:m,periodMin:_,periodMax:b,paymentTypeOptions:h,paymentTypeValue:g,setPaymentTypeValue:f}),[u,y,d,T,v,_,b,h,g])};var eC=l(54228),ey=l(51469),eT=l(71276),eN=l(44215),ej=l(89519),eA=l(56381),ek=l.n(eA);function eS(e){var t;let{offer:l,posts:i,questions:a,description:r,banks:u,refererTag:h,offers:g,offersFinuslugi:f}=e,x=ec(l),C=(0,eC.S0)(),y=ex(l),{region:N,town:j}=(0,ev.T)(),A=u.find(e=>Number(e.id)===l.bank_id),k=(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,p.MK)(e.data.html)).join("").trim()})))||[],S="Автокредит \xab".concat(l.title,"\xbb от ").concat(null!==(t=null==A?void 0:A.name_r)&&void 0!==t?t:"");return(0,n.jsxs)("main",{className:ek().page,children:[(0,n.jsx)(m.N,{productId:String(l.id),title:S,description:null!=r?r:""}),(0,n.jsx)(eT.o,{}),(0,n.jsx)(ey.g,{questions:k}),(0,n.jsx)("div",{className:ek().navigationWrapper,children:(0,n.jsx)(_.t,{children:(0,n.jsx)(o.Oo,{className:ek().breadcrumbs,items:(()=>{var e;let t=(null==j?void 0:j.name_p)||(null==N?void 0:N.name_p)?" в ".concat((null==j?void 0:j.name_p)||(null==N?void 0:N.name_p)):"",n="".concat((null==N?void 0:N.url)?"/reg_".concat(null==N?void 0:N.url):"").concat((null==j?void 0:j.url)?"/".concat(null==j?void 0:j.url):""),i=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(t),href:"/".concat(w.u.AUTOCREDIT).concat(n)}];return h&&i.push({label:"".concat(h.name).concat(t),href:"/".concat(w.u.AUTOCREDIT,"/teg_").concat(h.url).concat(n)}),i.push({label:"".concat(null!==(e=null==A?void 0:A.name)&&void 0!==e?e:l.bank_name," Автокредит ").concat(l.title)}),i})()})})}),(0,n.jsx)(G,{calculator:y,bank:A,offerType:x,data:l,isMobile:C}),(0,n.jsx)(_.t,{className:ek().about,children:(0,n.jsx)(T,{data:l,bank:A,offerType:x,pageUrl:w.u.AUTOCREDIT})}),(0,n.jsx)(F,{isMobile:C,offerType:x,url:l.online_application.url}),void 0!==A&&(0,n.jsx)(eb,{bank:A,banks:u,currentCardId:l.id,autocredits:g,autocreditsFinuslugi:f}),i&&(0,n.jsx)(v.S,{posts:i.posts,categories:i.ctgs,pageUrl:w.u.AUTOCREDIT}),(0,n.jsxs)("div",{className:ek().supportSection,children:[(0,n.jsx)(ej.O,{idSupport:b.Je,Image:e=>(0,n.jsx)(s(),{...e,width:555,height:344,src:d.Z,alt:"фоновое изображение"}),dataLayerPush:ee.l,eventEmitter:()=>window.supportWidget.craftTalk.open()}),(0,n.jsx)(eN.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,n.jsx)(c(),{...e}),dataLayerPush:ee.l,questions:k,eventCategory:"cards_support_block",href:"".concat((0,ep.ZR)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про автокредиты"})]})]})}var ew=l(98670);l(93188);var eL=l(53850),eR=l(37771),eF=l(51858),eM={src:"/kredity/assets/_next/static/media/adv-auto-desktop.6c981f82.svg",height:132,width:1110,blurWidth:0,blurHeight:0},eI={src:"/kredity/assets/_next/static/media/adv-auto-mobile.07d07b83.svg",height:132,width:343,blurWidth:0,blurHeight:0},eD=l(41172),eE=l.n(eD);let eP=(0,a.memo)(e=>{let{className:t}=e,{mainBaseUrl:l}=(0,ep.ZR)();return(0,n.jsxs)(c(),{href:"".concat(l,"/osago"),target:"_blank",className:(0,M.Z)(eE().wrapper,t),children:[(0,n.jsx)(s(),{className:(0,M.Z)(eE().bg,eE().bgDesktop),src:eM,alt:""}),(0,n.jsx)(s(),{className:(0,M.Z)(eE().bg,eE().bgMobile),src:eI,alt:""}),(0,n.jsx)(o.zx,{className:eE().button,size:"s",children:"Оформить"})]})});eP.displayName="OsagoAd";var eU=l(65848);let eO=[],eB=(e,t)=>{let{amount:l,firstPayment:n,period:i,payment:a,incomeProof:o,vehicleType:r,vehicleState:s,banks:u,insuranceNeed:c,stateCoFinancing:d,notFirstPayment:p}=e,v=[{id:eR.oA.amount,label:"Сумма кредита: ".concat(l?"".concat((0,z.uf)(l)," ₽"):"не имеет значения")},{id:eR.oA.firstPayment,label:"Первый взнос: ".concat(n?"".concat((0,z.uf)(n)," ₽"):"не имеет значения")}];if("number"==typeof i){let e=eR.vw.find(e=>e.value===i);void 0!==e&&v.push({id:eR.oA.period,label:0===e.value?"Срок: ".concat(e.label):e.label})}if(void 0!==a&&0!==a&&v.push({id:eR.oA.payment,label:"До ".concat((0,z.uf)(a)," ₽ в мес")}),void 0!==o&&0!==o.length){let e=eR.eT.filter(e=>o.includes(e.value)),t=1===e.length?e[0].label:"Подтверждение дохода: (".concat(e.length,")");v.push({id:eR.oA.period,label:t})}if(void 0!==r&&0!==r.length){let e=eR.Ht.filter(e=>r.includes(e.value)),t=1===e.length?e[0].label:"Тип транспорта: (".concat(e.length,")");v.push({id:eR.oA.vehicleType,label:t})}if(void 0!==s&&0!==s.length){let e=eR.QN.filter(e=>s.includes(e.value)),t=1===e.length?e[0].label:"Состояние транспорта: (".concat(e.length,")");v.push({id:eR.oA.vehicleState,label:t})}if(void 0!==u&&0!==u.length){let e=t.filter(e=>u.includes(+e.value)),l=1===e.length?e[0].label:"Банки: (".concat(e.length,")");v.push({id:eR.oA.bank,label:l})}return(c&&v.push({id:eR.oA.insuranceNeed,label:"Без каско"}),d&&v.push({id:eR.oA.stateCoFinancing,label:"С господдержкой"}),p&&v.push({id:"notFirstPayment",label:"Без первого взноса"}),eO.length===v.length&&v.every((e,t)=>e.label===eO[t].label&&e.id===eO[t].id))?eO:(eO=v,v)},eZ=e=>e?56:80;var eV=l(71147),eW=l(6252),eH=l(50586),eq=l.n(eH),eQ=l(75340),ez=l(29023),eJ=l(88060),eX=l(10034),eK=l.n(eX);let eY=e=>{(0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},e$=e=>{let{filter:t,className:l,isMobile:i,bankOptions:o,banks:r,town:s,region:u}=e,c=(0,eQ.lJ)(),d=(0,a.useRef)(null),p=(0,a.useRef)(()=>null),[v,m]=(0,a.useState)(!1),[b,h]=(0,a.useState)(!1),[g,f]=(0,a.useState)(null),{count:x,totalCount:C,increaseSort:y,sort:T,handleToggleModal:N,setIncreaseSort:j,setSort:A,isPageLoading:k,handleLoadMore:S,autoCredits:L,isLoading:R,amount:F,firstPayment:I,period:D}=t,[E,P]=(0,a.useState)(),U=(0,a.useMemo)(()=>eB(t,o),[o,t]),O=(0,a.useCallback)(()=>{N()},[N]),B=(0,a.useMemo)(()=>L.map(e=>{let t=ed({banks:r,autoCredit:e}),l={};void 0!==F&&0!==F&&(l.amount=F),void 0!==I&&0!==I&&(l.first_payment=I),void 0!==D&&0!==D&&(l.period=D);let n=(0,eW.R)(l);return Object.keys(l).length&&(t.url="".concat(t.url,"#").concat(n)),t}),[F,L,r,I,D]),Z=(0,a.useCallback)(e=>{if(null===e)return;let t=L.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:""}}},[L]),V=(0,a.useCallback)(()=>{P(void 0)},[]),W=(0,a.useCallback)(e=>{var t;P(Z(e)),f(null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null),null!==e&&(0,H.D)({eventCategory:w.u.AUTOCREDIT,eventAction:H.i.popup,eventActionText:e.title,eventLabel:e.id})},[Z]);(0,a.useEffect)(()=>{window.removeEventListener("scroll",p.current);let e=eZ(i);return p.current=()=>{if(null===d.current)return;let{top:t}=d.current.getBoundingClientRect();m(t<e-3),h(t<=e+1)},window.addEventListener("scroll",p.current),()=>window.removeEventListener("scroll",p.current)},[i]);let q=(null==u?void 0:u.name_p)!==void 0?(null==s?void 0:s.name_p)?"в ".concat(null==s?void 0:s.name_p):"в ".concat(null==u?void 0:u.name_p):null,Q=10*t.page<x;return(0,n.jsxs)("section",{className:(0,M.Z)(eK().section,l),children:[(0,n.jsx)(_.t,{children:(0,n.jsxs)("p",{className:eK().title,children:["Найдено ",x," ",(0,n.jsx)("span",{className:eK().titleHide,children:(0,eV.s)(x)})," ",q,x===C||0===x?"":"из ".concat(C)]})}),(0,n.jsx)("div",{ref:d,className:(0,M.Z)(eK().filter,eK().newLayout,{[eK().filterBottom]:v}),children:(0,n.jsx)(eF.p,{chips:U,onChangeIncreaseSort:j,onChangeSortType:A,onClickChip:O,onClickParams:N,sortTypeItems:eR.$m,sortTypeValue:T,isIncreaseSort:y,isMobile:i,isFixed:b})}),(0,n.jsxs)(_.t,{children:[(0,n.jsx)("p",{className:eK().listTitle,ref:c,children:"Предложения рынка кредитов"}),(0,n.jsx)("div",{children:!R&&B.map((e,t)=>(0,n.jsxs)(a.Fragment,{children:[(0,n.jsx)(ea,{onDetailInfoClick:W,className:eK().listItem,data:e,onClick:eY,text:"Подать заявку",detailData:{data:Z(e),mainPageUrl:w.u.AUTOCREDIT}},e.url),2===t&&(0,n.jsx)(eP,{className:eK().adv})]},e.id))}),R&&Array.from({length:6},(e,t)=>(0,n.jsx)(eU.O,{className:eK().listItem},t)),Q&&(0,n.jsx)(eJ.f,{page:t.page,loading:k,onClick:S}),(0,n.jsx)(ez.i,{tag:"p",className:eq().subtitle,children:t.subtitle})]}),(0,n.jsx)(er.h,{data:E,isOpen:!!E,onClose:V,mainPageUrl:w.u.AUTOCREDIT,offerType:g})]})};function eG(e){let t=(0,I.b)(e.full_price);return{...e,full_price:t}}async function e0(e,t){let{tagUrl:l,regionUrl:n,townUrl:i,limit:a=10,...o}=e,r=function(e){let{limit:t,tagUrl:l,regionUrl:n,townUrl:i,amount:a,firstPayment:o,period:r,loan:s,incomeProof:u,insuranceNeed:c,vehicleState:d,vehicleType:p,stateCoFinancing:v,bank:m,sort:_,order:b,payment:h,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!==i&&x.set("town",i),void 0!==a&&x.set(eR.oA.amount,a),void 0!==o&&x.set(eR.oA.firstPayment,String(o)),void 0!==r&&x.set(eR.oA.period,String(r)),void 0!==s&&x.set(eR.oA.loan,s.join(",")),void 0!==u&&x.set(eR.oA.incomeProof,Array.isArray(u)?u.join(","):u),void 0!==c&&x.set(eR.oA.insuranceNeed,c?"1":"0"),void 0!==d&&x.set(eR.oA.vehicleState,d.join(",")),void 0!==p&&x.set(eR.oA.vehicleType,p.join(",")),void 0!==v&&x.set(eR.oA.stateCoFinancing,v?"1":"0"),void 0!==m&&x.set(eR.oA.bank,m.join(",")),void 0!==_&&x.set(eR.oA.sort,_),void 0!==b&&x.set(eR.oA.order,b),void 0!==h&&x.set(eR.oA.payment,h),void 0!==g&&x.set(eR.oA.page,String(g)),void 0!==f&&x.set(eR.oA.borrower,f.join(",")),x.set("archive","0"),x.toString()}({limit:a,regionUrl:n,tagUrl:l,townUrl:i,...o}),{data:s,error:u}=await (0,ew.D)("/money_data/AutoCredits.json?".concat(r),{signal:t});if(u||null===s)throw Error(null!=u?u:"Ошибка загрузки данных");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(eG),count:s.autoCredits_count,totalCount:s.autoCredits_total_count,title:s.title,subtitle:s.subtitle,description:s.description}}var e1=l(65709),e2=l(32368),e4=l(60007),e3=l(44735);async function e5(){return(await (0,e1.$u)("AutoCredits.json?tags&short=1")).autoCredit_tags.reduce((e,t)=>(t.name!==e3.V4&&e.set(t.url,function(e){let{name:t,url:l,url_redirect:n}=e,i={name:t,url:l},a=(0,e4.d)(n);return void 0!==a&&(i.url_redirect=a),i}(t)),e),new Map)}new e2.$(e5),l(51138),l(96202);var e8=l(37171);function e7(e){let{banks:t,layout:l,refererTag:i,description:a,offer:o,posts:r,questions:s,offers:u,offersFinuslugi:c}=e;return(0,n.jsx)(e8.A,{data:l,children:(0,n.jsx)(eS,{offer:o,posts:r,questions:s,description:a,banks:t,refererTag:i,offers:u,offersFinuslugi:c})})}var e6=l(423),e9=l(66535),te={src:"/kredity/assets/_next/static/media/filter.0c02ec9e.svg",height:16,width:16,blurWidth:0,blurHeight:0},tt=l(65594),tl=l.n(tt);let tn=(0,a.memo)(e=>{let{count:t,onClickParams:l,onClickShow:i,isLoading:a,className:r}=e;return(0,n.jsxs)("div",{className:(0,M.Z)(tl().buttons,r),children:[(0,n.jsx)(o.zx,{variant:"secondary",size:"xs",pending:a,disabled:a,className:(0,M.Z)(tl().filterButton,tl().modalButton),onClick:e=>l(e),iconLeft:(0,n.jsx)(s(),{src:te,alt:""}),children:"Все параметры"}),(0,n.jsxs)(o.zx,{size:"xs",className:tl().filterButton,pending:a,disabled:a,onClick:i,children:["Показать ",t]})]})});tn.displayName="FilterActions";var ti=l(58484),ta=l(91646),to=l(98028),tr=l(7835),ts=l.n(tr);let tu=(0,a.memo)(e=>{let{checkedState:t,onChange:l,className:i}=e;return(0,n.jsxs)("ul",{className:(0,M.Z)(ts().wrapper,i),children:[(0,n.jsxs)("li",{className:ts().item,children:[(0,n.jsx)(o.XZ,{className:ts().checkbox,onChange:()=>l("insuranceNeed",!t.insuranceNeed),checked:t.insuranceNeed,value:t.insuranceNeed,label:"Без каско"}),(0,n.jsx)(to.J,{content:"По закону, каско покупать необязательно, но такая страховка компенсирует вам ущерб, даже если вы виновны в ДТП. Каско можно включить в стоимость кредита.",children:(0,n.jsx)(to.L,{className:ts().detailIcon})})]}),(0,n.jsxs)("li",{className:ts().item,children:[(0,n.jsx)(o.XZ,{className:ts().checkbox,onChange:()=>l("stateCoFinancing",!t.stateCoFinancing),checked:t.stateCoFinancing,value:t.stateCoFinancing,label:"С господдержкой"}),(0,n.jsx)(to.J,{content:"Поддержка, при которой часть средств предоставляет государство. Их можно потратить только на автомобили определенных марок.",children:(0,n.jsx)(to.L,{className:ts().detailIcon})})]}),(0,n.jsx)("li",{children:(0,n.jsx)(o.XZ,{className:ts().checkbox,onChange:()=>l("notFirstPayment",!t.notFirstPayment),checked:t.notFirstPayment,value:t.notFirstPayment,label:"Без первого взноса"})})]})});tu.displayName="AutoCreditsFilterDops";var tc=l(4645),td=l.n(tc);let tp=(0,a.memo)(e=>{let{activeIds:t=[],items:l,onChange:i,className:a}=e,r=(e,l)=>{i(l?t.filter(t=>String(e)!==t):[...t,String(e)])};return(0,n.jsx)("div",{className:(0,M.Z)(td().tagsWrapper,a),children:l.map(e=>{let l=t.some(t=>t===e.value);return(0,n.jsx)(o.zx,{className:td().tag,variant:l?"primary":"secondary",onClick:()=>r(e.value,l),children:e.labelShort},e.value)})})});tp.displayName="AutoCreditsTags";var tv=l(45117),tm=l(86992),t_=l(30715),tb=l.n(t_);let th=e=>{(0,ee.l)({event:"data-event",eventAction:e,eventCategory:w.u.AUTOCREDIT})},tg=e=>{var t;let l=null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"";th("click_button_".concat((0,et.b)(l)))},tf=e=>{let{region:t,town:l,className:i,tag:o,isMobile:r,filter:s,subtitle:u,adFoxConfig:c}=e,{scrollSmooth:d}=(0,eQ.vO)(),{count:p,isLoading:v,amount:m,firstPayment:_,vehicleType:b,setVehicleType:h,insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x,setInsuranceNeed:C,setStateCoFinancing:y,setNotFirstPayment:T,handleToggleModal:N,firstPaymentPercent:j,handleChangeFirstPayment:A,handleChangeAmount:k}=s,S=(0,a.useCallback)(e=>{tg(e),N()},[N]),L=(0,a.useCallback)(e=>{tg(e),d({offset:-90})},[d]),R=(0,a.useMemo)(()=>({insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x}),[g,x,f]),F=(0,a.useCallback)((e,t)=>{switch(e){case"insuranceNeed":C(t);break;case"notFirstPayment":T(t),A(t?0:void 0);break;case"stateCoFinancing":y(t)}},[A,C,T,y]);return(0,n.jsxs)("div",{className:(0,M.Z)(i),children:[(0,n.jsxs)("div",{className:tb().pageHeadingWrap,children:[(0,n.jsx)(ti.V,{region:t,town:l,title:o&&"DEFAULT"!==o.tag_name?null==o?void 0:o.name:"Автокредиты",subtitle:u,mainPageUrl:w.u.AUTOCREDIT}),(0,n.jsx)("div",{className:tb().banner,children:(0,n.jsx)(ta.Z,{config:c,params:tv.P3})})]}),(0,n.jsxs)(e9.W2,{className:tb().container,children:[(0,n.jsxs)("div",{className:tb().filter,children:[(0,n.jsxs)("div",{className:tb().fields,children:[(0,n.jsx)(tm.P,{label:"Сумма кредита",placeholder:"Сумма кредита",value:m,onChange:k}),(0,n.jsx)(tm.P,{label:"Первый взнос",value:_,rightLabel:"".concat(j,"%").replace(".",","),caption:j>100?eR.N2:void 0,state:j>100?"error":void 0,onChange:A})]}),!r&&(0,n.jsx)(tn,{count:p,onClickParams:S,onClickShow:L,isLoading:v})]}),(0,n.jsx)(tp,{className:tb().tagsWrapper,items:eR.PY,activeIds:b,onChange:h}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:tb().dopsTitle,children:"Дополнительно"}),(0,n.jsx)(tu,{className:tb().dops,onChange:F,checkedState:R})]}),r&&(0,n.jsx)(tn,{count:p,onClickParams:S,onClickShow:L,isLoading:v})]})]})};var tx=l(56790),tC=l(27685),ty=l.n(tC);let tT=e=>{let{isOpen:t,pageUrl:l,title:i,onCLickShow:r,onClickReset:s,onClose:u,children:c,count:d,isLoading:p}=e;(0,a.useEffect)(()=>{t&&(0,ee.l)({event:"data-event",eventAction:"show_pop_up_".concat((0,et.b)(i)),eventCategory:l})},[t,l,i]);let v=e=>{var t;let n=null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"";(0,ee.l)({event:"data-event",eventAction:"click_button_".concat((0,et.b)(n)),eventCategory:l})},m=(0,n.jsxs)("div",{className:ty().buttonActions,children:[(0,n.jsxs)(o.zx,{className:ty().button,pending:p,disabled:p,onClick:e=>{v(e),r()},children:["Показать ",d]}),(0,n.jsx)(o.zx,{variant:"secondary",className:ty().button,disabled:p,onClick:e=>{v(e),s()},children:"Сбросить параметры"})]});return(0,n.jsx)(tx.h,{children:(0,n.jsx)(o.u_,{className:ty().mobilePopup,open:t,onClose:u,footer:{children:m},header:{title:"Все параметры"},children:(0,n.jsx)("div",{className:ty().content,children:c})})})},tN=(e,t)=>{(0,ee.l)({event:"data-event",eventAction:w.u.AUTOCREDIT,eventCategory:"filter_catalog",eventLabel:(0,et.b)(e),eventValue:t})},tj=(e,t)=>{tN(e,(null!=t?t:[]).map(e=>e.label).join(","))};var tA=l(10622),tk=l.n(tA);let tS=e=>{let{filter:t,isMobile:l,bankOptions:i}=e,{handleToggleModal:r,resetFilter:s,amount:u,firstPayment:c,setPeriod:d,period:p,payment:v,incomeProof:m,setIncomeProof:_,vehicleType:h,setVehicleType:g,vehicleState:f,setVehicleState:x,borrower:C,setBorrower:y,loan:T,setLoan:N,banks:j,setBank:A,isLoading:k,insuranceNeed:S,stateCoFinancing:L,setInsuranceNeed:R,setStateCoFinancing:F,setSort:I,sort:D,notFirstPayment:E,setNotFirstPayment:P,firstPaymentPercent:U,handleChangeAmount:O,handleChangeFirstPayment:B,handleChangePayment:Z}=t,V=(0,a.useMemo)(()=>eR.vw.find(e=>e.value===p),[p]),W=(0,a.useMemo)(()=>eR.eT.filter(e=>null==m?void 0:m.includes(e.value)),[m]),H=(0,a.useMemo)(()=>eR.Ht.filter(e=>null==h?void 0:h.includes(e.value)),[h]),q=(0,a.useMemo)(()=>eR.QN.filter(e=>null==f?void 0:f.includes(e.value)),[f]),Q=(0,a.useMemo)(()=>eR.F$.filter(e=>null==C?void 0:C.includes(e.value)),[C]),z=(0,a.useMemo)(()=>eR.Z3.filter(e=>null==T?void 0:T.includes(e.value)),[T]),X=(0,a.useMemo)(()=>i.filter(e=>null==j?void 0:j.includes(Number(e.value))),[i,j]),K=(0,a.useCallback)(()=>{r(),(0,J.l)(b.Tm,{offset:l?0:-140,position:"top"})},[r,l]),{handleChangePeriod:Y,handleChangeIncomeProf:$,handleChangeVehicleType:G,handleChangeVehicleState:ee,handleChangeBorrower:et,handleChangeLoan:el,handleChangeBanks:en}=(0,a.useMemo)(()=>({handleChangePeriod:e=>{d(null==e?void 0:e.value),tj("Срок",eR.vw)},handleChangeIncomeProf:e=>{var t;_(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tj("Подтверждение дохода",e)},handleChangeVehicleType:e=>{var t;g(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tj("Тип транспорта",e)},handleChangeVehicleState:e=>{var t;x(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tj("Состояние транспорта",e)},handleChangeBorrower:e=>{var t;y(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tj("Категория заемщикаа",e)},handleChangeLoan:e=>{var t;N(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tj("Обеспечение",e)},handleChangeBanks:e=>{var t;A(null!==(t=null==e?void 0:e.map(e=>Number(e.value)))&&void 0!==t?t:[]),tj("Банки",e)}}),[A,y,_,N,d,x,g]),ei=(0,a.useMemo)(()=>({insuranceNeed:S,stateCoFinancing:L,notFirstPayment:E}),[S,E,L]),ea=(0,a.useCallback)((e,t)=>{switch(e){case"insuranceNeed":R(t);break;case"notFirstPayment":P(t);break;case"stateCoFinancing":F(t)}},[R,P,F]);return(0,n.jsx)(tT,{count:t.count,isMobile:l,isOpen:t.isOpenModal,pageUrl:w.u.AUTOCREDIT,title:"Все параметры",onCLickShow:K,onClose:r,onClickReset:s,isLoading:k,children:(0,n.jsxs)("div",{className:tk().wrapper,children:[(0,n.jsxs)("div",{className:tk().fields,children:[(0,n.jsx)(tm.P,{className:tk().field,label:"Сумма кредита",value:u,onChange:O}),(0,n.jsx)(tm.P,{label:"Первый взнос",value:c,rightLabel:"".concat(U,"%").replace(".",","),caption:U>100?eR.N2:void 0,state:U>100?"error":void 0,onChange:B}),(0,n.jsx)(o.Ph,{value:V,onChange:Y,label:"Срок",optionValue:"value",optionLabel:"label",options:eR.vw}),(0,n.jsx)(tm.P,{label:"Ежемесячный платеж до",value:v,onChange:Z}),(0,n.jsx)(o.Ph,{value:W.length>0?W:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,onChange:$,multiple:!0,label:"Подтверждение дохода",optionValue:"value",optionLabel:"label",options:eR.eT}),(0,n.jsx)(o.Ph,{value:H.length>0?H:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:G,optionValue:"value",optionLabel:"label",label:"Тип транспорта",options:eR.Ht}),(0,n.jsx)(o.Ph,{value:q.length>0?q:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:ee,optionValue:"value",optionLabel:"label",label:"Состояние транспорта",options:eR.QN}),(0,n.jsx)(o.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:eR.F$}),(0,n.jsx)(o.Ph,{value:z.length>0?z:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,optionValue:"value",optionLabel:"label",onChange:el,label:"Обеспечение",options:eR.Z3}),(0,n.jsx)(o.Ph,{value:X.length>0?X:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:en,optionValue:"value",optionLabel:"label",label:"Банки",options:i})]}),(0,n.jsxs)("div",{className:tk().checkboxWrapper,children:[(0,n.jsx)("p",{className:tk().title,children:"Дополнительно:"}),(0,n.jsx)(tu,{className:tk().dops,checkedState:ei,onChange:ea}),(0,n.jsx)("p",{className:(0,M.Z)(tk().title,tk().titleSort),children:"Сортировать"}),eR.$m.map(e=>(0,n.jsx)(o.Y8,{label:e.label,name:e.value,value:e.value,checked:e.value===D,onChange:()=>I(e.value)},e.value))]})]})})};async function tw(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:i,error:a}=await (0,ew.D)("/money_data/AutoCreditRegion.json?".concat(n));if(a||null===i)throw Error(null!=a?a:"Ошибка загрузки данных");return i}var tL=l(91886);async function tR(e){let t=await (0,e1.$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:i,filter:a,default:o,region_page:r}=e,s={url:t,name:l,tag_name:n,text:i,filter:a,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 e2.n(tR);let tF=(e,t)=>{var l,n,i,a,o,r,s;let u=(0,eg.p)(e),{page:c}=u,d=String(null!==(n=null!==(l=u.amount)&&void 0!==l?l:null==t?void 0:t.filter.amount)&&void 0!==n?n:""),p=String(null!==(a=null!==(i=u.first_payment)&&void 0!==i?i:null==t?void 0:t.filter.first_payment)&&void 0!==a?a:""),v=String(null!==(r=null!==(o=u.period)&&void 0!==o?o:null==t?void 0:t.filter.period)&&void 0!==r?r:""),m=String(null!==(s=u.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(c)||1}},tM=(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 tI=l(30292);let tD=e=>{var t,l,n,i;let{region:o,tag:r,town:s,init:u}=e,{asPath:c}=(0,eh.useRouter)(),d=(0,a.useMemo)(()=>tF(c,r),[c,r]),p=(0,a.useRef)(null),[v,m]=(0,a.useState)(void 0!==d.amount?Number(d.amount):void 0),[_,b]=(0,a.useState)(void 0!==d.firstPayment?Number(d.firstPayment):void 0),[h,g]=(0,a.useState)(void 0!==d.payment?Number(d.payment):void 0),f=tM(null!=v?v:0,null!=_?_:0),x=v&&v>0?(0,q.z)(null!=f?f:0,1):0,{query:C}=(0,eh.useRouter)(),[y,T]=(0,a.useState)(Number(C.page)||1),[N,j]=(0,a.useState)(u.title),[A,k]=(0,a.useState)(u.subtitle),[S,w]=(0,a.useState)(u.description),[L,R]=(0,a.useState)(!1),[F,M]=(0,a.useState)(!1),[I,D]=(0,a.useState)(null!==(t=u.count)&&void 0!==t?t:0),[E,P]=(0,a.useState)(null!==(l=u.count)&&void 0!==l?l:0),[U,O]=(0,a.useState)(!1),[B,Z]=(0,a.useState)(null!==(n=u.list)&&void 0!==n?n:[]),[V,W]=(0,a.useState)(d.period),[H,Q]=(0,a.useState)(d.vehicleType),[z,J]=(0,a.useState)(d.vehicleState),[X,K]=(0,a.useState)(d.borrower),[Y,$]=(0,a.useState)(d.loan),[G,ee]=(0,a.useState)([]),[et,el]=(0,a.useState)(d.insuranceNeed),[en,ei]=(0,a.useState)(d.stateCoFinancing),[ea,eo]=(0,a.useState)(eR.$m[0].value),[er,es]=(0,a.useState)(!1),[eu,ec]=(0,a.useState)(null!==(i=null==r?void 0:r.filter.proof_income)&&void 0!==i?i:void 0),[ed,ep]=(0,a.useState)(!1),ev=(0,a.useRef)(!0),em=(0,a.useCallback)(()=>{O(e=>!e)},[]),e_=(0,a.useCallback)(async e=>{var t,l,n,i,a,u;p.current&&p.current.abort(),p.current=new AbortController;let c={amount:void 0!==v?String(v):"",firstPayment:void 0!==v?f:void 0,period:V,loan:Y,incomeProof:eu,insuranceNeed:et,stateCoFinancing:en,vehicleState:z,vehicleType:H,bank:G,order:ed?"desc":"asc",sort:ea,payment:void 0!==h?String(h):void 0,borrower:X};e>1?(c.page=e,M(!0)):R(!0);let d=await e0({tagUrl:null==r?void 0:r.url,regionUrl:null==o?void 0:o.url,townUrl:null==s?void 0:s.url,...c},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:"",b=null!==(n=null==d?void 0:d.subtitle)&&void 0!==n?n:"",g=null!==(i=null==d?void 0:d.description)&&void 0!==i?i:"";D(null!==(a=null==d?void 0:d.count)&&void 0!==a?a:0),P(null!==(u=null==d?void 0:d.totalCount)&&void 0!==u?u:0),j(_),k(b),w(g),Z(t=>e>1?[...t,...m]:m),M(!1),R(!1)},[v,G,X,f,eu,ed,et,Y,h,V,o,ea,en,r,s,z,H]),eb=(0,a.useCallback)(()=>{T(e=>{let t=e+1;return e_(t),t})},[e_]),eg=(0,a.useCallback)(e=>{m(void 0!==e&&0!==e?Math.abs(e):void 0)},[]),ef=(0,a.useCallback)(e=>{b(void 0!==e&&0!==e?Math.abs(e):void 0)},[]),ex=(0,a.useCallback)(e=>{g(void 0!==e&&0!==e?Math.abs(e):void 0)},[]);(0,a.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),Q(d.vehicleType),J(d.vehicleState),W(d.period),K(d.borrower),$(d.loan),el(d.insuranceNeed),ei(d.stateCoFinancing),ec(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,r]),(0,a.useEffect)(()=>{es(0===_)},[_]);let eC=(0,a.useCallback)(()=>{m(void 0),b(void 0),g(void 0),W(void 0),Z([]),Q(void 0),J(void 0),K(void 0),$(void 0),ee([]),el(void 0),ei(void 0),ec(void 0),ep(!1)},[]);return(0,tI.b)(()=>{ev.current?ev.current=!1:e_(y)},[e_],300),{isLoading:L,isPageLoading:F,title:N,subtitle:A,description:S,handleLoadMore:eb,autoCredits:B,count:I,totalCount:E,page:y,period:V,setPeriod:W,amount:v,firstPayment:_,isOpenModal:U,setIsOpenModal:O,vehicleType:H,setVehicleType:Q,insuranceNeed:et,stateCoFinancing:en,setInsuranceNeed:el,setStateCoFinancing:ei,handleToggleModal:em,resetFilter:eC,payment:h,incomeProof:eu,setIncomeProof:ec,vehicleState:z,setVehicleState:J,borrower:X,setBorrower:K,loan:Y,setLoan:$,banks:G,setBank:ee,sort:ea,setSort:eo,increaseSort:ed,setIncreaseSort:ep,notFirstPayment:er,setNotFirstPayment:es,firstPaymentPercent:x,handleChangeFirstPayment:ef,handleChangeAmount:eg,handleChangePayment:ex}};var tE=l(61929),tP=l(77624),tU=l(93259),tO=l(42968),tB=l(23259),tZ=l(30942),tV=l(93890),tW=l(12261),tH=l(30975),tq=l(38090),tQ=l(22518),tz=l(91500),tJ=l(97647),tX=l.n(tJ);let tK=e=>{var t;let l=(null==e?void 0:null===(t=e.currentTarget)||void 0===t?void 0:t.textContent)?(0,et.b)(e.currentTarget.textContent):"glavnaya";(0,ee.l)({event:"data-event",eventAction:"click_link_".concat(l),eventCategory:w.u.AUTOCREDIT})},tY=e=>{var t,l,i,r,u;let{offers:p,count:h,tag:g,tags:f,townDublicates:x,posts:C,regions:y,banks:T,title:N,subtitle:j,description:A,expertQuote:k}=e,S=(0,eC.S0)(),{region:L,town:R}=(0,ev.T)(),[F,I]=(0,a.useState)(k),{asPath:D}=(0,eh.useRouter)(),E=null!==(l=null===(t=D.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,a.useState)(e);return(0,tL.rf)(()=>{(0,e1.m6)("autocredits/tag?".concat("url","=").concat(t)).then(n)},[n,t]),l}(g,E),U=function(e,t,l,n){let[i,o]=(0,a.useState)(e);return(0,tL.rf)(()=>{tw(t,l,n).then(e=>{let{posts:t}=e;return o(t)})},[t,l,n]),i}(C,E,null==L?void 0:L.url,null==R?void 0:R.url),O=tD({region:L,town:R,tag:P,init:{count:h,list:p,subtitle:j,title:N,description:A}}),B=(0,tW.iN)(D);(0,tL.rf)(()=>{(0,tq.r5)(B).then(I)},[B]);let Z=(0,tB.I)(),V=(0,tZ.U)(),W=(0,a.useMemo)(()=>(0,tP.n)(T,O.banks),[T,O.banks]),{mainBaseUrl:H}=(0,ep.ZR)(),q=(0,a.useMemo)(()=>{var e;let{autoCredits:t}=O,l=1/0,n=0;t.forEach(e=>{let{amount:t}=e;if(t){let e=t.from?+t.from:0,i=t.to?+t.to:0;l=Math.min(l,e),n=Math.max(n,i)}});let i=null!==(e=O.description)&&void 0!==e?e:"",a='"offers":{"@type":"AggregateOffer","url":"'.concat(H).concat(D,'","priceCurrency":"').concat("RUB",'","lowPrice":"').concat((0,z.uf)(l!=1/0?l:0),'","highPrice":"').concat((0,z.uf)(n),'"}');return'{"@context":"https://schema.org","@type":"Product","name":"'.concat(O.title,'","image":"').concat(H).concat(e6.oQ,'","description":"').concat(i,'",').concat(a,"}")},[O,H,D]),Q=P&&"DEFAULT"!==P.tag_name?null==P?void 0:P.name:"Автокредиты",J=(null==R?void 0:R.name_p)||(null==L?void 0:L.name_p)?" в ".concat((null==R?void 0:R.name_p)||(null==L?void 0:L.name_p)):"",X="".concat((null==L?void 0:L.url)?"/reg_".concat(null==L?void 0:L.url):"").concat((null==R?void 0:R.url)?"/".concat(null==R?void 0:R.url):""),K=(()=>{let e=P&&"DEFAULT"!==P.tag_name?',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(Q).concat(J,'","item":"').concat(H).concat(D,'"}'):"",t='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(H,'"}'),l='{"@type":"ListItem","position":2,"name":"Автокредиты'.concat(J,'","item":"').concat(H,"/").concat(w.u.AUTOCREDIT).concat(X,'"}');return"{".concat('"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":['.concat(t),",").concat(l).concat(e,"]}")})(),Y=(0,a.useMemo)(()=>{let e=[];e.push(...(0,tz.a)(w.u.AUTOCREDIT,y,P,L,R,{nominativeCase:"Автокредиты",genitiveCase:"автокредитов"}));let t=f.reduce((e,t)=>{if(void 0===t.url_redirect){let l=(0,tO.h)(w.u.AUTOCREDIT,t,L,R),n=(0,tV.q9)(l,t.name);e.push(n)}return e},[]);if(e.push({title:"Виды автокредитов",text:(0,n.jsx)(tV.oP,{children:t})}),L){var l,i;e.push(...null!==(i=null===(l=P.region_page)||void 0===l?void 0:l.town_content.map(e=>({title:(0,tU.Q)(e.title,L,R,x,void 0,P),text:(0,tU.Q)(e.content.map(tE.Rp).join(""),L,R,x,void 0,P)})))&&void 0!==i?i:[])}else e.push(...P.text.map(e=>({title:(0,tU.Q)(e.title,L,R,x,void 0,P),text:(0,tU.Q)(e.content.map(tE.Rp).join(""),L,R,x,void 0,P)})));return e},[L,f,y,P,R,x]),$=U?C.map(e=>({...e,id:e.id,name:e.title,ctg_id:e.ctg})):[];return(0,n.jsxs)("main",{className:tX().page,children:[(0,n.jsx)(m.N,{title:null!==(i=O.title)&&void 0!==i?i:"",description:null!==(r=O.description)&&void 0!==r?r:""}),(0,n.jsx)(eT.o,{}),(0,n.jsx)("div",{className:(0,M.Z)(tX().background,"bg-".concat(V))}),(0,n.jsx)("div",{className:tX().navigationWrapper,children:(0,n.jsxs)(_.t,{children:[(0,n.jsx)(o.Oo,{className:tX().breadcrumbs,items:(()=>{let e=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(J),href:"/".concat(w.u.AUTOCREDIT).concat(X)}];return"DEFAULT"!==E&&e.push({label:"".concat(Q).concat(J),href:"/".concat(w.u.AUTOCREDIT,"/teg_").concat(E).concat(X)}),e.pop(),e.push({label:"".concat(Q).concat((null==P?void 0:P.default)?J:"")}),e})(),onClick:tK}),(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:K}})]})}),(0,n.jsx)(_.t,{children:(0,n.jsx)(tf,{region:null!=L?L:null,town:null!=R?R:null,isMobile:S,tag:P,filter:O,subtitle:null!==(u=O.subtitle)&&void 0!==u?u:"",adFoxConfig:Z})}),(0,n.jsx)(e$,{banks:T,bankOptions:W,filter:O,isMobile:S,town:R,region:L}),(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:q}}),void 0!==F&&(0,n.jsx)(tQ.c,{quote:F}),(0,n.jsx)(tH.n,{type:"bank"}),(0,n.jsx)(eN.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,n.jsx)(c(),{...e}),dataLayerPush:ee.l,questions:Y,eventCategory:"cards_support_block",href:"".concat(H,"/help"),checkAllText:"Читать все вопросы про автокредиты"}),(0,n.jsx)(tS,{bankOptions:W,isMobile:S,filter:O}),$&&(0,n.jsx)(v.S,{posts:$,pageUrl:w.u.AUTOCREDIT,categories:[]}),(0,n.jsx)("div",{className:tX().supportSection,children:(0,n.jsx)(ej.O,{idSupport:b.Je,Image:e=>(0,n.jsx)(s(),{...e,width:555,height:344,src:d.Z,alt:"фоновое изображение"}),dataLayerPush:ee.l,eventEmitter:()=>window.supportWidget.craftTalk.open()})})]})};function t$(e){let{layout:t,root:l,banks:i,offers:a,posts:o,tags:r,tag:s,expertQuote:u}=e;return(0,n.jsx)(e8.A,{data:t,withLocationConfirm:!0,children:(0,n.jsx)(tY,{regions:l.regions,townDublicates:l.town_dublicates,banks:i,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!=u?u:void 0})})}l(35388),l(27714);var tG=l(28254),t0=l(80330),t1=!0,t2=(0,a.memo)(function(e){var t,l;return(0,n.jsx)(i.sM,{children:e.isShowcase?(0,n.jsx)(tG.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,n.jsx)(t$,{...e})}):(0,n.jsx)(t0.M,{children:(0,n.jsx)(e7,{...e})})})})},73654:function(e){e.exports={logo:"AutoCreditListItem_logo__KzLbz",placeholderLogo:"AutoCreditListItem_placeholderLogo__9xMXP"}},65594:function(e){e.exports={buttons:"FilterActions_buttons__M1NwR",filterButton:"FilterActions_filterButton__Nlxda",modalButton:"FilterActions_modalButton__ta3GX"}},27685:function(e){e.exports={buttonActions:"FilterModal_buttonActions__x7_d8",button:"FilterModal_button__wUY6f",content:"FilterModal_content__0T5By",mobilePopup:"FilterModal_mobilePopup__qAuSl"}},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",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"}}},function(e){e.O(0,[5249,2935,6832,9705,1261,7359,3996,4457,5059,386,2047,709,3091,2888,9774,179],function(){return e(e.s=9677)}),_N_E=e.O()}]);