"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3389],{15771:function(e,a,t){t.d(a,{C:function(){return c}});var s=t(57437),r=t(80684),n=t(75461),l=t(61994);let i=(0,t(52074).g)("check-all","sc"),o=Object.freeze({wrapper:`${i}__wrapper`,link:`${i}__link`,icon:`${i}__icon`,iconGray:`${i}__icon--gray`}),c=({children:e,className:a,linkClassName:t,iconGrayBackground:i,Link:c=n.rU,event:p,href:d,dataLayerPush:u})=>(0,s.jsx)("div",{className:(0,l.Z)(o.wrapper,a),onClick:()=>{p&&u(p)},children:(0,s.jsxs)(c,{className:(0,l.Z)(o.link,t),href:d,children:[e,(0,s.jsx)("span",{className:(0,l.Z)(o.icon,{[o.iconGray]:i}),children:(0,s.jsx)(r.IconFdsArrowUpRightSmallO,{size:24})})]})})},20777:function(e,a,t){let s;t.d(a,{MJ:function(){return G}});var r=t(57437),n=t(35563),l=t(75461),i=t(61994),o=t(2265),c=t(15771),p=t(72007),d=t(80684),u=t(52074),h=t(31620),m=t(77337),_=((s=_||{}).light="light",s.gray="gray",s);let g=e=>"kasko"===e||"osago"===e,v=(0,u.g)("best-offers-banner","sc"),b=Object.freeze({bestOffersBaner:v,wrapper:`${v}__wrapper`,wideWrapper:`${v}__wrapper--wide`,whiteWrapper:`${v}__wrapper--white`,content:`${v}__content`,header:`${v}__header`,title:`${v}__title`,subtitle:`${v}__subtitle`,icon:`${v}__icon`,iconBlack:`${v}__icon--black`,image:`${v}__image`}),x=({title:e,image:a,url:t,description:s,backgroundColor:l,textColor:o,wide:c,theme:p,handleBannerDataLayerPush:u,className:h})=>{let m=p===_.gray,g={"--bg-base":(null==l?void 0:l.base)??(m?"var(--color-white)":"var(--color-gray-400)"),"--bg-hover":(null==l?void 0:l.hover)??"var(--color-gray-500)"};return(0,r.jsxs)("div",{className:(0,i.Z)(b.wrapper,h,{[b.wideWrapper]:c}),style:g,onClick:()=>{u(),window.open(t,"_blank")},children:[(0,r.jsxs)("div",{className:b.content,children:[(0,r.jsxs)("div",{className:b.header,children:[(0,r.jsx)(n.xv,{weight:"medium",size:"24",className:b.title,style:{color:o},children:e}),(0,r.jsx)("div",{className:(0,i.Z)(b.icon,{[b.iconBlack]:m}),children:(0,r.jsx)(d.IconFdsArrowUpRightSmallO,{size:32})})]}),s&&(0,r.jsx)(n.xv,{size:"16",style:{color:o},children:s})]}),(null==a?void 0:a.url)&&(0,r.jsx)("picture",{className:b.image,children:(0,r.jsx)("img",{src:a.url,width:a.width??150,height:a.height??"auto",alt:`Баннер ${e}`,loading:"lazy"})})]})},f=(0,u.g)("offer-card","sc"),y=Object.freeze({offerCard:f,wrapper:`${f}__wrapper`,whiteWrapper:`${f}__wrapper--white`,bankInfo:`${f}__bankInfo`,units:`${f}__units`,unitsColumn:`${f}__units--column`,unit:`${f}__unit`,unitRow:`${f}__unit--row`,unitTitleWrapper:`${f}__unitTitleWrapper`,unitTitle:`${f}__unitTitle`,tooltipIcon:`${f}__tooltipIcon`,unitValue:`${f}__unitValue`,bottomBlock:`${f}__bottomBlock`,tags:`${f}__tags`,tag:`${f}__tag`,button:`${f}__button`,buttonRounded:`${f}__button--rounded`}),j=e=>{let a=e.split("₽");return a.map((e,t)=>(0,r.jsxs)(o.Fragment,{children:[e,t<a.length-1&&(0,r.jsx)(n.xv,{fontFamily:"primary",weight:"regular",children:"₽"})]},`${e}-${t}`))},$=({title:e,value:a,tooltip:t,textColor:s,unitsAsColumn:o,isTitleUnit:c})=>(0,r.jsxs)("div",{className:(0,i.Z)(y.unit,{[y.unitRow]:o}),children:[(0,r.jsxs)("div",{className:y.unitTitleWrapper,children:[(0,r.jsx)(n.xv,{size:"14",className:y.unitTitle,children:e}),t&&(0,r.jsx)(l.u,{text:t,children:(0,r.jsx)(d.IconFdsQuestionCircleO,{className:y.tooltipIcon})})]}),(0,r.jsx)(n.xv,{weight:"medium",size:c?"18":o?"16":"24",className:y.unitValue,style:{color:s},children:e.includes("Рейтинг")?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.IconFdsStarF,{size:16,style:{color:"var(--color-orange-400)"}}),a]}):j(a)})]}),k=({tags:e,isGrayTheme:a})=>{let t=a?"secondary":"primary";return(0,r.jsx)("div",{className:y.tags,children:e.sort((e,a)=>e.order-a.order).map(e=>(0,r.jsx)(l.Vp,{className:y.tag,label:e.label,variant:e.variant?e.variant:t,rounded:!0},e.label))})},w=({companyName:e,name:a,url:t,logo:s,units:n,tags:o,additionalButton:c,unitsAsColumn:p,dataLayerPush:d,eventCategory:u,productType:m,theme:g,buttonClassName:v,eventValueByUnitTitle:b})=>{let x=g===_.gray,f=t=>{let s={event:"data-event",eventCategory:u,eventAction:`click_button_${(0,h.t)(t)}_${m}`,eventLabel:(0,h.t)(`${e}_${a}`)};if(b){let e=n.find(e=>e.title.toLowerCase()===b.toLowerCase());e&&(s.eventValue=(0,h.t)(e.value))}d(s)};return(0,r.jsxs)("div",{className:(0,i.Z)(y.wrapper,{[y.whiteWrapper]:x}),children:[(0,r.jsxs)("div",{className:y.bankInfo,children:[s&&(0,r.jsx)("img",{src:s,width:56,height:56,alt:`${e} logo`}),(0,r.jsx)($,{title:a,value:e,isTitleUnit:!0})]}),(0,r.jsx)("div",{className:(0,i.Z)(y.units,{[y.unitsColumn]:p}),children:n.map(e=>(0,r.jsx)($,{title:e.title,value:e.value,tooltip:e.tooltip,textColor:e.textColor,unitsAsColumn:p},`${e.title}-${e.value}`))}),(0,r.jsxs)("div",{className:y.bottomBlock,children:[o&&(0,r.jsx)(k,{tags:o,isGrayTheme:x}),c&&(0,r.jsx)(l.zx,{as:"a",className:(0,i.Z)(y.button,y.buttonRounded),size:"xs",label:c.text,href:c.url,variant:"white",onClick:()=>f(c.text)}),(0,r.jsx)(l.zx,{as:"a",className:(0,i.Z)(y.button,v),size:"xs",label:"Подробнее",href:t,onClick:()=>f("podrobnee_o_kartochke_iz")})]})]})},C=(0,u.g)("offers-list","sc"),N=Object.freeze({offersList:C,wrapper:`${C}__wrapper`,sliderWrapper:`${C}__sliderWrapper`,offerItem:`${C}__offerItem`,compact:`${C}__offerItem--compact`,bannerItem:`${C}__bannerItem`}),A=({offers:e,banner:a,dataLayerPush:t,eventCategory:s,productType:n,theme:o,singleProduct:c})=>{let p=e.length<=2;return(0,r.jsxs)(l.iR,{options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3e3,disableOnInteraction:!1}},breakpoints:{xl:{autoplay:!1}},className:N.sliderWrapper,pagination:!0,children:[e.slice(0,3).map(e=>(0,r.jsx)(l.wI,{className:(0,i.Z)(N.offerItem,{[N.compact]:c}),children:(0,r.jsx)(w,{...e,dataLayerPush:t,eventCategory:s,productType:n,theme:o})},e.id)),a&&(0,r.jsx)(l.wI,{className:N.bannerItem,children:(0,r.jsx)(x,{...a,handleBannerDataLayerPush:()=>{t({event:"data-event",eventCategory:s,eventAction:"click_bnr_banner_top_predlozheniy",eventLabel:n})},wide:p,theme:o})})]})},T=(0,u.g)("osago-tab","sc"),L=Object.freeze({osagoTab:T,wrapper:`${T}__wrapper`,card:`${T}__card`,whiteCard:`${T}__card--white`,image:`${T}__image`,content:`${T}__content`,inputWrapper:`${T}__inputWrapper`,select:`${T}__select`,input:`${T}__input`,buttonLinkWrapper:`${T}__buttonLinkWrapper`,button:`${T}__button`,banner:`${T}__banner`}),z={kasko:{title:"Рассчет Каско за минуту",description:"Выберите лучшие условия для оформления полиса",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}},osago:{title:"ОСАГО с экономией до 78%",description:"Предварительная цена после ввода номера ТС",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}}},P=[{label:"Мотоцикл",value:"moto"},{label:"Автомобиль",value:"auto"}],O=Object.fromEntries(P.map(e=>[e.value,e])),I={auto:{mask:"a 000 aa 00",placeholder:"A 000 AA 00"},moto:{mask:"0000 aa 00",placeholder:"0000 AA 00"}},W="АВЕКМНОРСТУХ",B=RegExp(`[${W}]`,"i"),Z=RegExp(`[^0-9${W}]`,"gi"),U=({type:e,baseUrl:a,s3Assets:t,banner:s,dataLayerPush:c,eventCategory:p,theme:d})=>{let u="osago"===e,g=(0,m.xn)(a,"osago"),v=(0,m.xn)(g,"step-car"),b=(0,m.xn)(a,"kasko"),f=(0,m.xn)(b,"vehicle"),y=u?v:f,[j,$]=(0,o.useState)(""),[k,w]=(0,o.useState)("auto"),{mask:C,placeholder:N}=I[k],A=d===_.gray,T=`?${new URLSearchParams({type:u?k:"auto",license:j})}`,W=(0,m.xn)(y,T),U=s??{...z[e],url:u?g:b,image:t?{url:(0,m.xn)(t,`pl-common-blocks-renderer/topOffers/${u?"icon_osago":"icons_car"}.png`),width:204,height:160}:void 0},S=O[k].label,R=(a,t)=>{c({event:"data-event",eventCategory:p,eventAction:a,eventLabel:t??e})};return(0,r.jsxs)("div",{className:L.wrapper,children:[(0,r.jsxs)("div",{className:(0,i.Z)(L.card,{[L.whiteCard]:A}),children:[t&&(0,r.jsx)("picture",{children:(0,r.jsx)("img",{src:`${t}/pl-common-blocks-renderer/topOffers/auto_bg.png`,alt:"Автомобиль",loading:"lazy",className:L.image})}),(0,r.jsxs)("div",{className:L.content,children:[(0,r.jsxs)(n.X6,{as:"h3",type:"h3",children:["Онлайн калькулятор ",u?"ОСАГО":"Каско"]}),(0,r.jsxs)("div",{className:L.inputWrapper,children:[u&&(0,r.jsx)(l.Ph,{options:P,value:O[k],label:"Тип транспорта",variant:A?"primary":"secondary",className:L.select,onChange:e=>{$(""),w(e.value),R(`selector_item_${(0,h.t)(e.label)}`)}}),(0,r.jsx)(l.An,{label:"Госномер",variant:A?"primary":"secondary",maskOpts:{mask:C,definitions:{a:B}},maskPlaceholder:N,value:j,className:L.input,onChange:(e,a)=>{$(a.replace(Z,"").toUpperCase())},onClick:()=>R(`message_field_${(0,h.t)(S)}`),onBlur:()=>R(`on_message_field_${(0,h.t)(S)}`)}),(0,r.jsxs)(n.xv,{children:["У меня"," ",(0,r.jsx)(l.rU,{href:y,onClick:()=>{R("click_link_net_nomera",y)},children:"нет номера"})]})]}),(0,r.jsx)(l.zx,{as:"a",href:W,size:"s",className:L.button,onClick:()=>{R(`click_button_rasschitat_${(0,h.t)(S)}`,W)},children:"Рассчитать"})]})]}),(0,r.jsx)("div",{className:L.banner,children:(0,r.jsx)(x,{...U,handleBannerDataLayerPush:()=>{R("click_bnr_banner_top_predlozheniy")}})})]})},S=(0,u.g)("best-offers","sc"),R=Object.freeze({bestOffers:S,graySection:`${S}--gray`,singleProduct:`${S}--singleProduct`,title:`${S}__title`,singleProductTitle:`${S}__title--singleProduct`,chips:`${S}__chips`,warning:`${S}__warning`,allOffersLink:`${S}__allOffersLink`}),F={вклады:"вкладам",облигации:"облигациям",кредиты:"кредитам",займы:"займам","Кредитные карты":"кредитным картам",каско:"каско",осаго:"ОСАГО","дебетовые карты":"дебетовым картам",ипотека:"ипотеке",автокредиты:"автокредитам"},G=({tabs:e,baseUrl:a,s3Assets:t,eventCategory:s="best-offers",dataLayerPush:d,singleProduct:u=!1,theme:h=_.light})=>{let m=h===_.gray,v=e.map(e=>({url:e.productType,title:e.name})),[b,x]=(0,o.useState)(v[0].url),f=e.find(e=>e.productType===b)??e[0],y=(0,l._m)("xl"),j=F[f.name.toLowerCase()],$=j?`по ${j}`:f.name,k=g(null==f?void 0:f.productType)&&a?(0,r.jsx)(U,{type:f.productType,banner:f.banner,baseUrl:a,s3Assets:t,dataLayerPush:d,eventCategory:s,theme:h}):null;return(0,r.jsx)("section",{className:(0,i.Z)(R.bestOffers,{[R.singleProduct]:u,[R.graySection]:m}),children:(0,r.jsxs)(n.W2,{children:[(0,r.jsxs)(n.X6,{as:"h2",type:u?"h2":"display",className:(0,i.Z)(R.title,!u&&(y?"mb-8":"mb-6"),u&&(0,i.Z)("mb-0",R.singleProductTitle)),children:["Лучшие предложения ",u?$:"сегодня"]}),!u&&(0,r.jsx)(p.N,{items:v,maxNumberOfLines:2,activeChipId:b,variant:m?"white":"gray",className:R.chips,onClick:a=>{x(a);let t=e.find(e=>e.productType===a);d({event:"data-event",eventCategory:s,eventAction:"click_chip_top_predlozheniy_vybor",eventLabel:null==t?void 0:t.productType})}}),(0,r.jsxs)("div",{children:[k??(0,r.jsx)(A,{offers:f.offers,banner:f.banner,dataLayerPush:d,eventCategory:s,productType:f.productType,theme:h,singleProduct:u}),f.hasWarning&&(0,r.jsx)(n.xv,{as:"p",size:"16",className:R.warning,children:f.warningCustomText??"Оценивайте свои финансовые возможности и риски. Изучите все условия кредита (займа)"})]}),f.checkAllUrl&&(0,r.jsx)(c.C,{href:f.checkAllUrl,event:{event:"data-event",eventCategory:s,eventAction:"link",eventLabel:`Показать все предложения ${f.productType}`},dataLayerPush:d,iconGrayBackground:!m,className:R.allOffersLink,linkClassName:f.checkAllLinkClassName,children:"Показать все предложения"})]})})}},17730:function(e,a,t){t.d(a,{B:function(){return x}});var s=t(57437),r=t(35563),n=t(61994),l=t(80684),i=t(10992),o=t(52074),c=t(2265);let p=(0,o.g)("support","sc"),d=Object.freeze({support:p,title:`${p}__title`,cardsContainer:`${p}__cards-container`}),u="cb-support",h=(0,o.g)("support-app-card","sc"),m=Object.freeze({supportAppCard:h,title:`${h}__title`,icon:`${h}__icon`,image:`${h}__image`}),_=({title:e,linkUrl:a,s3Assets:t})=>(0,s.jsxs)("a",{className:m.supportAppCard,href:a,target:"_blank",rel:"noreferrer",onClick:()=>{(0,i.h)({eventCategory:u,eventActionType:i.D.banner,eventActionText:e,eventLabel:a})},children:[(0,s.jsx)("span",{className:m.title,children:e}),(0,s.jsx)(l.IconFdsArrowUpRightSmallO,{className:m.icon,size:32}),(0,s.jsx)("img",{className:m.image,src:`${t}/mp-assets/widgets/SupportBlock/bannerApp.png`})]}),g=(0,o.g)("support-phone-card","sc"),v=Object.freeze({supportPhoneCard:g,contacts:`${g}__contacts`,phone:`${g}__phone`,chat:`${g}__chat`,info:`${g}__info`,image:`${g}__image`}),b=({phones:e,description:a,s3Assets:t})=>{let r=(0,c.useCallback)(()=>{var e,a,t;null==(t=null==(a=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:a.open)||t.call(a),(0,i.h)({eventCategory:u,eventActionType:i.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),n=e=>{let a=e.replace(/[\s-]/g,"");(0,i.h)({eventCategory:u,eventActionType:i.D.link,eventActionText:"phone",eventLabel:a})};return(0,s.jsxs)("div",{className:v.supportPhoneCard,children:[(0,s.jsxs)("div",{className:v.contacts,children:[e.map(e=>(0,s.jsx)("a",{className:v.phone,href:e.href,onClick:()=>n(e.label),children:e.label},e.label)),(0,s.jsx)("span",{className:v.chat,onClick:r,children:"Онлайн чат"})]}),(0,s.jsx)("div",{className:v.info,children:a}),(0,s.jsx)("img",{className:v.image,src:`${t}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},x=({className:e,phoneCard:a,appCard:t,s3Assets:l})=>(0,s.jsx)("section",{className:(0,n.Z)(d.support,e),children:(0,s.jsxs)(r.W2,{children:[(0,s.jsx)(r.X6,{as:"h2",type:"display",weight:"bold",className:(0,n.Z)(d.title,"mb-6"),children:"Поддержка"}),(0,s.jsxs)("div",{className:d.cardsContainer,children:[(0,s.jsx)(b,{s3Assets:l,...a}),(0,s.jsx)(_,{s3Assets:l,...t})]})]})});x.displayName="Support"}}]);