(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7611],{1611:(e,t,n)=>{"use strict";function i(e,t){return`finkit-widgets-${t}-${e}`}n.d(t,{g:()=>i})},23451:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},a=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({className:e,style:t,boxSize:n,size:r,onClick:s}){return i.createElement("span",{className:e,style:{...l,...s&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(a,{viewBox:"0 0 24 24",style:o}))}r.displayName="IconFdsChatDotsCircleO"},26626:(e,t,n)=>{"use strict";n.d(t,{L:()=>ew,H:()=>eO,Y9:()=>eK,b:()=>X,p:()=>ee,u:()=>e_,om:()=>ef}),n(53234);var i=n(95155),l=n(12115),o=n(67909),a=n(23451);let r={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},s={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},c=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({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...r,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(c,{viewBox:"0 0 24 24",style:s}))}u.displayName="IconFdsChevronDownO";var d=n(79576);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 g({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...p,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(m,{viewBox:"0 0 24 24",style:h}))}g.displayName="IconFdsUserO";var f=n(53548),w=n(95633),v=n(2821),b=n(81637),_=n(93372),x=n(1611),y=n(73364),k=n(61995),C=n(32080),I=n(99456),S=n(42195),O=n(52143),N=n(13860),j=n(91482),A=n(98910);let R={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},T={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({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...R,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(E,{viewBox:"0 0 24 24",style:T}))}z.displayName="IconFdsDotsVerticalO";let $=(0,x.g)("navigation-chips","sc"),B=Object.freeze({wrapper:`${$}__wrapper`,gray:`${$}__variantGray`,white:`${$}__variantWhite`,container:`${$}__container`,chip:`${$}__chip`,more:`${$}__chip--more`,active:`${$}__chip--active`,icon:`${$}__icon`,label:`${$}__label`,hidden:`${$}__hidden`}),P=(0,x.g)("navigation-content","sc"),M=Object.freeze({contentWrapper:`${P}__content-wrapper`,content:`${P}__content`,contentOpen:`${P}__content--open`,contentHeader:`${P}__content-header`,contentTitle:`${P}__content-title`,contentTitleUrl:`${P}__content-title--url`,contentTitleLink:`${P}__content-title--link`,contentTitleNew:`${P}__content-title--new`,new:`${P}__new`,newInline:`${P}__new-inline`,vip:`${P}__vip`,arrowIcon:`${P}__arrow-icon`,links:`${P}__links`,linksColumns:`${P}__links--columns`,linksTitleless:`${P}__links--titleless`,removed:`${P}__removed`,hidden:`${P}__content--hidden`}),L=({chip:e,hidden:t,onClick:n,refCallback:l,activeChipId:o})=>{let a=!!n,r=()=>{if(a)return null==n?void 0:n(e.url);(0,C.h)(_.D.chip,e.title,`${e.title}_${e.url}`)},s=(0,i.jsxs)(i.Fragment,{children:[e.icon&&(0,i.jsx)("span",{className:B.icon,"aria-hidden":"true",children:e.icon}),(0,i.jsx)("span",{className:B.label,children:e.title}),e.arrow&&(0,i.jsx)(A.K,{size:24})]}),c=(0,v.A)(B.chip,{[B.hidden]:t,[M.new]:!!e.new,[M.vip]:!!e.vip,[B.active]:e.url===o});return a?(0,i.jsx)("button",{type:"button",className:c,onClick:r,ref:l,children:s}):(0,i.jsx)("a",{href:e.url,className:c,onClick:r,ref:l,children:s})},F=({items:e=[],maxNumberOfLines:t,variant:n,className:o,activeChipId:a,onClick:r,moreButtonOptions:s})=>{let c=(0,l.useRef)(null),u=(0,l.useRef)(null),d=(0,l.useRef)({}),p=(null==s?void 0:s.label)??"Еще",h="Еще",m=(null==s?void 0:s.showIcon)??!0,g=(0,v.A)(B.chip,B.more,null==s?void 0:s.className),[f,w]=(0,l.useState)(!1),[b,x]=(0,l.useState)(e.length),[y,k]=(0,l.useState)(!1);(0,l.useMemo)(()=>{let t=d.current;e.forEach(e=>{e.url in t||(t[e.url]=null)}),Object.keys(t).forEach(n=>{e.find(e=>String(e.url)===String(n))||delete t[n]})},[e]);let I=(0,l.useCallback)(()=>{let n=c.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),o=Math.max(Number(t)||0,0),a=()=>{x(e.length),k(!1)};if(f||0===o||l<=0)return void a();let r=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),s=i(u.current),p=e.map(e=>i(d.current[e.url]));if(p.some(e=>0===e))return void a();let h=1,m=0,g=0;for(let e of p){let t=h===o?s+r:0,n=0===m?e:m+r+e;if(n+t<=l-.5)m=n,g++;else{if(++h>o)break;m=e,g++}}k(g<e.length),x(g)},[f,e,t]);(0,l.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(I)});return t.observe(e),requestAnimationFrame(I),()=>{t.disconnect()}},[I]),(0,l.useEffect)(()=>{requestAnimationFrame(I)},[I]);let S=f||(t??0)<=0||!y;return(0,i.jsx)("div",{className:(0,v.A)(o,B.wrapper,{[B.gray]:"gray"===n,[B.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:c,className:B.container,children:[e.map((e,t)=>(0,i.jsx)(L,{chip:e,hidden:!S&&t>=b,activeChipId:a,onClick:r,refCallback:t=>{d.current[e.url]=t}},e.url)),!S&&y&&(0,i.jsxs)("button",{type:"button",ref:u,className:g,"aria-label":h,onClick:()=>{(0,C.h)(_.D.chip,h),w(!0)},children:[m&&(0,i.jsx)(z,{size:20}),(0,i.jsx)("span",{className:B.label,children:p})]}),(S||!y)&&(0,i.jsxs)("button",{type:"button",ref:u,className:(0,v.A)(g,B.hidden),tabIndex:-1,"aria-hidden":"true",children:[m&&(0,i.jsx)(z,{size:20}),(0,i.jsx)("span",{className:B.label,children:p})]})]})})},U={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},W={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},H=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 D(e){let{className:t,style:n,boxSize:i,size:o,onClick:a}=e;return l.createElement("span",{className:t,style:{...U,...a&&{cursor:"pointer"},...o&&{fontSize:"".concat(o,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},l.createElement(H,{viewBox:"0 0 24 24",style:W}))}D.displayName="IconFdsChatDotsSquareAddO";let V={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},G={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},q=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 J(e){let{className:t,style:n,boxSize:i,size:o,onClick:a}=e;return l.createElement("span",{className:t,style:{...V,...a&&{cursor:"pointer"},...o&&{fontSize:"".concat(o,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},l.createElement(q,{viewBox:"0 0 24 24",style:G}))}J.displayName="IconFdsMenuSkewedO";let Y=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}},Q=(0,x.g)("certificates-warning-banner","sc"),Z=(0,x.g)("certificates-warning-popup","sc"),X=Object.freeze({wrapper:"".concat(Q),container:"".concat(Q,"__container"),content:"".concat(Q,"__content"),info:"".concat(Q,"__info"),image:"".concat(Q,"__image"),text:"".concat(Q,"__text"),title:"".concat(Q,"__title"),description:"".concat(Q,"__description"),details:"".concat(Q,"__details"),buttons:"".concat(Q,"__buttons"),button:"".concat(Q,"__button"),closeButton:"".concat(Q,"__close-button"),mobileActivator:"".concat(Q,"__mobile-activator")}),ee=Object.freeze({modal:"".concat(Z,"__modal"),desktopCloseButton:"".concat(Z,"__desktop-close-button"),mobilePopup:"".concat(Z,"__mobile-popup"),mobileContentContainer:"".concat(Z,"__mobile-content-container"),mobileCloseButton:"".concat(Z,"__mobile-close-button"),mobileDialog:"".concat(Z,"__mobile-dialog"),content:"".concat(Z,"__content"),image:"".concat(Z,"__image"),text:"".concat(Z,"__text"),title:"".concat(Z,"__title"),description:"".concat(Z,"__description"),actions:"".concat(Z,"__actions"),primaryActions:"".concat(Z,"__primary-actions"),divider:"".concat(Z,"__divider"),explanation:"".concat(Z,"__explanation"),button:"".concat(Z,"__button"),gosuslugiButton:"".concat(Z,"__gosuslugi-button"),gosuslugiIcon:"".concat(Z,"__gosuslugi-icon")}),et="fu_certificates_access_confirmed",en="fu_certificates_banner_dismissed",ei="fu_external_link_warning_shown",el=new Map,eo=e=>{if(typeof window>"u")return"1"===el.get(e);try{return"1"===window.localStorage.getItem(e)||"1"===el.get(e)}catch(t){return"1"===el.get(e)}},ea=e=>{if(el.set(e,"1"),!(typeof window>"u"))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}},es={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},ec={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:o,onClick:a}=e;return l.createElement("span",{className:t,style:{...es,...a&&{cursor:"pointer"},...o&&{fontSize:"".concat(o,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},l.createElement(eu,{viewBox:"0 0 24 24",style:ec}))}ed.displayName="IconFdsLocationO";let ep=(0,y.g)(),eh=(0,y.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},eg=(0,l.createContext)(em);function ef(){return(0,l.useContext)(eg)}let ew=e=>{let{children:t,initialRegion:n,initialTown:o,showStartGeoPopup:a=!0,lastRegionsUpdateUnixTimestamp:r,showcaseUrl:s="",dadataUrl:c=(0,y.d)(s,"/backend/money/dadata"),useNewCitiesApi:u=!1}=e,d=(0,y.e)(u),p=Number((0,y.p)(d.lastRegionsUpdateUnixTimestamp)||0),h=Number(r||0)>p,[m,g]=(0,l.useState)((0,y.g)(u)),f=(0,l.useRef)(m),[{startRegion:w,startTown:v},b]=(0,l.useState)({startRegion:em.startRegion,startTown:em.startTown}),x=null!=n?n:em.region,k=null!=o?o:em.town,[{region:C,town:I},S]=(0,l.useState)({region:x,town:k}),[O,N]=(0,l.useState)(em.startPopupVisible),[j,A]=(0,l.useState)(em.popupVisible),R=(0,l.useRef)(""),T=(0,l.useRef)(!1),E=(0,l.useMemo)(()=>(0,y.a)(m),[m]);(0,l.useEffect)(()=>{f.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)||""),N(!0),b({startRegion:e,startTown:t})},[N,b]),$=(0,l.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||z(e,t)},[z]),B=(0,l.useCallback)(()=>{if(R.current&&!C&&!I){var e,t;let n=null!=(e=E.find(e=>e.name===R.current))?e:null;return $(null!=(t=m.find(e=>e.id===(null==n?void 0:n.parentId)))?t:null,n)}$(C,I)},[C,I,E,m,$]),P=(0,l.useCallback)(e=>{A(e)},[A]),M=(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,y.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,y.s)(e||null,t||null,u)},[d,u]),L=(0,l.useCallback)(e=>{e?(0,y.h)(_.D.icon,"location"):(0,y.h)(_.D.button,(null==I?void 0:I.name)||"Вся Россия"),!a||window.sessionStorage.getItem("start_popup_opened")?P(!0):B()},[a,I,P,B]),F=(0,l.useCallback)((e,t)=>{M(e,t),S({region:e||null,town:t||null}),N(!1),P(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[P,M]),U=()=>{var e,t;let n=null!=(e=(0,y.f)(d.userRegion))?e:(0,y.p)(d.userRegion),i=null!=(t=(0,y.f)(d.userTown))?t:(0,y.p)(d.userTown),l=(0,y.b)(f.current,n,i),o=u&&(0,y.j)(n,i);o&&(T.current=!0),o&&(0,y.c)(l.region,l.town)&&(M(l.region,l.town),T.current=!1),S(l);let r=async e=>{let{coords:{latitude:t,longitude:n}}=e,i="".concat(c,"?lat=").concat(t,"&lon=").concat(n),l=await (0,y.k)(i);null!=l&&l.location&&(R.current=l.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&a)try{navigator.geolocation.getCurrentPosition(r,()=>null)}catch(e){}};return(0,l.useEffect)(()=>{(!(0,y.i)(m,u)||h)&&(0,y.l)({showcaseUrl:s,useNewCitiesApi:u}).then(e=>{e.length<1||g(e)})},[]),(0,l.useEffect)(()=>{if(!u)return;let e=(0,y.b)(m,C,I);T.current&&(0,y.c)(e.region,e.town)&&(M(e.region,e.town),T.current=!1),S(e)},[m,C,M,I,u]),(0,l.useEffect)(()=>{if(window.innerWidth<1024){let e=()=>{U(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{U()},0)},[]),(0,i.jsx)(eg.Provider,{value:{regions:m,towns:E,region:C,town:I,startPopupVisible:O,setStartPopupVisible:N,popupVisible:j,handleToggleModal:P,selectCity:F,handleButtonClick:L,startRegion:w,startTown:v},children:t})},ev={"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"},eb=(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 e_(){return(0,l.useContext)(eb)}let ex=e=>{let[t,n]=(0,l.useState)(!1),[o,a]=(0,l.useState)(!1),[r,s]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d}=(()=>{let[e,t]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(!1),a=e=>{o.current=e,i(e)};return(0,l.useEffect)(()=>{if(typeof window>"u")return;let e=(()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(ev,e)?ev[e]:ev["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(o.current)return void r(Error("chat is already opened"));i?(i.openWidget(),t(!1),l()):(a(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let o=document.querySelector(".webchat");o&&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(o,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),a(!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,g]=(0,l.useState)(null),[f,w]=(0,l.useState)(!1),[v,b]=(0,l.useState)(!1),[_,x]=(0,l.useState)(!1),y=(0,l.useRef)(null),I=(0,k.u)(f),S=(0,l.useRef)(null),O=(0,l.useRef)(null),N=(0,l.useRef)(null),j=(0,l.useRef)(null),A=(0,l.useCallback)(()=>{I.current&&I.current.scrollTo({top:0})},[I]),R=(0,l.useCallback)(e=>{g(e),A()},[A]),T=(0,l.useCallback)(e=>{S.current&&clearTimeout(S.current),e&&b(!0),e||(S.current=setTimeout(()=>{b(!1),R(null)},300))},[R]),E=(0,l.useCallback)((e,t,n)=>{if(t&&R(t),!n&&e===p||!e){T(!f),w(!f);return}h(e),T(!0),w(!0)},[p,R,f,T]),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,C.s)(a,s,e.isMainBannerPage);return(0,C.i)(),t},[]),(0,i.jsx)("header",{children:(0,i.jsx)(eb.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:r,openedBlock:p,setOpenedBlock:E,openedSection:m,setOpenedSection:R,isNavigationOpen:f,isNavigationMounted:v,navMenuItemsRef:y,navigationRef:I,ignoreClicks:_,setIgnoreClicks:z,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d,fixedContainerRef:N,headerRef:j},children:e.children})})},ey=(0,x.g)("city-select","sc"),ek=Object.freeze({button:"".concat(ey,"__button"),minimal:"".concat(ey,"__minimal"),full:"".concat(ey,"__full")}),eC=(0,o.default)(()=>Promise.all([n.e(2545),n.e(1804),n.e(383)]).then(n.bind(n,80383)).then(e=>e.CitySelectModal),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CitySelectModal-Dhl388Tz.mjs")]},ssr:!1}),eI=(0,o.default)(()=>n.e(5833).then(n.bind(n,5833)).then(e=>e.StartChoicePopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/StartChoicePopup-mFyQ4g8Y.mjs")]},ssr:!1}),eS=e=>{var t;let{initialTown:n}=e,o=ef(),a=(null==(t=o.town)?void 0:t.name)||n||"Вся Россия",{setIsChatModalOpen:r,isChatModalOpen:s}=e_(),{startPopupVisible:c,setStartPopupVisible:u,popupVisible:d}=o,p=Y(d),h=Y(c),m=(0,l.useRef)();(0,l.useEffect)(()=>{d&&(m.current="popup")},[d]),(0,l.useEffect)(()=>{s&&(m.current="chat")},[s]),(0,l.useEffect)(()=>{c&&(m.current="startPopup")},[c]),(0,l.useEffect)(()=>{m.current&&("chat"===m.current&&c?u(!1):["startPopup","popup"].includes(m.current)&&s&&r(!1))},[d,s,c,u,r]);let g={appearance:"ghost",size:"xs",onClick:()=>o.handleButtonClick(!1),iconLeft:(0,i.jsx)(ed,{size:24})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.$,{...g,className:(0,v.A)(ek.button,ek.full),label:a}),(0,i.jsx)(f.$,{...g,className:(0,v.A)(ek.button,ek.minimal),shape:"icon"}),p&&(0,i.jsx)(eC,{}),h&&(0,i.jsx)(eI,{})]})},eO=e=>{let{label:t,onClick:n,eventActionText:l,eventLabel:o,...a}=e;return(0,i.jsx)(f.$,{label:t,onClick:e=>{null==n||n(e),(0,_.h)({eventCategory:I.H,eventActionType:_.D.button,eventActionText:l||"",eventLabel:o||""})},...a})},eN=e=>{let{onClick:t,eventActionType:n,eventActionText:l,eventLabel:o,...a}=e;return(0,i.jsx)(S.N,{onClick:e=>{null==t||t(e),(0,_.h)({eventCategory:I.H,eventActionType:n||_.D.link,eventActionText:l||"",eventLabel:o||""})},...a})},ej={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},eA={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},eR=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 eT(e){let{className:t,style:n,boxSize:i,size:o,onClick:a}=e;return l.createElement("span",{className:t,style:{...ej,...a&&{cursor:"pointer"},...o&&{fontSize:"".concat(o,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},l.createElement(eR,{viewBox:"0 0 24 24",style:eA}))}eT.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")}),e$=()=>{let e=e_();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)(j.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]})},eB=e=>{let{data:t,isMobile:n}=e,o=e_();return(0,i.jsx)("div",{className:M.contentWrapper,children:t.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsxs)("div",{className:(0,v.A)(M.content,{[M.hidden]:o.openedSection!==e.id,[M.contentOpen]:!!o.openedSection}),children:[(0,i.jsx)("div",{className:M.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),null==(t=e.content)?void 0:t.map((t,l)=>{var o,a;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,v.A)(M.contentTitle,{[M.removed]:!t.title,[M.contentTitleUrl]:!!t.url,[M.contentTitleLink]:!!e.isSeeAllLinkAvailable,[M.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:M.arrowIcon,children:(0,i.jsx)(A.K,{})}),t.title]})})}),!(null!=(o=t.links)&&o.length)&&(0,i.jsx)(F,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:n?3:2}),!!(null!=(a=t.links)&&a.length)&&(0,i.jsx)("div",{className:(0,v.A)(M.links,{[M.linksColumns]:!!t.columns,[M.linksTitleless]:!t.title}),children:t.links.map(e=>(0,i.jsxs)("a",{href:e.url,onClick:()=>(0,C.h)(_.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{className:M.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,v.A)({[M.newInline]:!!e.new})})]})]},e.url))})]},"".concat(t.url,"_").concat(l))})]},e.id)})},e.id))})},eP=(0,x.g)("navigation-section-icon","sc"),eM=Object.freeze({icon:"".concat(eP)}),eL=()=>n.e(807).then(n.bind(n,90807)),eF={IconFdsAcademicCapO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsAcademicCapO}),IconFdsBankO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsBankO}),IconFdsBookOpenO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsBookOpenO}),IconFdsCalculatorO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCalculatorO}),IconFdsCardO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCardO}),IconFdsChatDotsCircleO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsChatDotsCircleO}),IconFdsCoinMultipleO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCoinMultipleO}),IconFdsDotsHorizontalO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsDotsHorizontalO}),IconFdsFlashO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsFlashO}),IconFdsGraphO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsGraphO}),IconFdsLayoutHorizontalO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsLayoutHorizontalO}),IconFdsPortfolioO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsPortfolioO}),IconFdsRubleCircleO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsRubleCircleO}),IconFdsSafeO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsSafeO}),IconFdsShieldCheckO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsShieldCheckO}),IconFdsWalletO:()=>eL().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsWalletO})},eU=e=>Object.prototype.hasOwnProperty.call(eF,e),eW=e=>{let{name:t,background:n}=e,[o,a]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!t||!eU(t))return void a(null);let e=!0;return eF[t]().then(n=>{e&&a({name:t,component:n})}).catch(()=>{e&&a(null)}),()=>{e=!1}},[t]),!t||!eU(t))return null;let r=(null==o?void 0:o.name)===t?o.component:null;return(0,i.jsx)("div",{className:eM.icon,style:{background:n},children:r&&(0,i.jsx)(r,{})})},eH=(0,x.g)("navigation","sc"),eD=Object.freeze({navigation:"".concat(eH),navigationOpening:"".concat(eH,"--opening"),navigationClosing:"".concat(eH,"--closing"),wrapper:"".concat(eH,"__wrapper"),container:"".concat(eH,"__container"),containerOpen:"".concat(eH,"__container--open"),sections:"".concat(eH,"__sections"),sectionsOpen:"".concat(eH,"__sections--open"),citySelectButton:"".concat(eH,"__city-select-button"),sectionsTitle:"".concat(eH,"__sections-title"),sectionsWrapper:"".concat(eH,"__sections-wrapper"),section:"".concat(eH,"__section"),sectionArrow:"".concat(eH,"__section-arrow"),sectionExtra:"".concat(eH,"__section--extra"),sectionActive:"".concat(eH,"__section--active"),sectionTitle:"".concat(eH,"__section-title"),chatWrapper:"".concat(eH,"__chat-wrapper"),chatHeader:"".concat(eH,"__chat-header"),backButton:"".concat(eH,"__back-button"),useful:"".concat(eH,"__useful"),usefulOpen:"".concat(eH,"__useful--open"),usefulTitle:"".concat(eH,"__useful-title"),usefulGrid:"".concat(eH,"__useful-grid"),removed:"".concat(eH,"__removed")}),eV=e=>{var t;let{data:n}=e,o=e_(),a=ef(),r=(0,N.nu)("m"),[s,c]=(0,l.useState)(!0);(0,l.useEffect)(()=>{c(r)},[r]);let u=(0,l.useRef)(null),d=(0,l.useCallback)(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>o.openedSection?o.setOpenedSection(null):o.isNavigationOpen?o.setOpenedBlock(null):void 0,50)},[o]),p=(0,l.useRef)(!1),h=(0,l.useRef)(null),m=(0,l.useCallback)(()=>{s&&(p.current=!0,h.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),d()},window.history.pushState(null,"",window.location.href))},[d,s]),g=(0,l.useCallback)(()=>{p.current=!1,window.onpopstate=h.current,window.history.go(-1)},[]),b=(0,l.useRef)(null),x=(0,l.useCallback)(e=>{if(s||!o.navMenuItemsRef.current||!o.navigationRef.current)return;let t=e.target,n=!o.navMenuItemsRef.current.contains(t)&&!o.navigationRef.current.contains(t);if(n&&!b.current){o.setIgnoreClicks(),b.current=setTimeout(()=>o.setOpenedBlock(null),300);return}!n&&b.current&&(clearTimeout(b.current),b.current=null)},[s,o]),y=(0,l.useRef)(null),k=(0,l.useCallback)(e=>{typeof window>"u"||(e?(y.current=x,window.addEventListener("mousemove",y.current)):y.current&&window.removeEventListener("mousemove",y.current))},[x]);(0,l.useEffect)(()=>{k(o.isNavigationOpen),o.isNavigationOpen&&!p.current&&m(),!o.isNavigationOpen&&p.current&&g()},[o.isNavigationOpen]);let S=(e,t)=>()=>{(0,C.h)(_.D.button,t),o.setOpenedSection(e)},{start:j,clear:A}=K(),R=()=>{s||A()};return(0,i.jsx)("div",{ref:o.navigationRef,className:(0,v.A)(eD.navigation,{[eD.removed]:!o.isNavigationMounted,[eD.navigationOpening]:o.isNavigationOpen,[eD.navigationClosing]:!o.isNavigationOpen}),children:(0,i.jsx)("div",{className:eD.wrapper,children:(0,i.jsxs)(w.m,{className:(0,v.A)(eD.container,{[eD.containerOpen]:!!o.openedSection}),children:[(0,i.jsxs)("div",{className:(0,v.A)(eD.sections,{[eD.sectionsOpen]:!!o.openedSection}),children:[(0,i.jsx)(f.$,{className:eD.citySelectButton,variant:"violet",appearance:"ghost",size:"xs",onClick:()=>a.handleButtonClick(!1),iconLeft:(0,i.jsx)(ed,{size:24}),label:(null==(t=a.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,i.jsxs)("ul",{className:(0,v.A)(eD.sectionsWrapper,{[eD.removed]:o.openedBlock!==e.id&&!s}),children:[(0,i.jsx)("div",{className:eD.sectionsTitle,children:I.a[e.id]}),e.sections.map(e=>{let t,n;return(0,i.jsxs)("li",{className:(0,v.A)(eD.section,{[eD.sectionExtra]:!!e.extra,[eD.sectionActive]:o.openedSection===e.id}),onClick:S(e.id,e.title),onMouseEnter:(t=e.id,n=e.title,()=>{s||j(S(t,n),150)}),onMouseLeave:R,children:[o.isNavigationMounted&&(0,i.jsx)(eW,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eD.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eD.sectionArrow,children:(0,i.jsx)(O._,{size:24})})]},e.id)})]},e.id)),(0,i.jsxs)("div",{className:eD.chatWrapper,children:[(0,i.jsx)("div",{className:eD.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(e$,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,v.A)(eD.backButton,{[eD.removed]:!o.openedSection}),onClick:()=>{(0,C.h)(_.D.button,"Назад"),o.setOpenedSection(null)},children:[(0,i.jsx)(eT,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eB,{data:n,isMobile:s}),(0,i.jsxs)("div",{className:(0,v.A)(eD.useful,{[eD.usefulOpen]:!!o.openedSection}),children:[(0,i.jsx)("div",{className:eD.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsx)("div",{className:(0,v.A)(eD.usefulGrid,{[eD.removed]:o.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>(0,C.h)(_.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))]})]})})})},eG=(0,o.default)(()=>n.e(243).then(n.bind(n,20243)).then(e=>e.CertificatesWarningBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningBanner-BPl0-f-t.mjs")]},ssr:!1}),eq=(0,o.default)(()=>Promise.all([n.e(2545),n.e(1804),n.e(2149)]).then(n.bind(n,72149)).then(e=>e.CertificatesWarningPopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningPopup-CeN5nBOR.mjs")]},ssr:!1}),eJ=(0,o.default)(()=>n.e(4733).then(n.bind(n,14733)).then(e=>e.HeaderMobileAppBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/HeaderMobileAppBanner-C6MgJm_-.mjs")]},ssr:!1}),eY=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:o="https://assets.finuslugi.ru/mp-assets",lkUrl:r="https://lk.finuslugi.ru/registration",initialTown:s,isMainBannerPage:c,enableAppHeaderBanner:p=!1,enableCertificatesBanner:h=!1,enableExternalLinkWarning:m=!1,certificatesWarningProduct:x,news:y,className:k}=e,S=e_(),O=(0,l.useMemo)(()=>((e,t,n)=>{var i,l,o,a,r,s,c,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==(a=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[d])?void 0:a.content)||[];if(null!=(c=null==(s=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[d])?void 0:s.content)&&c[0]&&Array.isArray(n)&&p.length){let i=n.map(e=>{let{title:n,url:i}=e;return{title:n,url:(0,b.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,y),[t,n,y]),N=null==t?void 0:t.config,j=!!t&&h&&!!c,A=(e=>{let{enableCertificatesBanner:t,enableExternalLinkWarning:n,isMainBannerPage:i}=e,[o,a]=(0,l.useState)("checking"),[r,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(!1),[h,m]=(0,l.useState)(!1),g=(0,l.useRef)(),f=(0,l.useRef)(!1),w=(0,l.useRef)(!1),v=(0,l.useRef)(!1);(0,l.useRef)(null);let b=(0,l.useRef)(null),_=(0,l.useRef)(null),x=(0,l.useRef)(null),y=t&&i,k=y||n,C=(0,l.useCallback)(e=>{let t=g.current;if(t)return void t.call(window,e,"_blank","noopener,noreferrer");window.open(e,"_blank","noopener,noreferrer")},[]),I=(0,l.useCallback)(()=>{s(!1),v.current=!1,b.current=null,_.current=null,x.current=null,m(!1)},[]),S=(0,l.useCallback)(e=>{ea(ei),w.current=!0,v.current=!1,b.current=e,m("external"===e&&null!==_.current),s(!0)},[]),O=(0,l.useCallback)(()=>!f.current&&("external"===b.current&&!v.current||!w.current),[]),N=(0,l.useCallback)(()=>{"external"!==b.current&&S("external")},[S]);(0,l.useEffect)(()=>{g.current=window.open;let e=window.navigator.userAgent.includes("YaBrowser/");return e&&ea(et),f.current=e||eo(et),w.current=eo(ei),p(f.current),u(!0),()=>{_.current=null,x.current=null}},[]),(0,l.useEffect)(()=>{if(c){if(!y)return void a("skipped");a(e=>"shown"===e||"closing"===e||"dismissed"===e?e:d||eo(en)?"skipped":"shown")}},[d,y,c]),(0,l.useEffect)(()=>{},[I,k,c]),(0,l.useEffect)(()=>{if(!c||!n)return;let e=g.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===_.current&&(_.current=i.href,x.current={source:"external_anchor",host:i.hostname});let l=_.current;queueMicrotask(()=>{t&&O()&&_.current===l&&N()})},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===_.current&&(_.current=l.href,x.current={source:"external_window_open",host:l.hostname}),N(),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,c,O,N]),(0,l.useEffect)(()=>{var e;n||(_.current=null,(null==(e=x.current)?void 0:e.source)!=="banner"&&(x.current=null),m(!1),"external"===b.current&&I())},[I,n]),(0,l.useEffect)(()=>{y||"banner"===b.current&&I()},[I,y]),(0,l.useEffect)(()=>{k||I()},[I,k]);let j=(0,l.useCallback)(()=>{ea(en),a("closing")},[]),A=(0,l.useCallback)(()=>{a("dismissed")},[]),R=(0,l.useCallback)(()=>{_.current=null,x.current={source:"banner"},S("banner")},[S]),T=(0,l.useCallback)(()=>{C("https://www.gosuslugi.ru/crt")},[C]),E=(0,l.useCallback)(()=>{C("https://browser.yandex.ru/")},[C]),z=(0,l.useCallback)(()=>{let e=_.current;e&&(ea(ei),w.current=!0,v.current=!0,C(e))},[C]);return{bannerStatus:o,isPopupOpen:r,popupAnalyticsContext:x.current,dismissBanner:j,finishBannerClosing:A,openPopupFromBanner:R,closePopup:I,openCertificatesPage:T,openYandexBrowserPage:E,continueToExternalPage:h?z:void 0}})({enableCertificatesBanner:j,enableExternalLinkWarning:m,isMainBannerPage:!!c}),R="shown"===A.bannerStatus||"closing"===A.bannerStatus,T=!j||"skipped"===A.bannerStatus,E=Y(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]),$=S.isAuth?"Личный кабинет":"Войти",B=c&&S.isHeaderTransparent,P=(e,t,n,i)=>()=>{e!==S.openedBlock?(0,C.h)(_.D.toggle,t,"on"):(0,C.h)(_.D.button,"menu_close","on");let l=n?z[e]:"";S.setOpenedBlock(e,l,!!i)},{start:M,clear:L}=K(),F=e=>()=>{S.ignoreClicks||e()},U=E?(0,i.jsx)(eq,{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:S.headerRef,className:(0,v.A)(I.s.header,k,{[I.s.transparent]:B}),children:(0,i.jsxs)("div",{ref:S.fixedContainerRef,className:(0,v.A)(I.s.fixed,{[I.s.hidden]:S.isHeaderHidden,[I.s.navigationOpen]:S.isNavigationOpen}),children:[R&&(0,i.jsx)(eG,{onDismiss:A.dismissBanner,onClosed:A.finishBannerClosing,onOpenDetails:A.openPopupFromBanner,onOpenCertificatesPage:A.openCertificatesPage,onOpenYandexBrowserPage:A.openYandexBrowserPage}),T&&!!(null!=N&&N.appBannerUrl)&&p&&(0,i.jsx)(eJ,{mobileAppUrl:N.appBannerUrl,minioUrl:o}),(0,i.jsxs)(w.m,{className:I.s.container,children:[(0,i.jsxs)("div",{className:I.s.leftRow,children:[(0,i.jsx)(eN,{className:I.s.logo,href:n,eventActionType:_.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,b.oq)(o,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,b.oq)(o,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:S.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)(f.$,{className:(0,v.A)({[I.s.menuItemActive]:S.openedBlock===t&&S.isNavigationOpen}),label:n,variant:"white",size:"xs",onClick:F(P(t,n,!0)),onMouseEnter:((e,t,n,i)=>()=>{S.isNavigationOpen&&e===S.openedBlock||S.setIgnoreClicks(),M(P(e,t,n,i),200)})(t,n,!0,!0),onMouseLeave:L})},t)})})}),(0,i.jsx)(eO,{className:(0,v.A)(I.s.tabletMenuButton,{[I.s.menuItemActive]:S.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(u,{size:24}),onClick:P("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:(0,v.A)(I.s.buttonGroup,{[I.s.whiteIcons]:(null==N?void 0:N.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)(g,{size:20})}),(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)(a.G,{size:24})})]}),(0,i.jsx)(eO,{className:I.s.menuButton,size:"xs",shape:B?"icon":"default",appearance:B?"ghost":"fill",label:"Меню",onClick:P("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(J,{size:24})}),(0,i.jsxs)("div",{className:I.s.moreButtons,children:[(0,i.jsx)(eS,{initialTown:s}),(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)(D,{size:24}),children:"Онлайн чат"}),(0,i.jsx)(eO,{as:"a",href:r,size:"xs",eventActionText:$,eventLabel:"".concat($,"_").concat(r),label:$})]})]}),(0,i.jsxs)(eN,{className:I.s.auth,href:r,eventActionText:$,eventLabel:"".concat($,"_").concat(r),children:[(0,i.jsx)(eO,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(g,{}),eventActionText:$,eventLabel:"".concat($,"_").concat(r)}),(0,i.jsx)("p",{children:$})]}),(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:()=>S.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,i.jsx)("div",{className:(0,v.A)(I.s.overlay,{[I.s.removed]:!S.isNavigationMounted,[I.s.overlayOpening]:S.isNavigationOpen,[I.s.overlayClosing]:!S.isNavigationOpen}),onClick:F(()=>S.setOpenedBlock(null))}),(0,i.jsx)(eV,{data:O,minioUrl:o}),U]}):m?U:null},eK=e=>(0,i.jsx)(ex,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eY,{...e})})},30753:(e,t,n)=>{"use strict";n.d(t,{a:()=>i});let i={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 i=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;for(let e in n){if(!n.hasOwnProperty(e))continue;i+=`; ${e}`;let t=n[e];!0!==t&&(i+=`=${t}`)}document.cookie=i},removeItem:e=>{i.setItem(e,"",{"max-age":-1})}}},32080:(e,t,n)=>{"use strict";n.d(t,{H:()=>o,h:()=>c,i:()=>s,s:()=>a});var i=n(93372),l=n(99456);let o="finuslugi-header-height-change",a=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,a=0,r=0,s=window.innerWidth<768,c=()=>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!==s&&(s=e,r=0)},p=function(){let o=c(),s=document.getElementById("headerNotice");if((null==s?void 0:s.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,a=c()}})();let d=o<r,p=o<((null==i?void 0:i.clientHeight)||0);if(n&&p||d){l=!1,e(!1),t(!0),u(`${r}px`);return}e(l=o>a),l&&setTimeout(()=>t(!1),50),u(l?"0px":`${r}px`),a=o<=0?0:o},h=()=>{r=0,p()};return window.addEventListener("scroll",p),window.addEventListener("resize",d),window.addEventListener(o,h),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d),window.removeEventListener(o,h)}},r=(e,t,n)=>{let i=new Date;i.setTime(i.getTime()+864e5*n);let l=encodeURIComponent(JSON.stringify(t)),o=`;domain=.${window.location.hostname}`;document.cookie=`${e}=${l};expires=${i.toUTCString()};path=/;SameSite=Lax${o}`},s=()=>{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)},c=(e,t,n)=>(0,i.h)({eventCategory:l.H,eventActionType:e,eventActionText:t,eventLabel:n})},37489:(e,t,n)=>{"use strict";n.d(t,{d:()=>l});var i=n(10320);let l=(e,t)=>{if(typeof window>"u")return;let n=sessionStorage.getItem("pushedEvents"),l=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_")),e.eventLabel||(e.eventLabel="undefined");let o=l.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!o){if(t){let t={...e};t.url=window.location.pathname,l.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(l))}(0,i.Fj)(e)}}},52143:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},a=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({className:e,style:t,boxSize:n,size:r,onClick:s}){return i.createElement("span",{className:e,style:{...l,...s&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(a,{viewBox:"0 0 24 24",style:o}))}r.displayName="IconFdsChevronRightSmallO"},53234:()=>{},61995:(e,t,n)=>{"use strict";n.d(t,{u:()=>s});var i=n(12115);let l=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},o=(e,t)=>{t.style.removeProperty("overflow-y"),e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},a=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},r=()=>document.querySelectorAll("[data-portal]").length>1,s=e=>{let t=(0,i.useRef)(null),n=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(n.current===e)return;n.current=e;let i=t.current,s=document.body,c=document.documentElement,u=window.innerWidth-c.clientWidth,d=u>0;if(e&&d)s.style.top||(window.prevScrollPosition=window.scrollY),((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`)})(s,c,u),l(i,!0);else if(e)(e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vh")})(s),l(i,!0);else{let e=!r();e&&o(s,c),e&&a(),l(i,!1)}return()=>{let e=!r();e&&o(s,c),e&&a()}},[e]),t}},62097:(e,t,n)=>{"use strict";n.d(t,{t:()=>l});let i={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},l=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in i?i[t]:e}).replaceAll(/[ \u00A0]/g,"_")},73364:(e,t,n)=>{"use strict";n.d(t,{a:()=>f,b:()=>x,c:()=>k,d:()=>v,e:()=>s,f:()=>d,g:()=>h,h:()=>N,i:()=>g,j:()=>y,k:()=>O,l:()=>S,p:()=>p,s:()=>u});var i=n(30753),l=n(93372),o=n(99456);let a={userRegion:o.U,userTown:o.c,allRegions:"all_regions",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp",allRussiaSelected:"all_russia_selected"},r={userRegion:o.U,userTown:o.c,allRegions:"all_regions_new_api",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp_new_api",allRussiaSelected:"all_russia_selected"},s=(e=!1)=>e?r:a,c=(e,t=!1)=>{if(t){window.allRegionsNewApi=e;return}window.allRegions=e},u=(e,t,n=!1)=>{if(typeof document>"u")return;let l=s(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})},d=e=>{if(typeof document>"u")return null;let t=i.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},p=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},h=(e=!1)=>{if(typeof window>"u")return[];let t=((e=!1)=>e?window.allRegionsNewApi:window.allRegions)(e);if(Array.isArray(t)&&t.length>0)return t;let n=p(s(e).allRegions)||[];return c(n,e),n},m=e=>e.some(e=>e.towns.some(e=>!!e.newId||!!e.fiasId)),g=(e,t=!1)=>!(e.length<1)&&(!t||m(e)),f=e=>{let t={};return e.map(({id:e,name:n,towns:i})=>(i.forEach(i=>{i.parentId=e,t[i.name]=t[i.name]||{},t[i.name][i.id]=n}),i)).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)=>`${e.replace(/\/+$/,"")}${t}`,v=(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},_=(e,t=!1)=>{if(e.length<1)return;let n=s(t);c(e,t),window.localStorage.setItem(n.allRegions,JSON.stringify(e)),window.localStorage.setItem(n.lastRegionsUpdateUnixTimestamp,JSON.stringify(Date.now()))},x=(e,t,n)=>{let i=null,l=null;n&&e.some(e=>{let t=e.towns.find(e=>e.id===n.id)??null;return!!t&&(i=e,l=t,!0)});let o=t?e.find(e=>e.id===t.id)??null:null;return{region:i??o??t,town:l??n}},y=(e,t)=>(!!e||!!t)&&!(null!=e&&e.newId)&&!(null!=e&&e.fiasId)&&!(null!=t&&t.newId)&&!(null!=t&&t.fiasId),k=(e,t)=>!!(null!=e&&e.newId||null!=e&&e.fiasId||null!=t&&t.newId||null!=t&&t.fiasId),C=async e=>{let t=await b(v(e,"/money_data/Root.json?short=1")),n=Array.isArray(null==t?void 0:t.regions)?t.regions:[];return _(n),n},I=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 m(i)?(_(i,!0),i):[]},S=async({showcaseUrl:e="",useNewCitiesApi:t=!1}={})=>t?I(e):C(e),O=async e=>{let t=null;try{t=await (await fetch(`${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})}},79576:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},a=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function r({className:e,style:t,boxSize:n,size:r,onClick:s}){return i.createElement("span",{className:e,style:{...l,...s&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(a,{viewBox:"0 0 24 24",style:o}))}r.displayName="IconFdsCloseO"},93372:(e,t,n)=>{"use strict";n.d(t,{D:()=>o,h:()=>r});var i=n(62097),l=n(37489),o=(e=>(e.icon="icon",e.chip="chip",e.accordion="accordion",e.button="button",e.checkbox="checkbox",e.radio="radio",e.select="select",e.toggle="toggle",e.tooltip="tooltip",e.link="link",e.banner="banner",e.tag="tag",e.date="date",e.field="field",e.offer="offer",e.tab="tab",e.submitButton="submitButton",e.popup="popup",e.block="block",e.show="show",e.close="close",e))(o||{});let a={icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submitButton:"form_button_",popup:"show_pop_up_",block:"click_block_",show:"show_",close:"close_"},r=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:o})=>{let r={event:"data-event",eventCategory:e,eventAction:a[t]+(0,i.t)(n)};void 0!==o&&(r.eventLabel=(0,i.t)("string"==typeof o?o:o.toString())),(0,l.d)(r)}},98910:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},a=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M9 8a.75.75 0 000 1.5h4.44l-5.22 5.22a.75.75 0 101.06 1.06l5.22-5.22v4.445a.75.75 0 101.5 0V8.75a.75.75 0 00-.75-.75H9z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function r({className:e,style:t,boxSize:n,size:r,onClick:s}){return i.createElement("span",{className:e,style:{...l,...s&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(a,{viewBox:"0 0 24 24",style:o}))}r.displayName="IconFdsArrowUpRightSmallO"},99456:(e,t,n)=>{"use strict";n.d(t,{F:()=>u,H:()=>r,U:()=>o,a:()=>c,b:()=>s,c:()=>a,s:()=>l});let i=(0,n(1611).g)("header","sc"),l=Object.freeze({header:`${i}`,fixed:`${i}__fixed`,hidden:`${i}__fixed--hidden`,transparent:`${i}--transparent`,navigationOpen:`${i}__navigation-open`,container:`${i}__container`,leftRow:`${i}__left-row`,logo:`${i}__logo`,menuItems:`${i}__menu-items`,menuItemActive:`${i}__menu-item-active`,tabletMenuButton:`${i}__tablet-menu-button`,buttonGroup:`${i}__button-group`,chips:`${i}__chips`,menuButton:`${i}__menu-button`,moreButtons:`${i}__more-buttons`,auth:`${i}__auth`,whiteIcons:`${i}__white-icons`,close:`${i}__close`,removed:`${i}__removed`,overlay:`${i}__overlay`,overlayOpening:`${i}__overlay--opening`,overlayClosing:`${i}__overlay--closing`}),o="user_region",a="user_town",r="cb-header",s=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],c=s.reduce((e,t)=>(e[t.id]=t.label,e),{}),u=Object.freeze({mobile:56,desktop:80})}}]);