@redneckz/wildless-cms-uni-blocks 0.8.5 → 0.8.7
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 +38 -43
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Footer/Sitemap.d.ts +0 -2
- package/bundle/components/Header/Header.fallback.d.ts +1 -2
- package/bundle/hooks/useLink.d.ts +6 -5
- package/bundle/services/sitemap/fallbackWCMSResource.d.ts +2 -0
- package/bundle/services/sitemap/isHrefActive.d.ts +4 -2
- package/bundle/services/sitemap/useSWRResource.d.ts +1 -1
- package/bundle/utils/url.d.ts +1 -3
- package/dist/components/Footer/Footer.fallback.js +3 -6
- package/dist/components/Footer/Footer.fallback.js.map +1 -1
- package/dist/components/Footer/Sitemap.d.ts +0 -2
- package/dist/components/Footer/Sitemap.js +2 -4
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Header/Header.fallback.d.ts +1 -2
- package/dist/components/Header/Header.fallback.js +2 -7
- package/dist/components/Header/Header.fallback.js.map +1 -1
- package/dist/hooks/useLink.d.ts +6 -5
- package/dist/hooks/useLink.js +26 -18
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/services/BlockRouter/BlockRouter.js +1 -1
- package/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/dist/services/sitemap/fallbackWCMSResource.d.ts +2 -0
- package/dist/services/sitemap/fallbackWCMSResource.js +8 -0
- package/dist/services/sitemap/fallbackWCMSResource.js.map +1 -0
- package/dist/services/sitemap/isHrefActive.d.ts +4 -2
- package/dist/services/sitemap/isHrefActive.js +1 -6
- package/dist/services/sitemap/isHrefActive.js.map +1 -1
- package/dist/services/sitemap/isTopItemActive.js +4 -1
- package/dist/services/sitemap/isTopItemActive.js.map +1 -1
- package/dist/services/sitemap/useSWRResource.d.ts +1 -1
- package/dist/services/sitemap/useSWRResource.js +2 -2
- package/dist/setup-fixture.js +3 -1
- package/dist/setup-fixture.js.map +1 -1
- package/dist/utils/url.d.ts +1 -3
- package/dist/utils/url.js +4 -8
- package/dist/utils/url.js.map +1 -1
- package/lib/components/Footer/Footer.fallback.js +1 -4
- package/lib/components/Footer/Footer.fallback.js.map +1 -1
- package/lib/components/Footer/Sitemap.d.ts +0 -2
- package/lib/components/Footer/Sitemap.js +2 -4
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Header/Header.fallback.d.ts +1 -2
- package/lib/components/Header/Header.fallback.js +2 -7
- package/lib/components/Header/Header.fallback.js.map +1 -1
- package/lib/hooks/useLink.d.ts +6 -5
- package/lib/hooks/useLink.js +27 -19
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/services/BlockRouter/BlockRouter.js +1 -1
- package/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/lib/services/sitemap/fallbackWCMSResource.d.ts +2 -0
- package/lib/services/sitemap/fallbackWCMSResource.js +5 -0
- package/lib/services/sitemap/fallbackWCMSResource.js.map +1 -0
- package/lib/services/sitemap/isHrefActive.d.ts +4 -2
- package/lib/services/sitemap/isHrefActive.js +1 -6
- package/lib/services/sitemap/isHrefActive.js.map +1 -1
- package/lib/services/sitemap/isTopItemActive.js +4 -1
- package/lib/services/sitemap/isTopItemActive.js.map +1 -1
- package/lib/services/sitemap/useSWRResource.d.ts +1 -1
- package/lib/services/sitemap/useSWRResource.js +2 -2
- package/lib/setup-fixture.js +3 -1
- package/lib/setup-fixture.js.map +1 -1
- package/lib/utils/url.d.ts +1 -3
- package/lib/utils/url.js +2 -4
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +36 -35
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Footer/Sitemap.d.ts +0 -2
- package/mobile/bundle/components/Header/Header.fallback.d.ts +1 -2
- package/mobile/bundle/hooks/useLink.d.ts +6 -5
- package/mobile/bundle/services/sitemap/fallbackWCMSResource.d.ts +2 -0
- package/mobile/bundle/services/sitemap/isHrefActive.d.ts +4 -2
- package/mobile/bundle/services/sitemap/useSWRResource.d.ts +1 -1
- package/mobile/bundle/utils/url.d.ts +1 -3
- package/mobile/dist/components/Footer/Footer.fallback.js +3 -6
- package/mobile/dist/components/Footer/Footer.fallback.js.map +1 -1
- package/mobile/dist/components/Footer/Sitemap.d.ts +0 -2
- package/mobile/dist/components/Footer/Sitemap.js +2 -4
- package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
- package/mobile/dist/components/Header/Header.fallback.d.ts +1 -2
- package/mobile/dist/components/Header/Header.fallback.js +2 -7
- package/mobile/dist/components/Header/Header.fallback.js.map +1 -1
- package/mobile/dist/hooks/useLink.d.ts +6 -5
- package/mobile/dist/hooks/useLink.js +26 -18
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/services/BlockRouter/BlockRouter.js +1 -1
- package/mobile/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/dist/services/sitemap/fallbackWCMSResource.d.ts +2 -0
- package/mobile/dist/services/sitemap/fallbackWCMSResource.js +8 -0
- package/mobile/dist/services/sitemap/fallbackWCMSResource.js.map +1 -0
- package/mobile/dist/services/sitemap/isHrefActive.d.ts +4 -2
- package/mobile/dist/services/sitemap/isHrefActive.js +1 -6
- package/mobile/dist/services/sitemap/isHrefActive.js.map +1 -1
- package/mobile/dist/services/sitemap/isTopItemActive.js +4 -1
- package/mobile/dist/services/sitemap/isTopItemActive.js.map +1 -1
- package/mobile/dist/services/sitemap/useSWRResource.d.ts +1 -1
- package/mobile/dist/services/sitemap/useSWRResource.js +2 -2
- package/mobile/dist/setup-fixture.js +3 -1
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/utils/url.d.ts +1 -3
- package/mobile/dist/utils/url.js +4 -8
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.fallback.js +1 -4
- package/mobile/lib/components/Footer/Footer.fallback.js.map +1 -1
- package/mobile/lib/components/Footer/Sitemap.d.ts +0 -2
- package/mobile/lib/components/Footer/Sitemap.js +2 -4
- package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
- package/mobile/lib/components/Header/Header.fallback.d.ts +1 -2
- package/mobile/lib/components/Header/Header.fallback.js +2 -7
- package/mobile/lib/components/Header/Header.fallback.js.map +1 -1
- package/mobile/lib/hooks/useLink.d.ts +6 -5
- package/mobile/lib/hooks/useLink.js +27 -19
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/services/BlockRouter/BlockRouter.js +1 -1
- package/mobile/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/lib/services/sitemap/fallbackWCMSResource.d.ts +2 -0
- package/mobile/lib/services/sitemap/fallbackWCMSResource.js +5 -0
- package/mobile/lib/services/sitemap/fallbackWCMSResource.js.map +1 -0
- package/mobile/lib/services/sitemap/isHrefActive.d.ts +4 -2
- package/mobile/lib/services/sitemap/isHrefActive.js +1 -6
- package/mobile/lib/services/sitemap/isHrefActive.js.map +1 -1
- package/mobile/lib/services/sitemap/isTopItemActive.js +4 -1
- package/mobile/lib/services/sitemap/isTopItemActive.js.map +1 -1
- package/mobile/lib/services/sitemap/useSWRResource.d.ts +1 -1
- package/mobile/lib/services/sitemap/useSWRResource.js +2 -2
- package/mobile/lib/setup-fixture.js +3 -1
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/utils/url.d.ts +1 -3
- package/mobile/lib/utils/url.js +2 -4
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/components/Footer/Footer.fallback.ts +1 -6
- package/mobile/src/components/Footer/Sitemap.tsx +2 -6
- package/mobile/src/components/Header/Header.fallback.ts +2 -12
- package/mobile/src/hooks/useLink.ts +31 -20
- package/mobile/src/services/BlockRouter/BlockRouter.ts +1 -1
- package/mobile/src/services/sitemap/fallbackWCMSResource.ts +7 -0
- package/mobile/src/services/sitemap/isHrefActive.ts +3 -12
- package/mobile/src/services/sitemap/isTopItemActive.ts +4 -1
- package/mobile/src/services/sitemap/useSWRResource.ts +2 -2
- package/mobile/src/setup-fixture.ts +3 -1
- package/mobile/src/utils/url.ts +4 -4
- package/package.json +1 -1
- package/src/components/Footer/Footer.fallback.ts +1 -6
- package/src/components/Footer/Sitemap.tsx +2 -6
- package/src/components/Header/Header.fallback.ts +2 -12
- package/src/hooks/useLink.ts +31 -20
- package/src/services/BlockRouter/BlockRouter.ts +1 -1
- package/src/services/sitemap/fallbackWCMSResource.ts +7 -0
- package/src/services/sitemap/isHrefActive.ts +3 -12
- package/src/services/sitemap/isTopItemActive.ts +4 -1
- package/src/services/sitemap/useSWRResource.ts +2 -2
- package/src/setup-fixture.ts +3 -1
- package/src/utils/url.ts +4 -4
- package/bundle/services/sitemap/mergeTopItems.d.ts +0 -2
- package/dist/services/sitemap/mergeTopItems.d.ts +0 -2
- package/dist/services/sitemap/mergeTopItems.js +0 -8
- package/dist/services/sitemap/mergeTopItems.js.map +0 -1
- package/lib/services/sitemap/mergeTopItems.d.ts +0 -2
- package/lib/services/sitemap/mergeTopItems.js +0 -5
- package/lib/services/sitemap/mergeTopItems.js.map +0 -1
- package/mobile/bundle/services/sitemap/mergeTopItems.d.ts +0 -2
- package/mobile/dist/services/sitemap/mergeTopItems.d.ts +0 -2
- package/mobile/dist/services/sitemap/mergeTopItems.js +0 -8
- package/mobile/dist/services/sitemap/mergeTopItems.js.map +0 -1
- package/mobile/lib/services/sitemap/mergeTopItems.d.ts +0 -2
- package/mobile/lib/services/sitemap/mergeTopItems.js +0 -5
- package/mobile/lib/services/sitemap/mergeTopItems.js.map +0 -1
- package/mobile/src/services/sitemap/mergeTopItems.ts +0 -12
- package/src/services/sitemap/mergeTopItems.ts +0 -12
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),a=l("useState"),n=l("useEffect"),r=l("useCallback"),i=l("useMemo"),s=l("useRef");const o={PROD_BRANCH:"master"},c=new class{_=o;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||o.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 CDN(){return this._.CDN}get BASE_PATH(){return this._.BASE_PATH&&!this._.BASE_PATH.endsWith("/")?`${this._.BASE_PATH}/`:this._.BASE_PATH}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},d="likesToken";function m(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(d)||"");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(d,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/${c.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:a}=await e.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||0}catch(e){return console.error(e),0}}}}const h=(...e)=>globalThis._uni._jsx(...e),u=(...e)=>globalThis._uni._jsxs(...e),p=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:a,...n}=t||{},r=l?.slots?.default,i=a||r&&r();return e(Object.assign(n,i&&{children:i}),l)}return t.inheritAttrs=!1,t},g=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),b=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),f=[];function v(e,t){const{key:l,blockDecorator:a=b,blocksRegistry:n={},ancestors:r=f,className:i=""}=t,{type:s}=e;s&&s in n||console.warn(`No block with "${s}" is registered`);const o=s&&n[s];return a({blockClassName:g("scroll-mt-12",i,e.style||"col-span-12"),block:e,ancestors:r,render:({block:a,blockClassName:n})=>{const{content:r}=a;return o?h(o,{className:n,block:e,options:t,...r},l):null}},l)}const N=[],y=(e,{key:t,ancestors:l=N,slotName:a=null,renderChild:n=v,...r})=>(e||[]).map(((e,i)=>n(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...l||N,[r.parent,a]]:l})));function w({children:e,block:t,options:l,renderChild:a}){return e||(t&&l?y(t.blocks,{...l,parent:t,renderChild:a}):null)}const C={left:"text-left",center:"text-center",right:"text-right"};class k{static inst=new k;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}}function S(e,{sensitivity:t,rootRef:l}={}){const a=s(null),r=i((()=>({threshold:$(t),root:l?.current})),[t,l?.current]);return n((()=>{if(!a.current)return;const t=new IntersectionObserver(e,r);return t.observe(a.current),()=>{t.disconnect()}}),[e,r]),a}function $(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 I=e=>e?.replace("#",""),T=e=>`${globalThis.location?.pathname}#${I(e)}`;class B{static inst=new B;eventBus=new k;constructor(){const e=I(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=I(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",T(e))}replace(e){globalThis.history?.replaceState(null,"",T(e))}reset(){globalThis.history?.replaceState(null,"",T())}}const R={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","":""},V=p((({className:e="",version:t="primary",block:l,tag:i="section",role:s,children:o})=>{const c=i,d=function(e,t=B.inst){const l=S(r((l=>{if(!e||!l?.length)return;const a=l[l.length-1];t.eventBus.fire("intersection",{block:e,intersection:a})}),[e,t]),{sensitivity:1});return n((()=>{if(l.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{l.current&&e?.anchor===t&&l.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),l}(l),[m,u]=a(!0);return n((()=>k.inst.subscribe("tab",(e=>{if("group"===e.type){const t=l?.labels?.length||l?.anchor;u(!e.label||(!t||Boolean(l?.labels?.includes(e.label))))}else u(!0)}))),[l]),m?h(c,{className:g("group",R[t],e),...t?{"data-ver":t}:{},...l?.anchor?{id:l.anchor,ref:d}:{},role:s,children:o}):null})),j={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},L=p((({className:e="",headingType:t="h3",as:l="h3",title:a,children:n})=>h(l,{className:`font-sans m-0 ${j[t]} ${e}`,children:a||n}))),_=p((({children:e,...t})=>h("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),M=p((({children:e})=>h("ul",{className:"list-none m-0 p-0",children:e}))),D=p((({className:e="",title:t,accordionAlignTitle:l="center",description:a,...n})=>u(V,{className:`p-12 mb-1 last:mb-0 ${e}`,...n,children:[t?h(L,{headingType:"h3",as:"h2",className:`mb-2.5 ${C[l]}`,title:t}):null,a?h("div",{className:"mb-2.5",children:h(_,{size:"text-l",children:a})}):null,h(M,{children:w(n)})]})));D.childrenTypes=["AccordionItem"];const z=p((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:n,renderFoldButton:i})=>{const[s,o]=a(l),c=r((()=>{o((e=>!e))}),[]),d=n({isUnfolded:s,onToggle:c}),m=i?i({isUnfolded:s,onToggle:c}):null;return u("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),A=p((({className:e="",isUnfolded:t,children:l})=>{const a=s(null);return n((()=>{a.current&&(a.current.style.maxHeight=t?`${a.current.scrollHeight}px`:"")}),[t,l?.length]),h("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} ${e}`,children:l})})),O={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},P=p((({className:e="",imageClassName:t="",name:l="",alt:a=`Иконка ${l}`,title:n=a,iconVersion:r="color",asSVG:i,...s})=>{const o=`${c.CDN||""}icons/${l}.svg`;return i&&"normal"!==r?h(E,{className:e,children:u("svg",{className:g(F(s.width),O[r],"white"===r?"invert":"",t),...s,"aria-hidden":"true",children:[n?h("title",{children:n}):null,a?h("desc",{children:a}):null,h("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):h("img",{className:e,src:o,alt:a,title:n,...s,"aria-hidden":"true"})})),F=e=>e?"":"w-full h-full",E=p((({className:e,children:t})=>e?h("div",{className:e,children:t}):t)),U=(e,t)=>e.media&&t.media?e.media-t.media:0,H=p((({className:e="",image:t,imageClassName:l="",isMobile:a=!1,pathPrefix:n})=>{if(!t||!t?.sources&&!t?.src)return null;return u("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(U).map((({src:e,format:l,media:a},r)=>h("source",{srcSet:W(e,n),type:J(l),media:a?`(max-width: ${a}px)`:"",...t.size},`${r}_${e}`))):null,X({...t,src:G(t.src,n)},l,a)]})})),X=(e,t="",l=!1)=>{const a={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},n=e.title||"",r=e.alt||e.title,i=l?"m-auto":"m-0";return h("img",{src:e.src,className:`${i} ${t}`,alt:r,title:n,style:a,...e.size})},G=(e,t)=>!e||e?.startsWith("data:image")?e:`${((e="")=>e&&!e.endsWith("/")?`${e}/`:e)(t)}${e}`,W=(e,t)=>e?.split(",").map((e=>G(e.trim(),t))).join(", ");function J(e){return e?`image/${String(e)}`:void 0}const Y=p((({className:e="",image:t,imageClassName:l="",isMobile:a,pathPrefix:n,...r})=>t?.src||t?.icon?t.icon?h(P,{className:e,imageClassName:l,iconVersion:t?.iconVersion||"normal",name:t.icon,...r}):h(H,{className:e,imageClassName:l,image:t,isMobile:a,pathPrefix:n}):null)),K=p((({children:e,...t})=>h("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),q=["PlusIcon","MinusIcon"],Z=p((({className:e="",label:t="",isExpanded:l,...a})=>h("li",{className:`border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,children:h(z,{isFoldButtonOnTop:!0,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>h(A,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:w(a)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>h(Q,{label:t,icon:q[Number(e)],onClick:l})})})));Z.childrenTypes=[];const Q=p((({label:e,icon:t,onClick:l})=>u("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer",onClick:l,children:[h(K,{size:"text-xl",font:"font-medium",children:e}),h(Y,{image:{icon:t},className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0})]}))),ee=p((({className:e="",inputClassName:t="",id:l,name:a,type:n="text",label:i,value:s="",valid:o=!0,children:c,onChange:d,onBlur:m,...p})=>{const x=r((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=r((e=>{if(!m)return;const t=e.target.validity.valid?e.target.value:s;m(t)}),[m]),b=c?"pr-8":"",f=o?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return u("div",{className:`relative ${e}`,children:[i?h("label",{className:"block text-m-light mb-2",children:i}):null,h("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:a||l,type:n,value:s,onChange:x,onBlur:g,...p}),c]})})),te=new Map;function le(e,t,{fallback:l}={}){const r=i((()=>ae(e)),[e]),[s,o]=a(),[c,d]=a(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};n((()=>{if(!r.every((e=>null===e)))try{const e=t(...r);"then"in e?(e=>{e.then((e=>te.get(r)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...r]);const u=r[0],p=l&&"string"==typeof u&&l[u];return{data:!s&&p?p:s,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function ae(e){return e?Array.isArray(e)?e:e instanceof Function?ae(e()):[e]:[e]}async function ne(e,t){try{return await re(e,t)}catch(e){console.error(e)}return null}async function re(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function ie(){const{data:e}=le("/api/v1/regions",re);return e||[]}const se=[{code:"1",name:"Торговый эквайринг"},{code:"2",name:"Мобильный эквайринг"},{code:"3",name:"Интернет-эквайринг"},{code:"4",name:"QR-эквайринг (СБП)"},{code:"5",name:"Все виды эквайринга"}];const oe=e=>Boolean(e?.includes("//")),ce=(e,t)=>Boolean(e&&!oe(e)&&(!t||"_self"===t)),de=e=>Boolean(e?.startsWith("#")),me=e=>(e||"").replace(/\/?\?.*/,"");var he=Object.freeze({__proto__:null,isURL:oe,isLocalURL:ce,isHash:de,withoutQuery:me,getOrigin:e=>oe(e)?new URL(e).origin:void 0,getPathname:e=>oe(e)?new URL(e).pathname:void 0,getHash:e=>oe(e)?new URL(e).hash:void 0});const ue=(e,t)=>ue._impl(e,t);function pe(){return pe._impl()}function xe(e){const t=pe(),l=B.inst;return a=>({...a,"aria-label":a.text,onClick:ue((n=>{var r,i;a.onClick&&a.onClick(n),(r=a.href,i=a.target,a=>{!e&&ce(r,i)&&(a?.preventDefault(),de(r)?l.goto(r):r&&t.push(r))})(n)}),a)})}ue._impl=e=>e,ue.setup=e=>{ue._impl=e},pe._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),pe.setup=e=>{pe._impl=e};const ge={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","":""},be="bg-main-divider text-main-disabled",fe={primary:be,secondary:be,white:be,link:"",transparent:"",gray:be,"":""},ve="text-center font-sans select-none",Ne={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","":""},ye=p((e=>{const{text:t,aboveText:l,appendLeft:a,appendRight:n,version:r="primary"}=e;return u("div",{className:we(e),children:[a?h("div",{className:Ne[r],children:a}):null,Ce(e)?u("div",{children:[l?h("div",{className:"text-xs-light text-left",children:l}):null,h("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,n?h("div",{className:Ne[r],children:n}):null]})})),we=e=>{const{version:t,aboveText:l,rounded:a}=e;if("link"===t)return"";const n="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",Ce(e)?n:"h-12 w-12",a?"rounded-full":""].join(" ")},Ce=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ke=({className:e,rounded:t,version:l})=>["inline-block",ve,l?fe[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Se=({className:e,rounded:t,version:l})=>[ve,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",l?ge[l]:"",t?"rounded-full":"rounded-md",e].join(" "),$e=p((({disabled:e,children:t,...l})=>{const a=xe()(l),n=t??h(ye,{...a});return h(e?Te:Ie,{...a,children:n})})),Ie=p((({className:e="",href:t,rel:l,target:a,ariaLabel:n,version:r,rounded:i,onClick:s,children:o})=>h("a",{className:Se({className:e,version:r,rounded:i}),href:t,rel:l,target:a,"aria-label":n,role:t?"link":"button",onClick:s,children:o}))),Te=p((({className:e,ariaLabel:t,version:l,rounded:a,children:n})=>h("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ke({className:e,rounded:a,version:l}),children:n}))),Be=p((({link:e})=>u(_,{size:"text-s-light",color:"text-secondary-text",children:[h(K,{children:"Нажимая кнопку вы подтверждаете согласие с "}),e?h($e,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:h(K,{children:e.text})}):null]}))),Re=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Ve(e){const t=s(null);return n((()=>{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 je=p((({className:e="",isBorder:t=!0,label:l,options:i=[],value:s,onChange:o,placeholder:c=""})=>{const[d,m]=a(i[0]||{key:"",text:""}),[p,x]=a(!1),g=Ve(r((()=>x(!1)),[]));return n((()=>{m(s||{key:"",text:""})}),[s]),u("div",{className:`${e}`,ref:g,children:[l?h("span",{className:"mb-2 flex text-primary-text",children:l}):null,u("div",{className:"relative "+(p?"z-20":"z-10"),children:[u("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${Me(t)}`,onClick:()=>x(!p),children:[h("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),h(P,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(p?"":"rotate-180")})]}),i?.length?h("div",{className:`h-0 ${Le(p)}`,children:h("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:i.map(_e((e=>{m(e),x(!1),o(e)}),p,(e=>Boolean(e.key===d.key))))})}):null]})]})})),Le=e=>e?"":"overflow-hidden",_e=(e,t,l)=>(a,n)=>u("div",{onClick:()=>{e(a)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[h("span",{className:"min-h-6",children:a.text}),h(P,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(a)&&t?"":"hidden"].join(" ")})]},String(n)),Me=e=>e?"border border-gray rounded-md hover:border-primary-hover":"",De=p((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return h(je,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),ze=({acquiringType:e,regions:t,region:l,handleChange:a})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[h("div",{className:"w-1/2",children:h(De,{data:se,fieldValue:"code",fieldLabel:"name",selected:e,setSelected:e=>a({acquiringType:e}),label:"Вид эквайринга",placeholder:"Выберите эквайринг"})}),h("div",{className:"w-1/2",children:h(De,{data:t,fieldValue:"code",fieldLabel:"name",selected:l,setSelected:e=>a({region:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),Ae=p((({checked:e,text:t,onClick:l})=>u("div",{role:"checkbox","aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-4",onClick:()=>l&&l(),children:[h("div",{className:"relative duration-300 w-9 h-5 mr-3 rounded rounded-2xl "+(e?"bg-primary-main":"bg-main-divider"),children:h("div",{className:"absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded rounded-full "+(e?"left-[50%]":"left-[5%]")})}),h("div",{children:h(K,{size:"text-m",font:"font-light",color:"text-primary-text",children:t})})]}))),Oe=({"onlineСheckout":e,posTerminal:t,handleChange:l})=>u("div",{className:"mb-5",children:[h(Ae,{checked:e,text:"Хочу купить онлайн-кассу",onClick:()=>l({"onlineСheckout":!e})}),h(Ae,{checked:t,text:"Хочу купить POS-терминал",onClick:()=>l({posTerminal:!t})})]}),Pe=(e,t)=>{const l=Se({className:"text-white",version:e?.version});return h("button",{type:"submit",className:`p-4 ${l} ${t}`,children:e?.text?e.text:"Отправить заявку"})},Fe=({formState:e,handleSubmit:t,setFormState:l,typeForm:a})=>({handleChange:r((e=>l((t=>({...t,...e})))),[]),onSubmit:r((async l=>{l.preventDefault(),t&&await t({...e,typeForm:a})}),[])}),Ee=p((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({acquiringType:"",region:"",fullName:"",inn:"",name:"",phone:"","onlineСheckout":!1,posTerminal:!1}),{acquiringType:o,region:c,fullName:d,inn:m,name:p,phone:x,"onlineСheckout":g,posTerminal:b}=i,f=ie(),{handleChange:v,onSubmit:N}=Fe({formState:i,handleSubmit:r,setFormState:s,typeForm:"acqr"}),y=Re(c,f);return n((()=>{s((e=>({...e,acquiringType:se?.length&&se[0]?.code?se[0].code:""})))}),[]),u("form",{onSubmit:N,className:"container",children:[h(L,{headingType:"h6",title:"Вид эквайринга и регион",className:"text-center mb-4"}),ze({acquiringType:o,regions:f,region:y,handleChange:v}),h(L,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Ue({fullName:d,inn:m,name:p,phone:x,handleChange:v}),Oe({"onlineСheckout":g,posTerminal:b,handleChange:v}),Pe(t,"mb-4"),h(Be,{link:l})]})})),Ue=({fullName:e,inn:t,name:l,phone:a,handleChange:n})=>u("div",{className:"flex justify-between gap-5 mb-5",children:[u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})}),h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>n({name:e})})]}),u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text",label:"ИНН","aria-label":"ИНН",value:t,onChange:e=>n({inn:e})}),h(ee,{className:"shrink-0 text-l w-full",type:"text",label:"Телефон","aria-label":"Телефон",value:a,onChange:e=>n({phone:e})})]})]}),He=p((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({region:"",name:"",phone:"",inn:"",mail:""}),{name:s,phone:o,inn:c,mail:d}=r,m=ie(),{handleChange:p,onSubmit:x}=Fe({formState:r,handleSubmit:n,setFormState:i,typeForm:"bcrd"}),g=Re(r.region,m);return u("form",{onSubmit:x,className:"container",children:[Ge({regions:m,region:g,handleChange:p}),Xe({name:s,phone:o,inn:c,mail:d,handleChange:p}),Pe(t,"mb-4"),h(Be,{link:l})]})})),Xe=({name:e,phone:t,mail:l,inn:a,handleChange:n})=>u("div",{className:"flex justify-between gap-5",children:[u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:e,onChange:e=>n({name:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:a,onChange:e=>n({inn:e})})]}),u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>n({phone:e})}),h(ee,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:l,onChange:e=>n({mail:e})})]})]}),Ge=({regions:e,region:t,handleChange:l})=>h("div",{className:"flex justify-between gap-5 mb-5",children:h("div",{className:"w-full",children:h(De,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>l({region:e}),label:"Регион",placeholder:"Выберите регион"})})}),We=[];function Je(e){const{data:t}=le(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ye);return t||We}const Ye=async e=>await ne(e,{method:"GET"})||We,Ke=({regions:e,region:t,branches:l,department:a,handleChange:n})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[h("div",{className:"w-1/2",children:h(De,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>n({region:e}),label:"Регион",placeholder:"Выберите регион"})}),h("div",{className:"w-1/2",children:h(De,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:e=>n({department:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),qe=e=>new Intl.NumberFormat("ru-RU",{}).format(e),Ze=(e,t,l)=>Math.max(t,Math.min(e,l)),Qe=e=>e.split(/\s+/).join(""),et=p((({className:e,title:t,items:l=[],min:a=1,max:n=100,step:r=1,value:i=a,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(Ze(Number(Qe(e.target.value)),a,n))},d={backgroundSize:`${(100*(i-a)/(n-a)).toFixed(2)}% 100%`};return u("div",{className:e,children:[u("label",{className:"block relative",children:[t?h("span",{className:"text-m-light text-primary-text",children:t}):null,h("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md\n 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",value:qe(i),disabled:s,onChange:c,onBlur:c}),h("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:h("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:a,max:n,step:r,value:i,disabled:s,onChange:c,style:d})})]}),tt(l)]})}));function tt(e){return h("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>h("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const lt=({amount:e,term:t,handleChange:l})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[at({label:"Сумма кредита, ₽",value:e,onChange:e=>l({amount:e}),min:rt,max:it,items:st}),at({label:"Срок кредита, месяцев",value:t,onChange:e=>l({term:e}),min:ot,max:ct,items:dt})]}),at=e=>u("div",{className:"w-1/2",children:[h("label",{children:h(K,{size:"text-m-light",children:e.label})}),h(et,{...e})]}),nt=({fullName:e,inn:t,name:l,phone:a,mail:n,annualRevenue:r,handleChange:i})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>i({fullName:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:t,onChange:e=>i({inn:e})}),h(ee,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Телефон",label:"Телефон",value:a,onChange:e=>i({phone:e})})]}),u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Годовая выручка, ₽",label:"Годовая выручка, ₽",value:r,onChange:e=>i({annualRevenue:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>i({name:e})}),h(ee,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:n,onChange:e=>i({mail:e})})]})]}),rt=5e4,it=3e6,st=["От 50 000 ₽","До 3 000 000 ₽"],ot=1,ct=60,dt=["От 1 года","До 5 лет"],mt=p((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({amount:rt,term:ot,fullName:"",inn:"",name:"",phone:"",mail:"",region:"",department:"",annualRevenue:""}),{amount:o,term:c,fullName:d,inn:m,name:p,phone:x,mail:g,region:b,department:f,annualRevenue:v}=i,N=ie(),{handleChange:y,onSubmit:w}=Fe({formState:i,handleSubmit:r,setFormState:s,typeForm:"cred"}),C=Re(i.region,N),k=Je(b);return n((()=>{y({department:""})}),[i.region,y]),u("form",{onSubmit:w,className:"container",children:[h(L,{headingType:"h6",title:"Параметры кредита",className:"text-center mb-4"}),lt({amount:o,term:c,handleChange:y}),h(L,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),nt({fullName:d,inn:m,name:p,phone:x,mail:g,annualRevenue:v,handleChange:y}),h(L,{headingType:"h6",title:"Офис банка",className:"text-center mb-4"}),Ke({regions:N,region:C,branches:k,department:f,handleChange:y}),Pe(t,"mb-4"),h(Be,{link:l})]})})),ht=p((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({name:"",phone:""}),{handleChange:s,onSubmit:o}=Fe({formState:r,handleSubmit:n,setFormState:i,typeForm:"dpst"});return u("form",{onSubmit:o,className:"container",children:[h(L,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"text-center mb-4"}),ut({name:r.name,phone:r.phone,handleChange:s}),u("div",{className:"flex justify-between items-center max-w-[560px] m-auto",children:[h("div",{className:"flex-1",children:h(Be,{link:l})}),Pe(t)]})]})})),ut=({name:e,phone:t,handleChange:l})=>u("div",{className:"max-w-[560px] m-auto",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Имя",label:"Имя",value:e,onChange:e=>l({name:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>l({phone:e})})]}),pt=p((({className:e,viewBox:t,fill:l="none",width:a,height:n,paths:r,...i})=>h("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:a,height:n,children:r.map((({d:e,fill:t,...l},a)=>h("path",{d:e,fill:t||"currentColor",...i,...l},a)))}))),xt=[{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"}],gt=p((({className:e,text:t,checked:l,disabled:a,isRadio:n,onChange:r})=>h("div",{className:e,children:u("label",{className:"flex items-center relative cursor-pointer group/box",children:[h("input",{className:g("peer appearance-none w-5 h-5 border-solid cursor-pointer checked:border-primary-main m-0",n?"rounded-full border-2":"rounded checked:bg-primary-main disabled:bg-main-disabled border",l?"border-black":"border-gray",a?"":"group-hover/box:border-primary-hover"),type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l,disabled:a}),n?h("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):h(pt,{paths:xt,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?h("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),bt=({currencyControl:e,documentaryOperations:t,conversionOperations:l,text:a,handleChange:n})=>u("div",{className:"mb-6",children:[u("div",{className:"flex items-center mb-4 gap-6",children:[h(gt,{text:"Валютный контроль",checked:e,onChange:e=>n({currencyControl:e})}),h(gt,{text:"Документарные операции",checked:t,onChange:e=>n({documentaryOperations:e})}),h(gt,{text:"Конверсионные операции",checked:l,onChange:e=>n({conversionOperations:e})})]}),h("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:border-primary-text focus:border-primary-text",value:a,onChange:e=>n({text:e.target.value})})]}),ft=p((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""}),{fullName:s,name:o,phone:c,mail:d,currencyControl:m,documentaryOperations:p,conversionOperations:x,text:g}=r,{handleChange:b,onSubmit:f}=Fe({formState:r,handleSubmit:n,setFormState:i,typeForm:"kved"});return u("form",{onSubmit:f,className:"container",children:[h(L,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),vt({fullName:s,name:o,phone:c,mail:d,handleChange:b}),h(L,{headingType:"h6",title:"Интересующий вопрос",className:"text-center mb-4"}),bt({currencyControl:m,documentaryOperations:p,conversionOperations:x,text:g,handleChange:b}),u("div",{className:"flex items-center pb-9 mb-9 border-b border-main-divider",children:[Pe(t,"mr-5"),h(Be,{link:l})]}),h(L,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"text-center mb-4"}),u("div",{className:"flex",children:[u("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:[h(Y,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),h("span",{children:"8 (800) 200-78-70"})]}),u("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[h(Y,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),h("span",{children:"ved@rshb.ru"})]})]})]})})),vt=({fullName:e,name:t,phone:l,mail:a,handleChange:n})=>u("div",{children:[u("div",{className:"flex justify-between gap-5 mb-5",children:[h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})})}),h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"ФИО",label:"ФИО",value:t,onChange:e=>n({name:e})})})]}),u("div",{className:"flex justify-between gap-5 mb-7",children:[h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Телефон",label:"Телефон",value:l,onChange:e=>n({phone:e})})}),h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:a,onChange:e=>n({mail:e})})})]})]}),Nt=p((({responceType:e})=>{const t="OK"===e;return u("div",{className:`flex items-center mt-5 p-5 rounded-md ${t?"bg-responce-ok":"bg-responce-fail"}`,children:[h(Y,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42",className:"mr-4"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34",className:"mr-4"}),u("div",{children:[h(L,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),h(K,{size:"text-l-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),yt={credit:e=>h(mt,{...e}),acquiring:e=>h(Ee,{...e}),"business-card":e=>h(He,{...e}),deposit:e=>h(ht,{...e}),wed:e=>h(ft,{...e})},wt=p((e=>{const{className:t="",title:l,typeForm:n="credit",button:i,link:s,...o}=e,[c,d]=a(""),m=r((()=>(d("OK"),"OK")),[]);return h(V,{className:`font-sans bg-white p-[50px] pb-9 ${t}`,...o,children:u("div",{className:"container max-w-[978px]",children:[l?h(L,{headingType:"h3",title:l,className:"text-center mb-8"}):null,yt[n]({button:i,link:s,handleSubmit:m}),c?h(Nt,{responceType:c}):null]})})})),Ct=p((({className:e="",title:t,benefitList:l,...a})=>u(V,{className:`p-12 flex flex-col items-center ${e}`,...a,children:[t?h(L,{headingType:"h3",as:"h2",className:"max-w-[47rem] text-center",title:t}):null,l?.length?h("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(kt)}):null]}))),kt=(e,t)=>{const l=e.description;return u("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[e?.icon?.icon?h(Y,{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,asSVG:!0}):null,e?.icon?.src?h(Y,{image:e.icon}):null,u("div",{className:"ml-5",children:[e?.label?h(L,{headingType:"h6",children:e.label}):null,St(l)]})]},String(t))},St=e=>{const t=e?.benefitType||null;return e&&t?h("div",{className:"mt-2 text-l-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?It(e):$t(e)}):null},$t=e=>e?.name||null,It=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?h("ul",{className:t,children:e.items.map(((e,t)=>h("li",{children:e},`benefitListItem-${t}`)))}):null},Tt=(e,{className:t="",buttonClassName:l,isVertical:a}={})=>e?.length&&e.some((e=>e?.text))?h("div",{className:g("flex",a?"flex-col gap-2":"gap-4",t),children:e.map(Bt(l))}):null,Bt=(e="")=>(t,l)=>{const{text:a,icon:n,iconRight:r,version:i,...s}=t||{},o="secondary"===i?"color":"white";return a?h($e,{className:e,appendLeft:Rt({...n,iconVersion:o}),appendRight:Rt({...r,iconVersion:o}),version:i,text:a,...s},l?String(l):""):null},Rt=e=>e?.icon||e?.src?h(Y,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,Vt={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},jt={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"},Lt=p((({className:e,title:t,description:l,headlineVersion:a="XL",align:n="text-center",as:r,version:i="",...s})=>{const o=Vt[a];return u(V,{className:g("flex flex-col p-12",o.wrapper,e),version:i,...s,children:[t?h(L,{className:g("whitespace-pre-wrap",n),...o?.title,as:r||o?.title.as,title:t}):null,l?h(_,{color:"group-data-secondary:text-white/80",size:o.descriptionSize,align:n,children:l}):null]})})),_t=p((e=>{const{className:t="",title:l,description:a,bonusItems:n,...r}=e;return h(V,{className:`p-12 pb-9 ${t}`,...r,children:u("div",{className:"container",children:[h(Lt,{className:"!p-0",title:l,description:a,headlineVersion:"M"}),h("div",{className:"flex flex-wrap w-full mt-9",children:n?.length?n.map(((e,t)=>h("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:u("div",{className:"flex justify-between w-full",children:[u("div",{className:"flex flex-col justify-between mr-4",children:[u("div",{children:[h("div",{className:"text-h4",children:e.title}),h("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),Tt(e?.buttons)]}),e.bonusItemContent?.bonusType?Mt(e.bonusItemContent):null]})},String(t)))):null})]})})})),Mt=e=>h("div",{children:"count"===e.bonusType?Dt(e):zt(e)}),Dt=e=>u("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?h("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?h("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),zt=e=>e.image?h(Y,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,At=p((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:a="4",subtitle:n,title:r,...i})=>u(V,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...i,children:[h(Lt,{className:"!p-0 mb-8",title:r,description:n,headlineVersion:"M"}),e?.length?h("div",{className:`grid gap-1 ${C[t]} ${Pt(a)}`,children:e.map(Ot)}):null]}))),Ot=({icon:e,label:t,description:l},a)=>u("div",{className:"flex flex-col items-center text-h6",children:[l?h("span",{children:l}):null,e?h(Y,{image:e,height:"180",width:"auto",className:"h-[180px] w-auto"}):null,h("div",{children:t?h("span",{children:t}):null})]},String(a)),Pt=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ft=p((e=>{const{title:t,image:l,cardItems:a,button:n}=e;return u("div",{className:"border-gray border p-9 w-1/2",children:[l?u("div",{className:"flex justify-center",children:[l?.src?h(Y,{className:"mb-5",image:l}):null,l?.icon?h(Y,{image:l,asSVG:!0}):null]}):null,t?h(L,{headingType:"h4",title:t,className:"mb-6"}):null,a?.length?h("ul",{children:a.map(((e,t)=>Et(e,String(t))))}):null,Tt([n],{buttonClassName:"mt-6"})]})})),Et=(e,t)=>{const{icon:l,text:a}=e;return u("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?h(Y,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",asSVG:!0}):null,l?.src?h(Y,{image:l}):null,h("span",{className:"text-xl-light",children:a})]},t)},Ut=p((({className:e="",title:t,cards:l,...a})=>u(V,{className:`p-12 pb-9 ${e}`,...a,children:[h(L,{headingType:"h3",title:t,className:"text-center mb-8"}),h("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>h(Ft,{...e},String(t)))):null})]}))),Ht=p((({button:e,...t})=>h(V,{...t,children:Tt([e])}))),Xt=e=>{const{itemCount:t,visibleItemCount:l,isCyclic:n}=e,[i,s]=a(0),o=r((()=>s((e=>n?(e+1)%t:Math.min(e+1,t-1)))),[n,t]),c=r((()=>s((e=>n?(t+e-1)%t:Math.max(e-1,0)))),[n,t]),d=n||function(e,{itemCount:t,visibleItemCount:l,container:a}){if(l)return t>l;if(a){return a.scrollWidth*e/t+a.clientWidth<a.scrollWidth}return!1}(i,e)&&i<t-(l||1),m=n||i>0;return[i,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};const Gt=p((({className:e,disabled:t,...l})=>h($e,{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:h(Y,{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",asSVG:!0})}))),Wt=p((e=>h(Gt,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Jt=p((e=>h(Gt,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function Yt({dec:e,inc:t,canDec:l,canInc:a,btnClass:n,className:r=""}){return l||a?u("div",{children:[l?h(Gt,{className:`absolute z-50 ${n[0]} ${r}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,a?h(Gt,{className:`absolute z-50 rotate-180 ${n[1]} ${r}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Kt=p((({title:e,value:t,postfix:l="",prefix:a,className:n=""})=>u("div",{className:g("mb-7",n),children:[e?h(K,{size:"text-l-light",color:"text-secondary-text",children:e}):null,h("div",t?{children:u(K,{size:"text-h3",children:[a," ",qe(Math.round(t))," ",l]})}:{children:h(K,{size:"text-h3",children:"-"})})]}))),qt=2e6,Zt=97e4,Qt=Math.round(23.5),el={minSum:6e4,maxSum:qt,minMonths:13,maxMonths:60,rateBottomRange:12,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},tl={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ll={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:120,rate:5.9,isMonthlyInterestPayment:!0},al={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:5.9,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},nl=p((({rate:e,title:t="Ставка",unit:l,depositeName:a,isShowDepositeName:n,rateBlockClassName:r})=>u("div",{children:[h(K,{size:"text-l-light",color:"text-secondary-text",children:t}),u("div",{className:"relative",children:[u("div",{className:"flex justify-start",children:[h("span",{className:g("block gradient-color-text font-mohave text-title-huge pr-6 -mt-4",r),children:String(e).replace(".",",")}),l?h("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]}),a&&n?h("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:a}):null]})]}))),rl=e=>e?h(_,{size:"text-s-light",color:"text-secondary-text",children:e}):null,il=1e3;function sl(e,t,l){const{moneyValue:a,minSum:n,maxSum:r,step:i=il,isShowItems:s=!0}=t,o=[`От ${qe(n)} ₽`,`До ${qe(r)} ₽`];return h(et,{title:e,items:s?o:[],min:n,max:r,step:i,value:Ze(a,n,r),onChange:l})}function ol(e){const{data:t}=le(`/wcms-resources/${e}.json`,re);return t}const cl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:a}=e,n=ol(t||"bonus-calculator-data")||tl,[r,i]=((e,t,l)=>{const{minSumTravel:a,minSumOther:n,maxBonus:r,prefMonthsNum:i,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===a&&l===n)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)]})(n,l,a);return{...n,...e,monthBonus:r,yearBonus:i}},dl=p((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[i,s]=a(6e3),o=r((e=>s(e)),[]),[c,d]=a(6e3),m=r((e=>d(e)),[]),p={travelExpenseValue:i,restExpenseValue:c},{minSumTravel:x,maxSumTravel:b,minSumOther:f,maxSumOther:v,monthBonus:N,yearBonus:y}=cl(p,t);return u("section",{className:g("flex justify-between",e),children:[u("div",{className:"w-[468px]",children:[sl("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:b,moneyValue:i,step:500,isShowItems:!1},o),sl("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:f,maxSum:v,moneyValue:c,step:500,isShowItems:!1},m)]}),h("div",{children:N>=0?h(nl,{title:"Баллов за месяц",rate:N,rateBlockClassName:"tracking-[-14px]"}):null}),u("div",{className:"w-full max-w-[350px]",children:[y>=0?h(Kt,{title:"Баллов за год",value:y}):null,Tt(l,{className:"mt-7",isVertical:!0}),rl(n)]})]})}));function ml(e,t,l){const{minDays:a,maxDays:n,daysValue:r}=t,i=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`;return h(et,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(n)}`],min:a,max:n,step:1,value:Ze(r,a,n),onChange:l})}const hl=p((({items:e,checkedItem:t,onChange:l})=>h("div",{className:"flex flex-col gap-3",children:e?.map((({id:e,text:a})=>h(gt,{isRadio:!0,text:a,checked:t===e,onChange:()=>l&&l(e)},String(e))))}))),ul="everyMonth",pl="atEndTerm",xl=[{id:ul,text:"Ежемесячно"},{id:pl,text:"В конце срока"}];function gl(e,t,l){return u("div",{children:[l?h(K,{color:"text-secondary-text",font:"font-light",children:l}):null,h("div",{className:"mt-3",children:h(hl,{items:xl,checkedItem:e?ul:pl,onChange:e=>t&&t(e===ul)})})]})}const bl=p((({title:e="Ставка"})=>u("div",{children:[h(K,{size:"text-l-light",color:"text-secondary-text",children:e}),h("div",{className:"mt-1 pt-1 pl-5 pb-1.5",children:h(Y,{image:{icon:"PercentIcon"},width:"90",height:"85",asSVG:!0})}),h("div",{className:"w-[250px] mt-3.5",children:u(_,{size:"text-xl-light",color:"text-primary-text",children:["Процентная ставка для срока ",h("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),fl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,daysValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n/30)-a):Math.round(a*e*n/365/100)},vl=p((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:i,isShowDepositeName:s})=>{const[o,c]=a(1e5),d=r((e=>c(e)),[]),[m,p]=a(90),x=r((e=>p(e)),[]),[g,b]=a(!1),f=r((e=>b(e)),[]),[v,N]=a(!1),y=r((e=>N(e)),[]),[w,C]=a(!1),k=r((e=>C(e)),[]),[S,$]=a(!1),I=r((e=>$(e)),[]),T=((e,t)=>{const{daysValue:l,moneyValue:a,isPartialWithdrawal:n,isReplenished:r,isSmallBusiness:i,isMonthlyInterestPayment:s}=e,o=ol(t||"business-calculator-data"),c=r||n,d=l<90||l>730;if(l<=30)return{...al,...e,isDisabledOperatingDeposit:d,rate:0};const m=o?.rows?.find((e=>s===e.isMonthlyInterestPayment&&i===e.isSmallBusiness&&(c?e.isReplenished&&e.isPartialWithdrawal:!e.isReplenished&&!e.isPartialWithdrawal)))||al,{rate:h}=m,u=fl(h,e),p=a+u;return{...m,...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})({moneyValue:o,daysValue:m,isReplenished:g,isPartialWithdrawal:v,isSmallBusiness:w,isMonthlyInterestPayment:S},t),{income:B,finalSum:R,rate:V,depositeName:j}=T;return u("section",{className:e,children:[u("div",{className:"flex justify-between",children:[u("div",{className:"w-[486px]",children:[sl("Сумма вклада, ₽",T,d),ml("Срок вклада, дни",T,x),u("div",{className:"mt-7 flex justify-between",children:[Nl({...T,handleIsReplenished:f,handleIsPartialWithdrawal:y,handleIsSmallBusiness:k}),gl(S,I,"Выплата процентов")]})]}),V?h(nl,{rate:V,depositeName:j,isShowDepositeName:s,rateBlockClassName:"tracking-[-25px]",unit:"%"}):h(bl,{}),u("div",{className:"w-full max-w-[350px]",children:[h(Kt,{title:"Доход по вкладу",value:B,postfix:"₽",prefix:"+"}),h(Kt,{title:"Сумма в конце срока",value:R,postfix:"₽"}),Tt(l,{className:"mt-7",isVertical:!0}),h("div",{className:"mt-7",children:rl(n)})]})]}),h("div",{className:"mt-5",children:rl(i)})]})})),Nl=({isDisabledOperatingDeposit:e,isReplenished:t,isPartialWithdrawal:l,isSmallBusiness:a,handleIsReplenished:n,handleIsPartialWithdrawal:r,handleIsSmallBusiness:i})=>u("div",{children:[h(gt,{text:"Пополнение",disabled:e,checked:t,onChange:n}),h(gt,{className:"mt-3",disabled:e,text:"Частичное снятие",checked:l,onChange:r}),h(gt,{className:"mt-3",text:"Являюсь малым предприятием",checked:a,onChange:i})]});function yl(e,t,l){const{minMonths:a,maxMonths:n,monthsValue:r}=t,i=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return h(et,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(n)}`],min:a,max:n,step:1,value:Ze(r,a,n),onChange:l})}const wl=(e,t)=>{const{isInsurance:l,isSalaryClient:a,isStateEmployee:n,moneyValue:r}=e,i=ol(t||"credit-calculator-data")?.rows?.find((e=>l===e.isInsurance&&a===e.isSalaryClient&&n===e.isStateEmployee))||el,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=i,d=r<=c?s:o,m=((e,t)=>{const{isAnnuity:l,moneyValue:a,monthsValue:n}=t;if(l){const t=e/1200;return a*(t+t/(Math.pow(1+t,n)-1))}return Math.round(a/n)+a*(e/1200)})(d,e);return{...i,...e,finalRate:d,monthlyPayment:m}},Cl="annuity",kl="differential",Sl=[{id:Cl,text:"Аннуитетный"},{id:kl,text:"Дифференцированный"}],$l=p((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[i,s]=a(!1),[o,c]=a(!0),[d,m]=a(!1),[p,x]=a(!1),[b,f]=a(Zt),v=r((e=>f(e)),[]),[N,y]=a(Qt),w=r((e=>y(e)),[]),C=wl({isAnnuity:i,isInsurance:o,isSalaryClient:d,isStateEmployee:p,moneyValue:b,monthsValue:N},t);return u("section",{className:g("flex justify-between",e),children:[u("div",{className:"w-[468px]",children:[sl("Сумма кредита, ₽",{...C,step:500},v),yl("Срок кредита, месяцев",C,w),u("div",{className:"mt-7",children:[h(gt,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:d,onChange:m}),h(gt,{className:"mt-3",text:"Работаю в бюджетной организации",checked:p,onChange:x}),h(gt,{className:"mt-3",text:"Комплексная страховая защита",checked:o,onChange:c})]})]}),h(nl,{title:"Ставка",rate:C.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),u("div",{className:"w-full max-w-[350px]",children:[h(Kt,{title:i?"Ежемесячный платеж":"Платёж в первый месяц",value:C.monthlyPayment,postfix:"₽"}),h(hl,{items:Sl,checkedItem:i?Cl:kl,onChange:e=>s(e===Cl)}),Tt(l,{className:"mt-7",isVertical:!0}),rl(n)]})]})})),Il=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,monthsValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n)-a):Math.round(a*e*30*n/365/100)},Tl={CreditCalculatorForm:$l,DepositCalculatorForm:p((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[i,s]=a(Zt),o=r((e=>s(e)),[]),[c,d]=a(Qt),[m,p]=a(!1),x=r((e=>p(e)),[]),b={moneyValue:i,monthsValue:c,isMonthlyInterestPayment:m},f=r((e=>d(e)),[]),v=((e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a}=e,n=ol(t||"deposit-calculator-data")?.rows?.find((e=>l===e.isMonthlyInterestPayment))||ll,{rate:r}=n,i=Il(r,e),s=a+i;return{...n,...e,income:i,finalSum:s}})(b,t),{income:N,finalSum:y,rate:w}=v;return u("section",{className:g("flex justify-between",e),children:[u("div",{className:"w-[468px]",children:[sl("Сумма вклада, ₽",{...v},o),yl("Срок вклада, месяцев",{...v},f)]}),h(nl,{rate:w||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),u("div",{className:"w-full max-w-[350px]",children:[N?h(Kt,{title:"Доход по вкладу",value:N,postfix:"₽",prefix:"+"}):null,y?h(Kt,{title:"Сумма в конце срока",value:y,postfix:"₽"}):null,gl(m,x),Tt(l,{className:"mt-7",isVertical:!0}),rl(n)]})]})})),BusinessDepositCalculatorForm:vl,BonusCalculatorForm:dl},Bl=(e,t)=>{const l=e?.calcType;if(!l||!(l in Tl))return null;const a=Tl[l];return h("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:u("div",{className:"box-border p-9 w-full",children:[e?.title?h(L,{className:"text-center mb-6",title:e.title}):null,h(a,{...e})]})},String(t))},Rl=p((({className:e="",calculatorTabs:t=[],...l})=>{const n=t.map((e=>e.nav||{})),i=t.map((({calculatorBlock:e})=>e||{})),[s,o]=a(0),c=r((e=>o(e)),[]),[d,m]=Xt({itemCount:t?.length,visibleItemCount:3});return u(V,{className:`box-border overflow-hidden relative w-100 ${e}`,...l,children:[u("div",{className:"bg-white",children:[n.length>1?Vl({activeIndex:d,tabsNav:n,slideIndexShift:s,onClick:c}):null,Yt({...m,btnClass:["left-3","right-3"],className:"top-8"})]}),h("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(Bl):null})]})}));function Vl({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:a}){return u("div",{children:[h("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:h("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:a}){const n=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 u("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${n}`,children:[h(Y,{className:`h-6 w-6 min-w-6 min-h-6 mr-4 ${s}`,image:{...e?.icon,iconVersion:o??c},width:"24",height:"24",asSVG:!0}),u("div",{className:"border-0",children:[h("div",{className:`${r}`,children:e?.title}),h("div",{className:`${i}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})}),h("div",{className:"w-full h-2 bg-primary-main"})]})}const jl=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Ll=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},_l=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),Ml=p((({className:e="",onChange:t,minValue:l=0,maxValue:a=3e5,...n})=>{const i=r((e=>{if(!t)return;const n=jl(Ll(_l(Qe(e))));const r=Dl(n,Ze(Number(n),l,a));t(String(r))}),[t]),s=r((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(Qe(l))).replace(",",".")))}),[t]);return h(ee,{className:e,inputClassName:"w-full",onChange:i,onBlur:s,...n,children:h("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),Dl=(e,t)=>Number(e)===t?e:String(t),zl=p((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:i,...s})=>{const[o,c]=a(""),d=r((e=>c(e)),[]),m=!Number(Qe(o)),p=m?ke({version:i?.version}):Se({className:"text-white",version:i?.version}),x=xe();return u(V,{className:`p-12 flex flex-col items-center ${e}`,...s,children:[t?h(L,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,u("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[h(Ml,{name:"amount",value:o,onChange:d,valid:""===o||!m,placeholder:n,label:l}),i?.text?h("button",{type:"submit",className:`w-full p-4 mt-6 ${p} `,disabled:m,...x(i),children:i.text}):null]})]})})),Al=p((({className:e="",style:t,idx:l,activeIndex:a,observerOptions:n,children:i,onIntersection:s})=>{const o=S(r((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),n);return h("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(l===a),ref:o,children:i})})),Ol=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],Pl="866px",Fl=p((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:a=0,gap:n=0,padding:i=0,listType:o="horizontal-list",snapAlign:c="snap-center",children:d,onVisibleItemsChange:m,onVisibleIndicesChange:u})=>{const p={sensitivity:1,rootRef:t},x=s([]),b=r(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,m&&m(l),u&&u(Ul(l))}),[m,u]),f=a>0?n*Number(a)-1:0,v="vertical-list"===o,N="horizontal-list"===o,y={...N?El(i,f):{},...v?{height:Pl}:{},gap:`${n}px`},w={...N?El(i/4):{},maxHeight:Pl};return h("div",{className:g("box-border overflow-auto no-scrollbar",o,e),style:y,role:"list",ref:t,children:(C=(e,t)=>h(Al,{className:g(c,a?Ol[a-1]:"",v?"h-full":""),style:w,activeIndex:l,idx:t,observerOptions:p,onIntersection:b,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(d)});var C})),El=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ul=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Hl=e=>e,Xl=(e=Hl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Gl=(e=Hl)=>Xl((t=>-e(t))),Wl=e=>t=>e.scrollWidth/t,Jl=e=>(t,l)=>{e.scrollBy({left:l*Wl(e)(t),behavior:"smooth"})},Yl=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const n=s(null),[i,o]=a([]),c=r((e=>{o((t=>{return(l=t)===(a=e)||Boolean(l&&a&&l?.length===a?.length&&l.every(((e,t)=>e===a[t])))?t:e;var l,a})),l&&l(e)}),[e]),[d,m]=i.length?[Gl()(i),Xl()(i)]:[-1,-1],h=d>0,u=m<e-1,p=r((()=>{var l;n.current&&(t&&!h?(l=n.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):Jl(n.current)(e,-1))}),[t,e,h]),x=r((()=>{n.current&&(t&&!u?n.current.scrollTo({left:0,behavior:"smooth"}):Jl(n.current)(e,1))}),[e,t,u]);return[n,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},Kl="absolute top-[calc(50%-24px)] z-50",ql="absolute top-0 bottom-0 z-50 w-[84px] pointer-events-none",Zl=p((({scroll:e,arrowsPadded:t,isBlur:l,onScrollLeft:a,onScrollRight:n,hasEdgeBlocks:i,activeIndex:s,itemCount:o})=>{const{canScrollLeft:c,canScrollRight:d,scrollLeft:m,scrollRight:p}=e,x=i?s>0:c,b=i?s<o-1:d,f=r((()=>{i?(c&&s!==o-1&&m(),a()):m()}),[m,a,i,c,s,o]),v=r((()=>{i?(d&&0!==s&&p(),n()):p()}),[p,n,i,c,s,o]);return u("div",{children:[Ql(l,e),x?h(Wt,{className:g(Kl,t?"left-8":"left-0"),onClick:f}):null,b?h(Jt,{className:g(Kl,t?"right-8":"right-0"),onClick:v}):null]})})),Ql=(e,t)=>(t.canScrollLeft||t.canScrollRight)&&e?u("div",{children:[h("div",{className:g(ql,"left-0 bg-opacity-from-white")}),h("div",{className:g(ql,"right-0 bg-opacity-to-white")})]}):null,ea=p((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:i=!1,arrowsPadded:s=!0,isPadding:o=!0,...c})=>{const{blocks:d}=c.block||{},m=t||d?.length||0,[p,x]=a(Math.floor((l||0)/2)),b=r((()=>x((e=>e+1))),[]),f=r((()=>x((e=>e-1))),[]),[v,N]=Yl({itemCount:m,isCyclic:i}),y=d&&"CarouselBankHistoryCard"===d[0]?.type;return h(V,{className:g(la(o),e),...c,children:u("div",{className:"relative max-w-full",children:[h(Fl,{containerRef:v,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:N.handleVisibleIndicesChange,children:w({...c,block:{...c.block,blocks:ta(d,p)}})}),h(Zl,{scroll:N,isBlur:n,arrowsPadded:s,onScrollLeft:f,onScrollRight:b,hasEdgeBlocks:y,activeIndex:p,itemCount:m})]})})}));ea.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard"];const ta=(e,t)=>e&&"CarouselBankHistoryCard"===e[0]?.type?e.map(((l,a)=>({...l,content:{...l.content,orderNumber:a,isActive:t===a,blocksLength:e.length}}))):e,la=e=>e?"p-12":"",aa=p((({title:e,description:t,isActive:l,orderNumber:a=0,blocksLength:n=0})=>h(V,{className:"flex h-[485px]",children:h("div",l?{className:"relative flex items-center w-full",children:h(Lt,{headlineVersion:"S",title:e,description:t,align:"text-left",className:g("absolute z-10 h-[385px] w-[440px] text-white shadow-dark-blue",ia(a,n),na(a))})}:{className:"flex w-full items-center justify-center",children:h("div",{className:g("flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]",na(a)),children:h("span",{className:ra(a),children:e})})})}))),na=e=>{switch(e%3){case 0:default:return"bg-primary-main";case 1:return"bg-green-light";case 2:return"bg-yellow-light"}},ra=e=>{switch(e%3){case 1:case 2:return"gradient-color-text-on-yellow";default:return"gradient-color-text-on-green"}},ia=(e,t)=>0===e?"left-9":e===t-1?"right-9":"-left-[25px]",sa="absolute border border-solid border-gray w-full h-full",oa={normal:"min-w-[970px]",mini:"min-w-[355px]"},ca=p((({className:e="",button:t,description:l,title:a,carouselVersion:n="normal"})=>h("section",{className:`flex pb-9 pl-12 border-box h-full ${oa[n]} ${e}`,children:u("div",{className:"relative w-full",children:[h("div",{className:`${sa} z-10 top-9 right-12 bg-green-dark`}),h("div",{className:`${sa} z-10 top-6 right-8 bg-green`}),h("div",{className:`${sa} z-10 top-3 right-4 bg-green-light`}),u("div",{className:"relative h-full bg-white z-10 p-10 border border-solid border-green-light",children:[h(Lt,{className:"!p-0",title:a,description:l,headlineVersion:"L",align:"text-left"}),Tt([t],{className:"mt-14"})]})]})}))),da={black:"bg-black",white:"bg-white"},ma=p((({className:e="",title:t,description:l,image:a,price:n,button:r,colors:i,...s})=>u(V,{className:`border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${e}`,...s,children:[a?.src?h(Y,{className:"mb-5 flex justify-center",image:a}):null,t?h(L,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?h("div",{className:"mb-4",children:h(_,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,i?.length?u("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[h("div",{className:"mr-1.5",children:h(K,{children:"Доступные цвета: "})}),i.map(ha)]}):null,n?u(K,{size:"text-h3",align:"text-left",children:[n," ₽"]}):null,Tt([r],{buttonClassName:"mt-5 w-full"})]}))),ha=(e,t)=>h("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${da[e]}`},String(t)),ua=p((({className:e="",title:t="",buttons:l,image:a,children:n})=>u("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,u("div",{className:"flex grow w-full justify-between",children:[u("div",{className:"flex flex-col justify-between w-full",children:[h("div",{className:"h-full",children:n}),l?h("div",{className:"mt-auto pt-8",children:l}):null]}),a]})]}))),pa={1:"flex-col",2:"gap-x-10 flex-wrap"},xa=p((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:a=1,description:n,image:r,title:i,...s})=>{const o=i?h(L,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:i}):null,c=r?.src?h(Y,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return h(V,{className:["relative box-border text-left p-9 w-[697px]","border border-solid border-gray group-data-secondary:border-white/50",l].join(" "),...s,children:u(ua,{title:o,image:c,children:[u("div",{className:"flex justify-between mb-4",children:[n?h("div",{className:"w-1/3",children:h(K,{size:"text-h6",children:n})}):null,e?h(K,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e}):null]}),t.length?h("ul",{className:`list-none m-0 p-0 flex gap-y-2 ${pa[a]}`,children:ga(t,a)}):null]})})})),ga=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return u("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?h("div",{className:"pr-2.5",children:h(K,{size:(a=t,1===a?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?h(K,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var a})),ba="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",fa=p((({text:e,href:t="",target:l="",className:a=""})=>e?u("div",{className:`relative group/link cursor-pointer w-[328px] h-[82px] ${a}`,children:[u("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",href:t,target:l,children:[h("div",{className:"p-0.5",children:e}),h("div",{className:"w-6 h-6",children:h(Y,{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",asSVG:!0})})]}),h("div",{className:`${ba} mx-1.5 mt-1.5`}),h("div",{className:`${ba} mt-3 mr-3`})]}):null)),va=p((({className:e="",additionalDescription:t,description:l,links:a,title:n,version:r="secondary",...i})=>u(V,{className:`flex w-full p-10 overflow-hidden justify-between ${e}`,version:r,...i,children:[u("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[h(Lt,{className:"p-0",title:n,description:l,as:"h1",align:"text-left"}),t?h("div",{className:"pt-6",children:h(_,{children:t})}):null]}),a?.length?Na(a):null]}))),Na=e=>{const t=Math.ceil(e.length/12);return h(ea,{version:"",className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,children:new Array(t).fill(null).map(((t,l)=>h("div",{className:"w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start",children:e.slice(12*l,12*(l+1)).map(((e,t)=>h(fa,{className:"m-1",...e},String(t))))},String(l))))})},ya={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},wa=p((({className:e="",isDotted:t=!0,children:l,size:a="M"})=>u("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?h("div",{children:h("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${ya[a]}`})}):null,h("span",{children:l})]}))),Ca={S:"text-l-light",M:"text-h6",L:"text-h5"},ka={S:"ml-2",M:"ml-3",L:"ml-4"},Sa=p((({className:e="",hasIndent:t,isDotted:l,itemClassName:a="",items:n,listItemSize:r="M"})=>n?.length?h("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${Ca[r]} ${t?ka[r]:""} ${e}`,role:"list",children:n.map(((e,t)=>h(wa,{className:`${a} mb-1.5`,isDotted:l,size:r,children:e},String(t))))}):null)),$a=p((({className:e="",title:t,headlineSmallVersion:l="H6",description:a,additionalDescription:n,icon:r,items:i=[],button:s={},version:o="primary",isDotted:c=!0,align:d="text-center",...m})=>u(V,{className:g("flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6","box-border border-solid border border-gray",d,e),version:o,...m,children:[u("div",{className:"flex flex-col h-full",children:[Ia(r),Ta(l,t),Ba(a,t),Va(i,c,o),Ra(n)]}),Tt([s],{buttonClassName:"mt-6 w-full"})]}))),Ia=e=>u("div",{className:"flex justify-center",children:[e?.src?h(Y,{className:"mb-5",image:e}):null,e?.icon?h(Y,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:e,asSVG:!0}):null]}),Ta=(e,t)=>t?h(K,{size:jt[e],children:t}):null,Ba=(e,t)=>e?h("div",{className:t?"mt-2":"",children:h(_,{size:"text-l",children:e})}):null,Ra=e=>e?h("div",{className:"mt-auto",children:h(K,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e})}):null,Va=(e,t,l="primary")=>e?.length?h(Sa,{className:"max-w-[308px] mt-2 text-s "+("primary"===l?"!text-secondary-text":""),itemClassName:"text-left",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}):null,ja=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),La=p((({className:e="",title:t,icon:l,list:a=[],...n})=>u(V,{className:`border border-gray flex min-w-[536px] ${e}`,...n,children:[u("div",{className:"w-[200px] min-w-[200px] self-center",children:[l?.icon?h(Y,{image:ja(l),asSVG:!0}):null,l?.src?h(Y,{image:l}):null]}),u("div",{className:"p-8 pl-3 w-full",children:[t?h(L,{className:" mb-3.5",headingType:"h5",title:t}):null,a.length?h("div",{className:"flex flex-col gap-3",children:a?.map(_a)}):null]})]}))),_a=(e,t)=>u("div",{className:"break-words",children:[e.title?h("div",{className:"text-h6",children:e.title}):null,e.description?h("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Ma=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],icon:{icon:"YoutubeIcon"},label:"Youtube"}],Da={default:"w-14 h-14",small:"w-12 h-12"},za=p((({iconVersion:e="color",buttonSize:t="default",rounded:l=!1,...a})=>{const{href:n,version:r}=a,{icon:i,label:s}=Ma.find((({origins:e})=>e.some((e=>n?.includes(e)))))||{},o=i?{...ja(i),iconVersion:e}:null;return h($e,{className:g("group/media flex items-center justify-center box-border",Da[t],l?"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",Da[t]),"aria-label":s,target:"_blank",rel:"noopener noreferrer",version:r,...a,children:o?h(Y,{image:o,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null})})),Aa=p((({className:e="",media:t,children:l,buttonSize:a})=>u("div",{className:"font-sans",children:[h("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>h(za,{buttonSize:a,version:e.version,...e},String(t))))}),h(K,{size:"text-s-light",color:"text-secondary-text",children:l})]}))),Oa=p((({button:e,className:t="",description:l,image:a,items:n=[],socialMedia:r=[],title:i,version:s="primary",...o})=>{const c=i?h(L,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:i}):null,d=a?.src?h(Y,{className:"absolute bottom-0 right-0 m-0",image:a}):null;return h(V,{className:g("relative p-7 min-w-[524px] h-full text-left 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",t),version:s,...o,children:h(ua,{className:"flex justify-between",title:c,image:d,children:u("div",{className:"h-full flex flex-col justify-between",children:[l?h("span",{className:"mb-2 group-data-gray:text-secondary-text group-data-gray:max-w-[265px]",children:l}):null,n.length?h(Sa,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:n}):null,r.length?h(Aa,{className:"pt-10 pb-0",media:r}):null,Tt([e],{className:"pt-2 mt-16"})]})})})})),Pa=p((({className:e="",title:t,icon:l,isHighlighting:a,button:n,cardCells:r=[],...i})=>{const s=r.map(Ha),o=s.slice(0,1),c=s.slice(1);return u(V,{className:g("relative border border-gray min-w-[322px] p-8 flex flex-col",Ea(a),e),...i,children:[a?Xa():null,Fa(l),t?h(L,{className:"text-center pt-2",headingType:"h5",title:t}):null,n?h($e,{className:"w-full mt-4",...n}):null,r.length?h(z,{renderFoldableSection:({isUnfolded:e})=>u("div",{children:[o,h(A,{isUnfolded:e,children:c})]}),renderFoldButton:r.length>1?Ua:null}):null]})})),Fa=e=>u("div",{className:"w-[267px] min-w-[267px] self-center",children:[e?.src?h(Y,{image:e}):null,e?.icon?h(Y,{image:ja(e),asSVG:!0}):null]}),Ea=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-7",Ua=({isUnfolded:e,onToggle:t})=>u("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[h("div",{children:e?"Скрыть":"Подробнее о тарифе"}),h(P,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),Ha=(e,t)=>u("div",{className:"py-5 border-b border-main-divider",children:[e?.title?h("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?h("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),Xa=()=>u("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:[h(P,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),h(_,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),Ga={black:"bg-black",white:"bg-white"},Wa=p((({className:e="",title:t,description:l,image:a,price:n,button:r,colors:i})=>u("section",{className:`border border-solid box-border border-gray p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[a?.src?h(Y,{className:"mb-5 flex justify-center",image:a}):null,t?h(L,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?h("div",{className:"text-m-light text-left mb-4",children:l}):null,i?.length?u("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[h("div",{className:"mr-1.5",children:"Доступные цвета: "}),i.map(Ja)]}):null,n?u("div",{className:"text-h3 text-left",children:[n," ₽"]}):null,Tt([r],{buttonClassName:"mt-5 w-full"})]}))),Ja=(e,t)=>h("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Ga[e]}`},String(t)),Ya="absolute top-0 bottom-0 w-[84px]",Ka=p((({cards:e=[],className:t="",title:l,description:a,...n})=>{const[r,i]=Xt({itemCount:e?.length,visibleItemCount:3});return u(V,{className:`p-12 overflow-hidden text-center ${t}`,...n,children:[h(Lt,{className:"!p-0",title:l,description:a,headlineVersion:"M",...n}),h("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*r}px)`},role:"list",children:e?.length?e.map(((e,t)=>h(Wa,{...e},String(t)))):null}),Yt({...i,btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"}),h("div",{className:`${Ya} left-0 bg-opacity-from-white`}),h("div",{className:`${Ya} right-0 bg-opacity-to-white`})]})})),qa="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Za="border-gray border-solid border",Qa="border-main-divider border border-t-0 border-x-0",en="w-[200px] mr-6",tn=p((({icon:e,image:t,title:l,link:a})=>u("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Za} ${qa}`,role:"columnheader",children:[e&&!t?.src&&h(Y,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:ja(e),width:"63",height:"63",asSVG:!0}),t?.src&&h(Y,{className:"mb-[18px]",image:t}),l?h(L,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,a?.text&&h("div",{className:"mt-auto w-full",children:h($e,{href:a.href,target:a.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:h("div",{className:"text-xs-light font-medium py-[11px]",children:a.text})})})]}))),ln={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},an=p((({children:e,activeIndex:t,columnWidth:l,version:a="comparison"})=>h("div",{className:"flex flex-1 overflow-hidden",children:h("div",{className:ln[a],style:{transform:`translateX(-${t*l}px)`},children:e})}))),nn=p((({children:e})=>h("div",{className:"self-start flex flex-col",role:"row",children:h("div",{className:"flex",children:e})}))),rn=p((({colHeaders:e,activeIndex:t})=>u(nn,{children:[h("div",{className:en,role:"columnheader"}),h(an,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>h(tn,{...e},String(t))))})]}))),sn=p((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:a})=>h("div",{className:`w-80 box-border flex flex-col ${Za} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${a?qa:""}`,role:"cell",children:h("div",{className:`mx-7 h-full ${Qa} ${a&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>dn(e,t,a)))})}))),on=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),cn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),dn=({label:e,description:t},l,a)=>u("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?h("h4",{className:on(a),children:e}):null,t?h("div",{className:cn(a),children:t}):null]},String(l)),mn=(e=!1)=>`text-s py-7 ${Qa} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,hn=p((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:a,isFirstRow:n,isLastRow:r})=>u(nn,{children:[e?.title?h("div",{className:mn(r),children:e.title}):null,t?.length?h(an,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>h(sn,{cell:e,isFirstRow:n,isLastRow:r,isFillGradient:a&&0===t},String(t))))}):null]}))),un=p((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:a})=>{const{isScrollAvailable:n}=a;return u("div",{className:"relative",children:[e.map(((e,a,{length:n})=>h(hn,{row:e,isFirstRow:0===a,isLastRow:a+1===n,activeIndex:l,isColoredFirstColumn:t},String(a)))),n?Yt({...a,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),pn=p((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:a,isColoredFirstColumn:n})=>{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:a),[o,c]=Xt({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return u("div",{children:[u("div",{role:"table",children:[r?.length?h(rn,{colHeaders:r,activeIndex:o}):null,s?.length?h(un,{rowData:s,isColoredFirstColumn:n,activeIndex:o,controls:c}):null]}),d?h("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),xn=p((({className:e="",title:t,rowHeaders:l,columns:n,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=a(!i),m=r((()=>d((e=>!e))),[]);return u(V,{className:`py-12 pl-12 overflow-hidden relative ${e}`,...o,children:[h(L,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),h(pn,{columns:n,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?gn({isShowAllRow:c,onClick:m}):null]})})),gn=({isShowAllRow:e,onClick:t})=>h("div",{className:"pr-12",children:u("div",{className:"flex w-full",children:[h("div",{className:en}),h("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:h("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),bn=p((({className:e="",contacts:t,info:l,version:a="secondary",...n})=>u(V,{className:`flex p-12 ${e}`,version:a,...n,children:[l?.length?fn(l):null,t?.length?fn(t):null]}))),fn=e=>h("div",{className:"flex grow basis-0",children:e.map(((e,t)=>vn({column:e,index:t})))}),vn=({column:e,index:t})=>e?h("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:a},n)=>u("div",{className:"mt-6 first:mt-0",children:[h(Lt,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left"}),l?h("div",{className:"mt-1.5 opacity-80",children:h(_,{size:"text-m",font:"font-light",children:l})}):null,a?h($e,{className:"mt-6",...a}):null]},String(n))))},`col-${String(t)}`):null,Nn=e=>"Image"===e?.errorContentType&&e?.image?h(Y,{image:e.image}):"Code"===e?.errorContentType&&e.code?h("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,yn=p((({className:e="",title:t,subtitle:l,error:a,button:n})=>{return u("section",{className:g("flex flex-col justify-center items-center",(r=n?.text,r?"py-20 pt-3 pb-1":"mb-16 pb-2 mt-24 pt-3"),e),children:[h("div",{className:"flex justify-center py-20",children:Nn(a)}),t?h(L,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?h("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,n?.text?h($e,{className:"py-4 px-9",version:n?.version,...n,children:n.text}):null]});var r}));var wn;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(wn||(wn={}));const Cn=new Intl.NumberFormat("ru",{style:"currency",currency:wn.RUB}),kn=e=>e?Cn.format(e):"",Sn="text-left text-m-light text-secondary-text",$n=`${Sn} pl-11`,In={USD:"DollarIcon",EUR:"EuroIcon"},Tn=p((({className:e,exchangeCurrencyItems:t})=>u("table",{className:`h-fit w-fit ${e}`,children:[h("thead",{children:u("tr",{children:[h("th",{className:Sn,children:"Валюта"}),h("th",{className:$n,children:"Купить"}),h("th",{className:$n,children:"Продать"})]})}),h("tbody",{children:t.map(Bn)})]}))),Bn=e=>{const t=e?.currency?.currency;return u("tr",{className:"pb-1 text-h6",children:[h("td",{className:"pt-4",children:u("div",{className:"flex items-center",children:[t?h(Y,{image:{icon:In[t]},width:"24",height:"24"}):null,h("span",{className:"ml-2",children:t})]})}),h("td",{className:"pt-4 pl-11",children:kn(e?.saleExchangeRate)}),h("td",{className:"pt-4 pl-11",children:kn(e?.buyExchangeRate)})]},t)},Rn=p((({className:e="",address:t})=>u("div",{className:`flex ${e}`,children:[h(Y,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),u("div",{className:"ml-3",children:[t?h("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,h("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Vn=(e,t,l)=>{const a=Number(jn(e))*Math.pow(t,l?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(a)},jn=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ln=e=>{return(t=[[e=>e.value!==wn.RUB&&e.oppositeValue!==wn.RUB,()=>e.handleConvert(e.value,wn.RUB)],[e=>e.value===wn.RUB&&e.oppositeValue===wn.RUB,()=>e.handleConvert(e.value,wn.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function _n(e){const{placeholder:t,rates:l,selected:a,value:n,setValue:r,setSelected:i}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:a,text:a};return u("div",{className:"relative flex",children:[h(ee,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:n,onChange:r}),s.length?h(je,{isBorder:!1,onChange:e=>i(e.key),options:s,value:o}):null]})}const Mn=p((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:n})=>{const[i,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||wn.RUB,selectBuy:l?.[0]?.currency?.currency||wn.USD}),o=r((e=>s((t=>({...t,...e})))),[]);return u("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[_n({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:Dn(i,o,l),value:i.inputSell,setValue:e=>An(o,l)(e,i.selectSell,i.selectBuy)}),_n({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:zn(i,o,t),value:i.inputBuy,setValue:e=>On(o,t)(e,i.selectBuy,i.selectSell)}),n?.text?h($e,{className:"py-4 mr-1",version:n?.version,...n,children:n.text}):null]})})),Dn=(e,t,l)=>a=>{t({selectSell:a}),Ln({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,n=e.selectBuy)=>{An(t,l)(e.inputSell,a,n)}})},zn=(e,t,l)=>a=>{t({selectBuy:a}),Ln({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,n=e.selectSell)=>On(t,l)(e.inputBuy,a,n)})},An=(e,t)=>(l,a,n)=>{e({inputSell:jn(l),selectBuy:n});const r=t.find((e=>e.currency?.currency===n))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;r&&e({inputBuy:String(Vn(l,r,a===wn.RUB)||"")})},On=(e,t)=>(l,a,n)=>{e({inputBuy:jn(l),selectSell:n});const r=t.find((e=>e.currency?.currency===n))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;r&&e({inputSell:String(Vn(l,r,a===wn.RUB)||"")})};const Pn=async e=>{const t=await Fn(),l=t?.code||"000";return{region:t,exchangeRates:await En(e,l)}},Fn=async()=>{try{return await re("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},En=async(e,t)=>{try{return await re(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Un=p((({className:e="",title:t="Курсы обмена валют",button:l,...a})=>{const{exchangeRates:n}=function(){const{data:e}=le("/api/v1/exchangerates",Pn);return e||{}}(),r=Hn(n?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:wn.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:wn.RUB}}),h(V,{className:`p-9 box-border min-h-80 ${e}`,...a,children:h(ua,{title:h(L,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:u("div",{className:"flex",children:[u("div",{className:"mr-14 pt-4",children:[r?h(Tn,{className:"mb-[30px]",exchangeCurrencyItems:r}):null,h(Rn,{address:n?.address})]}),r.length&&i.length&&s.length?h(Mn,{className:"grow",currencyRatesBuy:i,currencyRatesSell:s,button:l}):null]})})})})),Hn=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[];function Xn(e,t={}){const{data:l}=le(`/wcms-resources/${e}.json`,re,{fallback:t});return l||{}}const Gn={"bg-white":"color",transparent:"white"},Wn={"bg-white":"text-primary-main",transparent:"text-white"},Jn=(e,t,l)=>h(Y,t?.src?{image:t,className:Wn[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Gn[e]},className:Wn[e],width:l?.width,height:l?.height,asSVG:!0}),Yn={"bg-white":"text-primary-text",transparent:"text-white"},Kn=(e,t,l)=>h("span",{className:`${Yn[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),qn=p((({className:e="",href:t,logo:l,children:a=l?.title,targetBlank:n,bgColor:r="bg-white",showTitle:i=!0})=>u("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:n?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Jn(r,l?.image,{width:"40",height:"45"}),i?Kn(a||l?.title,r):null]}))),Zn=()=>{const[e,t]=a("");return{term:e,setTerm:e=>t(e)}},Qn=p((({className:e,isMobile:t=!1})=>{const{term:l,setTerm:a}=Zn(),n=t?"text-s":"text-l-light",r=t?" placeholder-transparent":"h-full",i=t?"some search":void 0;return u("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:[h("div",{className:t?"w-5 h-5":"w-6 h-6",children:h(Y,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),l?null:h("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${n}`,children:"Поиск по сайту"})]}),h("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text ${r}`,value:l,onChange:e=>a(e.target.value),type:"text",name:"search-bar-input",placeholder:i}),t?h("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),a("")},children:h(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}):h($e,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:h("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),er=p((e=>h(Qn,{...e}))),tr=p((({className:e="",items:t,hasButton:l})=>u("div",{className:e,children:[t?.length?t.map(lr):null,l?h($e,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),lr=(e,t)=>{const{type:l,text:a,description:n}=e;return u("div",{className:"mb-4",children:[h("div",{children:ar(l,a)}),h("div",{className:"mt-1 text-s-light text-secondary-text",children:n})]},String(t))},ar=(e,t="")=>{switch(e){case"tel":return h("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${nr(t)}`,children:t});case"email":return h("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return h("span",{children:t})}},nr=e=>e.replaceAll(/\D/g,""),rr=p((({className:e="",index:t,text:l,...a})=>{const n=xe(),{href:r,target:i,onClick:s}=n(a);return h("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:r,target:i,onClick:s,children:l||`Документ ${t}`})})),ir=p((({className:e="",links:t})=>h("div",{className:e,children:t?.length?h("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)=>h(rr,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),sr=e=>t=>e?.href===t?.href,or=(e,t)=>{return(a=e,n=t,(a||[]).map((e=>n?.find(sr(e))||e))).concat((l=e,(t||[]).filter((e=>!l?.find(sr(e))))));var l,a,n},cr=p((({className:e="",items:t,fallback:l})=>{const a=xe(),n=Xn(c.SITEMAP||"sitemap",l),r=or(n.topItems,t);return h("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:r?.map(((e,t)=>dr(a(e),t)))})})),dr=(e,t)=>{const{text:l,items:a,href:n,target:r,onClick:i}=e;return u("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[h("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:n,target:r||"_self",onClick:i,children:l||`Раздел ${t}`}),a?.map(((e,t)=>h(mr,{...e,index:t},String(t))))]},String(t))},mr=p((({text:e,index:t,...l})=>{const a=xe(),{href:n,target:r,onClick:i}=a(l);return h("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:n,target:r||"_self",onClick:i,children:e||`Раздел ${t}`})})),hr=p((({className:e="",index:t,...l})=>{const a=xe(),{href:n,target:r,text:i,onClick:s}=a(l);return h("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:n,target:r,onClick:s,children:i||`Документ ${t}`})})),ur=p((({className:e="",links:t})=>u("div",{className:e,children:[h("div",{className:"pt-5",children:h("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?h("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>h(hr,{index:t,...e},String(t))))}):null]}))),pr="w-[204px]",xr=p((({className:e="",...t})=>{const l=t.options?.page?.fallback,{documents:a,relatedEnterprises:n,contacts:r,socialMedia:i,mobileApps:s,logo:o}=Xn(c.FOOTER||"footer",l);return u(V,{tag:"footer",className:`p-9 ${e}`,...t,children:[u("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[h(qn,{className:pr,logo:o}),h(er,{className:"grow"})]}),u("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[u("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[h(tr,{items:r,hasButton:!0}),h(Aa,{media:i,children:"Соцсети"}),h(Aa,{className:"mt-6",media:s,children:"Мобильное приложение"})]}),h(cr,{className:"pt-[3px]",fallback:l})]}),h(ir,{className:"mt-[98px]",links:n}),h(ur,{links:a})]})})),gr={normal:3,mini:4},br={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},fr={normal:380,mini:276},vr=p((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:a,icon:n,items:r,button:i,isFullWidth:s=!0,isDotted:o=!0,align:c="center",...d})=>u(V,{className:`h-full flex flex-col justify-between ${C[c]}`,tag:"div",...d,children:[u("div",{className:"flex flex-col h-full",children:[Nr(n),yr(t,e),wr(l,e),r?.length?kr(r,o):null,Cr(a)]}),Tt([i],{buttonClassName:"mt-6 "+(s?"w-full":"self-center")})]}))),Nr=e=>u("div",{className:"flex justify-center",children:[e?.src?h(Y,{className:"mb-5",image:e}):null,e?.icon?h(Y,{className:"w-8 h-8 min-w-8 mb-5 rounded-full",image:ja(e),asSVG:!0}):null]}),yr=(e,t)=>t?h("div",{className:jt[e],children:t}):null,wr=(e,t)=>e?h("div",{className:"text-l "+(t?"mt-2":""),children:e}):null,Cr=e=>e?h("div",{className:"text-m-light mt-auto group-data-primary:text-secondary-text",children:e}):null,kr=(e,t)=>h(Sa,{className:"max-w-[308px] mt-2 text-s group-data-primary:text-secondary-text",itemClassName:"text-left",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}),Sr=p((({headlineVersion:e="M",cards:t=[],galleryVersion:l="normal",activeIndex:a,title:n,description:r})=>u("div",{children:[h(Lt,{className:"!p-0",title:n,description:r,headlineVersion:e}),h("div",{className:`flex mt-8 ${t?.length<=gr[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${a*fr[l]}px)`},role:"list",children:t?.map(((e,t)=>function({card:e,galleryVersion:t},l){return h("section",{className:`box-border border-solid border border-gray p-6 mx-2 flex flex-col justify-between\n items-stretch ${br[t]} ${R[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:h(vr,{...e})},String(l))}({card:e,galleryVersion:l},t)))})]})));const $r=p((({cards:e=[],className:t="",galleryVersion:l="normal",button:a,...n})=>{const[r,i]=Xt({itemCount:e?.length,visibleItemCount:gr[l]}),{isScrollAvailable:s}=i;return u(V,{className:`relative p-[42px] overflow-hidden flex flex-col ${t}`,...n,children:[h(Sr,{cards:e,galleryVersion:l,activeIndex:r,...n}),Yt({...i,btnClass:["left-8","right-8"],className:"top-1/2"}),s?u("div",{children:[h("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),h("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]}):null,Tt([a],{className:"mt-8 mx-auto"})]})})),Ir=p((e=>h($r,{...e,galleryVersion:"normal"}))),Tr=p((({className:e="",title:t,description:l,calendar:a,...n})=>u(V,{className:`p-12 ${e}`,...n,children:[h(Lt,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M"}),a?Br(a):null]}))),Br=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 u("div",{className:"w-full flex flex-col justify-center mt-13",children:[h("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Rr(e,t)))}),h("div",{className:"flex w-full",children:l.map(((e,t)=>u("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:[h("div",{className:"flex",children:Vr(e)}),u("div",{className:"text-s-light text-primary-text mt-3",children:[h("span",{children:e.text})," ",h("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Rr=(e,t)=>e.month?.map(((e,l)=>h("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Vr=e=>e.month?.map((e=>e.image?.src?h("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:h(Y,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),jr=e=>({href:t})=>{const{BASE_PATH:l}=c,a=l&&t?.startsWith(l)?t.substring(l.length):t;return me(oe(t)?e.href:e.pathname).startsWith(me(a))},Lr=p((({className:e="",active:t,flat:l,children:a,...n})=>{const r=xe(!0),{href:i,target:s,text:o,onClick:c}=r(n);return h("a",{className:g(_r(t,l),e),href:i,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:h("span",{className:Mr(t,l),children:o||a})})})),_r=(e=!1,t=!1)=>g("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"),Mr=(e=!1,t=!1)=>g("font-sans text-s-light",e?"text-primary-main":g(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover");function Dr(e=!1){const[t,l]=a(e),n=r((()=>l(!0)),[]),i=r((()=>l(!1)),[]),s=r((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:n,setFalse:i,toggle:s}]}const zr=864e5;function Ar(e,t,l=globalThis?.localStorage){const a=r((async(...a)=>{const n=`async:${e}`,r=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<zr?t:void 0}(l.getItem(n));if(r)return r;const i=await t(...a);return l.setItem(n,JSON.stringify({data:i,timestamp:Date.now()})),i}),[e,t]);return le(e,a)}const Or=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}};const Pr=p((({className:e,searchTerm:t,onSearch:l})=>u("form",{className:`font-sans relative ${e}`,children:[h("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:h("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),h("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),type:"text",name:"location-search-bar-input"})]}))),Fr=p((({currentLocation:e,onChangeLocation:t,close:l,foreignOffices:a})=>{const{term:n,setTerm:i}=Zn(),s=r((e=>i(e)),[]),o=Ur(function(){const{data:e}=le("/api/v1/regions",re);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;return e.forEach((e=>{const a=t(e),n=l.get(a);l.set(a,[...n||[],e])})),l})(o,Er);return u("div",{className:"absolute h-full w-full inset-0 bg-white text-l-light z-50",children:[h(Xr,{close:l}),u("div",{className:"container py-12",children:[h(Hr,{currentLocation:e}),h(Pr,{onSearch:s,searchTerm:n,className:"mb-7"}),n&&n.length>=3?h("div",{children:o.filter((e=>e.name?.startsWith(n))).map(Wr({onChangeLocation:t,close:l}))}):h("div",{className:"columns-5",children:Array.from(c.entries()).map(Gr({onChangeLocation:t,close:l}))}),h(Jr,{foreignOffices:a})]})]})})),Er=e=>e.name?.charAt(0)||"",Ur=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Hr=p((({currentLocation:e})=>e?u("div",{className:"mb-4",children:[h(K,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),h("button",{className:"cursor-pointer",onClick:close,children:h(K,{color:"text-green",children:e.name})})]}):null)),Xr=p((({close:e})=>h("button",{className:"visible peer-placeholder-shown:invisible absolute top-6 right-6 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:t=>{t.preventDefault(),e&&e()},children:h(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Gr=({onChangeLocation:e,close:t})=>([l,a])=>u("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[h("div",{className:"mb-2.5",children:h(K,{size:"text-h6",children:l})}),a.map(Wr({onChangeLocation:e,close:t}))]},l),Wr=({onChangeLocation:e,close:t})=>l=>h("div",{className:"mb-1",children:h("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(l),t&&t()},children:l.name||""})},l.id),Jr=p((({foreignOffices:e})=>e?.length?u("div",{className:"border-t border-main-divider mt-7 pt-7",children:[h("div",{className:"mb-4",children:h(K,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),h("div",{className:"flex gap-10",children:e.map(((e,t)=>h(Yr,{...e},String(t))))})]}):null)),Yr=p((({icon:e,...t})=>{const l=xe(),{text:a,target:n,href:r,onClick:i}=l(t);return u("div",{className:"flex gap-x-3",children:[e?h(Y,{pathPrefix:"/wcms-resources/",image:e}):null,a?h("a",{className:"hover:text-primary-hover",href:r,target:n,onClick:i,children:a}):null]})})),Kr=p((({className:e,isRounded:t,disabled:l,ariaLabel:a,image:n,onClick:r})=>h("button",{className:g("group/btn border-0 p-0 flex items-center bg-inherit",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":"w-6 h-6 text-primary-text hover:text-primary-main","group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":a,onClick:r,children:h(Y,{image:n,className:g("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0",asSVG:!0})}))),qr=e=>globalThis[e];function Zr(e,t){const[l,i]=a(),s=r((()=>i(qr(e))),[e]);return n((()=>{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(!qr(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Qr={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},ei=p((e=>{const[t,{setTrue:l}]=Dr();return t?h(ti,{...e}):li({...e,onClick:l})})),ti=p((({chat:e="personal",...t})=>((e=>{n((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Zr("chatbot",Qr[e])})(e),li(t)))),li=({className:e,iconVersion:t,onClick:l})=>h(Kr,{className:g("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l}),ai=p((({version:e,className:t,officesLink:l,defaultLocation:i="Москва",foreignOffices:s,chat:o})=>{const[c,{setTrue:d,setFalse:m}]=Dr(),[p,x]=function(e){const t=Or(),[l,i]=a(t?.region??{name:e}),{data:s}=Ar("/api/v1/region",re);return n((()=>{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)}),[i])]}(i),b="transparent"===e?"white":"black";return u("div",{className:g("flex items-center",t),children:[h(Lr,{className:"mr-5",flat:!0,href:"#",text:p.name,onClick:d}),l?h(Lr,{className:"mr-7",flat:!0,href:l,text:"Офисы и банкоматы"}):null,o?h(ei,{className:"mr-5",iconVersion:b,chat:o}):null,c?h(Fr,{currentLocation:p,foreignOffices:s,onChangeLocation:x,close:m}):null]})})),ni=p((({className:e="",items:t,activeItem:l})=>{const n=xe(),[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),c=Ve(r((()=>s(!1)),[]));return u("div",{className:g(i?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[h("button",{className:"group/btn flex justify-between items-center h-6 ml-6","aria-label":""+(i?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>h("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))))}),h("div",{className:g("flex flex-col rounded-md bg-white p-6 pb-2",i?"":"hidden"),"aria-hidden":!i,children:t?.map(((e,t)=>{const{text:a,...r}=e;return h("a",{className:g("text-l-light pb-4 hover:text-primary-main",e===l?"text-primary-main":""),...n(r),children:a},e.href||String(t))}))})]})})),ri=p((({className:e="",active:t,dataItemName:l,children:a,...n})=>{const r=xe(),{href:i,target:s,text:o,onClick:c}=r(n);return u("a",{className:g("relative inline-block bg-transparent text-center no-underline",e),href:i,target:s,"data-item-name":l,onClick:c,children:[h("span",{className:ii(t),children:o||a}),t?h("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),ii=(e=!1)=>g("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"),si=p((({observerOptions:e,onVisibilityChange:t,children:l,...a})=>{const n=S(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return h("span",{ref:n,children:h(ri,{...a,children:l})})})),oi=p((({subItems:e=[]})=>{const t=(e=>(t=[])=>{const l=t?.filter(jr(e));return l?.length?Xl((e=>e.href?.length||0))(l):void 0})(pe())(e),[l,n]=a(e.length),r=e.slice(l),o=s(null),c={rootRef:o},d=i((()=>e.map(((e,t)=>e=>{n(e?ci(t):di(t))}))),[e]);return u("nav",{className:"relative mt-6",children:[h("div",{ref:o,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,a)=>h(si,{className:g("mr-8",l-1<a?"invisible":""),active:e===t,observerOptions:c,onVisibilityChange:d[a],...e},String(a))))}),r.length?h(ni,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:r,activeItem:t}):null]})})),ci=e=>t=>Math.max(t,e+1),di=e=>t=>Math.min(t,e),mi={"bg-white":"primary",transparent:"transparent"},hi=p((({bgColor:e="bg-white",className:t,showSubMenu:l=!0,version:a=mi[e],chat:n,...r})=>{const i=pe(),{topItems:s,logo:o,defaultLocation:d,foreignOffices:m,officesLink:p}=Xn(c.SITEMAP||"sitemap",r.options?.page?.fallback),x=s?.find((e=>t=>t.items?.some(jr(e))||jr(e)(t))(i));return h(V,{tag:"header",className:g("pt-6 px-20",l&&x?.items?.length?"pb-4":"pb-5",t),version:a,...r,children:u("div",{className:"container",children:[u("div",{className:"flex items-center",children:[h(qn,{className:"mr-8",bgColor:e,logo:o}),s?.map(((e,t)=>h(Lr,{active:e===x,...e},String(t)))),h(ai,{version:a,className:"ml-auto",foreignOffices:m,defaultLocation:d,officesLink:p,chat:n})]}),h("div",{className:g("mt-6 h-px bg-main-divider","transparent"===a?"opacity-30":"")}),l&&x?.items?.length?h(oi,{subItems:x.items}):null]})})})),ui={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},pi=p((({className:e="",gap:t="XS",isPadding:l=!1,version:a="transparent",...n})=>h(V,{className:g("grid grid-cols-12",l?"p-12":"",ui[t],e),version:a,...n,children:w(n)})));pi.childrenTypes={exclude:["HorizontalLayout"]};const xi=p((e=>{const{className:t,image:l,...a}=e;return h(V,{className:t,...a,children:h(Y,{image:l})})})),gi=p((({className:e="",cards:t=[],button:l})=>{const[n,i]=a(0),s=r((e=>i(e)),[]),o=t.length,[c,d]=Xt({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:p}=d,x=t[c]?.href;return u("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[u("div",{className:"relative overflow-hidden",children:[o?bi({activeIndex:c,cards:t,selectedCardIndex:n,onClick:s}):null,Yt({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),m?h("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,p?h("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),h($e,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function bi({activeIndex:e,cards:t,selectedCardIndex:l,onClick:a}){const n=460*e,r=t.length>2?"justify-start":"justify-center";return h("div",{style:{transform:`translateX(-${n}px)`},className:"duration-1000 px-12",children:h("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:a}){return u("button",{type:"button",onClick:a,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?h(Y,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,u("div",{className:"flex gap-3.5",children:[e?.sum?fi("страховая сумма",e.sum):null,e?.fee?fi("страховой взнос",e.fee):null]}),vi(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})})}function fi(e,t){return u("div",{className:"flex flex-col text-left whitespace-pre",children:[u("span",{className:"text-h6",children:[qe(t)," ₽"]}),h("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function vi(e){return e?h(Y,{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 Ni=p((({className:e="",title:t,insuranceTabs:l=[],button:n,...i})=>{const[s,o]=a(0),c=r((e=>o(e)),[]);return u(V,{className:`box-border py-12 overflow-hidden relative w-100 ${e}`,...i,children:[t?h(L,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?h("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:a}){return h("button",{type:"button",onClick:a,"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,h("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:yi({insuranceTabs:l,button:n})})]})})),yi=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>h(gi,{button:t,cards:e},String(l)))):null};function wi(e){return t=>t.reduce(((t,l,a)=>t.length?t.concat({...e,key:a},l):[l]),[])}const Ci={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},ki={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Si=p((e=>{const{className:t="",items:l,isDotted:a,investmentZeroColumn:n,investmentColumns:r,...i}=e,s=r?[...r]:[];return n&&s.unshift(n),h(V,{className:`px-9 py-12 ${t}`,...i,children:u("div",{className:"container text-m-light",children:[s?.length?u("div",{children:[u("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[wi(h("div",{className:"w-px h-4 bg-gray"}))(s.map($i)),h("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),h("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),h("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Bi)})]}):null,l?.length?h(Sa,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:a}):null]})})})),$i=(e,t,l)=>{const a=1===t,n=t===l.length-1;return h("div",{className:`${Ii(a,n,e.cells)}`,children:e.cells?.length?h("div",{className:"w-full "+(n?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(Ti)}):null},`column_${t}`)},Ii=(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(" "),Ti=(e,t)=>{const l=e.cellSize||"XS",a=e.cellColor||"green";return e.text?h("div",{className:`flex-1 flex items-center justify-center relative py-2 ${ki[l]} ${Ci[a]} ${"XS"===l?"px-3":"px-11"}`,children:h("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Bi=(e,t,l)=>{const a=0===t,n=t===l.length-1;return h("div",{className:`flex-1 max-w-[180px] text-center px-2 ${a?"pl-9":""} ${n?"mr-3.5":" "}`,children:e.title},`title_${t}`)},Ri=p((({className:e,iconClassName:t,textClassName:l,suffixClassName:a,doc:n,icon:r})=>{const{text:i,fileSize:s,...o}=n;return u("a",{className:e,role:"link",...o,children:[r?h(Y,{className:t,image:ja(r),width:"24px",height:"24px",asSVG:!0}):null,i?u("span",{className:l,children:[i,h("span",{className:a,children:o?.href&&Vi(ji(o.href),s)})]}):null]})})),Vi=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),ji=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Li=p((({className:e="",doc:t,icon:l})=>h(Ri,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center text-l-light",suffixClassName:"text-secondary-text group-hover/item:text-primary-main",doc:t,icon:l}))),_i=p((({className:e,documents:t,columnsMode:l="double",icon:a})=>t?.length?h("div",{className:e,role:"list",children:t.map(((e,t)=>h("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:h(Li,{className:"group/item flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),Mi={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},Di=p((({className:e="",title:t,description:l,align:a="text-center",documents:n,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>u(V,{className:g("p-12",e),...s,children:[h(Lt,{className:"!p-0",title:t,description:l,align:a,headlineVersion:"M",as:"h2"}),h(_i,{className:`mt-8 ${Mi[i]}`,columnsMode:i,documents:n,icon:r})]}))),zi=p((e=>h($r,{...e,galleryVersion:"mini"}))),Ai=e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function Oi(e=""){const t=Ai(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const Pi=p((({className:e="",title:t="Мобильное приложение",qr:l,buttons:a,version:n="primary",items:r,image:i,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const m="secondary"===n?"p-3.5 min-w-[120px]":"min-w-[92px]";return u(V,{className:`flex justify-between p-12 box-border relative min-h-80 ${Oi(e)} ${e}`,version:n,...d,children:[u(ua,{className:"z-10",title:t?h(L,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full ${C[o]}`}):null,buttons:Tt(a,{className:"mt-8",buttonClassName:"min-w-[168px]"}),children:[Ei(c),u("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?h("div",{className:`flex justify-center mr-5 bg-white rounded-md ${m}`,children:h(Y,{className:"w-fit",image:l})}):null,Fi(r)]})]}),i?.src?h("div",{className:"absolute right-0 bottom-0",children:h(Y,{image:i})}):null]})})),Fi=e=>e?.length?h(Sa,{items:e,itemClassName:"text-l-light mb-2 last:mb-0"}):h("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Ei=e=>e?h("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,Ui=[{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 Hi(e,t,l){t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),n=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:a,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]})));n.add(r),t.geoObjects.add(n),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Xi={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"},Gi=e=>h("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(Xi).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Wi={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)]"},Ji=(e,t,l)=>u("div",{className:`${Object.values(Wi).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[h(P,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),h("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const a=t.target?.value?t.target?.value.toLowerCase():"";if(a){const t=e.filter((e=>e.text.toLowerCase().indexOf(a)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Yi={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"},Ki=(e,t,l)=>h("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(Yi).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:h(P,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),qi={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"},Zi=p((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return h("div",{onClick:()=>{const l=e.current.getZoom(),a="in"===t?l+1:l-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(qi).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:h(P,{name:l,width:"20",height:"16"})})})),Qi={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"},es=p((({points:e,className:t="",zoom:l=5,showSearchField:r=!1})=>{const i=s(null),o=Zr("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${c.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[d,m]=a(),[p,x]=a(ns(Ui)),g=ts(e);if(n((()=>{i?.current||o?.ready((()=>{i.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),Hi(o,i.current,p)}))}),[o,i,p]),n((()=>{if(i.current&&p&&o){const e=p.length<1?ns(Ui):p;Hi(o,i.current,e)}}),[i,p,o]),!o)return null;const b=d?"z-[100000]":"z-10";return u("div",{id:"map",className:`${d?"":"relative"} w-full ${t}`,children:[h("div",{className:`absolute flex left-2 top-4 w-[50%] ${b}`,children:r?Ji(Ui,0,(e=>{if(e){const t=ns(e);x(t)}})):Gi(g)}),h("div",{className:`${Object.values(Qi).join(" ")} ${b} right-2 top-4 bg-white`,onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:h(P,{name:"FullScreenIcon",width:"16",height:"16"})}),u("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${b}`,children:[h(Zi,{yandexMaps:i}),h(Zi,{yandexMaps:i,direction:"out"})]}),Ki(i.current,o,`right-2 top-80 ${b}`)]})})),ts=e=>[as(ls(e,0)),as(ls(e,1))],ls=(e,t)=>e.map((e=>e[t])),as=e=>e.reduce(((e,t)=>e+t))/e.length,ns=e=>e?e.map((e=>e.coords)):null,rs=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],is=({lunchHour:e,status:t,workTime:l})=>{const a=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?u("div",{className:"flex",children:[h("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}),h("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?a:null})]}):h("div",{className:"flex",children:h("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},ss=({icon:e,title:t,distance:l,time:a},n)=>u("div",{className:"flex mr-4",children:[h(P,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?u("span",{className:"text-m",children:[t," "]}):null,u("span",{className:"text-m-light",children:[l?` (${l})`:null,a?`, ${a}`:null]})]},`nearbyOffice${n}`),os=({title:e,status:t,workTime:l,lunchHour:a,description:n},r)=>u("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[u("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[h("div",{children:e}),t?null:h("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?h("div",{children:l}):null]}),t&&a?cs(a):null,n?h("div",{className:"pb-1 text-s-light text-secondary-text",children:n}):null]},`day${r}`),cs=e=>/\d+/gi.test(e)?u("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[h("div",{children:"Перерыв"}),h("div",{children:e})]}):h("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:h("div",{children:e})}),ds={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};function ms(e){return e?ne(e,{method:"GET"}):{}}const hs=p((({className:e=""})=>{const t=function(e){const{data:t}=le(e?`/api/v1/branches?regionCode=${e}`:void 0,ms);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),ds}("000"),{name:l,address:a,gpsLatitude:n,gpsLongitude:r,workSchedule:i}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:m,workingSaturday:p,workingSunday:x}=i,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=i,N=n&&r?[n,r]:null,y=[{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:p,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),C=w>0?y[w-1]:y[6];return u("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[u("div",{className:"flex flex-col px-12 pt-12",children:[u("div",{className:"flex justify-between",children:[h("div",{className:"text-h2",children:l}),is(C)]}),u("div",{className:"flex text-l-light pt-4",children:[h(P,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),a]}),h("div",{className:"flex pt-4",children:rs.map(ss)})]}),u("div",{className:"flex justify-between pt-8",children:[h("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?h(es,{points:[N],className:"h-full"}):null}),h("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(os)})]})]})})),us=p((({className:e="",title:t,servicesList:l,...a})=>u(V,{className:`p-8 flex flex-col ${e}`,...a,children:[t?h(L,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?h("ul",{className:"list-none m-0 p-0",children:l.map(ps)}):null]}))),ps=(e,t)=>u("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?h(Y,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:ja(e.icon)}):null,e.label?h("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),xs=p((({className:e="",...t})=>h(V,{className:`font-sans text-primary-text ${e}`,...t,children:w(t)})));xs.childrenTypes=["OtherProductsItem"];const gs=p((({className:e="",label:t,icon:l,dataTheme:a="",onClick:n})=>u("button",{className:["border border-transparent bg-primary-main font-sans text-white cursor-pointer","hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none","flex justify-center w-full px-0 py-5",e].join(" "),"data-theme":a,onClick:n,children:[h("span",{className:"text-h4 pr-3",children:t}),l?h(Y,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),bs=({isUnfolded:e,onToggle:t})=>h(gs,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),fs=["ArrowDownIcon","ArrowUpIcon"],vs=p((({className:e,label:t="",isUnfolded:l,...a})=>{const{colorPalette:n}=function(e,t){const{content:l}=function(e){return e?.parent||{}}(e);return l||t}(a.options,{});return h("div",{className:`border-0 border-b border-solid border-main-divider ${e}`,children:h(z,{unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>h("div",{className:"box-border",children:h(A,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(a)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>h(gs,{label:t,icon:fs[Number(e)],dataTheme:n||a.options?.page?.colorPalette,onClick:l})})})}));vs.childrenTypes={exclude:["OtherProductsItem"]};const Ns=p((({text:e,size:t,align:l,font:a,children:n,...r})=>h(V,{...r,children:h(_,{size:t,align:l,font:a,children:e||n})}))),ys=p((e=>{const{className:t="",icon:l,label:a,description:n,version:r="primary",benefitsVersion:i="normal"}=e,s="white"===i?"secondary":"primary";return u("div",{className:`flex gap-5 ${n?"items-start":"items-center"} ${t}`,children:[l?h("div",{className:ws(r,i),children:h(Y,{className:"w-6 h-6",image:ja(l,s),asSVG:!0})}):null,u("div",{className:"gap-0.5",children:[a?h("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:a}):null,n?h("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:n}):null]})]})}));function ws(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 Cs=p((e=>{const{__html:t=""}=e;return h("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));function ks(e){throw new Error(e)}const Ss=e=>(t,l)=>{const{type:a}=t;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return h(ys,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));case"rte":return h(Cs,{__html:t.__html});default:ks(t)}},$s=p((({className:e="",title:t,description:l,image:a,benefits:n,sum:r,monthLimit:i,directionRight:s=!1,version:o="primary",...c})=>u(V,{className:`relative py-12 px-24 ${e}`,version:o,...c,children:[h(Lt,{className:"!p-0",title:t,description:l,headlineVersion:"M"}),u("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[a?.src?h(Y,{className:s?"order-2":"",image:a}):null,u("div",{className:"w-[558px] m-auto",children:[n?.length?h("div",{className:"flex flex-col gap-4",children:n.map(Ss(o))}):null,Is(Number(r),Number(i))]})]})]})));function Is(e,t){return e||t?u("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Ts("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Ts("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Ts(e,t=0,l=!1){return u("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[h("span",{className:"text-secondary-text text-l-light",children:e}),u("span",{className:"text-primary-main text-h6",children:[qe(t)," ₽"]})]})}function Bs(e=""){const t=Ai(e);return t<=4?"S":t<=8?"M":"L"}function Rs(e=""){const t=Ai(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Vs=p((({className:e,title:t,description:l="Блок в разработке...",...a})=>u(V,{className:g("p-9 box-border",e,Rs(e),Oi(e)),...a,children:[h(Lt,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:Bs(e)}),h("figure",{className:"m-0 min-w-[80%]",children:js()})]}))),js=(e=3)=>_s(100,e).map((e=>Math.floor(e))).map(Ls),Ls=(e,t)=>h("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),_s=(e,t)=>[e].concat(t>0?_s(e/1.618,t-1):[]),Ms=p((({className:e="",children:t,...l})=>{const a=xe(),{text:n,href:r,target:i,onClick:s}=a(l);return r?h("a",{className:`no-underline ${e}`,href:r,target:i,onClick:s,children:h("span",{className:e,children:n||t})}):h("span",{className:e,children:n||t})})),Ds=(e="primary",t="normal")=>({icon:l,label:a,description:n},r)=>h(ys,{icon:l,label:a,description:n,version:e,benefitsVersion:t},String(r)),zs=p((({className:e="",title:t,headlineVersion:l="L",description:a,benefitsCountOfRow:n=3,benefits:r,benefitsVersion:i,buttons:s,footnote:o,image:c,items:d,version:m="primary",isDotted:p=!0,textBlockClassName:x=""})=>{const b=r?.filter((e=>e.label))?.length,f=As(n);return u("div",{className:g("flex grow justify-between items-stretch h-full",e),children:[u("div",{className:g("flex flex-col",x),children:[h(Lt,{className:"!p-0 max-w-[600px]",title:t,description:a,headlineVersion:l,align:"text-left"}),u("div",{className:"flex flex-col justify-between h-full",children:[u(ua,{buttons:Tt(s),children:[b?h("div",{className:f,children:r.map(Ds(m,i))}):null,d?.length?h(Sa,{className:"mt-5 text-h6",items:d,itemClassName:"mb-[7px]",isDotted:p}):null]}),o?h("p",{className:"text-m-light pt-12",children:o}):null]})]}),c?.src&&h(Y,{className:"mt-[-50px]",image:c})]})})),As=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function Os(e,t,l){const{text:a,href:n,target:r,onClick:i}=e,s="primary"===t?"white":"black",o=e?.icon||{icon:"ArrowLeftIcon"};return u("div",{className:`flex items-center cursor-pointer ${l}`,onClick:i,children:[h($e,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:a,href:n,target:r,children:h(Y,{className:"w-4 h-4",image:{...o,iconVersion:o.iconVersion||s},asSVG:!0})}),a?h("span",{className:"text-m",children:a}):null]})}const Ps="text-secondary-text group-data-secondary:text-white/80",Fs=p((e=>{const{className:t="",breadcrumbs:l,backwardButton:a,version:n="primary",...r}=e,i="primary"===n?n:"white";return u(V,{className:`overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${t}`,version:n,...r,children:[a?.text?Os(a,i,"mb-10 -mt-2.5"):null,l?.length?h("div",{className:"text-xs-light mb-6",children:wi(h("span",{className:`mx-2 ${Ps}`,children:"/"}))(l.map(((e,t)=>h(Ms,{className:Ps,...e},String(t)))))}):null,h(zs,{version:n,...r})]})})),Es=p((({className:e="",slides:t=[],version:l="primary",...n})=>{const i=t.map((e=>e.nav)),s=t.map((e=>e.productBlock)),[o,c]=a(0),d=r((e=>c(e)),[]);return u(V,{className:`box-border pt-12 overflow-hidden relative w-100 mb-6 ${e}`,version:l,...n,children:[h("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,t)=>function(e,t){return h("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:h("div",{className:"flex grow",children:h(zs,{className:"pl-12 z-10 text-secondary-text group-data-secondary:text-white",textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...n,version:l},t)))}),h("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:i.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:a}){const n=l?"bg-white shadow-dark-blue min-w-[350px] border-none p-6":"min-w-[290px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10 px-6 py-5 backdrop-blur",r=l?"text-primary-text !text-h6 p-2":"text-l pb-1 text-secondary-text group-data-secondary:text-white",i=l?"text-secondary-text text-l-light":"text-m-light text-secondary-text group-data-secondary:text-white/80";return h("button",{type:"button",onClick:a,"aria-label":e?.title,className:`relative box-border overflow-hidden cursor-pointer text-left mx-1 grow basis-0 border border-gray group-data-secondary:border-white/50 ${n}`,children:u("div",{className:"border-0 px-6",children:[h("div",{className:`last:pb-0 ${r}`,children:e?.title}),h("div",{className:`text-secondary-text ${i}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===o),onClick:()=>d(t)})))})]})}));function Us(e,t){if(!e)return null;return h("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:h(_,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e})})}const Hs=(e,t)=>{const{type:l}=e;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return[h(K,{size:"text-h6",children:e.label},`label-${t}`),h(K,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e.description},`desc-${t}`)];case"rte":return h("div",{className:"col-span-2",children:h(Cs,{__html:e.__html})});default:ks(e)}};function Xs(e,t){return e?.src?h(Y,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const Gs=p((({className:e="",title:t,headlineVersion:l="S",description:a,additionalDescription:n,benefits:r=[],buttons:i,image:s,isImageOnRightSide:o=!0,...c})=>u(V,{className:g("overflow-hidden p-9 box-border relative min-h-[364px]",Rs(e),e),...c,children:[u("div",{className:g("flex flex-col",o?"":"items-end"),children:[h(Lt,{className:g("!p-0 !bg-transparent z-10",t||a?"mb-3.5":""),title:t,description:a,headlineVersion:l,as:"h2",align:"text-left"}),Ws(r,s),Us(n,s),Tt(i,{className:"mt-5 z-10 text-l"})]}),Xs(s,o)]})));function Ws(e,t){if(!e.length)return null;return h("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline\n ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(Hs):null})}const Js=p((({className:e="",title:t="Акции и спецпредложения",date:l,description:a,as:n,buttons:r=[],...i})=>h(V,{className:g("p-9 box-border",e,Rs(e),Oi(e)),...i,children:h(ua,{title:t?h(Lt,{className:"!p-0 max-w-[600px]",title:t,headlineVersion:Bs(e),align:"text-left",as:n||"h2"}):null,buttons:Tt(r),children:u("div",{className:"mt-1.5",children:[l?h("div",{className:"text-s mb-2",children:Ys(l)}):null,h("div",{className:"text-l",children:a})]})})})));function Ys(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Ks=p((({className:e="",title:t,description:l,items:a,image:n,socialMedia:r,button:i,...s})=>{const o=t?h(L,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:t}):null,c=n?.src?h(Y,{className:"absolute bottom-0 right-0 m-0",image:n}):null;return h(V,{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${e}`,role:"listitem",...s,children:h(ua,{className:"flex justify-between",title:o,image:c,children:u("div",{className:"h-full flex flex-col justify-between",children:[l?h("span",{className:"mb-2",children:l}):null,a?.length?h(Sa,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:a}):null,r?h(Aa,{className:"pt-10 pb-0",media:r}):null,i?.text?h("div",{className:"pt-2",children:Tt([i],{buttonClassName:"mt-16 px-5"})}):null]})})})})),qs="absolute top-0 bottom-0 w-[84px]",Zs=p((({recommendations:e=[],className:t="",title:l,version:a="primary",...n})=>{const[r,i]=Xt({itemCount:e.length,visibleItemCount:2});return u(V,{className:`relative font-sans p-9 overflow-hidden text-center ${t}`,version:a,...n,children:[l?h(L,{headingType:"h3",className:"mb-6",title:l}):null,u("div",{children:[h("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*r}px)`},role:"list",children:e.length?e.map(((e,t)=>h(Ks,{version:a,className:"border-gray group-data-secondary:border-white/50",...e},String(t)))):null}),Yt({...i,btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})]}),h("div",{className:`${qs} left-0 ${"secondary"===a?"bg-opacity-from-main":"bg-opacity-from-white"}`}),h("div",{className:`${qs} right-0 ${"secondary"===a?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),Qs=p((e=>{const{__html:t,...l}=e;return h(V,{...l,children:h(Cs,{__html:t})})})),eo=p((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:a=!0,version:n="primary",...r})=>h(V,{className:`border-b border-solid border-main-divider w-full ${e}`,tag:"div",...r,children:h(z,{isFoldButtonOnTop:a,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>h("div",{className:"box-border",children:h(A,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(r)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>to({version:n,label:t,isUnfolded:e,onToggle:l})})})));eo.childrenTypes={exclude:["RollupItem","Accordion","AccordionItem","OtherProducts","OtherProductsItem"]};const to=({version:e,label:t,isUnfolded:l,onToggle:a})=>{const n=t||(l?"Скрыть":"Развернуть");return"primary"===e?lo({label:n,icon:l?"MinusIcon":"PlusIcon",onToggle:a}):h(gs,{label:n,icon:l?"ArrowUpIcon":"ArrowDownIcon",onClick:a})},lo=({label:e,icon:t,onToggle:l})=>u("button",{className:"border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer",onClick:l,children:[h("span",{className:"text-xl font-medium pr-2.5",children:e}),t?h(Y,{image:ja({icon:t}),width:"24",height:"24",asSVG:!0}):null]}),ao=p((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return h(je,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),no=p((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:a=[],selectedBranch:n,onSelectedBranch:r})=>u("div",{className:"flex justify-between gap-4 mb-6",children:[h("div",{className:"max-w-[396px] w-1/2",children:h(ao,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),h("div",{className:"max-w-[396px] w-1/2",children:h(ao,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:n,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ro=p((({name:e,text:t,value:l,checked:a,onChange:n,className:r})=>h("div",{className:r,children:u("label",{className:"font-sans flex items-center relative cursor-pointer",children:[h("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:a,onChange:e=>n(e.target.value)}),t?h("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),io=p((()=>{const[e,t]=a("option2"),l=r((e=>t(e)),[]);return u("div",{children:[h(ro,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),h(ro,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),so=["От 1 дня","До 365 дней"],oo=p((({days:e,setDays:t})=>u("div",{className:"mb-6",children:[h("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),h(et,{min:1,max:365,value:e,items:so,onChange:t})]}))),co=p((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:a=[],selectedBoxSize:n,onSelectedBoxSize:r})=>u("div",{className:"flex justify-between mb-6",children:[h("div",{className:"mr-4 w-full",children:h(ao,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),h("div",{className:"w-full",children:h(ao,{data:a,fieldLabel:"safeBoxCasesSize",selected:n,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),mo=p((({regions:e,selectedRegion:t,branches:l,selectedBranch:a,days:n,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>u("div",{className:"flex-1 mr-9",children:[h(no,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:a,onSelectedBranch:ho(c)}),h(oo,{days:n,setDays:e=>c({days:e})}),h(co,{caseVolumes:o,selectedCaseVolume:r,onSelectedCaseVolume:uo(c),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),h("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),u("div",{className:"flex justify-between items-center mt-5",children:[h(io,{}),h($e,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),ho=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},uo=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},po=p((({days:e,tariffs:t=[]})=>{const l=go(e,t);return u("div",{className:"flex flex-col justify-between",children:[u("div",{className:"flex",children:[xo("Аренда за",e,"mr-11"),xo("Цена",l+" ₽")]}),u("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[h(Y,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),u("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",h("br",{})," листов формата А4"]})]})]})})),xo=(e,t,l="")=>u("div",{className:l,children:[h("div",{className:"text-m-light text-secondary-text mb-1",children:e}),h("span",{className:"text-h3 text-primary-text",children:t})]}),go=(e,t)=>{const l=bo(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},bo=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},fo=(e,t)=>e.find((e=>e.branchCode===t)),vo=p((e=>{const{regions:t,data:l,branches:a,onChange:r,onClick:i}=e;n((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,r]);const s=fo(a,l.selectedBranch),o=No(s?.safeBoxCaseVolumes),c=yo(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=wo(c,l.selectedBoxSize);return u("div",{className:"flex justify-between align-top mb-6",children:[h(mo,{...l,regions:t,onClick:i,branches:a,caseVolumes:o,safeBoxCases:c,onChange:r}),h(po,{days:l.days,tariffs:d})]})})),No=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],yo=(e,t)=>e?.find((e=>e.volume===t)),wo=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Co=p((({title:e,footnote:t,className:l="",...n})=>{const[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),[c,d]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=ie(),p=ko(c.selectedRegion,m),x=Je(p),g=r((e=>d((t=>({...t,...e})))),[d]),b=(f=fo(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 u(V,{className:l,...n,children:[u("div",{className:"px-8 py-12",children:[e?h(L,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,h(vo,{regions:m,branches:x,data:{...c,selectedRegion:p},onClick:o,onChange:g}),t?h("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&i?h(es,{points:b,className:"h-[640px]"}):null]})})),ko=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,So=e=>Boolean(e?.icon||e?.src),$o=({styleMap:e,isMainButton:t,version:l})=>(a,n,{length:r})=>{const{label:i,description:s,button:o,items:c,isDotted:d}=a,m=i&&(s||c)?"mt-2":"";return u("div",{className:`relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${Ro(r)}`,children:[u("div",{className:(o?.text?"mb-8":"")+" text-center",children:[Io(i),u("div",{className:`${m} flex flex-col items-center`,children:[To({description:s,className:e.description}),h(Sa,{className:Bo({className:"text-left",description:s,styleMap:e}),items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?h($e,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(n))},Io=e=>e?h("div",{className:"text-h6",children:e}):null,To=({description:e,className:t=""})=>e?h("div",{className:t,children:e}):null,Bo=({className:e,description:t,styleMap:l})=>[t?l.description:"text-h6",t?"mt-0.5":"",e].join(" "),Ro=e=>e<5?"w-[276px]":"w-[210px]",Vo={primary:{description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},gray:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},transparent:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},"":{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},jo=p((({className:e="",showLines:t=!0,steps:l=[],button:a,version:n="primary",...r})=>{const{title:i}=r,s=Vo[n],o=l.length>3,c=(e=>e?"":"opacity-0")(t),d=i?"mt-9":"",m=(e=>e<5?"px-[88px]":"px-[55px]")(l.length);return u(V,{className:["box-border py-12",o?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",e].join(" "),version:n,...r,children:[i?h(L,{headingType:"h3",className:"max-w-[752px] text-center",title:i}):null,l?.length?u("div",{className:`box-border ${d}`,children:[h("div",{className:`flex items-center ${m}`,children:wi(h("div",{className:`h-0.5 w-full bg-secondary-light ${c}`}))(l.map(Lo(s,n)))}),h("div",{className:"flex justify-between mt-4 "+(o?"gap-x-3":"gap-x-[101px]"),children:l.map($o({styleMap:s,isMainButton:Boolean(a?.text),version:n}))})]}):null,a?.text?h($e,{className:"mt-8 min-w-60",version:"primary",...a}):null]})})),Lo=(e,t)=>({icon:l},a)=>h("div",{className:"flex flex-col items-center text-center",children:h("div",{className:`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center ${e.iconBackground}`,children:So(l)?h(Y,{image:ja(l||{},t),width:"48",height:"48",asSVG:!0}):h("span",{className:`text-h4 ${e.iconText}`,children:a+1})})},String(a)),_o={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Mo={"horizontal-list":"w-6","vertical-list":"h-6"},Do=p((({containerRef:e,activeIndex:t,dotCount:l=0,listType:a="horizontal-list"})=>l?h("div",{className:`flex gap-2 ${_o[a]}`,children:new Array(l).fill(null).map(((l,n)=>h("div",{className:`cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white group-data-transparent:bg-white ${n===t?Mo[a]:"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"})})(n)},String(n))))}):null)),zo=p((({className:e="",gap:t=14,padding:l=16,showDots:a=!0,children:n,onVisibleIndicesChange:r,listType:i="horizontal-list"})=>{const s=Array.isArray(n)?n.length:0,[o,c]=Yl({itemCount:s,onVisibleIndicesChange:r}),[d]=c.visibleIndicesRange;return u("div",{className:g(e,"vertical-list"===i?"relative h-full":""),children:[h(Fl,{containerRef:o,activeIndex:d,visibleItemCount:1,gap:t,padding:l,onVisibleIndicesChange:c.handleVisibleIndicesChange,listType:i,children:n}),a?h(Do,{containerRef:o,activeIndex:d,dotCount:s,listType:i}):null]})})),Ao=p((({listType:e,showDots:t,options:l,...a})=>h(V,{...a,children:h(zo,{listType:e,showDots:t,children:w({...a,options:l})})})));Ao.childrenTypes={exclude:["SwipeListControlBlock"]};const Oo="h-12 flex-1 flex items-center justify-center cursor-pointer",Po="font-sans text-m text-center",Fo="text-white",Eo="text-secondary-text group-hover/btn:text-primary-main",Uo="text-primary-main",Ho={div:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${Oo} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${Oo} group/btn bg-white`},default:{active:`${Oo} bg-primary-main text-white whitespace-nowrap`,default:`${Oo} group/btn bg-white whitespace-nowrap`}},text:{scrollable:{active:"h-full border-0 border-b-2",default:""},default:{active:"",default:""}}},Xo={link:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${Oo} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${Oo} group/btn bg-white`},default:{active:`${Oo} bg-primary-main text-white`,default:`${Oo} group/btn bg-white`}},text:{scrollable:{active:`${Po} flex items-center h-full border-0 border-b-2 text-primary-main`,default:`${Po} ${Eo}`},default:{active:`${Po} text-white`,default:`${Po} ${Eo}`}}},Go=(e,t,l)=>{const a=t?"active":"default";return Ho[e][l?"scrollable":"default"][a]},Wo=(e,t,l)=>{const a=t?"active":"default";return Xo[e][l?"scrollable":"default"][a]},Jo=p((e=>{const{tab:t,currentTab:l,isScrollable:a=!1}=e,n="link"===l?.type&&l.href===t.href,r=xe()(t);return h("a",{role:"tab",className:Wo("link",n,a),target:t.target,href:r.href,onClick:r.onClick,children:h("span",{className:Wo("text",n,a),children:t.text})})})),Yo=(e,t,l)=>e?h("h3",{className:l?`${Po} ${t?Uo:Eo}`:`${Po} ${t?Fo:Eo}`,children:e}):null,Ko=(e,t,l)=>e&&t?h("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,qo=({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=r.type;if("group"!==s&&"link"!==s)return null;switch(s){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=t===r,o=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return h("div",{className:Go("div",s,n),role:"tab","aria-selected":s,onClick:()=>a(r),children:u("div",{className:`flex flex-1 items-center justify-center ${Go("text",s,n)}`,children:[Yo(r.title,s,n),Ko(l,o,s)]})},`group-${String(i)}`)})({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n})(r,i);case"link":return h(Jo,{tab:r,currentTab:t,isScrollable:n},String(i));default:ks(s)}return null},Zo=p((e=>{const{tabs:t,onClick:l,currentTab:a,page:n,showCounter:r}=e,[i,s]=Yl({itemCount:t?.length||0,isCyclic:!1});return u("div",{className:"relative max-w-full m-auto",children:[h("div",{className:"font-sans max-w-full w-full overflow-hidden relative bg-white",children:h(Fl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,children:t?.map(qo({onClick:l,currentTab:a,showCounter:r,page:n,isScrollable:!0}))})}),s.canScrollLeft?h(Wt,{className:"absolute z-50 top-0 left-6",onClick:s.scrollLeft}):null,s.canScrollRight?h(Jt,{className:"absolute z-50 top-0 rotate-180 right-6",onClick:s.scrollRight}):null]})})),Qo=p((e=>{const{className:t="",tabs:l,showCounter:i,isSticky:s,tabsMode:o,...c}=e,[d,m]=a(l?l[0]:void 0);n((()=>k.inst.subscribe("tab",(e=>{const t=l?.find(ec(e));return"link"===e.type&&t&&m(t),[]}))),[l]),n((()=>"group"===d?.type?k.inst.subject("tab",{type:d.type,label:d.ref}):void 0),[d]);const u=r((e=>{"group"===e?.type&&k.inst.fire("tab",{type:e.type,label:e.ref}),m(e)}),[]);return h(V,{className:`relative box-border flex gap-x-1 w-full ${s?"sticky top-1 z-20 ":""} ${t}`,role:"tablist",...c,children:"scrollable"===o?h(Zo,{tabs:l,onClick:u,currentTab:d,showCounter:i,...c}):l?.map(qo({onClick:u,currentTab:d,showCounter:i,...c}))})})),ec=e=>t=>"link"===t.type&&t.href===`#${e.label}`,tc=p((({isOpen:e,onClick:t})=>u($e,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[h("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),h(P,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),lc={Buttons:({buttons:e})=>Tt(e,{buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?h(Y,{image:e}):null,List:({isDotted:e,...t})=>h(Sa,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>u("div",{children:[e?h("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?h("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:p((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:a,isOpen:n})=>e?h(tc,{isOpen:n,onClick:()=>{t({dataUrl:l,pdfUrl:a})}}):null))},ac=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=a(!0);n((()=>{t===i&&r||m(!0)}),[r,i]);return u("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?h("div",{className:"h-5"}):null,nc({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})]},String(c))},nc=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...a}=e;if(!l||!(l in lc))return null;return h(lc[l],{...t,...a})},rc=p((({cells:e,rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>h("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(ac({rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})):null}))),ic=p((({rows:e})=>{const t=e?.[0]?.length??0,[l,a]=Xt({itemCount:t,visibleItemCount:5});return u("div",{children:[e?.map(sc(l)),Yt({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),sc=e=>(t,l)=>{if(!t?.length)return null;const[a,...n]=t,r=[...Array(e).keys()].reduce(((e,t)=>140*(n?.[t]?.cols?.length??1)+e),0),i=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return u("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[a?.data?h("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:a.data}):null,h("div",{className:"flex flex-grow overflow-hidden",children:h("div",{className:i,style:{transform:`translateX(-${r}px)`},children:n?.map(((t,l)=>u("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?h("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?oc(t.cols,e):null]},`row${l}`)))})})]},String(l))},oc=(e,t)=>e?.length>0?h("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>h("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,cc=p((({activeTabIndex:e,items:t})=>{const[l,n]=a({}),i=r((e=>n((t=>({...t,[e]:!t[e]})))),[]);return h("div",{children:t.map(((t,a)=>{const n=`activeTabIdx:${e}-tableIdx:${a}`;return u("div",{className:"w-full",children:[u("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>i(n),children:[t.title,h(Y,{image:{icon:l[n]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),h("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[n]?"h-0":""),children:h("div",{className:"relative",children:h(ic,{rows:t.rowsData})})})]},n)}))})})),dc=p((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:a})=>u("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?h("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>h("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>a(t),children:e||t+1},e)))}):null,t?h($e,{href:t,version:"secondary",target:"_blank",appendLeft:h(P,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function mc(e){const t=await fetch(e);return await t.json()}const hc=p((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:n}=function(e){const{data:t}=le(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),mc);return t||{}}(e),[i,s]=a(0),o=r((e=>s(e)),[]),c=n?.[i]?.items??[],d=n?.map((e=>e.currency??""));return u("div",n?{className:"bg-white z-10",children:[h(dc,{currencies:d,activeTabIndex:i,setActiveTabIndex:o,linkToPDF:t}),h(cc,{activeTabIndex:i,items:c}),h(tc,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[h("p",{children:"Данных нет"}),h(tc,{onClick:l,isOpen:!0})]})})),uc=p((({children:e,tableInner:t,onHideContentClick:l})=>u("div",{className:"self-start flex flex-col",role:"row",children:[h("div",{className:"flex",children:e}),t?h("div",{className:"origin-top animate-expansion",children:h(hc,{...t,onClick:l})}):null]}))),pc=p((({row:{header:e,data:t},activeIndex:l,rowIdx:n,...i})=>{const[s,o]=a(void 0),c=r((e=>o(e)),[]),[d,m]=a(void 0),p=r((e=>m(e)),[]);return u(uc,{onHideContentClick:()=>o(void 0),tableInner:s,...i,children:[h("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:u("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?h(Y,{className:"mr-3.5 max-w-6 max-h-6",image:ja(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?h("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?h(an,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>h(rc,{cells:e,rowIdx:n,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:p,...i},String(t))))}):null]})})),xc=p((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:n,hiddenRowsNum:r=0,...i})=>{const s=n?.map((({data:e})=>e))||[],o=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Xt({itemCount:c,visibleItemCount:2}),p=(o||[]).map(((e,t)=>h(pc,{row:e,activeIndex:d,rowIdx:t,...i},String(t)))),[x,g]=r>0?[p.slice(0,-r),p.slice(-r)]:[p,[]];return u(V,{className:`p-12 overflow-hidden relative ${c>1?"pr-0":""} ${e}`,...i,children:[gc({title:t,description:l}),bc(l),r>0?h(z,{renderFoldableSection:({isUnfolded:e})=>u(fc,{controls:m,children:[x,h(A,{isUnfolded:e,children:g})]}),renderFoldButton:bs}):h(fc,{controls:m,children:p})]})}));function gc({title:e,description:t}){return e?h(L,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function bc(e){return e?h("div",{className:"mb-9 text-center text-l",children:e}):null}const fc=p((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return u("div",{role:"table",children:[u("div",{className:"relative",children:[e,Yt({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?h("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),vc={primary:"bg-white",secondary:"bg-primary-main","secondary-light":"bg-primary-main/10"},Nc=p((({className:e="",title:t,description:l,blockVersion:a="primary",iconVersion:n,image:r,...i})=>{const s="secondary"===a;return u(V,{className:`px-9 py-4 flex gap-3 ${vc[a]} ${e}`,...i,children:["small"===n?h("div",{className:"mt-1",children:yc(s)}):null,"big"===n?wc(r):null,u("div",{children:[t?Cc(t,s):null,l?h("div",{className:"mt-1",children:kc(l,s)}):null]})]})})),yc=e=>h("div",{className:"rounded-full h-4 w-4 text-center text-xs-light "+(e?"bg-white text-primary-main":"bg-primary-main text-white"),children:"i"}),wc=e=>e?.src?h(Y,{image:e}):null,Cc=(e,t)=>h(K,{size:"text-l",font:"font-medium",color:t?"text-white":"text-primary-text",children:e}),kc=(e,t)=>h(_,{size:"text-s",color:t?"text-white":"text-secondary-text",children:e}),Sc=p((e=>{const{tags:t,className:l=""}=e;return t?.length?h("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map($c)}):null})),$c=(e,t)=>h("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),Ic=p((({title:e,headingType:t="h3",description:l,items:a,buttons:n,image:r,isDotted:i=!0,listItemSize:s="M",className:o="",tags:c,children:d,...m})=>h(V,{className:`overflow-hidden p-9 pr-3 box-border ${Rs(o)} ${Oi(o)} ${o}`,...m,children:u(ua,{title:e?h(L,{headingType:t,as:"h2",title:e,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:Tt(n,{className:"mt-8",buttonClassName:"min-w-[158px]"}),image:r?.src?h(Y,{className:"mt-auto ml-7",image:r}):null,children:[l?h("div",{className:"max-w-[600px] mt-2.5",children:h(_,{size:"text-xl-light",children:l})}):null,d,h(Sa,{className:"mt-2.5",itemClassName:"mb-1.5",items:a,isDotted:i,listItemSize:s}),c?.length?h(Sc,{tags:c,className:"mt-5"}):null]})}))),Tc={left:"items-start",center:"items-center",right:"items-end"},Bc=p((({className:e="",gap:t="",align:l,isPadding:a=!1,isInnerPadding:n=!0,version:r="transparent",options:i,...s})=>{const o=n?"":"!p-0";return h(V,{className:g("flex flex-col [&>*]:max-w-full",a?"p-12":"",ui[t],l&&Tc[l],e),version:r,...s,children:w({...s,options:{...i,className:o}})})}));Bc.childrenTypes=[];const Rc=e=>Ai(e)<10?"py-6 px-11":"py-12 px-32",Vc=p((({className:e,title:t,src:l,previewImg:a,...n})=>u(V,{className:g(Rc(e),e),...n,children:[h(Lt,{title:t,headlineVersion:"M"}),l?h("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:a?.src,style:{maxHeight:524},controls:!0,children:h("source",{src:l})}):null]}))),jc={Accordion:D,AccordionItem:Z,ApplicationForm:wt,BenefitsBlock:Ct,Bonus:_t,BonusBenefitsBlock:At,BusinessBlock:Ut,ButtonBlock:Ht,Calculator:Rl,CardTransfer:zl,Carousel:ea,CarouselBankHistoryCard:aa,CarouselCard:ca,CarouselCatalogCard:ma,CarouselInvestmentCard:xa,CarouselLinks:va,CarouselProductCard:$a,CarouselProgramsCard:La,CarouselRecommendationCard:Oa,CarouselTariffsCard:Pa,Catalog:Ka,ComparisonTable:xn,ContactsBlock:bn,ErrorBlock:yn,ExchangeRateTile:Un,Footer:xr,Gallery:Ir,GracePeriod:Tr,Header:hi,Headline:Lt,HorizontalLayout:pi,ImgBlock:xi,InsuranceAmountBlock:Ni,InvestmentInfo:Si,LinkDocs:Di,MiniGallery:zi,MobileAppTile:Pi,OfficeMap:hs,OfficeServicesBlock:us,OtherProducts:xs,OtherProductsItem:vs,ParagraphBlock:Ns,PictureText:$s,Placeholder:Vs,ProductBlock:Fs,ProductGallery:Es,ProductTile:Gs,PromoTile:Js,Recommendation:Zs,RichTextBlock:Qs,RollupItem:eo,SafeDepositRental:Co,StepsBlock:jo,SwipeListControlBlock:Ao,Tabs:Qo,TariffsTable:xc,TextBlock:Nc,Tile:Ic,VerticalLayout:Bc,Video:Vc},Lc=["Header","Footer"],_c=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Mc(e=B.inst,t=globalThis){const l=s(new Map);n((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{l.current&&l.current.set(e,t)}))),[e]),n((()=>{const a=((e,t=600)=>{let l;const a=(...n)=>{a.dispose(),l=setTimeout((()=>{e(...n)}),t)};return a.dispose=()=>{l&&clearTimeout(l)},a})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!Lc.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Gl(_c)(t):[];return l}([...l.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",a),()=>{a.dispose(),t.removeEventListener("scroll",a)}}),[e,t])}const Dc=m();const zc=p((({className:e,onClick:t,ariaLabel:l})=>h("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Ac()}))),Ac=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return u("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h("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"}),h("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"})]})},Oc=p((({className:e=""})=>{const t=function(e){const[t,l]=a(0);return n((()=>{(async()=>{const[t]=await Dc.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:r((async()=>{l(await Dc.like(e))}),[e]),dislike:r((async()=>{l(await Dc.dislike(e))}),[e])}}(pe().pathname);return u("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:[h(zc,{onClick:ue(t.like),ariaLabel:"Поставить отметку «лайк»"}),h(zc,{onClick:ue(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),h("span",{className:"select-none",children:t.likeCount})]})})),Pc=p((e=>{const{className:t="",blocksRegistry:l,blockDecorator:a,data:n={}}=e,{style:r,blocks:i,slots:s,likeControl:o,colorPalette:c="pc"}=n,d={key:"",page:n,blocksRegistry:l,blockDecorator:a,parent:n};return Mc(),u("section",{className:g("relative",r,t),"data-theme":c,children:[s?.header?h("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,u("div",{className:"container grid grid-cols-12 gap-1",children:[y(i,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?h("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:h(Oc,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));Pc.childrenTypes=[],Pc.slots=()=>["header","footer"];e.Blocks=jc,e.ContentPage=Pc,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=m,e.handlerDecorator=ue,e.joinList=wi,e.packageVersion="0.8.5",e.projectSettings=c,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=he,e.useRouter=pe,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),a=l("useState"),n=l("useEffect"),r=l("useCallback"),i=l("useMemo"),s=l("useRef");const o={PROD_BRANCH:"master"},c=new class{_=o;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||o.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 CDN(){return this._.CDN}get BASE_PATH(){return this._.BASE_PATH&&!this._.BASE_PATH.endsWith("/")?`${this._.BASE_PATH}/`:this._.BASE_PATH}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},d="likesToken";function m(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(d)||"");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(d,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/${c.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:a}=await e.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||0}catch(e){return console.error(e),0}}}}const h=(...e)=>globalThis._uni._jsx(...e),u=(...e)=>globalThis._uni._jsxs(...e),p=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:a,...n}=t||{},r=l?.slots?.default,i=a||r&&r();return e(Object.assign(n,i&&{children:i}),l)}return t.inheritAttrs=!1,t},g=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),b=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),f=[];function v(e,t){const{key:l,blockDecorator:a=b,blocksRegistry:n={},ancestors:r=f,className:i=""}=t,{type:s}=e;s&&s in n||console.warn(`No block with "${s}" is registered`);const o=s&&n[s];return a({blockClassName:g("scroll-mt-12",i,e.style||"col-span-12"),block:e,ancestors:r,render:({block:a,blockClassName:n})=>{const{content:r}=a;return o?h(o,{className:n,block:e,options:t,...r},l):null}},l)}const N=[],y=(e,{key:t,ancestors:l=N,slotName:a=null,renderChild:n=v,...r})=>(e||[]).map(((e,i)=>n(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...l||N,[r.parent,a]]:l})));function w({children:e,block:t,options:l,renderChild:a}){return e||(t&&l?y(t.blocks,{...l,parent:t,renderChild:a}):null)}const C={left:"text-left",center:"text-center",right:"text-right"};class k{static inst=new k;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}}function S(e,{sensitivity:t,rootRef:l}={}){const a=s(null),r=i((()=>({threshold:$(t),root:l?.current})),[t,l?.current]);return n((()=>{if(!a.current)return;const t=new IntersectionObserver(e,r);return t.observe(a.current),()=>{t.disconnect()}}),[e,r]),a}function $(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 I=e=>e?.replace("#","")||"",T=e=>`${globalThis.location?.pathname}#${I(e)}`;class B{static inst=new B;eventBus=new k;constructor(){const e=I(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=I(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",T(e))}replace(e){globalThis.history?.replaceState(null,"",T(e))}reset(){globalThis.history?.replaceState(null,"",T())}}const R={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","":""},V=p((({className:e="",version:t="primary",block:l,tag:i="section",role:s,children:o})=>{const c=i,d=function(e,t=B.inst){const l=S(r((l=>{if(!e||!l?.length)return;const a=l[l.length-1];t.eventBus.fire("intersection",{block:e,intersection:a})}),[e,t]),{sensitivity:1});return n((()=>{if(l.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{l.current&&e?.anchor===t&&l.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),l}(l),[m,u]=a(!0);return n((()=>k.inst.subscribe("tab",(e=>{if("group"===e.type){const t=l?.labels?.length||l?.anchor;u(!e.label||(!t||Boolean(l?.labels?.includes(e.label))))}else u(!0)}))),[l]),m?h(c,{className:g("group",R[t],e),...t?{"data-ver":t}:{},...l?.anchor?{id:l.anchor,ref:d}:{},role:s,children:o}):null})),j={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},_=p((({className:e="",headingType:t="h3",as:l="h3",title:a,children:n})=>h(l,{className:`font-sans m-0 ${j[t]} ${e}`,children:a||n}))),L=p((({children:e,...t})=>h("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),M=p((({children:e})=>h("ul",{className:"list-none m-0 p-0",children:e}))),A=p((({className:e="",title:t,accordionAlignTitle:l="center",description:a,...n})=>u(V,{className:`p-12 mb-1 last:mb-0 ${e}`,...n,children:[t?h(_,{headingType:"h3",as:"h2",className:`mb-2.5 ${C[l]}`,title:t}):null,a?h("div",{className:"mb-2.5",children:h(L,{size:"text-l",children:a})}):null,h(M,{children:w(n)})]})));A.childrenTypes=["AccordionItem"];const D=p((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:n,renderFoldButton:i})=>{const[s,o]=a(l),c=r((()=>{o((e=>!e))}),[]),d=n({isUnfolded:s,onToggle:c}),m=i?i({isUnfolded:s,onToggle:c}):null;return u("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),z=p((({className:e="",isUnfolded:t,children:l})=>{const a=s(null);return n((()=>{a.current&&(a.current.style.maxHeight=t?`${a.current.scrollHeight}px`:"")}),[t,l?.length]),h("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} ${e}`,children:l})})),O={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},P=p((({className:e="",imageClassName:t="",name:l="",alt:a=`Иконка ${l}`,title:n=a,iconVersion:r="color",asSVG:i,...s})=>{const o=`${c.CDN||""}icons/${l}.svg`;return i&&"normal"!==r?h(F,{className:e,children:u("svg",{className:g(E(s.width),O[r],"white"===r?"invert":"",t),...s,"aria-hidden":"true",children:[n?h("title",{children:n}):null,a?h("desc",{children:a}):null,h("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):h("img",{className:e,src:o,alt:a,title:n,...s,"aria-hidden":"true"})})),E=e=>e?"":"w-full h-full",F=p((({className:e,children:t})=>e?h("div",{className:e,children:t}):t)),U=(e,t)=>e.media&&t.media?e.media-t.media:0,H=p((({className:e="",image:t,imageClassName:l="",isMobile:a=!1,pathPrefix:n})=>{if(!t||!t?.sources&&!t?.src)return null;return u("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(U).map((({src:e,format:l,media:a},r)=>h("source",{srcSet:W(e,n),type:J(l),media:a?`(max-width: ${a}px)`:"",...t.size},`${r}_${e}`))):null,X({...t,src:G(t.src,n)},l,a)]})})),X=(e,t="",l=!1)=>{const a={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},n=e.title||"",r=e.alt||e.title,i=l?"m-auto":"m-0";return h("img",{src:e.src,className:`${i} ${t}`,alt:r,title:n,style:a,...e.size})},G=(e,t)=>!e||e?.startsWith("data:image")?e:`${((e="")=>e&&!e.endsWith("/")?`${e}/`:e)(t)}${e}`,W=(e,t)=>e?.split(",").map((e=>G(e.trim(),t))).join(", ");function J(e){return e?`image/${String(e)}`:void 0}const Y=p((({className:e="",image:t,imageClassName:l="",isMobile:a,pathPrefix:n,...r})=>t?.src||t?.icon?t.icon?h(P,{className:e,imageClassName:l,iconVersion:t?.iconVersion||"normal",name:t.icon,...r}):h(H,{className:e,imageClassName:l,image:t,isMobile:a,pathPrefix:n}):null)),K=p((({children:e,...t})=>h("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),q=["PlusIcon","MinusIcon"],Z=p((({className:e="",label:t="",isExpanded:l,...a})=>h("li",{className:`border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,children:h(D,{isFoldButtonOnTop:!0,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>h(z,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:w(a)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>h(Q,{label:t,icon:q[Number(e)],onClick:l})})})));Z.childrenTypes=[];const Q=p((({label:e,icon:t,onClick:l})=>u("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer",onClick:l,children:[h(K,{size:"text-xl",font:"font-medium",children:e}),h(Y,{image:{icon:t},className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0})]}))),ee=p((({className:e="",inputClassName:t="",id:l,name:a,type:n="text",label:i,value:s="",valid:o=!0,children:c,onChange:d,onBlur:m,...p})=>{const x=r((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=r((e=>{if(!m)return;const t=e.target.validity.valid?e.target.value:s;m(t)}),[m]),b=c?"pr-8":"",f=o?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return u("div",{className:`relative ${e}`,children:[i?h("label",{className:"block text-m-light mb-2",children:i}):null,h("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:a||l,type:n,value:s,onChange:x,onBlur:g,...p}),c]})})),te=new Map;function le(e,t,{fallback:l}={}){const r=i((()=>ae(e)),[e]),[s,o]=a(),[c,d]=a(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};n((()=>{if(!r.every((e=>null===e)))try{const e=t(...r);"then"in e?(e=>{e.then((e=>te.get(r)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...r]);const u=r[0],p=l&&"string"==typeof u&&l[u];return{data:!s&&p?p:s,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function ae(e){return e?Array.isArray(e)?e:e instanceof Function?ae(e()):[e]:[e]}async function ne(e,t){try{return await re(e,t)}catch(e){console.error(e)}return null}async function re(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function ie(){const{data:e}=le("/api/v1/regions",re);return e||[]}const se=[{code:"1",name:"Торговый эквайринг"},{code:"2",name:"Мобильный эквайринг"},{code:"3",name:"Интернет-эквайринг"},{code:"4",name:"QR-эквайринг (СБП)"},{code:"5",name:"Все виды эквайринга"}];const oe=e=>Boolean(e?.includes("//")),ce=(e,t)=>Boolean(e&&!oe(e)&&(!t||"_self"===t)),de=e=>Boolean(e?.startsWith("#")),me=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),he=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var ue=Object.freeze({__proto__:null,isURL:oe,isLocalURL:ce,isHash:de,withoutQuery:me,joinPath:he});const pe=(e,t)=>pe._impl(e,t);function xe(){return xe._impl()}function ge(e){const t=xe(),l=B.inst;return e=>({...e,href:a(e.href),"aria-label":e.text,onClick:pe(n(e),e)});function a(t){const l=!e&&t?.startsWith("/");return c.BASE_PATH&&t&&l?he(c.BASE_PATH,t):t}function n({href:a,target:n,onClick:r}){return i=>{r&&r(i),!e&&ce(a,n)&&(i?.preventDefault(),de(a)?l.goto(a):a&&t.push(a))}}}pe._impl=e=>e,pe.setup=e=>{pe._impl=e},xe._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),xe.setup=e=>{xe._impl=e};const be={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","":""},fe="bg-main-divider text-main-disabled",ve={primary:fe,secondary:fe,white:fe,link:"",transparent:"",gray:fe,"":""},Ne="text-center font-sans select-none",ye={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","":""},we=p((e=>{const{text:t,aboveText:l,appendLeft:a,appendRight:n,version:r="primary"}=e;return u("div",{className:Ce(e),children:[a?h("div",{className:ye[r],children:a}):null,ke(e)?u("div",{children:[l?h("div",{className:"text-xs-light text-left",children:l}):null,h("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,n?h("div",{className:ye[r],children:n}):null]})})),Ce=e=>{const{version:t,aboveText:l,rounded:a}=e;if("link"===t)return"";const n="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",ke(e)?n:"h-12 w-12",a?"rounded-full":""].join(" ")},ke=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),Se=({className:e,rounded:t,version:l})=>["inline-block",Ne,l?ve[l]:"",t?"rounded-full":"rounded-md",e].join(" "),$e=({className:e,rounded:t,version:l})=>[Ne,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",l?be[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Ie=p((({disabled:e,children:t,...l})=>{const a=ge()(l),n=t??h(we,{...a});return h(e?Be:Te,{...a,children:n})})),Te=p((({className:e="",href:t,rel:l,target:a,ariaLabel:n,version:r,rounded:i,onClick:s,children:o})=>h("a",{className:$e({className:e,version:r,rounded:i}),href:t,rel:l,target:a,"aria-label":n,role:t?"link":"button",onClick:s,children:o}))),Be=p((({className:e,ariaLabel:t,version:l,rounded:a,children:n})=>h("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Se({className:e,rounded:a,version:l}),children:n}))),Re=p((({link:e})=>u(L,{size:"text-s-light",color:"text-secondary-text",children:[h(K,{children:"Нажимая кнопку вы подтверждаете согласие с "}),e?h(Ie,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:h(K,{children:e.text})}):null]}))),Ve=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function je(e){const t=s(null);return n((()=>{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 _e=p((({className:e="",isBorder:t=!0,label:l,options:i=[],value:s,onChange:o,placeholder:c=""})=>{const[d,m]=a(i[0]||{key:"",text:""}),[p,x]=a(!1),g=je(r((()=>x(!1)),[]));return n((()=>{m(s||{key:"",text:""})}),[s]),u("div",{className:`${e}`,ref:g,children:[l?h("span",{className:"mb-2 flex text-primary-text",children:l}):null,u("div",{className:"relative "+(p?"z-20":"z-10"),children:[u("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${Ae(t)}`,onClick:()=>x(!p),children:[h("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),h(P,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(p?"":"rotate-180")})]}),i?.length?h("div",{className:`h-0 ${Le(p)}`,children:h("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:i.map(Me((e=>{m(e),x(!1),o(e)}),p,(e=>Boolean(e.key===d.key))))})}):null]})]})})),Le=e=>e?"":"overflow-hidden",Me=(e,t,l)=>(a,n)=>u("div",{onClick:()=>{e(a)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[h("span",{className:"min-h-6",children:a.text}),h(P,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(a)&&t?"":"hidden"].join(" ")})]},String(n)),Ae=e=>e?"border border-gray rounded-md hover:border-primary-hover":"",De=p((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return h(_e,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),ze=({acquiringType:e,regions:t,region:l,handleChange:a})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[h("div",{className:"w-1/2",children:h(De,{data:se,fieldValue:"code",fieldLabel:"name",selected:e,setSelected:e=>a({acquiringType:e}),label:"Вид эквайринга",placeholder:"Выберите эквайринг"})}),h("div",{className:"w-1/2",children:h(De,{data:t,fieldValue:"code",fieldLabel:"name",selected:l,setSelected:e=>a({region:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),Oe=p((({checked:e,text:t,onClick:l})=>u("div",{role:"checkbox","aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-4",onClick:()=>l&&l(),children:[h("div",{className:"relative duration-300 w-9 h-5 mr-3 rounded rounded-2xl "+(e?"bg-primary-main":"bg-main-divider"),children:h("div",{className:"absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded rounded-full "+(e?"left-[50%]":"left-[5%]")})}),h("div",{children:h(K,{size:"text-m",font:"font-light",color:"text-primary-text",children:t})})]}))),Pe=({"onlineСheckout":e,posTerminal:t,handleChange:l})=>u("div",{className:"mb-5",children:[h(Oe,{checked:e,text:"Хочу купить онлайн-кассу",onClick:()=>l({"onlineСheckout":!e})}),h(Oe,{checked:t,text:"Хочу купить POS-терминал",onClick:()=>l({posTerminal:!t})})]}),Ee=(e,t)=>{const l=$e({className:"text-white",version:e?.version});return h("button",{type:"submit",className:`p-4 ${l} ${t}`,children:e?.text?e.text:"Отправить заявку"})},Fe=({formState:e,handleSubmit:t,setFormState:l,typeForm:a})=>({handleChange:r((e=>l((t=>({...t,...e})))),[]),onSubmit:r((async l=>{l.preventDefault(),t&&await t({...e,typeForm:a})}),[])}),Ue=p((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({acquiringType:"",region:"",fullName:"",inn:"",name:"",phone:"","onlineСheckout":!1,posTerminal:!1}),{acquiringType:o,region:c,fullName:d,inn:m,name:p,phone:x,"onlineСheckout":g,posTerminal:b}=i,f=ie(),{handleChange:v,onSubmit:N}=Fe({formState:i,handleSubmit:r,setFormState:s,typeForm:"acqr"}),y=Ve(c,f);return n((()=>{s((e=>({...e,acquiringType:se?.length&&se[0]?.code?se[0].code:""})))}),[]),u("form",{onSubmit:N,className:"container",children:[h(_,{headingType:"h6",title:"Вид эквайринга и регион",className:"text-center mb-4"}),ze({acquiringType:o,regions:f,region:y,handleChange:v}),h(_,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),He({fullName:d,inn:m,name:p,phone:x,handleChange:v}),Pe({"onlineСheckout":g,posTerminal:b,handleChange:v}),Ee(t,"mb-4"),h(Re,{link:l})]})})),He=({fullName:e,inn:t,name:l,phone:a,handleChange:n})=>u("div",{className:"flex justify-between gap-5 mb-5",children:[u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})}),h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>n({name:e})})]}),u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text",label:"ИНН","aria-label":"ИНН",value:t,onChange:e=>n({inn:e})}),h(ee,{className:"shrink-0 text-l w-full",type:"text",label:"Телефон","aria-label":"Телефон",value:a,onChange:e=>n({phone:e})})]})]}),Xe=p((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({region:"",name:"",phone:"",inn:"",mail:""}),{name:s,phone:o,inn:c,mail:d}=r,m=ie(),{handleChange:p,onSubmit:x}=Fe({formState:r,handleSubmit:n,setFormState:i,typeForm:"bcrd"}),g=Ve(r.region,m);return u("form",{onSubmit:x,className:"container",children:[We({regions:m,region:g,handleChange:p}),Ge({name:s,phone:o,inn:c,mail:d,handleChange:p}),Ee(t,"mb-4"),h(Re,{link:l})]})})),Ge=({name:e,phone:t,mail:l,inn:a,handleChange:n})=>u("div",{className:"flex justify-between gap-5",children:[u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:e,onChange:e=>n({name:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:a,onChange:e=>n({inn:e})})]}),u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>n({phone:e})}),h(ee,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:l,onChange:e=>n({mail:e})})]})]}),We=({regions:e,region:t,handleChange:l})=>h("div",{className:"flex justify-between gap-5 mb-5",children:h("div",{className:"w-full",children:h(De,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>l({region:e}),label:"Регион",placeholder:"Выберите регион"})})}),Je=[];function Ye(e){const{data:t}=le(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ke);return t||Je}const Ke=async e=>await ne(e,{method:"GET"})||Je,qe=({regions:e,region:t,branches:l,department:a,handleChange:n})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[h("div",{className:"w-1/2",children:h(De,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>n({region:e}),label:"Регион",placeholder:"Выберите регион"})}),h("div",{className:"w-1/2",children:h(De,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:e=>n({department:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),Ze=e=>new Intl.NumberFormat("ru-RU",{}).format(e),Qe=(e,t,l)=>Math.max(t,Math.min(e,l)),et=e=>e.split(/\s+/).join(""),tt=p((({className:e,title:t,items:l=[],min:a=1,max:n=100,step:r=1,value:i=a,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(Qe(Number(et(e.target.value)),a,n))},d={backgroundSize:`${(100*(i-a)/(n-a)).toFixed(2)}% 100%`};return u("div",{className:e,children:[u("label",{className:"block relative",children:[t?h("span",{className:"text-m-light text-primary-text",children:t}):null,h("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md\n 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",value:Ze(i),disabled:s,onChange:c,onBlur:c}),h("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:h("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:a,max:n,step:r,value:i,disabled:s,onChange:c,style:d})})]}),lt(l)]})}));function lt(e){return h("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>h("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const at=({amount:e,term:t,handleChange:l})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[nt({label:"Сумма кредита, ₽",value:e,onChange:e=>l({amount:e}),min:it,max:st,items:ot}),nt({label:"Срок кредита, месяцев",value:t,onChange:e=>l({term:e}),min:ct,max:dt,items:mt})]}),nt=e=>u("div",{className:"w-1/2",children:[h("label",{children:h(K,{size:"text-m-light",children:e.label})}),h(tt,{...e})]}),rt=({fullName:e,inn:t,name:l,phone:a,mail:n,annualRevenue:r,handleChange:i})=>u("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>i({fullName:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:t,onChange:e=>i({inn:e})}),h(ee,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Телефон",label:"Телефон",value:a,onChange:e=>i({phone:e})})]}),u("div",{className:"w-1/2",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Годовая выручка, ₽",label:"Годовая выручка, ₽",value:r,onChange:e=>i({annualRevenue:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>i({name:e})}),h(ee,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:n,onChange:e=>i({mail:e})})]})]}),it=5e4,st=3e6,ot=["От 50 000 ₽","До 3 000 000 ₽"],ct=1,dt=60,mt=["От 1 года","До 5 лет"],ht=p((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({amount:it,term:ct,fullName:"",inn:"",name:"",phone:"",mail:"",region:"",department:"",annualRevenue:""}),{amount:o,term:c,fullName:d,inn:m,name:p,phone:x,mail:g,region:b,department:f,annualRevenue:v}=i,N=ie(),{handleChange:y,onSubmit:w}=Fe({formState:i,handleSubmit:r,setFormState:s,typeForm:"cred"}),C=Ve(i.region,N),k=Ye(b);return n((()=>{y({department:""})}),[i.region,y]),u("form",{onSubmit:w,className:"container",children:[h(_,{headingType:"h6",title:"Параметры кредита",className:"text-center mb-4"}),at({amount:o,term:c,handleChange:y}),h(_,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),rt({fullName:d,inn:m,name:p,phone:x,mail:g,annualRevenue:v,handleChange:y}),h(_,{headingType:"h6",title:"Офис банка",className:"text-center mb-4"}),qe({regions:N,region:C,branches:k,department:f,handleChange:y}),Ee(t,"mb-4"),h(Re,{link:l})]})})),ut=p((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({name:"",phone:""}),{handleChange:s,onSubmit:o}=Fe({formState:r,handleSubmit:n,setFormState:i,typeForm:"dpst"});return u("form",{onSubmit:o,className:"container",children:[h(_,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"text-center mb-4"}),pt({name:r.name,phone:r.phone,handleChange:s}),u("div",{className:"flex justify-between items-center max-w-[560px] m-auto",children:[h("div",{className:"flex-1",children:h(Re,{link:l})}),Ee(t)]})]})})),pt=({name:e,phone:t,handleChange:l})=>u("div",{className:"max-w-[560px] m-auto",children:[h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Имя",label:"Имя",value:e,onChange:e=>l({name:e})}),h(ee,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>l({phone:e})})]}),xt=p((({className:e,viewBox:t,fill:l="none",width:a,height:n,paths:r,...i})=>h("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:a,height:n,children:r.map((({d:e,fill:t,...l},a)=>h("path",{d:e,fill:t||"currentColor",...i,...l},a)))}))),gt=[{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"}],bt=p((({className:e,text:t,checked:l,disabled:a,isRadio:n,onChange:r})=>h("div",{className:e,children:u("label",{className:"flex items-center relative cursor-pointer group/box",children:[h("input",{className:g("peer appearance-none w-5 h-5 border-solid cursor-pointer checked:border-primary-main m-0",n?"rounded-full border-2":"rounded checked:bg-primary-main disabled:bg-main-disabled border",l?"border-black":"border-gray",a?"":"group-hover/box:border-primary-hover"),type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l,disabled:a}),n?h("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):h(xt,{paths:gt,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?h("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),ft=({currencyControl:e,documentaryOperations:t,conversionOperations:l,text:a,handleChange:n})=>u("div",{className:"mb-6",children:[u("div",{className:"flex items-center mb-4 gap-6",children:[h(bt,{text:"Валютный контроль",checked:e,onChange:e=>n({currencyControl:e})}),h(bt,{text:"Документарные операции",checked:t,onChange:e=>n({documentaryOperations:e})}),h(bt,{text:"Конверсионные операции",checked:l,onChange:e=>n({conversionOperations:e})})]}),h("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:border-primary-text focus:border-primary-text",value:a,onChange:e=>n({text:e.target.value})})]}),vt=p((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""}),{fullName:s,name:o,phone:c,mail:d,currencyControl:m,documentaryOperations:p,conversionOperations:x,text:g}=r,{handleChange:b,onSubmit:f}=Fe({formState:r,handleSubmit:n,setFormState:i,typeForm:"kved"});return u("form",{onSubmit:f,className:"container",children:[h(_,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Nt({fullName:s,name:o,phone:c,mail:d,handleChange:b}),h(_,{headingType:"h6",title:"Интересующий вопрос",className:"text-center mb-4"}),ft({currencyControl:m,documentaryOperations:p,conversionOperations:x,text:g,handleChange:b}),u("div",{className:"flex items-center pb-9 mb-9 border-b border-main-divider",children:[Ee(t,"mr-5"),h(Re,{link:l})]}),h(_,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"text-center mb-4"}),u("div",{className:"flex",children:[u("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:[h(Y,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),h("span",{children:"8 (800) 200-78-70"})]}),u("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[h(Y,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),h("span",{children:"ved@rshb.ru"})]})]})]})})),Nt=({fullName:e,name:t,phone:l,mail:a,handleChange:n})=>u("div",{children:[u("div",{className:"flex justify-between gap-5 mb-5",children:[h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})})}),h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"ФИО",label:"ФИО",value:t,onChange:e=>n({name:e})})})]}),u("div",{className:"flex justify-between gap-5 mb-7",children:[h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Телефон",label:"Телефон",value:l,onChange:e=>n({phone:e})})}),h("div",{className:"w-1/2",children:h(ee,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:a,onChange:e=>n({mail:e})})})]})]}),yt=p((({responceType:e})=>{const t="OK"===e;return u("div",{className:`flex items-center mt-5 p-5 rounded-md ${t?"bg-responce-ok":"bg-responce-fail"}`,children:[h(Y,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42",className:"mr-4"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34",className:"mr-4"}),u("div",{children:[h(_,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),h(K,{size:"text-l-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),wt={credit:e=>h(ht,{...e}),acquiring:e=>h(Ue,{...e}),"business-card":e=>h(Xe,{...e}),deposit:e=>h(ut,{...e}),wed:e=>h(vt,{...e})},Ct=p((e=>{const{className:t="",title:l,typeForm:n="credit",button:i,link:s,...o}=e,[c,d]=a(""),m=r((()=>(d("OK"),"OK")),[]);return h(V,{className:`font-sans bg-white p-[50px] pb-9 ${t}`,...o,children:u("div",{className:"container max-w-[978px]",children:[l?h(_,{headingType:"h3",title:l,className:"text-center mb-8"}):null,wt[n]({button:i,link:s,handleSubmit:m}),c?h(yt,{responceType:c}):null]})})})),kt=p((({className:e="",title:t,benefitList:l,...a})=>u(V,{className:`p-12 flex flex-col items-center ${e}`,...a,children:[t?h(_,{headingType:"h3",as:"h2",className:"max-w-[47rem] text-center",title:t}):null,l?.length?h("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(St)}):null]}))),St=(e,t)=>{const l=e.description;return u("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[e?.icon?.icon?h(Y,{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,asSVG:!0}):null,e?.icon?.src?h(Y,{image:e.icon}):null,u("div",{className:"ml-5",children:[e?.label?h(_,{headingType:"h6",children:e.label}):null,$t(l)]})]},String(t))},$t=e=>{const t=e?.benefitType||null;return e&&t?h("div",{className:"mt-2 text-l-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Tt(e):It(e)}):null},It=e=>e?.name||null,Tt=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?h("ul",{className:t,children:e.items.map(((e,t)=>h("li",{children:e},`benefitListItem-${t}`)))}):null},Bt=(e,{className:t="",buttonClassName:l,isVertical:a}={})=>e?.length&&e.some((e=>e?.text))?h("div",{className:g("flex",a?"flex-col gap-2":"gap-4",t),children:e.map(Rt(l))}):null,Rt=(e="")=>(t,l)=>{const{text:a,icon:n,iconRight:r,version:i,...s}=t||{},o="secondary"===i?"color":"white";return a?h(Ie,{className:e,appendLeft:Vt({...n,iconVersion:o}),appendRight:Vt({...r,iconVersion:o}),version:i,text:a,...s},l?String(l):""):null},Vt=e=>e?.icon||e?.src?h(Y,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,jt={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},_t={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"},Lt=p((({className:e,title:t,description:l,headlineVersion:a="XL",align:n="text-center",as:r,version:i="",...s})=>{const o=jt[a];return u(V,{className:g("flex flex-col p-12",o.wrapper,e),version:i,...s,children:[t?h(_,{className:g("whitespace-pre-wrap",n),...o?.title,as:r||o?.title.as,title:t}):null,l?h(L,{color:"group-data-secondary:text-white/80",size:o.descriptionSize,align:n,children:l}):null]})})),Mt=p((e=>{const{className:t="",title:l,description:a,bonusItems:n,...r}=e;return h(V,{className:`p-12 pb-9 ${t}`,...r,children:u("div",{className:"container",children:[h(Lt,{className:"!p-0",title:l,description:a,headlineVersion:"M"}),h("div",{className:"flex flex-wrap w-full mt-9",children:n?.length?n.map(((e,t)=>h("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:u("div",{className:"flex justify-between w-full",children:[u("div",{className:"flex flex-col justify-between mr-4",children:[u("div",{children:[h("div",{className:"text-h4",children:e.title}),h("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),Bt(e?.buttons)]}),e.bonusItemContent?.bonusType?At(e.bonusItemContent):null]})},String(t)))):null})]})})})),At=e=>h("div",{children:"count"===e.bonusType?Dt(e):zt(e)}),Dt=e=>u("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?h("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?h("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),zt=e=>e.image?h(Y,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,Ot=p((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:a="4",subtitle:n,title:r,...i})=>u(V,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...i,children:[h(Lt,{className:"!p-0 mb-8",title:r,description:n,headlineVersion:"M"}),e?.length?h("div",{className:`grid gap-1 ${C[t]} ${Et(a)}`,children:e.map(Pt)}):null]}))),Pt=({icon:e,label:t,description:l},a)=>u("div",{className:"flex flex-col items-center text-h6",children:[l?h("span",{children:l}):null,e?h(Y,{image:e,height:"180",width:"auto",className:"h-[180px] w-auto"}):null,h("div",{children:t?h("span",{children:t}):null})]},String(a)),Et=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ft=p((e=>{const{title:t,image:l,cardItems:a,button:n}=e;return u("div",{className:"border-gray border p-9 w-1/2",children:[l?u("div",{className:"flex justify-center",children:[l?.src?h(Y,{className:"mb-5",image:l}):null,l?.icon?h(Y,{image:l,asSVG:!0}):null]}):null,t?h(_,{headingType:"h4",title:t,className:"mb-6"}):null,a?.length?h("ul",{children:a.map(((e,t)=>Ut(e,String(t))))}):null,Bt([n],{buttonClassName:"mt-6"})]})})),Ut=(e,t)=>{const{icon:l,text:a}=e;return u("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?h(Y,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",asSVG:!0}):null,l?.src?h(Y,{image:l}):null,h("span",{className:"text-xl-light",children:a})]},t)},Ht=p((({className:e="",title:t,cards:l,...a})=>u(V,{className:`p-12 pb-9 ${e}`,...a,children:[h(_,{headingType:"h3",title:t,className:"text-center mb-8"}),h("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>h(Ft,{...e},String(t)))):null})]}))),Xt=p((({button:e,...t})=>h(V,{...t,children:Bt([e])}))),Gt=e=>{const{itemCount:t,visibleItemCount:l,isCyclic:n}=e,[i,s]=a(0),o=r((()=>s((e=>n?(e+1)%t:Math.min(e+1,t-1)))),[n,t]),c=r((()=>s((e=>n?(t+e-1)%t:Math.max(e-1,0)))),[n,t]),d=n||function(e,{itemCount:t,visibleItemCount:l,container:a}){if(l)return t>l;if(a){return a.scrollWidth*e/t+a.clientWidth<a.scrollWidth}return!1}(i,e)&&i<t-(l||1),m=n||i>0;return[i,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};const Wt=p((({className:e,disabled:t,...l})=>h(Ie,{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:h(Y,{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",asSVG:!0})}))),Jt=p((e=>h(Wt,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Yt=p((e=>h(Wt,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function Kt({dec:e,inc:t,canDec:l,canInc:a,btnClass:n,className:r=""}){return l||a?u("div",{children:[l?h(Wt,{className:`absolute z-50 ${n[0]} ${r}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,a?h(Wt,{className:`absolute z-50 rotate-180 ${n[1]} ${r}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const qt=p((({title:e,value:t,postfix:l="",prefix:a,className:n=""})=>u("div",{className:g("mb-7",n),children:[e?h(K,{size:"text-l-light",color:"text-secondary-text",children:e}):null,h("div",t?{children:u(K,{size:"text-h3",children:[a," ",Ze(Math.round(t))," ",l]})}:{children:h(K,{size:"text-h3",children:"-"})})]}))),Zt=2e6,Qt=97e4,el=Math.round(23.5),tl={minSum:6e4,maxSum:Zt,minMonths:13,maxMonths:60,rateBottomRange:12,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},ll={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},al={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:120,rate:5.9,isMonthlyInterestPayment:!0},nl={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:5.9,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},rl=p((({rate:e,title:t="Ставка",unit:l,depositeName:a,isShowDepositeName:n,rateBlockClassName:r})=>u("div",{children:[h(K,{size:"text-l-light",color:"text-secondary-text",children:t}),u("div",{className:"relative",children:[u("div",{className:"flex justify-start",children:[h("span",{className:g("block gradient-color-text font-mohave text-title-huge pr-6 -mt-4",r),children:String(e).replace(".",",")}),l?h("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]}),a&&n?h("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:a}):null]})]}))),il=e=>e?h(L,{size:"text-s-light",color:"text-secondary-text",children:e}):null,sl=1e3;function ol(e,t,l){const{moneyValue:a,minSum:n,maxSum:r,step:i=sl,isShowItems:s=!0}=t,o=[`От ${Ze(n)} ₽`,`До ${Ze(r)} ₽`];return h(tt,{title:e,items:s?o:[],min:n,max:r,step:i,value:Qe(a,n,r),onChange:l})}function cl(e){const{data:t}=le(`/wcms-resources/${e}.json`,re);return t}const dl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:a}=e,n=cl(t||"bonus-calculator-data")||ll,[r,i]=((e,t,l)=>{const{minSumTravel:a,minSumOther:n,maxBonus:r,prefMonthsNum:i,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===a&&l===n)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)]})(n,l,a);return{...n,...e,monthBonus:r,yearBonus:i}},ml=p((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[i,s]=a(6e3),o=r((e=>s(e)),[]),[c,d]=a(6e3),m=r((e=>d(e)),[]),p={travelExpenseValue:i,restExpenseValue:c},{minSumTravel:x,maxSumTravel:b,minSumOther:f,maxSumOther:v,monthBonus:N,yearBonus:y}=dl(p,t);return u("section",{className:g("flex justify-between",e),children:[u("div",{className:"w-[468px]",children:[ol("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:b,moneyValue:i,step:500,isShowItems:!1},o),ol("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:f,maxSum:v,moneyValue:c,step:500,isShowItems:!1},m)]}),h("div",{children:N>=0?h(rl,{title:"Баллов за месяц",rate:N,rateBlockClassName:"tracking-[-14px]"}):null}),u("div",{className:"w-full max-w-[350px]",children:[y>=0?h(qt,{title:"Баллов за год",value:y}):null,Bt(l,{className:"mt-7",isVertical:!0}),il(n)]})]})}));function hl(e,t,l){const{minDays:a,maxDays:n,daysValue:r}=t,i=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`;return h(tt,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(n)}`],min:a,max:n,step:1,value:Qe(r,a,n),onChange:l})}const ul=p((({items:e,checkedItem:t,onChange:l})=>h("div",{className:"flex flex-col gap-3",children:e?.map((({id:e,text:a})=>h(bt,{isRadio:!0,text:a,checked:t===e,onChange:()=>l&&l(e)},String(e))))}))),pl="everyMonth",xl="atEndTerm",gl=[{id:pl,text:"Ежемесячно"},{id:xl,text:"В конце срока"}];function bl(e,t,l){return u("div",{children:[l?h(K,{color:"text-secondary-text",font:"font-light",children:l}):null,h("div",{className:"mt-3",children:h(ul,{items:gl,checkedItem:e?pl:xl,onChange:e=>t&&t(e===pl)})})]})}const fl=p((({title:e="Ставка"})=>u("div",{children:[h(K,{size:"text-l-light",color:"text-secondary-text",children:e}),h("div",{className:"mt-1 pt-1 pl-5 pb-1.5",children:h(Y,{image:{icon:"PercentIcon"},width:"90",height:"85",asSVG:!0})}),h("div",{className:"w-[250px] mt-3.5",children:u(L,{size:"text-xl-light",color:"text-primary-text",children:["Процентная ставка для срока ",h("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),vl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,daysValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n/30)-a):Math.round(a*e*n/365/100)},Nl=p((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:i,isShowDepositeName:s})=>{const[o,c]=a(1e5),d=r((e=>c(e)),[]),[m,p]=a(90),x=r((e=>p(e)),[]),[g,b]=a(!1),f=r((e=>b(e)),[]),[v,N]=a(!1),y=r((e=>N(e)),[]),[w,C]=a(!1),k=r((e=>C(e)),[]),[S,$]=a(!1),I=r((e=>$(e)),[]),T=((e,t)=>{const{daysValue:l,moneyValue:a,isPartialWithdrawal:n,isReplenished:r,isSmallBusiness:i,isMonthlyInterestPayment:s}=e,o=cl(t||"business-calculator-data"),c=r||n,d=l<90||l>730;if(l<=30)return{...nl,...e,isDisabledOperatingDeposit:d,rate:0};const m=o?.rows?.find((e=>s===e.isMonthlyInterestPayment&&i===e.isSmallBusiness&&(c?e.isReplenished&&e.isPartialWithdrawal:!e.isReplenished&&!e.isPartialWithdrawal)))||nl,{rate:h}=m,u=vl(h,e),p=a+u;return{...m,...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})({moneyValue:o,daysValue:m,isReplenished:g,isPartialWithdrawal:v,isSmallBusiness:w,isMonthlyInterestPayment:S},t),{income:B,finalSum:R,rate:V,depositeName:j}=T;return u("section",{className:e,children:[u("div",{className:"flex justify-between",children:[u("div",{className:"w-[486px]",children:[ol("Сумма вклада, ₽",T,d),hl("Срок вклада, дни",T,x),u("div",{className:"mt-7 flex justify-between",children:[yl({...T,handleIsReplenished:f,handleIsPartialWithdrawal:y,handleIsSmallBusiness:k}),bl(S,I,"Выплата процентов")]})]}),V?h(rl,{rate:V,depositeName:j,isShowDepositeName:s,rateBlockClassName:"tracking-[-25px]",unit:"%"}):h(fl,{}),u("div",{className:"w-full max-w-[350px]",children:[h(qt,{title:"Доход по вкладу",value:B,postfix:"₽",prefix:"+"}),h(qt,{title:"Сумма в конце срока",value:R,postfix:"₽"}),Bt(l,{className:"mt-7",isVertical:!0}),h("div",{className:"mt-7",children:il(n)})]})]}),h("div",{className:"mt-5",children:il(i)})]})})),yl=({isDisabledOperatingDeposit:e,isReplenished:t,isPartialWithdrawal:l,isSmallBusiness:a,handleIsReplenished:n,handleIsPartialWithdrawal:r,handleIsSmallBusiness:i})=>u("div",{children:[h(bt,{text:"Пополнение",disabled:e,checked:t,onChange:n}),h(bt,{className:"mt-3",disabled:e,text:"Частичное снятие",checked:l,onChange:r}),h(bt,{className:"mt-3",text:"Являюсь малым предприятием",checked:a,onChange:i})]});function wl(e,t,l){const{minMonths:a,maxMonths:n,monthsValue:r}=t,i=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return h(tt,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(n)}`],min:a,max:n,step:1,value:Qe(r,a,n),onChange:l})}const Cl=(e,t)=>{const{isInsurance:l,isSalaryClient:a,isStateEmployee:n,moneyValue:r}=e,i=cl(t||"credit-calculator-data")?.rows?.find((e=>l===e.isInsurance&&a===e.isSalaryClient&&n===e.isStateEmployee))||tl,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=i,d=r<=c?s:o,m=((e,t)=>{const{isAnnuity:l,moneyValue:a,monthsValue:n}=t;if(l){const t=e/1200;return a*(t+t/(Math.pow(1+t,n)-1))}return Math.round(a/n)+a*(e/1200)})(d,e);return{...i,...e,finalRate:d,monthlyPayment:m}},kl="annuity",Sl="differential",$l=[{id:kl,text:"Аннуитетный"},{id:Sl,text:"Дифференцированный"}],Il=p((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[i,s]=a(!1),[o,c]=a(!0),[d,m]=a(!1),[p,x]=a(!1),[b,f]=a(Qt),v=r((e=>f(e)),[]),[N,y]=a(el),w=r((e=>y(e)),[]),C=Cl({isAnnuity:i,isInsurance:o,isSalaryClient:d,isStateEmployee:p,moneyValue:b,monthsValue:N},t);return u("section",{className:g("flex justify-between",e),children:[u("div",{className:"w-[468px]",children:[ol("Сумма кредита, ₽",{...C,step:500},v),wl("Срок кредита, месяцев",C,w),u("div",{className:"mt-7",children:[h(bt,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:d,onChange:m}),h(bt,{className:"mt-3",text:"Работаю в бюджетной организации",checked:p,onChange:x}),h(bt,{className:"mt-3",text:"Комплексная страховая защита",checked:o,onChange:c})]})]}),h(rl,{title:"Ставка",rate:C.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),u("div",{className:"w-full max-w-[350px]",children:[h(qt,{title:i?"Ежемесячный платеж":"Платёж в первый месяц",value:C.monthlyPayment,postfix:"₽"}),h(ul,{items:$l,checkedItem:i?kl:Sl,onChange:e=>s(e===kl)}),Bt(l,{className:"mt-7",isVertical:!0}),il(n)]})]})})),Tl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,monthsValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n)-a):Math.round(a*e*30*n/365/100)},Bl={CreditCalculatorForm:Il,DepositCalculatorForm:p((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[i,s]=a(Qt),o=r((e=>s(e)),[]),[c,d]=a(el),[m,p]=a(!1),x=r((e=>p(e)),[]),b={moneyValue:i,monthsValue:c,isMonthlyInterestPayment:m},f=r((e=>d(e)),[]),v=((e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a}=e,n=cl(t||"deposit-calculator-data")?.rows?.find((e=>l===e.isMonthlyInterestPayment))||al,{rate:r}=n,i=Tl(r,e),s=a+i;return{...n,...e,income:i,finalSum:s}})(b,t),{income:N,finalSum:y,rate:w}=v;return u("section",{className:g("flex justify-between",e),children:[u("div",{className:"w-[468px]",children:[ol("Сумма вклада, ₽",{...v},o),wl("Срок вклада, месяцев",{...v},f)]}),h(rl,{rate:w||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),u("div",{className:"w-full max-w-[350px]",children:[N?h(qt,{title:"Доход по вкладу",value:N,postfix:"₽",prefix:"+"}):null,y?h(qt,{title:"Сумма в конце срока",value:y,postfix:"₽"}):null,bl(m,x),Bt(l,{className:"mt-7",isVertical:!0}),il(n)]})]})})),BusinessDepositCalculatorForm:Nl,BonusCalculatorForm:ml},Rl=(e,t)=>{const l=e?.calcType;if(!l||!(l in Bl))return null;const a=Bl[l];return h("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:u("div",{className:"box-border p-9 w-full",children:[e?.title?h(_,{className:"text-center mb-6",title:e.title}):null,h(a,{...e})]})},String(t))},Vl=p((({className:e="",calculatorTabs:t=[],...l})=>{const n=t.map((e=>e.nav||{})),i=t.map((({calculatorBlock:e})=>e||{})),[s,o]=a(0),c=r((e=>o(e)),[]),[d,m]=Gt({itemCount:t?.length,visibleItemCount:3});return u(V,{className:`box-border overflow-hidden relative w-100 ${e}`,...l,children:[u("div",{className:"bg-white",children:[n.length>1?jl({activeIndex:d,tabsNav:n,slideIndexShift:s,onClick:c}):null,Kt({...m,btnClass:["left-3","right-3"],className:"top-8"})]}),h("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(Rl):null})]})}));function jl({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:a}){return u("div",{children:[h("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:h("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:a}){const n=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 u("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${n}`,children:[h(Y,{className:`h-6 w-6 min-w-6 min-h-6 mr-4 ${s}`,image:{...e?.icon,iconVersion:o??c},width:"24",height:"24",asSVG:!0}),u("div",{className:"border-0",children:[h("div",{className:`${r}`,children:e?.title}),h("div",{className:`${i}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})}),h("div",{className:"w-full h-2 bg-primary-main"})]})}const _l=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Ll=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},Ml=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),Al=p((({className:e="",onChange:t,minValue:l=0,maxValue:a=3e5,...n})=>{const i=r((e=>{if(!t)return;const n=_l(Ll(Ml(et(e))));const r=Dl(n,Qe(Number(n),l,a));t(String(r))}),[t]),s=r((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(et(l))).replace(",",".")))}),[t]);return h(ee,{className:e,inputClassName:"w-full",onChange:i,onBlur:s,...n,children:h("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),Dl=(e,t)=>Number(e)===t?e:String(t),zl=p((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:i,...s})=>{const[o,c]=a(""),d=r((e=>c(e)),[]),m=!Number(et(o)),p=m?Se({version:i?.version}):$e({className:"text-white",version:i?.version}),x=ge();return u(V,{className:`p-12 flex flex-col items-center ${e}`,...s,children:[t?h(_,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,u("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[h(Al,{name:"amount",value:o,onChange:d,valid:""===o||!m,placeholder:n,label:l}),i?.text?h("button",{type:"submit",className:`w-full p-4 mt-6 ${p} `,disabled:m,...x(i),children:i.text}):null]})]})})),Ol=p((({className:e="",style:t,idx:l,activeIndex:a,observerOptions:n,children:i,onIntersection:s})=>{const o=S(r((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),n);return h("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(l===a),ref:o,children:i})})),Pl=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],El="866px",Fl=p((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:a=0,gap:n=0,padding:i=0,listType:o="horizontal-list",snapAlign:c="snap-center",children:d,onVisibleItemsChange:m,onVisibleIndicesChange:u})=>{const p={sensitivity:1,rootRef:t},x=s([]),b=r(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,m&&m(l),u&&u(Hl(l))}),[m,u]),f=a>0?n*Number(a)-1:0,v="vertical-list"===o,N="horizontal-list"===o,y={...N?Ul(i,f):{},...v?{height:El}:{},gap:`${n}px`},w={...N?Ul(i/4):{},maxHeight:El};return h("div",{className:g("box-border overflow-auto no-scrollbar",o,e),style:y,role:"list",ref:t,children:(C=(e,t)=>h(Ol,{className:g(c,a?Pl[a-1]:"",v?"h-full":""),style:w,activeIndex:l,idx:t,observerOptions:p,onIntersection:b,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(d)});var C})),Ul=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Hl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Xl=e=>e,Gl=(e=Xl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Wl=(e=Xl)=>Gl((t=>-e(t))),Jl=e=>t=>e.scrollWidth/t,Yl=e=>(t,l)=>{e.scrollBy({left:l*Jl(e)(t),behavior:"smooth"})},Kl=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const n=s(null),[i,o]=a([]),c=r((e=>{o((t=>{return(l=t)===(a=e)||Boolean(l&&a&&l?.length===a?.length&&l.every(((e,t)=>e===a[t])))?t:e;var l,a})),l&&l(e)}),[e]),[d,m]=i.length?[Wl()(i),Gl()(i)]:[-1,-1],h=d>0,u=m<e-1,p=r((()=>{var l;n.current&&(t&&!h?(l=n.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):Yl(n.current)(e,-1))}),[t,e,h]),x=r((()=>{n.current&&(t&&!u?n.current.scrollTo({left:0,behavior:"smooth"}):Yl(n.current)(e,1))}),[e,t,u]);return[n,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},ql="absolute top-[calc(50%-24px)] z-50",Zl="absolute top-0 bottom-0 z-50 w-[84px] pointer-events-none",Ql=p((({scroll:e,arrowsPadded:t,isBlur:l,onScrollLeft:a,onScrollRight:n,hasEdgeBlocks:i,activeIndex:s,itemCount:o})=>{const{canScrollLeft:c,canScrollRight:d,scrollLeft:m,scrollRight:p}=e,x=i?s>0:c,b=i?s<o-1:d,f=r((()=>{i?(c&&s!==o-1&&m(),a()):m()}),[m,a,i,c,s,o]),v=r((()=>{i?(d&&0!==s&&p(),n()):p()}),[p,n,i,c,s,o]);return u("div",{children:[ea(l,e),x?h(Jt,{className:g(ql,t?"left-8":"left-0"),onClick:f}):null,b?h(Yt,{className:g(ql,t?"right-8":"right-0"),onClick:v}):null]})})),ea=(e,t)=>(t.canScrollLeft||t.canScrollRight)&&e?u("div",{children:[h("div",{className:g(Zl,"left-0 bg-opacity-from-white")}),h("div",{className:g(Zl,"right-0 bg-opacity-to-white")})]}):null,ta=p((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:i=!1,arrowsPadded:s=!0,isPadding:o=!0,...c})=>{const{blocks:d}=c.block||{},m=t||d?.length||0,[p,x]=a(Math.floor((l||0)/2)),b=r((()=>x((e=>e+1))),[]),f=r((()=>x((e=>e-1))),[]),[v,N]=Kl({itemCount:m,isCyclic:i}),y=d&&"CarouselBankHistoryCard"===d[0]?.type;return h(V,{className:g(aa(o),e),...c,children:u("div",{className:"relative max-w-full",children:[h(Fl,{containerRef:v,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:N.handleVisibleIndicesChange,children:w({...c,block:{...c.block,blocks:la(d,p)}})}),h(Ql,{scroll:N,isBlur:n,arrowsPadded:s,onScrollLeft:f,onScrollRight:b,hasEdgeBlocks:y,activeIndex:p,itemCount:m})]})})}));ta.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard"];const la=(e,t)=>e&&"CarouselBankHistoryCard"===e[0]?.type?e.map(((l,a)=>({...l,content:{...l.content,orderNumber:a,isActive:t===a,blocksLength:e.length}}))):e,aa=e=>e?"p-12":"",na=p((({title:e,description:t,isActive:l,orderNumber:a=0,blocksLength:n=0})=>h(V,{className:"flex h-[485px]",children:h("div",l?{className:"relative flex items-center w-full",children:h(Lt,{headlineVersion:"S",title:e,description:t,align:"text-left",className:g("absolute z-10 h-[385px] w-[440px] text-white shadow-dark-blue",sa(a,n),ra(a))})}:{className:"flex w-full items-center justify-center",children:h("div",{className:g("flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]",ra(a)),children:h("span",{className:ia(a),children:e})})})}))),ra=e=>{switch(e%3){case 0:default:return"bg-primary-main";case 1:return"bg-green-light";case 2:return"bg-yellow-light"}},ia=e=>{switch(e%3){case 1:case 2:return"gradient-color-text-on-yellow";default:return"gradient-color-text-on-green"}},sa=(e,t)=>0===e?"left-9":e===t-1?"right-9":"-left-[25px]",oa="absolute border border-solid border-gray w-full h-full",ca={normal:"min-w-[970px]",mini:"min-w-[355px]"},da=p((({className:e="",button:t,description:l,title:a,carouselVersion:n="normal"})=>h("section",{className:`flex pb-9 pl-12 border-box h-full ${ca[n]} ${e}`,children:u("div",{className:"relative w-full",children:[h("div",{className:`${oa} z-10 top-9 right-12 bg-green-dark`}),h("div",{className:`${oa} z-10 top-6 right-8 bg-green`}),h("div",{className:`${oa} z-10 top-3 right-4 bg-green-light`}),u("div",{className:"relative h-full bg-white z-10 p-10 border border-solid border-green-light",children:[h(Lt,{className:"!p-0",title:a,description:l,headlineVersion:"L",align:"text-left"}),Bt([t],{className:"mt-14"})]})]})}))),ma={black:"bg-black",white:"bg-white"},ha=p((({className:e="",title:t,description:l,image:a,price:n,button:r,colors:i,...s})=>u(V,{className:`border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${e}`,...s,children:[a?.src?h(Y,{className:"mb-5 flex justify-center",image:a}):null,t?h(_,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?h("div",{className:"mb-4",children:h(L,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,i?.length?u("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[h("div",{className:"mr-1.5",children:h(K,{children:"Доступные цвета: "})}),i.map(ua)]}):null,n?u(K,{size:"text-h3",align:"text-left",children:[n," ₽"]}):null,Bt([r],{buttonClassName:"mt-5 w-full"})]}))),ua=(e,t)=>h("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${ma[e]}`},String(t)),pa=p((({className:e="",title:t="",buttons:l,image:a,children:n})=>u("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,u("div",{className:"flex grow w-full justify-between",children:[u("div",{className:"flex flex-col justify-between w-full",children:[h("div",{className:"h-full",children:n}),l?h("div",{className:"mt-auto pt-8",children:l}):null]}),a]})]}))),xa={1:"flex-col",2:"gap-x-10 flex-wrap"},ga=p((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:a=1,description:n,image:r,title:i,...s})=>{const o=i?h(_,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:i}):null,c=r?.src?h(Y,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return h(V,{className:["relative box-border text-left p-9 w-[697px]","border border-solid border-gray group-data-secondary:border-white/50",l].join(" "),...s,children:u(pa,{title:o,image:c,children:[u("div",{className:"flex justify-between mb-4",children:[n?h("div",{className:"w-1/3",children:h(K,{size:"text-h6",children:n})}):null,e?h(K,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e}):null]}),t.length?h("ul",{className:`list-none m-0 p-0 flex gap-y-2 ${xa[a]}`,children:ba(t,a)}):null]})})})),ba=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return u("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?h("div",{className:"pr-2.5",children:h(K,{size:(a=t,1===a?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?h(K,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var a})),fa="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",va=p((({text:e,href:t="",target:l="",className:a=""})=>e?u("div",{className:`relative group/link cursor-pointer w-[328px] h-[82px] ${a}`,children:[u("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",href:t,target:l,children:[h("div",{className:"p-0.5",children:e}),h("div",{className:"w-6 h-6",children:h(Y,{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",asSVG:!0})})]}),h("div",{className:`${fa} mx-1.5 mt-1.5`}),h("div",{className:`${fa} mt-3 mr-3`})]}):null)),Na=p((({className:e="",additionalDescription:t,description:l,links:a,title:n,version:r="secondary",...i})=>u(V,{className:`flex w-full p-10 overflow-hidden justify-between ${e}`,version:r,...i,children:[u("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[h(Lt,{className:"p-0",title:n,description:l,as:"h1",align:"text-left"}),t?h("div",{className:"pt-6",children:h(L,{children:t})}):null]}),a?.length?ya(a):null]}))),ya=e=>{const t=Math.ceil(e.length/12);return h(ta,{version:"",className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,children:new Array(t).fill(null).map(((t,l)=>h("div",{className:"w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start",children:e.slice(12*l,12*(l+1)).map(((e,t)=>h(va,{className:"m-1",...e},String(t))))},String(l))))})},wa={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},Ca=p((({className:e="",isDotted:t=!0,children:l,size:a="M"})=>u("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?h("div",{children:h("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${wa[a]}`})}):null,h("span",{children:l})]}))),ka={S:"text-l-light",M:"text-h6",L:"text-h5"},Sa={S:"ml-2",M:"ml-3",L:"ml-4"},$a=p((({className:e="",hasIndent:t,isDotted:l,itemClassName:a="",items:n,listItemSize:r="M"})=>n?.length?h("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${ka[r]} ${t?Sa[r]:""} ${e}`,role:"list",children:n.map(((e,t)=>h(Ca,{className:`${a} mb-1.5`,isDotted:l,size:r,children:e},String(t))))}):null)),Ia=p((({className:e="",title:t,headlineSmallVersion:l="H6",description:a,additionalDescription:n,icon:r,items:i=[],button:s={},version:o="primary",isDotted:c=!0,align:d="text-center",...m})=>u(V,{className:g("flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6","box-border border-solid border border-gray",d,e),version:o,...m,children:[u("div",{className:"flex flex-col h-full",children:[Ta(r),Ba(l,t),Ra(a,t),ja(i,c,o),Va(n)]}),Bt([s],{buttonClassName:"mt-6 w-full"})]}))),Ta=e=>u("div",{className:"flex justify-center",children:[e?.src?h(Y,{className:"mb-5",image:e}):null,e?.icon?h(Y,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:e,asSVG:!0}):null]}),Ba=(e,t)=>t?h(K,{size:_t[e],children:t}):null,Ra=(e,t)=>e?h("div",{className:t?"mt-2":"",children:h(L,{size:"text-l",children:e})}):null,Va=e=>e?h("div",{className:"mt-auto",children:h(K,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e})}):null,ja=(e,t,l="primary")=>e?.length?h($a,{className:"max-w-[308px] mt-2 text-s "+("primary"===l?"!text-secondary-text":""),itemClassName:"text-left",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}):null,_a=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),La=p((({className:e="",title:t,icon:l,list:a=[],...n})=>u(V,{className:`border border-gray flex min-w-[536px] ${e}`,...n,children:[u("div",{className:"w-[200px] min-w-[200px] self-center",children:[l?.icon?h(Y,{image:_a(l),asSVG:!0}):null,l?.src?h(Y,{image:l}):null]}),u("div",{className:"p-8 pl-3 w-full",children:[t?h(_,{className:" mb-3.5",headingType:"h5",title:t}):null,a.length?h("div",{className:"flex flex-col gap-3",children:a?.map(Ma)}):null]})]}))),Ma=(e,t)=>u("div",{className:"break-words",children:[e.title?h("div",{className:"text-h6",children:e.title}):null,e.description?h("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Aa=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],icon:{icon:"YoutubeIcon"},label:"Youtube"}],Da={default:"w-14 h-14",small:"w-12 h-12"},za=p((({iconVersion:e="color",buttonSize:t="default",rounded:l=!1,...a})=>{const{href:n,version:r}=a,{icon:i,label:s}=Aa.find((({origins:e})=>e.some((e=>n?.includes(e)))))||{},o=i?{..._a(i),iconVersion:e}:null;return h(Ie,{className:g("group/media flex items-center justify-center box-border",Da[t],l?"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",Da[t]),"aria-label":s,target:"_blank",rel:"noopener noreferrer",version:r,...a,children:o?h(Y,{image:o,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null})})),Oa=p((({className:e="",media:t,children:l,buttonSize:a})=>u("div",{className:"font-sans",children:[h("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>h(za,{buttonSize:a,version:e.version,...e},String(t))))}),h(K,{size:"text-s-light",color:"text-secondary-text",children:l})]}))),Pa=p((({button:e,className:t="",description:l,image:a,items:n=[],socialMedia:r=[],title:i,version:s="primary",...o})=>{const c=i?h(_,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:i}):null,d=a?.src?h(Y,{className:"absolute bottom-0 right-0 m-0",image:a}):null;return h(V,{className:g("relative p-7 min-w-[524px] h-full text-left 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",t),version:s,...o,children:h(pa,{className:"flex justify-between",title:c,image:d,children:u("div",{className:"h-full flex flex-col justify-between",children:[l?h("span",{className:"mb-2 group-data-gray:text-secondary-text group-data-gray:max-w-[265px]",children:l}):null,n.length?h($a,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:n}):null,r.length?h(Oa,{className:"pt-10 pb-0",media:r}):null,Bt([e],{className:"pt-2 mt-16"})]})})})})),Ea=p((({className:e="",title:t,icon:l,isHighlighting:a,button:n,cardCells:r=[],...i})=>{const s=r.map(Xa),o=s.slice(0,1),c=s.slice(1);return u(V,{className:g("relative border border-gray min-w-[322px] p-8 flex flex-col",Ua(a),e),...i,children:[a?Ga():null,Fa(l),t?h(_,{className:"text-center pt-2",headingType:"h5",title:t}):null,n?h(Ie,{className:"w-full mt-4",...n}):null,r.length?h(D,{renderFoldableSection:({isUnfolded:e})=>u("div",{children:[o,h(z,{isUnfolded:e,children:c})]}),renderFoldButton:r.length>1?Ha:null}):null]})})),Fa=e=>u("div",{className:"w-[267px] min-w-[267px] self-center",children:[e?.src?h(Y,{image:e}):null,e?.icon?h(Y,{image:_a(e),asSVG:!0}):null]}),Ua=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-7",Ha=({isUnfolded:e,onToggle:t})=>u("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[h("div",{children:e?"Скрыть":"Подробнее о тарифе"}),h(P,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),Xa=(e,t)=>u("div",{className:"py-5 border-b border-main-divider",children:[e?.title?h("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?h("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),Ga=()=>u("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:[h(P,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),h(L,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),Wa={black:"bg-black",white:"bg-white"},Ja=p((({className:e="",title:t,description:l,image:a,price:n,button:r,colors:i})=>u("section",{className:`border border-solid box-border border-gray p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[a?.src?h(Y,{className:"mb-5 flex justify-center",image:a}):null,t?h(_,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?h("div",{className:"text-m-light text-left mb-4",children:l}):null,i?.length?u("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[h("div",{className:"mr-1.5",children:"Доступные цвета: "}),i.map(Ya)]}):null,n?u("div",{className:"text-h3 text-left",children:[n," ₽"]}):null,Bt([r],{buttonClassName:"mt-5 w-full"})]}))),Ya=(e,t)=>h("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Wa[e]}`},String(t)),Ka="absolute top-0 bottom-0 w-[84px]",qa=p((({cards:e=[],className:t="",title:l,description:a,...n})=>{const[r,i]=Gt({itemCount:e?.length,visibleItemCount:3});return u(V,{className:`p-12 overflow-hidden text-center ${t}`,...n,children:[h(Lt,{className:"!p-0",title:l,description:a,headlineVersion:"M",...n}),h("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*r}px)`},role:"list",children:e?.length?e.map(((e,t)=>h(Ja,{...e},String(t)))):null}),Kt({...i,btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"}),h("div",{className:`${Ka} left-0 bg-opacity-from-white`}),h("div",{className:`${Ka} right-0 bg-opacity-to-white`})]})})),Za="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Qa="border-gray border-solid border",en="border-main-divider border border-t-0 border-x-0",tn="w-[200px] mr-6",ln=p((({icon:e,image:t,title:l,link:a})=>u("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Qa} ${Za}`,role:"columnheader",children:[e&&!t?.src&&h(Y,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:_a(e),width:"63",height:"63",asSVG:!0}),t?.src&&h(Y,{className:"mb-[18px]",image:t}),l?h(_,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,a?.text&&h("div",{className:"mt-auto w-full",children:h(Ie,{href:a.href,target:a.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:h("div",{className:"text-xs-light font-medium py-[11px]",children:a.text})})})]}))),an={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},nn=p((({children:e,activeIndex:t,columnWidth:l,version:a="comparison"})=>h("div",{className:"flex flex-1 overflow-hidden",children:h("div",{className:an[a],style:{transform:`translateX(-${t*l}px)`},children:e})}))),rn=p((({children:e})=>h("div",{className:"self-start flex flex-col",role:"row",children:h("div",{className:"flex",children:e})}))),sn=p((({colHeaders:e,activeIndex:t})=>u(rn,{children:[h("div",{className:tn,role:"columnheader"}),h(nn,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>h(ln,{...e},String(t))))})]}))),on=p((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:a})=>h("div",{className:`w-80 box-border flex flex-col ${Qa} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${a?Za:""}`,role:"cell",children:h("div",{className:`mx-7 h-full ${en} ${a&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>mn(e,t,a)))})}))),cn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),dn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),mn=({label:e,description:t},l,a)=>u("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?h("h4",{className:cn(a),children:e}):null,t?h("div",{className:dn(a),children:t}):null]},String(l)),hn=(e=!1)=>`text-s py-7 ${en} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,un=p((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:a,isFirstRow:n,isLastRow:r})=>u(rn,{children:[e?.title?h("div",{className:hn(r),children:e.title}):null,t?.length?h(nn,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>h(on,{cell:e,isFirstRow:n,isLastRow:r,isFillGradient:a&&0===t},String(t))))}):null]}))),pn=p((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:a})=>{const{isScrollAvailable:n}=a;return u("div",{className:"relative",children:[e.map(((e,a,{length:n})=>h(un,{row:e,isFirstRow:0===a,isLastRow:a+1===n,activeIndex:l,isColoredFirstColumn:t},String(a)))),n?Kt({...a,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),xn=p((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:a,isColoredFirstColumn:n})=>{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:a),[o,c]=Gt({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return u("div",{children:[u("div",{role:"table",children:[r?.length?h(sn,{colHeaders:r,activeIndex:o}):null,s?.length?h(pn,{rowData:s,isColoredFirstColumn:n,activeIndex:o,controls:c}):null]}),d?h("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),gn=p((({className:e="",title:t,rowHeaders:l,columns:n,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=a(!i),m=r((()=>d((e=>!e))),[]);return u(V,{className:`py-12 pl-12 overflow-hidden relative ${e}`,...o,children:[h(_,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),h(xn,{columns:n,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?bn({isShowAllRow:c,onClick:m}):null]})})),bn=({isShowAllRow:e,onClick:t})=>h("div",{className:"pr-12",children:u("div",{className:"flex w-full",children:[h("div",{className:tn}),h("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:h("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),fn=p((({className:e="",contacts:t,info:l,version:a="secondary",...n})=>u(V,{className:`flex p-12 ${e}`,version:a,...n,children:[l?.length?vn(l):null,t?.length?vn(t):null]}))),vn=e=>h("div",{className:"flex grow basis-0",children:e.map(((e,t)=>Nn({column:e,index:t})))}),Nn=({column:e,index:t})=>e?h("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:a},n)=>u("div",{className:"mt-6 first:mt-0",children:[h(Lt,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left"}),l?h("div",{className:"mt-1.5 opacity-80",children:h(L,{size:"text-m",font:"font-light",children:l})}):null,a?h(Ie,{className:"mt-6",...a}):null]},String(n))))},`col-${String(t)}`):null,yn=e=>"Image"===e?.errorContentType&&e?.image?h(Y,{image:e.image}):"Code"===e?.errorContentType&&e.code?h("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,wn=p((({className:e="",title:t,subtitle:l,error:a,button:n})=>{return u("section",{className:g("flex flex-col justify-center items-center",(r=n?.text,r?"py-20 pt-3 pb-1":"mb-16 pb-2 mt-24 pt-3"),e),children:[h("div",{className:"flex justify-center py-20",children:yn(a)}),t?h(_,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?h("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,n?.text?h(Ie,{className:"py-4 px-9",version:n?.version,...n,children:n.text}):null]});var r}));var Cn;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Cn||(Cn={}));const kn=new Intl.NumberFormat("ru",{style:"currency",currency:Cn.RUB}),Sn=e=>e?kn.format(e):"",$n="text-left text-m-light text-secondary-text",In=`${$n} pl-11`,Tn={USD:"DollarIcon",EUR:"EuroIcon"},Bn=p((({className:e,exchangeCurrencyItems:t})=>u("table",{className:`h-fit w-fit ${e}`,children:[h("thead",{children:u("tr",{children:[h("th",{className:$n,children:"Валюта"}),h("th",{className:In,children:"Купить"}),h("th",{className:In,children:"Продать"})]})}),h("tbody",{children:t.map(Rn)})]}))),Rn=e=>{const t=e?.currency?.currency;return u("tr",{className:"pb-1 text-h6",children:[h("td",{className:"pt-4",children:u("div",{className:"flex items-center",children:[t?h(Y,{image:{icon:Tn[t]},width:"24",height:"24"}):null,h("span",{className:"ml-2",children:t})]})}),h("td",{className:"pt-4 pl-11",children:Sn(e?.saleExchangeRate)}),h("td",{className:"pt-4 pl-11",children:Sn(e?.buyExchangeRate)})]},t)},Vn=p((({className:e="",address:t})=>u("div",{className:`flex ${e}`,children:[h(Y,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),u("div",{className:"ml-3",children:[t?h("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,h("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),jn=(e,t,l)=>{const a=Number(_n(e))*Math.pow(t,l?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(a)},_n=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ln=e=>{return(t=[[e=>e.value!==Cn.RUB&&e.oppositeValue!==Cn.RUB,()=>e.handleConvert(e.value,Cn.RUB)],[e=>e.value===Cn.RUB&&e.oppositeValue===Cn.RUB,()=>e.handleConvert(e.value,Cn.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Mn(e){const{placeholder:t,rates:l,selected:a,value:n,setValue:r,setSelected:i}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:a,text:a};return u("div",{className:"relative flex",children:[h(ee,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:n,onChange:r}),s.length?h(_e,{isBorder:!1,onChange:e=>i(e.key),options:s,value:o}):null]})}const An=p((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:n})=>{const[i,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Cn.RUB,selectBuy:l?.[0]?.currency?.currency||Cn.USD}),o=r((e=>s((t=>({...t,...e})))),[]);return u("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Mn({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:Dn(i,o,l),value:i.inputSell,setValue:e=>On(o,l)(e,i.selectSell,i.selectBuy)}),Mn({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:zn(i,o,t),value:i.inputBuy,setValue:e=>Pn(o,t)(e,i.selectBuy,i.selectSell)}),n?.text?h(Ie,{className:"py-4 mr-1",version:n?.version,...n,children:n.text}):null]})})),Dn=(e,t,l)=>a=>{t({selectSell:a}),Ln({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,n=e.selectBuy)=>{On(t,l)(e.inputSell,a,n)}})},zn=(e,t,l)=>a=>{t({selectBuy:a}),Ln({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,n=e.selectSell)=>Pn(t,l)(e.inputBuy,a,n)})},On=(e,t)=>(l,a,n)=>{e({inputSell:_n(l),selectBuy:n});const r=t.find((e=>e.currency?.currency===n))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;r&&e({inputBuy:String(jn(l,r,a===Cn.RUB)||"")})},Pn=(e,t)=>(l,a,n)=>{e({inputBuy:_n(l),selectSell:n});const r=t.find((e=>e.currency?.currency===n))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;r&&e({inputSell:String(jn(l,r,a===Cn.RUB)||"")})};const En=async e=>{const t=await Fn(),l=t?.code||"000";return{region:t,exchangeRates:await Un(e,l)}},Fn=async()=>{try{return await re("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Un=async(e,t)=>{try{return await re(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Hn=p((({className:e="",title:t="Курсы обмена валют",button:l,...a})=>{const{exchangeRates:n}=function(){const{data:e}=le("/api/v1/exchangerates",En);return e||{}}(),r=Xn(n?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Cn.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Cn.RUB}}),h(V,{className:`p-9 box-border min-h-80 ${e}`,...a,children:h(pa,{title:h(_,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:u("div",{className:"flex",children:[u("div",{className:"mr-14 pt-4",children:[r?h(Bn,{className:"mb-[30px]",exchangeCurrencyItems:r}):null,h(Vn,{address:n?.address})]}),r.length&&i.length&&s.length?h(An,{className:"grow",currencyRatesBuy:i,currencyRatesSell:s,button:l}):null]})})})})),Xn=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[];function Gn(e,t={}){const{data:l}=le(`/wcms-resources/${e}.json`,re,{fallback:t});return l||{}}const Wn={"bg-white":"color",transparent:"white"},Jn={"bg-white":"text-primary-main",transparent:"text-white"},Yn=(e,t,l)=>h(Y,t?.src?{image:t,className:Jn[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Wn[e]},className:Jn[e],width:l?.width,height:l?.height,asSVG:!0}),Kn={"bg-white":"text-primary-text",transparent:"text-white"},qn=(e,t,l)=>h("span",{className:`${Kn[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),Zn=p((({className:e="",href:t,logo:l,children:a=l?.title,targetBlank:n,bgColor:r="bg-white",showTitle:i=!0})=>u("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:n?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Yn(r,l?.image,{width:"40",height:"45"}),i?qn(a||l?.title,r):null]}))),Qn=()=>{const[e,t]=a("");return{term:e,setTerm:e=>t(e)}},er=p((({className:e,isMobile:t=!1})=>{const{term:l,setTerm:a}=Qn(),n=t?"text-s":"text-l-light",r=t?" placeholder-transparent":"h-full",i=t?"some search":void 0;return u("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:[h("div",{className:t?"w-5 h-5":"w-6 h-6",children:h(Y,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),l?null:h("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${n}`,children:"Поиск по сайту"})]}),h("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text ${r}`,value:l,onChange:e=>a(e.target.value),type:"text",name:"search-bar-input",placeholder:i}),t?h("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),a("")},children:h(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}):h(Ie,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:h("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),tr=p((e=>h(er,{...e}))),lr=p((({className:e="",items:t,hasButton:l})=>u("div",{className:e,children:[t?.length?t.map(ar):null,l?h(Ie,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),ar=(e,t)=>{const{type:l,text:a,description:n}=e;return u("div",{className:"mb-4",children:[h("div",{children:nr(l,a)}),h("div",{className:"mt-1 text-s-light text-secondary-text",children:n})]},String(t))},nr=(e,t="")=>{switch(e){case"tel":return h("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${rr(t)}`,children:t});case"email":return h("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return h("span",{children:t})}},rr=e=>e.replaceAll(/\D/g,""),ir=p((({className:e="",index:t,text:l,...a})=>{const n=ge(),{href:r,target:i,onClick:s}=n(a);return h("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:r,target:i,onClick:s,children:l||`Документ ${t}`})})),sr=p((({className:e="",links:t})=>h("div",{className:e,children:t?.length?h("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)=>h(ir,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),or=p((({className:e="",fallback:t})=>{const l=ge(),a=Gn(c.SITEMAP||"sitemap",t);return h("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:a.topItems?.map(((e,t)=>cr(l(e),t)))})})),cr=(e,t)=>{const{text:l,items:a,href:n,target:r,onClick:i}=e;return u("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[h("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:n,target:r||"_self",onClick:i,children:l||`Раздел ${t}`}),a?.map(((e,t)=>h(dr,{...e,index:t},String(t))))]},String(t))},dr=p((({text:e,index:t,...l})=>{const a=ge(),{href:n,target:r,onClick:i}=a(l);return h("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:n,target:r||"_self",onClick:i,children:e||`Раздел ${t}`})})),mr=p((({className:e="",index:t,...l})=>{const a=ge(),{href:n,target:r,text:i,onClick:s}=a(l);return h("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:n,target:r,onClick:s,children:i||`Документ ${t}`})})),hr=p((({className:e="",links:t})=>u("div",{className:e,children:[h("div",{className:"pt-5",children:h("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?h("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>h(mr,{index:t,...e},String(t))))}):null]}))),ur="w-[204px]",pr=p((({className:e="",...t})=>{const l=t.options?.page?.fallback,{documents:a,relatedEnterprises:n,contacts:r,socialMedia:i,mobileApps:s,logo:o}=Gn(c.FOOTER||"footer",l);return u(V,{tag:"footer",className:`p-9 ${e}`,...t,children:[u("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[h(Zn,{className:ur,logo:o}),h(tr,{className:"grow"})]}),u("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[u("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[h(lr,{items:r,hasButton:!0}),h(Oa,{media:i,children:"Соцсети"}),h(Oa,{className:"mt-6",media:s,children:"Мобильное приложение"})]}),h(or,{className:"pt-[3px]",fallback:l})]}),h(sr,{className:"mt-[98px]",links:n}),h(hr,{links:a})]})})),xr={normal:3,mini:4},gr={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},br={normal:380,mini:276},fr=p((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:a,icon:n,items:r,button:i,isFullWidth:s=!0,isDotted:o=!0,align:c="center",...d})=>u(V,{className:`h-full flex flex-col justify-between ${C[c]}`,tag:"div",...d,children:[u("div",{className:"flex flex-col h-full",children:[vr(n),Nr(t,e),yr(l,e),r?.length?Cr(r,o):null,wr(a)]}),Bt([i],{buttonClassName:"mt-6 "+(s?"w-full":"self-center")})]}))),vr=e=>u("div",{className:"flex justify-center",children:[e?.src?h(Y,{className:"mb-5",image:e}):null,e?.icon?h(Y,{className:"w-8 h-8 min-w-8 mb-5 rounded-full",image:_a(e),asSVG:!0}):null]}),Nr=(e,t)=>t?h("div",{className:_t[e],children:t}):null,yr=(e,t)=>e?h("div",{className:"text-l "+(t?"mt-2":""),children:e}):null,wr=e=>e?h("div",{className:"text-m-light mt-auto group-data-primary:text-secondary-text",children:e}):null,Cr=(e,t)=>h($a,{className:"max-w-[308px] mt-2 text-s group-data-primary:text-secondary-text",itemClassName:"text-left",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}),kr=p((({headlineVersion:e="M",cards:t=[],galleryVersion:l="normal",activeIndex:a,title:n,description:r})=>u("div",{children:[h(Lt,{className:"!p-0",title:n,description:r,headlineVersion:e}),h("div",{className:`flex mt-8 ${t?.length<=xr[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${a*br[l]}px)`},role:"list",children:t?.map(((e,t)=>function({card:e,galleryVersion:t},l){return h("section",{className:`box-border border-solid border border-gray p-6 mx-2 flex flex-col justify-between\n items-stretch ${gr[t]} ${R[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:h(fr,{...e})},String(l))}({card:e,galleryVersion:l},t)))})]})));const Sr=p((({cards:e=[],className:t="",galleryVersion:l="normal",button:a,...n})=>{const[r,i]=Gt({itemCount:e?.length,visibleItemCount:xr[l]}),{isScrollAvailable:s}=i;return u(V,{className:`relative p-[42px] overflow-hidden flex flex-col ${t}`,...n,children:[h(kr,{cards:e,galleryVersion:l,activeIndex:r,...n}),Kt({...i,btnClass:["left-8","right-8"],className:"top-1/2"}),s?u("div",{children:[h("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),h("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]}):null,Bt([a],{className:"mt-8 mx-auto"})]})})),$r=p((e=>h(Sr,{...e,galleryVersion:"normal"}))),Ir=p((({className:e="",title:t,description:l,calendar:a,...n})=>u(V,{className:`p-12 ${e}`,...n,children:[h(Lt,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M"}),a?Tr(a):null]}))),Tr=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 u("div",{className:"w-full flex flex-col justify-center mt-13",children:[h("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Br(e,t)))}),h("div",{className:"flex w-full",children:l.map(((e,t)=>u("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:[h("div",{className:"flex",children:Rr(e)}),u("div",{className:"text-s-light text-primary-text mt-3",children:[h("span",{children:e.text})," ",h("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Br=(e,t)=>e.month?.map(((e,l)=>h("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Rr=e=>e.month?.map((e=>e.image?.src?h("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:h(Y,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Vr=e=>({href:t})=>me(oe(t)?e.href:e.pathname).startsWith(me(t)),jr=p((({className:e="",active:t,flat:l,children:a,...n})=>{const r=ge(!0),{href:i,target:s,text:o,onClick:c}=r(n);return h("a",{className:g(_r(t,l),e),href:i,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:h("span",{className:Lr(t,l),children:o||a})})})),_r=(e=!1,t=!1)=>g("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"),Lr=(e=!1,t=!1)=>g("font-sans text-s-light",e?"text-primary-main":g(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover");function Mr(e=!1){const[t,l]=a(e),n=r((()=>l(!0)),[]),i=r((()=>l(!1)),[]),s=r((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:n,setFalse:i,toggle:s}]}const Ar=864e5;function Dr(e,t,l=globalThis?.localStorage){const a=r((async(...a)=>{const n=`async:${e}`,r=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<Ar?t:void 0}(l.getItem(n));if(r)return r;const i=await t(...a);return l.setItem(n,JSON.stringify({data:i,timestamp:Date.now()})),i}),[e,t]);return le(e,a)}const zr=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}};const Or=p((({className:e,searchTerm:t,onSearch:l})=>u("form",{className:`font-sans relative ${e}`,children:[h("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:h("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),h("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),type:"text",name:"location-search-bar-input"})]}))),Pr=p((({currentLocation:e,onChangeLocation:t,close:l,foreignOffices:a})=>{const{term:n,setTerm:i}=Qn(),s=r((e=>i(e)),[]),o=Fr(function(){const{data:e}=le("/api/v1/regions",re);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;return e.forEach((e=>{const a=t(e),n=l.get(a);l.set(a,[...n||[],e])})),l})(o,Er);return u("div",{className:"absolute h-full w-full inset-0 bg-white text-l-light z-50",children:[h(Hr,{close:l}),u("div",{className:"container py-12",children:[h(Ur,{currentLocation:e}),h(Or,{onSearch:s,searchTerm:n,className:"mb-7"}),n&&n.length>=3?h("div",{children:o.filter((e=>e.name?.startsWith(n))).map(Gr({onChangeLocation:t,close:l}))}):h("div",{className:"columns-5",children:Array.from(c.entries()).map(Xr({onChangeLocation:t,close:l}))}),h(Wr,{foreignOffices:a})]})]})})),Er=e=>e.name?.charAt(0)||"",Fr=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Ur=p((({currentLocation:e})=>e?u("div",{className:"mb-4",children:[h(K,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),h("button",{className:"cursor-pointer",onClick:close,children:h(K,{color:"text-green",children:e.name})})]}):null)),Hr=p((({close:e})=>h("button",{className:"visible peer-placeholder-shown:invisible absolute top-6 right-6 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:t=>{t.preventDefault(),e&&e()},children:h(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Xr=({onChangeLocation:e,close:t})=>([l,a])=>u("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[h("div",{className:"mb-2.5",children:h(K,{size:"text-h6",children:l})}),a.map(Gr({onChangeLocation:e,close:t}))]},l),Gr=({onChangeLocation:e,close:t})=>l=>h("div",{className:"mb-1",children:h("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(l),t&&t()},children:l.name||""})},l.id),Wr=p((({foreignOffices:e})=>e?.length?u("div",{className:"border-t border-main-divider mt-7 pt-7",children:[h("div",{className:"mb-4",children:h(K,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),h("div",{className:"flex gap-10",children:e.map(((e,t)=>h(Jr,{...e},String(t))))})]}):null)),Jr=p((({icon:e,...t})=>{const l=ge(),{text:a,target:n,href:r,onClick:i}=l(t);return u("div",{className:"flex gap-x-3",children:[e?h(Y,{pathPrefix:"/wcms-resources/",image:e}):null,a?h("a",{className:"hover:text-primary-hover",href:r,target:n,onClick:i,children:a}):null]})})),Yr=p((({className:e,isRounded:t,disabled:l,ariaLabel:a,image:n,onClick:r})=>h("button",{className:g("group/btn border-0 p-0 flex items-center bg-inherit",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":"w-6 h-6 text-primary-text hover:text-primary-main","group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":a,onClick:r,children:h(Y,{image:n,className:g("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0",asSVG:!0})}))),Kr=e=>globalThis[e];function qr(e,t){const[l,i]=a(),s=r((()=>i(Kr(e))),[e]);return n((()=>{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(!Kr(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Zr={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Qr=p((e=>{const[t,{setTrue:l}]=Mr();return t?h(ei,{...e}):ti({...e,onClick:l})})),ei=p((({chat:e="personal",...t})=>((e=>{n((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),qr("chatbot",Zr[e])})(e),ti(t)))),ti=({className:e,iconVersion:t,onClick:l})=>h(Yr,{className:g("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l}),li=p((({version:e,className:t,officesLink:l,defaultLocation:i="Москва",foreignOffices:s,chat:o})=>{const[c,{setTrue:d,setFalse:m}]=Mr(),[p,x]=function(e){const t=zr(),[l,i]=a(t?.region??{name:e}),{data:s}=Dr("/api/v1/region",re);return n((()=>{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)}),[i])]}(i),b="transparent"===e?"white":"black";return u("div",{className:g("flex items-center",t),children:[h(jr,{className:"mr-5",flat:!0,href:"#",text:p.name,onClick:d}),l?h(jr,{className:"mr-7",flat:!0,href:l,text:"Офисы и банкоматы"}):null,o?h(Qr,{className:"mr-5",iconVersion:b,chat:o}):null,c?h(Pr,{currentLocation:p,foreignOffices:s,onChangeLocation:x,close:m}):null]})})),ai=p((({className:e="",items:t,activeItem:l})=>{const n=ge(),[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),c=je(r((()=>s(!1)),[]));return u("div",{className:g(i?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[h("button",{className:"group/btn flex justify-between items-center h-6 ml-6","aria-label":""+(i?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>h("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))))}),h("div",{className:g("flex flex-col rounded-md bg-white p-6 pb-2",i?"":"hidden"),"aria-hidden":!i,children:t?.map(((e,t)=>{const{text:a,...r}=e;return h("a",{className:g("text-l-light pb-4 hover:text-primary-main",e===l?"text-primary-main":""),...n(r),children:a},e.href||String(t))}))})]})})),ni=p((({className:e="",active:t,dataItemName:l,children:a,...n})=>{const r=ge(),{href:i,target:s,text:o,onClick:c}=r(n);return u("a",{className:g("relative inline-block bg-transparent text-center no-underline",e),href:i,target:s,"data-item-name":l,onClick:c,children:[h("span",{className:ri(t),children:o||a}),t?h("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),ri=(e=!1)=>g("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"),ii=p((({observerOptions:e,onVisibilityChange:t,children:l,...a})=>{const n=S(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return h("span",{ref:n,children:h(ni,{...a,children:l})})})),si=p((({subItems:e=[]})=>{const t=(e=>(t=[])=>{const l=t?.filter(Vr(e));return l?.length?Gl((e=>e.href?.length||0))(l):void 0})(xe())(e),[l,n]=a(e.length),r=e.slice(l),o=s(null),c={rootRef:o},d=i((()=>e.map(((e,t)=>e=>{n(e?oi(t):ci(t))}))),[e]);return u("nav",{className:"relative mt-6",children:[h("div",{ref:o,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,a)=>h(ii,{className:g("mr-8",l-1<a?"invisible":""),active:e===t,observerOptions:c,onVisibilityChange:d[a],...e},String(a))))}),r.length?h(ai,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:r,activeItem:t}):null]})})),oi=e=>t=>Math.max(t,e+1),ci=e=>t=>Math.min(t,e),di={"bg-white":"primary",transparent:"transparent"},mi=p((({bgColor:e="bg-white",className:t,showSubMenu:l=!0,version:a=di[e],chat:n,...r})=>{const i=xe(),{topItems:s,logo:o,defaultLocation:d,foreignOffices:m,officesLink:p}=Gn(c.SITEMAP||"sitemap",r.options?.page?.fallback),x=s?.find((e=>t=>c.BASE_PATH?Vr({pathname:c.BASE_PATH})(t):t.items?.some(Vr(e))||Vr(e)(t))(i));return h(V,{tag:"header",className:g("pt-6 px-20",l&&x?.items?.length?"pb-4":"pb-5",t),version:a,...r,children:u("div",{className:"container",children:[u("div",{className:"flex items-center",children:[h(Zn,{className:"mr-8",bgColor:e,logo:o}),s?.map(((e,t)=>h(jr,{active:e===x,...e},String(t)))),h(li,{version:a,className:"ml-auto",foreignOffices:m,defaultLocation:d,officesLink:p,chat:n})]}),h("div",{className:g("mt-6 h-px bg-main-divider","transparent"===a?"opacity-30":"")}),l&&x?.items?.length?h(si,{subItems:x.items}):null]})})})),hi={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},ui=p((({className:e="",gap:t="XS",isPadding:l=!1,version:a="transparent",...n})=>h(V,{className:g("grid grid-cols-12",l?"p-12":"",hi[t],e),version:a,...n,children:w(n)})));ui.childrenTypes={exclude:["HorizontalLayout"]};const pi=p((e=>{const{className:t,image:l,...a}=e;return h(V,{className:t,...a,children:h(Y,{image:l})})})),xi=p((({className:e="",cards:t=[],button:l})=>{const[n,i]=a(0),s=r((e=>i(e)),[]),o=t.length,[c,d]=Gt({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:p}=d,x=t[c]?.href;return u("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[u("div",{className:"relative overflow-hidden",children:[o?gi({activeIndex:c,cards:t,selectedCardIndex:n,onClick:s}):null,Kt({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),m?h("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,p?h("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),h(Ie,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function gi({activeIndex:e,cards:t,selectedCardIndex:l,onClick:a}){const n=460*e,r=t.length>2?"justify-start":"justify-center";return h("div",{style:{transform:`translateX(-${n}px)`},className:"duration-1000 px-12",children:h("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:a}){return u("button",{type:"button",onClick:a,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?h(Y,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,u("div",{className:"flex gap-3.5",children:[e?.sum?bi("страховая сумма",e.sum):null,e?.fee?bi("страховой взнос",e.fee):null]}),fi(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})})}function bi(e,t){return u("div",{className:"flex flex-col text-left whitespace-pre",children:[u("span",{className:"text-h6",children:[Ze(t)," ₽"]}),h("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function fi(e){return e?h(Y,{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 vi=p((({className:e="",title:t,insuranceTabs:l=[],button:n,...i})=>{const[s,o]=a(0),c=r((e=>o(e)),[]);return u(V,{className:`box-border py-12 overflow-hidden relative w-100 ${e}`,...i,children:[t?h(_,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?h("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:a}){return h("button",{type:"button",onClick:a,"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,h("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Ni({insuranceTabs:l,button:n})})]})})),Ni=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>h(xi,{button:t,cards:e},String(l)))):null};function yi(e){return t=>t.reduce(((t,l,a)=>t.length?t.concat({...e,key:a},l):[l]),[])}const wi={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Ci={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},ki=p((e=>{const{className:t="",items:l,isDotted:a,investmentZeroColumn:n,investmentColumns:r,...i}=e,s=r?[...r]:[];return n&&s.unshift(n),h(V,{className:`px-9 py-12 ${t}`,...i,children:u("div",{className:"container text-m-light",children:[s?.length?u("div",{children:[u("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[yi(h("div",{className:"w-px h-4 bg-gray"}))(s.map(Si)),h("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),h("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),h("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Ti)})]}):null,l?.length?h($a,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:a}):null]})})})),Si=(e,t,l)=>{const a=1===t,n=t===l.length-1;return h("div",{className:`${$i(a,n,e.cells)}`,children:e.cells?.length?h("div",{className:"w-full "+(n?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(Ii)}):null},`column_${t}`)},$i=(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(" "),Ii=(e,t)=>{const l=e.cellSize||"XS",a=e.cellColor||"green";return e.text?h("div",{className:`flex-1 flex items-center justify-center relative py-2 ${Ci[l]} ${wi[a]} ${"XS"===l?"px-3":"px-11"}`,children:h("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Ti=(e,t,l)=>{const a=0===t,n=t===l.length-1;return h("div",{className:`flex-1 max-w-[180px] text-center px-2 ${a?"pl-9":""} ${n?"mr-3.5":" "}`,children:e.title},`title_${t}`)},Bi=p((({className:e,iconClassName:t,textClassName:l,suffixClassName:a,doc:n,icon:r})=>{const{text:i,fileSize:s,...o}=n;return u("a",{className:e,role:"link",...o,children:[r?h(Y,{className:t,image:_a(r),width:"24px",height:"24px",asSVG:!0}):null,i?u("span",{className:l,children:[i,h("span",{className:a,children:o?.href&&Ri(Vi(o.href),s)})]}):null]})})),Ri=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Vi=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},ji=p((({className:e="",doc:t,icon:l})=>h(Bi,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center text-l-light",suffixClassName:"text-secondary-text group-hover/item:text-primary-main",doc:t,icon:l}))),_i=p((({className:e,documents:t,columnsMode:l="double",icon:a})=>t?.length?h("div",{className:e,role:"list",children:t.map(((e,t)=>h("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:h(ji,{className:"group/item flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),Li={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},Mi=p((({className:e="",title:t,description:l,align:a="text-center",documents:n,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>u(V,{className:g("p-12",e),...s,children:[h(Lt,{className:"!p-0",title:t,description:l,align:a,headlineVersion:"M",as:"h2"}),h(_i,{className:`mt-8 ${Li[i]}`,columnsMode:i,documents:n,icon:r})]}))),Ai=p((e=>h(Sr,{...e,galleryVersion:"mini"}))),Di=e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function zi(e=""){const t=Di(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const Oi=p((({className:e="",title:t="Мобильное приложение",qr:l,buttons:a,version:n="primary",items:r,image:i,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const m="secondary"===n?"p-3.5 min-w-[120px]":"min-w-[92px]";return u(V,{className:`flex justify-between p-12 box-border relative min-h-80 ${zi(e)} ${e}`,version:n,...d,children:[u(pa,{className:"z-10",title:t?h(_,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full ${C[o]}`}):null,buttons:Bt(a,{className:"mt-8",buttonClassName:"min-w-[168px]"}),children:[Ei(c),u("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?h("div",{className:`flex justify-center mr-5 bg-white rounded-md ${m}`,children:h(Y,{className:"w-fit",image:l})}):null,Pi(r)]})]}),i?.src?h("div",{className:"absolute right-0 bottom-0",children:h(Y,{image:i})}):null]})})),Pi=e=>e?.length?h($a,{items:e,itemClassName:"text-l-light mb-2 last:mb-0"}):h("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Ei=e=>e?h("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,Fi=[{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 Ui(e,t,l){t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),n=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:a,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]})));n.add(r),t.geoObjects.add(n),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Hi={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"},Xi=e=>h("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(Hi).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Gi={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)]"},Wi=(e,t,l)=>u("div",{className:`${Object.values(Gi).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[h(P,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),h("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const a=t.target?.value?t.target?.value.toLowerCase():"";if(a){const t=e.filter((e=>e.text.toLowerCase().indexOf(a)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Ji={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"},Yi=(e,t,l)=>h("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(Ji).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:h(P,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Ki={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"},qi=p((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return h("div",{onClick:()=>{const l=e.current.getZoom(),a="in"===t?l+1:l-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Ki).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:h(P,{name:l,width:"20",height:"16"})})})),Zi={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"},Qi=p((({points:e,className:t="",zoom:l=5,showSearchField:r=!1})=>{const i=s(null),o=qr("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${c.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[d,m]=a(),[p,x]=a(as(Fi)),g=es(e);if(n((()=>{i?.current||o?.ready((()=>{i.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),Ui(o,i.current,p)}))}),[o,i,p]),n((()=>{if(i.current&&p&&o){const e=p.length<1?as(Fi):p;Ui(o,i.current,e)}}),[i,p,o]),!o)return null;const b=d?"z-[100000]":"z-10";return u("div",{id:"map",className:`${d?"":"relative"} w-full ${t}`,children:[h("div",{className:`absolute flex left-2 top-4 w-[50%] ${b}`,children:r?Wi(Fi,0,(e=>{if(e){const t=as(e);x(t)}})):Xi(g)}),h("div",{className:`${Object.values(Zi).join(" ")} ${b} right-2 top-4 bg-white`,onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:h(P,{name:"FullScreenIcon",width:"16",height:"16"})}),u("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${b}`,children:[h(qi,{yandexMaps:i}),h(qi,{yandexMaps:i,direction:"out"})]}),Yi(i.current,o,`right-2 top-80 ${b}`)]})})),es=e=>[ls(ts(e,0)),ls(ts(e,1))],ts=(e,t)=>e.map((e=>e[t])),ls=e=>e.reduce(((e,t)=>e+t))/e.length,as=e=>e?e.map((e=>e.coords)):null,ns=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],rs=({lunchHour:e,status:t,workTime:l})=>{const a=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?u("div",{className:"flex",children:[h("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}),h("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?a:null})]}):h("div",{className:"flex",children:h("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},is=({icon:e,title:t,distance:l,time:a},n)=>u("div",{className:"flex mr-4",children:[h(P,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?u("span",{className:"text-m",children:[t," "]}):null,u("span",{className:"text-m-light",children:[l?` (${l})`:null,a?`, ${a}`:null]})]},`nearbyOffice${n}`),ss=({title:e,status:t,workTime:l,lunchHour:a,description:n},r)=>u("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[u("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[h("div",{children:e}),t?null:h("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?h("div",{children:l}):null]}),t&&a?os(a):null,n?h("div",{className:"pb-1 text-s-light text-secondary-text",children:n}):null]},`day${r}`),os=e=>/\d+/gi.test(e)?u("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[h("div",{children:"Перерыв"}),h("div",{children:e})]}):h("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:h("div",{children:e})}),cs={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};function ds(e){return e?ne(e,{method:"GET"}):{}}const ms=p((({className:e=""})=>{const t=function(e){const{data:t}=le(e?`/api/v1/branches?regionCode=${e}`:void 0,ds);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),cs}("000"),{name:l,address:a,gpsLatitude:n,gpsLongitude:r,workSchedule:i}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:m,workingSaturday:p,workingSunday:x}=i,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=i,N=n&&r?[n,r]:null,y=[{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:p,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),C=w>0?y[w-1]:y[6];return u("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[u("div",{className:"flex flex-col px-12 pt-12",children:[u("div",{className:"flex justify-between",children:[h("div",{className:"text-h2",children:l}),rs(C)]}),u("div",{className:"flex text-l-light pt-4",children:[h(P,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),a]}),h("div",{className:"flex pt-4",children:ns.map(is)})]}),u("div",{className:"flex justify-between pt-8",children:[h("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?h(Qi,{points:[N],className:"h-full"}):null}),h("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(ss)})]})]})})),hs=p((({className:e="",title:t,servicesList:l,...a})=>u(V,{className:`p-8 flex flex-col ${e}`,...a,children:[t?h(_,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?h("ul",{className:"list-none m-0 p-0",children:l.map(us)}):null]}))),us=(e,t)=>u("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?h(Y,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:_a(e.icon)}):null,e.label?h("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),ps=p((({className:e="",...t})=>h(V,{className:`font-sans text-primary-text ${e}`,...t,children:w(t)})));ps.childrenTypes=["OtherProductsItem"];const xs=p((({className:e="",label:t,icon:l,dataTheme:a="",onClick:n})=>u("button",{className:["border border-transparent bg-primary-main font-sans text-white cursor-pointer","hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none","flex justify-center w-full px-0 py-5",e].join(" "),"data-theme":a,onClick:n,children:[h("span",{className:"text-h4 pr-3",children:t}),l?h(Y,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),gs=({isUnfolded:e,onToggle:t})=>h(xs,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),bs=["ArrowDownIcon","ArrowUpIcon"],fs=p((({className:e,label:t="",isUnfolded:l,...a})=>{const{colorPalette:n}=function(e,t){const{content:l}=function(e){return e?.parent||{}}(e);return l||t}(a.options,{});return h("div",{className:`border-0 border-b border-solid border-main-divider ${e}`,children:h(D,{unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>h("div",{className:"box-border",children:h(z,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(a)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>h(xs,{label:t,icon:bs[Number(e)],dataTheme:n||a.options?.page?.colorPalette,onClick:l})})})}));fs.childrenTypes={exclude:["OtherProductsItem"]};const vs=p((({text:e,size:t,align:l,font:a,children:n,...r})=>h(V,{...r,children:h(L,{size:t,align:l,font:a,children:e||n})}))),Ns=p((e=>{const{className:t="",icon:l,label:a,description:n,version:r="primary",benefitsVersion:i="normal"}=e,s="white"===i?"secondary":"primary";return u("div",{className:`flex gap-5 ${n?"items-start":"items-center"} ${t}`,children:[l?h("div",{className:ys(r,i),children:h(Y,{className:"w-6 h-6",image:_a(l,s),asSVG:!0})}):null,u("div",{className:"gap-0.5",children:[a?h("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:a}):null,n?h("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:n}):null]})]})}));function ys(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 ws=p((e=>{const{__html:t=""}=e;return h("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));function Cs(e){throw new Error(e)}const ks=e=>(t,l)=>{const{type:a}=t;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return h(Ns,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));case"rte":return h(ws,{__html:t.__html});default:Cs(t)}},Ss=p((({className:e="",title:t,description:l,image:a,benefits:n,sum:r,monthLimit:i,directionRight:s=!1,version:o="primary",...c})=>u(V,{className:`relative py-12 px-24 ${e}`,version:o,...c,children:[h(Lt,{className:"!p-0",title:t,description:l,headlineVersion:"M"}),u("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[a?.src?h(Y,{className:s?"order-2":"",image:a}):null,u("div",{className:"w-[558px] m-auto",children:[n?.length?h("div",{className:"flex flex-col gap-4",children:n.map(ks(o))}):null,$s(Number(r),Number(i))]})]})]})));function $s(e,t){return e||t?u("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Is("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Is("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Is(e,t=0,l=!1){return u("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[h("span",{className:"text-secondary-text text-l-light",children:e}),u("span",{className:"text-primary-main text-h6",children:[Ze(t)," ₽"]})]})}function Ts(e=""){const t=Di(e);return t<=4?"S":t<=8?"M":"L"}function Bs(e=""){const t=Di(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Rs=p((({className:e,title:t,description:l="Блок в разработке...",...a})=>u(V,{className:g("p-9 box-border",e,Bs(e),zi(e)),...a,children:[h(Lt,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:Ts(e)}),h("figure",{className:"m-0 min-w-[80%]",children:Vs()})]}))),Vs=(e=3)=>_s(100,e).map((e=>Math.floor(e))).map(js),js=(e,t)=>h("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),_s=(e,t)=>[e].concat(t>0?_s(e/1.618,t-1):[]),Ls=p((({className:e="",children:t,...l})=>{const a=ge(),{text:n,href:r,target:i,onClick:s}=a(l);return r?h("a",{className:`no-underline ${e}`,href:r,target:i,onClick:s,children:h("span",{className:e,children:n||t})}):h("span",{className:e,children:n||t})})),Ms=(e="primary",t="normal")=>({icon:l,label:a,description:n},r)=>h(Ns,{icon:l,label:a,description:n,version:e,benefitsVersion:t},String(r)),As=p((({className:e="",title:t,headlineVersion:l="L",description:a,benefitsCountOfRow:n=3,benefits:r,benefitsVersion:i,buttons:s,footnote:o,image:c,items:d,version:m="primary",isDotted:p=!0,textBlockClassName:x=""})=>{const b=r?.filter((e=>e.label))?.length,f=Ds(n);return u("div",{className:g("flex grow justify-between items-stretch h-full",e),children:[u("div",{className:g("flex flex-col",x),children:[h(Lt,{className:"!p-0 max-w-[600px]",title:t,description:a,headlineVersion:l,align:"text-left"}),u("div",{className:"flex flex-col justify-between h-full",children:[u(pa,{buttons:Bt(s),children:[b?h("div",{className:f,children:r.map(Ms(m,i))}):null,d?.length?h($a,{className:"mt-5 text-h6",items:d,itemClassName:"mb-[7px]",isDotted:p}):null]}),o?h("p",{className:"text-m-light pt-12",children:o}):null]})]}),c?.src&&h(Y,{className:"mt-[-50px]",image:c})]})})),Ds=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function zs(e,t,l){const{text:a,href:n,target:r,onClick:i}=e,s="primary"===t?"white":"black",o=e?.icon||{icon:"ArrowLeftIcon"};return u("div",{className:`flex items-center cursor-pointer ${l}`,onClick:i,children:[h(Ie,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:a,href:n,target:r,children:h(Y,{className:"w-4 h-4",image:{...o,iconVersion:o.iconVersion||s},asSVG:!0})}),a?h("span",{className:"text-m",children:a}):null]})}const Os="text-secondary-text group-data-secondary:text-white/80",Ps=p((e=>{const{className:t="",breadcrumbs:l,backwardButton:a,version:n="primary",...r}=e,i="primary"===n?n:"white";return u(V,{className:`overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${t}`,version:n,...r,children:[a?.text?zs(a,i,"mb-10 -mt-2.5"):null,l?.length?h("div",{className:"text-xs-light mb-6",children:yi(h("span",{className:`mx-2 ${Os}`,children:"/"}))(l.map(((e,t)=>h(Ls,{className:Os,...e},String(t)))))}):null,h(As,{version:n,...r})]})})),Es=p((({className:e="",slides:t=[],version:l="primary",...n})=>{const i=t.map((e=>e.nav)),s=t.map((e=>e.productBlock)),[o,c]=a(0),d=r((e=>c(e)),[]);return u(V,{className:`box-border pt-12 overflow-hidden relative w-100 mb-6 ${e}`,version:l,...n,children:[h("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,t)=>function(e,t){return h("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:h("div",{className:"flex grow",children:h(As,{className:"pl-12 z-10 text-secondary-text group-data-secondary:text-white",textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...n,version:l},t)))}),h("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:i.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:a}){const n=l?"bg-white shadow-dark-blue min-w-[350px] border-none p-6":"min-w-[290px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10 px-6 py-5 backdrop-blur",r=l?"text-primary-text !text-h6 p-2":"text-l pb-1 text-secondary-text group-data-secondary:text-white",i=l?"text-secondary-text text-l-light":"text-m-light text-secondary-text group-data-secondary:text-white/80";return h("button",{type:"button",onClick:a,"aria-label":e?.title,className:`relative box-border overflow-hidden cursor-pointer text-left mx-1 grow basis-0 border border-gray group-data-secondary:border-white/50 ${n}`,children:u("div",{className:"border-0 px-6",children:[h("div",{className:`last:pb-0 ${r}`,children:e?.title}),h("div",{className:`text-secondary-text ${i}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===o),onClick:()=>d(t)})))})]})}));function Fs(e,t){if(!e)return null;return h("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:h(L,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e})})}const Us=(e,t)=>{const{type:l}=e;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return[h(K,{size:"text-h6",children:e.label},`label-${t}`),h(K,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e.description},`desc-${t}`)];case"rte":return h("div",{className:"col-span-2",children:h(ws,{__html:e.__html})});default:Cs(e)}};function Hs(e,t){return e?.src?h(Y,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const Xs=p((({className:e="",title:t,headlineVersion:l="S",description:a,additionalDescription:n,benefits:r=[],buttons:i,image:s,isImageOnRightSide:o=!0,...c})=>u(V,{className:g("overflow-hidden p-9 box-border relative min-h-[364px]",Bs(e),e),...c,children:[u("div",{className:g("flex flex-col",o?"":"items-end"),children:[h(Lt,{className:g("!p-0 !bg-transparent z-10",t||a?"mb-3.5":""),title:t,description:a,headlineVersion:l,as:"h2",align:"text-left"}),Gs(r,s),Fs(n,s),Bt(i,{className:"mt-5 z-10 text-l"})]}),Hs(s,o)]})));function Gs(e,t){if(!e.length)return null;return h("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline\n ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(Us):null})}const Ws=p((({className:e="",title:t="Акции и спецпредложения",date:l,description:a,as:n,buttons:r=[],...i})=>h(V,{className:g("p-9 box-border",e,Bs(e),zi(e)),...i,children:h(pa,{title:t?h(Lt,{className:"!p-0 max-w-[600px]",title:t,headlineVersion:Ts(e),align:"text-left",as:n||"h2"}):null,buttons:Bt(r),children:u("div",{className:"mt-1.5",children:[l?h("div",{className:"text-s mb-2",children:Js(l)}):null,h("div",{className:"text-l",children:a})]})})})));function Js(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Ys=p((({className:e="",title:t,description:l,items:a,image:n,socialMedia:r,button:i,...s})=>{const o=t?h(_,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:t}):null,c=n?.src?h(Y,{className:"absolute bottom-0 right-0 m-0",image:n}):null;return h(V,{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${e}`,role:"listitem",...s,children:h(pa,{className:"flex justify-between",title:o,image:c,children:u("div",{className:"h-full flex flex-col justify-between",children:[l?h("span",{className:"mb-2",children:l}):null,a?.length?h($a,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:a}):null,r?h(Oa,{className:"pt-10 pb-0",media:r}):null,i?.text?h("div",{className:"pt-2",children:Bt([i],{buttonClassName:"mt-16 px-5"})}):null]})})})})),Ks="absolute top-0 bottom-0 w-[84px]",qs=p((({recommendations:e=[],className:t="",title:l,version:a="primary",...n})=>{const[r,i]=Gt({itemCount:e.length,visibleItemCount:2});return u(V,{className:`relative font-sans p-9 overflow-hidden text-center ${t}`,version:a,...n,children:[l?h(_,{headingType:"h3",className:"mb-6",title:l}):null,u("div",{children:[h("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*r}px)`},role:"list",children:e.length?e.map(((e,t)=>h(Ys,{version:a,className:"border-gray group-data-secondary:border-white/50",...e},String(t)))):null}),Kt({...i,btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})]}),h("div",{className:`${Ks} left-0 ${"secondary"===a?"bg-opacity-from-main":"bg-opacity-from-white"}`}),h("div",{className:`${Ks} right-0 ${"secondary"===a?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),Zs=p((e=>{const{__html:t,...l}=e;return h(V,{...l,children:h(ws,{__html:t})})})),Qs=p((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:a=!0,version:n="primary",...r})=>h(V,{className:`border-b border-solid border-main-divider w-full ${e}`,tag:"div",...r,children:h(D,{isFoldButtonOnTop:a,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>h("div",{className:"box-border",children:h(z,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(r)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>eo({version:n,label:t,isUnfolded:e,onToggle:l})})})));Qs.childrenTypes={exclude:["RollupItem","Accordion","AccordionItem","OtherProducts","OtherProductsItem"]};const eo=({version:e,label:t,isUnfolded:l,onToggle:a})=>{const n=t||(l?"Скрыть":"Развернуть");return"primary"===e?to({label:n,icon:l?"MinusIcon":"PlusIcon",onToggle:a}):h(xs,{label:n,icon:l?"ArrowUpIcon":"ArrowDownIcon",onClick:a})},to=({label:e,icon:t,onToggle:l})=>u("button",{className:"border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer",onClick:l,children:[h("span",{className:"text-xl font-medium pr-2.5",children:e}),t?h(Y,{image:_a({icon:t}),width:"24",height:"24",asSVG:!0}):null]}),lo=p((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return h(_e,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),ao=p((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:a=[],selectedBranch:n,onSelectedBranch:r})=>u("div",{className:"flex justify-between gap-4 mb-6",children:[h("div",{className:"max-w-[396px] w-1/2",children:h(lo,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),h("div",{className:"max-w-[396px] w-1/2",children:h(lo,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:n,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),no=p((({name:e,text:t,value:l,checked:a,onChange:n,className:r})=>h("div",{className:r,children:u("label",{className:"font-sans flex items-center relative cursor-pointer",children:[h("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:a,onChange:e=>n(e.target.value)}),t?h("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),ro=p((()=>{const[e,t]=a("option2"),l=r((e=>t(e)),[]);return u("div",{children:[h(no,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),h(no,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),io=["От 1 дня","До 365 дней"],so=p((({days:e,setDays:t})=>u("div",{className:"mb-6",children:[h("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),h(tt,{min:1,max:365,value:e,items:io,onChange:t})]}))),oo=p((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:a=[],selectedBoxSize:n,onSelectedBoxSize:r})=>u("div",{className:"flex justify-between mb-6",children:[h("div",{className:"mr-4 w-full",children:h(lo,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),h("div",{className:"w-full",children:h(lo,{data:a,fieldLabel:"safeBoxCasesSize",selected:n,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),co=p((({regions:e,selectedRegion:t,branches:l,selectedBranch:a,days:n,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>u("div",{className:"flex-1 mr-9",children:[h(ao,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:a,onSelectedBranch:mo(c)}),h(so,{days:n,setDays:e=>c({days:e})}),h(oo,{caseVolumes:o,selectedCaseVolume:r,onSelectedCaseVolume:ho(c),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),h("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),u("div",{className:"flex justify-between items-center mt-5",children:[h(ro,{}),h(Ie,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),mo=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},ho=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},uo=p((({days:e,tariffs:t=[]})=>{const l=xo(e,t);return u("div",{className:"flex flex-col justify-between",children:[u("div",{className:"flex",children:[po("Аренда за",e,"mr-11"),po("Цена",l+" ₽")]}),u("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[h(Y,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),u("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",h("br",{})," листов формата А4"]})]})]})})),po=(e,t,l="")=>u("div",{className:l,children:[h("div",{className:"text-m-light text-secondary-text mb-1",children:e}),h("span",{className:"text-h3 text-primary-text",children:t})]}),xo=(e,t)=>{const l=go(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},go=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},bo=(e,t)=>e.find((e=>e.branchCode===t)),fo=p((e=>{const{regions:t,data:l,branches:a,onChange:r,onClick:i}=e;n((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,r]);const s=bo(a,l.selectedBranch),o=vo(s?.safeBoxCaseVolumes),c=No(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=yo(c,l.selectedBoxSize);return u("div",{className:"flex justify-between align-top mb-6",children:[h(co,{...l,regions:t,onClick:i,branches:a,caseVolumes:o,safeBoxCases:c,onChange:r}),h(uo,{days:l.days,tariffs:d})]})})),vo=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],No=(e,t)=>e?.find((e=>e.volume===t)),yo=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,wo=p((({title:e,footnote:t,className:l="",...n})=>{const[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),[c,d]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=ie(),p=Co(c.selectedRegion,m),x=Ye(p),g=r((e=>d((t=>({...t,...e})))),[d]),b=(f=bo(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 u(V,{className:l,...n,children:[u("div",{className:"px-8 py-12",children:[e?h(_,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,h(fo,{regions:m,branches:x,data:{...c,selectedRegion:p},onClick:o,onChange:g}),t?h("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&i?h(Qi,{points:b,className:"h-[640px]"}):null]})})),Co=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,ko=e=>Boolean(e?.icon||e?.src),So=({styleMap:e,isMainButton:t,version:l})=>(a,n,{length:r})=>{const{label:i,description:s,button:o,items:c,isDotted:d}=a,m=i&&(s||c)?"mt-2":"";return u("div",{className:`relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${Bo(r)}`,children:[u("div",{className:(o?.text?"mb-8":"")+" text-center",children:[$o(i),u("div",{className:`${m} flex flex-col items-center`,children:[Io({description:s,className:e.description}),h($a,{className:To({className:"text-left",description:s,styleMap:e}),items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?h(Ie,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(n))},$o=e=>e?h("div",{className:"text-h6",children:e}):null,Io=({description:e,className:t=""})=>e?h("div",{className:t,children:e}):null,To=({className:e,description:t,styleMap:l})=>[t?l.description:"text-h6",t?"mt-0.5":"",e].join(" "),Bo=e=>e<5?"w-[276px]":"w-[210px]",Ro={primary:{description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},gray:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},transparent:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},"":{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},Vo=p((({className:e="",showLines:t=!0,steps:l=[],button:a,version:n="primary",...r})=>{const{title:i}=r,s=Ro[n],o=l.length>3,c=(e=>e?"":"opacity-0")(t),d=i?"mt-9":"",m=(e=>e<5?"px-[88px]":"px-[55px]")(l.length);return u(V,{className:["box-border py-12",o?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",e].join(" "),version:n,...r,children:[i?h(_,{headingType:"h3",className:"max-w-[752px] text-center",title:i}):null,l?.length?u("div",{className:`box-border ${d}`,children:[h("div",{className:`flex items-center ${m}`,children:yi(h("div",{className:`h-0.5 w-full bg-secondary-light ${c}`}))(l.map(jo(s,n)))}),h("div",{className:"flex justify-between mt-4 "+(o?"gap-x-3":"gap-x-[101px]"),children:l.map(So({styleMap:s,isMainButton:Boolean(a?.text),version:n}))})]}):null,a?.text?h(Ie,{className:"mt-8 min-w-60",version:"primary",...a}):null]})})),jo=(e,t)=>({icon:l},a)=>h("div",{className:"flex flex-col items-center text-center",children:h("div",{className:`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center ${e.iconBackground}`,children:ko(l)?h(Y,{image:_a(l||{},t),width:"48",height:"48",asSVG:!0}):h("span",{className:`text-h4 ${e.iconText}`,children:a+1})})},String(a)),_o={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Lo={"horizontal-list":"w-6","vertical-list":"h-6"},Mo=p((({containerRef:e,activeIndex:t,dotCount:l=0,listType:a="horizontal-list"})=>l?h("div",{className:`flex gap-2 ${_o[a]}`,children:new Array(l).fill(null).map(((l,n)=>h("div",{className:`cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white group-data-transparent:bg-white ${n===t?Lo[a]:"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"})})(n)},String(n))))}):null)),Ao=p((({className:e="",gap:t=14,padding:l=16,showDots:a=!0,children:n,onVisibleIndicesChange:r,listType:i="horizontal-list"})=>{const s=Array.isArray(n)?n.length:0,[o,c]=Kl({itemCount:s,onVisibleIndicesChange:r}),[d]=c.visibleIndicesRange;return u("div",{className:g(e,"vertical-list"===i?"relative h-full":""),children:[h(Fl,{containerRef:o,activeIndex:d,visibleItemCount:1,gap:t,padding:l,onVisibleIndicesChange:c.handleVisibleIndicesChange,listType:i,children:n}),a?h(Mo,{containerRef:o,activeIndex:d,dotCount:s,listType:i}):null]})})),Do=p((({listType:e,showDots:t,options:l,...a})=>h(V,{...a,children:h(Ao,{listType:e,showDots:t,children:w({...a,options:l})})})));Do.childrenTypes={exclude:["SwipeListControlBlock"]};const zo="h-12 flex-1 flex items-center justify-center cursor-pointer",Oo="font-sans text-m text-center",Po="text-white",Eo="text-secondary-text group-hover/btn:text-primary-main",Fo="text-primary-main",Uo={div:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${zo} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${zo} group/btn bg-white`},default:{active:`${zo} bg-primary-main text-white whitespace-nowrap`,default:`${zo} group/btn bg-white whitespace-nowrap`}},text:{scrollable:{active:"h-full border-0 border-b-2",default:""},default:{active:"",default:""}}},Ho={link:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${zo} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${zo} group/btn bg-white`},default:{active:`${zo} bg-primary-main text-white`,default:`${zo} group/btn bg-white`}},text:{scrollable:{active:`${Oo} flex items-center h-full border-0 border-b-2 text-primary-main`,default:`${Oo} ${Eo}`},default:{active:`${Oo} text-white`,default:`${Oo} ${Eo}`}}},Xo=(e,t,l)=>{const a=t?"active":"default";return Uo[e][l?"scrollable":"default"][a]},Go=(e,t,l)=>{const a=t?"active":"default";return Ho[e][l?"scrollable":"default"][a]},Wo=p((e=>{const{tab:t,currentTab:l,isScrollable:a=!1}=e,n="link"===l?.type&&l.href===t.href,r=ge()(t);return h("a",{role:"tab",className:Go("link",n,a),target:t.target,href:r.href,onClick:r.onClick,children:h("span",{className:Go("text",n,a),children:t.text})})})),Jo=(e,t,l)=>e?h("h3",{className:l?`${Oo} ${t?Fo:Eo}`:`${Oo} ${t?Po:Eo}`,children:e}):null,Yo=(e,t,l)=>e&&t?h("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,Ko=({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=r.type;if("group"!==s&&"link"!==s)return null;switch(s){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=t===r,o=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return h("div",{className:Xo("div",s,n),role:"tab","aria-selected":s,onClick:()=>a(r),children:u("div",{className:`flex flex-1 items-center justify-center ${Xo("text",s,n)}`,children:[Jo(r.title,s,n),Yo(l,o,s)]})},`group-${String(i)}`)})({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n})(r,i);case"link":return h(Wo,{tab:r,currentTab:t,isScrollable:n},String(i));default:Cs(s)}return null},qo=p((e=>{const{tabs:t,onClick:l,currentTab:a,page:n,showCounter:r}=e,[i,s]=Kl({itemCount:t?.length||0,isCyclic:!1});return u("div",{className:"relative max-w-full m-auto",children:[h("div",{className:"font-sans max-w-full w-full overflow-hidden relative bg-white",children:h(Fl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,children:t?.map(Ko({onClick:l,currentTab:a,showCounter:r,page:n,isScrollable:!0}))})}),s.canScrollLeft?h(Jt,{className:"absolute z-50 top-0 left-6",onClick:s.scrollLeft}):null,s.canScrollRight?h(Yt,{className:"absolute z-50 top-0 rotate-180 right-6",onClick:s.scrollRight}):null]})})),Zo=p((e=>{const{className:t="",tabs:l,showCounter:i,isSticky:s,tabsMode:o,...c}=e,[d,m]=a(l?l[0]:void 0);n((()=>k.inst.subscribe("tab",(e=>{const t=l?.find(Qo(e));return"link"===e.type&&t&&m(t),[]}))),[l]),n((()=>"group"===d?.type?k.inst.subject("tab",{type:d.type,label:d.ref}):void 0),[d]);const u=r((e=>{"group"===e?.type&&k.inst.fire("tab",{type:e.type,label:e.ref}),m(e)}),[]);return h(V,{className:`relative box-border flex gap-x-1 w-full ${s?"sticky top-1 z-20 ":""} ${t}`,role:"tablist",...c,children:"scrollable"===o?h(qo,{tabs:l,onClick:u,currentTab:d,showCounter:i,...c}):l?.map(Ko({onClick:u,currentTab:d,showCounter:i,...c}))})})),Qo=e=>t=>"link"===t.type&&t.href===`#${e.label}`,ec=p((({isOpen:e,onClick:t})=>u(Ie,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[h("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),h(P,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),tc={Buttons:({buttons:e})=>Bt(e,{buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?h(Y,{image:e}):null,List:({isDotted:e,...t})=>h($a,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>u("div",{children:[e?h("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?h("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:p((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:a,isOpen:n})=>e?h(ec,{isOpen:n,onClick:()=>{t({dataUrl:l,pdfUrl:a})}}):null))},lc=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=a(!0);n((()=>{t===i&&r||m(!0)}),[r,i]);return u("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?h("div",{className:"h-5"}):null,ac({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})]},String(c))},ac=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...a}=e;if(!l||!(l in tc))return null;return h(tc[l],{...t,...a})},nc=p((({cells:e,rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>h("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(lc({rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})):null}))),rc=p((({rows:e})=>{const t=e?.[0]?.length??0,[l,a]=Gt({itemCount:t,visibleItemCount:5});return u("div",{children:[e?.map(ic(l)),Kt({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),ic=e=>(t,l)=>{if(!t?.length)return null;const[a,...n]=t,r=[...Array(e).keys()].reduce(((e,t)=>140*(n?.[t]?.cols?.length??1)+e),0),i=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return u("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[a?.data?h("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:a.data}):null,h("div",{className:"flex flex-grow overflow-hidden",children:h("div",{className:i,style:{transform:`translateX(-${r}px)`},children:n?.map(((t,l)=>u("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?h("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?sc(t.cols,e):null]},`row${l}`)))})})]},String(l))},sc=(e,t)=>e?.length>0?h("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>h("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,oc=p((({activeTabIndex:e,items:t})=>{const[l,n]=a({}),i=r((e=>n((t=>({...t,[e]:!t[e]})))),[]);return h("div",{children:t.map(((t,a)=>{const n=`activeTabIdx:${e}-tableIdx:${a}`;return u("div",{className:"w-full",children:[u("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>i(n),children:[t.title,h(Y,{image:{icon:l[n]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),h("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[n]?"h-0":""),children:h("div",{className:"relative",children:h(rc,{rows:t.rowsData})})})]},n)}))})})),cc=p((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:a})=>u("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?h("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>h("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>a(t),children:e||t+1},e)))}):null,t?h(Ie,{href:t,version:"secondary",target:"_blank",appendLeft:h(P,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function dc(e){const t=await fetch(e);return await t.json()}const mc=p((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:n}=function(e){const{data:t}=le(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),dc);return t||{}}(e),[i,s]=a(0),o=r((e=>s(e)),[]),c=n?.[i]?.items??[],d=n?.map((e=>e.currency??""));return u("div",n?{className:"bg-white z-10",children:[h(cc,{currencies:d,activeTabIndex:i,setActiveTabIndex:o,linkToPDF:t}),h(oc,{activeTabIndex:i,items:c}),h(ec,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[h("p",{children:"Данных нет"}),h(ec,{onClick:l,isOpen:!0})]})})),hc=p((({children:e,tableInner:t,onHideContentClick:l})=>u("div",{className:"self-start flex flex-col",role:"row",children:[h("div",{className:"flex",children:e}),t?h("div",{className:"origin-top animate-expansion",children:h(mc,{...t,onClick:l})}):null]}))),uc=p((({row:{header:e,data:t},activeIndex:l,rowIdx:n,...i})=>{const[s,o]=a(void 0),c=r((e=>o(e)),[]),[d,m]=a(void 0),p=r((e=>m(e)),[]);return u(hc,{onHideContentClick:()=>o(void 0),tableInner:s,...i,children:[h("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:u("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?h(Y,{className:"mr-3.5 max-w-6 max-h-6",image:_a(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?h("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?h(nn,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>h(nc,{cells:e,rowIdx:n,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:p,...i},String(t))))}):null]})})),pc=p((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:n,hiddenRowsNum:r=0,...i})=>{const s=n?.map((({data:e})=>e))||[],o=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Gt({itemCount:c,visibleItemCount:2}),p=(o||[]).map(((e,t)=>h(uc,{row:e,activeIndex:d,rowIdx:t,...i},String(t)))),[x,g]=r>0?[p.slice(0,-r),p.slice(-r)]:[p,[]];return u(V,{className:`p-12 overflow-hidden relative ${c>1?"pr-0":""} ${e}`,...i,children:[xc({title:t,description:l}),gc(l),r>0?h(D,{renderFoldableSection:({isUnfolded:e})=>u(bc,{controls:m,children:[x,h(z,{isUnfolded:e,children:g})]}),renderFoldButton:gs}):h(bc,{controls:m,children:p})]})}));function xc({title:e,description:t}){return e?h(_,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function gc(e){return e?h("div",{className:"mb-9 text-center text-l",children:e}):null}const bc=p((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return u("div",{role:"table",children:[u("div",{className:"relative",children:[e,Kt({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?h("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),fc={primary:"bg-white",secondary:"bg-primary-main","secondary-light":"bg-primary-main/10"},vc=p((({className:e="",title:t,description:l,blockVersion:a="primary",iconVersion:n,image:r,...i})=>{const s="secondary"===a;return u(V,{className:`px-9 py-4 flex gap-3 ${fc[a]} ${e}`,...i,children:["small"===n?h("div",{className:"mt-1",children:Nc(s)}):null,"big"===n?yc(r):null,u("div",{children:[t?wc(t,s):null,l?h("div",{className:"mt-1",children:Cc(l,s)}):null]})]})})),Nc=e=>h("div",{className:"rounded-full h-4 w-4 text-center text-xs-light "+(e?"bg-white text-primary-main":"bg-primary-main text-white"),children:"i"}),yc=e=>e?.src?h(Y,{image:e}):null,wc=(e,t)=>h(K,{size:"text-l",font:"font-medium",color:t?"text-white":"text-primary-text",children:e}),Cc=(e,t)=>h(L,{size:"text-s",color:t?"text-white":"text-secondary-text",children:e}),kc=p((e=>{const{tags:t,className:l=""}=e;return t?.length?h("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Sc)}):null})),Sc=(e,t)=>h("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),$c=p((({title:e,headingType:t="h3",description:l,items:a,buttons:n,image:r,isDotted:i=!0,listItemSize:s="M",className:o="",tags:c,children:d,...m})=>h(V,{className:`overflow-hidden p-9 pr-3 box-border ${Bs(o)} ${zi(o)} ${o}`,...m,children:u(pa,{title:e?h(_,{headingType:t,as:"h2",title:e,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:Bt(n,{className:"mt-8",buttonClassName:"min-w-[158px]"}),image:r?.src?h(Y,{className:"mt-auto ml-7",image:r}):null,children:[l?h("div",{className:"max-w-[600px] mt-2.5",children:h(L,{size:"text-xl-light",children:l})}):null,d,h($a,{className:"mt-2.5",itemClassName:"mb-1.5",items:a,isDotted:i,listItemSize:s}),c?.length?h(kc,{tags:c,className:"mt-5"}):null]})}))),Ic={left:"items-start",center:"items-center",right:"items-end"},Tc=p((({className:e="",gap:t="",align:l,isPadding:a=!1,isInnerPadding:n=!0,version:r="transparent",options:i,...s})=>{const o=n?"":"!p-0";return h(V,{className:g("flex flex-col [&>*]:max-w-full",a?"p-12":"",hi[t],l&&Ic[l],e),version:r,...s,children:w({...s,options:{...i,className:o}})})}));Tc.childrenTypes=[];const Bc=e=>Di(e)<10?"py-6 px-11":"py-12 px-32",Rc=p((({className:e,title:t,src:l,previewImg:a,...n})=>u(V,{className:g(Bc(e),e),...n,children:[h(Lt,{title:t,headlineVersion:"M"}),l?h("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:a?.src,style:{maxHeight:524},controls:!0,children:h("source",{src:l})}):null]}))),Vc={Accordion:A,AccordionItem:Z,ApplicationForm:Ct,BenefitsBlock:kt,Bonus:Mt,BonusBenefitsBlock:Ot,BusinessBlock:Ht,ButtonBlock:Xt,Calculator:Vl,CardTransfer:zl,Carousel:ta,CarouselBankHistoryCard:na,CarouselCard:da,CarouselCatalogCard:ha,CarouselInvestmentCard:ga,CarouselLinks:Na,CarouselProductCard:Ia,CarouselProgramsCard:La,CarouselRecommendationCard:Pa,CarouselTariffsCard:Ea,Catalog:qa,ComparisonTable:gn,ContactsBlock:fn,ErrorBlock:wn,ExchangeRateTile:Hn,Footer:pr,Gallery:$r,GracePeriod:Ir,Header:mi,Headline:Lt,HorizontalLayout:ui,ImgBlock:pi,InsuranceAmountBlock:vi,InvestmentInfo:ki,LinkDocs:Mi,MiniGallery:Ai,MobileAppTile:Oi,OfficeMap:ms,OfficeServicesBlock:hs,OtherProducts:ps,OtherProductsItem:fs,ParagraphBlock:vs,PictureText:Ss,Placeholder:Rs,ProductBlock:Ps,ProductGallery:Es,ProductTile:Xs,PromoTile:Ws,Recommendation:qs,RichTextBlock:Zs,RollupItem:Qs,SafeDepositRental:wo,StepsBlock:Vo,SwipeListControlBlock:Do,Tabs:Zo,TariffsTable:pc,TextBlock:vc,Tile:$c,VerticalLayout:Tc,Video:Rc},jc=["Header","Footer"],_c=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Lc(e=B.inst,t=globalThis){const l=s(new Map);n((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{l.current&&l.current.set(e,t)}))),[e]),n((()=>{const a=((e,t=600)=>{let l;const a=(...n)=>{a.dispose(),l=setTimeout((()=>{e(...n)}),t)};return a.dispose=()=>{l&&clearTimeout(l)},a})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!jc.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Wl(_c)(t):[];return l}([...l.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",a),()=>{a.dispose(),t.removeEventListener("scroll",a)}}),[e,t])}const Mc=m();const Ac=p((({className:e,onClick:t,ariaLabel:l})=>h("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Dc()}))),Dc=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return u("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h("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"}),h("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"})]})},zc=p((({className:e=""})=>{const t=function(e){const[t,l]=a(0);return n((()=>{(async()=>{const[t]=await Mc.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:r((async()=>{l(await Mc.like(e))}),[e]),dislike:r((async()=>{l(await Mc.dislike(e))}),[e])}}(xe().pathname);return u("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:[h(Ac,{onClick:pe(t.like),ariaLabel:"Поставить отметку «лайк»"}),h(Ac,{onClick:pe(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),h("span",{className:"select-none",children:t.likeCount})]})})),Oc=p((e=>{const{className:t="",blocksRegistry:l,blockDecorator:a,data:n={}}=e,{style:r,blocks:i,slots:s,likeControl:o,colorPalette:c="pc"}=n,d={key:"",page:n,blocksRegistry:l,blockDecorator:a,parent:n};return Lc(),u("section",{className:g("relative",r,t),"data-theme":c,children:[s?.header?h("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,u("div",{className:"container grid grid-cols-12 gap-1",children:[y(i,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?h("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:h(zc,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));Oc.childrenTypes=[],Oc.slots=()=>["header","footer"];e.Blocks=Vc,e.ContentPage=Oc,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=m,e.handlerDecorator=pe,e.joinList=yi,e.packageVersion="0.8.7",e.projectSettings=c,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=ue,e.useRouter=xe,Object.defineProperty(e,"__esModule",{value:!0})}));
|