(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7876],{17722:function(e,t){"use strict";t.Z={src:"/kredity/assets/_next/static/media/banner-1.cbec846c.svg",height:208,width:301,blurWidth:0,blurHeight:0}},93188:function(e,t,a){"use strict";a(98670)},24443:function(e,t,a){"use strict";a.d(t,{y:function(){return g}});var l=a(85893),n=a(34588),i=a(86010),s=a(25675),r=a.n(s),o=a(67294),c=a(79553),d=a.n(c),u=a(86992);let p=e=>{switch(e.type){case"moneyInput":{let{value:t,onChange:a,onFocus:n,onBlur:i,label:s,inputRef:r}=e.props;return(0,l.jsx)("div",{children:(0,l.jsx)(u.P,{ref:r,label:s,value:t,onChange:a,onFocus:n,onBlur:i})})}case"divider":return(0,l.jsx)("div",{className:d().divider});case"inputRange":return(0,l.jsx)("div",{className:(0,i.Z)(d().field,d().fieldRange),children:(0,l.jsx)(n.OX,{...e.props})});case"select":return(0,l.jsx)(n.Ph,{...e.props,className:(0,i.Z)(d().field,e.props.className)});case"chips":return(0,l.jsx)(n.cL,{...e.props,className:(0,i.Z)(d().chipsForm,e.props.className)});default:throw Error("Dead code branch")}};var m=a(13442),_=a(46203),h=a(39918),v=a(30251),f=a(98028),C=a(8344),x=a(93478);let g=(0,o.memo)(e=>{let{title:t,pageUrl:a,infoLink:s,chips:c,items:u,additionalItems:g,additionalItemsTitle:j,isMobile:T,isShowChips:b,isExpandSettings:k,onToggleSettings:N}=e,w=e=>{(0,h.D)({eventCategory:a,eventAction:h.i.popup,eventActionText:e}),null==N||N()},y=(0,o.useCallback)(()=>s?(0,x.l)(s.idScrollBlock,{offset:T?0:-100,position:"top"}):null,[T,s]),[L,A]=(0,o.useState)(()=>u.filter(e=>!!e).reduce((e,t,a)=>t&&t.elements.length>1&&t.isCollapsedElements?{...e,[a]:!0}:e,{}));(0,o.useEffect)(()=>{u.filter(e=>!!e).forEach((e,t)=>{e&&A(a=>({...a,[t]:e.isCollapsedElements}))})},[u]);let R=(0,o.useCallback)(e=>{A(t=>({...t,[e]:!t[e]}))},[]);return(0,l.jsxs)(v.G,{className:(0,i.Z)(d().container),children:[(0,l.jsxs)("button",{className:d().title,onClick:()=>w(t),children:[t,(0,l.jsx)(r(),{className:(0,i.Z)(d().collapseArrow,k&&d().collapseArrowOpened),src:C.Z,alt:""})]}),(0,l.jsxs)(_.u,{className:d().fieldsContainer,isOpen:k||!T,children:[(0,l.jsx)("div",{className:d().fieldsWrapper,children:u.filter(e=>!!e).map((e,t)=>{if(!e)return;let{titleElements:a,elements:s,onToggle:r}=e,o=s.map((e,a)=>{if(e.isHidden)return null;let n=p(e);return(0,l.jsxs)("div",{className:d().fieldWrapper,children:[n,(null==e?void 0:e.desription)&&"inputRange"===e.type?(0,l.jsx)(f.J,{triggerClassName:d().tooltip,content:e.desription}):e.desription]},t+"."+a)});return s.length>1?(0,l.jsxs)("div",{className:d().collapseContainerWrapper,children:[(0,l.jsxs)("div",{className:(0,i.Z)(d().additionalItem,!L[t]&&d().collapsedContainer),children:[(0,l.jsxs)("div",{className:d().additionalItemName,children:[(0,l.jsx)("span",{children:a}),(0,l.jsx)(f.J,{content:"Государство выделяет деньги на поддержку семей с детьми. Эти деньги можно вложить в ипотеку"})]}),(0,l.jsx)(n.ZD,{checked:L[t],onChange:()=>{null==r||r(!L[t]),R(t)},flipped:!0})]}),(0,l.jsx)(_.u,{className:(0,i.Z)({[d().collapseContainer]:L[t]}),isOpen:L[t],children:o})]},t):o})}),g&&!!(null==g?void 0:g.length)&&(0,l.jsxs)("div",{className:d().additionalItemsWrapper,children:[!!(null==j?void 0:j.length)&&(0,l.jsx)("h3",{className:d().additionalItemsTitle,children:j}),(0,l.jsx)("ul",{className:d().additionalItemsList,children:g.map((e,t)=>(0,l.jsxs)("li",{className:d().additionalItem,children:[(0,l.jsxs)("div",{className:d().additionalItemName,children:[(0,l.jsx)("span",{children:e.name}),e.tooltip&&(0,l.jsx)(f.J,{content:e.tooltip})]}),(0,l.jsx)(n.ZD,{...e})]},t))})]}),s&&(0,l.jsx)(m.j,{offPadding:s.offPadding,widthMaxContent:s.widthMaxContent,text:s.text,iconColor:"light",mainPageUrl:a,className:d().link,onClick:y})]}),b&&c&&(0,l.jsx)(n.cL,{className:d().chips,chips:c,value:c.map(e=>e.id),activeVariant:"secondary",size:"m",multiple:!0})]})});g.displayName="Calculator"},84135:function(e,t,a){"use strict";a.d(t,{h:function(){return g}});var l=a(85893),n=a(34588),i=a(86010),s=a(67294),r=a(56790),o=a(65848),c=a(73897),d=a(39918),u=a(85449),p=a(57696);let m=[{id:c.u.AUTOCREDIT,name:"автокредита",name_p:"автокредиту"},{id:c.u.KARTY,name:"карты",name_p:"карте"},{id:c.u.POTREBITELSKIE,name:"кредита",name_p:"кредиту"},{id:c.u.IPOTEKA,name:"ипотеки",name_p:"ипотеки"},{id:c.u.CALCULATOR,name:"калькулятора",name_p:"калькулятору"}],_=e=>{let t={paramsTitle:"",termsTitle:"",companyTitle:"",requirementsVehicleTitle:"",paramsRows:[],termsRows:[],companyRows:[],requirementsVehicleRows:[]};if(!e)return t;let{data:a,cardTypes:n,contactlessCardTypes:i,mainPageUrl:r}=e;if(!a)return t;let o=[],d=[],_=[],h=[];if(t.paramsTitle="Параметры ".concat(m.filter(e=>e.id===r)[0].name),t.termsTitle="Условия по ".concat(m.filter(e=>e.id===r)[0].name_p),t.requirementsVehicleTitle="Требования к ТС",t.companyTitle="О банке",c.u.AUTOCREDIT===r){let{params:e,terms:t,company:l,requirementsVehicle:n}=(0,p.yi)(a);o=e,d=t,_=l,h=n}if(c.u.IPOTEKA===r){let{params:e,terms:t,company:l}=(0,p.ce)(a);o=e,d=t,_=l}if(c.u.KARTY===r&&n&&i){let{params:e,company:t}=(0,p.RT)(a,n,i);o=e,_=t}if([c.u.POTREBITELSKIE,c.u.CALCULATOR].includes(r)){let{params:e,terms:t,company:l}=(0,p.cu)(a);o=e,d=t,_=l}return t.paramsRows=o.map(e=>(0,l.jsx)(s.Fragment,{children:(0,l.jsx)(u.a,{...e})},e.label)),t.termsRows=d.map(e=>(0,l.jsx)(s.Fragment,{children:(0,l.jsx)(u.a,{...e})},e.label)),t.companyRows=_.map(e=>(0,l.jsx)(s.Fragment,{children:(0,l.jsx)(u.a,{...e})},e.label)),t.requirementsVehicleRows=h.map(e=>(0,l.jsx)(s.Fragment,{children:(0,l.jsx)(u.a,{...e})},e.label)),t};var h=a(40741),v=a(87907),f=a(53568),C=a.n(f);let x=e=>e.loading?(0,l.jsx)("div",{className:C().cards_list,children:Array.from({length:24},(e,t)=>(0,l.jsx)(o.O,{className:(0,i.Z)(C().card,C().skeletonCard)},t))}):e?(0,l.jsxs)("div",{className:C().content,children:[!!e.paramsRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:C().listTitle,children:e.paramsTitle}),(0,l.jsx)("ul",{className:C().list,children:e.paramsRows})]}),!!e.termsRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:C().listTitle,children:e.termsTitle}),(0,l.jsx)("ul",{className:C().list,children:e.termsRows})]}),!!e.requirementsVehicleRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:C().listTitle,children:e.requirementsVehicleTitle}),(0,l.jsx)("ul",{className:C().list,children:e.requirementsVehicleRows})]}),!!e.companyRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:C().listTitle,children:e.companyTitle}),(0,l.jsx)("ul",{className:C().list,children:e.companyRows})]}),(0,l.jsx)(v.j,{className:C().actualDate,pageUrl:e.mainPageUrl,offerDate:e.updateDate})]}):null,g=e=>{var t,a,i,o,u,p,m;let v="Все условия по ".concat(e.mainPageUrl===c.u.AUTOCREDIT?"автокредиту":e.mainPageUrl===c.u.KARTY?"карте":"кредиту"),f=(0,s.useMemo)(()=>_({data:e.data,cardTypes:e.cardTypes,contactlessCardTypes:e.contactlessCardTypes,mainPageUrl:e.mainPageUrl===c.u.CALCULATOR?c.u.POTREBITELSKIE:e.mainPageUrl}),[e.data,e.cardTypes,e.contactlessCardTypes,e.mainPageUrl]),g=t=>{var a;(0,d.D)({eventAction:d.i.link,eventActionText:t,eventCategory:e.mainPageUrl,eventLabel:null===(a=e.data)||void 0===a?void 0:a.id})};(0,s.useEffect)(()=>{var t,a,l,n;(null===(t=e.data)||void 0===t?void 0:t.bankName)&&(null===(a=e.data)||void 0===a?void 0:a.id)&&e.isOpen&&(0,d.D)({eventAction:d.i.popup,eventActionText:null===(l=e.data)||void 0===l?void 0:l.bankName,eventCategory:e.mainPageUrl,eventLabel:null===(n=e.data)||void 0===n?void 0:n.id})},[e.isOpen,e.mainPageUrl,null===(t=e.data)||void 0===t?void 0:t.bankName,null===(a=e.data)||void 0===a?void 0:a.id]);let j=(0,l.jsxs)("div",{className:C().buttons,children:[(0,l.jsx)(n.zx,{as:"a",onClick:()=>g(v),target:"_blank",href:null===(i=e.data)||void 0===i?void 0:i.detailUrl,variant:"secondary",className:C().button,children:"Все ".concat(null==f?void 0:f.termsTitle)}),(0,l.jsx)(n.zx,{as:"a",onClick:()=>g((0,h.b)("Подать заявку")),target:"_blank",href:null===(o=e.data)||void 0===o?void 0:o.url,className:C().button,children:"Подать заявку"})]});return(0,l.jsx)(r.h,{children:(0,l.jsx)(n.u_,{className:C().mobilePopup,open:e.isOpen,onClose:e.onClose,footer:{children:j},header:{title:null!==(m=null===(u=e.data)||void 0===u?void 0:u.bankName)&&void 0!==m?m:""},size:"l",children:(0,l.jsx)("div",{className:C().container,children:(0,l.jsx)(x,{...f,loading:e.loading,mainPageUrl:e.mainPageUrl,updateDate:null===(p=e.data)||void 0===p?void 0:p.m_updated_at})})})})}},423:function(e,t,a){"use strict";a.d(t,{TQ:function(){return i},VZ:function(){return s},jo:function(){return n},oQ:function(){return r}});var l=a(84053);function n(){return"".concat((0,l.iE)().lkBaseUrl,"/credits/new?skipName=true&productType=credit")}function i(){return"".concat((0,l.iE)().lkBaseUrl,"/credits/new?skipName=true&productType=credit_card")}let s=["sberbank","vtb24","sovcombank","rosselhozbank","gazprombank","alfabank","promsvyazbank","tinkoff","vostochnyj_express"],r="/icons/header_logo.svg"},73897:function(e,t,a){"use strict";var l,n;a.d(t,{u:function(){return l}}),(n=l||(l={})).POTREBITELSKIE="potrebitelskie_kredity",n.KARTY="kreditnye_karty",n.MICROZAJMY="mikrozajmy",n.AUTOCREDIT="avtokredity",n.IPOTEKA="ipoteka",n.CALCULATOR="kreditniy_kalkulyator"},66566:function(e,t,a){"use strict";a.d(t,{$:function(){return l}});let l=(e,t)=>e?["",t?"янв":"января",t?"фев":"февраля","марта",t?"апр":"апреля","мая","июня","июля",t?"авг":"августа",t?"сент":"сентября",t?"окт":"октября",t?"нояб":"ноября",t?"дек":"декабря"][new Date(e.replace(/-/g,"/")).getMonth()+1]:""},39918:function(e,t,a){"use strict";a.d(t,{D:function(){return r},i:function(){return n}});var l,n,i=a(65737),s=a(40741);(l=n||(n={})).link="link",l.button="button",l.popup="popup",l.popdown="popdown",l.filterCatalog="filter_catalog",l.utm="utm",l.banner="banner",l.noOffers="no_offers";let r=e=>{let{eventCategory:t,eventAction:a,eventActionText:l="",eventLabel:n,eventValue:r,url:o}=e,c="boolean"==typeof r?r?"on":"off":r,d="filter_catalog"!==a?/[а-я]/i.test(l.toLowerCase()):"string"!=typeof n||/[а-я]/i.test(n.toLowerCase()),u="filter_catalog"!==a?{event:"data-event",eventCategory:null!=t?t:"",eventAction:({link:"click_link_",button:"click_button_",popup:"show_pop_up_",popdown:"close_pop_up_",utm:"save_utm",banner:"click_banner",no_offers:"no_offers_to_show"})[a]+(0,s.b)(l.toLowerCase().replaceAll(" ","_")),eventLabel:n,eventValue:c,url:o}:{event:"data-event",eventAction:null!=t?t:"",eventCategory:a,eventLabel:"string"==typeof n?d?n:(0,s.b)(n):n,eventValue:c,url:o};(0,i.l)(u)}},65737:function(e,t,a){"use strict";a.d(t,{l:function(){return n}});var l=a(77607);function n(e){e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),e.eventLabel&&"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_")),(0,l.AB)(e)}},40741:function(e,t,a){"use strict";a.d(t,{b:function(){return n}});let l={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},n=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();if(t in l){let a=l[t];return t===e?a:a.charAt(0).toUpperCase()+a.slice(1)}return e})},79553:function(e){e.exports={title:"Calculator_title__aC5Ud",container:"Calculator_container__vQuJ0",collapseArrow:"Calculator_collapseArrow__Fm8Vk",collapseArrowOpened:"Calculator_collapseArrowOpened__Fbqar",fieldsContainer:"Calculator_fieldsContainer__5Rp05",field:"Calculator_field__bwyfM",fieldRange:"Calculator_fieldRange__S3_lR",collapseContainerWrapper:"Calculator_collapseContainerWrapper__j_DVK",collapseContainer:"Calculator_collapseContainer__IoV8G",fieldWrapper:"Calculator_fieldWrapper__rsxlG",tooltip:"Calculator_tooltip__dzU9w",typeDescription:"Calculator_typeDescription__WHZqi",link:"Calculator_link__vCq4i",chips:"Calculator_chips__iGG5T",legend:"Calculator_legend__wV7NN",chipsForm:"Calculator_chipsForm__6FLk3",additionalItemsWrapper:"Calculator_additionalItemsWrapper__1sQJo",additionalItemsTitle:"Calculator_additionalItemsTitle__hVEvZ",additionalItem:"Calculator_additionalItem__lSSkX",divider:"Calculator_divider__hPQxY",additionalItemName:"Calculator_additionalItemName__CCT4N"}},53568:function(e){e.exports={listTitle:"CreditsListModal_listTitle__hforG",container:"CreditsListModal_container__K77Ct",content:"CreditsListModal_content__Gz5jC",list:"CreditsListModal_list__ryMHP",valueText:"CreditsListModal_valueText__6AnBt",row:"CreditsListModal_row__OVccE",rowLabel:"CreditsListModal_rowLabel__9WsLq",rowValue:"CreditsListModal_rowValue__IGWF0",buttons:"CreditsListModal_buttons__l6SVm",button:"CreditsListModal_button__ZXh6N",actualDate:"CreditsListModal_actualDate__wpq5D",skeletonCard:"CreditsListModal_skeletonCard__xw5zQ",cards_list:"CreditsListModal_cards_list__bM3RU"}}}]);