(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{9928:function(){},4380:function(){},5530:function(){},1277:function(){},915:function(e,t,n){"use strict";function o(){return typeof window>"u"}function i(e){null!==localStorage.getItem("analytics.log")&&console.log("%cAnalytics","background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;",e)}function l(e){if(o()){i("DataLayer is not initialized or you are trying to push event on server side.");return}i(JSON.stringify(e)),Array.isArray(window.dataLayer)?window.dataLayer.push(e):i("window.dataLayer does not exist"),Array.isArray(window._mtm)?window._mtm.push(e):i("window._mtm does not exist")}function s(){if(o()){console.warn("Cant initialize tag manager on server side");return}"function"!=typeof window._init_gtm?console.warn("Cant init GTM, please check if GTM script exists"):window._init_gtm(),"function"!=typeof window._init_mtm?console.warn("Cant init MTM, please check if MTM script exists"):window._init_mtm()}n.d(t,{AB:function(){return l},zK:function(){return s}})},682:function(e,t,n){"use strict";n.d(t,{D:function(){return I},P:function(){return B},U:function(){return M},u:function(){return b}});var o=n(7437),i=n(3167),l=n(2265),s=n(6094),r=n(3919),a=n(4887);let c=300,u=({opened:e})=>{let[t,n]=(0,l.useState)(!1),o=(0,l.useRef)(null),i=(0,l.useRef)(!1);return(0,l.useEffect)(()=>(e&&!i.current?(i.current=!0,n(!0)):!e&&i.current&&(o.current=setTimeout(()=>{i.current=!1,n(!1)},c)),()=>{o.current&&clearTimeout(o.current)}),[e]),{mounted:t}},d=(0,r.g)("click-outside","sc"),p=Object.freeze({overlay:`${d}__overlay`,open:`${d}--open`,close:`${d}--close`}),m=({onClose:e,onToucheMove:t,isOpen:n,delay:s=c})=>{let r=(0,l.useRef)(null),a=(0,l.useCallback)(()=>{e&&(r.current=setTimeout(()=>{e()},s))},[s,e]),u=(0,l.useCallback)(e=>{"Escape"===e.key&&a()},[a]);return(0,l.useEffect)(()=>(n&&window.addEventListener("keydown",u),()=>{r.current&&clearTimeout(r.current),window.removeEventListener("keydown",u)}),[n,u]),(0,o.jsx)("div",{className:(0,i.Z)(p.overlay,{[p.open]:n,[p.close]:!n}),onTouchStart:t,onClick:a})},h=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},v=e=>{e.style.top||(window.prevScrollPosition=window.scrollY)},g=(e,t,n)=>{t.style.setProperty("overflow-y","scroll"),e.classList.toggle("scroll-disable-windows",!0),e.style.setProperty("width",`calc(100vw - ${n}px)`),e.style.setProperty("top",`-${window.prevScrollPosition}px`)},f=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vw")},w=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},_=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},x=()=>document.querySelectorAll("[data-portal]").length>1,b=e=>{let t=(0,l.useRef)(null),n=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{if(n.current===e)return;n.current=e;let o=t.current,i=document.body,l=document.documentElement,s=window.innerWidth-l.clientWidth,r=s>0;if(e&&r)v(i),g(i,l,s),h(o,!0);else if(e)f(i),h(o,!0);else{let e=!x();e&&w(i),e&&_(),h(o,!1)}return()=>{let e=!x();e&&w(i),e&&_()}},[e]),t},j=(0,r.g)("drawer-footer","sc"),y=Object.freeze({footer:`${j}__footer`,hasScroll:`${j}__footer--has-scroll`}),k=({footer:e,hasScroll:t,className:n})=>(0,o.jsx)("div",{className:(0,i.Z)(y.footer,{[y.hasScroll]:t},n),children:"function"==typeof e?e():e}),N=(0,r.g)("drawer-content","sc"),C=Object.freeze({container:`${N}__container`,open:`${N}--open`,close:`${N}--close`,header:`${N}__header`,rowHeader:`${N}__header--row`,title:`${N}__title`,center:`${N}__title--center`,left:`${N}__title--left`,right:`${N}__title--right`,controlContainer:`${N}__control-container`,content:`${N}__content`,footer:`${N}__footer`}),T=({onClose:e,onContentClick:t,children:n,title:r,rowTitle:a,titleAlign:c,isCloseable:u,footer:d,closeButton:p,isOpen:m,contentClassName:h,footerClassName:v,contentStyle:g,width:f})=>{let w=(0,l.useRef)(null),_=(0,l.useRef)(null),[x,b]=(0,l.useState)(!1);(0,l.useEffect)(()=>{var e;if(!_.current||!w.current)return;let t=(null==(e=null==_?void 0:_.current)?void 0:e.getBoundingClientRect().top)||0,n=null==w?void 0:w.current,o=()=>{let e=null==_?void 0:_.current;e&&b(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",o,!1),()=>{null==n||n.removeEventListener("scroll",o,!1)}},[]);let j=g||f?{width:f,...g||{}}:void 0;return(0,o.jsxs)("div",{ref:w,style:j,className:(0,i.Z)(C.container,{[C.open]:m,[C.close]:!m},h),children:[r||u?(0,o.jsxs)("div",{className:(0,i.Z)(C.header,{[C.rowHeader]:a}),children:[u?p?"function"==typeof p?p():p:(0,o.jsx)("button",{type:"button",className:C.controlContainer,onClick:e,children:(0,o.jsx)(s.IconFdsCloseO,{size:24})}):null,r?(0,o.jsx)("h3",{className:(0,i.Z)(C.title,{[C[c]]:!0}),children:r}):null]}):null,(0,o.jsx)("div",{ref:_,className:C.content,onClick:t,children:n}),d&&(0,o.jsx)(k,{className:(0,i.Z)(C.footer,v),footer:d,hasScroll:x})]})},O=(0,r.g)("drawer-layout","sc"),S=Object.freeze({window:`${O}__window`}),A=({onClose:e,isOpen:t,children:n,withDisabledScroll:s,className:r,...a})=>{let c=(0,l.useCallback)(e=>e.stopPropagation(),[]);return b(t&&s),(0,o.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(S.window,r),children:[(0,o.jsx)(m,{onClose:e,isOpen:t,delay:0}),(0,o.jsx)(T,{onContentClick:c,onClose:e,isOpen:t,...a,children:n})]})},I=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:l=!0,...s})=>{let{mounted:r}=u({opened:e});return r?(0,o.jsx)(A,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:l,...s,children:t}):null};I.displayName="Drawer";let L=(0,r.g)("mobile-modal-footer","sc"),R=Object.freeze({footer:`${L}__footer`,footerWithoutShadow:`${L}__footer--without-shadow`}),z=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,o.jsx)("div",{className:(0,i.Z)(R.footer,t&&R.footerWithoutShadow,n),children:"function"==typeof e?e():e}),$=(0,r.g)("mobile-popup","sc"),E=Object.freeze({mobilePopup:`${$}`,mobilePopupOpen:`${$}--open`,content:`${$}__content`,contentFull:`${$}__content--full`,contentTransition:`${$}__content--transition`,contentTransitionOpen:`${$}__content--transition-open`,contentLine:`${$}__content-line`,contentContainer:`${$}__content-container`,smallContentContainer:`${$}__content-container--small`,min:`${$}__content-container--min`,title:`${$}__title`,closeContainer:`${$}__close-container`,closeButton:`${$}__close-button`}),P=({children:e,footer:t,isOpen:n,isSmallPopup:r,onClose:a,hasCloseButton:c=!0,full:u,touchDistance:d=100,withDisabledScroll:p=!0,contentClassName:h,className:v,title:g,closeButton:f,footerClassName:w})=>{let[_,x]=(0,l.useState)(!1),[j,y]=(0,l.useState)(!1),[k,N]=(0,l.useState)(!0),[C,T]=(0,l.useState)("120%"),O=(0,l.useRef)(null),S=(0,l.useRef)(0),A=(0,l.useRef)(!1),I=e=>{var t,n,o;let i=null==(t=O.current)?void 0:t.offsetTop,l=null==(n=O.current)?void 0:n.offsetHeight;if(A.current=!0,N(!1),i&&l){let t=(null==(o=null==e?void 0:e.touches[0])?void 0:o.clientY)-i,n=0;t>=0&&t<=l+30&&(n=t),t>l+30&&(n=l+30),T(`${n}px`),S.current=n}},L=()=>{A.current&&(S.current>d&&a?null==a||a():T("0"),N(!0),A.current=!1),window.removeEventListener("touchmove",I),window.removeEventListener("touchend",L)};return(0,l.useEffect)(()=>{n&&setTimeout(()=>{x(!0),y(!0),T("0")},100),!n&&j&&(T("120%"),x(!1),y(!1))},[j,n]),b(n&&p),(0,o.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(E.mobilePopup,j&&E.mobilePopupOpen,v),children:[(0,o.jsx)(m,{onClose:()=>{n&&(null==a||a())},onToucheMove:()=>{n&&(x(!1),window.addEventListener("touchmove",I),window.addEventListener("touchend",L))},isOpen:n,delay:0}),(0,o.jsxs)("div",{className:(0,i.Z)(E.content,u&&E.contentFull,k&&E.contentTransition,k&&_&&E.contentTransitionOpen),ref:O,style:{transform:`translateY(${C})`},children:[(0,o.jsx)("div",{className:E.contentLine}),(0,o.jsxs)("div",{className:(0,i.Z)(E.contentContainer,r&&E.smallContentContainer,{[E.min]:!g&&!c},h),children:[!!g&&(0,o.jsx)("div",{className:E.title,children:g}),c?(0,o.jsx)("div",{className:E.closeContainer,children:c?f?"function"==typeof f?f():f:(0,o.jsx)("button",{onClick:a,className:E.closeButton,children:(0,o.jsx)(s.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,o.jsx)(z,{footerClassName:w,isSmallPopup:r,footer:t})]})]})},M=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:l}=u({opened:n});return l?(0,o.jsx)(P,{isSmallPopup:t,isOpen:n,...i,children:e}):null};M.displayName="UiMobilePopup";let B=({children:e,id:t="portal-root"})=>{let[n,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=document.getElementById(t);if(e){o(e);return}let n=document.createElement("div");return n.id=t,document.body.appendChild(n),o(n),()=>{document.body.removeChild(n)}},[t]),n?(0,a.createPortal)(e,n):null}},3919:function(e,t,n){"use strict";function o(e,t){return`finkit-widgets-${t}-${e}`}n.d(t,{g:function(){return o}})},2331:function(e,t,n){"use strict";n.d(t,{D:function(){return a},h:function(){return u}});let o={а:"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.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in o?o[t]:e}).replaceAll(/[ \u00A0]/g,"_");var l,s=n(915);let r=(e,t)=>{if(typeof window>"u")return;let n=sessionStorage.getItem("pushedEvents"),o=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(" ","_")),e.eventLabel||(e.eventLabel="undefined");let i=o.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||!i){if(t){let t={...e};t.url=window.location.pathname,o.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(o))}(0,s.AB)(e)}};var a=((l=a||{}).icon="icon",l.chip="chip",l.accordion="accordion",l.button="button",l.checkbox="checkbox",l.radio="radio",l.select="select",l.toggle="toggle",l.tooltip="tooltip",l.link="link",l.banner="banner",l.tag="tag",l.date="date",l.field="field",l.offer="offer",l.tab="tab",l.submitButton="submitButton",l.popup="popup",l.block="block",l);let c={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_",submitButton:"form_button_",popup:"show_pop_up_",block:"click_block_"},u=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:o})=>{let l={event:"data-event",eventCategory:e,eventAction:c[t]+i(n)};void 0!==o&&(l.eventLabel=i("string"==typeof o?o:o.toString())),r(l)}},9623:function(e,t,n){"use strict";n.d(t,{$:function(){return H}});var o=n(7437),i=n(2833),l=n(3167),s=n(4866),r=n(3919),a=n(1810),c=n(2331),u=n(6094),d=n(2265),p=n(682);let m=(0,r.g)("footer-contacts-block","sc"),h=Object.freeze({contactsWrapper:"".concat(m,"__contacts-wrapper"),gray:"".concat(m,"__gray"),phones:"".concat(m,"__phones"),contactsButtons:"".concat(m,"__contacts-buttons"),vkIcon:"".concat(m,"__vk-icon"),tgIcon:"".concat(m,"__tg-icon"),dzenIcon:"".concat(m,"__dzen-icon"),maxIcon:"".concat(m,"__max-icon"),link:"".concat(m,"__link")}),v=(0,r.g)("footer","sc"),g=Object.freeze({wrapper:"".concat(v,"__wrapper"),section:"".concat(v,"__section"),container:"".concat(v,"__container"),top:"".concat(v,"__top"),main:"".concat(v,"__main"),links:"".concat(v,"__links"),disclaimer:"".concat(v,"__disclaimer"),bottom:"".concat(v,"__bottom"),bottomLinks:"".concat(v,"__bottom-links"),bottomDisclaimer:"".concat(v,"__bottom-disclaimer"),compact:"".concat(v,"__wrapper--compact"),white:"".concat(v,"__wrapper--white")}),f="finkit-widgets-sc-footer",w=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],_=[...w,{title:"Онлайн чат",url:void 0}],x=[{type:"vk",className:h.vkIcon,iconName:"vk"},{type:"telegramChannel",className:h.tgIcon,iconName:"telegram"},{type:"dzen",className:h.dzenIcon,iconName:"dzen"},{type:"max",className:h.maxIcon,iconName:"max"}],b=(0,o.jsxs)("p",{children:["На сайте finuslugi.ru предоставляются услуги оператора финансовой платформы ПАО Московская Биржа, а также услуги ООО \xabМБ Маркетплейс\xbb, организации, не являющейся оператором финансовой платформы в соответствии с Федеральным законом от 20.07.2020 №211-ФЗ \xabО совершении финансовых сделок с использованием финансовой платформы\xbb. Услуги оператора финансовой платформы ПАО Московская Биржа обозначены пометкой \xabОткрытие онлайн на Финуслугах\xbb. Иная информация на сайте www.finuslugi.ru считается размещенной ООО \xabМБ Маркетплейс\xbb, если иное явно не следует из существа размещаемой информации. ООО \xabМБ Маркетплейс\xbb входит в Группу \xabМосковская Биржа\xbb.",(0,o.jsx)("br",{}),(0,o.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),j=e=>{let{onClick:t,eventActionText:n,eventLabel:i,...l}=e;return(0,o.jsx)(a.zx,{onClick:e=>{null==t||t(e),(0,c.h)({eventCategory:f,eventActionType:c.D.button,eventActionText:n||"",eventLabel:i})},...l})},y=e=>{let{onClick:t,eventActionType:n,eventActionText:i,eventLabel:l,chat:s,...r}=e;return(0,o.jsx)(a.rU,{onClick:e=>{var o,r,a;null==t||t(e),s&&(null==e||e.preventDefault(),null==(a=null==(r=null==(o=null==window?void 0:window.supportWidget)?void 0:o.craftTalk)?void 0:r.open)||a.call(r)),(0,c.h)({eventCategory:f,eventActionType:n||c.D.link,eventActionText:i||"",eventLabel:l})},...r})},k=e=>{let{minioUrl:t,blogs:n}=e;return(0,o.jsxs)("div",{className:h.contactsWrapper,children:[(0,o.jsx)(i.xv,{className:h.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,o.jsx)("div",{className:h.phones,children:_.map(e=>{let{title:t,url:n}=e;return(0,o.jsx)(y,{href:n,eventActionText:t,chat:!n,children:t},t)})}),(0,o.jsx)(i.xv,{className:h.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,o.jsx)("div",{className:h.contactsButtons,children:x.map(e=>{let{type:i,className:l,iconName:r}=e;return(0,o.jsx)(j,{as:"a",href:null==n?void 0:n[i],target:"_blank",className:l,iconRight:(0,o.jsx)("img",{width:24,height:24,src:(0,s.xn)(t,"/widgets/footer/".concat(r,".svg")),alt:i,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:i,eventLabel:null==n?void 0:n[i]},i)})}),(0,o.jsx)(i.xv,{className:h.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,o.jsx)("div",{className:h.contactsButtons,children:(0,o.jsxs)(y,{href:null==n?void 0:n.investTg,target:"_blank",className:h.link,eventActionText:"telegram",eventLabel:null==n?void 0:n.investTg,children:[(0,o.jsx)(j,{className:h.tgIcon,iconRight:(0,o.jsx)("img",{width:24,height:24,src:(0,s.xn)(t,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==n?void 0:n.investTg}),"Финуслуги Инвест"]})})]})},N=(0,r.g)("footer-disclaimer","sc"),C=Object.freeze({disclaimer:"".concat(N)}),T=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,c.h)({eventCategory:f,eventActionType:c.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,o.jsx)("div",{className:(0,l.Z)(e.className,C.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,o.jsx)("div",{className:(0,l.Z)(e.className,C.disclaimer),onClick:t,children:e.children})},O=()=>{let e=new URL(window.location.href),t=new URLSearchParams;return e.searchParams.forEach((e,n)=>{/^utm_/i.test(n)&&t.set(n,e)}),t},S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",[t,n]=(0,d.useState)(e);return(0,d.useEffect)(()=>{let t=O();if(!t||0===t.size)return;let[o,i=""]=e.split("?"),l=new URLSearchParams(i);t.forEach((e,t)=>{l.has(t)||l.set(t,e)});let s=l.toString();n(s?"".concat(o,"?").concat(s):o)},[e]),t},A=(0,r.g)("footer-modal-body","sc"),I=Object.freeze({wrapper:"".concat(A,"__wrapper"),title:"".concat(A,"__title"),item:"".concat(A,"__item"),label:"".concat(A,"__label"),button:"".concat(A,"__button"),description:"".concat(A,"__description")}),L=e=>{let{directions:t}=e;return(0,o.jsxs)("div",{className:I.wrapper,children:[(0,o.jsx)("div",{className:I.title,children:"Направления"}),t.map(e=>(0,o.jsxs)(y,{className:I.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:"".concat(e.name,"_").concat(e.url),children:[(0,o.jsxs)("div",{className:I.label,children:[(0,o.jsx)("span",{children:e.name}),(0,o.jsx)(j,{className:I.button,iconRight:(0,o.jsx)(u.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,o.jsx)("p",{className:I.description,children:e.description})]},e.url))]})},R=(0,r.g)("footer-popup","sc"),z=Object.freeze({wrapper:"".concat(R,"__wrapper"),button:"".concat(R,"__button"),icon:"".concat(R,"__icon"),buttonWrapper:"".concat(R,"__button-wrapper")}),$=e=>{let{directions:t}=e,n=(0,a._m)("l"),[i,l]=(0,d.useState)(!1),s=()=>{l(!1)};return(0,o.jsxs)("div",{className:z.wrapper,children:[(0,o.jsx)("div",{className:z.buttonWrapper,children:(0,o.jsx)(j,{className:z.button,appearance:"ghost",variant:"white",onClick:()=>{l(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,o.jsx)("div",{className:z.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,o.jsx)("div",{},e))})})}),(0,o.jsxs)(p.P,{children:[!n&&(0,o.jsx)(p.U,{isOpen:i,onClose:s,full:!0,children:(0,o.jsx)(L,{directions:t})}),n&&(0,o.jsx)(p.D,{isOpen:i,onClose:s,width:"804px",children:(0,o.jsx)(L,{directions:t})})]})]})},E=(0,r.g)("footer-left-column","sc"),P=Object.freeze({leftColumn:"".concat(E,"__left-column"),logoWrapper:"".concat(E,"__logo-wrapper"),banner:"".concat(E,"__banner")}),M=e=>{let{showcaseUrl:t,minioUrl:n,directions:l,mobAppUrl:r}=e,a=S(r);return(0,o.jsxs)("div",{className:P.leftColumn,children:[(0,o.jsx)(y,{className:P.logoWrapper,href:t,eventActionType:c.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:(0,o.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,o.jsx)($,{directions:null!=l?l:[]}),(0,o.jsx)(y,{href:a,target:"_blank",eventActionType:c.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:a,children:(0,o.jsxs)(i.Zb,{className:P.banner,children:[(0,o.jsxs)(i.xv,{weight:"medium",children:["Управляйте финансами",(0,o.jsx)("br",{}),"через приложение Финуслуг"]}),(0,o.jsx)(j,{iconRight:(0,o.jsx)(u.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,o.jsxs)("picture",{children:[(0,o.jsx)("source",{srcSet:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,o.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},B=(0,r.g)("footer-logo","sc"),U=Object.freeze({wrapper:"".concat(B,"__wrapper"),link:"".concat(B,"__link"),fromMoex:"".concat(B,"__from-moex"),logo:"".concat(B,"__logo"),white:"".concat(B,"__wrapper--white")}),W=e=>{let{showcaseUrl:t,minioUrl:n,isWhite:i}=e;return(0,o.jsx)("div",{className:(0,l.Z)(U.wrapper,{[U.white]:i}),children:(0,o.jsxs)(y,{className:U.link,href:t,eventActionType:c.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:[(0,o.jsx)("img",{className:U.logo,src:"".concat(n,"/images/logo-brandmark-common-finuslugi.svg")}),(0,o.jsx)("img",{className:U.fromMoex,src:"".concat(n,"/images/fromMoex.svg")})]})})},D=(0,r.g)("footer-warning","sc"),F=Object.freeze({reservedSpace:"".concat(D,"__reserved-space"),wrapper:"".concat(D,"__wrapper"),fixed:"".concat(D,"__wrapper--fixed"),container:"".concat(D,"__container")}),Z=e=>{let{text:t,fixed:n}=e;return(0,o.jsx)("div",{className:(0,l.Z)(F.wrapper,{[F.fixed]:n}),children:(0,o.jsx)(i.W2,{className:F.container,children:t})})},V=e=>{let{text:t}=e;return(0,o.jsxs)("div",{className:F.reservedSpace,children:[(0,o.jsx)(Z,{text:t}),(0,o.jsx)(Z,{text:t,fixed:!0})]})},H=e=>{var t,n;let{data:s,showcaseUrl:r="https://finuslugi.ru",minioUrl:a="https://assets.finuslugi.ru/mp-assets",customDisclaimer:c,variant:u="default"}=e,d=!c&&null!=s&&s.disclaimer?s.disclaimer:void 0,p=u.includes("compact"),m=u.includes("white"),h=null==(t=null==s?void 0:s.bottom)?void 0:t.concat(p?w:[]),v="warning"in s?s.warning:void 0;return(0,o.jsx)("footer",{className:(0,l.Z)(g.wrapper,{[g.compact]:p,[g.white]:m}),children:(0,o.jsxs)("section",{className:g.section,children:[(0,o.jsxs)(i.W2,{className:g.container,children:[!p&&(0,o.jsx)(M,{showcaseUrl:r,minioUrl:a,directions:s.directions,mobAppUrl:s.mobAppUrl}),(0,o.jsx)("div",{className:g.wrapper,children:(0,o.jsxs)("div",{className:g.top,children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:g.main,children:[!p&&(0,o.jsx)("div",{className:g.links,children:null==(n=null==s?void 0:s.top)?void 0:n.map(e=>(0,o.jsx)(y,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),p&&(0,o.jsx)(W,{showcaseUrl:r,minioUrl:a,isWhite:m}),(0,o.jsx)(T,{className:g.disclaimer,disclaimer:d,children:c||b})]}),(0,o.jsxs)("div",{className:g.bottom,children:[(0,o.jsx)("div",{className:g.bottomLinks,children:null==h?void 0:h.map(e=>(0,o.jsx)(y,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,o.jsx)(T,{className:g.bottomDisclaimer,disclaimer:null==s?void 0:s.bottomDisclaimer})]})]}),!p&&(0,o.jsx)(k,{minioUrl:a,blogs:s.blogs})]})})]}),p&&!!v&&(0,o.jsx)(V,{text:v})]})})}},6678:function(e,t,n){"use strict";n.d(t,{sM:function(){return Z},h4:function(){return eE}});var o=n(7437),i=n(2265),l=n(2331),s=n(6094),r=n(2833),a=n(1810),c=n(3167),u=n(4866),d=n(682),p=n(3919);let m=(0,p.g)("header","sc"),h=Object.freeze({header:`${m}`,fixed:`${m}__fixed`,hidden:`${m}__fixed--hidden`,transparent:`${m}--transparent`,navigationOpen:`${m}__navigation-open`,container:`${m}__container`,leftRow:`${m}__left-row`,logo:`${m}__logo`,menuItems:`${m}__menu-items`,menuItemActive:`${m}__menu-item-active`,tabletMenuButton:`${m}__tablet-menu-button`,buttonGroup:`${m}__button-group`,chips:`${m}__chips`,menuButton:`${m}__menu-button`,moreButtons:`${m}__more-buttons`,auth:`${m}__auth`,close:`${m}__close`,removed:`${m}__removed`,overlay:`${m}__overlay`,overlayOpening:`${m}__overlay--opening`,overlayClosing:`${m}__overlay--closing`}),v="cb-header",g=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],f=g.reduce((e,t)=>(e[t.id]=t.label,e),{}),w=Object.freeze({mobile:56,desktop:80}),_=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let o=document.getElementById("mainHomeBanner"),i=!1,l=0,s=0,r=()=>window.innerWidth<768,a=r(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");e&&(s=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),l=c())},d=()=>{let e=r();e!==a&&(a=e,s=0)},p=function(){let r=c(),a=document.getElementById("headerMobileBanner"),d=null==a?void 0:a.getAttribute("data-opening");if("true"===d)return;s||u();let p=r<s,m=r<((null==o?void 0:o.clientHeight)||0);if(n&&m||p){i=!1,e(!1),t(!0);return}e(i=r>l),i&&setTimeout(()=>t(!1),50);let h=i?"0px":"false"===d?`${s}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",h),document.documentElement.style.setProperty("--new-header-height-mobile",h),l=r<=0?0:r};return window.addEventListener("scroll",p),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d)}},x=()=>{let e=new URLSearchParams(window.location.search),t={};for(let[n,o]of Array.from(e.entries()))n.startsWith("utm_")&&(t[n]=o);return Object.keys(t).length>0?t:null},b=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),j=(e,t)=>{let n=new Date;n.setTime(n.getTime()+864e5*t);let o=encodeURIComponent(JSON.stringify(e));document.cookie=`utm_params=${o};expires=${n.toUTCString()};path=/;SameSite=Lax`},y=()=>{if(b())return;let e=x();e&&j(e,90)},k=()=>{setTimeout(()=>{if(!(typeof document>"u"||!document.cookie))try{y()}catch(e){console.error("UTM tracking error:",e)}},0)},N=(e,t,n)=>(0,l.h)({eventCategory:v,eventActionType:e,eventActionText:t,eventLabel:n}),C=(0,p.g)("navigation-chips","sc"),T=Object.freeze({wrapper:`${C}__wrapper`,gray:`${C}__variantGray`,white:`${C}__variantWhite`,container:`${C}__container`,chip:`${C}__chip`,more:`${C}__chip--more`,active:`${C}__chip--active`,label:`${C}__label`,hidden:`${C}__hidden`}),O=(0,p.g)("navigation-content","sc"),S=Object.freeze({contentWrapper:`${O}__content-wrapper`,content:`${O}__content`,contentOpen:`${O}__content--open`,contentHeader:`${O}__content-header`,contentTitle:`${O}__content-title`,contentTitleUrl:`${O}__content-title--url`,contentTitleLink:`${O}__content-title--link`,contentTitleNew:`${O}__content-title--new`,new:`${O}__new`,vip:`${O}__vip`,arrowIcon:`${O}__arrow-icon`,links:`${O}__links`,linksColumns:`${O}__links--columns`,linksTitleless:`${O}__links--titleless`,removed:`${O}__removed`,hidden:`${O}__content--hidden`}),A=({chip:e,hidden:t,onClick:n,refCallback:i,activeChipId:r})=>{let a=!!n,u=()=>{if(a)return null==n?void 0:n(e.url);N(l.D.chip,e.title,`${e.title}_${e.url}`)},d=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:T.label,children:e.title}),e.arrow&&(0,o.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,c.Z)(T.chip,{[T.hidden]:t,[S.new]:!!e.new,[S.vip]:!!e.vip,[T.active]:e.url===r});return a?(0,o.jsx)("button",{type:"button",className:p,onClick:u,ref:i,children:d}):(0,o.jsx)("a",{href:e.url,className:p,onClick:u,ref:i,children:d})},I=({items:e=[],maxNumberOfLines:t,variant:n,className:r,activeChipId:a,onClick:u})=>{let d=(0,i.useRef)(null),p=(0,i.useRef)(null),m=(0,i.useRef)({}),[h,v]=(0,i.useState)(!1),[g,f]=(0,i.useState)(e.length),[w,_]=(0,i.useState)(!1);(0,i.useMemo)(()=>{let t=m.current;e.forEach(e=>{e.url in t||(t[e.url]=null)}),Object.keys(t).forEach(n=>{e.find(e=>String(e.url)===String(n))||delete t[n]})},[e]);let x=(0,i.useCallback)(()=>{let n=d.current;if(!n)return;let o=e=>e?e.getBoundingClientRect().width:0,i=o(n),l=Math.max(Number(t)||0,0),s=()=>{f(e.length),_(!1)};if(h||0===l||i<=0){s();return}let r=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),a=o(p.current),c=e.map(e=>o(m.current[e.url]));if(c.some(e=>0===e)){s();return}let u=1,v=0,g=0;for(let e of c){let t=u===l?a+r:0,n=0===v?e:v+r+e;if(n+t<=i-.5)v=n,g++;else{if(++u>l)break;v=e,g++}}_(g<e.length),f(g)},[h,e,t]);(0,i.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(x)});return t.observe(e),requestAnimationFrame(x),()=>{t.disconnect()}},[x]),(0,i.useEffect)(()=>{requestAnimationFrame(x)},[x]);let b=h||(t??0)<=0||!w;return(0,o.jsx)("div",{className:(0,c.Z)(r,T.wrapper,{[T.gray]:"gray"===n,[T.white]:"white"===n}),children:(0,o.jsxs)("div",{ref:d,className:T.container,children:[e.map((e,t)=>(0,o.jsx)(A,{chip:e,hidden:!b&&t>=g,activeChipId:a,onClick:u,refCallback:t=>{m.current[e.url]=t}},e.url)),!b&&w&&(0,o.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(T.chip,T.more),onClick:()=>{N(l.D.chip,"Еще"),v(!0)},children:[(0,o.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,o.jsx)("span",{className:T.label,children:"Еще"})]}),(b||!w)&&(0,o.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(T.chip,T.more,T.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,o.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,o.jsx)("span",{className:T.label,children:"Еще"})]})]})})},L=function(e){if(typeof window>"u"||!window.localStorage)return null;let t=window.localStorage.getItem(e);if(!t||"undefined"===t)return null;try{return JSON.parse(t)}catch(t){console.warn('Invalid object in localStorage for key "'.concat(e,'": ').concat(t))}return null},R=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=L("all_regions")||[];return window.allRegions=e,e},z=e=>{let t={};return e.map(e=>{let{id:n,name:o,towns:i}=e;return i.forEach(e=>{e.parentId=n,t[e.name]=t[e.name]||{},t[e.name][e.id]=o}),i}).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},$=async()=>{let e={regions:[]};try{e=await (await fetch("https://finuslugi.ru/money_data/Root.json?short=1")).json()}catch(e){console.warn(e)}let t=null!=e&&e.regions?e.regions:[];return t.length<1?[]:(window.allRegions=t,window.localStorage.setItem("all_regions",JSON.stringify(t)),window.localStorage.setItem("lastRegionsUpdateUnixTimestamp",JSON.stringify(Date.now())),t)},E=async e=>{let t=null;try{t=await (await fetch("".concat(e),{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},P=(e,t,n)=>{(0,l.h)({eventCategory:W,eventActionType:e,eventActionText:t,eventLabel:n})},M=R(),B=z(M),U={regions:M,towns:B,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},W="finkit-widgets-sc-city-select",D=(0,i.createContext)(U);function F(){return(0,i.useContext)(D)}let Z=e=>{let{children:t,showStartGeoPopup:n=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:r="https://finuslugi.ru/backend/money/dadata"}=e,a=Number(L("lastRegionsUpdateUnixTimestamp")||0),c=Number(s||0)>a,[u,d]=(0,i.useState)(R()),[{startRegion:p,startTown:m},h]=(0,i.useState)({startRegion:U.startRegion,startTown:U.startTown}),[{region:v,town:g},f]=(0,i.useState)({region:U.region,town:U.town}),[w,_]=(0,i.useState)(U.startPopupVisible),[x,b]=(0,i.useState)(U.popupVisible),j=(0,i.useRef)(""),y=(0,i.useMemo)(()=>z(u),[u.length]),k=(0,i.useCallback)((e,t)=>{window.sessionStorage.setItem("start_popup_opened","1"),window.localStorage.setItem("auto_town",JSON.stringify(t)||""),window.localStorage.setItem("auto_region",JSON.stringify(e)||""),_(!0),h({startRegion:e,startTown:t})},[_,h]),N=(0,i.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||k(e,t)},[k]),C=(0,i.useCallback)(()=>{if(j.current&&!v&&!g){var e,t;let n=null!==(e=y.find(e=>e.name===j.current))&&void 0!==e?e:null;return N(null!==(t=u.find(e=>e.id===(null==n?void 0:n.parentId)))&&void 0!==t?t:null,n)}N(v,g)},[v,g,y,u,N]),T=(0,i.useCallback)(e=>{b(e)},[b]),O=(0,i.useCallback)(e=>{e?P(l.D.icon,"location"):P(l.D.button,(null==g?void 0:g.name)||"Вся Россия"),!n||window.sessionStorage.getItem("start_popup_opened")?T(!0):C()},[n,g,T,C]),S=(0,i.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem("user_region",JSON.stringify(e)||""),window.localStorage.setItem("user_town",JSON.stringify(t)||"")):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem("user_region",""),window.localStorage.setItem("user_town","")),f({region:e||null,town:t||null}),_(!1),T(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[T]),A=()=>{f({region:L("user_region"),town:L("user_town")});let e=async e=>{let{coords:{latitude:t,longitude:n}}=e,o="".concat(r,"?lat=").concat(t,"&lon=").concat(n),i=await E(o);null!=i&&i.location&&(j.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&n)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch(e){}};return(0,i.useEffect)(()=>{if((u.length<1||c)&&$().then(e=>d(e)),window.innerWidth<1024){let e=()=>{A(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{A()},0)},[]),(0,o.jsx)(D.Provider,{value:{regions:u,towns:y,region:v,town:g,startPopupVisible:w,setStartPopupVisible:_,popupVisible:x,handleToggleModal:T,selectCity:S,handleButtonClick:O,startRegion:p,startTown:m},children:t})},V=()=>{let e=(0,i.useRef)(null),t=(0,i.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,i.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,i.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},H=(0,p.g)("city-select-modal-body","sc"),G=Object.freeze({wrapper:"".concat(H,"__wrapper"),subtitle:"".concat(H,"__subtitle"),hintWrapper:"".concat(H,"__hint-wrapper"),hintText:"".concat(H,"__hint-text"),input:"".concat(H,"__input"),chips:"".concat(H,"__chips"),townsListWrapper:"".concat(H,"__towns-list-wrapper"),townsList:"".concat(H,"__towns-list"),townsGroup:"".concat(H,"__towns-group"),townsGroupLabel:"".concat(H,"__towns-group-label"),townsGroupList:"".concat(H,"__towns-group-list"),townsName:"".concat(H,"__towns-name"),regionName:"".concat(H,"__region-name")}),J=e=>{var t;let{groupedTowns:n,chips:r,query:c,setQuery:u,isDrawer:d}=e,p=F(),m=(0,i.useRef)(null),[h,v]=(0,i.useState)("10000px");(0,i.useEffect)(()=>{if(!d||!m.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,o)=>{let i=n.map(e=>[...e]),l=i.map(e),s=l.reduce((e,t,n)=>t<l[e]?n:e,0);0===s&&i[0].push(i[1].shift()),2===s&&i[2].unshift(i[1].pop()),1===s&&l[0]>l[2]&&i[1].unshift(i[0].pop()),1===s&&l[0]<l[2]&&i[1].push(i[2].shift());let r=Math.max(...i.map(e));return r>=o?o:t(i,r)};new ResizeObserver(()=>{var e;if(!(null!=(e=m.current)&&e.children))return;let n=Array.from(m.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let o=0;try{o=t([[],n,[]],1/0)}catch(e){o=0}o>0&&v("".concat(o,"px"))}).observe(m.current)},[]);let g=e=>{if(P(l.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return p.selectCity();let t=p.regions.find(t=>t.id===Number(e.parentId))||null;p.selectCity(t,e)};return(0,o.jsxs)("div",{className:G.wrapper,children:[(0,o.jsxs)("div",{className:G.subtitle,children:["Покажем предложения рядом с вами",(0,o.jsxs)("div",{className:G.hintWrapper,children:[(0,o.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,o.jsx)("div",{className:G.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,o.jsx)(a.MA,{className:G.input,value:c,onChange:u,size:"s",placeholder:"Введите название города",icon:c?(0,o.jsx)(s.IconFdsCloseCircleO,{size:24,onClick:()=>u("")}):(0,o.jsx)(s.IconFdsSearchO,{size:24})}),(0,o.jsx)(a.cL,{className:G.chips,chips:r,value:(null==(t=p.town)?void 0:t.id)||0,onChipClick:e=>{g(p.towns.find(t=>t.id===e))}}),(0,o.jsx)("div",{className:G.townsListWrapper,children:(0,o.jsx)("div",{ref:m,className:G.townsList,style:{maxHeight:h},children:n.map(e=>(0,o.jsxs)("div",{className:G.townsGroup,children:[(0,o.jsx)("div",{className:G.townsGroupLabel,children:e.letter}),(0,o.jsx)("div",{className:G.townsGroupList,children:e.towns.map(e=>(0,o.jsxs)("button",{type:"button",onClick:()=>g(e),children:[(0,o.jsx)("div",{className:G.townsName,children:e.name}),(0,o.jsx)("div",{className:G.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},q=[1095,1096,134,720,189,180],Q=()=>{var e;let t=F(),n=(0,a._m)("l"),[s,r]=(0,i.useState)(""),c="Ваш выбор: ".concat((null==(e=t.town)?void 0:e.name)||"Вся Россия"),u=(0,i.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(s.toLocaleLowerCase())).sort((e,t)=>e.name.localeCompare(t.name)).reduce((e,t)=>{let n=e.pop();return n||(n={letter:t.name[0],towns:[]}),n.letter!==t.name[0]&&(e.push(n),n={letter:t.name[0],towns:[]}),n.towns.push(t),e.push(n),e},[]),[s,t.towns.length]),p=(0,i.useMemo)(()=>[{id:0,label:"Вся Россия"},...q.map(e=>{let n=t.towns.find(t=>t.id===e);return{id:null==n?void 0:n.id,label:null==n?void 0:n.name}}).filter(e=>(null==e?void 0:e.id)!==void 0)],[t.towns.length]),m=()=>{P(l.D.button,"close"),t.handleToggleModal(!1)};return(0,o.jsxs)(d.P,{children:[!n&&(0,o.jsx)(d.U,{title:c,isOpen:t.popupVisible,onClose:m,full:!0,children:(0,o.jsx)(J,{groupedTowns:u,chips:p,query:s,setQuery:r})}),n&&(0,o.jsx)(d.D,{title:c,isOpen:t.popupVisible,onClose:m,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,o.jsx)(J,{groupedTowns:u,chips:p,query:s,setQuery:r,isDrawer:!0})})]})},Y={"uat-mp.beta.moex.com":"//chat-marketplace.beta.moex.com","finuslugi.ru":"//chat.finuslugi.ru","dev-rc.beta.moex.com":"//dev-opbot.tech.finuslugi.ru"},K=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(Y,e)?Y[e]:Y["finuslugi.ru"]},X=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href="".concat(e,"/assets/css/").concat(t),document.head.appendChild(n);let o=document.createElement("script");o.src="".concat(e,"/get-bootstrap/").concat(t),o.defer=!0,document.body.appendChild(o)},ee=()=>new MutationObserver(e=>{e.forEach(e=>{if("style"===e.attributeName){let e=document.querySelector(".webchat"),t=!!e&&"none"!==e.style.display;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.isOpened=t)}})}),et=()=>{let[e,t]=(0,i.useState)(!1),[n,o]=(0,i.useState)(!1),l=(0,i.useRef)(!1),s=e=>{l.current=e,o(e)};return(0,i.useEffect)(()=>{if(typeof window>"u")return;let e=K(),n="webchat_main";window.supportWidget={craftTalk:{isOpened:!1,setConfig:t=>{if(t.host&&(e=t.host),t.channel&&(n=t.channel),t.user){let e="function"==typeof t.user?t.user:()=>({...t.user});window.__WebchatUserCallback=e}},open:()=>new Promise(e=>{e()}),close:()=>null,toggle:()=>null}};let o=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((i,r)=>{if(l.current){r(Error("chat is already opened"));return}o?(o.openWidget(),t(!1),i()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;o=e;let l=document.querySelector(".webchat");l&&ee().observe(l,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=o.closeWidget),null==o||o.openWidget(),s(!1),t(!1),i()},X(e,n))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,o;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(o=null==(n=window.supportWidget)?void 0:n.craftTalk)||o.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}},en=(0,i.createContext)({isAuth:!1,isHeaderHidden:!1,isHeaderTransparent:!1,openedBlock:null,setOpenedBlock:()=>null,openedSection:null,setOpenedSection:()=>null,isNavigationOpen:!1,isNavigationMounted:!1,navMenuItemsRef:{current:null},navigationRef:{current:null},ignoreClicks:!1,setIgnoreClicks:()=>null,isChatModalOpen:!1,setIsChatModalOpen:()=>null,isChatLoading:!1,fixedContainerRef:{current:null}});function eo(){return(0,i.useContext)(en)}let ei=e=>{let[t,n]=(0,i.useState)(!1),[l,s]=(0,i.useState)(!1),[r,a]=(0,i.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p}=et(),[m,h]=(0,i.useState)(null),[v,g]=(0,i.useState)(null),[f,w]=(0,i.useState)(!1),[x,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)(!1),N=(0,i.useRef)(null),C=(0,d.u)(f),T=(0,i.useRef)(null),O=(0,i.useRef)(null),S=(0,i.useRef)(null),A=(0,i.useCallback)(()=>{C.current&&C.current.scrollTo({top:0})},[C]),I=(0,i.useCallback)(e=>{g(e),A()},[A]),L=(0,i.useCallback)(e=>{T.current&&clearTimeout(T.current),e&&b(!0),e||(T.current=setTimeout(()=>{b(!1),I(null)},300))},[I]),R=(0,i.useCallback)((e,t,n)=>{if(t&&I(t),!n&&e===m||!e){L(!f),w(!f);return}h(e),L(!0),w(!0)},[m,I,f,L]),z=(0,i.useCallback)(()=>{O.current&&clearTimeout(O.current),y(!0),O.current=setTimeout(()=>{y(!1)},650)},[]);return(0,i.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=_(s,a,e.isMainBannerPage);return k(),t},[]),(0,o.jsx)("div",{children:(0,o.jsx)(en.Provider,{value:{isAuth:t,isHeaderHidden:l,isHeaderTransparent:r,openedBlock:m,setOpenedBlock:R,openedSection:v,setOpenedSection:I,isNavigationOpen:f,isNavigationMounted:x,navMenuItemsRef:N,navigationRef:C,ignoreClicks:j,setIgnoreClicks:z,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p,fixedContainerRef:S},children:e.children})})},el=e=>{let{label:t,onClick:n,eventActionText:i,eventLabel:s,...r}=e;return(0,o.jsx)(a.zx,{label:t,onClick:e=>{null==n||n(e),(0,l.h)({eventCategory:v,eventActionType:l.D.button,eventActionText:i||"",eventLabel:s||""})},...r})},es=(0,p.g)("header-popup","sc"),er=Object.freeze({popup:"".concat(es,"__popup"),popupHeader:"".concat(es,"__popup-header"),popupClose:"".concat(es,"__popup-close"),body:"".concat(es,"__body")}),ea=e=>{let{isOpen:t,onClose:n,children:i,title:l}=e,r=(0,a._m)("l");return(0,o.jsxs)(d.P,{children:[!r&&(0,o.jsx)(d.U,{title:l,isOpen:t,onClose:n,children:i}),r&&t&&(0,o.jsxs)("div",{className:er.popup,children:[(0,o.jsxs)("div",{className:er.popupHeader,children:[l,(0,o.jsx)(el,{className:er.popupClose,iconLeft:(0,o.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:n,eventActionText:"IconFdsCloseO"})]}),(0,o.jsx)("div",{className:er.body,children:i})]})]})},ec=(0,p.g)("start-choice-popup","sc"),eu=Object.freeze({top:"".concat(ec,"__top"),progress:"".concat(ec,"__progress"),innerCircle:"".concat(ec,"__inner-circle"),title:"".concat(ec,"__title"),subtitle:"".concat(ec,"__subtitle"),actions:"".concat(ec,"__actions")}),ed=()=>{var e,t;let n=F(),[s,r]=(0,i.useState)(10),[a,c]=(0,i.useState)(0),u=(0,i.useRef)(void 0),d=()=>{P(l.D.button,"close_choose_popup"),window.localStorage.setItem("auto_town",JSON.stringify(n.startTown)||""),window.localStorage.setItem("auto_region",JSON.stringify(n.startRegion)||""),n.setStartPopupVisible(!1)};return(0,i.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+s).slice(1)),t=1e3*e/100,n=0,o=0;u.current=setInterval(()=>{n++,o+=t,c(3.6*n);let i=e-Math.floor(o/1e3);i<s&&r(i),100===n&&(clearInterval(u.current),d())},t)})():(clearInterval(u.current),r(10),c(0))},[n.startPopupVisible]),(0,o.jsxs)(ea,{isOpen:n.startPopupVisible,onClose:d,title:(0,o.jsx)("button",{type:"button",className:eu.progress,style:{background:"conic-gradient(#ff0508 ".concat(a,"deg, #e3e7ec 0deg)")},onClick:d,children:(0,o.jsx)("div",{className:eu.innerCircle,children:s})}),children:[(0,o.jsxs)("div",{className:eu.top,children:[(0,o.jsxs)("div",{className:eu.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,o.jsx)("div",{className:eu.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,o.jsxs)("div",{className:eu.actions,children:[(0,o.jsx)(el,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{P(l.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,o.jsx)(el,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{P(l.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ep=(0,p.g)("city-select","sc"),em=Object.freeze({button:"".concat(ep,"__button")}),eh=e=>{var t;let{initialTown:n}=e,l=F(),r=(null==(t=l.town)?void 0:t.name)||n||"Вся Россия",{setIsChatModalOpen:c,isChatModalOpen:u}=eo(),{startPopupVisible:d,setStartPopupVisible:p,popupVisible:m}=l,h=(0,i.useRef)();return(0,i.useEffect)(()=>{m&&(h.current="popup")},[m]),(0,i.useEffect)(()=>{u&&(h.current="chat")},[u]),(0,i.useEffect)(()=>{d&&(h.current="startPopup")},[d]),(0,i.useEffect)(()=>{h.current&&("chat"===h.current&&d?p(!1):["startPopup","popup"].includes(h.current)&&u&&c(!1))},[m,u,d,p,c]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.zx,{className:em.button,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>l.handleButtonClick(!1),iconLeft:(0,o.jsx)(s.IconFdsLocationO,{size:16}),label:r}),(0,o.jsx)(Q,{}),(0,o.jsx)(ed,{})]})},ev=e=>{let{onClick:t,eventActionType:n,eventActionText:i,eventLabel:s,...r}=e;return(0,o.jsx)(a.rU,{onClick:e=>{null==t||t(e),(0,l.h)({eventCategory:v,eventActionType:n||l.D.link,eventActionText:i||"",eventLabel:s||""})},...r})},eg=(0,p.g)("header-mobile-app-banner","sc"),ef=Object.freeze({wrapper:"".concat(eg,"__wrapper"),container:"".concat(eg,"__container"),closeButton:"".concat(eg,"__close-button"),innerWrapper:"".concat(eg,"__inner-wrapper"),imageWrapper:"".concat(eg,"__image-wrapper"),image:"".concat(eg,"__image"),title:"".concat(eg,"__title"),description:"".concat(eg,"__description"),callToAction:"".concat(eg,"__call-to-action"),scanQr:"".concat(eg,"__scan-qr")}),ew=Object.freeze({mobile:56,desktop:68}),e_="headerBannerShownAt",ex=()=>{let e=localStorage.getItem(e_);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},eb=()=>{localStorage.setItem(e_,new Date().toISOString())},ej=()=>{let e=ex();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},ey=e=>{let{minioUrl:t,className:n,mobileAppUrl:l}=e,{fixedContainerRef:d}=eo(),[p,m]=(0,i.useState)(!1),[h,v]=(0,i.useState)(!1),[g,f]=(0,i.useState)(!1),_=(0,i.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"desktop",t=d.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height","".concat(ew[e]+w[e],"px")),document.documentElement.style.setProperty("--new-header-height-desktop","".concat(ew.desktop+w.desktop,"px")),document.documentElement.style.setProperty("--new-header-height-mobile","".concat(ew.mobile+w.mobile,"px")),document.documentElement.style.setProperty("--static-new-header-height-mobile","".concat(ew.mobile+w.mobile,"px")),document.documentElement.style.setProperty("--static-new-header-height-desktop","".concat(ew.desktop+w.desktop,"px")),document.documentElement.style.setProperty("--header-height","".concat(ew[e]+108,"px")))},[]),x=(0,i.useCallback)(()=>{let e=d.current;e&&(document.documentElement.style.removeProperty("--fixed-header-height"),document.documentElement.style.removeProperty("--new-header-height-desktop"),document.documentElement.style.removeProperty("--new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-desktop"),document.documentElement.style.removeProperty("--header-height"),e.style.transform="")},[]);return(0,i.useEffect)(()=>{let e=d.current;if(!e)return;let t=()=>{h&&m(!1),f(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[h]),(0,i.useEffect)(()=>{ej()&&m(!0)},[]),(0,i.useEffect)(()=>{let e=window.innerWidth<768;p&&(_(e?"mobile":"desktop"),f(!0));let t=()=>{if(!p)return null;_(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{x(),window.removeEventListener("resize",t)}},[p,_,x]),p?(0,o.jsx)("div",{id:"headerMobileBanner",role:"region","aria-label":"Мобильное приложение","data-opening":g,className:(0,c.Z)(ef.wrapper,n),children:(0,o.jsx)(r.W2,{children:(0,o.jsxs)("div",{className:ef.container,children:[(0,o.jsxs)("div",{className:ef.innerWrapper,children:[(0,o.jsxs)("picture",{className:ef.imageWrapper,children:[(0,o.jsx)("source",{srcSet:(0,u.xn)(t,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,o.jsx)("img",{className:ef.image,src:(0,u.xn)(t,"/logo/finuslugi/default-regular.svg")})]}),(0,o.jsxs)("div",{className:ef.scanQr,children:[(0,o.jsx)("div",{className:ef.title,children:"Скачайте приложение Финуслуги"}),(0,o.jsx)("div",{className:ef.description,children:"Сканируйте QR-код"})]}),(0,o.jsxs)("div",{className:ef.callToAction,children:[(0,o.jsxs)("div",{children:["Приложение",(0,o.jsx)("br",{}),"Финуслуги"]}),(0,o.jsx)(a.zx,{onClick:()=>{window.open(l,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,o.jsx)("div",{"aria-label":"Закрыть",role:"button",className:ef.closeButton,onClick:()=>{eb(),x(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?m(!1):v(!0)},children:(0,o.jsx)(s.IconFdsCloseO,{size:"100%"})})]})})}):null},ek=(0,p.g)("header-chat-modal-body","sc"),eN=Object.freeze({wrapper:"".concat(ek,"__wrapper"),cardButton:"".concat(ek,"__card-button"),card:"".concat(ek,"__card"),cardTitle:"".concat(ek,"__card-title"),cardSubtitle:"".concat(ek,"__card-subtitle"),button:"".concat(ek,"__button")}),eC=()=>{let e=eo();return(0,o.jsxs)("div",{className:eN.wrapper,children:[(0,o.jsx)(el,{className:eN.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},eventActionText:"Напишите в чат",children:(0,o.jsxs)(r.Zb,{className:eN.card,variant:"secondary",children:[(0,o.jsxs)("div",{className:eN.cardTitle,children:[(0,o.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat"}),"Напишите в чат"]}),(0,o.jsxs)("p",{className:eN.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,o.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),(0,o.jsx)(el,{className:eN.cardButton,variant:"secondary",as:"a",href:"https://finuslugi.ru/landing/fingpt",target:"_blank",eventActionText:"Спросите у FinGPT",children:(0,o.jsxs)(r.Zb,{className:eN.card,variant:"secondary",children:[(0,o.jsxs)("div",{className:eN.cardTitle,children:[(0,o.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/robot_icon_hover.svg",alt:"chat"}),"Спросите у FinGPT"]}),(0,o.jsx)("p",{className:eN.cardSubtitle,children:"Ваш личный финансовый AI-ассистент"})]})})]})},eT=e=>{let{data:t,isMobile:n}=e,r=eo();return(0,o.jsx)("div",{className:S.contentWrapper,children:t.map(e=>(0,o.jsx)(i.Fragment,{children:e.sections.map(e=>(0,o.jsxs)("div",{className:(0,c.Z)(S.content,{[S.hidden]:r.openedSection!==e.id,[S.contentOpen]:!!r.openedSection}),children:[(0,o.jsx)("div",{className:S.contentHeader,children:(0,o.jsx)("label",{children:e.title})}),e.content.map((t,i)=>{var r,a;return(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{children:(0,o.jsx)("a",{className:(0,c.Z)(S.contentTitle,{[S.removed]:!t.title,[S.contentTitleUrl]:!!t.url,[S.contentTitleLink]:!!e.isSeeAllLinkAvailable,[S.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,o.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,o.jsx)("div",{className:S.arrowIcon,children:(0,o.jsx)(s.IconFdsArrowUpRightSmallO,{})}),t.title]})})}),!(null!=(r=t.links)&&r.length)&&(0,o.jsx)(I,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:n?3:2}),!!(null!=(a=t.links)&&a.length)&&(0,o.jsx)("div",{className:(0,c.Z)(S.links,{[S.linksColumns]:!!t.columns,[S.linksTitleless]:!t.title}),children:t.links.map(e=>(0,o.jsxs)("a",{href:e.url,className:(0,c.Z)({[S.new]:!!e.new}),onClick:()=>N(l.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,o.jsx)("div",{className:S.arrowIcon,children:(0,o.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,o.jsx)("span",{children:e.title})]},e.url))})]},"".concat(t.url,"_").concat(i))})]},e.id))},e.id))})},eO=(0,p.g)("navigation-section-icon","sc"),eS=Object.freeze({icon:"".concat(eO)}),eA=e=>{let{name:t,background:n}=e,l=(0,i.useMemo)(()=>t&&s[t]||null,[t]);return t&&l?(0,o.jsx)("div",{className:eS.icon,style:{background:n},children:(0,o.jsx)(l,{})}):null},eI=(0,p.g)("navigation","sc"),eL=Object.freeze({navigation:"".concat(eI),navigationOpening:"".concat(eI,"--opening"),navigationClosing:"".concat(eI,"--closing"),wrapper:"".concat(eI,"__wrapper"),container:"".concat(eI,"__container"),containerOpen:"".concat(eI,"__container--open"),sections:"".concat(eI,"__sections"),sectionsOpen:"".concat(eI,"__sections--open"),citySelectButton:"".concat(eI,"__city-select-button"),sectionsTitle:"".concat(eI,"__sections-title"),sectionsWrapper:"".concat(eI,"__sections-wrapper"),section:"".concat(eI,"__section"),sectionArrow:"".concat(eI,"__section-arrow"),sectionExtra:"".concat(eI,"__section--extra"),sectionActive:"".concat(eI,"__section--active"),sectionTitle:"".concat(eI,"__section-title"),chatWrapper:"".concat(eI,"__chat-wrapper"),chatHeader:"".concat(eI,"__chat-header"),backButton:"".concat(eI,"__back-button"),useful:"".concat(eI,"__useful"),usefulOpen:"".concat(eI,"__useful--open"),usefulTitle:"".concat(eI,"__useful-title"),usefulGrid:"".concat(eI,"__useful-grid"),removed:"".concat(eI,"__removed")}),eR=e=>{var t;let{data:n}=e,u=eo(),d=F(),p=(0,a.aF)("m"),[m,h]=(0,i.useState)(!0);(0,i.useEffect)(()=>{h(p)},[p]);let v=(0,i.useRef)(null),g=(0,i.useCallback)(()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>u.openedSection?u.setOpenedSection(null):u.isNavigationOpen?u.setOpenedBlock(null):void 0,50)},[u]),w=(0,i.useRef)(!1),_=(0,i.useRef)(null),x=(0,i.useCallback)(()=>{m&&(w.current=!0,_.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),g()},window.history.pushState(null,"",window.location.href))},[g,m]),b=(0,i.useCallback)(()=>{w.current=!1,window.onpopstate=_.current,window.history.go(-1)},[]),j=(0,i.useRef)(null),y=(0,i.useCallback)(e=>{if(m||!u.navMenuItemsRef.current||!u.navigationRef.current)return;let t=e.target,n=!u.navMenuItemsRef.current.contains(t)&&!u.navigationRef.current.contains(t);if(n&&!j.current){u.setIgnoreClicks(),j.current=setTimeout(()=>u.setOpenedBlock(null),300);return}!n&&j.current&&(clearTimeout(j.current),j.current=null)},[m,u]),k=(0,i.useRef)(null),C=(0,i.useCallback)(e=>{typeof window>"u"||(e?(k.current=y,window.addEventListener("mousemove",k.current)):k.current&&window.removeEventListener("mousemove",k.current))},[y]);(0,i.useEffect)(()=>{C(u.isNavigationOpen),u.isNavigationOpen&&!w.current&&x(),!u.isNavigationOpen&&w.current&&b()},[u.isNavigationOpen]);let T=(e,t)=>()=>{N(l.D.button,t),u.setOpenedSection(e)},{start:O,clear:S}=V(),A=(e,t)=>()=>{m||O(T(e,t),150)},I=()=>{m||S()};return(0,o.jsx)("div",{ref:u.navigationRef,className:(0,c.Z)(eL.navigation,{[eL.removed]:!u.isNavigationMounted,[eL.navigationOpening]:u.isNavigationOpen,[eL.navigationClosing]:!u.isNavigationOpen}),children:(0,o.jsx)("div",{className:eL.wrapper,children:(0,o.jsxs)(r.W2,{className:(0,c.Z)(eL.container,{[eL.containerOpen]:!!u.openedSection}),children:[(0,o.jsxs)("div",{className:(0,c.Z)(eL.sections,{[eL.sectionsOpen]:!!u.openedSection}),children:[(0,o.jsx)(a.zx,{className:eL.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>d.handleButtonClick(!1),iconLeft:(0,o.jsx)(s.IconFdsLocationO,{size:24}),label:(null==(t=d.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,o.jsxs)("ul",{className:(0,c.Z)(eL.sectionsWrapper,{[eL.removed]:u.openedBlock!==e.id&&!m}),children:[(0,o.jsx)("div",{className:eL.sectionsTitle,children:f[e.id]}),e.sections.map(e=>(0,o.jsxs)("li",{className:(0,c.Z)(eL.section,{[eL.sectionExtra]:!!e.extra,[eL.sectionActive]:u.openedSection===e.id}),onClick:T(e.id,e.title),onMouseEnter:A(e.id,e.title),onMouseLeave:I,children:[(0,o.jsx)(eA,{name:e.uikitIcon,background:e.uikitIconBg}),(0,o.jsx)("span",{className:eL.sectionTitle,children:e.title}),(0,o.jsx)("div",{className:eL.sectionArrow,children:(0,o.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,o.jsxs)("div",{className:eL.chatWrapper,children:[(0,o.jsx)("div",{className:eL.chatHeader,children:"Нужна помощь?"}),(0,o.jsx)(eC,{})]})]}),(0,o.jsxs)("button",{type:"button",className:(0,c.Z)(eL.backButton,{[eL.removed]:!u.openedSection}),onClick:()=>{N(l.D.button,"Назад"),u.setOpenedSection(null)},children:[(0,o.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,o.jsx)("span",{children:"Назад"})]}),(0,o.jsx)(eT,{data:n,isMobile:m}),(0,o.jsxs)("div",{className:(0,c.Z)(eL.useful,{[eL.usefulOpen]:!!u.openedSection}),children:[(0,o.jsx)("div",{className:eL.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,o.jsx)(i.Fragment,{children:e.sections.map(e=>(0,o.jsx)("div",{className:(0,c.Z)(eL.usefulGrid,{[eL.removed]:u.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,o.jsxs)("a",{href:e.url,onClick:()=>N(l.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,o.jsx)("div",{children:(0,o.jsx)("img",{src:e.icon,srcSet:e.icon2?"".concat(e.icon,", ").concat(e.icon2," 2x"):void 0,alt:e.title,loading:"lazy"})}),(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},"".concat(e.title,"_").concat(t)))},e.id))},e.id))]})]})})})},ez=(e,t,n)=>{var o,i,l;let s=(null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o.findIndex(e=>{let{id:t}=e;return"news"===t}))||-1,r=(null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i[s])?void 0:l.content)||[];if(e&&Array.isArray(n)&&r.length){let o=n.map(e=>{let{title:n,url:o}=e;return{title:n,url:(0,u.xn)(t||"",o),new:0}});e.NAVIGATOR[s].content[0].links=o}return[{id:"FINPRODUCTS",sections:(null==e?void 0:e.FINPRODUCTS)||[]},{id:"NAVIGATOR",sections:(null==e?void 0:e.NAVIGATOR)||[]},{id:"ABOUT",sections:(null==e?void 0:e.ABOUT)||[]}]},e$=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:d="https://assets.finuslugi.ru/mp-assets",lkUrl:p="https://lk.finuslugi.ru/registration",initialTown:m,isMainBannerPage:v,enableAppHeaderBanner:f=!1,news:w}=e,_=eo(),x=ez(t,n,w),b=null==t?void 0:t.config,j=(0,i.useMemo)(()=>x.reduce((e,t)=>(e[t.id]=t.sections[0].id,e),{}),[x]),y=_.isAuth?"Личный кабинет":"Войти",k=v&&_.isHeaderTransparent,C=(e,t,n,o)=>()=>{e!==_.openedBlock?N(l.D.toggle,t,"on"):N(l.D.button,"menu_close","on");let i=n?j[e]:"";_.setOpenedBlock(e,i,!!o)},{start:T,clear:O}=V(),S=(e,t,n,o)=>()=>{_.isNavigationOpen&&e===_.openedBlock||_.setIgnoreClicks(),T(C(e,t,n,o),200)},A=e=>()=>{_.ignoreClicks||e()},I=e=>_.openedBlock===e&&_.isNavigationOpen;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("header",{className:(0,c.Z)(h.header,{[h.transparent]:k}),children:(0,o.jsxs)("div",{ref:_.fixedContainerRef,className:(0,c.Z)(h.fixed,{[h.hidden]:_.isHeaderHidden,[h.navigationOpen]:_.isNavigationOpen}),children:[!!(null!=b&&b.appBannerUrl)&&f&&(0,o.jsx)(ey,{mobileAppUrl:b.appBannerUrl,minioUrl:d}),(0,o.jsxs)(r.W2,{className:h.container,children:[(0,o.jsxs)("div",{className:h.leftRow,children:[(0,o.jsx)(ev,{className:h.logo,href:n,eventActionType:l.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:(0,o.jsxs)("picture",{children:[(0,o.jsx)("source",{srcSet:(0,u.xn)(d,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,o.jsx)("img",{src:(0,u.xn)(d,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,o.jsx)("nav",{ref:_.navMenuItemsRef,className:h.menuItems,children:(0,o.jsx)("ul",{children:g.map(e=>{let{id:t,label:n}=e;return(0,o.jsx)("li",{children:(0,o.jsx)(a.zx,{className:(0,c.Z)({[h.menuItemActive]:I(t)}),label:n,variant:"white",size:"xs",onClick:A(C(t,n,!0)),onMouseEnter:S(t,n,!0,!0),onMouseLeave:O})},t)})})}),(0,o.jsx)(el,{className:(0,c.Z)(h.tabletMenuButton,{[h.menuItemActive]:_.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,o.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:C("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,o.jsxs)("div",{className:h.buttonGroup,children:[(0,o.jsxs)("div",{className:h.chips,children:[(0,o.jsx)(el,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,o.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,o.jsx)(el,{as:"a",href:p,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(p),iconLeft:(0,o.jsx)(s.IconFdsUserO,{size:24})})]}),(0,o.jsx)(el,{className:h.menuButton,size:"xs",shape:k?"icon":"default",appearance:k?"ghost":"fill",label:"Меню",onClick:C("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,o.jsx)(s.IconFdsMenuSkewedO,{size:24})}),(0,o.jsxs)("div",{className:h.moreButtons,children:[(0,o.jsx)(eh,{initialTown:m}),(0,o.jsx)(el,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,o.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,o.jsx)(el,{as:"a",href:p,size:"xs",eventActionText:y,eventLabel:"".concat(y,"_").concat(p),label:y})]})]}),(0,o.jsxs)(ev,{className:h.auth,href:p,eventActionText:y,eventLabel:"".concat(y,"_").concat(p),children:[(0,o.jsx)(el,{size:"xs",shape:"circle-icon",iconLeft:(0,o.jsx)(s.IconFdsUserO,{}),eventActionText:y,eventLabel:"".concat(y,"_").concat(p)}),(0,o.jsx)("p",{children:y})]}),(0,o.jsx)("div",{className:h.close,children:(0,o.jsx)(el,{className:h.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,o.jsx)(s.IconFdsCloseO,{}),onClick:()=>_.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,o.jsx)("div",{className:(0,c.Z)(h.overlay,{[h.removed]:!_.isNavigationMounted,[h.overlayOpening]:_.isNavigationOpen,[h.overlayClosing]:!_.isNavigationOpen}),onClick:A(()=>_.setOpenedBlock(null))}),(0,o.jsx)(eR,{data:x,minioUrl:d})]})},eE=e=>(0,o.jsx)(ei,{isMainBannerPage:e.isMainBannerPage,children:(0,o.jsx)(e$,{...e})})},4866:function(e,t,n){"use strict";n.d(t,{xn:function(){return i}});let o=/^\.?\//;function i(e,...t){let n=e||"";for(let e of t.filter(e=>e&&"/"!==e))if(n){let t=e.replace(o,"");n=function(e="",t){return e.endsWith("/")?e:e+"/"}(n)+t}else n=e;return n}Symbol.for("ufo:protocolRelative")}}]);