(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[550],{59306:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var l=n(46295),o=n(53083);let r=(e,t)=>{let{isMpScApi:n,isOrganizationApi:l,isDebitCardsApi:o,isGeoContentApi:r}=t;return n?"".concat(e.NEXT_PUBLIC_BASE_URL,"/sc"):"".concat(e.NEXT_PUBLIC_BASE_URL)},i=async e=>{let{url:t,options:n={},config:i}=e,a=(0,l.S)(),s=r(a,n),u=((null==i?void 0:i.method)||"GET").toUpperCase(),c=Number(a.REVALIDATE_REQUEST_VALUE)||300,d={...null==i?void 0:i.headers},p=0;try{p=performance.now();let e=await (0,o.Wg)(t,{baseURL:s,method:u,headers:d,...i,next:{revalidate:c}}),n=performance.now()-p;return console.warn("Запрос ".concat(s).concat(t," занял ").concat(n.toFixed(2)," ms")),{data:e,error:null}}catch(e){return console.error("Ошибка запроса","".concat(e,": ").concat(s).concat(t)),{data:null,error:e instanceof Error?e.message:"Unknown error"}}}},5646:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});let l=e=>!!e&&"bankId"in e,o=e=>{var t,n,o,r,i,a,s,u,c,d,p,v,_,f,A,m,g,h;let w=new URLSearchParams;return Object.entries({bankIds:l(e)?[e.bankId]:null===(t=e.filters)||void 0===t?void 0:t.bankIds,advantages:null===(n=e.filters)||void 0===n?void 0:n.advantages,goodCategories:null===(r=e.filters)||void 0===r?void 0:null===(o=r.goodCategories)||void 0===o?void 0:o.map(String),customerCategories:null===(a=e.filters)||void 0===a?void 0:null===(i=a.customerCategories)||void 0===i?void 0:i.map(String),currency:null===(u=e.filters)||void 0===u?void 0:null===(s=u.currency)||void 0===s?void 0:s.toString(),bonus:null===(c=e.filters)||void 0===c?void 0:c.bonus,cardType:null===(p=e.filters)||void 0===p?void 0:null===(d=p.cardType)||void 0===d?void 0:d.map(String),region:null===(v=e.filters)||void 0===v?void 0:v.region,town:null===(_=e.filters)||void 0===_?void 0:_.town,tag:null===(f=e.filters)||void 0===f?void 0:f.tag,regionId:(null===(A=e.filters)||void 0===A?void 0:A.regionId)?String(null===(m=e.filters)||void 0===m?void 0:m.regionId):void 0,townId:(null===(g=e.filters)||void 0===g?void 0:g.townId)?String(null===(h=e.filters)||void 0===h?void 0:h.townId):void 0}).forEach(e=>{let[t,n]=e;Array.isArray(n)?n.forEach(e=>{w.append(t,e)}):void 0!==n&&w.append(t,n)}),e.sort&&w.append("sort",e.sort),l(e)&&e.bankId&&w.append("bankId",e.bankId),e.sortDirection&&w.append("sortDirection",e.sortDirection),void 0!==e.from&&w.append("from",String(e.from)),w}},21402:function(e,t,n){"use strict";n.d(t,{r:function(){return i}});var l=n(59306),o=n(97916),r=n(5646);let i=async(e,t,n)=>await (0,l.t)({url:"/".concat(o.k.APP_PREFIX,"/api/debit-cards").concat(n?"/legacy":"","?").concat((0,r.U)(e).toString()),config:{signal:t}})},23530:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var l=n(59306),o=n(97916),r=n(5646);let i=async(e,t)=>await (0,l.t)({url:"/".concat(o.k.APP_PREFIX,"/api/debit-cards").concat(t?"/legacy":"","/bank?").concat((0,r.U)(e).toString())})},6115:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var l=n(57437),o=n(2265),r=n(33145);function i(e){let{src:t,alt:n,fallbackSrc:i,...a}=e,[s,u]=(0,o.useState)(t);return(0,l.jsx)(r.default,{...a,src:s,alt:n,onError:()=>u(i)})}},58580:function(e,t,n){"use strict";var l,o;n.d(t,{a:function(){return l}}),(o=l||(l={})).VKLADY="vklady",o.DEBIT_CARDS="debetovye_karty",o.DEPOSIT_CALCULATOR="depozitnyj-kalkulyator",o.DEPOSIT_PICKER="depozitnyj-podborshik",o.PARTNERS_SHOWCASE="vklady/partners",o.COMBO="combo"},34434:function(e,t,n){"use strict";n.d(t,{N:function(){return o}});let l=e=>e<10?"0"+e:e.toString(),o=(e,t)=>{if(!e)return"";let n=new Date(e).getDate(),o=new Date(e).getMonth()+1,r=new Date(e).getFullYear(),i=t?"":"".concat(l(n),".").concat(l(o),".").concat(r);return((null==t?void 0:t.hasDay)&&(i="".concat(l(n))),(null==t?void 0:t.hasMonth)&&(i="".concat(i.length?i+".":"").concat(l(o))),null==t?void 0:t.hasYear)?"".concat(i.length?i+".":"").concat(r):i}},27351:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});let l=(e,t)=>{let n=e;return Object.keys(t).forEach(e=>{n=n.replace(new RegExp(e),t[e])}),n},o=e=>{let{tagName:t,inRegion:n}=e;return l((null==t?void 0:t.trim())||"Частые вопросы",{"#REG#":n})}},72794:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var l=["finuslugi.ru","inguru.dev","moex.com"];let o=e=>e.includes("//")&&!l.find(t=>e&&e.indexOf(t)>=0),r=e=>e?e=e.replace(/href="(.*?)"/gi,(e,t)=>"".concat(e).concat(o(t)?' rel="nofollow"':"")):""},61058:function(e,t,n){"use strict";n.d(t,{o:function(){return l}});let l=(e,t)=>{t=null===t?1:t;let n=null===e?0:e.length;if(!n||t<1)return[];t=t>n?n:t;let l=new Date().getDate(),o=e=>{let t=1e4*Math.sin(e++);return t-Math.floor(t)},r=-1,i=n-1,a=[...e];for(;++r<t;){let e=r+Math.floor(o(l)*(i-r+1)),t=a[e];a[e]=a[r],a[r]=t}return a.slice(0,t)}},87017:function(e,t,n){"use strict";n.d(t,{i:function(){return k}});var l=n(57437),o=n(75461),r=n(13466),i=n(2265),a=n(54365),s=n(66153),u=n(80684),c=n(5426),d=n(71380),p=n.n(d);let v=e=>{let{footer:t,hasScroll:n,className:o}=e;return(0,l.jsx)("div",{className:(0,a.Z)(p().footer,{[p().hasScroll]:n},o),children:"function"==typeof t?t():t})};var _=n(47171),f=n.n(_);let A=e=>{let{onClose:t,onContentClick:n,children:o,title:r,rowTitle:s,titleAlign:d,isCloseable:p,footer:_,closeButton:A,isOpen:m,contentClassName:g,footerClassName:h,contentStyle:w,width:b}=e,C=(0,i.useRef)(null),x=(0,i.useRef)(null),[y,S]=(0,i.useState)(!1);(0,i.useEffect)(()=>{var e;if(!x.current||!C.current)return;let t=(null==x?void 0:null===(e=x.current)||void 0===e?void 0:e.getBoundingClientRect().top)||0,n=null==C?void 0:C.current,l=()=>{let e=null==x?void 0:x.current;e&&S(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",l,!1),()=>{null==n||n.removeEventListener("scroll",l,!1)}},[]);let k=w||b?{width:b,...w||{}}:void 0;return(0,l.jsxs)("div",{ref:C,style:k,className:(0,a.Z)(f().container,{[f().open]:m,[f().close]:!m},g),children:[!!(r||p)&&(0,l.jsxs)("div",{className:(0,a.Z)(f().header,{[f().rowHeader]:s}),children:[p?A?"function"==typeof A?A():A:(0,l.jsx)(c.zx,{size:"xs",variant:"secondary",shape:"icon",className:f().controlContainer,onClick:t,iconLeft:(0,l.jsx)(u.IconFdsCloseO,{})}):null,!!r&&(0,l.jsx)("h3",{className:(0,a.Z)(f().title,!!d&&f()[d]),children:r})]}),(0,l.jsx)("div",{ref:x,className:f().content,onClick:n,children:o}),_&&(0,l.jsx)(v,{className:(0,a.Z)(f().footer,h),footer:_,hasScroll:y})]})};var m=n(17868),g=n(61753),h=n.n(g);let w=e=>{let{onClose:t,isOpen:n,children:o,withDisabledScroll:r,className:u,...c}=e,d=(0,i.useCallback)(e=>e.stopPropagation(),[]);return(0,m.o)(n&&r),(0,l.jsxs)("div",{"data-portal":!0,className:(0,a.Z)(h().window,u),children:[(0,l.jsx)(s.L,{onClose:t,isOpen:n,delay:0}),(0,l.jsx)(A,{onContentClick:d,onClose:t,isOpen:n,...c,children:o})]})};var b=n(73564);let C=e=>{let{isOpen:t=!1,children:n,titleAlign:o="center",isCloseable:r=!0,withDisabledScroll:i=!0,...a}=e,{mounted:s}=(0,b.b)({opened:t});return s?(0,l.jsx)(w,{titleAlign:o,isCloseable:r,isOpen:t,withDisabledScroll:i,...a,children:n}):null};C.displayName="Drawer";var x=n(49689),y=n(43051),S=n.n(y);let k=e=>{let{footer:t,children:n,onClose:i,isOpen:a,title:s,drawerProps:u}=e,c=(0,o.aF)("m");return(0,l.jsx)(r.h,{children:c?(0,l.jsx)(x.j,{isOpen:a,onClose:i,footer:t,title:s,children:n}):(0,l.jsx)(C,{isOpen:a,onClose:i,title:s,contentClassName:S().content,titleAlign:"center",rowTitle:!0,footer:t,width:"600px",...u,children:n})})}},77493:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});let l=300},66153:function(e,t,n){"use strict";n.d(t,{L:function(){return u}});var l=n(57437),o=n(2265),r=n(54365),i=n(77493),a=n(78582),s=n.n(a);let u=e=>{let{onClose:t,onToucheMove:n,isOpen:a,delay:u=i.z}=e,c=(0,o.useRef)(null),d=(0,o.useCallback)(()=>{t&&(c.current=setTimeout(()=>{t()},u))},[u,t]),p=(0,o.useCallback)(e=>{"Escape"===e.key&&d()},[d]);return(0,o.useEffect)(()=>(a&&window.addEventListener("keydown",p),()=>{c.current&&clearTimeout(c.current),window.removeEventListener("keydown",p)}),[a,p]),(0,l.jsx)("div",{className:(0,r.Z)(s().overlay,{[s().open]:a,[s().close]:!a}),onTouchStart:n,onClick:d})}},49689:function(e,t,n){"use strict";n.d(t,{j:function(){return f}});var l=n(57437),o=n(2265),r=n(54365),i=n(66153),a=n(53582),s=n.n(a);let u=e=>{let{footer:t,isSmallPopup:n=!1,footerClassName:o}=e;return(0,l.jsx)("div",{className:(0,r.Z)(s().footer,n&&s().footerWithoutShadow,o),children:"function"==typeof t?t():t})};var c=n(17868),d=n(73564),p=n(16565),v=n.n(p);let _=e=>{let{children:t,footer:n,isOpen:a,isSmallPopup:s,onClose:d,hasCloseButton:p=!0,full:_,touchDistance:f=100,withDisabledScroll:A=!0,contentClassName:m,className:g,title:h,closeButton:w,footerClassName:b}=e,[C,x]=(0,o.useState)(!1),[y,S]=(0,o.useState)(!1),[k,j]=(0,o.useState)(!0),[L,E]=(0,o.useState)("120%"),I=(0,o.useRef)(null),D=(0,o.useRef)(0),O=(0,o.useRef)(!1),T=e=>{var t,n,l;let o=null===(t=I.current)||void 0===t?void 0:t.offsetTop,r=null===(n=I.current)||void 0===n?void 0:n.offsetHeight;if(O.current=!0,j(!1),o&&r){let t=(null==e?void 0:null===(l=e.touches[0])||void 0===l?void 0:l.clientY)-o,n=0;t>=0&&t<=r+30&&(n=t),t>r+30&&(n=r+30),E("".concat(n,"px")),D.current=n}},P=()=>{O.current&&(D.current>f&&d?null==d||d():E("0"),j(!0),O.current=!1),window.removeEventListener("touchmove",T),window.removeEventListener("touchend",P)};return(0,o.useEffect)(()=>{a&&setTimeout(()=>{x(!0),S(!0),E("0")},100),!a&&y&&(E("120%"),x(!1),S(!1))},[y,a]),(0,c.o)(a&&A),(0,l.jsxs)("div",{"data-portal":!0,className:(0,r.Z)(v().mobilePopup,y&&v().mobilePopupOpen,g),children:[(0,l.jsx)(i.L,{onClose:()=>{a&&(null==d||d())},onToucheMove:()=>{a&&(x(!1),window.addEventListener("touchmove",T),window.addEventListener("touchend",P))},isOpen:a,delay:0}),(0,l.jsxs)("div",{className:(0,r.Z)(v().content,_&&v().contentFull,k&&v().contentTransition,k&&C&&v().contentTransitionOpen),ref:I,style:{transform:"translateY(".concat(L,")")},children:[(0,l.jsx)("div",{className:v().contentLine}),(0,l.jsxs)("div",{className:(0,r.Z)(v().contentContainer,s&&v().smallContentContainer,{[v().min]:!h&&!p},m),children:[!!h&&(0,l.jsx)("div",{className:v().title,children:h}),p?(0,l.jsx)("div",{className:v().closeContainer,children:p?w?"function"==typeof w?w():w:(0,l.jsx)("button",{onClick:d,className:v().closeButton,children:(0,l.jsx)("img",{src:"https://assets.finuslugi.ru/mp-assets/images/sc/close_gray.svg",alt:"close",loading:"lazy"})}):null}):null,t]}),n&&(0,l.jsx)(u,{footerClassName:b,isSmallPopup:s,footer:n})]})]})},f=e=>{let{children:t,isSmallPopup:n=!1,isOpen:o=!1,...r}=e,{mounted:i}=(0,d.b)({opened:o});return i?(0,l.jsx)(_,{isSmallPopup:n,isOpen:o,...r,children:t}):null};f.displayName="UiMobilePopup"},3922:function(e,t,n){"use strict";n.d(t,{c:function(){return L}});var l=n(57437),o=n(91638),r=n(47748),i=n.n(r);let a=e=>{let{cell:t}=e;return(0,l.jsx)("div",{className:i().wrapper,children:t.value?t.truthy:t.falsy})},s=e=>{let{cell:t}=e;return(0,l.jsx)("div",{style:{height:t.value+"px"}})};var u=n(75461);let c=e=>{let{cell:t}=e;return(0,l.jsx)(u.rU,{href:t.href,children:t.value})};var d=n(54398),p=n.n(d);let v=e=>{let{cell:t}=e;return(0,l.jsx)("ul",{className:p().wrapper,children:t.value.map(e=>(0,l.jsx)("li",{children:e},e))})};var _=n(54365),f=n(2265),A=n(33114),m=n.n(A);let g=e=>{let{maxHeight:t=300,className:n,style:o,children:r,...i}=e,[a,s]=(0,f.useState)(t),[u,c]=(0,f.useState)(!1),d=(0,f.useRef)(null);return(0,f.useEffect)(()=>{let e=()=>{d.current&&d.current.scrollHeight>t&&c(!0)};return e(),window&&window.addEventListener("resize",e),window.removeEventListener("resize",e)},[t]),(0,l.jsxs)("div",{...i,ref:d,className:(0,_.Z)(m().container,{[m().containerOverflow]:u,[m().containerOpen]:u&&a===t},n),style:{height:u?a:"auto",...o},children:[r,u&&(0,l.jsx)("button",{className:m().button,onClick:()=>{s(e=>e===t?"auto":t)},children:a===t?"Показать ещё":"Скрыть"})]})};var h=n(14950),w=n.n(h);let b=e=>{let{cell:t}=e;return(0,l.jsx)(g,{"data-overflow":!0,children:(0,l.jsx)("div",{className:(0,_.Z)(w().wrapper,{[w()[t.variant]]:!0}),dangerouslySetInnerHTML:{__html:t.value}})})},C=e=>{let{cell:t}=e;return t.type===o.e.TEXT?(0,l.jsx)(b,{cell:t}):t.type===o.e.BOOLEAN?(0,l.jsx)(a,{cell:t}):t.type===o.e.GAP?(0,l.jsx)(s,{cell:t}):t.type===o.e.LINK?(0,l.jsx)(c,{cell:t}):t.type===o.e.LIST?(0,l.jsx)(v,{cell:t}):t.type===o.e.CUSTOM?t.value:null};var x=n(16868),y=n.n(x);let S=e=>{let{row:t}=e;return(0,l.jsxs)("div",{className:y().row,children:[(0,l.jsx)("div",{className:y().columnTitle,children:t.title}),(0,l.jsx)("div",{className:y().columnValue,children:t.cells.map((e,t)=>(0,l.jsx)(C,{cell:e},t))})]})};var k=n(4946),j=n.n(k);let L=e=>{let{rows:t}=e;return(0,l.jsx)("div",{className:j().table,children:t.map((e,t)=>(0,l.jsx)(S,{row:e},t))})}},2607:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var l=n(57437),o=n(75461);let r=e=>/^https?:\/\//i.test(e)||e.startsWith("/")?e:"/".concat(e);var i=n(69286),a=n.n(i);let s=e=>{let{data:t}=e,n=e=>t=>{e.disableLink&&(t.preventDefault(),t.stopPropagation()),e.onClick&&e.onClick()};return(0,l.jsx)("ul",{className:a().choice,children:t.map(e=>(0,l.jsx)("li",{className:a().choiceOption,children:(0,l.jsx)(o.rU,{href:r(e.url),onClick:n(e),children:e.name})},e.id))})}},38809:function(e,t,n){"use strict";n.d(t,{iK:function(){return a},O$:function(){return s},K3:function(){return u},Ar:function(){return c},PX:function(){return T}});var l=n(57437),o=n(2265),r=n(29501),i=n(75461);function a(e){let{control:t,name:n,onChange:a,options:s}=e,u=(0,o.useMemo)(()=>new Map(s.map(e=>[e.id,e])),[s]);return(0,l.jsx)(r.Qr,{control:t,name:n,render:e=>{let{field:t}=e,n=t.value||[];return(0,l.jsx)(l.Fragment,{children:s.map(e=>(0,l.jsx)(i.XZ,{value:n.some(t=>t===e.id),onChange:l=>{let o=l?[...n,e.id]:n.filter(t=>t!==e.id);t.onChange(o);let r=o.map(e=>{var t;return null!==(t=u.get(e))&&void 0!==t?t:{id:e,label:String(e)}});null==a||a(r)},children:e.label},e.id))})}})}function s(e){let{control:t,name:n,onChipClick:o,...a}=e,s=new Map(null==a?void 0:a.chips.map(e=>[e.id,e]));return(0,l.jsx)(r.Qr,{control:t,name:n,render:e=>{let{field:t}=e;return(0,l.jsx)(i.cL,{value:t.value,onChipClick:(e,n,l)=>{var r;t.onChange(a.multiple?l:e),null==o||o(null!==(r=s.get(e))&&void 0!==r?r:{id:e,label:String(e)})},...a})}})}function u(e){let{control:t,name:n,options:o,onChange:a}=e;return(0,l.jsx)(r.Qr,{control:t,name:n,render:e=>{let{field:t}=e;return(0,l.jsx)(l.Fragment,{children:o.map(e=>(0,l.jsx)(i.Y8,{value:e.value,checked:e.value===t.value,onChange:e=>{t.onChange(e),null==a||a()},name:n,label:e.label},e.value))})}})}function c(e){let{control:t,name:n,rules:a,onChange:s,...u}=e,c=(0,o.useMemo)(()=>new Map(null==u?void 0:u.options.map(e=>{var t;return[e[null!==(t=null==u?void 0:u.optionValue)&&void 0!==t?t:"value"],e]})),[null==u?void 0:u.options,null==u?void 0:u.optionValue]);return(0,l.jsx)(r.Qr,{control:t,name:n,rules:a,render:e=>{var t;let{field:n,fieldState:o}=e;return(0,l.jsx)(i.Ph,{state:(null===(t=o.error)||void 0===t?void 0:t.message)?"error":void 0,value:n.value,onChange:e=>{let t;let l=null;if(Array.isArray(e))t=e.map(e=>{if("object"==typeof e&&null!==e){var t;return e[null!==(t=null==u?void 0:u.optionValue)&&void 0!==t?t:"value"]}return e}),l=e.map(e=>"object"==typeof e&&null!==e?e:c.get(e)).filter(e=>void 0!==e);else if(e){var o,r;t=e[null!==(o=null==u?void 0:u.optionValue)&&void 0!==o?o:"value"],l="object"==typeof e&&null!==e?e:null!==(r=c.get(e))&&void 0!==r?r:null}n.onChange(t),null==s||s(l,(null==u?void 0:u.label)||"")},...u})}})}var d=n(80684),p=n(54365);let v=(e,t)=>{e&&(e.current=t)},_=(e,t)=>{let n=e.value;e.value=t;let l=new Event("input",{bubbles:!0}),o=e._valueTracker;o&&o.setValue(n),e.dispatchEvent(l)};var f=n(15397),A=n.n(f);let m="Обязательное поле",g=(0,o.memo)(e=>{let{onChange:t=()=>null,onFocus:n=()=>null,onBlur:r=()=>null,onKeyDown:i=()=>null,inputClear:a=()=>null,label:s,allowClear:u=!1,addonBefore:c,addonAfter:f,state:g,appearance:h="gray",inputType:w,required:b=!1,infoMessage:C,message:x,innerRef:y=null,disabled:S,id:k,placeholder:j,autoFocus:L=!1,value:E,readOnly:I,className:D,onlyRange:O,size:T="small",maskPlaceholder:P,...N}=e,[R,B]=(0,o.useState)(L);(0,o.useEffect)(()=>B(L),[L]);let M=(0,o.useRef)(null),F=!b||(E||"error"!==g)&&g?x:m,z=(null==C?void 0:C.length)&&!b||(null==C?void 0:C.length)&&E?C:m;return(0,l.jsxs)("div",{className:(0,p.Z)(A().inputRoot,D),children:[(0,l.jsxs)("label",{htmlFor:k,className:(0,p.Z)(A().wrapperInput,A()[h],A()[T],{[A().isFocused]:R&&!S,[A().hasValue]:R||!!E||!!j||P,[A().disabled]:S,[A().success]:"success"===g,[A().error]:"error"===g,[A().readOnly]:I}),children:[c&&(0,l.jsx)("div",{className:(0,p.Z)(A().controlContainer,A().addoneBefore),children:c}),(0,l.jsxs)("div",{className:(0,p.Z)(A().inputContainer,{[A().cover]:"button"===w}),children:[P&&(0,l.jsxs)("div",{className:(0,p.Z)(A().maskPlaceholder,!j&&!s&&A().maskPlaceholderCenter),children:[E&&(0,l.jsx)("span",{className:A().maskPlaceholderHide,children:E}),P.slice(String(null!=E?E:"").length)]}),(0,l.jsx)("input",{id:k,ref:e=>{M.current=e,v(y,e)},value:null!=E?E:"",disabled:S||O,autoFocus:"button"!==w&&R,readOnly:I,onFocus:e=>{R||(B(!0),n(e))},onBlur:e=>{R&&(B(!1),r(e))},onChange:e=>{t(e)},onKeyDown:e=>{i&&i(e)},className:(0,p.Z)(A().input,!s&&A().inputCenter),placeholder:P?void 0:j,...N}),(null==s?void 0:s.length)?(0,l.jsx)("span",{className:(0,p.Z)(A().label,"error"===g&&A().error),children:s}):null]}),u&&(!!E||"string"==typeof E&&!!E.trim().length)&&(0,l.jsx)("button",{type:"button",className:(0,p.Z)(A().controlContainer,A().buttonClear),onClick:e=>{e.preventDefault(),M.current&&(_(M.current,""),"input"===w&&M.current.focus()),a()},children:(0,l.jsx)(d.IconFdsCloseO,{size:20})}),f&&(0,l.jsx)("div",{className:(0,p.Z)(A().controlContainer,A().addoneAfter),children:f})]}),(!!(null==x?void 0:x.length)&&g||b||!!(null==C?void 0:C.length))&&(0,l.jsx)("div",{className:(0,p.Z)(A().message,{[A().successMessage]:"success"===g,[A().errorMessage]:"error"===g,[A().defaultMessage]:b&&!g||!b&&!g&&!!(null==C?void 0:C.length)}),children:g?F:z})]})});g.displayName="UiInput";let h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=(0,o.useRef)(null),l=(0,o.useRef)(null),r=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let o=()=>{n.current&&clearTimeout(n.current),r.current&&(window.removeEventListener("keydown",r.current.keyDown),document.removeEventListener("mousedown",r.current.clickOutside))};return o(),r.current={keyDown(o){"Escape"===o.key&&e&&(n.current=setTimeout(()=>{e(l)},t))},clickOutside(t){0===t.button&&l.current&&!l.current.contains(t.target)&&e(l)}},window.addEventListener("keydown",r.current.keyDown),document.addEventListener("mousedown",r.current.clickOutside),o},[e,t]),l},w=e=>{let{isOpenPopup:t,multiple:n,optionsList:l,defaultPointedIndex:r,onTogglePopup:i,onSelectedItem:a,onClearCallBack:s}=e,[u,c]=(0,o.useState)({index:r,trigger:"key"}),{index:d,trigger:p}=u,v=(0,o.useRef)(l.length);(0,o.useEffect)(()=>{t||null===r||n||(c({index:r,trigger:"key"}),v.current=l.length),v.current!==l.length&&t&&(v.current=l.length,c({index:0,trigger:"key"}))},[l.length,t,r,n]);let _=(0,o.useCallback)(()=>{if(!t){i();return}null!==d&&(a(l[d]),s())},[t,l,d,a,s,i]),f=(0,o.useCallback)(()=>{t&&i(!0)},[t,i]),A=(0,o.useCallback)(()=>{t&&l.length&&(c(e=>{let{index:t}=e;return null===t?{trigger:"key",index:0}:t+1<l.length?{trigger:"key",index:t+1}:t+1===l.length?{trigger:"key",index:0}:{trigger:"key",index:t}}),s())},[t,s,l.length]),m=(0,o.useCallback)(()=>{t&&l.length&&(c(e=>{let{index:t}=e;return null===t?{trigger:"key",index:0}:t+1>l.length?{trigger:"key",index:t-1}:0===t?{trigger:"key",index:l.length-1}:t+1<=l.length?{trigger:"key",index:t-1}:{trigger:"key",index:t}}),s())},[t,s,l.length]);return{pointedItemIndex:d,pointedTrigger:p,setPointedItem:c,handleKeyNavigation:e=>{e.stopPropagation();let t=e||window.event;switch(e.key){case"Escape":f();break;case"Enter":_();break;case"ArrowDown":t.preventDefault(),A();break;case"ArrowUp":t.preventDefault(),m()}}}},b=e=>{let{isOpenPopup:t,isMobile:n=!1,multiple:l,scrollValue:r,selectedItemIndex:i,pointedItemIndex:a,pointedTrigger:s,container:u,element:c}=e,d=(0,o.useCallback)(e=>{u&&e>=0&&c.current&&null!==c.current&&c.current.scrollIntoView({block:"nearest",inline:"nearest"})},[u,c]);return(0,o.useEffect)(()=>{let e;!l&&t&&e!==i&&"number"==typeof i&&(e=i,d(i))},[u,c,t,l,d,i]),(0,o.useEffect)(()=>{let e;!n&&t&&e!==a&&"number"==typeof a&&"key"===s&&(e=a,d(a))},[n,u,c,t,a,s,d]),(0,o.useEffect)(()=>{let e;l&&t&&u.current&&e!==r&&(e=r,u.current.scrollTo({top:r}))},[u,t,l,r]),null};var C=n(38019),x=n.n(C);let y="calc(100% + ".concat(8,"px)"),S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=null;return n=>{t&&clearInterval(t),t=setTimeout(n,e)}}(),k=(0,o.memo)(e=>{let{onSearch:t,onChange:n=()=>null,options:r,optionsEmptyText:a,multiple:s=!1,search:u=!1,defaultOpen:c=!1,autoFocus:v=!1,value:_,popupHeight:f=312,className:A,removeLineHeight:m,onClose:C,onOpen:k,popupDataQa:j,itemDataQa:L,...E}=e,I=(0,o.useRef)(!1),[D,O]=(0,o.useState)(()=>null!=_?_:null),[T,P]=(0,o.useState)(""),[N,R]=(0,o.useState)(v||c),[B,M]=(0,o.useState)(!1),[F,z]=(0,o.useState)(null),[V,Z]=(0,o.useState)(()=>D?r.filter(e=>D.find(t=>String(t.value)===String(e.value))):null),[Q,U]=(0,o.useState)(0),[H,Y]=(0,o.useState)({mouseX:void 0,mouseY:void 0,isDisplaced:!0}),X=N&&!!r.length,K=(0,o.useCallback)(e=>{B||(P(""),R(!1),null==C||C()),(null==e?void 0:e.current)&&s&&X&&U(e.current.scrollTop)},[B,X,s,C]),J=(0,o.useRef)(null),W=(0,o.useRef)(null),q=(0,o.useRef)(null),G=h(K),$=(0,o.useMemo)(()=>u&&T&&""!==T?r.filter(e=>-1!==String(e.label).toLocaleLowerCase().indexOf(T.toLocaleLowerCase())):r,[T,r,u]),ee=(0,o.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Y({mouseX:void 0,mouseY:void 0,isDisplaced:!0}),R(t=>!e&&!t),M(t=>!e&&!t),e){var t;null===(t=J.current)||void 0===t||t.blur()}(null==G?void 0:G.current)&&s&&X&&U(G.current.scrollTop),e&&(null==C||C())},[G,s,X,C]),et=(0,o.useCallback)(e=>{if(s)Z(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t)return[e];let l=t.findIndex(t=>String(t.label).toLocaleLowerCase()===String(e.label).toLocaleLowerCase());if(l>=0){let e=[...t.slice(0,l),...t.slice(l+1)];return e.length||(O(null),z(null),Z(null),n(null)),e}return[...t,e]});else{let t=[],l=r.find(t=>String(t.value).trim().toLocaleLowerCase()===String(e.value).trim().toLocaleLowerCase());t=l?[l]:[];let o=r.findIndex(e=>{var n;return e.label.toLocaleLowerCase()===(null===(n=t[0])||void 0===n?void 0:n.label.toLocaleLowerCase())});z(o>=0?o:null),O([e]),Z([e]),n(_&&e.value===_[0].value?null:t),ee(!0),P("")}},[ee,s,n,r,_]),en=(0,o.useCallback)(()=>{n(V),ee(!0)},[ee,n,V]),{pointedItemIndex:el,pointedTrigger:eo,setPointedItem:er,handleKeyNavigation:ei}=w({isOpenPopup:X,multiple:s,optionsList:$,defaultPointedIndex:F,onTogglePopup:ee,onSelectedItem:et,onClearCallBack:()=>Y(e=>({...e,isDisplaced:!1}))}),ea=e=>{e.preventDefault(),er(e=>({...e,trigger:"mouse"})),Y(t=>{let n=void 0===t.mouseX&&void 0===t.mouseY||!(t.mouseX===e.screenX&&t.mouseY===e.screenY);return{...t,mouseX:e.screenX,mouseY:e.screenY,isDisplaced:n}})},es=(0,o.useCallback)(()=>{O(null),z(null),er({index:null,trigger:"key"}),U(0),Z(null),ee(!0),n(null)},[ee,n,er]);b({isOpenPopup:X,multiple:s,scrollValue:Q,selectedItemIndex:F,pointedItemIndex:el,pointedTrigger:eo,container:G,element:q});let eu=(0,o.useMemo)(()=>(null==V?void 0:V.length)&&!X?s?"":V[0].label:T,[V,T,s,X]),ec=(0,o.useMemo)(()=>{if(!(null==V?void 0:V.length))return T;let{length:e}=V;return s?1===e?V[0].label:"Выбрано (".concat(e,")"):X&&!T.length?V[0].label:T},[X,s,T,V]),ed={readOnly:!u,addonAfter:(0,l.jsx)("div",{className:(0,p.Z)(x().icon,{[x().iconRotate]:!u&&N}),children:N?(0,l.jsx)(d.IconFdsSearchO,{size:18}):(0,l.jsx)(d.IconFdsChevronDownO,{size:24})}),onChange:e=>{P(e.currentTarget.value)},autoFocus:N,inputType:"select",inputClear:()=>s?P(""):es(),value:eu,placeholder:ec,onFocus:()=>u&&R(!0),onClick:()=>{u?N||R(!0):R(e=>!e)},autoComplete:"off",innerRef:J,...E};(0,o.useEffect)(()=>{I.current?(O(_),Z(_?r.filter(e=>_.find(t=>String(t.value)===String(e.value))):null)):I.current=!0},[r,_]);let[ep,ev]=(0,o.useState)(0),[e_,ef]=(0,o.useState)(null),eA=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=()=>{S(()=>ev(window.scrollY))};return X?window.addEventListener("scroll",e,!1):window.removeEventListener("scroll",e,!1),()=>window.removeEventListener("scroll",e,!1)},[X]),(0,o.useEffect)(()=>{if(!eA.current||!J.current)return;let e=J.current.getBoundingClientRect(),t=eA.current.getBoundingClientRect(),n=window.innerHeight,l={top:"unset",right:"0",left:"0",bottom:"unset"},o=n-e.top-8-e.height;!(document.querySelectorAll("[data-portal]").length>0)&&(n<(t.height+8)*2+e.height?e.top>o:o<t.height)?l.bottom="70px":l.top=y,ef(l)},[X,ep]);let em=e_||{top:y,left:"0",right:"0"};return(0,o.useEffect)(()=>{X&&(null==k||k())},[X,k]),(0,o.useEffect)(()=>{null==t||t(T)},[T]),(0,l.jsxs)("div",{className:(0,p.Z)(x().select,A),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),onKeyDown:e=>ei(e),children:[(0,l.jsx)("div",{className:x().inputcontainer,children:(0,l.jsx)(g,{...ed})}),X&&(0,l.jsxs)("div",{className:x().popup,ref:eA,style:{maxHeight:"".concat(f,"px"),...em},"data-qa":j,children:[(0,l.jsxs)("div",{ref:G,className:x().popupContent,style:{maxHeight:"".concat(f-(s?100:20),"px")},children:[0===$.length&&(0,l.jsx)("div",{className:x().emptyList,children:a||"Нет совпадений"}),$.length>0&&(0,l.jsx)("ul",{className:x().optionsList,ref:W,children:$.map((e,t)=>{let n=!1;if(s)n=!!(null==V?void 0:V.find(t=>String(t.value)===String(e.value)));else if(D){var o;n=String(null===(o=D[0])||void 0===o?void 0:o.value)===String(e.value)}return(0,l.jsx)("li",{onMouseLeave:ea,onMouseEnter:e=>{e.stopPropagation(),H.isDisplaced&&er({index:t,trigger:"mouse"})},ref:el===t?q:void 0,className:(0,p.Z)(x().optionsItem,{[x().targetOptionsItem]:el===t,[x().selectedOptionsItem]:n,[x().removeLineHeight]:m}),"data-qa":L,children:(0,l.jsxs)("button",{onMouseDown:()=>et(e),children:[s&&(0,l.jsx)("span",{className:(0,p.Z)(x().checkbox,{[x().active]:n}),children:n&&(0,l.jsx)(d.IconFdsCheckO,{className:x().marker})}),e.label]})},e.value)})})]}),s&&!!(null==V?void 0:V.length)&&(0,l.jsxs)("div",{className:x().popupActions,children:[(0,l.jsx)(i.zx,{size:"xs",iconLeft:(0,l.jsx)(d.IconTrash,{}),shape:"icon",variant:"secondary",onClick:es}),(0,l.jsx)(i.zx,{size:"xs",onClick:en,label:"Применить (".concat(V.length,")")})]})]})]})});k.displayName="Desktop";var j=n(13466),L=n(49689),E=n(50197),I=n.n(E);let D=(0,o.memo)(e=>{let{onSearch:t,onChange:n=()=>null,options:r,optionsEmptyText:a,multiple:s=!1,search:u=!1,defaultOpen:c=!1,autoFocus:v=!1,value:_,className:f,removeLineHeight:A,onClose:m,onOpen:h,popupDataQa:w,itemDataQa:C,...x}=e,y=(0,o.useRef)(!1),[S,k]=(0,o.useState)(()=>null!=_?_:null),[E,D]=(0,o.useState)(""),[O,T]=(0,o.useState)(!1),[P,N]=(0,o.useState)(v||c),[R,B]=(0,o.useState)(c),[M,F]=(0,o.useState)(null),[z,V]=(0,o.useState)(()=>S?r.filter(e=>S.find(t=>String(t.value)===String(e.value))):null),[Z,Q]=(0,o.useState)(0),U=(0,o.useRef)(null),H=(0,o.useRef)(null),Y=(0,o.useRef)(null),X=(0,o.useMemo)(()=>P&&!!r.length,[P,r.length]),K=(0,o.useMemo)(()=>u&&E&&""!==E?r.filter(e=>-1!==String(e.label).toLocaleLowerCase().indexOf(E.toLocaleLowerCase())):r,[E,r,u]),J=(0,o.useCallback)(e=>{setTimeout(()=>N(t=>!e&&!t),300),T(t=>!e&&!t),B(t=>!e&&!t),R||(T(!1),N(!1),D("")),(null==Y?void 0:Y.current)&&s&&X&&Q(Y.current.scrollTop),e&&(null==m||m())},[R,s,X,m]),W=(0,o.useCallback)(()=>{setTimeout(()=>T(!0),600),N(!0),B(!0)},[]),q=(0,o.useCallback)(e=>{if(s)V(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t)return[e];let l=t.findIndex(t=>String(t.label).toLocaleLowerCase()===String(e.label).toLocaleLowerCase());return l>=0?([...t.slice(0,l),...t.slice(l+1)].length||(k(null),F(null),V(null),n(null)),[...t.slice(0,l),...t.slice(l+1)]):[...t,e]});else{let t=[],l=r.find(t=>String(t.value).trim().toLocaleLowerCase()===String(e.value).trim().toLocaleLowerCase());t=l?[l]:[];let o=r.findIndex(e=>{var n;return e.label.toLocaleLowerCase()===(null===(n=t[0])||void 0===n?void 0:n.label.toLocaleLowerCase())});F(o>=0?o:null),k([e]),V([e]),n(_&&e.value===_[0].value?null:t),D(""),setTimeout(()=>J(!0),300)}},[J,s,n,r,_]),G=(0,o.useCallback)(()=>{n(z),J(!0)},[J,n,z]),$=(0,o.useCallback)(()=>{k(null),F(null),Q(0),V(null),J(!0),n(null)},[J,n]);b({isMobile:!0,isOpenPopup:X,multiple:s,scrollValue:Z,selectedItemIndex:M,container:Y,element:H});let ee=(0,o.useMemo)(()=>(null==z?void 0:z.length)&&!X?s?"":z[0].label:E,[z,E,s,X]),et=(0,o.useMemo)(()=>(null==z?void 0:z.length)?1===z.length?z[0].label:s?"Выбрано (".concat(z.length,")"):"":"",[s,z]),en=(0,o.useMemo)(()=>{if(!(null==z?void 0:z.length))return E;let{length:e}=z;return 1===e?z[0].label:s?"Выбрано (".concat(e,")"):X&&!E.length?z[0].label:E},[X,s,E,z]);return(0,o.useEffect)(()=>{y.current?(k(_),V(_?r.filter(e=>_.find(t=>String(t.value)===String(e.value))):null)):y.current=!0},[r,_]),(0,o.useEffect)(()=>{X&&(null==h||h())},[X,h]),(0,o.useEffect)(()=>{null==t||t(E)},[E]),(0,l.jsxs)("div",{className:(0,p.Z)(I().select,f),children:[(0,l.jsx)("div",{className:(0,p.Z)(I().inputcontainer,I().inputButton),children:(0,l.jsx)(g,{readOnly:!u,addonAfter:(0,l.jsx)(d.IconFdsChevronDownO,{size:24,className:I().icon}),inputType:"button",inputClear:$,value:et,onClick:W,autoComplete:"off",type:"button",...x})}),X&&(0,l.jsx)(j.h,{children:(0,l.jsx)(L.j,{full:!0,className:I().popup,isOpen:R,onClose:()=>J(!0),children:(0,l.jsxs)("div",{className:I().window,"data-qa":w,children:[(0,l.jsx)("div",{className:I().safeAreaLine}),(0,l.jsx)("div",{className:(0,p.Z)(I().inputcontainer,I().inputPopup),children:(0,l.jsx)(g,{readOnly:!u,addonAfter:(0,l.jsx)("div",{className:I().icon,children:u?(0,l.jsx)(d.IconFdsSearchO,{size:18}):(0,l.jsx)(d.IconFdsChevronDownO,{size:24})}),onChange:e=>D(e.currentTarget.value),autoFocus:O,inputType:"select",inputClear:()=>D(""),value:ee,placeholder:en,onFocus:()=>T(!0),onClick:()=>!O&&T(!0),autoComplete:"off",...x})}),(0,l.jsxs)("div",{ref:Y,className:I().content,children:[0===K.length&&(0,l.jsx)("div",{className:I().empty,children:a||"Нет совпадений"}),K.length>0&&(0,l.jsx)("ul",{className:(0,p.Z)(I().optionsList,{[I().multipleList]:s}),ref:U,children:K.map((e,t)=>{let n=!1;if(s)n=!!(null==z?void 0:z.find(t=>String(t.value)===String(e.value)));else if(S){var o;n=String(null===(o=S[0])||void 0===o?void 0:o.value)===String(e.value)}return(0,l.jsx)("li",{ref:M===t?H:void 0,className:(0,p.Z)(I().optionsItem,{[I().selectedOptionsItem]:n,[I().removeLineHeight]:A}),"data-qa":C,children:(0,l.jsxs)("button",{onMouseDown:()=>q(e),children:[s&&(0,l.jsx)("span",{className:(0,p.Z)(I().checkbox,{[I().active]:n}),children:n&&(0,l.jsx)(d.IconFdsCheckO,{className:I().marker})}),(0,l.jsx)("p",{children:e.label})]})},e.value)})})]}),s&&!!(null==z?void 0:z.length)&&(0,l.jsxs)("div",{className:I().popupActions,children:[(0,l.jsx)(i.zx,{iconLeft:(0,l.jsx)(d.IconTrash,{}),shape:"icon",variant:"secondary",onClick:$}),(0,l.jsx)(i.zx,{onClick:G,label:"Применить (".concat(z.length,")")})]})]})})})]})});D.displayName="Mobile";let O=(0,o.memo)(e=>{let{isMobile:t,...n}=e,[r,i]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{i(!0)},[]),r)?t?(0,l.jsx)(D,{...n}):(0,l.jsx)(k,{...n}):(0,l.jsx)(D,{...n})});function T(e){let{control:t,name:n,rules:i,saveOnlyValue:a=!1,options:s,multiple:u,...c}=e,d=(0,o.useMemo)(()=>new Map((null==s?void 0:s.map(e=>[e.value,e]))||[]),[s]);return(0,l.jsx)(r.Qr,{control:t,name:n,rules:i,render:e=>{var t;let{field:n,fieldState:o}=e,r=(()=>{if(!a)return n.value;if(null===n.value||""===n.value)return null;if(u)return n.value.map(e=>d.get(e)).filter(e=>void 0!==e);let e=n.value,t=d.get(e);return t?[t]:null})();return(0,l.jsx)(O,{state:(null===(t=o.error)||void 0===t?void 0:t.message)?"error":void 0,value:r,multiple:u,options:s,...c,onChange:e=>{var t,l;if(null===e){n.onChange(u?[]:void 0),null==c||null===(l=c.onChange)||void 0===l||l.call(c,null,(null==c?void 0:c.label)||"");return}if(a){let t=e.map(e=>e.value);n.onChange(u?t:t[0])}else n.onChange(e);null==c||null===(t=c.onChange)||void 0===t||t.call(c,e,(null==c?void 0:c.label)||"")}})}})}O.displayName="UiSelect"},13466:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var l=n(57437),o=n(2265),r=n(54887);let i=e=>{let{children:t,id:n="portal-root"}=e,[i,a]=(0,o.useState)(null);return(0,o.useEffect)(()=>{var e,t,l;let o=null===(e=document)||void 0===e?void 0:e.getElementById(n);if(o)a(o);else{let e=null===(t=document)||void 0===t?void 0:t.createElement("div");return null===(l=document)||void 0===l||l.body.appendChild(e),a(e),()=>{var t;null===(t=document)||void 0===t||t.body.removeChild(e)}}},[]),(0,l.jsx)(l.Fragment,{children:i&&(0,r.createPortal)(t,i)})}},84740:function(e,t,n){"use strict";n.d(t,{O:function(){return a}});var l=n(57437),o=n(54365),r=n(26703),i=n.n(r);let a=e=>{let{className:t}=e;return(0,l.jsx)("div",{className:(0,o.Z)(i().skeleton,t)})}},23877:function(e,t,n){"use strict";n.d(t,{K:function(){return o}});var l=n(2265);function o(e){let[t,n]=(0,l.useState)({data:null,isFetching:!1,isError:!1,error:null}),o=(0,l.useCallback)(async function(){for(var t=arguments.length,l=Array(t),o=0;o<t;o++)l[o]=arguments[o];n(e=>({...e,isFetching:!0,isError:!1,error:null}));try{let t=await e(...l);return n(e=>({...e,data:t,isFetching:!1})),t}catch(e){return n(t=>({...t,isFetching:!1,isError:!0,error:e instanceof Error?e:Error("Unknown error")})),null}},[e]),r=(0,l.useCallback)(()=>{n({data:null,isFetching:!1,isError:!1,error:null})},[]);return{...t,execute:o,reset:r}}},17868:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var l=n(2265);let o=e=>{let t=(0,l.useRef)(null),n=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{if(n.current===e)return;n.current=e;let l=t.current,o=window.innerWidth-document.documentElement.clientWidth;e&&o&&!document.body.style.top&&(window.prevScrollPosition=window.scrollY||window.pageYOffset),e&&o&&(document.documentElement.style.setProperty("overflow-y","scroll"),document.body.classList.toggle("scroll-disable-windows",!0),document.body.style.setProperty("width","calc(100vw - ".concat(o,"px)")),document.body.style.setProperty("top","-".concat(window.prevScrollPosition,"px"))),e&&!o&&(document.body.style.setProperty("overflow","hidden"),document.body.style.setProperty("height","100vw")),e&&l&&l.setAttribute("data-portal","");let r=document.querySelectorAll("[data-portal]").length>1;return e||r||(document.body.classList.toggle("scroll-disable-windows",!1),document.body.style.removeProperty("overflow"),document.body.style.removeProperty("height"),document.body.style.removeProperty("width"),document.body.style.removeProperty("top")),e||r||void 0===window.prevScrollPosition||(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0),!e&&l&&l.removeAttribute("data-portal"),()=>{document.body.classList.toggle("scroll-disable-windows",!1),document.body.style.removeProperty("overflow"),document.body.style.removeProperty("height"),void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)}},[e]),t}},73564:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var l=n(2265),o=n(77493);let r=e=>{let{opened:t}=e,[n,r]=(0,l.useState)(!1),i=(0,l.useRef)(null),a=(0,l.useRef)(!1);return(0,l.useEffect)(()=>(t&&!a.current?(a.current=!0,r(!0)):!t&&a.current&&(i.current=setTimeout(()=>{a.current=!1,r(!1)},o.z)),()=>{i.current&&clearTimeout(i.current)}),[t]),{mounted:n}}},7843:function(e,t,n){"use strict";n.d(t,{L:function(){return l}});let l="DEFAULT"},91638:function(e,t,n){"use strict";var l,o;n.d(t,{e:function(){return l}}),(o=l||(l={})).TEXT="text",o.BOOLEAN="boolean",o.GAP="gap",o.LINK="link",o.LIST="list",o.CUSTOM="custom"},52460:function(e,t,n){"use strict";n.d(t,{y:function(){return l}});let l={DEBIT_CARDS:"debetovye_karty"}},74530:function(e,t,n){"use strict";n.d(t,{iJ:function(){return c}});var l,o,r=n(52460),i=n(83583),a=n(27669);(l=o||(o={})).link="link",l.button="button",l.popup="popup",l.filterCatalog="filter_catalog",l.utm="utm";let s=e=>{let{eventCategory:t,eventAction:n,eventActionText:l="",eventLabel:o,eventValue:r,url:s}=e,u="boolean"==typeof r?r?"on":"off":r,c="filter_catalog"!==n?/[а-я]/i.test(l.toLowerCase()):"string"!=typeof o||/[а-я]/i.test(o.toLowerCase()),d="filter_catalog"!==n?{event:"data-event",eventCategory:t,eventAction:({link:"click_link",button:"click_button_",popup:"show_pop_up_",utm:"save_utm"})[n]+(c?l:(0,a.b)(l)),eventLabel:o,eventValue:u,url:s}:{event:"data-event",eventAction:t,eventCategory:n,eventLabel:"string"==typeof o?c?o:(0,a.b)(o):o,eventValue:u,url:s};(0,i.lQ)(d)},u=e=>{if(null==e)return"";if("string"==typeof e)return e;if("number"==typeof e)return String(e);if("object"==typeof e){if("label"in e&&e.label)return String(e.label);if("title"in e&&e.title)return String(e.title);if("value"in e&&void 0!==e.value)return String(e.value);if("id"in e&&void 0!==e.id)return String(e.id)}return""},c={debit:{pushFilterDataLayer:(e,t)=>{(0,i.lQ)({event:"data-event",eventAction:r.y.DEBIT_CARDS,eventCategory:"filter_catalog",eventLabel:(0,a.b)(e),eventValue:t})},clickButtonDataLayer:(e,t)=>{let n=null!=t?t:"";if("string"==typeof e)n=e;else{var l;n=null!==(l=e.currentTarget.textContent)&&void 0!==l?l:""}(0,i.lQ)({event:"data-event",eventAction:"click_button_".concat((0,a.b)(n)),eventCategory:r.y.DEBIT_CARDS})},clickDebitCardInfoButton:e=>{s({eventCategory:r.y.DEBIT_CARDS,eventAction:"popup",eventActionText:null==e?void 0:e.title,eventLabel:String(null==e?void 0:e.id)})},clickDebitCard:e=>{s({eventCategory:r.y.DEBIT_CARDS,eventAction:"link",eventActionText:null==e?void 0:e.title,eventLabel:String(null==e?void 0:e.id),url:e.url})}},getOptionsLabels:e=>null==e?"":Array.isArray(e)?e.map(e=>u(e)).filter(Boolean).join(","):u(e)}},83583:function(e,t,n){"use strict";n.d(t,{lQ:function(){return o}});var l=n(30631);let o=(e,t)=>{let n=sessionStorage.getItem("pushedEvents"),o=n?JSON.parse(n):[];e.event=e.event?e.event:"data-event",e.eventValue=e.eventValue?e.eventValue:null,e.eventAction=e.eventAction&&"string"==typeof e.eventAction?e.eventAction.toLowerCase().replaceAll(/[ \xa0]/g,"_"):"",e.eventLabel=e.eventLabel&&"string"==typeof e.eventLabel?e.eventLabel.toLowerCase().replaceAll(/[ \xa0]/g,"_"):"";let r=o.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!r){if(t){let t={...e};t.url=window.location.pathname,o.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(o))}(0,l.AB)(e)}}},27669:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});let l={а:"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"},o=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();if(t in l){let n=l[t];return t===e?n:n.charAt(0).toUpperCase()+n.slice(1)}return e})},43051:function(e){e.exports={content:"AdaptiveDrawer_content__lEIyk",mobilePopup:"AdaptiveDrawer_mobilePopup__UuhES",contentInner:"AdaptiveDrawer_contentInner__9Nsfj"}},78582:function(e){e.exports={overlay:"ClickOutside_overlay__YQi9L",open:"ClickOutside_open__bmtsz",fade:"ClickOutside_fade__io1xj",close:"ClickOutside_close__AC078","fade-out":"ClickOutside_fade-out__wJ_pJ"}},47171:function(e){e.exports={container:"DrawerContent_container__rR8LI",open:"DrawerContent_open__M84fe","slide-up":"DrawerContent_slide-up__PxR16",close:"DrawerContent_close__Cyxv9","slide-out":"DrawerContent_slide-out__U3MRA",header:"DrawerContent_header__Ur_YT",rowHeader:"DrawerContent_rowHeader__2Z3R3",title:"DrawerContent_title__QG5Cm",center:"DrawerContent_center__k_OfP",right:"DrawerContent_right__5FHfz",left:"DrawerContent_left__J0wEA",controlContainer:"DrawerContent_controlContainer__FAnIq",content:"DrawerContent_content__ECzp5",footer:"DrawerContent_footer__SVPa7"}},71380:function(e){e.exports={footer:"DrawerFooter_footer__0AgTl",hasScroll:"DrawerFooter_hasScroll__Qk185"}},61753:function(e){e.exports={window:"DrawerLayout_window__wpjeD"}},15397:function(e){e.exports={inputRoot:"Input_inputRoot__OpQtf",wrapperInput:"Input_wrapperInput__W_Fgs",big:"Input_big__6tH9J",middle:"Input_middle__EejLc",hasValue:"Input_hasValue__vNnNi",label:"Input_label__appbZ",addoneAfter:"Input_addoneAfter__SKvFS",addoneBefore:"Input_addoneBefore__c2BkI",gray:"Input_gray__3TOAb",success:"Input_success__qKGYc",error:"Input_error__dlwf5",white:"Input_white__QAtmB",isFocused:"Input_isFocused__ln1w8",disabled:"Input_disabled__dXsOf",readOnly:"Input_readOnly__VY57j",withRange:"Input_withRange__juSxl",buttonClear:"Input_buttonClear__jgpiV",deleteIcon:"Input_deleteIcon__imUCt",inputContainer:"Input_inputContainer__WDbYX",cover:"Input_cover__peS2N",input:"Input_input__ZcnKW",inputCenter:"Input_inputCenter__Vd7jO",maskPlaceholder:"Input_maskPlaceholder__jH41P",maskPlaceholderCenter:"Input_maskPlaceholderCenter__I7p_d",maskPlaceholderHide:"Input_maskPlaceholderHide__BZ0kM",controlContainer:"Input_controlContainer__qWVWN",message:"Input_message__g6rjt",successMessage:"Input_successMessage__o7JXJ",errorMessage:"Input_errorMessage__nen8r",defaultMessage:"Input_defaultMessage__P9LQz",range:"Input_range___mksh"}},16565:function(e){e.exports={mobilePopup:"MobilePopup_mobilePopup__NCFCK",content:"MobilePopup_content__B5iF0",contentFull:"MobilePopup_contentFull__DBrvo",contentLine:"MobilePopup_contentLine__eykLy",contentContainer:"MobilePopup_contentContainer___ZbOq",min:"MobilePopup_min__D0Hml",contentTransition:"MobilePopup_contentTransition__7_kGL",contentTransitionOpen:"MobilePopup_contentTransitionOpen__GDGpr",title:"MobilePopup_title__IEYZk",closeContainer:"MobilePopup_closeContainer__HSRUL",closeButton:"MobilePopup_closeButton__Bse_M",smallContentContainer:"MobilePopup_smallContentContainer__8jHeS"}},53582:function(e){e.exports={footer:"MobileModalFooter_footer__5dRCK",footerWithoutShadow:"MobileModalFooter_footerWithoutShadow__zHKVO"}},38019:function(e){e.exports={select:"Select_select__0ooqU",inputcontainer:"Select_inputcontainer__BuU_G",popup:"Select_popup__9utOI",popupContent:"Select_popupContent__b24XJ",emptyList:"Select_emptyList__ZelL1",optionsList:"Select_optionsList__UYSue",optionsItem:"Select_optionsItem__ZoWXt",removeLineHeight:"Select_removeLineHeight__kS_JM",checkbox:"Select_checkbox__ktQ17",active:"Select_active__vgO83",marker:"Select_marker__oTsN9",targetOptionsItem:"Select_targetOptionsItem__uKptc",selectedOptionsItem:"Select_selectedOptionsItem__uJeIB",icon:"Select_icon__YG2wf",popupActions:"Select_popupActions__KpN4D"}},50197:function(e){e.exports={select:"Select_select__wUGZD",popup:"Select_popup__2HKJ3",window:"Select_window__WitRz",safeAreaLine:"Select_safeAreaLine__qbM3u",inputcontainer:"Select_inputcontainer__Rodfv",inputPopup:"Select_inputPopup__SPh8Y",inputButton:"Select_inputButton__mq_GY",content:"Select_content__ygf94",empty:"Select_empty__5BzIj",optionsList:"Select_optionsList__XCV9b",optionsItem:"Select_optionsItem__yasBX",checkbox:"Select_checkbox__82QZr",active:"Select_active__zYX1a",marker:"Select_marker__xyw_M",multipleList:"Select_multipleList__uv_Uj",selectedOptionsItem:"Select_selectedOptionsItem__wHDr_",popupActions:"Select_popupActions__sF73Z"}},4946:function(e){e.exports={titleMobile:"DetailsTable_titleMobile__we1_e",titleDesktop:"DetailsTable_titleDesktop__2AaM8",contentTitle:"DetailsTable_contentTitle__O0hJ7",logoContainer:"DetailsTable_logoContainer__qhNWT",row:"DetailsTable_row__0Jl3b",valueText:"DetailsTable_valueText__jAmo3",columnTitle:"DetailsTable_columnTitle__2N28I",columnValue:"DetailsTable_columnValue__ffnVk"}},47748:function(e){e.exports={wrapper:"BooleanCellDetailsTableView_wrapper__Lxkn3"}},54398:function(e){e.exports={wrapper:"ListCellDetailsTableView_wrapper__LnEjR"}},14950:function(e){e.exports={wrapper:"TextCellDetailsTableView_wrapper__sY0Lp",comment:"TextCellDetailsTableView_comment__8JHGn"}},16868:function(e){e.exports={titleMobile:"RowDetailsTableView_titleMobile__Ybzkz",titleDesktop:"RowDetailsTableView_titleDesktop__CQJCk",contentTitle:"RowDetailsTableView_contentTitle__xMEYh",logoContainer:"RowDetailsTableView_logoContainer__ZeNsz",row:"RowDetailsTableView_row__ypX_Q",columnTitle:"RowDetailsTableView_columnTitle__76qlA",columnValue:"RowDetailsTableView_columnValue__0_A65"}},69286:function(e){e.exports={container:"FaqLinkList_container__IbV_r",choice:"FaqLinkList_choice__sIjKt",choiceOption:"FaqLinkList_choiceOption__m4t8n"}},26703:function(e){e.exports={skeleton:"Skeleton_skeleton__K4SZS",move:"Skeleton_move__XQHSq"}},33114:function(e){e.exports={container:"TextOverflow_container__puWoy",containerOverflow:"TextOverflow_containerOverflow__m3OAq",containerOpen:"TextOverflow_containerOpen__PcOja",button:"TextOverflow_button__a720J"}},64881:function(e,t){"use strict";t.Z={src:"/debit-cards/_next/static/media/debitCard.031523cb.jpg",height:214,width:340,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wgARCAAFAAgDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAABpwn/xAAVEAEBAAAAAAAAAAAAAAAAAAABMf/aAAgBAQABBQKH/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPwF//8QAFBABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAGPwJ//8QAFhABAQEAAAAAAAAAAAAAAAAAAQAR/9oACAEBAAE/IV0v/9oADAMBAAIAAwAAABD3/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPxB//8QAFxABAQEBAAAAAAAAAAAAAAAAAREAIf/aAAgBAQABPxBkCsr1u//Z",blurWidth:8,blurHeight:5}},97916:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var l,o=n(40257);let r={APP_PREFIX:"debit-cards",APP_VERSION:null!==(l=o.env.APP_VERSION)&&void 0!==l?l:String(Math.random()).slice(2),REDIS_PORT:Number(o.env.REDIS_PORT),REDIS_HOST:o.env.REDIS_HOST,REDIS_PASSWORD:o.env.REDIS_PASSWORD,CACHE_TTL:Number(o.env.REDIS_TTL)||300}}}]);