@redneckz/wildless-cms-uni-blocks 0.14.581 → 0.14.583
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/api/RetailApi/RetailApi.d.ts +9 -0
- package/bundle/api/RetailApi/RetailApiTypes.d.ts +83 -0
- package/bundle/api/RetailApi/utils/getUpdateUserProfile.d.ts +3 -0
- package/bundle/api/RetailApi/utils/getUpdateUserTask.d.ts +2 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +278 -37
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +6 -0
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -0
- package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -0
- package/dist/api/RetailApi/RetailApi.d.ts +9 -0
- package/dist/api/RetailApi/RetailApi.js +29 -0
- package/dist/api/RetailApi/RetailApi.js.map +1 -0
- package/dist/api/RetailApi/RetailApiTypes.d.ts +83 -0
- package/dist/api/RetailApi/RetailApiTypes.js +2 -0
- package/dist/api/RetailApi/RetailApiTypes.js.map +1 -0
- package/dist/api/RetailApi/utils/getUpdateUserProfile.d.ts +3 -0
- package/dist/api/RetailApi/utils/getUpdateUserProfile.js +27 -0
- package/dist/api/RetailApi/utils/getUpdateUserProfile.js.map +1 -0
- package/dist/api/RetailApi/utils/getUpdateUserTask.d.ts +2 -0
- package/dist/api/RetailApi/utils/getUpdateUserTask.js +43 -0
- package/dist/api/RetailApi/utils/getUpdateUserTask.js.map +1 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +9 -23
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +6 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +70 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -0
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +11 -0
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -0
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -0
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -11
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/api/RetailApi/RetailApi.d.ts +9 -0
- package/lib/api/RetailApi/RetailApi.js +27 -0
- package/lib/api/RetailApi/RetailApi.js.map +1 -0
- package/lib/api/RetailApi/RetailApiTypes.d.ts +83 -0
- package/lib/api/RetailApi/RetailApiTypes.js +2 -0
- package/lib/api/RetailApi/RetailApiTypes.js.map +1 -0
- package/lib/api/RetailApi/utils/getUpdateUserProfile.d.ts +3 -0
- package/lib/api/RetailApi/utils/getUpdateUserProfile.js +24 -0
- package/lib/api/RetailApi/utils/getUpdateUserProfile.js.map +1 -0
- package/lib/api/RetailApi/utils/getUpdateUserTask.d.ts +2 -0
- package/lib/api/RetailApi/utils/getUpdateUserTask.js +40 -0
- package/lib/api/RetailApi/utils/getUpdateUserTask.js.map +1 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +10 -24
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +6 -0
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +67 -0
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -0
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -0
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -0
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -0
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -11
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/bundle/api/RetailApi/RetailApi.d.ts +9 -0
- package/mobile/bundle/api/RetailApi/RetailApiTypes.d.ts +83 -0
- package/mobile/bundle/api/RetailApi/utils/getUpdateUserProfile.d.ts +3 -0
- package/mobile/bundle/api/RetailApi/utils/getUpdateUserTask.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +278 -37
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +6 -0
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -0
- package/mobile/dist/api/RetailApi/RetailApi.d.ts +9 -0
- package/mobile/dist/api/RetailApi/RetailApi.js +29 -0
- package/mobile/dist/api/RetailApi/RetailApi.js.map +1 -0
- package/mobile/dist/api/RetailApi/RetailApiTypes.d.ts +83 -0
- package/mobile/dist/api/RetailApi/RetailApiTypes.js +2 -0
- package/mobile/dist/api/RetailApi/RetailApiTypes.js.map +1 -0
- package/mobile/dist/api/RetailApi/utils/getUpdateUserProfile.d.ts +3 -0
- package/mobile/dist/api/RetailApi/utils/getUpdateUserProfile.js +27 -0
- package/mobile/dist/api/RetailApi/utils/getUpdateUserProfile.js.map +1 -0
- package/mobile/dist/api/RetailApi/utils/getUpdateUserTask.d.ts +2 -0
- package/mobile/dist/api/RetailApi/utils/getUpdateUserTask.js +43 -0
- package/mobile/dist/api/RetailApi/utils/getUpdateUserTask.js.map +1 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +9 -23
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +6 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +70 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -0
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +11 -0
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -11
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/api/RetailApi/RetailApi.d.ts +9 -0
- package/mobile/lib/api/RetailApi/RetailApi.js +27 -0
- package/mobile/lib/api/RetailApi/RetailApi.js.map +1 -0
- package/mobile/lib/api/RetailApi/RetailApiTypes.d.ts +83 -0
- package/mobile/lib/api/RetailApi/RetailApiTypes.js +2 -0
- package/mobile/lib/api/RetailApi/RetailApiTypes.js.map +1 -0
- package/mobile/lib/api/RetailApi/utils/getUpdateUserProfile.d.ts +3 -0
- package/mobile/lib/api/RetailApi/utils/getUpdateUserProfile.js +24 -0
- package/mobile/lib/api/RetailApi/utils/getUpdateUserProfile.js.map +1 -0
- package/mobile/lib/api/RetailApi/utils/getUpdateUserTask.d.ts +2 -0
- package/mobile/lib/api/RetailApi/utils/getUpdateUserTask.js +40 -0
- package/mobile/lib/api/RetailApi/utils/getUpdateUserTask.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +10 -24
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +6 -0
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +67 -0
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -0
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -0
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -11
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/src/api/RetailApi/RetailApi.ts +51 -0
- package/mobile/src/api/RetailApi/RetailApiTypes.ts +91 -0
- package/mobile/src/api/RetailApi/utils/getUpdateUserProfile.ts +44 -0
- package/mobile/src/api/RetailApi/utils/getUpdateUserTask.ts +46 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +11 -26
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +75 -0
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -0
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +35 -14
- package/package.json +2 -2
- package/src/api/RetailApi/RetailApi.ts +51 -0
- package/src/api/RetailApi/RetailApiTypes.ts +91 -0
- package/src/api/RetailApi/utils/getUpdateUserProfile.ts +44 -0
- package/src/api/RetailApi/utils/getUpdateUserTask.ts +46 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +1 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +11 -26
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +75 -0
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -0
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +5 -4
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +35 -14
- package/bundle/components/ApplicationLeadForm/getFormatData.d.ts +0 -2
- package/bundle/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.d.ts +0 -13
- package/dist/components/ApplicationLeadForm/getFormatData.d.ts +0 -2
- package/dist/components/ApplicationLeadForm/getFormatData.js +0 -13
- package/dist/components/ApplicationLeadForm/getFormatData.js.map +0 -1
- package/dist/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.d.ts +0 -13
- package/dist/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js +0 -30
- package/dist/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js.map +0 -1
- package/lib/components/ApplicationLeadForm/getFormatData.d.ts +0 -2
- package/lib/components/ApplicationLeadForm/getFormatData.js +0 -10
- package/lib/components/ApplicationLeadForm/getFormatData.js.map +0 -1
- package/lib/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.d.ts +0 -13
- package/lib/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js +0 -27
- package/lib/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js.map +0 -1
- package/mobile/bundle/components/ApplicationLeadForm/getFormatData.d.ts +0 -2
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.d.ts +0 -13
- package/mobile/dist/components/ApplicationLeadForm/getFormatData.d.ts +0 -2
- package/mobile/dist/components/ApplicationLeadForm/getFormatData.js +0 -13
- package/mobile/dist/components/ApplicationLeadForm/getFormatData.js.map +0 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.d.ts +0 -13
- package/mobile/dist/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js +0 -30
- package/mobile/dist/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js.map +0 -1
- package/mobile/lib/components/ApplicationLeadForm/getFormatData.d.ts +0 -2
- package/mobile/lib/components/ApplicationLeadForm/getFormatData.js +0 -10
- package/mobile/lib/components/ApplicationLeadForm/getFormatData.js.map +0 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.d.ts +0 -13
- package/mobile/lib/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js +0 -27
- package/mobile/lib/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.js.map +0 -1
- package/mobile/src/components/ApplicationLeadForm/getFormatData.tsx +0 -17
- package/mobile/src/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.tsx +0 -36
- package/src/components/ApplicationLeadForm/getFormatData.tsx +0 -17
- package/src/ui-kit/VerifyPhoneDialog/submitVerifyPhoneForm.tsx +0 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:O,isHash:j,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:_,hasPrefix:E});const F="/api/",$=`${F}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),j(t),[z.CDN,F].some((e=>E(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${$}/${t}/attachment`;const l=t?.startsWith("/");return _(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},q=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,u=U(d)(_(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:h(Y(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:u,xlinkHref:u})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(X.SITE_URL),t=V(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(l,e||"/");l&&!s&&O(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[l?o("div",{className:h(r,se[i]),children:l}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),fe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=we(),v=V(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:De(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Oe=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),je=d((({isTabularBenefits:e,...t})=>o(e?Oe:Ae,{...t}))),_e=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Le(n))}):null,Le=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Fe(a,r),d=Fe(i,r);return l||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:$e({...a,iconVersion:c}),appendRight:$e({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Fe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},$e=e=>_e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(qe)}):null)),qe=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ye)}):null)),Ye=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(je,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Ke[i]}):null,T,x?.length?o(We,{priceList:x}):null,Je(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ut=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ut,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},ft=e=>e?.replace(/[^+\d]/g,"");function bt(){return{send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:n,...Nt(l,g),...wt(i,g),...yt(a),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...kt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});if(!e?.ok)return null;return await e.json()}catch(e){return null}}}}const yt=e=>e?{phone:ft(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},Nt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:ft(e)}:{},St=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},Ct="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ct)||"";return e&&globalThis.sessionStorage?.setItem(Ct,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Pt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Pt.if=e=>new Mt(void 0,e);class Mt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Mt(this,e)}then(e){return new Mt(this.parent,this.predicate,e)}else(e){return Bt([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Vt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Dt(t?.target)?.(n)}}},Dt=Pt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function zt(){return zt._impl()}zt._impl=()=>({forwardQuery:Vt}),zt.setup=e=>{zt._impl=e};const At=e=>e,Ot=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return jt(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[h,u]=l({}),p=i(((e,t)=>{const{parse:n=At,format:l=At}=t||{};return{value:l(s[e]),isDirty:d||h[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),u((t=>({...t,[e]:!0})))}}}),[c,d,h]),g=i((e=>{c(e),u(e)}),[]),x=i((()=>{c(e),m(!1),u({})}),[e]),f=i((e=>{e.preventDefault(),t?x():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(h).some(Boolean),field:p,update:g,reset:x,onSubmit:f}]},jt=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),_t=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Et=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Lt=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ft=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],$t="/api/v1/outservice/outserviceregions",Ut=e=>"OUTSERVICE"===e?$t:void 0,Wt=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),qt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Ht="appearance-none w-5 h-5 border-solid flex-none",Yt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Kt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(qt,{paths:Yt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",Gt(l)),onClick:s,children:[o("div",{className:h(Ht,"m-0",a?"rounded-full border-2":Zt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Jt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Xt(n)]})})})),Xt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Gt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Jt=(e=!1)=>e?"radio":"checkbox",Zt=(e=!1)=>h("rounded border",{"bg-primary-main":e}),Qt=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(Kt,{text:t,value:n,disabled:a,onChange:r},l),Wt(i)]})));function en(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function tn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function nn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return tn(globalThis.document,"click",n),t}const ln=()=>{},an="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",rn=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,sn=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=on(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[rn(d),N?o("textarea",{className:h("block resize-y min-h-24",S,T),id:h("textarea",n),name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:h("h-14",S,C,T),ref:w,id:n,name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),on=e=>e?an:"border-error",cn=e=>(e?.suggestions||[]).map((e=>({...e,processedValue:e?.value}))),dn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"}},mn=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),hn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e.processedValue),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function un({isOpen:e,value:t,name:n,onChange:c}){const d=s(t),m=s(t),[h,u]=l([]),p=mn(),g=dn[n],x=i((()=>{m.current=t,p.close()}),[t]),f=i((e=>{x(),m.current=e,c&&c(e)}),[x,c]),b=s(null),y=r((()=>async e=>{if(!g)return;const t=await(e=>{const{url:t,query:n,requestData:l={}}=e;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:n})}).then((e=>e.json())).then(cn)})({url:g.url,requestData:{...g?.requestData},query:e});t?.length&&u(t)}),[]),v=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(y,300)),[y]);return a((()=>{if(!e||!b.current||m.current===t)return void x();const n=b.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&d.current!==t&&(v(t),d.current=t),p.update(o(hn,{options:h,value:t,onChange:f}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,h,t,f]),b}const pn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=ln,onBlur:s,isTextarea:d,type:m,name:u="",dadata:p=!1})=>{const[g,{setFalse:x,setTrue:f}]=en(),b=nn(x),y=un({isOpen:g&&p,name:u,value:n,onChange:r});return c("div",{className:h("shrink-0 w-full",e),ref:b,onBlur:x,onFocus:f,children:[o("div",{ref:y,children:o(sn,{type:m||"text","aria-label":t,label:gn(i,t),valid:Boolean(!a),value:n,onChange:r,onBlur:s,isTextarea:d,placeholder:xn(l,i,t)})}),Wt(a)]})})),gn=(e,t)=>t&&e?`${t}*`:t,xn=(e,t,n)=>t&&!n?`${e}*`:e,fn=e=>e?.text||e?.key||"",bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,yn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:bn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:fn(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const vn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:u="",isSearch:p=!1,iconVersion:g="black",onChange:x,disabled:f})=>{const[b,{setFalse:y,setTrue:v}]=en(),[N,w]=l(""),k=f||0===n.length,S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=mn(),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=nn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(yn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}({isOpen:b,options:n,value:r,query:N,onChange:x,onClose:C,iconVersion:g});return c("div",{className:h("space-y-xs",e),children:[rn(t),c("div",{className:h("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",wn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:fn(r)||u}),Nn(S,g)]}),p&&S?o("div",{className:h("absolute top-0 w-full z-20"),children:o(sn,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),Nn=(e,t)=>o(q,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),wn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),kn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(vn,{...l,valid:!n,label:l?.errors?`${t}*`:t}),Wt(n)]}))),Sn=e=>!e?.length,Cn=e=>t=>n=>e(n)?[]:[t],Tn="Некорректно заполненное поле",In=Cn((e=>null!=e&&""!==e))(Tn),Bn=Cn((e=>e?.key&&""!==e?.key))(Tn),Pn=Cn((e=>"string"==typeof e&&e.length>1))(Tn),Mn=Cn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Tn),Rn=(Vn=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Cn((e=>"string"==typeof e&&Vn.test(e))))(Tn);var Vn;const Dn=Cn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),zn={typeForm:In,surname:Pn,name:Pn,region:Bn,addressBranch:Bn,phone:Rn,secondaryPhone:Rn,birthday:In,education:In,housing:In,employment:In,organization:In,amountWorkers:In,employerActivities:In,employerOrganization:In,positionOrganization:In,email:In,fullName:Pn,inn:Mn,legalForm:In,organizationName:In,generalSeniority:In,lastJobExperience:In,experience5Years:In,jobsNumber:In,beginDate:In,fullAddress:In,partnerComments:In,collectionCount:In,comment:In,acquiringType:Bn,feedbackMethod:Bn,serviceType:Bn,serviceDirection:Bn,meetingDay:In,product:In,localities:In,consentDataProcessing:Dn,annualRevenue:In,consentToReceiveMaterials:Dn,processPersonalDataLeadFlg:Dn,consentProviderFlg:Dn,consentPhotoFlg:Dn,consentPfrFlg:Dn,consentAssignmentClaimsFlg:Dn,consentCollectionFlg:Dn,consentInformFlg:Dn},An=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,zn?.[e]])))},On=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},jn=(e,t,n=!1)=>n?On(e,t):e,_n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],En=d((({field:e,input:t})=>o(kn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:_n,...jn(e("acquiringType"),zn.acquiringType,t?.required)}))),Ln=(e="")=>Boolean("trade"===e||"all"===e),Fn=e=>null!=e,$n=new Map,Un=e=>Boolean(e?.every((e=>Array.isArray(e)?Un(e):!e||"string"==typeof e))),Wn=e=>Un(e)?e.toString():"";function qn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Hn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Fn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=$n)=>n=>{const l=Wn(n),a=t.get(l);if(l&&Fn(a))return a;const i=e(...n);return l&&Fn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Hn(e){return Array.isArray(e)?e:e instanceof Function?Hn(e()):[e]}const Yn=[];const Kn=async e=>await it(e,{method:"GET"})||Yn;function Xn(){const{data:e}=qn("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const Gn=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?Xn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=qn(e?`/api/v1/branches?regionCode=${e}`:null,Kn);return t||Yn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(kn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...jn(e("addressBranch"),zn.addressBranch,t?.required),isSearch:!0})})),Jn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},Zn=(e,t,n)=>Math.max(t,Math.min(e,n));function Qn(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function el({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=Qn(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const tl=1,nl=100,ll=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:tl),max:s=(a.length?a.length-1:nl),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=Jn(e,{normalize:(e=0)=>a.length?al(a)(e):Zn(e,r,s),format:Ue()}),x=i((e=>{p&&p(Qn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",an,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),el({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),il(l)]})})),al=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),il=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),rl=["От 1 000 ₽","До 1 000 000 000 ₽"],sl=d((({field:e})=>o(ll,{title:"Сумма, ₽",items:rl,min:1e3,max:1e9,...e("amount")}))),ol=e=>{const{data:t,error:n}=qn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,cl);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},cl=async e=>await it(e,{method:"POST"})||[],dl=ht((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(kn,{placeholder:"Выберите из списка",label:n,options:ml(i),...jn(e(l),zn[l],a?.required)})})),ml=e=>(e??[]).map((e=>({key:e,value:e}))),hl=d((({field:e,input:t})=>{const{data:n}=ol("EMPLOYEES_NUMBER");return o(dl,{field:e,source:n||[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),ul=d((({field:e,input:t})=>o(pn,{label:"Годовая выручка, ₽",...jn(e("annualRevenue"),zn.annualRevenue,t?.required)}))),pl=d((({field:e})=>o(pn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),gl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=xl(t,e),c=fl(t,i,r);h.push(o("td",{children:o("div",{className:bl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},xl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),bl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],vl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=ln,setValue:d=ln})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:h,totalDays:u}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:yl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:gl({firstDayOfWeek:h,today:e,totalDays:u,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Nl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],wl=Nl.map((e=>({key:e}))),kl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Sl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Cl={className:"min-w-32",iconVersion:"black",isBorder:!1},Tl=d((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=en(!1),[p,g]=l(n?.getMonth()||(new Date).getMonth()),[x,f]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=nn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Nl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:wl,yearsOptions:kl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:u,selectedYear:x,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:C,children:[rn(t),c("div",{className:"relative",children:[Il(S,n,a),m?c("div",{className:"absolute bg-white z-20 select-none bottom-full",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(q,{...Sl,className:"-rotate-90 cursor-pointer"})}),o(vn,{onChange:v,value:{key:Nl[p]},options:w,...Cl}),o(vn,{onChange:N,value:{key:String(x)},options:k,...Cl}),o("div",{className:"my-auto",onClick:y,children:o(q,{...Sl,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:p,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Il=(e,t,n)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(k,{children:t&&xt(t)}),o(q,{...Sl,name:"CalendarIcon"})]}),Bl=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Tl,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),Wt(n)]}))),Pl=d((({field:e,input:t})=>o(Bl,{label:"Дата начала работы на текущем месте",...jn(e("beginDate"),zn.beginDate,t?.required),...t}))),Ml=d((({field:e,input:t})=>o(Bl,{label:"Дата рождения",...jn(e("birthday"),zn.birthday,t?.required)}))),Rl=d((({field:e,input:t})=>o(pn,{label:"Количество объектов инкассации",type:"number",...jn(e("collectionCount"),zn.collectionCount,t?.required)}))),Vl=d((({field:e,input:t})=>o(pn,{className:"col-span-2",...jn(e("comment"),zn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Dl=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на уступку прав требований)",...jn(e("consentAssignmentClaimsFlg"),zn.consentAssignmentClaimsFlg,t?.required)}))),zl=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",...jn(e("consentCollectionFlg"),zn.consentCollectionFlg,t?.required)}))),Al=d((({field:e,input:t})=>o(Qt,{text:"Согласие на информирование о продуктах и услугах Банка",...jn(e("consentInformFlg"),zn.consentInformFlg,t?.required)}))),Ol=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на фотографирование)",...jn(e("consentPhotoFlg"),zn.consentPhotoFlg,t?.required)}))),jl=d((({field:e,input:t})=>o(Qt,{text:"Согласие об использовании простой электронной подписи",...jn(e("consentProviderFlg"),zn.consentProviderFlg,t?.required)}))),_l=d((({field:e,input:t})=>o(Qt,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...jn(e("consentToReceiveMaterials"),zn.consentToReceiveMaterials,t?.required)}))),El=d((({field:e,input:t})=>o(Bl,{label:"Желаемая дата встречи",...jn(e("desiredMeetingDate"),zn.meetingDay,t?.required)}))),Ll=d((({field:e,input:t})=>{const{data:n}=ol("EDUCATION_LEVEL");return o(dl,{field:e,source:n||[],label:"Образование",fieldName:"education",input:t})})),Fl=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(pn,{label:"Электронная почта",...jn(e("email"),zn.email,n),...l})})),$l=d((({field:e,input:t})=>{const{data:n}=ol("ORGANIZATION_ACTIVITY_TYPE");return o(dl,{field:e,source:n||[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Ul=d((({field:e,input:t})=>{const{data:n}=ol("ORGANIZATION_KIND");return o(dl,{field:e,source:n||[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Wl=d((({field:e,input:t})=>{const{data:n}=ol("EMPLOYMENT_TYPE");return o(dl,{field:e,source:n||[],label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ql=d((({field:e,input:t})=>o(pn,{label:"Стаж",placeholder:"За последние 5 лет",...jn(e("experience5Years"),zn.experience5Years,t?.required),...t}))),Hl=d((({field:e,input:t})=>o(kn,{label:"Способ получения ответа",options:Ft,...jn(e("feedbackMethod"),zn.feedbackMethod,t?.required)}))),Yl=d((({field:e,input:t})=>o(pn,{label:"Адрес",...jn(e("fullAddress"),zn.fullAddress,t?.required),...t}))),Kl=d((({field:e,input:t})=>o(pn,{label:"ФИО",...jn(e("fullName"),zn.fullName,t?.required),...t}))),Xl=d((({field:e,input:t})=>o(pn,{label:"Общий стаж",placeholder:"Количество лет",...jn(e("generalSeniority"),zn.generalSeniority,t?.required),...t}))),Gl=d((({field:e,input:t})=>{const{data:n}=ol("HOUSE_TYPE");return o(dl,{field:e,source:n||[],label:"Тип жилья",fieldName:"housing",input:t})})),Jl=d((({field:e,input:t})=>o(pn,{label:"ИНН",type:"number",...jn(e("inn"),zn.inn,t?.required)}))),Zl=d((({field:e})=>o(Qt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ql=d((({field:e,input:t})=>o(pn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...jn(e("jobsNumber"),zn.jobsNumber,t?.required),...t}))),ea=d((({field:e,input:t})=>o(pn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...jn(e("lastJobExperience"),zn.lastJobExperience,t?.required),...t}))),ta=d((({field:e,input:t})=>o(pn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...jn(e("legalForm"),zn.legalForm,t?.required),...t})));function na(e="/api/v1/regions"){const{data:t}=qn(e,rt);return Array.isArray(t)?t:[]}const la=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=na($t)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(kn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...jn(e("localities"),zn.localities,t?.required),isSearch:!0})})),aa=d((({field:e,input:t})=>o(pn,{label:"Отчество (Обязательно, при наличии)",...e("middleName"),...t}))),ia=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(pn,{label:"Имя",...jn(e("name"),zn.name,n),...l})})),ra=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),sa=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ra,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),oa=d((({field:e,input:t})=>{const{data:n}=ol("ORGANIZATION_TYPE");return o(dl,{field:e,source:n||[],label:"Тип организации",fieldName:"organization",input:t})})),ca=d((({field:e,input:t})=>o(pn,{label:"Наименование организации",...jn(e("organizationName"),zn.organizationName,t?.required),...t}))),da=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(pn,{...jn(e("partnerComments"),zn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),ma=e=>"_"===e,ha=e=>/\d/.test(e),ua=e=>ma(e)||ha(e),pa=[..."+7 (___) ___-__-__"],ga=pa.findIndex(ma),xa=pa.map(((e,t)=>ua(e)?pa.slice(0,t).filter(ua).length:-1));const fa=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=pa.map(((e,n)=>ha(e)?e:t.charAt(xa[n])||e)),l=xa.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ga,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(sn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),ba=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(fa,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Wt(l)]}))),ya=d((({field:e,input:t})=>o(ba,{label:"Телефон",...jn(e("phone"),zn.phone,t?.required)}))),va=d((({field:e,input:t})=>{const{data:n}=ol("POSITION");return o(dl,{field:e,source:n||[],label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Na=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ra,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),wa=d((({field:e,input:t})=>o(Qt,{text:"Согласие на обработку персональных данных",...jn(e("processPersonalDataLeadFlg"),zn.processPersonalDataLeadFlg,t?.required)}))),ka=ht((({field:e,source:t})=>o(kn,{placeholder:"Выберите продукт",label:"Продукт",options:Sa(t?.productList),...On(e("product"),zn.product)}))),Sa=e=>(e??[]).map((e=>({key:e,value:e}))),Ca=d((({field:e,input:t,url:n})=>{const l=na(n);return o(kn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...jn(e("region"),zn.region,t?.required)})})),Ta=d((({field:e,input:t})=>{const n=Xn(),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(kn,{label:"Регион",placeholder:"Выберите регион",options:l,...jn(e("region"),zn.region,t?.required)})})),Ia=d((({field:e})=>{const t=e("secondaryPhone");return o(ba,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?On(t,zn.secondaryPhone):t})})),Ba=d((({field:e,input:t})=>o(kn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Lt,...jn(e("serviceDirection"),zn.serviceDirection,t?.required)}))),Pa=d((({field:e,input:t})=>o(pn,{label:"Фамилия",...jn(e("surname"),zn.surname,t?.required),...t}))),Ma=["От 1 мес","До 15 лет"],Ra=d((({field:e})=>o(ll,{title:"Срок, месяцев",items:Ma,min:1,max:180,...e("term")}))),Va=d((({field:e,input:t})=>o(kn,{label:"Тип обслуживания",options:Et,...jn(e("serviceType"),zn.serviceType,t?.required)}))),Da=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(an.split(" ").filter((e=>"rounded"!==e)),Ht,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),za=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Aa=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Da,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(Da,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(Da,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(Da,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const Oa={$ref:"/wcms-resources/outservice-productlist.json"},ja=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(Pa,{field:e,input:n}),name:o(ia,{field:e,input:n}),middleName:o(aa,{field:e,input:n}),phone:o(ya,{field:e,input:n}),email:o(Fl,{field:e,input:n}),fullName:o(Kl,{field:e,input:n}),inn:o(Jl,{field:e,input:n}),legalForm:o(ta,{field:e,input:n}),organizationName:o(ca,{field:e,input:n}),generalSeniority:o(Xl,{field:e,input:n}),lastJobExperience:o(ea,{field:e,input:n}),experience5Years:o(ql,{field:e,input:n}),jobsNumber:o(Ql,{field:e,input:n}),beginDate:o(Pl,{field:e,input:n}),fullAddress:o(Yl,{field:e,input:n}),comment:o(Vl,{field:e,input:n}),addressBranch:o(Gn,{field:e,input:n,isPremium:a}),birthday:o(Ml,{field:e,input:n}),desiredMeetingDate:o(El,{field:e,input:n}),product:o(ka,{field:e,source:Oa}),localities:o(la,{field:e,input:n}),isClient:o(Zl,{field:e}),partnerComments:o(da,{field:e,input:n}),collectionCount:o(Rl,{field:e,input:n}),acquiringType:o(En,{field:e,input:n}),onlineCheckout:o(sa,{field:e}),posTerminal:o(Na,{field:e}),serviceType:o(Va,{field:e,input:n}),term:o(Ra,{field:e}),amount:o(sl,{field:e}),annualRevenue:o(ul,{field:e,input:n}),vedTypes:o(Aa,{field:e}),feedbackMethod:o(Hl,{field:e,input:n}),serviceDirection:o(Ba,{field:e,input:n}),bankEmpolee:o(pl,{field:e}),secondaryPhone:o(Ia,{field:e}),consentToReceiveMaterials:o(_l,{field:e,input:n}),processPersonalDataLeadFlg:o(wa,{field:e,input:n}),consentProviderFlg:o(jl,{field:e,input:n}),consentPhotoFlg:o(Ol,{field:e,input:n}),consentAssignmentClaimsFlg:o(Dl,{field:e,input:n}),consentCollectionFlg:o(zl,{field:e,input:n}),consentInformFlg:o(Al,{field:e,input:n}),applicationDate:o(pn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(Qt,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o(Ta,{field:e}):o(Ca,{field:e,input:n,url:Ut(t)}),education:o(Ll,{field:e,input:n}),housing:o(Gl,{field:e,input:n}),employment:o(Wl,{field:e,input:n}),organization:o(oa,{field:e,input:n}),amountWorkers:o(hl,{field:e,input:n}),employerActivities:o($l,{field:e,input:n}),employerOrganization:o(Ul,{field:e,input:n}),positionOrganization:o(va,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},_a=e=>2===e?"@xl:grid-cols-2":"",Ea=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function La({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Fa={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},$a={primary:h("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Ua=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(La(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h(Fa[a],$a[a]),l),type:s,role:d,onClick:m,children:e})})),Wa=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(q,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),qa=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Wa,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Ha=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(qa,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Ua,{type:"button",onClick:r,children:"Хорошо"})]})})})),Ya=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Ha,{...e}),n),close:n}},Ka=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Xa=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Ln(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,h={...d,...Ja(o),...Ga(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Ga=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ja=e=>e?{vedTypes:Object.fromEntries(za.map((t=>[t,t===e])))}:{},Za={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:_n[0],serviceType:Et[0],feedbackMethod:Ft[0],serviceDirection:Lt[0],vedTypes:za[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Qa=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),ei=(e,t)=>o(Ua,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ti=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Kt,{...e}),o(Qa,{link:t})]}),Wt(On(e,Dn).error)]}):o(Qa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ei(n)]}),ni=bt(),li=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Za[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Et[1]),{...n,typeForm:{key:t,text:""}}})(f,n),[y,v]=l(""),N=i((async(e,t)=>{const l=ai(f,e),a=Ka(An(l));if(!Sn(a(e)))return"Fail";const i=Xa({...e,...u}),r=await ni.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Ya({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=zt();St({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=Ot(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(_t,{className:h("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:h(_a(e.columns),"grid gap-x-m"),children:[Ea(e.title),(e?.inputs||[])?.map(ja(k,n))]},`section-${t}`))),ti(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ai=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),ii=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],ri=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},si={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:_n[0],serviceType:Et[0],feedbackMethod:Ft[0],serviceDirection:Lt[0],vedTypes:za[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1},oi=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||si[e.name]]))),typeForm:{key:t,text:""}}),ci=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const di=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),mi=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(jn(n(e?.name),zn[e?.name],e?.required))))),[e]);return o("div",{className:"w-fit",children:o(ci,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(di,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(ja(n,t))}),renderFoldButton:hi(c("div",{children:[o(Kt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Wt(i?"Отметьте все обязательные соглашения":"")]}))})})})),hi=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(q,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),ui=(e,t)=>o(Ua,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),pi=bt(),gi=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,endpoint:d,...m})=>{const u=r?.flatMap((e=>e?.inputs))||[],p=oi(u,n),[g,x]=l(""),f=i((async e=>{const t=Ka(An(u));if(!Sn(t(e)))return"Fail";const l=(e=>{const{region:t,...n}=e,l={...n,...ri(t)};return Object.fromEntries(Object.entries(l)?.map((([e,t])=>[e,t?.key||t])))})(e),a=await pi.send(l,"lead"===d)?"OK":"Fail";if(x(a),a){Ya({responseType:a,typeForm:n}).open()}return a}),[]),[,{field:b,onSubmit:y,reset:v}]=Ot(p,{onSubmit:f});return a((()=>{"OK"===g&&(x(""),v())}),[g]),o(_t,{className:h("container space-y-m",e),title:t,...m,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:h(_a(e.columns),"grid gap-x-m"),children:[Ea(e.title),xi({field:b,typeForm:n,inputs:e?.inputs})]},`section-${t}`))),ui(s)]})})})),xi=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=fi(n||[]);return l.length>2?c("div",{children:[a.map(ja(e,t)),o(mi,{inputs:l,field:e})]}):(n||[])?.map(ja(e,t))},fi=e=>({consentInputs:e?.filter((e=>ii.includes(e.name)))||[],restInputs:e?.filter((e=>!ii.includes(e.name)))||[]}),bi=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),yi=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",vi=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Ni(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const wi=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Ni(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),ki=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Si=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Ti(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Ci(c,v):{},...N?vi(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(wi,{className:h(m,a?ki[a-1]:"",{"h-full":N},t),style:w?Ci(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Ci=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ti=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ii={"horizontal-list":"w-6","vertical-list":"h-6"},Bi=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Ii[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Pi=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},Mi=e=>e,Ri=(e=Mi)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Vi=Ri(),Di=(e=Mi)=>Ri((t=>-e(t))),zi=Di(),Ai=e=>t=>e.scrollWidth/t,Oi=e=>(t,n)=>{e.scrollBy({left:n*Ai(e)(t),behavior:"smooth"})},ji=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Di()(a),Ri()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?Oi(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?Oi(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},_i={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ei=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[u,p]=ji({itemCount:s.length}),g=Li(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Si,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Pi({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",_i[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Bi({activeIndex:t,onClick:x,listType:l}))}):null})),Li=(e=!1)=>({behavior:e?"auto":"smooth"}),Fi=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),$i=d((e=>o(Fi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Ui=d((e=>o(Fi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Wi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",qi=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?Hi(t):null,i?o($i,{className:h(Yi(a),m?"left-1":"left-0"),onClick:s}):null,r?o(Ui,{className:h(Yi(a),m?"right-1":"right-0"),onClick:d}):null]})})),Hi=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(Wi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(Wi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Yi=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ki=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=ji({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(Si,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(qi,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(Ei,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Xi=({blocksToRender:e,...t})=>o(Ki,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",yi(!0)),children:B(e,t)},String(n))})}),Gi=e=>e%2!=0,Ji=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Zi=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(Ji,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Qi=({isUnfolded:e,onToggle:t})=>o(Zi,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),er=["ArrowDownIcon","ArrowUpIcon"],tr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",nr=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(tr),children:[M(i,{...a.options,parent:n}),Gi(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(ci,{renderFoldableSection:({isUnfolded:e})=>c(di,{className:h(tr),isUnfolded:e,children:[M(r,{...a.options,parent:n}),Gi(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(Zi,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:er[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},lr=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[ar(n,t),nr({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[ar(n,t),Xi({...l,blocksToRender:t})]});default:return null}})),ar=(e,t)=>e&&!t.length?o(bi,{...e}):null,ir=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),rr=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ra,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),sr=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,ir(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(or(l)).filter(Boolean))]}),n?o("div",{children:o(Ua,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),or=e=>([t,n])=>{const l=n?.type;return"array"===l?cr(t,e)(n):null},cr=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(rr,{items:l,multiple:!n?.single,...t(e)})]},e)};function dr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const mr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,hr=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>mr(t[e])||mr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>mr(t[e])||mr(n[e])||ur(t[e])<=ur(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>mr(t[e])||mr(n[e])||ur(t[e]?.min)>=ur(n[e]?.min)&&ur(t[e]?.min)<=ur(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>mr(t[e])||mr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>mr(t[e])||mr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),ur=e=>Number(e||0),pr=(e,{block:t,page:n,normalize:l=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Ot(e),d=r((()=>dr(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=At)=>e?.filter((([,e])=>hr(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},gr={},xr={},fr=ht((({className:e,filtrationSchema:t=gr,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=pr(xr,{block:a.block,page:a.options?.page}),d=o(vn,{className:"w-64",label:n?.title,options:br(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>br(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(sr,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Ua,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(lr,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),br=e=>dr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),yr=(e=!1)=>e?"text-left":"text-center",vr={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Nr=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",vr[n],e),children:o(q,{...i,width:"54%",height:"54%",name:a})}):null})),wr=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:yr(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(kr)}):null]})})),kr=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Nr,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Sr=(e,t,n)=>{return o(Ki,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Re,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Re,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},Cr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Sr(e,0,t):null]}))),Tr={start:"justify-start",center:"justify-center",end:"justify-end"},Ir=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Tr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),Br=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Pr="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Mr="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Rr="flex flex-col gap-y-xl min-w-52",Vr=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Dr=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Vr,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),zr=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Ar=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Or=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),jr=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Or,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Ar,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Dr,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),_r=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(ll,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),Er={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Lr={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Fr=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Er.prefMonthsNum,prefTravelBonusRate:i=Er.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||Lr,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},$r=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=Ot({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=Fr(r,n);return o(Br,{className:e,title:t,...i,children:c("section",{className:h(Pr,e),children:[c("div",{className:Mr,children:[_r({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),_r({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?jr({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Rr,children:[x>=0?o(Dr,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Ee(l,{isVertical:!0}),zr(a)]})]})})})),Ur=Math.round(29.5),Wr=(e,t=0)=>e?.sum?e.sum:t,qr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Hr=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Yr={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Kr=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${Yr[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Kt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),Xr=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Kr,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Gr=e=>Xr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Jr=" (c капитализацией)",Zr=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Rr,children:[o(Dr,{title:`Доход в конце срока${i?Jr:""}`,value:e,postfix:n,prefix:"+"}),o(Dr,{title:`Сумма в конце срока${i?Jr:""}`,value:t,postfix:n}),Ee(l,{isVertical:!0}),a?.map(zr)]}),Qr=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:es([e,t],l),es=([e,t],n=[])=>({[e]:n.length?zi(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Vi(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ts=(e,[t,n],l)=>e>=l[t]&&e<=l[n],ns={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const ls={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},as=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?ns[e?.rateType]:"",{data:n}=qn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...ls,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&is(s,e)&&ts(l,["minSum","maxSum"],e)&&ts(n,["minDays","maxDays"],e)))||ls,{rate:m}=d,h=rs(m,e),u=l+h,p=c||[ls];return{...d,...es(["minSum","maxSum"],p),...es(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},is=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,rs=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},ss=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=Ot({moneyValue:Wr(r,1e5),daysValue:qr(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=as(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=p;return o(Br,{className:e,title:t,...d,children:c("section",{className:h(Pr,e),children:[c("div",{className:Mr,children:[_r({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(ll,{items:[`От ${Hr(v.min||0)}`,`До ${Hr(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[os(p,u),Gr({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),jr({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Zr({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var v})),os=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Kt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Kt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),cs=(e=[],t=!1)=>ds([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),ds=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},ms=({min:e=0,max:t=0,availableMonths:n,...l})=>o(ll,{items:[`От ${hs(e)}`,`До ${hs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),hs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,us=e=>Xr({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ps=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(Zn(t?.[a],n.minMonths,n.maxMonths))},gs=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},xs={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},fs=e=>bs({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&bs({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&bs({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&bs({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),bs=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],ys=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[xs],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>fs({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=Qr(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Qr(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>fs({row:e,userInputParams:t,paramsViewSettings:n})&&ts(l,["minSum","maxSum"],e)&&ts(a,["minMonths","maxMonths"],e)))||xs)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=gs(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},vs=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Ns={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},ws=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=n?.rateRows,ds([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=Ot({moneyValue:Wr(s,2e5),monthsValue:qr(s,Ur),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=ys(p,n,r),f=us({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Zn(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(Zn(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!vs(s)&&m&&ps({field:g,defParams:m,calcParams:x,map:Ns,monthsValue:"minMonths"})}),[n,s]),o(Br,{className:e,title:t,...d,children:c("section",{className:h(Pr,e),children:[c("div",{className:Mr,children:[_r({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),ms({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),ks({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Rr,"@4xl:w-1/2"),children:[o(Dr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Dr,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Dr,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Ee(l,{isVertical:!0}),zr(i)]})]})})})),ks=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Kt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Kt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ss=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Cs={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Ts=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Ps(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Bs({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Bs({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Bs({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Bs({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ts(l,["minSum","maxSum"],t),ts(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Cs,{rate:h}=m,u=Is(h,e),p=l+u,g=t||[Cs];return{...m,...es(["minSum","maxSum"],g),...es(["minMonths","maxMonths"],g),availableMonths:Ss(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},Is=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Bs=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Ps=(e,t)=>e+Math.round((t-e)/2),Ms=(e="rub")=>"rub"===e,Rs=(e,t)=>{const{minMonths:n,maxMonths:l}=es(["minMonths","maxMonths"],As(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Zn(a,n,l)}},Vs=(e,t)=>{const{minSum:n,maxSum:l}=es(["minSum","maxSum"],As(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Zn(a,n,l)}},Ds=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),zs=e=>{const t=Ms(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},As=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Os=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Xr({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Xr({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),js(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Gr({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Xr({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),js(e.isShowNewClient),e.isShowNewClient?o(Kt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},js=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,_s={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Es={text:"₽",key:"rub"},Ls=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[Es],g=i((e=>t=>e?{...t,...zs(t),...Vs(t,e),...Rs(t,e),...Ds(t,e)}:t)(u),[u]),[x,{field:f}]=Ot({moneyValue:Wr(d,2e4),monthsValue:qr(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Es},{normalize:g}),b=f?.("currency")?.value??Es,y=f?.("isNewClient")?.value,v=As(u,b),N=Ts(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{ps({field:f,defParams:cs(v,y),calcParams:N,monthsValue:"minMonths",map:_s})}),[f,u]);a((()=>{!vs(d)&&v&&T()}),[d,u]);const I=w===cs(v,y)?.rate;return o(Br,{className:e,title:t,...m,children:c("section",{className:h(Pr,e),children:[c("div",{className:Mr,children:[c("div",{className:"flex gap-m",children:[_r({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Fs(b?.key)}),u&&u?.length>1?o(kn,{label:"Валюта",options:p,...f("currency")}):null]}),ms({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),Os({...N,...s},f)]}),jr({rate:w,children:Us(T,I)}),Zr({income:k,finalSum:S,buttons:[...l,$s(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),Fs=(e="")=>Ms(e)?1e3:100,$s=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},Us=(e,t=!1)=>t?null:o(Ua,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Ws=e=>qs({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&qs({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),qs=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Hs={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ys=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Hs],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ws({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Qr(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Qr(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ws({row:e,userInputParams:t,paramsViewSettings:n})&&ts(l+r,["minSum","maxSum"],e)&&ts(i,["minSumOld","maxSumOld"],e)&&ts(r,["minSumExtra","maxSumExtra"],e)&&ts(a,["minMonths","maxMonths"],e)))||Hs)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=gs(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Ks=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=Ot({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Ys(s,n,i),u=us({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Br,{className:e,title:t,...r,children:c("section",{className:h(Pr,e),children:[c("div",{className:Mr,children:[_r({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),_r({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),ms({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Xs({...m,...i},d),m.isExtraMoney?_r({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(Rr,"@4xl:w-1/2"),children:[o(Dr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Dr,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Dr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Dr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),Ee(l,{isVertical:!0}),zr(a)]})]})})})),Xs=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Kt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Gs=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Jn(e,{normalize:(e=a)=>n&&l?String(Zn(Number(Js(e)),n,l)):Js(e),format:Ue(r)}),d=i((e=>t&&t(Js(e))),[t]);return o(sn,{onChange:d,...s,...c})})),Js=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Zs=d((e=>o(Gs,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),Qs={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},eo={amount:1500},to=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=Ot(eo),[u,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Qs[r],children:[o(Zs,{valid:!u,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Ua,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),no=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),lo="relative h-full",ao={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},io=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(oo),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:ro(n,{someCardsHighlighted:i}),children:[B(n,l,{className:so(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),oo(n)?no({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},ro=(e,{someCardsHighlighted:t})=>h(lo,t&&(oo(e)?"pt-3xl":"pt-3xl sm:pt-16")),so=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(lo,"min-w-80",ao[l],t&&(oo(e)?"pt-3xl sm:pt-16":"pt-3xl"),yi(n),n&&"h-full"),oo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,co=ht((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(Ki,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?mo(s?.block?.blocks):[],hasBlur:!0,children:io({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),mo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],ho="z-10 border border-solid w-full h-full",uo=h(ho,"absolute hidden @xl:block border-transparent"),po=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(uo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(uo,"top-6 right-8 bg-green")}),o("div",{className:h(uo,"top-3 right-4 bg-green-light")}),c("div",{className:h(ho,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),go={black:"bg-black",white:"bg-white"},xo=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(fo)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),fo=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${go[e]}`},String(t)),bo=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),yo=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?vo(l):null]})}))),vo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(bo,{...e},String(t))))}),No=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),wo=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),ko=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],So=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>ko.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=_e(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},Co(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:To(s??!1,a??!1,n),buttonClassName:u})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Co=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",To=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Io=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(wo,{href:a,target:m,className:"h-full",data:No(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(_e(i)?o(ne,{image:i}):null,f),buttons:d.length?o(So,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(je,{benefits:x}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Bo(l,p)]})})}))),Bo=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Po=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},Mo=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const x=d.map(Po),[f,b]=s>0?[x.slice(0,s),x.slice(s)]:[x,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[_e(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(w,{className:h("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(ci,{renderFoldableSection:()=>c("div",{children:[f,o(di,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Ro(m?.parent,u,y):null}):o("div",{children:f})]})})),Ro=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?ue(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(q,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Vo=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Do=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),zo=1e9,Ao={sum:{min:1e4,max:zo},period:3},Oo=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=pr(Ao,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:jo(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=_o(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(sr,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Zs,{label:l?.title,min:500,max:zo,...d("sum",{parse:e=>({min:Number(e),max:zo}),format:({min:e})=>String(e)})}),o(ll,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(lr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),jo=e=>st((e?.paramsSource?.rateRows||[]).filter(Vo).flatMap((e=>Do(e.minMonths,e.maxMonths)))),_o=e=>st(e.flatMap((e=>e||[])).filter(Vo).flatMap((e=>Do(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Eo=[{key:"10"},{key:"50"},{key:"100"}],Lo=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Eo,iconVersion:"black"})]})},Fo="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",$o=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:Fo,"aria-label":`Страница ${i}`,children:i},String(t)):null},Uo={width:"24",height:"24"},Wo=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:qo(1===e),...Uo})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Fo,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map($o),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Fo,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:qo(e===n),...Uo})})]})},qo=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Ho=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Wo,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Lo,{itemCount:l,onItemCountChange:a}):null]}),Yo=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",an),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),Ko=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Yo,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Tl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Tl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Ua,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Xo=(e,t)=>o(Nr,{...e,iconBgVersion:t,className:"shrink-0"}),Go=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[Xo({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},Jo="/api/v1/depository",Zo={startDate:void 0,endDate:void 0,query:""},Qo=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=Ot(Zo),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?xt(l,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(Jo);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=qn(Jo+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Ko,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(Go,{...e},String(e.publicId)))):o(bi,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Ho,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),ec=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,tc=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:ec(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),nc="location";function lc(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",ic()??{name:e}),r=i((e=>{rc(e),n(e)}),[]),{data:s}=qn(ac()?null:"/api/v1/region",rt);return a((()=>{s&&!ac()&&n(s)}),[s]),[t??{name:e},r]}const ac=()=>Boolean(globalThis.localStorage?.getItem(nc)),ic=()=>{try{const e=globalThis.localStorage?.getItem(nc);return e&&JSON.parse(e)}catch(e){return null}},rc=e=>{try{globalThis.localStorage?.setItem(nc,JSON.stringify(e))}catch(e){}};var sc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(sc||(sc={}));const oc=new Intl.NumberFormat("ru",{style:"currency",currency:sc.RUB}),cc=e=>e?oc.format(e):"",dc="text-m font-light text-secondary-text ",mc=`${dc} text-left`,hc=`${dc} pl-5xl text-center`,uc=`${dc} pl-5xl text-right`,pc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},gc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:mc,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:hc,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:uc,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(xc)})]}))),xc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:pc[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:cc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:cc(e?.buyExchangeRate)})})]},t)},fc={icon:"GpsIcon"},bc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Nr,{...fc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),yc=(e,t,n)=>{const l=Number(vc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},vc=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Nc=e=>Pt([[e=>e.value!==sc.RUB&&e.oppositeValue!==sc.RUB,()=>e.handleConvert(e.value,sc.RUB)],[e=>e.value===sc.RUB&&e.oppositeValue===sc.RUB,()=>e.handleConvert(e.value,sc.USD)],[e=>e.value===sc.RUB&&e.oppositeValue===sc.RUB,()=>e.handleConvert(e.value,sc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function wc(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(sn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(vn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const kc=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||sc.RUB,selectBuy:n?.[0]?.currency?.currency||sc.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[wc({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Sc(r,d,n),value:r.inputSell,setValue:e=>Tc(d,n)(e,r.selectSell,r.selectBuy)}),wc({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Cc(r,d,t),value:r.inputBuy,setValue:e=>Ic(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Sc=(e,t,n)=>l=>{t({selectSell:l}),Nc({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Tc(t,n)(e.inputSell,l,a)}})},Cc=(e,t,n)=>l=>{t({selectBuy:l}),Nc({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Ic(t,n)(e.inputBuy,l,a)})},Tc=(e,t)=>(n,l,a)=>{e({inputSell:vc(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(yc(n,i,l===sc.RUB)||"")})},Ic=(e,t)=>(n,l,a)=>{e({inputBuy:vc(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(yc(n,i,l===sc.RUB)||"")})};const Bc=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=lc(),i=function(e){const t=e?.code||"000",{data:n}=qn(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Pc(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:sc.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:sc.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(gc,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(bc,{address:i?.address})]}),o(kc,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Pc=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Mc=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(Rc(n))})})),Rc=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(l)):null},Vc=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(Ji,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Xo(a,t),e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(q,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Dc=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",zc=(e=!1)=>e?"MinusIcon":"PlusIcon",Ac=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Oc=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(ci,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(di,{className:h("gap-lg",Dc(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>jc({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),jc=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Ac(e):zc(e))(a,r);return"accordion"===e?o(Vc,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(Zi,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},_c=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Ec(e)}))),Ec=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Oc,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Mc,{items:e.items}):null},String(t)))),Lc=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(Fc)}):null)),Fc=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map($c)})]},String(t)),$c=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Uc(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Uc=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Wc(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Wc=e=>e.replaceAll(/\D/g,""),qc=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Hc=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(qc,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Yc=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Kc=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Yc,{index:t,...e},String(t))))}):null]}))),Xc=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(_c,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Lc,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(So,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Hc,{title:d,links:i}),o(Kc,{links:a,license:u})]})})),Gc=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,x=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(kn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:No(i,s?.key),children:x})}):null]})})})),Jc={width:"103",height:"21"},Zc={"bg-white":"color",transparent:"white"},Qc={"bg-white":"text-primary-main",transparent:"text-white"},ed=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Zc[e]},className:Qc[e],width:n?.width,height:n?.height}),td={"bg-white":"text-primary-text",transparent:"text-white"},nd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...ue(s),children:[ed(i,n?.image,Jc),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:td[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),ld={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},ad=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",ld["transparent"===e?"transparent":"default"]),...l,children:a}):null})),id=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(nd,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):rd(p,r),o(ad,{version:a,...l})]})})),rd=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(q,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,sd={"bg-white":"primary",transparent:"transparent"},od=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=sd[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(id,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),cd=(e=!1)=>e?{}:{padding:"p-0"},dd={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},md=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",dd[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:h("w-full",yi(r)),...cd(l)}})})}),{childrenTypes:[]}),hd=ht((e=>o(md,{...e})),{childrenTypes:[]}),ud=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Tr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),pd=["байт","Кб","Мб","Гб","Тб","Пб"],gd=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...ue(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",xd(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),xd=(e,t)=>e||t?o("span",{children:", "}):"",fd=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${pd[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?yd(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(gd,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:bd(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},bd=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,yd=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},vd=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=V(),r=U(a)(e),s=i((()=>{l()}),[]);return c(qa,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(Ua,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Nd=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(vd,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[bd(a),o(Re,{font:"font-light",children:e})]})})),wd={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},kd=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",wd[r]),role:"list",children:a.map(Sd(d,i))}):null]})})),Sd=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Cd(t)(n,l):fd(e,t)(n,l)},Cd=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Nd,{...l,icon:e,href:Td(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},Td=e=>"href"in e,Id=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ee(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Bd=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Pd=(e=[],t={})=>e.filter((({content:e={}})=>hr(t,e))).length,Md=(e,t)=>e===t;const Rd=(Vd=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Md,((e=Md)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Vd(n,t[e])))));var Vd;const Dd=[],zd={},Ad={primary:"bg-white/30",secondary:"bg-main-divider"},Od={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},jd=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":Ad[t],a=Od[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),_d=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Ed={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Ld={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Fd={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},$d={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Ud=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",Ed[l],n?$d[l]:Fd[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Ld[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[_d({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(jd,{count:m,version:Bd(n,l)})}):null]})})})),Wd=d((e=>o(e?.item?.href?qd:Hd,{...e}))),qd=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Ud,{...e,tag:"a",item:a,onClick:l})})),Hd=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Ud,{item:e,onClick:l,...n})})),Yd=(e,t,n)=>(l,a)=>o(Wd,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Kd=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Yd(l,a,t))}))),Xd={categories:[],extraOptions:[],propertyType:[],stage:[]},Gd=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=pr(Xd,{block:a.block,page:a.options?.page}),x=i(((e=Xd)=>p(e)),[]),f=(({hotFilters:e=Dd,filtrationState:t=zd,blocks:n=Dd,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Rd(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Pd(n,t.filter),version:Bd(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Kd,{...f}),o(sr,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(lr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Jd=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Zd=d((({children:e})=>Jd?e:null)),Qd=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),em="/icons/MapMarkerClusterIcon.svg",tm="/icons/MapMarkerClusterYellowIcon.svg";function nm({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=lm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=lm("workplaces",e,a),r=am(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=am(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=am(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const lm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?em:tm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),am=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?em:tm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),im={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},rm={...im,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},sm=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(rm).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),om=e=>globalThis[e];function cm(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=om(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(om(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(om(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const dm={...im,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},mm=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(dm).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:n,width:"20",height:"16"})})})),hm=[55.753995,37.614069],um=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=cm("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?nm({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:pm(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),nm({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[l?o(Qd,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(mm,{yandexMaps:i}),o(mm,{yandexMaps:i,direction:"out"})]}),sm(i,r,h("right-2 top-80",d))]})})),pm=e=>{const t=[xm(gm(e,0)),xm(gm(e,1))];return t.every((e=>e))?t:hm},gm=(e,t)=>e.map((e=>e.coords?.[t])),xm=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,fm={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},bm={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ym={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},vm=(e,t,n)=>{const l=Bd("all"===t),a=Bd("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Ua,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(Ua,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Nm=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,wm="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",km=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Kt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(ci,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:wm,children:s}),o(di,{className:wm,isUnfolded:e,children:d})]}),renderFoldButton:Sm(n,l)})}):null})},Sm=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(q,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Cm()})]}),Cm=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(q,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Tm=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Im=()=>{},Bm=e=>"all"===e?"block":"hidden",Pm=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Im,renderRemoteWorkplaceCard:s=Im,getBalloon:d=Im,getBalloonRemoteWorkplaces:m=Im,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=Ot(fm),[y,v,N,w]=r((()=>{const e=Mm(t,x),n=Mm(a,x),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,x]),[k,S]=l("all"),C={filters:Rm([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:bm};return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Tm(p,w),u?Nm(u):null,g&&vm(t,k,S),o("div",{className:h("pb-3xl",Bm(k)),children:km(C)})]}),o("div",{className:"h-[600px]",children:o(Zd,{children:o(um,{points:v,isLoad:n,className:"h-full"})})})]}),c(Zd,{children:[y.map(i),N.map(s)]})]})})),Mm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ym[t](e)))))},Rm=e=>Object.keys(fm).filter((t=>e.filter((e=>ym[t](e))).length)),Vm={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Dm=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Vm[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Vm[n].text,children:t})]}))),zm=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Am({textItems:i,subText:t,children:n,isPhone:l,...a})})),Am=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Om(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),Om=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${jm(e)}`,children:e.trim()}):e.trim()},String(n)))),jm=e=>e.replace(/\D/g,""),_m=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Em=["ArrowDownIcon","ArrowUpIcon"],Lm=["Подробнее","Скрыть"],Fm=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Lm[Number(e)]}),o(q,{className:"text-primary-text",name:Em[Number(e)],width:"16",height:"16"})]}),$m=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:qm(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:qm(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Dm,{color:"green",children:qm(s)})})]}),o("div",{className:"hidden sm:block",children:o(_m,{className:"flex-wrap",children:m?.map(Wm)})}),o(ci,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(di,{isUnfolded:e,children:o(_m,{className:"flex-wrap",children:m?.map(Wm)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fm({isUnfolded:e,onToggle:t})})]},String(d))},Um=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${qm(t)} №${n}`,body:e.toUpperCase()}),Wm=(e,t)=>o(zm,{...e},String(t)),qm=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Hm=[];const Ym=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:Hm},Km={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Xm={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Gm=d((({descriptionData:e,className:t})=>{const[n]=lc(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=qn(`/api/v1/atms?regionCode=${e}`,Ym);return{data:t||Hm,isLoad:!t&&!n}}(l);return o(Pm,{className:t,filterItems:Jm,data:a,isLoad:i,initFilterState:Km,renderCard:$m,getBalloon:Um,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Jm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Xm[t](e))),n=!l.length||l.some((t=>Xm[t](e)));return t&&n}))},Zm=e=>{const t=eh(e);return o(zm,{label:"Режим работы",value:t,className:"max-w-none"})},Qm=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",eh=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Qm({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Qm({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},th=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],nh=e=>th.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),lh=e=>{if(!e)return null;const t=ah(e);return c(_m,{className:"border-none",children:[o(zm,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(ih)})}),o(zm,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},ah=e=>{const t=th.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},ih=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),rh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(zm,{label:"Валюта",value:e.currency}):null,t?o(zm,{label:"Купить",value:String(t)}):null,n?o(zm,{label:"Продать",value:String(n)}):null]},String(l)),sh=(new Date).getDay(),oh=e=>{const[t]=e?.slice(sh-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Dm,{color:"green",children:a}):null,n&&i?o(Dm,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Dm,{color:"red",children:"Выходной"})},ch=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",dh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(zm,{label:e,value:t&&n?n:"",subText:ch({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),mh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,hh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,uh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,ph=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=nh(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),oh(u)]}),o("div",{className:"hidden sm:block",children:gh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ci,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(di,{isUnfolded:e,children:gh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fm({isUnfolded:e,onToggle:t})})]},String(h))},gh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=nh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(_m,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(zm,{label:"Факс",value:t,isPhone:!0}),o(zm,{label:"Телефон филиала",value:e,isPhone:!0}),o(zm,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(zm,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(zm,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(zm,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(_m,{children:o(zm,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(dh)})})}):c(_m,{children:[o(zm,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(ih)})}),Zm(d)]}),r?.businessScheduleVisibleTag?lh(r?.businessScheduleDescription):null,s?.currencies?.length?o(_m,{className:"flex-wrap",children:s?.currencies?.map(rh)}):null]})},xh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=nh(e),n=e?eh(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?mh(n):uh(n,l):hh(n):null})(n)}`;return{header:l,body:i}},fh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:bh({workScheduleDescription:t})}),o(ci,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(di,{isUnfolded:e,children:bh({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fm({isUnfolded:e,onToggle:t})})]},String(n)):null,bh=({workScheduleDescription:e})=>c("div",{children:[c(_m,{className:"flex",children:[o(zm,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(zm,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(zm,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(zm,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(zm,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),yh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),vh={branches:[],remoteWorkplaces:[]};const Nh=async e=>await it(e,{method:"GET"})||vh,wh=d((({className:e})=>{const[t]=lc(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=qn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Nh);return{data:t||vh,isLoad:!t&&!n}}(n);return o(Pm,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:ph,renderRemoteWorkplaceCard:fh,getBalloon:xh,getBalloonRemoteWorkplaces:yh,title:`Офисы филиала ${t?.name}`})})),kh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(wh,{}):o(Gm,{descriptionData:e})})})),Sh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Ch=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(Ki,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Th=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[_e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Ih({__html:i,richVersion:r}):null,Bh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Bh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Bh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),Ih=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Bh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,Ph=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Mh=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Da,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Da,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Rh=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(vn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Vh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Rh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Rh,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Dh=["От 1 дня","До 365 дней"],zh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ll,{min:1,max:365,value:e,items:Dh,onChange:t})]}))),Ah=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Rh,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Rh,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Oh=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Vh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:jh(m)}),o(zh,{days:a,setDays:e=>m({days:e})}),o(Ah,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:_h(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Mh,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),jh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},_h=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Eh=d((({days:e,tariffs:t=[]})=>{const n=Fh(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Lh("Аренда за",e),Lh("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Lh=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Fh=(e,t)=>{const n=$h(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},$h=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Uh=(e,t)=>e.find((e=>e.branchCode===t)),Wh=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Uh(l,n.selectedBranch),d=qh(s?.safeBoxCaseVolumes),m=Hh(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=Yh(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Oh,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Eh,{days:n.days,tariffs:h})]})})),qh=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Hh=(e,t)=>e?.find((e=>e.volume===t)),Yh=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Kh=[];const Xh=async e=>await it(e,{method:"GET"})||Kh,Gh=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=na(),p=Jh(m.selectedRegion,u),x=function(e){const{data:t}=qn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Xh);return t||Kh}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Uh(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Wh,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(um,{points:b,className:"h-[640px]"}):null]})})),Jh=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Zh={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Qh=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:eu(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[tu(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},eu=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=nu(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:lu({step:n,iconVersion:a,i:l,stepVersion:t})})})},tu=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",Zh.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),nu=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",lu=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return _e(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?Zh.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},au=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(Qh(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),iu=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(q,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),ru=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Wa,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),su=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(ru,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function ou(e){throw new Error(e)}const cu=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:ou(e)}}))),[c,d]),n},du=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const mu=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(hu,{...e},String(t))))})]}):null,hu=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),uu=(e,t)=>n=>n.name?o(wo,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:No(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,pu=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(an,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),gu=d((({foreignOffices:e,branches:t})=>{const[n,a]=lc(t?.default),r=he(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),h=fu(na()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,xu),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(qa,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(wo,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(pu,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&du(e.toLowerCase())(d.toLowerCase())>=.8)).map(uu(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(uu(f,x))]},e)))}),mu(e)]});var x,f})),xu=e=>e.name?.charAt(0)||"",fu=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),bu=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(gu,{...e}),n),close:n}})(n||{}),[{name:r}]=lc(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(ru,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),yu="burgerMenuDialog",vu=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=cu(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(yu,i);return[r,{toggle:()=>{r?n():l(o(bu,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:yu})}}]},Nu=[],wu=ht((({sticky:e,...t})=>{const{menuItems:n=Nu}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[x,f]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),f(""),y()}),[y]),N=nn(v),w=s(null),[k,{toggle:S}]=vu({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=su({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(ku(I,"left",{activeIndex:u,currentItemPosition:x})),o(iu,{item:a,isActive:k,onClick:e=>T(e)}),h.map(ku(I,"right",{activeIndex:u,currentItemPosition:x}))]})})})),ku=(e,t,n)=>(l,a,i)=>o(iu,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Su="hidden sm:flex absolute z-40",Cu={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Tu=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=ji({itemCount:t?.length||0});return a((()=>Iu(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Si,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Cu[i].item,gap:Cu[i].gap,children:t.map(Yd(n,l,i))}),s.canScrollLeft?o($i,{className:h("left-6",Su,Cu[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Ui,{className:h("right-6",Su,Cu[i].buttonTop),onClick:s.scrollRight}):null]})})),Iu=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Bu={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Pu=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(Bu[t].wrapper,e),children:o(Tu,{className:Bu[t].component,tabsType:t,...n})}):null,Mu=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=Ru(n??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(zu(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=Du(f[y],y),S=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[Pu({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:Vu(t,f),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Du)?.filter(Boolean)||[]}),Ru=({__id:e,anchor:t})=>t??e??"tabs",Vu=(e,t)=>t?.length?t:e,Du=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",zu=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Au={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Ou=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Au[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),ju=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),_u={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(ju,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Eu=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Lu({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Lu=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in _u))return null;return o(_u[n],{...t,...l})},Fu=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Eu,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),$u=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Uu=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Wu=d((({rows:e})=>{return o(Si,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${$u(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?Uu(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),qu=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Wu,{rows:t.rowsData})})})]},l)}))}))),Hu=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Yu=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:Hu(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Ku=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Yu,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(qu,{activeTabIndex:r,items:m}),o(ju,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(ju,{onClick:n,isOpen:!0})]})})),Xu=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Ku,{...t,onClick:n})}):null]}))),Gu=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(Xu,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Ou,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Fu,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Ju({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(Fi,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(Fi,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const Zu=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Ju({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Qu=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(Gu,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(ci,{renderFoldableSection:({isUnfolded:e})=>c(Zu,{controls:f,children:[y,o(di,{isUnfolded:e,children:v})]}),renderFoldButton:Qi}):o(Zu,{controls:f,children:b})})]})})),ep=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?tp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?np(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),tp=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),np=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),lp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),ap=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(lp,{prefix:t,unit:n,suffix:l})})})),ip={AdTile:pt,ApplicationForm:li,ApplicationLeadForm:gi,BankAccountFiltration:fr,BenefitsBlock:wr,BonusBenefitsBlock:Cr,ButtonsBlock:Ir,CalculatorBonus:$r,CalculatorBusinessDeposit:ss,CalculatorCredit:ws,CalculatorDeposit:Ls,CalculatorRefinancing:Ks,CardTransfer:to,Carousel:co,CarouselCard:po,CarouselCatalogCard:xo,CarouselLinks:yo,CarouselRecommendationCard:Io,CarouselTariffsCard:Mo,DepositFiltration:Oo,Depository:Qo,ErrorBlock:tc,ExchangeRateTile:Bc,Footer:Xc,GrantSupport:Gc,Header:od,Headline:C,HorizontalLayout:hd,ImgBlock:ud,LinkDocs:kd,MobileAppTile:Id,MortgageFiltration:Gd,OfficesAtmsMap:kh,Placeholder:Sh,ProductBlock:ut,ProductGallery:Ch,RepresentativeOfficeInfo:Th,RichTextBlock:Ph,RollupItem:Oc,SafeDepositRental:Gh,StepsBlock:au,StickyBottomMenu:wu,TabsLayout:Mu,TariffsTable:Qu,TextBlock:ep,UnitBlock:ap,VerticalLayout:md},rp=me((()=>{a((()=>{Tt()}),[]);const e=zt();tn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");St({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const sp="cookie",op=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=en();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(sp)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(sp,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Wa,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),cp=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=cu({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return tn(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),dp=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:ou(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return tn(globalThis.document,"keydown",r),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),mp="header",hp="footer",up="sticky-footer",pp={},gp=d((({className:e,data:t=pp,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);rp();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:mp})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:hp})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:up})}):null,o(cp,{}),o(dp,{}),o(op,{__html:d?.cookieContent?.__html})]})}));Object.assign(gp,{childrenTypes:[],slots:()=>[mp,hp,up]});e.Blocks=ip,e.ContentPage=gp,e.handlerDecorator=me,e.joinList=ir,e.packageVersion="0.14.580",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),_=e=>Boolean(e?.startsWith("#")),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:A,isLocalURL:O,isHash:_,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:F,hasPrefix:E});const L="/api/",$=`${L}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),_(t),[z.CDN,L].some((e=>E(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${$}/${t}/attachment`;const l=t?.startsWith("/");return F(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},q=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,u=U(d)(F(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(Y,{className:e,children:c("svg",{className:h(K(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:u,xlinkHref:u})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},K=e=>e?"":"w-full h-full",Y=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(X.SITE_URL),t=V(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(l,e||"/");l&&!s&&O(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=fe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[l?o("div",{className:h(r,se[i]),children:l}):null,fe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},fe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),xe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=we(),v=V(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,x]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:De(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Oe=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),_e=d((({isTabularBenefits:e,...t})=>o(e?Oe:Ae,{...t}))),Fe=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(je(n))}):null,je=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Le(a,r),d=Le(i,r);return l||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:$e({...a,iconVersion:c}),appendRight:$e({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Le=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},$e=e=>Fe(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(qe)}):null)),qe=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ye={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(_e,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Ye[i]}):null,T,f?.length?o(We,{priceList:f}):null,Je(x)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ut=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ut,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ft=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},xt=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:xt(e)}:{},yt=(e,t="birthday")=>e?{[t]:ft(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:xt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},St="rshb-query-params";function Ct(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,n]=Tt(e.find((([e])=>e(t))));return n(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Mt(this),[()=>!0,e]])}}const Mt=e=>[...e?.parent?Mt(e.parent):[],e.entry],Rt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Ct();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Vt(t?.target)?.(n)}}},Vt=Bt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Dt(){return Dt._impl()}Dt._impl=()=>({forwardQuery:Rt}),Dt.setup=e=>{Dt._impl=e};const zt=e=>e,At=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return Ot(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[h,u]=l({}),p=i(((e,t)=>{const{parse:n=zt,format:l=zt}=t||{};return{value:l(s[e]),isDirty:d||h[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),u((t=>({...t,[e]:!0})))}}}),[c,d,h]),g=i((e=>{c(e),u(e)}),[]),f=i((()=>{c(e),m(!1),u({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(h).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},Ot=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),_t=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Ft=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Et=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jt=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Lt="/api/v1/outservice/outserviceregions",$t=e=>"OUTSERVICE"===e?Lt:void 0,Ut=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Wt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),qt="appearance-none w-5 h-5 border-solid flex-none",Ht=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Kt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Wt,{paths:Ht,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",Xt(l)),onClick:s,children:[o("div",{className:h(qt,"m-0",a?"rounded-full border-2":Jt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Gt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Yt(n)]})})})),Yt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Xt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Gt=(e=!1)=>e?"radio":"checkbox",Jt=(e=!1)=>h("rounded border",{"bg-primary-main":e}),Zt=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(Kt,{text:t,value:n,disabled:a,onChange:r},l),Ut(i)]})));function Qt(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function en(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function tn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return en(globalThis.document,"click",n),t}const nn=()=>{},ln="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",an=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,rn=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{f&&f(e.target?.value||"")}),[f]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=sn(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[an(d),N?o("textarea",{className:h("block resize-y min-h-24",S,T),id:h("textarea",n),name:l||n,placeholder:m,value:u,onChange:k,onFocus:x,onBlur:b},e):o("input",{type:r,className:h("h-14",S,C,T),ref:w,id:n,name:l||n,placeholder:m,value:u,onChange:k,onFocus:x,onBlur:b,pattern:y},e)]}),g]})})),sn=e=>e?ln:"border-error",on=e=>(e?.suggestions||[]).map((e=>({...e,processedValue:e?.value}))),cn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"}},dn=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),mn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e.processedValue),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function hn({isOpen:e,value:t,name:n,onChange:c}){const d=s(t),m=s(t),[h,u]=l([]),p=dn(),g=cn[n],f=i((()=>{m.current=t,p.close()}),[t]),x=i((e=>{f(),m.current=e,c&&c(e)}),[f,c]),b=s(null),y=r((()=>async e=>{if(!g)return;const t=await(e=>{const{url:t,query:n,requestData:l={}}=e;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:n})}).then((e=>e.json())).then(on)})({url:g.url,requestData:{...g?.requestData},query:e});t?.length&&u(t)}),[]),v=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(y,300)),[y]);return a((()=>{if(!e||!b.current||m.current===t)return void f();const n=b.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&d.current!==t&&(v(t),d.current=t),p.update(o(mn,{options:h,value:t,onChange:x}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,h,t,x]),b}const un=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=nn,onBlur:s,isTextarea:d,type:m,name:u="",dadata:p=!1})=>{const[g,{setFalse:f,setTrue:x}]=Qt(),b=tn(f),y=hn({isOpen:g&&p,name:u,value:n,onChange:r});return c("div",{className:h("shrink-0 w-full",e),ref:b,onBlur:f,onFocus:x,children:[o("div",{ref:y,children:o(rn,{type:m||"text","aria-label":t,label:pn(i,t),valid:Boolean(!a),value:n,onChange:r,onBlur:s,isTextarea:d,placeholder:gn(l,i,t)})}),Ut(a)]})})),pn=(e,t)=>t&&e?`${t}*`:t,gn=(e,t,n)=>t&&!n?`${e}*`:e,fn=e=>e?.text||e?.key||"",xn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,bn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:xn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:fn(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const yn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:u="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x})=>{const[b,{setFalse:y,setTrue:v}]=Qt(),[N,w]=l(""),k=x||0===n.length,S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=dn(),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=tn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(bn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:C,iconVersion:g});return c("div",{className:h("space-y-xs",e),children:[an(t),c("div",{className:h("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Nn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:fn(r)||u}),vn(S,g)]}),p&&S?o("div",{className:h("absolute top-0 w-full z-20"),children:o(rn,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),vn=(e,t)=>o(q,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Nn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),wn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(yn,{...l,valid:!n,label:l?.errors?`${t}*`:t}),Ut(n)]}))),kn=e=>!e?.length,Sn=e=>t=>n=>e(n)?[]:[t],Cn="Некорректно заполненное поле",Tn=Sn((e=>null!=e&&""!==e))(Cn),In=Sn((e=>e?.key&&""!==e?.key))(Cn),Bn=Sn((e=>"string"==typeof e&&e.length>1))(Cn),Pn=Sn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Cn),Mn=(Rn=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Sn((e=>"string"==typeof e&&Rn.test(e))))(Cn);var Rn;const Vn=Sn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Dn={typeForm:Tn,surname:Bn,name:Bn,region:In,addressBranch:In,phone:Mn,secondaryPhone:Mn,birthday:Tn,education:Tn,housing:Tn,employment:Tn,organization:Tn,amountWorkers:Tn,employerActivities:Tn,employerOrganization:Tn,positionOrganization:Tn,email:Tn,fullName:Bn,inn:Pn,legalForm:Tn,organizationName:Tn,generalSeniority:Tn,lastJobExperience:Tn,experience5Years:Tn,jobsNumber:Tn,beginDate:Tn,fullAddress:Tn,partnerComments:Tn,collectionCount:Tn,comment:Tn,acquiringType:In,feedbackMethod:In,serviceType:In,serviceDirection:In,meetingDay:Tn,product:Tn,localities:Tn,consentDataProcessing:Vn,annualRevenue:Tn,consentToReceiveMaterials:Vn,processPersonalDataLeadFlg:Vn,consentProviderFlg:Vn,consentPhotoFlg:Vn,consentPfrFlg:Vn,consentAssignmentClaimsFlg:Vn,consentCollectionFlg:Vn,consentInformFlg:Vn},zn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Dn?.[e]])))},An=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},On=(e,t,n=!1)=>n?An(e,t):e,_n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Fn=d((({field:e,input:t})=>o(wn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:_n,...On(e("acquiringType"),Dn.acquiringType,t?.required)}))),En=(e="")=>Boolean("trade"===e||"all"===e),jn=e=>null!=e,Ln=new Map,$n=e=>Boolean(e?.every((e=>Array.isArray(e)?$n(e):!e||"string"==typeof e))),Un=e=>$n(e)?e.toString():"";function Wn(e,t,{fallback:n,cache:i}={}){const s=r((()=>qn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(jn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Ln)=>n=>{const l=Un(n),a=t.get(l);if(l&&jn(a))return a;const i=e(...n);return l&&jn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function qn(e){return Array.isArray(e)?e:e instanceof Function?qn(e()):[e]}const Hn=[];const Kn=async e=>await it(e,{method:"GET"})||Hn;function Yn(){const{data:e}=Wn("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const Xn=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?Yn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=Wn(e?`/api/v1/branches?regionCode=${e}`:null,Kn);return t||Hn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(wn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...On(e("addressBranch"),Dn.addressBranch,t?.required),isSearch:!0})})),Gn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},Jn=(e,t,n)=>Math.max(t,Math.min(e,n));function Zn(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Qn({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=Zn(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const el=1,tl=100,nl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:el),max:s=(a.length?a.length-1:tl),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=Gn(e,{normalize:(e=0)=>a.length?ll(a)(e):Jn(e,r,s),format:Ue()}),f=i((e=>{p&&p(Zn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ln,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:f,...g}),Qn({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),al(l)]})})),ll=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),al=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),il=["От 1 000 ₽","До 1 000 000 000 ₽"],rl=d((({field:e})=>o(nl,{title:"Сумма, ₽",items:il,min:1e3,max:1e9,...e("amount")}))),sl=e=>{const{data:t,error:n}=Wn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,ol);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},ol=async e=>await it(e,{method:"POST"})||[],cl=ht((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(wn,{placeholder:"Выберите из списка",label:n,options:dl(i),...On(e(l),Dn[l],a?.required)})})),dl=e=>(e??[]).map((e=>({key:e,value:e}))),ml=d((({field:e,input:t})=>{const{data:n}=sl("EMPLOYEES_NUMBER");return o(cl,{field:e,source:n||[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),hl=d((({field:e,input:t})=>o(un,{label:"Годовая выручка, ₽",...On(e("annualRevenue"),Dn.annualRevenue,t?.required)}))),ul=d((({field:e})=>o(un,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),pl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=gl(t,e),c=fl(t,i,r);h.push(o("td",{children:o("div",{className:xl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},gl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),xl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),bl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],yl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=nn,setValue:d=nn})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:h,totalDays:u}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:bl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:pl({firstDayOfWeek:h,today:e,totalDays:u,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),vl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Nl=vl.map((e=>({key:e}))),wl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),kl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Sl={className:"min-w-32",iconVersion:"black",isBorder:!1},Cl=d((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=Qt(!1),[p,g]=l(n?.getMonth()||(new Date).getMonth()),[f,x]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=tn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(vl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Nl,yearsOptions:wl,ref:s}})({onYearSelect:x,onMonthSelect:g,onShowCalendar:u,selectedYear:f,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:C,children:[an(t),c("div",{className:"relative",children:[Tl(S,n,a),m?c("div",{className:"absolute bg-white z-20 select-none bottom-full",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(q,{...kl,className:"-rotate-90 cursor-pointer"})}),o(yn,{onChange:v,value:{key:vl[p]},options:w,...Sl}),o(yn,{onChange:N,value:{key:String(f)},options:k,...Sl}),o("div",{className:"my-auto",onClick:y,children:o(q,{...kl,className:"rotate-90 cursor-pointer"})})]}),o(yl,{today:n,currentMonth:p,currentYear:f,onDateSelect:d,min:r,max:s})]}):null]})]})})),Tl=(e,t,n)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(k,{children:t&&ft(t)}),o(q,{...kl,name:"CalendarIcon"})]}),Il=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Cl,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),Ut(n)]}))),Bl=d((({field:e,input:t})=>o(Il,{label:"Дата начала работы на текущем месте",...On(e("beginDate"),Dn.beginDate,t?.required),...t}))),Pl=d((({field:e,input:t})=>o(Il,{label:"Дата рождения",...On(e("birthday"),Dn.birthday,t?.required)}))),Ml=d((({field:e,input:t})=>o(un,{label:"Количество объектов инкассации",type:"number",...On(e("collectionCount"),Dn.collectionCount,t?.required)}))),Rl=d((({field:e,input:t})=>o(un,{className:"col-span-2",...On(e("comment"),Dn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Vl=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на уступку прав требований)",...On(e("consentAssignmentClaimsFlg"),Dn.consentAssignmentClaimsFlg,t?.required)}))),Dl=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",...On(e("consentCollectionFlg"),Dn.consentCollectionFlg,t?.required)}))),zl=d((({field:e,input:t})=>o(Zt,{text:"Согласие на информирование о продуктах и услугах Банка",...On(e("consentInformFlg"),Dn.consentInformFlg,t?.required)}))),Al=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на фотографирование)",...On(e("consentPhotoFlg"),Dn.consentPhotoFlg,t?.required)}))),Ol=d((({field:e,input:t})=>o(Zt,{text:"Согласие об использовании простой электронной подписи",...On(e("consentProviderFlg"),Dn.consentProviderFlg,t?.required)}))),_l=d((({field:e,input:t})=>o(Zt,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...On(e("consentToReceiveMaterials"),Dn.consentToReceiveMaterials,t?.required)}))),Fl=d((({field:e,input:t})=>o(Il,{label:"Желаемая дата встречи",...On(e("desiredMeetingDate"),Dn.meetingDay,t?.required)}))),El=d((({field:e,input:t})=>{const{data:n}=sl("EDUCATION_LEVEL");return o(cl,{field:e,source:n||[],label:"Образование",fieldName:"education",input:t})})),jl=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(un,{label:"Электронная почта",...On(e("email"),Dn.email,n),...l})})),Ll=d((({field:e,input:t})=>{const{data:n}=sl("ORGANIZATION_ACTIVITY_TYPE");return o(cl,{field:e,source:n||[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),$l=d((({field:e,input:t})=>{const{data:n}=sl("ORGANIZATION_KIND");return o(cl,{field:e,source:n||[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Ul=d((({field:e,input:t})=>{const{data:n}=sl("EMPLOYMENT_TYPE");return o(cl,{field:e,source:n||[],label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Wl=d((({field:e,input:t})=>o(un,{label:"Стаж",placeholder:"За последние 5 лет",...On(e("experience5Years"),Dn.experience5Years,t?.required),...t}))),ql=d((({field:e,input:t})=>o(wn,{label:"Способ получения ответа",options:jt,...On(e("feedbackMethod"),Dn.feedbackMethod,t?.required)}))),Hl=d((({field:e,input:t})=>o(un,{label:"Адрес",...On(e("fullAddress"),Dn.fullAddress,t?.required),...t}))),Kl=d((({field:e,input:t})=>o(un,{label:"ФИО",...On(e("fullName"),Dn.fullName,t?.required),...t}))),Yl=d((({field:e,input:t})=>o(un,{label:"Общий стаж",placeholder:"Количество лет",...On(e("generalSeniority"),Dn.generalSeniority,t?.required),...t}))),Xl=d((({field:e,input:t})=>{const{data:n}=sl("HOUSE_TYPE");return o(cl,{field:e,source:n||[],label:"Тип жилья",fieldName:"housing",input:t})})),Gl=d((({field:e,input:t})=>o(un,{label:"ИНН",type:"number",...On(e("inn"),Dn.inn,t?.required)}))),Jl=d((({field:e})=>o(Zt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Zl=d((({field:e,input:t})=>o(un,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...On(e("jobsNumber"),Dn.jobsNumber,t?.required),...t}))),Ql=d((({field:e,input:t})=>o(un,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...On(e("lastJobExperience"),Dn.lastJobExperience,t?.required),...t}))),ea=d((({field:e,input:t})=>o(un,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...On(e("legalForm"),Dn.legalForm,t?.required),...t})));function ta(e="/api/v1/regions"){const{data:t}=Wn(e,rt);return Array.isArray(t)?t:[]}const na=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=ta(Lt)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(wn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...On(e("localities"),Dn.localities,t?.required),isSearch:!0})})),la=d((({field:e,input:t})=>o(un,{label:"Отчество (Обязательно, при наличии)",...e("middleName"),...t}))),aa=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(un,{label:"Имя",...On(e("name"),Dn.name,n),...l})})),ia=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ra=d((({field:e})=>En(e("acquiringType")?.value?.key)?o(ia,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),sa=d((({field:e,input:t})=>{const{data:n}=sl("ORGANIZATION_TYPE");return o(cl,{field:e,source:n||[],label:"Тип организации",fieldName:"organization",input:t})})),oa=d((({field:e,input:t})=>o(un,{label:"Наименование организации",...On(e("organizationName"),Dn.organizationName,t?.required),...t}))),ca=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(un,{...On(e("partnerComments"),Dn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),da=e=>"_"===e,ma=e=>/\d/.test(e),ha=e=>da(e)||ma(e),ua=[..."+7 (___) ___-__-__"],pa=ua.findIndex(da),ga=ua.map(((e,t)=>ha(e)?ua.slice(0,t).filter(ha).length:-1));const fa=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ua.map(((e,n)=>ma(e)?e:t.charAt(ga[n])||e)),l=ga.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(pa,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(rn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),xa=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(fa,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ut(l)]}))),ba=d((({field:e,input:t})=>o(xa,{label:"Телефон",...On(e("phone"),Dn.phone,t?.required)}))),ya=d((({field:e,input:t})=>{const{data:n}=sl("POSITION");return o(cl,{field:e,source:n||[],label:"Должность в организации",fieldName:"positionOrganization",input:t})})),va=d((({field:e})=>En(e("acquiringType")?.value?.key)?o(ia,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Na=d((({field:e,input:t})=>o(Zt,{text:"Согласие на обработку персональных данных",...On(e("processPersonalDataLeadFlg"),Dn.processPersonalDataLeadFlg,t?.required)}))),wa=ht((({field:e,source:t})=>o(wn,{placeholder:"Выберите продукт",label:"Продукт",options:ka(t?.productList),...An(e("product"),Dn.product)}))),ka=e=>(e??[]).map((e=>({key:e,value:e}))),Sa=d((({field:e,input:t,url:n})=>{const l=ta(n);return o(wn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...On(e("region"),Dn.region,t?.required)})})),Ca=d((({field:e,input:t})=>{const n=Yn(),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(wn,{label:"Регион",placeholder:"Выберите регион",options:l,...On(e("region"),Dn.region,t?.required)})})),Ta=d((({field:e})=>{const t=e("secondaryPhone");return o(xa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?An(t,Dn.secondaryPhone):t})})),Ia=d((({field:e,input:t})=>o(wn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Et,...On(e("serviceDirection"),Dn.serviceDirection,t?.required)}))),Ba=d((({field:e,input:t})=>o(un,{label:"Фамилия",...On(e("surname"),Dn.surname,t?.required),...t}))),Pa=["От 1 мес","До 15 лет"],Ma=d((({field:e})=>o(nl,{title:"Срок, месяцев",items:Pa,min:1,max:180,...e("term")}))),Ra=d((({field:e,input:t})=>o(wn,{label:"Тип обслуживания",options:Ft,...On(e("serviceType"),Dn.serviceType,t?.required)}))),Va=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(ln.split(" ").filter((e=>"rounded"!==e)),qt,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),Da=["currencyControl","documentOperations","conversionTransactions","otherIssues"],za=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Va,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(Va,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(Va,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(Va,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const Aa={$ref:"/wcms-resources/outservice-productlist.json"},Oa=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(Ba,{field:e,input:n}),name:o(aa,{field:e,input:n}),middleName:o(la,{field:e,input:n}),phone:o(ba,{field:e,input:n}),email:o(jl,{field:e,input:n}),fullName:o(Kl,{field:e,input:n}),inn:o(Gl,{field:e,input:n}),legalForm:o(ea,{field:e,input:n}),organizationName:o(oa,{field:e,input:n}),generalSeniority:o(Yl,{field:e,input:n}),lastJobExperience:o(Ql,{field:e,input:n}),experience5Years:o(Wl,{field:e,input:n}),jobsNumber:o(Zl,{field:e,input:n}),beginDate:o(Bl,{field:e,input:n}),fullAddress:o(Hl,{field:e,input:n}),comment:o(Rl,{field:e,input:n}),addressBranch:o(Xn,{field:e,input:n,isPremium:a}),birthday:o(Pl,{field:e,input:n}),desiredMeetingDate:o(Fl,{field:e,input:n}),product:o(wa,{field:e,source:Aa}),localities:o(na,{field:e,input:n}),isClient:o(Jl,{field:e}),partnerComments:o(ca,{field:e,input:n}),collectionCount:o(Ml,{field:e,input:n}),acquiringType:o(Fn,{field:e,input:n}),onlineCheckout:o(ra,{field:e}),posTerminal:o(va,{field:e}),serviceType:o(Ra,{field:e,input:n}),term:o(Ma,{field:e}),amount:o(rl,{field:e}),annualRevenue:o(hl,{field:e,input:n}),vedTypes:o(za,{field:e}),feedbackMethod:o(ql,{field:e,input:n}),serviceDirection:o(Ia,{field:e,input:n}),bankEmpolee:o(ul,{field:e}),secondaryPhone:o(Ta,{field:e}),consentToReceiveMaterials:o(_l,{field:e,input:n}),processPersonalDataLeadFlg:o(Na,{field:e,input:n}),consentProviderFlg:o(Ol,{field:e,input:n}),consentPhotoFlg:o(Al,{field:e,input:n}),consentAssignmentClaimsFlg:o(Vl,{field:e,input:n}),consentCollectionFlg:o(Dl,{field:e,input:n}),consentInformFlg:o(zl,{field:e,input:n}),applicationDate:o(un,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(Zt,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o(Ca,{field:e}):o(Sa,{field:e,input:n,url:$t(t)}),education:o(El,{field:e,input:n}),housing:o(Xl,{field:e,input:n}),employment:o(Ul,{field:e,input:n}),organization:o(sa,{field:e,input:n}),amountWorkers:o(ml,{field:e,input:n}),employerActivities:o(Ll,{field:e,input:n}),employerOrganization:o($l,{field:e,input:n}),positionOrganization:o(ya,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},_a=e=>2===e?"@xl:grid-cols-2":"",Fa=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function Ea({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const ja={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},La={primary:h("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},$a=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Ea(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h(ja[a],La[a]),l),type:s,role:d,onClick:m,children:e})})),Ua=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(q,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Wa=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Ua,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),qa=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Wa,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o($a,{type:"button",onClick:r,children:"Хорошо"})]})})})),Ha=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(qa,{...e}),n),close:n}},Ka=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Ya=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${En(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,h={...d,...Ga(o),...Xa(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Xa=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ga=e=>e?{vedTypes:Object.fromEntries(Da.map((t=>[t,t===e])))}:{},Ja={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:_n[0],serviceType:Ft[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:Da[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Za=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),Qa=(e,t)=>o($a,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ei=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Kt,{...e}),o(Za,{link:t})]}),Ut(An(e,Vn).error)]}):o(Za,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Qa(n)]}),ti={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,f=g?"/api/v1/lead":"/api/v1/sendcorporatelead",x={typeForm:n,...vt(l,g),...Nt(i,g),...bt(a),...yt(s,"desiredMeetingDate"),...g?yt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...wt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},ni=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ja[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Ft[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),N=i((async(e,t)=>{const l=li(x,e),a=Ka(zn(l));if(!kn(a(e)))return"Fail";const i=Ya({...e,...u}),r=await ti.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Ha({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Dt();kt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=At(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(_t,{className:h("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:h(_a(e.columns),"grid gap-x-m"),children:[Fa(e.title),(e?.inputs||[])?.map(Oa(k,n))]},`section-${t}`))),ei(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),li=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),ai=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],ii={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:_n[0],serviceType:Ft[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:Da[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1},ri=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ii[e.name]]))),typeForm:{key:t,text:""}}),si=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const oi=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),ci=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(On(n(e?.name),Dn[e?.name],e?.required))))),[e]);return o("div",{className:"w-fit",children:o(si,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(oi,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(Oa(n,t))}),renderFoldButton:di(c("div",{children:[o(Kt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Ut(i?"Отметьте все обязательные соглашения":"")]}))})})})),di=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(q,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),mi=(e,t)=>o($a,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),hi=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ui=async(e,t,n)=>await fetch("https://retail-light-api.cprb.dev.rshbdev.ru/api/v1"+e,{method:t,headers:{"Content-Type":"application/json",...hi()},credentials:"include",body:n?JSON.stringify(n):null}).then((e=>(e=>"application/json"===e.headers.get("Content-Type"))(e)?e.json():e)),pi=e=>{sessionStorage.setItem("accessToken",e.access_token),sessionStorage.setItem("refreshToken",e.refresh_token)},gi=async e=>await ui("/public-data/createUserProfile","POST",e),fi=async e=>await ui("/user-data/updateUserProfile","PUT",e),xi=async e=>await ui("/user-data/createDraftTask","POST",e),bi=async e=>await ui("/user-data/updateUserTask","PUT",e),yi=async e=>await ui("/sms/sendCode","POST",e),vi=async e=>await ui("/sms/checkCode","POST",e).then(pi),Ni=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),wi=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:ki(e)})))),ki=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Si=d((({values:e,setValues:t,hasError:n})=>{const[r,d]=l(0),m=s([]);a((()=>{m.current?.[r]?.focus()}),[r]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=n===e.length-1,r=a.length>1;i&&r||(t(e.map(((e,t)=>t===n?a:e))),d(n+1))}),[e]),u=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),d(l)}}),[e]),p=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),d(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:p,ref:e=>{m.current||(m.current=[]),m.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:u(l),className:Ci(l,e,n)},l)))}),n?o("div",{className:"text-error",children:"Неверный код"}):null]})})),Ci=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},Ti=d((({isDisabled:e,onClick:t,text:n})=>o($a,{type:"button",onClick:t,disabled:e,children:o(Re,{font:"font-medium",children:n})}))),Ii=d((({title:e,phone:t,description:n,__html:s,code:d=!0,codeLength:m=4,textButton:h="",onClose:u,href:p=""})=>{const{close:g}=de(),[f,x]=l(Array(m).fill("")),[b,y]=l(!1),[v,N]=l(!1),[w,k]=l(180),S=r((()=>f.every(Boolean)),[f]);a((()=>{yi({phoneNumber:t,smsCodesSetName:{key:"AUTHENTICATION"}})}),[]);const T=i((async()=>{try{N(!0),await vi({smsText:f.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),globalThis.location.href=p,g(),u&&u()}catch{N(!1),y(!0)}}),[f]);return o(Wa,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:e,description:n,headlineVersion:"S",isEmbedded:!0}),d?o(Si,{values:f,setValues:x,hasError:b}):null,w?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(wi,{className:"text-primary-main ml-1",time:w,setTime:k})]}):o(be,{className:"text-primary-main",children:"Получить новый код"}),o(Pe,{itemSize:"list-s",__html:s}),h?o(Ti,{isDisabled:!S,onClick:T,text:h}):null,v?o(Ni,{blur:!1}):null]})})})),Bi=(e,t)=>{const[n,a]=l("");return{handleSubmit:i((async n=>{const l=Ka(zn(e));if(!kn(l(n)))return"Fail";try{const{profile:e}=await gi({profile:{phone:xt(n.phone)}}),l=e?.id;if(l&&n?.phone){const e=async()=>{try{await fi(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:h,consentCollectionFlg:u,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&ft(i,!0),email:s,phone:xt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(h),consentCollectionFlg:Boolean(u),consentInformFlg:Boolean(p)}}})(l,n));const{taskId:e,participantId:i}=await xi({profileId:l,programId:t});await bi(((e,t,n,l)=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))(i,e,l,n)),a("OK")}catch{a("Fail")}};(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Ii,{...e}),n),close:n}})({onClose:e,...Pi(n?.phone)}).open()}}catch{a("Fail")}}),[]),responseStatus:n}},Pi=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phone:xt(e),textButton:"Оформить",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>соглашение о порядке использования простой электронной подписи,\n </li><li>согласие на обработку персональных данных,\n </li><li>предоставление и подписание прочих согласий Банка,\n </li><li>согласие на запрос в ПФР</li></ul>",href:"/credit-lead"}),Mi=d((({className:e,title:t,programId:n,typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],u=ri(m,i),[p,g]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const{handleSubmit:f,responseStatus:x}=Bi(m,n||"");if(x){Ha({responseType:x,typeForm:i}).open()}const[,{field:b,onSubmit:y,reset:v}]=At(u,{onSubmit:f});return a((()=>{"OK"===p&&(g(""),v())}),[p]),o(_t,{className:h("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:h(_a(e.columns),"grid gap-x-m"),children:[Fa(e.title),Ri({field:b,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),mi(s)]})})})),Ri=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=Vi(n||[]);return l.length>2?c("div",{children:[a.map(Oa(e,t)),o(ci,{inputs:l,field:e})]}):(n||[])?.map(Oa(e,t))},Vi=e=>({consentInputs:e?.filter((e=>ai.includes(e.name)))||[],restInputs:e?.filter((e=>!ai.includes(e.name)))||[]}),Di=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),zi=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ai=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Oi(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const _i=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Oi(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),Fi=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Ei=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Li(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?ji(c,v):{},...N?Ai(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(_i,{className:h(m,a?Fi[a-1]:"",{"h-full":N},t),style:w?ji(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),ji=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Li=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),$i={"horizontal-list":"w-6","vertical-list":"h-6"},Ui=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?$i[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Wi=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},qi=e=>e,Hi=(e=qi)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Ki=Hi(),Yi=(e=qi)=>Hi((t=>-e(t))),Xi=Yi(),Gi=e=>t=>e.scrollWidth/t,Ji=e=>(t,n)=>{e.scrollBy({left:n*Gi(e)(t),behavior:"smooth"})},Zi=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Yi()(a),Hi()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?Ji(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?Ji(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Qi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},er=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[u,p]=Zi({itemCount:s.length}),g=tr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Ei,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Wi({activeIndex:t,onClick:f}))}):n?o("div",{className:h("flex gap-xs",Qi[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Ui({activeIndex:t,onClick:f,listType:l}))}):null})),tr=(e=!1)=>({behavior:e?"auto":"smooth"}),nr=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),lr=d((e=>o(nr,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ar=d((e=>o(nr,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ir="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",rr=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?sr(t):null,i?o(lr,{className:h(or(a),m?"left-1":"left-0"),onClick:s}):null,r?o(ar,{className:h(or(a),m?"right-1":"right-0"),onClick:d}):null]})})),sr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(ir,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(ir,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),or=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),cr=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Zi({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(Ei,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(rr,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(x?.length)}),o(er,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),dr=({blocksToRender:e,...t})=>o(cr,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",zi(!0)),children:B(e,t)},String(n))})}),mr=e=>e%2!=0,hr=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),ur=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(hr,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),pr=({isUnfolded:e,onToggle:t})=>o(ur,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),gr=["ArrowDownIcon","ArrowUpIcon"],fr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",xr=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(fr),children:[M(i,{...a.options,parent:n}),mr(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(si,{renderFoldableSection:({isUnfolded:e})=>c(oi,{className:h(fr),isUnfolded:e,children:[M(r,{...a.options,parent:n}),mr(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(ur,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:gr[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},br=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[yr(n,t),xr({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[yr(n,t),dr({...l,blocksToRender:t})]});default:return null}})),yr=(e,t)=>e&&!t.length?o(Di,{...e}):null,vr=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Nr=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ia,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),wr=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,vr(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(kr(l)).filter(Boolean))]}),n?o("div",{children:o($a,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),kr=e=>([t,n])=>{const l=n?.type;return"array"===l?Sr(t,e)(n):null},Sr=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Nr,{items:l,multiple:!n?.single,...t(e)})]},e)};function Cr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Tr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Ir=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Tr(t[e])||Tr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Tr(t[e])||Tr(n[e])||Br(t[e])<=Br(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Tr(t[e])||Tr(n[e])||Br(t[e]?.min)>=Br(n[e]?.min)&&Br(t[e]?.min)<=Br(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Tr(t[e])||Tr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Tr(t[e])||Tr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Br=e=>Number(e||0),Pr=(e,{block:t,page:n,normalize:l=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=At(e),d=r((()=>Cr(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=zt)=>e?.filter((([,e])=>Ir(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Mr={},Rr={},Vr=ht((({className:e,filtrationSchema:t=Mr,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Pr(Rr,{block:a.block,page:a.options?.page}),d=o(yn,{className:"w-64",label:n?.title,options:Dr(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Dr(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(wr,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o($a,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(br,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Dr=e=>Cr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),zr=(e=!1)=>e?"text-left":"text-center",Ar={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Or=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",Ar[n],e),children:o(q,{...i,width:"54%",height:"54%",name:a})}):null})),_r=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:zr(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Fr)}):null]})})),Fr=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Or,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Er=(e,t,n)=>{return o(cr,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Re,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Re,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},jr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Er(e,0,t):null]}))),Lr={start:"justify-start",center:"justify-center",end:"justify-end"},$r=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Lr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),Ur=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Wr="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",qr="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Hr="flex flex-col gap-y-xl min-w-52",Kr=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Yr=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Kr,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),Xr=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Gr=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Jr=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Zr=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Jr,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Gr,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Yr,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Qr=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(nl,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),es={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ts={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ns=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=es.prefMonthsNum,prefTravelBonusRate:i=es.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||ts,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},ls=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=At({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:f}=ns(r,n);return o(Ur,{className:e,title:t,...i,children:c("section",{className:h(Wr,e),children:[c("div",{className:qr,children:[Qr({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Qr({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Zr({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Hr,children:[f>=0?o(Yr,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,Ee(l,{isVertical:!0}),Xr(a)]})]})})})),as=Math.round(29.5),is=(e,t=0)=>e?.sum?e.sum:t,rs=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ss=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,os={horizontal:"gap-5xl",vertical:"flex-col gap-s"},cs=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${os[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Kt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),ds=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(cs,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),ms=e=>ds({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),hs=" (c капитализацией)",us=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Hr,children:[o(Yr,{title:`Доход в конце срока${i?hs:""}`,value:e,postfix:n,prefix:"+"}),o(Yr,{title:`Сумма в конце срока${i?hs:""}`,value:t,postfix:n}),Ee(l,{isVertical:!0}),a?.map(Xr)]}),ps=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:gs([e,t],l),gs=([e,t],n=[])=>({[e]:n.length?Xi(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Ki(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),fs=(e,[t,n],l)=>e>=l[t]&&e<=l[n],xs={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const bs={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ys=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?xs[e?.rateType]:"",{data:n}=Wn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...bs,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&vs(s,e)&&fs(l,["minSum","maxSum"],e)&&fs(n,["minDays","maxDays"],e)))||bs,{rate:m}=d,h=Ns(m,e),u=l+h,p=c||[bs];return{...d,...gs(["minSum","maxSum"],p),...gs(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},vs=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ns=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},ws=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=At({moneyValue:is(r,1e5),daysValue:rs(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=ys(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(Ur,{className:e,title:t,...d,children:c("section",{className:h(Wr,e),children:[c("div",{className:qr,children:[Qr({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(nl,{items:[`От ${ss(v.min||0)}`,`До ${ss(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[ks(p,u),ms({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Zr({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),us({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),ks=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Kt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Kt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ss=(e=[],t=!1)=>Cs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Cs=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Ts=({min:e=0,max:t=0,availableMonths:n,...l})=>o(nl,{items:[`От ${Is(e)}`,`До ${Is(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Is=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Bs=e=>ds({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Ps=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(Jn(t?.[a],n.minMonths,n.maxMonths))},Ms=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},Rs={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Vs=e=>Ds({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ds({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ds({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ds({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ds=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],zs=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[Rs],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Vs({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=ps(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=ps(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Vs({row:e,userInputParams:t,paramsViewSettings:n})&&fs(l,["minSum","maxSum"],e)&&fs(a,["minMonths","maxMonths"],e)))||Rs)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=Ms(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},As=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Os={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},_s=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=n?.rateRows,Cs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=At({moneyValue:is(s,2e5),monthsValue:rs(s,as),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=zs(p,n,r),x=Bs({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Jn(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(Jn(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!As(s)&&m&&Ps({field:g,defParams:m,calcParams:f,map:Os,monthsValue:"minMonths"})}),[n,s]),o(Ur,{className:e,title:t,...d,children:c("section",{className:h(Wr,e),children:[c("div",{className:qr,children:[Qr({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),Ts({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Fs({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:h(Hr,"@4xl:w-1/2"),children:[o(Yr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Yr,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(Yr,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),Ee(l,{isVertical:!0}),Xr(i)]})]})})})),Fs=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Kt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Kt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Es=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},js={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Ls=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Ws(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Us({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Us({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Us({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Us({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,fs(l,["minSum","maxSum"],t),fs(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||js,{rate:h}=m,u=$s(h,e),p=l+u,g=t||[js];return{...m,...gs(["minSum","maxSum"],g),...gs(["minMonths","maxMonths"],g),availableMonths:Es(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},$s=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Us=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Ws=(e,t)=>e+Math.round((t-e)/2),qs=(e="rub")=>"rub"===e,Hs=(e,t)=>{const{minMonths:n,maxMonths:l}=gs(["minMonths","maxMonths"],Gs(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Jn(a,n,l)}},Ks=(e,t)=>{const{minSum:n,maxSum:l}=gs(["minSum","maxSum"],Gs(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Jn(a,n,l)}},Ys=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Xs=e=>{const t=qs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Gs=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Js=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?ds({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?ds({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Zs(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?ms({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},ds({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Zs(e.isShowNewClient),e.isShowNewClient?o(Kt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Zs=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Qs={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},eo={text:"₽",key:"rub"},to=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[eo],g=i((e=>t=>e?{...t,...Xs(t),...Ks(t,e),...Hs(t,e),...Ys(t,e)}:t)(u),[u]),[f,{field:x}]=At({moneyValue:is(d,2e4),monthsValue:rs(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:eo},{normalize:g}),b=x?.("currency")?.value??eo,y=x?.("isNewClient")?.value,v=Gs(u,b),N=Ls(f,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{Ps({field:x,defParams:Ss(v,y),calcParams:N,monthsValue:"minMonths",map:Qs})}),[x,u]);a((()=>{!As(d)&&v&&T()}),[d,u]);const I=w===Ss(v,y)?.rate;return o(Ur,{className:e,title:t,...m,children:c("section",{className:h(Wr,e),children:[c("div",{className:qr,children:[c("div",{className:"flex gap-m",children:[Qr({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:no(b?.key)}),u&&u?.length>1?o(wn,{label:"Валюта",options:p,...x("currency")}):null]}),Ts({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Js({...N,...s},x)]}),Zr({rate:w,children:ao(T,I)}),us({income:k,finalSum:S,buttons:[...l,lo(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),no=(e="")=>qs(e)?1e3:100,lo=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},ao=(e,t=!1)=>t?null:o($a,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),io=e=>ro({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ro({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ro=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],so={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},oo=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[so],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>io({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=ps(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=ps(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>io({row:e,userInputParams:t,paramsViewSettings:n})&&fs(l+r,["minSum","maxSum"],e)&&fs(i,["minSumOld","maxSumOld"],e)&&fs(r,["minSumExtra","maxSumExtra"],e)&&fs(a,["minMonths","maxMonths"],e)))||so)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Ms(p,e),f=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},co=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=At({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=oo(s,n,i),u=Bs({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ur,{className:e,title:t,...r,children:c("section",{className:h(Wr,e),children:[c("div",{className:qr,children:[Qr({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Qr({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Ts({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),mo({...m,...i},d),m.isExtraMoney?Qr({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(Hr,"@4xl:w-1/2"),children:[o(Yr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Yr,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Yr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Yr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),Ee(l,{isVertical:!0}),Xr(a)]})]})})})),mo=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Kt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),ho=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Gn(e,{normalize:(e=a)=>n&&l?String(Jn(Number(uo(e)),n,l)):uo(e),format:Ue(r)}),d=i((e=>t&&t(uo(e))),[t]);return o(rn,{onChange:d,...s,...c})})),uo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),po=d((e=>o(ho,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),go={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},fo={amount:1500},xo=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=At(fo),[u,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:go[r],children:[o(po,{valid:!u,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o($a,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),bo=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),yo="relative h-full",vo={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},No=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(So),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:wo(n,{someCardsHighlighted:i}),children:[B(n,l,{className:ko(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),So(n)?bo({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},wo=(e,{someCardsHighlighted:t})=>h(yo,t&&(So(e)?"pt-3xl":"pt-3xl sm:pt-16")),ko=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(yo,"min-w-80",vo[l],t&&(So(e)?"pt-3xl sm:pt-16":"pt-3xl"),zi(n),n&&"h-full"),So=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Co=ht((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(cr,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?To(s?.block?.blocks):[],hasBlur:!0,children:No({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),To=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Io="z-10 border border-solid w-full h-full",Bo=h(Io,"absolute hidden @xl:block border-transparent"),Po=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Bo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Bo,"top-6 right-8 bg-green")}),o("div",{className:h(Bo,"top-3 right-4 bg-green-light")}),c("div",{className:h(Io,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Mo={black:"bg-black",white:"bg-white"},Ro=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Vo)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Vo=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Mo[e]}`},String(t)),Do=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),zo=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Ao(l):null]})}))),Ao=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Do,{...e},String(t))))}),Oo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),_o=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),Fo=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Eo=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Fo.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Fe(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},jo(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:Lo(s??!1,a??!1,n),buttonClassName:u})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),jo=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Lo=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),$o=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(_o,{href:a,target:m,className:"h-full",data:Oo(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Fe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Eo,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(_e,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Uo(l,p)]})})}))),Uo=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Wo=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},qo=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const f=d.map(Wo),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Fe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(w,{className:h("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(si,{renderFoldableSection:()=>c("div",{children:[x,o(oi,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Ho(m?.parent,u,y):null}):o("div",{children:x})]})})),Ho=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?ue(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(q,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Ko=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Yo=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Xo=1e9,Go={sum:{min:1e4,max:Xo},period:3},Jo=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Pr(Go,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Zo(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=Qo(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(wr,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(po,{label:l?.title,min:500,max:Xo,...d("sum",{parse:e=>({min:Number(e),max:Xo}),format:({min:e})=>String(e)})}),o(nl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(br,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Zo=e=>st((e?.paramsSource?.rateRows||[]).filter(Ko).flatMap((e=>Yo(e.minMonths,e.maxMonths)))),Qo=e=>st(e.flatMap((e=>e||[])).filter(Ko).flatMap((e=>Yo(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],ec=[{key:"10"},{key:"50"},{key:"100"}],tc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(yn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:ec,iconVersion:"black"})]})},nc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",lc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:nc,"aria-label":`Страница ${i}`,children:i},String(t)):null},ac={width:"24",height:"24"},ic=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:rc(1===e),...ac})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:nc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(lc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:nc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:rc(e===n),...ac})})]})},rc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",sc=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(ic,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(tc,{itemCount:l,onItemCountChange:a}):null]}),oc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",ln),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),cc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(oc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Cl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Cl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o($a,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),dc=(e,t)=>o(Or,{...e,iconBgVersion:t,className:"shrink-0"}),mc=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[dc({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:ft(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},hc="/api/v1/depository",uc={startDate:void 0,endDate:void 0,query:""},pc=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=At(uc),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?ft(l,!0):"",r=a?ft(a,!0):"",s=new URLSearchParams(hc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Wn(hc+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(cc,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(mc,{...e},String(e.publicId)))):o(Di,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(sc,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),gc=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,fc=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:gc(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),xc="location";function bc(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",vc()??{name:e}),r=i((e=>{Nc(e),n(e)}),[]),{data:s}=Wn(yc()?null:"/api/v1/region",rt);return a((()=>{s&&!yc()&&n(s)}),[s]),[t??{name:e},r]}const yc=()=>Boolean(globalThis.localStorage?.getItem(xc)),vc=()=>{try{const e=globalThis.localStorage?.getItem(xc);return e&&JSON.parse(e)}catch(e){return null}},Nc=e=>{try{globalThis.localStorage?.setItem(xc,JSON.stringify(e))}catch(e){}};var wc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(wc||(wc={}));const kc=new Intl.NumberFormat("ru",{style:"currency",currency:wc.RUB}),Sc=e=>e?kc.format(e):"",Cc="text-m font-light text-secondary-text ",Tc=`${Cc} text-left`,Ic=`${Cc} pl-5xl text-center`,Bc=`${Cc} pl-5xl text-right`,Pc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Mc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Tc,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:Ic,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:Bc,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Rc)})]}))),Rc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:Pc[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:Sc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:Sc(e?.buyExchangeRate)})})]},t)},Vc={icon:"GpsIcon"},Dc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Or,{...Vc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),zc=(e,t,n)=>{const l=Number(Ac(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Ac=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Oc=e=>Bt([[e=>e.value!==wc.RUB&&e.oppositeValue!==wc.RUB,()=>e.handleConvert(e.value,wc.RUB)],[e=>e.value===wc.RUB&&e.oppositeValue===wc.RUB,()=>e.handleConvert(e.value,wc.USD)],[e=>e.value===wc.RUB&&e.oppositeValue===wc.RUB,()=>e.handleConvert(e.value,wc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function _c(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(rn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(yn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Fc=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||wc.RUB,selectBuy:n?.[0]?.currency?.currency||wc.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[_c({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Ec(r,d,n),value:r.inputSell,setValue:e=>Lc(d,n)(e,r.selectSell,r.selectBuy)}),_c({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:jc(r,d,t),value:r.inputBuy,setValue:e=>$c(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Ec=(e,t,n)=>l=>{t({selectSell:l}),Oc({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Lc(t,n)(e.inputSell,l,a)}})},jc=(e,t,n)=>l=>{t({selectBuy:l}),Oc({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>$c(t,n)(e.inputBuy,l,a)})},Lc=(e,t)=>(n,l,a)=>{e({inputSell:Ac(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(zc(n,i,l===wc.RUB)||"")})},$c=(e,t)=>(n,l,a)=>{e({inputBuy:Ac(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(zc(n,i,l===wc.RUB)||"")})};const Uc=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=bc(),i=function(e){const t=e?.code||"000",{data:n}=Wn(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Wc(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:wc.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:wc.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Mc,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Dc,{address:i?.address})]}),o(Fc,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Wc=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],qc=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(Hc(n))})})),Hc=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(l)):null},Kc=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(hr,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[dc(a,t),e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(q,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Yc=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Xc=(e=!1)=>e?"MinusIcon":"PlusIcon",Gc=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Jc=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(si,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(oi,{className:h("gap-lg",Yc(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Zc({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Zc=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Gc(e):Xc(e))(a,r);return"accordion"===e?o(Kc,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(ur,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Qc=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:ed(e)}))),ed=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Jc,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(qc,{items:e.items}):null},String(t)))),td=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(nd)}):null)),nd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(ld)})]},String(t)),ld=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:ad(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),ad=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${id(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},id=e=>e.replaceAll(/\D/g,""),rd=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),sd=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(rd,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),od=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),cd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(od,{index:t,...e},String(t))))}):null]}))),dd=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Qc,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(td,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Eo,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(sd,{title:d,links:i}),o(cd,{links:a,license:u})]})})),md=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(wn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:Oo(i,s?.key),children:f})}):null]})})})),hd={width:"103",height:"21"},ud={"bg-white":"color",transparent:"white"},pd={"bg-white":"text-primary-main",transparent:"text-white"},gd=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:ud[e]},className:pd[e],width:n?.width,height:n?.height}),fd={"bg-white":"text-primary-text",transparent:"text-white"},xd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...ue(s),children:[gd(i,n?.image,hd),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:fd[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),bd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},yd=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",bd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),vd=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(xd,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):Nd(p,r),o(yd,{version:a,...l})]})})),Nd=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(q,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,wd={"bg-white":"primary",transparent:"transparent"},kd=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=wd[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(vd,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),Sd=(e=!1)=>e?{}:{padding:"p-0"},Cd={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Td=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",Cd[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:h("w-full",zi(r)),...Sd(l)}})})}),{childrenTypes:[]}),Id=ht((e=>o(Td,{...e})),{childrenTypes:[]}),Bd=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Lr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),Pd=["байт","Кб","Мб","Гб","Тб","Пб"],Md=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...ue(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",Rd(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Rd=(e,t)=>e||t?o("span",{children:", "}):"",Vd=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Pd[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?zd(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Md,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Dd(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},Dd=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,zd=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Ad=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=V(),r=U(a)(e),s=i((()=>{l()}),[]);return c(Wa,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o($a,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Od=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Ad,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Dd(a),o(Re,{font:"font-light",children:e})]})})),_d={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Fd=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",_d[r]),role:"list",children:a.map(Ed(d,i))}):null]})})),Ed=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?jd(t)(n,l):Vd(e,t)(n,l)},jd=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Od,{...l,icon:e,href:Ld(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},Ld=e=>"href"in e,$d=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...f,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ee(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Ud=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Wd=(e=[],t={})=>e.filter((({content:e={}})=>Ir(t,e))).length,qd=(e,t)=>e===t;const Hd=(Kd=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(qd,((e=qd)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Kd(n,t[e])))));var Kd;const Yd=[],Xd={},Gd={primary:"bg-white/30",secondary:"bg-main-divider"},Jd={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Zd=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":Gd[t],a=Jd[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),Qd=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},em={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},tm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},nm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},lm={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},am=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",em[l],n?lm[l]:nm[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?tm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Qd({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Zd,{count:m,version:Ud(n,l)})}):null]})})})),im=d((e=>o(e?.item?.href?rm:sm,{...e}))),rm=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(am,{...e,tag:"a",item:a,onClick:l})})),sm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(am,{item:e,onClick:l,...n})})),om=(e,t,n)=>(l,a)=>o(im,{isActive:l===e,onClick:t,type:n,item:l},String(a)),cm=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(om(l,a,t))}))),dm={categories:[],extraOptions:[],propertyType:[],stage:[]},mm=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=Pr(dm,{block:a.block,page:a.options?.page}),f=i(((e=dm)=>p(e)),[]),x=(({hotFilters:e=Yd,filtrationState:t=Xd,blocks:n=Yd,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Hd(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Wd(n,t.filter),version:Ud(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:f});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(cm,{...x}),o(wr,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(br,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),hm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),um=d((({children:e})=>hm?e:null)),pm="/icons/MapMarkerClusterIcon.svg",gm="/icons/MapMarkerClusterYellowIcon.svg";function fm({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=xm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=xm("workplaces",e,a),r=bm(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=bm(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=bm(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const xm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?pm:gm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),bm=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?pm:gm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),ym={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},vm={...ym,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Nm=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(vm).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),wm=e=>globalThis[e];function km(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=wm(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(wm(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(wm(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const Sm={...ym,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Cm=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Sm).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:n,width:"20",height:"16"})})})),Tm=[55.753995,37.614069],Im=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=km("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?fm({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:Bm(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),fm({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[l?o(Ni,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Cm,{yandexMaps:i}),o(Cm,{yandexMaps:i,direction:"out"})]}),Nm(i,r,h("right-2 top-80",d))]})})),Bm=e=>{const t=[Mm(Pm(e,0)),Mm(Pm(e,1))];return t.every((e=>e))?t:Tm},Pm=(e,t)=>e.map((e=>e.coords?.[t])),Mm=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Rm={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Vm={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Dm={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},zm=(e,t,n)=>{const l=Ud("all"===t),a=Ud("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o($a,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o($a,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Am=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Om="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",_m=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Kt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(si,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Om,children:s}),o(oi,{className:Om,isUnfolded:e,children:d})]}),renderFoldButton:Fm(n,l)})}):null})},Fm=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(q,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Em()})]}),Em=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(q,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),jm=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Lm=()=>{},$m=e=>"all"===e?"block":"hidden",Um=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Lm,renderRemoteWorkplaceCard:s=Lm,getBalloon:d=Lm,getBalloonRemoteWorkplaces:m=Lm,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=At(Rm),[y,v,N,w]=r((()=>{const e=Wm(t,f),n=Wm(a,f),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,f]),[k,S]=l("all"),C={filters:qm([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:Vm};return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[jm(p,w),u?Am(u):null,g&&zm(t,k,S),o("div",{className:h("pb-3xl",$m(k)),children:_m(C)})]}),o("div",{className:"h-[600px]",children:o(um,{children:o(Im,{points:v,isLoad:n,className:"h-full"})})})]}),c(um,{children:[y.map(i),N.map(s)]})]})})),Wm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Dm[t](e)))))},qm=e=>Object.keys(Rm).filter((t=>e.filter((e=>Dm[t](e))).length)),Hm={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Km=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Hm[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Hm[n].text,children:t})]}))),Ym=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Xm({textItems:i,subText:t,children:n,isPhone:l,...a})})),Xm=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Gm(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),Gm=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${Jm(e)}`,children:e.trim()}):e.trim()},String(n)))),Jm=e=>e.replace(/\D/g,""),Zm=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Qm=["ArrowDownIcon","ArrowUpIcon"],eh=["Подробнее","Скрыть"],th=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:eh[Number(e)]}),o(q,{className:"text-primary-text",name:Qm[Number(e)],width:"16",height:"16"})]}),nh=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:ih(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:ih(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Km,{color:"green",children:ih(s)})})]}),o("div",{className:"hidden sm:block",children:o(Zm,{className:"flex-wrap",children:m?.map(ah)})}),o(si,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(oi,{isUnfolded:e,children:o(Zm,{className:"flex-wrap",children:m?.map(ah)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>th({isUnfolded:e,onToggle:t})})]},String(d))},lh=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${ih(t)} №${n}`,body:e.toUpperCase()}),ah=(e,t)=>o(Ym,{...e},String(t)),ih=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",rh=[];const sh=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:rh},oh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},ch={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},dh=d((({descriptionData:e,className:t})=>{const[n]=bc(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Wn(`/api/v1/atms?regionCode=${e}`,sh);return{data:t||rh,isLoad:!t&&!n}}(l);return o(Um,{className:t,filterItems:mh,data:a,isLoad:i,initFilterState:oh,renderCard:nh,getBalloon:lh,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),mh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>ch[t](e))),n=!l.length||l.some((t=>ch[t](e)));return t&&n}))},hh=e=>{const t=ph(e);return o(Ym,{label:"Режим работы",value:t,className:"max-w-none"})},uh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",ph=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[uh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),uh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},gh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],fh=e=>gh.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),xh=e=>{if(!e)return null;const t=bh(e);return c(Zm,{className:"border-none",children:[o(Ym,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(yh)})}),o(Ym,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},bh=e=>{const t=gh.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},yh=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),vh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Ym,{label:"Валюта",value:e.currency}):null,t?o(Ym,{label:"Купить",value:String(t)}):null,n?o(Ym,{label:"Продать",value:String(n)}):null]},String(l)),Nh=(new Date).getDay(),wh=e=>{const[t]=e?.slice(Nh-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Km,{color:"green",children:a}):null,n&&i?o(Km,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Km,{color:"red",children:"Выходной"})},kh=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Sh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Ym,{label:e,value:t&&n?n:"",subText:kh({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Ch=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Th=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Ih=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Bh=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=fh(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),wh(u)]}),o("div",{className:"hidden sm:block",children:Ph({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(si,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(oi,{isUnfolded:e,children:Ph({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>th({isUnfolded:e,onToggle:t})})]},String(h))},Ph=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=fh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Zm,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Ym,{label:"Факс",value:t,isPhone:!0}),o(Ym,{label:"Телефон филиала",value:e,isPhone:!0}),o(Ym,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Ym,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Ym,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Ym,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Zm,{children:o(Ym,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(Sh)})})}):c(Zm,{children:[o(Ym,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(yh)})}),hh(d)]}),r?.businessScheduleVisibleTag?xh(r?.businessScheduleDescription):null,s?.currencies?.length?o(Zm,{className:"flex-wrap",children:s?.currencies?.map(vh)}):null]})},Mh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=fh(e),n=e?ph(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Ch(n):Ih(n,l):Th(n):null})(n)}`;return{header:l,body:i}},Rh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Vh({workScheduleDescription:t})}),o(si,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(oi,{isUnfolded:e,children:Vh({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>th({isUnfolded:e,onToggle:t})})]},String(n)):null,Vh=({workScheduleDescription:e})=>c("div",{children:[c(Zm,{className:"flex",children:[o(Ym,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Ym,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(Ym,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(Ym,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Ym,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),Dh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),zh={branches:[],remoteWorkplaces:[]};const Ah=async e=>await it(e,{method:"GET"})||zh,Oh=d((({className:e})=>{const[t]=bc(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=Wn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Ah);return{data:t||zh,isLoad:!t&&!n}}(n);return o(Um,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:Bh,renderRemoteWorkplaceCard:Rh,getBalloon:Mh,getBalloonRemoteWorkplaces:Dh,title:`Офисы филиала ${t?.name}`})})),_h=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Oh,{}):o(dh,{descriptionData:e})})})),Fh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Eh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(cr,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),jh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Fe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Lh({__html:i,richVersion:r}):null,$h({label:"Адрес",data:e,iconName:"GeolocationIcon"}),$h({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),$h({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),Lh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),$h=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,Uh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Wh=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Va,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Va,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),qh=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(yn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Hh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(qh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(qh,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Kh=["От 1 дня","До 365 дней"],Yh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(nl,{min:1,max:365,value:e,items:Kh,onChange:t})]}))),Xh=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(qh,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(qh,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Gh=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Hh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Jh(m)}),o(Yh,{days:a,setDays:e=>m({days:e})}),o(Xh,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Zh(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Wh,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Jh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Zh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Qh=d((({days:e,tariffs:t=[]})=>{const n=tu(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[eu("Аренда за",e),eu("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),eu=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),tu=(e,t)=>{const n=nu(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},nu=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},lu=(e,t)=>e.find((e=>e.branchCode===t)),au=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=lu(l,n.selectedBranch),d=iu(s?.safeBoxCaseVolumes),m=ru(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=su(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Gh,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Qh,{days:n.days,tariffs:h})]})})),iu=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],ru=(e,t)=>e?.find((e=>e.volume===t)),su=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,ou=[];const cu=async e=>await it(e,{method:"GET"})||ou,du=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=ta(),p=mu(m.selectedRegion,u),f=function(e){const{data:t}=Wn(e?`/api/v1/safeboxes?regionCode=${e}`:null,cu);return t||ou}(p),x=i((e=>h((t=>({...t,...e})))),[h]),b=(y=lu(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(au,{regions:u,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Im,{points:b,className:"h-[640px]"}):null]})})),mu=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,hu={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},uu=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:pu(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[gu(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},pu=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=fu(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:xu({step:n,iconVersion:a,i:l,stepVersion:t})})})},gu=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",hu.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),fu=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",xu=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Fe(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?hu.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},bu=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(uu(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),yu=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(q,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),vu=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Ua,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Nu=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(vu,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function wu(e){throw new Error(e)}const ku=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:wu(e)}}))),[c,d]),n},Su=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Cu=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Tu,{...e},String(t))))})]}):null,Tu=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Iu=(e,t)=>n=>n.name?o(_o,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Oo(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Bu=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(ln,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Pu=d((({foreignOffices:e,branches:t})=>{const[n,a]=bc(t?.default),r=he(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),h=Ru(ta()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Mu),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(Wa,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(_o,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(Bu,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&Su(e.toLowerCase())(d.toLowerCase())>=.8)).map(Iu(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(Iu(x,f))]},e)))}),Cu(e)]});var f,x})),Mu=e=>e.name?.charAt(0)||"",Ru=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Vu=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Pu,{...e}),n),close:n}})(n||{}),[{name:r}]=bc(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(vu,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Du="burgerMenuDialog",zu=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=ku(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Du,i);return[r,{toggle:()=>{r?n():l(o(Vu,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:Du})}}]},Au=[],Ou=ht((({sticky:e,...t})=>{const{menuItems:n=Au}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[f,x]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),x(""),y()}),[y]),N=tn(v),w=s(null),[k,{toggle:S}]=zu({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=Nu({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{x(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(_u(I,"left",{activeIndex:u,currentItemPosition:f})),o(yu,{item:a,isActive:k,onClick:e=>T(e)}),h.map(_u(I,"right",{activeIndex:u,currentItemPosition:f}))]})})})),_u=(e,t,n)=>(l,a,i)=>o(yu,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Fu="hidden sm:flex absolute z-40",Eu={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},ju=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Zi({itemCount:t?.length||0});return a((()=>Lu(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Ei,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Eu[i].item,gap:Eu[i].gap,children:t.map(om(n,l,i))}),s.canScrollLeft?o(lr,{className:h("left-6",Fu,Eu[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(ar,{className:h("right-6",Fu,Eu[i].buttonTop),onClick:s.scrollRight}):null]})})),Lu=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},$u={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Uu=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h($u[t].wrapper,e),children:o(ju,{className:$u[t].component,tabsType:t,...n})}):null,Wu=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=qu(n??{}),p=V(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Yu(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=Ku(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:h({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Uu({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Hu(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Ku)?.filter(Boolean)||[]}),qu=({__id:e,anchor:t})=>t??e??"tabs",Hu=(e,t)=>t?.length?t:e,Ku=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Yu=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Xu={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Gu=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Xu[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Ju=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Zu={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Ju,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Qu=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return ep({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),ep=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Zu))return null;return o(Zu[n],{...t,...l})},tp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Qu,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),np=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),lp=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,ap=d((({rows:e})=>{return o(Ei,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${np(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?lp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),ip=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(ap,{rows:t.rowsData})})})]},l)}))}))),rp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),sp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:rp(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),op=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(sp,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(ip,{activeTabIndex:r,items:m}),o(Ju,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(Ju,{onClick:n,isOpen:!0})]})})),cp=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(op,{...t,onClick:n})}):null]}))),dp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(cp,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Gu,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(tp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function mp({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(nr,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(nr,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const hp=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,mp({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),up=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(dp,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(si,{renderFoldableSection:({isUnfolded:e})=>c(hp,{controls:x,children:[y,o(oi,{isUnfolded:e,children:v})]}),renderFoldButton:pr}):o(hp,{controls:x,children:b})})]})})),pp=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?gp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?fp(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),gp=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),fp=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),xp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),bp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(xp,{prefix:t,unit:n,suffix:l})})})),yp={AdTile:pt,ApplicationForm:ni,ApplicationLeadForm:Mi,BankAccountFiltration:Vr,BenefitsBlock:_r,BonusBenefitsBlock:jr,ButtonsBlock:$r,CalculatorBonus:ls,CalculatorBusinessDeposit:ws,CalculatorCredit:_s,CalculatorDeposit:to,CalculatorRefinancing:co,CardTransfer:xo,Carousel:Co,CarouselCard:Po,CarouselCatalogCard:Ro,CarouselLinks:zo,CarouselRecommendationCard:$o,CarouselTariffsCard:qo,DepositFiltration:Jo,Depository:pc,ErrorBlock:fc,ExchangeRateTile:Uc,Footer:dd,GrantSupport:md,Header:kd,Headline:C,HorizontalLayout:Id,ImgBlock:Bd,LinkDocs:Fd,MobileAppTile:$d,MortgageFiltration:mm,OfficesAtmsMap:_h,Placeholder:Fh,ProductBlock:ut,ProductGallery:Eh,RepresentativeOfficeInfo:jh,RichTextBlock:Uh,RollupItem:Jc,SafeDepositRental:du,StepsBlock:bu,StickyBottomMenu:Ou,TabsLayout:Wu,TariffsTable:up,TextBlock:pp,UnitBlock:bp,VerticalLayout:Td},vp=me((()=>{a((()=>{Ct()}),[]);const e=Dt();en(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const Np="cookie",wp=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=Qt();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Np)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Np,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Ua,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),kp=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=ku({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return en(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),Sp=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:wu(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return en(globalThis.document,"keydown",r),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Cp="header",Tp="footer",Ip="sticky-footer",Bp={},Pp=d((({className:e,data:t=Bp,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);vp();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:Cp})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:Tp})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:Ip})}):null,o(kp,{}),o(Sp,{}),o(wp,{__html:d?.cookieContent?.__html})]})}));Object.assign(Pp,{childrenTypes:[],slots:()=>[Cp,Tp,Ip]});e.Blocks=yp,e.ContentPage=Pp,e.handlerDecorator=me,e.joinList=vr,e.packageVersion="0.14.582",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
|