@redneckz/wildless-cms-uni-blocks 0.6.43 → 0.6.44

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.
Files changed (142) hide show
  1. package/bundle/ProjectSettings.d.ts +2 -0
  2. package/bundle/bundle.umd.js +39 -22
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/services/BlockRouter/BlockRouter.d.ts +1 -1
  5. package/bundle/services/sitemap/checkIsHrefSameOrigin.d.ts +2 -4
  6. package/bundle/utils/normalizeURLPath.d.ts +1 -0
  7. package/bundle/utils/url.d.ts +1 -0
  8. package/dist/ProjectSettings.d.ts +2 -0
  9. package/dist/ProjectSettings.js +5 -0
  10. package/dist/ProjectSettings.js.map +1 -1
  11. package/dist/api/LikeAPI.js +2 -2
  12. package/dist/api/LikeAPI.js.map +1 -1
  13. package/dist/components/Header/Header.js +1 -6
  14. package/dist/components/Header/Header.js.map +1 -1
  15. package/dist/hooks/useLink.js +3 -5
  16. package/dist/hooks/useLink.js.map +1 -1
  17. package/dist/hooks/useLocation.js +11 -5
  18. package/dist/hooks/useLocation.js.map +1 -1
  19. package/dist/services/BlockRouter/BlockRouter.d.ts +1 -1
  20. package/dist/services/BlockRouter/BlockRouter.js.map +1 -1
  21. package/dist/services/sitemap/checkIsHrefSameOrigin.d.ts +2 -4
  22. package/dist/services/sitemap/checkIsHrefSameOrigin.js +1 -1
  23. package/dist/services/sitemap/checkIsHrefSameOrigin.js.map +1 -1
  24. package/dist/services/sitemap/isHrefActive.js +2 -3
  25. package/dist/services/sitemap/isHrefActive.js.map +1 -1
  26. package/dist/setup-fixture.js +3 -3
  27. package/dist/setup-fixture.js.map +1 -1
  28. package/dist/utils/normalizeURLPath.d.ts +1 -0
  29. package/dist/utils/normalizeURLPath.js +12 -0
  30. package/dist/utils/normalizeURLPath.js.map +1 -0
  31. package/dist/utils/url.d.ts +1 -0
  32. package/dist/utils/url.js +9 -1
  33. package/dist/utils/url.js.map +1 -1
  34. package/dist/wlc.json +3 -1
  35. package/lib/ProjectSettings.d.ts +2 -0
  36. package/lib/ProjectSettings.js +5 -0
  37. package/lib/ProjectSettings.js.map +1 -1
  38. package/lib/api/LikeAPI.js +2 -2
  39. package/lib/api/LikeAPI.js.map +1 -1
  40. package/lib/components/Header/Header.js +1 -6
  41. package/lib/components/Header/Header.js.map +1 -1
  42. package/lib/hooks/useLink.js +3 -5
  43. package/lib/hooks/useLink.js.map +1 -1
  44. package/lib/hooks/useLocation.js +11 -5
  45. package/lib/hooks/useLocation.js.map +1 -1
  46. package/lib/services/BlockRouter/BlockRouter.d.ts +1 -1
  47. package/lib/services/BlockRouter/BlockRouter.js.map +1 -1
  48. package/lib/services/sitemap/checkIsHrefSameOrigin.d.ts +2 -4
  49. package/lib/services/sitemap/checkIsHrefSameOrigin.js +1 -1
  50. package/lib/services/sitemap/checkIsHrefSameOrigin.js.map +1 -1
  51. package/lib/services/sitemap/isHrefActive.js +3 -4
  52. package/lib/services/sitemap/isHrefActive.js.map +1 -1
  53. package/lib/setup-fixture.js +3 -3
  54. package/lib/setup-fixture.js.map +1 -1
  55. package/lib/utils/normalizeURLPath.d.ts +1 -0
  56. package/lib/utils/normalizeURLPath.js +9 -0
  57. package/lib/utils/normalizeURLPath.js.map +1 -0
  58. package/lib/utils/url.d.ts +1 -0
  59. package/lib/utils/url.js +7 -0
  60. package/lib/utils/url.js.map +1 -1
  61. package/lib/wlc.json +3 -1
  62. package/mobile/bundle/ProjectSettings.d.ts +2 -0
  63. package/mobile/bundle/bundle.umd.js +38 -16
  64. package/mobile/bundle/bundle.umd.min.js +1 -1
  65. package/mobile/bundle/services/BlockRouter/BlockRouter.d.ts +1 -1
  66. package/mobile/bundle/services/sitemap/checkIsHrefSameOrigin.d.ts +2 -4
  67. package/mobile/bundle/utils/normalizeURLPath.d.ts +1 -0
  68. package/mobile/bundle/utils/url.d.ts +1 -0
  69. package/mobile/dist/ProjectSettings.d.ts +2 -0
  70. package/mobile/dist/ProjectSettings.js +5 -0
  71. package/mobile/dist/ProjectSettings.js.map +1 -1
  72. package/mobile/dist/api/LikeAPI.js +2 -2
  73. package/mobile/dist/api/LikeAPI.js.map +1 -1
  74. package/mobile/dist/hooks/useLink.js +3 -5
  75. package/mobile/dist/hooks/useLink.js.map +1 -1
  76. package/mobile/dist/hooks/useLocation.js +11 -5
  77. package/mobile/dist/hooks/useLocation.js.map +1 -1
  78. package/mobile/dist/services/BlockRouter/BlockRouter.d.ts +1 -1
  79. package/mobile/dist/services/BlockRouter/BlockRouter.js.map +1 -1
  80. package/mobile/dist/services/sitemap/checkIsHrefSameOrigin.d.ts +2 -4
  81. package/mobile/dist/services/sitemap/checkIsHrefSameOrigin.js +1 -1
  82. package/mobile/dist/services/sitemap/checkIsHrefSameOrigin.js.map +1 -1
  83. package/mobile/dist/services/sitemap/isHrefActive.js +2 -3
  84. package/mobile/dist/services/sitemap/isHrefActive.js.map +1 -1
  85. package/mobile/dist/setup-fixture.js +3 -3
  86. package/mobile/dist/setup-fixture.js.map +1 -1
  87. package/mobile/dist/utils/normalizeURLPath.d.ts +1 -0
  88. package/mobile/dist/utils/normalizeURLPath.js +12 -0
  89. package/mobile/dist/utils/normalizeURLPath.js.map +1 -0
  90. package/mobile/dist/utils/url.d.ts +1 -0
  91. package/mobile/dist/utils/url.js +9 -1
  92. package/mobile/dist/utils/url.js.map +1 -1
  93. package/mobile/dist/wlc.json +3 -1
  94. package/mobile/lib/ProjectSettings.d.ts +2 -0
  95. package/mobile/lib/ProjectSettings.js +5 -0
  96. package/mobile/lib/ProjectSettings.js.map +1 -1
  97. package/mobile/lib/api/LikeAPI.js +2 -2
  98. package/mobile/lib/api/LikeAPI.js.map +1 -1
  99. package/mobile/lib/hooks/useLink.js +3 -5
  100. package/mobile/lib/hooks/useLink.js.map +1 -1
  101. package/mobile/lib/hooks/useLocation.js +11 -5
  102. package/mobile/lib/hooks/useLocation.js.map +1 -1
  103. package/mobile/lib/services/BlockRouter/BlockRouter.d.ts +1 -1
  104. package/mobile/lib/services/BlockRouter/BlockRouter.js.map +1 -1
  105. package/mobile/lib/services/sitemap/checkIsHrefSameOrigin.d.ts +2 -4
  106. package/mobile/lib/services/sitemap/checkIsHrefSameOrigin.js +1 -1
  107. package/mobile/lib/services/sitemap/checkIsHrefSameOrigin.js.map +1 -1
  108. package/mobile/lib/services/sitemap/isHrefActive.js +3 -4
  109. package/mobile/lib/services/sitemap/isHrefActive.js.map +1 -1
  110. package/mobile/lib/setup-fixture.js +3 -3
  111. package/mobile/lib/setup-fixture.js.map +1 -1
  112. package/mobile/lib/utils/normalizeURLPath.d.ts +1 -0
  113. package/mobile/lib/utils/normalizeURLPath.js +9 -0
  114. package/mobile/lib/utils/normalizeURLPath.js.map +1 -0
  115. package/mobile/lib/utils/url.d.ts +1 -0
  116. package/mobile/lib/utils/url.js +7 -0
  117. package/mobile/lib/utils/url.js.map +1 -1
  118. package/mobile/lib/wlc.json +3 -1
  119. package/mobile/src/ProjectSettings.ts +6 -0
  120. package/mobile/src/api/LikeAPI.ts +2 -2
  121. package/mobile/src/hooks/useLink.ts +6 -7
  122. package/mobile/src/hooks/useLocation.ts +12 -6
  123. package/mobile/src/services/BlockRouter/BlockRouter.ts +1 -1
  124. package/mobile/src/services/sitemap/checkIsHrefSameOrigin.ts +5 -4
  125. package/mobile/src/services/sitemap/isHrefActive.ts +7 -4
  126. package/mobile/src/setup-fixture.ts +3 -3
  127. package/mobile/src/utils/normalizeURLPath.ts +10 -0
  128. package/mobile/src/utils/url.ts +10 -0
  129. package/mobile/src/wlc.json +3 -1
  130. package/package.json +1 -1
  131. package/src/ProjectSettings.ts +6 -0
  132. package/src/api/LikeAPI.ts +2 -2
  133. package/src/components/Header/Header.tsx +2 -10
  134. package/src/hooks/useLink.ts +6 -7
  135. package/src/hooks/useLocation.ts +12 -6
  136. package/src/services/BlockRouter/BlockRouter.ts +1 -1
  137. package/src/services/sitemap/checkIsHrefSameOrigin.ts +5 -4
  138. package/src/services/sitemap/isHrefActive.ts +7 -4
  139. package/src/setup-fixture.ts +3 -3
  140. package/src/utils/normalizeURLPath.ts +10 -0
  141. package/src/utils/url.ts +10 -0
  142. package/src/wlc.json +3 -1
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),r=l("useEffect"),a=l("useCallback"),i=l("useMemo"),s=l("useRef");const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}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 YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage.getItem(c)||"");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(c,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/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,l){const{children:n,...r}=t||{},a=l?.slots?.default,i=n||a&&a();return e(Object.assign(r,i&&{children:i}),l)}return t.inheritAttrs=!1,t};function x(e){return e?e.filter(Boolean).join(" "):""}const g=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),b=[],f=["col-span-12"];function v(e,t){const{key:l,blockDecorator:n=g,blocksRegistry:r={},ancestors:a=b,className:i=""}=t,{type:s}=e;s&&s in r||console.warn(`No block with "${s}" is registered`);const o=s&&r[s];return n({blockClassName:`scroll-mt-12 ${i} ${x(e.style||f)}`,block:e,ancestors:a,render:({block:n,blockClassName:r})=>{const{content:a}=n;return o?m(o,{className:r,block:e,options:t,...a},l):null}},l)}const N=[],y=(e,{key:t,ancestors:l=N,slotName:n=null,renderChild:r=v,...a})=>(e||[]).map(((e,i)=>r(e,{...a,key:`${t||e.type}-${i}`,ancestors:a.parent?[...l||N,[a.parent,n]]:l})));function w({children:e,block:t,options:l,renderChild:n}){return e||(t&&l?y(t.blocks,{...l,parent:t,renderChild:n}):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 $(e,{sensitivity:t,rootRef:l}={}){const n=s(null),a=i((()=>({threshold:S(t),root:l?.current})),[t,l?.current]);return r((()=>{if(!n.current)return;const t=new IntersectionObserver(e,a);return t.observe(n.current),()=>{t.disconnect()}}),[e,a]),n}function S(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("#","");class T{static inst=new T;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,"",`#${I(e)}`)}replace(e){globalThis.history?.replaceState(null,"",`#${I(e)}`)}reset(){globalThis.history?.replaceState(null,"","#")}}const B=u((({className:e,block:t,tag:l="section",role:i,children:s})=>{const o=l,c=function(e,t=T.inst){const l=$(a((l=>{if(!e||!l?.length)return;const n=l[l.length-1];t.eventBus.fire("intersection",{block:e,intersection:n})}),[e,t]),{sensitivity:1});return r((()=>{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}(t),[d,h]=n(!0);return r((()=>k.inst.subscribe("tab",(e=>{if("group"===e.type){const l=t?.labels?.length||t?.anchor;h(!e.label||(!l||Boolean(t?.labels?.includes(e.label))))}else h(!0)}))),[t]),d?m(o,{className:e,role:i,...t?.anchor?{id:t.anchor,ref:c}:{},children:s}):null})),R={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},j=u((e=>{const{className:t="",headingType:l="h3",title:n,as:r="h3"}=e;return m(r,{className:`font-sans m-0 ${R[l]} ${t}`,children:n})})),V=u((e=>{const{size:t="",color:l="",align:n="",font:r="",children:a}=e;return m("p",{className:`font-sans ${t} ${l} ${n} ${r}`,children:a})})),L=u((({children:e})=>m("ul",{className:"list-none m-0 p-0",children:e}))),M=u((({className:e="",title:t,accordionAlignTitle:l="center",description:n,...r})=>h(B,{className:`p-12 mb-1 last:mb-0 bg-white text-primary-text ${e}`,...r,children:[t?m(j,{headingType:"h3",as:"h2",className:`mb-2.5 ${C[l]}`,title:t}):null,n?m("div",{className:"mb-2.5",children:m(V,{size:"text-l",children:n})}):null,m(L,{children:w(r)})]})));M.childrenTypes=["AccordionItem"];const _=u((({isFoldButtonOnTop:e=!1,unfoldedByDefault:t=!1,renderFoldableSection:l,renderFoldButton:r})=>{const[i,s]=n(t),o=a((()=>{s((e=>!e))}),[]),c=l({isUnfolded:i,onToggle:o}),d=r?r({isUnfolded:i,onToggle:o}):null;return h("div",e?{children:[d,c]}:{children:[c,d]})})),D=u((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return r((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),m("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),A={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},O=u((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:r=n,iconVersion:a="color",asSVG:i,...s})=>{const c=`${o.CDN||""}icons/${l}.svg`;return i&&"normal"!==a?m(F,{className:e,children:h("svg",{className:[E(e,s.width),A[a],t,z(a)].join(" "),...s,"aria-hidden":"true",children:[r?m("title",{children:r}):null,n?m("desc",{children:n}):null,m("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):m("img",{className:e,src:c,alt:n,title:r,...s,"aria-hidden":"true"})})),z=e=>"white"===e?"invert":"",E=(e,t)=>t?`width: ${t}px `:"w-full h-full",F=u((({className:e,children:t})=>e?m("div",{className:e,children:t}):t));function P(e){return"string"==typeof e?"normal":e?.iconVersion||"normal"}const U=(e,t)=>e.media&&t.media?e.media-t.media:0,H=u((({className:e="",image:t,imageClassName:l="",isMobile:n=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${n?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(U).map((({src:e,format:l,media:n},r)=>m("source",{srcSet:e,type:G(l),media:n?`(max-width: ${n}px)`:"",...t.size},`${r}_${e}`))):null,X(t,l,n)]})})),X=(e,t="",l=!1)=>{const n={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",a=e.alt||e.title,i=l?"m-auto":"m-0";return m("img",{src:e.src,className:`${i} ${t}`,alt:a,title:r,style:n,...e.size})};function G(e){return e?`image/${String(e)}`:void 0}const W=u((({className:e="",image:t,imageClassName:l="",isMobile:n,...r})=>{if(!t)return null;const a="string"==typeof t?t:t.icon;return a||""===a?a.length?m(O,{className:e,imageClassName:l,iconVersion:P(t),name:a,...r}):null:m(H,{className:e,imageClassName:l,image:t,isMobile:n})})),J=u((({size:e,color:t,align:l,font:n,children:r})=>m("span",{className:["font-sans",e,t,l,n].filter(Boolean).join(" "),children:r}))),Y=["PlusIcon","MinusIcon"],Z=u((({className:e="",label:t="",isExpanded:l,...n})=>m("li",{className:`border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,children:m(_,{isFoldButtonOnTop:!0,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m(D,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:w(n)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(K,{label:t,icon:Y[Number(e)],onClick:l})})})));Z.childrenTypes=[];const K=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m(J,{size:"text-xl",font:"font-medium",children:e}),m(W,{image:t,className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0})]}))),q={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Q={primary:"text-secondary-text",secondary:"text-white"},ee=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),te={primary:"",secondary:"text-white"},le={primary:"text-secondary-text",secondary:"text-white opacity-80"},ne={primary:"bg-main-divider text-primary-main",secondary:"bg-white/30 text-black"},re=u((({className:e="",title:t,benefitList:l,version:n="primary",...r})=>h(B,{className:`font-sans text-primary-text p-12 flex flex-col items-center ${e} ${q[n]}`,...r,children:[t?m(j,{headingType:"h3",as:"h2",className:`max-w-[47rem] text-center ${te[n]}`,title:t}):null,l?.length?m("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(ae(n))}):null]}))),ae=e=>(t,l)=>{const n=t.description;return h("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[t?.icon?.icon?m(W,{className:`w-12 h-12 min-w-12 p-3 rounded-full ${ne[e]}`,image:ee(t.icon,e),asSVG:!0}):null,t?.icon?.src?m(W,{image:t.icon}):null,h("div",{className:"ml-5",children:[t?.label?m("h3",{className:`text-h6 m-0 ${te[e]}`,children:t.label}):null,ie(n,e)]})]},String(l))},ie=(e,t)=>{const l=e?.benefitType||null;return e&&l?m("div",{className:`text-l-light mt-2 ${le[t]}`,children:"list"===l?oe(e):se(e)}):null},se=e=>e?.name||null,oe=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?m("ul",{className:t,children:e.items.map(((e,t)=>m("li",{children:e},`benefitListItem-${t}`)))}):null};const ce=e=>e?.includes("//"),de=e=>(e||"").replace(/\/?\?.*/,""),me=e=>{if(!e||!ce(e))return;const t=e,l=t.indexOf("//"),n=t.indexOf("/",l+"//".length);return-1!==n?t.substring(0,n):t},he=e=>e?.startsWith("#");var ue=Object.freeze({__proto__:null,isURL:ce,withoutQuery:de,getOrigin:me,getHash:e=>{if(!e||!ce(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:he});const pe=(e,t)=>pe._impl(e,t);function xe(){return xe._impl()}function ge(){const e=xe(),t=T.inst;return l=>{const n=((e,t)=>{if(!e)return e;const l=me(t?.href);return l?e.replace(l,"")||"/":e})(l.href,e);return{...l,href:n,"aria-label":l.text,onClick:pe((r=>{l.onClick&&l.onClick(r);const a=n&&!ce(n),i=!l.target||"_self"===l.target;a&&i&&(r?.preventDefault(),he(n)?t.goto(n):e.push(n))}),l)}}}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:""},fe="bg-main-divider text-main-disabled",ve={primary:fe,secondary:fe,white:fe,link:""},Ne="text-center font-sans select-none",ye={primary:"group-hover:brightness-0 group-hover:invert",secondary:"group-hover:brightness-0 group-hover:invert",white:"group-hover:brightness-0 group-hover:invert",link:""},we=u((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:r,version:a="primary"}=e;return h("div",{className:Ce(e),children:[n?m("div",{className:ye[a],children:n}):null,ke(e)?h("div",{children:[l?m("div",{className:"text-xs-light text-left",children:l}):null,m("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?m("div",{className:ye[a],children:r}):null]})})),Ce=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const r="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group flex items-center justify-center",ke(e)?r:"h-12 w-12",n?"rounded-full":""].join(" ")},ke=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),$e=({className:e,rounded:t,version:l})=>["inline-block",Ne,l?ve[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Se=({className:e,rounded:t,version:l})=>[Ne,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-focus focus:border",l?be[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Ie=u((({disabled:e,children:t,...l})=>{const n=ge()(l),r=t??m(we,{...n});return m(e?Be:Te,{...n,children:r})})),Te=u((({className:e="",href:t,rel:l,target:n,ariaLabel:r,version:a,rounded:i,onClick:s,children:o})=>m("a",{className:Se({className:e,version:a,rounded:i}),href:t,rel:l,target:n,"aria-label":r,role:t?"link":"button",onClick:s,children:o}))),Be=u((({className:e,ariaLabel:t,version:l,rounded:n,children:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:$e({className:e,rounded:n,version:l}),children:r}))),Re=u((({className:e="",buttons:t})=>t&&t?.length?m("div",{className:e,children:t.map(((e,t)=>je({button:e,index:t})))}):null));function je({button:e,buttonClassName:t,index:l}){const{icon:n,iconRight:r,version:a,text:i,...s}=e,o="secondary"===a?"color":"white",c=Ve({...n,iconVersion:o}),d=Ve({...r,iconVersion:o});return i?m(Ie,{className:t,appendLeft:c,appendRight:d,version:a,text:i,...s},l?String(l):""):null}const Ve=e=>{if(!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return m(W,{image:{...e},width:t,height:"24",asSVG:!0})},Le={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},Me={XXL:{descriptionFont:"text-h5",gap:"gap-[18px]",headingType:"h0",as:"h1"},XL:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h1",as:"h1"},L:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h2",as:"h2"},M:{descriptionFont:"text-xl-light",gap:"gap-3",headingType:"h3",as:"h3"},S:{descriptionFont:"text-xl-light",gap:"gap-2",headingType:"h4",as:"h4"},XS:{descriptionFont:"text-l-light",gap:"gap-2",headingType:"h5",as:"h5"}},_e={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"},De=u((({className:e="",bgColorHeadline:t="transparent",align:l="center",title:n,description:r,headlineVersion:a="XL",as:i,...s})=>{const o=Le[t],c=Me[a];return h(B,{className:`font-sans flex flex-col p-12 ${c.gap} ${o.background} ${e}`,...s,children:[n?m(j,{headingType:c?.headingType,as:i||c?.as,className:`whitespace-pre-wrap ${o.text} ${C[l]}`,title:n}):null,r?m("p",{className:`${c.descriptionFont} ${o.text} ${C[l]}`,children:r}):null]})})),Ae=u((e=>{const{className:t="",title:l,description:n,bonusItems:r,...a}=e;return m(B,{className:`font-sans bg-white p-12 pb-9 ${t}`,...a,children:h("div",{className:"container",children:[m(De,{className:"!p-0",title:l,description:n,headlineVersion:"M",align:"center",...a}),m("div",{className:"flex flex-wrap w-full mt-9",children:r?.length?r.map(((e,t)=>m("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:h("div",{className:"flex justify-between w-full",children:[h("div",{className:"flex flex-col justify-between mr-4",children:[h("div",{children:[m("div",{className:"text-h4",children:e.title}),m("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),e?.buttons?.length?m(Re,{buttons:e?.buttons}):null]}),e.bonusItemContent?.bonusType?Oe(e.bonusItemContent):null]})},String(t)))):null})]})})})),Oe=e=>m("div",{children:"count"===e.bonusType?ze(e):Ee(e)}),ze=e=>h("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?m("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?m("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),Ee=e=>e.image?m(W,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,Fe=u((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:r,title:a,...i})=>h(B,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...i,children:[m(De,{className:"!p-0 mb-8",title:a,description:r,headlineVersion:"M",align:"center",...i}),e?.length?m("div",{className:`grid gap-1 ${C[t]} ${Ue(n)}`,children:e.map(Pe)}):null]}))),Pe=({icon:e,label:t,description:l},n)=>h("div",{className:"flex flex-col items-center text-h6",children:[l?m("span",{children:l}):null,e?m(W,{image:e,height:"180",width:"auto",className:"h-[180px] w-auto"}):null,m("div",{children:t?m("span",{children:t}):null})]},String(n)),Ue=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},He=u((e=>{const{title:t,image:l,cardItems:n,button:r}=e;return h("div",{className:"border-color-stroke border p-9 w-1/2",children:[l?h("div",{className:"flex justify-center",children:[l?.src?m(W,{className:"mb-5",image:l}):null,l?.icon?m(W,{image:l,asSVG:!0}):null]}):null,t?m(j,{headingType:"h4",title:t,className:"mb-6"}):null,n?.length?m("ul",{children:n.map(((e,t)=>Xe(e,String(t))))}):null,r?.text?je({button:r,buttonClassName:"mt-6"}):null]})})),Xe=(e,t)=>{const{icon:l,text:n}=e;return h("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?m(W,{className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",image:l.icon,asSVG:!0}):null,l?.src?m(W,{image:l.icon}):null,m("span",{className:"text-xl-light",children:n})]},t)},Ge=u((({className:e="",title:t,cards:l,...n})=>h(B,{className:`font-sans bg-white p-12 pb-9 ${e}`,...n,children:[m(j,{headingType:"h3",title:t,className:"text-center mb-8"}),m("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>m(He,{...e},String(t)))):null})]}))),We=u((e=>{const{className:t,button:l,...n}=e;return m(B,{className:t,...n,children:l?je({button:l}):null})})),Je=e=>{const{itemCount:t,visibleItemCount:l,isCyclic:r}=e,[i,s]=n(0),o=a((()=>s((e=>r?(e+1)%t:Math.min(e+1,t-1)))),[r,t]),c=a((()=>s((e=>r?(t+e-1)%t:Math.max(e-1,0)))),[r,t]),d=r||function(e,{itemCount:t,visibleItemCount:l,container:n}){if(l)return t>l;if(n){return n.scrollWidth*e/t+n.clientWidth<n.scrollWidth}return!1}(i,e)&&i<t-(l||1),m=r||i>0;return[i,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};const Ye=u((({className:e,disabled:t,...l})=>m(Ie,{rounded:!0,className:`group 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:m(W,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"16",height:"16",asSVG:!0})}))),Ze=u((e=>m(Ye,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Ke=u((e=>m(Ye,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function qe({dec:e,inc:t,canDec:l,canInc:n,btnClass:r,className:a=""}){return l||n?h("div",{children:[l?m(Ye,{className:`absolute z-50 ${r[0]} ${a}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?m(Ye,{className:`absolute z-50 rotate-180 ${r[1]} ${a}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Qe=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),et=u((({title:e,value:t,postfix:l="",prefix:n,className:r=""})=>h("div",{className:`mb-7 ${r}`,children:[e?m("div",{className:"text-l-light text-secondary-text",children:e}):null,t?h("div",{className:"text-h3",children:[n," ",Qe(Math.round(t))," ",l]}):null]}))),tt=2e6,lt=97e4,nt=Math.round(23.5),rt={minSum:6e4,maxSum:tt,minMonths:13,maxMonths:60,rateBottomRange:12,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},at={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},it={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:120,rate:5.9,isMonthlyInterestPayment:!0},st=u((({rate:e,title:t="Ставка",unit:l,rateBlockClassName:n})=>h("div",{children:[m("div",{className:"text-l-light text-secondary-text",children:t}),h("div",{className:"flex justify-start",children:[m("span",{className:`block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${n}`,children:String(e).replace(".",",")}),l?m("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]})]})));function ot(e){return e?.length?m(Re,{buttons:e,className:"flex flex-col mt-7 gap-2"}):null}const ct=e=>e?m("p",{className:"text-s-light text-secondary-text mt-7",children:e}):null,dt=(e,t,l)=>Math.max(t,Math.min(e,l)),mt=e=>e.split(/\s+/).join(""),ht=u((({className:e,title:t,items:l=[],min:n=1,max:r=100,step:a=1,value:i=n,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(dt(Number(mt(e.target.value)),n,r))},d={backgroundSize:`${(100*(i-n)/(r-n)).toFixed(2)}% 100%`};return h("div",{className:e,children:[h("label",{className:"block relative",children:[t?m("span",{className:"text-m-light text-primary-text",children:t}):null,m("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus disabled:border-main-stroke disabled:bg-main-divider",value:Qe(i),disabled:s,onChange:c,onBlur:c}),m("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:m("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:n,max:r,step:a,value:i,disabled:s,onChange:c,style:d})})]}),ut(l)]})}));function ut(e){return m("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>m("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const pt=1e3;function xt(e,t,l){const{moneyValue:n,minSum:r,maxSum:a,step:i=pt,isShowItems:s=!0}=t,o=[`От ${Qe(r)} ₽`,`До ${Qe(a)} ₽`];return m(ht,{title:e,items:s?o:[],min:r,max:a,step:i,value:dt(n,r,a),onChange:l})}const gt=new Map;function bt(e,t,{fallback:l}={}){const a=i((()=>ft(e)),[e]),[s,o]=n(),[c,d]=n(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!a.every((e=>null===e)))try{const e=t(...a);"then"in e?(e=>{e.then((e=>gt.get(a)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...a]);const u=a[0],p=l&&"string"==typeof u&&l[u];return{data:s||c||!p?s:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function ft(e){return e?Array.isArray(e)?e:e instanceof Function?ft(e()):[e]:[e]}async function vt(e,t){try{return await Nt(e,t)}catch(e){console.error(e)}return null}async function Nt(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function yt(e){const{data:t}=bt(`/wcms-resources/${e}.json`,Nt);return t}const wt=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,r=yt(t||"bonus-calculator-data")||at,[a,i]=((e,t,l)=>{const{minSumTravel:n,minSumOther:r,maxBonus:a,prefMonthsNum:i,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===r)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),a);return[m,m*i+Math.min(Math.round(c*t)+Math.round(d*l),a)*(12-i)]})(r,l,n);return{...r,...e,monthBonus:a,yearBonus:i}},Ct=u((({className:e="",sourceBookDir:t="",buttons:l,footnote:r})=>{const[i,s]=n(6e3),o=a((e=>s(e)),[]),[c,d]=n(6e3),u=a((e=>d(e)),[]),p={travelExpenseValue:i,restExpenseValue:c},{minSumTravel:x,maxSumTravel:g,minSumOther:b,maxSumOther:f,monthBonus:v,yearBonus:N}=wt(p,t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[xt("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:g,moneyValue:i,step:500,isShowItems:!1},o),xt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:b,maxSum:f,moneyValue:c,step:500,isShowItems:!1},u)]}),m("div",{children:v>=0?m(st,{title:"Баллов за месяц",rate:v,rateBlockClassName:"tracking-[-14px]"}):null}),h("div",{className:"w-full max-w-[350px]",children:[N>=0?m(et,{title:"Баллов за год",value:N}):null,ot(l),ct(r)]})]})})),kt=u((({className:e,viewBox:t,fill:l="none",width:n,height:r,paths:a,...i})=>m("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:r,children:a.map((({d:e,fill:t,...l},n)=>m("path",{d:e,fill:t||"currentColor",...i,...l},n)))}))),$t=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],St=u((({className:e,text:t,checked:l,isRadio:n,onChange:r})=>m("div",{className:e,children:h("label",{className:"flex items-center relative cursor-pointer group",children:[m("input",{className:`peer appearance-none w-5 h-5 border-solid cursor-pointer group-hover:border-checkbox-hover\n ${n?"rounded-full border-2":"rounded checked:bg-primary-main border"}\n ${l?"border-black":"border-main-stroke"}\n checked:border-primary-main m-0`,type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l}),n?m("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):m(kt,{paths:$t,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?m("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),It=u((({items:e,checkedItem:t,onChange:l})=>m("div",{className:"flex flex-col gap-3",children:e?.map((({id:e,text:n})=>m(St,{isRadio:!0,text:n,checked:t===e,onChange:()=>l&&l(e)},String(e))))})));function Tt(e,t,l){const{minMonths:n,maxMonths:r,monthsValue:a}=t,i=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return m(ht,{className:"mt-7",title:e,items:[`От ${i(n)}`,`До ${i(r)}`],min:n,max:r,step:1,value:dt(a,n,r),onChange:l})}const Bt=(e,t)=>{const{isInsurance:l,isSalaryClient:n,isStateEmployee:r,moneyValue:a}=e,i=yt(t||"credit-calculator-data")?.rows?.find((e=>l===e.isInsurance&&n===e.isSalaryClient&&r===e.isStateEmployee))||rt,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=i,d=a<=c?s:o,m=((e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:r}=t;if(l){const t=e/1200;return n*(t+t/(Math.pow(1+t,r)-1))}return Math.round(n/r)+n*(e/1200)})(d,e);return{...i,...e,finalRate:d,monthlyPayment:m}},Rt="annuity",jt="differential",Vt=[{id:Rt,text:"Аннуитетный"},{id:jt,text:"Дифференцированный"}],Lt=u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[i,s]=n(!1),[o,c]=n(!0),[d,u]=n(!1),[p,x]=n(!1),[g,b]=n(lt),f=a((e=>b(e)),[]),[v,N]=n(nt),y=a((e=>N(e)),[]),w=Bt({isAnnuity:i,isInsurance:o,isSalaryClient:d,isStateEmployee:p,moneyValue:g,monthsValue:v},t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[xt("Сумма кредита, ₽",{...w,step:500},f),Tt("Срок кредита, месяцев",w,y),h("div",{className:"mt-7",children:[m(St,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:d,onChange:u}),m(St,{className:"mt-3",text:"Работаю в бюджетной организации",checked:p,onChange:x}),m(St,{className:"mt-3",text:"Комплексная страховая защита",checked:o,onChange:c})]})]}),m(st,{title:"Ставка",rate:w.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[m(et,{title:i?"Ежемесячный платеж":"Платёж в первый месяц",value:w.monthlyPayment,postfix:"₽"}),m(It,{items:Vt,checkedItem:i?Rt:jt,onChange:e=>s(e===Rt)}),ot(l),ct(r)]})]})})),Mt=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:r}=t;return l?Math.round(n*Math.pow((1200+e)/1200,r)-n):Math.round(n*e*30*r/365/100)},_t="everyMonth",Dt="atEndTerm",At=[{id:_t,text:"Ежемесячно"},{id:Dt,text:"В конце срока"}],Ot={CreditCalculatorForm:Lt,DepositCalculatorForm:u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[i,s]=n(lt),o=a((e=>s(e)),[]),[c,d]=n(nt),[u,p]=n(!1),x={moneyValue:i,monthsValue:c,isMonthlyInterestPayment:u},g=a((e=>d(e)),[]),b=((e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n}=e,r=yt(t||"deposit-calculator-data")?.rows.find((e=>l===e.isMonthlyInterestPayment))||it,{rate:a}=r,i=Mt(a,e),s=n+i;return{...r,...e,income:i,finalSum:s}})(x,t),{income:f,finalSum:v,rate:N}=b;return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[xt("Сумма вклада, ₽",{...b},o),Tt("Срок вклада, месяцев",{...b},g)]}),m(st,{rate:N||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[f?m(et,{title:"Доход по вкладу",value:f,postfix:"₽",prefix:"+"}):null,v?m(et,{title:"Сумма в конце срока",value:v,postfix:"₽"}):null,m(It,{items:At,checkedItem:u?_t:Dt,onChange:e=>p(e===_t)}),ot(l),ct(r)]})]})})),BonusCalculatorForm:Ct},zt=(e,t)=>{const l=e?.calcType;if(!l||!(l in Ot))return null;const n=Ot[l];return m("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:h("div",{className:"box-border p-9 w-full",children:[e?.title?m(j,{className:"text-center mb-6",title:e.title}):null,m(n,{...e,className:"flex justify-between"})]})},String(t))},Et=u((({className:e="",calculatorTabs:t=[],...l})=>{const r=t.map((e=>e.nav||{})),i=t.map((({calculatorBlock:e})=>e||{})),[s,o]=n(0),c=a((e=>o(e)),[]),[d,u]=Je({itemCount:t?.length,visibleItemCount:3});return h(B,{className:`box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${e}`,...l,children:[h("div",{className:"bg-white",children:[r.length>1?Ft({activeIndex:d,tabsNav:r,slideIndexShift:s,onClick:c}):null,qe({...u,btnClass:["left-3","right-3"],className:"top-8"})]}),m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(zt):null})]})}));function Ft({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:n}){return h("div",{children:[m("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:m("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const r=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",a=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 h("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${r}`,children:[m(W,{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}),h("div",{className:"border-0",children:[m("div",{className:`${a}`,children:e?.title}),m("div",{className:`${i}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})}),m("div",{className:"w-full h-2 bg-primary-main"})]})}const Pt=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Ut=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},Ht=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),Xt=u((({className:e="",inputClassName:t="",id:l,name:n,type:r="text",label:i,value:s="",valid:o=!0,children:c,onChange:d,onBlur:u,...p})=>{const x=a((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=a((e=>{if(!u)return;const t=e.target.validity.valid?e.target.value:s;u(t)}),[u]),b=c?"pr-8":"",f=o?"border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return h("div",{className:`relative ${e}`,children:[i?m("label",{className:"block text-m-light mb-2",children:i}):null,m("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:n||l,type:r,value:s,onChange:x,onBlur:g,...p}),c]})})),Gt=u((({className:e="",onChange:t,minValue:l=0,maxValue:n=3e5,...r})=>{const i=a((e=>{if(!t)return;const r=Pt(Ut(Ht(mt(e))));const a=Wt(r,dt(Number(r),l,n));t(String(a))}),[t]),s=a((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(mt(l))).replace(",",".")))}),[t]);return m(Xt,{className:e,inputClassName:"w-full",onChange:i,onBlur:s,...r,children:m("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),Wt=(e,t)=>Number(e)===t?e:String(t),Jt=u((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:r="1500",button:i,...s})=>{const[o,c]=n(""),d=a((e=>c(e)),[]),u=!Number(mt(o)),p=u?$e({version:i?.version}):Se({className:"text-white",version:i?.version}),x=ge();return h(B,{className:`p-12 flex flex-col items-center font-sans bg-white ${e}`,...s,children:[t?m(j,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,h("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[m(Gt,{name:"amount",value:o,onChange:d,valid:""===o||!u,placeholder:r,label:l}),i?.text?m("button",{type:"submit",className:`w-full p-4 mt-6 ${p} `,disabled:u,...x(i),children:i.text}):null]})]})})),Yt=u((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:r,children:i,onIntersection:s})=>{const o=$(a((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),r);return m("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(l===n),ref:o,children:i})})),Zt=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],Kt=u((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:r=0,padding:i=0,snapAlign:o="snap-center",children:c,onVisibleItemsChange:d,onVisibleIndicesChange:h})=>{const u={sensitivity:1,rootRef:t},p=s([]),x=a(((e,t)=>{const l=[...p.current||[]];l[e]=t,p.current=l,d&&d(l),h&&h(Qt(l))}),[d,h]),g=n>0?r*Number(n)-1:0;return m("div",{className:`box-border overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...qt(i,g),gap:`${r}px`},role:"list",ref:t,children:(b=(e,t)=>m(Yt,{className:`${o} ${n?Zt[n-1]:""}`,style:qt(i/4),activeIndex:l,idx:t,observerOptions:u,onIntersection:x,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(b):b(e,0))(c)});var b})),qt=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qt=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),el=e=>e,tl=(e=el)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ll=(e=el)=>tl((t=>-e(t))),nl=e=>t=>e.scrollWidth/t,rl=e=>(t,l)=>{e.scrollBy({left:l*nl(e)(t),behavior:"smooth"})},al=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const r=s(null),[i,o]=n([]),c=a((e=>{o((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),l&&l(e)}),[e]),[d,m]=i.length?[ll()(i),tl()(i)]:[-1,-1],h=d>0,u=m<e-1,p=a((()=>{var l;r.current&&(t&&!h?(l=r.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):rl(r.current)(e,-1))}),[t,e,h]),x=a((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):rl(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},il="absolute top-0 bottom-0 z-50 w-[84px]",sl="absolute top-[calc(50%-12px)] z-50",ol=u((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:r=!1,...a})=>{const{blocks:i}=a.block||{},s=t||i?.length||0,[o,c]=al({itemCount:s,isCyclic:r});return m(B,{className:`font-sans p-12 ${e}`,...a,children:h("div",{className:"relative max-w-full",children:[m(Kt,{containerRef:o,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:c.handleVisibleIndicesChange,children:w(a)}),(c.canScrollLeft||c.canScrollRight)&&n?h("div",{children:[m("div",{className:`${il} left-0 bg-opacity-from-white`}),m("div",{className:`${il} right-0 bg-opacity-to-white`})]}):null,cl(c)]})})}));ol.childrenTypes=["CarouselCard","CarouselCatalogCard","CarouselTariffsCard","CarouselProductCard","CarouselProgramsCard","CarouselInvestmentCard"];const cl=({scrollLeft:e,scrollRight:t,canScrollLeft:l,canScrollRight:n})=>h("div",{children:[l?m(Ze,{className:`${sl} left-8`,onClick:e}):null,n?m(Ke,{className:`${sl} right-8`,onClick:t}):null]}),dl="absolute border border-solid border-main-stroke w-full h-full",ml={normal:"min-w-[1007px]",mini:"min-w-[355px]"},hl=u((({className:e="",button:t,description:l,title:n,version:r="normal"})=>m("section",{className:`flex pb-9 pl-12 ${ml[r]} ${e}`,children:h("div",{className:"relative w-full",children:[m("div",{className:`${dl} z-10 top-9 right-12 bg-green-dark`}),m("div",{className:`${dl} z-10 top-6 right-8 bg-green`}),m("div",{className:`${dl} z-10 top-3 right-4 bg-green-light`}),h("div",{className:"relative bg-white z-10 py-6 px-10 border border-solid border-green-light",children:[m(De,{className:"!p-0",title:n,description:l,headlineVersion:"M",align:"center"}),t?m("div",{className:"mt-6",children:je({button:t})}):null]})]})}))),ul={black:"bg-black",white:"bg-white"},pl=u((({className:e="",title:t,description:l,image:n,price:r,button:a,colors:i,version:s="primary"})=>h("section",{className:`border box-border border-main-stroke p-7 min-w-[392px] flex flex-col justify-left ${q[s]} ${e}`,role:"listitem",children:[n?.src?m(W,{className:"mb-5 flex justify-center",image:n}):null,t?m(j,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"mb-4",children:m(V,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,i?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:m(J,{children:"Доступные цвета: "})}),i.map(xl)]}):null,r?h(J,{size:"text-h3",align:"text-left",children:[r," ₽"]}):null,a?je({button:a,buttonClassName:"mt-5 w-full"}):null]}))),xl=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${ul[e]}`},String(t)),gl={primary:"border-main-stroke",secondary:"border-white/50"},bl=u((({className:e="",title:t="",buttons:l,image:n,children:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:r}),l?m("div",{className:"mt-auto pt-8",children:l}):null]}),n]})]}))),fl={1:"flex gap-y-2 flex-col",2:"flex gap-y-2 gap-x-10 flex-wrap"},vl=u((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:n=1,description:r,image:a,title:i,version:s="primary",...o})=>{const c=i?m(j,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:i}):null,d=a?.src?m(W,{className:"absolute bottom-0 right-0 m-0",image:a}):null;return m(B,{className:["relative text-left border border-solid box-border p-9 w-[697px]",q[s],gl[s],l].join(" "),...o,children:h(bl,{title:c,image:d,children:[h("div",{className:"flex justify-between mb-4",children:[r?m("div",{className:"w-1/3",children:m(J,{size:"text-h6",children:r})}):null,e?m(J,{size:"text-m",font:"font-light",color:Q[s],children:e}):null]}),t.length?m("ul",{className:`list-none m-0 p-0 ${fl[n]}`,children:Nl(t,n)}):null]})})})),Nl=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return h("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?m("div",{className:"pr-2.5",children:m(J,{size:(n=t,1===n?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?m(J,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var n})),yl="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",wl=u((({text:e,href:t="",target:l="",className:n=""})=>e?h("div",{className:`relative group cursor-pointer w-[328px] h-[82px] ${n}`,children:[h("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:text-primary-main z-10",role:"link",href:t,target:l,children:[m("div",{className:"p-0.5",children:e}),m("div",{className:"w-6 h-6",children:m(W,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"24",height:"24",asSVG:!0})})]}),m("div",{className:`${yl} mx-1.5 mt-1.5`}),m("div",{className:`${yl} mt-3 mr-3`})]}):null)),Cl=u((({className:e="",additionalDescription:t,description:l,links:n,title:r,...a})=>h(B,{className:`bg-primary-main flex w-full p-10 overflow-hidden justify-between font-sans ${e}`,...a,children:[h("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[m(De,{title:r,as:"h1",description:l,align:"left",className:"p-0",bgColorHeadline:"secondary"}),t?m("div",{className:"pt-6",children:m(V,{children:t})}):null]}),n?.length?kl(n):null]}))),kl=e=>{const t=Math.ceil(e.length/12);return m(ol,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,children:new Array(t).fill(null).map(((t,l)=>m("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)=>m(wl,{className:"m-1",...e},String(t))))},String(l))))})},$l={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"},Sl={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"},Il=u((({className:e="",isDotted:t=!0,children:l,version:n="primary",size:r="M"})=>h("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?m("div",{children:m("div",{className:`rounded-full align-middle inline-block ${$l[n]} ${Sl[r]}`})}):null,m("span",{children:l})]}))),Tl={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},Bl={S:"text-l-light",M:"text-h6",L:"text-h5"},Rl={S:"ml-2",M:"ml-3",L:"ml-4"},jl=u((e=>{const{className:t="",hasIndent:l,isDotted:n,itemClassName:r="",items:a,listItemSize:i="M",version:s="primary"}=e;return a?.length?m("section",{className:`${Tl[s]} ${Bl[i]} ${t} ${l?Rl[i]:""}`,role:"list",children:a.map(((e,t)=>m(Il,{className:`${r} mb-1.5`,isDotted:n,version:s,size:i,children:e},String(t))))}):null})),Vl={primary:"text-secondary-text",secondary:"text-white/80"},Ll="box-border border-solid border border-main-stroke ",Ml=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:a=[],button:i={},version:s="primary",isDotted:o=!0,align:c="center"})=>h("section",{className:["flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6",Ll,C[c],q[s]].join(" "),role:"listitem",children:[h("div",{className:"flex flex-col h-full",children:[_l(r,s),Dl(t,e),Al(l,e),zl(a,o,s),Ol(n,s)]}),je({button:i,buttonClassName:"mt-6"})]}))),_l=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(W,{className:"mb-5",image:e}):null,e?.icon?m(W,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:ee(e,t),asSVG:!0}):null]}),Dl=(e,t)=>t?m(J,{size:_e[e],children:t}):null,Al=(e,t)=>e?m("div",{className:t?"mt-2":"",children:m(V,{size:"text-l",children:e})}):null,Ol=(e,t="primary")=>e?m("div",{className:"mt-auto",children:m(J,{size:"text-m",font:"font-light",color:Vl[t],children:e})}):null,zl=(e,t,l="primary")=>e?.length?m(jl,{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,version:l}):null,El=u((({className:e="",title:t,icon:l,list:n=[],version:r="primary",...a})=>h(B,{className:`font-sans border border-main-stroke flex min-w-[536px] ${q[r]} ${e}`,...a,children:[h("div",{className:"w-[200px] min-w-[200px] self-end",children:[l?.icon?m(W,{image:ee(l),asSVG:!0}):null,l?.src?m(W,{image:l}):null]}),h("div",{className:"p-8 pl-3 w-full",children:[t?m(j,{className:" mb-3.5",headingType:"h5",title:t}):null,n.length?m("div",{className:"flex flex-col gap-3",children:n?.map(Fl)}):null]})]}))),Fl=(e,t)=>h("div",{className:"break-words",children:[e.title?m("div",{className:"text-h6",children:e.title}):null,e.description?m("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Pl=u((({className:e="",title:t,icon:l,isHighlighting:n,button:r,rows:a=[],...i})=>{const s=a.map(Xl),o=s.slice(0,1),c=s.slice(1);return h(B,{className:`font-sans relative bg-white border border-main-stroke min-w-[322px] p-8 \n ${Ul(n)}\n ${e}`,...i,children:[n?Gl():null,l?.src?m(W,{image:l}):null,t?m(j,{className:"text-primary-text text-center pt-2",headingType:"h5",title:t}):null,r?m(Ie,{className:"w-full mt-4",...r}):null,a.length?m(_,{renderFoldableSection:({isUnfolded:e})=>h("div",{children:[o,m(D,{isUnfolded:e,children:c})]}),renderFoldButton:a.length>1?Hl:null}):null]})})),Ul=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-9",Hl=({isUnfolded:e,onToggle:t})=>h("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[m("div",{children:e?"Скрыть":"Подробнее о тарифе"}),m(O,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),Xl=(e,t)=>h("div",{className:"py-5 border-b border-main-divider",children:[e?.title?m("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?m("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),Gl=()=>h("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[m(O,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),m("div",{className:"text-center",children:"Хит"})]}),Wl={black:"bg-black",white:"bg-white"},Jl=u((({className:e="",title:t,description:l,image:n,price:r,button:a,colors:i})=>h("section",{className:`border border-solid box-border border-main-stroke p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[n?.src?m(W,{className:"mb-5 flex justify-center",image:n}):null,t?m(j,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"text-m-light text-left mb-4",children:l}):null,i?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:"Доступные цвета: "}),i.map(Yl)]}):null,r?h("div",{className:"text-h3 text-left",children:[r," ₽"]}):null,a?je({button:a,buttonClassName:"mt-5 w-full"}):null]}))),Yl=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Wl[e]}`},String(t)),Zl="absolute top-0 bottom-0 w-[84px]",Kl=u((({cards:e=[],className:t="",title:l,description:n,...r})=>{const[a,i]=Je({itemCount:e?.length,visibleItemCount:3});return h(B,{className:`bg-white relative font-sans p-12 overflow-hidden text-center ${t}`,...r,children:[m(De,{className:"!p-0",title:l,description:n,headlineVersion:"M",align:"center",...r}),m("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*a}px)`},role:"list",children:e?.length?e.map(((e,t)=>m(Jl,{...e},String(t)))):null}),qe({...i,btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"}),m("div",{className:`${Zl} left-0 bg-opacity-from-white`}),m("div",{className:`${Zl} right-0 bg-opacity-to-white`})]})})),ql="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Ql="border-main-stroke border-solid border",en="border-main-divider border border-t-0 border-x-0",tn="w-[200px] mr-6",ln=u((({icon:e,image:t,title:l,link:n})=>h("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Ql} ${ql}`,role:"columnheader",children:[e&&!t?.src&&m(W,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:ee(e),width:"63",height:"63",asSVG:!0}),t?.src&&m(W,{className:"mb-[18px]",image:t}),l?m(j,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&m("div",{className:"mt-auto w-full",children:m(Ie,{href:n.href,target:n.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:m("div",{className:"text-xs-light font-medium py-[11px]",children:n.text})})})]}))),nn={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},rn=u((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>m("div",{className:"flex flex-1 overflow-hidden",children:m("div",{className:nn[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),an=u((({children:e})=>m("div",{className:"self-start flex flex-col",role:"row",children:m("div",{className:"flex",children:e})}))),sn=u((({colHeaders:e,activeIndex:t})=>h(an,{children:[m("div",{className:tn,role:"columnheader"}),m(rn,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>m(ln,{...e},String(t))))})]}))),on=u((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>m("div",{className:`w-80 box-border flex flex-col ${Ql} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${n?ql:""}`,role:"cell",children:m("div",{className:`mx-7 h-full ${en} ${n&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>mn(e,t,n)))})}))),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,n)=>h("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?m("h4",{className:cn(n),children:e}):null,t?m("div",{className:dn(n),children:t}):null]},String(l)),hn=(e=!1)=>`text-s py-7 ${en} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,un=u((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:r,isLastRow:a})=>h(an,{children:[e?.title?m("div",{className:hn(a),children:e.title}):null,t?.length?m(rn,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>m(on,{cell:e,isFirstRow:r,isLastRow:a,isFillGradient:n&&0===t},String(t))))}):null]}))),pn=u((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:r}=n;return h("div",{className:"relative",children:[e.map(((e,n,{length:r})=>m(un,{row:e,isFirstRow:0===n,isLastRow:n+1===r,activeIndex:l,isColoredFirstColumn:t},String(n)))),r?qe({...n,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),xn=u((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:r})=>{const a=e?.map((({header:e})=>e||{})),i=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:i.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=Je({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return h("div",{children:[h("div",{role:"table",children:[a?.length?m(sn,{colHeaders:a,activeIndex:o}):null,s?.length?m(pn,{rowData:s,isColoredFirstColumn:r,activeIndex:o,controls:c}):null]}),d?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),gn=u((({className:e="",title:t,rowHeaders:l,columns:r,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!i),u=a((()=>d((e=>!e))),[]);return h(B,{className:`bg-white font-sans py-12 pl-12 overflow-hidden text-primary-text relative ${e}`,...o,children:[m(j,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),m(xn,{columns:r,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?bn({isShowAllRow:c,onClick:u}):null]})})),bn=({isShowAllRow:e,onClick:t})=>m("div",{className:"pr-12",children:h("div",{className:"flex w-full",children:[m("div",{className:tn}),m("button",{onClick:t,className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:m("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),fn=u((({className:e="",contacts:t,info:l,version:n="secondary",...r})=>h(B,{className:`${q[n]} flex p-12 ${e}`,...r,children:[l?.length?vn(l,n):null,t?.length?vn(t,n):null]}))),vn=(e,t)=>m("div",{className:"flex grow basis-0",children:e.map(((e,l)=>Nn({column:e,index:l,version:t})))}),Nn=({column:e,index:t,version:l})=>e?m("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:r},a)=>h("div",{className:"mt-6 first:mt-0",children:[m(De,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"left",bgColorHeadline:l}),n?m("div",{className:"mt-1.5 opacity-80",children:m(V,{size:"text-m-light",children:n})}):null,r?m(Ie,{className:"mt-6",...r}):null]},String(a))))},`col-${String(t)}`):null,yn=e=>"Image"===e?.errorContentType&&e?.image?m(W,{image:e.image}):"Code"===e?.errorContentType&&e.code?m("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,wn=u((({className:e="",title:t,subtitle:l,error:n,button:r})=>h("section",{className:`flex flex-col justify-center items-center mt-12 ${e}`,children:[m("div",{className:"flex justify-center py-20",children:yn(n)}),t?m(j,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?m("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,r?.text?m(Ie,{className:"py-4 px-9",version:r?.version,...r,children:r.text}):null]})));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}),$n=e=>e?kn.format(e):"",Sn="text-left text-m-light text-secondary-text",In={USD:"DollarIcon",EUR:"EuroIcon"},Tn=u((({className:e,exchangeCurrencyItems:t})=>h("table",{className:`h-fit w-fit ${e}`,children:[m("thead",{children:h("tr",{children:[m("th",{className:Sn,children:"Валюта"}),m("th",{className:`${Sn} pl-11`,children:"Купить"}),m("th",{className:`${Sn} pl-11`,children:"Продать"})]})}),m("tbody",{children:t.map(Bn)})]}))),Bn=e=>{const t=e?.currency?.currency;return h("tr",{className:"pb-1 text-h6",children:[m("td",{className:"pt-4",children:h("div",{className:"flex items-center",children:[t?m(W,{image:{icon:In[t]},width:"24",height:"24"}):null,m("span",{className:"ml-2",children:t})]})}),m("td",{className:"pt-4 pl-11",children:$n(e?.saleExchangeRate)}),m("td",{className:"pt-4 pl-11",children:$n(e?.buyExchangeRate)})]},t)},Rn=u((({className:e="",address:t})=>h("div",{className:`flex ${e}`,children:[m(W,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),h("div",{className:"ml-3",children:[t?m("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,m("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),jn=(e,t,l)=>{const n=Number(Vn(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Vn=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 t=s(null);return r((()=>{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 _n=u((({className:e="",isBorder:t=!0,label:l,options:i=[],value:s,onChange:o,placeholder:c=""})=>{const[d,u]=n(i[0]||{key:"",text:""}),[p,x]=n(!1),g=Mn(a((()=>x(!1)),[]));return r((()=>{u(s||{key:"",text:""})}),[s]),h("div",{className:`${e}`,ref:g,children:[l?m("span",{className:"mb-2 flex text-primary-text",children:l}):null,h("div",{className:"relative "+(p?"z-20":"z-10"),children:[h("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${On(t)}`,onClick:()=>x(!p),children:[m("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),m(O,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(p?"":"rotate-180")})]}),i?.length?m("div",{className:`h-0 ${Dn(p)}`,children:m("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(An((e=>{u(e),x(!1),o(e)}),p,(e=>Boolean(e.key===d.key))))})}):null]})]})})),Dn=e=>e?"":"overflow-hidden",An=(e,t,l)=>(n,r)=>h("div",{onClick:()=>{e(n)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[m("span",{className:"min-h-6",children:n.text}),m(O,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(n)&&t?"":"hidden"].join(" ")})]},String(r)),On=e=>e?"border border-main-stroke rounded-md hover:border-primary-hover":"";function zn(e){const{placeholder:t,rates:l,selected:n,value:r,setValue:a,setSelected:i}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return h("div",{className:"relative flex",children:[m(Xt,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:r,onChange:a}),s.length?m(_n,{isBorder:!1,onChange:e=>i(e.key),options:s,value:o}):null]})}const En=u((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:r})=>{const[i,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Cn.RUB,selectBuy:l?.[0]?.currency?.currency||Cn.USD}),o=a((e=>s((t=>({...t,...e})))),[]);return h("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[zn({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:Fn(i,o,l),value:i.inputSell,setValue:e=>Un(o,l)(e,i.selectSell,i.selectBuy)}),zn({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:Pn(i,o,t),value:i.inputBuy,setValue:e=>Hn(o,t)(e,i.selectBuy,i.selectSell)}),r?.text?m(Ie,{className:"py-4 mr-1",version:r?.version,...r,children:r.text}):null]})})),Fn=(e,t,l)=>n=>{t({selectSell:n}),Ln({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,r=e.selectBuy)=>{Un(t,l)(e.inputSell,n,r)}})},Pn=(e,t,l)=>n=>{t({selectBuy:n}),Ln({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,r=e.selectSell)=>Hn(t,l)(e.inputBuy,n,r)})},Un=(e,t)=>(l,n,r)=>{e({inputSell:Vn(l),selectBuy:r});const a=t.find((e=>e.currency?.currency===r))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;a&&e({inputBuy:String(jn(l,a,n===Cn.RUB)||"")})},Hn=(e,t)=>(l,n,r)=>{e({inputBuy:Vn(l),selectSell:r});const a=t.find((e=>e.currency?.currency===r))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;a&&e({inputSell:String(jn(l,a,n===Cn.RUB)||"")})};const Xn=async e=>{const t=await Gn(),l=t?.code||"000";return{region:t,exchangeRates:await Wn(e,l)}},Gn=async()=>{try{return await Nt("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Wn=async(e,t)=>{try{return await Nt(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Jn=u((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:r}=function(){const{data:e}=bt("/api/v1/exchangerates",Xn);return e||{}}(),a=Yn(r?.exchangeRate?.currencies),i=a.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Cn.RUB}});const s=a.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Cn.RUB}}),m(B,{className:`bg-white text-primary-text font-sans p-9 box-border min-h-80 ${e}`,...n,children:m(bl,{title:m(j,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:h("div",{className:"flex",children:[h("div",{className:"mr-14 pt-4",children:[a?m(Tn,{className:"mb-[30px]",exchangeCurrencyItems:a}):null,m(Rn,{address:r?.address})]}),a.length&&i.length&&s.length?m(En,{className:"grow",currencyRatesBuy:i,currencyRatesSell:s,button:l}):null]})})})})),Yn=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[];function Zn(e,t={}){const{data:l}=bt(`/wcms-resources/${e}.json`,Nt,{fallback:t});return l||{}}const Kn={"bg-white":"color",transparent:"white"},qn={"bg-white":"text-primary-main",transparent:"text-white"},Qn=(e,t,l)=>m(W,t?.src?{image:t,className:qn[e],width:l?.width,height:l?.height,asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Kn[e]},className:qn[e],width:l?.width,height:l?.height,asSVG:!0}),er={"bg-white":"text-primary-text",transparent:"text-white"},tr=(e,t,l)=>m("span",{className:`${er[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),lr=u((({className:e="",href:t,logo:l,children:n=l?.title,targetBlank:r,bgColor:a="bg-white",showTitle:i=!0})=>h("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:r?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Qn(a,l?.image,{width:"40",height:"45"}),i?tr(n||l?.title,a):null]}))),nr=()=>{const[e,t]=n("");return{term:e,setTerm:e=>t(e)}},rr=u((({className:e,isMobile:t=!1})=>{const{term:l,setTerm:n}=nr(),r=t?"text-s":"text-l-light",a=t?" placeholder-transparent":"h-full",i=t?"some search":void 0;return h("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:[m("div",{className:t?"w-5 h-5":"w-6 h-6",children:m(W,{image:"LoupeIcon",width:"24",height:"24"})}),l?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${r}`,children:"Поиск по сайту"})]}),m("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-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${a}`,value:l,onChange:e=>n(e.target.value),type:"text",name:"search-bar-input",placeholder:i}),t?m("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(),n("")},children:m(W,{image:"CloseIcon",width:"24",height:"24"})}):m(Ie,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),ar=u((e=>m(rr,{...e}))),ir=u((({className:e="",items:t,hasButton:l})=>h("div",{className:e,children:[t?.length?t.map(sr):null,l?m(Ie,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),sr=(e,t)=>{const{type:l,text:n,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:or(l,n)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},or=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${cr(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},cr=e=>e.replaceAll(/\D/g,""),dr=u((({className:e="",index:t,text:l,...n})=>{const r=ge(),{href:a,target:i,onClick:s}=r(n);return m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:a,target:i,onClick:s,children:l||`Документ ${t}`})})),mr=u((({className:e="",links:t})=>m("div",{className:e,children:t?.length?m("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)=>m(dr,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),hr=e=>t=>e?.href===t?.href,ur=(e,t)=>{return(n=e,r=t,(n||[]).map((e=>r?.find(hr(e))||e))).concat((l=e,(t||[]).filter((e=>!l?.find(hr(e))))));var l,n,r},pr=u((({className:e="",items:t,fallback:l})=>{const n=ge(),r=Zn(o.SITEMAP||"sitemap",l),a=ur(r.topItems,t);return m("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:a?.map(((e,t)=>xr(n(e),t)))})})),xr=(e,t)=>{const{text:l,items:n,href:r,target:a,onClick:i}=e;return h("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[m("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:r,target:a||"_self",onClick:i,children:l||`Раздел ${t}`}),n?.map(((e,t)=>m(gr,{...e,index:t},String(t))))]},String(t))},gr=u((({text:e,index:t,...l})=>{const n=ge(),{href:r,target:a,onClick:i}=n(l);return m("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:r,target:a||"_self",onClick:i,children:e||`Раздел ${t}`})})),br=[{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"}],fr=u((({version:e="primary",...t})=>{const l=ge(),{href:n,onClick:r}=l(t),{icon:a,label:i}=br.find((({origins:e})=>e.some((e=>n?.includes(e)))))||{};if(!a)return null;return m("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===e?"bg-white hover:bg-secondary-hover":"border-solid border border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===e?"hover:text-black":""}`,href:n,"aria-label":i,target:"_blank",rel:"noopener noreferrer",onClick:r,children:a?m(W,{image:ee(a),imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),vr=u((({className:e="",media:t,version:l,children:n})=>h("div",{className:"font-sans",children:[m("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>m(fr,{version:l,...e},String(t))))}),m("span",{className:"text-s-light text-secondary-text",children:n})]}))),Nr=u((({className:e="",index:t,...l})=>{const n=ge(),{href:r,target:a,text:i,onClick:s}=n(l);return m("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:r,target:a,onClick:s,children:i||`Документ ${t}`})})),yr=u((({className:e="",links:t})=>h("div",{className:e,children:[m("div",{className:"pt-5",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>m(Nr,{index:t,...e},String(t))))}):null]}))),wr="w-[204px]",Cr=u((({className:e,...t})=>{const l=t.options?.page?.fallback,{documents:n,relatedEnterprises:r,contacts:a,socialMedia:i,mobileApps:s,topItems:c,logo:d}=Zn(o.FOOTER||"footer",l);return h(B,{tag:"footer",className:`p-9 bg-white font-sans ${e||""}`,...t,children:[h("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[m(lr,{className:wr,logo:d}),m(ar,{className:"grow"})]}),h("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[h("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[m(ir,{items:a,hasButton:!0}),m(vr,{media:i,children:"Соцсети"}),m(vr,{className:"mt-6",media:s,children:"Мобильное приложение"})]}),m(pr,{className:"pt-[3px]",items:c,fallback:l})]}),m(mr,{className:"mt-[98px]",links:r}),m(yr,{links:n})]})})),kr={normal:3,mini:4},$r={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Sr={normal:380,mini:276},Ir=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:a,button:i,version:s,isFullWidth:o=!0,isDotted:c=!0,align:d="center"})=>h("div",{className:`h-full flex flex-col justify-between ${C[d]}`,children:[h("div",{className:"flex flex-col h-full",children:[Tr(r,s),Br(t,e),Rr(l,e),a?.length?Vr(a,c,s):null,jr(n,s)]}),i?.text?je({button:i,buttonClassName:"mt-6 "+(o?"":"self-center")}):null]}))),Tr=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(W,{className:"mb-5",image:e}):null,e?.icon?m(W,{className:"w-8 h-8 min-w-8 mb-5 rounded-full",image:ee(e,t),asSVG:!0}):null]}),Br=(e,t)=>t?m("div",{className:_e[e],children:t}):null,Rr=(e,t)=>e?m("div",{className:"text-l "+(t?"mt-2":""),children:e}):null,jr=(e,t)=>e?m("div",{className:`text-m-light mt-auto ${Q[t??"primary"]}`,children:e}):null,Vr=(e,t,l="primary")=>m(jl,{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,version:l}),Lr=u((({headlineVersion:e="M",cards:t=[],version:l="normal",activeIndex:n,...r})=>h("div",{children:[m(De,{...r,className:"!p-0",headlineVersion:e,align:"center"}),m("div",{className:`flex mt-8 ${t?.length<=kr[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${n*Sr[l]}px)`},role:"list",children:t?.map(((e,t)=>function({card:e,version:t},l){return m("section",{className:`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between\n items-stretch ${$r[t]} ${q[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:m(Ir,{...e})},String(l))}({card:e,version:l},t)))})]})));const Mr=u((({cards:e=[],className:t="",version:l="normal",button:n,...r})=>{const[a,i]=Je({itemCount:e?.length,visibleItemCount:kr[l]}),{isScrollAvailable:s}=i;return h(B,{className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden flex flex-col ${t}`,...r,children:[m(Lr,{cards:e,version:l,activeIndex:a,...r}),qe({...i,btnClass:["left-8","right-8"],className:"top-1/2"}),s?h("div",{children:[m("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),m("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]}):null,n?je({button:n,buttonClassName:"mt-8 mx-auto"}):null]})})),_r=u((e=>m(Mr,{...e,version:"normal"}))),Dr=u((({className:e="",title:t,description:l,calendar:n,...r})=>h(B,{className:`font-sans bg-white p-12 ${e}`,...r,children:[m(De,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M",align:"center",...r}),n?Ar(n):null]}))),Ar=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 h("div",{className:"w-full flex flex-col justify-center mt-13",children:[m("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Or(e,t)))}),m("div",{className:"flex w-full",children:l.map(((e,t)=>h("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:[m("div",{className:"flex",children:zr(e)}),h("div",{className:"text-s-light text-primary-text mt-3",children:[m("span",{children:e.text})," ",m("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Or=(e,t)=>e.month?.map(((e,l)=>m("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),zr=e=>e.month?.map((e=>e.image?.src?m("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:m(W,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Er=(e,t,l=((e,t)=>t.startsWith(e)))=>l(de(e),de(ce(e)?t.href:t.pathname)),Fr=e=>t=>Er(t.href,e),Pr=e=>t=>t.items?.some(Fr(e))||Er(t.href,e)||((e,t)=>me(e)===me(t.href))(t.href,e),Ur="font-sans text-s-light",Hr=u((({className:e="",active:t,flat:l,ariaLabel:n,bgColor:r="bg-white",children:a,...i})=>{const s=ge(),{href:o,target:c,text:d,onClick:h}=s(i);return m("a",{className:`${Xr(r,t,l)} ${e}`,href:o,target:c,onClick:h,rel:"noopener noreferrer","aria-label":n,children:m("span",{className:Gr(r,t,l),children:d||a})})})),Xr=(e,t=!1,l=!1)=>{let n="border-transparent";return t&&(n="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${n} inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"}`},Gr=(e,t=!1,l=!1)=>{if("transparent"===e)return`text-white hover:text-primary-hover ${Ur}`;return`${t?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"} ${Ur}`},Wr=864e5;function Jr(e,t,l=globalThis?.localStorage){const n=a((async(...n)=>{const r=`async:${e}`,a=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<Wr?t:void 0}(l.getItem(r));if(a)return a;const i=await t(...n);return l.setItem(r,JSON.stringify({data:i,timestamp:Date.now()})),i}),[e,t]);return bt(e,n)}const Yr=globalThis?.localStorage.getItem("location"),Zr=Yr?JSON.parse(Yr):null;const Kr=u((({className:e,searchTerm:t,onSearch:l})=>h("form",{className:`font-sans relative ${e}`,children:[m("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:m("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),m("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-main-stroke 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"})]}))),qr=u((({currentLocation:e,onChangeLocation:t,close:l,foreignOffices:n})=>{const{term:r,setTerm:i}=nr(),s=a((e=>i(e)),[]),o=ea(function(){const{data:e}=bt("/api/v1/regions",Nt);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;return e.forEach((e=>{const n=t(e),r=l.get(n);l.set(n,[...r||[],e])})),l})(o,Qr);return h("div",{className:"absolute h-full w-full inset-0 bg-white text-l-light z-50",children:[m(la,{close:l}),h("div",{className:"container py-12",children:[m(ta,{currentLocation:e}),m(Kr,{onSearch:s,searchTerm:r,className:"mb-7"}),r&&r.length>=3?m("div",{children:o.filter((e=>e.name?.startsWith(r))).map(ra({onChangeLocation:t,close:l}))}):m("div",{className:"columns-5",children:Array.from(c.entries()).map(na({onChangeLocation:t,close:l}))}),m(aa,{foreignOffices:n})]})]})})),Qr=e=>e.name?.charAt(0)||"",ea=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),ta=u((({currentLocation:e})=>e?h("div",{className:"mb-4",children:[m(J,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),m("button",{className:"cursor-pointer",onClick:close,children:m(J,{color:"text-green",children:e.name})})]}):null)),la=u((({close:e})=>m("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:m(W,{image:"CloseIcon",width:"24",height:"24"})}))),na=({onChangeLocation:e,close:t})=>([l,n])=>h("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[m("div",{className:"mb-2.5",children:m(J,{size:"text-h6",children:l})}),n.map(ra({onChangeLocation:e,close:t}))]},l),ra=({onChangeLocation:e,close:t})=>l=>m("div",{className:"mb-1",children:m("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(l),t&&t()},children:l.name})},l.id),aa=u((({foreignOffices:e})=>e?.length?h("div",{className:"border-t border-main-divider mt-7 pt-7",children:[m("div",{className:"mb-4",children:m(J,{size:"text-m-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),m("div",{className:"flex gap-10",children:e.map(((e,t)=>m(ia,{...e},String(t))))})]}):null)),ia=u((({icon:e,...t})=>{const l=ge(),{text:n,target:r,href:a,onClick:i}=l(t);return h("div",{className:"flex gap-x-3",children:[m(W,{image:e}),m("a",{className:"hover:text-primary-hover",href:a,target:r,onClick:i,children:n})]})})),sa=u((({className:e="",children:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 p-0 w-6 h-6 flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":l,children:t}))),oa={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},ca={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},da={"bg-white":"black",transparent:"white"},ma=u((({className:e,officesLink:t,defaultLocation:l="Москва",foreignOffices:i,bgColor:s="bg-white"})=>{const[o,c]=n(!1),[d,u]=function(e){const[t,l]=n(Zr?.region??{name:e}),{data:i}=Jr("/api/v1/region",Nt);return r((()=>{l(Zr?.region&&Zr?.manual?Zr.region:i||{name:e})}),[i]),[t,a((e=>{globalThis?.localStorage.setItem("location",JSON.stringify({manual:!0,region:e})),l(e)}),[l])]}(l);return h("div",{className:`flex items-center ${e||""}`,children:[m(Hr,{className:"mr-5",flat:!0,href:"#",text:d.name,ariaLabel:"Местоположение",onClick:()=>{c(!0)},bgColor:s}),t?m(Hr,{className:"mr-7",flat:!0,href:t,text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:s}):null,m(sa,{className:`mr-5 group ${oa[s]}`,ariaLabel:"Поиск по сайту",children:m(W,{image:{icon:"LoupeIcon",iconVersion:da[s]},className:"h-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0 pointer-events-none",asSVG:!0})}),m(sa,{className:`${ca[s]} group min-w-8 min-h-8`,ariaLabel:"Дополнительные ссылки",children:m(W,{image:{icon:"GridIcon",iconVersion:da[s]},className:"h-full bg-main-divider/20 rounded-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0",asSVG:!0})}),o?m(qr,{currentLocation:d,foreignOffices:i,onChangeLocation:u,close:()=>{c(!1)}}):null]})})),ha={"bg-white":"bg-primary-text",transparent:"bg-white"},ua=u((({className:e,items:t,activeItem:l,bgColor:r})=>{const i=ge(),[s,o]=n(!1),c=a((()=>o((e=>!e))),[]),d=Mn(a((()=>o(!1)),[]));return h("div",{className:`${s?"bg-white rounded-md shadow-blue-gray/24":""} ${e||""}`,ref:d,children:[m("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6","aria-label":""+(s?"Скрыть другие разделы":"Показать другие разделы"),onClick:c,children:Array(3).fill(r).map(pa)}),m("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(s?"":"hidden"),"aria-hidden":!s,children:t?.map(((e,t)=>m("a",{className:"text-l-light pb-4 hover:text-primary-main "+(e===l?"text-primary-main":""),...i(e),children:e.text},e.href||String(t))))})]})})),pa=(e,t)=>m("div",{className:`w-[3px] h-[3px] rounded mr-1 ${ha[e]}`},String(t)),xa="absolute left-0 -bottom-3 w-full h-0.5",ga=u((({className:e="",active:t,bgColor:l="bg-white",dataItemName:n,children:r,...a})=>{const i=ge(),{href:s,target:o,text:c,onClick:d}=i(a);return h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:s,target:o,"data-item-name":n,onClick:d,children:[m("span",{className:ba(l,t),children:c||r}),t?m("div",{className:fa(l,t)}):null]})})),ba=(e,t=!1)=>{let l="text-white";return"bg-white"===e&&(l=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${l} font-sans text-l-light`},fa=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${xa}`:xa,va=u((({className:e,active:t,bgColor:l,observerOptions:n,onVisibilityChange:r,children:i,...s})=>{const o=$(a((e=>{if(!e.length||!r)return;const t=e[e.length-1];r(t.isIntersecting)}),[r]),n);return m("span",{ref:o,children:m(ga,{className:e,active:t,bgColor:l,...s,children:i})})})),Na=u((({subItems:e=[],bgColor:t})=>{const l=(e=>(t=[])=>{const l=t?.filter(Fr(e));return l?.length?tl((e=>e.href?.length||0))(l):void 0})(xe())(e),[r,a]=n(e.length),o=e.slice(r),c=s(null),d={rootRef:c},u=i((()=>e.map(((e,t)=>e=>{a(e?ya(t):wa(t))}))),[e]);return h("nav",{className:"relative mt-6",children:[m("div",{ref:c,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,n)=>m(va,{className:"mr-8 "+(r-1<n?"invisible":""),active:e===l,bgColor:t,observerOptions:d,onVisibilityChange:u[n],...e},String(n))))}),o.length?m(ua,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:o,activeItem:l,bgColor:t}):null]})})),ya=e=>t=>Math.max(t,e+1),wa=e=>t=>Math.min(t,e),Ca={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},ka=u((({bgColor:e="bg-white",className:t="",showSubMenu:l=!0,...n})=>{const r=xe(),{topItems:a,logo:i,defaultLocation:s,foreignOffices:c,officesLink:d}=Zn(o.SITEMAP||"sitemap",n.options?.page?.fallback),u=l?$a(a,r):null,p=a?.map(((t,l)=>m(Hr,{active:t===u,"aria-label":t.text,bgColor:e,...t},String(l))));return m(B,{tag:"header",className:`pt-6 px-20 ${e} ${t} ${l&&u?.items?.length?"pb-4":"pb-5"}`,...n,children:h("div",{className:"container",children:[h("div",{className:"flex items-center",children:[m(lr,{className:"mr-8",bgColor:e,logo:i}),p,m(ma,{className:"ml-auto",foreignOffices:c,defaultLocation:s,officesLink:d,bgColor:e})]}),m("div",{className:`mt-6 h-px ${Ca[e]}`}),l&&u?.items?.length?m(Na,{subItems:u.items,bgColor:e}):null]})})})),$a=(e,t)=>{const[l]=e||[];return e?.find(Pr(t))||l},Sa=u((e=>{const{className:t,image:l,...n}=e;return m(B,{className:t,...n,children:m(W,{image:l})})})),Ia=u((({className:e="",cards:t=[],button:l})=>{const[r,i]=n(0),s=a((e=>i(e)),[]),o=t.length,[c,d]=Je({itemCount:o,visibleItemCount:2}),{canDec:u,canInc:p}=d,x=t[c]?.href;return h("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[h("div",{className:"relative overflow-hidden",children:[o?Ta({activeIndex:c,cards:t,selectedCardIndex:r,onClick:s}):null,qe({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),u?m("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,p?m("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),m(Ie,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function Ta({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const r=460*e,a=t.length>2?"justify-start":"justify-center";return m("div",{style:{transform:`translateX(-${r}px)`},className:"duration-1000 px-12",children:m("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${a}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return h("button",{type:"button",onClick:n,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(l?"shadow-dark-blue/42 border-primary-main":"ease-in duration-300 border-main-stroke"),children:[e?.icon?m(W,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,h("div",{className:"flex gap-3.5",children:[e?.sum?Ba("страховая сумма",e.sum):null,e?.fee?Ba("страховой взнос",e.fee):null]}),Ra(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function Ba(e,t){return h("div",{className:"flex flex-col text-left whitespace-pre",children:[h("span",{className:"text-h6",children:[Qe(t)," ₽"]}),m("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Ra(e){return e?m(W,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:"DoneIcon",width:"24",height:"24"}):null}const ja=u((({className:e="",title:t,insuranceTabs:l=[],button:r,...i})=>{const[s,o]=n(0),c=a((e=>o(e)),[]);return h(B,{className:`box-border py-12 overflow-hidden relative font-sans w-100 bg-white ${e}`,...i,children:[t?m(j,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?m("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return m("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-4 py-3 text-m-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Va({insuranceTabs:l,button:r})})]})})),Va=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>m(Ia,{button:t,cards:e},String(l)))):null};function La(e){return t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:n},l):[l]),[])}const Ma={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},_a={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Da=u((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:r,investmentColumns:a,...i}=e,s=a?[...a]:[];return r&&s.unshift(r),m(B,{className:`font-sans bg-white px-9 py-12 ${t}`,...i,children:h("div",{className:"container text-m-light",children:[s?.length?h("div",{children:[h("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[La(m("div",{className:"w-px h-4 bg-main-stroke"}))(s.map(Aa)),m("div",{className:"absolute right-[30px] w-px h-4 bg-main-stroke"})]}),m("div",{className:"border-t border-main-stroke -mt-2 ml-9 mr-8"}),m("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Ea)})]}):null,l?.length?m(jl,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:n}):null]})})})),Aa=(e,t,l)=>{const n=1===t,r=t===l.length-1;return m("div",{className:`${Oa(n,r,e.cells)}`,children:e.cells?.length?m("div",{className:"w-full "+(r?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(za)}):null},`column_${t}`)},Oa=(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(" "),za=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?m("div",{className:`flex-1 flex items-center justify-center relative py-2 ${_a[l]} ${Ma[n]} ${"XS"===l?"px-3":"px-11"}`,children:m("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Ea=(e,t,l)=>{const n=0===t,r=t===l.length-1;return m("div",{className:`flex-1 max-w-[180px] text-center px-2 ${n?"pl-9":""} ${r?"mr-3.5":" "}`,children:e.title},`title_${t}`)},Fa=u((({className:e,iconClassName:t,textClassName:l,suffixClassName:n,doc:r,icon:a})=>{const{text:i,fileSize:s,...o}=r;return h("a",{className:e,role:"link",...o,children:[a?m(W,{className:t,image:ee(a),width:"24px",height:"24px",asSVG:!0}):null,i?h("span",{className:l,children:[i,m("span",{className:n,children:o?.href&&Pa(Ua(o.href),s)})]}):null]})})),Pa=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Ua=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Ha=u((({className:e="",doc:t,icon:l})=>m(Fa,{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:text-primary-main",doc:t,icon:l}))),Xa=u((({className:e,documents:t,columnsMode:l="double",icon:n})=>t?.length?m("div",{className:e,role:"list",children:t.map(((e,t)=>m("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:m(Ha,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:n})},String(t))))}):null)),Ga={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},Wa=u((({className:e="",title:t,description:l,align:n="center",documents:r,icon:a={icon:"DocIcon"},columnsMode:i="double",...s})=>h(B,{className:`font-sans text-primary-text p-12 bg-white ${e}`,...s,children:[m(De,{className:"!p-0",title:t,description:l,align:n,headlineVersion:"M",as:"h2",...s}),m(Xa,{className:`mt-8 ${Ga[i]}`,columnsMode:i,documents:r,icon:a})]}))),Ja=u((e=>m(Mr,{...e,version:"mini"}))),Ya=e=>{const t="col-span-",l=e.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function Za(e=""){const t=Ya(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const Ka=u((({className:e="",title:t="Мобильное приложение",qr:l,buttons:n,version:r="primary",items:a,image:i,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const u="primary"===r?"text-primary-text":"",p="secondary"===r?"p-3.5 min-w-[120px]":"min-w-[92px]",x=n?.map((e=>({...e,className:"min-w-[168px]"})));return h(B,{className:`flex justify-between font-sans p-12 box-border relative min-h-80\n ${Za(e)}\n ${q[r]}\n ${e}`,...d,children:[h(bl,{className:"z-10",title:t?m(j,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full\n ${u} ${C[o]}`}):null,buttons:n?.length?m(Re,{buttons:x,className:"flex gap-4 mt-8",...d}):null,children:[Qa(c),h("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?m("div",{className:`flex justify-center mr-5 bg-white rounded-md ${p}`,children:m(W,{className:"w-fit",image:l})}):null,qa(r,a)]})]}),i?.src?m("div",{className:"absolute right-0 bottom-0",children:m(W,{image:i})}):null]})})),qa=(e,t)=>t?.length?m(jl,{items:t,itemClassName:"text-l-light mb-2 last:mb-0",version:e}):m("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Qa=e=>e?m("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null;function ei(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),r=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),a=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));r.add(a),t.geoObjects.add(r),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ti={focus:"focus:border-primary-focus 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"},li=e=>m("a",{className:`select-none cursor-pointer px-9 h-12 bg-white bg-primary-main text-white ${Object.values(ti).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),ni={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)]"},ri=(e,t,l)=>h("div",{className:`${Object.values(ni).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[m(O,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),m("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),ai={focus:"focus:border-primary-focus 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"},ii=(e,t,l)=>m("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(ai).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:m(O,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),si=e=>globalThis[e];const oi=()=>function(e,t){const[l,i]=n(),s=a((()=>i(si(e))),[e]);return r((()=>{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(!si(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${o.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),ci={focus:"focus:border-primary-focus 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"},di=u((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return m("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(ci).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:m(O,{name:l,width:"20",height:"16"})})})),mi=[{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:"Кафе"}],hi={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-focus focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},ui=u((({points:e,className:t="",zoom:l=5,showSearchField:a=!1})=>{const i=s(null),o=oi(),[c,d]=n(),[u,p]=n(bi(mi)),x=pi(e);if(r((()=>{i?.current||o?.ready((()=>{i.current=new o.Map("map",{center:x,zoom:l,controls:[],suppressMapOpenBlock:!0}),ei(o,i.current,u)}))}),[o,i,u]),r((()=>{if(i.current&&u&&o){const e=u.length<1?bi(mi):u;ei(o,i.current,e)}}),[i,u,o]),!o)return null;const g=c?"z-[100000]":"z-10";return h("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[m("div",{className:`absolute flex left-2 top-4 w-[50%] ${g}`,children:a?ri(mi,0,(e=>{if(e){const t=bi(e);p(t)}})):li(x)}),m("div",{className:`${Object.values(hi).join(" ")} ${g} right-2 top-4 bg-white`,onClick:()=>{const e=i.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:m(O,{name:"FullScreenIcon",width:"16",height:"16"})}),h("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${g}`,children:[m(di,{yandexMaps:i}),m(di,{yandexMaps:i,direction:"out"})]}),ii(i.current,o,`right-2 top-80 ${g}`)]})})),pi=e=>[gi(xi(e,0)),gi(xi(e,1))],xi=(e,t)=>e.map((e=>e[t])),gi=e=>e.reduce(((e,t)=>e+t))/e.length,bi=e=>e?e.map((e=>e.coords)):null,fi=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],vi=({lunchHour:e,status:t,workTime:l})=>{const n=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?h("div",{className:"flex",children:[m("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}),m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-golden border-golden",children:e?n:null})]}):m("div",{className:"flex",children:m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},Ni=({icon:e,title:t,distance:l,time:n},r)=>h("div",{className:"flex mr-4",children:[m(O,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?h("span",{className:"text-m",children:[t," "]}):null,h("span",{className:"text-m-light",children:[l?` (${l})`:null,n?`, ${n}`:null]})]},`nearbyOffice${r}`),yi=({title:e,status:t,workTime:l,lunchHour:n,description:r},a)=>h("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[h("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[m("div",{children:e}),t?null:m("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?m("div",{children:l}):null]}),t&&n?wi(n):null,r?m("div",{className:"pb-1 text-s-light text-secondary-text",children:r}):null]},`day${a}`),wi=e=>/\d+/gi.test(e)?h("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[m("div",{children:"Перерыв"}),m("div",{children:e})]}):m("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:m("div",{children:e})}),Ci={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 ki(e){return e?vt(e,{method:"GET"}):{}}const $i=u((({className:e=""})=>{const t=function(e){const{data:t}=bt(e?`/api/v1/branches?regionCode=${e}`:void 0,ki);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),Ci}("000"),{name:l,address:n,gpsLatitude:r,gpsLongitude:a,workSchedule:i}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:u,workingSaturday:p,workingSunday:x}=i,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=i,N=r&&a?[r,a]: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:u,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 h("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[h("div",{className:"flex flex-col px-12 pt-12",children:[h("div",{className:"flex justify-between",children:[m("div",{className:"text-h2",children:l}),vi(C)]}),h("div",{className:"flex text-l-light pt-4",children:[m(O,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),n]}),m("div",{className:"flex pt-4",children:fi.map(Ni)})]}),h("div",{className:"flex justify-between pt-8",children:[m("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?m(ui,{points:[N],className:"h-full"}):null}),m("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(yi)})]})]})})),Si=u((({className:e="",title:t,servicesList:l,...n})=>h(B,{className:`font-sans bg-white p-8 flex flex-col ${e}`,...n,children:[t?m(j,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?m("ul",{className:"list-none m-0 p-0",children:l.map(Ii)}):null]}))),Ii=(e,t)=>h("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?m(W,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:ee(e.icon)}):null,e.label?m("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),Ti=u((({className:e="",...t})=>m(B,{className:`font-sans text-primary-text ${e}`,...t,children:w(t)})));Ti.childrenTypes=["OtherProductsItem"];const Bi=u((({className:e="",label:t,icon:l,dataTheme:n="",onClick:r})=>h("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":n,onClick:r,children:[m("span",{className:"text-h4 pr-3",children:t}),l?m(W,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),Ri=({isUnfolded:e,onToggle:t})=>m(Bi,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ji=["ArrowDownIcon","ArrowUpIcon"],Vi=u((({className:e,label:t="",isUnfolded:l,...n})=>{const{colorPalette:r}=function(e,t){const{content:l}=function(e){return e?.parent||{}}(e);return l||t}(n.options,{});return m("div",{className:`border-0 border-b border-solid border-main-divider ${e}`,children:m(_,{unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(D,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(n)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(Bi,{label:t,icon:ji[Number(e)],dataTheme:r||n.options?.page?.colorPalette,onClick:l})})})}));Vi.childrenTypes=[];const Li=u((e=>{const{className:t,text:l,size:n,color:r,align:a,font:i,...s}=e;return m(B,{className:t,...s,children:m(V,{size:n,color:r,align:a,font:i,children:l})})})),Mi={primary:"text-primary-text",secondary:"text-white"},_i={primary:"text-secondary-text",secondary:"text-white"},Di=u((e=>{const{className:t="",icon:l,label:n,description:r,version:a="primary",benefitsVersion:i="normal"}=e,s="white"===i?"secondary":"primary";return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[l?m("div",{className:Ai(a,i),children:m(W,{className:"w-6 h-6",image:ee(l,s),asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[n?m("div",{className:`text-h6 ${Mi[a]}`,children:n}):null,r?m("div",{className:`text-m-light ${_i[a]}`,children:r}):null]})]})}));function Ai(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 Oi=u((({className:e="",title:t,description:l,image:n,benefits:r,version:a="primary",sum:i,monthLimit:s,directionRight:o=!1,...c})=>h(B,{className:`relative font-sans py-12 px-24 ${q[a]} ${e}`,...c,children:[m(De,{className:"!p-0",title:t,description:l,headlineVersion:"M",bgColorHeadline:a,align:"center",...c}),h("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[n?.src?m(W,{className:o?"order-2":"",image:n}):null,h("div",{className:"w-[558px] m-auto",children:[r?.length?m("div",{className:"flex flex-col gap-4",children:r.map(zi(a))}):null,Ei(Number(i),Number(s))]})]})]}))),zi=e=>(t,l)=>m(Di,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));function Ei(e,t){return e||t?h("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Fi("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Fi("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Fi(e,t=0,l=!1){return h("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[m("span",{className:"text-secondary-text text-l-light",children:e}),h("span",{className:"text-primary-main text-h6",children:[Qe(t)," ₽"]})]})}function Pi(e=""){const t=Ya(e);return t<=4?"S":t<=8?"M":"L"}function Ui(e=""){const t=Ya(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Hi=u((({className:e,title:t,description:l="Блок в разработке...",...n})=>h(B,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Ui(e)} ${Za(e)} `,...n,children:[m(De,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:Pi(e),...n}),m("figure",{className:"m-0 min-w-[80%]",children:Xi()})]}))),Xi=(e=3)=>Wi(100,e).map((e=>Math.floor(e))).map(Gi),Gi=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Wi=(e,t)=>[e].concat(t>0?Wi(e/1.618,t-1):[]),Ji=u((({className:e="",children:t,...l})=>{const n=ge(),{text:r,href:a,target:i,onClick:s}=n(l);return a?m("a",{className:`no-underline ${e}`,href:a,target:i,onClick:s,children:m("span",{className:e,children:r||t})}):m("span",{className:e,children:r||t})})),Yi=(e="primary",t="normal")=>({icon:l,label:n,description:r},a)=>m(Di,{icon:l,label:n,description:r,version:e,benefitsVersion:t},String(a)),Zi=u((({className:e="",title:t,headlineVersion:l="L",description:n,benefitsCountOfRow:r=3,benefits:a,benefitsVersion:i,buttons:s,footnote:o,image:c,items:d,version:u="primary",isDotted:p=!0,textBlockClassName:x="",...g})=>{const b=a?.filter((e=>e.label))?.length,f=Ki(r);return h("div",{className:`flex grow justify-between items-stretch h-full ${e}`,children:[h("div",{className:`flex flex-col ${x}`,children:[m(De,{title:t,description:n,className:"!p-0 max-w-[600px]",bgColorHeadline:u,headlineVersion:l,align:"left",...g}),h("div",{className:"flex flex-col justify-between h-full",children:[h(bl,{buttons:s?.length?m(Re,{buttons:s,className:"flex gap-4",...g}):null,children:[b?m("div",{className:f,children:a.map(Yi(u,i))}):null,d?.length?m(jl,{className:"mt-5 text-h6",items:d,itemClassName:"mb-[7px]",version:u,isDotted:p}):null]}),o?m("p",{className:"text-m-light pt-12",children:o}):null]})]}),c?.src&&m(W,{className:"mt-[-50px]",image:c})]})})),Ki=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function qi(e,t,l){const{text:n,href:r,target:a,onClick:i}=e,s="primary"===t?"white":"black",o=e?.icon||{icon:"ArrowLeftIcon"};return h("div",{className:`flex items-center cursor-pointer ${l}`,onClick:i,children:[m(Ie,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:n,href:r,target:a,children:m(W,{className:"w-4 h-4",image:{...o,iconVersion:o.iconVersion||s},asSVG:!0})}),n?m("span",{className:"text-m",children:n}):null]})}const Qi={primary:"text-secondary-text",secondary:"text-white/80"},es=u((e=>{const{className:t="",breadcrumbs:l,backwardButton:n,version:r="primary",...a}=e,i="primary"===r?r:"white";return h(B,{className:`font-sans overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${q[r]} ${t}`,...a,children:[n?.text?qi(n,i,"mb-10 -mt-2.5"):null,l?.length?m("div",{className:"text-xs-light mb-6",children:La(m("span",{className:`mx-2 ${Qi[r]}`,children:"/"}))(l.map(((e,t)=>m(Ji,{className:Qi[r],...e},String(t)))))}):null,m(Zi,{version:r,...a})]})})),ts={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},ls=u((({className:e="",slides:t=[],version:l="primary",...r})=>{const i=t.map((e=>e.nav)),s=t.map((e=>e.productBlock)),[o,c]=n(0),d=a((e=>c(e)),[]);return h(B,{className:`box-border pt-12 overflow-hidden relative font-sans w-100 mb-6 ${e}\n ${q[l]}`,...r,children:[m("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,t)=>function(e,t){const{version:l}=e,n=l?ts[l].title:"";return m("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:m("div",{className:"flex grow",children:m(Zi,{className:`pl-12 z-10 ${n}`,textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...r,version:l},t)))}),m("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:n,version:r}){const a=l?"bg-white shadow-dark-blue/42 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\n ${q[r]}`,i=l?"text-primary-text !text-h6 p-2":`text-l pb-1 ${ts[r].title}`,s=l?"text-secondary-text text-l-light":`text-m-light ${ts[r].text}`;return m("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0\n ${a} ${gl[r]}\n `,children:h("div",{className:"border-0 px-6",children:[m("div",{className:`last:pb-0 ${i}`,children:e?.title}),m("div",{className:`text-secondary-text ${s}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===o),onClick:()=>d(t),version:l})))})]})}));const ns={primary:"text-secondary-text",secondary:"text-white"};function rs(e,t,l="primary"){if(!e)return null;return m("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:m(V,{size:"text-m",font:"font-light",color:ns[l],children:e})})}const as=u((e=>{const{md:t=""}=e;return m("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));function is(e){throw new Error(e)}const ss={primary:"text-secondary-text",secondary:"text-white"},os=(e="primary")=>(t,l)=>{const{type:n}=t;if("default"!==n&&"md"!==n)return null;switch(n){case"default":return[m(J,{size:"text-h6",children:t.label},`label-${l}`),m(J,{size:"text-m-light",color:ss[e],children:t.description},`desc-${l}`)];case"md":return m(as,{md:t.md});default:is(t)}};function cs(e,t){return e?.src?m(W,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const ds=u((({className:e="",title:t,headlineVersion:l="S",description:n,additionalDescription:r,benefits:a=[],buttons:i,image:s,isImageOnRightSide:o=!0,version:c="primary",...d})=>h(B,{className:`overflow-hidden font-sans p-9 box-border relative min-h-[364px]\n ${q[c]} ${Ui(e)} ${e}`,...d,children:[h("div",{className:"flex flex-col "+(o?"":"items-end"),children:[m(De,{className:"!p-0 !bg-transparent z-10 "+(t||n?"mb-3.5":""),as:"h2",title:t,description:n,headlineVersion:l,bgColorHeadline:c,align:"left",...d}),ms(a,c,s),rs(r,s),i?.length?m(Re,{buttons:i,className:"mt-5 gap-4 z-10 text-l"}):null]}),cs(s,o)]})));function ms(e,t,l){if(!e.length)return null;return m("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline\n ${l?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(os(t)):null})}const hs=u((({className:e="",title:t="Акции и спецпредложения",date:l,description:n,buttons:r=[],version:a="primary",...i})=>m(B,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${q[a]} ${Ui(e)} ${Za(e)} `,...i,children:m(bl,{title:t?m(De,{title:t,className:"!p-0 max-w-[600px]",headlineVersion:Pi(e),bgColorHeadline:a,align:"left",as:"h2",...i}):null,buttons:r?.length?m(Re,{buttons:r,className:"flex gap-3"}):null,children:h("div",{className:"mt-1.5",children:[l?m("div",{className:"text-s mb-2",children:us(l)}):null,m("div",{className:"text-l",children:n})]})})})));function us(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const ps=u((({button:e,className:t="",description:l,image:n,items:r=[],socialMedia:a=[],title:i,version:s="primary",...o})=>{const c=i?m(j,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:i}):null,d=n?.src?m(W,{className:"absolute bottom-0 right-0 m-0",image:n}):null;return m(B,{className:`relative text-left border border-solid box-border p-7 min-w-[524px]\n ${gl[s]}\n ${q[s]}\n ${t}`,...o,children:m(bl,{className:"flex justify-between",title:c,image:d,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,r.length?m(jl,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:r,version:s}):null,a.length?m(vr,{className:"pt-10 pb-0",media:a,version:s}):null,e?.text?m("div",{className:"pt-2 mt-16",children:je({button:e})}):null]})})})})),xs=u((({className:e="",title:t,description:l,items:n,image:r,version:a,socialMedia:i,button:s})=>{const o=t?m(j,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:t}):null,c=r?.src?m(W,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return m("section",{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${e}`,role:"listitem",children:m(bl,{className:"flex justify-between",title:o,image:c,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,n?.length?m(jl,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:n,version:a}):null,i?m(vr,{className:"pt-10 pb-0",media:i,version:a}):null,s?.text?m("div",{className:"pt-2",children:je({button:s,buttonClassName:"mt-16 px-5"})}):null]})})})})),gs="absolute top-0 bottom-0 w-[84px]",bs=u((({recommendations:e=[],className:t="",title:l,version:n="primary",...r})=>{const[a,i]=Je({itemCount:e.length,visibleItemCount:2});return h(B,{className:`relative font-sans p-9 overflow-hidden text-center ${q[n]} ${t}`,...r,children:[l?m(j,{headingType:"h3",className:"mb-6",title:l}):null,h("div",{children:[m("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*a}px)`},role:"list",children:e.length?e.map(((e,t)=>m(xs,{version:n,className:gl[n],...e},String(t)))):null}),qe({...i,btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})]}),m("div",{className:`${gs} left-0 ${"secondary"===n?"bg-opacity-from-main":"bg-opacity-from-white"}`}),m("div",{className:`${gs} right-0 ${"secondary"===n?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),fs=u((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:n=!0,version:r="primary",...a})=>m("div",{className:`border-b border-solid border-main-divider w-full ${e}`,children:m(_,{isFoldButtonOnTop:n,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(D,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(a)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>vs({isUnfolded:e,onToggle:l,label:t,version:r})})})));fs.childrenTypes={exclude:["RollupItem","Accordion","AccordionItem","OtherProducts","OtherProductsItem","VerticalLayout"]};const vs=({isUnfolded:e,onToggle:t,label:l,version:n})=>{const r=l?[l,l]:["Развернуть","Скрыть"];return"primary"===n?m(Ns,{icon:["PlusIcon","MinusIcon"][Number(e)],label:r[Number(e)],onClick:t}):m(Bi,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:r[Number(e)],onClick:t})},Ns=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m("span",{className:"text-xl font-medium pr-2.5",children:e}),t?m(W,{image:ee({icon:t}),width:"24",height:"24",asSVG:!0}):null]}))),ys=[];const ws=async e=>await vt(e,{method:"GET"})||ys,Cs=u((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:r="",setSelected:a,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return m(_n,{options:s,label:i,placeholder:r||n,onChange:e=>a(e.key),value:o})})),ks=u((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:r,onSelectedBranch:a})=>h("div",{className:"flex justify-between gap-4 mb-6",children:[m("div",{className:"max-w-[396px] w-1/2",children:m(Cs,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),m("div",{className:"max-w-[396px] w-1/2",children:m(Cs,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:r,setSelected:a,label:"Отделение",placeholder:"Выберите отделение"})})]}))),$s=u((({name:e,text:t,value:l,checked:n,onChange:r,className:a})=>m("div",{className:a,children:h("label",{className:"font-sans flex items-center relative cursor-pointer",children:[m("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-checkbox-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>r(e.target.value)}),t?m("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),Ss=u((()=>{const[e,t]=n("option2"),l=a((e=>t(e)),[]);return h("div",{children:[m($s,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),m($s,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),Is=["От 1 дня","До 365 дней"],Ts=u((({days:e,setDays:t})=>h("div",{className:"mb-6",children:[m("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),m(ht,{min:1,max:365,value:e,items:Is,onChange:t})]}))),Bs=u((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:r,onSelectedBoxSize:a})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"mr-4 w-full",children:m(Cs,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),m("div",{className:"w-full",children:m(Cs,{data:n,fieldLabel:"safeBoxCasesSize",selected:r,setSelected:a,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Rs=u((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:r,selectedCaseVolume:a,selectedBoxSize:i,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>h("div",{className:"flex-1 mr-9",children:[m(ks,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:js(c)}),m(Ts,{days:r,setDays:e=>c({days:e})}),m(Bs,{caseVolumes:o,selectedCaseVolume:a,onSelectedCaseVolume:Vs(c),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),m("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),h("div",{className:"flex justify-between items-center mt-5",children:[m(Ss,{}),m(Ie,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),js=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Vs=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ls=u((({days:e,tariffs:t=[]})=>{const l=_s(e,t);return h("div",{className:"flex flex-col justify-between",children:[h("div",{className:"flex",children:[Ms("Аренда за",e,"mr-11"),Ms("Цена",l+" ₽")]}),h("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[m(W,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),h("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",m("br",{})," листов формата А4"]})]})]})})),Ms=(e,t,l="")=>h("div",{className:l,children:[m("div",{className:"text-m-light text-secondary-text mb-1",children:e}),m("span",{className:"text-h3 text-primary-text",children:t})]}),_s=(e,t)=>{const l=Ds(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Ds=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},As=(e,t)=>e.find((e=>e.branchCode===t)),Os=u((e=>{const{regions:t,data:l,branches:n,onChange:a,onClick:i}=e;r((()=>{a({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,a]);const s=As(n,l.selectedBranch),o=zs(s?.safeBoxCaseVolumes),c=Es(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Fs(c,l.selectedBoxSize);return h("div",{className:"flex justify-between align-top mb-6",children:[m(Rs,{...l,regions:t,onClick:i,branches:n,caseVolumes:o,safeBoxCases:c,onChange:a}),m(Ls,{days:l.days,tariffs:d})]})})),zs=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Es=(e,t)=>e?.find((e=>e.volume===t)),Fs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs;const Ps=u((({title:e,footnote:t,className:l="",...r})=>{const[i,s]=n(!1),o=a((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=function(){const{data:e}=bt("/api/v1/regions",Nt);return e||[]}(),p=Us(c.selectedRegion,u),x=function(e){const{data:t}=bt(e?`/api/v1/safeboxes?regionCode=${e}`:null,ws);return t||ys}(p),g=a((e=>d((t=>({...t,...e})))),[d]),b=(f=As(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 h(B,{className:l,...r,children:[h("div",{className:"font-sans bg-white px-8 py-12",children:[e?m(j,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,m(Os,{regions:u,branches:x,data:{...c,selectedRegion:p},onClick:o,onChange:g}),t?m("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&i?m(ui,{points:b,className:"h-[640px]"}):null]})})),Us=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Hs=e=>Boolean(e?.icon||e?.src),Xs=({items:e,isDotted:t=!0,version:l="primary",className:n=""})=>e?m(jl,{className:n,version:l,items:e,listItemSize:"M",isDotted:t}):null,Gs=({styleMap:e,isMainButton:t,version:l})=>(n,r,{length:a})=>{const{label:i,description:s,button:o,items:c,isDotted:d}=n,u=i&&(s||c)?"mt-2":"";return h("div",{className:`relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${Zs(a)}`,children:[h("div",{className:(o?.text?"mb-8":"")+" text-center",children:[Ws(i),h("div",{className:`${u} flex flex-col items-center`,children:[Js({description:s,className:e.description}),Xs({items:c,isDotted:d,version:l,className:Ys({className:"text-left",description:s,styleMap:e})})]})]}),o?.text&&!t?m(Ie,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(r))},Ws=e=>e?m("div",{className:"text-h6",children:e}):null,Js=({description:e,className:t=""})=>e?m("div",{className:t,children:e}):null,Ys=({className:e,description:t,styleMap:l})=>[t?l.description:"text-h6",t?"mt-0.5":"",e].join(" "),Zs=e=>e<5?"w-[276px]":"w-[210px]",Ks={primary:{background:"bg-white",title:"text-primary-text",description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{background:"bg-primary-main",title:"text-white",description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},qs=u((({className:e="",showLines:t=!0,steps:l=[],button:n,version:r="primary",...a})=>{const{title:i}=a,s=Ks[r],o=l.length>3,c=(e=>e?"":"opacity-0")(t),d=i?"mt-9":"",u=(e=>e<5?"px-[88px]":"px-[55px]")(l.length);return h(B,{className:["box-border py-12 font-sans",o?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",s.background,s.title,e].join(" "),...a,children:[i?m(j,{headingType:"h3",className:"max-w-[752px] text-center",title:i}):null,l?.length?h("div",{className:`box-border ${d}`,children:[m("div",{className:`flex items-center ${u}`,children:La(m("div",{className:`h-0.5 w-full bg-secondary-light ${c}`}))(l.map(Qs(s,r)))}),m("div",{className:"flex justify-between mt-4 "+(o?"gap-x-3":"gap-x-[101px]"),children:l.map(Gs({styleMap:s,isMainButton:Boolean(n?.text),version:r}))})]}):null,n?.text?m(Ie,{className:"mt-8 min-w-60",version:"primary",...n}):null]})})),Qs=(e,t)=>({icon:l},n)=>m("div",{className:"flex flex-col items-center text-center",children:m("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\n ${e.iconBackground} ${e.title}`,children:Hs(l)?m(W,{image:ee(l||{},t),width:"48",height:"48",asSVG:!0}):m("span",{className:`text-h4 ${e.iconText}`,children:n+1})})},String(n)),eo="h-12 flex-1 flex items-center justify-center cursor-pointer",to="bg-primary-main",lo="group bg-white",no="font-sans text-m",ro="text-white",ao="text-secondary-text group-hover:text-primary-main",io=u((e=>{const{tab:t,currentTab:l}=e,n="link"===l?.type&&l.href===t.href,r=ge()(t);return m("a",{role:"tab",className:`${eo} ${n?to:lo}`,target:t.target,href:r.href,onClick:r.onClick,children:m("span",{className:`${no} ${n?ro:ao}`,children:t.text})})})),so=(e,t)=>m("h3",{className:`${no} ${t?ro:ao}`,children:e}),oo=(e,t)=>m("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(t?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover:text-primary-main"),children:e}),co=({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,a)=>{const i=r.type;if("group"!==i&&"link"!==i)return null;switch(i){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,a)=>{const i=t===r,s=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return m("div",{className:`${eo} ${i?to:lo}`,role:"tab","aria-selected":i,onClick:()=>n(r),children:h("div",{className:"flex flex-1 items-center justify-center",children:[r?.title?so(r.title,i):null,l&&s?oo(s,i):null]})},String(a))})({page:e,currentTab:t,showCounter:l,onClick:n})(r,a);case"link":return m(io,{tab:r,currentTab:t},String(a));default:is(i)}},mo=u((e=>{const{className:t="",tabs:l,showCounter:i,isSticky:s,...o}=e,[c,d]=n(l?l[0]:void 0);r((()=>k.inst.subscribe("tab",(e=>{const t=l?.find(ho(e));"link"===e.type&&t&&d(t)}))),[l]),r((()=>"group"===c?.type?k.inst.subject("tab",{label:c.ref}):void 0),[c]);const h=a((e=>{"group"===e?.type&&k.inst.fire("tab",{type:e.type,label:e.ref}),d(e)}),[]);return m(B,{className:`${s?"sticky top-1 z-20 ":""}box-border flex gap-x-1 ${t}`,role:"tablist",...o,children:l?.map(co({onClick:h,currentTab:c,showCounter:i,...o}))})})),ho=e=>t=>"link"===t.type&&t.href===`#${e.label}`,uo=u((({isOpen:e,onClick:t})=>h(Ie,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[m("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),m(O,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),po={Buttons:({buttons:e})=>e&&e?.length?m("div",{children:e.map((({rounded:e,...t},l)=>je({button:{rounded:e,...t},buttonClassName:(l>0&&e?"ml-3":"")+" w-12 h-12"})))}):null,Img:({image:e})=>e?.src?m(W,{image:e}):null,List:({isDotted:e,...t})=>m(jl,{className:"flex flex-col justify-between items-start text-h6",version:"primary",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:u((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:r})=>e?m(uo,{isOpen:r,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null))},xo=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,u]=n(!0);r((()=>{t===i&&a||u(!0)}),[a,i]);return h("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?m("div",{className:"h-5"}):null,go({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{u(!1),s(t),l(e)},isVisible:d}})]},String(c))},go=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in po))return null;return m(po[l],{...t,...n})},bo=u((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:a,setOpenTableInnerIdx:i})=>m("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(xo({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:a,setOpenTableInnerIdx:i})):null}))),fo=u((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=Je({itemCount:t,visibleItemCount:5});return h("div",{children:[e?.map(vo(l)),qe({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),vo=e=>(t,l)=>{if(!t?.length)return null;const[n,...r]=t,a=[...Array(e).keys()].reduce(((e,t)=>140*(r?.[t]?.cols?.length??1)+e),0),i=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return h("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[n?.data?m("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:n.data}):null,m("div",{className:"flex flex-grow overflow-hidden",children:m("div",{className:i,style:{transform:`translateX(-${a}px)`},children:r?.map(((t,l)=>h("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?m("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?No(t.cols,e):null]},`row${l}`)))})})]},String(l))},No=(e,t)=>e?.length>0?m("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>m("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,yo=u((({activeTabIndex:e,items:t})=>{const[l,r]=n({}),i=a((e=>r((t=>({...t,[e]:!t[e]})))),[]);return m("div",{children:t.map(((t,n)=>{const r=`activeTabIdx:${e}-tableIdx:${n}`;return h("div",{className:"w-full",children:[h("div",{className:"flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>i(r),children:[t.title,m(W,{image:l[r]?"PlusIcon":"MinusIcon",className:"absolute right-[22px]",width:"24",height:"24"})]}),m("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[r]?"h-0":""),children:m("div",{className:"relative",children:m(fo,{rows:t.rowsData})})})]},r)}))})})),wo=u((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>h("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?m("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>m("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?m(Ie,{href:t,version:"secondary",target:"_blank",appendLeft:m(O,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function Co(e){const t=await fetch(e);return await t.json()}const ko=u((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:r}=function(e){const{data:t}=bt(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Co);return t||{}}(e),[i,s]=n(0),o=a((e=>s(e)),[]),c=r?.[i]?.items??[],d=r?.map((e=>e.currency??""));return h("div",r?{className:"bg-white z-10",children:[m(wo,{currencies:d,activeTabIndex:i,setActiveTabIndex:o,linkToPDF:t}),m(yo,{activeTabIndex:i,items:c}),m(uo,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[m("p",{children:"Данных нет"}),m(uo,{onClick:l,isOpen:!0})]})})),$o=u((({children:e,tableInner:t,onHideContentClick:l})=>h("div",{className:"self-start flex flex-col",role:"row",children:[m("div",{className:"flex",children:e}),t?m("div",{className:"origin-top animate-expansion",children:m(ko,{...t,onClick:l})}):null]}))),So=u((({row:{header:e,data:t},activeIndex:l,rowIdx:r,...i})=>{const[s,o]=n(void 0),c=a((e=>o(e)),[]),[d,u]=n(void 0),p=a((e=>u(e)),[]);return h($o,{onHideContentClick:()=>o(void 0),tableInner:s,...i,children:[m("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:h("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?m(W,{className:"mr-3.5 max-w-6 max-h-6",image:ee(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?m("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?m(rn,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>m(bo,{cells:e,rowIdx:r,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:p,...i},String(t))))}):null]})})),Io=u((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:r,hiddenRowsNum:a=0,...i})=>{const s=r?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,u]=Je({itemCount:c,visibleItemCount:2}),p=(o||[]).map(((e,t)=>m(So,{row:e,activeIndex:d,rowIdx:t,...i},String(t)))),[x,g]=a>0?[p.slice(0,-a),p.slice(-a)]:[p,[]];return h(B,{className:`bg-white font-sans p-12 overflow-hidden text-primary-text relative ${c>1?"pr-0":""} ${e}`,...i,children:[To({title:t,description:l}),Bo(l),a>0?m(_,{renderFoldableSection:({isUnfolded:e})=>h(Ro,{controls:u,children:[x,m(D,{isUnfolded:e,children:g})]}),renderFoldButton:Ri}):m(Ro,{controls:u,children:p})]})}));function To({title:e,description:t}){return e?m(j,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function Bo(e){return e?m("div",{className:"mb-9 text-center text-l",children:e}):null}const Ro=u((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return h("div",{role:"table",children:[h("div",{className:"relative",children:[e,qe({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),jo={primary:"bg-white",secondary:"bg-primary-main","secondary-light":"bg-primary-main/10"},Vo=u((({className:e="",title:t,description:l,blockVersion:n="primary",iconVersion:r,image:a,...i})=>{const s="secondary"===n;return h(B,{className:`px-9 py-4 flex gap-3 ${jo[n]} ${e}`,...i,children:["small"===r?m("div",{className:"mt-1",children:Lo(s)}):null,"big"===r?Mo(a):null,h("div",{children:[t?_o(t,s):null,l?m("div",{className:"mt-1",children:Do(l,s)}):null]})]})})),Lo=e=>m("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"}),Mo=e=>e?.src?m(W,{image:e}):null,_o=(e,t)=>m(J,{size:"text-l",font:"font-medium",color:t?"text-white":"text-primary-text",children:e}),Do=(e,t)=>m(V,{size:"text-s",color:t?"text-white":"text-secondary-text",children:e}),Ao=u((e=>{const{tags:t,className:l=""}=e;return t?.length?m("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Oo)}):null})),Oo=(e,t)=>m("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-color-stroke",children:e},String(t)),zo=u((e=>{const{title:t,headingType:l="h3",description:n,items:r,buttons:a,image:i,isDotted:s=!0,listItemSize:o="M",className:c="",version:d="primary",tags:u,children:p,...x}=e,g="primary"===d?"text-primary-text":"";return m(B,{className:`overflow-hidden font-sans p-9 pr-3 box-border ${c} ${q[d]} ${Ui(c)} ${Za(c)} `,...x,children:h(bl,{title:t?m(j,{headingType:l,as:"h2",title:t,className:`whitespace-pre-wrap max-w-[600px] ${g}`}):null,buttons:a?.length?m(Re,{buttons:a.map((e=>({...e,className:"min-w-[158px]"}))),className:"flex mt-8 gap-3",...x}):null,image:i?.src?m(W,{className:"mt-auto ml-7",image:i}):null,children:[n?m("div",{className:"max-w-[600px] mt-2.5",children:m(V,{size:"text-xl-light",children:n})}):null,p,Eo({version:d,isDotted:s,listItemSize:o},r),u?.length?m(Ao,{tags:u,className:"mt-5"}):null]})})}));function Eo({version:e,isDotted:t,listItemSize:l},n){return n?.length?m(jl,{items:n,isDotted:t,className:"mt-2.5",listItemSize:l,itemClassName:"mb-1.5",version:e}):null}const Fo={left:"items-start",center:"items-center",right:"items-end"},Po={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},Uo={transparent:"",primary:"bg-white",secondary:"bg-primary-main"},Ho=u((({className:e="",gap:t="",align:l,isPadding:n=!1,isInnerPadding:r=!0,version:a="transparent",options:i,...s})=>{const o=r?"":"!p-0";return m(B,{className:["flex flex-col [&>*]:max-w-full",n?"p-12":"",Po[t],l&&Fo[l],Uo[a],e].filter(Boolean).join(" "),...s,children:w({...s,options:{...i,className:o}})})}));Ho.childrenTypes={exclude:["VerticalLayout"]};const Xo=e=>Ya(e)<10?"py-6 px-11":"py-12 px-32",Go=u((e=>{const{title:t,src:l,previewImg:n,className:r="",...a}=e;return h(B,{className:`bg-white ${Xo(r)} ${r}`,...a,children:[m(De,{title:t,headlineVersion:"M"}),l?m("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:n?.src,style:{maxHeight:524},controls:!0,children:m("source",{src:l})}):null]})})),Wo={Accordion:M,AccordionItem:Z,BenefitsBlock:re,BusinessBlock:Ge,ButtonBlock:We,Bonus:Ae,BonusBenefitsBlock:Fe,CardTransfer:Jt,Calculator:Et,Carousel:ol,CarouselCard:hl,CarouselCatalogCard:pl,CarouselInvestmentCard:vl,CarouselLinks:Cl,CarouselProductCard:Ml,CarouselProgramsCard:El,CarouselTariffsCard:Pl,Catalog:Kl,ContactsBlock:fn,ComparisonTable:gn,ErrorBlock:wn,ExchangeRateTile:Jn,Footer:Cr,Gallery:_r,GracePeriod:Dr,Header:ka,Headline:De,ImgBlock:Sa,InsuranceAmountBlock:ja,InvestmentInfo:Da,LinkDocs:Wa,MiniGallery:Ja,MobileAppTile:Ka,ParagraphBlock:Li,PictureText:Oi,Placeholder:Hi,ProductBlock:es,ProductGallery:ls,ProductTile:ds,PromoTile:hs,OfficeServicesBlock:Si,OtherProducts:Ti,OtherProductsItem:Vi,CarouselRecommendationCard:ps,RollupItem:fs,SafeDepositRental:Ps,StepsBlock:qs,Tabs:mo,TariffsTable:Io,TextBlock:Vo,Tile:zo,VerticalLayout:Ho,Video:Go,Recommendation:bs,OfficeMap:$i},Jo=["Header","Footer"],Yo=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Zo(e=T.inst,t=globalThis){const l=s(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{l.current&&l.current.set(e,t)}))),[e]),r((()=>{const n=((e,t=600)=>{let l;const n=(...r)=>{n.dispose(),l=setTimeout((()=>{e(...r)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!Jo.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?ll(Yo)(t):[];return l}([...l.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",n),()=>{n.dispose(),t.removeEventListener("scroll",n)}}),[e,t])}const Ko=d();const qo=u((({className:e,onClick:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Qo()}))),Qo=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("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"}),m("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"})]})},ec=u((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return r((()=>{(async()=>{const[t]=await Ko.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:a((async()=>{l(await Ko.like(e))}),[e]),dislike:a((async()=>{l(await Ko.dislike(e))}),[e])}}(xe().pathname);return h("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:[m(qo,{onClick:pe(t.like),ariaLabel:"Поставить отметку «лайк»"}),m(qo,{onClick:pe(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:t.likeCount})]})})),tc=u((e=>{const{className:t="",blocksRegistry:l,blockDecorator:n,data:r={}}=e,{style:a,blocks:i,slots:s,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:l,blockDecorator:n,parent:r};return Zo(),h("section",{className:`relative ${x(a)} ${t}`,"data-theme":c,children:[s?.header?m("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,h("div",{className:"container grid grid-cols-12 gap-1",children:[y(i,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(ec,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));tc.childrenTypes=[],tc.slots=()=>["header","footer"];e.Blocks=Wo,e.ContentPage=tc,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=d,e.handlerDecorator=pe,e.joinList=La,e.packageVersion="0.6.43",e.projectSettings=o,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})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),r=l("useEffect"),i=l("useCallback"),a=l("useMemo"),s=l("useRef");const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}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}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(c)||"");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(c,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/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,l){const{children:n,...r}=t||{},i=l?.slots?.default,a=n||i&&i();return e(Object.assign(r,a&&{children:a}),l)}return t.inheritAttrs=!1,t};function x(e){return e?e.filter(Boolean).join(" "):""}const g=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),b=[],f=["col-span-12"];function v(e,t){const{key:l,blockDecorator:n=g,blocksRegistry:r={},ancestors:i=b,className:a=""}=t,{type:s}=e;s&&s in r||console.warn(`No block with "${s}" is registered`);const o=s&&r[s];return n({blockClassName:`scroll-mt-12 ${a} ${x(e.style||f)}`,block:e,ancestors:i,render:({block:n,blockClassName:r})=>{const{content:i}=n;return o?m(o,{className:r,block:e,options:t,...i},l):null}},l)}const N=[],y=(e,{key:t,ancestors:l=N,slotName:n=null,renderChild:r=v,...i})=>(e||[]).map(((e,a)=>r(e,{...i,key:`${t||e.type}-${a}`,ancestors:i.parent?[...l||N,[i.parent,n]]:l})));function w({children:e,block:t,options:l,renderChild:n}){return e||(t&&l?y(t.blocks,{...l,parent:t,renderChild:n}):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 $(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=a((()=>({threshold:S(t),root:l?.current})),[t,l?.current]);return r((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function S(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("#","");class T{static inst=new T;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,"",`#${I(e)}`)}replace(e){globalThis.history?.replaceState(null,"",`#${I(e)}`)}reset(){globalThis.history?.replaceState(null,"","#")}}const B=u((({className:e,block:t,tag:l="section",role:a,children:s})=>{const o=l,c=function(e,t=T.inst){const l=$(i((l=>{if(!e||!l?.length)return;const n=l[l.length-1];t.eventBus.fire("intersection",{block:e,intersection:n})}),[e,t]),{sensitivity:1});return r((()=>{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}(t),[d,h]=n(!0);return r((()=>k.inst.subscribe("tab",(e=>{if("group"===e.type){const l=t?.labels?.length||t?.anchor;h(!e.label||(!l||Boolean(t?.labels?.includes(e.label))))}else h(!0)}))),[t]),d?m(o,{className:e,role:a,...t?.anchor?{id:t.anchor,ref:c}:{},children:s}):null})),R={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},j=u((e=>{const{className:t="",headingType:l="h3",title:n,as:r="h3"}=e;return m(r,{className:`font-sans m-0 ${R[l]} ${t}`,children:n})})),V=u((e=>{const{size:t="",color:l="",align:n="",font:r="",children:i}=e;return m("p",{className:`font-sans ${t} ${l} ${n} ${r}`,children:i})})),L=u((({children:e})=>m("ul",{className:"list-none m-0 p-0",children:e}))),_=u((({className:e="",title:t,accordionAlignTitle:l="center",description:n,...r})=>h(B,{className:`p-12 mb-1 last:mb-0 bg-white text-primary-text ${e}`,...r,children:[t?m(j,{headingType:"h3",as:"h2",className:`mb-2.5 ${C[l]}`,title:t}):null,n?m("div",{className:"mb-2.5",children:m(V,{size:"text-l",children:n})}):null,m(L,{children:w(r)})]})));_.childrenTypes=["AccordionItem"];const M=u((({isFoldButtonOnTop:e=!1,unfoldedByDefault:t=!1,renderFoldableSection:l,renderFoldButton:r})=>{const[a,s]=n(t),o=i((()=>{s((e=>!e))}),[]),c=l({isUnfolded:a,onToggle:o}),d=r?r({isUnfolded:a,onToggle:o}):null;return h("div",e?{children:[d,c]}:{children:[c,d]})})),A=u((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return r((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),m("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),D={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},O=u((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:r=n,iconVersion:i="color",asSVG:a,...s})=>{const c=`${o.CDN||""}icons/${l}.svg`;return a&&"normal"!==i?m(P,{className:e,children:h("svg",{className:[E(e,s.width),D[i],t,z(i)].join(" "),...s,"aria-hidden":"true",children:[r?m("title",{children:r}):null,n?m("desc",{children:n}):null,m("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):m("img",{className:e,src:c,alt:n,title:r,...s,"aria-hidden":"true"})})),z=e=>"white"===e?"invert":"",E=(e,t)=>t?`width: ${t}px `:"w-full h-full",P=u((({className:e,children:t})=>e?m("div",{className:e,children:t}):t));function F(e){return"string"==typeof e?"normal":e?.iconVersion||"normal"}const U=(e,t)=>e.media&&t.media?e.media-t.media:0,H=u((({className:e="",image:t,imageClassName:l="",isMobile:n=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${n?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(U).map((({src:e,format:l,media:n},r)=>m("source",{srcSet:e,type:G(l),media:n?`(max-width: ${n}px)`:"",...t.size},`${r}_${e}`))):null,X(t,l,n)]})})),X=(e,t="",l=!1)=>{const n={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",i=e.alt||e.title,a=l?"m-auto":"m-0";return m("img",{src:e.src,className:`${a} ${t}`,alt:i,title:r,style:n,...e.size})};function G(e){return e?`image/${String(e)}`:void 0}const W=u((({className:e="",image:t,imageClassName:l="",isMobile:n,...r})=>{if(!t)return null;const i="string"==typeof t?t:t.icon;return i||""===i?i.length?m(O,{className:e,imageClassName:l,iconVersion:F(t),name:i,...r}):null:m(H,{className:e,imageClassName:l,image:t,isMobile:n})})),J=u((({size:e,color:t,align:l,font:n,children:r})=>m("span",{className:["font-sans",e,t,l,n].filter(Boolean).join(" "),children:r}))),Y=["PlusIcon","MinusIcon"],Z=u((({className:e="",label:t="",isExpanded:l,...n})=>m("li",{className:`border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,children:m(M,{isFoldButtonOnTop:!0,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m(A,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:w(n)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(K,{label:t,icon:Y[Number(e)],onClick:l})})})));Z.childrenTypes=[];const K=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m(J,{size:"text-xl",font:"font-medium",children:e}),m(W,{image:t,className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0})]}))),q={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Q={primary:"text-secondary-text",secondary:"text-white"},ee=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),te={primary:"",secondary:"text-white"},le={primary:"text-secondary-text",secondary:"text-white opacity-80"},ne={primary:"bg-main-divider text-primary-main",secondary:"bg-white/30 text-black"},re=u((({className:e="",title:t,benefitList:l,version:n="primary",...r})=>h(B,{className:`font-sans text-primary-text p-12 flex flex-col items-center ${e} ${q[n]}`,...r,children:[t?m(j,{headingType:"h3",as:"h2",className:`max-w-[47rem] text-center ${te[n]}`,title:t}):null,l?.length?m("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(ie(n))}):null]}))),ie=e=>(t,l)=>{const n=t.description;return h("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[t?.icon?.icon?m(W,{className:`w-12 h-12 min-w-12 p-3 rounded-full ${ne[e]}`,image:ee(t.icon,e),asSVG:!0}):null,t?.icon?.src?m(W,{image:t.icon}):null,h("div",{className:"ml-5",children:[t?.label?m("h3",{className:`text-h6 m-0 ${te[e]}`,children:t.label}):null,ae(n,e)]})]},String(l))},ae=(e,t)=>{const l=e?.benefitType||null;return e&&l?m("div",{className:`text-l-light mt-2 ${le[t]}`,children:"list"===l?oe(e):se(e)}):null},se=e=>e?.name||null,oe=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?m("ul",{className:t,children:e.items.map(((e,t)=>m("li",{children:e},`benefitListItem-${t}`)))}):null};const ce=e=>e?.includes("//"),de=e=>(e||"").replace(/\/?\?.*/,""),me=e=>{if(!e||!ce(e))return;const t=e,l=t.indexOf("//"),n=t.indexOf("/",l+"//".length);return-1!==n?t.substring(0,n):t},he=e=>{if(!e||!ce(e))return;return new URL(e).pathname},ue=e=>e?.startsWith("#");var pe=Object.freeze({__proto__:null,isURL:ce,withoutQuery:de,getOrigin:me,getPathname:he,getHash:e=>{if(!e||!ce(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:ue});const xe=(e,t)=>xe._impl(e,t);function ge(){return ge._impl()}function be(){const e=ge(),t=T.inst;return l=>{const n=((e,t)=>{if(!e)return e;const l=me(t?.href);return l?e.replace(l,"")||"/":e})(l.href,e);return{...l,href:n,"aria-label":l.text,onClick:xe((r=>{l.onClick&&l.onClick(r),fe(n,l.target)||(r?.preventDefault(),ue(n)?t.goto(n):n&&e.push(n))}),l)}}}xe._impl=e=>e,xe.setup=e=>{xe._impl=e},ge._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),ge.setup=e=>{ge._impl=e};const fe=(e,t)=>ce(e)||t&&"_self"!==t||e?.startsWith("/"),ve={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:""},Ne="bg-main-divider text-main-disabled",ye={primary:Ne,secondary:Ne,white:Ne,link:""},we="text-center font-sans select-none",Ce={primary:"group-hover:brightness-0 group-hover:invert",secondary:"group-hover:brightness-0 group-hover:invert",white:"group-hover:brightness-0 group-hover:invert",link:""},ke=u((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:r,version:i="primary"}=e;return h("div",{className:$e(e),children:[n?m("div",{className:Ce[i],children:n}):null,Se(e)?h("div",{children:[l?m("div",{className:"text-xs-light text-left",children:l}):null,m("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?m("div",{className:Ce[i],children:r}):null]})})),$e=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const r="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group flex items-center justify-center",Se(e)?r:"h-12 w-12",n?"rounded-full":""].join(" ")},Se=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),Ie=({className:e,rounded:t,version:l})=>["inline-block",we,l?ye[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Te=({className:e,rounded:t,version:l})=>[we,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-focus focus:border",l?ve[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Be=u((({disabled:e,children:t,...l})=>{const n=be()(l),r=t??m(ke,{...n});return m(e?je:Re,{...n,children:r})})),Re=u((({className:e="",href:t,rel:l,target:n,ariaLabel:r,version:i,rounded:a,onClick:s,children:o})=>m("a",{className:Te({className:e,version:i,rounded:a}),href:t,rel:l,target:n,"aria-label":r,role:t?"link":"button",onClick:s,children:o}))),je=u((({className:e,ariaLabel:t,version:l,rounded:n,children:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Ie({className:e,rounded:n,version:l}),children:r}))),Ve=u((({className:e="",buttons:t})=>t&&t?.length?m("div",{className:e,children:t.map(((e,t)=>Le({button:e,index:t})))}):null));function Le({button:e,buttonClassName:t,index:l}){const{icon:n,iconRight:r,version:i,text:a,...s}=e,o="secondary"===i?"color":"white",c=_e({...n,iconVersion:o}),d=_e({...r,iconVersion:o});return a?m(Be,{className:t,appendLeft:c,appendRight:d,version:i,text:a,...s},l?String(l):""):null}const _e=e=>{if(!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return m(W,{image:{...e},width:t,height:"24",asSVG:!0})},Me={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},Ae={XXL:{descriptionFont:"text-h5",gap:"gap-[18px]",headingType:"h0",as:"h1"},XL:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h1",as:"h1"},L:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h2",as:"h2"},M:{descriptionFont:"text-xl-light",gap:"gap-3",headingType:"h3",as:"h3"},S:{descriptionFont:"text-xl-light",gap:"gap-2",headingType:"h4",as:"h4"},XS:{descriptionFont:"text-l-light",gap:"gap-2",headingType:"h5",as:"h5"}},De={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"},Oe=u((({className:e="",bgColorHeadline:t="transparent",align:l="center",title:n,description:r,headlineVersion:i="XL",as:a,...s})=>{const o=Me[t],c=Ae[i];return h(B,{className:`font-sans flex flex-col p-12 ${c.gap} ${o.background} ${e}`,...s,children:[n?m(j,{headingType:c?.headingType,as:a||c?.as,className:`whitespace-pre-wrap ${o.text} ${C[l]}`,title:n}):null,r?m("p",{className:`${c.descriptionFont} ${o.text} ${C[l]}`,children:r}):null]})})),ze=u((e=>{const{className:t="",title:l,description:n,bonusItems:r,...i}=e;return m(B,{className:`font-sans bg-white p-12 pb-9 ${t}`,...i,children:h("div",{className:"container",children:[m(Oe,{className:"!p-0",title:l,description:n,headlineVersion:"M",align:"center",...i}),m("div",{className:"flex flex-wrap w-full mt-9",children:r?.length?r.map(((e,t)=>m("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:h("div",{className:"flex justify-between w-full",children:[h("div",{className:"flex flex-col justify-between mr-4",children:[h("div",{children:[m("div",{className:"text-h4",children:e.title}),m("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),e?.buttons?.length?m(Ve,{buttons:e?.buttons}):null]}),e.bonusItemContent?.bonusType?Ee(e.bonusItemContent):null]})},String(t)))):null})]})})})),Ee=e=>m("div",{children:"count"===e.bonusType?Pe(e):Fe(e)}),Pe=e=>h("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?m("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?m("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),Fe=e=>e.image?m(W,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,Ue=u((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:r,title:i,...a})=>h(B,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...a,children:[m(Oe,{className:"!p-0 mb-8",title:i,description:r,headlineVersion:"M",align:"center",...a}),e?.length?m("div",{className:`grid gap-1 ${C[t]} ${Xe(n)}`,children:e.map(He)}):null]}))),He=({icon:e,label:t,description:l},n)=>h("div",{className:"flex flex-col items-center text-h6",children:[l?m("span",{children:l}):null,e?m(W,{image:e,height:"180",width:"auto",className:"h-[180px] w-auto"}):null,m("div",{children:t?m("span",{children:t}):null})]},String(n)),Xe=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ge=u((e=>{const{title:t,image:l,cardItems:n,button:r}=e;return h("div",{className:"border-color-stroke border p-9 w-1/2",children:[l?h("div",{className:"flex justify-center",children:[l?.src?m(W,{className:"mb-5",image:l}):null,l?.icon?m(W,{image:l,asSVG:!0}):null]}):null,t?m(j,{headingType:"h4",title:t,className:"mb-6"}):null,n?.length?m("ul",{children:n.map(((e,t)=>We(e,String(t))))}):null,r?.text?Le({button:r,buttonClassName:"mt-6"}):null]})})),We=(e,t)=>{const{icon:l,text:n}=e;return h("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?m(W,{className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",image:l.icon,asSVG:!0}):null,l?.src?m(W,{image:l.icon}):null,m("span",{className:"text-xl-light",children:n})]},t)},Je=u((({className:e="",title:t,cards:l,...n})=>h(B,{className:`font-sans bg-white p-12 pb-9 ${e}`,...n,children:[m(j,{headingType:"h3",title:t,className:"text-center mb-8"}),m("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>m(Ge,{...e},String(t)))):null})]}))),Ye=u((e=>{const{className:t,button:l,...n}=e;return m(B,{className:t,...n,children:l?Le({button:l}):null})})),Ze=e=>{const{itemCount:t,visibleItemCount:l,isCyclic:r}=e,[a,s]=n(0),o=i((()=>s((e=>r?(e+1)%t:Math.min(e+1,t-1)))),[r,t]),c=i((()=>s((e=>r?(t+e-1)%t:Math.max(e-1,0)))),[r,t]),d=r||function(e,{itemCount:t,visibleItemCount:l,container:n}){if(l)return t>l;if(n){return n.scrollWidth*e/t+n.clientWidth<n.scrollWidth}return!1}(a,e)&&a<t-(l||1),m=r||a>0;return[a,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};const Ke=u((({className:e,disabled:t,...l})=>m(Be,{rounded:!0,className:`group 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:m(W,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"16",height:"16",asSVG:!0})}))),qe=u((e=>m(Ke,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Qe=u((e=>m(Ke,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function et({dec:e,inc:t,canDec:l,canInc:n,btnClass:r,className:i=""}){return l||n?h("div",{children:[l?m(Ke,{className:`absolute z-50 ${r[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?m(Ke,{className:`absolute z-50 rotate-180 ${r[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const tt=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),lt=u((({title:e,value:t,postfix:l="",prefix:n,className:r=""})=>h("div",{className:`mb-7 ${r}`,children:[e?m("div",{className:"text-l-light text-secondary-text",children:e}):null,t?h("div",{className:"text-h3",children:[n," ",tt(Math.round(t))," ",l]}):null]}))),nt=2e6,rt=97e4,it=Math.round(23.5),at={minSum:6e4,maxSum:nt,minMonths:13,maxMonths:60,rateBottomRange:12,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},st={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ot={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:120,rate:5.9,isMonthlyInterestPayment:!0},ct=u((({rate:e,title:t="Ставка",unit:l,rateBlockClassName:n})=>h("div",{children:[m("div",{className:"text-l-light text-secondary-text",children:t}),h("div",{className:"flex justify-start",children:[m("span",{className:`block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${n}`,children:String(e).replace(".",",")}),l?m("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]})]})));function dt(e){return e?.length?m(Ve,{buttons:e,className:"flex flex-col mt-7 gap-2"}):null}const mt=e=>e?m("p",{className:"text-s-light text-secondary-text mt-7",children:e}):null,ht=(e,t,l)=>Math.max(t,Math.min(e,l)),ut=e=>e.split(/\s+/).join(""),pt=u((({className:e,title:t,items:l=[],min:n=1,max:r=100,step:i=1,value:a=n,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(ht(Number(ut(e.target.value)),n,r))},d={backgroundSize:`${(100*(a-n)/(r-n)).toFixed(2)}% 100%`};return h("div",{className:e,children:[h("label",{className:"block relative",children:[t?m("span",{className:"text-m-light text-primary-text",children:t}):null,m("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus disabled:border-main-stroke disabled:bg-main-divider",value:tt(a),disabled:s,onChange:c,onBlur:c}),m("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:m("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:n,max:r,step:i,value:a,disabled:s,onChange:c,style:d})})]}),xt(l)]})}));function xt(e){return m("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>m("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const gt=1e3;function bt(e,t,l){const{moneyValue:n,minSum:r,maxSum:i,step:a=gt,isShowItems:s=!0}=t,o=[`От ${tt(r)} ₽`,`До ${tt(i)} ₽`];return m(pt,{title:e,items:s?o:[],min:r,max:i,step:a,value:ht(n,r,i),onChange:l})}const ft=new Map;function vt(e,t,{fallback:l}={}){const i=a((()=>Nt(e)),[e]),[s,o]=n(),[c,d]=n(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!i.every((e=>null===e)))try{const e=t(...i);"then"in e?(e=>{e.then((e=>ft.get(i)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...i]);const u=i[0],p=l&&"string"==typeof u&&l[u];return{data:s||c||!p?s:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function Nt(e){return e?Array.isArray(e)?e:e instanceof Function?Nt(e()):[e]:[e]}async function yt(e,t){try{return await wt(e,t)}catch(e){console.error(e)}return null}async function wt(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function Ct(e){const{data:t}=vt(`/wcms-resources/${e}.json`,wt);return t}const kt=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,r=Ct(t||"bonus-calculator-data")||st,[i,a]=((e,t,l)=>{const{minSumTravel:n,minSumOther:r,maxBonus:i,prefMonthsNum:a,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===r)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*a+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-a)]})(r,l,n);return{...r,...e,monthBonus:i,yearBonus:a}},$t=u((({className:e="",sourceBookDir:t="",buttons:l,footnote:r})=>{const[a,s]=n(6e3),o=i((e=>s(e)),[]),[c,d]=n(6e3),u=i((e=>d(e)),[]),p={travelExpenseValue:a,restExpenseValue:c},{minSumTravel:x,maxSumTravel:g,minSumOther:b,maxSumOther:f,monthBonus:v,yearBonus:N}=kt(p,t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[bt("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:g,moneyValue:a,step:500,isShowItems:!1},o),bt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:b,maxSum:f,moneyValue:c,step:500,isShowItems:!1},u)]}),m("div",{children:v>=0?m(ct,{title:"Баллов за месяц",rate:v,rateBlockClassName:"tracking-[-14px]"}):null}),h("div",{className:"w-full max-w-[350px]",children:[N>=0?m(lt,{title:"Баллов за год",value:N}):null,dt(l),mt(r)]})]})})),St=u((({className:e,viewBox:t,fill:l="none",width:n,height:r,paths:i,...a})=>m("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:r,children:i.map((({d:e,fill:t,...l},n)=>m("path",{d:e,fill:t||"currentColor",...a,...l},n)))}))),It=[{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"}],Tt=u((({className:e,text:t,checked:l,isRadio:n,onChange:r})=>m("div",{className:e,children:h("label",{className:"flex items-center relative cursor-pointer group",children:[m("input",{className:`peer appearance-none w-5 h-5 border-solid cursor-pointer group-hover:border-checkbox-hover\n ${n?"rounded-full border-2":"rounded checked:bg-primary-main border"}\n ${l?"border-black":"border-main-stroke"}\n checked:border-primary-main m-0`,type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l}),n?m("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):m(St,{paths:It,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?m("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),Bt=u((({items:e,checkedItem:t,onChange:l})=>m("div",{className:"flex flex-col gap-3",children:e?.map((({id:e,text:n})=>m(Tt,{isRadio:!0,text:n,checked:t===e,onChange:()=>l&&l(e)},String(e))))})));function Rt(e,t,l){const{minMonths:n,maxMonths:r,monthsValue:i}=t,a=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return m(pt,{className:"mt-7",title:e,items:[`От ${a(n)}`,`До ${a(r)}`],min:n,max:r,step:1,value:ht(i,n,r),onChange:l})}const jt=(e,t)=>{const{isInsurance:l,isSalaryClient:n,isStateEmployee:r,moneyValue:i}=e,a=Ct(t||"credit-calculator-data")?.rows?.find((e=>l===e.isInsurance&&n===e.isSalaryClient&&r===e.isStateEmployee))||at,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=a,d=i<=c?s:o,m=((e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:r}=t;if(l){const t=e/1200;return n*(t+t/(Math.pow(1+t,r)-1))}return Math.round(n/r)+n*(e/1200)})(d,e);return{...a,...e,finalRate:d,monthlyPayment:m}},Vt="annuity",Lt="differential",_t=[{id:Vt,text:"Аннуитетный"},{id:Lt,text:"Дифференцированный"}],Mt=u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[a,s]=n(!1),[o,c]=n(!0),[d,u]=n(!1),[p,x]=n(!1),[g,b]=n(rt),f=i((e=>b(e)),[]),[v,N]=n(it),y=i((e=>N(e)),[]),w=jt({isAnnuity:a,isInsurance:o,isSalaryClient:d,isStateEmployee:p,moneyValue:g,monthsValue:v},t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[bt("Сумма кредита, ₽",{...w,step:500},f),Rt("Срок кредита, месяцев",w,y),h("div",{className:"mt-7",children:[m(Tt,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:d,onChange:u}),m(Tt,{className:"mt-3",text:"Работаю в бюджетной организации",checked:p,onChange:x}),m(Tt,{className:"mt-3",text:"Комплексная страховая защита",checked:o,onChange:c})]})]}),m(ct,{title:"Ставка",rate:w.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[m(lt,{title:a?"Ежемесячный платеж":"Платёж в первый месяц",value:w.monthlyPayment,postfix:"₽"}),m(Bt,{items:_t,checkedItem:a?Vt:Lt,onChange:e=>s(e===Vt)}),dt(l),mt(r)]})]})})),At=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:r}=t;return l?Math.round(n*Math.pow((1200+e)/1200,r)-n):Math.round(n*e*30*r/365/100)},Dt="everyMonth",Ot="atEndTerm",zt=[{id:Dt,text:"Ежемесячно"},{id:Ot,text:"В конце срока"}],Et={CreditCalculatorForm:Mt,DepositCalculatorForm:u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[a,s]=n(rt),o=i((e=>s(e)),[]),[c,d]=n(it),[u,p]=n(!1),x={moneyValue:a,monthsValue:c,isMonthlyInterestPayment:u},g=i((e=>d(e)),[]),b=((e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n}=e,r=Ct(t||"deposit-calculator-data")?.rows.find((e=>l===e.isMonthlyInterestPayment))||ot,{rate:i}=r,a=At(i,e),s=n+a;return{...r,...e,income:a,finalSum:s}})(x,t),{income:f,finalSum:v,rate:N}=b;return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[bt("Сумма вклада, ₽",{...b},o),Rt("Срок вклада, месяцев",{...b},g)]}),m(ct,{rate:N||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[f?m(lt,{title:"Доход по вкладу",value:f,postfix:"₽",prefix:"+"}):null,v?m(lt,{title:"Сумма в конце срока",value:v,postfix:"₽"}):null,m(Bt,{items:zt,checkedItem:u?Dt:Ot,onChange:e=>p(e===Dt)}),dt(l),mt(r)]})]})})),BonusCalculatorForm:$t},Pt=(e,t)=>{const l=e?.calcType;if(!l||!(l in Et))return null;const n=Et[l];return m("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:h("div",{className:"box-border p-9 w-full",children:[e?.title?m(j,{className:"text-center mb-6",title:e.title}):null,m(n,{...e,className:"flex justify-between"})]})},String(t))},Ft=u((({className:e="",calculatorTabs:t=[],...l})=>{const r=t.map((e=>e.nav||{})),a=t.map((({calculatorBlock:e})=>e||{})),[s,o]=n(0),c=i((e=>o(e)),[]),[d,u]=Ze({itemCount:t?.length,visibleItemCount:3});return h(B,{className:`box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${e}`,...l,children:[h("div",{className:"bg-white",children:[r.length>1?Ut({activeIndex:d,tabsNav:r,slideIndexShift:s,onClick:c}):null,et({...u,btnClass:["left-3","right-3"],className:"top-8"})]}),m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:a?.length?a.map(Pt):null})]})}));function Ut({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:n}){return h("div",{children:[m("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:m("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const r=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",i=l?"text-xl mb-1.5":"text-l mb-[3px]",a=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 h("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${r}`,children:[m(W,{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}),h("div",{className:"border-0",children:[m("div",{className:`${i}`,children:e?.title}),m("div",{className:`${a}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})}),m("div",{className:"w-full h-2 bg-primary-main"})]})}const Ht=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Xt=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},Gt=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),Wt=u((({className:e="",inputClassName:t="",id:l,name:n,type:r="text",label:a,value:s="",valid:o=!0,children:c,onChange:d,onBlur:u,...p})=>{const x=i((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=i((e=>{if(!u)return;const t=e.target.validity.valid?e.target.value:s;u(t)}),[u]),b=c?"pr-8":"",f=o?"border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return h("div",{className:`relative ${e}`,children:[a?m("label",{className:"block text-m-light mb-2",children:a}):null,m("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:n||l,type:r,value:s,onChange:x,onBlur:g,...p}),c]})})),Jt=u((({className:e="",onChange:t,minValue:l=0,maxValue:n=3e5,...r})=>{const a=i((e=>{if(!t)return;const r=Ht(Xt(Gt(ut(e))));const i=Yt(r,ht(Number(r),l,n));t(String(i))}),[t]),s=i((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(ut(l))).replace(",",".")))}),[t]);return m(Wt,{className:e,inputClassName:"w-full",onChange:a,onBlur:s,...r,children:m("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),Yt=(e,t)=>Number(e)===t?e:String(t),Zt=u((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:r="1500",button:a,...s})=>{const[o,c]=n(""),d=i((e=>c(e)),[]),u=!Number(ut(o)),p=u?Ie({version:a?.version}):Te({className:"text-white",version:a?.version}),x=be();return h(B,{className:`p-12 flex flex-col items-center font-sans bg-white ${e}`,...s,children:[t?m(j,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,h("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[m(Jt,{name:"amount",value:o,onChange:d,valid:""===o||!u,placeholder:r,label:l}),a?.text?m("button",{type:"submit",className:`w-full p-4 mt-6 ${p} `,disabled:u,...x(a),children:a.text}):null]})]})})),Kt=u((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:r,children:a,onIntersection:s})=>{const o=$(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),r);return m("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(l===n),ref:o,children:a})})),qt=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],Qt=u((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:r=0,padding:a=0,snapAlign:o="snap-center",children:c,onVisibleItemsChange:d,onVisibleIndicesChange:h})=>{const u={sensitivity:1,rootRef:t},p=s([]),x=i(((e,t)=>{const l=[...p.current||[]];l[e]=t,p.current=l,d&&d(l),h&&h(tl(l))}),[d,h]),g=n>0?r*Number(n)-1:0;return m("div",{className:`box-border overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...el(a,g),gap:`${r}px`},role:"list",ref:t,children:(b=(e,t)=>m(Kt,{className:`${o} ${n?qt[n-1]:""}`,style:el(a/4),activeIndex:l,idx:t,observerOptions:u,onIntersection:x,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(b):b(e,0))(c)});var b})),el=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),tl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ll=e=>e,nl=(e=ll)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),rl=(e=ll)=>nl((t=>-e(t))),il=e=>t=>e.scrollWidth/t,al=e=>(t,l)=>{e.scrollBy({left:l*il(e)(t),behavior:"smooth"})},sl=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const r=s(null),[a,o]=n([]),c=i((e=>{o((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),l&&l(e)}),[e]),[d,m]=a.length?[rl()(a),nl()(a)]:[-1,-1],h=d>0,u=m<e-1,p=i((()=>{var l;r.current&&(t&&!h?(l=r.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):al(r.current)(e,-1))}),[t,e,h]),x=i((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):al(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},ol="absolute top-0 bottom-0 z-50 w-[84px]",cl="absolute top-[calc(50%-12px)] z-50",dl=u((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:r=!1,...i})=>{const{blocks:a}=i.block||{},s=t||a?.length||0,[o,c]=sl({itemCount:s,isCyclic:r});return m(B,{className:`font-sans p-12 ${e}`,...i,children:h("div",{className:"relative max-w-full",children:[m(Qt,{containerRef:o,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:c.handleVisibleIndicesChange,children:w(i)}),(c.canScrollLeft||c.canScrollRight)&&n?h("div",{children:[m("div",{className:`${ol} left-0 bg-opacity-from-white`}),m("div",{className:`${ol} right-0 bg-opacity-to-white`})]}):null,ml(c)]})})}));dl.childrenTypes=["CarouselCard","CarouselCatalogCard","CarouselTariffsCard","CarouselProductCard","CarouselProgramsCard","CarouselInvestmentCard"];const ml=({scrollLeft:e,scrollRight:t,canScrollLeft:l,canScrollRight:n})=>h("div",{children:[l?m(qe,{className:`${cl} left-8`,onClick:e}):null,n?m(Qe,{className:`${cl} right-8`,onClick:t}):null]}),hl="absolute border border-solid border-main-stroke w-full h-full",ul={normal:"min-w-[1007px]",mini:"min-w-[355px]"},pl=u((({className:e="",button:t,description:l,title:n,version:r="normal"})=>m("section",{className:`flex pb-9 pl-12 ${ul[r]} ${e}`,children:h("div",{className:"relative w-full",children:[m("div",{className:`${hl} z-10 top-9 right-12 bg-green-dark`}),m("div",{className:`${hl} z-10 top-6 right-8 bg-green`}),m("div",{className:`${hl} z-10 top-3 right-4 bg-green-light`}),h("div",{className:"relative bg-white z-10 py-6 px-10 border border-solid border-green-light",children:[m(Oe,{className:"!p-0",title:n,description:l,headlineVersion:"M",align:"center"}),t?m("div",{className:"mt-6",children:Le({button:t})}):null]})]})}))),xl={black:"bg-black",white:"bg-white"},gl=u((({className:e="",title:t,description:l,image:n,price:r,button:i,colors:a,version:s="primary"})=>h("section",{className:`border box-border border-main-stroke p-7 min-w-[392px] flex flex-col justify-left ${q[s]} ${e}`,role:"listitem",children:[n?.src?m(W,{className:"mb-5 flex justify-center",image:n}):null,t?m(j,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"mb-4",children:m(V,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,a?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:m(J,{children:"Доступные цвета: "})}),a.map(bl)]}):null,r?h(J,{size:"text-h3",align:"text-left",children:[r," ₽"]}):null,i?Le({button:i,buttonClassName:"mt-5 w-full"}):null]}))),bl=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${xl[e]}`},String(t)),fl={primary:"border-main-stroke",secondary:"border-white/50"},vl=u((({className:e="",title:t="",buttons:l,image:n,children:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:r}),l?m("div",{className:"mt-auto pt-8",children:l}):null]}),n]})]}))),Nl={1:"flex gap-y-2 flex-col",2:"flex gap-y-2 gap-x-10 flex-wrap"},yl=u((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:n=1,description:r,image:i,title:a,version:s="primary",...o})=>{const c=a?m(j,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:a}):null,d=i?.src?m(W,{className:"absolute bottom-0 right-0 m-0",image:i}):null;return m(B,{className:["relative text-left border border-solid box-border p-9 w-[697px]",q[s],fl[s],l].join(" "),...o,children:h(vl,{title:c,image:d,children:[h("div",{className:"flex justify-between mb-4",children:[r?m("div",{className:"w-1/3",children:m(J,{size:"text-h6",children:r})}):null,e?m(J,{size:"text-m",font:"font-light",color:Q[s],children:e}):null]}),t.length?m("ul",{className:`list-none m-0 p-0 ${Nl[n]}`,children:wl(t,n)}):null]})})})),wl=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return h("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?m("div",{className:"pr-2.5",children:m(J,{size:(n=t,1===n?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?m(J,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var n})),Cl="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",kl=u((({text:e,href:t="",target:l="",className:n=""})=>e?h("div",{className:`relative group cursor-pointer w-[328px] h-[82px] ${n}`,children:[h("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:text-primary-main z-10",role:"link",href:t,target:l,children:[m("div",{className:"p-0.5",children:e}),m("div",{className:"w-6 h-6",children:m(W,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"24",height:"24",asSVG:!0})})]}),m("div",{className:`${Cl} mx-1.5 mt-1.5`}),m("div",{className:`${Cl} mt-3 mr-3`})]}):null)),$l=u((({className:e="",additionalDescription:t,description:l,links:n,title:r,...i})=>h(B,{className:`bg-primary-main flex w-full p-10 overflow-hidden justify-between font-sans ${e}`,...i,children:[h("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[m(Oe,{title:r,as:"h1",description:l,align:"left",className:"p-0",bgColorHeadline:"secondary"}),t?m("div",{className:"pt-6",children:m(V,{children:t})}):null]}),n?.length?Sl(n):null]}))),Sl=e=>{const t=Math.ceil(e.length/12);return m(dl,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,children:new Array(t).fill(null).map(((t,l)=>m("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)=>m(kl,{className:"m-1",...e},String(t))))},String(l))))})},Il={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"},Tl={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"},Bl=u((({className:e="",isDotted:t=!0,children:l,version:n="primary",size:r="M"})=>h("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?m("div",{children:m("div",{className:`rounded-full align-middle inline-block ${Il[n]} ${Tl[r]}`})}):null,m("span",{children:l})]}))),Rl={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},jl={S:"text-l-light",M:"text-h6",L:"text-h5"},Vl={S:"ml-2",M:"ml-3",L:"ml-4"},Ll=u((e=>{const{className:t="",hasIndent:l,isDotted:n,itemClassName:r="",items:i,listItemSize:a="M",version:s="primary"}=e;return i?.length?m("section",{className:`${Rl[s]} ${jl[a]} ${t} ${l?Vl[a]:""}`,role:"list",children:i.map(((e,t)=>m(Bl,{className:`${r} mb-1.5`,isDotted:n,version:s,size:a,children:e},String(t))))}):null})),_l={primary:"text-secondary-text",secondary:"text-white/80"},Ml="box-border border-solid border border-main-stroke ",Al=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:i=[],button:a={},version:s="primary",isDotted:o=!0,align:c="center"})=>h("section",{className:["flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6",Ml,C[c],q[s]].join(" "),role:"listitem",children:[h("div",{className:"flex flex-col h-full",children:[Dl(r,s),Ol(t,e),zl(l,e),Pl(i,o,s),El(n,s)]}),Le({button:a,buttonClassName:"mt-6"})]}))),Dl=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(W,{className:"mb-5",image:e}):null,e?.icon?m(W,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:ee(e,t),asSVG:!0}):null]}),Ol=(e,t)=>t?m(J,{size:De[e],children:t}):null,zl=(e,t)=>e?m("div",{className:t?"mt-2":"",children:m(V,{size:"text-l",children:e})}):null,El=(e,t="primary")=>e?m("div",{className:"mt-auto",children:m(J,{size:"text-m",font:"font-light",color:_l[t],children:e})}):null,Pl=(e,t,l="primary")=>e?.length?m(Ll,{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,version:l}):null,Fl=u((({className:e="",title:t,icon:l,list:n=[],version:r="primary",...i})=>h(B,{className:`font-sans border border-main-stroke flex min-w-[536px] ${q[r]} ${e}`,...i,children:[h("div",{className:"w-[200px] min-w-[200px] self-end",children:[l?.icon?m(W,{image:ee(l),asSVG:!0}):null,l?.src?m(W,{image:l}):null]}),h("div",{className:"p-8 pl-3 w-full",children:[t?m(j,{className:" mb-3.5",headingType:"h5",title:t}):null,n.length?m("div",{className:"flex flex-col gap-3",children:n?.map(Ul)}):null]})]}))),Ul=(e,t)=>h("div",{className:"break-words",children:[e.title?m("div",{className:"text-h6",children:e.title}):null,e.description?m("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Hl=u((({className:e="",title:t,icon:l,isHighlighting:n,button:r,rows:i=[],...a})=>{const s=i.map(Wl),o=s.slice(0,1),c=s.slice(1);return h(B,{className:`font-sans relative bg-white border border-main-stroke min-w-[322px] p-8 \n ${Xl(n)}\n ${e}`,...a,children:[n?Jl():null,l?.src?m(W,{image:l}):null,t?m(j,{className:"text-primary-text text-center pt-2",headingType:"h5",title:t}):null,r?m(Be,{className:"w-full mt-4",...r}):null,i.length?m(M,{renderFoldableSection:({isUnfolded:e})=>h("div",{children:[o,m(A,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?Gl:null}):null]})})),Xl=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-9",Gl=({isUnfolded:e,onToggle:t})=>h("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[m("div",{children:e?"Скрыть":"Подробнее о тарифе"}),m(O,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),Wl=(e,t)=>h("div",{className:"py-5 border-b border-main-divider",children:[e?.title?m("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?m("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),Jl=()=>h("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[m(O,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),m("div",{className:"text-center",children:"Хит"})]}),Yl={black:"bg-black",white:"bg-white"},Zl=u((({className:e="",title:t,description:l,image:n,price:r,button:i,colors:a})=>h("section",{className:`border border-solid box-border border-main-stroke p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[n?.src?m(W,{className:"mb-5 flex justify-center",image:n}):null,t?m(j,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"text-m-light text-left mb-4",children:l}):null,a?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:"Доступные цвета: "}),a.map(Kl)]}):null,r?h("div",{className:"text-h3 text-left",children:[r," ₽"]}):null,i?Le({button:i,buttonClassName:"mt-5 w-full"}):null]}))),Kl=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Yl[e]}`},String(t)),ql="absolute top-0 bottom-0 w-[84px]",Ql=u((({cards:e=[],className:t="",title:l,description:n,...r})=>{const[i,a]=Ze({itemCount:e?.length,visibleItemCount:3});return h(B,{className:`bg-white relative font-sans p-12 overflow-hidden text-center ${t}`,...r,children:[m(Oe,{className:"!p-0",title:l,description:n,headlineVersion:"M",align:"center",...r}),m("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*i}px)`},role:"list",children:e?.length?e.map(((e,t)=>m(Zl,{...e},String(t)))):null}),et({...a,btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"}),m("div",{className:`${ql} left-0 bg-opacity-from-white`}),m("div",{className:`${ql} right-0 bg-opacity-to-white`})]})})),en="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",tn="border-main-stroke border-solid border",ln="border-main-divider border border-t-0 border-x-0",nn="w-[200px] mr-6",rn=u((({icon:e,image:t,title:l,link:n})=>h("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${tn} ${en}`,role:"columnheader",children:[e&&!t?.src&&m(W,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:ee(e),width:"63",height:"63",asSVG:!0}),t?.src&&m(W,{className:"mb-[18px]",image:t}),l?m(j,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&m("div",{className:"mt-auto w-full",children:m(Be,{href:n.href,target:n.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:m("div",{className:"text-xs-light font-medium py-[11px]",children:n.text})})})]}))),an={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},sn=u((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>m("div",{className:"flex flex-1 overflow-hidden",children:m("div",{className:an[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),on=u((({children:e})=>m("div",{className:"self-start flex flex-col",role:"row",children:m("div",{className:"flex",children:e})}))),cn=u((({colHeaders:e,activeIndex:t})=>h(on,{children:[m("div",{className:nn,role:"columnheader"}),m(sn,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>m(rn,{...e},String(t))))})]}))),dn=u((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>m("div",{className:`w-80 box-border flex flex-col ${tn} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${n?en:""}`,role:"cell",children:m("div",{className:`mx-7 h-full ${ln} ${n&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>un(e,t,n)))})}))),mn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),hn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),un=({label:e,description:t},l,n)=>h("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?m("h4",{className:mn(n),children:e}):null,t?m("div",{className:hn(n),children:t}):null]},String(l)),pn=(e=!1)=>`text-s py-7 ${ln} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,xn=u((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:r,isLastRow:i})=>h(on,{children:[e?.title?m("div",{className:pn(i),children:e.title}):null,t?.length?m(sn,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>m(dn,{cell:e,isFirstRow:r,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),gn=u((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:r}=n;return h("div",{className:"relative",children:[e.map(((e,n,{length:r})=>m(xn,{row:e,isFirstRow:0===n,isLastRow:n+1===r,activeIndex:l,isColoredFirstColumn:t},String(n)))),r?et({...n,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),bn=u((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:r})=>{const i=e?.map((({header:e})=>e||{})),a=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:a.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=Ze({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return h("div",{children:[h("div",{role:"table",children:[i?.length?m(cn,{colHeaders:i,activeIndex:o}):null,s?.length?m(gn,{rowData:s,isColoredFirstColumn:r,activeIndex:o,controls:c}):null]}),d?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),fn=u((({className:e="",title:t,rowHeaders:l,columns:r,visibleRowLength:a=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!a),u=i((()=>d((e=>!e))),[]);return h(B,{className:`bg-white font-sans py-12 pl-12 overflow-hidden text-primary-text relative ${e}`,...o,children:[m(j,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),m(bn,{columns:r,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:a}),a?vn({isShowAllRow:c,onClick:u}):null]})})),vn=({isShowAllRow:e,onClick:t})=>m("div",{className:"pr-12",children:h("div",{className:"flex w-full",children:[m("div",{className:nn}),m("button",{onClick:t,className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:m("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),Nn=u((({className:e="",contacts:t,info:l,version:n="secondary",...r})=>h(B,{className:`${q[n]} flex p-12 ${e}`,...r,children:[l?.length?yn(l,n):null,t?.length?yn(t,n):null]}))),yn=(e,t)=>m("div",{className:"flex grow basis-0",children:e.map(((e,l)=>wn({column:e,index:l,version:t})))}),wn=({column:e,index:t,version:l})=>e?m("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:r},i)=>h("div",{className:"mt-6 first:mt-0",children:[m(Oe,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"left",bgColorHeadline:l}),n?m("div",{className:"mt-1.5 opacity-80",children:m(V,{size:"text-m-light",children:n})}):null,r?m(Be,{className:"mt-6",...r}):null]},String(i))))},`col-${String(t)}`):null,Cn=e=>"Image"===e?.errorContentType&&e?.image?m(W,{image:e.image}):"Code"===e?.errorContentType&&e.code?m("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,kn=u((({className:e="",title:t,subtitle:l,error:n,button:r})=>h("section",{className:`flex flex-col justify-center items-center mt-12 ${e}`,children:[m("div",{className:"flex justify-center py-20",children:Cn(n)}),t?m(j,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?m("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,r?.text?m(Be,{className:"py-4 px-9",version:r?.version,...r,children:r.text}):null]})));var $n;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}($n||($n={}));const Sn=new Intl.NumberFormat("ru",{style:"currency",currency:$n.RUB}),In=e=>e?Sn.format(e):"",Tn="text-left text-m-light text-secondary-text",Bn={USD:"DollarIcon",EUR:"EuroIcon"},Rn=u((({className:e,exchangeCurrencyItems:t})=>h("table",{className:`h-fit w-fit ${e}`,children:[m("thead",{children:h("tr",{children:[m("th",{className:Tn,children:"Валюта"}),m("th",{className:`${Tn} pl-11`,children:"Купить"}),m("th",{className:`${Tn} pl-11`,children:"Продать"})]})}),m("tbody",{children:t.map(jn)})]}))),jn=e=>{const t=e?.currency?.currency;return h("tr",{className:"pb-1 text-h6",children:[m("td",{className:"pt-4",children:h("div",{className:"flex items-center",children:[t?m(W,{image:{icon:Bn[t]},width:"24",height:"24"}):null,m("span",{className:"ml-2",children:t})]})}),m("td",{className:"pt-4 pl-11",children:In(e?.saleExchangeRate)}),m("td",{className:"pt-4 pl-11",children:In(e?.buyExchangeRate)})]},t)},Vn=u((({className:e="",address:t})=>h("div",{className:`flex ${e}`,children:[m(W,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),h("div",{className:"ml-3",children:[t?m("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,m("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Ln=(e,t,l)=>{const n=Number(_n(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},_n=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Mn=e=>{return(t=[[e=>e.value!==$n.RUB&&e.oppositeValue!==$n.RUB,()=>e.handleConvert(e.value,$n.RUB)],[e=>e.value===$n.RUB&&e.oppositeValue===$n.RUB,()=>e.handleConvert(e.value,$n.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function An(e){const t=s(null);return r((()=>{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 Dn=u((({className:e="",isBorder:t=!0,label:l,options:a=[],value:s,onChange:o,placeholder:c=""})=>{const[d,u]=n(a[0]||{key:"",text:""}),[p,x]=n(!1),g=An(i((()=>x(!1)),[]));return r((()=>{u(s||{key:"",text:""})}),[s]),h("div",{className:`${e}`,ref:g,children:[l?m("span",{className:"mb-2 flex text-primary-text",children:l}):null,h("div",{className:"relative "+(p?"z-20":"z-10"),children:[h("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${En(t)}`,onClick:()=>x(!p),children:[m("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),m(O,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(p?"":"rotate-180")})]}),a?.length?m("div",{className:`h-0 ${On(p)}`,children:m("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:a.map(zn((e=>{u(e),x(!1),o(e)}),p,(e=>Boolean(e.key===d.key))))})}):null]})]})})),On=e=>e?"":"overflow-hidden",zn=(e,t,l)=>(n,r)=>h("div",{onClick:()=>{e(n)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[m("span",{className:"min-h-6",children:n.text}),m(O,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(n)&&t?"":"hidden"].join(" ")})]},String(r)),En=e=>e?"border border-main-stroke rounded-md hover:border-primary-hover":"";function Pn(e){const{placeholder:t,rates:l,selected:n,value:r,setValue:i,setSelected:a}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return h("div",{className:"relative flex",children:[m(Wt,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:r,onChange:i}),s.length?m(Dn,{isBorder:!1,onChange:e=>a(e.key),options:s,value:o}):null]})}const Fn=u((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:r})=>{const[a,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||$n.RUB,selectBuy:l?.[0]?.currency?.currency||$n.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return h("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Pn({placeholder:"Хочу продать",rates:l,selected:a.selectSell,setSelected:Un(a,o,l),value:a.inputSell,setValue:e=>Xn(o,l)(e,a.selectSell,a.selectBuy)}),Pn({placeholder:"Получу",rates:t,selected:a.selectBuy,setSelected:Hn(a,o,t),value:a.inputBuy,setValue:e=>Gn(o,t)(e,a.selectBuy,a.selectSell)}),r?.text?m(Be,{className:"py-4 mr-1",version:r?.version,...r,children:r.text}):null]})})),Un=(e,t,l)=>n=>{t({selectSell:n}),Mn({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,r=e.selectBuy)=>{Xn(t,l)(e.inputSell,n,r)}})},Hn=(e,t,l)=>n=>{t({selectBuy:n}),Mn({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,r=e.selectSell)=>Gn(t,l)(e.inputBuy,n,r)})},Xn=(e,t)=>(l,n,r)=>{e({inputSell:_n(l),selectBuy:r});const i=t.find((e=>e.currency?.currency===r))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Ln(l,i,n===$n.RUB)||"")})},Gn=(e,t)=>(l,n,r)=>{e({inputBuy:_n(l),selectSell:r});const i=t.find((e=>e.currency?.currency===r))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Ln(l,i,n===$n.RUB)||"")})};const Wn=async e=>{const t=await Jn(),l=t?.code||"000";return{region:t,exchangeRates:await Yn(e,l)}},Jn=async()=>{try{return await wt("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Yn=async(e,t)=>{try{return await wt(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Zn=u((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:r}=function(){const{data:e}=vt("/api/v1/exchangerates",Wn);return e||{}}(),i=Kn(r?.exchangeRate?.currencies),a=i.filter((e=>e.buyExchangeRate));a.unshift({currency:{currency:$n.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:$n.RUB}}),m(B,{className:`bg-white text-primary-text font-sans p-9 box-border min-h-80 ${e}`,...n,children:m(vl,{title:m(j,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:h("div",{className:"flex",children:[h("div",{className:"mr-14 pt-4",children:[i?m(Rn,{className:"mb-[30px]",exchangeCurrencyItems:i}):null,m(Vn,{address:r?.address})]}),i.length&&a.length&&s.length?m(Fn,{className:"grow",currencyRatesBuy:a,currencyRatesSell:s,button:l}):null]})})})})),Kn=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[];function qn(e,t={}){const{data:l}=vt(`/wcms-resources/${e}.json`,wt,{fallback:t});return l||{}}const Qn={"bg-white":"color",transparent:"white"},er={"bg-white":"text-primary-main",transparent:"text-white"},tr=(e,t,l)=>m(W,t?.src?{image:t,className:er[e],width:l?.width,height:l?.height,asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Qn[e]},className:er[e],width:l?.width,height:l?.height,asSVG:!0}),lr={"bg-white":"text-primary-text",transparent:"text-white"},nr=(e,t,l)=>m("span",{className:`${lr[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),rr=u((({className:e="",href:t,logo:l,children:n=l?.title,targetBlank:r,bgColor:i="bg-white",showTitle:a=!0})=>h("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:r?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[tr(i,l?.image,{width:"40",height:"45"}),a?nr(n||l?.title,i):null]}))),ir=()=>{const[e,t]=n("");return{term:e,setTerm:e=>t(e)}},ar=u((({className:e,isMobile:t=!1})=>{const{term:l,setTerm:n}=ir(),r=t?"text-s":"text-l-light",i=t?" placeholder-transparent":"h-full",a=t?"some search":void 0;return h("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:[m("div",{className:t?"w-5 h-5":"w-6 h-6",children:m(W,{image:"LoupeIcon",width:"24",height:"24"})}),l?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${r}`,children:"Поиск по сайту"})]}),m("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-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${i}`,value:l,onChange:e=>n(e.target.value),type:"text",name:"search-bar-input",placeholder:a}),t?m("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(),n("")},children:m(W,{image:"CloseIcon",width:"24",height:"24"})}):m(Be,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),sr=u((e=>m(ar,{...e}))),or=u((({className:e="",items:t,hasButton:l})=>h("div",{className:e,children:[t?.length?t.map(cr):null,l?m(Be,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),cr=(e,t)=>{const{type:l,text:n,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:dr(l,n)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},dr=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${mr(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},mr=e=>e.replaceAll(/\D/g,""),hr=u((({className:e="",index:t,text:l,...n})=>{const r=be(),{href:i,target:a,onClick:s}=r(n);return m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:i,target:a,onClick:s,children:l||`Документ ${t}`})})),ur=u((({className:e="",links:t})=>m("div",{className:e,children:t?.length?m("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)=>m(hr,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),pr=e=>t=>e?.href===t?.href,xr=(e,t)=>{return(n=e,r=t,(n||[]).map((e=>r?.find(pr(e))||e))).concat((l=e,(t||[]).filter((e=>!l?.find(pr(e))))));var l,n,r},gr=u((({className:e="",items:t,fallback:l})=>{const n=be(),r=qn(o.SITEMAP||"sitemap",l),i=xr(r.topItems,t);return m("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:i?.map(((e,t)=>br(n(e),t)))})})),br=(e,t)=>{const{text:l,items:n,href:r,target:i,onClick:a}=e;return h("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[m("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:r,target:i||"_self",onClick:a,children:l||`Раздел ${t}`}),n?.map(((e,t)=>m(fr,{...e,index:t},String(t))))]},String(t))},fr=u((({text:e,index:t,...l})=>{const n=be(),{href:r,target:i,onClick:a}=n(l);return m("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:r,target:i||"_self",onClick:a,children:e||`Раздел ${t}`})})),vr=[{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"}],Nr=u((({version:e="primary",...t})=>{const l=be(),{href:n,onClick:r}=l(t),{icon:i,label:a}=vr.find((({origins:e})=>e.some((e=>n?.includes(e)))))||{};if(!i)return null;return m("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===e?"bg-white hover:bg-secondary-hover":"border-solid border border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===e?"hover:text-black":""}`,href:n,"aria-label":a,target:"_blank",rel:"noopener noreferrer",onClick:r,children:i?m(W,{image:ee(i),imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),yr=u((({className:e="",media:t,version:l,children:n})=>h("div",{className:"font-sans",children:[m("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>m(Nr,{version:l,...e},String(t))))}),m("span",{className:"text-s-light text-secondary-text",children:n})]}))),wr=u((({className:e="",index:t,...l})=>{const n=be(),{href:r,target:i,text:a,onClick:s}=n(l);return m("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:r,target:i,onClick:s,children:a||`Документ ${t}`})})),Cr=u((({className:e="",links:t})=>h("div",{className:e,children:[m("div",{className:"pt-5",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>m(wr,{index:t,...e},String(t))))}):null]}))),kr="w-[204px]",$r=u((({className:e,...t})=>{const l=t.options?.page?.fallback,{documents:n,relatedEnterprises:r,contacts:i,socialMedia:a,mobileApps:s,topItems:c,logo:d}=qn(o.FOOTER||"footer",l);return h(B,{tag:"footer",className:`p-9 bg-white font-sans ${e||""}`,...t,children:[h("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[m(rr,{className:kr,logo:d}),m(sr,{className:"grow"})]}),h("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[h("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[m(or,{items:i,hasButton:!0}),m(yr,{media:a,children:"Соцсети"}),m(yr,{className:"mt-6",media:s,children:"Мобильное приложение"})]}),m(gr,{className:"pt-[3px]",items:c,fallback:l})]}),m(ur,{className:"mt-[98px]",links:r}),m(Cr,{links:n})]})})),Sr={normal:3,mini:4},Ir={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Tr={normal:380,mini:276},Br=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:i,button:a,version:s,isFullWidth:o=!0,isDotted:c=!0,align:d="center"})=>h("div",{className:`h-full flex flex-col justify-between ${C[d]}`,children:[h("div",{className:"flex flex-col h-full",children:[Rr(r,s),jr(t,e),Vr(l,e),i?.length?_r(i,c,s):null,Lr(n,s)]}),a?.text?Le({button:a,buttonClassName:"mt-6 "+(o?"":"self-center")}):null]}))),Rr=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(W,{className:"mb-5",image:e}):null,e?.icon?m(W,{className:"w-8 h-8 min-w-8 mb-5 rounded-full",image:ee(e,t),asSVG:!0}):null]}),jr=(e,t)=>t?m("div",{className:De[e],children:t}):null,Vr=(e,t)=>e?m("div",{className:"text-l "+(t?"mt-2":""),children:e}):null,Lr=(e,t)=>e?m("div",{className:`text-m-light mt-auto ${Q[t??"primary"]}`,children:e}):null,_r=(e,t,l="primary")=>m(Ll,{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,version:l}),Mr=u((({headlineVersion:e="M",cards:t=[],version:l="normal",activeIndex:n,...r})=>h("div",{children:[m(Oe,{...r,className:"!p-0",headlineVersion:e,align:"center"}),m("div",{className:`flex mt-8 ${t?.length<=Sr[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${n*Tr[l]}px)`},role:"list",children:t?.map(((e,t)=>function({card:e,version:t},l){return m("section",{className:`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between\n items-stretch ${Ir[t]} ${q[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:m(Br,{...e})},String(l))}({card:e,version:l},t)))})]})));const Ar=u((({cards:e=[],className:t="",version:l="normal",button:n,...r})=>{const[i,a]=Ze({itemCount:e?.length,visibleItemCount:Sr[l]}),{isScrollAvailable:s}=a;return h(B,{className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden flex flex-col ${t}`,...r,children:[m(Mr,{cards:e,version:l,activeIndex:i,...r}),et({...a,btnClass:["left-8","right-8"],className:"top-1/2"}),s?h("div",{children:[m("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),m("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]}):null,n?Le({button:n,buttonClassName:"mt-8 mx-auto"}):null]})})),Dr=u((e=>m(Ar,{...e,version:"normal"}))),Or=u((({className:e="",title:t,description:l,calendar:n,...r})=>h(B,{className:`font-sans bg-white p-12 ${e}`,...r,children:[m(Oe,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M",align:"center",...r}),n?zr(n):null]}))),zr=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 h("div",{className:"w-full flex flex-col justify-center mt-13",children:[m("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Er(e,t)))}),m("div",{className:"flex w-full",children:l.map(((e,t)=>h("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:[m("div",{className:"flex",children:Pr(e)}),h("div",{className:"text-s-light text-primary-text mt-3",children:[m("span",{children:e.text})," ",m("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Er=(e,t)=>e.month?.map(((e,l)=>m("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Pr=e=>e.month?.map((e=>e.image?.src?m("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:m(W,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Fr=(e,t,l=((e,t)=>t.startsWith(e)))=>l(de((e=>ce(e)||e?.startsWith("/")?e:`${o.BASE_PATH||""}${e}`)(e)),de(ce(e)?t.href:he(t.href))),Ur=e=>t=>Fr(t.href,e),Hr=e=>t=>t.items?.some(Ur(e))||Fr(t.href,e)||((e,t)=>[me(e),me(t.href)].every(((e,t,l)=>Boolean(e)&&e===l[0])))(t.href,e),Xr="font-sans text-s-light",Gr=u((({className:e="",active:t,flat:l,ariaLabel:n,bgColor:r="bg-white",children:i,...a})=>{const s=be(),{href:o,target:c,text:d,onClick:h}=s(a);return m("a",{className:`${Wr(r,t,l)} ${e}`,href:o,target:c,onClick:h,rel:"noopener noreferrer","aria-label":n,children:m("span",{className:Jr(r,t,l),children:d||i})})})),Wr=(e,t=!1,l=!1)=>{let n="border-transparent";return t&&(n="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${n} inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"}`},Jr=(e,t=!1,l=!1)=>{if("transparent"===e)return`text-white hover:text-primary-hover ${Xr}`;return`${t?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"} ${Xr}`},Yr=864e5;function Zr(e,t,l=globalThis?.localStorage){const n=i((async(...n)=>{const r=`async:${e}`,i=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<Yr?t:void 0}(l.getItem(r));if(i)return i;const a=await t(...n);return l.setItem(r,JSON.stringify({data:a,timestamp:Date.now()})),a}),[e,t]);return vt(e,n)}const Kr=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}};const qr=u((({className:e,searchTerm:t,onSearch:l})=>h("form",{className:`font-sans relative ${e}`,children:[m("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:m("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),m("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-main-stroke 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"})]}))),Qr=u((({currentLocation:e,onChangeLocation:t,close:l,foreignOffices:n})=>{const{term:r,setTerm:a}=ir(),s=i((e=>a(e)),[]),o=ti(function(){const{data:e}=vt("/api/v1/regions",wt);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;return e.forEach((e=>{const n=t(e),r=l.get(n);l.set(n,[...r||[],e])})),l})(o,ei);return h("div",{className:"absolute h-full w-full inset-0 bg-white text-l-light z-50",children:[m(ni,{close:l}),h("div",{className:"container py-12",children:[m(li,{currentLocation:e}),m(qr,{onSearch:s,searchTerm:r,className:"mb-7"}),r&&r.length>=3?m("div",{children:o.filter((e=>e.name?.startsWith(r))).map(ii({onChangeLocation:t,close:l}))}):m("div",{className:"columns-5",children:Array.from(c.entries()).map(ri({onChangeLocation:t,close:l}))}),m(ai,{foreignOffices:n})]})]})})),ei=e=>e.name?.charAt(0)||"",ti=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),li=u((({currentLocation:e})=>e?h("div",{className:"mb-4",children:[m(J,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),m("button",{className:"cursor-pointer",onClick:close,children:m(J,{color:"text-green",children:e.name})})]}):null)),ni=u((({close:e})=>m("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:m(W,{image:"CloseIcon",width:"24",height:"24"})}))),ri=({onChangeLocation:e,close:t})=>([l,n])=>h("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[m("div",{className:"mb-2.5",children:m(J,{size:"text-h6",children:l})}),n.map(ii({onChangeLocation:e,close:t}))]},l),ii=({onChangeLocation:e,close:t})=>l=>m("div",{className:"mb-1",children:m("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(l),t&&t()},children:l.name})},l.id),ai=u((({foreignOffices:e})=>e?.length?h("div",{className:"border-t border-main-divider mt-7 pt-7",children:[m("div",{className:"mb-4",children:m(J,{size:"text-m-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),m("div",{className:"flex gap-10",children:e.map(((e,t)=>m(si,{...e},String(t))))})]}):null)),si=u((({icon:e,...t})=>{const l=be(),{text:n,target:r,href:i,onClick:a}=l(t);return h("div",{className:"flex gap-x-3",children:[m(W,{image:e}),m("a",{className:"hover:text-primary-hover",href:i,target:r,onClick:a,children:n})]})})),oi=u((({className:e="",children:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 p-0 w-6 h-6 flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":l,children:t}))),ci={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},di={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},mi={"bg-white":"black",transparent:"white"},hi=u((({className:e,officesLink:t,defaultLocation:l="Москва",foreignOffices:a,bgColor:s="bg-white"})=>{const[o,c]=n(!1),[d,u]=function(e){const t=Kr(),[l,a]=n(t?.region??{name:e}),{data:s}=Zr("/api/v1/region",wt);return r((()=>{a(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[l,i((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),a(e)}),[a])]}(l);return h("div",{className:`flex items-center ${e||""}`,children:[m(Gr,{className:"mr-5",flat:!0,href:"#",text:d.name,ariaLabel:"Местоположение",onClick:()=>{c(!0)},bgColor:s}),t?m(Gr,{className:"mr-7",flat:!0,href:t,text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:s}):null,m(oi,{className:`mr-5 group ${ci[s]}`,ariaLabel:"Поиск по сайту",children:m(W,{image:{icon:"LoupeIcon",iconVersion:mi[s]},className:"h-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0 pointer-events-none",asSVG:!0})}),m(oi,{className:`${di[s]} group min-w-8 min-h-8`,ariaLabel:"Дополнительные ссылки",children:m(W,{image:{icon:"GridIcon",iconVersion:mi[s]},className:"h-full bg-main-divider/20 rounded-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0",asSVG:!0})}),o?m(Qr,{currentLocation:d,foreignOffices:a,onChangeLocation:u,close:()=>{c(!1)}}):null]})})),ui={"bg-white":"bg-primary-text",transparent:"bg-white"},pi=u((({className:e,items:t,activeItem:l,bgColor:r})=>{const a=be(),[s,o]=n(!1),c=i((()=>o((e=>!e))),[]),d=An(i((()=>o(!1)),[]));return h("div",{className:`${s?"bg-white rounded-md shadow-blue-gray/24":""} ${e||""}`,ref:d,children:[m("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6","aria-label":""+(s?"Скрыть другие разделы":"Показать другие разделы"),onClick:c,children:Array(3).fill(r).map(xi)}),m("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(s?"":"hidden"),"aria-hidden":!s,children:t?.map(((e,t)=>m("a",{className:"text-l-light pb-4 hover:text-primary-main "+(e===l?"text-primary-main":""),...a(e),children:e.text},e.href||String(t))))})]})})),xi=(e,t)=>m("div",{className:`w-[3px] h-[3px] rounded mr-1 ${ui[e]}`},String(t)),gi="absolute left-0 -bottom-3 w-full h-0.5",bi=u((({className:e="",active:t,bgColor:l="bg-white",dataItemName:n,children:r,...i})=>{const a=be(),{href:s,target:o,text:c,onClick:d}=a(i);return h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:s,target:o,"data-item-name":n,onClick:d,children:[m("span",{className:fi(l,t),children:c||r}),t?m("div",{className:vi(l,t)}):null]})})),fi=(e,t=!1)=>{let l="text-white";return"bg-white"===e&&(l=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${l} font-sans text-l-light`},vi=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${gi}`:gi,Ni=u((({className:e,active:t,bgColor:l,observerOptions:n,onVisibilityChange:r,children:a,...s})=>{const o=$(i((e=>{if(!e.length||!r)return;const t=e[e.length-1];r(t.isIntersecting)}),[r]),n);return m("span",{ref:o,children:m(bi,{className:e,active:t,bgColor:l,...s,children:a})})})),yi=u((({subItems:e=[],bgColor:t})=>{const l=(e=>(t=[])=>{const l=t?.filter(Ur(e));return l?.length?nl((e=>e.href?.length||0))(l):void 0})(ge())(e),[r,i]=n(e.length),o=e.slice(r),c=s(null),d={rootRef:c},u=a((()=>e.map(((e,t)=>e=>{i(e?wi(t):Ci(t))}))),[e]);return h("nav",{className:"relative mt-6",children:[m("div",{ref:c,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,n)=>m(Ni,{className:"mr-8 "+(r-1<n?"invisible":""),active:e===l,bgColor:t,observerOptions:d,onVisibilityChange:u[n],...e},String(n))))}),o.length?m(pi,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:o,activeItem:l,bgColor:t}):null]})})),wi=e=>t=>Math.max(t,e+1),Ci=e=>t=>Math.min(t,e),ki={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},$i=u((({bgColor:e="bg-white",className:t="",showSubMenu:l=!0,...n})=>{const r=ge(),{topItems:i,logo:a,defaultLocation:s,foreignOffices:c,officesLink:d}=qn(o.SITEMAP||"sitemap",n.options?.page?.fallback),u=i?.find(Hr(r)),p=i?.map(((t,l)=>m(Gr,{active:t===u,"aria-label":t.text,bgColor:e,...t},String(l))));return m(B,{tag:"header",className:`pt-6 px-20 ${e} ${t} ${l&&u?.items?.length?"pb-4":"pb-5"}`,...n,children:h("div",{className:"container",children:[h("div",{className:"flex items-center",children:[m(rr,{className:"mr-8",bgColor:e,logo:a}),p,m(hi,{className:"ml-auto",foreignOffices:c,defaultLocation:s,officesLink:d,bgColor:e})]}),m("div",{className:`mt-6 h-px ${ki[e]}`}),l&&u?.items?.length?m(yi,{subItems:u.items,bgColor:e}):null]})})})),Si=u((e=>{const{className:t,image:l,...n}=e;return m(B,{className:t,...n,children:m(W,{image:l})})})),Ii=u((({className:e="",cards:t=[],button:l})=>{const[r,a]=n(0),s=i((e=>a(e)),[]),o=t.length,[c,d]=Ze({itemCount:o,visibleItemCount:2}),{canDec:u,canInc:p}=d,x=t[c]?.href;return h("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[h("div",{className:"relative overflow-hidden",children:[o?Ti({activeIndex:c,cards:t,selectedCardIndex:r,onClick:s}):null,et({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),u?m("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,p?m("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),m(Be,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function Ti({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const r=460*e,i=t.length>2?"justify-start":"justify-center";return m("div",{style:{transform:`translateX(-${r}px)`},className:"duration-1000 px-12",children:m("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return h("button",{type:"button",onClick:n,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(l?"shadow-dark-blue/42 border-primary-main":"ease-in duration-300 border-main-stroke"),children:[e?.icon?m(W,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,h("div",{className:"flex gap-3.5",children:[e?.sum?Bi("страховая сумма",e.sum):null,e?.fee?Bi("страховой взнос",e.fee):null]}),Ri(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function Bi(e,t){return h("div",{className:"flex flex-col text-left whitespace-pre",children:[h("span",{className:"text-h6",children:[tt(t)," ₽"]}),m("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Ri(e){return e?m(W,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:"DoneIcon",width:"24",height:"24"}):null}const ji=u((({className:e="",title:t,insuranceTabs:l=[],button:r,...a})=>{const[s,o]=n(0),c=i((e=>o(e)),[]);return h(B,{className:`box-border py-12 overflow-hidden relative font-sans w-100 bg-white ${e}`,...a,children:[t?m(j,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?m("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return m("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-4 py-3 text-m-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Vi({insuranceTabs:l,button:r})})]})})),Vi=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>m(Ii,{button:t,cards:e},String(l)))):null};function Li(e){return t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:n},l):[l]),[])}const _i={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Mi={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Ai=u((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:r,investmentColumns:i,...a}=e,s=i?[...i]:[];return r&&s.unshift(r),m(B,{className:`font-sans bg-white px-9 py-12 ${t}`,...a,children:h("div",{className:"container text-m-light",children:[s?.length?h("div",{children:[h("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[Li(m("div",{className:"w-px h-4 bg-main-stroke"}))(s.map(Di)),m("div",{className:"absolute right-[30px] w-px h-4 bg-main-stroke"})]}),m("div",{className:"border-t border-main-stroke -mt-2 ml-9 mr-8"}),m("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Ei)})]}):null,l?.length?m(Ll,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:n}):null]})})})),Di=(e,t,l)=>{const n=1===t,r=t===l.length-1;return m("div",{className:`${Oi(n,r,e.cells)}`,children:e.cells?.length?m("div",{className:"w-full "+(r?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(zi)}):null},`column_${t}`)},Oi=(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(" "),zi=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?m("div",{className:`flex-1 flex items-center justify-center relative py-2 ${Mi[l]} ${_i[n]} ${"XS"===l?"px-3":"px-11"}`,children:m("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Ei=(e,t,l)=>{const n=0===t,r=t===l.length-1;return m("div",{className:`flex-1 max-w-[180px] text-center px-2 ${n?"pl-9":""} ${r?"mr-3.5":" "}`,children:e.title},`title_${t}`)},Pi=u((({className:e,iconClassName:t,textClassName:l,suffixClassName:n,doc:r,icon:i})=>{const{text:a,fileSize:s,...o}=r;return h("a",{className:e,role:"link",...o,children:[i?m(W,{className:t,image:ee(i),width:"24px",height:"24px",asSVG:!0}):null,a?h("span",{className:l,children:[a,m("span",{className:n,children:o?.href&&Fi(Ui(o.href),s)})]}):null]})})),Fi=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Ui=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Hi=u((({className:e="",doc:t,icon:l})=>m(Pi,{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:text-primary-main",doc:t,icon:l}))),Xi=u((({className:e,documents:t,columnsMode:l="double",icon:n})=>t?.length?m("div",{className:e,role:"list",children:t.map(((e,t)=>m("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:m(Hi,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:n})},String(t))))}):null)),Gi={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},Wi=u((({className:e="",title:t,description:l,align:n="center",documents:r,icon:i={icon:"DocIcon"},columnsMode:a="double",...s})=>h(B,{className:`font-sans text-primary-text p-12 bg-white ${e}`,...s,children:[m(Oe,{className:"!p-0",title:t,description:l,align:n,headlineVersion:"M",as:"h2",...s}),m(Xi,{className:`mt-8 ${Gi[a]}`,columnsMode:a,documents:r,icon:i})]}))),Ji=u((e=>m(Ar,{...e,version:"mini"}))),Yi=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=Yi(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const Ki=u((({className:e="",title:t="Мобильное приложение",qr:l,buttons:n,version:r="primary",items:i,image:a,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const u="primary"===r?"text-primary-text":"",p="secondary"===r?"p-3.5 min-w-[120px]":"min-w-[92px]",x=n?.map((e=>({...e,className:"min-w-[168px]"})));return h(B,{className:`flex justify-between font-sans p-12 box-border relative min-h-80\n ${Zi(e)}\n ${q[r]}\n ${e}`,...d,children:[h(vl,{className:"z-10",title:t?m(j,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full\n ${u} ${C[o]}`}):null,buttons:n?.length?m(Ve,{buttons:x,className:"flex gap-4 mt-8",...d}):null,children:[Qi(c),h("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?m("div",{className:`flex justify-center mr-5 bg-white rounded-md ${p}`,children:m(W,{className:"w-fit",image:l})}):null,qi(r,i)]})]}),a?.src?m("div",{className:"absolute right-0 bottom-0",children:m(W,{image:a})}):null]})})),qi=(e,t)=>t?.length?m(Ll,{items:t,itemClassName:"text-l-light mb-2 last:mb-0",version:e}):m("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Qi=e=>e?m("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null;function ea(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),r=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));r.add(i),t.geoObjects.add(r),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ta={focus:"focus:border-primary-focus 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"},la=e=>m("a",{className:`select-none cursor-pointer px-9 h-12 bg-white bg-primary-main text-white ${Object.values(ta).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),na={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)]"},ra=(e,t,l)=>h("div",{className:`${Object.values(na).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[m(O,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),m("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),ia={focus:"focus:border-primary-focus 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"},aa=(e,t,l)=>m("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(ia).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:m(O,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),sa=e=>globalThis[e];const oa=()=>function(e,t){const[l,a]=n(),s=i((()=>a(sa(e))),[e]);return r((()=>{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),a(void 0)}}if(!sa(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${o.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),ca={focus:"focus:border-primary-focus 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"},da=u((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return m("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(ca).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:m(O,{name:l,width:"20",height:"16"})})})),ma=[{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:"Кафе"}],ha={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-focus focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},ua=u((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const a=s(null),o=oa(),[c,d]=n(),[u,p]=n(ba(ma)),x=pa(e);if(r((()=>{a?.current||o?.ready((()=>{a.current=new o.Map("map",{center:x,zoom:l,controls:[],suppressMapOpenBlock:!0}),ea(o,a.current,u)}))}),[o,a,u]),r((()=>{if(a.current&&u&&o){const e=u.length<1?ba(ma):u;ea(o,a.current,e)}}),[a,u,o]),!o)return null;const g=c?"z-[100000]":"z-10";return h("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[m("div",{className:`absolute flex left-2 top-4 w-[50%] ${g}`,children:i?ra(ma,0,(e=>{if(e){const t=ba(e);p(t)}})):la(x)}),m("div",{className:`${Object.values(ha).join(" ")} ${g} right-2 top-4 bg-white`,onClick:()=>{const e=a.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:m(O,{name:"FullScreenIcon",width:"16",height:"16"})}),h("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${g}`,children:[m(da,{yandexMaps:a}),m(da,{yandexMaps:a,direction:"out"})]}),aa(a.current,o,`right-2 top-80 ${g}`)]})})),pa=e=>[ga(xa(e,0)),ga(xa(e,1))],xa=(e,t)=>e.map((e=>e[t])),ga=e=>e.reduce(((e,t)=>e+t))/e.length,ba=e=>e?e.map((e=>e.coords)):null,fa=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],va=({lunchHour:e,status:t,workTime:l})=>{const n=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?h("div",{className:"flex",children:[m("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}),m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-golden border-golden",children:e?n:null})]}):m("div",{className:"flex",children:m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},Na=({icon:e,title:t,distance:l,time:n},r)=>h("div",{className:"flex mr-4",children:[m(O,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?h("span",{className:"text-m",children:[t," "]}):null,h("span",{className:"text-m-light",children:[l?` (${l})`:null,n?`, ${n}`:null]})]},`nearbyOffice${r}`),ya=({title:e,status:t,workTime:l,lunchHour:n,description:r},i)=>h("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[h("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[m("div",{children:e}),t?null:m("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?m("div",{children:l}):null]}),t&&n?wa(n):null,r?m("div",{className:"pb-1 text-s-light text-secondary-text",children:r}):null]},`day${i}`),wa=e=>/\d+/gi.test(e)?h("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[m("div",{children:"Перерыв"}),m("div",{children:e})]}):m("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:m("div",{children:e})}),Ca={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 ka(e){return e?yt(e,{method:"GET"}):{}}const $a=u((({className:e=""})=>{const t=function(e){const{data:t}=vt(e?`/api/v1/branches?regionCode=${e}`:void 0,ka);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),Ca}("000"),{name:l,address:n,gpsLatitude:r,gpsLongitude:i,workSchedule:a}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:u,workingSaturday:p,workingSunday:x}=a,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=a,N=r&&i?[r,i]: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:u,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 h("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[h("div",{className:"flex flex-col px-12 pt-12",children:[h("div",{className:"flex justify-between",children:[m("div",{className:"text-h2",children:l}),va(C)]}),h("div",{className:"flex text-l-light pt-4",children:[m(O,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),n]}),m("div",{className:"flex pt-4",children:fa.map(Na)})]}),h("div",{className:"flex justify-between pt-8",children:[m("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?m(ua,{points:[N],className:"h-full"}):null}),m("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(ya)})]})]})})),Sa=u((({className:e="",title:t,servicesList:l,...n})=>h(B,{className:`font-sans bg-white p-8 flex flex-col ${e}`,...n,children:[t?m(j,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?m("ul",{className:"list-none m-0 p-0",children:l.map(Ia)}):null]}))),Ia=(e,t)=>h("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?m(W,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:ee(e.icon)}):null,e.label?m("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),Ta=u((({className:e="",...t})=>m(B,{className:`font-sans text-primary-text ${e}`,...t,children:w(t)})));Ta.childrenTypes=["OtherProductsItem"];const Ba=u((({className:e="",label:t,icon:l,dataTheme:n="",onClick:r})=>h("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":n,onClick:r,children:[m("span",{className:"text-h4 pr-3",children:t}),l?m(W,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),Ra=({isUnfolded:e,onToggle:t})=>m(Ba,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ja=["ArrowDownIcon","ArrowUpIcon"],Va=u((({className:e,label:t="",isUnfolded:l,...n})=>{const{colorPalette:r}=function(e,t){const{content:l}=function(e){return e?.parent||{}}(e);return l||t}(n.options,{});return m("div",{className:`border-0 border-b border-solid border-main-divider ${e}`,children:m(M,{unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(A,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(n)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(Ba,{label:t,icon:ja[Number(e)],dataTheme:r||n.options?.page?.colorPalette,onClick:l})})})}));Va.childrenTypes=[];const La=u((e=>{const{className:t,text:l,size:n,color:r,align:i,font:a,...s}=e;return m(B,{className:t,...s,children:m(V,{size:n,color:r,align:i,font:a,children:l})})})),_a={primary:"text-primary-text",secondary:"text-white"},Ma={primary:"text-secondary-text",secondary:"text-white"},Aa=u((e=>{const{className:t="",icon:l,label:n,description:r,version:i="primary",benefitsVersion:a="normal"}=e,s="white"===a?"secondary":"primary";return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[l?m("div",{className:Da(i,a),children:m(W,{className:"w-6 h-6",image:ee(l,s),asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[n?m("div",{className:`text-h6 ${_a[i]}`,children:n}):null,r?m("div",{className:`text-m-light ${Ma[i]}`,children:r}):null]})]})}));function Da(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 Oa=u((({className:e="",title:t,description:l,image:n,benefits:r,version:i="primary",sum:a,monthLimit:s,directionRight:o=!1,...c})=>h(B,{className:`relative font-sans py-12 px-24 ${q[i]} ${e}`,...c,children:[m(Oe,{className:"!p-0",title:t,description:l,headlineVersion:"M",bgColorHeadline:i,align:"center",...c}),h("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[n?.src?m(W,{className:o?"order-2":"",image:n}):null,h("div",{className:"w-[558px] m-auto",children:[r?.length?m("div",{className:"flex flex-col gap-4",children:r.map(za(i))}):null,Ea(Number(a),Number(s))]})]})]}))),za=e=>(t,l)=>m(Aa,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));function Ea(e,t){return e||t?h("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Pa("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Pa("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Pa(e,t=0,l=!1){return h("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[m("span",{className:"text-secondary-text text-l-light",children:e}),h("span",{className:"text-primary-main text-h6",children:[tt(t)," ₽"]})]})}function Fa(e=""){const t=Yi(e);return t<=4?"S":t<=8?"M":"L"}function Ua(e=""){const t=Yi(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Ha=u((({className:e,title:t,description:l="Блок в разработке...",...n})=>h(B,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Ua(e)} ${Zi(e)} `,...n,children:[m(Oe,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:Fa(e),...n}),m("figure",{className:"m-0 min-w-[80%]",children:Xa()})]}))),Xa=(e=3)=>Wa(100,e).map((e=>Math.floor(e))).map(Ga),Ga=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Wa=(e,t)=>[e].concat(t>0?Wa(e/1.618,t-1):[]),Ja=u((({className:e="",children:t,...l})=>{const n=be(),{text:r,href:i,target:a,onClick:s}=n(l);return i?m("a",{className:`no-underline ${e}`,href:i,target:a,onClick:s,children:m("span",{className:e,children:r||t})}):m("span",{className:e,children:r||t})})),Ya=(e="primary",t="normal")=>({icon:l,label:n,description:r},i)=>m(Aa,{icon:l,label:n,description:r,version:e,benefitsVersion:t},String(i)),Za=u((({className:e="",title:t,headlineVersion:l="L",description:n,benefitsCountOfRow:r=3,benefits:i,benefitsVersion:a,buttons:s,footnote:o,image:c,items:d,version:u="primary",isDotted:p=!0,textBlockClassName:x="",...g})=>{const b=i?.filter((e=>e.label))?.length,f=Ka(r);return h("div",{className:`flex grow justify-between items-stretch h-full ${e}`,children:[h("div",{className:`flex flex-col ${x}`,children:[m(Oe,{title:t,description:n,className:"!p-0 max-w-[600px]",bgColorHeadline:u,headlineVersion:l,align:"left",...g}),h("div",{className:"flex flex-col justify-between h-full",children:[h(vl,{buttons:s?.length?m(Ve,{buttons:s,className:"flex gap-4",...g}):null,children:[b?m("div",{className:f,children:i.map(Ya(u,a))}):null,d?.length?m(Ll,{className:"mt-5 text-h6",items:d,itemClassName:"mb-[7px]",version:u,isDotted:p}):null]}),o?m("p",{className:"text-m-light pt-12",children:o}):null]})]}),c?.src&&m(W,{className:"mt-[-50px]",image:c})]})})),Ka=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function qa(e,t,l){const{text:n,href:r,target:i,onClick:a}=e,s="primary"===t?"white":"black",o=e?.icon||{icon:"ArrowLeftIcon"};return h("div",{className:`flex items-center cursor-pointer ${l}`,onClick:a,children:[m(Be,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:n,href:r,target:i,children:m(W,{className:"w-4 h-4",image:{...o,iconVersion:o.iconVersion||s},asSVG:!0})}),n?m("span",{className:"text-m",children:n}):null]})}const Qa={primary:"text-secondary-text",secondary:"text-white/80"},es=u((e=>{const{className:t="",breadcrumbs:l,backwardButton:n,version:r="primary",...i}=e,a="primary"===r?r:"white";return h(B,{className:`font-sans overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${q[r]} ${t}`,...i,children:[n?.text?qa(n,a,"mb-10 -mt-2.5"):null,l?.length?m("div",{className:"text-xs-light mb-6",children:Li(m("span",{className:`mx-2 ${Qa[r]}`,children:"/"}))(l.map(((e,t)=>m(Ja,{className:Qa[r],...e},String(t)))))}):null,m(Za,{version:r,...i})]})})),ts={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},ls=u((({className:e="",slides:t=[],version:l="primary",...r})=>{const a=t.map((e=>e.nav)),s=t.map((e=>e.productBlock)),[o,c]=n(0),d=i((e=>c(e)),[]);return h(B,{className:`box-border pt-12 overflow-hidden relative font-sans w-100 mb-6 ${e}\n ${q[l]}`,...r,children:[m("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,t)=>function(e,t){const{version:l}=e,n=l?ts[l].title:"";return m("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:m("div",{className:"flex grow",children:m(Za,{className:`pl-12 z-10 ${n}`,textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...r,version:l},t)))}),m("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:a.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n,version:r}){const i=l?"bg-white shadow-dark-blue/42 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\n ${q[r]}`,a=l?"text-primary-text !text-h6 p-2":`text-l pb-1 ${ts[r].title}`,s=l?"text-secondary-text text-l-light":`text-m-light ${ts[r].text}`;return m("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0\n ${i} ${fl[r]}\n `,children:h("div",{className:"border-0 px-6",children:[m("div",{className:`last:pb-0 ${a}`,children:e?.title}),m("div",{className:`text-secondary-text ${s}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===o),onClick:()=>d(t),version:l})))})]})}));const ns={primary:"text-secondary-text",secondary:"text-white"};function rs(e,t,l="primary"){if(!e)return null;return m("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:m(V,{size:"text-m",font:"font-light",color:ns[l],children:e})})}const is=u((e=>{const{md:t=""}=e;return m("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));function as(e){throw new Error(e)}const ss={primary:"text-secondary-text",secondary:"text-white"},os=(e="primary")=>(t,l)=>{const{type:n}=t;if("default"!==n&&"md"!==n)return null;switch(n){case"default":return[m(J,{size:"text-h6",children:t.label},`label-${l}`),m(J,{size:"text-m-light",color:ss[e],children:t.description},`desc-${l}`)];case"md":return m(is,{md:t.md});default:as(t)}};function cs(e,t){return e?.src?m(W,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const ds=u((({className:e="",title:t,headlineVersion:l="S",description:n,additionalDescription:r,benefits:i=[],buttons:a,image:s,isImageOnRightSide:o=!0,version:c="primary",...d})=>h(B,{className:`overflow-hidden font-sans p-9 box-border relative min-h-[364px]\n ${q[c]} ${Ua(e)} ${e}`,...d,children:[h("div",{className:"flex flex-col "+(o?"":"items-end"),children:[m(Oe,{className:"!p-0 !bg-transparent z-10 "+(t||n?"mb-3.5":""),as:"h2",title:t,description:n,headlineVersion:l,bgColorHeadline:c,align:"left",...d}),ms(i,c,s),rs(r,s),a?.length?m(Ve,{buttons:a,className:"mt-5 gap-4 z-10 text-l"}):null]}),cs(s,o)]})));function ms(e,t,l){if(!e.length)return null;return m("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline\n ${l?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(os(t)):null})}const hs=u((({className:e="",title:t="Акции и спецпредложения",date:l,description:n,buttons:r=[],version:i="primary",...a})=>m(B,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${q[i]} ${Ua(e)} ${Zi(e)} `,...a,children:m(vl,{title:t?m(Oe,{title:t,className:"!p-0 max-w-[600px]",headlineVersion:Fa(e),bgColorHeadline:i,align:"left",as:"h2",...a}):null,buttons:r?.length?m(Ve,{buttons:r,className:"flex gap-3"}):null,children:h("div",{className:"mt-1.5",children:[l?m("div",{className:"text-s mb-2",children:us(l)}):null,m("div",{className:"text-l",children:n})]})})})));function us(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const ps=u((({button:e,className:t="",description:l,image:n,items:r=[],socialMedia:i=[],title:a,version:s="primary",...o})=>{const c=a?m(j,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:a}):null,d=n?.src?m(W,{className:"absolute bottom-0 right-0 m-0",image:n}):null;return m(B,{className:`relative text-left border border-solid box-border p-7 min-w-[524px]\n ${fl[s]}\n ${q[s]}\n ${t}`,...o,children:m(vl,{className:"flex justify-between",title:c,image:d,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,r.length?m(Ll,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:r,version:s}):null,i.length?m(yr,{className:"pt-10 pb-0",media:i,version:s}):null,e?.text?m("div",{className:"pt-2 mt-16",children:Le({button:e})}):null]})})})})),xs=u((({className:e="",title:t,description:l,items:n,image:r,version:i,socialMedia:a,button:s})=>{const o=t?m(j,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:t}):null,c=r?.src?m(W,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return m("section",{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${e}`,role:"listitem",children:m(vl,{className:"flex justify-between",title:o,image:c,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,n?.length?m(Ll,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:n,version:i}):null,a?m(yr,{className:"pt-10 pb-0",media:a,version:i}):null,s?.text?m("div",{className:"pt-2",children:Le({button:s,buttonClassName:"mt-16 px-5"})}):null]})})})})),gs="absolute top-0 bottom-0 w-[84px]",bs=u((({recommendations:e=[],className:t="",title:l,version:n="primary",...r})=>{const[i,a]=Ze({itemCount:e.length,visibleItemCount:2});return h(B,{className:`relative font-sans p-9 overflow-hidden text-center ${q[n]} ${t}`,...r,children:[l?m(j,{headingType:"h3",className:"mb-6",title:l}):null,h("div",{children:[m("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*i}px)`},role:"list",children:e.length?e.map(((e,t)=>m(xs,{version:n,className:fl[n],...e},String(t)))):null}),et({...a,btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})]}),m("div",{className:`${gs} left-0 ${"secondary"===n?"bg-opacity-from-main":"bg-opacity-from-white"}`}),m("div",{className:`${gs} right-0 ${"secondary"===n?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),fs=u((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:n=!0,version:r="primary",...i})=>m("div",{className:`border-b border-solid border-main-divider w-full ${e}`,children:m(M,{isFoldButtonOnTop:n,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(A,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(i)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>vs({isUnfolded:e,onToggle:l,label:t,version:r})})})));fs.childrenTypes={exclude:["RollupItem","Accordion","AccordionItem","OtherProducts","OtherProductsItem","VerticalLayout"]};const vs=({isUnfolded:e,onToggle:t,label:l,version:n})=>{const r=l?[l,l]:["Развернуть","Скрыть"];return"primary"===n?m(Ns,{icon:["PlusIcon","MinusIcon"][Number(e)],label:r[Number(e)],onClick:t}):m(Ba,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:r[Number(e)],onClick:t})},Ns=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m("span",{className:"text-xl font-medium pr-2.5",children:e}),t?m(W,{image:ee({icon:t}),width:"24",height:"24",asSVG:!0}):null]}))),ys=[];const ws=async e=>await yt(e,{method:"GET"})||ys,Cs=u((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:r="",setSelected:i,label:a})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return m(Dn,{options:s,label:a,placeholder:r||n,onChange:e=>i(e.key),value:o})})),ks=u((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:r,onSelectedBranch:i})=>h("div",{className:"flex justify-between gap-4 mb-6",children:[m("div",{className:"max-w-[396px] w-1/2",children:m(Cs,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),m("div",{className:"max-w-[396px] w-1/2",children:m(Cs,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:r,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),$s=u((({name:e,text:t,value:l,checked:n,onChange:r,className:i})=>m("div",{className:i,children:h("label",{className:"font-sans flex items-center relative cursor-pointer",children:[m("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-checkbox-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>r(e.target.value)}),t?m("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),Ss=u((()=>{const[e,t]=n("option2"),l=i((e=>t(e)),[]);return h("div",{children:[m($s,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),m($s,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),Is=["От 1 дня","До 365 дней"],Ts=u((({days:e,setDays:t})=>h("div",{className:"mb-6",children:[m("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),m(pt,{min:1,max:365,value:e,items:Is,onChange:t})]}))),Bs=u((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:r,onSelectedBoxSize:i})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"mr-4 w-full",children:m(Cs,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),m("div",{className:"w-full",children:m(Cs,{data:n,fieldLabel:"safeBoxCasesSize",selected:r,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Rs=u((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:r,selectedCaseVolume:i,selectedBoxSize:a,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>h("div",{className:"flex-1 mr-9",children:[m(ks,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:js(c)}),m(Ts,{days:r,setDays:e=>c({days:e})}),m(Bs,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Vs(c),safeBoxCases:s,selectedBoxSize:a,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),m("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),h("div",{className:"flex justify-between items-center mt-5",children:[m(Ss,{}),m(Be,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),js=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Vs=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ls=u((({days:e,tariffs:t=[]})=>{const l=Ms(e,t);return h("div",{className:"flex flex-col justify-between",children:[h("div",{className:"flex",children:[_s("Аренда за",e,"mr-11"),_s("Цена",l+" ₽")]}),h("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[m(W,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),h("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",m("br",{})," листов формата А4"]})]})]})})),_s=(e,t,l="")=>h("div",{className:l,children:[m("div",{className:"text-m-light text-secondary-text mb-1",children:e}),m("span",{className:"text-h3 text-primary-text",children:t})]}),Ms=(e,t)=>{const l=As(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},As=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},Ds=(e,t)=>e.find((e=>e.branchCode===t)),Os=u((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:a}=e;r((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Ds(n,l.selectedBranch),o=zs(s?.safeBoxCaseVolumes),c=Es(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Ps(c,l.selectedBoxSize);return h("div",{className:"flex justify-between align-top mb-6",children:[m(Rs,{...l,regions:t,onClick:a,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),m(Ls,{days:l.days,tariffs:d})]})})),zs=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Es=(e,t)=>e?.find((e=>e.volume===t)),Ps=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs;const Fs=u((({title:e,footnote:t,className:l="",...r})=>{const[a,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=function(){const{data:e}=vt("/api/v1/regions",wt);return e||[]}(),p=Us(c.selectedRegion,u),x=function(e){const{data:t}=vt(e?`/api/v1/safeboxes?regionCode=${e}`:null,ws);return t||ys}(p),g=i((e=>d((t=>({...t,...e})))),[d]),b=(f=Ds(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 h(B,{className:l,...r,children:[h("div",{className:"font-sans bg-white px-8 py-12",children:[e?m(j,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,m(Os,{regions:u,branches:x,data:{...c,selectedRegion:p},onClick:o,onChange:g}),t?m("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&a?m(ua,{points:b,className:"h-[640px]"}):null]})})),Us=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Hs=e=>Boolean(e?.icon||e?.src),Xs=({items:e,isDotted:t=!0,version:l="primary",className:n=""})=>e?m(Ll,{className:n,version:l,items:e,listItemSize:"M",isDotted:t}):null,Gs=({styleMap:e,isMainButton:t,version:l})=>(n,r,{length:i})=>{const{label:a,description:s,button:o,items:c,isDotted:d}=n,u=a&&(s||c)?"mt-2":"";return h("div",{className:`relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${Zs(i)}`,children:[h("div",{className:(o?.text?"mb-8":"")+" text-center",children:[Ws(a),h("div",{className:`${u} flex flex-col items-center`,children:[Js({description:s,className:e.description}),Xs({items:c,isDotted:d,version:l,className:Ys({className:"text-left",description:s,styleMap:e})})]})]}),o?.text&&!t?m(Be,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(r))},Ws=e=>e?m("div",{className:"text-h6",children:e}):null,Js=({description:e,className:t=""})=>e?m("div",{className:t,children:e}):null,Ys=({className:e,description:t,styleMap:l})=>[t?l.description:"text-h6",t?"mt-0.5":"",e].join(" "),Zs=e=>e<5?"w-[276px]":"w-[210px]",Ks={primary:{background:"bg-white",title:"text-primary-text",description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{background:"bg-primary-main",title:"text-white",description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},qs=u((({className:e="",showLines:t=!0,steps:l=[],button:n,version:r="primary",...i})=>{const{title:a}=i,s=Ks[r],o=l.length>3,c=(e=>e?"":"opacity-0")(t),d=a?"mt-9":"",u=(e=>e<5?"px-[88px]":"px-[55px]")(l.length);return h(B,{className:["box-border py-12 font-sans",o?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",s.background,s.title,e].join(" "),...i,children:[a?m(j,{headingType:"h3",className:"max-w-[752px] text-center",title:a}):null,l?.length?h("div",{className:`box-border ${d}`,children:[m("div",{className:`flex items-center ${u}`,children:Li(m("div",{className:`h-0.5 w-full bg-secondary-light ${c}`}))(l.map(Qs(s,r)))}),m("div",{className:"flex justify-between mt-4 "+(o?"gap-x-3":"gap-x-[101px]"),children:l.map(Gs({styleMap:s,isMainButton:Boolean(n?.text),version:r}))})]}):null,n?.text?m(Be,{className:"mt-8 min-w-60",version:"primary",...n}):null]})})),Qs=(e,t)=>({icon:l},n)=>m("div",{className:"flex flex-col items-center text-center",children:m("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\n ${e.iconBackground} ${e.title}`,children:Hs(l)?m(W,{image:ee(l||{},t),width:"48",height:"48",asSVG:!0}):m("span",{className:`text-h4 ${e.iconText}`,children:n+1})})},String(n)),eo="h-12 flex-1 flex items-center justify-center cursor-pointer",to="bg-primary-main",lo="group bg-white",no="font-sans text-m",ro="text-white",io="text-secondary-text group-hover:text-primary-main",ao=u((e=>{const{tab:t,currentTab:l}=e,n="link"===l?.type&&l.href===t.href,r=be()(t);return m("a",{role:"tab",className:`${eo} ${n?to:lo}`,target:t.target,href:r.href,onClick:r.onClick,children:m("span",{className:`${no} ${n?ro:io}`,children:t.text})})})),so=(e,t)=>m("h3",{className:`${no} ${t?ro:io}`,children:e}),oo=(e,t)=>m("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(t?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover:text-primary-main"),children:e}),co=({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,i)=>{const a=r.type;if("group"!==a&&"link"!==a)return null;switch(a){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,i)=>{const a=t===r,s=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return m("div",{className:`${eo} ${a?to:lo}`,role:"tab","aria-selected":a,onClick:()=>n(r),children:h("div",{className:"flex flex-1 items-center justify-center",children:[r?.title?so(r.title,a):null,l&&s?oo(s,a):null]})},String(i))})({page:e,currentTab:t,showCounter:l,onClick:n})(r,i);case"link":return m(ao,{tab:r,currentTab:t},String(i));default:as(a)}},mo=u((e=>{const{className:t="",tabs:l,showCounter:a,isSticky:s,...o}=e,[c,d]=n(l?l[0]:void 0);r((()=>k.inst.subscribe("tab",(e=>{const t=l?.find(ho(e));"link"===e.type&&t&&d(t)}))),[l]),r((()=>"group"===c?.type?k.inst.subject("tab",{label:c.ref}):void 0),[c]);const h=i((e=>{"group"===e?.type&&k.inst.fire("tab",{type:e.type,label:e.ref}),d(e)}),[]);return m(B,{className:`${s?"sticky top-1 z-20 ":""}box-border flex gap-x-1 ${t}`,role:"tablist",...o,children:l?.map(co({onClick:h,currentTab:c,showCounter:a,...o}))})})),ho=e=>t=>"link"===t.type&&t.href===`#${e.label}`,uo=u((({isOpen:e,onClick:t})=>h(Be,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[m("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),m(O,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),po={Buttons:({buttons:e})=>e&&e?.length?m("div",{children:e.map((({rounded:e,...t},l)=>Le({button:{rounded:e,...t},buttonClassName:(l>0&&e?"ml-3":"")+" w-12 h-12"})))}):null,Img:({image:e})=>e?.src?m(W,{image:e}):null,List:({isDotted:e,...t})=>m(Ll,{className:"flex flex-col justify-between items-start text-h6",version:"primary",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:u((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:r})=>e?m(uo,{isOpen:r,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null))},xo=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:i,openTableInnerIdx:a,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,u]=n(!0);r((()=>{t===a&&i||u(!0)}),[i,a]);return h("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?m("div",{className:"h-5"}):null,go({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{u(!1),s(t),l(e)},isVisible:d}})]},String(c))},go=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in po))return null;return m(po[l],{...t,...n})},bo=u((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:a})=>m("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(xo({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:a})):null}))),fo=u((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=Ze({itemCount:t,visibleItemCount:5});return h("div",{children:[e?.map(vo(l)),et({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),vo=e=>(t,l)=>{if(!t?.length)return null;const[n,...r]=t,i=[...Array(e).keys()].reduce(((e,t)=>140*(r?.[t]?.cols?.length??1)+e),0),a=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return h("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[n?.data?m("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:n.data}):null,m("div",{className:"flex flex-grow overflow-hidden",children:m("div",{className:a,style:{transform:`translateX(-${i}px)`},children:r?.map(((t,l)=>h("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?m("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?No(t.cols,e):null]},`row${l}`)))})})]},String(l))},No=(e,t)=>e?.length>0?m("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>m("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,yo=u((({activeTabIndex:e,items:t})=>{const[l,r]=n({}),a=i((e=>r((t=>({...t,[e]:!t[e]})))),[]);return m("div",{children:t.map(((t,n)=>{const r=`activeTabIdx:${e}-tableIdx:${n}`;return h("div",{className:"w-full",children:[h("div",{className:"flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>a(r),children:[t.title,m(W,{image:l[r]?"PlusIcon":"MinusIcon",className:"absolute right-[22px]",width:"24",height:"24"})]}),m("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[r]?"h-0":""),children:m("div",{className:"relative",children:m(fo,{rows:t.rowsData})})})]},r)}))})})),wo=u((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>h("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?m("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>m("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?m(Be,{href:t,version:"secondary",target:"_blank",appendLeft:m(O,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function Co(e){const t=await fetch(e);return await t.json()}const ko=u((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:r}=function(e){const{data:t}=vt(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Co);return t||{}}(e),[a,s]=n(0),o=i((e=>s(e)),[]),c=r?.[a]?.items??[],d=r?.map((e=>e.currency??""));return h("div",r?{className:"bg-white z-10",children:[m(wo,{currencies:d,activeTabIndex:a,setActiveTabIndex:o,linkToPDF:t}),m(yo,{activeTabIndex:a,items:c}),m(uo,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[m("p",{children:"Данных нет"}),m(uo,{onClick:l,isOpen:!0})]})})),$o=u((({children:e,tableInner:t,onHideContentClick:l})=>h("div",{className:"self-start flex flex-col",role:"row",children:[m("div",{className:"flex",children:e}),t?m("div",{className:"origin-top animate-expansion",children:m(ko,{...t,onClick:l})}):null]}))),So=u((({row:{header:e,data:t},activeIndex:l,rowIdx:r,...a})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,u]=n(void 0),p=i((e=>u(e)),[]);return h($o,{onHideContentClick:()=>o(void 0),tableInner:s,...a,children:[m("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:h("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?m(W,{className:"mr-3.5 max-w-6 max-h-6",image:ee(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?m("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?m(sn,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>m(bo,{cells:e,rowIdx:r,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:p,...a},String(t))))}):null]})})),Io=u((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:r,hiddenRowsNum:i=0,...a})=>{const s=r?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,u]=Ze({itemCount:c,visibleItemCount:2}),p=(o||[]).map(((e,t)=>m(So,{row:e,activeIndex:d,rowIdx:t,...a},String(t)))),[x,g]=i>0?[p.slice(0,-i),p.slice(-i)]:[p,[]];return h(B,{className:`bg-white font-sans p-12 overflow-hidden text-primary-text relative ${c>1?"pr-0":""} ${e}`,...a,children:[To({title:t,description:l}),Bo(l),i>0?m(M,{renderFoldableSection:({isUnfolded:e})=>h(Ro,{controls:u,children:[x,m(A,{isUnfolded:e,children:g})]}),renderFoldButton:Ra}):m(Ro,{controls:u,children:p})]})}));function To({title:e,description:t}){return e?m(j,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function Bo(e){return e?m("div",{className:"mb-9 text-center text-l",children:e}):null}const Ro=u((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return h("div",{role:"table",children:[h("div",{className:"relative",children:[e,et({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),jo={primary:"bg-white",secondary:"bg-primary-main","secondary-light":"bg-primary-main/10"},Vo=u((({className:e="",title:t,description:l,blockVersion:n="primary",iconVersion:r,image:i,...a})=>{const s="secondary"===n;return h(B,{className:`px-9 py-4 flex gap-3 ${jo[n]} ${e}`,...a,children:["small"===r?m("div",{className:"mt-1",children:Lo(s)}):null,"big"===r?_o(i):null,h("div",{children:[t?Mo(t,s):null,l?m("div",{className:"mt-1",children:Ao(l,s)}):null]})]})})),Lo=e=>m("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"}),_o=e=>e?.src?m(W,{image:e}):null,Mo=(e,t)=>m(J,{size:"text-l",font:"font-medium",color:t?"text-white":"text-primary-text",children:e}),Ao=(e,t)=>m(V,{size:"text-s",color:t?"text-white":"text-secondary-text",children:e}),Do=u((e=>{const{tags:t,className:l=""}=e;return t?.length?m("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Oo)}):null})),Oo=(e,t)=>m("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-color-stroke",children:e},String(t)),zo=u((e=>{const{title:t,headingType:l="h3",description:n,items:r,buttons:i,image:a,isDotted:s=!0,listItemSize:o="M",className:c="",version:d="primary",tags:u,children:p,...x}=e,g="primary"===d?"text-primary-text":"";return m(B,{className:`overflow-hidden font-sans p-9 pr-3 box-border ${c} ${q[d]} ${Ua(c)} ${Zi(c)} `,...x,children:h(vl,{title:t?m(j,{headingType:l,as:"h2",title:t,className:`whitespace-pre-wrap max-w-[600px] ${g}`}):null,buttons:i?.length?m(Ve,{buttons:i.map((e=>({...e,className:"min-w-[158px]"}))),className:"flex mt-8 gap-3",...x}):null,image:a?.src?m(W,{className:"mt-auto ml-7",image:a}):null,children:[n?m("div",{className:"max-w-[600px] mt-2.5",children:m(V,{size:"text-xl-light",children:n})}):null,p,Eo({version:d,isDotted:s,listItemSize:o},r),u?.length?m(Do,{tags:u,className:"mt-5"}):null]})})}));function Eo({version:e,isDotted:t,listItemSize:l},n){return n?.length?m(Ll,{items:n,isDotted:t,className:"mt-2.5",listItemSize:l,itemClassName:"mb-1.5",version:e}):null}const Po={left:"items-start",center:"items-center",right:"items-end"},Fo={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},Uo={transparent:"",primary:"bg-white",secondary:"bg-primary-main"},Ho=u((({className:e="",gap:t="",align:l,isPadding:n=!1,isInnerPadding:r=!0,version:i="transparent",options:a,...s})=>{const o=r?"":"!p-0";return m(B,{className:["flex flex-col [&>*]:max-w-full",n?"p-12":"",Fo[t],l&&Po[l],Uo[i],e].filter(Boolean).join(" "),...s,children:w({...s,options:{...a,className:o}})})}));Ho.childrenTypes={exclude:["VerticalLayout"]};const Xo=e=>Yi(e)<10?"py-6 px-11":"py-12 px-32",Go=u((e=>{const{title:t,src:l,previewImg:n,className:r="",...i}=e;return h(B,{className:`bg-white ${Xo(r)} ${r}`,...i,children:[m(Oe,{title:t,headlineVersion:"M"}),l?m("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:n?.src,style:{maxHeight:524},controls:!0,children:m("source",{src:l})}):null]})})),Wo={Accordion:_,AccordionItem:Z,BenefitsBlock:re,BusinessBlock:Je,ButtonBlock:Ye,Bonus:ze,BonusBenefitsBlock:Ue,CardTransfer:Zt,Calculator:Ft,Carousel:dl,CarouselCard:pl,CarouselCatalogCard:gl,CarouselInvestmentCard:yl,CarouselLinks:$l,CarouselProductCard:Al,CarouselProgramsCard:Fl,CarouselTariffsCard:Hl,Catalog:Ql,ContactsBlock:Nn,ComparisonTable:fn,ErrorBlock:kn,ExchangeRateTile:Zn,Footer:$r,Gallery:Dr,GracePeriod:Or,Header:$i,Headline:Oe,ImgBlock:Si,InsuranceAmountBlock:ji,InvestmentInfo:Ai,LinkDocs:Wi,MiniGallery:Ji,MobileAppTile:Ki,ParagraphBlock:La,PictureText:Oa,Placeholder:Ha,ProductBlock:es,ProductGallery:ls,ProductTile:ds,PromoTile:hs,OfficeServicesBlock:Sa,OtherProducts:Ta,OtherProductsItem:Va,CarouselRecommendationCard:ps,RollupItem:fs,SafeDepositRental:Fs,StepsBlock:qs,Tabs:mo,TariffsTable:Io,TextBlock:Vo,Tile:zo,VerticalLayout:Ho,Video:Go,Recommendation:bs,OfficeMap:$a},Jo=["Header","Footer"],Yo=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Zo(e=T.inst,t=globalThis){const l=s(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{l.current&&l.current.set(e,t)}))),[e]),r((()=>{const n=((e,t=600)=>{let l;const n=(...r)=>{n.dispose(),l=setTimeout((()=>{e(...r)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!Jo.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?rl(Yo)(t):[];return l}([...l.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",n),()=>{n.dispose(),t.removeEventListener("scroll",n)}}),[e,t])}const Ko=d();const qo=u((({className:e,onClick:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Qo()}))),Qo=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("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"}),m("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"})]})},ec=u((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return r((()=>{(async()=>{const[t]=await Ko.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Ko.like(e))}),[e]),dislike:i((async()=>{l(await Ko.dislike(e))}),[e])}}(ge().pathname);return h("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:[m(qo,{onClick:xe(t.like),ariaLabel:"Поставить отметку «лайк»"}),m(qo,{onClick:xe(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:t.likeCount})]})})),tc=u((e=>{const{className:t="",blocksRegistry:l,blockDecorator:n,data:r={}}=e,{style:i,blocks:a,slots:s,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:l,blockDecorator:n,parent:r};return Zo(),h("section",{className:`relative ${x(i)} ${t}`,"data-theme":c,children:[s?.header?m("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,h("div",{className:"container grid grid-cols-12 gap-1",children:[y(a,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(ec,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));tc.childrenTypes=[],tc.slots=()=>["header","footer"];e.Blocks=Wo,e.ContentPage=tc,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=d,e.handlerDecorator=xe,e.joinList=Li,e.packageVersion="0.6.44",e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=pe,e.useRouter=ge,Object.defineProperty(e,"__esModule",{value:!0})}));