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