@redneckz/wildless-cms-uni-blocks 0.14.134 → 0.14.136
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +329 -236
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +12 -0
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +8 -1
- package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +8 -12
- package/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/bundle/components/ApplicationForm/InputControl.d.ts +2 -9
- package/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/bundle/components/ApplicationForm/handleSubmit.d.ts +16 -0
- package/bundle/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/bundle/components/ApplicationForm/renderUserData.d.ts +8 -1
- package/bundle/ui-kit/Input/InputProps.d.ts +2 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +12 -0
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +49 -0
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +8 -1
- package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +8 -12
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js +21 -34
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/dist/components/ApplicationForm/InputControl.d.ts +2 -9
- package/dist/components/ApplicationForm/InputControl.js +1 -1
- package/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/dist/components/ApplicationForm/feedbackTypes.js +1 -1
- package/dist/components/ApplicationForm/handleSubmit.d.ts +16 -0
- package/dist/components/ApplicationForm/handleSubmit.js +71 -0
- package/dist/components/ApplicationForm/handleSubmit.js.map +1 -0
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/dist/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/dist/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/dist/components/ApplicationForm/renderTextarea.js +2 -1
- package/dist/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/dist/components/ApplicationForm/renderUserData.d.ts +8 -1
- package/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +8 -5
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +2 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +12 -0
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +47 -0
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -0
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +8 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +8 -12
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js +22 -35
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/lib/components/ApplicationForm/InputControl.d.ts +2 -9
- package/lib/components/ApplicationForm/InputControl.js +1 -1
- package/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/lib/components/ApplicationForm/feedbackTypes.js +1 -1
- package/lib/components/ApplicationForm/handleSubmit.d.ts +16 -0
- package/lib/components/ApplicationForm/handleSubmit.js +66 -0
- package/lib/components/ApplicationForm/handleSubmit.js.map +1 -0
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/lib/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/lib/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/lib/components/ApplicationForm/renderTextarea.js +2 -1
- package/lib/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/lib/components/ApplicationForm/renderUserData.d.ts +8 -1
- package/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +8 -5
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/bundle/bundle.umd.js +329 -236
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +12 -0
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +8 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +8 -12
- package/mobile/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/InputControl.d.ts +2 -9
- package/mobile/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/handleSubmit.d.ts +16 -0
- package/mobile/bundle/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/mobile/bundle/components/ApplicationForm/renderUserData.d.ts +8 -1
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +12 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +49 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +8 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +8 -12
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +21 -34
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/InputControl.d.ts +2 -9
- package/mobile/dist/components/ApplicationForm/InputControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/feedbackTypes.js +1 -1
- package/mobile/dist/components/ApplicationForm/handleSubmit.d.ts +16 -0
- package/mobile/dist/components/ApplicationForm/handleSubmit.js +71 -0
- package/mobile/dist/components/ApplicationForm/handleSubmit.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/mobile/dist/components/ApplicationForm/renderTextarea.js +2 -1
- package/mobile/dist/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.d.ts +8 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +8 -5
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +12 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +47 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +8 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +8 -12
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +22 -35
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/InputControl.d.ts +2 -9
- package/mobile/lib/components/ApplicationForm/InputControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/feedbackTypes.js +1 -1
- package/mobile/lib/components/ApplicationForm/handleSubmit.d.ts +16 -0
- package/mobile/lib/components/ApplicationForm/handleSubmit.js +66 -0
- package/mobile/lib/components/ApplicationForm/handleSubmit.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/mobile/lib/components/ApplicationForm/renderTextarea.js +2 -1
- package/mobile/lib/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.d.ts +8 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +8 -5
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +6 -9
- package/mobile/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +86 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +11 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +62 -85
- package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +13 -12
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +5 -4
- package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +2 -0
- package/mobile/src/components/ApplicationForm/InputControl.tsx +5 -11
- package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
- package/mobile/src/components/ApplicationForm/feedbackTypes.ts +1 -1
- package/mobile/src/components/ApplicationForm/handleSubmit.tsx +87 -0
- package/mobile/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderIndividualsFields.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderTextarea.tsx +35 -23
- package/mobile/src/components/ApplicationForm/renderUserData.tsx +15 -5
- package/mobile/src/ui-kit/Input/Input.tsx +45 -31
- package/mobile/src/ui-kit/Input/InputProps.ts +2 -1
- package/package.json +2 -2
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +14 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +6 -9
- package/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +86 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +11 -1
- package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +62 -85
- package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +13 -12
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +5 -4
- package/src/components/ApplicationForm/EmbeddableForms.tsx +2 -0
- package/src/components/ApplicationForm/InputControl.tsx +5 -11
- package/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
- package/src/components/ApplicationForm/feedbackTypes.ts +1 -1
- package/src/components/ApplicationForm/handleSubmit.tsx +87 -0
- package/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +1 -1
- package/src/components/ApplicationForm/renderIndividualsFields.tsx +2 -2
- package/src/components/ApplicationForm/renderTextarea.tsx +35 -23
- package/src/components/ApplicationForm/renderUserData.tsx +15 -5
- package/src/ui-kit/Input/Input.tsx +45 -31
- package/src/ui-kit/Input/InputProps.ts +2 -1
|
@@ -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 l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=g((({children:e})=>f?e:null));const y=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{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}},v=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),N={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","":""},w=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:o="section",role:c,children:d,style:m})=>{const h=o,[p,g]=n(!1);a((()=>y.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||g(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s]);const x=t&&l;return u(h,{className:v("@container font-sans",x?"group":"",N[t],p?"hidden":"",r||i,e),...x?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:c,style:m,children:d})})),k={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},S=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=k[l]||"h3";return u(i,{className:v("font-sans m-0",C[t],e),children:n||a})})),I=g((({children:e,...t})=>u("p",{className:v("font-sans",Object.values(t)),children:e}))),T={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"}},B=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=T[l],m={marginTop:d.descriptionStyle};return p(w,{className:v(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(S,{className:v("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(I,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})}));function M(){return M._impl()}M._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),M.setup=e=>{M._impl=e};const R=e=>Boolean(e?.includes(":")),P=(e,t)=>Boolean(e&&!R(e)&&(!t||"_self"===t)),A=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),z=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var V=Object.freeze({__proto__:null,isURL:R,isLocalURL:P,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:A,joinPath:z});const D="/api/",_=`${D}v1/storage`,j=e=>(t,l=d.BASE_PATH)=>{if(!t||R(t)||[d.CDN,D].some((e=>E(t,e))))return t;if(/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/.test(t))return`${_}/${t}/file`;const n=t.startsWith("/");return z(E(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},E=(e,t)=>t&&e&&e.startsWith(t),O={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},L=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=M(),c="normal"===i?`${l}.svg`:`sprites.svg#${l}`,m=j(o)(z(d.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:m,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:F(e,s)}):u(U,{className:e,children:p("svg",{className:v($(r),O[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:m,xlinkHref:m})]})})})),F=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},$=e=>e?"":"w-full h-full",U=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),H=(e,t)=>l=>l&&!R(l)?j(e)(z(t,l)):l,W=(e,t)=>e?.media&&t?.media?e.media-t.media:0,K=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=M();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(W).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:H(a,n)(e),type:G(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?Y({...t,src:H(a,n)(t.src)},l):null]})})),Y=(e,t="")=>u("img",{src:e.src,className:v("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}),G=e=>e?`image/${String(e)}`:void 0,X=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(L,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(K,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),q={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","":""},J="bg-main-divider text-main-disabled",Q={primary:J,secondary:J,white:J,link:"",transparent:"",gray:J,"":""},Z="text-center font-sans select-none",ee={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","":""},te=({className:e,rounded:t,version:l})=>[Z,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),le=()=>({open:(e,t={})=>y.fire("dialog",{type:"open",dialog:e,...t}),close:()=>y.fire("dialog",{type:"close"}),closeAll:()=>y.fire("dialog",{type:"close",all:!0})}),ne=(e,t)=>ne._impl(e,t);function ae(e={}){const{isRemote:t,basePath:l}=e,n=M(),{closeAll:a}=le();return e=>({...e,href:t&&!l?e.href:j(n)(e.href,l),"aria-label":e.text,onClick:ne(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&P(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}ne._impl=e=>e,ne.setup=e=>{ne._impl=e};const ie=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=se(e)?"hidden lg:block":"";return p("div",{className:v(re(e),"flex gap-xs"),children:[n?u("div",{className:v(r,ee[i]),children:n}):null,se(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:v(r,ee[i]),children:a}):null]})})),re=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return v("group/btn items-center justify-center",se(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},se=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),oe=({className:e,rounded:t,version:l})=>["inline-block",Z,l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=g((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=ae()({onClick:r,href:n,...a}),o=t??u(ie,{...s});return u(e?me:de,{...s,children:o})})),de=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:te({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),me=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:oe({className:e,rounded:n,version:l}),children:a})));function he(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:te({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(X,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(ce,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const ue={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},pe=g((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:g,children:x})=>{const f=M(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:ge(n,l,e),children:[g?he(t,b):null,a?u("div",{className:"relative h-full",children:a}):null,p("div",{className:v("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[ye(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:v("grid gap-3xl",c?"@xl:grid-cols-2":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,x]}),ye(c,{className:v("@xl:justify-self-end @xl:col-start-2",s?xe(m):"",fe(m),ve(h)),imageAlign:d}),be(s)]})]})]})})),ge=(e="",t="",l="")=>v("relative flex flex-col gap-3xl overflow-hidden",e||t,l),xe=e=>e?"row-span-2":"@xl:row-span-2",fe=e=>e?"col-start-2 self-center":"",be=e=>e?u("div",{className:"self-end",children:e}):null,ye=(e,{className:t,imageAlign:l})=>e?u("div",{className:v("shrink-1/2 justify-self-center",l&&ue[l],t),children:e}):null,ve=e=>e?"hidden @xl:block":"",Ne=(e=[])=>e.reduce(((e,t)=>e+t),0),we=(e=[])=>e?.length?Ne(e)/e.length:0,ke=(e,t="normal")=>e?u("div",{className:v("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:u(X,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ce=g((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:v(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Se=(e,t)=>e?u(I,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ie=g((({children:e,...t})=>u("span",{className:v("font-sans",Object.values(t)),children:e}))),Te=(e,t)=>e?u(Ie,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Be=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ce,{...e},`rte-${t}`):["label"in e?Te(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Se(e.description,t)},String(t)):null],Me=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:v("flex gap-m min-w-56 items-center",e),children:["icon"in l?ke(l.icon,t):null,u("div",{children:Be(l)})]}))),Re=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Pe=e=>{return((t=e.map(Re))?.length?Math.sqrt(Math.abs(we(t.map((e=>e**2)))-we(t)**2)):0)>16;var t},Ae=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),ze=e=>!e.some(Ae),Ve=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:v("flex gap-x-m gap-y-s",Pe(l)||ze(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Me,{benefitsVersion:t,...e},String(l))))}):null)),De=g((({className:e,benefits:t})=>t?.length?u("div",{className:v("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Be)}):null)),_e=g((({isTabularBenefits:e,...t})=>u(e?De:Ve,{...t}))),je=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:v("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Oe(l))}):null,Oe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Le(a,r),c=Le(i,r);return n||a?.icon?u(ce,{className:v("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:o}),appendRight:Fe({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Le=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Fe=e=>je(e)?u(X,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,$e=g((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:v("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:v("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),Ue={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},He=g((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Ue[n];return l?.length?u("section",{className:v("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>u($e,{isDotted:t,dotClassName:v(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),We=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),Ke=g((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(Ye)}):null)),Ye=({label:e,amount:t})=>p("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",children:[u(Ie,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[We(2)(t)," ₽"]}):null]}),Ge=g((({className:e,tags:t})=>t?.length?u("div",{className:v("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Ie,{size:"text-m",font:"font-light",children:e})},String(t)),qe={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},Je=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...I})=>{const T=y?.src?u(X,{image:y}):null,M=u(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(pe,{className:e,padding:t,defaultPadding:l,...m?{title:M}:{insetTitle:M},...Qe(T,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:C,...I,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?u(_e,{benefitsVersion:s,isTabularBenefits:o,benefits:R}):null,d?u(Ce,{__html:d}):null,h?.length?u(He,{items:h,isDotted:g,listItemSize:qe[i]}):null,S,x?.length?u(Ke,{priceList:x}):null,Ze(f)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},Ze=e=>e?.length?u(Ge,{tags:e}):null,et=g((({className:e,padding:t,...l})=>u(w,{className:v("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(Je,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})}))),tt=e=>null!=e,lt=new Map,nt=e=>Boolean(e?.every((e=>Array.isArray(e)?nt(e):!e||"string"==typeof e))),at=e=>nt(e)?e.toString():"";function it(e,t,{fallback:l,cache:i}={}){const s=r((()=>rt(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(tt))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=lt)=>l=>{const n=at(l),a=t.get(n);if(n&&tt(a))return a;const i=e(...l);return n&&tt(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function rt(e){return Array.isArray(e)?e:e instanceof Function?rt(e()):[e]}async function st(e,t){try{return e?await ot(e,t):null}catch(e){console.error(e)}return null}const ot=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),ct={},dt="/wcms-resources";function mt(e,t={}){const{fallback:l=ct,pathDir:n=dt}=t,{data:a}=it(e?`${n}/${e}.json`:null,ot,{fallback:l});return a||ct}const ht=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ut=g((e=>{const t=((e="reklamnaya-plitka")=>{const t=mt(e),l=r((()=>ht(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(et,{...t,...e})}):null}));const pt=e=>e,gt=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=pt,format:i=pt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},xt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],ft=e=>!e?.length,bt=e=>t=>l=>e(l)?[]:[t],yt=[];function vt(){const{data:e}=it("/api/v1/regions",ot);return e||yt}const Nt=g((({text:e,link:t})=>p(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Ie,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(ce,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(Ie,{children:t.text})}):null]}))),wt="container space-y-lg",kt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Ct=g((({title:e,firstChildren:t,secondChildren:l})=>p("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?u("legend",{className:"w-full",children:u(S,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t,l]}))),St="@xl:w-1/2 space-y-s",It=g((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{N&&w.current?.focus()}),[N,w]);const C=g?"pr-3xl":"",S=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:v("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(Ie,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:w,className:v("w-full h-14 border rounded-md text-primary-text outline-none p-m",C,S,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),Tt=e=>u("div",{className:"h-4",children:e?u(Ie,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Bt=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:v("shrink-0 w-full",e),children:[u(It,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),Tt(n)]}))),Mt=e=>"_"===e,Rt=e=>/\d/.test(e),Pt=e=>Mt(e)||Rt(e),At=[..."+7 (___) ___-__-__"],zt=At.findIndex(Mt),Vt=At.map(((e,t)=>Pt(e)?At.slice(0,t).filter(Pt).length:-1));const Dt=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=At.map(((e,l)=>Rt(e)?e:t.charAt(Vt[l])||e)),n=Vt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(zt,n)):l).join("")}(e))),[t]);return u(It,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),_t=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:v("shrink-0 w-full",e),children:[u(Dt,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Tt(n)]}))),jt="Некорректно заполненное поле",Et=bt((e=>null!=e&&""!==e))(jt),Ot=bt((e=>"string"==typeof e&&e.length>1))(jt),Lt=bt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(jt),Ft=($t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,bt((e=>"string"==typeof e&&$t.test(e))))(jt);var $t;const Ut=bt((e=>"boolean"==typeof e&&e))(jt),Ht=(e,t)=>u(Ct,{title:t,firstChildren:p("div",{className:St,children:[u(Bt,{label:"Наименование организации",...kt(e("fullName"),Et)}),u(Bt,{label:"Контактное лицо",...kt(e("name"),Ot)})]}),secondChildren:p("div",{className:St,children:[u(Bt,{label:"ИНН",...kt(e("inn"),Lt)}),u(_t,{label:"Телефон",...kt(e("phone"),Ft)})]})}),Wt=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Kt(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Yt=e=>e?.text||e?.key||"";function Gt(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Xt(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Gt(globalThis.document,"click",l),t}const qt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Jt=g((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:qt(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Yt(e)}),u(L,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:v("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Qt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>y.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>y.fire("popup",{type:"update",popup:e,...t}),close:()=>y.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),g=Xt(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Jt,{popupRef:g,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const Zt=g((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:g,setTrue:x}]=Kt(),[f,b]=n(""),y=i((()=>{b(""),g()}),[]),N=Qt({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[el(t),p("div",{className:v("relative",h?"z-20":"z-10"),ref:N,children:[p("div",{className:v("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",ll(s,r)),onClick:h?y:x,children:[u("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Yt(a)||o}),tl(h,d)]}),c&&h?u("div",{className:v("absolute top-0 w-full z-20"),children:u(It,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),el=e=>e?u("div",{className:"mb-xs",children:u(Ie,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,tl=(e,t)=>u(L,{className:v("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),ll=(e,t)=>v(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),nl=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Zt,{...l,valid:!t}),Tt(t)]}))),al=({regions:e,field:t,title:l})=>u(Ct,{title:l,firstChildren:u("div",{className:St,children:u(nl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Wt.map((({name:e=""})=>({key:e,text:e}))),...kt(t("acquiringType"),Et)})}),secondChildren:u("div",{className:St,children:u(nl,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(t("region"),Et)})})}),il=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:v("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:v("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(Ie,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),rl=e=>p("div",{children:[u(il,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(il,{text:"Хочу купить POS-терминал",...e("posTerminal")})]});function sl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const ol={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"},cl={primary:v("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:v("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")},dl=g((({children:e,...t})=>{const l=e=>({...e,onClick:ne(sl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=l(t);return u("button",{className:v("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":v(ol[a],cl[a]),o?"rounded-md":"",n),type:s,role:c,onClick:d,children:e})})),ml=(e,t)=>u(dl,{className:v("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),hl={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},ul=xt({acquiringType:Et,region:Et,fullName:Et,inn:Lt,name:Ot,phone:Ft}),pl=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;ft(ul(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=gt(hl,a),o=vt();return p("form",{className:wt,onSubmit:s.onSubmit,children:[al({regions:o,field:r,title:"Вид эквайринга и регион"}),Ht(r,"Данные организации"),rl(r),ml(t),u(Nt,{link:l})]})})),gl=e=>u(Ct,{firstChildren:p("div",{className:St,children:[u(Bt,{label:"Контактное лицо",...kt(e("name"),Ot)}),u(Bt,{label:"ИНН",...kt(e("inn"),Lt)})]}),secondChildren:p("div",{className:St,children:[u(_t,{label:"Телефон",...kt(e("phone"),Ft)}),u(Bt,{label:"Электронная почта",...kt(e("mail"),Et)})]})}),xl=({regions:e,field:t})=>u(nl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(t("region"),Et)}),fl={name:"",phone:"",inn:"",mail:""},bl=xt({region:Et,name:Ot,phone:Ft,inn:Lt,mail:Et}),yl=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;ft(bl(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=gt(fl,a),o=vt();return p("form",{className:wt,onSubmit:s.onSubmit,children:[xl({regions:o,field:r}),gl(r),ml(t),u(Nt,{link:l})]})})),vl=[];function Nl(e){const{data:t}=it(e?`/api/v1/branches?regionCode=${e}`:null,wl);return t||vl}const wl=async e=>await st(e,{method:"GET"})||vl,kl=["От 1 000 ₽","До 1 000 000 000 ₽"],Cl=["От 1 мес","До 15 лет"],Sl=(e,t)=>u(Ct,{title:t,firstChildren:p("div",{className:St,children:[u(Bt,{label:"Наименование организации",...kt(e("fullName"),Et)}),u(Bt,{label:"ИНН",...kt(e("inn"),Lt)}),u(_t,{label:"Телефон",...kt(e("phone"),Ft)})]}),secondChildren:p("div",{className:St,children:[u(Bt,{label:"Годовая выручка, ₽",...kt(e("annualRevenue"),Et)}),u(Bt,{label:"Контактное лицо",...kt(e("name"),Ot)}),u(Bt,{label:"Электронная почта",...kt(e("mail"),Et)})]})}),Il=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},Tl=(e,t,l)=>Math.max(t,Math.min(e,l));function Bl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Ml({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:v("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=Bl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Rl=1,Pl=100,Al=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Rl),max:s=(a.length?a.length-1:Pl),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=Il(e,{normalize:(e=0)=>a.length?zl(a)(e):Tl(e,r,s),format:We()}),g=i((e=>{m&&m(Bl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Ie,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:v("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),Ml({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),Vl(n)]})})),zl=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Vl=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Ie,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Dl=(e,t)=>u(Ct,{title:t,firstChildren:u("div",{className:St,children:u(Al,{title:"Сумма, ₽",items:kl,min:1e3,max:1e9,...e("amount")})}),secondChildren:u("div",{className:St,children:u(Al,{title:"Срок, месяцев",items:Cl,min:1,max:180,...e("term")})})}),_l=({title:e,regions:t,branches:l,field:n})=>u(Ct,{title:e,firstChildren:u("div",{className:St,children:u(nl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(n("region"),Et)})}),secondChildren:u("div",{className:St,children:u(nl,{label:"Адрес",placeholder:"Выберите адрес",options:l.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...kt(n("department"),Et)})})}),jl={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},El=xt({fullName:Et,annualRevenue:Et,inn:Lt,name:Ot,phone:Ft,region:Et,department:Et}),Ol=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;ft(El(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=gt(jl,n),o=vt(),c=Nl(a.region?.key).filter((e=>e?.address));return p("form",{className:wt,onSubmit:s.onSubmit,children:[Dl(r,"Параметры"),Sl(r,"Данные организации"),_l({regions:o,branches:c,field:r,title:"Офис банка"}),ml(e),u(Nt,{link:t})]})})),Ll={name:"",phone:""},Fl=xt({name:Ot,phone:Ft}),$l=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;ft(Fl(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=gt(Ll,n);return u("form",{className:wt,onSubmit:r.onSubmit,children:u(Ct,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",firstChildren:p("div",{className:"w-full max-w-xl space-y-s m-auto",children:[u(Bt,{label:"Имя",...kt(a("name"),Ot)}),u(_t,{label:"Телефон",...kt(a("phone"),Ft)}),ml(e),u(Nt,{link:t})]})})})})),Ul=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QC"}],Hl=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],Wl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Kl=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Yl=[{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"}],Gl=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Kl,{paths:Yl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:v("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Xl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Ie,{size:"text-l",font:"font-light",children:l})}):null]})})})),Xl=e=>v("rounded border",e?"bg-primary-main":""),ql=(e,t,l)=>p("div",{className:"flex w-full justify-between items-baseline",children:[p("div",{children:[p("div",{className:"flex gap-3",children:[u(Gl,{...e}),u(Nt,{text:"Согласен с ",link:t})]}),Tt(kt(e,Ut).error)]}),ml(l)]}),Jl=(e,t,l="")=>p("label",{className:"space-y-xs",htmlFor:"textarea",children:[t?u("div",{children:u(Ie,{size:"text-m",font:"font-light",children:t})}):null,u("textarea",{id:"textarea",placeholder:l,className:v("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:e.value,onInput:t=>e.onChange&&e.onChange(t.target?.value||"")})]}),Ql=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Zl=()=>{},en=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=tn(t,e),o=ln(t,i,r);m.push(u("td",{children:u("div",{className:nn(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},tn=(e,t)=>t&&e.toDateString()===t.toDateString(),ln=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),nn=(e,t)=>v("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),an=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],rn=g((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Zl})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:an.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:en({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),sn=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],on=sn.map((e=>({key:e}))),cn=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),dn={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},mn={className:"min-w-32",iconVersion:"black",isBorder:!1},hn=g((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=Kt(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[g,x]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Xt(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(sn.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:on,yearsOptions:cn,ref:s}})({onYearSelect:x,onMonthSelect:h,onShowCalendar:d,selectedYear:g,selectedMonth:m,showCalendar:c});return p("div",{className:v(e,"relative"),ref:S,children:[u(Ie,{size:"text-m","font-weight":"font-light",children:t}),un(C,l,a),c?p("div",{className:"absolute bg-white z-20 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(L,{...dn,className:"-rotate-90 cursor-pointer"})}),u(Zt,{onChange:y,value:{key:sn[m]},options:w,...mn}),u(Zt,{onChange:N,value:{key:String(g)},options:k,...mn}),u("div",{className:"my-auto",onClick:b,children:u(L,{...dn,className:"rotate-90 cursor-pointer"})})]}),u(rn,{today:l,currentMonth:m,currentYear:g,onDateSelect:o,min:r,max:s})]}):null]})})),un=(e,t,l)=>p("div",{onClick:e,className:v("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",l?"border-gray":"border-error"),children:[u(I,{children:t&&Ql(t)}),u(L,{...dn,name:"CalendarIcon"})]}),pn=g((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:v("shrink-0 w-full",e),children:[t?u("div",{className:"mb-xs",children:u(Ie,{size:"text-m",font:"font-light",children:t})}):null,u(hn,{value:l,onChange:a,valid:Boolean(!n)}),Tt(n)]}))),gn=e=>p("div",{children:[u(Bt,{label:"Фамилия*",...kt(e("surname"),Ot)}),u(Bt,{label:"Имя*",...kt(e("name"),Ot)}),u(Bt,{label:"Отчество (Обязательно, при наличии)",...kt(e("middleName"),Ot)}),u(pn,{label:"Дата рождения*",...kt(e("date"),Et)})]}),xn={typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},surname:"",name:"",middleName:"",date:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",phoneAdditional:"",mail:"",text:"",comment:"",consentDataProcessing:!1},fn=xt({typeForm:Et,region:Et,department:Et,name:Ot,date:Et,feedbackMethod:Et,phone:Ft,mail:Et,consentDataProcessing:Ut,inn:Lt}),bn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const t={...e,typeForm:e.typeForm.key,region:e.region?.text||"",department:e.department?.text||"",phone:e.phone.replace(/[^+\d]/g,"")};ft(fn(e))&&l(t)}),[l]),[a,{field:r,...s}]=gt(xn,n),o=vt(),c=Nl(a.region?.key).filter((e=>e?.address)),d="FEEDBACK_QC"===r("typeForm").value?.key,m=d&&"Юридическое лицо / ИП"===r("serviceDirection").value?.key;return u("form",{className:wt,onSubmit:s.onSubmit,children:u(Ct,{firstChildren:p("div",{className:"w-full max-w-xl space-y-s m-auto",children:[u(nl,{label:"Тема*",placeholder:"Выберите тему",options:Ul,...kt(r("typeForm"),Et)}),d?u(nl,{label:"Направление обслуживания*",placeholder:"Выберите направление",options:Wl,...kt(r("serviceDirection"),Et)}):null,u(nl,{label:"Филиал обслуживания*",placeholder:"Выберите филиал",isSearch:!0,options:o.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(r("region"),Et)}),u(nl,{label:"Адрес",placeholder:"Выберите адрес",options:c.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...kt(r("department"),Et)}),gn(r),m?p("div",{children:[u(Bt,{label:"ИНН",...kt(r("inn"),Lt)}),u(Bt,{label:"Наименование организации",...kt(r("fullName"),Et)})]}):null,u(nl,{label:"Способ получения ответа*",options:Hl.map((({key:e=""})=>({key:e,text:e}))),...kt(r("feedbackMethod"),Et)}),u(_t,{label:"Телефон*",...kt(r("phone"),Ft)}),d?p("div",{children:[u(_t,{label:"Дополнительный телефон",...kt(r("phoneAdditional"),Ft)}),u(Bt,{label:"Электронная почта",...kt(r("mail"),Et)}),u(Bt,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...kt(r("bankEmpolee"),Et)}),u(Bt,{label:"Дата и время обращения в Банк",...kt(r("applicationDate"),Et)})]}):u(Bt,{label:"Электронная почта",...kt(r("mail"),Et)}),Jl(r("text"),"Ваше сообщение*"),ql(r("consentDataProcessing"),t,e)]})})})})),yn=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=mt(l||"regions-grant-support"),[i,r]=n({key:""}),s=te({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s",children:[a?u(nl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(ce,{href:o,target:"_blank",className:v("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),vn={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},Nn=xt({surname:Ot,name:Ot,middleName:Ot,phone:Ft,mail:Et,date:Et}),wn=g((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;ft(Nn(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=gt(vn,r);return p("form",{className:wt,onSubmit:o.onSubmit,children:[u(Ct,{firstChildren:p("div",{className:St,children:[u(Bt,{label:"Фамилия",...kt(s("surname"),Ot)}),u(Bt,{label:"Отчество",...kt(s("middleName"),Ot)}),u(_t,{label:"Телефон",...kt(s("phone"),Ft)})]}),secondChildren:p("div",{className:St,children:[u(Bt,{label:"Имя",...kt(s("name"),Ot)}),u(pn,{label:"Дата рождения*",...kt(s("date"),Et)}),u(Bt,{label:"Электронная почта",...kt(s("mail"),Et)})]})}),ql(s("consentDataProcessing"),l,t)]})})),kn=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Ie,{color:"text-primary-text",children:t}):null]})}))),Cn=e=>{const{value:t,onChange:l}=e("vedTypes");return u(Ct,{firstChildren:p("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[u(kn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(kn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(kn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(kn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},Sn=({field:e,regions:t})=>{const l="currencyControl"===e("vedTypes").value;return p("div",{className:"space-y-s",children:[l?u(nl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(e("region"),Et)}):null,p("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[l?u(Bt,{label:"ИНН",...kt(e("inn"),Lt)}):null,u(Bt,{label:"Наименование организации",...kt(e("fullName"),Et)}),u(Bt,{label:"ФИО",...kt(e("name"),Ot)}),u(_t,{label:"Телефон",...kt(e("phone"),Ft)}),l?null:u(Bt,{label:"Электронная почта",...kt(e("mail"),Et)})]})]})},In={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},Tn={fullName:Et,name:Ot,phone:Ft},Bn=xt({...Tn,mail:Et}),Mn=xt({...Tn,inn:Lt,region:Et}),Rn=e=>"currencyControl"===e,Pn=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),An={ApplicationFormBusinessCard:yl,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:Pn(o),PartnerComments:c,...Rn(o)?{inn:r,region:s?.text||""}:{mail:i}};ft((e=>Rn(e)?Mn:Bn)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=gt(In,a),o=vt(),c=r("text");return p("form",{className:"container space-y-lg",onSubmit:s.onSubmit,children:[Cn(r),u(S,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Sn({field:r,regions:o}),Jl(c,"Обращение","Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка"),ml(t),u(Nt,{link:l}),u(S,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(X,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(X,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:$l,ApplicationFormCredit:Ol,ApplicationFormAcquiring:pl,ApplicationFormGrantSupport:yn,ApplicationFormIndividuals:wn,ApplicationFormFeedback:bn},zn=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(X,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),p("div",{children:[u(S,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Ie,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Vn={send:async function(e,t=!1){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},Dn=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await Vn.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(w,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(S,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?_n(l,o):null,r?u(zn,{responseType:r}):null]})})})),_n=(e,t)=>{const l=e?.formType;if(!l||!(l in An))return null;return u(An[l],{...e,onSubmit:t})},jn="text-left",En={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},On=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:v("rounded-icon object-fit flex justify-center items-center",En[l],e),children:u(L,{...i,width:"54%",height:"54%",name:a})}):null})),Ln=g((({className:e="",title:t,benefitList:l,...n})=>p(w,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(S,{headingType:"h3",as:"h2",className:jn,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Fn)}):null]}))),Fn=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(On,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?u(X,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(S,{headingType:"h6",children:e}),u(Ie,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(He,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),$n=g((({className:e="",title:t,description:l,bonusItems:n=[],align:a="text-left",...i})=>u(w,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(B,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(B,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:Ee(e?.buttons)}),e.bonusItemContent?.bonusType?Un(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Un=e=>"count"===e.bonusType?Hn(e):Wn(e),Hn=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(Ie,{size:"text-h2",children:e.bonusName})}):null]}),Wn=e=>e.image?u(X,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Kn=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Yn(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const Gn=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:o,children:c,onIntersection:d})=>{const m=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:Yn(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&d&&d(l||0,e[e.length-1])}),[d,l]),o);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:m,children:c})})),Xn=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],qn=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(Qn(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,N="horizontal-list"===o,w={...N?Jn(r,b):{},...y?Kn(d):{},gap:`${a}px`};return u("div",{className:v("box-border overflow-auto no-scrollbar",o,e),style:w,ref:t,children:(k=(e,t)=>u(Gn,{className:v(c,n?Xn[n-1]:"",y?"h-full":""),style:N?Jn(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),Jn=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qn=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Zn={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ea={"horizontal-list":"w-6","vertical-list":"h-6"},ta=g((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:v("flex gap-xs",Zn[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?ea[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),la=e=>e,na=(e=la)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),aa=na(),ia=(e=la)=>na((t=>-e(t))),ra=ia(),sa=e=>t=>e.scrollWidth/t,oa=e=>(t,l)=>{e.scrollBy({left:l*sa(e)(t),behavior:"smooth"})},ca=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[ia()(a),na()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?oa(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?oa(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},da=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=ca({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:v(e,"vertical-list"===o?"relative h-full":""),children:[u(qn,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(ta,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),ma=(e,t,l)=>{return u(da,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:v("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(Ie,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(X,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?u(Ie,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},ha=g((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(w,{className:v("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[u(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?ma(e,0,t):null]}))),ua={start:"justify-start",center:"justify-center",end:"justify-end"},pa=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?v("flex",ua[l]):"";return u(w,{className:v("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ee(e)})})),ga=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const xa=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),fa=g((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>p("div",{className:v("flex justify-between @xl:flex-col",e),children:[t?u(Ie,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,u("div",l?{children:u(Ie,{size:"text-h3",children:[i,We(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:u(Ie,{size:"text-h3",children:"-"})})]}))),ba=1e4,ya=5e6,va=Math.round(29.5),Na={minSum:ba,maxSum:ya,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},wa={minSum:ba,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ka={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ca={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Sa={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Ia=e=>e?u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Ta=g((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>p("div",{children:[u(Ie,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:We(n,{fixed:!0})(e)}),l?u("span",{className:"text-7xl",children:l}):null]}),a&&i?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ba=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Ie,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(L,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Ma=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?u(Ba,{title:e,...i}):p("div",{children:[u("div",{className:"hidden @xl:block",children:u(Ta,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),u("div",{className:"@xl:hidden",children:u(fa,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function Ra({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${We(2)(l.min||0)} ₽`,`До ${We(2)(l.max||0)} ₽`];return u(Al,{items:e?n:[],step:t,...l})}function Pa(e){const{data:t}=it(`/wcms-resources/${e}.json`,ot);return t}const Aa=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Pa(t||"bonus-calculator-data")||ka,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},za=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=gt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Aa(a,t);return p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[Ra({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Ra({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?Ma({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[m>=0?u(fa,{title:"Баллов за год",value:m}):null,Ee(l,{isVertical:!0}),Ia(n)]})]})})),Va=g((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[u("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),u("div",{className:"border-b border-main-divider md:hidden"}),l,u("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),Da=(e,t=0)=>e?.sum&&e.sum>=ba&&e.sum<=ya?e.sum:t,_a=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ja=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ea={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Oa=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:v(`flex ${Ea[a]}`,l),children:e?.map((({id:e,text:l})=>u(Gl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),La=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Ie,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Ie,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(Oa,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:v("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Fa=e=>La({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),$a=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Ua([e,t],n),Ua=([e,t],l=[])=>({[e]:l.length?ra(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?aa(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Ha=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Wa=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ka=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Ya=g((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=gt({moneyValue:Da(r,1e5),daysValue:_a(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=Pa(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Sa,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Wa(o,e)&&Ha(n,["minSum","maxSum"],e)&&Ha(l,["minDays","maxDays"],e)))||Sa,{rate:m}=d,h=Ka(m,e),u=n+h,p=s?.rateRows||[Sa];return{...d,...Ua(["minSum","maxSum"],p),...Ua(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:g,depositeName:x}=c;return u(Va,{className:e,inputChildren:p("div",{children:[Ra({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(Al,{items:[`От ${ja(f.min||0)}`,`До ${ja(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Ga(c,o),Fa({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Ma({rate:h,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:g}),resultChildren:p("div",{children:[Xa(m,d),Ee(l,{isVertical:!0}),Ia(n),Ia(a)]})});var f})),Ga=(e,t)=>p("div",{className:"space-y-s",children:[u(Ie,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Gl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Gl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Xa=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[u(fa,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(fa,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),qa=({min:e=0,max:t=0,availableMonths:l,...n})=>u(Al,{items:[`От ${Ja(e)}`,`До ${Ja(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ja=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Qa=e=>La({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Za=e=>ei({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ei({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ei({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ei({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ei=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],ti=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},li=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Pa(t||"credit-calculator-data"),s=i?.rateRows||[Na],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Za({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=$a(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=$a(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Za({row:e,userInputParams:t,paramsViewSettings:l})&&Ha(n,["minSum","maxSum"],e)&&Ha(a,["minMonths","maxMonths"],e)))||Na)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=ti(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},ni=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=gt({moneyValue:Da(i,2e5),monthsValue:_a(i,va),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=li(r,t,a),c=Qa({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return u(Va,{className:e,inputChildren:p("div",{children:[Ra({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),qa({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),ai({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),rateChildren:Ma({rate:o.rate}),resultChildren:p("div",{children:[u(fa,{title:"Ежемесячный платёж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block mb-lg",children:c}),Ee(l,{isVertical:!0}),Ia(n)]})})})),ai=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Gl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Gl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Gl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Gl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),ii=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},ri=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Pa(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?ci(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>oi({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&oi({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Ha(n,["minSum","maxSum"],t)&&Ha(a||r,["minMonths","maxMonths"],t)))||Ca,{rate:d}=c,m=si(d,e),h=n+m,u=i?.rateRows||[Ca];return{...c,...Ua(["minSum","maxSum"],u),...Ua(["minMonths","maxMonths"],u),availableMonths:ii(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},si=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},oi=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],ci=(e,t)=>e+Math.round((t-e)/2),di=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=gt({moneyValue:Da(r,2e4),monthsValue:_a(r),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=ri(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:g}=c,{onChange:x}=o("monthsValue");return a((()=>{!s.monthsValue&&x&&x(d)}),[d]),u(Va,{className:e,inputChildren:p("div",{children:[Ra({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),qa({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),mi({...c,...i},o)]}),rateChildren:Ma({rate:m}),resultChildren:p("div",{children:[u(fa,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(fa,{title:"Сумма в конце срока",value:g,postfix:"₽"}),Ee(l,{isVertical:!0}),Ia(n)]})})})),mi=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Fa({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},La({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},hi=e=>ui({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ui({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ui=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],pi=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=Pa(t||"refinancing-calculator-data"),c=o?.rateRows||[wa],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>hi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=$a(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=$a(["minMonths","maxMonths"],d,c),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>hi({row:e,userInputParams:t,paramsViewSettings:l})&&Ha(n+r,["minSum","maxSum"],e)&&Ha(i,["minSumOld","maxSumOld"],e)&&Ha(r,["minSumExtra","maxSumExtra"],e)&&Ha(a,["minMonths","maxMonths"],e)))||wa)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:x}=g,f=ti(x,e),b=e.oldMonthlyPayment-f;return r((()=>({...g,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},gi=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=gt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=pi(i,t,a),o=Qa({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return u(Va,{className:e,inputChildren:p("div",{children:[Ra({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Ra({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),qa({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),xi({...s,...a},r),s.isExtraMoney?Ra({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),rateChildren:Ma({rate:s.rate,fractionDigits:1}),resultChildren:p("div",{children:[u(fa,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(fa,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block mb-lg",children:o}),Ee(l,{isVertical:!0}),Ia(n)]})})})),xi=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(Gl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Gl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(Gl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),fi={CreditCalculatorForm:ni,DepositCalculatorForm:di,BusinessDepositCalculatorForm:Ya,BonusCalculatorForm:za,RefinancingCalculatorForm:gi},bi=g((({className:e,calculatorTabs:t=[],...l})=>u(w,{className:e,defaultPadding:"p-0",...l,children:vi(t)}))),yi=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in fi))return null;const l=fi[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(S,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},vi=e=>{if(!e||!e.length)return null;return 1===e.length?yi(e[0]):e.map(((e,t)=>u(ga,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(xa,{isUnfolded:t,children:yi(e)}),renderFoldButton:Ni(e)},t.toString())))},Ni=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(L,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(Ie,{align:n,color:"text-white",children:e.nav?.title}),u(Ie,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(L,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},wi=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=Il(e,{normalize:(e=a)=>l&&n?String(Tl(Number(ki(e)),l,n)):ki(e),format:We(r)}),c=i((e=>t&&t(ki(e))),[t]);return u(It,{onChange:c,...s,...o})})),ki=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ci=g((e=>u(wi,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Ie,{size:"text-xl",font:"font-light",children:"₽"})})}))),Si={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ii={amount:1500},Ti=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=gt(Ii),[m,h]=n(!1);return a((()=>{h(c<=0)}),[c]),p(w,{className:v("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(S,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Si[s],children:[u(Ci,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u(dl,{className:"w-full mt-lg",type:"submit",disabled:m,children:r.text}):null]})]})})),Bi=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},Mi=g((({className:e,disabled:t,...l})=>u(ce,{rounded:!0,className:v("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,...l,children:u(X,{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"})}))),Ri=g((e=>u(Mi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Pi=g((e=>u(Mi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ai="absolute top-[calc(50%-24px)] z-40",zi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Vi=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Di(e),h?u(Ri,{className:v(Ai,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Pi,{className:v(Ai,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Di=e=>p("div",{children:[e.canScrollLeft?u("div",{className:v(zi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:v(zi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),_i=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),ji=[];function Ei(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=_i,blocksRegistry:r={},ancestors:s=ji}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:v(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Oi=[],Li=(e,{key:t,ancestors:l=Oi,slotName:n=null,extraProps:a,renderProps:i=Ei,...r})=>{const s=a?(e,t)=>Ei(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Oi,[r.parent,n]]:l},a)))};function Fi({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Li(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const $i=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ui=({className:e,text:t="ХИТ"}={})=>p("div",{className:v("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(L,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(I,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Hi="relative h-full",Wi={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Ki=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Xi);return Fi({...n,renderProps:(n,a,r)=>p("div",{className:Yi(n,{someCardsHighlighted:i}),children:[Ei(n,a,{className:Gi(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Xi(n)?Ui({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Yi=(e,{someCardsHighlighted:t})=>v(Hi,t&&(Xi(e)?"pt-3xl":"pt-3xl sm:pt-16")),Gi=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>v(Hi,"min-w-80",Wi[n],t&&(Xi(e)?"pt-3xl sm:pt-16":"pt-3xl"),$i(l),l&&"h-full"),Xi=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,qi=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:g}]=Bi({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[x,f]=ca({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(w,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:v(a?"flex justify-center":"","relative max-w-full"),children:[u(qn,{containerRef:x,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Ki({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(Vi,{scroll:f,arrowsPadded:i,onScrollLeft:g,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(ta,{className:"@5xl:hidden",containerRef:x,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));qi.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],qi.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const Ji=g((({title:e,description:t,className:l})=>u(w,{className:l,defaultPadding:"p-6xl",children:u(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Qi="z-10 border border-solid w-full h-full",Zi=v(Qi,"absolute hidden @xl:block border-transparent"),er=g((({className:e,title:t,description:l,button:n,...a})=>u(w,{className:v("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:v(Zi,"top-9 right-12 bg-green-dark")}),u("div",{className:v(Zi,"top-6 right-8 bg-green")}),u("div",{className:v(Zi,"top-3 right-4 bg-green-light")}),p("div",{className:v(Qi,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),tr={black:"bg-black",white:"bg-white"},lr=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(w,{className:v("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(pe,{className:"h-full",padding:o,title:u(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(X,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Ie,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(nr)]}):null,a?p(Ie,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),nr=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${tr[e]}`},String(t)),ar=g((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:v("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),ir=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(ar,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:v("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:u(Ie,{size:"text-h4",children:t}),iconNode:l?u(X,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),rr=({isUnfolded:e,onToggle:t})=>u(ir,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),sr=g((({className:e="",icon:t,...l})=>{const n=ae(),{text:a,href:i,target:r,onClick:s}=n(l);return a?u("div",{className:v("w-full pb-lg",e),children:p("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[p("div",{className:"flex items-center space-x-lg",children:[t?u(X,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,u(Ie,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),u(L,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),or=g((({className:e,additionalDescription:t,description:l,links:n=[],title:a,...i})=>p(w,{className:e,...i,children:[p("div",{children:[u(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?cr(n):null]}))),cr=(e,t=3)=>{const l=(e||[]).map(((e,t)=>u(sr,{...e},String(t)))),[n,a]=t>0?[l.slice(0,t),l.slice(t)]:[l,[]];return u("div",{className:"mt-4xl",children:a.length>0?u(ga,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[u("div",{className:"mb-1",children:n}),u(xa,{isUnfolded:e,children:a})]}),renderFoldButton:dr}):u("div",{children:n})})},dr=({isUnfolded:e,onToggle:t})=>e?null:u(ir,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),mr=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=ae({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:v("block",e),...t?i:{},children:a})})),hr=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],ur=e=>hr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},pr=g((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=ur(t),c=je(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=v("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:v("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Ee(c,{className:v(a||s?"basis-full":""),buttonClassName:d})}),r?u(Ie,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),gr=g((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:x=false,isImageSecondary:f=!1}={},...b})=>u(w,{className:v("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(mr,{href:a,target:c,className:"h-full",children:p(pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(B,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...Qe(je(i)?u(X,{image:i}):null,g),buttons:o.length?u(pr,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:x,isImageSecondary:f,imageAlign:"center",children:[u(_e,{benefits:h}),u(He,{items:r,isDotted:s,listItemSize:"S"}),xr(n,m)]})})}))),xr=(e,t)=>e?u(I,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,fr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Ie,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Ie,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},br=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(fr),o=s.slice(0,1),c=s.slice(1);return p(w,{className:v("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[je(n)?u("div",{className:"self-center",children:u(X,{image:n})}):null,t?u(S,{className:v("pt-xs",l),headingType:"h5",title:t}):null,a?u(ce,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(ga,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(xa,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?yr:null}):null]})})),yr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(L,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),vr=(e=!1)=>e?"text-white":"",Nr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),wr=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(X,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(X,{image:t})}),l?u(S,{headingType:"h4",className:vr(a),title:l}):null,n?u("div",{className:Nr(a),children:n}):null]}))),kr=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:v("h-full","border-main-divider border-b"),children:e?e.map(Ir(l,t)):null})}))),Cr=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),Sr=(e=!1)=>""+(e?"text-white":""),Ir=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u(I,{size:"text-s",color:Cr(e),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right",children:u(I,{size:"text-s",align:"text-right",color:Sr(e),children:l})}):null,n?u("div",{className:"text-right",children:u(I,{size:"text-s",color:Cr(e),children:n})}):null]})]},String(a)),Tr=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:v("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(wr,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(kr,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(ce,{href:e.link.href,target:e.link?.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Br({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Br=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:u(Ie,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),Mr=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(S,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Rr,{...e})})]})})),Rr=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(Array.from({length:e.length}).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>Array.from({length:e.length}).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(Tr,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(da,{onVisibleIndicesChange:m,children:h}):h})),Pr=e=>e%2!=0,Ar=g((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(X,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:jn})]}))),zr=["ArrowDownIcon","ArrowUpIcon"],Vr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Dr=g((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:v(t.length?"hidden":"block"),children:a?u(Ar,{...a}):null}),p("div",{className:v("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:v(Vr),children:[Li(r,{...i.options,parent:n}),Pr(r.length)?u(ut,{className:"col-span-6"}):null]}),u(ga,{renderFoldableSection:({isUnfolded:e})=>p(xa,{className:v(Vr),isUnfolded:e,children:[Li(s,{...i.options,parent:n}),Pr(s.length)?u(ut,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(ir,{className:v(l<1?"hidden":""),disabled:!s?.length,label:e,icon:zr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),_r=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,jr=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>_r(t[e])||_r(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>_r(t[e])||_r(l[e])||Er(t[e])<=Er(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>_r(t[e])||_r(l[e])||Er(t[e]?.min)>=Er(l[e]?.min)&&Er(t[e]?.min)<=Er(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>_r(t[e])||_r(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>_r(t[e])||_r(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),Er=e=>Number(e||0),Or=(e,t)=>(l=pt)=>e&&e.filter((e=>jr(t,l(e.content||{})))),Lr=g((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(il,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),Fr=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map($r(e))]}),n?u("div",{children:u(dl,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),$r=e=>([t,l])=>{const n=l?.type;return"array"===n?Ur(t,e)(l):null},Ur=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Lr,{items:n,multiple:!l?.single,...t(e)})]},e)},Hr=(e,t)=>{const l=e[t?.sourceBook];return l?l?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e)):[]},Wr=(...e)=>{const t=e.map((e=>st(e)));return Promise.all(t)};function Kr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Yr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Gr(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Yr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=it(t,Wr);return{source:Object.fromEntries(Kr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const Xr=1e9,qr={sum:{min:1e4,max:Xr},period:3},Jr=g((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Gr(i.block?.blocks),[o,{field:c,reset:d}]=gt(qr),m=Or(i.block?.blocks,o)((e=>({...e,period:Hr(r,e||{})||[]}))),h=p("div",{children:[u(Ci,{label:n?.title,min:500,max:Xr,...c("sum",{parse:e=>({min:Number(e),max:Xr}),format:({min:e})=>String(e)})}),u(Al,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(w,{className:v("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Fr({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(Dr,{blocksToRender:m,...i})]})})),Qr={type:"string",title:"Адрес справочника"};Jr.childrenTypes=["ProductTile"],Jr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:Qr});const Zr=e=>"Image"===e?.contentType&&e?.image?u(X,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,es=g((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(w,{className:v("flex flex-col justify-center items-center",e),defaultPadding:v("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:Zr(n)}),u(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(ce,{version:a?.version,text:a?.text,...a}):null]}))),ts="location";function ls(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(y,"location",as()??{name:e}),r=i((e=>{is(e),l(e)}),[]),{data:s}=it(ns()?null:"/api/v1/region",ot);return a((()=>{s&&!ns()&&l(s)}),[s]),[t??{name:e},r]}const ns=()=>Boolean(globalThis.localStorage?.getItem(ts)),as=()=>{try{const e=globalThis.localStorage?.getItem(ts);return e&&JSON.parse(e)}catch(e){return null}},is=e=>{try{globalThis.localStorage?.setItem(ts,JSON.stringify(e))}catch(e){}};var rs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(rs||(rs={}));const ss=new Intl.NumberFormat("ru",{style:"currency",currency:rs.RUB}),os=e=>e?ss.format(e):"",cs="text-left text-m font-light text-secondary-text",ds=`${cs} pl-5xl`,ms={USD:"DollarIcon",EUR:"EuroIcon"},hs=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:cs,children:u(Ie,{size:"text-m",children:"Валюта"})}),u("th",{className:ds,children:u(Ie,{size:"text-m",children:"Купить"})}),u("th",{className:ds,children:u(Ie,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(us)})]}))),us=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(X,{image:{icon:ms[t]},width:"24",height:"24"}):null,u(Ie,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Ie,{size:"text-h6",children:os(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Ie,{size:"text-h6",children:os(e?.buyExchangeRate)})})]},t)},ps={icon:"GpsIcon"},gs=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(On,{...ps,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u(I,{size:"text-l",color:"text-primary-main",children:t}):null,u(I,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),xs=(e,t,l)=>{const n=Number(fs(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},fs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),bs=e=>{return(t=[[e=>e.value!==rs.RUB&&e.oppositeValue!==rs.RUB,()=>e.handleConvert(e.value,rs.RUB)],[e=>e.value===rs.RUB&&e.oppositeValue===rs.RUB,()=>e.handleConvert(e.value,rs.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function ys(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(It,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Zt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const vs=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||rs.RUB,selectBuy:l?.[0]?.currency?.currency||rs.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[ys({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ns(r,o,l),value:r.inputSell,setValue:e=>ks(o,l)(e,r.selectSell,r.selectBuy)}),ys({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:ws(r,o,t),value:r.inputBuy,setValue:e=>Cs(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(ce,{text:a.text,version:a?.version,...a}):null]})})),Ns=(e,t,l)=>n=>{t({selectSell:n}),bs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{ks(t,l)(e.inputSell,n,a)}})},ws=(e,t,l)=>n=>{t({selectBuy:n}),bs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Cs(t,l)(e.inputBuy,n,a)})},ks=(e,t)=>(l,n,a)=>{e({inputSell:fs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(xs(l,i,n===rs.RUB)||"")})},Cs=(e,t)=>(l,n,a)=>{e({inputBuy:fs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(xs(l,i,n===rs.RUB)||"")})};const Ss=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=ls(),i=function(e){const t=e?.code||"000",{data:l}=it(`/api/v1/exchangerates?regionCode=${t}`,ot);return l||{}}(a),r=Is(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:rs.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:rs.RUB}}),u(w,{className:v("box-border min-h-80",e),...n,children:u(pe,{className:"h-full",title:u(S,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(hs,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(gs,{address:i?.address})]}),r.length&&s.length&&o.length?u(vs,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Is=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Ts=e=>mt(d.SITEMAP||"sitemap",{fallback:e}),Bs=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},Ms=(e,t)=>u(On,{...e,iconBgVersion:t,className:"shrink-0"}),Rs=g((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(ar,{tag:"button",className:v("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Ms(a,t),e?u(Ie,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(L,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),Ps=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(w,{className:v("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(ga,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(xa,{className:v("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Fi({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>As({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Ps.childrenTypes={exclude:["RollupItem"]};const As=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?u(Rs,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(ir,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},zs=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Vs):null,u(ce,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Vs=(e,t)=>p("div",{className:"mb-m space-y-m",children:[u("div",{children:u(Ie,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{className:"space-y-m",children:e.items?.map(Ds)})]},String(t)),Ds=(e,t)=>p("div",{className:"space-y-2xs",children:[u("div",{children:_s(e.type,e.text)}),u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),_s=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${js(t)}`,children:u(Ie,{size:"text-h6",children:t})});case"email":return u("a",{className:"no-underline",href:`mailto:${t}`,children:u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return u("span",{children:t})}},js=e=>e.replaceAll(/\D/g,""),Es=g((({className:e="",index:t,text:l,...n})=>{const a=ae(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:v("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Os=g((({title:e,links:t,className:l=""})=>p("div",{className:v("flex flex-col gap-4",l),children:[u(Ie,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(Es,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),Ls=g((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:v("flex flex-col",e),children:t.map(Fs(l))}):null)),Fs=e=>(t,l)=>{const{text:n,...a}=t,i=ae({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},$s=g((({className:e="",index:t,...l})=>{const n=ae({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`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}`})})),Us=g((({className:e="",links:t})=>p("div",{className:v("@container",e),children:[u("div",{className:"pt-lg",children:u(Ie,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u($s,{index:t,...e},String(t))))}):null]}))),Hs=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Ts(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:c,documents:m}=mt(d.FOOTER||"footer",{fallback:l});return p(w,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Ps,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:u(Ls,{items:e.items,basePath:o(e.href)})},String(t))))}),u(zs,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(pr,{className:"mb-xl",media:r,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:s?.map(Ws)}),u(Ie,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(Es,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:Bs})}),u(Os,{className:"py-lg border-y border-main-divider",title:c,links:a}),u(Us,{links:m})]})})),Ws=({href:e="/",text:t},l)=>{const{label:n}=ur(e);return u(ce,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},Ks={width:"34",height:"34"},Ys={"bg-white":"color",transparent:"white"},Gs={"bg-white":"text-primary-main",transparent:"text-white"},Xs=(e,t,l)=>u(X,t?.src?{image:t,className:Gs[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Ys[e]},className:Gs[e],width:l?.width,height:l?.height}),qs={"bg-white":"text-primary-text",transparent:"text-white"},Js=g((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:v("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Xs(i,l?.image,Ks),r?n??u("div",{className:"ml-s",children:u(Ie,{font:"font-medium",color:qs[i],size:"text-s",children:l?.title||"Россельхозбанк"})}):null]}))),Qs={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Zs=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=M(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(Js,{className:"my-2xs",bgColor:e,logo:t})}):eo(s),l?u("div",{children:u(ce,{href:l,ariaLabel:"Войти",target:"_blank",className:v("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Qs["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),eo=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(X,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),to={"bg-white":"primary",transparent:"transparent"},lo=g((({bgColor:e="bg-white",version:t=to[e],...l})=>{const{logo:n}=Ts(l.options?.page?.fallback),{internetBankUrl:a}=mt(d.PORTAL_DATA||"portal-data",{fallback:l.options?.page?.fallback,pathDir:z(d.BASE_PATH,"portal-resources")});return u(w,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Zs,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),no={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},ao=g((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...o})=>{const c=M();return u(w,{className:v("relative flex flex-col",no[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${H(c)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...o,children:Fi({...o,extraProps:{className:v("w-full",$i(r)),padding:n?"":"p-0"}})})}));ao.childrenTypes=[];const io=g((e=>u(ao,{...e})));io.childrenTypes=[];const ro=g((e=>{const{className:t,image:l,...n}=e;return u(w,{className:t,defaultPadding:"p-0",...n,children:u(X,{image:l})})})),so=["байт","Кб","Мб","Гб","Тб","Пб"],oo=g((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Ie,{size:"text-l",font:"font-light",children:[t," ",co(s,o),u(Ie,{color:"text-secondary-text",children:l&&`${s+r+o}`})]}):null]})})),co=(e,t)=>e||t?u("span",{children:", "}):"",mo={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},ho=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=M();return p(w,{className:v("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:v("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",mo[r]),role:"list",children:a.map(uo(o,i))}):null]})})),uo=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?j(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${so[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?po(a):l?.fileFormat;return u("div",{role:"listitem",children:u(oo,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(X,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(n))},po=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},go=g((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",g=i?.src?u(X,{className:"hidden lg:block",image:i}):null;return u(w,{className:v("min-h-80",e),padding:"p-0",version:d,...m,children:p(pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(S,{headingType:"h3",title:c,className:v("whitespace-pre-wrap",l)}),rightImage:g,buttons:Ee(n,{className:"flex-wrap"}),children:[a?u(Ie,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:v("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(He,{items:r,listItemSize:"M"}),u(Ie,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:v("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(X,{className:"w-fit",image:s})}):null,i?.src?u(X,{className:"lg:hidden",image:i}):null]})]})})})),xo={primary:"bg-white/30",secondary:"bg-main-divider"},fo={primary:"text-white",secondary:"text-secondary-text"},bo=g((({count:e,version:t="secondary"})=>u("div",{className:v("w-6 h-6 rounded-full flex items-center justify-center",xo[t]),children:u(Ie,{size:"text-xs",color:fo[t],children:e})}))),yo=(e=[],t={})=>e.filter((({content:e={}})=>jr(t,e))).length,vo=(e,t)=>e===t;const No=(wo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(vo,((e=vo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>wo(l,t[e])))));var wo;const ko=[],Co={},So={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Io={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},To={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Bo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Mo=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:v("h-12","block flex-1","cursor-pointer",So[n],l?Bo[n]:To[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:v("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Io[n]:"text-secondary-text hover:text-primary-main"),children:[u(Ie,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Ro=g((e=>u(e?.item?.href?Po:Ao,{...e}))),Po=g((e=>{const t=ae(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Mo,{...e,tag:"a",item:a,onClick:n})})),Ao=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Mo,{item:e,onClick:n,...l})})),zo=(e,t,l)=>(n,a)=>u(Ro,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Vo=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:v("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(zo(n,a,t))}))),Do={categories:[],extraOptions:[],propertyType:[],stage:[]},_o=g((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=gt(Do),m=Or(a.block?.blocks,s)(),h=i(((e=Do)=>d(e)),[]),g=(({hotFilters:e=ko,filtrationState:t=Co,blocks:l=ko,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>No(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(bo,{version:t===e[a]?"primary":"secondary",count:yo(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(w,{className:v("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(Vo,{...g}),Fr({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(Dr,{blocksToRender:m,...a})]})}));function jo(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}_o.childrenTypes=["ProductTile"],_o.childSchema=e=>e?.filtrationSchema||{};const Eo={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Oo=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Eo).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(L,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Lo=e=>globalThis[e];const Fo=()=>function(e,t){const[l,r]=n(),s=i((()=>r(Lo(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Lo(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),$o={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},Uo=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values($o).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(L,{name:l,width:"20",height:"16"})})})),Ho={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Wo=[55.753995,37.614069],Ko=g((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=Fo(),[o,c]=n(),d=e?Yo(e):Wo;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:d,zoom:l,controls:[],suppressMapOpenBlock:!0}),jo(r,i.current,e))})),i.current&&r&&(jo(r,i.current,e),e?.length||i.current.setCenter(Wo))}),[r,i,e,d,l]),!r)return null;const m=o?"z-[100000]":"z-10";return p("div",{id:"map",className:v(!o&&"relative","w-full",t),children:[u("div",{className:v(Object.values(Ho),m,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(L,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:v("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[u(Uo,{yandexMaps:i}),u(Uo,{yandexMaps:i,direction:"out"})]}),Oo(i.current,r,v("right-2 top-80",m))]})})),Yo=e=>[Xo(Go(e,0)),Xo(Go(e,1))],Go=(e,t)=>e.map((e=>e[t])),Xo=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,qo={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},Jo=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(Gl,{text:qo[e],...t(e)},e)))}):null,u(ce,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(L,{name:"CloseIcon",width:"16",height:"16"})})]}),Qo=()=>null,Zo=()=>[],ec=g((({className:e,data:t=[],renderCard:l=Qo,filterItems:n=Zo,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=gt(a),d=n(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:v("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(S,{headingType:"h2",children:r}),h?u(Ie,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?tc(i):null,Jo(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(Ko,{points:m,className:"h-full"})})})]}),d.map(l)]})})),tc=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?u(I,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(X,{image:e.image}):null,e?.text?u(Ie,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,lc={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"}},nc=g((({className:e,children:t,color:l="gray"})=>u("div",{className:v("p-s sm:border sm:border-gray rounded-md flex items-center",lc[l].border,e),children:u(Ie,{size:"text-m",color:lc[l].text,children:t})}))),ac=g((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:ic({textItems:a,subText:t,children:l,...n})})),ic=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:v("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Ie,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Ie,{size:"text-l",children:e.trim()},String(t)))),a?u(Ie,{color:n,size:"text-m",children:a}):null]}),rc=g((({className:e,children:t})=>u("div",{className:v("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),sc=["ArrowDownIcon","ArrowUpIcon"],oc=["Подробнее","Скрыть"],cc=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,children:[u("div",{className:"pr-m",children:oc[Number(e)]}),u(L,{className:"text-primary-text",name:sc[Number(e)],width:"16",height:"16"})]}),dc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:hc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ie,{size:"text-h4",children:hc(e)}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(L,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ie,{size:"text-l",children:t})]}):null]}),u(nc,{color:"green",children:hc(s)})]}),u("div",{className:"hidden sm:block",children:u(rc,{className:"flex-wrap",children:c?.map(mc)})}),u(ga,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(xa,{isUnfolded:e,children:u(rc,{className:"flex-wrap",children:c?.map(mc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>cc({isUnfolded:e,onToggle:t})})]},String(o))},mc=(e,t)=>u(ac,{...e},String(t)),hc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",uc=[];const pc=async e=>await st(e,{method:"GET"})||uc,gc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},xc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},fc=g((({data:e,className:t})=>{const[l]=ls(),n=function(e){const{data:t=uc}=it(`/api/v1/atms?regionCode=${e}`,pc);return t}(l?.code??"000");return u(ec,{className:t,filterItems:bc,data:n,initFilterState:gc,renderCard:dc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),bc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>xc[t](e))),l=!n.length||n.some((t=>xc[t](e)));return t&&l}))},yc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[vc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),vc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(ac,{label:"Режим работы",value:a,className:"max-w-none"})},vc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Nc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],wc=e=>Nc.map((([t,l,n])=>({key:t,title:n,short:l,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??"")}}))),kc=e=>{if(!e)return null;const t=Cc(e);return p(rc,{className:"border-none",children:[u(ac,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(Sc)})}),u(ac,{label:"Режим работы",className:"max-w-none",children:u(Ie,{children:e})})]})},Cc=e=>{const t=Nc.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Sc=({short:e,status:t},l)=>u("div",{className:v("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:u(Ie,{size:"text-xs",children:e})},String(l)),Ic=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(ac,{label:"Валюта",value:e.currency}):null,t?u(ac,{label:"Купить",value:String(t)}):null,l?u(ac,{label:"Продать",value:String(l)}):null]},String(n)),Tc=(new Date).getDay(),Bc=e=>{const[t]=e?.slice(Tc-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(nc,{color:"green",children:a}):null,l&&i?u(nc,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(nc,{color:"red",children:"Выходной"})},Mc=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Rc=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(ac,{label:e,value:t&&l?l:"",subText:Mc({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Pc=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=wc(o);return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ie,{size:"text-h4",children:e}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(L,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ie,{size:"text-l",children:t})]}):null]}),Bc(m)]}),u("div",{className:"hidden sm:block",children:Ac({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),u(ga,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(xa,{isUnfolded:e,children:Ac({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>cc({isUnfolded:e,onToggle:t})})]},String(d))},Ac=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const o=wc(r),c=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{children:[p(rc,{className:"flex-wrap",children:[u(ac,{label:"Факс",value:t}),u(ac,{label:"Телефон филиала",value:e}),u(ac,{label:"Для обращений юридических лиц",value:l}),u(ac,{label:"Обслуживание физических лиц",value:n}),u(ac,{label:"Для консультаций по валютному контролю",value:i}),u(ac,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?u(rc,{children:u(ac,{label:c,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:o?.map(Rc)})})}):p(rc,{children:[u(ac,{label:c,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:o?.map(Sc)})}),yc(o)]}),r?.businessScheduleVisibleTag?kc(r?.businessScheduleDescription):null,s?.currencies?.length?u(rc,{className:"flex-wrap",children:s?.currencies?.map(Ic)}):null]})},zc=[];const Vc=async e=>await st(e,{method:"GET"})||zc,Dc={workingSaturday:!1},_c={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},jc=g((({className:e})=>{const[t]=ls(),l=function(e){const{data:t=zc}=it(`/api/v1/branches?regionCode=${e}`,Vc);return t}(t?.code??"000");return u(ec,{className:e,filterItems:Ec,data:l,initFilterState:Dc,renderCard:Pc,title:`Офисы филиала ${t?.name}`})})),Ec=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>_c[t](e)))))},Oc=g((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(w,{version:"transparent",className:v(t),defaultPadding:"p-0",...l,children:"offices"===n?u(jc,{}):u(fc,{data:e})})})),Lc=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(w,{className:v("box-border",e),...n,children:[u(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Fc()})]}))),Fc=(e=3)=>Uc(100,e).map((e=>Math.floor(e))).map($c),$c=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Uc=(e,t)=>[e].concat(t>0?Uc(e/1.618,t-1):[]),Hc=g((({className:e,padding:t,slides:l=[],...n})=>u(w,{className:v("overflow-hidden relative",e),padding:t,...n,children:u(da,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",children:u(Je,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Wc=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(w,{className:v("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[je(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(X,{image:r})}):null,s?u(S,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?Kc(i):null,Yc({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Yc({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Yc({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ee([n]):null]})]}))),Kc=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Ce,{__html:e})}),Yc=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(L,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Ie,{size:"text-xl",color:n,children:t})]})]}):null,Gc=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(w,{defaultPadding:"p-0",...n,children:u(Ce,{__html:t,richVersion:l})})})),Xc=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:v("order-4",e),children:[u(kn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(kn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),qc=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Zt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Jc=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(qc,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(qc,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Qc=["От 1 дня","До 365 дней"],Zc=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Ie,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(Al,{min:1,max:365,value:e,items:Qc,onChange:t})]}))),ed=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(qc,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(qc,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),td=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(Jc,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:ld(c)}),u(Zc,{days:a,setDays:e=>c({days:e})}),u(ed,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:nd(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Ie,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(Xc,{}),u(ce,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),ld=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},nd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},ad=g((({days:e,tariffs:t=[]})=>{const l=rd(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("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:[id("Аренда за",e),id("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("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:[u(X,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(I,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),id=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(Ie,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),rd=(e,t)=>{const l=sd(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},sd=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},od=(e,t)=>e.find((e=>e.branchCode===t)),cd=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=od(n,l.selectedBranch),o=dd(s?.safeBoxCaseVolumes),c=md(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=hd(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(td,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(ad,{days:l.days,tariffs:d})]})})),dd=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],md=(e,t)=>e?.find((e=>e.volume===t)),hd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,ud=[];const pd=async e=>await st(e,{method:"GET"})||ud,gd=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=vt(),h=xd(c.selectedRegion,m),g=function(e){const{data:t}=it(e?`/api/v1/safeboxes?regionCode=${e}`:null,pd);return t||ud}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=od(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(w,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(S,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(cd,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(I,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Ko,{points:f,className:"h-[640px]"}):null]})})),xd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function fd(e){throw new Error(e)}const bd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},yd={normal:"",small:"min-h-6xl"},vd={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"},Nd=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...o})=>p(w,{className:v("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...o,children:[u(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(wd(i,r))})}):null,Ee(a,{isVertical:!0})]}))),wd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return kd(e,t)(l,n);case"rte":return u(Ce,{__html:l.__html});default:fd(l)}},kd=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row items-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Cd(e,t)(l,n)}),p("div",{className:v("flex flex-col justify-center h-fit",yd[e]),children:[l.label?u(I,{size:"text-l",align:"text-left",children:l.label}):null,l.description?u("div",{className:v("text-s font-light text-left",vd.description),children:l.description}):null]})]})},String(n)),Cd=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=bd[e][i?"image":"icon"];return u(w,{className:v(r,i?"":"rounded-md","z-10 mr-s flex justify-center content-center"),defaultPadding:"",version:t,children:u("span",{className:"flex max-w-full max-h-full items-center justify-center",children:je(l?.icon)?u(X,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:Sd(e),height:Sd(e)}):u("span",{className:v("text-h4","transparent"===t?vd.iconText:(s=t,"secondary"===s?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var s},Sd=e=>"normal"===e?"38":"24",Id="hidden sm:flex absolute z-40 top-0",Td=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=ca({itemCount:t?.length||0});return p("div",{className:v("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(qn,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(zo(l,n,a))}),r.canScrollLeft?u(Ri,{className:v("left-6",Id),onClick:r.scrollLeft}):null,r.canScrollRight?u(Pi,{className:v("right-6",Id),onClick:r.scrollRight}):null]})})),Bd=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Vo,{...t});case"centered":return u("div",{className:"flex",children:u(Vo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Td,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Md="tab",Rd=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=M(),{isReady:d}=c,m=r((()=>l.map(Ad)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Pd(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&y.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,h]);const g=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Pd(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Md,e.name):t.delete(Md),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(w,{className:v(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Bd({items:m,value:m[h],tabsMode:s,onChange:g})})})),Pd=e=>{"group"===e.type&&y.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&y.fire("tab",{type:e.type,label:e.href})},Ad=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,zd={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Vd=g((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:zd[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Dd=g((({className:e="",isOpen:t,onClick:l})=>u(ce,{className:e,appendRight:u(X,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),_d={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(X,{image:e}):null,List:({isDotted:e,...t})=>u(He,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:u(Ie,{size:"text-h6",children:e})}):null,t?u("div",{children:u(Ie,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(Dd,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},jd=g((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Ed({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Ed=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in _d))return null;return u(_d[l],{...t,...n})},Od=g((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(jd,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Ld=(e,t)=>140*Ne(e.slice(0,t).map((e=>e?.cols?.length??1))),Fd=(e=!1)=>""+(e?"text-secondary-text":""),$d=(e,t)=>e?.length>0?u("div",{className:"flex",children:e.map(((e,l)=>u("div",{className:"w-20 mx-lg",children:u(Ie,{size:"text-h6",color:Fd(0===t),children:e})},String(l))))}):null,Ud=g((({rows:e})=>{return u(qn,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=v("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("div",{className:"w-56 min-w-56 py-lg",children:u(Ie,{size:"text-xl",font:"font-light",children:n.data})}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${Ld(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u(Ie,{size:"text-xl",font:"font-light",children:e.data}):null,e?.cols?$d(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),Hd=g((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(Ie,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(Ud,{rows:t.rowsData})})})]},n)}))}))),Wd=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Kd=g((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:v("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:u(Ie,{size:"text-xl",font:"font-light",color:Wd(t===l),children:e||t+1})},e)))}):null,t?u(ce,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(L,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Yd(e){const t=await fetch(e);return await t.json()}const Gd=g((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=it(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Yd);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(Kd,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(Hd,{activeTabIndex:r,items:c}),u(Dd,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[u(Ie,{size:"text-h6",children:"Данных нет"}),u(Dd,{onClick:l,isOpen:!0})]})})),Xd=g((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:v("@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?u("div",{className:"origin-top animate-expansion",children:u(Gd,{...t,onClick:l})}):null]}))),qd=g((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(Xd,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:v("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?u(X,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(Ie,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?u(Vd,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(Od,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function Jd({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(Mi,{className:v("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(Mi,{className:v("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Qd=g((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Jd({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Zd=g((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Bi({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(qd,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[g,x]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(w,{className:v("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(ga,{renderFoldableSection:({isUnfolded:e})=>p(Qd,{controls:m,children:[g,u(xa,{isUnfolded:e,children:x})]}),renderFoldButton:rr}):u(Qd,{controls:m,children:h})})]})})),em=g((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>p(w,{className:v("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?tm():null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Ie,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?lm(l):null,a?u(Ce,{__html:a}):null]})]}))),tm=()=>u("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"}),lm=e=>u(I,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),nm=g((({prefix:e,unit:t,suffix:l})=>p("div",{className:"w-full pt-default flex items-end",children:[e?u("div",{className:"gradient-color-text",children:u(Ie,{size:"text-h2",children:e})}):null,t?u("div",{className:"-mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?u("div",{className:"gradient-color-text",children:u(Ie,{size:"text-h2",children:l})}):null]}))),am=g((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return u(w,{defaultPadding:"p-0",...a,children:u(nm,{prefix:t,unit:l,suffix:n})})})),im={AdTile:ut,ApplicationForm:Dn,BenefitsBlock:Ln,Bonus:$n,BonusBenefitsBlock:ha,ButtonsBlock:pa,Calculator:bi,CardTransfer:Ti,Carousel:qi,CarouselBankHistoryCard:Ji,CarouselCard:er,CarouselCatalogCard:lr,CarouselLinks:or,CarouselRecommendationCard:gr,CarouselTariffsCard:br,ComparisonTable:Mr,DepositFiltration:Jr,ErrorBlock:es,ExchangeRateTile:Ss,Footer:Hs,Header:lo,Headline:B,HorizontalLayout:io,ImgBlock:ro,LinkDocs:ho,MobileAppTile:go,MortgageFiltration:_o,OfficesAtmsMap:Oc,Placeholder:Lc,ProductBlock:et,ProductGallery:Hc,UnitBlock:am,RepresentativeOfficeInfo:Wc,RichTextBlock:Gc,RollupItem:Ps,SafeDepositRental:gd,StepsBlock:Nd,Tabs:Rd,TariffsTable:Zd,TextBlock:em,VerticalLayout:ao};function rm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const sm=g((({className:e,onClose:t})=>u("button",{className:v("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(X,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),om="cookie",cm=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Kt();rm((()=>{globalThis.localStorage?.getItem(om)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(om,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(I,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(mr,{isRemote:!0,className:dm(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(mr,{isRemote:!0,className:dm(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(sm,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),dm=e=>v("inline mx-2xs",e?"text-green-dark":"");const mm=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>y.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:fd(e)}}))),[c,d]),l},hm=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=mm({onCloseAll:e,onClose:t}),{close:n}=le(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Gt(globalThis.document,"keydown",r),a((()=>{l.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"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:v("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),um=g((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>y.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:fd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Gt(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),pm=e=>({href:t})=>!!t&&A(gm(t,e)).startsWith(A(t)),gm=(e,t)=>R(e)?t.href:t.pathname;function xm(e=[]){const t=M(),l=e.findIndex((e=>pm(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const fm=g((({isActive:e,onClick:t})=>p("button",{className:v(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,children:[u(L,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),bm=g((({isActive:e,item:t,onClick:l})=>{const n=ae({isRemote:!0}),{href:a,onClick:i}=n({href:t?.href,onClick:l});return p("a",{className:v(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[u(L,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})})),ym=g((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=le(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:v("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(sm,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})}));const vm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=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-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Nm=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(wm,{...e},String(t))))})]}):null,wm=g((({icon:e,...t})=>{const l=ae(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(X,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Ie,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),km=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Ie,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Cm=g((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Sm=g((()=>{const{defaultLocation:e,foreignOffices:t}=Ts(),[l,a]=ls(e),[r,s]=n(""),o=Tm(function(){const{data:e}=it("/api/v1/regions",ot);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,Im),{close:d}=le(),m=i((e=>{a(e),d()}),[]);return p(ym,{className:"pb-20",head:p("div",{children:[u(Ie,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Ie,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Ie,{color:"text-primary-main",children:l.name})})]}):null,u(Cm,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&vm(e.toLowerCase())(r.toLowerCase())>=.8)).map(km(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Ie,{size:"text-h6",children:e})}),t.map(km(h))]},e)))}),Nm(t)]});var h})),Im=e=>e.name?.charAt(0)||"",Tm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Bm=g((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:v("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(X,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:v("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),Mm=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Rm=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Pm=e=>t=>e.map((([e,l])=>[vm(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>zm(t,e))).reduce(Mm(Math.max,0),new Map),Am=e=>t=>{return Kr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Rm(t||"");return l.length?Ne(e.map((e=>aa(l.map(vm(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},zm=(e,t)=>new Map(e.map((e=>[e,t]))),Vm=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=it(e?.length?e:null,Dm),[s,o]=n(null);return rm((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Rm(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Pm(i)).reduce(Mm(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Am(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Dm=async(...e)=>(await Promise.allSettled(e.map((e=>st(z(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),_m=g((({className:e,topItems:t})=>{const l=ae({isRemote:!0});return u("div",{className:v("flex items-start justify-between",e),children:t?.map(l).map(Em)})})),jm=["all","footer"],Em=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||jm.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(Om,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Om=g((({text:e,index:t,basePath:l,...n})=>{const a=ae({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:v("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Lm=g((({initialQuery:e})=>{const{topItems:t}=Ts(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=Vm({basePathList:l,initialQuery:e}),s=r((()=>Fm(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(ym,{head:u(Bm,{autoFocus:!0,...i}),children:u(_m,{topItems:s})})})),Fm=e=>t=>e?.length&&t?.length?Kr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:z("/",t)})))}))):[];const $m=g((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=le();return{open:(t={},l={})=>e(u(Lm,{...t}),l),close:t}})(),s=i((e=>{l(e),Um(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:v("relative",e),children:[u(Bm,{value:t,onChange:s}),u(sm,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),Um=e=>e&&e.length>=3,Hm=g((({item:e,basePath:t})=>{const l=ae({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=M(),s=pm(r)({href:n});return p("a",{className:v(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(X,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Wm=g((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(Hm,{item:e,basePath:t},String(l))))}):null)),Km=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:v("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Ym=g((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=Ts(e.options?.page?.fallback),[o]=ls(s),c=(()=>{const{open:e,close:t}=le();return{open:(t={})=>e(u(Sm,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=ca({itemCount:t?.length??0}),[g]=xm(t),[x,f]=n(g),b=r((()=>t?.[x]),[t,x]),y=b?.items||[];a((()=>{f(g)}),[g]),a((()=>{x>0&&h.scrollTo(x)}),[x,h]);const v=i((e=>f(e)),[]);return u(ym,{head:u("div",{className:"flex items-center",children:u(S,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(qn,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(Km,{item:e,isActive:x===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(Wm,{activeMenuSubItems:y,basePath:b?.href}),u($m,{className:"grow mb-5"}),Gm(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(X,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(Ie,{size:"text-h5",children:o.name}),u(Ie,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),Gm=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(X,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Xm="burgerMenuDialog",qm=[],Jm=g((({...e})=>{const[t,{toggle:l,close:n}]=(()=>{const{open:e,closeAll:t,close:l}=le(),n=mm(),a=((e,t)=>t.find((t=>t.id===e),e))(Xm,n),r=i((()=>e(u(Ym,{}),{id:Xm})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a=d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{menuItems:r=qm}=mt(a,{fallback:e.options?.page?.fallback,pathDir:z(d.BASE_PATH,"portal-resources")}),[,s]=xm(r),o=Math.floor(r.length/2),c=r.slice(0,o),m=r.slice(o);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u("div",{className:"fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",children:p("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[c.map(Qm(s,n)),u(fm,{isActive:t,onClick:l}),m.map(Qm(s,n))]})})})})),Qm=(e,t)=>(l,n)=>u(bm,{isActive:l===e,item:l,onClick:t},l.href||String(n)),Zm=h();const eh=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:th()}))),th=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[lh("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),lh("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),lh=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),nh=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Zm.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Zm.like(e))}),[e]),dislike:i((async()=>{l(await Zm.dislike(e))}),[e])}}(M().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(eh,{onClick:ne(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(eh,{onClick:ne(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),ah=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return p("div",{"data-theme":s,children:[p("section",{className:v("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Li(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Fi({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Li(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(nh,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Jm,{options:o}),u(hm,{}),u(um,{}),u(cm,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));ah.childrenTypes=[],ah.slots=()=>["header","footer"];e.Blocks=im,e.ContentPage=ah,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=ne,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.133",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=V,e.useRouter=M,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");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:l}=await e.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:l},body:JSON.stringify({node_id:t,user_name:l})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:l},body:JSON.stringify({node_id:t,user_name:l})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=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},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=g((({children:e})=>f?e:null));const y=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}},v=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),N={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","":""},w=g((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:o="section",role:c,children:d,style:m})=>{const h=o,[p,g]=l(!1);a((()=>y.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||g(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s]);const x=t&&n;return u(h,{className:v("@container font-sans",x?"group":"",N[t],p?"hidden":"",r||i,e),...x?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:c,style:m,children:d})})),k={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},S=g((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=k[n]||"h3";return u(i,{className:v("font-sans m-0",C[t],e),children:l||a})})),T=g((({children:e,...t})=>u("p",{className:v("font-sans",Object.values(t)),children:e}))),I={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"}},B=g((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=I[n],m={marginTop:d.descriptionStyle};return p(w,{className:v(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[l?u(S,{className:v("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:l}):null,a?u(T,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})}));function M(){return M._impl()}M._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),M.setup=e=>{M._impl=e};const R=e=>Boolean(e?.includes(":")),P=(e,t)=>Boolean(e&&!R(e)&&(!t||"_self"===t)),A=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),z=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var V=Object.freeze({__proto__:null,isURL:R,isLocalURL:P,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:A,joinPath:z});const D="/api/",_=`${D}v1/storage`,j=e=>(t,n=d.BASE_PATH)=>{if(!t||R(t)||[d.CDN,D].some((e=>E(t,e))))return t;if(/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/.test(t))return`${_}/${t}/file`;const l=t.startsWith("/");return z(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},E=(e,t)=>t&&e&&e.startsWith(t),F={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},O=g((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const o=M(),c="normal"===i?`${n}.svg`:`sprites.svg#${n}`,m=j(o)(z(d.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:m,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:L(e,s)}):u(U,{className:e,children:p("svg",{className:v($(r),F[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,l?u("desc",{children:l}):null,u("use",{href:m,xlinkHref:m})]})})})),L=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},$=e=>e?"":"w-full h-full",U=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),H=(e,t)=>n=>n&&!R(n)?j(e)(z(t,n)):n,W=(e,t)=>e?.media&&t?.media?e.media-t.media:0,K=g((({className:e="",image:t,imageClassName:n="",pathPrefix:l})=>{const a=M();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(W).map((({src:e,format:n,media:i},r)=>u("source",{srcSet:H(a,l)(e),type:G(n),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?Y({...t,src:H(a,l)(t.src)},n):null]})})),Y=(e,t="")=>u("img",{src:e.src,className:v("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}),G=e=>e?`image/${String(e)}`:void 0,X=g((({className:e="",image:t,imageClassName:n="",pathPrefix:l,...a})=>t?.src||t?.icon?t.icon?u(O,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):u(K,{className:e,imageClassName:n,image:t,pathPrefix:l}):null)),q={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","":""},J="bg-main-divider text-main-disabled",Q={primary:J,secondary:J,white:J,link:"",transparent:"",gray:J,"":""},Z="text-center font-sans select-none",ee={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","":""},te=({className:e,rounded:t,version:n})=>[Z,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?q[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ne=()=>({open:(e,t={})=>y.fire("dialog",{type:"open",dialog:e,...t}),close:()=>y.fire("dialog",{type:"close"}),closeAll:()=>y.fire("dialog",{type:"close",all:!0})}),le=(e,t)=>le._impl(e,t);function ae(e={}){const{isRemote:t,basePath:n}=e,l=M(),{closeAll:a}=ne();return e=>({...e,href:t&&!n?e.href:j(l)(e.href,n),"aria-label":e.text,onClick:le(i(e),e)});function i({href:e,target:n,onClick:i}){return r=>{i&&i(r),e&&!t&&P(e,n)&&(a(),r?.preventDefault(),l.push(e))}}}le._impl=e=>e,le.setup=e=>{le._impl=e};const ie=g((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=se(e)?"hidden lg:block":"";return p("div",{className:v(re(e),"flex gap-xs"),children:[l?u("div",{className:v(r,ee[i]),children:l}):null,se(e)?p("div",{className:"whitespace-pre",children:[n?u("div",{className:"text-xs font-light text-left",children:n}):null,u("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:v(r,ee[i]),children:a}):null]})})),re=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 v("group/btn items-center justify-center",se(e)?a:"h-12 w-12 m-auto",l?"rounded-full":"")},se=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),oe=({className:e,rounded:t,version:n})=>["inline-block",Z,n?Q[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=g((({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();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=ae()({onClick:r,href:l,...a}),o=t??u(ie,{...s});return u(e?me:de,{...s,children:o})})),de=g((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:te({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),me=g((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:oe({className:e,rounded:l,version:n}),children:a})));function he(e,t){const n="primary"===e?"white":"black",l="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:te({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(X,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:n}})}),u(ce,{version:"link",className:"group-data-secondary:text-white/80",text:l,ariaLabel:l,onClick:t})]})}const ue={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},pe=g((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:g,children:x})=>{const f=M(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:ge(l,n,e),children:[g?he(t,b):null,a?u("div",{className:"relative h-full",children:a}):null,p("div",{className:v("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[ye(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:v("grid gap-3xl",c?"@xl:grid-cols-2":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,x]}),ye(c,{className:v("@xl:justify-self-end @xl:col-start-2",s?xe(m):"",fe(m),ve(h)),imageAlign:d}),be(s)]})]})]})})),ge=(e="",t="",n="")=>v("relative flex flex-col gap-3xl overflow-hidden",e||t,n),xe=e=>e?"row-span-2":"@xl:row-span-2",fe=e=>e?"col-start-2 self-center":"",be=e=>e?u("div",{className:"self-end",children:e}):null,ye=(e,{className:t,imageAlign:n})=>e?u("div",{className:v("shrink-1/2 justify-self-center",n&&ue[n],t),children:e}):null,ve=e=>e?"hidden @xl:block":"",Ne=(e=[])=>e.reduce(((e,t)=>e+t),0),we=(e=[])=>e?.length?Ne(e)/e.length:0,ke=(e,t="normal")=>e?u("div",{className:v("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:u(X,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ce=g((e=>{const{__html:t="",richVersion:n=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:v(n,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Se=(e,t)=>e?u(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Te=g((({children:e,...t})=>u("span",{className:v("font-sans",Object.values(t)),children:e}))),Ie=(e,t)=>e?u(Te,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Be=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ce,{...e},`rte-${t}`):["label"in e?Ie(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Se(e.description,t)},String(t)):null],Me=g((({className:e,benefitsVersion:t,...n})=>p("div",{className:v("flex gap-m min-w-56 items-center",e),children:["icon"in n?ke(n.icon,t):null,u("div",{children:Be(n)})]}))),Re=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Pe=e=>{return((t=e.map(Re))?.length?Math.sqrt(Math.abs(we(t.map((e=>e**2)))-we(t)**2)):0)>16;var t},Ae=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),ze=e=>!e.some(Ae),Ve=g((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?u("div",{className:v("flex gap-x-m gap-y-s",Pe(n)||ze(n)?"flex-col":"flex-wrap",e),children:n.map(((e,n)=>u(Me,{benefitsVersion:t,...e},String(n))))}):null)),De=g((({className:e,benefits:t})=>t?.length?u("div",{className:v("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Be)}):null)),_e=g((({isTabularBenefits:e,...t})=>u(e?De:Ve,{...t}))),je=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:v("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Fe(n))}):null,Fe=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},o=Oe(a,r),c=Oe(i,r);return l||a?.icon?u(ce,{className:v("basis-full @lg:basis-auto",e),appendLeft:Le({...a,iconVersion:o}),appendRight:Le({...i,iconVersion:c}),version:r,text:l,...s},n?String(n):""):null},Oe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:n},Le=e=>je(e)?u(X,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,$e=g((({className:e,isDotted:t,dotClassName:n,children:l})=>p("div",{className:v("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:v("align-middle inline-block rounded-full group-data-secondary:bg-white",n)})}):null,u("span",{children:l})]}))),Ue={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},He=g((({className:e,isDotted:t=!0,items:n=[],listItemSize:l="M",dotClassName:a=""})=>{const i=Ue[l];return n?.length?u("section",{className:v("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:n.map(((e,n)=>u($e,{isDotted:t,dotClassName:v(a||"bg-primary-text",i.dotStyle),children:e},String(n))))}):null})),We=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ke=g((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(Ye)}):null)),Ye=({label:e,amount:t})=>p("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",children:[u(Te,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[We(2)(t)," ₽"]}):null]}),Ge=g((({className:e,tags:t})=>t?.length?u("div",{className:v("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Te,{size:"text-m",font:"font-light",children:e})},String(t)),qe={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},Je=g((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...T})=>{const I=y?.src?u(X,{image:y}):null,M=u(B,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(pe,{className:e,padding:t,defaultPadding:n,...m?{title:M}:{insetTitle:M},...Qe(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:C,...T,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?u(_e,{benefitsVersion:s,isTabularBenefits:o,benefits:R}):null,d?u(Ce,{__html:d}):null,h?.length?u(He,{items:h,isDotted:g,listItemSize:qe[i]}):null,S,x?.length?u(Ke,{priceList:x}):null,Ze(f)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},Ze=e=>e?.length?u(Ge,{tags:e}):null,et=g((({className:e,padding:t,...n})=>u(w,{className:v("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...n,children:u(Je,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...n})}))),tt=e=>null!=e,nt=new Map,lt=e=>Boolean(e?.every((e=>Array.isArray(e)?lt(e):!e||"string"==typeof e))),at=e=>lt(e)?e.toString():"";function it(e,t,{fallback:n,cache:i}={}){const s=r((()=>rt(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(tt))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=nt)=>n=>{const l=at(n),a=t.get(l);if(l&&tt(a))return a;const i=e(...n);return l&&tt(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 rt(e){return Array.isArray(e)?e:e instanceof Function?rt(e()):[e]}async function st(e,t){try{return e?await ot(e,t):null}catch(e){console.error(e)}return null}const ot=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),ct={},dt="/wcms-resources";function mt(e,t={}){const{fallback:n=ct,pathDir:l=dt}=t,{data:a}=it(e?`${l}/${e}.json`:null,ot,{fallback:n});return a||ct}const ht=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ut=g((e=>{const t=((e="reklamnaya-plitka")=>{const t=mt(e),n=r((()=>ht(0,t?.items?.length)),[t]);return t?.items?.[n]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(et,{...t,...e})}):null}));const pt=e=>e,gt=(e,t)=>{const[n,a]=l(e),[r,o]=l(!1),[c,d]=l({}),m=s({}),h=i(((e,t)=>{const{parse:l=pt,format:i=pt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((n=>({...n,[e]:l(t)}))),d((t=>({...t,[e]:!0})))},{value:i(n[e]),isDirty:r||c[e],onChange:m.current[e]}}),[n,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(n)}),[t,n]);return[n,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},xt=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],ft=e=>!e?.length,bt=e=>t=>n=>e(n)?[]:[t],yt=[];function vt(){const{data:e}=it("/api/v1/regions",ot);return e||yt}const Nt=g((({text:e,link:t})=>p(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Te,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(ce,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(Te,{children:t.text})}):null]}))),wt="container space-y-lg",kt=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Ct=g((({title:e,firstChildren:t,secondChildren:n})=>p("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?u("legend",{className:"w-full",children:u(S,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t,n]}))),St="@xl:w-1/2 space-y-s",Tt=g((({key:e,className:t="",id:n,name:l,type:r="text",label:o,placeholder:c,value:d="",valid:m=!0,children:h,onChange:g,onFocus:x,onBlur:f,pattern:b,autoFocus:y=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{y&&w.current?.focus()}),[y,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=h?"pr-3xl":"",T=Bt(m);return p("div",{className:v("relative",t),children:[p("label",{children:[o?It(o):null,N?u("textarea",{className:v("block resize-y min-h-24",C,T),id:v("textarea",n),name:l||n,placeholder:c,value:d,onInput:k,onFocus:x,onBlur:f},e):u("input",{type:r,className:v("h-14",C,S,T),ref:w,id:n,name:l||n,placeholder:c,value:d,onInput:k,onFocus:x,onBlur:f,pattern:b},e)]}),h]})})),It=e=>u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:e})}),Bt=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",Mt=e=>u("div",{className:"h-4",children:e?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Rt=g((({className:e,label:t,value:n="",placeholder:l,error:a,onChange:i,onBlur:r,isTextarea:s})=>p("div",{className:v("shrink-0 w-full",e),children:[u(Tt,{type:"text","aria-label":t,label:t,valid:Boolean(!a),value:n,onChange:i,onBlur:r,isTextarea:s,placeholder:l}),Mt(a)]}))),Pt=e=>"_"===e,At=e=>/\d/.test(e),zt=e=>Pt(e)||At(e),Vt=[..."+7 (___) ___-__-__"],Dt=Vt.findIndex(Pt),_t=Vt.map(((e,t)=>zt(e)?Vt.slice(0,t).filter(zt).length:-1));const jt=g((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Vt.map(((e,n)=>At(e)?e:t.charAt(_t[n])||e)),l=_t.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(Dt,l)):n).join("")}(e))),[t]);return u(Tt,{onChange:l,onFocus:e=>l(e?.target?.value||""),...n,children:e})})),Et=g((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i})=>p("div",{className:v("shrink-0 w-full",e),children:[u(jt,{"aria-label":t,label:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Mt(l)]}))),Ft="Некорректно заполненное поле",Ot=bt((e=>null!=e&&""!==e))(Ft),Lt=bt((e=>"string"==typeof e&&e.length>1))(Ft),$t=bt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ft),Ut=(Ht=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,bt((e=>"string"==typeof e&&Ht.test(e))))(Ft);var Ht;const Wt=bt((e=>"boolean"==typeof e&&e))(Ft),Kt=(e,t)=>u(Ct,{title:t,firstChildren:p("div",{className:St,children:[u(Rt,{label:"Наименование организации",...kt(e("fullName"),Ot)}),u(Rt,{label:"Контактное лицо",...kt(e("name"),Lt)})]}),secondChildren:p("div",{className:St,children:[u(Rt,{label:"ИНН",...kt(e("inn"),$t)}),u(Et,{label:"Телефон",...kt(e("phone"),Ut)})]})}),Yt=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Gt(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}]}const Xt=e=>e?.text||e?.key||"";function qt(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function Jt(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return qt(globalThis.document,"click",n),t}const Qt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Zt=g((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Qt(t,l).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Xt(e)}),u(O,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:v("absolute right-4 pt-3xs",e.key===n?.key?"":"hidden")})]},e.key)))}):null));function en({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>y.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>y.fire("popup",{type:"update",popup:e,...t}),close:()=>y.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),g=Jt(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Zt,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,n,l,h]),p}const tn=g((({className:e,label:t,options:n=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:g,setTrue:x}]=Gt(),[f,b]=l(""),y=i((()=>{b(""),g()}),[]),N=en({isOpen:h,options:n,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[nn(t),p("div",{className:v("relative",h?"z-20":"z-10"),ref:N,children:[p("div",{className:v("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",an(s,r)),onClick:h?y:x,children:[u("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Xt(a)||o}),ln(h,d)]}),c&&h?u("div",{className:v("absolute top-0 w-full z-20"),children:u(Tt,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),nn=e=>e?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,ln=(e,t)=>u(O,{className:v("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),an=(e,t)=>v(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),rn=g((({className:e="",error:t,...n})=>p("div",{className:e,children:[u(tn,{...n,valid:!t}),Mt(t)]}))),sn=({regions:e,field:t,title:n})=>u(Ct,{title:n,firstChildren:u("div",{className:St,children:u(rn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Yt.map((({name:e=""})=>({key:e,text:e}))),...kt(t("acquiringType"),Ot)})}),secondChildren:u("div",{className:St,children:u(rn,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(t("region"),Ot)})})}),on=g((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>p("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[u("div",{className:v("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:v("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),cn=e=>p("div",{children:[u(on,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(on,{text:"Хочу купить POS-терминал",...e("posTerminal")})]});function dn({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const mn={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"},hn={primary:v("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:v("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")},un=g((({children:e,...t})=>{const n=e=>({...e,onClick:le(dn(e),e)}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=n(t);return u("button",{className:v("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":v(mn[a],hn[a]),o?"rounded-md":"",l),type:s,role:c,onClick:d,children:e})})),pn=(e,t)=>u(un,{className:v("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),gn={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},xn=xt({acquiringType:Ot,region:Ot,fullName:Ot,inn:$t,name:Lt,phone:Ut}),fn=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{acquiringType:t,region:n,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;ft(xn(e))&&l({typeForm:"acqr",region:n?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[l]),[,{field:r,...s}]=gt(gn,a),o=vt();return p("form",{className:wt,onSubmit:s.onSubmit,children:[sn({regions:o,field:r,title:"Вид эквайринга и регион"}),Kt(r,"Данные организации"),cn(r),pn(t),u(Nt,{link:n})]})})),bn=g((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>u("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 u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),yn=[{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"}],vn=g((({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]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(bn,{paths:yn,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:v("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Nn(t),t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(l)}),t?o:null,n?u("div",{className:"ml-s",children:u(Te,{size:"text-l",font:"font-light",children:n})}):null]})})})),Nn=e=>v("rounded border",e?"bg-primary-main":""),wn=(e,t,n)=>p("div",{className:"flex flex-col lg:flex-row w-full justify-between items-baseline",children:[p("div",{children:[p("div",{className:"flex gap-3",children:[u(vn,{...e}),u(Nt,{text:"Согласен с ",link:t})]}),Mt(kt(e,Wt).error)]}),pn(n)]}),kn=(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=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},Cn=()=>{},Sn=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>n)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,l,c),n=Tn(t,e),o=In(t,i,r);m.push(u("td",{children:u("div",{className:Bn(n,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},Tn=(e,t)=>t&&e.toDateString()===t.toDateString(),In=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Bn=(e,t)=>v("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Mn=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Rn=g((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=Cn})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Mn.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Sn({firstDayOfWeek:c,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:o})})]})})),Pn=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],An=Pn.map((e=>({key:e}))),zn=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Vn={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Dn={className:"min-w-32",iconVersion:"black",isBorder:!1},_n=g((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=Gt(!1),[m,h]=l(n?.getMonth()||(new Date).getMonth()),[g,x]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=Jt(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(Pn.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:An,yearsOptions:zn,ref:s}})({onYearSelect:x,onMonthSelect:h,onShowCalendar:d,selectedYear:g,selectedMonth:m,showCalendar:c});return p("div",{className:v(e,"relative"),ref:S,children:[u(Te,{size:"text-m","font-weight":"font-light",children:t}),jn(C,n,a),c?p("div",{className:"absolute bg-white z-20 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(O,{...Vn,className:"-rotate-90 cursor-pointer"})}),u(tn,{onChange:y,value:{key:Pn[m]},options:w,...Dn}),u(tn,{onChange:N,value:{key:String(g)},options:k,...Dn}),u("div",{className:"my-auto",onClick:b,children:u(O,{...Vn,className:"rotate-90 cursor-pointer"})})]}),u(Rn,{today:n,currentMonth:m,currentYear:g,onDateSelect:o,min:r,max:s})]}):null]})})),jn=(e,t,n)=>p("div",{onClick:e,className:v("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:[u(T,{children:t&&kn(t)}),u(O,{...Vn,name:"CalendarIcon"})]}),En=g((({className:e,label:t,value:n,error:l,onChange:a})=>p("div",{className:v("shrink-0 w-full",e),children:[t?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:t})}):null,u(_n,{value:n,onChange:a,valid:Boolean(!l)}),Mt(l)]}))),Fn=e=>p("div",{children:[u(Rt,{label:"Фамилия*",...kt(e("surname"),Lt)}),u(Rt,{label:"Имя*",...kt(e("name"),Lt)}),u(Rt,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),u(En,{label:"Дата рождения*",...kt(e("birthday"),Ot)})]}),On={typeForm:{key:"ANTIFRAUD",text:"Предупреждение о мошенничестве"},surname:"",name:"",middleName:"",phone:"",birthday:void 0,isClient:!1,comment:"",consentDataProcessing:!1},Ln=xt({typeForm:Ot,surname:Ot,name:Lt,birthday:Ot,phone:Ut,consentDataProcessing:Wt}),$n=g((({button:e,link:t,onSubmit:n})=>{const l=i((e=>{const{typeForm:t,phone:l,...a}=e,i={...a,typeForm:t.key,phone:l.replace(/[^+\d]/g,"")};ft(Ln(e))&&n(i)}),[n]),[,{field:a,...r}]=gt(On,l);return u("form",{className:wt,onSubmit:r.onSubmit,children:u(Ct,{firstChildren:p("div",{className:"w-full max-w-xl space-y-s m-auto",children:[Fn(a),u(Et,{label:"Телефон*",...kt(a("phone"),Ut)}),wn(a("consentDataProcessing"),t,e)]})})})})),Un=e=>u(Ct,{firstChildren:p("div",{className:St,children:[u(Rt,{label:"Контактное лицо",...kt(e("name"),Lt)}),u(Rt,{label:"ИНН",...kt(e("inn"),$t)})]}),secondChildren:p("div",{className:St,children:[u(Et,{label:"Телефон",...kt(e("phone"),Ut)}),u(Rt,{label:"Электронная почта",...kt(e("mail"),Ot)})]})}),Hn=({regions:e,field:t})=>u(rn,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(t("region"),Ot)}),Wn={name:"",phone:"",inn:"",mail:""},Kn=xt({region:Ot,name:Lt,phone:Ut,inn:$t,mail:Ot}),Yn=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{region:t,name:n,phone:a,inn:i,mail:r}=e;ft(Kn(e))&&l({typeForm:"bcrd",region:t?.text||"",name:n,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[l]),[,{field:r,...s}]=gt(Wn,a),o=vt();return p("form",{className:wt,onSubmit:s.onSubmit,children:[Hn({regions:o,field:r}),Un(r),pn(t),u(Nt,{link:n})]})})),Gn=[];function Xn(e){const{data:t}=it(e?`/api/v1/branches?regionCode=${e}`:null,qn);return t||Gn}const qn=async e=>await st(e,{method:"GET"})||Gn,Jn=["От 1 000 ₽","До 1 000 000 000 ₽"],Qn=["От 1 мес","До 15 лет"],Zn=(e,t)=>u(Ct,{title:t,firstChildren:p("div",{className:St,children:[u(Rt,{label:"Наименование организации",...kt(e("fullName"),Ot)}),u(Rt,{label:"ИНН",...kt(e("inn"),$t)}),u(Et,{label:"Телефон",...kt(e("phone"),Ut)})]}),secondChildren:p("div",{className:St,children:[u(Rt,{label:"Годовая выручка, ₽",...kt(e("annualRevenue"),Ot)}),u(Rt,{label:"Контактное лицо",...kt(e("name"),Lt)}),u(Rt,{label:"Электронная почта",...kt(e("mail"),Ot)})]})}),el=(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}},tl=(e,t,n)=>Math.max(t,Math.min(e,n));function nl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function ll({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,o={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:v("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:n,step:l,value:s,disabled:i,onInput:t=>{const n=nl(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const al=1,il=100,rl=g((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:al),max:s=(a.length?a.length-1:il),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=el(e,{normalize:(e=0)=>a.length?sl(a)(e):tl(e,r,s),format:We()}),g=i((e=>{m&&m(nl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[n?u(Te,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,u("input",{className:v("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ll({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),ol(l)]})})),sl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ol=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),cl=(e,t)=>u(Ct,{title:t,firstChildren:u("div",{className:St,children:u(rl,{title:"Сумма, ₽",items:Jn,min:1e3,max:1e9,...e("amount")})}),secondChildren:u("div",{className:St,children:u(rl,{title:"Срок, месяцев",items:Qn,min:1,max:180,...e("term")})})}),dl=({title:e,regions:t,branches:n,field:l})=>u(Ct,{title:e,firstChildren:u("div",{className:St,children:u(rn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(l("region"),Ot)})}),secondChildren:u("div",{className:St,children:u(rn,{label:"Адрес",placeholder:"Выберите адрес",options:n.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...kt(l("department"),Ot)})})}),ml={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},hl=xt({fullName:Ot,annualRevenue:Ot,inn:$t,name:Lt,phone:Ut,region:Ot,department:Ot}),ul=g((({button:e,link:t,onSubmit:n})=>{const l=i((e=>{const{amount:t,term:l,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;ft(hl(e))&&n({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${l}/Выручка=${m}`})}),[n]),[a,{field:r,...s}]=gt(ml,l),o=vt(),c=Xn(a.region?.key).filter((e=>e?.address));return p("form",{className:wt,onSubmit:s.onSubmit,children:[cl(r,"Параметры"),Zn(r,"Данные организации"),dl({regions:o,branches:c,field:r,title:"Офис банка"}),pn(e),u(Nt,{link:t})]})})),pl={name:"",phone:""},gl=xt({name:Lt,phone:Ut}),xl=g((({button:e,link:t,onSubmit:n})=>{const l=i((e=>{const{name:t,phone:l}=e;ft(gl(e))&&n({typeForm:"dpst",name:t,phone:l.replace(/[^+\d]/g,"")})}),[n]),[,{field:a,...r}]=gt(pl,l);return u("form",{className:wt,onSubmit:r.onSubmit,children:u(Ct,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",firstChildren:p("div",{className:"w-full max-w-xl space-y-s m-auto",children:[u(Rt,{label:"Имя",...kt(a("name"),Lt)}),u(Et,{label:"Телефон",...kt(a("phone"),Ut)}),pn(e),u(Nt,{link:t})]})})})})),fl=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],bl=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],yl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],vl={typeForm:Ot,region:Ot,surname:Ot,name:Lt,feedbackMethod:Ot,phone:Ut,email:Ot,comment:Ot,consentDataProcessing:Wt},Nl={typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},surname:"",name:"",middleName:"",birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},wl=g((({button:e,link:t,onSubmit:n})=>{const l=i((e=>{kl(e.typeForm.key,e.serviceDirection?.key)?((e,t)=>{const n=xt({...vl,addressBranch:Ot,inn:$t}),{secondaryPhone:l,email:a}=e,i={...e,typeForm:e.typeForm.key,region:e.region?.text,addressBranch:e.addressBranch?.text||"",feedbackMethod:e.feedbackMethod.text,phone:e.phone.replace(/[^+\d]/g,""),secondaryPhoneNumber:l,mail:a};ft(n(e))&&t(i,!0)})(e,n):"FEEDBACK"===e.typeForm.key?((e,t)=>{const n=xt({...vl,birthday:Ot}),{region:l,phone:a}=e,i={...e,typeForm:e.typeForm.key,feedbackMethod:e.feedbackMethod.text,regionBranch:l?.text,phoneNumber:a.replace(/[^+\d]/g,"")};ft(n(e))&&t(i)})(e,n):((e,t)=>{const n=xt({...vl,addressBranch:Ot}),{region:l,phone:a,secondaryPhone:i}=e,r={...e,typeForm:e.typeForm.key,addressBranch:e.addressBranch?.text||"",feedbackMethod:e.feedbackMethod.text,regionBranch:l?.text,phoneNumber:a.replace(/[^+\d]/g,""),secondaryPhoneNumber:i};ft(n(e))&&t(r)})(e,n)}),[n]),[a,{field:r,...s}]=gt(Nl,l),o=vt(),c=Xn(a?.region?.key).filter((e=>e?.address)),d="FEEDBACK_QS"===r("typeForm").value?.key,m=kl(r("typeForm").value?.key,r("serviceDirection").value?.key);return u("form",{className:wt,onSubmit:s.onSubmit,children:u(Ct,{firstChildren:p("div",{className:"w-full max-w-xl space-y-s m-auto",children:[u(rn,{label:"Тема*",placeholder:"Выберите тему",options:fl,...kt(r("typeForm"),Ot)}),d?u(rn,{label:"Направление обслуживания*",placeholder:"Выберите направление",options:yl,...kt(r("serviceDirection"),Ot)}):null,u(rn,{label:"Филиал обслуживания*",placeholder:"Выберите филиал",isSearch:!0,options:o.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(r("region"),Ot)}),d?u(rn,{label:"Адрес*",placeholder:"Выберите адрес",options:c.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...kt(r("addressBranch"),Ot)}):null,Fn(r),m?p("div",{children:[u(Rt,{label:"ИНН*",...kt(r("inn"),$t)}),u(Rt,{label:"Наименование организации",...r("fullName")})]}):null,u(rn,{label:"Способ получения ответа*",options:bl,...kt(r("feedbackMethod"),Ot)}),u(Et,{label:"Телефон*",...kt(r("phone"),Ut)}),d?p("div",{children:[u(Rt,{label:"Дополнительный телефон",...r("secondaryPhone")}),u(Rt,{label:"Электронная почта*",...kt(r("email"),Ot)}),u(Rt,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...r("bankEmpolee")}),u(Rt,{label:"Дата и время обращения в Банк",...r("applicationDate")})]}):u(Rt,{label:"Электронная почта*",...kt(r("email"),Ot)}),u(Rt,{...kt(r("comment"),Ot),placeholder:"Ваше сообщение*",isTextarea:!0}),wn(r("consentDataProcessing"),t,e)]})})})})),kl=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,Cl=g((e=>{const{button:t,sourceBookDir:n}=e,{regions:a}=mt(n||"regions-grant-support"),[i,r]=l({key:""}),s=te({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s",children:[a?u(rn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(ce,{href:o,target:"_blank",className:v("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Sl={surname:"",name:"",middleName:"",phone:"",email:"",birthday:void 0,consentDataProcessing:!0},Tl=xt({surname:Lt,name:Lt,middleName:Lt,phone:Ut,email:Ot,birthday:Ot}),Il=g((e=>{const{button:t,link:n,product:l,onSubmit:a}=e,r=i((e=>{const{surname:t,name:n,middleName:i,phone:r,email:s,birthday:o,consentDataProcessing:c}=e;ft(Tl(e))&&a({typeForm:"dpst",surname:t,name:n,middleName:i,email:s,consentDataProcessing:c,phoneNumber:r.replace(/[^+\d]/g,""),birthday:o?.toISOString().slice(0,10)||"",product:l||""},!0)}),[a]),[,{field:s,...o}]=gt(Sl,r);return p("form",{className:wt,onSubmit:o.onSubmit,children:[u(Ct,{firstChildren:p("div",{className:St,children:[u(Rt,{label:"Фамилия",...kt(s("surname"),Lt)}),u(Rt,{label:"Отчество",...kt(s("middleName"),Lt)}),u(Et,{label:"Телефон",...kt(s("phone"),Ut)})]}),secondChildren:p("div",{className:St,children:[u(Rt,{label:"Имя",...kt(s("name"),Lt)}),u(En,{label:"Дата рождения*",...kt(s("birthday"),Ot)}),u(Rt,{label:"Электронная почта",...kt(s("email"),Ot)})]})}),wn(s("consentDataProcessing"),n,t)]})})),Bl=g((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:n,name:e,checked:l,onChange:e=>a(e.target.value)}),t?u(Te,{color:"text-primary-text",children:t}):null]})}))),Ml=e=>{const{value:t,onChange:n}=e("vedTypes");return u(Ct,{firstChildren:p("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[u(Bl,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>n&&n(e)}),u(Bl,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>n&&n(e)}),u(Bl,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>n&&n(e)}),u(Bl,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>n&&n(e)})]})})},Rl=({textField:e,text:t,placeholder:n="",error:l})=>p("div",{children:[p("label",{className:"space-y-xs",htmlFor:"textarea",children:[t?u("div",{children:u(Te,{size:"text-m",font:"font-light",children:t})}):null,u("textarea",{id:"textarea",placeholder:n,className:v("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:e.value,onInput:t=>e.onChange&&e.onChange(t.target?.value||"")})]}),Mt(l)]}),Pl=({field:e,regions:t})=>{const n="currencyControl"===e("vedTypes").value;return p("div",{className:"space-y-s",children:[n?u(rn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(e("region"),Ot)}):null,p("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[n?u(Rt,{label:"ИНН",...kt(e("inn"),$t)}):null,u(Rt,{label:"Наименование организации",...kt(e("fullName"),Ot)}),u(Rt,{label:"ФИО",...kt(e("name"),Lt)}),u(Et,{label:"Телефон",...kt(e("phone"),Ut)}),n?null:u(Rt,{label:"Электронная почта",...kt(e("mail"),Ot)})]})]})},Al={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},zl={fullName:Ot,name:Lt,phone:Ut},Vl=xt({...zl,mail:Ot}),Dl=xt({...zl,inn:$t,region:Ot}),_l=e=>"currencyControl"===e,jl=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),El={ApplicationFormBusinessCard:Yn,ApplicationFormWed:g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{fullName:t,name:n,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:n,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:jl(o),PartnerComments:c,..._l(o)?{inn:r,region:s?.text||""}:{mail:i}};ft((e=>_l(e)?Dl:Vl)(o)(e))&&l(d)}),[l]),[,{field:r,...s}]=gt(Al,a),o=vt(),c=r("text");return p("form",{className:"container space-y-lg",onSubmit:s.onSubmit,children:[Ml(r),u(S,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Pl({field:r,regions:o}),Rl({textField:c,text:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка"}),pn(t),u(Nt,{link:n}),u(S,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(X,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(X,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:xl,ApplicationFormCredit:ul,ApplicationFormAcquiring:fn,ApplicationFormGrantSupport:Cl,ApplicationFormIndividuals:Il,ApplicationFormFeedback:wl,ApplicationFormAntiFraud:$n},Fl=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(X,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),p("div",{children:[u(S,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Ol={send:async function(e,t=!1){const n=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},Ll=g((e=>{const{className:t,formBlock:n,...a}=e,[r,s]=l(""),o=i((async(e,t=!1)=>{const n=await Ol.send(e,t)?"OK":"Fail";return s(n),n}),[]);return u(w,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[n?.title?u(S,{headingType:"h3",title:n.title,className:"@xl:text-center"}):null,n?$l(n,o):null,r?u(Fl,{responseType:r}):null]})})})),$l=(e,t)=>{const n=e?.formType;if(!n||!(n in El))return null;return u(El[n],{...e,onSubmit:t})},Ul="text-left",Hl={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Wl=g((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:v("rounded-icon object-fit flex justify-center items-center",Hl[n],e),children:u(O,{...i,width:"54%",height:"54%",name:a})}):null})),Kl=g((({className:e="",title:t,benefitList:n,...l})=>p(w,{className:e,defaultPadding:"p-6xl",...l,children:[t?u(S,{headingType:"h3",as:"h2",className:Ul,title:t}):null,n?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Yl)}):null]}))),Yl=({label:e,description:t,items:n,icon:l,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?u(Wl,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...l}):null,l?.src?u(X,{className:"shrink-0",image:l}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(S,{headingType:"h6",children:e}),u(Te,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(He,{dotClassName:"bg-secondary-text",listItemSize:"S",items:n,isDotted:i})]}):null]},String(r)),Gl=g((({className:e="",title:t,description:n,bonusItems:l=[],align:a="text-left",...i})=>u(w,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(B,{className:"mb-xl",isEmbedded:!0,title:t,description:n,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:l.length>0?l.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(B,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:Ee(e?.buttons)}),e.bonusItemContent?.bonusType?Xl(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Xl=e=>"count"===e.bonusType?ql(e):Jl(e),ql=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(Te,{size:"text-h2",children:e.bonusName})}):null]}),Jl=e=>e.image?u(X,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Ql=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Zl(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 ea=g((({className:e="",style:t,idx:n,activeIndex:l,observerOptions:o,children:c,onIntersection:d})=>{const m=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Zl(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&&d&&d(n||0,e[e.length-1])}),[d,n]),o);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(n===l),ref:m,children:c})})),ta=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],na=g((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:l=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const n=[...x.current||[]];n[e]=t,x.current=n,h&&h(n),p&&p(aa(n))}),[h,p]),b=l>0?a*Number(l)-1:0,y="vertical-list"===o,N="horizontal-list"===o,w={...N?la(r,b):{},...y?Ql(d):{},gap:`${a}px`};return u("div",{className:v("box-border overflow-auto no-scrollbar",o,e),style:w,ref:t,children:(k=(e,t)=>u(ea,{className:v(c,l?ta[l-1]:"",y?"h-full":""),style:N?la(r/4):{},activeIndex:n,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),la=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),aa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ia={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ra={"horizontal-list":"w-6","vertical-list":"h-6"},sa=g((({className:e="",containerRef:t,activeIndex:n,dotCount:l=0,listType:a="horizontal-list",version:i})=>l?u("div",{className:v("flex gap-xs",ia[a],i?"group":"",e),"data-ver":i,children:Array.from({length:l}).fill(null).map(((e,l)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${l===n?ra[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==n&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(l)},String(l))))}):null)),oa=e=>e,ca=(e=oa)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),da=ca(),ma=(e=oa)=>ca((t=>-e(t))),ha=ma(),ua=e=>t=>e.scrollWidth/t,pa=e=>(t,n)=>{e.scrollBy({left:n*ua(e)(t),behavior:"smooth"})},ga=({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)}),[e]),[c,d]=a.length?[ma()(a),ca()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?pa(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?pa(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i((e=>{n?.current&&n.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},xa=g((({className:e,version:t,gap:n=14,padding:l=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=ga({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:v(e,"vertical-list"===o?"relative h-full":""),children:[u(na,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:n,padding:l,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(sa,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),fa=(e,t,n)=>{return u(xa,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>p("div",{className:v("flex flex-col gap-1","justify-between p-m h-full border border-gray",n||t?"":"justify-center"),children:[t?u(Te,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?u(X,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?u(Te,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},ba=g((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>p(w,{className:v("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[u(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?fa(e,0,t):null]}))),ya={start:"justify-start",center:"justify-center",end:"justify-end"},va=g((({buttons:e,className:t="",align:n,...l})=>{const a=n?v("flex",ya[n]):"";return u(w,{className:v("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),Na=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const wa=g((({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 u("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:n})})})),ka=g((({className:e,title:t,value:n,fractionDigits:l,fixed:a,prefix:i,postfix:r})=>p("div",{className:v("flex justify-between @xl:flex-col",e),children:[t?u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,u("div",n?{children:u(Te,{size:"text-h3",children:[i,We(l,{fixed:a})(n),r].filter(Boolean).join(" ")})}:{children:u(Te,{size:"text-h3",children:"-"})})]}))),Ca=1e4,Sa=5e6,Ta=Math.round(29.5),Ia={minSum:Ca,maxSum:Sa,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ba={minSum:Ca,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ma={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ra={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Pa={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Aa=e=>e?u(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,za=g((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i})=>p("div",{children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:We(l,{fixed:!0})(e)}),n?u("span",{className:"text-7xl",children:n}):null]}),a&&i?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Va=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(O,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Da=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?u(Va,{title:e,...i}):p("div",{children:[u("div",{className:"hidden @xl:block",children:u(za,{title:e,rate:t,unit:n,fractionDigits:l,...i})}),u("div",{className:"@xl:hidden",children:u(ka,{title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,...i})})]});function _a({isShowItems:e=!0,step:t=1e3,...n}){const l=[`От ${We(2)(n.min||0)} ₽`,`До ${We(2)(n.max||0)} ₽`];return u(rl,{items:e?l:[],step:t,...n})}function ja(e){const{data:t}=it(`/wcms-resources/${e}.json`,ot);return t}const Ea=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,a=ja(t||"bonus-calculator-data")||Ma,[i,r]=((e,t,n)=>{const{minSumTravel:l,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===l&&n===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*n),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*n),i)*(12-r)]})(a,n,l);return{...a,...e,monthBonus:i,yearBonus:r}},Fa=g((({className:e="",sourceBookDir:t,buttons:n,footnote:l})=>{const[a,{field:i}]=gt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Ea(a,t);return p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[_a({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),_a({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?Da({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[m>=0?u(ka,{title:"Баллов за год",value:m}):null,Ee(n,{isVertical:!0}),Aa(l)]})]})})),Oa=g((({className:e,inputChildren:t,rateChildren:n,resultChildren:l})=>p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[u("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),u("div",{className:"border-b border-main-divider md:hidden"}),n,u("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:l})]}))),La=(e,t=0)=>e?.sum&&e.sum>=Ca&&e.sum<=Sa?e.sum:t,$a=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ua=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ha={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Wa=g((({items:e,checkedItem:t,className:n,onChange:l,orientation:a="horizontal"})=>u("div",{className:v(`flex ${Ha[a]}`,n),children:e?.map((({id:e,text:n})=>u(vn,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e)},String(e))))}))),Ka=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Te,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?u("div",{className:"@5xl:hidden",children:u(Te,{color:"text-secondary-text",font:"font-light",children:n})}):null,u(Wa,{orientation:l,items:e,checkedItem:e[a?0:1].id,className:v("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Ya=e=>Ka({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Ga=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Xa([e,t],l),Xa=([e,t],n=[])=>({[e]:n.length?ha(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?da(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),qa=(e,[t,n],l)=>e>=l[t]&&e<=l[n],Ja=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Qa=(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)},Za=g((({className:e="",rateParams:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=gt({moneyValue:La(r,1e5),daysValue:$a(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=ja(t||"business-calculator-data"),o=i||a,c=n<90||n>730;if(n<=30)return{...Pa,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Ja(o,e)&&qa(l,["minSum","maxSum"],e)&&qa(n,["minDays","maxDays"],e)))||Pa,{rate:m}=d,h=Qa(m,e),u=l+h,p=s?.rateRows||[Pa];return{...d,...Xa(["minSum","maxSum"],p),...Xa(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:g,depositeName:x}=c;return u(Oa,{className:e,inputChildren:p("div",{children:[_a({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(rl,{items:[`От ${Ua(f.min||0)}`,`До ${Ua(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[ei(c,o),Ya({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Da({rate:h,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:g}),resultChildren:p("div",{children:[ti(m,d),Ee(n,{isVertical:!0}),Aa(l),Aa(a)]})});var f})),ei=(e,t)=>p("div",{className:"space-y-s",children:[u(Te,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(vn,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(vn,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),ti=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[u(ka,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(ka,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),ni=({min:e=0,max:t=0,availableMonths:n,...l})=>u(rl,{items:[`От ${li(e)}`,`До ${li(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),li=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,ai=e=>Ka({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ii=e=>ri({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ri({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ri({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ri({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ri=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],si=(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)},oi=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=ja(t||"credit-calculator-data"),s=i?.rateRows||[Ia],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ii({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Ga(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Ga(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>ii({row:e,userInputParams:t,paramsViewSettings:n})&&qa(l,["minSum","maxSum"],e)&&qa(a,["minMonths","maxMonths"],e)))||Ia)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:p}=u,g=si(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,monthlyPayment:g})),[e,i])},ci=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=gt({moneyValue:La(i,2e5),monthsValue:$a(i,Ta),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=oi(r,t,a),c=ai({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return u(Oa,{className:e,inputChildren:p("div",{children:[_a({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),ni({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),di({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),rateChildren:Da({rate:o.rate}),resultChildren:p("div",{children:[u(ka,{title:"Ежемесячный платёж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block mb-lg",children:c}),Ee(n,{isVertical:!0}),Aa(l)]})})})),di=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(vn,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(vn,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(vn,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(vn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),mi=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},hi=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=ja(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?gi(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!n?.isShowMonthlyInterestPayment,o=!n?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>pi({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&pi({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&qa(l,["minSum","maxSum"],t)&&qa(a||r,["minMonths","maxMonths"],t)))||Ra,{rate:d}=c,m=ui(d,e),h=l+m,u=i?.rateRows||[Ra];return{...c,...Xa(["minSum","maxSum"],u),...Xa(["minMonths","maxMonths"],u),availableMonths:mi(u.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:r,income:m,finalSum:h}},ui=(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)},pi=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],gi=(e,t)=>e+Math.round((t-e)/2),xi=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=gt({moneyValue:La(r,2e4),monthsValue:$a(r),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=hi(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:g}=c,{onChange:x}=o("monthsValue");return a((()=>{!s.monthsValue&&x&&x(d)}),[d]),u(Oa,{className:e,inputChildren:p("div",{children:[_a({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),ni({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),fi({...c,...i},o)]}),rateChildren:Da({rate:m}),resultChildren:p("div",{children:[u(ka,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(ka,{title:"Сумма в конце срока",value:g,postfix:"₽"}),Ee(n,{isVertical:!0}),Aa(l)]})})})),fi=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Ya({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(n={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ka({...n,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var n},bi=e=>yi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&yi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),yi=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],vi=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=ja(t||"refinancing-calculator-data"),c=o?.rateRows||[Ba],d=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>bi({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:m,maxSum:h}=Ga(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=Ga(["minMonths","maxMonths"],d,c),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>bi({row:e,userInputParams:t,paramsViewSettings:n})&&qa(l+r,["minSum","maxSum"],e)&&qa(i,["minSumOld","maxSumOld"],e)&&qa(r,["minSumExtra","maxSumExtra"],e)&&qa(a,["minMonths","maxMonths"],e)))||Ba)({rateRows:c,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:x}=g,f=si(x,e),b=e.oldMonthlyPayment-f;return r((()=>({...g,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Ni=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:a})=>{const[i,{field:r}]=gt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=vi(i,t,a),o=ai({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return u(Oa,{className:e,inputChildren:p("div",{children:[_a({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),_a({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),ni({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),wi({...s,...a},r),s.isExtraMoney?_a({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),rateChildren:Da({rate:s.rate,fractionDigits:1}),resultChildren:p("div",{children:[u(ka,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(ka,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block mb-lg",children:o}),Ee(n,{isVertical:!0}),Aa(l)]})})})),wi=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(vn,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(vn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(vn,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),ki={CreditCalculatorForm:ci,DepositCalculatorForm:xi,BusinessDepositCalculatorForm:Za,BonusCalculatorForm:Fa,RefinancingCalculatorForm:Ni},Ci=g((({className:e,calculatorTabs:t=[],...n})=>u(w,{className:e,defaultPadding:"p-0",...n,children:Ti(t)}))),Si=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in ki))return null;const n=ki[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(S,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(n,{...e.calculatorBlock,isMobile:!0})]})},Ti=e=>{if(!e||!e.length)return null;return 1===e.length?Si(e[0]):e.map(((e,t)=>u(Na,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(wa,{isUnfolded:t,children:Si(e)}),renderFoldButton:Ii(e)},t.toString())))},Ii=e=>({isUnfolded:t,onToggle:n})=>{const l=e.nav?.align||"text-left";return p("button",{onClick:n,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(O,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(Te,{align:l,color:"text-white",children:e.nav?.title}),u(Te,{align:l,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(O,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},Bi=g((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=el(e,{normalize:(e=a)=>n&&l?String(tl(Number(Mi(e)),n,l)):Mi(e),format:We(r)}),c=i((e=>t&&t(Mi(e))),[t]);return u(Tt,{onChange:c,...s,...o})})),Mi=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ri=g((e=>u(Bi,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Te,{size:"text-xl",font:"font-light",children:"₽"})})}))),Pi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ai={amount:1500},zi=g((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=gt(Ai),[m,h]=l(!1);return a((()=>{h(c<=0)}),[c]),p(w,{className:v("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(S,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Pi[s],children:[u(Ri,{valid:!m,placeholder:i,label:n,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u(un,{className:"w-full mt-lg",type:"submit",disabled:m,children:r.text}):null]})]})})),Vi=(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}]},Di=g((({className:e,disabled:t,...n})=>u(ce,{rounded:!0,className:v("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:u(X,{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=g((e=>u(Di,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ji=g((e=>u(Di,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ei="absolute top-[calc(50%-24px)] z-40",Fi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Oi=g((({scroll:e,activeIndex:t,itemCount:n,arrowsPadded:l,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<n-1:c,x=i((()=>{a?(o&&t!==n-1&&d(),r()):d()}),[d,r,a,o,t,n]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,n]);return p("div",{className:"hidden @lg:block",children:[Li(e),h?u(_i,{className:v(Ei,l?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(ji,{className:v(Ei,l?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Li=e=>p("div",{children:[e.canScrollLeft?u("div",{className:v(Fi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:v(Fi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),$i=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Ui=[];function Hi(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=$i,blocksRegistry:r={},ancestors:s=Ui}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:v(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return c?u(c,{className:i,block:e,options:t,...r,...l},a):null}},a)}const Wi=[],Ki=(e,{key:t,ancestors:n=Wi,slotName:l=null,extraProps:a,renderProps:i=Hi,...r})=>{const s=a?(e,t)=>Hi(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||Wi,[r.parent,l]]:n},a)))};function Yi({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?Ki(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}const Gi=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Xi=({className:e,text:t="ХИТ"}={})=>p("div",{className:v("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(O,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),qi="relative h-full",Ji={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Qi=({noCardBorder:e,activeIndex:t,cardSize:n="normal",...l})=>{const{blocks:a}=l.block||{},i=a?.some(tr);return Yi({...l,renderProps:(l,a,r)=>p("div",{className:Zi(l,{someCardsHighlighted:i}),children:[Hi(l,a,{className:er(l,{someCardsHighlighted:i,showBorder:!e,cardSize:n}),blockIndex:r,isActive:r===t}),tr(l)?Xi({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Zi=(e,{someCardsHighlighted:t})=>v(qi,t&&(tr(e)?"pt-3xl":"pt-3xl sm:pt-16")),er=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>v(qi,"min-w-80",Ji[l],t&&(tr(e)?"pt-3xl sm:pt-16":"pt-3xl"),Gi(n),n&&"h-full"),tr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,nr=g((({className:e,itemCount:t,visibleItemCount:n=0,noCardBorder:l,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:g}]=Vi({itemCount:d,visibleItemCount:n},Math.floor(n/2)),[x,f]=ga({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(w,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:v(a?"flex justify-center":"","relative max-w-full"),children:[u(na,{containerRef:x,visibleItemCount:n,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Qi({noCardBorder:l,activeIndex:m,cardSize:s,...o})}),u(Oi,{scroll:f,arrowsPadded:i,onScrollLeft:g,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(sa,{className:"@5xl:hidden",containerRef:x,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));nr.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],nr.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const lr=g((({title:e,description:t,className:n})=>u(w,{className:n,defaultPadding:"p-6xl",children:u(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),ar="z-10 border border-solid w-full h-full",ir=v(ar,"absolute hidden @xl:block border-transparent"),rr=g((({className:e,title:t,description:n,button:l,...a})=>u(w,{className:v("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:v(ir,"top-9 right-12 bg-green-dark")}),u("div",{className:v(ir,"top-6 right-8 bg-green")}),u("div",{className:v(ir,"top-3 right-4 bg-green-light")}),p("div",{className:v(ar,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(B,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),sr={black:"bg-black",white:"bg-white"},or=g((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(w,{className:v("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(pe,{className:"h-full",padding:o,title:u(B,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?u(X,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Te,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(cr)]}):null,a?p(Te,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),cr=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${sr[e]}`},String(t)),dr=g((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,...r})=>p(n,{tag:n,className:v("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),mr=g((({className:e="",label:t,icon:n,dataTheme:l="",disabled:a=!1,onClick:i})=>u(dr,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",className:v("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:u(Te,{size:"text-h4",children:t}),iconNode:n?u(X,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),hr=({isUnfolded:e,onToggle:t})=>u(mr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ur=g((({className:e="",icon:t,...n})=>{const l=ae(),{text:a,href:i,target:r,onClick:s}=l(n);return a?u("div",{className:v("w-full pb-lg",e),children:p("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[p("div",{className:"flex items-center space-x-lg",children:[t?u(X,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),u(O,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),pr=g((({className:e,additionalDescription:t,description:n,links:l=[],title:a,...i})=>p(w,{className:e,...i,children:[p("div",{children:[u(B,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left"}),u(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?gr(l):null]}))),gr=(e,t=3)=>{const n=(e||[]).map(((e,t)=>u(ur,{...e},String(t)))),[l,a]=t>0?[n.slice(0,t),n.slice(t)]:[n,[]];return u("div",{className:"mt-4xl",children:a.length>0?u(Na,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[u("div",{className:"mb-1",children:l}),u(wa,{isUnfolded:e,children:a})]}),renderFoldButton:xr}):u("div",{children:l})})},xr=({isUnfolded:e,onToggle:t})=>e?null:u(mr,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),fr=g((({className:e="",href:t,target:n,isRemote:l=!1,children:a})=>{const i=ae({isRemote:l})({href:t,target:n});return u(t?"a":"div",{className:v("block",e),...t?i:{},children:a})})),br=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],yr=e=>br.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},vr=g((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{const[s,o]=l(),c=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=yr(t),c=je(l)?l:r,d=n?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=v("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",n&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:v("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Ee(c,{className:v(a||s?"basis-full":""),buttonClassName:d})}),r?u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Nr=g((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:x=false,isImageSecondary:f=!1}={},...b})=>u(w,{className:v("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(fr,{href:a,target:c,className:"h-full",children:p(pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(B,{title:d,description:n,headlineVersion:"XS",isEmbedded:!0,align:m}),...Qe(je(i)?u(X,{image:i}):null,g),buttons:o.length?u(vr,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:x,isImageSecondary:f,imageAlign:"center",children:[u(_e,{benefits:h}),u(He,{items:r,isDotted:s,listItemSize:"S"}),wr(l,m)]})})}))),wr=(e,t)=>e?u(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,kr=(e,t)=>{const{title:n,description:l,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[n?u("div",{className:"opacity-80",children:u(Te,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?u("div",{className:"mt-2xs",children:u(Te,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?u("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},Cr=g((({className:e="",title:t,align:n="text-center",icon:l,button:a,cardCells:i=[],...r})=>{const s=i.map(kr),o=s.slice(0,1),c=s.slice(1);return p(w,{className:v("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[je(l)?u("div",{className:"self-center",children:u(X,{image:l})}):null,t?u(S,{className:v("pt-xs",n),headingType:"h5",title:t}):null,a?u(ce,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(Na,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(wa,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?Sr:null}):null]})})),Sr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(O,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Tr=(e=!1)=>e?"text-white":"",Ir=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Br=g((({icon:e,image:t,title:n,subtitle:l,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(X,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(X,{image:t})}),n?u(S,{headingType:"h4",className:Tr(a),title:n}):null,l?u("div",{className:Ir(a),children:l}):null]}))),Mr=g((({cell:e,rowHeader:t,isFillGradient:n=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:v("h-full","border-main-divider border-b"),children:e?e.map(Ar(n,t)):null})}))),Rr=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),Pr=(e=!1)=>""+(e?"text-white":""),Ar=(e,t)=>({label:n,description:l},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u(T,{size:"text-s",color:Rr(e),children:t}),p("div",{className:"basis-1/2",children:[n?u("div",{className:"text-right",children:u(T,{size:"text-s",align:"text-right",color:Pr(e),children:n})}):null,l?u("div",{className:"text-right",children:u(T,{size:"text-s",color:Rr(e),children:l})}):null]})]},String(a)),zr=g((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:l,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:n),s=l?"secondary":"primary";return p("div",{className:v("border border-gray rounded-md p-m mb-m",l?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(Br,{...e,isFillGradient:l}),r?.length?r.map((({rowHeader:e,cell:t},n)=>u(Mr,{cell:t,rowHeader:e,isFillGradient:l},String(n)))):null,a&&e?.link?u(ce,{href:e.link.href,target:e.link?.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Vr({onToggleColumn:i,isFillGradient:l,showRow:a})]})})),Vr=({onToggleColumn:e,isFillGradient:t,showRow:n})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:u(Te,{size:"text-s",font:"font-medium",children:n?"Скрыть":"Показать описание"})})}),Dr=g((e=>{const{className:t,title:n}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[n?u(S,{headingType:"h3",className:"font-medium text-center",title:n}):null,u("div",{role:"table",children:u(_r,{...e})})]})})),_r=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=l(Array.from({length:e.length}).fill(!a)),d=i((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>Array.from({length:e.length}).fill(!1)))),[]),h=e?.map((({data:e,header:l},i)=>{return u(zr,{visibleRowLength:a,showRow:o[i],header:l,columnData:(r=e,r?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===i&&n,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(xa,{onVisibleIndicesChange:m,children:h}):h})),jr=e=>e%2!=0,Er=g((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(X,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:Ul})]}))),Fr=["ArrowDownIcon","ArrowUpIcon"],Or="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Lr=g((({label:e="",blocksToRender:t=[],topItemsCount:n=0,block:l,notFound:a,...i})=>{const[r,s]=n>0?[t.slice(0,n),t.slice(n)]:[t,[]];return p("div",{children:[u("div",{className:v(t.length?"hidden":"block"),children:a?u(Er,{...a}):null}),p("div",{className:v("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:v(Or),children:[Ki(r,{...i.options,parent:l}),jr(r.length)?u(ut,{className:"col-span-6"}):null]}),u(Na,{renderFoldableSection:({isUnfolded:e})=>p(wa,{className:v(Or),isUnfolded:e,children:[Ki(s,{...i.options,parent:l}),jr(s.length)?u(ut,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:l})=>u(mr,{className:v(n<1?"hidden":""),disabled:!s?.length,label:e,icon:Fr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:l})})]})]})})),$r=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Ur=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>$r(t[e])||$r(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>$r(t[e])||$r(n[e])||Hr(t[e])<=Hr(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>$r(t[e])||$r(n[e])||Hr(t[e]?.min)>=Hr(n[e]?.min)&&Hr(t[e]?.min)<=Hr(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>$r(t[e])||$r(n[e])||t[e]?.some((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>$r(t[e])||$r(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Hr=e=>Number(e||0),Wr=(e,t)=>(n=pt)=>e&&e.filter((e=>Ur(t,n(e.content||{})))),Kr=g((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>u(on,{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))))),Yr=({field:e,reset:t,filtrationSchema:n,resetButton:l,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(n).map(Gr(e))]}),l?u("div",{children:u(un,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:l?.text})}):null]}),Gr=e=>([t,n])=>{const l=n?.type;return"array"===l?Xr(t,e)(n):null},Xr=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[n?.title?u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:n.title})}):null,u(Kr,{items:l,multiple:!n?.single,...t(e)})]},e)},qr=(e,t)=>{const n=e[t?.sourceBook];return n?n?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e)):[]},Jr=(...e)=>{const t=e.map((e=>st(e)));return Promise.all(t)};function Qr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Zr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function es(e){const{dirs:t=[],source:n=[]}=r((()=>{const t=(e=>e?.filter(Zr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:l=[]}=it(t,Jr);return{source:Object.fromEntries(Qr(n,l).filter((([,e])=>Boolean(e)))),months:(a=l.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const ts=1e9,ns={sum:{min:1e4,max:ts},period:3},ls=g((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const{source:r,months:s}=es(i.block?.blocks),[o,{field:c,reset:d}]=gt(ns),m=Wr(i.block?.blocks,o)((e=>({...e,period:qr(r,e||{})||[]}))),h=p("div",{children:[u(Ri,{label:l?.title,min:500,max:ts,...c("sum",{parse:e=>({min:Number(e),max:ts}),format:({min:e})=>String(e)})}),u(rl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(w,{className:v("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Yr({field:c,reset:d,filtrationSchema:t,resetButton:n,children:h}),u(Lr,{blocksToRender:m,...i})]})})),as={type:"string",title:"Адрес справочника"};ls.childrenTypes=["ProductTile"],ls.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:as});const is=e=>"Image"===e?.contentType&&e?.image?u(X,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,rs=g((({className:e="",title:t,description:n,error:l,button:a,...i})=>p(w,{className:v("flex flex-col justify-center items-center",e),defaultPadding:v("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:is(l)}),u(B,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(ce,{version:a?.version,text:a?.text,...a}):null]}))),ss="location";function os(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])]})(y,"location",ds()??{name:e}),r=i((e=>{ms(e),n(e)}),[]),{data:s}=it(cs()?null:"/api/v1/region",ot);return a((()=>{s&&!cs()&&n(s)}),[s]),[t??{name:e},r]}const cs=()=>Boolean(globalThis.localStorage?.getItem(ss)),ds=()=>{try{const e=globalThis.localStorage?.getItem(ss);return e&&JSON.parse(e)}catch(e){return null}},ms=e=>{try{globalThis.localStorage?.setItem(ss,JSON.stringify(e))}catch(e){}};var hs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(hs||(hs={}));const us=new Intl.NumberFormat("ru",{style:"currency",currency:hs.RUB}),ps=e=>e?us.format(e):"",gs="text-left text-m font-light text-secondary-text",xs=`${gs} pl-5xl`,fs={USD:"DollarIcon",EUR:"EuroIcon"},bs=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:gs,children:u(Te,{size:"text-m",children:"Валюта"})}),u("th",{className:xs,children:u(Te,{size:"text-m",children:"Купить"})}),u("th",{className:xs,children:u(Te,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(ys)})]}))),ys=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(X,{image:{icon:fs[t]},width:"24",height:"24"}):null,u(Te,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:ps(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:ps(e?.buyExchangeRate)})})]},t)},vs={icon:"GpsIcon"},Ns=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Wl,{...vs,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u(T,{size:"text-l",color:"text-primary-main",children:t}):null,u(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),ws=(e,t,n)=>{const l=Number(ks(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)},ks=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Cs=e=>{return(t=[[e=>e.value!==hs.RUB&&e.oppositeValue!==hs.RUB,()=>e.handleConvert(e.value,hs.RUB)],[e=>e.value===hs.RUB&&e.oppositeValue===hs.RUB,()=>e.handleConvert(e.value,hs.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t};function Ss(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??""}))),o={key:l,text:l};return p("div",{className:"relative flex",children:[u(Tt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(tn,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ts=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||hs.RUB,selectBuy:n?.[0]?.currency?.currency||hs.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Ss({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Is(r,o,n),value:r.inputSell,setValue:e=>Ms(o,n)(e,r.selectSell,r.selectBuy)}),Ss({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Bs(r,o,t),value:r.inputBuy,setValue:e=>Rs(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(ce,{text:a.text,version:a?.version,...a}):null]})})),Is=(e,t,n)=>l=>{t({selectSell:l}),Cs({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Ms(t,n)(e.inputSell,l,a)}})},Bs=(e,t,n)=>l=>{t({selectBuy:l}),Cs({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Rs(t,n)(e.inputBuy,l,a)})},Ms=(e,t)=>(n,l,a)=>{e({inputSell:ks(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputBuy:String(ws(n,i,l===hs.RUB)||"")})},Rs=(e,t)=>(n,l,a)=>{e({inputBuy:ks(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputSell:String(ws(n,i,l===hs.RUB)||"")})};const Ps=g((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=os(),i=function(e){const t=e?.code||"000",{data:n}=it(`/api/v1/exchangerates?regionCode=${t}`,ot);return n||{}}(a),r=As(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:hs.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:hs.RUB}}),u(w,{className:v("box-border min-h-80",e),...l,children:u(pe,{className:"h-full",title:u(S,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(bs,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(Ns,{address:i?.address})]}),r.length&&s.length&&o.length?u(Ts,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:n}):null]})})})})),As=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],zs=e=>mt(d.SITEMAP||"sitemap",{fallback:e}),Vs=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},Ds=(e,t)=>u(Wl,{...e,iconBgVersion:t,className:"shrink-0"}),_s=g((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>u(dr,{tag:"button",className:v("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Ds(a,t),e?u(Te,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?u(O,{name:n,iconVersion:"black",width:"24",height:"24"}):null}))),js=g((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(w,{className:v("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(Na,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(wa,{className:v("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Yi({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Es({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));js.childrenTypes={exclude:["RollupItem"]};const Es=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?u(_s,{label:r,labelIcon:n,labelIconBgVersion:l,icon:s,onToggle:i}):u(mr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Fs=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Os):null,u(ce,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Os=(e,t)=>p("div",{className:"mb-m space-y-m",children:[u("div",{children:u(Te,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{className:"space-y-m",children:e.items?.map(Ls)})]},String(t)),Ls=(e,t)=>p("div",{className:"space-y-2xs",children:[u("div",{children:$s(e.type,e.text)}),u(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),$s=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Us(t)}`,children:u(Te,{size:"text-h6",children:t})});case"email":return u("a",{className:"no-underline",href:`mailto:${t}`,children:u(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return u("span",{children:t})}},Us=e=>e.replaceAll(/\D/g,""),Hs=g((({className:e="",index:t,text:n,...l})=>{const a=ae(),{href:i,target:r,onClick:s}=a(l);return u("a",{className:v("",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Ws=g((({title:e,links:t,className:n=""})=>p("div",{className:v("flex flex-col gap-4",n),children:[u(Te,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(Hs,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),Ks=g((({className:e="",items:t,basePath:n})=>t?.length?u("ul",{className:v("flex flex-col",e),children:t.map(Ys(n))}):null)),Ys=e=>(t,n)=>{const{text:l,...a}=t,i=ae({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:l||null})},`list_item_${String(n)}`)},Gs=g((({className:e="",index:t,...n})=>{const l=ae({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=l(n);return u("a",{className:`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}`})})),Xs=g((({className:e="",links:t})=>p("div",{className:v("@container",e),children:[u("div",{className:"pt-lg",children:u(Te,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(Gs,{index:t,...e},String(t))))}):null]}))),qs=g((({className:e,...t})=>{const n=t.options?.page?.fallback,{topItems:l}=zs(n),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:c,documents:m}=mt(d.FOOTER||"footer",{fallback:n});return p(w,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:l?.map(((e,t)=>u(js,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:u(Ks,{items:e.items,basePath:o(e.href)})},String(t))))}),u(Fs,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(vr,{className:"mb-xl",media:r,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:s?.map(Js)}),u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(Hs,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:Vs})}),u(Ws,{className:"py-lg border-y border-main-divider",title:c,links:a}),u(Xs,{links:m})]})})),Js=({href:e="/",text:t},n)=>{const{label:l}=yr(e);return u(ce,{className:"w-full",text:t||l,version:"secondary",href:e,target:"_blank"},String(n))},Qs={width:"34",height:"34"},Zs={"bg-white":"color",transparent:"white"},eo={"bg-white":"text-primary-main",transparent:"text-white"},to=(e,t,n)=>u(X,t?.src?{image:t,className:eo[e],width:n?.width,height:n?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Zs[e]},className:eo[e],width:n?.width,height:n?.height}),no={"bg-white":"text-primary-text",transparent:"text-white"},lo=g((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:v("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":n?.title||"Россельхозбанк",children:[to(i,n?.image,Qs),r?l??u("div",{className:"ml-s",children:u(Te,{font:"font-medium",color:no[i],size:"text-s",children:n?.title||"Россельхозбанк"})}):null]}))),ao={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},io=g((({bgColor:e,logo:t,internetBankUrl:n,version:l})=>{const a=M(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(lo,{className:"my-2xs",bgColor:e,logo:t})}):ro(s),n?u("div",{children:u(ce,{href:n,ariaLabel:"Войти",target:"_blank",className:v("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",ao["transparent"===l?"transparent":"default"]),children:"Войти"})}):null]})})),ro=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(X,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),so={"bg-white":"primary",transparent:"transparent"},oo=g((({bgColor:e="bg-white",version:t=so[e],...n})=>{const{logo:l}=zs(n.options?.page?.fallback),{internetBankUrl:a}=mt(d.PORTAL_DATA||"portal-data",{fallback:n.options?.page?.fallback,pathDir:z(d.BASE_PATH,"portal-resources")});return u(w,{tag:"header",defaultPadding:"",version:t,...n,children:u("div",{className:"container px-lg py-2xs box-border",children:u(io,{bgColor:e,logo:l,internetBankUrl:a,version:t,...n})})})})),co={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},mo=g((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...o})=>{const c=M();return u(w,{className:v("relative flex flex-col",co[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${H(c)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...o,children:Yi({...o,extraProps:{className:v("w-full",Gi(r)),padding:l?"":"p-0"}})})}));mo.childrenTypes=[];const ho=g((e=>u(mo,{...e})));ho.childrenTypes=[];const uo=g((e=>{const{className:t,image:n,...l}=e;return u(w,{className:t,defaultPadding:"p-0",...l,children:u(X,{image:n})})})),po=["байт","Кб","Мб","Гб","Тб","Пб"],go=g((({icon:e,text:t,href:n,target:l,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:n,target:l,children:[e,t?p(Te,{size:"text-l",font:"font-light",children:[t," ",xo(s,o),u(Te,{color:"text-secondary-text",children:n&&`${s+r+o}`})]}):null]})})),xo=(e,t)=>e||t?u("span",{children:", "}):"",fo={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},bo=g((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=M();return p(w,{className:v("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(B,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:v("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",fo[r]),role:"list",children:a.map(yo(o,i))}):null]})})),yo=(e,t)=>(n,l)=>{if(""===n?.docType)return null;const a="Attachment"===n?.docType?j(e)(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))} ${po[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?vo(a):n?.fileFormat;return u("div",{role:"listitem",children:u(go,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(X,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(l))},vo=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},No=g((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",g=i?.src?u(X,{className:"hidden lg:block",image:i}):null;return u(w,{className:v("min-h-80",e),padding:"p-0",version:d,...m,children:p(pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(S,{headingType:"h3",title:c,className:v("whitespace-pre-wrap",n)}),rightImage:g,buttons:Ee(l,{className:"flex-wrap"}),children:[a?u(Te,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:v("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(He,{items:r,listItemSize:"M"}),u(Te,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:v("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(X,{className:"w-fit",image:s})}):null,i?.src?u(X,{className:"lg:hidden",image:i}):null]})]})})})),wo={primary:"bg-white/30",secondary:"bg-main-divider"},ko={primary:"text-white",secondary:"text-secondary-text"},Co=g((({count:e,version:t="secondary"})=>u("div",{className:v("w-6 h-6 rounded-full flex items-center justify-center",wo[t]),children:u(Te,{size:"text-xs",color:ko[t],children:e})}))),So=(e=[],t={})=>e.filter((({content:e={}})=>Ur(t,e))).length,To=(e,t)=>e===t;const Io=(Bo=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(To,((e=To)=>(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])=>Bo(n,t[e])))));var Bo;const Mo=[],Ro={},Po={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Ao={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},zo={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Vo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Do=g((({tag:e="div",item:t={},isActive:n,type:l="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:v("h-12","block flex-1","cursor-pointer",Po[l],n?Vo[l]:zo[l]),role:"tab","aria-selected":n,onClick:a,...o,children:p("div",{className:v("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Ao[l]:"text-secondary-text hover:text-primary-main"),children:[u(Te,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),_o=g((e=>u(e?.item?.href?jo:Eo,{...e}))),jo=g((e=>{const t=ae(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return u(Do,{...e,tag:"a",item:a,onClick:l})})),Eo=g((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return u(Do,{item:e,onClick:l,...n})})),Fo=(e,t,n)=>(l,a)=>u(_o,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Oo=g((({className:e,tabsType:t="default",items:n=[],value:l,onChange:a})=>u("div",{className:v("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:n.map(Fo(l,a,t))}))),Lo={categories:[],extraOptions:[],propertyType:[],stage:[]},$o=g((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{field:o,reset:c,update:d}]=gt(Lo),m=Wr(a.block?.blocks,s)(),h=i(((e=Lo)=>d(e)),[]),g=(({hotFilters:e=Mo,filtrationState:t=Ro,blocks:n=Mo,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Io(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Co,{version:t===e[a]?"primary":"secondary",count:So(n,t.filter)})})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(w,{className:v("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(Oo,{...g}),Yr({field:o,reset:c,filtrationSchema:n,resetButton:l}),u(Lr,{blocksToRender:m,...a})]})}));function Uo(e,t,n){t.geoObjects.removeAll();const l=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=n.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(n)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}$o.childrenTypes=["ProductTile"],$o.childSchema=e=>e?.filtrationSchema||{};const Ho={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Wo=(e,t,n)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Ho).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(O,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Ko=e=>globalThis[e];const Yo=()=>function(e,t){const[n,r]=l(),s=i((()=>r(Ko(e))),[e]);return a((()=>{const n=document.getElementById(t);if(!n){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Ko(e))return n.addEventListener("load",s),()=>{n.removeEventListener("load",s)};s()}),[e,t]),n}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Go={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},Xo=g((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Go).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(O,{name:n,width:"20",height:"16"})})})),qo={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Jo=[55.753995,37.614069],Qo=g((({points:e,className:t="",zoom:n=5})=>{const i=s(null),r=Yo(),[o,c]=l(),d=e?Zo(e):Jo;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:d,zoom:n,controls:[],suppressMapOpenBlock:!0}),Uo(r,i.current,e))})),i.current&&r&&(Uo(r,i.current,e),e?.length||i.current.setCenter(Jo))}),[r,i,e,d,n]),!r)return null;const m=o?"z-[100000]":"z-10";return p("div",{id:"map",className:v(!o&&"relative","w-full",t),children:[u("div",{className:v(Object.values(qo),m,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(O,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:v("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[u(Xo,{yandexMaps:i}),u(Xo,{yandexMaps:i,direction:"out"})]}),Wo(i.current,r,v("right-2 top-80",m))]})})),Zo=e=>[tc(ec(e,0)),tc(ec(e,1))],ec=(e,t)=>e.map((e=>e[t])),tc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,nc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},lc=(e,{field:t,reset:n})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(vn,{text:nc[e],...t(e)},e)))}):null,u(ce,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:n,text:"Очистить фильтр",appendRight:u(O,{name:"CloseIcon",width:"16",height:"16"})})]}),ac=()=>null,ic=()=>[],rc=g((({className:e,data:t=[],renderCard:n=ac,filterItems:l=ic,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=gt(a),d=l(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:v("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(S,{headingType:"h2",children:r}),h?u(Te,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?sc(i):null,lc(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(Qo,{points:m,className:"h-full"})})})]}),d.map(n)]})})),sc=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?u(T,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(X,{image:e.image}):null,e?.text?u(Te,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,oc={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"}},cc=g((({className:e,children:t,color:n="gray"})=>u("div",{className:v("p-s sm:border sm:border-gray rounded-md flex items-center",oc[n].border,e),children:u(Te,{size:"text-m",color:oc[n].text,children:t})}))),dc=g((({value:e,subText:t,children:n,...l})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,n,t].every((e=>!e))?null:mc({textItems:a,subText:t,children:n,...l})})),mc=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r})=>p("div",{className:v("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Te,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||n.filter(Boolean).map(((e,t)=>u(Te,{size:"text-l",children:e.trim()},String(t)))),a?u(Te,{color:l,size:"text-m",children:a}):null]}),hc=g((({className:e,children:t})=>u("div",{className:v("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),uc=["ArrowDownIcon","ArrowUpIcon"],pc=["Подробнее","Скрыть"],gc=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,children:[u("div",{className:"pr-m",children:pc[Number(e)]}),u(O,{className:"text-primary-text",name:uc[Number(e)],width:"16",height:"16"})]}),xc=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:bc(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Te,{size:"text-h4",children:bc(e)}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(O,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null]}),u(cc,{color:"green",children:bc(s)})]}),u("div",{className:"hidden sm:block",children:u(hc,{className:"flex-wrap",children:c?.map(fc)})}),u(Na,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(wa,{isUnfolded:e,children:u(hc,{className:"flex-wrap",children:c?.map(fc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>gc({isUnfolded:e,onToggle:t})})]},String(o))},fc=(e,t)=>u(dc,{...e},String(t)),bc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",yc=[];const vc=async e=>await st(e,{method:"GET"})||yc,Nc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},wc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},kc=g((({data:e,className:t})=>{const[n]=os(),l=function(e){const{data:t=yc}=it(`/api/v1/atms?regionCode=${e}`,vc);return t}(n?.code??"000");return u(rc,{className:t,filterItems:Cc,data:l,initFilterState:Nc,renderCard:xc,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Cc=(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=>wc[t](e))),n=!l.length||l.some((t=>wc[t](e)));return t&&n}))},Sc=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(", "),a=[Tc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Tc({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean);return u(dc,{label:"Режим работы",value:a,className:"max-w-none"})},Tc=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Ic=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Bc=e=>Ic.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??"")}}))),Mc=e=>{if(!e)return null;const t=Rc(e);return p(hc,{className:"border-none",children:[u(dc,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(Pc)})}),u(dc,{label:"Режим работы",className:"max-w-none",children:u(Te,{children:e})})]})},Rc=e=>{const t=Ic.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},Pc=({short:e,status:t},n)=>u("div",{className:v("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:u(Te,{size:"text-xs",children:e})},String(n)),Ac=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(dc,{label:"Валюта",value:e.currency}):null,t?u(dc,{label:"Купить",value:String(t)}):null,n?u(dc,{label:"Продать",value:String(n)}):null]},String(l)),zc=(new Date).getDay(),Vc=e=>{const[t]=e?.slice(zc-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(cc,{color:"green",children:a}):null,n&&i?u(cc,{color:"yellow",children:`перерыв: ${n}`}):null]}):u(cc,{color:"red",children:"Выходной"})},Dc=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",_c=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>u(dc,{label:e,value:t&&n?n:"",subText:Dc({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),jc=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=Bc(o);return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Te,{size:"text-h4",children:e}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(O,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null]}),Vc(m)]}),u("div",{className:"hidden sm:block",children:Ec({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),u(Na,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(wa,{isUnfolded:e,children:Ec({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>gc({isUnfolded:e,onToggle:t})})]},String(d))},Ec=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const o=Bc(r),c=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{children:[p(hc,{className:"flex-wrap",children:[u(dc,{label:"Факс",value:t}),u(dc,{label:"Телефон филиала",value:e}),u(dc,{label:"Для обращений юридических лиц",value:n}),u(dc,{label:"Обслуживание физических лиц",value:l}),u(dc,{label:"Для консультаций по валютному контролю",value:i}),u(dc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?u(hc,{children:u(dc,{label:c,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:o?.map(_c)})})}):p(hc,{children:[u(dc,{label:c,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:o?.map(Pc)})}),Sc(o)]}),r?.businessScheduleVisibleTag?Mc(r?.businessScheduleDescription):null,s?.currencies?.length?u(hc,{className:"flex-wrap",children:s?.currencies?.map(Ac)}):null]})},Fc=[];const Oc=async e=>await st(e,{method:"GET"})||Fc,Lc={workingSaturday:!1},$c={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},Uc=g((({className:e})=>{const[t]=os(),n=function(e){const{data:t=Fc}=it(`/api/v1/branches?regionCode=${e}`,Oc);return t}(t?.code??"000");return u(rc,{className:e,filterItems:Hc,data:n,initFilterState:Lc,renderCard:jc,title:`Офисы филиала ${t?.name}`})})),Hc=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>$c[t](e)))))},Wc=g((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return u(w,{version:"transparent",className:v(t),defaultPadding:"p-0",...n,children:"offices"===l?u(Uc,{}):u(kc,{data:e})})})),Kc=g((({className:e,title:t,description:n="Блок в разработке...",...l})=>p(w,{className:v("box-border",e),...l,children:[u(B,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Yc()})]}))),Yc=(e=3)=>Xc(100,e).map((e=>Math.floor(e))).map(Gc),Gc=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Xc=(e,t)=>[e].concat(t>0?Xc(e/1.618,t-1):[]),qc=g((({className:e,padding:t,slides:n=[],...l})=>u(w,{className:v("overflow-hidden relative",e),padding:t,...l,children:u(xa,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",children:u(Je,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Jc=g((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(w,{className:v("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[je(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(X,{image:r})}):null,s?u(S,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?Qc(i):null,Zc({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Zc({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Zc({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),Qc=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Ce,{__html:e})}),Zc=({label:e,data:t,iconName:n,dataColor:l=""})=>t?p("div",{className:"flex gap-s",children:[u(O,{iconVersion:"black",name:n,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Te,{size:"text-xl",color:l,children:t})]})]}):null,ed=g((e=>{const{__html:t,richVersion:n,...l}=e;return u(w,{defaultPadding:"p-0",...l,children:u(Ce,{__html:t,richVersion:n})})})),td=g((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return p("div",{className:v("order-4",e),children:[u(Bl,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(Bl,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),nd=g((({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]}))),o=s.find((e=>e.key===l));return u(tn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:o})})),ld=g((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(nd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(nd,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ad=["От 1 дня","До 365 дней"],id=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Te,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(rl,{min:1,max:365,value:e,items:ad,onChange:t})]}))),rd=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(nd,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(nd,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),sd=g((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(ld,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:od(c)}),u(id,{days:a,setDays:e=>c({days:e})}),u(rd,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:cd(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(td,{}),u(ce,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),od=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},cd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},dd=g((({days:e,tariffs:t=[]})=>{const n=hd(e,t),l="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("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:[md("Аренда за",e),md("Цена",n+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),p("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:[u(X,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(T,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),md=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),hd=(e,t)=>{const n=ud(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},ud=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},pd=(e,t)=>e.find((e=>e.branchCode===t)),gd=g((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=pd(l,n.selectedBranch),o=xd(s?.safeBoxCaseVolumes),c=fd(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,d=bd(c,n.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(sd,{...n,regions:t,onClick:r,branches:l,caseVolumes:o,safeBoxCases:c,onChange:i}),u(dd,{days:n.days,tariffs:d})]})})),xd=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],fd=(e,t)=>e?.find((e=>e.volume===t)),bd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,yd=[];const vd=async e=>await st(e,{method:"GET"})||yd,Nd=g((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),o=i((()=>s((e=>!e))),[]),[c,d]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=vt(),h=wd(c.selectedRegion,m),g=function(e){const{data:t}=it(e?`/api/v1/safeboxes?regionCode=${e}`:null,vd);return t||yd}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=pd(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(w,{className:n,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(S,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(gd,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(T,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Qo,{points:f,className:"h-[640px]"}):null]})})),wd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function kd(e){throw new Error(e)}const Cd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Sd={normal:"",small:"min-h-6xl"},Td={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"},Id=g((({className:e="",title:t,description:n,steps:l,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...o})=>p(w,{className:v("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...o,children:[u(B,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:l.map(Bd(i,r))})}):null,Ee(a,{isVertical:!0})]}))),Bd=(e,t)=>(n,l)=>{const{type:a}=n;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Md(e,t)(n,l);case"rte":return u(Ce,{__html:n.__html});default:kd(n)}},Md=(e,t)=>(n,l)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row items-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Rd(e,t)(n,l)}),p("div",{className:v("flex flex-col justify-center h-fit",Sd[e]),children:[n.label?u(T,{size:"text-l",align:"text-left",children:n.label}):null,n.description?u("div",{className:v("text-s font-light text-left",Td.description),children:n.description}):null]})]})},String(l)),Rd=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=Cd[e][i?"image":"icon"];return u(w,{className:v(r,i?"":"rounded-md","z-10 mr-s flex justify-center content-center"),defaultPadding:"",version:t,children:u("span",{className:"flex max-w-full max-h-full items-center justify-center",children:je(n?.icon)?u(X,{image:{...n.icon,iconVersion:n.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:Pd(e),height:Pd(e)}):u("span",{className:v("text-h4","transparent"===t?Td.iconText:(s=t,"secondary"===s?"group-data-primary:text-white":"text-secondary-text")),children:l+1})})});var s},Pd=e=>"normal"===e?"38":"24",Ad="hidden sm:flex absolute z-40 top-0",zd=g((({className:e,items:t=[],value:n,onChange:l,tabsType:a})=>{const[i,r]=ga({itemCount:t?.length||0});return p("div",{className:v("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(na,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Fo(n,l,a))}),r.canScrollLeft?u(_i,{className:v("left-6",Ad),onClick:r.scrollLeft}):null,r.canScrollRight?u(ji,{className:v("right-6",Ad),onClick:r.scrollRight}):null]})})),Vd=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Oo,{...t});case"centered":return u("div",{className:"flex",children:u(Oo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(zd,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Dd="tab",_d=g((({className:e="",isSticky:t,tabs:n=[],tabsMode:s,...o})=>{const c=M(),{isReady:d}=c,m=r((()=>n.map(Ed)),[n]),[h,p]=l(0);a((()=>{if(!n||!n[0])return;const e=c.query.tab&&n.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=n[e]||n[0];p(e),jd(t)}),[d]),a((()=>{const e=n[h];"group"===e?.type&&y.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[n,h]);const g=i((e=>{const t=m.indexOf(e),l=n[t];p(t),jd(l),"group"===l.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Dd,e.name):t.delete(Dd),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[n,m]);return u(w,{className:v(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Vd({items:m,value:m[h],tabsMode:s,onChange:g})})})),jd=e=>{"group"===e.type&&y.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&y.fire("tab",{type:e.type,label:e.href})},Ed=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Fd={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Od=g((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:Fd[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Ld=g((({className:e="",isOpen:t,onClick:n})=>u(ce,{className:e,appendRight:u(X,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),$d={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(X,{image:e}):null,List:({isDotted:e,...t})=>u(He,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:u(Te,{size:"text-h6",children:e})}):null,t?u("div",{children:u(Te,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:n,pdfUrl:l,isOpen:a})=>e?u(Ld,{isOpen:a,onClick:()=>{t({dataUrl:n,pdfUrl:l})}}):null},Ud=g((({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 Hd({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Hd=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in $d))return null;return u($d[n],{...t,...l})},Wd=g((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(Ud,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Kd=(e,t)=>140*Ne(e.slice(0,t).map((e=>e?.cols?.length??1))),Yd=(e=!1)=>""+(e?"text-secondary-text":""),Gd=(e,t)=>e?.length>0?u("div",{className:"flex",children:e.map(((e,n)=>u("div",{className:"w-20 mx-lg",children:u(Te,{size:"text-h6",color:Yd(0===t),children:e})},String(n))))}):null,Xd=g((({rows:e})=>{return u(na,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=v("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?u("div",{className:"w-56 min-w-56 py-lg",children:u(Te,{size:"text-xl",font:"font-light",children:l.data})}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${Kd(a,t)}px)`},children:a?.map(((e,n)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u(Te,{size:"text-xl",font:"font-light",children:e.data}):null,e?.cols?Gd(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),qd=g((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(Te,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(Xd,{rows:t.rowsData})})})]},l)}))}))),Jd=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Qd=g((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:v("rounded-md px-4 py-3 cursor-pointer",t===n?"bg-primary-main":""),onClick:()=>l(t),children:u(Te,{size:"text-xl",font:"font-light",color:Jd(t===n),children:e||t+1})},e)))}):null,t?u(ce,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(O,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Zd(e){const t=await fetch(e);return await t.json()}const em=g((({dataUrl:e,pdfUrl:t,onClick:n})=>{const{tableData:a}=function(e){const{data:t}=it(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Zd);return t||{}}(e),[r,s]=l(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(Qd,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(qd,{activeTabIndex:r,items:c}),u(Ld,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[u(Te,{size:"text-h6",children:"Данных нет"}),u(Ld,{onClick:n,isOpen:!0})]})})),tm=g((({children:e,tableInner:t,onHideContentClick:n})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:v("@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?u("div",{className:"origin-top animate-expansion",children:u(em,{...t,onClick:n})}):null]}))),nm=g((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,o]=l(void 0),c=i((e=>o(e)),[]),[d,m]=l(void 0),h=i((e=>m(e)),[]);return p(tm,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:v("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?u(X,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(Te,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?u(Od,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(Wd,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function lm({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?p("div",{children:[n?u(Di,{className:v("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?u(Di,{className:v("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const am=g((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,lm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),im=g((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Vi({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(nm,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[g,x]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(w,{className:v("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(B,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(Na,{renderFoldableSection:({isUnfolded:e})=>p(am,{controls:m,children:[g,u(wa,{isUnfolded:e,children:x})]}),renderFoldButton:hr}):u(am,{controls:m,children:h})})]})})),rm=g((({className:e="",title:t,description:n,iconVersion:l,__html:a,...i})=>p(w,{className:v("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===l?sm():null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Te,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?om(n):null,a?u(Ce,{__html:a}):null]})]}))),sm=()=>u("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"}),om=e=>u(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),cm=g((({prefix:e,unit:t,suffix:n})=>p("div",{className:"w-full pt-default flex items-end",children:[e?u("div",{className:"gradient-color-text",children:u(Te,{size:"text-h2",children:e})}):null,t?u("div",{className:"-mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?u("div",{className:"gradient-color-text",children:u(Te,{size:"text-h2",children:n})}):null]}))),dm=g((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return u(w,{defaultPadding:"p-0",...a,children:u(cm,{prefix:t,unit:n,suffix:l})})})),mm={AdTile:ut,ApplicationForm:Ll,BenefitsBlock:Kl,Bonus:Gl,BonusBenefitsBlock:ba,ButtonsBlock:va,Calculator:Ci,CardTransfer:zi,Carousel:nr,CarouselBankHistoryCard:lr,CarouselCard:rr,CarouselCatalogCard:or,CarouselLinks:pr,CarouselRecommendationCard:Nr,CarouselTariffsCard:Cr,ComparisonTable:Dr,DepositFiltration:ls,ErrorBlock:rs,ExchangeRateTile:Ps,Footer:qs,Header:oo,Headline:B,HorizontalLayout:ho,ImgBlock:uo,LinkDocs:bo,MobileAppTile:No,MortgageFiltration:$o,OfficesAtmsMap:Wc,Placeholder:Kc,ProductBlock:et,ProductGallery:qc,UnitBlock:dm,RepresentativeOfficeInfo:Jc,RichTextBlock:ed,RollupItem:js,SafeDepositRental:Nd,StepsBlock:Id,Tabs:_d,TariffsTable:im,TextBlock:rm,VerticalLayout:mo};function hm(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const um=g((({className:e,onClose:t})=>u("button",{className:v("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(X,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),pm="cookie",gm=g((({termLink:e,personalDataPolicyLink:t})=>{const[n,{setTrue:l,setFalse:a}]=Gt();hm((()=>{globalThis.localStorage?.getItem(pm)||l()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(pm,"true"),a()}),[]);return n?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(fr,{isRemote:!0,className:xm(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(fr,{isRemote:!0,className:xm(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(um,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),xm=e=>v("inline mx-2xs",e?"text-green-dark":"");const fm=({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((()=>y.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:kd(e)}}))),[c,d]),n},bm=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=fm({onCloseAll:e,onClose:t}),{close:l}=ne(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return qt(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?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>u("div",{className:v("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",l===n.length-1?"":"hidden"),children:e},String(t||l))))}):null})),ym=g((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>y.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:kd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return qt(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),vm=e=>({href:t})=>!!t&&A(Nm(t,e)).startsWith(A(t)),Nm=(e,t)=>R(e)?t.href:t.pathname;function wm(e=[]){const t=M(),n=e.findIndex((e=>vm(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[n,e[n]]}const km=g((({isActive:e,onClick:t})=>p("button",{className:v(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,children:[u(O,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),Cm=g((({isActive:e,item:t,onClick:n})=>{const l=ae({isRemote:!0}),{href:a,onClick:i}=l({href:t?.href,onClick:n});return p("a",{className:v(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[u(O,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})})),Sm=g((({className:e,head:t,children:n,onClose:l})=>{const{close:a}=ne(),r=i((()=>{a(),l&&l()}),[l]);return p("div",{className:v("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(um,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:n})]})}));const Tm=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 Im=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(Bm,{...e},String(t))))})]}):null,Bm=g((({icon:e,...t})=>{const n=ae(),{text:l,target:a,href:i,onClick:r}=n(t);return p("div",{className:"flex gap-s items-center",children:[e?u(X,{pathPrefix:"/wcms-resources/",image:e}):null,l?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Mm=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Te,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Rm=g((({className:e,searchTerm:t,onSearch:n})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Pm=g((()=>{const{defaultLocation:e,foreignOffices:t}=zs(),[n,a]=os(e),[r,s]=l(""),o=zm(function(){const{data:e}=it("/api/v1/regions",ot);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((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})(o,Am),{close:d}=ne(),m=i((e=>{a(e),d()}),[]);return p(Sm,{className:"pb-20",head:p("div",{children:[u(Te,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?p("div",{className:"mb-s",children:[u(Te,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(n),children:u(Te,{color:"text-primary-main",children:n.name})})]}):null,u(Rm,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&Tm(e.toLowerCase())(r.toLowerCase())>=.8)).map(Mm(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Te,{size:"text-h6",children:e})}),t.map(Mm(h))]},e)))}),Im(t)]});var h})),Am=e=>e.name?.charAt(0)||"",zm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Vm=g((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return p("div",{className:v("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(X,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:v("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),Dm=(e,t)=>(n,l)=>{for(const[a,i]of l)n.set(a,e(n.get(a)||t,i));return n},_m=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),jm=e=>t=>e.map((([e,n])=>[Tm(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Fm(t,e))).reduce(Dm(Math.max,0),new Map),Em=e=>t=>{return Qr(t,t.map((({title:e})=>e)).map((e=>t=>{const n=_m(t||"");return n.length?Ne(e.map((e=>da(n.map(Tm(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},Fm=(e,t)=>new Map(e.map((e=>[e,t]))),Om=({basePathList:e,initialQuery:t=""})=>{const[n,i]=l(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=it(e?.length?e:null,Lm),[s,o]=l(null);return hm((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=_m(e);if(!a.length)return[];const i=Object.entries(l),r=[...a.map(jm(i)).reduce(Dm(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Em(a)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},Lm=async(...e)=>(await Promise.allSettled(e.map((e=>st(z(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),$m=g((({className:e,topItems:t})=>{const n=ae({isRemote:!0});return u("div",{className:v("flex items-start justify-between",e),children:t?.map(n).map(Hm)})})),Um=["all","footer"],Hm=(e,t)=>{const{text:n,items:l=[],href:a,target:i,onClick:r}=e,s=l.filter((e=>!e.displayArea||Um.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:n||`Раздел ${t}`}),s.map(((e,t)=>u(Wm,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Wm=g((({text:e,index:t,basePath:n,...l})=>{const a=ae({isRemote:!(!d.BASE_PATH||!n)&&!d.BASE_PATH.startsWith(n),basePath:n}),{href:i,target:r,onClick:s}=a(l);return u("a",{className:v("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Km=g((({initialQuery:e})=>{const{topItems:t}=zs(),n=r((()=>t?.map((e=>e.href||"/"))),[t]),[l,i]=Om({basePathList:n,initialQuery:e}),s=r((()=>Ym(t)(l)),[t,l]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(Sm,{head:u(Vm,{autoFocus:!0,...i}),children:u($m,{topItems:s})})})),Ym=e=>t=>e?.length&&t?.length?Qr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:z("/",t)})))}))):[];const Gm=g((({className:e})=>{const[t,n]=l(""),a=i((()=>n("")),[]),{open:r}=(()=>{const{open:e,close:t}=ne();return{open:(t={},n={})=>e(u(Km,{...t}),n),close:t}})(),s=i((e=>{n(e),Xm(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:v("relative",e),children:[u(Vm,{value:t,onChange:s}),u(um,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),Xm=e=>e&&e.length>=3,qm=g((({item:e,basePath:t})=>{const n=ae({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:l,target:a,onClick:i}=n(e),r=M(),s=vm(r)({href:l});return p("a",{className:v(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:l,target:a,onClick:i,children:[e.text,u(X,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Jm=g((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,n)=>u(qm,{item:e,basePath:t},String(n))))}):null)),Qm=({item:e,isActive:t,onClick:n})=>p("button",{type:"button",className:"relative",onClick:n,children:[u("span",{className:v("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Zm=g((e=>{const{topItems:t,officesLink:n,defaultLocation:s}=zs(e.options?.page?.fallback),[o]=os(s),c=(()=>{const{open:e,close:t}=ne();return{open:(t={})=>e(u(Pm,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=ga({itemCount:t?.length??0}),[g]=wm(t),[x,f]=l(g),b=r((()=>t?.[x]),[t,x]),y=b?.items||[];a((()=>{f(g)}),[g]),a((()=>{x>0&&h.scrollTo(x)}),[x,h]);const v=i((e=>f(e)),[]);return u(Sm,{head:u("div",{className:"flex items-center",children:u(S,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(na,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(Qm,{item:e,isActive:x===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(Jm,{activeMenuSubItems:y,basePath:b?.href}),u(Gm,{className:"grow mb-5"}),eh(n),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(X,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(Te,{size:"text-h5",children:o.name}),u(Te,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),eh=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(X,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,th="burgerMenuDialog",nh=[],lh=g((({...e})=>{const[t,{toggle:n,close:l}]=(()=>{const{open:e,closeAll:t,close:n}=ne(),l=fm(),a=((e,t)=>t.find((t=>t.id===e),e))(th,l),r=i((()=>e(u(Zm,{}),{id:th})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:n,toggle:s}]})(),a=d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{menuItems:r=nh}=mt(a,{fallback:e.options?.page?.fallback,pathDir:z(d.BASE_PATH,"portal-resources")}),[,s]=wm(r),o=Math.floor(r.length/2),c=r.slice(0,o),m=r.slice(o);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u("div",{className:"fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",children:p("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[c.map(ah(s,l)),u(km,{isActive:t,onClick:n}),m.map(ah(s,l))]})})})})),ah=(e,t)=>(n,l)=>u(Cm,{isActive:n===e,item:n,onClick:t},n.href||String(l)),ih=h();const rh=g((({className:e,onClick:t,ariaLabel:n})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:sh()}))),sh=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[oh("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),oh("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),oh=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),ch=g((({className:e=""})=>{const t=function(e){const[t,n]=l(0);return a((()=>{(async()=>{const[t]=await ih.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{n(await ih.like(e))}),[e]),dislike:i((async()=>{n(await ih.dislike(e))}),[e])}}(M().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(rh,{onClick:le(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(rh,{onClick:le(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),dh=g((({className:e,blocksRegistry:t,blockDecorator:n,data:l={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=l,o={key:"",page:l,blocksRegistry:t,blockDecorator:n,parent:l};return p("div",{"data-theme":s,children:[p("section",{className:v("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Ki(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Yi({block:l,options:o,extraProps:{className:"scroll-mt-12"}}),Ki(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(ch,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(lh,{options:o}),u(bm,{}),u(ym,{}),u(gm,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));dh.childrenTypes=[],dh.slots=()=>["header","footer"];e.Blocks=mm,e.ContentPage=dh,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=le,e.joinList=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),e.packageVersion="0.14.135",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=V,e.useRouter=M,Object.defineProperty(e,"__esModule",{value:!0})}));
|