(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[961],{9306:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var o=n(6295),r=n(8645),l=n(257);let a=e=>{let{NEXT_PUBLIC_BFF_API_URL:t,NEXT_PUBLIC_HEADLESS_CMS:n,NEXT_PUBLIC_BASE_URL:r,NEXT_PUBLIC_API_URL:l,NEXT_PUBLIC_MP_SC_REDIRECTS_API:a}=(0,o.S)(),{isBFF:i,isHeadlessCMS:s,isMpScRedirects:c}=e;return i||s?"".concat(r,"/sc"):i?t:s?n:c?a:r},i=async e=>{let{url:t,options:n={},config:i}=e,{REVALIDATE_REQUEST_VALUE:s}=(0,o.S)(),c="dev"===(0,o.S)().NEXT_PUBLIC_VERSION,u=a(n),d=0,f="";try{c&&console.log("Запрос url","".concat(u).concat(t)),d=performance.now();let{status:e,_data:n}=await r.Wg.raw(t,{baseURL:u,method:(null==i?void 0:i.method)||"GET",headers:{...null==i?void 0:i.headers},...i,next:{revalidate:Number(s)||300}});return f=e,{data:n,error:null}}catch(e){return c&&console.error("Ошибка запроса","".concat(e,": ").concat(u).concat(t)),{data:null,error:e||"Unknown error"}}finally{var p;null===(p=l.outgoingHTTPRequestHistogram)||void 0===p||p.labels((null==i?void 0:i.method)||"GET",t,String(f)).observe(Number(performance.now()-d))}}},9464:function(e,t,n){"use strict";n.d(t,{N:function(){return L}});var o=n(7437),r=n(2265),l=n(166),a=n(1994),i=n(684),s=n(5563),c=n(5461),u=n(1132),d=n(5843),f=n(7375),p=n(5158),_=n.n(p);let h=e=>{let{text:t,children:n,title:l}=e,a=(0,c.aF)("xs"),[i,s]=(0,r.useState)(!1),[u,d]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{s(a)},[a]),i)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:_().triggerModalWrapper,onClick:()=>{d(!0)},children:n}),(0,o.jsx)(c.u_,{onClose:()=>{d(!1)},header:{title:l},open:u,children:(0,o.jsx)("div",{className:_().contentContentWrapper,children:t})})]}):(0,o.jsx)(c.u,{moveToBody:!0,boundaryPadding:80,text:t,children:n})};var v=n(6055),g=n.n(v);let m=e=>(0,o.jsx)("span",{className:g().tooltipText,dangerouslySetInnerHTML:{__html:e||""}}),b=e=>{let{label:t,preposition:n,value:r,isTitle:l,tooltip:s,postfix:c,onTooltipClick:u}=e,d=n?"".concat(n," ").concat(r):r;return(0,o.jsxs)("div",{className:(0,a.Z)(g().group,l&&g().titleGroup),children:[(0,o.jsxs)("button",{className:g().groupSub,title:l&&"string"==typeof t?t:"",onClick:s?e=>{null==e||e.preventDefault(),null==e||e.stopPropagation(),null==u||u()}:void 0,children:[t,s?(0,o.jsx)(h,{title:"string"==typeof t?t:"",className:g().tooltip,text:m(s),children:(0,o.jsx)(i.IconFdsQuestionCircleO,{className:g().tooltipIcon})}):null]}),(0,o.jsxs)("p",{className:g().groupContent,title:l&&"string"==typeof r?d:"",children:[n&&(0,o.jsx)("span",{className:g().preposition,children:n})," ",r,c&&(0,o.jsx)("span",{className:g().postfix,children:c})]})]})};var k=n(9403),x=n.n(k);let w=e=>{var t,n;let{offer:r,handleOpenDetailInfo:l,handlePrimaryButtonClick:p,isWhiteCard:_=!1,onCardPrimaryButtonClick:h,onOfferClick:v,onTooltipClick:g,eventCategory:m="BankOffersList",handleExpandOffers:k,isExpanded:w,highlight:O,className:C}=e,{title:y,fields:B,chips:I,url:N}=r,j="Ещё ".concat(null===(t=r.subOffers)||void 0===t?void 0:t.length," ").concat((0,s._6)((null===(n=r.subOffers)||void 0===n?void 0:n.length)||0,...d.bt)),S=(0,o.jsx)("div",{className:x().chipsRow,children:I.map(e=>(0,o.jsx)("div",{className:x().chipWrapper,children:(0,o.jsx)(c.Vp,{label:e.text,variant:e.color,className:x().chip,style:e.style,rounded:!0,iconLeft:e.iconLeft})},e.text))}),L=()=>{(0,f.Q)({eventCategory:m,eventActionType:f.i.icon,eventActionText:"IconFdsQuestionCircleO",eventLabel:"".concat(r.fkName||"","_").concat(r.title||"")}),null==g||g(r)};return(0,o.jsxs)("div",{className:(0,a.Z)(x().cardWrapper,C),children:[(0,o.jsxs)("a",{className:(0,a.Z)(x().card,x().fullWidthCard,{[x().paddingForButton]:k,[x().whiteCard]:_,[x().highlighted]:O}),href:N,target:"_blank",onClick:()=>{(0,f.Q)({eventCategory:m,eventActionType:f.i.offer,eventActionText:"".concat(r.fkName||"","_").concat(r.title||""),eventLabel:r.url}),null==v||v(r)},rel:"noreferrer",children:[(0,o.jsxs)("div",{className:x().topRow,children:[(0,o.jsxs)("div",{className:x().topRowContent,children:[(0,o.jsxs)("div",{className:x().bankInfo,children:[(0,o.jsx)("div",{className:x().icon,children:(0,o.jsx)(u.D,{altLogo:r.altLogo,url:r.bic||r.url||"",backupImage:r.fkLogo,type:"bank",width:56,height:56})}),(0,o.jsx)(b,{label:y,value:r.fkName,isTitle:!0})]}),(0,o.jsx)("div",{className:x().groups,children:B.map(e=>e.value?(0,o.jsx)(b,{label:e.label,preposition:e.preposition,value:e.value,tooltip:e.tooltip,postfix:e.postfix,onTooltipClick:L},e.name):null)}),(0,o.jsx)("div",{className:x().mobileOnly,children:S})]}),(0,o.jsxs)("div",{className:x().topRowButtons,children:[(0,o.jsx)("button",{className:x().iconButton,onClick:e=>{e.preventDefault(),e.stopPropagation(),l(r)},children:(0,o.jsx)(i.IconFdsInfoCircleO,{className:x().iconDetail,size:24})}),(0,o.jsxs)("div",{className:x().buttons,children:[(0,o.jsx)(c.zx,{size:"xs",label:"Оформить онлайн",onClick:e=>{e.preventDefault(),e.stopPropagation(),(0,f.Q)({eventCategory:m,eventActionType:f.i.button,eventActionText:"Оформить онлайн".concat(r.link?"":" форма"),eventLabel:r.url}),null==p||p(r)}}),(0,o.jsx)(c.zx,{className:x().detailButton,size:"xs",label:"Подробнее",variant:"secondary",onClick:e=>{e.preventDefault(),e.stopPropagation(),(0,f.Q)({eventCategory:m,eventActionType:f.i.button,eventActionText:"Подробнее",eventLabel:r.url}),null==h||h(r),window.open(N,"_blank")}})]})]})]}),(0,o.jsx)("div",{className:(0,a.Z)(x().desktopOnly,x().desktopChipsRow),children:S}),k&&!w&&(0,o.jsx)("div",{className:x().lastOfferCornerGradient})]}),k&&(0,o.jsx)(c.zx,{className:x().showMoreButton,variant:"purple",appearance:"ghost",size:"xs",label:w?"Скрыть":j,onClick:k,iconRight:(0,o.jsx)(i.IconFdsChevronDownSmallO,{className:(0,a.Z)(x().showMoreIcon,{[x().showMoreIconExpanded]:w}),size:20})})]})},O=()=>{let e="";for(let t=0;t<36;t++){let n=16*Math.random()|0;[8,13,18,23].includes(t)&&(e+="-"),e+=(14===t?"4":19===t?3&n|8:n).toString(16)}return e};var C=n(9286),y=n.n(C);let B=e=>{let{params:t,children:n,className:l,config:i}=e,[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),f=(0,r.useRef)(null),p=(0,r.useRef)("");return(0,r.useEffect)(()=>{p.current&&(null==i?void 0:i.yaContextCb)&&(null==i?void 0:i.Ya)&&i.yaContextCb.push(()=>{i.Ya.adfoxCode.destroy(p.current)}),d(O())},[null==i?void 0:i.Ya,null==i?void 0:i.yaContextCb,t.pp]),(0,r.useEffect)(()=>{if(p.current===u)return;if(!i){c(!0);return}let e=()=>{var e,t;let n=null===(e=f.current)||void 0===e?void 0:e.querySelector("iframe");n?n.style.height="".concat(null===(t=n.contentWindow)||void 0===t?void 0:t.document.body.scrollHeight,"px"):console.warn("ads blocked"),c(!n)};i.yaContextCb&&i.yaContextCb.push(()=>{i.Ya.adfoxCode.create({ownerId:i.ownerId,containerId:"adfox_".concat(u),params:t,onRender:e})}),setTimeout(e,5e3),p.current=u},[u,i,t]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:(0,a.Z)(s&&y().hide,l),ref:f,id:"adfox_".concat(u)},u),s&&n]})},I=()=>{let[e,t]=(0,r.useState)();return(0,r.useEffect)(()=>{window&&window.Ya&&window.yaContextCb&&t({ownerId:406293,Ya:window.Ya,yaContextCb:window.yaContextCb})},[]),e};var N=n(4889),j=n.n(N);let S=(0,l.default)(()=>Promise.all([n.e(155),n.e(491)]).then(n.bind(n,2491)).then(e=>e.BankOfferModal),{loadableGenerated:{webpack:()=>[2491]},ssr:!1}),L=e=>{let{offers:t,handleButtonClick:n,handlePrimaryButtonClick:l,onOpenDetailInfo:i,onCardPrimaryButtonClick:s,onOfferClick:c,onTooltipClick:u,eventCategory:d="BankOffersList",highlightedOfferId:p,adfoxBanners:_}=e,[h,v]=(0,r.useState)(!1),[g,m]=(0,r.useState)(null),[b,k]=(0,r.useState)([]),x=I(),O=e=>{k(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},C=e=>{var t;return null==_?void 0:null===(t=_.find(t=>(null==t?void 0:t.position)===e))||void 0===t?void 0:t.params},y={handlePrimaryButtonClick:l,handleOpenDetailInfo:e=>{m(e),v(!0),(0,f.Q)({eventCategory:d,eventActionType:f.i.button,eventActionText:"IconFdsInfoCircleO",eventLabel:"".concat(e.fkName||"","_").concat(e.title||"")}),null==i||i(e)},onCardPrimaryButtonClick:s,onOfferClick:c,onTooltipClick:u,eventCategory:d};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:j().offersList,children:[t.map((e,t)=>{var n,l,i;let s=!(null===(n=e.subOffers)||void 0===n?void 0:n.length)||b.includes(Number(e.id)),c=b.includes(Number(e.id));return(0,o.jsxs)(r.Fragment,{children:[!!C(t)&&(0,o.jsx)(B,{config:x,params:C(t)}),(0,o.jsx)(w,{offer:e,...y,handleExpandOffers:(null===(l=e.subOffers)||void 0===l?void 0:l.length)?()=>O(Number(e.id)):void 0,isExpanded:c,highlight:p===e.id}),null===(i=e.subOffers)||void 0===i?void 0:i.map(e=>(0,o.jsx)(w,{offer:e,...y,className:(0,a.Z)({[j().subOfferHidden]:!s})},e.id))]},"".concat(e.id,"-").concat(t))}),!!C(t.length)&&(0,o.jsx)(B,{config:x,params:C(t.length)})]}),h&&(0,o.jsx)(S,{isOpen:h,onClose:()=>{v(!1)},offer:g,handleButtonClick:n,handlePrimaryButtonClick:l,eventCategory:d})]})}},5074:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var o=n(7437),r=n(6295),l=n(7337);let a=e=>{let{offer:t}=e,{NEXT_PUBLIC_BASE_URL:n}=(0,r.S)(),a=[{"@type":"ListItem",position:1,name:"Главная",item:n},{"@type":"ListItem",position:2,name:"РКО",item:(0,l.xn)(n,"rko")}];t&&a.push({"@type":"ListItem",position:3,name:t.title,item:(0,l.xn)(n,"rko",t.url)});let i=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:a});return(0,o.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:i}})}},1132:function(e,t,n){"use strict";n.d(t,{D:function(){return c}});var o=n(7437),r=n(2265),l=n(3145),a=n(6295),i={src:"/service-rko/_next/static/media/bank-placeholder.d924b4ac.svg",height:108,width:108,blurWidth:0,blurHeight:0};function s(e,t,n){return 0===e?t:1===e&&n?n:i}let c=e=>{let[t,n]=(0,r.useState)(0),i="insurance"===e.type?"sk":e.type||"bank",{NEXT_PUBLIC_S3_ASSETS:c}=(0,a.S)(),u="".concat(c,"/mp-assets/images/").concat(i,"/logo-brandmark-").concat(i,"-").concat(e.url,".svg");(0,r.useEffect)(()=>{n(0)},[u]);let d=s(t,u,e.backupImage),f=e.altLogo?s(t,e.altLogo,d):"";return(0,o.jsx)(l.default,{className:e.className,src:f||d,width:e.width,height:e.height,alt:"logo",unoptimized:!0,onError:()=>n(e=>e+1),suppressHydrationWarning:!0})}},5763:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var o=n(2265),r=n(2672);let l={setItem:(e,t)=>{try{window.localStorage.setItem(e,t)}catch(e){return console.error(e),!1}return!0},getItemRaw:e=>{try{return window.localStorage.getItem(e)}catch(e){return console.error(e),null}},getItem:e=>{let t=l.getItemRaw(e);if(t&&"undefined"!==t)try{return JSON.parse(t)}catch(t){console.warn("invalid object in localStorage by key: ".concat(e))}return null},removeItem:e=>{try{window.localStorage.removeItem(e)}catch(e){console.error(e)}}},a=e=>{let{initialRegion:t,initialTown:n}=e,[{region:a,town:i},s]=(0,o.useState)({region:t,town:n}),c=(0,r.u)();return(0,o.useEffect)(()=>{var e,o,r,a,i,u;let d=l.getItem("user_region"),f=l.getItem("user_town"),p=null===(r=window)||void 0===r?void 0:null===(o=r.Alpine)||void 0===o?void 0:null===(e=o.store("citySelect"))||void 0===e?void 0:e.region,_=null===(u=window)||void 0===u?void 0:null===(i=u.Alpine)||void 0===i?void 0:null===(a=i.store("citySelect"))||void 0===a?void 0:a.town,h=p||d||t||null,v=_||f||n||null;s({region:h,town:v}),c.selectCity(h,v),document.addEventListener("onRegionChange",e=>{var t,n;s({region:null==e?void 0:null===(t=e.detail)||void 0===t?void 0:t.region,town:null==e?void 0:null===(n=e.detail)||void 0===n?void 0:n.town})})},[t,n]),{region:a,town:i,handleOpenCityModal:()=>{c.handleToggleModal(!0)}}}},5843:function(e,t,n){"use strict";n.d(t,{K0:function(){return o},aP:function(){return r},bt:function(){return l},wm:function(){return a}});let o=[{label:"Все",value:"BOTH"},{label:"ИП",value:"SOLE_PROPRIETOR"},{label:"ООО",value:"LEGAL_ENTITY"}],r=[{label:"По популярности",value:"POPULAR"},{label:"По обслуживанию",value:"COST"}],l=["предложение","предложения","предложений"],a="rko"},7375:function(e,t,n){"use strict";n.d(t,{i:function(){return r},Q:function(){return s}});var o,r,l=n(9487);let a={а:"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"},i=e=>e?e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in a?a[t]:e}).replaceAll(" ","_").replaceAll("\xa0","_"):"";(o=r||(r={})).icon="icon",o.chip="chip",o.accordion="accordion",o.button="button",o.checkbox="checkbox",o.radio="radio",o.select="select",o.toggle="toggle",o.tooltip="tooltip",o.link="link",o.banner="banner",o.tag="tag",o.date="date",o.field="field",o.offer="offer",o.tab="tab",o.submit_button="submit_button",o.popup="popup",o.block="block";let s=e=>{let{eventCategory:t,eventActionType:n,eventActionText:o="",eventLabel:r}=e,a={event:"data-event",eventCategory:t,eventAction:{icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submit_button:"form_button_",popup:"show_pop_up_",block:"click_block_"}[n]+i(o)};void 0!==r&&(a.eventLabel=i("string"==typeof r?r:r.toString())),(0,l.l)(a)}},9487:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var o=n(631);let r=(e,t)=>{let n=sessionStorage.getItem("pushedEvents"),r=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_"));let l=r.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!l){if(t){let t={...e};t.url=window.location.pathname,r.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(r))}(0,o.AB)(e)}}},9286:function(e){e.exports={hide:"YaAdFoxBanner_hide__EEjEP"}},4889:function(e){e.exports={offersList:"BankOffersList_offersList__XZ5q_",subOfferHidden:"BankOffersList_subOfferHidden__khcD5"}},9403:function(e){e.exports={cardWrapper:"BankOffer_cardWrapper__YNvcv",card:"BankOffer_card__ICGdJ",iconButton:"BankOffer_iconButton__WAmKS",paddingForButton:"BankOffer_paddingForButton__U1cqr",highlighted:"BankOffer_highlighted__dCM6d",fullWidthCard:"BankOffer_fullWidthCard__n4WOI",detailButton:"BankOffer_detailButton__rnCze",chipsRow:"BankOffer_chipsRow___YdEC",topRow:"BankOffer_topRow__c3UpD",topRowContent:"BankOffer_topRowContent__oR_ad",topRowButtons:"BankOffer_topRowButtons__iO3fh",bankInfo:"BankOffer_bankInfo__I_4hS",groups:"BankOffer_groups__RjfiS",group:"BankOffer_group__E3ykC",titleGroup:"BankOffer_titleGroup___ZwEg",whiteCard:"BankOffer_whiteCard__xrXK3",preposition:"BankOffer_preposition__VyoEq",iconDetail:"BankOffer_iconDetail__xygTi",chip:"BankOffer_chip__cGpbc",icon:"BankOffer_icon__VnoPt",buttons:"BankOffer_buttons__TSzCD",lastOfferCornerGradient:"BankOffer_lastOfferCornerGradient__te_WF",mobileOnly:"BankOffer_mobileOnly__B2sek",desktopOnly:"BankOffer_desktopOnly__rbRt2",desktopChipsRow:"BankOffer_desktopChipsRow__RKOec",showMoreButton:"BankOffer_showMoreButton__T5LL_",showMoreIcon:"BankOffer_showMoreIcon__BPwVs",showMoreIconExpanded:"BankOffer_showMoreIconExpanded__bgeao"}},6055:function(e){e.exports={preposition:"BankOfferInfoGroup_preposition__dlRBI",postfix:"BankOfferInfoGroup_postfix___1auU",group:"BankOfferInfoGroup_group__bvFrt",titleGroup:"BankOfferInfoGroup_titleGroup__eEKRh",groupSub:"BankOfferInfoGroup_groupSub__v9OO_",groupContent:"BankOfferInfoGroup_groupContent__ERVJ4",tooltip:"BankOfferInfoGroup_tooltip__wBh_G",tooltipIcon:"BankOfferInfoGroup_tooltipIcon___8f8u",tooltipText:"BankOfferInfoGroup_tooltipText__V5ST6"}},5158:function(e){e.exports={triggerModalWrapper:"TooltipBottomDrawer_triggerModalWrapper__PueK8",contentContentWrapper:"TooltipBottomDrawer_contentContentWrapper__x5s5s"}}}]);