(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4559],{4053:(e,t,n)=>{"use strict";n.d(t,{L:()=>ev,H:()=>eO,Y9:()=>eK,b:()=>Q,p:()=>ee,u:()=>eb,om:()=>eg}),n(71086);var i=n(37876),l=n(14232),a=n(18847),o=n(52803);let r={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},c={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},s=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M19.03 10.28l-6.5 6.5a.75.75 0 01-1.06 0l-6.5-6.5a.75.75 0 111.06-1.06L12 15.19l5.97-5.97a.75.75 0 111.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function u(e){let{className:t,style:n,boxSize:i,size:a,onClick:o}=e;return l.createElement("span",{className:t,style:{...r,...o&&{cursor:"pointer"},...a&&{fontSize:"".concat(a,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(s,{viewBox:"0 0 24 24",style:c}))}u.displayName="IconFdsChevronDownO";var d=n(15720);let p={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},h={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},m=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M6.999 7a5 5 0 1110 0 5 5 0 01-10 0zm5-3.5a3.5 3.5 0 100 7 3.5 3.5 0 000-7zM10.012 14h3.974c1.52 0 2.497 0 3.345.337a4.75 4.75 0 011.916 1.402c.579.705.875 1.636 1.335 3.085l.05.159.332 1.04a.75.75 0 11-1.43.455l-.33-1.04c-.53-1.664-.744-2.293-1.117-2.748a3.249 3.249 0 00-1.31-.959c-.547-.217-1.212-.23-2.958-.23h-3.64c-1.746 0-2.41.013-2.957.23a3.249 3.249 0 00-1.311.959c-.373.454-.587 1.084-1.116 2.748l-.331 1.04a.75.75 0 11-1.43-.455l.331-1.04.05-.159c.461-1.449.757-2.38 1.336-3.086a4.752 4.752 0 011.916-1.4C7.515 14 8.492 14 10.012 14z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function f(e){let{className:t,style:n,boxSize:i,size:a,onClick:o}=e;return l.createElement("span",{className:t,style:{...p,...o&&{cursor:"pointer"},...a&&{fontSize:"".concat(a,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(m,{viewBox:"0 0 24 24",style:h}))}f.displayName="IconFdsUserO";var g=n(13636),v=n(40317),w=n(69241),_=n(91273),b=n(44500),x=n(57539),C=n(97629),k=n(3835),y=n(24208),I=n(95984),j=n(51391),O=n(80287),S=n(52426),N=n(82662),A=n(75250);let T={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},R={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},E=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M12.004 7.246A1.247 1.247 0 0110.75 6a1.25 1.25 0 111.254 1.247zM10.75 12c0 .686.559 1.252 1.254 1.247a1.252 1.252 0 001.246-1.25 1.25 1.25 0 10-2.5.003zm0 6c0 .686.559 1.253 1.254 1.247a1.252 1.252 0 001.246-1.25 1.25 1.25 0 10-2.5.003z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function z(e){let{className:t,style:n,boxSize:i,size:a,onClick:o}=e;return l.createElement("span",{className:t,style:{...T,...o&&{cursor:"pointer"},...a&&{fontSize:"".concat(a,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(E,{viewBox:"0 0 24 24",style:R}))}z.displayName="IconFdsDotsVerticalO";let B=(0,x.g)("navigation-chips","sc"),M=Object.freeze({wrapper:"".concat(B,"__wrapper"),gray:"".concat(B,"__variantGray"),white:"".concat(B,"__variantWhite"),container:"".concat(B,"__container"),chip:"".concat(B,"__chip"),more:"".concat(B,"__chip--more"),active:"".concat(B,"__chip--active"),icon:"".concat(B,"__icon"),label:"".concat(B,"__label"),hidden:"".concat(B,"__hidden")}),P=(0,x.g)("navigation-content","sc"),L=Object.freeze({contentWrapper:"".concat(P,"__content-wrapper"),content:"".concat(P,"__content"),contentOpen:"".concat(P,"__content--open"),contentHeader:"".concat(P,"__content-header"),contentTitle:"".concat(P,"__content-title"),contentTitleUrl:"".concat(P,"__content-title--url"),contentTitleLink:"".concat(P,"__content-title--link"),contentTitleNew:"".concat(P,"__content-title--new"),new:"".concat(P,"__new"),newInline:"".concat(P,"__new-inline"),vip:"".concat(P,"__vip"),arrowIcon:"".concat(P,"__arrow-icon"),links:"".concat(P,"__links"),linksColumns:"".concat(P,"__links--columns"),linksTitleless:"".concat(P,"__links--titleless"),removed:"".concat(P,"__removed"),hidden:"".concat(P,"__content--hidden")}),F=e=>{let{chip:t,hidden:n,onClick:l,refCallback:a,activeChipId:o}=e,r=!!l,c=()=>{if(r)return null==l?void 0:l(t.url);(0,y.h)(b.D.chip,t.title,"".concat(t.title,"_").concat(t.url))},s=(0,i.jsxs)(i.Fragment,{children:[t.icon&&(0,i.jsx)("span",{className:M.icon,"aria-hidden":"true",children:t.icon}),(0,i.jsx)("span",{className:M.label,children:t.title}),t.arrow&&(0,i.jsx)(A.K,{size:24})]}),u=(0,w.A)(M.chip,{[M.hidden]:n,[L.new]:!!t.new,[L.vip]:!!t.vip,[M.active]:t.url===o});return r?(0,i.jsx)("button",{type:"button",className:u,onClick:c,ref:a,children:s}):(0,i.jsx)("a",{href:t.url,className:u,onClick:c,ref:a,children:s})},U=e=>{var t,n;let{items:a=[],maxNumberOfLines:o,variant:r,className:c,activeChipId:s,onClick:u,moreButtonOptions:d}=e,p=(0,l.useRef)(null),h=(0,l.useRef)(null),m=(0,l.useRef)([]),f=null!=(t=null==d?void 0:d.label)?t:"Еще",g="Еще",v=null==(n=null==d?void 0:d.showIcon)||n,_=(0,w.A)(M.chip,M.more,null==d?void 0:d.className),[x,C]=(0,l.useState)(!1),[k,I]=(0,l.useState)(a.length),[j,O]=(0,l.useState)(!1),S=(0,l.useCallback)(()=>{let e=p.current;if(!e)return;let t=e=>e?e.getBoundingClientRect().width:0,n=t(e),i=Math.max(Number(o)||0,0),l=()=>{I(a.length),O(!1)};if(x||0===i||n<=0)return void l();let r=(()=>{try{let t=getComputedStyle(e),n=parseFloat(t.columnGap||t.gap||"12");return Number.isNaN(n)?12:n}catch(e){return 12}})(),c=t(h.current),s=a.map((e,n)=>t(m.current[n]));if(s.some(e=>0===e))return void l();let u=1,d=0,f=0;for(let e of s){let t=u===i?c+r:0,l=0===d?e:d+r+e;if(l+t<=n-.5)d=l,f++;else{if(++u>i)break;d=e,f++}}O(f<a.length),I(f)},[x,a,o]);(0,l.useLayoutEffect)(()=>{let e=p.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(S)});return t.observe(e),requestAnimationFrame(S),()=>{t.disconnect()}},[S]),(0,l.useEffect)(()=>{requestAnimationFrame(S)},[S]);let N=x||(null!=o?o:0)<=0||!j;return(0,i.jsx)("div",{className:(0,w.A)(c,M.wrapper,{[M.gray]:"gray"===r,[M.white]:"white"===r}),children:(0,i.jsxs)("div",{ref:p,className:M.container,children:[a.map((e,t)=>(0,i.jsx)(F,{chip:e,hidden:!N&&t>=k,activeChipId:s,onClick:u,refCallback:e=>{m.current[t]=e}},"".concat(e.url,"_").concat(t))),!N&&j&&(0,i.jsxs)("button",{type:"button",ref:h,className:_,"aria-label":g,onClick:()=>{(0,y.h)(b.D.chip,g),C(!0)},children:[v&&(0,i.jsx)(z,{size:20}),(0,i.jsx)("span",{className:M.label,children:f})]}),(N||!j)&&(0,i.jsxs)("button",{type:"button",ref:h,className:(0,w.A)(_,M.hidden),tabIndex:-1,"aria-hidden":"true",children:[v&&(0,i.jsx)(z,{size:20}),(0,i.jsx)("span",{className:M.label,children:f})]})]})})},W={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},H={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},D=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("defs",null,l.createElement("clipPath",{id:"fds-chat-dots-square-add-o_svg__a"},l.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),l.createElement("g",{clipPath:"url(#fds-chat-dots-square-add-o_svg__a)"},l.createElement("path",{d:"M18.25 5.75V8c0 .42.33.75.75.75s.75-.33.75-.75V5.75H22c.42 0 .75-.33.75-.75s-.33-.75-.75-.75h-2.25V2c0-.42-.33-.75-.75-.75s-.75.33-.75.75v2.25H16c-.42 0-.75.33-.75.75s.33.75.75.75h2.25zm-4.546-2.23c-.259-.014-.827-.02-1.704-.02-.676 0-1.129.002-1.358.007a7.963 7.963 0 00-.779.047 7.246 7.246 0 00-2.328.689 7.204 7.204 0 00-4.028 6.4c-.005.228-.007.68-.007 1.357 0 .671.002 1.121.007 1.349.007.324.023.584.047.778.057.474.158.933.303 1.378v.001a7.17 7.17 0 001.76 2.867 7.169 7.169 0 002.92 1.777 7.436 7.436 0 002.108.341c.228.006.68.009 1.355.009.67 0 1.12-.003 1.346-.009a7.12 7.12 0 00.794-.057c.476-.05.96-.162 1.455-.333a.71.71 0 01.685.102c.662.48 1.32.829 1.976 1.047a4.85 4.85 0 001.482.264c.142.002.278-.004.41-.016a10.758 10.758 0 01-.222-.535c-.45-1.164-.676-2.305-.676-3.423a.74.74 0 01.116-.401 7.211 7.211 0 001.08-3.01c.024-.196.04-.456.047-.78.005-.228.007-.678.007-1.349 0-.214.002-.488.006-.822.003-.22.004-.376.004-.468 0-.42.33-.75.75-.75s.75.33.75.75c0 .098-.001.26-.004.486A70.38 70.38 0 0022 12c0 .682-.003 1.142-.008 1.381a9.337 9.337 0 01-.058.93 8.752 8.752 0 01-.393 1.737 8.757 8.757 0 01-.788 1.7c.026.866.217 1.757.571 2.674a8.847 8.847 0 00.6 1.249c.11.224.136.42.078.587-.057.168-.198.306-.423.416-.139.068-.32.13-.543.189a5 5 0 01-1.316.15 6.336 6.336 0 01-1.94-.34 8.598 8.598 0 01-2.064-1.035c-.471.14-.939.236-1.402.286a8.23 8.23 0 01-.93.067c-.24.006-.701.009-1.384.009-.688 0-1.152-.003-1.392-.009a8.222 8.222 0 01-.937-.067 8.672 8.672 0 01-3.989-1.538 8.707 8.707 0 01-2.077-2.078 8.705 8.705 0 01-1.597-4.927A78.972 78.972 0 012 12c0-.687.003-1.15.008-1.39.008-.376.027-.686.057-.93a8.737 8.737 0 01.832-2.806 8.69 8.69 0 013.977-3.977 8.7 8.7 0 012.803-.831c.246-.03.557-.05.933-.058C10.85 2.003 11.313 2 12 2c.902 0 1.495.007 1.779.021.42.021.732.367.712.787a.743.743 0 01-.787.711zm-5.91 9.19a1 1 0 111.412-1.414 1 1 0 01-1.413 1.415zm3.497-1.412a1 1 0 101.418 1.41 1 1 0 00-1.418-1.41zm3.502 1.413a1 1 0 111.414-1.415 1 1 0 01-1.414 1.415z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function V(e){let{className:t,style:n,boxSize:i,size:a,onClick:o}=e;return l.createElement("span",{className:t,style:{...W,...o&&{cursor:"pointer"},...a&&{fontSize:"".concat(a,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(D,{viewBox:"0 0 24 24",style:H}))}V.displayName="IconFdsChatDotsSquareAddO";let G={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},q={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},J=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("defs",null,l.createElement("clipPath",{id:"fds-menu-skewed-o_svg__a"},l.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),l.createElement("g",{clipPath:"url(#fds-menu-skewed-o_svg__a)"},l.createElement("path",{d:"M7.75 5a.75.75 0 100 1.5h13.5a.75.75 0 100-1.5H7.75zM22 12a.75.75 0 00-.75-.75H2.75a.75.75 0 100 1.5h18.5A.75.75 0 0022 12zm-5.75 5.5a.75.75 0 110 1.5H2.75a.75.75 0 110-1.5h13.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function Y(e){let{className:t,style:n,boxSize:i,size:a,onClick:o}=e;return l.createElement("span",{className:t,style:{...G,...o&&{cursor:"pointer"},...a&&{fontSize:"".concat(a,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(J,{viewBox:"0 0 24 24",style:q}))}Y.displayName="IconFdsMenuSkewedO";let $=e=>{let[t,n]=(0,l.useState)(e);return(0,l.useEffect)(()=>{e&&n(!0)},[e]),e||t},K=()=>{let e=(0,l.useRef)(null),t=(0,l.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,l.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,l.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},Z=(0,x.g)("certificates-warning-banner","sc"),X=(0,x.g)("certificates-warning-popup","sc"),Q=Object.freeze({wrapper:"".concat(Z),container:"".concat(Z,"__container"),content:"".concat(Z,"__content"),info:"".concat(Z,"__info"),image:"".concat(Z,"__image"),text:"".concat(Z,"__text"),title:"".concat(Z,"__title"),description:"".concat(Z,"__description"),details:"".concat(Z,"__details"),buttons:"".concat(Z,"__buttons"),button:"".concat(Z,"__button"),closeButton:"".concat(Z,"__close-button"),mobileActivator:"".concat(Z,"__mobile-activator")}),ee=Object.freeze({modal:"".concat(X,"__modal"),desktopCloseButton:"".concat(X,"__desktop-close-button"),mobilePopup:"".concat(X,"__mobile-popup"),mobileContentContainer:"".concat(X,"__mobile-content-container"),mobileCloseButton:"".concat(X,"__mobile-close-button"),mobileDialog:"".concat(X,"__mobile-dialog"),content:"".concat(X,"__content"),image:"".concat(X,"__image"),text:"".concat(X,"__text"),title:"".concat(X,"__title"),description:"".concat(X,"__description"),actions:"".concat(X,"__actions"),primaryActions:"".concat(X,"__primary-actions"),divider:"".concat(X,"__divider"),explanation:"".concat(X,"__explanation"),button:"".concat(X,"__button"),gosuslugiButton:"".concat(X,"__gosuslugi-button"),gosuslugiIcon:"".concat(X,"__gosuslugi-icon")}),et="fu_certificates_access_confirmed",en="fu_certificates_banner_dismissed",ei="fu_external_link_warning_shown",el=new Map,ea=e=>{try{return"1"===window.localStorage.getItem(e)||"1"===el.get(e)}catch(t){return"1"===el.get(e)}},eo=e=>{el.set(e,"1");try{window.localStorage.setItem(e,"1")}catch(e){}},er=(e,t)=>{if(!e)return null;try{let n=new URL(e.toString(),t.href);return"http:"!==n.protocol&&"https:"!==n.protocol||((e,t)=>e===t||"finuslugi.ru"===e||e.endsWith(".finuslugi.ru"))(n.hostname,t.hostname)?null:n}catch(e){return null}},ec={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},es={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},eu=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M3 9.998a9 9 0 0118 0c0 2.08-.89 4.273-2.029 6.249-1.148 1.991-2.6 3.844-3.826 5.262a4.123 4.123 0 01-6.29 0c-1.227-1.418-2.678-3.271-3.826-5.262C3.889 14.27 3 12.077 3 9.998zm9-7.5a7.5 7.5 0 00-7.5 7.5c0 1.688.737 3.607 1.828 5.5 1.083 1.877 2.468 3.65 3.661 5.029 1.084 1.251 2.938 1.251 4.022 0 1.193-1.379 2.578-3.152 3.66-5.03 1.092-1.893 1.829-3.81 1.829-5.499a7.5 7.5 0 00-7.5-7.5zm-4 7.5a4 4 0 118 0 4 4 0 01-8 0zm4-2.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function ed(e){let{className:t,style:n,boxSize:i,size:a,onClick:o}=e;return l.createElement("span",{className:t,style:{...ec,...o&&{cursor:"pointer"},...a&&{fontSize:"".concat(a,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(eu,{viewBox:"0 0 24 24",style:es}))}ed.displayName="IconFdsLocationO";let ep=(0,C.g)(),eh=(0,C.a)(ep),em={regions:ep,towns:eh,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},ef=(0,l.createContext)(em);function eg(){return(0,l.useContext)(ef)}let ev=e=>{let{children:t,initialRegion:n,initialTown:a,showStartGeoPopup:o=!0,lastRegionsUpdateUnixTimestamp:r,showcaseUrl:c="",dadataUrl:s=(0,C.d)(c,"/backend/money/dadata"),useNewCitiesApi:u=!1}=e,d=(0,C.e)(u),p=Number((0,C.p)(d.lastRegionsUpdateUnixTimestamp)||0),h=Number(r||0)>p,[m,f]=(0,l.useState)((0,C.g)(u)),g=(0,l.useRef)(m),[{startRegion:v,startTown:w},_]=(0,l.useState)({startRegion:em.startRegion,startTown:em.startTown}),x=null!=n?n:em.region,k=null!=a?a:em.town,[{region:y,town:I},j]=(0,l.useState)({region:x,town:k}),[O,S]=(0,l.useState)(em.startPopupVisible),[N,A]=(0,l.useState)(em.popupVisible),T=(0,l.useRef)(""),R=(0,l.useRef)(!1),E=(0,l.useMemo)(()=>(0,C.a)(m),[m]);(0,l.useEffect)(()=>{g.current=m},[m]);let z=(0,l.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)||""),S(!0),_({startRegion:e,startTown:t})},[S,_]),B=(0,l.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||z(e,t)},[z]),M=(0,l.useCallback)(()=>{if(T.current&&!y&&!I){var e,t;let n=null!=(e=E.find(e=>e.name===T.current))?e:null;return B(null!=(t=m.find(e=>e.id===(null==n?void 0:n.parentId)))?t:null,n)}B(y,I)},[y,I,E,m,B]),P=(0,l.useCallback)(e=>{A(e)},[A]),L=(0,l.useCallback)((e,t)=>{if(!e&&!t){window.localStorage.setItem(d.allRussiaSelected,"1"),window.localStorage.setItem(d.userRegion,""),window.localStorage.setItem(d.userTown,""),(0,C.s)(null,null,u);return}window.localStorage.setItem(d.allRussiaSelected,"0"),window.localStorage.setItem(d.userRegion,JSON.stringify(e)||""),window.localStorage.setItem(d.userTown,JSON.stringify(t)||""),(0,C.s)(e||null,t||null,u)},[d,u]),F=(0,l.useCallback)(e=>{e?(0,C.h)(b.D.icon,"location"):(0,C.h)(b.D.button,(null==I?void 0:I.name)||"Вся Россия"),!o||window.sessionStorage.getItem("start_popup_opened")?P(!0):M()},[o,I,P,M]),U=(0,l.useCallback)((e,t)=>{L(e,t),j({region:e||null,town:t||null}),S(!1),P(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[P,L]),W=()=>{var e,t;let n=null!=(e=(0,C.f)(d.userRegion))?e:(0,C.p)(d.userRegion),i=null!=(t=(0,C.f)(d.userTown))?t:(0,C.p)(d.userTown),l=(0,C.b)(g.current,n,i),a=u&&(0,C.j)(n,i);a&&(R.current=!0),a&&(0,C.c)(l.region,l.town)&&(L(l.region,l.town),R.current=!1),j(l);let r=async e=>{let{coords:{latitude:t,longitude:n}}=e,i="".concat(s,"?lat=").concat(t,"&lon=").concat(n),l=await (0,C.k)(i);null!=l&&l.location&&(T.current=l.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&o)try{navigator.geolocation.getCurrentPosition(r,()=>null)}catch(e){}};return(0,l.useEffect)(()=>{(!(0,C.i)(m,u)||h)&&(0,C.l)({showcaseUrl:c,useNewCitiesApi:u}).then(e=>{e.length<1||f(e)})},[]),(0,l.useEffect)(()=>{if(!u)return;let e=(0,C.b)(m,y,I);R.current&&(0,C.c)(e.region,e.town)&&(L(e.region,e.town),R.current=!1),j(e)},[m,y,L,I,u]),(0,l.useEffect)(()=>{if(window.innerWidth<1024){let e=()=>{W(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{W()},0)},[]),(0,i.jsx)(ef.Provider,{value:{regions:m,towns:E,region:y,town:I,startPopupVisible:O,setStartPopupVisible:S,popupVisible:N,handleToggleModal:P,selectCity:U,handleButtonClick:F,startRegion:v,startTown:w},children:t})},ew={"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"},e_=(0,l.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},headerRef:{current:null}});function eb(){return(0,l.useContext)(e_)}let ex=e=>{let[t,n]=(0,l.useState)(!1),[a,o]=(0,l.useState)(!1),[r,c]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:s,setIsChatModalOpen:u,isChatLoading:d}=(()=>{let[e,t]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),a=(0,l.useRef)(!1),o=e=>{a.current=e,i(e)};return(0,l.useEffect)(()=>{let e=(()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(ew,e)?ew[e]:ew["finuslugi.ru"]})(),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 i=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((l,r)=>{if(a.current)return void r(Error("chat is already opened"));i?(i.openWidget(),t(!1),l()):(o(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let a=document.querySelector(".webchat");a&&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)}})}).observe(a,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),o(!1),t(!1),l()},((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 i=document.createElement("script");i.src="".concat(e,"/get-bootstrap/").concat(t),i.defer=!0,document.body.appendChild(i)})(e,n))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,i;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(i=null==(n=window.supportWidget)?void 0:n.craftTalk)||i.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}})(),[p,h]=(0,l.useState)(null),[m,f]=(0,l.useState)(null),[g,v]=(0,l.useState)(!1),[w,_]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1),C=(0,l.useRef)(null),I=(0,k.u)(g),j=(0,l.useRef)(null),O=(0,l.useRef)(null),S=(0,l.useRef)(null),N=(0,l.useRef)(null),A=(0,l.useCallback)(()=>{I.current&&I.current.scrollTo({top:0})},[I]),T=(0,l.useCallback)(e=>{f(e),A()},[A]),R=(0,l.useCallback)(e=>{j.current&&clearTimeout(j.current),e&&_(!0),e||(j.current=setTimeout(()=>{_(!1),T(null)},300))},[T]),E=(0,l.useCallback)((e,t,n)=>{if(t&&T(t),!n&&e===p||!e){R(!g),v(!g);return}h(e),R(!0),v(!0)},[p,T,g,R]),z=(0,l.useCallback)(()=>{O.current&&clearTimeout(O.current),x(!0),O.current=setTimeout(()=>{x(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=(0,y.s)(o,c,e.isMainBannerPage);return(0,y.i)(),t},[]),(0,i.jsx)("header",{children:(0,i.jsx)(e_.Provider,{value:{isAuth:t,isHeaderHidden:a,isHeaderTransparent:r,openedBlock:p,setOpenedBlock:E,openedSection:m,setOpenedSection:T,isNavigationOpen:g,isNavigationMounted:w,navMenuItemsRef:C,navigationRef:I,ignoreClicks:b,setIgnoreClicks:z,isChatModalOpen:s,setIsChatModalOpen:u,isChatLoading:d,fixedContainerRef:S,headerRef:N},children:e.children})})},eC=(0,x.g)("city-select","sc"),ek=Object.freeze({button:"".concat(eC,"__button"),minimal:"".concat(eC,"__minimal"),full:"".concat(eC,"__full")}),ey=a(()=>Promise.all([n.e(4062),n.e(595),n.e(8325),n.e(2025),n.e(5467)]).then(n.bind(n,59419)).then(e=>e.CitySelectModal),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CitySelectModal-tKIFCs7G.mjs")]},ssr:!1}),eI=a(()=>n.e(8641).then(n.bind(n,58641)).then(e=>e.StartChoicePopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/StartChoicePopup-5ZAsyre2.mjs")]},ssr:!1}),ej=e=>{var t;let{initialTown:n}=e,a=eg(),o=(null==(t=a.town)?void 0:t.name)||n||"Вся Россия",{setIsChatModalOpen:r,isChatModalOpen:c}=eb(),{startPopupVisible:s,setStartPopupVisible:u,popupVisible:d}=a,p=$(d),h=$(s),m=(0,l.useRef)();(0,l.useEffect)(()=>{d&&(m.current="popup")},[d]),(0,l.useEffect)(()=>{c&&(m.current="chat")},[c]),(0,l.useEffect)(()=>{s&&(m.current="startPopup")},[s]),(0,l.useEffect)(()=>{m.current&&("chat"===m.current&&s?u(!1):["startPopup","popup"].includes(m.current)&&c&&r(!1))},[d,c,s,u,r]);let f={appearance:"ghost",size:"xs",onClick:()=>a.handleButtonClick(!1),iconLeft:(0,i.jsx)(ed,{size:24})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.$,{...f,className:(0,w.A)(ek.button,ek.full),label:o}),(0,i.jsx)(g.$,{...f,className:(0,w.A)(ek.button,ek.minimal),shape:"icon"}),p&&(0,i.jsx)(ey,{}),h&&(0,i.jsx)(eI,{})]})},eO=e=>{let{label:t,onClick:n,eventActionText:l,eventLabel:a,...o}=e;return(0,i.jsx)(g.$,{label:t,onClick:e=>{null==n||n(e),(0,b.h)({eventCategory:I.H,eventActionType:b.D.button,eventActionText:l||"",eventLabel:a||""})},...o})},eS=e=>{let{onClick:t,eventActionType:n,eventActionText:l,eventLabel:a,...o}=e;return(0,i.jsx)(j.N,{onClick:e=>{null==t||t(e),(0,b.h)({eventCategory:I.H,eventActionType:n||b.D.link,eventActionText:l||"",eventLabel:a||""})},...o})},eN={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},eA={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},eT=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M7.22 12.53a.75.75 0 010-1.06l6.5-6.5a.75.75 0 111.06 1.06L8.81 12l5.97 5.97a.75.75 0 11-1.06 1.06l-6.5-6.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function eR(e){let{className:t,style:n,boxSize:i,size:a,onClick:o}=e;return l.createElement("span",{className:t,style:{...eN,...o&&{cursor:"pointer"},...a&&{fontSize:"".concat(a,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(eT,{viewBox:"0 0 24 24",style:eA}))}eR.displayName="IconFdsChevronLeftO";let eE=(0,x.g)("header-chat-modal-body","sc"),ez=Object.freeze({wrapper:"".concat(eE,"__wrapper"),cardButton:"".concat(eE,"__card-button"),card:"".concat(eE,"__card"),cardTitle:"".concat(eE,"__card-title"),cardSubtitle:"".concat(eE,"__card-subtitle"),button:"".concat(eE,"__button")}),eB=()=>{let e=eb();return(0,i.jsxs)("div",{className:ez.wrapper,children:[(0,i.jsx)(eO,{className:ez.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,i.jsxs)(N.Z,{className:ez.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:ez.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,i.jsxs)("p",{className:ez.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eM=e=>{let{data:t,isMobile:n}=e,a=eb();return(0,i.jsx)("div",{className:L.contentWrapper,children:t.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsxs)("div",{className:(0,w.A)(L.content,{[L.hidden]:a.openedSection!==e.id,[L.contentOpen]:!!a.openedSection}),children:[(0,i.jsx)("div",{className:L.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),null==(t=e.content)?void 0:t.map((t,l)=>{var a,o;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,w.A)(L.contentTitle,{[L.removed]:!t.title,[L.contentTitleUrl]:!!t.url,[L.contentTitleLink]:!!e.isSeeAllLinkAvailable,[L.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:L.arrowIcon,children:(0,i.jsx)(A.K,{})}),t.title]})})}),!(null!=(a=t.links)&&a.length)&&(0,i.jsx)(U,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:n?3:2}),!!(null!=(o=t.links)&&o.length)&&(0,i.jsx)("div",{className:(0,w.A)(L.links,{[L.linksColumns]:!!t.columns,[L.linksTitleless]:!t.title}),children:t.links.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>(0,y.h)(b.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{className:L.arrowIcon,children:(0,i.jsx)(A.K,{})}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{children:e.title}),!!e.new&&(0,i.jsx)("span",{className:(0,w.A)({[L.newInline]:!!e.new})})]})]},"".concat(e.url,"_").concat(t)))})]},"".concat(t.url,"_").concat(l))})]},e.id)})},e.id))})},eP=(0,x.g)("navigation-section-icon","sc"),eL=Object.freeze({icon:"".concat(eP)}),eF=()=>n.e(315).then(n.bind(n,80315)),eU={IconFdsAcademicCapO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsAcademicCapO}),IconFdsBankO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsBankO}),IconFdsBookOpenO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsBookOpenO}),IconFdsCalculatorO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCalculatorO}),IconFdsCardO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCardO}),IconFdsChatDotsCircleO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsChatDotsCircleO}),IconFdsCoinMultipleO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCoinMultipleO}),IconFdsDotsHorizontalO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsDotsHorizontalO}),IconFdsFlashO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsFlashO}),IconFdsGraphO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsGraphO}),IconFdsLayoutHorizontalO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsLayoutHorizontalO}),IconFdsPortfolioO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsPortfolioO}),IconFdsRubleCircleO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsRubleCircleO}),IconFdsSafeO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsSafeO}),IconFdsShieldCheckO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsShieldCheckO}),IconFdsWalletO:()=>eF().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsWalletO})},eW=e=>Object.prototype.hasOwnProperty.call(eU,e),eH=e=>{let{name:t,background:n}=e,[a,o]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!t||!eW(t))return void o(null);let e=!0;return eU[t]().then(n=>{e&&o({name:t,component:n})}).catch(()=>{e&&o(null)}),()=>{e=!1}},[t]),!t||!eW(t))return null;let r=(null==a?void 0:a.name)===t?a.component:null;return(0,i.jsx)("div",{className:eL.icon,style:{background:n},children:r&&(0,i.jsx)(r,{})})},eD=(0,x.g)("navigation","sc"),eV=Object.freeze({navigation:"".concat(eD),navigationOpening:"".concat(eD,"--opening"),navigationClosing:"".concat(eD,"--closing"),wrapper:"".concat(eD,"__wrapper"),container:"".concat(eD,"__container"),containerOpen:"".concat(eD,"__container--open"),sections:"".concat(eD,"__sections"),sectionsOpen:"".concat(eD,"__sections--open"),citySelectButton:"".concat(eD,"__city-select-button"),sectionsTitle:"".concat(eD,"__sections-title"),sectionsWrapper:"".concat(eD,"__sections-wrapper"),section:"".concat(eD,"__section"),sectionArrow:"".concat(eD,"__section-arrow"),sectionExtra:"".concat(eD,"__section--extra"),sectionActive:"".concat(eD,"__section--active"),sectionTitle:"".concat(eD,"__section-title"),chatWrapper:"".concat(eD,"__chat-wrapper"),chatHeader:"".concat(eD,"__chat-header"),backButton:"".concat(eD,"__back-button"),useful:"".concat(eD,"__useful"),usefulOpen:"".concat(eD,"__useful--open"),usefulTitle:"".concat(eD,"__useful-title"),usefulGrid:"".concat(eD,"__useful-grid"),removed:"".concat(eD,"__removed")}),eG=e=>{var t;let{data:n}=e,a=eb(),o=eg(),r=(0,S.nu)("m"),[c,s]=(0,l.useState)(!0);(0,l.useEffect)(()=>{s(r)},[r]);let u=(0,l.useRef)(null),d=(0,l.useCallback)(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>a.openedSection?a.setOpenedSection(null):a.isNavigationOpen?a.setOpenedBlock(null):void 0,50)},[a]),p=(0,l.useRef)(!1),h=(0,l.useRef)(null),m=(0,l.useCallback)(()=>{c&&(p.current=!0,h.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),d()},window.history.pushState(null,"",window.location.href))},[d,c]),f=(0,l.useCallback)(()=>{p.current=!1,window.onpopstate=h.current,window.history.go(-1)},[]),_=(0,l.useRef)(null),x=(0,l.useCallback)(e=>{if(c||!a.navMenuItemsRef.current||!a.navigationRef.current)return;let t=e.target,n=!a.navMenuItemsRef.current.contains(t)&&!a.navigationRef.current.contains(t);if(n&&!_.current){a.setIgnoreClicks(),_.current=setTimeout(()=>a.setOpenedBlock(null),300);return}!n&&_.current&&(clearTimeout(_.current),_.current=null)},[c,a]),C=(0,l.useRef)(null),k=(0,l.useCallback)(e=>{e?(C.current=x,window.addEventListener("mousemove",C.current)):C.current&&window.removeEventListener("mousemove",C.current)},[x]);(0,l.useEffect)(()=>{k(a.isNavigationOpen),a.isNavigationOpen&&!p.current&&m(),!a.isNavigationOpen&&p.current&&f()},[a.isNavigationOpen]);let j=(e,t)=>()=>{(0,y.h)(b.D.button,t),a.setOpenedSection(e)},{start:N,clear:A}=K(),T=()=>{c||A()};return(0,i.jsx)("div",{ref:a.navigationRef,className:(0,w.A)(eV.navigation,{[eV.removed]:!a.isNavigationMounted,[eV.navigationOpening]:a.isNavigationOpen,[eV.navigationClosing]:!a.isNavigationOpen}),children:(0,i.jsx)("div",{className:eV.wrapper,children:(0,i.jsxs)(v.m,{className:(0,w.A)(eV.container,{[eV.containerOpen]:!!a.openedSection}),children:[(0,i.jsxs)("div",{className:(0,w.A)(eV.sections,{[eV.sectionsOpen]:!!a.openedSection}),children:[(0,i.jsx)(g.$,{className:eV.citySelectButton,variant:"violet",appearance:"ghost",size:"xs",onClick:()=>o.handleButtonClick(!1),iconLeft:(0,i.jsx)(ed,{size:24}),label:(null==(t=o.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,i.jsxs)("ul",{className:(0,w.A)(eV.sectionsWrapper,{[eV.removed]:a.openedBlock!==e.id&&!c}),children:[(0,i.jsx)("div",{className:eV.sectionsTitle,children:I.a[e.id]}),e.sections.map(e=>{let t,n;return(0,i.jsxs)("li",{className:(0,w.A)(eV.section,{[eV.sectionExtra]:!!e.extra,[eV.sectionActive]:a.openedSection===e.id}),onClick:j(e.id,e.title),onMouseEnter:(t=e.id,n=e.title,()=>{c||N(j(t,n),150)}),onMouseLeave:T,children:[a.isNavigationMounted&&(0,i.jsx)(eH,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eV.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eV.sectionArrow,children:(0,i.jsx)(O._,{size:24})})]},e.id)})]},e.id)),(0,i.jsxs)("div",{className:eV.chatWrapper,children:[(0,i.jsx)("div",{className:eV.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(eB,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,w.A)(eV.backButton,{[eV.removed]:!a.openedSection}),onClick:()=>{(0,y.h)(b.D.button,"Назад"),a.setOpenedSection(null)},children:[(0,i.jsx)(eR,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eM,{data:n,isMobile:c}),(0,i.jsxs)("div",{className:(0,w.A)(eV.useful,{[eV.usefulOpen]:!!a.openedSection}),children:[(0,i.jsx)("div",{className:eV.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsx)("div",{className:(0,w.A)(eV.usefulGrid,{[eV.removed]:a.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>(0,y.h)(b.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{src:e.icon,srcSet:e.icon2?"".concat(e.icon,", ").concat(e.icon2," 2x"):void 0,alt:e.title,loading:"lazy"})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},"".concat(e.title,"_").concat(t)))},e.id)})},e.id))]})]})})})},eq=a(()=>n.e(1675).then(n.bind(n,81675)).then(e=>e.CertificatesWarningBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningBanner-BPl0-f-t.mjs")]},ssr:!1}),eJ=a(()=>Promise.all([n.e(9032),n.e(688),n.e(8325),n.e(2025),n.e(7961)]).then(n.bind(n,12505)).then(e=>e.CertificatesWarningPopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningPopup-CeN5nBOR.mjs")]},ssr:!1}),eY=a(()=>n.e(1145).then(n.bind(n,11145)).then(e=>e.HeaderMobileAppBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/HeaderMobileAppBanner-C6MgJm_-.mjs")]},ssr:!1}),e$=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:a="https://assets.finuslugi.ru/mp-assets",lkUrl:r="https://lk.finuslugi.ru/registration",initialTown:c,isMainBannerPage:s,enableAppHeaderBanner:p=!1,enableCertificatesBanner:h=!1,enableExternalLinkWarning:m=!1,certificatesWarningProduct:x,news:C,className:k}=e,j=eb(),O=(0,l.useMemo)(()=>((e,t,n)=>{var i,l,a,o,r,c,s,u;let d=null!=(u=null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:l.call(i,e=>{let{id:t}=e;return"news"===t}))?u:-1,p=(null==(o=null==(a=null==e?void 0:e.NAVIGATOR)?void 0:a[d])?void 0:o.content)||[];if(null!=(s=null==(c=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[d])?void 0:c.content)&&s[0]&&Array.isArray(n)&&p.length){let i=n.map(e=>{let{title:n,url:i}=e;return{title:n,url:(0,_.oq)(t||"",i),new:0}});e.NAVIGATOR[d].content[0].links=i}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]})(t,n,C),[t,n,C]),S=null==t?void 0:t.config,N=!!t&&h&&!!s,A=(e=>{let{enableCertificatesBanner:t,enableExternalLinkWarning:n,isMainBannerPage:i}=e,[a,o]=(0,l.useState)("checking"),[r,c]=(0,l.useState)(!1),[s,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(!1),[h,m]=(0,l.useState)(!1),f=(0,l.useRef)(),g=(0,l.useRef)(!1),v=(0,l.useRef)(!1),w=(0,l.useRef)(!1);(0,l.useRef)(null);let _=(0,l.useRef)(null),b=(0,l.useRef)(null),x=(0,l.useRef)(null),C=t&&i,k=C||n,y=(0,l.useCallback)(e=>{let t=f.current;if(t)return void t.call(window,e,"_blank","noopener,noreferrer");window.open(e,"_blank","noopener,noreferrer")},[]),I=(0,l.useCallback)(()=>{c(!1),w.current=!1,_.current=null,b.current=null,x.current=null,m(!1)},[]),j=(0,l.useCallback)(e=>{eo(ei),v.current=!0,w.current=!1,_.current=e,m("external"===e&&null!==b.current),c(!0)},[]),O=(0,l.useCallback)(()=>!g.current&&("external"===_.current&&!w.current||!v.current),[]),S=(0,l.useCallback)(()=>{"external"!==_.current&&j("external")},[j]);(0,l.useEffect)(()=>{f.current=window.open;let e=window.navigator.userAgent.includes("YaBrowser/");return e&&eo(et),g.current=e||ea(et),v.current=ea(ei),p(g.current),u(!0),()=>{b.current=null,x.current=null}},[]),(0,l.useEffect)(()=>{if(s){if(!C)return void o("skipped");o(e=>"shown"===e||"closing"===e||"dismissed"===e?e:d||ea(en)?"skipped":"shown")}},[d,C,s]),(0,l.useEffect)(()=>{},[I,k,s]),(0,l.useEffect)(()=>{if(!s||!n)return;let e=f.current;if(!e)return;let t=!0,i=e=>{if(0!==e.button&&1!==e.button||!(e.target instanceof Element))return;let n=e.target.closest("a[href]");if(!n||e.defaultPrevented)return;let i=er(n.href,window.location);if(!i||!O())return;e.preventDefault(),null===b.current&&(b.current=i.href,x.current={source:"external_anchor",host:i.hostname});let l=b.current;queueMicrotask(()=>{t&&O()&&b.current===l&&S()})},l=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",i=arguments.length>2?arguments[2]:void 0,l=er(t,window.location);return l&&O()?(null===b.current&&(b.current=l.href,x.current={source:"external_window_open",host:l.hostname}),S(),null):e.call(window,t,n,i)};return window.open=l,document.addEventListener("click",i,!0),document.addEventListener("auxclick",i,!0),()=>{t=!1,document.removeEventListener("click",i,!0),document.removeEventListener("auxclick",i,!0),window.open===l&&(window.open=e)}},[n,s,O,S]),(0,l.useEffect)(()=>{var e;n||(b.current=null,(null==(e=x.current)?void 0:e.source)!=="banner"&&(x.current=null),m(!1),"external"===_.current&&I())},[I,n]),(0,l.useEffect)(()=>{C||"banner"===_.current&&I()},[I,C]),(0,l.useEffect)(()=>{k||I()},[I,k]);let N=(0,l.useCallback)(()=>{eo(en),o("closing")},[]),A=(0,l.useCallback)(()=>{o("dismissed")},[]),T=(0,l.useCallback)(()=>{b.current=null,x.current={source:"banner"},j("banner")},[j]),R=(0,l.useCallback)(()=>{y("https://www.gosuslugi.ru/crt")},[y]),E=(0,l.useCallback)(()=>{y("https://browser.yandex.ru/")},[y]),z=(0,l.useCallback)(()=>{let e=b.current;e&&(eo(ei),v.current=!0,w.current=!0,y(e))},[y]);return{bannerStatus:a,isPopupOpen:r,popupAnalyticsContext:x.current,dismissBanner:N,finishBannerClosing:A,openPopupFromBanner:T,closePopup:I,openCertificatesPage:R,openYandexBrowserPage:E,continueToExternalPage:h?z:void 0}})({enableCertificatesBanner:N,enableExternalLinkWarning:m,isMainBannerPage:!!s}),T="shown"===A.bannerStatus||"closing"===A.bannerStatus,R=!N||"skipped"===A.bannerStatus,E=$(A.isPopupOpen),z=(0,l.useMemo)(()=>O.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[O]),B=j.isAuth?"Личный кабинет":"Войти",M=s&&j.isHeaderTransparent,P=(e,t,n,i)=>()=>{e!==j.openedBlock?(0,y.h)(b.D.toggle,t,"on"):(0,y.h)(b.D.button,"menu_close","on");let l=n?z[e]:"";j.setOpenedBlock(e,l,!!i)},{start:L,clear:F}=K(),U=e=>()=>{j.ignoreClicks||e()},W=E?(0,i.jsx)(eJ,{isOpen:A.isPopupOpen,analyticsContext:A.popupAnalyticsContext,certificatesWarningProduct:x,onClose:A.closePopup,onOpenCertificatesPage:A.openCertificatesPage,onOpenYandexBrowserPage:A.openYandexBrowserPage,onContinue:A.continueToExternalPage}):null;return t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:j.headerRef,className:(0,w.A)(I.s.header,k,{[I.s.transparent]:M}),children:(0,i.jsxs)("div",{ref:j.fixedContainerRef,className:(0,w.A)(I.s.fixed,{[I.s.hidden]:j.isHeaderHidden,[I.s.navigationOpen]:j.isNavigationOpen}),children:[T&&(0,i.jsx)(eq,{onDismiss:A.dismissBanner,onClosed:A.finishBannerClosing,onOpenDetails:A.openPopupFromBanner,onOpenCertificatesPage:A.openCertificatesPage,onOpenYandexBrowserPage:A.openYandexBrowserPage}),R&&!!(null!=S&&S.appBannerUrl)&&p&&(0,i.jsx)(eY,{mobileAppUrl:S.appBannerUrl,minioUrl:a}),(0,i.jsxs)(v.m,{className:I.s.container,children:[(0,i.jsxs)("div",{className:I.s.leftRow,children:[(0,i.jsx)(eS,{className:I.s.logo,href:n,eventActionType:b.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,_.oq)(a,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,_.oq)(a,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:j.navMenuItemsRef,className:I.s.menuItems,children:(0,i.jsx)("ul",{children:I.b.map(e=>{let{id:t,label:n}=e;return(0,i.jsx)("li",{children:(0,i.jsx)(g.$,{className:(0,w.A)({[I.s.menuItemActive]:j.openedBlock===t&&j.isNavigationOpen}),label:n,variant:"white",size:"xs",onClick:U(P(t,n,!0)),onMouseEnter:((e,t,n,i)=>()=>{j.isNavigationOpen&&e===j.openedBlock||j.setIgnoreClicks(),L(P(e,t,n,i),200)})(t,n,!0,!0),onMouseLeave:F})},t)})})}),(0,i.jsx)(eO,{className:(0,w.A)(I.s.tabletMenuButton,{[I.s.menuItemActive]:j.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(u,{size:24}),onClick:P("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:(0,w.A)(I.s.buttonGroup,{[I.s.whiteIcons]:(null==S?void 0:S.iconColorOnMobileMainBanner)==="white"}),children:[(0,i.jsxs)("div",{className:I.s.chips,children:[(0,i.jsx)(eO,{as:"a",href:r,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(r),iconLeft:(0,i.jsx)(f,{size:20}),"aria-label":B}),(0,i.jsx)(eO,{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,i.jsx)(o.G,{size:24}),"aria-label":"Онлайн чат"})]}),(0,i.jsx)(eO,{className:I.s.menuButton,size:"xs",shape:M?"icon":"default",appearance:M?"ghost":"fill",label:"Меню",onClick:P("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(Y,{size:24})}),(0,i.jsxs)("div",{className:I.s.moreButtons,children:[(0,i.jsx)(ej,{initialTown:c}),(0,i.jsx)(eO,{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",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,i.jsx)(V,{size:24}),children:"Онлайн чат"}),(0,i.jsx)(eO,{as:"a",href:r,size:"xs",eventActionText:B,eventLabel:"".concat(B,"_").concat(r),label:B})]})]}),(0,i.jsxs)(eS,{className:I.s.auth,href:r,eventActionText:B,eventLabel:"".concat(B,"_").concat(r),children:[(0,i.jsx)(eO,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(f,{}),eventActionText:B,eventLabel:"".concat(B,"_").concat(r)}),(0,i.jsx)("p",{children:B})]}),(0,i.jsx)("div",{className:I.s.close,children:(0,i.jsx)(eO,{className:I.s.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(d.a,{}),onClick:()=>j.setOpenedBlock(null),eventActionText:"IconFdsCloseO","aria-label":"Закрыть"})})]})]})}),(0,i.jsx)("div",{className:(0,w.A)(I.s.overlay,{[I.s.removed]:!j.isNavigationMounted,[I.s.overlayOpening]:j.isNavigationOpen,[I.s.overlayClosing]:!j.isNavigationOpen}),onClick:U(()=>j.setOpenedBlock(null))}),(0,i.jsx)(eG,{data:O,minioUrl:a}),W]}):m?W:null},eK=e=>(0,i.jsx)(ex,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(e$,{...e})})},18847:(e,t,n)=>{e.exports=n(52496)},24208:(e,t,n)=>{"use strict";n.d(t,{H:()=>a,h:()=>s,i:()=>c,s:()=>o});var i=n(44500),l=n(95984);let a="finuslugi-header-height-change",o=(e,t,n)=>{if(typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,o=0,r=0,c=window.innerWidth<768,s=()=>window.scrollY||document.documentElement.scrollTop,u=e=>{document.documentElement.style.setProperty("--new-header-height-desktop",e),document.documentElement.style.setProperty("--new-header-height-mobile",e)},d=()=>{let e=window.innerWidth<768;e!==c&&(c=e,r=0)},p=function(){let a=s(),c=document.getElementById("headerNotice");if((null==c?void 0:c.getAttribute("data-opening"))==="true")return;r||(()=>{let e=document.querySelector(":root");if(e){let t=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height"));r=Number.isNaN(t)?0:t,o=s()}})();let d=a<r,p=a<((null==i?void 0:i.clientHeight)||0);if(n&&p||d){l=!1,e(!1),t(!0),u("".concat(r,"px"));return}e(l=a>o),l&&setTimeout(()=>t(!1),50),u(l?"0px":"".concat(r,"px")),o=a<=0?0:a},h=()=>{r=0,p()};return window.addEventListener("scroll",p),window.addEventListener("resize",d),window.addEventListener(a,h),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d),window.removeEventListener(a,h)}},r=(e,t,n)=>{let i=new Date;i.setTime(i.getTime()+864e5*n);let l=encodeURIComponent(JSON.stringify(t)),a=";domain=.".concat(window.location.hostname);document.cookie="".concat(e,"=").concat(l,";expires=").concat(i.toUTCString(),";path=/;SameSite=Lax").concat(a)},c=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{(()=>{let e=(()=>{let e=new URLSearchParams(window.location.search),t={};for(let[n,i]of Array.from(e.entries()))n.startsWith("utm_")&&(t[n]=i);return Object.keys(t).length>0?t:null})();e&&!document.cookie.split(";").some(e=>e.trim().startsWith("utm_params="))&&r("utm_params",e,90),e&&r("utm_last",e,90)})()}catch(e){console.error("UTM tracking error:",e)}},0)},s=(e,t,n)=>(0,i.h)({eventCategory:l.H,eventActionType:e,eventActionText:t,eventLabel:n})},30783:(e,t,n)=>{"use strict";n.d(t,{S:()=>u}),n(46647);var i=n(37876),l=n(14232),a=n(15720),o=n(69241),r=n(46061);let c=(0,n(57539).g)("cookies-plate","sc"),s=Object.freeze({wrapper:"".concat(c,"__wrapper"),contentWrapper:"".concat(c,"__content-wrapper"),visible:"".concat(c,"--visible"),hidden:"".concat(c,"--hidden"),content:"".concat(c,"__content"),text:"".concat(c,"__text"),link:"".concat(c,"__link"),button:"".concat(c,"__button")}),u=e=>{let{className:t,mountDelay:n=3e3,href:c="https://assets.finuslugi.ru/mp-assets/pravila-ispolzovanija-cookie-pao-moskovskaja-birzh.doc",children:u,closeIcon:d,onMount:p,onLinkClick:h,onClose:m,mountAfterScroll:f=!0}=e,[g,v]=(0,l.useState)(!1),[w,_]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),r.a.getItem("Allow-Cookie")||(x(!0),setTimeout(()=>{v(!0),null==p||p()},n))};return f?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let C=(0,l.useCallback)(()=>{r.a.setItem("Allow-Cookie","1"),_(!0),null==m||m(),setTimeout(()=>x(!1),1e3)},[m]);return b?(0,i.jsx)("div",{className:s.wrapper,children:(0,i.jsx)("div",{className:(0,o.A)(s.contentWrapper,{[s.visible]:g,[s.hidden]:w}),children:(0,i.jsxs)("div",{className:(0,o.A)(t,s.content),children:[u||(0,i.jsxs)("p",{className:s.text,children:["Мы используем"," ",(0,i.jsx)("a",{className:s.link,href:c,target:"_blank",rel:"noreferrer",onClick:h,children:"cookie"})," ","для лучшей работы сайта"]}),(0,i.jsx)("button",{className:s.button,onClick:C,children:d||(0,i.jsx)(a.a,{})})]})})}):(0,i.jsx)(i.Fragment,{})}},46061:(e,t,n)=>{"use strict";n.d(t,{a:()=>i});let i={getItem:e=>{var t;if(typeof document>"u")return null;let n=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return n&&null!=(t=n.split("=")[1])?t:null},setItem:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let i="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t));for(let e in n){if(!n.hasOwnProperty(e))continue;i+="; ".concat(e);let t=n[e];!0!==t&&(i+="=".concat(t))}document.cookie=i},removeItem:e=>{i.setItem(e,"",{"max-age":-1})}}},46647:()=>{},52496:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return r},noSSR:function(){return o}});let i=n(64252);n(37876),n(14232);let l=i._(n(90295));function a(e){return{default:(null==e?void 0:e.default)||e}}function o(e,t){return delete t.webpack,delete t.modules,e(t)}function r(e,t){let n=l.default,i={loading:e=>{let{error:t,isLoading:n,pastDelay:i}=e;return null}};e instanceof Promise?i.loader=()=>e:"function"==typeof e?i.loader=e:"object"==typeof e&&(i={...i,...e});let r=(i={...i,...t}).loader;return(i.loadableGenerated&&(i={...i,...i.loadableGenerated},delete i.loadableGenerated),"boolean"!=typeof i.ssr||i.ssr)?n({...i,loader:()=>null!=r?r().then(a):Promise.resolve(a(()=>null))}):(delete i.webpack,delete i.modules,o(n,i))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52803:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(14232);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},a={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},o=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M21.309 22.765a6.932 6.932 0 01-2.016.233c-1.156-.04-2.62-.39-3.927-1.58A9.985 9.985 0 0112 22a9.97 9.97 0 01-7.071-2.929A9.97 9.97 0 012 12C2 6.477 6.477 2 12 2s10 4.477 10 10a9.958 9.958 0 01-1.233 4.814c.07 1.607.354 2.81.617 3.606a7.784 7.784 0 00.424 1.04c.125.248.251.497.15.787-.103.296-.366.44-.65.52zM12 3.5a8.5 8.5 0 103.258 16.353.75.75 0 01.834.178c1.06 1.124 2.278 1.436 3.252 1.469.304.01.584-.007.824-.035a10.45 10.45 0 01-.208-.574c-.317-.96-.641-2.374-.7-4.237a.75.75 0 01.1-.4A8.5 8.5 0 0012 3.5zm-4.209 7.794a1 1 0 10.003-.002l-.003.002zm3.5 0a1 1 0 10.003-.002l-.003.002zm3.502 1.414a1 1 0 01-.002-1.414l.003-.002a1 1 0 110 1.415z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function r(e){let{className:t,style:n,boxSize:r,size:c,onClick:s}=e;return i.createElement("span",{className:t,style:{...l,...s&&{cursor:"pointer"},...c&&{fontSize:"".concat(c,"px")},...r&&{width:"".concat(r,"px"),height:"".concat(r,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(o,{viewBox:"0 0 24 24",style:a}))}r.displayName="IconFdsChatDotsCircleO"},71086:()=>{},80287:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});var i=n(14232);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},a={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},o=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M11.28 17.03l4.5-4.5a.75.75 0 000-1.06l-4.5-4.5a.75.75 0 10-1.06 1.06L14.19 12l-3.97 3.97a.75.75 0 101.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function r(e){let{className:t,style:n,boxSize:r,size:c,onClick:s}=e;return i.createElement("span",{className:t,style:{...l,...s&&{cursor:"pointer"},...c&&{fontSize:"".concat(c,"px")},...r&&{width:"".concat(r,"px"),height:"".concat(r,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(o,{viewBox:"0 0 24 24",style:a}))}r.displayName="IconFdsChevronRightSmallO"},86581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return i}});let i=n(64252)._(n(14232)).default.createContext(null)},90295:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let i=n(64252)._(n(14232)),l=n(86581),a=[],o=[],r=!1;function c(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then(e=>(n.loading=!1,n.loaded=e,e)).catch(e=>{throw n.loading=!1,n.error=e,e}),n}class s{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function c(){if(!a){let t=new s(e,n);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!r){let e=n.webpack&&1?n.webpack():n.modules;e&&o.push(t=>{for(let n of e)if(t.includes(n))return c()})}function u(e,t){c();let o=i.default.useContext(l.LoadableContext);o&&Array.isArray(n.modules)&&n.modules.forEach(e=>{o(e)});let r=i.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return i.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),i.default.useMemo(()=>{var t;return r.loading||r.error?i.default.createElement(n.loading,{isLoading:r.loading,pastDelay:r.pastDelay,timedOut:r.timedOut,error:r.error,retry:a.retry}):r.loaded?i.default.createElement((t=r.loaded)&&t.default?t.default:t,e):null},[e,r])}return u.preload=()=>c(),u.displayName="LoadableComponent",i.default.forwardRef(u)}(c,e)}function d(e,t){let n=[];for(;e.length;){let i=e.pop();n.push(i(t))}return Promise.all(n).then(()=>{if(e.length)return d(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{d(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let n=()=>(r=!0,t());d(o,e).then(n,n)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},95984:(e,t,n)=>{"use strict";n.d(t,{F:()=>u,H:()=>r,U:()=>a,a:()=>s,b:()=>c,c:()=>o,s:()=>l});let i=(0,n(57539).g)("header","sc"),l=Object.freeze({header:"".concat(i),fixed:"".concat(i,"__fixed"),hidden:"".concat(i,"__fixed--hidden"),transparent:"".concat(i,"--transparent"),navigationOpen:"".concat(i,"__navigation-open"),container:"".concat(i,"__container"),leftRow:"".concat(i,"__left-row"),logo:"".concat(i,"__logo"),menuItems:"".concat(i,"__menu-items"),menuItemActive:"".concat(i,"__menu-item-active"),tabletMenuButton:"".concat(i,"__tablet-menu-button"),buttonGroup:"".concat(i,"__button-group"),chips:"".concat(i,"__chips"),menuButton:"".concat(i,"__menu-button"),moreButtons:"".concat(i,"__more-buttons"),auth:"".concat(i,"__auth"),whiteIcons:"".concat(i,"__white-icons"),close:"".concat(i,"__close"),removed:"".concat(i,"__removed"),overlay:"".concat(i,"__overlay"),overlayOpening:"".concat(i,"__overlay--opening"),overlayClosing:"".concat(i,"__overlay--closing")}),a="user_region",o="user_town",r="cb-header",c=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],s=c.reduce((e,t)=>(e[t.id]=t.label,e),{}),u=Object.freeze({mobile:56,desktop:80})},97629:(e,t,n)=>{"use strict";n.d(t,{a:()=>v,b:()=>C,c:()=>y,d:()=>_,e:()=>c,f:()=>p,g:()=>m,h:()=>N,i:()=>g,j:()=>k,k:()=>S,l:()=>O,p:()=>h,s:()=>d});var i=n(46061),l=n(44500),a=n(95984);let o={userRegion:a.U,userTown:a.c,allRegions:"all_regions",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp",allRussiaSelected:"all_russia_selected"},r={userRegion:a.U,userTown:a.c,allRegions:"all_regions_new_api",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp_new_api",allRussiaSelected:"all_russia_selected"},c=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?r:o},s=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?window.allRegionsNewApi:window.allRegions},u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){window.allRegionsNewApi=e;return}window.allRegions=e},d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(typeof document>"u")return;let l=c(n);if(!e&&!t){i.a.removeItem(l.userRegion),i.a.removeItem(l.userTown);return}i.a.setItem(l.userRegion,JSON.stringify(e)||"",{"max-age":31536e3}),i.a.setItem(l.userTown,JSON.stringify(t)||"",{"max-age":31536e3})},p=e=>{var t;if(typeof document>"u")return null;let n=null!=(t=i.a.getItem(e))?t:void 0;if(!n||"undefined"===n)return null;try{return JSON.parse(decodeURIComponent(n))}catch(e){return null}},h=function(e){if(!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},m=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=s(e);if(Array.isArray(t)&&t.length>0)return t;let n=h(c(e).allRegions)||[];return u(n,e),n},f=e=>e.some(e=>e.towns.some(e=>!!e.newId||!!e.fiasId)),g=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(e.length<1)&&(!t||f(e))},v=e=>{let t={};return e.map(e=>{let{id:n,name:i,towns:l}=e;return l.forEach(e=>{e.parentId=n,t[e.name]=t[e.name]||{},t[e.name][e.id]=i}),l}).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},w=(e,t)=>"".concat(e.replace(/\/+$/,"")).concat(t),_=(e,t)=>w(e||"https://finuslugi.ru",t),b=async e=>{try{return await (await fetch(e)).json()}catch(e){console.warn(e)}return null},x=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length<1)return;let n=c(t);u(e,t),window.localStorage.setItem(n.allRegions,JSON.stringify(e)),window.localStorage.setItem(n.lastRegionsUpdateUnixTimestamp,JSON.stringify(Date.now()))},C=(e,t,n)=>{var i;let l=null,a=null;return n&&e.some(e=>{var t;let i=null!=(t=e.towns.find(e=>e.id===n.id))?t:null;return!!i&&(l=e,a=i,!0)}),{region:null!=(i=null!=l?l:((e,t)=>{var n,i;return t&&null!=(i=null!=(n=e.find(e=>e.url===t.url))?n:e.find(e=>e.region_id===t.region_id))?i:null})(e,t))?i:t,town:null!=a?a:n}},k=(e,t)=>(!!e||!!t)&&!(null!=e&&e.newId)&&!(null!=e&&e.fiasId)&&!(null!=t&&t.newId)&&!(null!=t&&t.fiasId),y=(e,t)=>!!(null!=e&&e.newId||null!=e&&e.fiasId||null!=t&&t.newId||null!=t&&t.fiasId),I=async e=>{let t=await b(_(e,"/money_data/Root.json?short=1")),n=Array.isArray(null==t?void 0:t.regions)?t.regions:[];return x(n),n},j=async e=>{let[t,n]=await Promise.all([b(w(e,"/sc/api/v1/cities?all=true&isActive=true")),b(w(e,"/sc/api/v1/regions?all=true"))]);if(!Array.isArray(null==t?void 0:t.content)||!Array.isArray(null==n?void 0:n.content))return[];let i=((e,t)=>{let n=t.filter(e=>e.isActive).map(e=>({id:e.geoRegionId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,region_id:e.geoRegionId,enabled:+!!e.isActive,fiasId:e.fiasId,towns:[]})),i=n.reduce((e,t)=>(e[t.id]=t,e),{});return e.forEach(e=>{let t=i[e.geoRegionId];t&&t.towns.push({id:e.legacyId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,main:+!!e.isRegionalCenter,newId:e.id,fiasId:e.fiasId})}),n})(t.content,n.content);return f(i)?(x(i,!0),i):[]},O=async function(){let{showcaseUrl:e="",useNewCitiesApi:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t?j(e):I(e)},S=async e=>{let t=null;try{t=await (await fetch("".concat(e),{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},N=(e,t,n)=>{(0,l.h)({eventCategory:"finkit-widgets-sc-city-select",eventActionType:e,eventActionText:t,eventLabel:n})}}}]);