(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2704],{5085:()=>{},8755:()=>{},24769:()=>{},43780:(e,t,a)=>{"use strict";a.d(t,{E:()=>o});var l=a(95155),i=a(29722),n=a(86253),r=a(83640);a(8755);let s=Object.freeze({text:(0,r.g)("text")});function o({as:e,className:t,style:a,children:r,size:c,weight:d,lineClamp:h,dataQa:p,dataId:u,...m}){return(0,l.jsx)(e||"span",{className:(0,i.A)(s.text,t),style:{...c&&{fontSize:`var(--font-size-${c})`,lineHeight:`var(--font-line-height-${c})`},...d&&{fontWeight:`var(--font-weight-${d})`},...h&&{WebkitLineClamp:h,lineClamp:h,...n.l},...a},...m,"data-id":u,"data-qa":p,children:r})}o.displayName="Text"},79253:(e,t,a)=>{"use strict";a.d(t,{D:()=>d});var l=a(95155),i=a(29722),n=a(86253),r=a(83640);a(95124);let s={display:"h1",hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},o=(0,r.g)("heading"),c=Object.freeze({heading:o,states:Object.freeze({display:`${o}--display`,hero:`${o}--hero`,h1:`${o}--h1`,h2:`${o}--h2`,h3:`${o}--h3`,h4:`${o}--h4`,h5:`${o}--h5`,h6:`${o}--h6`})}),d=({as:e,children:t,weight:a,type:r,lineClamp:o,className:d,style:h,dataQa:p,dataId:u,...m})=>{var g;let _=e||s[r]||"div",v=/^h[1-6]$/.test(_),f=(null==(g=r.match(/\d+/))?void 0:g[0])||1;return(0,l.jsx)(_,{className:(0,i.A)(c.heading,c.states[r],d),style:{...a?{fontWeight:`var(--font-weight-${a})`}:void 0,...o?{WebkitLineClamp:o,lineClamp:o,...n.l}:void 0,...h},role:v?null:"heading","aria-level":v?null:f,...m,"data-id":u,"data-qa":p,children:t})};d.displayName="Heading"},89328:(e,t,a)=>{"use strict";let l;a.d(t,{g3:()=>ei}),a(24769);var i=a(95155),n=a(12115),r=a(66216),s=a(79253),o=a(43780),c=a(29722),d=a(22855),h=a(14572),p=a(8260),u=a(7596),m=a(24691),g=a(17194),_=a(33715),v=a(24964),f=a(81143),b=a(55727),y=a(66627),x=a(17806);let $={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},w={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},j=e=>n.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M9 8a.75.75 0 000 1.5h4.44l-5.22 5.22a.75.75 0 101.06 1.06l5.22-5.22v4.445a.75.75 0 101.5 0V8.75a.75.75 0 00-.75-.75H9z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function k({className:e,style:t,boxSize:a,size:l,onClick:i}){return n.createElement("span",{className:e,style:{...$,...i&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...a&&{width:`${a}px`,height:`${a}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...i?{role:"button",tabIndex:"0",onClick:i}:{}},n.createElement(j,{viewBox:"0 0 24 24",style:w}))}k.displayName="IconFdsArrowUpRightSmallO";var C=((l=C||{}).light="light",l.gray="gray",l);let N=(0,u.g)("best-offers-banner","sc"),A=Object.freeze({bestOffersBaner:N,wrapper:`${N}__wrapper`,wideWrapper:`${N}__wrapper--wide`,whiteWrapper:`${N}__wrapper--white`,content:`${N}__content`,header:`${N}__header`,title:`${N}__title`,subtitle:`${N}__subtitle`,icon:`${N}__icon`,iconBlack:`${N}__icon--black`,iconWhite:`${N}__icon--white`,image:`${N}__image`}),z=({title:e,image:t,url:a,description:l,backgroundColor:n,textColor:r,wide:s,theme:d,handleBannerDataLayerPush:h,className:p})=>{let u=d===C.gray,m={"--bg-base":(null==n?void 0:n.base)??(u?"var(--color-white)":"var(--color-gray-400)"),"--bg-hover":(null==n?void 0:n.hover)??"var(--color-gray-500)"};return(0,i.jsxs)("div",{className:(0,c.A)(A.wrapper,p,{[A.wideWrapper]:s}),style:m,onClick:()=>{h(),window.open(a,"_blank")},children:[(0,i.jsxs)("div",{className:A.content,children:[(0,i.jsxs)("div",{className:A.header,children:[(0,i.jsx)(o.E,{weight:"medium",size:"24",className:A.title,style:{color:r},children:e}),(0,i.jsx)("div",{className:(0,c.A)(A.icon,{[A.iconBlack]:u&&!(null!=r&&r.includes("color-white")),[A.iconWhite]:u&&!!(null!=r&&r.includes("color-white"))}),children:(0,i.jsx)(k,{size:32})})]}),l&&(0,i.jsx)(o.E,{size:"16",style:{color:r},children:l})]}),(null==t?void 0:t.url)&&(0,i.jsx)("picture",{className:A.image,children:(0,i.jsx)("img",{src:t.url,width:t.width??150,height:t.height??"auto",alt:`Баннер ${e}`,loading:"lazy"})})]})},T=(0,u.g)("offer-card","sc"),L=Object.freeze({offerCard:T,wrapper:`${T}__wrapper`,whiteWrapper:`${T}__wrapper--white`,bankInfo:`${T}__bankInfo`,units:`${T}__units`,unitsColumn:`${T}__units--column`,unit:`${T}__unit`,unitRow:`${T}__unit--row`,unitTitleWrapper:`${T}__unitTitleWrapper`,unitTitle:`${T}__unitTitle`,tooltipIcon:`${T}__tooltipIcon`,unitValue:`${T}__unitValue`,bottomBlock:`${T}__bottomBlock`,tags:`${T}__tags`,tag:`${T}__tag`,button:`${T}__button`,buttonRounded:`${T}__button--rounded`,buttonAdditional:`${T}__button--additional`}),W={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},P={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"};function E(e){return{width:`${e}px`,height:`${e}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}}let I=e=>n.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10a9.971 9.971 0 007.071-2.929A9.97 9.97 0 0022 12c0-5.523-4.477-10-10-10zM3.5 12a8.5 8.5 0 1117 0 8.5 8.5 0 01-17 0zm8.872-4.977C13.657 7.18 15 8.15 15 9.761c0 .698-.179 1.238-.504 1.665-.307.401-.704.644-.98.812-.313.191-.477.293-.595.43-.083.096-.17.246-.17.584a.75.75 0 01-1.5 0c0-.66.193-1.164.531-1.558.28-.326.64-.544.89-.695l.062-.037c.287-.175.452-.29.568-.442.096-.126.198-.335.198-.759 0-.633-.532-1.158-1.309-1.252-.716-.087-1.454.236-1.717 1.2a.75.75 0 01-1.447-.394c.486-1.78 1.998-2.454 3.345-2.292zM11.999 15a1 1 0 10.002 2 1 1 0 00-.002-2z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function O({className:e,style:t,boxSize:a,size:l,onClick:i}){return n.createElement("span",{className:e,style:{...W,...i&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...a&&E(a),...t},...i?{role:"button",tabIndex:"0",onClick:i}:{}},n.createElement(I,{viewBox:"0 0 24 24",style:P}))}O.displayName="IconFdsQuestionCircleO";let B=e=>n.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M13.328 2.869a1.444 1.444 0 00-2.65 0A694.174 694.174 0 008.47 7.85a648.96 648.96 0 00-5.196.656c-1.266.165-1.673 1.722-.823 2.553a641.289 641.289 0 003.856 3.748A704.06 704.06 0 005.29 20.22c-.214 1.16.995 2.24 2.15 1.572a650.04 650.04 0 004.562-2.66c1.504.887 3.346 1.956 4.564 2.66 1.154.667 2.363-.411 2.15-1.572a702.887 702.887 0 00-1.017-5.412 664.068 664.068 0 003.856-3.748c.85-.832.443-2.389-.824-2.553-1.383-.18-3.479-.45-5.195-.657a696.41 696.41 0 00-2.208-4.982z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function S({className:e,style:t,boxSize:a,size:l,onClick:i}){return n.createElement("span",{className:e,style:{...W,...i&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...a&&E(a),...t},...i?{role:"button",tabIndex:"0",onClick:i}:{}},n.createElement(B,{viewBox:"0 0 24 24",style:P}))}S.displayName="IconFdsStarF";let R=({title:e,value:t,tooltip:a,textColor:l,unitsAsColumn:r,isTitleUnit:s})=>{let d;return(0,i.jsxs)("div",{className:(0,c.A)(L.unit,{[L.unitRow]:r}),children:[(0,i.jsxs)("div",{className:L.unitTitleWrapper,children:[(0,i.jsx)(o.E,{size:"14",className:L.unitTitle,children:e}),a&&(0,i.jsx)(_.m,{text:a,children:(0,i.jsx)(O,{className:L.tooltipIcon})})]}),(0,i.jsx)(o.E,{weight:"medium",size:s?"18":r?"16":"24",className:L.unitValue,style:{color:l},children:e.includes("Рейтинг")?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(S,{size:16,style:{color:"var(--color-orange-400)"}}),t]}):(d=t.split("₽")).map((e,t)=>(0,i.jsxs)(n.Fragment,{children:[e,t<d.length-1&&(0,i.jsx)(o.E,{weight:"regular",children:"₽"})]},`${e}-${t}`))})]})},U=({tags:e,isGrayTheme:t})=>{let a=t?"secondary":"primary";return(0,i.jsx)("div",{className:L.tags,children:e.sort((e,t)=>e.order-t.order).map(e=>(0,i.jsx)(v.v,{className:L.tag,label:e.label,variant:e.variant?e.variant:a,rounded:!0},e.label))})},D=({companyName:e,name:t,url:a,logo:l,units:n,tags:r,additionalButton:s,unitsAsColumn:o,dataLayerPush:d,eventCategory:h,productType:p,theme:u,buttonClassName:_,eventValueByUnitTitle:v})=>{let f=u===C.gray,b=a=>{let l={event:"data-event",eventCategory:h,eventAction:`click_button_${(0,g.t)(a)}_${p}`,eventLabel:(0,g.t)(`${e}_${t}`)};if(v){let e=n.find(e=>e.title.toLowerCase()===v.toLowerCase());e&&(l.eventValue=(0,g.t)(e.value))}d(l)};return(0,i.jsxs)("div",{className:(0,c.A)(L.wrapper,{[L.whiteWrapper]:f}),children:[(0,i.jsxs)("div",{className:L.bankInfo,children:[l&&(0,i.jsx)("img",{src:l,width:56,height:56,alt:`${e} logo`,loading:"lazy"}),(0,i.jsx)(R,{title:t,value:e,isTitleUnit:!0})]}),(0,i.jsx)("div",{className:(0,c.A)(L.units,{[L.unitsColumn]:o}),children:n.map(e=>(0,i.jsx)(R,{title:e.title,value:e.value,tooltip:e.tooltip,textColor:e.textColor,unitsAsColumn:o},`${e.title}-${e.value}`))}),(0,i.jsxs)("div",{className:L.bottomBlock,children:[r&&(0,i.jsx)(U,{tags:r,isGrayTheme:f}),s&&s.text.trim().length>0&&(0,i.jsx)(m.$,{as:"a",className:(0,c.A)(L.button,L.buttonRounded,L.buttonAdditional),size:"xs",label:s.text,href:null==s?void 0:s.url,variant:f?"secondary":"white",onClick:()=>b(s.text)}),(0,i.jsx)(m.$,{as:"a",className:(0,c.A)(L.button,_),size:"xs",label:"Подробнее",href:a,onClick:()=>b("podrobnee_o_kartochke_iz")})]})]})},V=(0,u.g)("offers-list","sc"),q=Object.freeze({offersList:V,wrapper:`${V}__wrapper`,sliderWrapper:`${V}__sliderWrapper`,offerItem:`${V}__offerItem`,compact:`${V}__offerItem--compact`,bannerItem:`${V}__bannerItem`}),M=({offers:e,banner:t,dataLayerPush:a,eventCategory:l,productType:n,theme:r,singleProduct:s})=>{let o=e.length<=2;return(0,i.jsxs)(p.A,{options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3e3,disableOnInteraction:!1}},breakpoints:{xl:{autoplay:!1}},className:q.sliderWrapper,pagination:!0,children:[e.slice(0,3).map(e=>(0,i.jsx)(p.D,{className:(0,c.A)(q.offerItem,{[q.compact]:s}),children:(0,i.jsx)(D,{...e,dataLayerPush:a,eventCategory:l,productType:n,theme:r})},e.id)),t&&(0,i.jsx)(p.D,{className:q.bannerItem,children:(0,i.jsx)(z,{...t,handleBannerDataLayerPush:()=>{a({event:"data-event",eventCategory:l,eventAction:"click_bnr_banner_top_predlozheniy",eventLabel:n})},wide:o,theme:r})})]},n)},F=(0,u.g)("osago-tab","sc"),H=Object.freeze({osagoTab:F,wrapper:`${F}__wrapper`,card:`${F}__card`,whiteCard:`${F}__card--white`,image:`${F}__image`,content:`${F}__content`,inputWrapper:`${F}__inputWrapper`,select:`${F}__select`,input:`${F}__input`,buttonLinkWrapper:`${F}__buttonLinkWrapper`,button:`${F}__button`,banner:`${F}__banner`}),G={kasko:{title:"Рассчет Каско за минуту",description:"Выберите лучшие условия для оформления полиса",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}},osago:{title:"ОСАГО с экономией до 78%",description:"Предварительная цена после ввода номера ТС",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}}},Q=[{label:"Мотоцикл",value:"moto"},{label:"Автомобиль",value:"auto"}],J=Object.fromEntries(Q.map(e=>[e.value,e])),K={auto:{mask:"a 000 aa 00",placeholder:"A 000 AA 00"},moto:{mask:"0000 aa 00",placeholder:"0000 AA 00"}},X="АВЕКМНОРСТУХ",Y=RegExp(`[${X}]`,"i"),Z=RegExp(`[^0-9${X}]`,"gi"),ee=({type:e,baseUrl:t,s3Assets:a,banner:l,dataLayerPush:r,eventCategory:d,theme:h})=>{let p="osago"===e,u=(0,x.oq)(t,"osago"),_=(0,x.oq)(u,"step-car"),v=(0,x.oq)(t,"kasko"),$=(0,x.oq)(v,"vehicle"),w=p?_:$,[j,k]=(0,n.useState)(""),[N,A]=(0,n.useState)("auto"),{mask:T,placeholder:L}=K[N],W=h===C.gray,P=`?${new URLSearchParams({type:p?N:"auto",license:j})}`,E=(0,x.oq)(w,P),I=l??{...G[e],url:p?u:v,image:a?{url:(0,x.oq)(a,`widgets/BestOffers/${p?"icon_osago":"icons_car"}.png`),width:204,height:160}:void 0},O=J[N].label,B=(t,a)=>{r({event:"data-event",eventCategory:d,eventAction:t,eventLabel:a??e})};return(0,i.jsxs)("div",{className:H.wrapper,children:[(0,i.jsxs)("div",{className:(0,c.A)(H.card,{[H.whiteCard]:W}),children:[a&&(0,i.jsx)("picture",{children:(0,i.jsx)("img",{src:`${a}/widgets/BestOffers/auto_bg.png`,alt:"Автомобиль",loading:"lazy",className:H.image})}),(0,i.jsxs)("div",{className:H.content,children:[(0,i.jsxs)(s.D,{as:"h3",type:"h3",children:["Онлайн калькулятор ",p?"ОСАГО":"Каско"]}),(0,i.jsxs)("div",{className:H.inputWrapper,children:[p&&(0,i.jsx)(y.l,{options:Q,value:J[N],label:"Тип транспорта",variant:W?"primary":"secondary",className:H.select,onChange:e=>{k(""),A(e.value),B(`selector_item_${(0,g.t)(e.label)}`)}}),(0,i.jsx)(f.U,{label:"Госномер",variant:W?"primary":"secondary",maskOpts:{mask:T,definitions:{a:Y}},maskPlaceholder:L,value:j,className:H.input,onChange:(e,t)=>{k(t.replace(Z,"").toUpperCase())},onClick:()=>B(`message_field_${(0,g.t)(O)}`),onBlur:()=>B(`on_message_field_${(0,g.t)(O)}`)}),(0,i.jsxs)(o.E,{children:["У меня"," ",(0,i.jsx)(b.N,{href:w,onClick:()=>{B("click_link_net_nomera",w)},children:"нет номера"})]})]}),(0,i.jsx)(m.$,{as:"a",href:E,size:"s",className:H.button,onClick:()=>{B(`click_button_rasschitat_${(0,g.t)(O)}`,E)},children:"Рассчитать"})]})]}),(0,i.jsx)("div",{className:H.banner,children:(0,i.jsx)(z,{...I,theme:h,handleBannerDataLayerPush:()=>{B("click_bnr_banner_top_predlozheniy")}})})]})},et=(0,u.g)("best-offers","sc"),ea=Object.freeze({bestOffers:et,graySection:`${et}--gray`,singleProduct:`${et}--singleProduct`,titleWrapper:`${et}__title-wrapper`,singleProductTitleWrapper:`${et}__title-wrapper--singleProduct`,title:`${et}__title`,singleProductTitle:`${et}__title--singleProduct`,chips:`${et}__chips`,warning:`${et}__warning`,allOffersLink:`${et}__allOffersLink`}),el={вклады:"вкладам",облигации:"облигациям",кредиты:"кредитам",займы:"займам","Кредитные карты":"кредитным картам",каско:"каско",осаго:"ОСАГО","дебетовые карты":"дебетовым картам",ипотека:"ипотеке",автокредиты:"автокредитам"},ei=({tabs:e,baseUrl:t,s3Assets:a,eventCategory:l="best-offers",dataLayerPush:p,singleProduct:u=!1,theme:m=C.light,className:g,initialActiveChipId:_})=>{var v;let f,b=m===C.gray,y=Array.isArray(e)?e.filter(({banner:e,offers:t,productType:a})=>!!e||!!(null!=t&&t.length)||"osago"===a||"kasko"===a).map(e=>({...e,offers:Array.isArray(e.offers)?e.offers:[]})):[],x=y.map(e=>({url:e.productType,title:e.name})),$=(null==(v=x[0])?void 0:v.url)??"",[w,j]=(0,n.useState)(_??$),k=w&&y.some(e=>e.productType===w)?w:$,N=y.find(e=>e.productType===k)??y[0];if(!N)return null;let A=el[N.name.toLowerCase()],z=A?`по ${A}`:N.name,T=("kasko"===(f=null==N?void 0:N.productType)||"osago"===f)&&t?(0,i.jsx)(ee,{type:N.productType,banner:N.banner,baseUrl:t,s3Assets:a,dataLayerPush:p,eventCategory:l,theme:m}):null;return(0,i.jsx)("section",{className:(0,c.A)(ea.bestOffers,g,{[ea.singleProduct]:u,[ea.graySection]:b}),children:(0,i.jsxs)(r.m,{children:[(0,i.jsx)("div",{className:(0,c.A)(ea.titleWrapper,u&&ea.singleProductTitleWrapper),children:(0,i.jsxs)(s.D,{as:"h2",type:u?"h2":"display",className:(0,c.A)(ea.title,u&&ea.singleProductTitle),children:["Лучшие предложения ",u?z:"сегодня"]})}),!u&&(0,i.jsx)(h.N,{items:x,maxNumberOfLines:2,activeChipId:k,variant:b?"white":"gray",className:ea.chips,onClick:e=>{j(e);let t=y.find(t=>t.productType===e);p({event:"data-event",eventCategory:l,eventAction:"click_chip_top_predlozheniy_vybor",eventLabel:null==t?void 0:t.productType})}}),(0,i.jsxs)("div",{children:[T??(0,i.jsx)(M,{offers:N.offers,banner:N.banner,dataLayerPush:p,eventCategory:l,productType:N.productType,theme:m,singleProduct:u}),N.hasWarning&&(0,i.jsx)(o.E,{as:"p",size:"16",className:ea.warning,children:N.warningCustomText??"Оценивайте свои финансовые возможности и риски. Изучите все условия кредита (займа)"})]}),N.checkAllUrl&&(0,i.jsx)(d.C,{href:N.checkAllUrl,event:{event:"data-event",eventCategory:l,eventAction:"link",eventLabel:`Показать все предложения ${N.productType}`},dataLayerPush:p,iconGrayBackground:!b,className:ea.allOffersLink,linkClassName:N.checkAllLinkClassName,children:"Показать все предложения"})]})})}},91501:(e,t,a)=>{"use strict";a.d(t,{g:()=>l});let l=()=>Date.now().toString()+Math.random().toString(36).slice(2,9)},95124:()=>{}}]);