!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"70ce8fb39136189ecf2a91fe0be2cf2d93e87014"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4632e302-ef1b-4b0c-bd9e-84fde44cb3bb",e._sentryDebugIdIdentifier="sentry-dbid-4632e302-ef1b-4b0c-bd9e-84fde44cb3bb")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5174],{45749:(e,t,a)=>{"use strict";let r;a.d(t,{g3:()=>ee}),a(67471);var l=a(95155),s=a(12115),i=a(42687),n=a(62031),o=a(47073),c=a(29427),d=a(14745),p=a(18271),u=a(51223),h=a(9013),_=a(59092),m=a(31117),g=a(13622),b=a(93371),f=a(33151),v=a(61193),y=a(52159),x=a(66943),$=a(57471),w=a(56590),j=a(65079),k=((r=k||{}).light="light",r.gray="gray",r);let C=(0,m.g)("best-offers-banner","sc"),N=Object.freeze({bestOffersBaner:C,wrapper:`${C}__wrapper`,wideWrapper:`${C}__wrapper--wide`,whiteWrapper:`${C}__wrapper--white`,content:`${C}__content`,header:`${C}__header`,title:`${C}__title`,subtitle:`${C}__subtitle`,icon:`${C}__icon`,iconBlack:`${C}__icon--black`,iconWhite:`${C}__icon--white`,image:`${C}__image`}),A=({title:e,image:t,url:a,description:r,backgroundColor:s,textColor:i,wide:n,theme:d,handleBannerDataLayerPush:p,className:u})=>{let h=d===k.gray,m={"--bg-base":(null==s?void 0:s.base)??(h?"var(--color-white)":"var(--color-gray-400)"),"--bg-hover":(null==s?void 0:s.hover)??"var(--color-gray-500)"};return(0,l.jsxs)("div",{className:(0,c.A)(N.wrapper,u,{[N.wideWrapper]:n}),style:m,onClick:()=>{p(),window.open(a,"_blank")},children:[(0,l.jsxs)("div",{className:N.content,children:[(0,l.jsxs)("div",{className:N.header,children:[(0,l.jsx)(o.E,{weight:"medium",size:"24",className:N.title,style:{color:i},children:e}),(0,l.jsx)("div",{className:(0,c.A)(N.icon,{[N.iconBlack]:h&&!(null!=i&&i.includes("color-white")),[N.iconWhite]:h&&!!(null!=i&&i.includes("color-white"))}),children:(0,l.jsx)(_.K,{size:32})})]}),r&&(0,l.jsx)(o.E,{size:"16",style:{color:i},children:r})]}),(null==t?void 0:t.url)&&(0,l.jsx)("picture",{className:N.image,children:(0,l.jsx)("img",{src:t.url,width:t.width??150,height:t.height??"auto",alt:`Баннер ${e}`,loading:"lazy"})})]})},T=(0,m.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`}),z={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},P={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},W=e=>s.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.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 I({className:e,style:t,boxSize:a,size:r,onClick:l}){return s.createElement("span",{className:e,style:{...z,...l&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...a&&{width:`${a}px`,height:`${a}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...l?{role:"button",tabIndex:"0",onClick:l}:{}},s.createElement(W,{viewBox:"0 0 24 24",style:P}))}I.displayName="IconFdsStarF";let E=({title:e,value:t,tooltip:a,textColor:r,unitsAsColumn:i,isTitleUnit:n})=>{let d;return(0,l.jsxs)("div",{className:(0,c.A)(L.unit,{[L.unitRow]:i}),children:[(0,l.jsxs)("div",{className:L.unitTitleWrapper,children:[(0,l.jsx)(o.E,{size:"14",className:L.unitTitle,children:e}),a&&(0,l.jsx)(v.m,{text:a,children:(0,l.jsx)(f.k,{className:L.tooltipIcon})})]}),(0,l.jsx)(o.E,{weight:"medium",size:n?"18":i?"16":"24",className:L.unitValue,style:{color:r},children:e.includes("Рейтинг")?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I,{size:16,style:{color:"var(--color-orange-400)"}}),t]}):(d=t.split("₽")).map((e,t)=>(0,l.jsxs)(s.Fragment,{children:[e,t<d.length-1&&(0,l.jsx)(o.E,{weight:"regular",children:"₽"})]},`${e}-${t}`))})]})},O=({tags:e,isGrayTheme:t})=>{let a=t?"secondary":"primary";return(0,l.jsx)("div",{className:L.tags,children:e.sort((e,t)=>e.order-t.order).map(e=>(0,l.jsx)(y.v,{className:L.tag,label:e.label,variant:e.variant?e.variant:a,rounded:!0},e.label))})},B=({companyName:e,name:t,url:a,logo:r,units:s,tags:i,additionalButton:n,unitsAsColumn:o,dataLayerPush:p,eventCategory:u,productType:h,theme:_,buttonClassName:m,eventValueByUnitTitle:f})=>{let v=_===k.gray,y=a=>{(0,d.p)(p,h);let r={event:"data-event",eventCategory:u,eventAction:`click_button_${(0,b.t)(a)}_${h}`,eventLabel:(0,b.t)(`${e}_${t}`)};if(f){let e=s.find(e=>e.title.toLowerCase()===f.toLowerCase());e&&(r.eventValue=(0,b.t)(e.value))}p(r)};return(0,l.jsxs)("div",{className:(0,c.A)(L.wrapper,{[L.whiteWrapper]:v}),children:[(0,l.jsxs)("div",{className:L.bankInfo,children:[r&&(0,l.jsx)("img",{src:r,width:56,height:56,alt:`${e} logo`,loading:"lazy"}),(0,l.jsx)(E,{title:t,value:e,isTitleUnit:!0})]}),(0,l.jsx)("div",{className:(0,c.A)(L.units,{[L.unitsColumn]:o}),children:s.map(e=>(0,l.jsx)(E,{title:e.title,value:e.value,tooltip:e.tooltip,textColor:e.textColor,unitsAsColumn:o},`${e.title}-${e.value}`))}),(0,l.jsxs)("div",{className:L.bottomBlock,children:[i&&(0,l.jsx)(O,{tags:i,isGrayTheme:v}),n&&n.text.trim().length>0&&(0,l.jsx)(g.$,{as:"a",className:(0,c.A)(L.button,L.buttonRounded,L.buttonAdditional),size:"xs",label:n.text,href:null==n?void 0:n.url,variant:v?"secondary":"white",onClick:()=>y(n.text)}),(0,l.jsx)(g.$,{as:"a",className:(0,c.A)(L.button,m),size:"xs",label:"Подробнее",href:a,onClick:()=>y("podrobnee_o_kartochke_iz")})]})]})},S=(0,m.g)("offers-list","sc"),D=Object.freeze({offersList:S,wrapper:`${S}__wrapper`,sliderWrapper:`${S}__sliderWrapper`,offerItem:`${S}__offerItem`,compact:`${S}__offerItem--compact`,bannerItem:`${S}__bannerItem`}),R=({offers:e,banner:t,dataLayerPush:a,eventCategory:r,productType:s,theme:i,singleProduct:n})=>{let o=e.length<=2;return(0,l.jsxs)(h.A,{options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3e3,disableOnInteraction:!1}},breakpoints:{xl:{autoplay:!1}},className:D.sliderWrapper,pagination:!0,children:[e.slice(0,3).map(e=>(0,l.jsx)(h.D,{className:(0,c.A)(D.offerItem,{[D.compact]:n}),children:(0,l.jsx)(B,{...e,dataLayerPush:a,eventCategory:r,productType:s,theme:i})},e.id)),t&&(0,l.jsx)(h.D,{className:D.bannerItem,children:(0,l.jsx)(A,{...t,handleBannerDataLayerPush:()=>{(0,d.p)(a,s),a({event:"data-event",eventCategory:r,eventAction:"click_bnr_banner_top_predlozheniy",eventLabel:s})},wide:o,theme:i})})]},s)},U=(0,m.g)("osago-tab","sc"),q=Object.freeze({osagoTab:U,wrapper:`${U}__wrapper`,card:`${U}__card`,whiteCard:`${U}__card--white`,image:`${U}__image`,content:`${U}__content`,inputWrapper:`${U}__inputWrapper`,select:`${U}__select`,input:`${U}__input`,buttonLinkWrapper:`${U}__buttonLinkWrapper`,button:`${U}__button`,banner:`${U}__banner`}),V={kasko:{title:"Рассчет Каско за минуту",description:"Выберите лучшие условия для оформления полиса",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}},osago:{title:"ОСАГО с экономией до 78%",description:"Предварительная цена после ввода номера ТС",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}}},F=[{label:"Мотоцикл",value:"moto"},{label:"Автомобиль",value:"auto"}],G=Object.fromEntries(F.map(e=>[e.value,e])),M={auto:{mask:"a 000 aa 00",placeholder:"A 000 AA 00"},moto:{mask:"0000 aa 00",placeholder:"0000 AA 00"}},H="АВЕКМНОРСТУХ",K=RegExp(`[${H}]`,"i"),Y=RegExp(`[^0-9${H}]`,"gi"),J=({type:e,baseUrl:t,s3Assets:a,banner:r,dataLayerPush:i,eventCategory:p,theme:u})=>{let h="osago"===e,_=(0,j.oq)(t,"osago"),m=(0,j.oq)(_,"step-car"),f=(0,j.oq)(t,"kasko"),v=(0,j.oq)(f,"vehicle"),y=h?m:v,[C,N]=(0,s.useState)(""),[T,L]=(0,s.useState)("auto"),{mask:z,placeholder:P}=M[T],W=u===k.gray,I=`?${new URLSearchParams({type:h?T:"auto",license:C})}`,E=(0,j.oq)(y,I),O=r??{...V[e],url:h?_:f,image:a?{url:(0,j.oq)(a,`widgets/BestOffers/${h?"icon_osago":"icons_car"}.png`),width:204,height:160}:void 0},B=G[T].label,S=(t,a)=>{i({event:"data-event",eventCategory:p,eventAction:t,eventLabel:a??e})};return(0,l.jsxs)("div",{className:q.wrapper,children:[(0,l.jsxs)("div",{className:(0,c.A)(q.card,{[q.whiteCard]:W}),children:[a&&(0,l.jsx)("picture",{children:(0,l.jsx)("img",{src:`${a}/widgets/BestOffers/auto_bg.png`,alt:"Автомобиль",loading:"lazy",className:q.image})}),(0,l.jsxs)("div",{className:q.content,children:[(0,l.jsxs)(n.D,{as:"h3",type:"h3",children:["Онлайн калькулятор ",h?"ОСАГО":"Каско"]}),(0,l.jsxs)("div",{className:q.inputWrapper,children:[h&&(0,l.jsx)(w.l,{options:F,value:G[T],label:"Тип транспорта",variant:W?"primary":"secondary",className:q.select,onChange:e=>{N(""),L(e.value),S(`selector_item_${(0,b.t)(e.label)}`)}}),(0,l.jsx)(x.U,{label:"Госномер",variant:W?"primary":"secondary",maskOpts:{mask:z,definitions:{a:K}},maskPlaceholder:P,value:C,className:q.input,onChange:(e,t)=>{N(t.replace(Y,"").toUpperCase())},onClick:()=>S(`message_field_${(0,b.t)(B)}`),onBlur:()=>S(`on_message_field_${(0,b.t)(B)}`)}),(0,l.jsxs)(o.E,{children:["У меня"," ",(0,l.jsx)($.N,{href:y,onClick:()=>{(0,d.p)(i),S("click_link_net_nomera",y)},children:"нет номера"})]})]}),(0,l.jsx)(g.$,{as:"a",href:E,size:"s",className:q.button,onClick:()=>{(0,d.p)(i),S(`click_button_rasschitat_${(0,b.t)(B)}`,E)},children:"Рассчитать"})]})]}),(0,l.jsx)("div",{className:q.banner,children:(0,l.jsx)(A,{...O,theme:u,handleBannerDataLayerPush:()=>{(0,d.p)(i),S("click_bnr_banner_top_predlozheniy")}})})]})},Q=(0,m.g)("best-offers","sc"),X=Object.freeze({bestOffers:Q,graySection:`${Q}--gray`,singleProduct:`${Q}--singleProduct`,titleWrapper:`${Q}__title-wrapper`,singleProductTitleWrapper:`${Q}__title-wrapper--singleProduct`,title:`${Q}__title`,singleProductTitle:`${Q}__title--singleProduct`,chips:`${Q}__chips`,warning:`${Q}__warning`,allOffersLink:`${Q}__allOffersLink`}),Z={вклады:"вкладам",облигации:"облигациям",кредиты:"кредитам",займы:"займам","кредитные карты":"кредитным картам",каско:"каско",осаго:"ОСАГО","дебетовые карты":"дебетовым картам",ипотека:"ипотеке",автокредиты:"автокредитам",фонды:"фондам"},ee=({tabs:e,baseUrl:t,s3Assets:a,eventCategory:r="best-offers",dataLayerPush:h,singleProduct:_=!1,theme:m=k.light,className:g,tagTitle:b="h2",initialActiveChipId:f})=>{var v;let y,x=m===k.gray,$=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:[]})):[],w=$.map(e=>({url:e.productType,title:e.name})),j=(null==(v=w[0])?void 0:v.url)??"",[C,N]=(0,s.useState)(f??j),A=C&&$.some(e=>e.productType===C)?C:j,T=$.find(e=>e.productType===A)??$[0];if(!T)return null;let L=Z[T.name.toLowerCase()],z=L?`по ${L}`:T.name,P=("kasko"===(y=null==T?void 0:T.productType)||"osago"===y)&&t?(0,l.jsx)(J,{type:T.productType,banner:T.banner,baseUrl:t,s3Assets:a,dataLayerPush:h,eventCategory:r,theme:m}):null;return(0,l.jsx)("section",{className:(0,c.A)(X.bestOffers,g,{[X.singleProduct]:_,[X.graySection]:x}),children:(0,l.jsxs)(i.m,{children:[(0,l.jsx)("div",{className:(0,c.A)(X.titleWrapper,_&&X.singleProductTitleWrapper),children:(0,l.jsxs)(n.D,{as:b,role:void 0,"aria-level":void 0,type:_?"h2":"display",className:(0,c.A)(X.title,_&&X.singleProductTitle),children:["Лучшие предложения ",_?z:"сегодня"]})}),!_&&(0,l.jsx)(u.N,{items:w,maxNumberOfLines:2,activeChipId:A,variant:x?"white":"gray",className:X.chips,onClick:e=>{(0,d.p)(h,e),N(e);let t=$.find(t=>t.productType===e);h({event:"data-event",eventCategory:r,eventAction:"click_chip_top_predlozheniy_vybor",eventLabel:null==t?void 0:t.productType})}}),(0,l.jsxs)("div",{children:[P??(0,l.jsx)(R,{offers:T.offers,banner:T.banner,dataLayerPush:h,eventCategory:r,productType:T.productType,theme:m,singleProduct:_}),T.hasWarning&&(0,l.jsx)(o.E,{as:"p",size:"16",className:X.warning,children:T.warningCustomText??"Оценивайте свои финансовые возможности и риски. Изучите все условия кредита (займа)"})]}),T.checkAllUrl&&(0,l.jsx)(p.C,{href:T.checkAllUrl,onClick:()=>(0,d.p)(h,T.productType),event:{event:"data-event",eventCategory:r,eventAction:"link",eventLabel:`Показать все предложения ${T.productType}`},dataLayerPush:h,iconGrayBackground:!x,className:X.allOffersLink,linkClassName:T.checkAllLinkClassName,children:"Показать все предложения"})]})})}},47073:(e,t,a)=>{"use strict";a.d(t,{E:()=>o});var r=a(95155),l=a(29427),s=a(75972),i=a(52951);a(56265);let n=Object.freeze({text:(0,i.g)("text")});function o({as:e,className:t,style:a,children:i,size:c,weight:d,lineClamp:p,dataQa:u,dataId:h,..._}){return(0,r.jsx)(e||"span",{className:(0,l.A)(n.text,t),style:{...c&&{fontSize:`var(--font-size-${c})`,lineHeight:`var(--font-line-height-${c})`},...d&&{fontWeight:`var(--font-weight-${d})`},...p&&{WebkitLineClamp:p,lineClamp:p,...s.l},...a},..._,"data-id":h,"data-qa":u,children:i})}o.displayName="Text"},53716:(e,t,a)=>{"use strict";a.d(t,{g:()=>r});let r=()=>Date.now().toString()+Math.random().toString(36).slice(2,9)},56265:()=>{},63107:()=>{},67471:()=>{}}]);
//# debugId=4632e302-ef1b-4b0c-bd9e-84fde44cb3bb