@redneckz/wildless-cms-uni-blocks 0.11.0 → 0.11.1
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/bundle.umd.js +71 -46
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/bundle/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/bundle/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/bundle/components/Calculator/rangeHelpers.d.ts +2 -2
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js +28 -0
- package/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/dist/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/dist/components/Calculator/getCreditCalculatorLimitParams.js +10 -0
- package/dist/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/dist/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/dist/components/Calculator/getCreditCalculatorRateParams.js +14 -0
- package/dist/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/dist/components/Calculator/rangeHelpers.d.ts +2 -2
- package/dist/components/Calculator/rangeHelpers.js +2 -2
- package/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +26 -38
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/ui-kit/Img/ImgAsPicture.js +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js +25 -0
- package/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/lib/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/lib/components/Calculator/getCreditCalculatorLimitParams.js +7 -0
- package/lib/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/lib/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/lib/components/Calculator/getCreditCalculatorRateParams.js +11 -0
- package/lib/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/lib/components/Calculator/rangeHelpers.d.ts +2 -2
- package/lib/components/Calculator/rangeHelpers.js +4 -4
- package/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +27 -39
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/ui-kit/Img/ImgAsPicture.js +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +5 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/bundle/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/mobile/bundle/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +2 -2
- package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js +28 -0
- package/mobile/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorLimitParams.js +10 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorRateParams.js +14 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/mobile/dist/components/Calculator/rangeHelpers.d.ts +2 -2
- package/mobile/dist/components/Calculator/rangeHelpers.js +2 -2
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +26 -38
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js +1 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js +25 -0
- package/mobile/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorLimitParams.js +7 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorRateParams.js +11 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/mobile/lib/components/Calculator/rangeHelpers.d.ts +2 -2
- package/mobile/lib/components/Calculator/rangeHelpers.js +4 -4
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +27 -39
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js +1 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/Calculator/checkCreditSourceBookRowCommonParams.ts +47 -0
- package/mobile/src/components/Calculator/getCreditCalculatorLimitParams.ts +24 -0
- package/mobile/src/components/Calculator/getCreditCalculatorRateParams.ts +33 -0
- package/mobile/src/components/Calculator/rangeHelpers.ts +4 -4
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +38 -73
- package/mobile/src/components/Footer/TextInformation.tsx +2 -2
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +1 -1
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +1 -1
- package/package.json +1 -1
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/Calculator/checkCreditSourceBookRowCommonParams.ts +47 -0
- package/src/components/Calculator/getCreditCalculatorLimitParams.ts +24 -0
- package/src/components/Calculator/getCreditCalculatorRateParams.ts +33 -0
- package/src/components/Calculator/rangeHelpers.ts +4 -4
- package/src/components/Calculator/useCreditCalculatorParams.ts +38 -73
- package/src/components/Footer/TextInformation.tsx +2 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/ui-kit/Img/ImgAsPicture.tsx +1 -1
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +1 -1
- package/tailwind.config.cjs +0 -15
package/bundle/bundle.umd.min.js
CHANGED
|
@@ -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).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),r=l("useCallback"),i=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 FOOTER(){return this._.FOOTER}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),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},r=l?.slots?.default,i=n||r&&r();return e(Object.assign(a,i&&{children:i}),l)}return t.inheritAttrs=!1,t};class b{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}}const f=new b;function v(e,{sensitivity:t,rootRef:l}={}){const n=s(null),r=i((()=>({threshold:y(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,r);return t.observe(n.current),()=>{t.disconnect()}}),[e,r]),n}function y(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new b;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),k={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","":""},C=x((({className:e,version:t="primary",isTheme:l=!0,block:i,tag:s="section",role:o,children:c})=>{const d=s,m=function(e){return v(r((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(i),[h,p]=n(!1);return a((()=>f.subscribe("tab",(e=>{p(Boolean(e.label&&i?.labels?.length&&!i.labels.includes(e.label)))}))),[i]),u(d,{className:w(S(Boolean(t&&l)),k[t],h?"hidden":"",e),...t&&l?{"data-ver":t}:{},...i?.anchor?{id:i.anchor,ref:m}:{},role:o,children:c})})),S=e=>e?"group":"",I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>u(l,{className:`font-sans m-0 ${I[t]} ${e}`,children:n||a}))),B=e=>e,$=(e,t)=>{const[l,a]=n(e),[i,o]=n(!1),[c,d]=n({}),m=s({}),h=r(((e,t)=>{const{parse:n=B,format:r=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:r(l[e]),isDirty:i||c[e],onChange:m.current[e]}}),[l,i,c]),u=r((()=>{a(e),o(!1),d({})}),[e]),p=r((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:i||Object.values(c).some(Boolean),field:h,reset:u,onSubmit:p}]},R=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],M=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],j=e=>null!=e,z=new Map;function V(e,t,{fallback:l,cache:r}={}){const s=i((()=>D(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(j)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(j(n))return n;const a=e(l);return j(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,r)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,r,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function D(e){return Array.isArray(e)?e:e instanceof Function?D(e()):[e]}async function L(e,t){try{return e?await P(e,t):null}catch(e){console.error(e)}return null}async function P(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const A=[];function O(){const{data:e}=V("/api/v1/regions",P);return e||A}const E=(e="")=>({open:t=>f.fire("dialog",{type:"open",id:e,message:t}),close:()=>f.fire("dialog",{type:"close"})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),X=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var W=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:H,joinPath:X});const K=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||G(t,d.CDN))return t;const n=t.startsWith("/");return X(G(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},G=(e,t)=>t&&e&&e.startsWith(t),J=(e,t)=>J._impl(e,t);function Y(){return Y._impl()}function q(e={}){const{isRemote:t,basePath:l}=e,n=Y(),{close:a}=E();return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:J(r(e),e)});function r({href:e,target:l,onClick:r}){return i=>{r&&r(i),e&&!t&&U(e,l)&&(a(),i?.preventDefault(),n.push(e))}}}J._impl=e=>e,J.setup=e=>{J._impl=e},Y._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),Y.setup=e=>{Y._impl=e};const Z={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Q="bg-main-divider text-main-disabled",ee={primary:Q,secondary:Q,white:Q,link:"",transparent:"",gray:Q,"":""},te="text-center font-sans select-none",le={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ne=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:r="primary"}=e;return p("div",{className:w(ae(e),"flex gap-2"),children:[n?u("div",{className:le[r],children:n}):null,re(e)?p("div",{children:[l?u("div",{className:"text-xs-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,a?u("div",{className:le[r],children:a}):null]})})),ae=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-7":"py-4 px-4");return["group/btn items-center justify-center",re(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},re=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ie=({className:e,rounded:t,version:l})=>["inline-block",te,l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[te,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Z[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=x((({disabled:e,children:t,...l})=>{const n=q()(l),a=t??u(ne,{...n});return u(e?de:ce,{...n,children:a})})),ce=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:r,rounded:i,onClick:s,children:o})=>u("a",{className:se({className:e,version:r,rounded:i}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),de=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ie({className:e,rounded:n,version:l}),children:a}))),me=x((({children:e,...t})=>u("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),he=x((({children:e,...t})=>u("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),ue=x((({link:e})=>p(me,{size:"text-s-light",color:"text-secondary-text",children:[u(he,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(oe,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(he,{children:e.text})}):null]}))),pe=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},xe=x((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:i="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:x,onBlur:g,pattern:b})=>{const f=r((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-8":"",y=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-2",children:u(he,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-4",v,y,l),id:n,name:a||n,placeholder:o,type:i,value:c,onInput:f,onFocus:x,onBlur:g,pattern:b},e)]}),m]})})),ge=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:r})=>p("div",{className:e,children:[u(xe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:r}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs-light",color:"text-error",children:n}):null})]}))),be=e=>"_"===e,fe=e=>/\d/.test(e),ve=e=>be(e)||fe(e),ye=[..."+7 (___) ___-__-__"],Ne=ye.findIndex(be),we=ye.map(((e,t)=>ve(e)?ye.slice(0,t).filter(ve).length:-1));const ke=x((({children:e,onChange:t,...l})=>{const n=r((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ye.map(((e,l)=>fe(e)?e:t.charAt(we[l])||e)),n=we.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ne,n)):l).join("")}(e))),[t]);return u(xe,{onChange:n,onFocus:n,...l,children:e})})),Ce=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:r})=>p("div",{className:e,children:[u(ke,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:r}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs-light",color:"text-error",children:n}):null})]}))),Se="Некорректно заполненное поле",Ie=_((e=>null!=e&&""!==e))(Se),Te=_((e=>"string"==typeof e&&e.length>1))(Se),Be=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Se),$e=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&Re.test(e))))(Se);var Re;const Me=e=>p("div",{className:"flex justify-between gap-5 mb-5",children:[p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...pe(e("name"),Te)})]}),p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"ИНН",...pe(e("inn"),Be)}),u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),$e)})]})]}),_e=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function je(e=!1){const[t,l]=n(e),a=r((()=>l(!0)),[]),i=r((()=>l(!1)),[]),s=r((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:i,toggle:s}]}function ze(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}const Ve={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},De=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:r="color",...i})=>{const s=Y(),o=K(s)(X(d.CDN,"/icons",`${l}.svg`));return"normal"!==r?u(Pe,{className:e,children:p("svg",{className:w(Le(i.width),Ve[r],"white"===r?"invert":"",t),...i,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(i.style={height:`${i.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...i}))})),Le=e=>e?"":"w-full h-full",Pe=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ae=x((({className:e="",label:t,options:l=[],value:n,valid:a=!0,isBorder:i=!0,placeholder:s="",onChange:o})=>{const[c,{setFalse:d,toggle:m}]=je(),h=ze(d),x=r((e=>{d(),o&&o(e)}),[o]);return p("div",{className:e,ref:h,children:[t?u("div",{className:"mb-2",children:u(he,{size:"text-m",color:"text-primary-text",font:"font-light",children:t})}):null,p("div",{className:w("relative",c?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer",Fe(i,a)),onClick:m,children:[u("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ee(n)||s}),u(De,{className:w("absolute right-3",c?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),l?.length?u("div",{className:w("h-0",c?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:l.map(Oe(x,c,(e=>e.key===n?.key)))})}):null]})]})})),Oe=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[u("span",{className:"min-h-6",children:Ee(n)}),u(De,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-0.5",l(n)&&t?"":"hidden")})]},String(a)),Ee=e=>e?.text||e?.key||"",Fe=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ue=x((e=>p("div",{children:[u(Ae,{...e,valid:!e.error}),u("div",{className:"h-2",children:e.error?u(he,{size:"text-xs-light",color:"text-error",children:e.error}):null})]}))),He=({regions:e,field:t})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(Ue,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:_e.map((({name:e=""})=>({key:e,text:e}))),...pe(t("acquiringType"),Ie)})}),u("div",{className:"w-1/2",children:u(Ue,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})]}),Xe=x((({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-3",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-[50%]":"left-[5%]")})}),u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),We=e=>p("div",{className:"mb-5",children:[u(Xe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Xe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Ke=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-4",l,t),children:e?.text?e.text:"Отправить заявку"})},Ge={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Je=R({acquiringType:Ie,region:Ie,fullName:Ie,inn:Be,name:Te,phone:$e}),Ye=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{acquiringType:t,region:l,fullName:a,inn:r,name:i,phone:s,onlineCheckout:o,posTerminal:c}=e;M(Je(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:r,name:i,phone:s})}),[n]),[,{field:i,...s}]=$(Ge,a),o=O();return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"text-center mb-4"}),He({regions:o,field:i}),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Me(i),We(i),Ke(t,"mb-4"),u(ue,{link:l})]})})),qe=e=>p("div",{className:"flex justify-between gap-5",children:[p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...pe(e("name"),Te)}),u(ge,{className:"shrink-0 w-full mb-3",label:"ИНН",...pe(e("inn"),Be)})]}),p("div",{className:"w-1/2",children:[u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),$e)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),Ze=({regions:e,field:t})=>u("div",{className:"flex justify-between gap-5 mb-5",children:u("div",{className:"w-full",children:u(Ue,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})}),Qe={name:"",phone:"",inn:"",mail:""},et=R({region:Ie,name:Te,phone:$e,inn:Be,mail:Ie}),tt=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{region:t,name:l,phone:a,inn:r,mail:i}=e;M(et(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:r,mail:i})}),[n]),[,{field:i,...s}]=$(Qe,a),o=O();return p("form",{className:"container",onSubmit:s.onSubmit,children:[Ze({regions:o,field:i}),qe(i),Ke(t,"mb-4"),u(ue,{link:l})]})})),lt=[];const nt=async e=>await L(e,{method:"GET"})||lt,at=["От 1 000 ₽","До 1 000 000 000 ₽"],rt=["От 1 мес","До 15 лет"],it=e=>p("div",{className:"flex justify-between gap-5 mb-7",children:[p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...e("fullName")}),u(ge,{className:"shrink-0 w-full mb-3",label:"ИНН",...pe(e("inn"),Be)}),u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),$e)})]}),p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Годовая выручка, ₽",...pe(e("annualRevenue"),Ie)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...pe(e("name"),Te)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...e("mail")})]})]}),st=(e,{normalize:t,format:l})=>{const{value:a,onFocus:i,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=r((e=>{d(!0),i&&i(e)}),[]),h=r((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},ot=(e,t,l)=>Math.max(t,Math.min(e,l)),ct=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function dt(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function mt({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:r,onChange:i}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-4",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||r?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-4 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:r,onInput:t=>{const l=dt(t.target?.value),n=e.length?e[l]:l;i&&i(n||0)}})})]})}const ht=1,ut=100,pt=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:i=(a.length?0:ht),max:s=(a.length?a.length-1:ut),step:o=1,value:c=a[0]||i,disabled:d=!1,onChange:m}=e,h=st(e,{normalize:(e=0)=>a.length?xt(a)(e):ot(e,i,s),format:ct()}),x=r((e=>{m&&m(dt(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(he,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-2 font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-4 box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),mt({list:a,min:i,max:s,step:o,disabled:d,value:c,onChange:m})]}),gt(n)]})})),xt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),gt=e=>u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u(he,{size:"text-s-light",color:"text-secondary-text",children:e},String(t))))}),bt=e=>p("div",{className:"flex justify-between gap-5 mb-7",children:[p("div",{className:"w-1/2",children:[u("label",{children:u(he,{size:"text-m-light",children:"Сумма кредита, ₽"})}),u(pt,{items:at,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"w-1/2",children:[u("label",{children:u(he,{size:"text-m-light",children:"Срок кредита, месяцев"})}),u(pt,{items:rt,min:1,max:180,...e("term")})]})]}),ft=({regions:e,branches:t,field:l})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(Ue,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(l("region"),Ie)})}),u("div",{className:"w-1/2",children:u(Ue,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...pe(l("department"),Ie)})})]}),vt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},yt=R({annualRevenue:Ie,inn:Be,name:Te,phone:$e,region:Ie,department:Ie}),Nt=x((({button:e,link:t,onSubmit:l})=>{const n=r((e=>{const{amount:t,term:n,fullName:a,inn:r,name:i,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;M(yt(e))&&l({typeForm:"cred",fullName:a,inn:r,name:i,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:i,...s}]=$(vt,n),o=O(),c=function(e){const{data:t}=V(e?`/api/v1/branches?regionCode=${e}`:null,nt);return t||lt}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"text-center mb-4"}),bt(i),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),it(i),u(T,{headingType:"h6",title:"Офис банка",className:"text-center mb-4"}),ft({regions:o,branches:c,field:i}),Ke(e,"mb-4"),u(ue,{link:t})]})})),wt={name:"",phone:""},kt=R({name:Te,phone:$e}),Ct=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{name:t,phone:l}=e;M(kt(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:i,...s}]=$(wt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"text-center mb-4"}),p("div",{className:"max-w-[560px] m-auto",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Имя",...pe(i("name"),Te)}),u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(i("phone"),$e)})]}),p("div",{className:"flex justify-between items-center max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(ue,{link:l})}),Ke(t)]})]})})),St=(e,t)=>e?.media&&t?.media?e.media-t.media:0,It=x((({className:e="",image:t,imageClassName:l="",isMobile:n=!1,pathPrefix:a})=>{const r=Y();return p("picture",{className:`${n?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(St).map((({src:e,format:l,media:n},i)=>u("source",{srcSet:Bt(r,a)(e),type:$t(l),media:n?`(max-width: ${n}px)`:"",...t.size},`${i}_${e}`))):null,t?.src?Tt({...t,src:Bt(r,a)(t.src)},l,n):null]})})),Tt=(e,t="",l=!1)=>{const n={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},a=e.title||"",r=e.alt||e.title,i=l?"m-auto":"m-0";return u("img",{src:e.src,className:`${i} ${t}`,alt:r,title:a,style:n,...e.size})},Bt=(e,t)=>l=>l&&!F(l)?K(e)(X(t,l)):l,$t=e=>e?`image/${String(e)}`:void 0,Rt=x((({className:e="",image:t,imageClassName:l="",isMobile:n,pathPrefix:a,...r})=>t?.src||t?.icon?t.icon?u(De,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...r}):u(It,{className:e,imageClassName:l,image:t,isMobile:n,pathPrefix:a}):null)),Mt=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:r,...i})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:r.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...i,...l},n)))}))),_t=[{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"}],jt=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:i})=>{const s=r((e=>{n||(e.preventDefault(),i&&i(!t))}),[i,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Mt,{paths:_t,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:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":zt(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("span",{className:"font-sans ml-3 text-l-light",children:l}):null]})})})),zt=e=>w("rounded border",e?"bg-primary-main":""),Vt=e=>{const t=e("text");return p("div",{className:"mb-6",children:[p("div",{className:"flex items-center mb-4 gap-6",children:[u(jt,{text:"Валютный контроль",...e("currencyControl")}),u(jt,{text:"Документарные операции",...e("documentaryOperations")}),u(jt,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Dt=e=>p("div",{children:[p("div",{className:"flex justify-between gap-5",children:[u("div",{className:"w-1/2",children:u(ge,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...pe(e("fullName"),Ie)})}),u("div",{className:"w-1/2",children:u(ge,{className:"shrink-0 w-full mb-3",label:"ФИО",...pe(e("name"),Te)})})]}),p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),$e)})}),u("div",{className:"w-1/2",children:u(ge,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...pe(e("mail"),Ie)})})]})]}),Lt={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Pt=R({fullName:Ie,name:Te,phone:$e,mail:Ie}),At=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{fullName:t,name:l,phone:a,mail:r,currencyControl:i,documentaryOperations:s,conversionOperations:o,text:c}=e;M(Pt(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:r,partnerComments:`Валютный контроль=${i}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:i,...s}]=$(Lt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Dt(i),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"text-center mb-4"}),Vt(i),p("div",{className:"flex items-center pb-9 mb-9 border-b border-main-divider",children:[Ke(t,"mr-5"),u(ue,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"text-center mb-4"}),p("div",{className:"flex",children:[p("a",{className:"flex items-center text-primary-text no-underline mr-6",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(Rt,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Rt,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),Ot=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center mt-5 p-5 rounded-md ${t?"bg-responce-ok":"bg-responce-fail"}`,children:[u(Rt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42",className:"mr-4"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34",className:"mr-4"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),u(he,{size:"text-l-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Et={credit:e=>u(Nt,{...e}),acquiring:e=>u(Ye,{...e}),"business-card":e=>u(tt,{...e}),deposit:e=>u(Ct,{...e}),wed:e=>u(At,{...e})},Ft={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Ut=x((e=>{const{className:t,title:l,typeForm:a="credit",button:i,link:s,...o}=e,[c,d]=n(""),m=r((async e=>{const t=await Ft.send(e)?"OK":"Fail";return d(t),t}),[]);return u(C,{className:w("font-sans bg-white p-default pb-9",t),...o,children:p("div",{className:"container max-w-[978px]",children:[l?u(T,{headingType:"h3",title:l,className:"text-center mb-8"}):null,Et[a]({button:i,link:s,onSubmit:m}),c?u(Ot,{responseType:c}):null]})})})),Ht=x((({className:e="",title:t,benefitList:l,...n})=>p(C,{className:`p-default flex flex-col items-center ${e}`,...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"max-w-[47rem] text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(Xt)}):null]}))),Xt=(e,t)=>{const l=e.description;return p("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[e?.icon?.icon?u(Rt,{className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black",image:e.icon}):null,e?.icon?.src?u(Rt,{image:e.icon}):null,p("div",{className:"ml-5 h-full",children:[e?.label?u(T,{headingType:"h6",children:e.label}):null,Wt(l)]})]},String(t))},Wt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-2 text-l-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Gt(e):Kt(e)}):null},Kt=e=>e?.name||null,Gt=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},Jt=(e,{className:t="",buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-2":"flex-wrap gap-4",t),children:e.map(Yt(l))}):null,Yt=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:r,version:i,...s}=t||{},o="secondary"===i?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(oe,{className:e,appendLeft:qt({...a,iconVersion:c}),appendRight:qt({...r,iconVersion:c}),version:i,text:n,...s},l?String(l):""):null},qt=e=>e?.icon||e?.src?u(Rt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Zt={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionStyle:"mt-5"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light",descriptionStyle:"mt-4"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light",descriptionStyle:"mt-4"},M:{title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light",descriptionStyle:"mt-3"},S:{title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light",descriptionStyle:"mt-2"},XS:{title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light",descriptionStyle:"mt-2"}},Qt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},el=x((({className:e,title:t,description:l,headlineVersion:n="XL",align:a="text-center",as:r,isPadding:i=!0,isTheme:s=!1,version:o="",...c})=>{const d=Zt[n],m=i?"p-default":"",h={marginTop:d.descriptionStyle};return p(C,{className:w(m,e),version:o,isTheme:s,...c,children:[t?u(T,{className:w("whitespace-pre-wrap",a),...d?.title,as:r||d?.title.as,title:t}):null,l?u(me,{size:d.descriptionSize,align:a,...h,children:l}):null]})})),tl=x((e=>{const{className:t="",title:l,description:n,bonusItems:a,...r}=e;return u(C,{className:`p-default pb-9 ${t}`,...r,children:p("div",{className:"container",children:[u(el,{className:"!p-0",title:l,description:n,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full mt-9",children:a?.length?a.map(((e,t)=>p("div",{className:"flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0",children:[e?.title?u(he,{size:"text-h4",children:e.title}):null,e?.description?u("div",{className:"mt-2",children:u(me,{size:"text-xl",font:"font-light",children:e.description})}):null,p("div",{className:"flex justify-between items-end mt-3",children:[Jt(e?.buttons),e.bonusItemContent?.bonusType?ll(e.bonusItemContent):null]})]},String(t)))):null})]})})})),ll=e=>u("div",{children:"count"===e.bonusType?nl(e):al(e)}),nl=e=>p("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?u("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}):null,e.bonusName?u("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),al=e=>e.image?u(Rt,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,rl={left:"text-left",center:"text-center",right:"text-right"},il=x((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:r,...i})=>p(C,{className:`font-sans text-primary-text bg-white p-default flex flex-col text-center ${l}`,...i,children:[u(el,{className:"!p-0 mb-8",title:r,description:a,headlineVersion:"M"}),e?.length?u("div",{className:`grid gap-1 ${rl[t]} ${ol(n)}`,children:e.map(sl)}):null]}))),sl=({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col items-center text-h6",l||t?"":"justify-center"),children:[t?u("span",{children:t}):null,e?u(Rt,{image:e,height:"180",className:"w-auto"}):null,l?u("span",{children:l}):null]},String(n)),ol=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},cl=x((e=>{const{title:t,image:l,cardItems:n,button:a}=e;return p("div",{className:"border-gray border p-9 w-1/2",children:[l?p("div",{className:"flex justify-center",children:[l?.src?u(Rt,{className:"mb-5",image:l}):null,l?.icon?u(Rt,{image:l}):null]}):null,t?u(T,{headingType:"h4",title:t,className:"mb-6"}):null,n?.length?u("ul",{children:n.map(((e,t)=>dl(e,String(t))))}):null,Jt([a],{buttonClassName:"mt-6"})]})})),dl=(e,t)=>{const{icon:l,text:n}=e;return p("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?u(Rt,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider"}):null,l?.src?u(Rt,{image:l}):null,u("span",{className:"text-xl-light",children:n})]},t)},ml=x((({className:e="",title:t,cards:l,...n})=>p(C,{className:`p-default pb-9 ${e}`,...n,children:[u(T,{headingType:"h3",title:t,className:"text-center mb-8"}),u("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>u(cl,{...e},String(t)))):null})]}))),hl=x((({button:e,className:t,...l})=>u(C,{className:w("!bg-transparent",t),...l,children:Jt([e])}))),ul=e=>{const{itemCount:t,visibleItemCount:l}=e,[a,i]=n(0),s=r((()=>i((e=>Math.min(e+1,t-1)))),[t]),o=r((()=>i((e=>Math.max(e-1,0)))),[t]),c=function({itemCount:e,visibleItemCount:t}){return Boolean(t&&e>t)}(e)&&a<t-(l||1),d=a>0;return[a,{inc:s,dec:o,canInc:c,canDec:d,isScrollAvailable:d||c}]};const pl=x((({className:e,disabled:t,...l})=>u(oe,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(Rt,{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"})}))),xl=x((e=>u(pl,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),gl=x((e=>u(pl,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function bl({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:r=""}){return l||n?p("div",{children:[l?u(pl,{className:`absolute z-40 ${a[0]} ${r}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(pl,{className:`absolute z-40 rotate-180 ${a[1]} ${r}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const fl=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("mb-7",a),children:[e?u(he,{size:"text-l-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(he,{size:"text-h3",children:[n," ",ct(2)(Math.round(t))," ",l]})}:{children:u(he,{size:"text-h3",children:"-"})})]}))),vl=Math.round(23.5),yl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Nl={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},wl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},kl={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Cl=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:r,fractionDigits:i=2})=>p("div",{children:[u(he,{size:"text-l-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:w("font-mohave text-title-huge pr-6 -mt-4",r),children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Sl=e=>e?u(me,{size:"text-s-light",color:"text-secondary-text",children:e}):null;function Il({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${ct(2)(l.min||0)} ₽`,`До ${ct(2)(l.max||0)} ₽`];return u(pt,{items:e?n:[],step:t,...l})}function Tl(e){const{data:t}=V(`/wcms-resources/${e}.json`,P);return t}const Bl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Tl(t||"bonus-calculator-data")||Nl,[r,i]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:r,prefMonthsNum:i,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),r);return[m,m*i+Math.min(Math.round(c*t)+Math.round(d*l),r)*(12-i)]})(a,l,n);return{...a,...e,monthBonus:r,yearBonus:i}},$l=x((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:r}]=$({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:i,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Bl(a,t);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Il({title:"Сумма покупок в категории путешествия, ₽",min:i,max:s,step:500,isShowItems:!1,...r("travelExpenseValue")}),Il({title:"Сумма покупок в остальных категориях, ₽",className:"mt-7",min:o,max:c,step:500,isShowItems:!1,...r("restExpenseValue")})]}),u("div",{children:d>=0?u(Cl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null}),p("div",{className:"w-full max-w-[350px]",children:[m>=0?u(fl,{title:"Баллов за год",value:m}):null,Jt(l,{className:"mt-7",isVertical:!0}),Sl(n)]})]})})),Rl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ml={horizontal:"gap-10",vertical:"flex-col gap-3"},_l=x((({items:e,checkedItem:t,onChange:l,orientation:n="horizontal"})=>u("div",{className:`flex ${Ml[n]}`,children:e?.map((({id:e,text:n})=>u(jt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e)},String(e))))}))),jl=({items:e,title:t,orientation:l="horizontal",value:n,onChange:a})=>p("div",{children:[t?u("div",{className:"mb-3",children:u(he,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(_l,{orientation:l,items:e,checkedItem:e[n?0:1].id,onChange:t=>a&&a(t===e[0].id)})]}),zl=e=>jl({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Vl=x((({title:e="Ставка"})=>p("div",{children:[u(he,{size:"text-l-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-1 pt-1 pl-5 pb-1.5",children:u(De,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-[250px] mt-3.5",children:p(me,{size:"text-xl-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),Dl=e=>e,Ll=(e=Dl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Pl=Ll(),Al=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,r]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,r)]):l++}return t},Ol=(e=Dl)=>Ll((t=>-e(t))),El=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Fl([e,t],n),Fl=([e,t],l=[])=>({[e]:l.length?Ol()(l.filter((t=>t[e])).map((t=>t[e]))):0,[t]:l.length?Ll()(l.filter((e=>e[t])).map((e=>e[t]))):0}),Ul=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Hl=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Xl=(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)},Wl=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:r})=>{const[i,{field:s}]=$({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:r,isSmallBusiness:i,isMonthlyInterestPayment:s}=e,o=Tl(t||"business-calculator-data"),c=r||a,d=l<90||l>730;if(l<=30)return{...kl,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&i===e.isSmallBusiness&&Hl(c,e)&&Ul(n,["minSum","maxSum"],e)&&Ul(l,["minDays","maxDays"],e)))||kl,{rate:h}=m,u=Xl(h,e),p=n+u,x=o?.rateRows||[kl];return{...m,...Fl(["minSum","maxSum"],x),...Fl(["minDays","maxDays"],x),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(i,t),{income:c,finalSum:d,rate:m,depositeName:h,isShowUnknownRate:x}=o;return p("section",{className:e,children:[p("div",{className:"flex justify-between",children:[p("div",{className:"w-[486px]",children:[Il({title:"Сумма вклада, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(g={title:"Срок вклада, дни",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(pt,{className:"mt-7",items:[`От ${Rl(g.min||0)}`,`До ${Rl(g.max||0)}`],step:1,...g})),p("div",{className:"mt-7 flex justify-between",children:[Kl(o,s),zl({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment")})]})]}),x?u(Vl,{}):u(Cl,{rate:m,depositeName:h,isShowDepositeName:r,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(fl,{title:"Доход по вкладу",value:c,postfix:"₽",prefix:"+"}),u(fl,{title:"Сумма в конце срока",value:d,postfix:"₽"}),Jt(l,{className:"mt-7",isVertical:!0}),u("div",{className:"mt-7",children:Sl(n)})]})]}),u("div",{className:"mt-5",children:Sl(a)})]});var g})),Kl=(e,t)=>p("div",{children:[u(jt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(jt,{className:"mt-3",disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(jt,{className:"mt-3",text:"Являюсь малым предприятием",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),Gl=({min:e=0,max:t=0,availableMonths:l,...n})=>u(pt,{className:"mt-7",items:[`От ${Jl(e)}`,`До ${Jl(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Jl=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Yl=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,r=Tl(t||"credit-calculator-data"),s=r?.limitRows?.find((t=>ql({row:t,userInputParams:e,paramsViewSettings:l}))),o=r?.rateRows?.find((t=>ql({row:t,userInputParams:e,paramsViewSettings:l})&&Ul(n,["minSum","maxSum"],t)&&Ul(a,["minMonths","maxMonths"],t)))||yl,{rate:c}=o,d=((e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a}=t;if(0===e)return 0;if(l){const t=e/1200;return n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)})(c,e),m=r?.rateRows||[yl];return i((()=>({...o,...El(["minSum","maxSum"],s,m),...El(["minMonths","maxMonths"],s,m),...e,monthlyPayment:d})),[e,r])},ql=e=>Zl({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Zl({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Zl({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Zl({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Zl=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ql=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[r,{field:i}]=$({isAnnuity:!1,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:vl}),s=Yl(r,t,a);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Il({title:"Сумма кредита, ₽",step:500,min:s.minSum,max:s.maxSum,...i("moneyValue"),value:s.moneyValue}),Gl({title:"Срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...i("monthsValue"),value:s.monthsValue}),u("div",{className:"mt-7",children:en({...s,...a},i)})]}),u(Cl,{title:"Ставка",rate:s.rate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(fl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),(o={orientation:"vertical",...i("isAnnuity")},jl({...o,items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]})),Jt(l,{className:"mt-7",isVertical:!0}),Sl(n)]})]});var o})),en=(e,t)=>p("div",{children:[e.isShowSalaryClient?u(jt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowStateEmployee?u(jt,{className:"mt-3",text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(jt,{className:"mt-3",text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(jt,{className:"mt-3",text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),tn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,r=Tl(t||"deposit-calculator-data"),i=r?.rateRows?.[0]?an(r.rateRows[0].minMonths,r.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=r?.rateRows?.find((t=>nn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&nn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Ul(n,["minSum","maxSum"],t)&&Ul(a||i,["minMonths","maxMonths"],t)))||wl,{rate:d}=c,m=ln(d,e),h=n+m,u=r?.rateRows||[wl];return{...c,...Fl(["minSum","maxSum"],u),...Fl(["minMonths","maxMonths"],u),availableMonths:Al(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:i,income:m,finalSum:h}},ln=(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)},nn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],an=(e,t)=>e+Math.round((t-e)/2),rn=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:r})=>{const[i,{field:s}]=$({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=tn(i,t,r),{defaultMonth:c,income:d,finalSum:m,rate:h}=o,{onChange:x}=s("monthsValue");return a((()=>{x&&x(c)}),[c]),p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Il({title:"Сумма вклада, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Gl({title:"Срок вклада, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),u("div",{className:"mt-7",children:sn({...o,...r},s)})]}),u(Cl,{rate:h,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(fl,{title:"Доход по вкладу",value:d,postfix:"₽",prefix:"+"}),u(fl,{title:"Сумма в конце срока",value:m,postfix:"₽"}),Jt(l,{className:"mt-7",isVertical:!0}),Sl(n)]})]})})),sn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-7",children:[e.isShowMonthlyInterestPayment?zl({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},jl({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},on={CreditCalculatorForm:Ql,DepositCalculatorForm:rn,BusinessDepositCalculatorForm:Wl,BonusCalculatorForm:$l},cn=(e,t)=>{const l=e?.calcType;if(!l||!(l in on))return null;const n=on[l];return u("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:p("div",{className:"box-border p-9 w-full",children:[e?.title?u(T,{className:"text-center mb-6",title:e.title}):null,u(n,{...e})]})},String(t))},dn=x((({className:e="",calculatorTabs:t=[],...l})=>{const a=t.map((e=>e.nav||{})),i=t.map((({calculatorBlock:e})=>e||{})),[s,o]=n(0),c=r((e=>o(e)),[]),[d,m]=ul({itemCount:t?.length,visibleItemCount:3});return p(C,{className:w("box-border overflow-hidden relative w-100",e),...l,children:[p("div",{className:"bg-white",children:[a.length>1?mn({activeIndex:d,tabsNav:a,slideIndexShift:s,onClick:c}):null,bl({...m,btnClass:["left-3","right-3"],className:"top-8"})]}),u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(cn):null})]})}));function mn({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:n}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:u("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white":"h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text",r=l?"text-xl mb-1.5":"text-l mb-[3px]",i=l?"text-l-light text-white":"text-m-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:n,"aria-label":e?.title,className:w("box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]",a),children:[u(Rt,{className:`h-6 w-6 min-w-6 min-h-6 mr-4 ${s}`,image:{...e?.icon,iconVersion:o??c},width:"24",height:"24"}),p("div",{className:"border-0",children:[u("div",{className:r,children:e?.title}),u("div",{className:i,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const hn=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:i=0,...s}=e,o=st(e,{normalize:(e=a)=>l&&n?String(ot(Number(un(e)),l,n)):un(e),format:ct(i)}),c=r((e=>t&&t(un(e))),[t]);return u(xe,{onChange:c,...s,...o})})),un=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),pn=x((e=>u(hn,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(he,{size:"text-xl",font:"font-light",children:"₽"})})}))),xn="amount",gn={[xn]:1500},bn=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,...r})=>{const[{amount:i},{field:s}]=$(gn),o=i<=0,c=o?ie({version:a?.version}):se({className:"text-white",version:a?.version}),d=q();return p(C,{className:w("p-default flex flex-col items-center",e),...r,children:[t?u(T,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,p("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[u(pn,{name:xn,valid:!o,placeholder:n,label:l,...s(xn,{parse:Number,format:String})}),a?.text?u("button",{type:"submit",className:w("w-full p-4 mt-6",c),disabled:o,...d(a),children:a.text}):null]})]})})),fn=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),vn=[];function yn(e,t,{className:l,...n}={}){const{key:a,blockDecorator:r=fn,blocksRegistry:i={},ancestors:s=vn}=t,{type:o}=e;o&&o in i||console.warn(`No block with "${o}" is registered`);const c=o&&i[o];return r({blockClassName:w("scroll-mt-12",l,e.style||"col-span-12"),block:e,ancestors:s,render:({block:l,blockClassName:r})=>{const{content:i}=l;return c?u(c,{className:r,block:e,options:t,...i,...n},a):null}},a)}const Nn=[],wn=(e,{key:t,ancestors:l=Nn,slotName:n=null,renderProps:a=yn,...r})=>(e||[]).map(((e,i)=>a(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...l||Nn,[r.parent,n]]:l})));function kn({children:e,block:t,options:l,renderProps:n}){return e||(t&&l?wn(t.blocks,{...l,parent:t,renderProps:n}):null)}const Cn=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Sn=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:i,onIntersection:s})=>{const o=v(r((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:i})})),In=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],Tn=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:i=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),b=r(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p($n(l))}),[h,p]),f=n>0?a*Number(n)-1:0,v="vertical-list"===o,y="horizontal-list"===o,N={...y?Bn(i,f):{},...v?Cn(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(k=(e,t)=>u(Sn,{className:w(c,n?In[n-1]:"",v?"h-full":""),style:y?Bn(i/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:b,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),Bn=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),$n=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Rn={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Mn={"horizontal-list":"w-6","vertical-list":"h-6"},_n=x((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-2",Rn[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?Mn[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),jn=e=>t=>e.scrollWidth/t,zn=e=>(t,l)=>{e.scrollBy({left:l*jn(e)(t),behavior:"smooth"})},Vn=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const a=s(null),[i,o]=n([]),c=r((e=>{o((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})),l&&l(e)}),[e]),[d,m]=i.length?[Ol()(i),Ll()(i)]:[-1,-1],h=d>0,u=m<e-1,p=r((()=>{var l;a.current&&(t&&!h?(l=a.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):zn(a.current)(e,-1))}),[t,e,h]),x=r((()=>{a.current&&(t&&!u?a.current.scrollTo({left:0,behavior:"smooth"}):zn(a.current)(e,1))}),[e,t,u]);return[a,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},Dn="absolute top-[calc(50%-24px)] z-40",Ln="absolute top-0 bottom-0 z-40 w-[84px] pointer-events-none",Pn=x((({scroll:e,arrowsPadded:t,isBlur:l,onScrollLeft:n,onScrollRight:a,hasEdgeBlocks:i,activeIndex:s,itemCount:o})=>{const{canScrollLeft:c,canScrollRight:d,scrollLeft:m,scrollRight:h}=e,x=i?s>0:c,g=i?s<o-1:d,b=r((()=>{i?(c&&s!==o-1&&m(),n()):m()}),[m,n,i,c,s,o]),f=r((()=>{i?(d&&0!==s&&h(),a()):h()}),[h,a,i,c,s,o]);return p("div",{children:[An(l,e),x?u(xl,{className:w(Dn,t?"left-8":"left-0"),onClick:b}):null,g?u(gl,{className:w(Dn,t?"right-8":"right-0"),onClick:f}):null]})})),An=(e,t)=>e?p("div",{children:[t.canScrollLeft?u("div",{className:w(Ln,"left-0 bg-opacity-from-white")}):null,t.canScrollRight?u("div",{className:w(Ln,"right-0 bg-opacity-to-white")}):null]}):null,On=x((({className:e="",itemCount:t,visibleItemCount:l,isBlur:a=!0,isCyclic:i=!1,arrowsPadded:s=!0,isPadding:o=!0,showDots:c=!1,isAlignCenter:d=!1,...m})=>{const{blocks:h=[]}=m.block||{},x=t||h?.length,[g,b]=n(Math.floor((l||0)/2)),f=r((()=>b((e=>e+1))),[]),v=r((()=>b((e=>e-1))),[]),[y,N]=Vn({itemCount:x,isCyclic:i}),[k]=N.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(C,{className:w(En(o),"group-data-secondary:bg-primary-main group-data-secondary:text-white",e),...m,children:p("div",{className:w(Fn(d),"relative max-w-full"),children:[u(Tn,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:N.handleVisibleIndicesChange,children:kn({...m,renderProps:S?(e,t)=>yn(e,t,{blocksLength:h?.length,activeIndex:g}):yn})}),u(Pn,{scroll:N,isBlur:a,arrowsPadded:s,onScrollLeft:v,onScrollRight:f,hasEdgeBlocks:S,activeIndex:g,itemCount:x}),c?Un(y,k,x):null]})})}));On.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"];const En=e=>e?"p-default":"",Fn=e=>e?"flex justify-center":"",Un=(e,t,l)=>u(_n,{containerRef:e,activeIndex:t,dotCount:l,listType:"horizontal-list"}),Hn=x((({title:e,description:t,blocksLength:l=0,activeIndex:n,options:a})=>{const r=Number(a?.key?.split("-").slice(-1)[0])||0;return u(C,{className:"flex h-[485px]",children:u("div",r===n?{className:"relative flex items-center w-full",children:u(el,{headlineVersion:"M",title:e,description:t,align:"text-left",className:w("absolute z-10 h-[385px] w-[440px] p-8 text-white shadow-dark-blue",Kn(r,l),Xn(r))})}:{className:"flex w-full items-center justify-center",children:u("div",{className:w("flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]",Xn(r)),children:u("span",{className:Wn(r),children:e})})})})})),Xn=e=>{switch(e%3){case 0:default:return"bg-primary-main";case 1:return"bg-green-light";case 2:return"bg-yellow-light"}},Wn=e=>{switch(e%3){case 1:case 2:return"gradient-color-text-on-yellow";default:return"gradient-color-text-on-green"}},Kn=(e,t)=>0===e?"left-9":e===t-1?"right-9":"-left-[25px]",Gn="absolute border border-solid border-gray w-full h-full",Jn={normal:"min-w-[970px]",small:"min-w-[355px]"},Yn=x((({className:e="",button:t,description:l,title:n,carouselVersion:a="normal",version:r=""})=>u("section",{className:`flex pb-9 pl-12 border-box h-full ${Jn[a]} ${e}`,children:p("div",{className:"relative w-full",children:[u("div",{className:`${Gn} z-10 top-9 right-12 bg-green-dark`}),u("div",{className:`${Gn} z-10 top-6 right-8 bg-green`}),u("div",{className:`${Gn} z-10 top-3 right-4 bg-green-light`}),p("div",{className:"relative h-full bg-white z-10 p-10 border border-solid border-green-light",children:[u(el,{className:"!p-0",title:n,description:l,headlineVersion:"L",align:"text-left",version:r}),Jt([t],{className:"mt-14"})]})]})}))),qn={black:"bg-black",white:"bg-white"},Zn=x((({className:e="",title:t,description:l,image:n,price:a,button:r,colors:i,...s})=>p(C,{className:`border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${e}`,...s,children:[n?.src?u(Rt,{className:"mb-5 flex justify-center",image:n}):null,t?u(T,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?u("div",{className:"mb-4",children:u(me,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,i?.length?p("div",{className:"flex mb-4 text-secondary-text",children:[u("div",{className:"mr-1.5",children:u(he,{size:"text-s",align:"text-left",font:"font-light",children:"Доступные цвета:"})}),i.map(Qn)]}):null,a?p(he,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,Jt([r],{buttonClassName:"mt-5 w-full"})]}))),Qn=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${qn[e]}`},String(t)),ea=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const r=q({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?r:{},children:a})})),ta=x((({className:e="",icon:t,title:l,description:n,href:a,target:r,...i})=>u(C,{className:w("w-[365px]",e),...i,children:p(ea,{className:"flex flex-col",href:a,target:r,children:[t?.icon?u(Rt,{image:t}):null,t?.src?u(Rt,{image:t}):null,l?u(T,{headingType:"h6",as:"h4",className:"text-left pt-3 mb-2",title:l}):null,n?u("div",{className:"mb-4",children:u(he,{font:"font-light",size:"text-m",color:"text-secondary-text",children:n})}):null]})}))),la=x((({className:e,title:t="",insetTitle:l="",buttons:n,leftImage:a,rightImage:r,backImage:i,children:s})=>p("div",{className:w("relative flex flex-col font-sans",e),children:[i?u("div",{className:"absolute bottom-0 right-0 z-0",children:i}):null,t,p("div",{className:"grow relative flex flex-wrap justify-between items-stretch gap-8",children:[a,p("div",{className:w("flex flex-col gap-8",a?"":"grow"),children:[l,u("div",{className:"grow",children:s}),n]}),r?u("div",{className:"sm:-order-1 md:-order-1",children:r}):null]})]}))),na={1:"flex-col",2:"gap-x-10 flex-wrap"},aa=x((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:n=1,description:a,image:r,title:i,...s})=>u(C,{className:w("box-border text-left p-9 w-[697px]","border border-solid border-gray group-data-secondary:border-white/50",l),...s,children:p(la,{title:i?u(T,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:i}):null,backImage:r?.src?u(Rt,{className:"m-0",image:r}):null,children:[p("div",{className:"flex justify-between mb-4",children:[a?u("div",{className:"w-1/3",children:u(he,{size:"text-h6",children:a})}):null,e?u(he,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e}):null]}),t.length?u("ul",{className:w("list-none m-0 p-0 flex gap-y-2",na[n]),children:ra(t,n)}):null]})}))),ra=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return p("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?u("div",{className:"pr-2.5",children:u(he,{size:(n=t,1===n?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var n})),ia="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",sa=x((({text:e,href:t="",target:l="",className:n=""})=>{const a=q()({href:t,target:l});return e?p("div",{className:`relative group/link cursor-pointer w-[328px] h-[82px] ${n}`,children:[p("a",{className:"absolute border border-primary-main ml-3 px-6 py-5\n text-l-light bg-white text-primary-text flex w-[316px]\n justify-between items-center group-hover/link:text-primary-main z-10",role:"link",...a,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6",children:u(Rt,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24"})})]}),u("div",{className:`${ia} mx-1.5 mt-1.5`}),u("div",{className:`${ia} mt-3 mr-3`})]}):null})),oa=x((({className:e="",additionalDescription:t,description:l,links:n,title:a,...r})=>p(C,{className:`flex w-full p-10 overflow-hidden justify-between ${e}`,...r,children:[p("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[u(el,{isPadding:!1,title:a,description:l,as:"h1",align:"text-left"}),t?u(el,{className:"pt-6",isPadding:!1,description:t,align:"text-left"}):null]}),n?.length?ca(n):null]}))),ca=e=>{const t=Math.ceil(e.length/10);return u(On,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,arrowsPadded:!1,showDots:!0,children:new Array(t).fill(null).map(((t,l)=>u("div",{className:"w-[672px] min-w-[672px] ml-10 mr-10 flex flex-wrap self-start",children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(sa,{className:"m-1",...e},String(t))))},String(l))))})},da={L:"w-1.5 h-1.5 mr-4",M:"w-1.5 h-1.5 mr-3",S:"w-1 h-1 mr-2"},ma=x((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",da[n])})}):null,u("span",{children:l})]}))),ha={S:"text-l-light",M:"text-h6",L:"text-h5"},ua={S:"ml-2",M:"ml-3",L:"ml-4"},pa=x((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-2 text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",ha[a],t?ua[a]:"",e),role:"list",children:n.map(((e,t)=>u(ma,{isDotted:l,size:a,children:e},String(t))))}):null)),xa=x((({additionalDescription:e,align:t="text-center",button:l={},className:n="",description:a,headlineSmallVersion:r="H6",href:i,icon:s,isDotted:o=!0,isFullWidth:c=!0,items:d=[],target:m,title:h,version:u="primary",...x})=>p(C,{className:w("h-full flex flex-col justify-between min-w-[260px]","box-border border-solid border border-gray",t,n),version:u,...x,children:[p(ea,{className:"p-6",href:i,target:m,children:[ga(s),ba(r,h),fa(a,h),ya(d,o,u),va(e)]}),Jt([l],{className:w("p-6 pt-0",c?"":"self-center min-w-[158px]"),isVertical:c})]}))),ga=e=>p("div",{className:"flex justify-center",children:[e?.src?u(Rt,{className:"mb-5",image:e}):null,e?.icon?u(Rt,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:e}):null]}),ba=(e,t)=>t?u("div",{children:u(he,{size:Qt[e],children:t})}):null,fa=(e,t)=>e?u("div",{className:t?"mt-2":"",children:u(me,{size:"text-l",children:e})}):null,va=e=>e?u("div",{className:"mt-auto",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e})}):null,ya=(e,t,l="primary")=>e?.length?u(pa,{className:w("max-w-[308px] mt-2 text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}):null,Na=x((({className:e="",title:t,icon:l,list:n=[],href:a,target:r,...i})=>u(C,{className:w("border border-gray",e),...i,children:p(ea,{className:"flex",href:a,target:r,children:[p("div",{className:"w-[200px] min-w-[200px] self-center",children:[l?.icon?u(Rt,{image:l}):null,l?.src?u(Rt,{image:l}):null]}),p("div",{className:"p-8 pl-3 w-full",children:[t?u(T,{className:"mb-3.5",headingType:"h5",title:t}):null,n.length?u("div",{className:"flex flex-col gap-3",children:n?.map(wa)}):null]})]})}))),wa=(e,t)=>p("div",{className:"break-words",children:[e.title?u("div",{className:"text-h6",children:e.title}):null,e.description?u("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),ka={default:"w-14 h-14",small:"w-12 h-12"},Ca=(e,t)=>e?"":w("group/media flex items-center justify-center box-border",ka[t]),Sa=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Ia=x((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:r,text:i=""}=n,{iconMapped:s,label:o}=Sa.find((({origins:e})=>e.some((e=>a?.includes(e)))))||{},c=Ta(l)??s;return u(oe,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Ca(i,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:i,version:r,...n,children:c&&!i?u(Rt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),Ta=e=>e?.src||e?.icon?e:void 0,Ba=x((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"font-sans",children:[u("div",{className:`flex gap-1 ${e}`,children:t?.map(((e,t)=>u(Ia,{buttonSize:n,...e},String(t))))}),u(he,{size:"text-s-light",color:"text-secondary-text",children:l})]}))),$a=x((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:r=[],target:i,title:s,align:o="text-left",version:c="primary",...d})=>u(C,{className:w("relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50","border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider",e),version:c,...d,children:p(ea,{href:l,target:i,children:[u(el,{className:"mb-4",title:s,description:t,headlineVersion:"S",isPadding:!1,align:o}),p("div",{className:"w-1/2 h-full flex flex-col flex-1 justify-end",children:[a.length?u(pa,{items:a,listItemSize:"S"}):null,r.length?u(Ba,{className:"pt-10",media:r}):null]}),Ra(n)]})}))),Ra=e=>p("div",{className:"absolute bottom-0 right-0",children:[e?.icon?u(Rt,{image:e}):null,e?.src?u(Rt,{image:e}):null]}),Ma=x((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),_a=x((({className:e="",__html:t,richVersion:l="striped",...n})=>u(C,{className:w("p-9 border border-gray h-full min-w-96",e),...n,children:u(Ma,{__html:t,richVersion:l})}))),ja=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:i})=>{const[s,o]=n(l),c=r((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=i?i({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),za=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Va=(e=!1)=>e?"p-8 mt-8 pt-20":"p-8 mt-20",Da=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-5 border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(he,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-1",children:u(he,{size:"text-h6",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Jt(a)}):null]},String(t))},La=x((({className:e="",title:t,icon:l,isHighlighting:n=!1,button:a,cardCells:r=[],...i})=>{const s=r.map(Da),o=s.slice(0,1),c=s.slice(1);return p(C,{className:w("relative border border-gray flex flex-col",Va(n),e),...i,children:[n?Oa():null,Pa(l),t?u(T,{className:"text-center pt-2",headingType:"h5",title:t}):null,a?u(oe,{className:"w-full mt-4",...a}):null,r.length?u(ja,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(za,{isUnfolded:e,children:c})]}),renderFoldButton:r.length>1?Aa:null}):null]})})),Pa=e=>u("div",{className:"w-[267px] min-w-[267px] self-center",children:e?.src||e?.icon?u(Rt,{image:e}):null}),Aa=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(De,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Oa=()=>p("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u(De,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22"}),u(me,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),Ea="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Fa="border-gray border-solid border",Ua="border-main-divider border border-t-0 border-x-0",Ha="w-[200px] mr-6",Xa=x((({icon:e,image:t,title:l,link:n})=>p("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Fa} ${Ea}`,role:"columnheader",children:[e&&!t?.src&&u(Rt,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}),t?.src&&u(Rt,{className:"mb-[18px]",image:t}),l?u(T,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&u("div",{className:"mt-auto w-full",children:u(oe,{href:n.href,target:n.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs-light font-medium py-[11px]",children:n.text})})})]}))),Wa={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},Ka=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:Wa[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Ga=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex",children:e})}))),Ja=x((({colHeaders:e,activeIndex:t})=>p(Ga,{children:[u("div",{className:Ha,role:"columnheader"}),u(Ka,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(Xa,{...e},String(t))))})]}))),Ya=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>u("div",{className:`w-80 box-border flex flex-col ${Fa} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${n?Ea:""}`,role:"cell",children:u("div",{className:`mx-7 h-full ${Ua} ${n&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>Qa(e,t,n)))})}))),qa=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Za=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),Qa=({label:e,description:t},l,n)=>p("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?u("h4",{className:qa(n),children:e}):null,t?u("div",{className:Za(n),children:t}):null]},String(l)),er=(e=!1)=>`text-s py-7 ${Ua} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,tr=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:r})=>p(Ga,{children:[e?.title?u("div",{className:er(r),children:e.title}):null,t?.length?u(Ka,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(Ya,{cell:e,isFirstRow:a,isLastRow:r,isFillGradient:n&&0===t},String(t))))}):null]}))),lr=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return p("div",{className:"relative",children:[e.map(((e,n,{length:a})=>u(tr,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?bl({...n,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),nr=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const r=e?.map((({header:e})=>e||{})),i=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:i.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=ul({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[r?.length?u(Ja,{colHeaders:r,activeIndex:o}):null,s?.length?u(lr,{rowData:s,isColoredFirstColumn:a,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),ar=x((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!i),m=r((()=>d((e=>!e))),[]);return p(C,{className:`py-12 pl-12 overflow-hidden relative ${e}`,...o,children:[u(T,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),u(nr,{columns:a,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?rr({isShowAllRow:c,onClick:m}):null]})})),rr=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-12",children:p("div",{className:"flex w-full",children:[u("div",{className:Ha}),u("button",{onClick:t,className:"mt-5 flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),ir=x((({className:e="",contacts:t,info:l,version:n="secondary",...a})=>p(C,{className:`flex p-default ${e}`,version:n,...a,children:[l?.length?sr(l):null,t?.length?sr(t):null]}))),sr=e=>u("div",{className:"flex grow basis-0",children:e.map(((e,t)=>or({column:e,index:t})))}),or=({column:e,index:t})=>e?u("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>p("div",{className:"mt-6 first:mt-0",children:[u(el,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left"}),l?u("div",{className:"mt-1.5 opacity-80",children:u(me,{size:"text-m",font:"font-light",children:l})}):null,n?u(oe,{className:"mt-6",...n}):null]},String(a))))},`col-${String(t)}`):null,cr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,dr=(e,t)=>Object.entries(e).map((([t,l])=>"number"==typeof l?((e,t)=>l=>cr(t[e])||cr(l[e])||mr(t[e])<=mr(l[e]))(t,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>l=>cr(t[e])||cr(l[e])||mr(t[e]?.min)>=mr(l[e]?.min)&&mr(t[e]?.min)<=mr(l[e]?.max))(t,e):Array.isArray(l)?((e,t)=>l=>cr(t[e])||cr(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(t,e):((e,t)=>l=>cr(t[e])||cr(l[e])||t[e]===l[e])(t,e))).every((e=>e(t))),mr=e=>Number(e||0),hr=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:r})=>p("button",{className:w("flex justify-center w-full px-0 py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:r,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-3",children:t}),l?u(Rt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),ur=({isUnfolded:e,onToggle:t})=>u(hr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),pr=["ArrowDownIcon","ArrowUpIcon"],xr="grid grid-cols-12 gap-1 border-box",gr=x((({label:e="",filtrationState:t={},topItemsCount:l=0,block:n,notFound:a,...r})=>{const i=n?.blocks?.filter((e=>dr(t,e.content||{})))||[],[s,o]=l>0?[i.slice(0,l),i.slice(l)]:[i,[]];return p("div",{children:[u("div",{className:w(i.length?"hidden":"block"),children:a?br(a):null}),p("div",{className:w(i.length?"":"hidden"),children:[u("div",{className:w("mb-1",xr),children:wn(s,{...r.options,parent:n})}),u(ja,{renderFoldableSection:({isUnfolded:e})=>u(za,{className:w(xr,e?"mb-1":""),isUnfolded:e,children:wn(o,{...r.options,parent:n})}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(hr,{className:w(l<1?"hidden":""),disabled:!o?.length,label:e,icon:pr[Number(t)],dataTheme:r.options?.page?.colorPalette,onClick:n})})]})]})}));function br({title:e,description:t}){return p("div",{className:"bg-white py-20",children:[e?u("div",{className:"mb-2",children:u(me,{align:"text-center",children:u(he,{size:"text-h4",children:e})})}):null,t?u(me,{size:"text-xl",font:"font-light",align:"text-center",children:t}):null]})}const fr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Xe,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),vr=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex justify-between bg-white p-9 mb-1",children:[p("div",{className:"flex gap-11",children:[a,Object.entries(l).map(yr(e))]}),n?u("div",{children:u(oe,{className:"w-72 ml-3",onClick:t,...n})}):null]}),yr=e=>([t,l])=>{const n=l?.type;return"array"===n?Nr(t,e)(l):null},Nr=(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-4",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(fr,{items:n,multiple:!0,...t(e)})]},e)},wr={sum:500,period:{min:3,max:36}},kr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...r})=>{const[i,{field:s,reset:o}]=$(wr),c=a?.max||36,d=p("div",{children:[u(pn,{label:n?.title,min:500,max:1e9,...s("sum",{parse:Number,format:String})}),u(pt,{title:a?.title,items:["От 3 мес","До 3 лет"],min:a?.min||3,max:c,...s("period",{parse:e=>({min:e,max:c}),format:({min:e})=>e})})]});return p(C,{className:w(e),version:"transparent",...r,children:[vr({field:s,reset:o,filtrationSchema:t,resetButton:l,children:d}),u(gr,{filtrationState:i,...r})]})}));kr.childrenTypes=["ProductTile"],kr.childSchema=e=>e?.filtrationSchema||{};const Cr=e=>"Image"===e?.errorContentType&&e?.image?u(Rt,{image:e.image}):"Code"===e?.errorContentType&&e.code?u("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,Sr=x((({className:e="",title:t,subtitle:l,error:n,button:a,...r})=>{return p(C,{className:w("flex flex-col justify-center items-center",(i=a?.text,i?"py-20 pt-3 pb-1":"mb-16 pb-2 mt-24 pt-3"),e),version:"transparent",...r,children:[u("div",{className:"flex justify-center py-20",children:Cr(n)}),t?u(T,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?u("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,a?.text?u(oe,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]});var i}));var Ir;!function(e){e.EUR="EUR",e.USD="USD",e.GBP="GBP",e.AUD="AUD",e.CNY="CNY",e.RUB="RUB"}(Ir||(Ir={}));const Tr={USD:"DollarIcon",EUR:"EuroIcon",GBP:"DollarIcon",AUD:"DollarIcon",CNY:"DollarIcon",RUB:"RoundRubleIcon"},Br=e=>e?Mr.format(e):"",$r=(e,t)=>p("td",{className:"pt-4 pl-11",children:[u("div",{children:Br(e)}),u("div",{className:w("font-normal text-sm text-secondary-text",(t||0)>=0?"text-green":"text-red"),children:Br(t)})]}),Rr=(e,t="")=>p("td",{className:"pt-4 pl-11",children:[u("div",{children:Br(e)}),u("div",{className:"font-normal text-sm text-green",children:t})]}),Mr=new Intl.NumberFormat("ru",{style:"currency",currency:Ir.RUB}),_r=e=>u("th",{className:"pl-11",children:u(he,{size:"text-m-light",align:"text-left",color:"text-secondary-text",children:e})}),jr=x((({className:e="",currencies:t=[],actuality:l="",officeName:n="",...a})=>{const r=zr(t,4);return p(C,{className:w("font-sans text-primary-text py-10 bg-white",e),...a,children:[p("div",{className:"flex flex-row flex-grow-0 justify-between mx-10 mb-8",children:[u(T,{headingType:"h4",title:"Курс обмена валют в "+n,className:"whitespace-pre-wrap text-h4 mb-5"}),u("div",{className:"pl-11",children:u(he,{size:"text-m-light",align:"text-left",color:"text-secondary-text",children:l})})]}),u("div",{className:"flex flex-row ml-8 mr-14 pt-4 text-left",children:r.length>0?p("table",{className:w("h-fit w-fit",e),children:[u("thead",{children:p("tr",{children:[u("th",{children:u(he,{size:"text-m-light",align:"text-left",color:"text-secondary-text",children:"Валюта"})}),_r("Купить"),_r("Продать"),_r("Лучшая покупка"),_r("Лучшая продажа")]})}),u("tbody",{children:r.map((e=>(({title:e,buyPrice:t,buyDifference:l,sellPrice:n,sellDifference:a,buyOfficeName:r,sellOfficeName:i})=>p("tr",{className:"pb-1 text-h6",children:[u("td",{className:"pt-4",children:p("div",{className:"flex items-center",children:[e?u(Rt,{image:{icon:Tr[e]},width:"24",height:"24"}):null,u("span",{className:"ml-2",children:e})]})}),$r(t,l),$r(n,a),Rr(t,r),Rr(n,i)]},e))(e)))})]}):null})]})})),zr=(e,t)=>e.sort(((e,t)=>Number(e.id)-Number(t.id))).slice(0,t);var Vr;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Vr||(Vr={}));const Dr=new Intl.NumberFormat("ru",{style:"currency",currency:Vr.RUB}),Lr=e=>e?Dr.format(e):"",Pr="text-left text-m-light text-secondary-text",Ar=`${Pr} pl-11`,Or={USD:"DollarIcon",EUR:"EuroIcon"},Er=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Pr,children:"Валюта"}),u("th",{className:Ar,children:"Купить"}),u("th",{className:Ar,children:"Продать"})]})}),u("tbody",{children:t.map(Fr)})]}))),Fr=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-1 text-h6",children:[u("td",{className:"pt-4",children:p("div",{className:"flex items-center",children:[t?u(Rt,{image:{icon:Or[t]},width:"24",height:"24"}):null,u("span",{className:"ml-2",children:t})]})}),u("td",{className:"pt-4 pl-11",children:Lr(e?.saleExchangeRate)}),u("td",{className:"pt-4 pl-11",children:Lr(e?.buyExchangeRate)})]},t)},Ur=x((({className:e="",address:t})=>p("div",{className:`flex ${e}`,children:[u(Rt,{image:{icon:"GpsIcon"},width:"24",height:"24"}),p("div",{className:"ml-3",children:[t?u("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,u("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Hr=(e,t,l)=>{const n=Number(Xr(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)},Xr=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Wr=e=>{return(t=[[e=>e.value!==Vr.RUB&&e.oppositeValue!==Vr.RUB,()=>e.handleConvert(e.value,Vr.RUB)],[e=>e.value===Vr.RUB&&e.oppositeValue===Vr.RUB,()=>e.handleConvert(e.value,Vr.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Kr(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:r,setSelected:i}=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(xe,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:a,onChange:r}),s.length?u(Ae,{isBorder:!1,onChange:e=>i(e.key),options:s,value:o}):null]})}const Gr=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[i,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Vr.RUB,selectBuy:l?.[0]?.currency?.currency||Vr.USD}),o=r((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Kr({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:Jr(i,o,l),value:i.inputSell,setValue:e=>qr(o,l)(e,i.selectSell,i.selectBuy)}),Kr({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:Yr(i,o,t),value:i.inputBuy,setValue:e=>Zr(o,t)(e,i.selectBuy,i.selectSell)}),a?.text?u(oe,{className:"py-4 mr-1",version:a?.version,...a,children:a.text}):null]})})),Jr=(e,t,l)=>n=>{t({selectSell:n}),Wr({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{qr(t,l)(e.inputSell,n,a)}})},Yr=(e,t,l)=>n=>{t({selectBuy:n}),Wr({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Zr(t,l)(e.inputBuy,n,a)})},qr=(e,t)=>(l,n,a)=>{e({inputSell:Xr(l),selectBuy:a});const r=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;r&&e({inputBuy:String(Hr(l,r,n===Vr.RUB)||"")})},Zr=(e,t)=>(l,n,a)=>{e({inputBuy:Xr(l),selectSell:a});const r=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;r&&e({inputSell:String(Hr(l,r,n===Vr.RUB)||"")})};const Qr=async e=>{const t=await ei(),l=t?.code||"000";return{region:t,exchangeRates:await ti(e,l)}},ei=async()=>{try{return await P("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},ti=async(e,t)=>{try{return await P(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},li=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=V("/api/v1/exchangerates",Qr);return e||{}}(),r=ni(a?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Vr.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Vr.RUB}}),u(C,{className:`p-9 box-border min-h-80 ${e}`,...n,children:u(la,{title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:p("div",{className:"flex",children:[p("div",{className:"mr-14 pt-4",children:[r?u(Er,{className:"mb-[30px]",exchangeCurrencyItems:r}):null,u(Ur,{address:a?.address})]}),r.length&&i.length&&s.length?u(Gr,{className:"grow",currencyRatesBuy:i,currencyRatesSell:s,button:l}):null]})})})})),ni=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],ai={};function ri(e,t={}){const{data:l}=V(`/wcms-resources/${e}.json`,P,{fallback:t});return l||ai}const ii={"bg-white":"color",transparent:"white"},si={"bg-white":"text-primary-main",transparent:"text-white"},oi=(e,t,l)=>u(Rt,t?.src?{image:t,className:si[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:ii[e]},className:si[e],width:l?.width,height:l?.height}),ci={"bg-white":"text-primary-text",transparent:"text-white"},di=(e,t,l)=>u("span",{className:`${ci[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),mi=x((({className:e="",href:t,logo:l,children:n=l?.title,targetBlank:a,bgColor:r="bg-white",showTitle:i=!0})=>p("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[oi(r,l?.image,{width:"40",height:"45"}),i?di(n||l?.title,r):null]}))),hi=x((({className:e,onClick:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Rt,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function ui(e){throw new Error(e)}function pi({onOpen:e,onClose:t}={}){a((()=>f.subscribe("dialog",(l=>{switch(l.type){case"open":e&&e(l);break;case"close":t&&t();break;default:ui(l)}}))),[e,t])}function xi(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const gi=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=new Array(e.length),a=new Array(t.length);let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-l),o=Math.min(i+l,t.length-1);for(let l=s;l<=o;l++)n[i]||a[l]||e[i]!==t[l]||(r++,n[i]=!0,a[l]=!0)}return{m:r,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const r=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let r=0,i=0;r<e.length;r++){if(!l[r])continue;let s=i;for(;s<t.length;s++)if(n[s]){i=s+1;break}e[r]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),i=(l/e.length+l/t.length+(l-r/2)/l)/3,s=i>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return i+s*(1-i)};const bi=(e,t)=>(l,n)=>{for(const[a,r]of n)l.set(a,e(l.get(a)||t,r));return l},fi=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),vi=e=>t=>e.map((([e,l])=>[gi(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Ni(t,e))).reduce(bi(Math.max,0),new Map),yi=e=>t=>{return xi(t,t.map((({title:e})=>e)).map((e=>t=>{const l=fi(t||"");return l.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e.map((e=>Pl(l.map(gi(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},Ni=(e,t)=>new Map(e.map((e=>[e,t]))),wi=["/"],ki=({basePathList:e=wi,initialQuery:t="",wasOpened:l})=>{const[r,s]=n(t||"");a((()=>{null!=t&&s(t)}),[t]);const o=i((()=>e.map((e=>l?e:null))),[l,e]),{data:c}=V(o,Ci),[d,m]=n(null);return((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{c&&m(c.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=fi(e);if(!a.length)return[];const r=Object.entries(n),i=[...a.map(vi(r)).reduce(bi(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return yi(a)(i)})(r)))}),[c,r]),[d,{value:r,onChange:s}]},Ci=async(...e)=>(await Promise.allSettled(e.map((e=>L(X(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Si=x((({className:e,isOpened:t,head:l,children:n,onClose:r})=>(a((()=>{const e=({key:e})=>{"Escape"===e&&r&&r()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[r]),t?u("div",{className:w("fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar",e),role:"dialog",children:p("div",{className:"relative container pb-12 min-h-full",children:[p("div",{className:"sticky bg-white pt-6 top-0",children:[u(hi,{className:"absolute top-10 -right-12",onClick:r}),l]}),n]})}):null)));function Ii(e,t=!1){const[l,{setTrue:a,setFalse:i}]=je(t),[o,c]=n({id:e}),d=s(l);d.current||=l;pi({onOpen:r((t=>{t.id===e?(c(t),a()):i()}),[e]),onClose:i});const m=r((()=>{i(),f.fire("dialog",{type:"close"})}),[]);return{...o,isOpened:l,wasOpened:d.current,onClose:m}}const Ti=x((({className:e,topItems:t})=>{const l=q({isRemote:!0});return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(Bi)})})),Bi=(e,t)=>{const{text:l,items:n,href:a,target:r,onClick:i}=e;return p("div",{className:"flex flex-col gap-3.5 w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:r||"_self",onClick:i,children:l||`Раздел ${t}`}),n?.map(((e,t)=>u($i,{...e,basePath:o(a),index:t},String(t))))]},String(t))},$i=x((({text:e,index:t,basePath:l,...n})=>{const a=q({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:r,target:i,onClick:s}=a(n);return u("a",{className:w("text-l-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:r,target:i||"_self",onClick:s,children:e||`Раздел ${t}`})})),Ri=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a})=>{const i=r((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-4 pointer-events-none",children:u(Rt,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),u("input",{className:w("h-12 pl-12 w-full 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:"Поиск по сайту",autoFocus:l,onChange:i,onFocus:a})]})})),Mi="search",_i=x((({topItems:e})=>{const t=Ii(Mi),l=i((()=>e?.map((e=>e.href||"/"))),[e]),[n,r]=ki({basePathList:l,initialQuery:t.message,wasOpened:t.wasOpened}),s=i((()=>ji(e)(n)),[e,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(Si,{...t,head:u(Ri,{className:"my-5",autoFocus:!0,...r}),children:u(Ti,{topItems:s})})})),ji=e=>t=>e?.length&&t?.length?xi(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:X("/",t)})))}))):[];const zi=x((({className:e})=>{const[t,l]=n(""),a=r((()=>l("")),[]);pi({onClose:a});const{open:i}=E(Mi),s=r((e=>{l(e),Vi(e)&&i(e)}),[]);return p("div",{className:e,children:[u(Ri,{value:t,onChange:s}),u(hi,{className:"absolute top-2 right-3 sm:hidden",onClick:a})]})})),Vi=e=>e&&e.length>=3,Di=x((({className:e="",items:t,hasButton:l})=>p("div",{className:e,children:[t?.length?t.map(Li):null,l?u(oe,{version:"primary",className:"mb-6 w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),Li=(e,t)=>{const{type:l,text:n,description:a}=e;return p("div",{className:"mb-4",children:[u("div",{children:Pi(l,n)}),u("div",{className:"mt-1 text-s-light text-secondary-text",children:a})]},String(t))},Pi=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Ai(t)}`,children:t});case"email":return u("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Ai=e=>e.replaceAll(/\D/g,""),Oi=x((({className:e="",index:t,text:l,...n})=>{const a=q(),{href:r,target:i,onClick:s}=a(n);return u("a",{className:w("text-secondary-text",e),href:r,target:i,onClick:s,children:l||`Документ ${t}`})})),Ei=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(Oi,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),Fi=x((({className:e="",index:t,...l})=>{const n=q({isRemote:!0}),{href:a,target:r,text:i,onClick:s}=n(l);return u("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:r,onClick:s,children:i||`Документ ${t}`})})),Ui=x((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-5 sm:py-4",children:u(he,{size:"text-xs-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>u(Fi,{index:t,...e},String(t))))}):null]}))),Hi="w-[204px]",Xi=x((({className:e="",...t})=>{const l=t.options?.page?.fallback,n=ri(d.SITEMAP||"sitemap",l),{documents:a,relatedEnterprises:r,contacts:i,socialMedia:s,mobileApps:o,logo:c}=ri(d.FOOTER||"footer",l);return p(C,{tag:"footer",className:`p-9 ${e}`,...t,children:[p("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[u(mi,{className:Hi,logo:c}),u(zi,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[p("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[u(Di,{items:i,hasButton:!0}),u(Ba,{media:s,children:"Соцсети"}),u(Ba,{className:"mt-6",media:o,children:"Мобильное приложение"})]}),u(Ti,{className:"flex-grow",topItems:n?.topItems})]}),u(Ei,{className:"mt-[98px]",links:r}),u(Ui,{links:a})]})})),Wi=x((({className:e="",title:t,description:l,calendar:n,...a})=>p(C,{className:`p-default ${e}`,...a,children:[u(el,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M"}),n?Ki(n):null]}))),Ki=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return p("div",{className:"w-full flex flex-col justify-center mt-13",children:[u("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Gi(e,t)))}),u("div",{className:"flex w-full",children:l.map(((e,t)=>p("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex",children:Ji(e)}),p("div",{className:"text-s-light text-primary-text mt-3",children:[u("span",{children:e.text})," ",u("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Gi=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Ji=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:u(Rt,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Yi=864e5;function qi(e,t,l=globalThis?.localStorage){const n=r((async(...n)=>{const a=`async:${e}`,r=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<Yi?t:void 0}(l.getItem(a));if(r)return r;const i=await t(...n);return l.setItem(a,JSON.stringify({data:i,timestamp:Date.now()})),i}),[e,t]);return V(e,n)}const Zi=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},Qi=e=>({href:t})=>H(F(t)?e.href:e.pathname).startsWith(H(t));const es=x((({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-4 max-w-[170px] gap-3.5 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-4 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"})]}))),ts="location",ls=x((({currentLocation:e,onChangeLocation:t,foreignOffices:l})=>{const a=Ii(ts),[i,s]=n(""),o=as(function(){const{data:e}=V("/api/v1/regions",P);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,ns),d=r((e=>{a.onClose&&a.onClose(),t&&t(e)}),[a.onClose,t]);return p(Si,{...a,head:p("div",{children:[u(rs,{currentLocation:e,onChangeLocation:d}),u(es,{onSearch:s,searchTerm:i,className:"mb-7"})]}),children:[i&&i.length>=3?u("div",{children:o.filter((({name:e})=>e&&gi(e.toLowerCase())(i.toLowerCase())>=.8)).map(ss(d))}):u("div",{className:"columns-5",children:Array.from(c.entries()).map(is(d))}),u(os,{foreignOffices:l})]})})),ns=e=>e.name?.charAt(0)||"",as=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),rs=x((({currentLocation:e,onChangeLocation:t})=>e?p("div",{className:"mb-4",children:[u(he,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{className:"cursor-pointer",onClick:()=>{t&&t(e)},children:u(he,{color:"text-primary-main",children:e.name})})]}):null)),is=e=>([t,l])=>p("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[u("div",{className:"mb-2.5",children:u(he,{size:"text-h6",children:t})}),l.map(ss(e))]},t),ss=e=>t=>u("div",{className:"mb-1",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:t.name||""})},t.id),os=x((({foreignOffices:e})=>e?.length?p("div",{className:"border-t border-main-divider mt-7 pt-7",children:[u("div",{className:"mb-4",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex gap-10",children:e.map(((e,t)=>u(cs,{...e},String(t))))})]}):null)),cs=x((({icon:e,...t})=>{const l=q(),{text:n,target:a,href:r,onClick:i}=l(t);return p("div",{className:"flex gap-x-3",children:[e?u(Rt,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:r,target:a,onClick:i,children:n}):null]})})),ds=x((({className:e="",active:t,flat:l,children:n,...a})=>{const r=q({isRemote:!0}),{href:i,target:s,text:o,onClick:c}=r(a);return u("a",{className:w(ms(t,l),e),href:i,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:hs(t,l),children:o||n})})})),ms=(e=!1,t=!1)=>w("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-4 py-2"),hs=(e=!1,t=!1)=>w("font-sans text-s-light",e?"text-primary-main":w(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),us={default:"w-6 h-6",large:"w-12 h-12"},ps=x((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:r,image:i,onClick:s})=>u("button",{className:w("group/btn border-0 flex shrink-0 items-center",n?"p-3 rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${us[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":r,onClick:s,children:u(Rt,{image:i,className:w("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),xs=x((({className:e,version:t,locationName:l,officesLink:n})=>{const a="transparent"===t?"white":"black",{open:i}=E(ts),s=r((()=>i()),[]),{open:o}=E(Mi),c=r((()=>o()),[]);return p("div",{className:w("flex items-center gap-5",e),children:[u(ds,{flat:!0,href:"#",text:l,onClick:s}),n?u(ds,{flat:!0,href:n,text:"Офисы и банкоматы"}):null,u(ps,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:"Поиск",onClick:c})]})})),gs=x((({className:e="",items:t,activeItem:l})=>{const a=q(),[i,s]=n(!1),o=r((()=>s((e=>!e))),[]),c=ze(r((()=>s(!1)),[]));return p("div",{className:w(i?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(i?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-1 bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:w("absolute flex flex-col rounded-md bg-white p-6 pb-2",i?"":"hidden"),"aria-hidden":!i,children:t?.map(((e,t)=>{const{text:n,...r}=e;return u("a",{className:w("text-l-light pb-4 hover:text-primary-main",e===l?"text-primary-main":""),...a(r),children:n},e.href||String(t))}))})]})})),bs=x((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const r=q(),{href:i,target:s,text:o,onClick:c}=r(a);return p("a",{className:w("relative inline-block bg-transparent text-center no-underline",e),href:i,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:fs(t),children:o||n}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),fs=(e=!1)=>w("font-sans text-l-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),vs=x((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const i=v(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:i,className:n,children:u(bs,{...a,children:l})})})),ys=e=>globalThis[e];function Ns(e,t){const[l,i]=n(),s=r((()=>i(ys(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),i(void 0)}}if(!ys(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const ws={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},ks=x((e=>{const[t,{setTrue:l}]=je();return t?u(Cs,{...e}):Ss({...e,onClick:l})})),Cs=x((({chat:e="personal",...t})=>((e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Ns("chatbot",ws[e])})(e),Ss(t)))),Ss=({className:e,iconVersion:t,onClick:l})=>u(ps,{className:w("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),Is={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Ts=x((({version:e,internetBankUrl:t})=>t?u(oe,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:w("py-3 ml-3 text-l font-light whitespace-nowrap hover:text-primary-main",Is["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),Bs=x((({subItems:e=[],version:t,internetBankUrl:l})=>{const a="transparent"===t?"white":"black",r=(e=>(t=[])=>{const l=t?.filter(Qi(e));return l?.length?Ll((e=>e.href?.length||0))(l):void 0})(Y())(e),[o,c]=n(e.length),m=e.slice(o),h=s(null),x={rootRef:h},g=i((()=>e.map(((e,t)=>e=>{c(e?$s(t):Rs(t))}))),[e]);return p("nav",{className:"relative mt-3 flex items-center justify-between",children:[u("div",{ref:h,className:"overflow-hidden whitespace-nowrap pb-3 mt-2",children:e.map(((e,t)=>u(vs,{className:w("ml-8 first:ml-0",o-1<t?"invisible":""),active:e===r,observerOptions:x,onVisibilityChange:g[t],...e},String(t))))}),m.length?u(gs,{className:"relative w-auto z-40",items:m,activeItem:r}):null,d.CHAT_BOT?u(ks,{className:"ml-9",iconVersion:a,chat:d.CHAT_BOT}):null,u(Ts,{version:t,internetBankUrl:l})]})})),$s=e=>t=>Math.max(t,e+1),Rs=e=>t=>Math.min(t,e),Ms={"bg-white":"primary",transparent:"transparent"},_s=x((({bgColor:e="bg-white",className:t,showSubMenu:l=!0,version:i=Ms[e],...s})=>{const o=Y(),{topItems:c,logo:m,defaultLocation:h,foreignOffices:x,officesLink:g,internetBankUrl:b}=ri(d.SITEMAP||"sitemap",s.options?.page?.fallback),f=c?.find((e=>Qi(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(o)),[v,y]=function(e="Москва"){const t=Zi(),[l,i]=n(t?.region??{name:e}),{data:s}=qi("/api/v1/region",P);return a((()=>{i(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[l,r((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),i(e)}),[])]}(h);return p(C,{tag:"header",className:w("pt-6 px-20",l&&f?.items?.length?"pb-4":"pb-5",t),version:i,...s,children:[p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(mi,{className:"mr-8",bgColor:e,logo:m}),c?.map(((e,t)=>u(ds,{active:e===f,...e},String(t)))),u(xs,{version:i,className:"ml-auto",locationName:v.name,officesLink:g})]}),u("div",{className:w("mt-6 h-px bg-main-divider","transparent"===i?"opacity-30":"")}),l&&f?.items?.length?u(Bs,{subItems:f.items,version:i,internetBankUrl:b}):null]}),u(_i,{topItems:c}),u(ls,{currentLocation:v,foreignOffices:x,onChangeLocation:y})]})})),js={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},zs=x((({className:e="",gap:t="XS",isPadding:l=!1,version:n="transparent",isTheme:a=!1,...r})=>u(C,{className:w("relative","grid grid-cols-12",l?"p-default":"",js[t],e),version:n,isTheme:a,...r,children:kn(r)})));zs.childrenTypes={exclude:["HorizontalLayout"]};const Vs=x((e=>{const{className:t,image:l,...n}=e;return u(C,{className:t,...n,children:u(Rt,{image:l})})})),Ds=x((({className:e="",cards:t=[],button:l})=>{const[a,i]=n(0),s=r((e=>i(e)),[]),o=t.length,[c,d]=ul({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:h}=d,x=t[c]?.href;return p("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[p("div",{className:"relative overflow-hidden",children:[o?Ls({activeIndex:c,cards:t,selectedCardIndex:a,onClick:s}):null,bl({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),m?u("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),u(oe,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function Ls({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,r=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-12",children:u("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return p("button",{type:"button",onClick:n,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(Rt,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-3.5",children:[e?.sum?Ps("страховая сумма",e.sum):null,e?.fee?Ps("страховой взнос",e.fee):null]}),As(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function Ps(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p("span",{className:"text-h6",children:[ct(2)(t)," ₽"]}),u("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function As(e){return e?u(Rt,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Os=x((({className:e="",title:t,insuranceTabs:l=[],button:a,...i})=>{const[s,o]=n(0),c=r((e=>o(e)),[]);return p(C,{className:`box-border py-12 overflow-hidden relative w-100 ${e}`,...i,children:[t?u(T,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return u("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-4 py-3 text-m-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Es({insuranceTabs:l,button:a})})]})})),Es=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(Ds,{button:t,cards:e},String(l)))):null};const Fs=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),Us={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Hs={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Xs=x((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:r,...i}=e,s=r?[...r]:[];return a&&s.unshift(a),u(C,{className:`px-9 py-12 ${t}`,...i,children:p("div",{className:"container text-m-light",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[Fs(u("div",{className:"w-px h-4 bg-gray"}))(s.map(Ws)),u("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),u("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Js)})]}):null,l?.length?u(pa,{className:"mt-9 max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),Ws=(e,t,l)=>{const n=1===t,a=t===l.length-1;return u("div",{className:`${Ks(n,a,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(Gs)}):null},`column_${t}`)},Ks=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-2.5",l.length&&!t?"pr-2.5 pb-8":"pb-[22px]"].join(" "),Gs=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-2 ${Hs[l]} ${Us[n]} ${"XS"===l?"px-3":"px-11"}`,children:u("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Js=(e,t,l)=>{const n=0===t,a=t===l.length-1;return u("div",{className:`flex-1 max-w-[180px] text-center px-2 ${n?"pl-9":""} ${a?"mr-3.5":" "}`,children:e.title},`title_${t}`)},Ys=x((({doc:e,icon:t})=>{const{text:l,fileSize:n,...a}=e;return p("a",{className:"flex box-border gap-3 group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...a,children:[t,l?p(he,{size:"text-l",font:"font-light",children:[l,u(he,{color:"text-secondary-text",children:a?.href&&qs(Zs(a.href),n)})]}):null]})})),qs=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Zs=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Qs={double:"flex-wrap",single:"flex-col"},eo=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>p(C,{className:w("p-default",e),...s,children:[u(el,{className:"!p-0",title:t,description:l,align:n,headlineVersion:"M",as:"h2"}),a?.length?u("div",{className:w("mt-8 flex gap-6",Qs[i]),role:"list",children:a.map(((e,t)=>u("div",{className:"double"===i?"basis-[calc(50%-20px)]":"",role:"listitem",children:u(Ys,{doc:e,icon:r?u(Rt,{className:"min-w-6 min-h-6",image:r,width:"24",height:"24"}):null})},String(t))))}):null]}))),to=e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function lo(e=""){const t=to(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const no=x((({className:e="",title:t="Мобильное приложение",qr:l,buttons:n,version:a="primary",items:r,image:i,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const m="secondary"===a?"p-3.5 min-w-[120px]":"min-w-[92px]";return p(C,{className:`flex justify-between p-default box-border relative min-h-80 ${lo(e)} ${e}`,version:a,...d,children:[p(la,{className:"z-10",title:t?u(T,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full ${rl[o]}`}):null,buttons:Jt(n,{className:"mt-8",buttonClassName:"min-w-[168px]"}),children:[ro(c),p("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?u("div",{className:`flex justify-center mr-5 bg-white rounded-md ${m}`,children:u(Rt,{className:"w-fit",image:l})}):null,ao(r)]})]}),i?.src?u("div",{className:"absolute right-0 bottom-0",children:u(Rt,{image:i})}):null]})})),ao=e=>e?.length?u(pa,{items:e,listItemSize:"S"}):u("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),ro=e=>e?u("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,io={},so=x((({className:e,filtrationSchema:t={},resetButton:l,...n})=>{const[a,{field:r,reset:i}]=$(io);return p(C,{className:w(e),version:"transparent",...n,children:[vr({field:r,reset:i,filtrationSchema:t,resetButton:l}),u(gr,{filtrationState:a,...n})]})}));so.childrenTypes=["ProductTile"],so.childSchema=e=>e?.filtrationSchema||{};const oo=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function co(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}),r=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(r),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const mo={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},ho=e=>u("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(mo).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),uo={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},po=(e,t,l)=>p("div",{className:`${Object.values(uo).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[u(De,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),xo={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"},go=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(xo).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(De,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),bo={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"},fo=x((({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(bo).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(De,{name:l,width:"20",height:"16"})})})),vo={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"},yo=x((({points:e,className:t="",zoom:l=5,showSearchField:r=!1})=>{const i=s(null),o=Ns("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[c,m]=n(),[h,x]=n(Co(oo)),g=No(e);if(a((()=>{i?.current||o?.ready((()=>{i.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),co(o,i.current,h)}))}),[o,i,h]),a((()=>{if(i.current&&h&&o){const e=h.length<1?Co(oo):h;co(o,i.current,e)}}),[i,h,o]),!o)return null;const b=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-[50%] ${b}`,children:r?po(oo,0,(e=>{if(e){const t=Co(e);x(t)}})):ho(g)}),u("div",{className:`${Object.values(vo).join(" ")} ${b} right-2 top-4 bg-white`,onClick:()=>{const e=i.current.container;c?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:u(De,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${b}`,children:[u(fo,{yandexMaps:i}),u(fo,{yandexMaps:i,direction:"out"})]}),go(i.current,o,`right-2 top-80 ${b}`)]})})),No=e=>[ko(wo(e,0)),ko(wo(e,1))],wo=(e,t)=>e.map((e=>e[t])),ko=e=>e.reduce(((e,t)=>e+t))/e.length,Co=e=>e?e.map((e=>e.coords)):null,So={id:123,branchType:{id:7,code:"21",name:"Отделение на балансе филиала"},shortName:"Ейский ДО",name:"ДО №3349/3/05",address:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",lawAddress:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",openDate:"2000-12-05",closeDate:null,bik:"040349536",corAcc:"30101810700000000536",registrationNumber:"3349/3/05",phone:"+7(XXX)XXX-XX-XX",fax:"+7(XXX)XXX-XX-XY",okpo:"55105921",ogrn:"1027700342890",kpp:"231002002",inn:"7725114488",branchCode:"0305",upperBranchCode:"0300",timeZone:"+03:00",exchangeRate:{currencies:[{buyExchangeRate:0,saleExchangeRate:0,currency:{id:3,code:"156",currency:"CNY",name:"Китайский юань"}},{buyExchangeRate:59.15,saleExchangeRate:69.25,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:58.4,saleExchangeRate:70.05,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],lastUpdate:"2022-11-11 03:56:17"},workSchedule:{id:413,workTime:"09.00–16.30",lunchHour:"без перерыва",workTimeSaturday:"09.00–15.00",lunchHourSaturday:"без перерыва",workingMonday:!1,workingTuesday:!1,workingWednesday:!0,workingThursday:!0,workingFriday:!0,workingSaturday:!0,workingSunday:!1},gpsLatitude:46.709744,gpsLongitude:38.260703,range:null,safeBoxCaseVolumes:null},Io=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],To=({lunchHour:e,status:t,workTime:l})=>{const n=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?p("div",{className:"flex",children:[u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4",children:l||null}),u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?n:null})]}):u("div",{className:"flex",children:u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},Bo=({icon:e,title:t,distance:l,time:n},a)=>p("div",{className:"flex mr-4",children:[u(De,{name:e,width:"16",height:"16",className:"mr-1"}),t?p("span",{className:"text-m",children:[t," "]}):null,p("span",{className:"text-m-light",children:[l?` (${l})`:null,n?`, ${n}`:null]})]},`nearbyOffice${a}`),$o=({title:e,status:t,workTime:l,lunchHour:n,description:a},r)=>p("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[p("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[u("div",{children:e}),t?null:u("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?u("div",{children:l}):null]}),t&&n?Ro(n):null,a?u("div",{className:"pb-1 text-s-light text-secondary-text",children:a}):null]},`day${r}`),Ro=e=>/\d+/gi.test(e)?p("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[u("div",{children:"Перерыв"}),u("div",{children:e})]}):u("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:u("div",{children:e})}),Mo=x((({className:e=""})=>{const t=So,{name:l,address:n,gpsLatitude:a,gpsLongitude:r,workSchedule:i}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:m,workingSaturday:h,workingSunday:x}=i,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=i,y=a&&r?[a,r]:null,N=[{title:"Понедельник",status:s,workTime:g,lunchHour:b},{title:"Вторник",status:o,workTime:g,lunchHour:b},{title:"Среда",status:c,workTime:g,lunchHour:b},{title:"Четверг",status:d,workTime:g,lunchHour:"13:00 - 14:00",description:"Не работает прием денег с 17:00 до 19:00"},{title:"Пятница",status:m,workTime:g,lunchHour:b},{title:"Суббота",status:h,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),k=w>0?N[w-1]:N[6];return p("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[p("div",{className:"flex flex-col px-12 pt-12",children:[p("div",{className:"flex justify-between",children:[u("div",{className:"text-h2",children:l}),To(k)]}),p("div",{className:"flex text-l-light pt-4",children:[u(De,{name:"GeolocationIcon",width:"24",height:"24",className:"pr-1"}),n]}),u("div",{className:"flex pt-4",children:Io.map(Bo)})]}),p("div",{className:"flex justify-between pt-8",children:[u("div",{className:"flex-grow h-full w-full overflow-hidden",children:y?u(yo,{points:[y],className:"h-full"}):null}),u("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:N.map($o)})]})]})})),_o=x((({className:e="",title:t,servicesList:l,...n})=>p(C,{className:`p-8 flex flex-col ${e}`,...n,children:[t?u(T,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?u("ul",{className:"list-none m-0 p-0",children:l.map(jo)}):null]}))),jo=(e,t)=>p("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?u(Rt,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",image:e.icon}):null,e.label?u("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),zo=x((({text:e,size:t,align:l,font:n,children:a,...r})=>u(C,{...r,children:u(me,{size:t,align:l,font:n,children:e||a})}))),Vo=x((({className:e,icon:t,label:l,description:n,version:a="primary",benefitsVersion:r="normal"})=>p("div",{className:w("flex gap-5",n?"items-start":"items-center",e),children:[t?u("div",{className:Do(a,r),children:u(Rt,{className:"w-6 h-6",image:{...t,iconVersion:t.iconVersion||r}})}):null,p("div",{children:[l?u(he,{size:"text-h6",color:"text-primary-text group-data-secondary:text-white",children:l}):null,n?u(me,{size:"text-m-light",color:"text-secondary-text group-data-secondary:text-white",children:n}):null]})]})));function Do(e,t){let l="bg-primary-main text-black";return"secondary"===e?l="bg-white/30 text-black":"normal"===t&&(l="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${l}`}const Lo=e=>(t,l)=>{const{type:n}=t;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return u(Vo,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));case"rte":return u(Ma,{__html:t.__html});default:ui(t)}},Po=x((({className:e="",title:t,description:l,image:n,benefits:a,sum:r,monthLimit:i,directionRight:s=!1,version:o="primary",...c})=>p(C,{className:`relative py-12 px-24 ${e}`,version:o,...c,children:[u(el,{className:"!p-0",title:t,description:l,headlineVersion:"M"}),p("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[n?.src?u(Rt,{className:s?"order-2":"",image:n}):null,p("div",{className:"w-[558px] m-auto",children:[a?.length?u("div",{className:"flex flex-col gap-4",children:a.map(Lo(o))}):null,Ao(Number(r),Number(i))]})]})]})));function Ao(e,t){return e||t?p("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Oo("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Oo("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Oo(e,t=0,l=!1){return p("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[u("span",{className:"text-secondary-text text-l-light",children:e}),p("span",{className:"text-primary-main text-h6",children:[ct(2)(t)," ₽"]})]})}function Eo(e=""){const t=to(e);return t<=4?"S":t<=8?"M":"L"}function Fo(e=""){const t=to(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Uo=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(C,{className:w("p-9 box-border",e,Fo(e),lo(e)),...n,children:[u(el,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:Eo(e)}),u("figure",{className:"m-0 min-w-[80%]",children:Ho()})]}))),Ho=(e=3)=>Wo(100,e).map((e=>Math.floor(e))).map(Xo),Xo=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Wo=(e,t)=>[e].concat(t>0?Wo(e/1.618,t-1):[]),Ko=(e="primary",t="normal")=>(l,n)=>u(Vo,{version:e,benefitsVersion:t,...l},String(n)),Go=x((({className:e,version:t="primary",headlineVersion:l="L",title:n,description:a,benefits:r,benefitsVersion:i,items:s,isDotted:o=!0,__html:c,buttons:d,image:m,directionRight:h=!0})=>{const x=r?.filter((e=>e.label)),g=m?.src?u(Rt,{className:"mt-[-50px]",image:m}):null;return p(la,{className:e,insetTitle:u(el,{className:"max-w-[600px] xl:max-w-[800px]",title:n,description:a,headlineVersion:l,align:"text-left",isPadding:!1}),...h?{rightImage:g}:{leftImage:g},buttons:Jt(d),children:[x?.length?u("div",{className:"flex flex-wrap gap-6",children:x.map(Ko(t,i))}):null,c?u("div",{className:"mt-5",children:u(Ma,{__html:c})}):null,s?.length?u(pa,{className:"mt-5",items:s,isDotted:o}):null]})}));function Jo({text:e,href:t,target:l,icon:n},a){const r="primary"===a?"white":"black",i={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-3",children:[u(oe,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...i,children:u(Rt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||r}})}),u(oe,{version:"link",...i})]})}const Yo=x((({className:e,backwardButton:t,...l})=>p(C,{className:w("overflow-hidden p-default flex flex-col gap-10 box-border",e),...l,children:[t?.text?Jo(t,l.version&&"primary"!==l.version?"white":"primary"):null,u(Go,{className:"grow",...l})]}))),qo=x((({className:e="",slides:t=[],...l})=>{const[a,r]=n(0);return p(C,{className:w("box-border py-default overflow-hidden",e),...l,children:[u("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*a}%)`},role:"list",children:t.map((({productBlock:e},t)=>u("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:u(Go,{className:"pl-default h-full",headlineVersion:"XXL",...e,...l})},String(t))))}),u("div",{className:"h-28 px-6 mt-6 -mb-6 flex items-center gap-2 box-border",children:t.map(Zo({activeSlideIndex:a,onClick:r}))})]})})),Zo=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,r=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-[290px] ease-in duration-300 bg-white/10 px-6 py-5 hover:py-6 backdrop-blur",i=a?"text-primary-text text-h6 py-2":"text-l pb-1 text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l-light":"text-m-light text-secondary-text group-data-secondary:text-white/80";return p("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:w("relative px-6 box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",r),children:[u("div",{className:i,children:l?.title}),u("div",{className:s,children:l?.description})]},String(n))};function Qo(e,t){if(!e)return null;return u("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:u(me,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e})})}const ec=(e,t)=>{const{type:l}=e;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return[u(he,{size:"text-h6",children:e.label},`label-${t}`),u(he,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e.description},`desc-${t}`)];case"rte":return u("div",{className:"col-span-2",children:u(Ma,{__html:e.__html})});default:ui(e)}};function tc(e,t){return e?.src?u(Rt,{className:w("absolute",t?"right-0":"left-0","bottom-0"),image:e}):null}const lc=x((({className:e="",title:t,headlineVersion:l="S",description:n,additionalDescription:a,benefits:r=[],buttons:i,image:s,directionRight:o=!0,...c})=>p(C,{className:w("overflow-hidden p-9 box-border relative min-h-[364px] flex flex-col justify-between",Fo(e),e),...c,children:[p("div",{className:w("flex flex-col",o?"":"items-end"),children:[u(el,{className:w("!p-0 !bg-transparent z-10",t||n?"mb-3.5":""),title:t,description:n,headlineVersion:l,as:"h2",align:"text-left"}),nc(r,s),Qo(a,s)]}),Jt(i,{className:w("mt-5 text-l",o?"":"justify-end")}),tc(s,o)]})));function nc(e,t){if(!e.length)return null;return u("div",{className:w("z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline",t?.src?"max-w-[calc(100%-186px)]":"100%"),children:e.length?e.map(ec):null})}const ac=x((({className:e="",title:t="Акции и спецпредложения",date:l,description:n,as:a,buttons:r=[],...i})=>u(C,{className:w("p-9 box-border",e,Fo(e),lo(e)),...i,children:u(la,{title:t?u(el,{className:"!p-0 max-w-[600px]",title:t,headlineVersion:Eo(e),align:"text-left",as:a||"h2"}):null,buttons:Jt(r),children:p("div",{className:"mt-1.5",children:[l?u("div",{className:"text-s mb-2",children:rc(l)}):null,u("div",{className:"text-l",children:n})]})})})));function rc(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const ic=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:r,icon:i,title:s,version:o="primary",...c})=>p(C,{className:w("box-border text-left p-9",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between",children:[s?u(T,{headingType:"h4",as:"h3",className:"mb-6",title:s}):null,sc(i)]}),p("div",{className:"w-full",children:[r?oc(r):null,cc("Адрес",e,"GeolocationIcon"),cc("Телефон",l,"PhoneIcon"),cc("E-mail",t,"MailIcon"),n?.text?Jt([n],{className:"mb-6"}):null]})]}))),sc=e=>p("div",{className:"self-end",children:[e?.src?u(Rt,{image:e}):null,e?.icon?u(Rt,{image:e}):null]}),oc=e=>u("div",{className:"border-b border-main-divider pb-5 my-5",children:u(Ma,{__html:e})}),cc=(e,t,l)=>p("div",{className:"flex mb-4",children:[u(De,{className:"pr-4",iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col first:pb-1",children:[u(he,{size:"text-m-light",children:e}),t?u(he,{size:"text-h6",color:"text-green",children:t}):null]})]}),dc=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(C,{...n,children:u(Ma,{__html:t,richVersion:l})})})),mc={primary:"bg-main-divider",secondary:"bg-white/30","secondary-light":"bg-secondary-light"},hc=x((({iconBgVersion:e="primary",...t})=>u("div",{className:w("rounded-icon p-2.5 mr-3",mc[e]),children:u(De,{...t})}))),uc=e=>e?"MinusIcon":"PlusIcon",pc=x((({className:e="",label:t="Развернуть",labelIcon:l,isExpanded:n,isFoldButtonOnTop:a=!0,version:r="primary",...i})=>u(C,{className:w("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),tag:"div",version:"transparent",...i,children:u(ja,{isFoldButtonOnTop:a,unfoldedByDefault:n,renderFoldableSection:({isUnfolded:e})=>u(za,{className:w("gap-5 [&>*]:p-0","grid grid-cols-12 [&>*]:pb-4"),isUnfolded:e,children:kn(i)}),renderFoldButton:({isUnfolded:e,onToggle:n})=>xc({version:r,label:t,labelIcon:l,isUnfolded:e,onToggle:n})})})));pc.childrenTypes={exclude:["RollupItem"]};const xc=({version:e,label:t,labelIcon:l,isUnfolded:n,onToggle:a})=>{const r=t||(n?"Скрыть":"Развернуть");return"primary"===e?gc({label:r,labelIcon:l,icon:uc(n),onToggle:a}):u(hr,{label:r,icon:n?"ArrowUpIcon":"ArrowDownIcon",onClick:a})},gc=({label:e,icon:t,onToggle:l,labelIcon:n})=>{const a=String(n?.size?.width||24),r=String(n?.size?.height||24),i=n?.icon;return p("button",{className:w("border-none bg-transparent px-0 flex justify-between items-center w-full cursor-pointer group/button",i?"py-2":"py-5"),onClick:l,children:[p("div",{className:"flex items-center group-hover/button:text-primary-main",children:[i?u(hc,{name:i,width:a,height:r,iconVersion:n?.iconVersion}):null,e?u(he,{size:"text-h6",font:"font-normal",children:e}):null]}),t?u(De,{name:t,iconVersion:"color",width:"24",height:"24"}):null]})},bc=[];const fc=async e=>await L(e,{method:"GET"})||bc,vc=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Ae,{options:s,label:i,placeholder:a||n,onChange:e=>r(e.key),value:o})})),yc=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:r})=>p("div",{className:"flex justify-between gap-4 mb-6",children:[u("div",{className:"max-w-[396px] w-1/2",children:u(vc,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"max-w-[396px] w-1/2",children:u(vc,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Nc=x((({name:e,text:t,value:l,checked:n,onChange:a,className:r})=>u("div",{className:r,children:p("label",{className:"font-sans flex 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("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),wc=x((()=>{const[e,t]=n("option2"),l=r((e=>t(e)),[]);return p("div",{children:[u(Nc,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),u(Nc,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),kc=["От 1 дня","До 365 дней"],Cc=x((({days:e,setDays:t})=>p("div",{className:"mb-6",children:[u("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),u(pt,{min:1,max:365,value:e,items:kc,onChange:t})]}))),Sc=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:r})=>p("div",{className:"flex justify-between mb-6",children:[u("div",{className:"mr-4 w-full",children:u(vc,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"w-full",children:u(vc,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ic=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"flex-1 mr-9",children:[u(yc,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Tc(c)}),u(Cc,{days:a,setDays:e=>c({days:e})}),u(Sc,{caseVolumes:o,selectedCaseVolume:r,onSelectedCaseVolume:Bc(c),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),p("div",{className:"flex justify-between items-center mt-5",children:[u(wc,{}),u(oe,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),Tc=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Bc=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},$c=x((({days:e,tariffs:t=[]})=>{const l=Mc(e,t);return p("div",{className:"flex flex-col justify-between",children:[p("div",{className:"flex",children:[Rc("Аренда за",e,"mr-11"),Rc("Цена",l+" ₽")]}),p("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[u(Rt,{image:{icon:"PackA4Icon"},width:"290",height:"257"}),p("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",u("br",{})," листов формата А4"]})]})]})})),Rc=(e,t,l="")=>p("div",{className:l,children:[u("div",{className:"text-m-light text-secondary-text mb-1",children:e}),u("span",{className:"text-h3 text-primary-text",children:t})]}),Mc=(e,t)=>{const l=_c(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},_c=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},jc=(e,t)=>e.find((e=>e.branchCode===t)),zc=x((e=>{const{regions:t,data:l,branches:n,onChange:r,onClick:i}=e;a((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,r]);const s=jc(n,l.selectedBranch),o=Vc(s?.safeBoxCaseVolumes),c=Dc(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Lc(c,l.selectedBoxSize);return p("div",{className:"flex justify-between align-top mb-6",children:[u(Ic,{...l,regions:t,onClick:i,branches:n,caseVolumes:o,safeBoxCases:c,onChange:r}),u($c,{days:l.days,tariffs:d})]})})),Vc=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Dc=(e,t)=>e?.find((e=>e.volume===t)),Lc=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Pc=x((({title:e,footnote:t,className:l="",...a})=>{const[i,s]=n(!1),o=r((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=O(),h=Ac(c.selectedRegion,m),x=function(e){const{data:t}=V(e?`/api/v1/safeboxes?regionCode=${e}`:null,fc);return t||bc}(h),g=r((e=>d((t=>({...t,...e})))),[d]),b=(f=jc(x,c.selectedBranch)||x,Array.isArray(f)?f.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):f?.gpsLatitude&&f?.gpsLongitude?[[f.gpsLatitude,f.gpsLongitude]]:[]);var f;return p(C,{className:l,...a,children:[p("div",{className:"px-8 py-12",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,u(zc,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&i?u(yo,{points:b,className:"h-[640px]"}):null]})})),Ac=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Oc=e=>Boolean(e?.icon||e?.src),Ec=({styleMap:e,isMainButton:t,version:l})=>(n,a,r)=>{const{label:i,description:s,button:o,items:c,isDotted:d}=n;return p("div",{className:w("relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden",Fc(r.length)),children:[p("div",{className:w(o?.text?"mb-8":"","text-center"),children:[i?u("div",{className:"mb-2",children:u(he,{size:"text-h6",children:i})}):null,p("div",{className:"flex flex-col items-center",children:[s?u("div",{className:e.description,children:s}):null,u(pa,{className:w(s?`${e.description} mt-0.5`:"text-h6"),items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(oe,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(a))},Fc=e=>e<5?"w-[276px]":"w-[210px]",Uc={description:"text-white/80 text-l-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"},Hc=x((({className:e="",showLines:t=!0,steps:l=[],buttons:n,size:a="normal",version:r="primary",stepVersion:i="gray",title:s,...o})=>{const c=l.length>3,d=Uc,m=(e=>e?"":"opacity-0")(t),h=(e=>e<5?"px-[88px]":"px-[55px]")(l.length),x=Boolean(n?.every((e=>e?.text)));return p(C,{className:w("box-border py-12",c?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",e),version:r,...o,children:[s?u(T,{headingType:"h4",className:"max-w-[752px] text-center mb-9",title:s}):null,l?.length?p("div",{className:"box-border",children:[u("div",{className:w("flex items-center",h),children:Fs(u("div",{className:w("h-0.5 w-full bg-secondary-light flex-1",m)}))(l.map(Xc(d,a,i)))}),u("div",{className:w("flex justify-between mt-4",c?"gap-x-3":"gap-x-[101px]"),children:l.map((g={styleMap:d,isMainButton:x,version:r},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return Ec(g)(e,t,l);case"rte":return u("div",{className:w("text-center",Fc(l.length)),children:u(Ma,{__html:e.__html})},String(t));default:return null}}))})]}):null,Jt(n,{className:"mt-8"})]});var g})),Xc=(e,t,l)=>({icon:n},a)=>{const r="secondary"===l?"group-data-primary:text-white":"text-secondary-text",i="secondary"===l?"white":"color";return u(C,{className:`${"normal"===t?"h-[100px] w-[100px]":"h-[63px] w-[63px]"} flex justify-center items-center text-center rounded-full p-[26px] box-border z-10`,version:l,children:Oc(n)?u(Rt,{image:{...n,iconVersion:n.iconVersion||i},width:"48",height:"48"}):u("span",{className:w("text-h4","transparent"===l?e.iconText:r),children:a+1})},String(a))},Wc=x((({className:e="",gap:t=14,padding:l=16,showDots:n=!0,minHeight:a,children:r,onVisibleIndicesChange:i,listType:s="horizontal-list",version:o})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Vn({itemCount:c,onVisibleIndicesChange:i}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===s?"relative h-full":""),children:[u(Tn,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:t,padding:l,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:s,minHeight:a,children:r}),n?u(_n,{containerRef:d,activeIndex:h,dotCount:c,listType:s,version:o}):null]})})),Kc=x((({listType:e,showDots:t,options:l,version:n,...a})=>u(C,{version:n,...a,children:u(Wc,{listType:e,showDots:t,version:n,children:kn({...a,options:l})})})));Kc.childrenTypes={exclude:["SwipeListControlBlock"]};const Gc="h-12 flex-1 flex items-center justify-center cursor-pointer",Jc="font-sans text-m text-center",Yc="text-white",qc="text-secondary-text group-hover/btn:text-primary-main",Zc="text-primary-main",Qc={div:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${Gc} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${Gc} group/btn bg-white`},centered:{active:`px-4 rounded-md ${Gc} bg-primary-main text-white whitespace-nowrap`,default:`px-4 rounded-md ${Gc} group/btn bg-transparent whitespace-nowrap`},wideScreen:{active:`${Gc} bg-primary-main text-white whitespace-nowrap`,default:`${Gc} group/btn bg-white whitespace-nowrap`}},text:{scrollable:{active:"h-full border-0 border-b-2",default:""},centered:{active:"",default:""},wideScreen:{active:"",default:""}}},ed={link:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${Gc} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${Gc} group/btn bg-white`},centered:{active:`px-4 rounded-md ${Gc} bg-primary-main text-white whitespace-nowrap`,default:`px-4 rounded-md ${Gc} group/btn bg-transparent whitespace-nowrap`},wideScreen:{active:`${Gc} bg-primary-main text-white`,default:`${Gc} group/btn bg-white`}},text:{scrollable:{active:`${Jc} flex items-center h-full border-0 border-b-2 text-primary-main`,default:`${Jc} ${qc}`},centered:{active:`${Jc} text-white`,default:`${Jc} ${qc}`},wideScreen:{active:`${Jc} text-white`,default:`${Jc} ${qc}`}}},td=(e,t,l)=>{const n=t?"active":"default";return Qc[e][l||"wideScreen"][n]},ld=(e,t,l)=>{const n=t?"active":"default";return ed[e][l||"wideScreen"][n]},nd=x((e=>{const{tab:t,currentTab:l,onClick:n,tabsMode:a}=e,r="link"===l?.type&&l.href===t.href,i=q()(t);return u("a",{role:"tab",className:ld("link",r,a),target:t.target,href:i.href,onClick:e=>{i.onClick(e),n(t)},children:u("span",{className:ld("text",r,a),children:t.text})})})),ad=(e,t,l)=>e?u("h3",{className:"scrollable"===l?`${Jc} ${t?Zc:qc}`:`${Jc} ${t?Yc:qc}`,children:e}):null,rd=(e,t,l)=>e&&t?u("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(l?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover/btn:text-primary-main"),children:t}):null,id=({page:e,showCounter:t,...l})=>(n,a)=>{const r=n.type;if("group"!==r&&"link"!==r)return null;switch(r){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:n,tabsMode:a})=>(r,i)=>{const s=t===r,o=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return u("div",{className:td("div",s,a),role:"tab","aria-selected":s,onClick:()=>n(r),children:p("div",{className:`flex flex-1 items-center justify-center ${td("text",s,a)}`,children:[ad(r.title,s,a),rd(l,o,s)]})},`group-${String(i)}`)})({page:e,showCounter:t,...l})(n,a);case"link":return u(nd,{tab:n,...l},String(a));default:ui(r)}return null},sd=x((({tabs:e,...t})=>u("div",{className:"flex p-1 m-auto bg-main-gray rounded-md",children:e?.map(id({...t}))}))),od=x((e=>{const{tabs:t,...l}=e,[n,a]=Vn({itemCount:t?.length||0,isCyclic:!1});return p("div",{className:"relative max-w-full m-auto",children:[u("div",{className:"font-sans max-w-full w-full overflow-hidden relative bg-white",children:u(Tn,{containerRef:n,snapAlign:"snap-start",onVisibleIndicesChange:a.handleVisibleIndicesChange,children:t?.map(id({...l}))})}),a.canScrollLeft?u(xl,{className:"absolute z-40 top-0 left-6",onClick:a.scrollLeft}):null,a.canScrollRight?u(gl,{className:"absolute z-40 top-0 rotate-180 right-6",onClick:a.scrollRight}):null]})})),cd=x((e=>{const{className:t="",tabs:l,isSticky:i,...s}=e,[o,c]=n(l?l[0]:void 0);a((()=>{l&&l[0]&&md(l[0])}),[]),a((()=>{"group"===o?.type&&f.subject("tab",{type:o.type,label:o.ref})}),[o]);const d=r((e=>{md(e),c(e)}),[]);return u(C,{className:`relative box-border flex gap-x-1 w-full ${i?"sticky top-1 z-20":""} ${t}`,role:"tablist",...s,children:dd({tabs:l,onClick:d,currentTab:o,...s})})})),dd=({tabsMode:e,tabs:t,...l})=>{switch(e){case"wideScreen":return t?.map(id({tabsMode:e,...l}));case"centered":return u(sd,{tabs:t,tabsMode:e,...l});case"scrollable":return u(od,{tabs:t,tabsMode:e,...l})}return null},md=e=>{"group"===e.type&&f.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&f.fire("tab",{type:e.type,label:e.href})},hd=x((({isOpen:e,onClick:t})=>p(oe,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[u("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),u(De,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20"})]}))),ud={Buttons:({buttons:e})=>Jt(e),Img:({image:e})=>e?.src?u(Rt,{image:e}):null,List:({isDotted:e,...t})=>u(pa,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?u("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:x((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(hd,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null))},pd=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=n(!0);a((()=>{t===i&&r||m(!0)}),[r,i]);return p("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?u("div",{className:"h-5"}):null,xd({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})]},String(c))},xd=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in ud))return null;return u(ud[l],{...t,...n})},gd=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>u("div",{className:"first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0",role:"cell",children:e?.length?e.map(pd({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})):null}))),bd=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=ul({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map(fd(l)),bl({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),fd=e=>(t,l)=>{if(!t?.length)return null;const[n,...a]=t,r=[...Array(e).keys()].reduce(((e,t)=>140*(a?.[t]?.cols?.length??1)+e),0),i=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return p("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[n?.data?u("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:n.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${r}px)`},children:a?.map(((t,l)=>p("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?u("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?vd(t.cols,e):null]},`row${l}`)))})})]},String(l))},vd=(e,t)=>e?.length>0?u("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>u("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,yd=x((({activeTabIndex:e,items:t})=>{const[l,a]=n({}),i=r((e=>a((t=>({...t,[e]:!t[e]})))),[]);return u("div",{children:t.map(((t,n)=>{const a=`activeTabIdx:${e}-tableIdx:${n}`;return p("div",{className:"w-full",children:[p("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>i(a),children:[t.title,u(Rt,{image:{icon:l[a]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),u("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[a]?"h-0":""),children:u("div",{className:"relative",children:u(bd,{rows:t.rowsData})})})]},a)}))})})),Nd=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(oe,{href:t,version:"secondary",target:"_blank",appendLeft:u(De,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function wd(e){const t=await fetch(e);return await t.json()}const kd=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=V(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),wd);return t||{}}(e),[i,s]=n(0),o=r((e=>s(e)),[]),c=a?.[i]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(Nd,{currencies:d,activeTabIndex:i,setActiveTabIndex:o,linkToPDF:t}),u(yd,{activeTabIndex:i,items:c}),u(hd,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(hd,{onClick:l,isOpen:!0})]})})),Cd=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:"flex",children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(kd,{...t,onClick:l})}):null]}))),Sd=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...i})=>{const[s,o]=n(void 0),c=r((e=>o(e)),[]),[d,m]=n(void 0),h=r((e=>m(e)),[]);return p(Cd,{onHideContentClick:()=>o(void 0),tableInner:s,...i,children:[u("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:p("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?u(Rt,{className:"mr-3.5 max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?u(Ka,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(gd,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...i},String(t))))}):null]})})),Id=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:r=0,...i})=>{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]=ul({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Sd,{row:e,activeIndex:d,rowIdx:t,...i},String(t)))),[x,g]=r>0?[h.slice(0,-r),h.slice(-r)]:[h,[]];return p(C,{className:`p-default overflow-hidden relative ${c>1?"pr-0":""} ${e}`,...i,children:[Td({title:t,description:l}),Bd(l),r>0?u(ja,{renderFoldableSection:({isUnfolded:e})=>p($d,{controls:m,children:[x,u(za,{isUnfolded:e,children:g})]}),renderFoldButton:ur}):u($d,{controls:m,children:h})]})}));function Td({title:e,description:t}){return e?u(T,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function Bd(e){return e?u("div",{className:"mb-9 text-center text-l",children:e}):null}const $d=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative",children:[e,bl({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Rd=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:r,items:i=[],...s})=>p(C,{className:w("px-9 py-4 flex gap-3 bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?u("div",{className:"mt-1",children:Md()}):null,"big"===n?_d(a):null,p("div",{className:"flex flex-col w-fit gap-3",children:[t?u(he,{size:"text-l",font:"font-medium",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?jd(l):null,i?.length?zd(i,!0):null,r?u(Ma,{__html:r}):null]})]}))),Md=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),_d=e=>e?.src?u(Rt,{className:"h-fit",image:e}):null,jd=e=>u(me,{size:"text-s",color:"text-secondary-text group-data-secondary:text-white",children:e}),zd=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-6":""),children:e.map(((e,t)=>u("li",{children:u(he,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),Vd=x((e=>{const{tags:t,className:l=""}=e;return t?.length?u("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Dd)}):null})),Dd=(e,t)=>u("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),Ld=x((({title:e,headingType:t="h3",__html:l,items:n,buttons:a,image:r,isDotted:i=!0,listItemSize:s="M",className:o="",tags:c,children:d,directionRight:m=!0,...h})=>p(C,{className:w("flex grow justify-between items-stretch h-full p-9 pr-3 box-border",Fo(o),lo(o),o),...h,children:[r?.src?u(Rt,{className:w("mt-auto ml-7",m?"order-2":""),image:r}):null,u(la,{title:e?u(T,{headingType:t,as:"h2",title:e,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:Jt(a,{className:"mt-8",buttonClassName:"min-w-[158px]"}),children:p("div",{children:[l?u("div",{className:"max-w-[600px] mt-2.5",children:u(Ma,{__html:l})}):null,d,u(pa,{className:"mt-2.5",items:n,isDotted:i,listItemSize:s}),c?.length?u(Vd,{tags:c,className:"mt-5"}):null]})})]}))),Pd={stretch:"items-stretch",left:"items-start",center:"items-center",right:"items-end"},Ad=x((({className:e="",gap:t="",align:l="stretch",isPadding:n=!1,isInnerPadding:a=!0,version:r="transparent",isTheme:i=!1,...s})=>{const o=a?"":"!p-0";return u(C,{className:w("relative","flex flex-col [&>*]:max-w-full",n?"p-default":"",js[t],l&&Pd[l],e),version:r,isTheme:i,...s,children:kn({...s,renderProps:(e,t)=>yn(e,t,{className:o})})})}));Ad.childrenTypes=[];const Od=e=>to(e)<10?"py-6 px-11":"py-12 px-32",Ed=x((({className:e,title:t,url:l,previewImg:n,...a})=>{const r=Y();return p(C,{className:w(Od(e),e),...a,children:[u(el,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:K(r)(n?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:K(r)(l)})}):null]})})),Fd={ApplicationForm:Ut,BenefitsBlock:Ht,Bonus:tl,BonusBenefitsBlock:il,BusinessBlock:ml,ButtonBlock:hl,Calculator:dn,CardTransfer:bn,Carousel:On,CarouselBankHistoryCard:Hn,CarouselCard:Yn,CarouselCatalogCard:Zn,CarouselEventCard:ta,CarouselInvestmentCard:aa,CarouselLinks:oa,CarouselProductCard:xa,CarouselProgramsCard:Na,CarouselRecommendationCard:$a,CarouselRichTextCard:_a,CarouselTariffsCard:La,ComparisonTable:ar,ContactsBlock:ir,DepositFiltration:kr,ErrorBlock:Sr,ExchangeRateTile:li,Footer:Xi,GracePeriod:Wi,Header:_s,Headline:el,HorizontalLayout:zs,ImgBlock:Vs,InsuranceAmountBlock:Os,InvestmentInfo:Xs,LinkDocs:eo,MobileAppTile:no,MortgageFiltration:so,OfficeMap:Mo,OfficeServicesBlock:_o,ParagraphBlock:zo,PictureText:Po,Placeholder:Uo,ProductBlock:Yo,ProductGallery:qo,ProductTile:lc,PromoTile:ac,RepresentativeOfficeInfo:ic,RichTextBlock:dc,RollupItem:pc,SafeDepositRental:Pc,StepsBlock:Hc,SwipeListControlBlock:Kc,Tabs:cd,TariffsTable:Id,TextBlock:Rd,Tile:Ld,VerticalLayout:Ad,Video:Ed,ExchangeRateOffice:jr};const Ud=["Header","Footer"],Hd=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Xd(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Ud.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Ol(Hd)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Wd="cookieClose",Kd=x((({termLink:e,personalDataPolicyLink:t})=>{const{isOpened:l,onClose:n}=Ii("cookie",!globalThis.localStorage?.getItem(Wd)),a=r((()=>{globalThis.localStorage?.setItem(Wd,"true"),n&&n()}),[n]);return l?u("div",{className:"container z-40 fixed bottom-0 left-0 right-0 pointer-events-none",children:p("div",{className:"bg-white m-6 p-6 rounded-md flex items-center pointer-events-auto shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"flex-1",children:p(me,{size:"text-s-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(ea,{isRemote:!0,className:w(Gd(e?.href)),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(ea,{isRemote:!0,className:w(Gd(t?.href)),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"w-24 flex justify-end",children:u(hi,{className:"bg-main-gray rounded-md",onClick:a})})]})}):null})),Gd=e=>["inline mx-1",e?"text-green-dark":""],Jd=h();const Yd=x((({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:qd()}))),qd=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"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"}),u("path",{...e,d:"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"})]})},Zd=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Jd.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:r((async()=>{l(await Jd.like(e))}),[e]),dislike:r((async()=>{l(await Jd.dislike(e))}),[e])}}(Y().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[u(Yd,{onClick:J(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Yd,{onClick:J(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Qd=x((e=>{const{className:t="",blocksRegistry:l,blockDecorator:n,data:a={}}=e,{style:r,blocks:i,slots:s,likeControl:o,colorPalette:c="pc"}=a,d={key:"",page:a,blocksRegistry:l,blockDecorator:n,parent:a};Xd();const[m,{setTrue:h,setFalse:x}]=je();return pi({onOpen:h,onClose:x}),p("section",{className:w("relative",r,t,m?"overflow-hidden h-screen":""),"data-theme":c,children:[s?.header?u("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:wn(s?.header,{...d,slotName:"header"})}):null,p("div",{className:"container grid grid-cols-12 gap-1",children:[wn(i,d),s?.footer?wn(s?.footer,{...d,slotName:"footer"}):null]}),o?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Zd,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null,u(Kd,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Qd.childrenTypes=[],Qd.slots=()=>["header","footer"];e.Blocks=Fd,e.ContentPage=Qd,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=J,e.joinList=Fs,e.packageVersion="0.11.0",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=W,e.useRouter=Y,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).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),r=l("useCallback"),i=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 FOOTER(){return this._.FOOTER}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),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},r=l?.slots?.default,i=n||r&&r();return e(Object.assign(a,i&&{children:i}),l)}return t.inheritAttrs=!1,t};class b{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}}const f=new b;function v(e,{sensitivity:t,rootRef:l}={}){const n=s(null),r=i((()=>({threshold:y(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,r);return t.observe(n.current),()=>{t.disconnect()}}),[e,r]),n}function y(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new b;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),k={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","":""},C=x((({className:e,version:t="primary",isTheme:l=!0,block:i,tag:s="section",role:o,children:c})=>{const d=s,m=function(e){return v(r((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(i),[h,p]=n(!1);return a((()=>f.subscribe("tab",(e=>{p(Boolean(e.label&&i?.labels?.length&&!i.labels.includes(e.label)))}))),[i]),u(d,{className:w(S(Boolean(t&&l)),k[t],h?"hidden":"",e),...t&&l?{"data-ver":t}:{},...i?.anchor?{id:i.anchor,ref:m}:{},role:o,children:c})})),S=e=>e?"group":"",I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>u(l,{className:`font-sans m-0 ${I[t]} ${e}`,children:n||a}))),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[i,o]=n(!1),[c,d]=n({}),m=s({}),h=r(((e,t)=>{const{parse:n=B,format:r=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:r(l[e]),isDirty:i||c[e],onChange:m.current[e]}}),[l,i,c]),u=r((()=>{a(e),o(!1),d({})}),[e]),p=r((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:i||Object.values(c).some(Boolean),field:h,reset:u,onSubmit:p}]},$=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],M=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],j=e=>null!=e,V=new Map;function z(e,t,{fallback:l,cache:r}={}){const s=i((()=>D(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(j)||(async()=>{try{const e=await(o?((e,t=V)=>l=>{const n=t.get(l);if(j(n))return n;const a=e(l);return j(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,r)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,r,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function D(e){return Array.isArray(e)?e:e instanceof Function?D(e()):[e]}async function P(e,t){try{return e?await L(e,t):null}catch(e){console.error(e)}return null}async function L(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const A=[];function O(){const{data:e}=z("/api/v1/regions",L);return e||A}const E=(e="")=>({open:t=>f.fire("dialog",{type:"open",id:e,message:t}),close:()=>f.fire("dialog",{type:"close"})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),X=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var W=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:H,joinPath:X});const K=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||G(t,d.CDN))return t;const n=t.startsWith("/");return X(G(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},G=(e,t)=>t&&e&&e.startsWith(t),J=(e,t)=>J._impl(e,t);function Y(){return Y._impl()}function q(e={}){const{isRemote:t,basePath:l}=e,n=Y(),{close:a}=E();return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:J(r(e),e)});function r({href:e,target:l,onClick:r}){return i=>{r&&r(i),e&&!t&&U(e,l)&&(a(),i?.preventDefault(),n.push(e))}}}J._impl=e=>e,J.setup=e=>{J._impl=e},Y._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),Y.setup=e=>{Y._impl=e};const Z={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Q="bg-main-divider text-main-disabled",ee={primary:Q,secondary:Q,white:Q,link:"",transparent:"",gray:Q,"":""},te="text-center font-sans select-none",le={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ne=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:r="primary"}=e;return p("div",{className:w(ae(e),"flex gap-2"),children:[n?u("div",{className:le[r],children:n}):null,re(e)?p("div",{children:[l?u("div",{className:"text-xs-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,a?u("div",{className:le[r],children:a}):null]})})),ae=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-7":"py-4 px-4");return["group/btn items-center justify-center",re(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},re=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ie=({className:e,rounded:t,version:l})=>["inline-block",te,l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[te,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Z[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=x((({disabled:e,children:t,...l})=>{const n=q()(l),a=t??u(ne,{...n});return u(e?de:ce,{...n,children:a})})),ce=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:r,rounded:i,onClick:s,children:o})=>u("a",{className:se({className:e,version:r,rounded:i}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),de=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ie({className:e,rounded:n,version:l}),children:a}))),me=x((({children:e,...t})=>u("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),he=x((({children:e,...t})=>u("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),ue=x((({link:e})=>p(me,{size:"text-s-light",color:"text-secondary-text",children:[u(he,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(oe,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(he,{children:e.text})}):null]}))),pe=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},xe=x((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:i="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:x,onBlur:g,pattern:b})=>{const f=r((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-8":"",y=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-2",children:u(he,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-4",v,y,l),id:n,name:a||n,placeholder:o,type:i,value:c,onInput:f,onFocus:x,onBlur:g,pattern:b},e)]}),m]})})),ge=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:r})=>p("div",{className:e,children:[u(xe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:r}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs-light",color:"text-error",children:n}):null})]}))),be=e=>"_"===e,fe=e=>/\d/.test(e),ve=e=>be(e)||fe(e),ye=[..."+7 (___) ___-__-__"],Ne=ye.findIndex(be),we=ye.map(((e,t)=>ve(e)?ye.slice(0,t).filter(ve).length:-1));const ke=x((({children:e,onChange:t,...l})=>{const n=r((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ye.map(((e,l)=>fe(e)?e:t.charAt(we[l])||e)),n=we.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ne,n)):l).join("")}(e))),[t]);return u(xe,{onChange:n,onFocus:n,...l,children:e})})),Ce=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:r})=>p("div",{className:e,children:[u(ke,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:r}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs-light",color:"text-error",children:n}):null})]}))),Se="Некорректно заполненное поле",Ie=_((e=>null!=e&&""!==e))(Se),Te=_((e=>"string"==typeof e&&e.length>1))(Se),Be=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Se),Re=($e=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&$e.test(e))))(Se);var $e;const Me=e=>p("div",{className:"flex justify-between gap-5 mb-5",children:[p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...pe(e("name"),Te)})]}),p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"ИНН",...pe(e("inn"),Be)}),u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),Re)})]})]}),_e=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function je(e=!1){const[t,l]=n(e),a=r((()=>l(!0)),[]),i=r((()=>l(!1)),[]),s=r((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:i,toggle:s}]}function Ve(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}const ze={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},De=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:r="color",...i})=>{const s=Y(),o=K(s)(X(d.CDN,"/icons",`${l}.svg`));return"normal"!==r?u(Le,{className:e,children:p("svg",{className:w(Pe(i.width),ze[r],"white"===r?"invert":"",t),...i,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(i.style={height:`${i.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...i}))})),Pe=e=>e?"":"w-full h-full",Le=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ae=x((({className:e="",label:t,options:l=[],value:n,valid:a=!0,isBorder:i=!0,placeholder:s="",onChange:o})=>{const[c,{setFalse:d,toggle:m}]=je(),h=Ve(d),x=r((e=>{d(),o&&o(e)}),[o]);return p("div",{className:e,ref:h,children:[t?u("div",{className:"mb-2",children:u(he,{size:"text-m",color:"text-primary-text",font:"font-light",children:t})}):null,p("div",{className:w("relative",c?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer",Fe(i,a)),onClick:m,children:[u("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ee(n)||s}),u(De,{className:w("absolute right-3",c?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),l?.length?u("div",{className:w("h-0",c?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:l.map(Oe(x,c,(e=>e.key===n?.key)))})}):null]})]})})),Oe=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[u("span",{className:"min-h-6",children:Ee(n)}),u(De,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-0.5",l(n)&&t?"":"hidden")})]},String(a)),Ee=e=>e?.text||e?.key||"",Fe=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ue=x((e=>p("div",{children:[u(Ae,{...e,valid:!e.error}),u("div",{className:"h-2",children:e.error?u(he,{size:"text-xs-light",color:"text-error",children:e.error}):null})]}))),He=({regions:e,field:t})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(Ue,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:_e.map((({name:e=""})=>({key:e,text:e}))),...pe(t("acquiringType"),Ie)})}),u("div",{className:"w-1/2",children:u(Ue,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})]}),Xe=x((({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-3",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-[50%]":"left-[5%]")})}),u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),We=e=>p("div",{className:"mb-5",children:[u(Xe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Xe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Ke=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-4",l,t),children:e?.text?e.text:"Отправить заявку"})},Ge={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Je=$({acquiringType:Ie,region:Ie,fullName:Ie,inn:Be,name:Te,phone:Re}),Ye=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{acquiringType:t,region:l,fullName:a,inn:r,name:i,phone:s,onlineCheckout:o,posTerminal:c}=e;M(Je(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:r,name:i,phone:s})}),[n]),[,{field:i,...s}]=R(Ge,a),o=O();return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"text-center mb-4"}),He({regions:o,field:i}),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Me(i),We(i),Ke(t,"mb-4"),u(ue,{link:l})]})})),qe=e=>p("div",{className:"flex justify-between gap-5",children:[p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...pe(e("name"),Te)}),u(ge,{className:"shrink-0 w-full mb-3",label:"ИНН",...pe(e("inn"),Be)})]}),p("div",{className:"w-1/2",children:[u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),Re)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),Ze=({regions:e,field:t})=>u("div",{className:"flex justify-between gap-5 mb-5",children:u("div",{className:"w-full",children:u(Ue,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})}),Qe={name:"",phone:"",inn:"",mail:""},et=$({region:Ie,name:Te,phone:Re,inn:Be,mail:Ie}),tt=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{region:t,name:l,phone:a,inn:r,mail:i}=e;M(et(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:r,mail:i})}),[n]),[,{field:i,...s}]=R(Qe,a),o=O();return p("form",{className:"container",onSubmit:s.onSubmit,children:[Ze({regions:o,field:i}),qe(i),Ke(t,"mb-4"),u(ue,{link:l})]})})),lt=[];const nt=async e=>await P(e,{method:"GET"})||lt,at=["От 1 000 ₽","До 1 000 000 000 ₽"],rt=["От 1 мес","До 15 лет"],it=e=>p("div",{className:"flex justify-between gap-5 mb-7",children:[p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...e("fullName")}),u(ge,{className:"shrink-0 w-full mb-3",label:"ИНН",...pe(e("inn"),Be)}),u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),Re)})]}),p("div",{className:"w-1/2",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Годовая выручка, ₽",...pe(e("annualRevenue"),Ie)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...pe(e("name"),Te)}),u(ge,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...e("mail")})]})]}),st=(e,{normalize:t,format:l})=>{const{value:a,onFocus:i,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=r((e=>{d(!0),i&&i(e)}),[]),h=r((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},ot=(e,t,l)=>Math.max(t,Math.min(e,l)),ct=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function dt(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function mt({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:r,onChange:i}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-4",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||r?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-4 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:r,onInput:t=>{const l=dt(t.target?.value),n=e.length?e[l]:l;i&&i(n||0)}})})]})}const ht=1,ut=100,pt=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:i=(a.length?0:ht),max:s=(a.length?a.length-1:ut),step:o=1,value:c=a[0]||i,disabled:d=!1,onChange:m}=e,h=st(e,{normalize:(e=0)=>a.length?xt(a)(e):ot(e,i,s),format:ct()}),x=r((e=>{m&&m(dt(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(he,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-2 font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-4 box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),mt({list:a,min:i,max:s,step:o,disabled:d,value:c,onChange:m})]}),gt(n)]})})),xt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),gt=e=>u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u(he,{size:"text-s-light",color:"text-secondary-text",children:e},String(t))))}),bt=e=>p("div",{className:"flex justify-between gap-5 mb-7",children:[p("div",{className:"w-1/2",children:[u("label",{children:u(he,{size:"text-m-light",children:"Сумма кредита, ₽"})}),u(pt,{items:at,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"w-1/2",children:[u("label",{children:u(he,{size:"text-m-light",children:"Срок кредита, месяцев"})}),u(pt,{items:rt,min:1,max:180,...e("term")})]})]}),ft=({regions:e,branches:t,field:l})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(Ue,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(l("region"),Ie)})}),u("div",{className:"w-1/2",children:u(Ue,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...pe(l("department"),Ie)})})]}),vt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},yt=$({annualRevenue:Ie,inn:Be,name:Te,phone:Re,region:Ie,department:Ie}),Nt=x((({button:e,link:t,onSubmit:l})=>{const n=r((e=>{const{amount:t,term:n,fullName:a,inn:r,name:i,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;M(yt(e))&&l({typeForm:"cred",fullName:a,inn:r,name:i,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:i,...s}]=R(vt,n),o=O(),c=function(e){const{data:t}=z(e?`/api/v1/branches?regionCode=${e}`:null,nt);return t||lt}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"text-center mb-4"}),bt(i),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),it(i),u(T,{headingType:"h6",title:"Офис банка",className:"text-center mb-4"}),ft({regions:o,branches:c,field:i}),Ke(e,"mb-4"),u(ue,{link:t})]})})),wt={name:"",phone:""},kt=$({name:Te,phone:Re}),Ct=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{name:t,phone:l}=e;M(kt(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:i,...s}]=R(wt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"text-center mb-4"}),p("div",{className:"max-w-[560px] m-auto",children:[u(ge,{className:"shrink-0 w-full mb-3",label:"Имя",...pe(i("name"),Te)}),u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(i("phone"),Re)})]}),p("div",{className:"flex justify-between items-center max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(ue,{link:l})}),Ke(t)]})]})})),St=(e,t)=>e?.media&&t?.media?e.media-t.media:0,It=x((({className:e="",image:t,imageClassName:l="",isMobile:n=!1,pathPrefix:a})=>{const r=Y();return p("picture",{className:`${n?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(St).map((({src:e,format:l,media:n},i)=>u("source",{srcSet:Bt(r,a)(e),type:Rt(l),media:n?`(max-width: ${n}px)`:"",...t.size},`${i}_${e}`))):null,t?.src?Tt({...t,src:Bt(r,a)(t.src)},l,n):null]})})),Tt=(e,t="",l=!1)=>{const n={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},a=e.title||"",r=e.alt||e.title,i=l?"m-auto":"m-0";return u("img",{src:e.src,className:`${i} ${t}`,alt:r,title:a,style:n,...e.size})},Bt=(e,t)=>l=>l&&!F(l)?K(e)(X(t,l)):l,Rt=e=>e?`image/${String(e)}`:void 0,$t=x((({className:e="",image:t,imageClassName:l="",isMobile:n,pathPrefix:a,...r})=>t?.src||t?.icon?t.icon?u(De,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...r}):u(It,{className:e,imageClassName:l,image:t,isMobile:n,pathPrefix:a}):null)),Mt=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:r,...i})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:r.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...i,...l},n)))}))),_t=[{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"}],jt=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:i})=>{const s=r((e=>{n||(e.preventDefault(),i&&i(!t))}),[i,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Mt,{paths:_t,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:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Vt(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("span",{className:"font-sans ml-3 text-l-light",children:l}):null]})})})),Vt=e=>w("rounded border",e?"bg-primary-main":""),zt=e=>{const t=e("text");return p("div",{className:"mb-6",children:[p("div",{className:"flex items-center mb-4 gap-6",children:[u(jt,{text:"Валютный контроль",...e("currencyControl")}),u(jt,{text:"Документарные операции",...e("documentaryOperations")}),u(jt,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Dt=e=>p("div",{children:[p("div",{className:"flex justify-between gap-5",children:[u("div",{className:"w-1/2",children:u(ge,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...pe(e("fullName"),Ie)})}),u("div",{className:"w-1/2",children:u(ge,{className:"shrink-0 w-full mb-3",label:"ФИО",...pe(e("name"),Te)})})]}),p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(Ce,{className:"shrink-0 w-full mb-3",label:"Телефон",...pe(e("phone"),Re)})}),u("div",{className:"w-1/2",children:u(ge,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...pe(e("mail"),Ie)})})]})]}),Pt={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Lt=$({fullName:Ie,name:Te,phone:Re,mail:Ie}),At=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=r((e=>{const{fullName:t,name:l,phone:a,mail:r,currencyControl:i,documentaryOperations:s,conversionOperations:o,text:c}=e;M(Lt(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:r,partnerComments:`Валютный контроль=${i}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:i,...s}]=R(Pt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Dt(i),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"text-center mb-4"}),zt(i),p("div",{className:"flex items-center pb-9 mb-9 border-b border-main-divider",children:[Ke(t,"mr-5"),u(ue,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"text-center mb-4"}),p("div",{className:"flex",children:[p("a",{className:"flex items-center text-primary-text no-underline mr-6",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u($t,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u($t,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),Ot=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center mt-5 p-5 rounded-md ${t?"bg-responce-ok":"bg-responce-fail"}`,children:[u($t,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42",className:"mr-4"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34",className:"mr-4"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),u(he,{size:"text-l-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Et={credit:e=>u(Nt,{...e}),acquiring:e=>u(Ye,{...e}),"business-card":e=>u(tt,{...e}),deposit:e=>u(Ct,{...e}),wed:e=>u(At,{...e})},Ft={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Ut=x((e=>{const{className:t,title:l,typeForm:a="credit",button:i,link:s,...o}=e,[c,d]=n(""),m=r((async e=>{const t=await Ft.send(e)?"OK":"Fail";return d(t),t}),[]);return u(C,{className:w("font-sans bg-white p-default pb-9",t),...o,children:p("div",{className:"container max-w-[978px]",children:[l?u(T,{headingType:"h3",title:l,className:"text-center mb-8"}):null,Et[a]({button:i,link:s,onSubmit:m}),c?u(Ot,{responseType:c}):null]})})})),Ht=x((({className:e="",title:t,benefitList:l,...n})=>p(C,{className:`p-default flex flex-col items-center ${e}`,...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"max-w-[47rem] text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(Xt)}):null]}))),Xt=(e,t)=>{const l=e.description;return p("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[e?.icon?.icon?u($t,{className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black",image:e.icon}):null,e?.icon?.src?u($t,{image:e.icon}):null,p("div",{className:"ml-5 h-full",children:[e?.label?u(T,{headingType:"h6",children:e.label}):null,Wt(l)]})]},String(t))},Wt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-2 text-l-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Gt(e):Kt(e)}):null},Kt=e=>e?.name||null,Gt=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},Jt=(e,{className:t="",buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-2":"flex-wrap gap-4",t),children:e.map(Yt(l))}):null,Yt=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:r,version:i,...s}=t||{},o="secondary"===i?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(oe,{className:e,appendLeft:qt({...a,iconVersion:c}),appendRight:qt({...r,iconVersion:c}),version:i,text:n,...s},l?String(l):""):null},qt=e=>e?.icon||e?.src?u($t,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Zt={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionStyle:"mt-5"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light",descriptionStyle:"mt-4"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light",descriptionStyle:"mt-4"},M:{title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light",descriptionStyle:"mt-3"},S:{title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light",descriptionStyle:"mt-2"},XS:{title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light",descriptionStyle:"mt-2"}},Qt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},el=x((({className:e,title:t,description:l,headlineVersion:n="XL",align:a="text-center",as:r,isPadding:i=!0,isTheme:s=!1,version:o="",...c})=>{const d=Zt[n],m=i?"p-default":"",h={marginTop:d.descriptionStyle};return p(C,{className:w(m,e),version:o,isTheme:s,...c,children:[t?u(T,{className:w("whitespace-pre-wrap",a),...d?.title,as:r||d?.title.as,title:t}):null,l?u(me,{size:d.descriptionSize,align:a,...h,children:l}):null]})})),tl=x((e=>{const{className:t="",title:l,description:n,bonusItems:a,...r}=e;return u(C,{className:`p-default pb-9 ${t}`,...r,children:p("div",{className:"container",children:[u(el,{className:"!p-0",title:l,description:n,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full mt-9",children:a?.length?a.map(((e,t)=>p("div",{className:"flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0",children:[e?.title?u(he,{size:"text-h4",children:e.title}):null,e?.description?u("div",{className:"mt-2",children:u(me,{size:"text-xl",font:"font-light",children:e.description})}):null,p("div",{className:"flex justify-between items-end mt-3",children:[Jt(e?.buttons),e.bonusItemContent?.bonusType?ll(e.bonusItemContent):null]})]},String(t)))):null})]})})})),ll=e=>u("div",{children:"count"===e.bonusType?nl(e):al(e)}),nl=e=>p("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?u("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}):null,e.bonusName?u("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),al=e=>e.image?u($t,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,rl={left:"text-left",center:"text-center",right:"text-right"},il=x((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:r,...i})=>p(C,{className:`font-sans text-primary-text bg-white p-default flex flex-col text-center ${l}`,...i,children:[u(el,{className:"!p-0 mb-8",title:r,description:a,headlineVersion:"M"}),e?.length?u("div",{className:`grid gap-1 ${rl[t]} ${ol(n)}`,children:e.map(sl)}):null]}))),sl=({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col items-center text-h6",l||t?"":"justify-center"),children:[t?u("span",{children:t}):null,e?u($t,{image:e,height:"180",className:"w-auto"}):null,l?u("span",{children:l}):null]},String(n)),ol=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},cl=x((e=>{const{title:t,image:l,cardItems:n,button:a}=e;return p("div",{className:"border-gray border p-9 w-1/2",children:[l?p("div",{className:"flex justify-center",children:[l?.src?u($t,{className:"mb-5",image:l}):null,l?.icon?u($t,{image:l}):null]}):null,t?u(T,{headingType:"h4",title:t,className:"mb-6"}):null,n?.length?u("ul",{children:n.map(((e,t)=>dl(e,String(t))))}):null,Jt([a],{buttonClassName:"mt-6"})]})})),dl=(e,t)=>{const{icon:l,text:n}=e;return p("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?u($t,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider"}):null,l?.src?u($t,{image:l}):null,u("span",{className:"text-xl-light",children:n})]},t)},ml=x((({className:e="",title:t,cards:l,...n})=>p(C,{className:`p-default pb-9 ${e}`,...n,children:[u(T,{headingType:"h3",title:t,className:"text-center mb-8"}),u("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>u(cl,{...e},String(t)))):null})]}))),hl=x((({button:e,className:t,...l})=>u(C,{className:w("!bg-transparent",t),...l,children:Jt([e])}))),ul=e=>{const{itemCount:t,visibleItemCount:l}=e,[a,i]=n(0),s=r((()=>i((e=>Math.min(e+1,t-1)))),[t]),o=r((()=>i((e=>Math.max(e-1,0)))),[t]),c=function({itemCount:e,visibleItemCount:t}){return Boolean(t&&e>t)}(e)&&a<t-(l||1),d=a>0;return[a,{inc:s,dec:o,canInc:c,canDec:d,isScrollAvailable:d||c}]};const pl=x((({className:e,disabled:t,...l})=>u(oe,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u($t,{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"})}))),xl=x((e=>u(pl,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),gl=x((e=>u(pl,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function bl({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:r=""}){return l||n?p("div",{children:[l?u(pl,{className:`absolute z-40 ${a[0]} ${r}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(pl,{className:`absolute z-40 rotate-180 ${a[1]} ${r}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const fl=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("mb-7",a),children:[e?u(he,{size:"text-l-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(he,{size:"text-h3",children:[n," ",ct(2)(Math.round(t))," ",l]})}:{children:u(he,{size:"text-h3",children:"-"})})]}))),vl=Math.round(23.5),yl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Nl={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},wl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},kl={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Cl=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:r,fractionDigits:i=2})=>p("div",{children:[u(he,{size:"text-l-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:w("font-mohave text-title-huge pr-6 -mt-4",r),children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Sl=e=>e?u(me,{size:"text-s-light",color:"text-secondary-text",children:e}):null;function Il({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${ct(2)(l.min||0)} ₽`,`До ${ct(2)(l.max||0)} ₽`];return u(pt,{items:e?n:[],step:t,...l})}function Tl(e){const{data:t}=z(`/wcms-resources/${e}.json`,L);return t}const Bl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Tl(t||"bonus-calculator-data")||Nl,[r,i]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:r,prefMonthsNum:i,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),r);return[m,m*i+Math.min(Math.round(c*t)+Math.round(d*l),r)*(12-i)]})(a,l,n);return{...a,...e,monthBonus:r,yearBonus:i}},Rl=x((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:r}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:i,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Bl(a,t);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Il({title:"Сумма покупок в категории путешествия, ₽",min:i,max:s,step:500,isShowItems:!1,...r("travelExpenseValue")}),Il({title:"Сумма покупок в остальных категориях, ₽",className:"mt-7",min:o,max:c,step:500,isShowItems:!1,...r("restExpenseValue")})]}),u("div",{children:d>=0?u(Cl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null}),p("div",{className:"w-full max-w-[350px]",children:[m>=0?u(fl,{title:"Баллов за год",value:m}):null,Jt(l,{className:"mt-7",isVertical:!0}),Sl(n)]})]})})),$l=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ml={horizontal:"gap-10",vertical:"flex-col gap-3"},_l=x((({items:e,checkedItem:t,onChange:l,orientation:n="horizontal"})=>u("div",{className:`flex ${Ml[n]}`,children:e?.map((({id:e,text:n})=>u(jt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e)},String(e))))}))),jl=({items:e,title:t,orientation:l="horizontal",value:n,onChange:a})=>p("div",{children:[t?u("div",{className:"mb-3",children:u(he,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(_l,{orientation:l,items:e,checkedItem:e[n?0:1].id,onChange:t=>a&&a(t===e[0].id)})]}),Vl=e=>jl({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),zl=x((({title:e="Ставка"})=>p("div",{children:[u(he,{size:"text-l-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-1 pt-1 pl-5 pb-1.5",children:u(De,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-[250px] mt-3.5",children:p(me,{size:"text-xl-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),Dl=e=>e,Pl=(e=Dl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ll=Pl(),Al=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,r]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,r)]):l++}return t},Ol=(e=Dl)=>Pl((t=>-e(t))),El=Ol(),Fl=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Ul([e,t],n),Ul=([e,t],l=[])=>({[e]:l.length?El(l.filter((t=>t[e])).map((t=>t[e]))):0,[t]:l.length?Ll(l.filter((e=>e[t])).map((e=>e[t]))):0}),Hl=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Xl=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Wl=(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)},Kl=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:r})=>{const[i,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:r,isSmallBusiness:i,isMonthlyInterestPayment:s}=e,o=Tl(t||"business-calculator-data"),c=r||a,d=l<90||l>730;if(l<=30)return{...kl,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&i===e.isSmallBusiness&&Xl(c,e)&&Hl(n,["minSum","maxSum"],e)&&Hl(l,["minDays","maxDays"],e)))||kl,{rate:h}=m,u=Wl(h,e),p=n+u,x=o?.rateRows||[kl];return{...m,...Ul(["minSum","maxSum"],x),...Ul(["minDays","maxDays"],x),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(i,t),{income:c,finalSum:d,rate:m,depositeName:h,isShowUnknownRate:x}=o;return p("section",{className:e,children:[p("div",{className:"flex justify-between",children:[p("div",{className:"w-[486px]",children:[Il({title:"Сумма вклада, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(g={title:"Срок вклада, дни",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(pt,{className:"mt-7",items:[`От ${$l(g.min||0)}`,`До ${$l(g.max||0)}`],step:1,...g})),p("div",{className:"mt-7 flex justify-between",children:[Gl(o,s),Vl({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment")})]})]}),x?u(zl,{}):u(Cl,{rate:m,depositeName:h,isShowDepositeName:r,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(fl,{title:"Доход по вкладу",value:c,postfix:"₽",prefix:"+"}),u(fl,{title:"Сумма в конце срока",value:d,postfix:"₽"}),Jt(l,{className:"mt-7",isVertical:!0}),u("div",{className:"mt-7",children:Sl(n)})]})]}),u("div",{className:"mt-5",children:Sl(a)})]});var g})),Gl=(e,t)=>p("div",{children:[u(jt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(jt,{className:"mt-3",disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(jt,{className:"mt-3",text:"Являюсь малым предприятием",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),Jl=({min:e=0,max:t=0,availableMonths:l,...n})=>u(pt,{className:"mt-7",items:[`От ${Yl(e)}`,`До ${Yl(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Yl=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,ql=e=>Zl({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Zl({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Zl({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Zl({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Zl=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ql=(e,t,l)=>{let{moneyValue:n,monthsValue:a}=e;const r=Tl(t||"credit-calculator-data"),s=r?.rateRows||[yl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>ql({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:r?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Fl(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Fl(["minMonths","maxMonths"],o,s);n=ot(n,c,d),a=ot(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>ql({row:e,userInputParams:t,paramsViewSettings:l})&&Hl(n,["minSum","maxSum"],e)&&Hl(a,["minMonths","maxMonths"],e)))||yl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=((e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a}=t;if(0===e)return 0;if(l){const t=e/1200;return n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)})(p,e);return i((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,r])},en=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[r,{field:i}]=R({isAnnuity:!1,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:vl}),s=Ql(r,t,a);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Il({title:"Сумма кредита, ₽",step:500,min:s.minSum,max:s.maxSum,...i("moneyValue"),value:s.moneyValue}),Jl({title:"Срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...i("monthsValue"),value:s.monthsValue}),u("div",{className:"mt-7",children:tn({...s,...a},i)})]}),u(Cl,{title:"Ставка",rate:s.rate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(fl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),(o={orientation:"vertical",...i("isAnnuity")},jl({...o,items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]})),Jt(l,{className:"mt-7",isVertical:!0}),Sl(n)]})]});var o})),tn=(e,t)=>p("div",{children:[e.isShowSalaryClient?u(jt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowStateEmployee?u(jt,{className:"mt-3",text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(jt,{className:"mt-3",text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(jt,{className:"mt-3",text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),ln=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,r=Tl(t||"deposit-calculator-data"),i=r?.rateRows?.[0]?rn(r.rateRows[0].minMonths,r.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=r?.rateRows?.find((t=>an({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&an({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Hl(n,["minSum","maxSum"],t)&&Hl(a||i,["minMonths","maxMonths"],t)))||wl,{rate:d}=c,m=nn(d,e),h=n+m,u=r?.rateRows||[wl];return{...c,...Ul(["minSum","maxSum"],u),...Ul(["minMonths","maxMonths"],u),availableMonths:Al(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:i,income:m,finalSum:h}},nn=(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)},an=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],rn=(e,t)=>e+Math.round((t-e)/2),sn=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:r})=>{const[i,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=ln(i,t,r),{defaultMonth:c,income:d,finalSum:m,rate:h}=o,{onChange:x}=s("monthsValue");return a((()=>{x&&x(c)}),[c]),p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Il({title:"Сумма вклада, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Jl({title:"Срок вклада, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),u("div",{className:"mt-7",children:on({...o,...r},s)})]}),u(Cl,{rate:h,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(fl,{title:"Доход по вкладу",value:d,postfix:"₽",prefix:"+"}),u(fl,{title:"Сумма в конце срока",value:m,postfix:"₽"}),Jt(l,{className:"mt-7",isVertical:!0}),Sl(n)]})]})})),on=(e,t)=>{return p("div",{className:"flex flex-col gap-y-7",children:[e.isShowMonthlyInterestPayment?Vl({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},jl({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},cn={CreditCalculatorForm:en,DepositCalculatorForm:sn,BusinessDepositCalculatorForm:Kl,BonusCalculatorForm:Rl},dn=(e,t)=>{const l=e?.calcType;if(!l||!(l in cn))return null;const n=cn[l];return u("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:p("div",{className:"box-border p-9 w-full",children:[e?.title?u(T,{className:"text-center mb-6",title:e.title}):null,u(n,{...e})]})},String(t))},mn=x((({className:e="",calculatorTabs:t=[],...l})=>{const a=t.map((e=>e.nav||{})),i=t.map((({calculatorBlock:e})=>e||{})),[s,o]=n(0),c=r((e=>o(e)),[]),[d,m]=ul({itemCount:t?.length,visibleItemCount:3});return p(C,{className:w("box-border overflow-hidden relative w-100",e),...l,children:[p("div",{className:"bg-white",children:[a.length>1?hn({activeIndex:d,tabsNav:a,slideIndexShift:s,onClick:c}):null,bl({...m,btnClass:["left-3","right-3"],className:"top-8"})]}),u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(dn):null})]})}));function hn({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:n}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:u("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white":"h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text",r=l?"text-xl mb-1.5":"text-l mb-[3px]",i=l?"text-l-light text-white":"text-m-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:n,"aria-label":e?.title,className:w("box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]",a),children:[u($t,{className:`h-6 w-6 min-w-6 min-h-6 mr-4 ${s}`,image:{...e?.icon,iconVersion:o??c},width:"24",height:"24"}),p("div",{className:"border-0",children:[u("div",{className:r,children:e?.title}),u("div",{className:i,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const un=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:i=0,...s}=e,o=st(e,{normalize:(e=a)=>l&&n?String(ot(Number(pn(e)),l,n)):pn(e),format:ct(i)}),c=r((e=>t&&t(pn(e))),[t]);return u(xe,{onChange:c,...s,...o})})),pn=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),xn=x((e=>u(un,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(he,{size:"text-xl",font:"font-light",children:"₽"})})}))),gn="amount",bn={[gn]:1500},fn=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,...r})=>{const[{amount:i},{field:s}]=R(bn),o=i<=0,c=o?ie({version:a?.version}):se({className:"text-white",version:a?.version}),d=q();return p(C,{className:w("p-default flex flex-col items-center",e),...r,children:[t?u(T,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,p("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[u(xn,{name:gn,valid:!o,placeholder:n,label:l,...s(gn,{parse:Number,format:String})}),a?.text?u("button",{type:"submit",className:w("w-full p-4 mt-6",c),disabled:o,...d(a),children:a.text}):null]})]})})),vn=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),yn=[];function Nn(e,t,{className:l,...n}={}){const{key:a,blockDecorator:r=vn,blocksRegistry:i={},ancestors:s=yn}=t,{type:o}=e;o&&o in i||console.warn(`No block with "${o}" is registered`);const c=o&&i[o];return r({blockClassName:w("scroll-mt-12",l,e.style||"col-span-12"),block:e,ancestors:s,render:({block:l,blockClassName:r})=>{const{content:i}=l;return c?u(c,{className:r,block:e,options:t,...i,...n},a):null}},a)}const wn=[],kn=(e,{key:t,ancestors:l=wn,slotName:n=null,renderProps:a=Nn,...r})=>(e||[]).map(((e,i)=>a(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...l||wn,[r.parent,n]]:l})));function Cn({children:e,block:t,options:l,renderProps:n}){return e||(t&&l?kn(t.blocks,{...l,parent:t,renderProps:n}):null)}const Sn=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),In=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:i,onIntersection:s})=>{const o=v(r((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:i})})),Tn=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],Bn=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:i=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),b=r(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p($n(l))}),[h,p]),f=n>0?a*Number(n)-1:0,v="vertical-list"===o,y="horizontal-list"===o,N={...y?Rn(i,f):{},...v?Sn(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(k=(e,t)=>u(In,{className:w(c,n?Tn[n-1]:"",v?"h-full":""),style:y?Rn(i/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:b,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),Rn=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),$n=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Mn={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},_n={"horizontal-list":"w-6","vertical-list":"h-6"},jn=x((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-2",Mn[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?_n[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),Vn=e=>t=>e.scrollWidth/t,zn=e=>(t,l)=>{e.scrollBy({left:l*Vn(e)(t),behavior:"smooth"})},Dn=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const a=s(null),[i,o]=n([]),c=r((e=>{o((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})),l&&l(e)}),[e]),[d,m]=i.length?[Ol()(i),Pl()(i)]:[-1,-1],h=d>0,u=m<e-1,p=r((()=>{var l;a.current&&(t&&!h?(l=a.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):zn(a.current)(e,-1))}),[t,e,h]),x=r((()=>{a.current&&(t&&!u?a.current.scrollTo({left:0,behavior:"smooth"}):zn(a.current)(e,1))}),[e,t,u]);return[a,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},Pn="absolute top-[calc(50%-24px)] z-40",Ln="absolute top-0 bottom-0 z-40 w-[84px] pointer-events-none",An=x((({scroll:e,arrowsPadded:t,isBlur:l,onScrollLeft:n,onScrollRight:a,hasEdgeBlocks:i,activeIndex:s,itemCount:o})=>{const{canScrollLeft:c,canScrollRight:d,scrollLeft:m,scrollRight:h}=e,x=i?s>0:c,g=i?s<o-1:d,b=r((()=>{i?(c&&s!==o-1&&m(),n()):m()}),[m,n,i,c,s,o]),f=r((()=>{i?(d&&0!==s&&h(),a()):h()}),[h,a,i,c,s,o]);return p("div",{children:[On(l,e),x?u(xl,{className:w(Pn,t?"left-8":"left-0"),onClick:b}):null,g?u(gl,{className:w(Pn,t?"right-8":"right-0"),onClick:f}):null]})})),On=(e,t)=>e?p("div",{children:[t.canScrollLeft?u("div",{className:w(Ln,"left-0 bg-opacity-from-white")}):null,t.canScrollRight?u("div",{className:w(Ln,"right-0 bg-opacity-to-white")}):null]}):null,En=x((({className:e="",itemCount:t,visibleItemCount:l,isBlur:a=!0,isCyclic:i=!1,arrowsPadded:s=!0,isPadding:o=!0,showDots:c=!1,isAlignCenter:d=!1,...m})=>{const{blocks:h=[]}=m.block||{},x=t||h?.length,[g,b]=n(Math.floor((l||0)/2)),f=r((()=>b((e=>e+1))),[]),v=r((()=>b((e=>e-1))),[]),[y,N]=Dn({itemCount:x,isCyclic:i}),[k]=N.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(C,{className:w(Fn(o),"group-data-secondary:bg-primary-main group-data-secondary:text-white",e),...m,children:p("div",{className:w(Un(d),"relative max-w-full"),children:[u(Bn,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:N.handleVisibleIndicesChange,children:Cn({...m,renderProps:S?(e,t)=>Nn(e,t,{blocksLength:h?.length,activeIndex:g}):Nn})}),u(An,{scroll:N,isBlur:a,arrowsPadded:s,onScrollLeft:v,onScrollRight:f,hasEdgeBlocks:S,activeIndex:g,itemCount:x}),c?Hn(y,k,x):null]})})}));En.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"];const Fn=e=>e?"p-default":"",Un=e=>e?"flex justify-center":"",Hn=(e,t,l)=>u(jn,{containerRef:e,activeIndex:t,dotCount:l,listType:"horizontal-list"}),Xn=x((({title:e,description:t,blocksLength:l=0,activeIndex:n,options:a})=>{const r=Number(a?.key?.split("-").slice(-1)[0])||0;return u(C,{className:"flex h-[485px]",children:u("div",r===n?{className:"relative flex items-center w-full",children:u(el,{headlineVersion:"M",title:e,description:t,align:"text-left",className:w("absolute z-10 h-[385px] w-[440px] p-8 text-white shadow-dark-blue",Gn(r,l),Wn(r))})}:{className:"flex w-full items-center justify-center",children:u("div",{className:w("flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]",Wn(r)),children:u("span",{className:Kn(r),children:e})})})})})),Wn=e=>{switch(e%3){case 0:default:return"bg-primary-main";case 1:return"bg-green-light";case 2:return"bg-yellow-light"}},Kn=e=>{switch(e%3){case 1:case 2:return"gradient-color-text-on-yellow";default:return"gradient-color-text-on-green"}},Gn=(e,t)=>0===e?"left-9":e===t-1?"right-9":"-left-[25px]",Jn="absolute border border-solid border-gray w-full h-full",Yn={normal:"min-w-[970px]",small:"min-w-[355px]"},qn=x((({className:e="",button:t,description:l,title:n,carouselVersion:a="normal",version:r=""})=>u("section",{className:`flex pb-9 pl-12 border-box h-full ${Yn[a]} ${e}`,children:p("div",{className:"relative w-full",children:[u("div",{className:`${Jn} z-10 top-9 right-12 bg-green-dark`}),u("div",{className:`${Jn} z-10 top-6 right-8 bg-green`}),u("div",{className:`${Jn} z-10 top-3 right-4 bg-green-light`}),p("div",{className:"relative h-full bg-white z-10 p-10 border border-solid border-green-light",children:[u(el,{className:"!p-0",title:n,description:l,headlineVersion:"L",align:"text-left",version:r}),Jt([t],{className:"mt-14"})]})]})}))),Zn={black:"bg-black",white:"bg-white"},Qn=x((({className:e="",title:t,description:l,image:n,price:a,button:r,colors:i,...s})=>p(C,{className:`border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${e}`,...s,children:[n?.src?u($t,{className:"mb-5 flex justify-center",image:n}):null,t?u(T,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?u("div",{className:"mb-4",children:u(me,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,i?.length?p("div",{className:"flex mb-4 text-secondary-text",children:[u("div",{className:"mr-1.5",children:u(he,{size:"text-s",align:"text-left",font:"font-light",children:"Доступные цвета:"})}),i.map(ea)]}):null,a?p(he,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,Jt([r],{buttonClassName:"mt-5 w-full"})]}))),ea=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Zn[e]}`},String(t)),ta=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const r=q({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?r:{},children:a})})),la=x((({className:e="",icon:t,title:l,description:n,href:a,target:r,...i})=>u(C,{className:w("w-[365px]",e),...i,children:p(ta,{className:"flex flex-col",href:a,target:r,children:[t?.icon?u($t,{image:t}):null,t?.src?u($t,{image:t}):null,l?u(T,{headingType:"h6",as:"h4",className:"text-left pt-3 mb-2",title:l}):null,n?u("div",{className:"mb-4",children:u(he,{font:"font-light",size:"text-m",color:"text-secondary-text",children:n})}):null]})}))),na=x((({className:e,title:t="",insetTitle:l="",buttons:n,leftImage:a,rightImage:r,backImage:i,children:s})=>p("div",{className:w("relative flex flex-col font-sans",e),children:[i?u("div",{className:"absolute bottom-0 right-0 z-0",children:i}):null,t,p("div",{className:"grow relative flex flex-wrap md:flex-nowrap justify-between items-stretch gap-8",children:[a,p("div",{className:w("flex flex-col gap-8",a?"":"grow"),children:[l,u("div",{className:"grow",children:s}),n]}),r?u("div",{className:"-order-1 lg:order-1",children:r}):null]})]}))),aa={1:"flex-col",2:"gap-x-10 flex-wrap"},ra=x((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:n=1,description:a,image:r,title:i,...s})=>u(C,{className:w("box-border text-left p-9 w-[697px]","border border-solid border-gray group-data-secondary:border-white/50",l),...s,children:p(na,{title:i?u(T,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:i}):null,backImage:r?.src?u($t,{className:"m-0",image:r}):null,children:[p("div",{className:"flex justify-between mb-4",children:[a?u("div",{className:"w-1/3",children:u(he,{size:"text-h6",children:a})}):null,e?u(he,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e}):null]}),t.length?u("ul",{className:w("list-none m-0 p-0 flex gap-y-2",aa[n]),children:ia(t,n)}):null]})}))),ia=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return p("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?u("div",{className:"pr-2.5",children:u(he,{size:(n=t,1===n?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var n})),sa="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",oa=x((({text:e,href:t="",target:l="",className:n=""})=>{const a=q()({href:t,target:l});return e?p("div",{className:`relative group/link cursor-pointer w-[328px] h-[82px] ${n}`,children:[p("a",{className:"absolute border border-primary-main ml-3 px-6 py-5\n text-l-light bg-white text-primary-text flex w-[316px]\n justify-between items-center group-hover/link:text-primary-main z-10",role:"link",...a,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6",children:u($t,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24"})})]}),u("div",{className:`${sa} mx-1.5 mt-1.5`}),u("div",{className:`${sa} mt-3 mr-3`})]}):null})),ca=x((({className:e="",additionalDescription:t,description:l,links:n,title:a,...r})=>p(C,{className:`flex w-full p-10 overflow-hidden justify-between ${e}`,...r,children:[p("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[u(el,{isPadding:!1,title:a,description:l,as:"h1",align:"text-left"}),t?u(el,{className:"pt-6",isPadding:!1,description:t,align:"text-left"}):null]}),n?.length?da(n):null]}))),da=e=>{const t=Math.ceil(e.length/10);return u(En,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,arrowsPadded:!1,showDots:!0,children:new Array(t).fill(null).map(((t,l)=>u("div",{className:"w-[672px] min-w-[672px] ml-10 mr-10 flex flex-wrap self-start",children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(oa,{className:"m-1",...e},String(t))))},String(l))))})},ma={L:"w-1.5 h-1.5 mr-4",M:"w-1.5 h-1.5 mr-3",S:"w-1 h-1 mr-2"},ha=x((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",ma[n])})}):null,u("span",{children:l})]}))),ua={S:"text-l-light",M:"text-h6",L:"text-h5"},pa={S:"ml-2",M:"ml-3",L:"ml-4"},xa=x((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-2 text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",ua[a],t?pa[a]:"",e),role:"list",children:n.map(((e,t)=>u(ha,{isDotted:l,size:a,children:e},String(t))))}):null)),ga=x((({additionalDescription:e,align:t="text-center",button:l={},className:n="",description:a,headlineSmallVersion:r="H6",href:i,icon:s,isDotted:o=!0,isFullWidth:c=!0,items:d=[],target:m,title:h,version:u="primary",...x})=>p(C,{className:w("h-full flex flex-col justify-between min-w-[260px]","box-border border-solid border border-gray",t,n),version:u,...x,children:[p(ta,{className:"p-6",href:i,target:m,children:[ba(s),fa(r,h),va(a,h),Na(d,o,u),ya(e)]}),Jt([l],{className:w("p-6 pt-0",c?"":"self-center min-w-[158px]"),isVertical:c})]}))),ba=e=>p("div",{className:"flex justify-center",children:[e?.src?u($t,{className:"mb-5",image:e}):null,e?.icon?u($t,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:e}):null]}),fa=(e,t)=>t?u("div",{children:u(he,{size:Qt[e],children:t})}):null,va=(e,t)=>e?u("div",{className:t?"mt-2":"",children:u(me,{size:"text-l",children:e})}):null,ya=e=>e?u("div",{className:"mt-auto",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e})}):null,Na=(e,t,l="primary")=>e?.length?u(xa,{className:w("max-w-[308px] mt-2 text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}):null,wa=x((({className:e="",title:t,icon:l,list:n=[],href:a,target:r,...i})=>u(C,{className:w("border border-gray",e),...i,children:p(ta,{className:"flex",href:a,target:r,children:[p("div",{className:"w-[200px] min-w-[200px] self-center",children:[l?.icon?u($t,{image:l}):null,l?.src?u($t,{image:l}):null]}),p("div",{className:"p-8 pl-3 w-full",children:[t?u(T,{className:"mb-3.5",headingType:"h5",title:t}):null,n.length?u("div",{className:"flex flex-col gap-3",children:n?.map(ka)}):null]})]})}))),ka=(e,t)=>p("div",{className:"break-words",children:[e.title?u("div",{className:"text-h6",children:e.title}):null,e.description?u("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Ca={default:"w-14 h-14",small:"w-12 h-12"},Sa=(e,t)=>e?"":w("group/media flex items-center justify-center box-border",Ca[t]),Ia=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Ta=x((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:r,text:i=""}=n,{iconMapped:s,label:o}=Ia.find((({origins:e})=>e.some((e=>a?.includes(e)))))||{},c=Ba(l)??s;return u(oe,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Sa(i,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:i,version:r,...n,children:c&&!i?u($t,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),Ba=e=>e?.src||e?.icon?e:void 0,Ra=x((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"font-sans",children:[u("div",{className:`flex gap-1 ${e}`,children:t?.map(((e,t)=>u(Ta,{buttonSize:n,...e},String(t))))}),u(he,{size:"text-s-light",color:"text-secondary-text",children:l})]}))),$a=x((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:r=[],target:i,title:s,align:o="text-left",version:c="primary",...d})=>u(C,{className:w("relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50","border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider",e),version:c,...d,children:p(ta,{href:l,target:i,children:[u(el,{className:"mb-4",title:s,description:t,headlineVersion:"S",isPadding:!1,align:o}),p("div",{className:"w-1/2 h-full flex flex-col flex-1 justify-end",children:[a.length?u(xa,{items:a,listItemSize:"S"}):null,r.length?u(Ra,{className:"pt-10",media:r}):null]}),Ma(n)]})}))),Ma=e=>p("div",{className:"absolute bottom-0 right-0",children:[e?.icon?u($t,{image:e}):null,e?.src?u($t,{image:e}):null]}),_a=x((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),ja=x((({className:e="",__html:t,richVersion:l="striped",...n})=>u(C,{className:w("p-9 border border-gray h-full min-w-96",e),...n,children:u(_a,{__html:t,richVersion:l})}))),Va=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:i})=>{const[s,o]=n(l),c=r((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=i?i({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),za=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Da=(e=!1)=>e?"p-8 mt-8 pt-20":"p-8 mt-20",Pa=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-5 border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(he,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-1",children:u(he,{size:"text-h6",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Jt(a)}):null]},String(t))},La=x((({className:e="",title:t,icon:l,isHighlighting:n=!1,button:a,cardCells:r=[],...i})=>{const s=r.map(Pa),o=s.slice(0,1),c=s.slice(1);return p(C,{className:w("relative border border-gray flex flex-col",Da(n),e),...i,children:[n?Ea():null,Aa(l),t?u(T,{className:"text-center pt-2",headingType:"h5",title:t}):null,a?u(oe,{className:"w-full mt-4",...a}):null,r.length?u(Va,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(za,{isUnfolded:e,children:c})]}),renderFoldButton:r.length>1?Oa:null}):null]})})),Aa=e=>u("div",{className:"w-[267px] min-w-[267px] self-center",children:e?.src||e?.icon?u($t,{image:e}):null}),Oa=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(De,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Ea=()=>p("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u(De,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22"}),u(me,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),Fa="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Ua="border-gray border-solid border",Ha="border-main-divider border border-t-0 border-x-0",Xa="w-[200px] mr-6",Wa=x((({icon:e,image:t,title:l,link:n})=>p("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Ua} ${Fa}`,role:"columnheader",children:[e&&!t?.src&&u($t,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}),t?.src&&u($t,{className:"mb-[18px]",image:t}),l?u(T,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&u("div",{className:"mt-auto w-full",children:u(oe,{href:n.href,target:n.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs-light font-medium py-[11px]",children:n.text})})})]}))),Ka={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},Ga=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:Ka[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Ja=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex",children:e})}))),Ya=x((({colHeaders:e,activeIndex:t})=>p(Ja,{children:[u("div",{className:Xa,role:"columnheader"}),u(Ga,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(Wa,{...e},String(t))))})]}))),qa=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>u("div",{className:`w-80 box-border flex flex-col ${Ua} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${n?Fa:""}`,role:"cell",children:u("div",{className:`mx-7 h-full ${Ha} ${n&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>er(e,t,n)))})}))),Za=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Qa=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),er=({label:e,description:t},l,n)=>p("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?u("h4",{className:Za(n),children:e}):null,t?u("div",{className:Qa(n),children:t}):null]},String(l)),tr=(e=!1)=>`text-s py-7 ${Ha} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,lr=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:r})=>p(Ja,{children:[e?.title?u("div",{className:tr(r),children:e.title}):null,t?.length?u(Ga,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(qa,{cell:e,isFirstRow:a,isLastRow:r,isFillGradient:n&&0===t},String(t))))}):null]}))),nr=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return p("div",{className:"relative",children:[e.map(((e,n,{length:a})=>u(lr,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?bl({...n,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),ar=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const r=e?.map((({header:e})=>e||{})),i=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:i.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=ul({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[r?.length?u(Ya,{colHeaders:r,activeIndex:o}):null,s?.length?u(nr,{rowData:s,isColoredFirstColumn:a,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),rr=x((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!i),m=r((()=>d((e=>!e))),[]);return p(C,{className:`py-12 pl-12 overflow-hidden relative ${e}`,...o,children:[u(T,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),u(ar,{columns:a,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?ir({isShowAllRow:c,onClick:m}):null]})})),ir=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-12",children:p("div",{className:"flex w-full",children:[u("div",{className:Xa}),u("button",{onClick:t,className:"mt-5 flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),sr=x((({className:e="",contacts:t,info:l,version:n="secondary",...a})=>p(C,{className:`flex p-default ${e}`,version:n,...a,children:[l?.length?or(l):null,t?.length?or(t):null]}))),or=e=>u("div",{className:"flex grow basis-0",children:e.map(((e,t)=>cr({column:e,index:t})))}),cr=({column:e,index:t})=>e?u("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>p("div",{className:"mt-6 first:mt-0",children:[u(el,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left"}),l?u("div",{className:"mt-1.5 opacity-80",children:u(me,{size:"text-m",font:"font-light",children:l})}):null,n?u(oe,{className:"mt-6",...n}):null]},String(a))))},`col-${String(t)}`):null,dr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,mr=(e,t)=>Object.entries(e).map((([t,l])=>"number"==typeof l?((e,t)=>l=>dr(t[e])||dr(l[e])||hr(t[e])<=hr(l[e]))(t,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>l=>dr(t[e])||dr(l[e])||hr(t[e]?.min)>=hr(l[e]?.min)&&hr(t[e]?.min)<=hr(l[e]?.max))(t,e):Array.isArray(l)?((e,t)=>l=>dr(t[e])||dr(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(t,e):((e,t)=>l=>dr(t[e])||dr(l[e])||t[e]===l[e])(t,e))).every((e=>e(t))),hr=e=>Number(e||0),ur=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:r})=>p("button",{className:w("flex justify-center w-full px-0 py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:r,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-3",children:t}),l?u($t,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),pr=({isUnfolded:e,onToggle:t})=>u(ur,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),xr=["ArrowDownIcon","ArrowUpIcon"],gr="grid grid-cols-12 gap-1 border-box",br=x((({label:e="",filtrationState:t={},topItemsCount:l=0,block:n,notFound:a,...r})=>{const i=n?.blocks?.filter((e=>mr(t,e.content||{})))||[],[s,o]=l>0?[i.slice(0,l),i.slice(l)]:[i,[]];return p("div",{children:[u("div",{className:w(i.length?"hidden":"block"),children:a?fr(a):null}),p("div",{className:w(i.length?"":"hidden"),children:[u("div",{className:w("mb-1",gr),children:kn(s,{...r.options,parent:n})}),u(Va,{renderFoldableSection:({isUnfolded:e})=>u(za,{className:w(gr,e?"mb-1":""),isUnfolded:e,children:kn(o,{...r.options,parent:n})}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(ur,{className:w(l<1?"hidden":""),disabled:!o?.length,label:e,icon:xr[Number(t)],dataTheme:r.options?.page?.colorPalette,onClick:n})})]})]})}));function fr({title:e,description:t}){return p("div",{className:"bg-white py-20",children:[e?u("div",{className:"mb-2",children:u(me,{align:"text-center",children:u(he,{size:"text-h4",children:e})})}):null,t?u(me,{size:"text-xl",font:"font-light",align:"text-center",children:t}):null]})}const vr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Xe,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),yr=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex justify-between bg-white p-9 mb-1",children:[p("div",{className:"flex gap-11",children:[a,Object.entries(l).map(Nr(e))]}),n?u("div",{children:u(oe,{className:"w-72 ml-3",onClick:t,...n})}):null]}),Nr=e=>([t,l])=>{const n=l?.type;return"array"===n?wr(t,e)(l):null},wr=(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-4",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(vr,{items:n,multiple:!0,...t(e)})]},e)},kr={sum:500,period:{min:3,max:36}},Cr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...r})=>{const[i,{field:s,reset:o}]=R(kr),c=a?.max||36,d=p("div",{children:[u(xn,{label:n?.title,min:500,max:1e9,...s("sum",{parse:Number,format:String})}),u(pt,{title:a?.title,items:["От 3 мес","До 3 лет"],min:a?.min||3,max:c,...s("period",{parse:e=>({min:e,max:c}),format:({min:e})=>e})})]});return p(C,{className:w(e),version:"transparent",...r,children:[yr({field:s,reset:o,filtrationSchema:t,resetButton:l,children:d}),u(br,{filtrationState:i,...r})]})}));Cr.childrenTypes=["ProductTile"],Cr.childSchema=e=>e?.filtrationSchema||{};const Sr=e=>"Image"===e?.errorContentType&&e?.image?u($t,{image:e.image}):"Code"===e?.errorContentType&&e.code?u("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,Ir=x((({className:e="",title:t,subtitle:l,error:n,button:a,...r})=>{return p(C,{className:w("flex flex-col justify-center items-center",(i=a?.text,i?"py-20 pt-3 pb-1":"mb-16 pb-2 mt-24 pt-3"),e),version:"transparent",...r,children:[u("div",{className:"flex justify-center py-20",children:Sr(n)}),t?u(T,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?u("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,a?.text?u(oe,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]});var i}));var Tr;!function(e){e.EUR="EUR",e.USD="USD",e.GBP="GBP",e.AUD="AUD",e.CNY="CNY",e.RUB="RUB"}(Tr||(Tr={}));const Br={USD:"DollarIcon",EUR:"EuroIcon",GBP:"DollarIcon",AUD:"DollarIcon",CNY:"DollarIcon",RUB:"RoundRubleIcon"},Rr=e=>e?_r.format(e):"",$r=(e,t)=>p("td",{className:"pt-4 pl-11",children:[u("div",{children:Rr(e)}),u("div",{className:w("font-normal text-sm text-secondary-text",(t||0)>=0?"text-green":"text-red"),children:Rr(t)})]}),Mr=(e,t="")=>p("td",{className:"pt-4 pl-11",children:[u("div",{children:Rr(e)}),u("div",{className:"font-normal text-sm text-green",children:t})]}),_r=new Intl.NumberFormat("ru",{style:"currency",currency:Tr.RUB}),jr=e=>u("th",{className:"pl-11",children:u(he,{size:"text-m-light",align:"text-left",color:"text-secondary-text",children:e})}),Vr=x((({className:e="",currencies:t=[],actuality:l="",officeName:n="",...a})=>{const r=zr(t,4);return p(C,{className:w("font-sans text-primary-text py-10 bg-white",e),...a,children:[p("div",{className:"flex flex-row flex-grow-0 justify-between mx-10 mb-8",children:[u(T,{headingType:"h4",title:"Курс обмена валют в "+n,className:"whitespace-pre-wrap text-h4 mb-5"}),u("div",{className:"pl-11",children:u(he,{size:"text-m-light",align:"text-left",color:"text-secondary-text",children:l})})]}),u("div",{className:"flex flex-row ml-8 mr-14 pt-4 text-left",children:r.length>0?p("table",{className:w("h-fit w-fit",e),children:[u("thead",{children:p("tr",{children:[u("th",{children:u(he,{size:"text-m-light",align:"text-left",color:"text-secondary-text",children:"Валюта"})}),jr("Купить"),jr("Продать"),jr("Лучшая покупка"),jr("Лучшая продажа")]})}),u("tbody",{children:r.map((e=>(({title:e,buyPrice:t,buyDifference:l,sellPrice:n,sellDifference:a,buyOfficeName:r,sellOfficeName:i})=>p("tr",{className:"pb-1 text-h6",children:[u("td",{className:"pt-4",children:p("div",{className:"flex items-center",children:[e?u($t,{image:{icon:Br[e]},width:"24",height:"24"}):null,u("span",{className:"ml-2",children:e})]})}),$r(t,l),$r(n,a),Mr(t,r),Mr(n,i)]},e))(e)))})]}):null})]})})),zr=(e,t)=>e.sort(((e,t)=>Number(e.id)-Number(t.id))).slice(0,t);var Dr;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Dr||(Dr={}));const Pr=new Intl.NumberFormat("ru",{style:"currency",currency:Dr.RUB}),Lr=e=>e?Pr.format(e):"",Ar="text-left text-m-light text-secondary-text",Or=`${Ar} pl-11`,Er={USD:"DollarIcon",EUR:"EuroIcon"},Fr=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ar,children:"Валюта"}),u("th",{className:Or,children:"Купить"}),u("th",{className:Or,children:"Продать"})]})}),u("tbody",{children:t.map(Ur)})]}))),Ur=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-1 text-h6",children:[u("td",{className:"pt-4",children:p("div",{className:"flex items-center",children:[t?u($t,{image:{icon:Er[t]},width:"24",height:"24"}):null,u("span",{className:"ml-2",children:t})]})}),u("td",{className:"pt-4 pl-11",children:Lr(e?.saleExchangeRate)}),u("td",{className:"pt-4 pl-11",children:Lr(e?.buyExchangeRate)})]},t)},Hr=x((({className:e="",address:t})=>p("div",{className:`flex ${e}`,children:[u($t,{image:{icon:"GpsIcon"},width:"24",height:"24"}),p("div",{className:"ml-3",children:[t?u("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,u("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Xr=(e,t,l)=>{const n=Number(Wr(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)},Wr=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Kr=e=>{return(t=[[e=>e.value!==Dr.RUB&&e.oppositeValue!==Dr.RUB,()=>e.handleConvert(e.value,Dr.RUB)],[e=>e.value===Dr.RUB&&e.oppositeValue===Dr.RUB,()=>e.handleConvert(e.value,Dr.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Gr(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:r,setSelected:i}=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(xe,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:a,onChange:r}),s.length?u(Ae,{isBorder:!1,onChange:e=>i(e.key),options:s,value:o}):null]})}const Jr=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[i,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Dr.RUB,selectBuy:l?.[0]?.currency?.currency||Dr.USD}),o=r((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Gr({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:Yr(i,o,l),value:i.inputSell,setValue:e=>Zr(o,l)(e,i.selectSell,i.selectBuy)}),Gr({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:qr(i,o,t),value:i.inputBuy,setValue:e=>Qr(o,t)(e,i.selectBuy,i.selectSell)}),a?.text?u(oe,{className:"py-4 mr-1",version:a?.version,...a,children:a.text}):null]})})),Yr=(e,t,l)=>n=>{t({selectSell:n}),Kr({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Zr(t,l)(e.inputSell,n,a)}})},qr=(e,t,l)=>n=>{t({selectBuy:n}),Kr({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Qr(t,l)(e.inputBuy,n,a)})},Zr=(e,t)=>(l,n,a)=>{e({inputSell:Wr(l),selectBuy:a});const r=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;r&&e({inputBuy:String(Xr(l,r,n===Dr.RUB)||"")})},Qr=(e,t)=>(l,n,a)=>{e({inputBuy:Wr(l),selectSell:a});const r=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;r&&e({inputSell:String(Xr(l,r,n===Dr.RUB)||"")})};const ei=async e=>{const t=await ti(),l=t?.code||"000";return{region:t,exchangeRates:await li(e,l)}},ti=async()=>{try{return await L("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},li=async(e,t)=>{try{return await L(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},ni=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=z("/api/v1/exchangerates",ei);return e||{}}(),r=ai(a?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Dr.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Dr.RUB}}),u(C,{className:`p-9 box-border min-h-80 ${e}`,...n,children:u(na,{title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:p("div",{className:"flex",children:[p("div",{className:"mr-14 pt-4",children:[r?u(Fr,{className:"mb-[30px]",exchangeCurrencyItems:r}):null,u(Hr,{address:a?.address})]}),r.length&&i.length&&s.length?u(Jr,{className:"grow",currencyRatesBuy:i,currencyRatesSell:s,button:l}):null]})})})})),ai=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],ri={};function ii(e,t={}){const{data:l}=z(`/wcms-resources/${e}.json`,L,{fallback:t});return l||ri}const si={"bg-white":"color",transparent:"white"},oi={"bg-white":"text-primary-main",transparent:"text-white"},ci=(e,t,l)=>u($t,t?.src?{image:t,className:oi[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:si[e]},className:oi[e],width:l?.width,height:l?.height}),di={"bg-white":"text-primary-text",transparent:"text-white"},mi=(e,t,l)=>u("span",{className:`${di[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),hi=x((({className:e="",href:t,logo:l,children:n=l?.title,targetBlank:a,bgColor:r="bg-white",showTitle:i=!0})=>p("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[ci(r,l?.image,{width:"40",height:"45"}),i?mi(n||l?.title,r):null]}))),ui=x((({className:e,onClick:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u($t,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function pi(e){throw new Error(e)}function xi({onOpen:e,onClose:t}={}){a((()=>f.subscribe("dialog",(l=>{switch(l.type){case"open":e&&e(l);break;case"close":t&&t();break;default:pi(l)}}))),[e,t])}function gi(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const bi=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=new Array(e.length),a=new Array(t.length);let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-l),o=Math.min(i+l,t.length-1);for(let l=s;l<=o;l++)n[i]||a[l]||e[i]!==t[l]||(r++,n[i]=!0,a[l]=!0)}return{m:r,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const r=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let r=0,i=0;r<e.length;r++){if(!l[r])continue;let s=i;for(;s<t.length;s++)if(n[s]){i=s+1;break}e[r]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),i=(l/e.length+l/t.length+(l-r/2)/l)/3,s=i>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return i+s*(1-i)};const fi=(e,t)=>(l,n)=>{for(const[a,r]of n)l.set(a,e(l.get(a)||t,r));return l},vi=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),yi=e=>t=>e.map((([e,l])=>[bi(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>wi(t,e))).reduce(fi(Math.max,0),new Map),Ni=e=>t=>{return gi(t,t.map((({title:e})=>e)).map((e=>t=>{const l=vi(t||"");return l.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e.map((e=>Ll(l.map(bi(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},wi=(e,t)=>new Map(e.map((e=>[e,t]))),ki=["/"],Ci=({basePathList:e=ki,initialQuery:t="",wasOpened:l})=>{const[r,s]=n(t||"");a((()=>{null!=t&&s(t)}),[t]);const o=i((()=>e.map((e=>l?e:null))),[l,e]),{data:c}=z(o,Si),[d,m]=n(null);return((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{c&&m(c.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=vi(e);if(!a.length)return[];const r=Object.entries(n),i=[...a.map(yi(r)).reduce(fi(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Ni(a)(i)})(r)))}),[c,r]),[d,{value:r,onChange:s}]},Si=async(...e)=>(await Promise.allSettled(e.map((e=>P(X(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Ii=x((({className:e,isOpened:t,head:l,children:n,onClose:r})=>(a((()=>{const e=({key:e})=>{"Escape"===e&&r&&r()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[r]),t?u("div",{className:w("fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar",e),role:"dialog",children:p("div",{className:"relative container pb-12 min-h-full",children:[p("div",{className:"sticky bg-white pt-6 top-0",children:[u(ui,{className:"absolute top-10 -right-12",onClick:r}),l]}),n]})}):null)));function Ti(e,t=!1){const[l,{setTrue:a,setFalse:i}]=je(t),[o,c]=n({id:e}),d=s(l);d.current||=l;xi({onOpen:r((t=>{t.id===e?(c(t),a()):i()}),[e]),onClose:i});const m=r((()=>{i(),f.fire("dialog",{type:"close"})}),[]);return{...o,isOpened:l,wasOpened:d.current,onClose:m}}const Bi=x((({className:e,topItems:t})=>{const l=q({isRemote:!0});return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(Ri)})})),Ri=(e,t)=>{const{text:l,items:n,href:a,target:r,onClick:i}=e;return p("div",{className:"flex flex-col gap-3.5 w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:r||"_self",onClick:i,children:l||`Раздел ${t}`}),n?.map(((e,t)=>u($i,{...e,basePath:o(a),index:t},String(t))))]},String(t))},$i=x((({text:e,index:t,basePath:l,...n})=>{const a=q({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:r,target:i,onClick:s}=a(n);return u("a",{className:w("text-l-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:r,target:i||"_self",onClick:s,children:e||`Раздел ${t}`})})),Mi=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a})=>{const i=r((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-4 pointer-events-none",children:u($t,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),u("input",{className:w("h-12 pl-12 w-full 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:"Поиск по сайту",autoFocus:l,onChange:i,onFocus:a})]})})),_i="search",ji=x((({topItems:e})=>{const t=Ti(_i),l=i((()=>e?.map((e=>e.href||"/"))),[e]),[n,r]=Ci({basePathList:l,initialQuery:t.message,wasOpened:t.wasOpened}),s=i((()=>Vi(e)(n)),[e,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(Ii,{...t,head:u(Mi,{className:"my-5",autoFocus:!0,...r}),children:u(Bi,{topItems:s})})})),Vi=e=>t=>e?.length&&t?.length?gi(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:X("/",t)})))}))):[];const zi=x((({className:e})=>{const[t,l]=n(""),a=r((()=>l("")),[]);xi({onClose:a});const{open:i}=E(_i),s=r((e=>{l(e),Di(e)&&i(e)}),[]);return p("div",{className:e,children:[u(Mi,{value:t,onChange:s}),u(ui,{className:"absolute top-2 right-3 sm:hidden",onClick:a})]})})),Di=e=>e&&e.length>=3,Pi=x((({className:e="",items:t,hasButton:l})=>p("div",{className:e,children:[t?.length?t.map(Li):null,l?u(oe,{version:"primary",className:"mb-6 w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),Li=(e,t)=>{const{type:l,text:n,description:a}=e;return p("div",{className:"mb-4",children:[u("div",{children:Ai(l,n)}),u("div",{className:"mt-1 text-s-light text-secondary-text",children:a})]},String(t))},Ai=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Oi(t)}`,children:t});case"email":return u("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Oi=e=>e.replaceAll(/\D/g,""),Ei=x((({className:e="",index:t,text:l,...n})=>{const a=q(),{href:r,target:i,onClick:s}=a(n);return u("a",{className:w("text-secondary-text",e),href:r,target:i,onClick:s,children:l||`Документ ${t}`})})),Fi=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(Ei,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),Ui=x((({className:e="",index:t,...l})=>{const n=q({isRemote:!0}),{href:a,target:r,text:i,onClick:s}=n(l);return u("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:r,onClick:s,children:i||`Документ ${t}`})})),Hi=x((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-4 xl:pt-5",children:u(he,{size:"text-xs-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex justify-start items-start gap-5 pt-4",children:t.map(((e,t)=>u(Ui,{index:t,...e},String(t))))}):null]}))),Xi="w-[204px]",Wi=x((({className:e="",...t})=>{const l=t.options?.page?.fallback,n=ii(d.SITEMAP||"sitemap",l),{documents:a,relatedEnterprises:r,contacts:i,socialMedia:s,mobileApps:o,logo:c}=ii(d.FOOTER||"footer",l);return p(C,{tag:"footer",className:`p-9 ${e}`,...t,children:[p("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[u(hi,{className:Xi,logo:c}),u(zi,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[p("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[u(Pi,{items:i,hasButton:!0}),u(Ra,{media:s,children:"Соцсети"}),u(Ra,{className:"mt-6",media:o,children:"Мобильное приложение"})]}),u(Bi,{className:"flex-grow",topItems:n?.topItems})]}),u(Fi,{className:"mt-[98px]",links:r}),u(Hi,{links:a})]})})),Ki=x((({className:e="",title:t,description:l,calendar:n,...a})=>p(C,{className:`p-default ${e}`,...a,children:[u(el,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M"}),n?Gi(n):null]}))),Gi=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return p("div",{className:"w-full flex flex-col justify-center mt-13",children:[u("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Ji(e,t)))}),u("div",{className:"flex w-full",children:l.map(((e,t)=>p("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex",children:Yi(e)}),p("div",{className:"text-s-light text-primary-text mt-3",children:[u("span",{children:e.text})," ",u("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Ji=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Yi=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:u($t,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),qi=864e5;function Zi(e,t,l=globalThis?.localStorage){const n=r((async(...n)=>{const a=`async:${e}`,r=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<qi?t:void 0}(l.getItem(a));if(r)return r;const i=await t(...n);return l.setItem(a,JSON.stringify({data:i,timestamp:Date.now()})),i}),[e,t]);return z(e,n)}const Qi=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},es=e=>({href:t})=>H(F(t)?e.href:e.pathname).startsWith(H(t));const ts=x((({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-4 max-w-[170px] gap-3.5 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-4 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"})]}))),ls="location",ns=x((({currentLocation:e,onChangeLocation:t,foreignOffices:l})=>{const a=Ti(ls),[i,s]=n(""),o=rs(function(){const{data:e}=z("/api/v1/regions",L);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,as),d=r((e=>{a.onClose&&a.onClose(),t&&t(e)}),[a.onClose,t]);return p(Ii,{...a,head:p("div",{children:[u(is,{currentLocation:e,onChangeLocation:d}),u(ts,{onSearch:s,searchTerm:i,className:"mb-7"})]}),children:[i&&i.length>=3?u("div",{children:o.filter((({name:e})=>e&&bi(e.toLowerCase())(i.toLowerCase())>=.8)).map(os(d))}):u("div",{className:"columns-5",children:Array.from(c.entries()).map(ss(d))}),u(cs,{foreignOffices:l})]})})),as=e=>e.name?.charAt(0)||"",rs=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),is=x((({currentLocation:e,onChangeLocation:t})=>e?p("div",{className:"mb-4",children:[u(he,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{className:"cursor-pointer",onClick:()=>{t&&t(e)},children:u(he,{color:"text-primary-main",children:e.name})})]}):null)),ss=e=>([t,l])=>p("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[u("div",{className:"mb-2.5",children:u(he,{size:"text-h6",children:t})}),l.map(os(e))]},t),os=e=>t=>u("div",{className:"mb-1",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:t.name||""})},t.id),cs=x((({foreignOffices:e})=>e?.length?p("div",{className:"border-t border-main-divider mt-7 pt-7",children:[u("div",{className:"mb-4",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex gap-10",children:e.map(((e,t)=>u(ds,{...e},String(t))))})]}):null)),ds=x((({icon:e,...t})=>{const l=q(),{text:n,target:a,href:r,onClick:i}=l(t);return p("div",{className:"flex gap-x-3",children:[e?u($t,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:r,target:a,onClick:i,children:n}):null]})})),ms=x((({className:e="",active:t,flat:l,children:n,...a})=>{const r=q({isRemote:!0}),{href:i,target:s,text:o,onClick:c}=r(a);return u("a",{className:w(hs(t,l),e),href:i,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:us(t,l),children:o||n})})})),hs=(e=!1,t=!1)=>w("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-4 py-2"),us=(e=!1,t=!1)=>w("font-sans text-s-light",e?"text-primary-main":w(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),ps={default:"w-6 h-6",large:"w-12 h-12"},xs=x((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:r,image:i,onClick:s})=>u("button",{className:w("group/btn border-0 flex shrink-0 items-center",n?"p-3 rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${ps[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":r,onClick:s,children:u($t,{image:i,className:w("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),gs=x((({className:e,version:t,locationName:l,officesLink:n})=>{const a="transparent"===t?"white":"black",{open:i}=E(ls),s=r((()=>i()),[]),{open:o}=E(_i),c=r((()=>o()),[]);return p("div",{className:w("flex items-center gap-5",e),children:[u(ms,{flat:!0,href:"#",text:l,onClick:s}),n?u(ms,{flat:!0,href:n,text:"Офисы и банкоматы"}):null,u(xs,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:"Поиск",onClick:c})]})})),bs=x((({className:e="",items:t,activeItem:l})=>{const a=q(),[i,s]=n(!1),o=r((()=>s((e=>!e))),[]),c=Ve(r((()=>s(!1)),[]));return p("div",{className:w(i?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(i?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-1 bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:w("absolute flex flex-col rounded-md bg-white p-6 pb-2",i?"":"hidden"),"aria-hidden":!i,children:t?.map(((e,t)=>{const{text:n,...r}=e;return u("a",{className:w("text-l-light pb-4 hover:text-primary-main",e===l?"text-primary-main":""),...a(r),children:n},e.href||String(t))}))})]})})),fs=x((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const r=q(),{href:i,target:s,text:o,onClick:c}=r(a);return p("a",{className:w("relative inline-block bg-transparent text-center no-underline",e),href:i,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:vs(t),children:o||n}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),vs=(e=!1)=>w("font-sans text-l-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),ys=x((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const i=v(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:i,className:n,children:u(fs,{...a,children:l})})})),Ns=e=>globalThis[e];function ws(e,t){const[l,i]=n(),s=r((()=>i(Ns(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),i(void 0)}}if(!Ns(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const ks={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Cs=x((e=>{const[t,{setTrue:l}]=je();return t?u(Ss,{...e}):Is({...e,onClick:l})})),Ss=x((({chat:e="personal",...t})=>((e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),ws("chatbot",ks[e])})(e),Is(t)))),Is=({className:e,iconVersion:t,onClick:l})=>u(xs,{className:w("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),Ts={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Bs=x((({version:e,internetBankUrl:t})=>t?u(oe,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:w("py-3 ml-3 text-l font-light whitespace-nowrap hover:text-primary-main",Ts["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),Rs=x((({subItems:e=[],version:t,internetBankUrl:l})=>{const a="transparent"===t?"white":"black",r=(e=>(t=[])=>{const l=t?.filter(es(e));return l?.length?Pl((e=>e.href?.length||0))(l):void 0})(Y())(e),[o,c]=n(e.length),m=e.slice(o),h=s(null),x={rootRef:h},g=i((()=>e.map(((e,t)=>e=>{c(e?$s(t):Ms(t))}))),[e]);return p("nav",{className:"relative mt-3 flex items-center justify-between",children:[u("div",{ref:h,className:"overflow-hidden whitespace-nowrap pb-3 mt-2",children:e.map(((e,t)=>u(ys,{className:w("ml-8 first:ml-0",o-1<t?"invisible":""),active:e===r,observerOptions:x,onVisibilityChange:g[t],...e},String(t))))}),m.length?u(bs,{className:"relative w-auto z-40",items:m,activeItem:r}):null,d.CHAT_BOT?u(Cs,{className:"ml-9",iconVersion:a,chat:d.CHAT_BOT}):null,u(Bs,{version:t,internetBankUrl:l})]})})),$s=e=>t=>Math.max(t,e+1),Ms=e=>t=>Math.min(t,e),_s={"bg-white":"primary",transparent:"transparent"},js=x((({bgColor:e="bg-white",className:t,showSubMenu:l=!0,version:i=_s[e],...s})=>{const o=Y(),{topItems:c,logo:m,defaultLocation:h,foreignOffices:x,officesLink:g,internetBankUrl:b}=ii(d.SITEMAP||"sitemap",s.options?.page?.fallback),f=c?.find((e=>es(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(o)),[v,y]=function(e="Москва"){const t=Qi(),[l,i]=n(t?.region??{name:e}),{data:s}=Zi("/api/v1/region",L);return a((()=>{i(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[l,r((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),i(e)}),[])]}(h);return p(C,{tag:"header",className:w("pt-6 px-20",l&&f?.items?.length?"pb-4":"pb-5",t),version:i,...s,children:[p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(hi,{className:"mr-8",bgColor:e,logo:m}),c?.map(((e,t)=>u(ms,{active:e===f,...e},String(t)))),u(gs,{version:i,className:"ml-auto",locationName:v.name,officesLink:g})]}),u("div",{className:w("mt-6 h-px bg-main-divider","transparent"===i?"opacity-30":"")}),l&&f?.items?.length?u(Rs,{subItems:f.items,version:i,internetBankUrl:b}):null]}),u(ji,{topItems:c}),u(ns,{currentLocation:v,foreignOffices:x,onChangeLocation:y})]})})),Vs={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},zs=x((({className:e="",gap:t="XS",isPadding:l=!1,version:n="transparent",isTheme:a=!1,...r})=>u(C,{className:w("relative","grid grid-cols-12",l?"p-default":"",Vs[t],e),version:n,isTheme:a,...r,children:Cn(r)})));zs.childrenTypes={exclude:["HorizontalLayout"]};const Ds=x((e=>{const{className:t,image:l,...n}=e;return u(C,{className:t,...n,children:u($t,{image:l})})})),Ps=x((({className:e="",cards:t=[],button:l})=>{const[a,i]=n(0),s=r((e=>i(e)),[]),o=t.length,[c,d]=ul({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:h}=d,x=t[c]?.href;return p("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[p("div",{className:"relative overflow-hidden",children:[o?Ls({activeIndex:c,cards:t,selectedCardIndex:a,onClick:s}):null,bl({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),m?u("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),u(oe,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function Ls({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,r=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-12",children:u("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return p("button",{type:"button",onClick:n,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u($t,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-3.5",children:[e?.sum?As("страховая сумма",e.sum):null,e?.fee?As("страховой взнос",e.fee):null]}),Os(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function As(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p("span",{className:"text-h6",children:[ct(2)(t)," ₽"]}),u("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Os(e){return e?u($t,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Es=x((({className:e="",title:t,insuranceTabs:l=[],button:a,...i})=>{const[s,o]=n(0),c=r((e=>o(e)),[]);return p(C,{className:`box-border py-12 overflow-hidden relative w-100 ${e}`,...i,children:[t?u(T,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return u("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-4 py-3 text-m-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Fs({insuranceTabs:l,button:a})})]})})),Fs=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(Ps,{button:t,cards:e},String(l)))):null};const Us=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),Hs={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Xs={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Ws=x((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:r,...i}=e,s=r?[...r]:[];return a&&s.unshift(a),u(C,{className:`px-9 py-12 ${t}`,...i,children:p("div",{className:"container text-m-light",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[Us(u("div",{className:"w-px h-4 bg-gray"}))(s.map(Ks)),u("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),u("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Ys)})]}):null,l?.length?u(xa,{className:"mt-9 max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),Ks=(e,t,l)=>{const n=1===t,a=t===l.length-1;return u("div",{className:`${Gs(n,a,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(Js)}):null},`column_${t}`)},Gs=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-2.5",l.length&&!t?"pr-2.5 pb-8":"pb-[22px]"].join(" "),Js=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-2 ${Xs[l]} ${Hs[n]} ${"XS"===l?"px-3":"px-11"}`,children:u("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Ys=(e,t,l)=>{const n=0===t,a=t===l.length-1;return u("div",{className:`flex-1 max-w-[180px] text-center px-2 ${n?"pl-9":""} ${a?"mr-3.5":" "}`,children:e.title},`title_${t}`)},qs=x((({doc:e,icon:t})=>{const{text:l,fileSize:n,...a}=e;return p("a",{className:"flex box-border gap-3 group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...a,children:[t,l?p(he,{size:"text-l",font:"font-light",children:[l,u(he,{color:"text-secondary-text",children:a?.href&&Zs(Qs(a.href),n)})]}):null]})})),Zs=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Qs=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},eo={double:"flex-wrap",single:"flex-col"},to=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>p(C,{className:w("p-default",e),...s,children:[u(el,{className:"!p-0",title:t,description:l,align:n,headlineVersion:"M",as:"h2"}),a?.length?u("div",{className:w("mt-8 flex gap-6",eo[i]),role:"list",children:a.map(((e,t)=>u("div",{className:"double"===i?"basis-[calc(50%-20px)]":"",role:"listitem",children:u(qs,{doc:e,icon:r?u($t,{className:"min-w-6 min-h-6",image:r,width:"24",height:"24"}):null})},String(t))))}):null]}))),lo=e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function no(e=""){const t=lo(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const ao=x((({className:e="",title:t="Мобильное приложение",qr:l,buttons:n,version:a="primary",items:r,image:i,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const m="secondary"===a?"p-3.5 min-w-[120px]":"min-w-[92px]";return p(C,{className:`flex justify-between p-default box-border relative min-h-80 ${no(e)} ${e}`,version:a,...d,children:[p(na,{className:"z-10",title:t?u(T,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full ${rl[o]}`}):null,buttons:Jt(n,{className:"mt-8",buttonClassName:"min-w-[168px]"}),children:[io(c),p("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?u("div",{className:`flex justify-center mr-5 bg-white rounded-md ${m}`,children:u($t,{className:"w-fit",image:l})}):null,ro(r)]})]}),i?.src?u("div",{className:"absolute right-0 bottom-0",children:u($t,{image:i})}):null]})})),ro=e=>e?.length?u(xa,{items:e,listItemSize:"S"}):u("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),io=e=>e?u("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,so={},oo=x((({className:e,filtrationSchema:t={},resetButton:l,...n})=>{const[a,{field:r,reset:i}]=R(so);return p(C,{className:w(e),version:"transparent",...n,children:[yr({field:r,reset:i,filtrationSchema:t,resetButton:l}),u(br,{filtrationState:a,...n})]})}));oo.childrenTypes=["ProductTile"],oo.childSchema=e=>e?.filtrationSchema||{};const co=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function mo(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}),r=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(r),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}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:"flex items-center justify-center",font:"text-center font-sans"},uo=e=>u("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(ho).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),po={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},xo=(e,t,l)=>p("div",{className:`${Object.values(po).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[u(De,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),go={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"},bo=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(go).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(De,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),fo={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"},vo=x((({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(fo).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(De,{name:l,width:"20",height:"16"})})})),yo={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"},No=x((({points:e,className:t="",zoom:l=5,showSearchField:r=!1})=>{const i=s(null),o=ws("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[c,m]=n(),[h,x]=n(So(co)),g=wo(e);if(a((()=>{i?.current||o?.ready((()=>{i.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),mo(o,i.current,h)}))}),[o,i,h]),a((()=>{if(i.current&&h&&o){const e=h.length<1?So(co):h;mo(o,i.current,e)}}),[i,h,o]),!o)return null;const b=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-[50%] ${b}`,children:r?xo(co,0,(e=>{if(e){const t=So(e);x(t)}})):uo(g)}),u("div",{className:`${Object.values(yo).join(" ")} ${b} right-2 top-4 bg-white`,onClick:()=>{const e=i.current.container;c?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:u(De,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${b}`,children:[u(vo,{yandexMaps:i}),u(vo,{yandexMaps:i,direction:"out"})]}),bo(i.current,o,`right-2 top-80 ${b}`)]})})),wo=e=>[Co(ko(e,0)),Co(ko(e,1))],ko=(e,t)=>e.map((e=>e[t])),Co=e=>e.reduce(((e,t)=>e+t))/e.length,So=e=>e?e.map((e=>e.coords)):null,Io={id:123,branchType:{id:7,code:"21",name:"Отделение на балансе филиала"},shortName:"Ейский ДО",name:"ДО №3349/3/05",address:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",lawAddress:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",openDate:"2000-12-05",closeDate:null,bik:"040349536",corAcc:"30101810700000000536",registrationNumber:"3349/3/05",phone:"+7(XXX)XXX-XX-XX",fax:"+7(XXX)XXX-XX-XY",okpo:"55105921",ogrn:"1027700342890",kpp:"231002002",inn:"7725114488",branchCode:"0305",upperBranchCode:"0300",timeZone:"+03:00",exchangeRate:{currencies:[{buyExchangeRate:0,saleExchangeRate:0,currency:{id:3,code:"156",currency:"CNY",name:"Китайский юань"}},{buyExchangeRate:59.15,saleExchangeRate:69.25,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:58.4,saleExchangeRate:70.05,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],lastUpdate:"2022-11-11 03:56:17"},workSchedule:{id:413,workTime:"09.00–16.30",lunchHour:"без перерыва",workTimeSaturday:"09.00–15.00",lunchHourSaturday:"без перерыва",workingMonday:!1,workingTuesday:!1,workingWednesday:!0,workingThursday:!0,workingFriday:!0,workingSaturday:!0,workingSunday:!1},gpsLatitude:46.709744,gpsLongitude:38.260703,range:null,safeBoxCaseVolumes:null},To=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],Bo=({lunchHour:e,status:t,workTime:l})=>{const n=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?p("div",{className:"flex",children:[u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4",children:l||null}),u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?n:null})]}):u("div",{className:"flex",children:u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},Ro=({icon:e,title:t,distance:l,time:n},a)=>p("div",{className:"flex mr-4",children:[u(De,{name:e,width:"16",height:"16",className:"mr-1"}),t?p("span",{className:"text-m",children:[t," "]}):null,p("span",{className:"text-m-light",children:[l?` (${l})`:null,n?`, ${n}`:null]})]},`nearbyOffice${a}`),$o=({title:e,status:t,workTime:l,lunchHour:n,description:a},r)=>p("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[p("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[u("div",{children:e}),t?null:u("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?u("div",{children:l}):null]}),t&&n?Mo(n):null,a?u("div",{className:"pb-1 text-s-light text-secondary-text",children:a}):null]},`day${r}`),Mo=e=>/\d+/gi.test(e)?p("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[u("div",{children:"Перерыв"}),u("div",{children:e})]}):u("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:u("div",{children:e})}),_o=x((({className:e=""})=>{const t=Io,{name:l,address:n,gpsLatitude:a,gpsLongitude:r,workSchedule:i}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:m,workingSaturday:h,workingSunday:x}=i,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=i,y=a&&r?[a,r]:null,N=[{title:"Понедельник",status:s,workTime:g,lunchHour:b},{title:"Вторник",status:o,workTime:g,lunchHour:b},{title:"Среда",status:c,workTime:g,lunchHour:b},{title:"Четверг",status:d,workTime:g,lunchHour:"13:00 - 14:00",description:"Не работает прием денег с 17:00 до 19:00"},{title:"Пятница",status:m,workTime:g,lunchHour:b},{title:"Суббота",status:h,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),k=w>0?N[w-1]:N[6];return p("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[p("div",{className:"flex flex-col px-12 pt-12",children:[p("div",{className:"flex justify-between",children:[u("div",{className:"text-h2",children:l}),Bo(k)]}),p("div",{className:"flex text-l-light pt-4",children:[u(De,{name:"GeolocationIcon",width:"24",height:"24",className:"pr-1"}),n]}),u("div",{className:"flex pt-4",children:To.map(Ro)})]}),p("div",{className:"flex justify-between pt-8",children:[u("div",{className:"flex-grow h-full w-full overflow-hidden",children:y?u(No,{points:[y],className:"h-full"}):null}),u("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:N.map($o)})]})]})})),jo=x((({className:e="",title:t,servicesList:l,...n})=>p(C,{className:`p-8 flex flex-col ${e}`,...n,children:[t?u(T,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?u("ul",{className:"list-none m-0 p-0",children:l.map(Vo)}):null]}))),Vo=(e,t)=>p("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?u($t,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",image:e.icon}):null,e.label?u("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),zo=x((({text:e,size:t,align:l,font:n,children:a,...r})=>u(C,{...r,children:u(me,{size:t,align:l,font:n,children:e||a})}))),Do=x((({className:e,icon:t,label:l,description:n,version:a="primary",benefitsVersion:r="normal"})=>p("div",{className:w("flex gap-5",n?"items-start":"items-center",e),children:[t?u("div",{className:Po(a,r),children:u($t,{className:"w-6 h-6",image:{...t,iconVersion:t.iconVersion||r}})}):null,p("div",{children:[l?u(he,{size:"text-h6",color:"text-primary-text group-data-secondary:text-white",children:l}):null,n?u(me,{size:"text-m-light",color:"text-secondary-text group-data-secondary:text-white",children:n}):null]})]})));function Po(e,t){let l="bg-primary-main text-black";return"secondary"===e?l="bg-white/30 text-black":"normal"===t&&(l="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${l}`}const Lo=e=>(t,l)=>{const{type:n}=t;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return u(Do,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));case"rte":return u(_a,{__html:t.__html});default:pi(t)}},Ao=x((({className:e="",title:t,description:l,image:n,benefits:a,sum:r,monthLimit:i,directionRight:s=!1,version:o="primary",...c})=>p(C,{className:`relative py-12 px-24 ${e}`,version:o,...c,children:[u(el,{className:"!p-0",title:t,description:l,headlineVersion:"M"}),p("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[n?.src?u($t,{className:s?"order-2":"",image:n}):null,p("div",{className:"w-[558px] m-auto",children:[a?.length?u("div",{className:"flex flex-col gap-4",children:a.map(Lo(o))}):null,Oo(Number(r),Number(i))]})]})]})));function Oo(e,t){return e||t?p("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Eo("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Eo("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Eo(e,t=0,l=!1){return p("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[u("span",{className:"text-secondary-text text-l-light",children:e}),p("span",{className:"text-primary-main text-h6",children:[ct(2)(t)," ₽"]})]})}function Fo(e=""){const t=lo(e);return t<=4?"S":t<=8?"M":"L"}function Uo(e=""){const t=lo(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Ho=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(C,{className:w("p-9 box-border",e,Uo(e),no(e)),...n,children:[u(el,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:Fo(e)}),u("figure",{className:"m-0 min-w-[80%]",children:Xo()})]}))),Xo=(e=3)=>Ko(100,e).map((e=>Math.floor(e))).map(Wo),Wo=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Ko=(e,t)=>[e].concat(t>0?Ko(e/1.618,t-1):[]),Go=(e="primary",t="normal")=>(l,n)=>u(Do,{version:e,benefitsVersion:t,...l},String(n)),Jo=x((({className:e,version:t="primary",headlineVersion:l="L",title:n,description:a,benefits:r,benefitsVersion:i,items:s,isDotted:o=!0,__html:c,buttons:d,image:m,directionRight:h=!0})=>{const x=r?.filter((e=>e.label)),g=m?.src?u($t,{className:"mt-[-50px]",image:m}):null;return p(na,{className:e,insetTitle:u(el,{className:"max-w-[600px] xl:max-w-[728px]",title:n,description:a,headlineVersion:l,align:"text-left",isPadding:!1}),...h?{rightImage:g}:{leftImage:g},buttons:Jt(d),children:[x?.length?u("div",{className:"flex flex-wrap gap-6",children:x.map(Go(t,i))}):null,c?u("div",{className:"mt-5",children:u(_a,{__html:c})}):null,s?.length?u(xa,{className:"mt-5",items:s,isDotted:o}):null]})}));function Yo({text:e,href:t,target:l,icon:n},a){const r="primary"===a?"white":"black",i={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-3",children:[u(oe,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...i,children:u($t,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||r}})}),u(oe,{version:"link",...i})]})}const qo=x((({className:e,backwardButton:t,...l})=>p(C,{className:w("overflow-hidden p-default flex flex-col gap-10 box-border",e),...l,children:[t?.text?Yo(t,l.version&&"primary"!==l.version?"white":"primary"):null,u(Jo,{className:"grow",...l})]}))),Zo=x((({className:e="",slides:t=[],...l})=>{const[a,r]=n(0);return p(C,{className:w("box-border py-default overflow-hidden",e),...l,children:[u("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*a}%)`},role:"list",children:t.map((({productBlock:e},t)=>u("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:u(Jo,{className:"pl-default h-full",headlineVersion:"XXL",...e,...l})},String(t))))}),u("div",{className:"h-28 px-6 mt-6 -mb-6 flex items-center gap-2 box-border",children:t.map(Qo({activeSlideIndex:a,onClick:r}))})]})})),Qo=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,r=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-[290px] ease-in duration-300 bg-white/10 px-6 py-5 hover:py-6 backdrop-blur",i=a?"text-primary-text text-h6 py-2":"text-l pb-1 text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l-light":"text-m-light text-secondary-text group-data-secondary:text-white/80";return p("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:w("relative px-6 box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",r),children:[u("div",{className:i,children:l?.title}),u("div",{className:s,children:l?.description})]},String(n))};function ec(e,t){if(!e)return null;return u("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:u(me,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e})})}const tc=(e,t)=>{const{type:l}=e;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return[u(he,{size:"text-h6",children:e.label},`label-${t}`),u(he,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e.description},`desc-${t}`)];case"rte":return u("div",{className:"col-span-2",children:u(_a,{__html:e.__html})});default:pi(e)}};function lc(e,t){return e?.src?u($t,{className:w("absolute",t?"right-0":"left-0","bottom-0"),image:e}):null}const nc=x((({className:e="",title:t,headlineVersion:l="S",description:n,additionalDescription:a,benefits:r=[],buttons:i,image:s,directionRight:o=!0,...c})=>p(C,{className:w("overflow-hidden p-9 box-border relative min-h-[364px] flex flex-col justify-between",Uo(e),e),...c,children:[p("div",{className:w("flex flex-col",o?"":"items-end"),children:[u(el,{className:w("!p-0 !bg-transparent z-10",t||n?"mb-3.5":""),title:t,description:n,headlineVersion:l,as:"h2",align:"text-left"}),ac(r,s),ec(a,s)]}),Jt(i,{className:w("mt-5 text-l",o?"":"justify-end")}),lc(s,o)]})));function ac(e,t){if(!e.length)return null;return u("div",{className:w("z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline",t?.src?"max-w-[calc(100%-186px)]":"100%"),children:e.length?e.map(tc):null})}const rc=x((({className:e="",title:t="Акции и спецпредложения",date:l,description:n,as:a,buttons:r=[],...i})=>u(C,{className:w("p-9 box-border",e,Uo(e),no(e)),...i,children:u(na,{title:t?u(el,{className:"!p-0 max-w-[600px]",title:t,headlineVersion:Fo(e),align:"text-left",as:a||"h2"}):null,buttons:Jt(r),children:p("div",{className:"mt-1.5",children:[l?u("div",{className:"text-s mb-2",children:ic(l)}):null,u("div",{className:"text-l",children:n})]})})})));function ic(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const sc=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:r,icon:i,title:s,version:o="primary",...c})=>p(C,{className:w("box-border text-left p-9",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between",children:[s?u(T,{headingType:"h4",as:"h3",className:"mb-6",title:s}):null,oc(i)]}),p("div",{className:"w-full",children:[r?cc(r):null,dc("Адрес",e,"GeolocationIcon"),dc("Телефон",l,"PhoneIcon"),dc("E-mail",t,"MailIcon"),n?.text?Jt([n],{className:"mb-6"}):null]})]}))),oc=e=>p("div",{className:"self-end",children:[e?.src?u($t,{image:e}):null,e?.icon?u($t,{image:e}):null]}),cc=e=>u("div",{className:"border-b border-main-divider pb-5 my-5",children:u(_a,{__html:e})}),dc=(e,t,l)=>p("div",{className:"flex mb-4",children:[u(De,{className:"pr-4",iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col first:pb-1",children:[u(he,{size:"text-m-light",children:e}),t?u(he,{size:"text-h6",color:"text-green",children:t}):null]})]}),mc=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(C,{...n,children:u(_a,{__html:t,richVersion:l})})})),hc={primary:"bg-main-divider",secondary:"bg-white/30","secondary-light":"bg-secondary-light"},uc=x((({iconBgVersion:e="primary",...t})=>u("div",{className:w("rounded-icon p-2.5 mr-3",hc[e]),children:u(De,{...t})}))),pc=e=>e?"MinusIcon":"PlusIcon",xc=x((({className:e="",label:t="Развернуть",labelIcon:l,isExpanded:n,isFoldButtonOnTop:a=!0,version:r="primary",...i})=>u(C,{className:w("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),tag:"div",version:"transparent",...i,children:u(Va,{isFoldButtonOnTop:a,unfoldedByDefault:n,renderFoldableSection:({isUnfolded:e})=>u(za,{className:w("gap-5 [&>*]:p-0","grid grid-cols-12 [&>*]:pb-4"),isUnfolded:e,children:Cn(i)}),renderFoldButton:({isUnfolded:e,onToggle:n})=>gc({version:r,label:t,labelIcon:l,isUnfolded:e,onToggle:n})})})));xc.childrenTypes={exclude:["RollupItem"]};const gc=({version:e,label:t,labelIcon:l,isUnfolded:n,onToggle:a})=>{const r=t||(n?"Скрыть":"Развернуть");return"primary"===e?bc({label:r,labelIcon:l,icon:pc(n),onToggle:a}):u(ur,{label:r,icon:n?"ArrowUpIcon":"ArrowDownIcon",onClick:a})},bc=({label:e,icon:t,onToggle:l,labelIcon:n})=>{const a=String(n?.size?.width||24),r=String(n?.size?.height||24),i=n?.icon;return p("button",{className:w("border-none bg-transparent px-0 flex justify-between items-center w-full cursor-pointer group/button",i?"py-2":"py-5"),onClick:l,children:[p("div",{className:"flex items-center group-hover/button:text-primary-main",children:[i?u(uc,{name:i,width:a,height:r,iconVersion:n?.iconVersion}):null,e?u(he,{size:"text-h6",font:"font-normal",children:e}):null]}),t?u(De,{name:t,iconVersion:"color",width:"24",height:"24"}):null]})},fc=[];const vc=async e=>await P(e,{method:"GET"})||fc,yc=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Ae,{options:s,label:i,placeholder:a||n,onChange:e=>r(e.key),value:o})})),Nc=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:r})=>p("div",{className:"flex justify-between gap-4 mb-6",children:[u("div",{className:"max-w-[396px] w-1/2",children:u(yc,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"max-w-[396px] w-1/2",children:u(yc,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),wc=x((({name:e,text:t,value:l,checked:n,onChange:a,className:r})=>u("div",{className:r,children:p("label",{className:"font-sans flex 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("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),kc=x((()=>{const[e,t]=n("option2"),l=r((e=>t(e)),[]);return p("div",{children:[u(wc,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),u(wc,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),Cc=["От 1 дня","До 365 дней"],Sc=x((({days:e,setDays:t})=>p("div",{className:"mb-6",children:[u("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),u(pt,{min:1,max:365,value:e,items:Cc,onChange:t})]}))),Ic=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:r})=>p("div",{className:"flex justify-between mb-6",children:[u("div",{className:"mr-4 w-full",children:u(yc,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"w-full",children:u(yc,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Tc=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"flex-1 mr-9",children:[u(Nc,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Bc(c)}),u(Sc,{days:a,setDays:e=>c({days:e})}),u(Ic,{caseVolumes:o,selectedCaseVolume:r,onSelectedCaseVolume:Rc(c),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),p("div",{className:"flex justify-between items-center mt-5",children:[u(kc,{}),u(oe,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),Bc=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Rc=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},$c=x((({days:e,tariffs:t=[]})=>{const l=_c(e,t);return p("div",{className:"flex flex-col justify-between",children:[p("div",{className:"flex",children:[Mc("Аренда за",e,"mr-11"),Mc("Цена",l+" ₽")]}),p("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[u($t,{image:{icon:"PackA4Icon"},width:"290",height:"257"}),p("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",u("br",{})," листов формата А4"]})]})]})})),Mc=(e,t,l="")=>p("div",{className:l,children:[u("div",{className:"text-m-light text-secondary-text mb-1",children:e}),u("span",{className:"text-h3 text-primary-text",children:t})]}),_c=(e,t)=>{const l=jc(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},jc=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},Vc=(e,t)=>e.find((e=>e.branchCode===t)),zc=x((e=>{const{regions:t,data:l,branches:n,onChange:r,onClick:i}=e;a((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,r]);const s=Vc(n,l.selectedBranch),o=Dc(s?.safeBoxCaseVolumes),c=Pc(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Lc(c,l.selectedBoxSize);return p("div",{className:"flex justify-between align-top mb-6",children:[u(Tc,{...l,regions:t,onClick:i,branches:n,caseVolumes:o,safeBoxCases:c,onChange:r}),u($c,{days:l.days,tariffs:d})]})})),Dc=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Pc=(e,t)=>e?.find((e=>e.volume===t)),Lc=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Ac=x((({title:e,footnote:t,className:l="",...a})=>{const[i,s]=n(!1),o=r((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=O(),h=Oc(c.selectedRegion,m),x=function(e){const{data:t}=z(e?`/api/v1/safeboxes?regionCode=${e}`:null,vc);return t||fc}(h),g=r((e=>d((t=>({...t,...e})))),[d]),b=(f=Vc(x,c.selectedBranch)||x,Array.isArray(f)?f.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):f?.gpsLatitude&&f?.gpsLongitude?[[f.gpsLatitude,f.gpsLongitude]]:[]);var f;return p(C,{className:l,...a,children:[p("div",{className:"px-8 py-12",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,u(zc,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&i?u(No,{points:b,className:"h-[640px]"}):null]})})),Oc=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Ec=e=>Boolean(e?.icon||e?.src),Fc=({styleMap:e,isMainButton:t,version:l})=>(n,a,r)=>{const{label:i,description:s,button:o,items:c,isDotted:d}=n;return p("div",{className:w("relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden",Uc(r.length)),children:[p("div",{className:w(o?.text?"mb-8":"","text-center"),children:[i?u("div",{className:"mb-2",children:u(he,{size:"text-h6",children:i})}):null,p("div",{className:"flex flex-col items-center",children:[s?u("div",{className:e.description,children:s}):null,u(xa,{className:w(s?`${e.description} mt-0.5`:"text-h6"),items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(oe,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(a))},Uc=e=>e<5?"w-[276px]":"w-[210px]",Hc={description:"text-white/80 text-l-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"},Xc=x((({className:e="",showLines:t=!0,steps:l=[],buttons:n,size:a="normal",version:r="primary",stepVersion:i="gray",title:s,...o})=>{const c=l.length>3,d=Hc,m=(e=>e?"":"opacity-0")(t),h=(e=>e<5?"px-[88px]":"px-[55px]")(l.length),x=Boolean(n?.every((e=>e?.text)));return p(C,{className:w("box-border py-12",c?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",e),version:r,...o,children:[s?u(T,{headingType:"h4",className:"max-w-[752px] text-center mb-9",title:s}):null,l?.length?p("div",{className:"box-border",children:[u("div",{className:w("flex items-center",h),children:Us(u("div",{className:w("h-0.5 w-full bg-secondary-light flex-1",m)}))(l.map(Wc(d,a,i)))}),u("div",{className:w("flex justify-between mt-4",c?"gap-x-3":"gap-x-[101px]"),children:l.map((g={styleMap:d,isMainButton:x,version:r},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return Fc(g)(e,t,l);case"rte":return u("div",{className:w("text-center",Uc(l.length)),children:u(_a,{__html:e.__html})},String(t));default:return null}}))})]}):null,Jt(n,{className:"mt-8"})]});var g})),Wc=(e,t,l)=>({icon:n},a)=>{const r="secondary"===l?"group-data-primary:text-white":"text-secondary-text",i="secondary"===l?"white":"color";return u(C,{className:`${"normal"===t?"h-[100px] w-[100px]":"h-[63px] w-[63px]"} flex justify-center items-center text-center rounded-full p-[26px] box-border z-10`,version:l,children:Ec(n)?u($t,{image:{...n,iconVersion:n.iconVersion||i},width:"48",height:"48"}):u("span",{className:w("text-h4","transparent"===l?e.iconText:r),children:a+1})},String(a))},Kc=x((({className:e="",gap:t=14,padding:l=16,showDots:n=!0,minHeight:a,children:r,onVisibleIndicesChange:i,listType:s="horizontal-list",version:o})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Dn({itemCount:c,onVisibleIndicesChange:i}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===s?"relative h-full":""),children:[u(Bn,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:t,padding:l,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:s,minHeight:a,children:r}),n?u(jn,{containerRef:d,activeIndex:h,dotCount:c,listType:s,version:o}):null]})})),Gc=x((({listType:e,showDots:t,options:l,version:n,...a})=>u(C,{version:n,...a,children:u(Kc,{listType:e,showDots:t,version:n,children:Cn({...a,options:l})})})));Gc.childrenTypes={exclude:["SwipeListControlBlock"]};const Jc="h-12 flex-1 flex items-center justify-center cursor-pointer",Yc="font-sans text-m text-center",qc="text-white",Zc="text-secondary-text group-hover/btn:text-primary-main",Qc="text-primary-main",ed={div:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${Jc} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${Jc} group/btn bg-white`},centered:{active:`px-4 rounded-md ${Jc} bg-primary-main text-white whitespace-nowrap`,default:`px-4 rounded-md ${Jc} group/btn bg-transparent whitespace-nowrap`},wideScreen:{active:`${Jc} bg-primary-main text-white whitespace-nowrap`,default:`${Jc} group/btn bg-white whitespace-nowrap`}},text:{scrollable:{active:"h-full border-0 border-b-2",default:""},centered:{active:"",default:""},wideScreen:{active:"",default:""}}},td={link:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${Jc} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${Jc} group/btn bg-white`},centered:{active:`px-4 rounded-md ${Jc} bg-primary-main text-white whitespace-nowrap`,default:`px-4 rounded-md ${Jc} group/btn bg-transparent whitespace-nowrap`},wideScreen:{active:`${Jc} bg-primary-main text-white`,default:`${Jc} group/btn bg-white`}},text:{scrollable:{active:`${Yc} flex items-center h-full border-0 border-b-2 text-primary-main`,default:`${Yc} ${Zc}`},centered:{active:`${Yc} text-white`,default:`${Yc} ${Zc}`},wideScreen:{active:`${Yc} text-white`,default:`${Yc} ${Zc}`}}},ld=(e,t,l)=>{const n=t?"active":"default";return ed[e][l||"wideScreen"][n]},nd=(e,t,l)=>{const n=t?"active":"default";return td[e][l||"wideScreen"][n]},ad=x((e=>{const{tab:t,currentTab:l,onClick:n,tabsMode:a}=e,r="link"===l?.type&&l.href===t.href,i=q()(t);return u("a",{role:"tab",className:nd("link",r,a),target:t.target,href:i.href,onClick:e=>{i.onClick(e),n(t)},children:u("span",{className:nd("text",r,a),children:t.text})})})),rd=(e,t,l)=>e?u("h3",{className:"scrollable"===l?`${Yc} ${t?Qc:Zc}`:`${Yc} ${t?qc:Zc}`,children:e}):null,id=(e,t,l)=>e&&t?u("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(l?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover/btn:text-primary-main"),children:t}):null,sd=({page:e,showCounter:t,...l})=>(n,a)=>{const r=n.type;if("group"!==r&&"link"!==r)return null;switch(r){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:n,tabsMode:a})=>(r,i)=>{const s=t===r,o=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return u("div",{className:ld("div",s,a),role:"tab","aria-selected":s,onClick:()=>n(r),children:p("div",{className:`flex flex-1 items-center justify-center ${ld("text",s,a)}`,children:[rd(r.title,s,a),id(l,o,s)]})},`group-${String(i)}`)})({page:e,showCounter:t,...l})(n,a);case"link":return u(ad,{tab:n,...l},String(a));default:pi(r)}return null},od=x((({tabs:e,...t})=>u("div",{className:"flex p-1 m-auto bg-main-gray rounded-md",children:e?.map(sd({...t}))}))),cd=x((e=>{const{tabs:t,...l}=e,[n,a]=Dn({itemCount:t?.length||0,isCyclic:!1});return p("div",{className:"relative max-w-full m-auto",children:[u("div",{className:"font-sans max-w-full w-full overflow-hidden relative bg-white",children:u(Bn,{containerRef:n,snapAlign:"snap-start",onVisibleIndicesChange:a.handleVisibleIndicesChange,children:t?.map(sd({...l}))})}),a.canScrollLeft?u(xl,{className:"absolute z-40 top-0 left-6",onClick:a.scrollLeft}):null,a.canScrollRight?u(gl,{className:"absolute z-40 top-0 rotate-180 right-6",onClick:a.scrollRight}):null]})})),dd=x((e=>{const{className:t="",tabs:l,isSticky:i,...s}=e,[o,c]=n(l?l[0]:void 0);a((()=>{l&&l[0]&&hd(l[0])}),[]),a((()=>{"group"===o?.type&&f.subject("tab",{type:o.type,label:o.ref})}),[o]);const d=r((e=>{hd(e),c(e)}),[]);return u(C,{className:`relative box-border flex gap-x-1 w-full ${i?"sticky top-1 z-20":""} ${t}`,role:"tablist",...s,children:md({tabs:l,onClick:d,currentTab:o,...s})})})),md=({tabsMode:e,tabs:t,...l})=>{switch(e){case"wideScreen":return t?.map(sd({tabsMode:e,...l}));case"centered":return u(od,{tabs:t,tabsMode:e,...l});case"scrollable":return u(cd,{tabs:t,tabsMode:e,...l})}return null},hd=e=>{"group"===e.type&&f.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&f.fire("tab",{type:e.type,label:e.href})},ud=x((({isOpen:e,onClick:t})=>p(oe,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[u("div",{className:"text-h4",children:e?"Скрыть":"Показать"}),u(De,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20"})]}))),pd={Buttons:({buttons:e})=>Jt(e),Img:({image:e})=>e?.src?u($t,{image:e}):null,List:({isDotted:e,...t})=>u(xa,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?u("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:x((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(ud,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null))},xd=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=n(!0);a((()=>{t===i&&r||m(!0)}),[r,i]);return p("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?u("div",{className:"h-5"}):null,gd({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})]},String(c))},gd=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in pd))return null;return u(pd[l],{...t,...n})},bd=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>u("div",{className:"first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0",role:"cell",children:e?.length?e.map(xd({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})):null}))),fd=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=ul({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map(vd(l)),bl({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),vd=e=>(t,l)=>{if(!t?.length)return null;const[n,...a]=t,r=[...Array(e).keys()].reduce(((e,t)=>140*(a?.[t]?.cols?.length??1)+e),0),i=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return p("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[n?.data?u("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:n.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${r}px)`},children:a?.map(((t,l)=>p("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?u("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?yd(t.cols,e):null]},`row${l}`)))})})]},String(l))},yd=(e,t)=>e?.length>0?u("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>u("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,Nd=x((({activeTabIndex:e,items:t})=>{const[l,a]=n({}),i=r((e=>a((t=>({...t,[e]:!t[e]})))),[]);return u("div",{children:t.map(((t,n)=>{const a=`activeTabIdx:${e}-tableIdx:${n}`;return p("div",{className:"w-full",children:[p("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>i(a),children:[t.title,u($t,{image:{icon:l[a]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),u("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[a]?"h-0":""),children:u("div",{className:"relative",children:u(fd,{rows:t.rowsData})})})]},a)}))})})),wd=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(oe,{href:t,version:"secondary",target:"_blank",appendLeft:u(De,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function kd(e){const t=await fetch(e);return await t.json()}const Cd=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=z(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),kd);return t||{}}(e),[i,s]=n(0),o=r((e=>s(e)),[]),c=a?.[i]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(wd,{currencies:d,activeTabIndex:i,setActiveTabIndex:o,linkToPDF:t}),u(Nd,{activeTabIndex:i,items:c}),u(ud,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(ud,{onClick:l,isOpen:!0})]})})),Sd=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:"flex",children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(Cd,{...t,onClick:l})}):null]}))),Id=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...i})=>{const[s,o]=n(void 0),c=r((e=>o(e)),[]),[d,m]=n(void 0),h=r((e=>m(e)),[]);return p(Sd,{onHideContentClick:()=>o(void 0),tableInner:s,...i,children:[u("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:p("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?u($t,{className:"mr-3.5 max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?u(Ga,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(bd,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...i},String(t))))}):null]})})),Td=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:r=0,...i})=>{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]=ul({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Id,{row:e,activeIndex:d,rowIdx:t,...i},String(t)))),[x,g]=r>0?[h.slice(0,-r),h.slice(-r)]:[h,[]];return p(C,{className:`p-default overflow-hidden relative ${c>1?"pr-0":""} ${e}`,...i,children:[Bd({title:t,description:l}),Rd(l),r>0?u(Va,{renderFoldableSection:({isUnfolded:e})=>p($d,{controls:m,children:[x,u(za,{isUnfolded:e,children:g})]}),renderFoldButton:pr}):u($d,{controls:m,children:h})]})}));function Bd({title:e,description:t}){return e?u(T,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function Rd(e){return e?u("div",{className:"mb-9 text-center text-l",children:e}):null}const $d=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative",children:[e,bl({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Md=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:r,items:i=[],...s})=>p(C,{className:w("px-9 py-4 flex gap-3 bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?u("div",{className:"mt-1",children:_d()}):null,"big"===n?jd(a):null,p("div",{className:"flex flex-col w-fit gap-3",children:[t?u(he,{size:"text-l",font:"font-medium",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Vd(l):null,i?.length?zd(i,!0):null,r?u(_a,{__html:r}):null]})]}))),_d=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),jd=e=>e?.src?u($t,{className:"h-fit",image:e}):null,Vd=e=>u(me,{size:"text-s",color:"text-secondary-text group-data-secondary:text-white",children:e}),zd=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-6":""),children:e.map(((e,t)=>u("li",{children:u(he,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),Dd=x((e=>{const{tags:t,className:l=""}=e;return t?.length?u("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Pd)}):null})),Pd=(e,t)=>u("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),Ld=x((({title:e,headingType:t="h3",__html:l,items:n,buttons:a,image:r,isDotted:i=!0,listItemSize:s="M",className:o="",tags:c,children:d,directionRight:m=!0,...h})=>p(C,{className:w("flex grow justify-between items-stretch h-full p-9 pr-3 box-border",Uo(o),no(o),o),...h,children:[r?.src?u($t,{className:w("mt-auto ml-7",m?"order-2":""),image:r}):null,u(na,{title:e?u(T,{headingType:t,as:"h2",title:e,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:Jt(a,{className:"mt-8",buttonClassName:"min-w-[158px]"}),children:p("div",{children:[l?u("div",{className:"max-w-[600px] mt-2.5",children:u(_a,{__html:l})}):null,d,u(xa,{className:"mt-2.5",items:n,isDotted:i,listItemSize:s}),c?.length?u(Dd,{tags:c,className:"mt-5"}):null]})})]}))),Ad={stretch:"items-stretch",left:"items-start",center:"items-center",right:"items-end"},Od=x((({className:e="",gap:t="",align:l="stretch",isPadding:n=!1,isInnerPadding:a=!0,version:r="transparent",isTheme:i=!1,...s})=>{const o=a?"":"!p-0";return u(C,{className:w("relative","flex flex-col [&>*]:max-w-full",n?"p-default":"",Vs[t],l&&Ad[l],e),version:r,isTheme:i,...s,children:Cn({...s,renderProps:(e,t)=>Nn(e,t,{className:o})})})}));Od.childrenTypes=[];const Ed=e=>lo(e)<10?"py-6 px-11":"py-12 px-32",Fd=x((({className:e,title:t,url:l,previewImg:n,...a})=>{const r=Y();return p(C,{className:w(Ed(e),e),...a,children:[u(el,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:K(r)(n?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:K(r)(l)})}):null]})})),Ud={ApplicationForm:Ut,BenefitsBlock:Ht,Bonus:tl,BonusBenefitsBlock:il,BusinessBlock:ml,ButtonBlock:hl,Calculator:mn,CardTransfer:fn,Carousel:En,CarouselBankHistoryCard:Xn,CarouselCard:qn,CarouselCatalogCard:Qn,CarouselEventCard:la,CarouselInvestmentCard:ra,CarouselLinks:ca,CarouselProductCard:ga,CarouselProgramsCard:wa,CarouselRecommendationCard:$a,CarouselRichTextCard:ja,CarouselTariffsCard:La,ComparisonTable:rr,ContactsBlock:sr,DepositFiltration:Cr,ErrorBlock:Ir,ExchangeRateTile:ni,Footer:Wi,GracePeriod:Ki,Header:js,Headline:el,HorizontalLayout:zs,ImgBlock:Ds,InsuranceAmountBlock:Es,InvestmentInfo:Ws,LinkDocs:to,MobileAppTile:ao,MortgageFiltration:oo,OfficeMap:_o,OfficeServicesBlock:jo,ParagraphBlock:zo,PictureText:Ao,Placeholder:Ho,ProductBlock:qo,ProductGallery:Zo,ProductTile:nc,PromoTile:rc,RepresentativeOfficeInfo:sc,RichTextBlock:mc,RollupItem:xc,SafeDepositRental:Ac,StepsBlock:Xc,SwipeListControlBlock:Gc,Tabs:dd,TariffsTable:Td,TextBlock:Md,Tile:Ld,VerticalLayout:Od,Video:Fd,ExchangeRateOffice:Vr};const Hd=["Header","Footer"],Xd=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Wd(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Hd.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Ol(Xd)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Kd="cookieClose",Gd=x((({termLink:e,personalDataPolicyLink:t})=>{const{isOpened:l,onClose:n}=Ti("cookie",!globalThis.localStorage?.getItem(Kd)),a=r((()=>{globalThis.localStorage?.setItem(Kd,"true"),n&&n()}),[n]);return l?u("div",{className:"container z-40 fixed bottom-0 left-0 right-0 pointer-events-none",children:p("div",{className:"bg-white m-6 p-6 rounded-md flex items-center pointer-events-auto shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"flex-1",children:p(me,{size:"text-s-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(ta,{isRemote:!0,className:w(Jd(e?.href)),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(ta,{isRemote:!0,className:w(Jd(t?.href)),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"w-24 flex justify-end",children:u(ui,{className:"bg-main-gray rounded-md",onClick:a})})]})}):null})),Jd=e=>["inline mx-1",e?"text-green-dark":""],Yd=h();const qd=x((({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:Zd()}))),Zd=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"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"}),u("path",{...e,d:"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"})]})},Qd=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Yd.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:r((async()=>{l(await Yd.like(e))}),[e]),dislike:r((async()=>{l(await Yd.dislike(e))}),[e])}}(Y().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[u(qd,{onClick:J(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(qd,{onClick:J(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),em=x((e=>{const{className:t="",blocksRegistry:l,blockDecorator:n,data:a={}}=e,{style:r,blocks:i,slots:s,likeControl:o,colorPalette:c="pc"}=a,d={key:"",page:a,blocksRegistry:l,blockDecorator:n,parent:a};Wd();const[m,{setTrue:h,setFalse:x}]=je();return xi({onOpen:h,onClose:x}),p("section",{className:w("relative",r,t,m?"overflow-hidden h-screen":""),"data-theme":c,children:[s?.header?u("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:kn(s?.header,{...d,slotName:"header"})}):null,p("div",{className:"container grid grid-cols-12 gap-1",children:[kn(i,d),s?.footer?kn(s?.footer,{...d,slotName:"footer"}):null]}),o?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Qd,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null,u(Gd,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));em.childrenTypes=[],em.slots=()=>["header","footer"];e.Blocks=Ud,e.ContentPage=em,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=J,e.joinList=Us,e.packageVersion="0.11.1",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=W,e.useRouter=Y,Object.defineProperty(e,"__esModule",{value:!0})}));
|