"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[386],{1594:function(e,t,n){n.d(t,{D:function(){return I},P:function(){return E},U:function(){return U},u:function(){return j}});var s=n(5893),i=n(6010),l=n(7294),o=n(9194),r=n(4941),a=n(3935);let c=300,u=({opened:e})=>{let[t,n]=(0,l.useState)(!1),s=(0,l.useRef)(null),i=(0,l.useRef)(!1);return(0,l.useEffect)(()=>(e&&!i.current?(i.current=!0,n(!0)):!e&&i.current&&(s.current=setTimeout(()=>{i.current=!1,n(!1)},c)),()=>{s.current&&clearTimeout(s.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:o=c})=>{let r=(0,l.useRef)(null),a=(0,l.useCallback)(()=>{e&&(r.current=setTimeout(()=>{e()},o))},[o,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,s.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`)},w=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vw")},x=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},f=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},_=()=>document.querySelectorAll("[data-portal]").length>1,j=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 s=t.current,i=document.body,l=document.documentElement,o=window.innerWidth-l.clientWidth,r=o>0;if(e&&r)v(i),g(i,l,o),h(s,!0);else if(e)w(i),h(s,!0);else{let e=!_();e&&x(i),e&&f(),h(s,!1)}return()=>{let e=!_();e&&x(i),e&&f()}},[e]),t},b=(0,r.g)("drawer-footer","sc"),N=Object.freeze({footer:`${b}__footer`,hasScroll:`${b}__footer--has-scroll`}),C=({footer:e,hasScroll:t,className:n})=>(0,s.jsx)("div",{className:(0,i.Z)(N.footer,{[N.hasScroll]:t},n),children:"function"==typeof e?e():e}),$=(0,r.g)("drawer-content","sc"),k=Object.freeze({container:`${$}__container`,open:`${$}--open`,close:`${$}--close`,header:`${$}__header`,rowHeader:`${$}__header--row`,title:`${$}__title`,center:`${$}__title--center`,left:`${$}__title--left`,right:`${$}__title--right`,controlContainer:`${$}__control-container`,content:`${$}__content`,footer:`${$}__footer`}),y=({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:w})=>{let x=(0,l.useRef)(null),f=(0,l.useRef)(null),[_,j]=(0,l.useState)(!1);(0,l.useEffect)(()=>{var e;if(!f.current||!x.current)return;let t=(null==(e=null==f?void 0:f.current)?void 0:e.getBoundingClientRect().top)||0,n=null==x?void 0:x.current,s=()=>{let e=null==f?void 0:f.current;e&&j(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",s,!1),()=>{null==n||n.removeEventListener("scroll",s,!1)}},[]);let b=g||w?{width:w,...g||{}}:void 0;return(0,s.jsxs)("div",{ref:x,style:b,className:(0,i.Z)(k.container,{[k.open]:m,[k.close]:!m},h),children:[r||u?(0,s.jsxs)("div",{className:(0,i.Z)(k.header,{[k.rowHeader]:a}),children:[u?p?"function"==typeof p?p():p:(0,s.jsx)("button",{type:"button",className:k.controlContainer,onClick:e,children:(0,s.jsx)(o.IconFdsCloseO,{size:24})}):null,r?(0,s.jsx)("h3",{className:(0,i.Z)(k.title,{[k[c]]:!0}),children:r}):null]}):null,(0,s.jsx)("div",{ref:f,className:k.content,onClick:t,children:n}),d&&(0,s.jsx)(C,{className:(0,i.Z)(k.footer,v),footer:d,hasScroll:_})]})},O=(0,r.g)("drawer-layout","sc"),T=Object.freeze({window:`${O}__window`}),S=({onClose:e,isOpen:t,children:n,withDisabledScroll:o,className:r,...a})=>{let c=(0,l.useCallback)(e=>e.stopPropagation(),[]);return j(t&&o),(0,s.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(T.window,r),children:[(0,s.jsx)(m,{onClose:e,isOpen:t,delay:0}),(0,s.jsx)(y,{onContentClick:c,onClose:e,isOpen:t,...a,children:n})]})},I=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:l=!0,...o})=>{let{mounted:r}=u({opened:e});return r?(0,s.jsx)(S,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:l,...o,children:t}):null};I.displayName="Drawer";let A=(0,r.g)("mobile-modal-footer","sc"),L=Object.freeze({footer:`${A}__footer`,footerWithoutShadow:`${A}__footer--without-shadow`}),R=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,s.jsx)("div",{className:(0,i.Z)(L.footer,t&&L.footerWithoutShadow,n),children:"function"==typeof e?e():e}),z=(0,r.g)("mobile-popup","sc"),P=Object.freeze({mobilePopup:`${z}`,mobilePopupOpen:`${z}--open`,content:`${z}__content`,contentFull:`${z}__content--full`,contentTransition:`${z}__content--transition`,contentTransitionOpen:`${z}__content--transition-open`,contentLine:`${z}__content-line`,contentContainer:`${z}__content-container`,smallContentContainer:`${z}__content-container--small`,min:`${z}__content-container--min`,title:`${z}__title`,closeContainer:`${z}__close-container`,closeButton:`${z}__close-button`}),M=({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:w,footerClassName:x})=>{let[f,_]=(0,l.useState)(!1),[b,N]=(0,l.useState)(!1),[C,$]=(0,l.useState)(!0),[k,y]=(0,l.useState)("120%"),O=(0,l.useRef)(null),T=(0,l.useRef)(0),S=(0,l.useRef)(!1),I=e=>{var t,n,s;let i=null==(t=O.current)?void 0:t.offsetTop,l=null==(n=O.current)?void 0:n.offsetHeight;if(S.current=!0,$(!1),i&&l){let t=(null==(s=null==e?void 0:e.touches[0])?void 0:s.clientY)-i,n=0;t>=0&&t<=l+30&&(n=t),t>l+30&&(n=l+30),y(`${n}px`),T.current=n}},A=()=>{S.current&&(T.current>d&&a?null==a||a():y("0"),$(!0),S.current=!1),window.removeEventListener("touchmove",I),window.removeEventListener("touchend",A)};return(0,l.useEffect)(()=>{n&&setTimeout(()=>{_(!0),N(!0),y("0")},100),!n&&b&&(y("120%"),_(!1),N(!1))},[b,n]),j(n&&p),(0,s.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(P.mobilePopup,b&&P.mobilePopupOpen,v),children:[(0,s.jsx)(m,{onClose:()=>{n&&(null==a||a())},onToucheMove:()=>{n&&(_(!1),window.addEventListener("touchmove",I),window.addEventListener("touchend",A))},isOpen:n,delay:0}),(0,s.jsxs)("div",{className:(0,i.Z)(P.content,u&&P.contentFull,C&&P.contentTransition,C&&f&&P.contentTransitionOpen),ref:O,style:{transform:`translateY(${k})`},children:[(0,s.jsx)("div",{className:P.contentLine}),(0,s.jsxs)("div",{className:(0,i.Z)(P.contentContainer,r&&P.smallContentContainer,{[P.min]:!g&&!c},h),children:[!!g&&(0,s.jsx)("div",{className:P.title,children:g}),c?(0,s.jsx)("div",{className:P.closeContainer,children:c?w?"function"==typeof w?w():w:(0,s.jsx)("button",{onClick:a,className:P.closeButton,children:(0,s.jsx)(o.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,s.jsx)(R,{footerClassName:x,isSmallPopup:r,footer:t})]})]})},U=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:l}=u({opened:n});return l?(0,s.jsx)(M,{isSmallPopup:t,isOpen:n,...i,children:e}):null};U.displayName="UiMobilePopup";let E=({children:e,id:t="portal-root"})=>{let[n,s]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=document.getElementById(t);if(e){s(e);return}let n=document.createElement("div");return n.id=t,document.body.appendChild(n),s(n),()=>{document.body.removeChild(n)}},[t]),n?(0,a.createPortal)(e,n):null}},5862:function(e,t,n){n.d(t,{z:function(){return p}});var s=n(5893),i=n(9194),l=n(6010),o=n(7294),r=n(4941);let a="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",c={getItem:e=>{if(typeof document>"u")return null;let t=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return t?t.split("=")[1]??null:null},setItem:(e,t,n={})=>{if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;for(let e in n){if(!n.hasOwnProperty(e))continue;s+=`; ${e}`;let t=n[e];!0!==t&&(s+=`=${t}`)}document.cookie=s},removeItem:e=>{c.setItem(e,"",{"max-age":-1})}},u=(0,r.g)("cookies-plate","sc"),d=Object.freeze({wrapper:`${u}__wrapper`,contentWrapper:`${u}__content-wrapper`,visible:`${u}--visible`,hidden:`${u}--hidden`,content:`${u}__content`,text:`${u}__text`,link:`${u}__link`,button:`${u}__button`}),p=({className:e,mountDelay:t=3e3,href:n=a,children:r,closeIcon:u,onMount:p,onLinkClick:m,onClose:h,mountAfterScroll:v=!0})=>{let[g,w]=(0,o.useState)(!1),[x,f]=(0,o.useState)(!1),[_,j]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),c.getItem("Allow-Cookie")||(j(!0),setTimeout(()=>{w(!0),null==p||p()},t))};return v?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let b=(0,o.useCallback)(()=>{c.setItem("Allow-Cookie","1"),f(!0),null==h||h(),setTimeout(()=>j(!1),1e3)},[h]);return _?(0,s.jsx)("div",{className:d.wrapper,children:(0,s.jsx)("div",{className:(0,l.Z)(d.contentWrapper,{[d.visible]:g,[d.hidden]:x}),children:(0,s.jsxs)("div",{className:(0,l.Z)(e,d.content),children:[r||(0,s.jsxs)("p",{className:d.text,children:["Мы используем"," ",(0,s.jsx)("a",{className:d.link,href:n,target:"_blank",rel:"noreferrer",onClick:m,children:"cookie"})," ","для лучшей работы сайта"]}),(0,s.jsx)("button",{className:d.button,onClick:b,children:u||(0,s.jsx)(i.IconFdsCloseO,{})})]})})}):(0,s.jsx)(s.Fragment,{})}},6817:function(e,t,n){n.d(t,{$:function(){return V}});var s=n(5893),i=n(6535),l=n(6010),o=n(7769),r=n(9194),a=n(4941),c=n(4588),u=n(3803),d=n(7294),p=n(1594);let m=(0,a.g)("footer-contacts-block","sc"),h=Object.freeze({contactsWrapper:`${m}__contacts-wrapper`,gray:`${m}__gray`,phones:`${m}__phones`,contactsButtons:`${m}__contacts-buttons`,vkIcon:`${m}__vk-icon`,tgIcon:`${m}__tg-icon`,dzenIcon:`${m}__dzen-icon`,ytIcon:`${m}__yt-icon`,link:`${m}__link`}),v=(0,a.g)("footer","sc"),g=Object.freeze({wrapper:`${v}__wrapper`,section:`${v}__section`,container:`${v}__container`,top:`${v}__top`,main:`${v}__main`,links:`${v}__links`,disclaimer:`${v}__disclaimer`,bottom:`${v}__bottom`,bottomLinks:`${v}__bottom-links`,bottomDisclaimer:`${v}__bottom-disclaimer`,compact:`${v}__wrapper--compact`,white:`${v}__wrapper--white`}),w="finkit-widgets-sc-footer",x=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],f=[...x,{title:"Онлайн чат",url:void 0}],_=[{type:"vk",className:h.vkIcon,iconName:"vk"},{type:"dzen",className:h.dzenIcon,iconName:"dzen"},{type:"telegramChannel",className:h.tgIcon,iconName:"telegram"},{type:"yt",className:h.ytIcon,iconName:"",icon:(0,s.jsx)(r.IconFdsYoutubeF,{})}],j=(0,s.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,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),b=({onClick:e,eventActionText:t,eventLabel:n,...i})=>(0,s.jsx)(c.zx,{onClick:s=>{null==e||e(s),(0,u.h)({eventCategory:w,eventActionType:u.D.button,eventActionText:t||"",eventLabel:n})},...i}),N=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,chat:l,...o})=>(0,s.jsx)(c.rU,{onClick:s=>{var o,r,a;null==e||e(s),l&&(null==s||s.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,u.h)({eventCategory:w,eventActionType:t||u.D.link,eventActionText:n||"",eventLabel:i})},...o}),C=({minioUrl:e,blogs:t})=>(0,s.jsxs)("div",{className:h.contactsWrapper,children:[(0,s.jsx)(i.xv,{className:h.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,s.jsx)("div",{className:h.phones,children:f.map(({title:e,url:t})=>(0,s.jsx)(N,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,s.jsx)(i.xv,{className:h.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,s.jsx)("div",{className:h.contactsButtons,children:_.map(({type:n,className:i,iconName:l,icon:r})=>(0,s.jsx)(b,{as:"a",href:null==t?void 0:t[n],target:"_blank",className:i,iconRight:r||(0,s.jsx)("img",{src:(0,o.xn)(e,`/pl-common-blocks-renderer/footer/${l}.svg`),alt:n,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:n,eventLabel:null==t?void 0:t[n]},n))}),(0,s.jsx)(i.xv,{className:h.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,s.jsx)("div",{className:h.contactsButtons,children:(0,s.jsxs)(N,{href:null==t?void 0:t.investTg,target:"_blank",className:h.link,eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg,children:[(0,s.jsx)(b,{className:h.tgIcon,iconRight:(0,s.jsx)("img",{src:(0,o.xn)(e,"/pl-common-blocks-renderer/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg}),"Финуслуги Инвест"]})})]}),$=(0,a.g)("footer-disclaimer","sc"),k=Object.freeze({disclaimer:`${$}`}),y=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,u.h)({eventCategory:w,eventActionType:u.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,s.jsx)("div",{className:(0,l.Z)(e.className,k.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,s.jsx)("div",{className:(0,l.Z)(e.className,k.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},T=(e="")=>{let[t,n]=(0,d.useState)(e);return(0,d.useEffect)(()=>{let t=O();if(!t||0===t.size)return;let[s,i=""]=e.split("?"),l=new URLSearchParams(i);t.forEach((e,t)=>{l.has(t)||l.set(t,e)});let o=l.toString();n(o?`${s}?${o}`:s)},[e]),t},S=(0,a.g)("footer-modal-body","sc"),I=Object.freeze({wrapper:`${S}__wrapper`,title:`${S}__title`,item:`${S}__item`,label:`${S}__label`,button:`${S}__button`,description:`${S}__description`}),A=({directions:e})=>(0,s.jsxs)("div",{className:I.wrapper,children:[(0,s.jsx)("div",{className:I.title,children:"Направления"}),e.map(e=>(0,s.jsxs)(N,{className:I.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:`${e.name}_${e.url}`,children:[(0,s.jsxs)("div",{className:I.label,children:[(0,s.jsx)("span",{children:e.name}),(0,s.jsx)(b,{className:I.button,iconRight:(0,s.jsx)(r.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,s.jsx)("p",{className:I.description,children:e.description})]},e.url))]}),L=(0,a.g)("footer-popup","sc"),R=Object.freeze({wrapper:`${L}__wrapper`,button:`${L}__button`,icon:`${L}__icon`,buttonWrapper:`${L}__button-wrapper`}),z=({directions:e})=>{let t=(0,c._m)("l"),[n,i]=(0,d.useState)(!1),l=()=>{i(!1)};return(0,s.jsxs)("div",{className:R.wrapper,children:[(0,s.jsx)("div",{className:R.buttonWrapper,children:(0,s.jsx)(b,{className:R.button,appearance:"ghost",variant:"white",onClick:()=>{i(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,s.jsx)("div",{className:R.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,s.jsx)("div",{},e))})})}),(0,s.jsxs)(p.P,{children:[!t&&(0,s.jsx)(p.U,{isOpen:n,onClose:l,full:!0,children:(0,s.jsx)(A,{directions:e})}),t&&(0,s.jsx)(p.D,{isOpen:n,onClose:l,width:"804px",children:(0,s.jsx)(A,{directions:e})})]})]})},P=(0,a.g)("footer-left-column","sc"),M=Object.freeze({leftColumn:`${P}__left-column`,logoWrapper:`${P}__logo-wrapper`,banner:`${P}__banner`}),U=({showcaseUrl:e,minioUrl:t,directions:n,mobAppUrl:l})=>{let a=T(l);return(0,s.jsxs)("div",{className:M.leftColumn,children:[(0,s.jsx)(N,{className:M.logoWrapper,href:e,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:(0,s.jsx)("img",{src:(0,o.xn)(t,"/pl-common-blocks-renderer/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,s.jsx)(z,{directions:n??[]}),(0,s.jsx)(N,{href:a,target:"_blank",eventActionType:u.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:a,children:(0,s.jsxs)(i.Zb,{className:M.banner,children:[(0,s.jsxs)(i.xv,{weight:"medium",children:["Управляйте финансами",(0,s.jsx)("br",{}),"через приложение Финуслуг"]}),(0,s.jsx)(b,{iconRight:(0,s.jsx)(r.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,s.jsxs)("picture",{children:[(0,s.jsx)("source",{srcSet:(0,o.xn)(t,"/pl-common-blocks-renderer/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,s.jsx)("img",{src:(0,o.xn)(t,"/pl-common-blocks-renderer/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},E=(0,a.g)("footer-logo","sc"),D=Object.freeze({wrapper:`${E}__wrapper`,link:`${E}__link`,fromMoex:`${E}__from-moex`,logo:`${E}__logo`,white:`${E}__wrapper--white`}),W=({showcaseUrl:e,minioUrl:t,isWhite:n})=>(0,s.jsx)("div",{className:(0,l.Z)(D.wrapper,{[D.white]:n}),children:(0,s.jsxs)(N,{className:D.link,href:e,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,s.jsx)("img",{className:D.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,s.jsx)("img",{className:D.fromMoex,src:`${t}/images/fromMoex.svg`})]})}),B=(0,a.g)("footer-warning","sc"),F=Object.freeze({reservedSpace:`${B}__reserved-space`,wrapper:`${B}__wrapper`,fixed:`${B}__wrapper--fixed`,container:`${B}__container`}),Z=({text:e,fixed:t})=>(0,s.jsx)("div",{className:(0,l.Z)(F.wrapper,{[F.fixed]:t}),children:(0,s.jsx)(i.W2,{className:F.container,children:e})}),H=({text:e})=>(0,s.jsxs)("div",{className:F.reservedSpace,children:[(0,s.jsx)(Z,{text:e}),(0,s.jsx)(Z,{text:e,fixed:!0})]}),V=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",customDisclaimer:o,variant:r="default"})=>{var a,c;let u=!o&&null!=e&&e.disclaimer?e.disclaimer:void 0,d=r.includes("compact"),p=r.includes("white"),m=null==(a=null==e?void 0:e.bottom)?void 0:a.concat(d?x:[]),h="warning"in e?e.warning:void 0;return(0,s.jsx)("footer",{className:(0,l.Z)(g.wrapper,{[g.compact]:d,[g.white]:p}),children:(0,s.jsxs)("section",{className:g.section,children:[(0,s.jsxs)(i.W2,{className:g.container,children:[!d&&(0,s.jsx)(U,{showcaseUrl:t,minioUrl:n,directions:e.directions,mobAppUrl:e.mobAppUrl}),(0,s.jsx)("div",{className:g.wrapper,children:(0,s.jsxs)("div",{className:g.top,children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:g.main,children:[!d&&(0,s.jsx)("div",{className:g.links,children:null==(c=null==e?void 0:e.top)?void 0:c.map(e=>(0,s.jsx)(N,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),d&&(0,s.jsx)(W,{showcaseUrl:t,minioUrl:n,isWhite:p}),(0,s.jsx)(y,{className:g.disclaimer,disclaimer:u,children:o||j})]}),(0,s.jsxs)("div",{className:g.bottom,children:[(0,s.jsx)("div",{className:g.bottomLinks,children:null==m?void 0:m.map(e=>(0,s.jsx)(N,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,s.jsx)(y,{className:g.bottomDisclaimer,disclaimer:null==e?void 0:e.bottomDisclaimer})]})]}),!d&&(0,s.jsx)(C,{minioUrl:n,blogs:e.blogs})]})})]}),d&&!!h&&(0,s.jsx)(H,{text:h})]})})}},8926:function(e,t,n){n.d(t,{h4:function(){return em},sM:function(){return k}});var s=n(5893),i=n(7294),l=n(3803),o=n(9194),r=n(6535),a=n(4588),c=n(6010),u=n(7769),d=n(1594),p=n(4941),m=n(9789);let h=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 "${e}": ${t}`)}return null},v=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=h("all_regions")||[];return window.allRegions=e,e},g=e=>{let t={};return e.map(({id:e,name:n,towns:s})=>(s.forEach(s=>{s.parentId=e,t[s.name]=t[s.name]||{},t[s.name][s.id]=n}),s)).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},w=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)},x=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},f=(e,t,n)=>{(0,l.h)({eventCategory:N,eventActionType:e,eventActionText:t,eventLabel:n})},_=v(),j=g(_),b={regions:_,towns:j,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},N="finkit-widgets-sc-city-select",C=(0,i.createContext)(b);function $(){return(0,i.useContext)(C)}let k=({children:e,showStartGeoPopup:t=!0,lastRegionsUpdateUnixTimestamp:n,dadataUrl:o="https://finuslugi.ru/backend/money/dadata"})=>{let r=Number(h("lastRegionsUpdateUnixTimestamp")||0),a=Number(n||0)>r,[c,u]=(0,i.useState)(v()),[{startRegion:d,startTown:p},m]=(0,i.useState)({startRegion:b.startRegion,startTown:b.startTown}),[{region:_,town:j},N]=(0,i.useState)({region:b.region,town:b.town}),[$,k]=(0,i.useState)(b.startPopupVisible),[y,O]=(0,i.useState)(b.popupVisible),T=(0,i.useRef)(""),S=(0,i.useMemo)(()=>g(c),[c.length]),I=(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)||""),k(!0),m({startRegion:e,startTown:t})},[k,m]),A=(0,i.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||I(e,t)},[I]),L=(0,i.useCallback)(()=>{if(T.current&&!_&&!j){let e=S.find(e=>e.name===T.current)??null,t=c.find(t=>t.id===(null==e?void 0:e.parentId))??null;return A(t,e)}A(_,j)},[_,j,S,c,A]),R=(0,i.useCallback)(e=>{O(e)},[O]),z=(0,i.useCallback)(e=>{e?f(l.D.icon,"location"):f(l.D.button,(null==j?void 0:j.name)||"Вся Россия"),!t||window.sessionStorage.getItem("start_popup_opened")?R(!0):L()},[t,j,R,L]),P=(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","")),N({region:e||null,town:t||null}),k(!1),R(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[R]),M=()=>{let e=h("user_region"),n=h("user_town");N({region:e,town:n});let s=async({coords:{latitude:e,longitude:t}})=>{let n=`${o}?lat=${e}&lon=${t}`,s=await x(n);null!=s&&s.location&&(T.current=s.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&t)try{navigator.geolocation.getCurrentPosition(s,()=>null)}catch{}};return(0,i.useEffect)(()=>{if((c.length<1||a)&&w().then(e=>u(e)),window.innerWidth<1024){let e=()=>{M(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{M()},0)},[]),(0,s.jsx)(C.Provider,{value:{regions:c,towns:S,region:_,town:j,startPopupVisible:$,setStartPopupVisible:k,popupVisible:y,handleToggleModal:R,selectCity:P,handleButtonClick:z,startRegion:d,startTown:p},children:e})},y=()=>{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}},O=(0,p.g)("city-select-modal-body","sc"),T=Object.freeze({wrapper:`${O}__wrapper`,subtitle:`${O}__subtitle`,hintWrapper:`${O}__hint-wrapper`,hintText:`${O}__hint-text`,input:`${O}__input`,chips:`${O}__chips`,townsListWrapper:`${O}__towns-list-wrapper`,townsList:`${O}__towns-list`,townsGroup:`${O}__towns-group`,townsGroupLabel:`${O}__towns-group-label`,townsGroupList:`${O}__towns-group-list`,townsName:`${O}__towns-name`,regionName:`${O}__region-name`}),S=({groupedTowns:e,chips:t,query:n,setQuery:r,isDrawer:c})=>{var u;let d=$(),p=(0,i.useRef)(null),[m,h]=(0,i.useState)("10000px");(0,i.useEffect)(()=>{if(!c||!p.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,s)=>{let i=n.map(e=>[...e]),l=i.map(e),o=l.reduce((e,t,n)=>t<l[e]?n:e,0);0===o&&i[0].push(i[1].shift()),2===o&&i[2].unshift(i[1].pop()),1===o&&l[0]>l[2]&&i[1].unshift(i[0].pop()),1===o&&l[0]<l[2]&&i[1].push(i[2].shift());let r=i.map(e),a=Math.max(...r);return a>=s?s:t(i,a)};new ResizeObserver(()=>{var e;if(!(null!=(e=p.current)&&e.children))return;let n=Array.from(p.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let s=0;try{s=t([[],n,[]],1/0)}catch{s=0}s>0&&h(`${s}px`)}).observe(p.current)},[]);let v=e=>{if(f(l.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return d.selectCity();let t=d.regions.find(t=>t.id===Number(e.parentId))||null;d.selectCity(t,e)};return(0,s.jsxs)("div",{className:T.wrapper,children:[(0,s.jsxs)("div",{className:T.subtitle,children:["Покажем предложения рядом с вами",(0,s.jsxs)("div",{className:T.hintWrapper,children:[(0,s.jsx)(o.IconFdsQuestionCircleO,{size:24}),(0,s.jsx)("div",{className:T.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,s.jsx)(a.MA,{className:T.input,value:n,onChange:r,size:"s",placeholder:"Введите название города",icon:n?(0,s.jsx)(o.IconFdsCloseCircleO,{size:24,onClick:()=>r("")}):(0,s.jsx)(o.IconFdsSearchO,{size:24})}),(0,s.jsx)(a.cL,{className:T.chips,chips:t,value:(null==(u=d.town)?void 0:u.id)||0,onChipClick:e=>{let t=d.towns.find(t=>t.id===e);v(t)}}),(0,s.jsx)("div",{className:T.townsListWrapper,children:(0,s.jsx)("div",{ref:p,className:T.townsList,style:{maxHeight:m},children:e.map(e=>(0,s.jsxs)("div",{className:T.townsGroup,children:[(0,s.jsx)("div",{className:T.townsGroupLabel,children:e.letter}),(0,s.jsx)("div",{className:T.townsGroupList,children:e.towns.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>v(e),children:[(0,s.jsx)("div",{className:T.townsName,children:e.name}),(0,s.jsx)("div",{className:T.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},I=[1095,1096,134,720,189,180],A=()=>{var e;let t=$(),n=(0,a._m)("l"),[o,r]=(0,i.useState)(""),c=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,u=(0,i.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(o.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},[]),[o,t.towns.length]),p=(0,i.useMemo)(()=>{let e=I.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);return[{id:0,label:"Вся Россия"},...e]},[t.towns.length]),m=()=>{f(l.D.button,"close"),t.handleToggleModal(!1)};return(0,s.jsxs)(d.P,{children:[!n&&(0,s.jsx)(d.U,{title:c,isOpen:t.popupVisible,onClose:m,full:!0,children:(0,s.jsx)(S,{groupedTowns:u,chips:p,query:o,setQuery:r})}),n&&(0,s.jsx)(d.D,{title:c,isOpen:t.popupVisible,onClose:m,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,s.jsx)(S,{groupedTowns:u,chips:p,query:o,setQuery:r,isDrawer:!0})})]})},L=({label:e,onClick:t,eventActionText:n,eventLabel:i,...o})=>(0,s.jsx)(a.zx,{label:e,onClick:e=>{null==t||t(e),(0,l.h)({eventCategory:m.H,eventActionType:l.D.button,eventActionText:n||"",eventLabel:i||""})},...o}),R=(0,p.g)("header-popup","sc"),z=Object.freeze({popup:`${R}__popup`,popupHeader:`${R}__popup-header`,popupClose:`${R}__popup-close`,body:`${R}__body`}),P=({isOpen:e,onClose:t,children:n,title:i})=>{let l=(0,a._m)("l");return(0,s.jsxs)(d.P,{children:[!l&&(0,s.jsx)(d.U,{title:i,isOpen:e,onClose:t,children:n}),l&&e&&(0,s.jsxs)("div",{className:z.popup,children:[(0,s.jsxs)("div",{className:z.popupHeader,children:[i,(0,s.jsx)(L,{className:z.popupClose,iconLeft:(0,s.jsx)(o.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,s.jsx)("div",{className:z.body,children:n})]})]})},M=(0,p.g)("start-choice-popup","sc"),U=Object.freeze({top:`${M}__top`,progress:`${M}__progress`,innerCircle:`${M}__inner-circle`,title:`${M}__title`,subtitle:`${M}__subtitle`,actions:`${M}__actions`}),E=()=>{var e,t;let n=$(),[o,r]=(0,i.useState)(10),[a,c]=(0,i.useState)(0),u=(0,i.useRef)(void 0),d=()=>{f(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((" "+o).slice(1)),t=1e3*e/100,n=0,s=0;u.current=setInterval(()=>{n++,s+=t,c(3.6*n);let i=e-Math.floor(s/1e3);i<o&&r(i),100===n&&(clearInterval(u.current),d())},t)})():(clearInterval(u.current),r(10),c(0))},[n.startPopupVisible]),(0,s.jsxs)(P,{isOpen:n.startPopupVisible,onClose:d,title:(0,s.jsx)("button",{type:"button",className:U.progress,style:{background:`conic-gradient(#ff0508 ${a}deg, #e3e7ec 0deg)`},onClick:d,children:(0,s.jsx)("div",{className:U.innerCircle,children:o})}),children:[(0,s.jsxs)("div",{className:U.top,children:[(0,s.jsxs)("div",{className:U.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,s.jsx)("div",{className:U.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,s.jsxs)("div",{className:U.actions,children:[(0,s.jsx)(L,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{f(l.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,s.jsx)(L,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{f(l.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},D=(0,p.g)("city-select","sc"),W=Object.freeze({button:`${D}__button`}),B=({initialTown:e})=>{var t;let n=$(),i=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.zx,{className:W.button,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,s.jsx)(o.IconFdsLocationO,{size:16}),label:i}),(0,s.jsx)(A,{}),(0,s.jsx)(E,{})]})},F={"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"},Z=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(F,e)?F[e]:F["finuslugi.ru"]},H=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=`${e}/assets/css/${t}`,document.head.appendChild(n);let s=document.createElement("script");s.src=`${e}/get-bootstrap/${t}`,s.defer=!0,document.body.appendChild(s)},V=()=>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)}})}),G=()=>{let[e,t]=(0,i.useState)(!1),[n,s]=(0,i.useState)(!1),l=(0,i.useRef)(!1),o=e=>{l.current=e,s(e)};return(0,i.useEffect)(()=>{if(typeof window>"u")return;let e=Z(),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 s=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((i,r)=>{if(l.current){r(Error("chat is already opened"));return}s?(s.openWidget(),t(!1),i()):(o(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;s=e;let l=document.querySelector(".webchat");l&&V().observe(l,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=s.closeWidget),null==s||s.openWidget(),o(!1),t(!1),i()},H(e,n))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,s;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(s=null==(n=window.supportWidget)?void 0:n.craftTalk)||s.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}},J=(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});function q(){return(0,i.useContext)(J)}let Q=e=>{let[t,n]=(0,i.useState)(!1),[l,o]=(0,i.useState)(!1),[r,a]=(0,i.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p}=G(),[h,v]=(0,i.useState)(null),[g,w]=(0,i.useState)(null),[x,f]=(0,i.useState)(!1),[_,j]=(0,i.useState)(!1),[b,N]=(0,i.useState)(!1),C=(0,i.useRef)(null),$=(0,d.u)(x),k=(0,i.useRef)(null),y=(0,i.useRef)(null),O=(0,i.useCallback)(()=>{$.current&&$.current.scrollTo({top:0})},[$]),T=(0,i.useCallback)(e=>{w(e),O()},[O]),S=(0,i.useCallback)(e=>{k.current&&clearTimeout(k.current),e&&j(!0),e||(k.current=setTimeout(()=>{j(!1),T(null)},300))},[T]),I=(0,i.useCallback)((e,t,n)=>{if(t&&T(t),!n&&e===h||!e){S(!x),f(!x);return}v(e),S(!0),f(!0)},[h,T,x,S]),A=(0,i.useCallback)(()=>{y.current&&clearTimeout(y.current),N(!0),y.current=setTimeout(()=>{N(!1)},650)},[]);return(0,i.useEffect)(()=>{let t=!!document.cookie.includes("auth.gtm_customer_id");n(t),(0,m.s)(o,a,e.isMainBannerPage),(0,m.i)()},[]),(0,s.jsx)("div",{children:(0,s.jsx)(J.Provider,{value:{isAuth:t,isHeaderHidden:l,isHeaderTransparent:r,openedBlock:h,setOpenedBlock:I,openedSection:g,setOpenedSection:T,isNavigationOpen:x,isNavigationMounted:_,navMenuItemsRef:C,navigationRef:$,ignoreClicks:b,setIgnoreClicks:A,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p},children:e.children})})},Y=(0,p.g)("header-chat-modal-body","sc"),K=Object.freeze({wrapper:`${Y}__wrapper`,cardButton:`${Y}__card-button`,card:`${Y}__card`,cardTitle:`${Y}__card-title`,cardSubtitle:`${Y}__card-subtitle`,button:`${Y}__button`}),X=()=>{let e=q();return(0,s.jsxs)("div",{className:K.wrapper,children:[(0,s.jsx)(L,{className:K.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,s.jsxs)(r.Zb,{className:K.card,variant:"secondary",children:[(0,s.jsxs)("div",{className:K.cardTitle,children:[(0,s.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat"}),"Напишите в чат"]}),(0,s.jsxs)("p",{className:K.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,s.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),(0,s.jsx)(L,{className:K.cardButton,variant:"secondary",as:"a",href:"https://finuslugi.ru/landing/fingpt",target:"_blank",eventActionText:"Спросите у FinGPT",children:(0,s.jsxs)(r.Zb,{className:K.card,variant:"secondary",children:[(0,s.jsxs)("div",{className:K.cardTitle,children:[(0,s.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/robot_icon_hover.svg",alt:"chat"}),"Спросите у FinGPT"]}),(0,s.jsx)("p",{className:K.cardSubtitle,children:"Ваш личный финансовый AI-ассистент"})]})})]})},ee=(0,p.g)("header-chat-modal","sc"),et=Object.freeze({wrapper:`${ee}__wrapper`}),en=()=>{let e=q();return(0,s.jsx)(d.P,{children:(0,s.jsx)(P,{isOpen:e.isChatModalOpen,onClose:()=>e.setIsChatModalOpen(!1),title:"Нужна помощь?",children:(0,s.jsx)("div",{className:et.wrapper,children:(0,s.jsx)(X,{})})})})},es=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,...o})=>(0,s.jsx)(a.rU,{onClick:s=>{null==e||e(s),(0,l.h)({eventCategory:m.H,eventActionType:t||l.D.link,eventActionText:n||"",eventLabel:i||""})},...o}),ei=({data:e,isMobile:t})=>{let n=q();return(0,s.jsx)("div",{className:m.a.contentWrapper,children:e.map(e=>(0,s.jsx)(i.Fragment,{children:e.sections.map(e=>(0,s.jsxs)("div",{className:(0,c.Z)(m.a.content,{[m.a.hidden]:n.openedSection!==e.id,[m.a.contentOpen]:!!n.openedSection}),children:[(0,s.jsx)("div",{className:m.a.contentHeader,children:(0,s.jsx)("label",{children:e.title})}),e.content.map((n,i)=>{var r,a;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{children:(0,s.jsx)("a",{className:(0,c.Z)(m.a.contentTitle,{[m.a.removed]:!n.title,[m.a.contentTitleUrl]:!!n.url,[m.a.contentTitleLink]:!!e.isSeeAllLinkAvailable,[m.a.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,s.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,s.jsx)("div",{className:m.a.arrowIcon,children:(0,s.jsx)(o.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(r=n.links)&&r.length)&&(0,s.jsx)(m.N,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(a=n.links)&&a.length)&&(0,s.jsx)("div",{className:(0,c.Z)(m.a.links,{[m.a.linksColumns]:!!n.columns,[m.a.linksTitleless]:!n.title}),children:n.links.map(e=>(0,s.jsxs)("a",{href:e.url,className:(0,c.Z)({[m.a.new]:!!e.new}),onClick:()=>(0,m.h)(l.D.link,e.title,`${e.title}_${e.url}`),children:[(0,s.jsx)("div",{className:m.a.arrowIcon,children:(0,s.jsx)(o.IconFdsArrowUpRightSmallO,{})}),(0,s.jsx)("span",{children:e.title})]},e.url))})]},`${n.url}_${i}`)})]},e.id))},e.id))})},el=(0,p.g)("navigation-section-icon","sc"),eo=Object.freeze({icon:`${el}`}),er=({name:e,background:t})=>{let n=(0,i.useMemo)(()=>e&&o[e]||null,[e]);return e&&n?(0,s.jsx)("div",{className:eo.icon,style:{background:t},children:(0,s.jsx)(n,{})}):null},ea=(0,p.g)("navigation","sc"),ec=Object.freeze({navigation:`${ea}`,navigationOpening:`${ea}--opening`,navigationClosing:`${ea}--closing`,wrapper:`${ea}__wrapper`,container:`${ea}__container`,containerOpen:`${ea}__container--open`,sections:`${ea}__sections`,sectionsOpen:`${ea}__sections--open`,citySelectButton:`${ea}__city-select-button`,sectionsTitle:`${ea}__sections-title`,sectionsWrapper:`${ea}__sections-wrapper`,section:`${ea}__section`,sectionArrow:`${ea}__section-arrow`,sectionExtra:`${ea}__section--extra`,sectionActive:`${ea}__section--active`,sectionTitle:`${ea}__section-title`,chatWrapper:`${ea}__chat-wrapper`,chatHeader:`${ea}__chat-header`,backButton:`${ea}__back-button`,useful:`${ea}__useful`,usefulOpen:`${ea}__useful--open`,usefulTitle:`${ea}__useful-title`,usefulGrid:`${ea}__useful-grid`,removed:`${ea}__removed`}),eu=({data:e})=>{var t;let n=q(),u=$(),d=(0,a.aF)("m"),[p,h]=(0,i.useState)(!0);(0,i.useEffect)(()=>{h(d)},[d]);let v=(0,i.useRef)(null),g=(0,i.useCallback)(()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),w=(0,i.useRef)(!1),x=(0,i.useRef)(null),f=(0,i.useCallback)(()=>{p&&(w.current=!0,x.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),g()},window.history.pushState(null,"",window.location.href))},[g,p]),_=(0,i.useCallback)(()=>{w.current=!1,window.onpopstate=x.current,window.history.go(-1)},[]),j=(0,i.useRef)(null),b=(0,i.useCallback)(e=>{if(p||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,s=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(s&&!j.current){n.setIgnoreClicks(),j.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!s&&j.current&&(clearTimeout(j.current),j.current=null)},[p,n]),N=(0,i.useRef)(null),C=(0,i.useCallback)(e=>{typeof window>"u"||(e?(N.current=b,window.addEventListener("mousemove",N.current)):N.current&&window.removeEventListener("mousemove",N.current))},[b]);(0,i.useEffect)(()=>{C(n.isNavigationOpen),n.isNavigationOpen&&!w.current&&f(),!n.isNavigationOpen&&w.current&&_()},[n.isNavigationOpen]);let k=(e,t)=>()=>{(0,m.h)(l.D.button,t),n.setOpenedSection(e)},{start:O,clear:T}=y(),S=(e,t)=>()=>{p||O(k(e,t),200)},I=()=>{p||T()};return(0,s.jsx)("div",{ref:n.navigationRef,className:(0,c.Z)(ec.navigation,{[ec.removed]:!n.isNavigationMounted,[ec.navigationOpening]:n.isNavigationOpen,[ec.navigationClosing]:!n.isNavigationOpen}),children:(0,s.jsx)("div",{className:ec.wrapper,children:(0,s.jsxs)(r.W2,{className:(0,c.Z)(ec.container,{[ec.containerOpen]:!!n.openedSection}),children:[(0,s.jsxs)("div",{className:(0,c.Z)(ec.sections,{[ec.sectionsOpen]:!!n.openedSection}),children:[(0,s.jsx)(a.zx,{className:ec.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>u.handleButtonClick(!1),iconLeft:(0,s.jsx)(o.IconFdsLocationO,{size:24}),label:(null==(t=u.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,s.jsxs)("ul",{className:(0,c.Z)(ec.sectionsWrapper,{[ec.removed]:n.openedBlock!==e.id&&!p}),children:[(0,s.jsx)("div",{className:ec.sectionsTitle,children:m.b[e.id]}),e.sections.map(e=>(0,s.jsxs)("li",{className:(0,c.Z)(ec.section,{[ec.sectionExtra]:!!e.extra,[ec.sectionActive]:n.openedSection===e.id}),onClick:k(e.id,e.title),onMouseEnter:S(e.id,e.title),onMouseLeave:I,children:[(0,s.jsx)(er,{name:e.uikitIcon,background:e.uikitIconBg}),(0,s.jsx)("span",{className:ec.sectionTitle,children:e.title}),(0,s.jsx)("div",{className:ec.sectionArrow,children:(0,s.jsx)(o.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,s.jsxs)("div",{className:ec.chatWrapper,children:[(0,s.jsx)("div",{className:ec.chatHeader,children:"Нужна помощь?"}),(0,s.jsx)(X,{})]})]}),(0,s.jsxs)("button",{type:"button",className:(0,c.Z)(ec.backButton,{[ec.removed]:!n.openedSection}),onClick:()=>{(0,m.h)(l.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,s.jsx)(o.IconFdsChevronLeftO,{size:24}),(0,s.jsx)("span",{children:"Назад"})]}),(0,s.jsx)(ei,{data:e,isMobile:p}),(0,s.jsxs)("div",{className:(0,c.Z)(ec.useful,{[ec.usefulOpen]:!!n.openedSection}),children:[(0,s.jsx)("div",{className:ec.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,s.jsx)(i.Fragment,{children:e.sections.map(e=>(0,s.jsx)("div",{className:(0,c.Z)(ec.usefulGrid,{[ec.removed]:n.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,s.jsxs)("a",{href:e.url,onClick:()=>(0,m.h)(l.D.link,e.title,`${e.title}_${e.url}`),children:[(0,s.jsx)("div",{children:(0,s.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id))},e.id))]})]})})})},ed=(e,t,n)=>{var s,i,l;let o=(null==(s=null==e?void 0:e.NAVIGATOR)?void 0:s.findIndex(({id:e})=>"news"===e))||-1,r=(null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i[o])?void 0:l.content)||[];if(e&&Array.isArray(n)&&r.length){let s=n.map(({title:e,url:n})=>({title:e,url:(0,u.xn)(t||"",n),new:0}));e.NAVIGATOR[o].content[0].links=s}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)||[]}]},ep=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:d="https://lk.finuslugi.ru/registration",initialTown:p,isMainBannerPage:h,news:v})=>{let g=q(),w=ed(e,t,v),x=(0,i.useMemo)(()=>w.reduce((e,t)=>(e[t.id]=t.sections[0].id,e),{}),[w]),f=g.isAuth?"Личный кабинет":"Войти",_=h&&g.isHeaderTransparent,j=(e,t,n,s)=>()=>{e!==g.openedBlock?(0,m.h)(l.D.toggle,t,"on"):(0,m.h)(l.D.button,"menu_close","on");let i=n?x[e]:"";g.setOpenedBlock(e,i,!!s)},{start:b,clear:N}=y(),C=(e,t,n,s)=>()=>{g.isNavigationOpen&&e===g.openedBlock||g.setIgnoreClicks(),b(j(e,t,n,s),200)},$=e=>()=>{g.ignoreClicks||e()},k=e=>g.openedBlock===e&&g.isNavigationOpen;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("header",{className:(0,c.Z)(m.c.header,{[m.c.transparent]:_}),children:(0,s.jsx)("div",{className:(0,c.Z)(m.c.fixed,{[m.c.hidden]:g.isHeaderHidden,[m.c.navigationOpen]:g.isNavigationOpen}),children:(0,s.jsxs)(r.W2,{className:m.c.container,children:[(0,s.jsxs)("div",{className:m.c.leftRow,children:[(0,s.jsx)(es,{className:m.c.logo,href:t,eventActionType:l.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,s.jsxs)("picture",{children:[(0,s.jsx)("source",{srcSet:(0,u.xn)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,s.jsx)("img",{src:(0,u.xn)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,s.jsx)("nav",{ref:g.navMenuItemsRef,className:m.c.menuItems,children:(0,s.jsx)("ul",{children:m.d.map(({id:e,label:t})=>(0,s.jsx)("li",{children:(0,s.jsx)(a.zx,{className:(0,c.Z)({[m.c.menuItemActive]:k(e)}),label:t,variant:"white",size:"xs",onClick:$(j(e,t,!0)),onMouseEnter:C(e,t,!0,!0),onMouseLeave:N})},e))})}),(0,s.jsx)(L,{className:(0,c.Z)(m.c.tabletMenuButton,{[m.c.menuItemActive]:g.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,s.jsx)(o.IconFdsChevronDownO,{size:24}),onClick:j("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,s.jsxs)("div",{className:m.c.buttonGroup,children:[(0,s.jsxs)("div",{className:m.c.chips,children:[(0,s.jsx)(L,{onClick:()=>g.setIsChatModalOpen(!g.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,s.jsx)(o.IconFdsChatDotsCircleO,{size:24})}),(0,s.jsx)(L,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${d}`,iconLeft:(0,s.jsx)(o.IconFdsUserO,{size:24})})]}),(0,s.jsx)(L,{className:m.c.menuButton,size:"xs",shape:_?"icon":"default",appearance:_?"ghost":"fill",label:"Меню",onClick:j("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,s.jsx)(o.IconFdsMenuSkewedO,{size:24})}),(0,s.jsxs)("div",{className:m.c.moreButtons,children:[(0,s.jsx)(B,{initialTown:p}),(0,s.jsx)(en,{}),(0,s.jsx)(L,{onClick:()=>g.setIsChatModalOpen(!g.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,s.jsx)(o.IconFdsChatDotsCircleO,{size:24})}),(0,s.jsx)(L,{as:"a",href:d,size:"xs",eventActionText:f,eventLabel:`${f}_${d}`,label:f})]})]}),(0,s.jsxs)(es,{className:m.c.auth,href:d,eventActionText:f,eventLabel:`${f}_${d}`,children:[(0,s.jsx)(L,{size:"xs",shape:"circle-icon",iconLeft:(0,s.jsx)(o.IconFdsUserO,{}),eventActionText:f,eventLabel:`${f}_${d}`}),(0,s.jsx)("p",{children:f})]}),(0,s.jsx)("div",{className:m.c.close,children:(0,s.jsx)(L,{className:m.c.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,s.jsx)(o.IconFdsCloseO,{}),onClick:()=>g.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})})}),(0,s.jsx)("div",{className:(0,c.Z)(m.c.overlay,{[m.c.removed]:!g.isNavigationMounted,[m.c.overlayOpening]:g.isNavigationOpen,[m.c.overlayClosing]:!g.isNavigationOpen}),onClick:$(()=>g.setOpenedBlock(null))}),(0,s.jsx)(eu,{data:w,minioUrl:n})]})},em=e=>(0,s.jsx)(Q,{isMainBannerPage:e.isMainBannerPage,children:(0,s.jsx)(ep,{...e})})}}]);