@redneckz/wildless-cms-uni-blocks 0.14.63 → 0.14.64

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 (190) hide show
  1. package/bin/migration-scripts/0.14.62.js +66 -0
  2. package/bin/utils.js +14 -1
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +38 -43
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
  7. package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
  8. package/bundle/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
  9. package/bundle/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  10. package/bundle/ui-kit/List/List.d.ts +6 -3
  11. package/bundle/ui-kit/List/ListContent.d.ts +11 -2
  12. package/bundle/ui-kit/List/ListItem.d.ts +1 -2
  13. package/bundle/ui-kit/RichText/RichTextProps.d.ts +3 -3
  14. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -13
  15. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  16. package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
  17. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
  18. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  19. package/dist/components/MobileAppTile/MobileAppTile.js +3 -3
  20. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  21. package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
  22. package/dist/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
  23. package/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  24. package/dist/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
  25. package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  26. package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  27. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  28. package/dist/ui-kit/List/List.d.ts +6 -3
  29. package/dist/ui-kit/List/List.js +21 -13
  30. package/dist/ui-kit/List/List.js.map +1 -1
  31. package/dist/ui-kit/List/ListContent.d.ts +11 -2
  32. package/dist/ui-kit/List/ListItem.d.ts +1 -2
  33. package/dist/ui-kit/List/ListItem.js +1 -7
  34. package/dist/ui-kit/List/ListItem.js.map +1 -1
  35. package/dist/ui-kit/RichText/RichTextProps.d.ts +3 -3
  36. package/lib/common.css +1 -1
  37. package/lib/components/BenefitsBlock/BenefitsBlock.js +2 -14
  38. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  39. package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
  40. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
  41. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  42. package/lib/components/MobileAppTile/MobileAppTile.js +3 -3
  43. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  44. package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
  45. package/lib/components/RichTextBlock/RichTextBlock.fixture.d.ts +3 -2
  46. package/lib/components/RichTextBlock/RichTextBlock.fixture.mobile.d.ts +4 -2
  47. package/lib/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
  48. package/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  49. package/lib/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
  50. package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  51. package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  52. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  53. package/lib/ui-kit/List/List.d.ts +6 -3
  54. package/lib/ui-kit/List/List.js +20 -12
  55. package/lib/ui-kit/List/List.js.map +1 -1
  56. package/lib/ui-kit/List/ListContent.d.ts +11 -2
  57. package/lib/ui-kit/List/ListItem.d.ts +1 -2
  58. package/lib/ui-kit/List/ListItem.js +1 -7
  59. package/lib/ui-kit/List/ListItem.js.map +1 -1
  60. package/lib/ui-kit/RichText/RichTextProps.d.ts +3 -3
  61. package/mobile/bundle/bundle.umd.js +38 -43
  62. package/mobile/bundle/bundle.umd.min.js +1 -1
  63. package/mobile/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
  64. package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
  65. package/mobile/bundle/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
  66. package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  67. package/mobile/bundle/ui-kit/List/List.d.ts +6 -3
  68. package/mobile/bundle/ui-kit/List/ListContent.d.ts +11 -2
  69. package/mobile/bundle/ui-kit/List/ListItem.d.ts +1 -2
  70. package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +3 -3
  71. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -13
  72. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  73. package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
  74. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
  75. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  76. package/mobile/dist/components/MobileAppTile/MobileAppTile.js +3 -3
  77. package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  78. package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
  79. package/mobile/dist/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
  80. package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  81. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
  82. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  83. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  84. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  85. package/mobile/dist/ui-kit/List/List.d.ts +6 -3
  86. package/mobile/dist/ui-kit/List/List.js +21 -13
  87. package/mobile/dist/ui-kit/List/List.js.map +1 -1
  88. package/mobile/dist/ui-kit/List/ListContent.d.ts +11 -2
  89. package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -2
  90. package/mobile/dist/ui-kit/List/ListItem.js +1 -7
  91. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  92. package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +3 -3
  93. package/mobile/lib/common.css +1 -1
  94. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +2 -14
  95. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  96. package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
  97. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
  98. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  99. package/mobile/lib/components/MobileAppTile/MobileAppTile.js +3 -3
  100. package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  101. package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
  102. package/mobile/lib/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
  103. package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  104. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
  105. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  106. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  107. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  108. package/mobile/lib/ui-kit/List/List.d.ts +6 -3
  109. package/mobile/lib/ui-kit/List/List.js +20 -12
  110. package/mobile/lib/ui-kit/List/List.js.map +1 -1
  111. package/mobile/lib/ui-kit/List/ListContent.d.ts +11 -2
  112. package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -2
  113. package/mobile/lib/ui-kit/List/ListItem.js +1 -7
  114. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  115. package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +3 -3
  116. package/mobile/src/common.css +15 -11
  117. package/mobile/src/components/BenefitsBlock/BenefitsBlock.example.json +3 -8
  118. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +21 -62
  119. package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +6 -36
  120. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
  121. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -2
  122. package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +10 -12
  123. package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +4 -2
  124. package/mobile/src/components/RichTextBlock/RichTextBlock.example.json +2 -1
  125. package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +1 -1
  126. package/mobile/src/components/TariffsTable/TariffsTableContent.ts +1 -1
  127. package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +12 -2
  128. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
  129. package/mobile/src/ui-kit/List/List.tsx +32 -20
  130. package/mobile/src/ui-kit/List/ListContent.ts +14 -2
  131. package/mobile/src/ui-kit/List/ListItem.tsx +3 -11
  132. package/mobile/src/ui-kit/RichText/RichTextProps.ts +3 -3
  133. package/package.json +1 -1
  134. package/src/common.css +15 -11
  135. package/src/components/BenefitsBlock/BenefitsBlock.example.json +3 -8
  136. package/src/components/BenefitsBlock/BenefitsBlock.fixture.mobile.tsx +1 -4
  137. package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +33 -66
  138. package/src/components/BenefitsBlock/BenefitsBlock.tsx +21 -62
  139. package/src/components/BenefitsBlock/BenefitsBlockContent.ts +6 -36
  140. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
  141. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -2
  142. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +0 -3
  143. package/src/components/MobileAppTile/MobileAppTile.tsx +10 -12
  144. package/src/components/MobileAppTile/MobileAppTileContent.ts +4 -2
  145. package/src/components/RichTextBlock/RichTextBlock.example.json +2 -1
  146. package/src/components/RichTextBlock/RichTextBlock.fixture.mobile.tsx +44 -18
  147. package/src/components/RichTextBlock/RichTextBlock.fixture.tsx +41 -30
  148. package/src/components/TariffsTable/EmbeddableCellData.tsx +1 -1
  149. package/src/components/TariffsTable/TariffsTableContent.ts +1 -1
  150. package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +18 -2
  151. package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +2 -2
  152. package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +12 -2
  153. package/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
  154. package/src/ui-kit/List/List.fixture.tsx +1 -1
  155. package/src/ui-kit/List/List.tsx +32 -20
  156. package/src/ui-kit/List/ListContent.ts +14 -2
  157. package/src/ui-kit/List/ListItem.tsx +3 -11
  158. package/src/ui-kit/RichText/RichTextProps.ts +3 -3
  159. package/bundle/components/MobileAppTile/renderList.d.ts +0 -3
  160. package/bundle/ui-kit/List/ListProps.d.ts +0 -11
  161. package/dist/components/MobileAppTile/renderList.d.ts +0 -3
  162. package/dist/components/MobileAppTile/renderList.js +0 -10
  163. package/dist/components/MobileAppTile/renderList.js.map +0 -1
  164. package/dist/ui-kit/List/ListProps.d.ts +0 -11
  165. package/dist/ui-kit/List/ListProps.js +0 -2
  166. package/dist/ui-kit/List/ListProps.js.map +0 -1
  167. package/lib/components/MobileAppTile/renderList.d.ts +0 -2
  168. package/lib/components/MobileAppTile/renderList.js +0 -7
  169. package/lib/components/MobileAppTile/renderList.js.map +0 -1
  170. package/lib/ui-kit/List/ListProps.d.ts +0 -11
  171. package/lib/ui-kit/List/ListProps.js +0 -2
  172. package/lib/ui-kit/List/ListProps.js.map +0 -1
  173. package/mobile/bundle/components/MobileAppTile/renderList.d.ts +0 -3
  174. package/mobile/bundle/ui-kit/List/ListProps.d.ts +0 -11
  175. package/mobile/dist/components/MobileAppTile/renderList.d.ts +0 -3
  176. package/mobile/dist/components/MobileAppTile/renderList.js +0 -10
  177. package/mobile/dist/components/MobileAppTile/renderList.js.map +0 -1
  178. package/mobile/dist/ui-kit/List/ListProps.d.ts +0 -11
  179. package/mobile/dist/ui-kit/List/ListProps.js +0 -2
  180. package/mobile/dist/ui-kit/List/ListProps.js.map +0 -1
  181. package/mobile/lib/components/MobileAppTile/renderList.d.ts +0 -3
  182. package/mobile/lib/components/MobileAppTile/renderList.js +0 -7
  183. package/mobile/lib/components/MobileAppTile/renderList.js.map +0 -1
  184. package/mobile/lib/ui-kit/List/ListProps.d.ts +0 -11
  185. package/mobile/lib/ui-kit/List/ListProps.js +0 -2
  186. package/mobile/lib/ui-kit/List/ListProps.js.map +0 -1
  187. package/mobile/src/components/MobileAppTile/renderList.tsx +0 -17
  188. package/mobile/src/ui-kit/List/ListProps.ts +0 -13
  189. package/src/components/MobileAppTile/renderList.tsx +0 -17
  190. package/src/ui-kit/List/ListProps.ts +0 -13
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=x((({children:e})=>f?e:null));class y{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const v=new y;function N(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:w(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function w(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 k=new y;const C=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},I=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return N(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];k.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[x,g]=n(!1);a((()=>v.subscribe("tab",(e=>{g(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:C("@container font-sans",f?"group":"",S[t],x?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),T={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},B=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>u(l,{className:C("font-sans m-0",T[t],e),children:n||a}))),M=x((({children:e,...t})=>u("p",{className:C("font-sans",Object.values(t)),children:e}))),P={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},R=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=P[l],m={marginTop:d.descriptionStyle};return p(I,{className:C(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(B,{className:C("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(M,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),z=()=>({open:(e,t={})=>v.fire("dialog",{type:"open",dialog:e,...t}),close:()=>v.fire("dialog",{type:"close"}),closeAll:()=>v.fire("dialog",{type:"close",all:!0})}),V=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!V(e)&&(!t||"_self"===t)),D=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),j=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var _=Object.freeze({__proto__:null,isURL:V,isLocalURL:A,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:D,joinPath:j});const L=e=>(t,l=d.BASE_PATH)=>{if(!t||V(t)||$(t,d.CDN))return t;const n=t.startsWith("/");return j($(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},$=(e,t)=>t&&e&&e.startsWith(t),O=(e,t)=>O._impl(e,t);function E(){return E._impl()}function F(e={}){const{isRemote:t,basePath:l}=e,n=E(),{closeAll:a}=z();return e=>({...e,href:t&&!l?e.href:L(n)(e.href,l),"aria-label":e.text,onClick:O(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&A(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}O._impl=e=>e,O.setup=e=>{O._impl=e},E._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),E.setup=e=>{E._impl=e};const U={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},H="bg-main-divider text-main-disabled",W={primary:H,secondary:H,white:H,link:"",transparent:"",gray:H,"":""},X="text-center font-sans select-none",K={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},Y=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=q(e)?"hidden lg:block":"";return p("div",{className:C(G(e),"flex gap-xs"),children:[n?u("div",{className:C(r,K[i]),children:n}):null,q(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:C(r,K[i]),children:a}):null]})})),G=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return C("group/btn items-center justify-center",q(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},q=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),J=({className:e,rounded:t,version:l})=>["inline-block",X,l?W[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Z=({className:e,rounded:t,version:l})=>[X,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?U[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Q=x((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=F()({onClick:r,href:n,...a}),o=t??u(Y,{...s});return u(e?te:ee,{...s,children:o})})),ee=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:Z({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),te=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:J({className:e,rounded:n,version:l}),children:a}))),le={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},ne=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=E(),c=L(o)(j(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(re,{className:e,children:p("svg",{className:C(ie(r),le[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):u("img",{className:e,src:c,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:ae(e,s)})})),ae=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},ie=e=>e?"":"w-full h-full",re=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),se=(e,t)=>e?.media&&t?.media?e.media-t.media:0,oe=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=E();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(se).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:de(a,n)(e),type:me(l),media:i?`(max-width: ${i}px)`:"",width:t.size?.width,height:t.size?.height},`${r}_${e}`))):null,t?.src?ce({...t,src:de(a,n)(t.src)},l):null]})})),ce=(e,t="")=>u("img",{src:e.src,className:C("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},width:e.size?.width,height:e.size?.height}),de=(e,t)=>l=>l&&!V(l)?L(e)(j(t,l)):l,me=e=>e?`image/${String(e)}`:void 0,he=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(ne,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(oe,{className:e,imageClassName:l,image:t,pathPrefix:n}):null));function ue(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:Z({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(he,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(Q,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const pe={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},xe=x((({className:e,version:t="primary",defaultPadding:l,padding:n,title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:x,children:g})=>{const f=E(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:ge(n,l,e),children:[x?ue(t,b):null,a?u("div",{className:"relative",children:a}):null,p("div",{className:C("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[ve(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:C("grid gap-3xl h-full",c?"@xl:grid-cols-2":"",o?"":"grow"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,g]}),ve(c,{className:C("@xl:justify-self-end @xl:col-start-2",s?fe(m):"",be(m),Ne(h)),imageAlign:d}),ye(s)]})]})]})})),ge=(e="",t="",l="")=>C("relative flex flex-col gap-3xl overflow-hidden",e||t,l),fe=e=>e?"row-span-2":"@xl:row-span-2",be=e=>e?"col-start-2 self-center":"",ye=e=>e?u("div",{className:"self-end",children:e}):null,ve=(e,{className:t,imageAlign:l})=>e?u("div",{className:C("shrink-1/2 justify-self-center",l&&pe[l],t),children:e}):null,Ne=e=>e?"hidden @xl:block":"",we=(e=[])=>e.reduce(((e,t)=>e+t),0),ke=(e=[])=>e?.length?we(e)/e.length:0,Ce=(e,t="normal")=>e?u("div",{className:C("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(he,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Se=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:C(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ie=(e,t)=>e?u(M,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Te=x((({children:e,...t})=>u("span",{className:C("font-sans",Object.values(t)),children:e}))),Be=(e,t)=>e?u(Te,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Me=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Se,{...e},`rte-${t}`):["label"in e?Be(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ie(e.description,t)},String(t)):null],Pe=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:C("flex gap-m min-w-56 items-center",e),children:["icon"in l?Ce(l.icon,t):null,u("div",{children:Me(l)})]}))),Re=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),ze=e=>{return((t=e.map(Re))?.length?Math.sqrt(Math.abs(ke(t.map((e=>e**2)))-ke(t)**2)):0)>16;var t},Ve=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ae=e=>!e.some(Ve),De=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:C("flex gap-x-m gap-y-s",ze(l)||Ae(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Pe,{benefitsVersion:t,...e},String(l))))}):null)),je=x((({className:e,benefits:t})=>t?.length?u("div",{className:C("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Me)}):null)),_e=x((({isTabularBenefits:e,...t})=>u(e?je:De,{...t}))),Le=e=>Boolean(e?.src||e?.icon),$e=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:C("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Oe(l))}):null,Oe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Ee(a,r),c=Ee(i,r);return n||a?.icon?u(Q,{className:C("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:o}),appendRight:Fe({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Ee=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Fe=e=>Le(e)?u(he,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ue={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},He=x((({className:e,isDotted:t,children:l,size:n="M"})=>p("div",{className:C("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:C("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",Ue[n])})}):null,u("span",{children:l})]}))),We={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Xe={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Ke=x((({className:e,hasIndent:t,isDotted:l=!0,items:n=[],listItemSize:a="M"})=>n?.length?u("section",{className:C("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",We[a],t?Xe[a]:"",e),role:"list",children:n.map(((e,t)=>u(He,{isDotted:l,size:a,children:e},String(t))))}):null)),Ye=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0),Ge=x((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(qe)}):null)),qe=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(Te,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ye(2)(t)," ₽"]}):null]}),Je=x((({className:e,tags:t})=>t?.length?u("div",{className:C("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ze)}):null)),Ze=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Te,{size:"text-m",font:"font-light",children:e})},String(t)),Qe=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,priceList:g=[],listItemSize:f,tags:b=[],buttons:y,image:v,imageOptions:{imageAlign:N="center",directionRight:w=!0,isImageAlwaysOnRight:k,isImageSecondary:C=!1}={},backwardButton:S,children:I,...T})=>{const B=v?.src?u(he,{image:v}):null,M=u(R,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(xe,{className:e,padding:t,defaultPadding:l,...m?{title:M}:{insetTitle:M},...et(B,w),isImageSecondary:C,imageAlign:N,isImageAlwaysOnRight:k,buttons:$e(y),backwardButton:S,...T,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?u(_e,{benefitsVersion:s,isTabularBenefits:o,benefits:P}):null,d?u(Se,{__html:d}):null,h?.length?u(Ke,{items:h,isDotted:x,listItemSize:f}):null,I,g?.length?u(Ge,{priceList:g}):null,tt(b)]})})})),et=(e,t)=>t?{rightImage:e}:{leftImage:e},tt=e=>e?.length?u(Je,{tags:e}):null,lt=e=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",nt=x((({className:e,padding:t,showBorder:l,...n})=>u(I,{className:C("overflow-hidden flex flex-col gap-3xl box-border",lt(l),e),padding:"p-0",...n,children:u(Qe,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...n})}))),at=e=>null!=e,it=new Map;function rt(e,t,{fallback:l,cache:i}={}){const s=r((()=>st(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(at))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=it)=>l=>{const n=t.get(l);if(at(n))return n;const a=e(l);return at(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function st(e){return Array.isArray(e)?e:e instanceof Function?st(e()):[e]}async function ot(e,t){try{return e?await ct(e,t):null}catch(e){console.error(e)}return null}async function ct(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const dt={},mt="wcms-resources";function ht(e,t={}){const{fallback:l=dt,folderName:n=mt,setBasePath:a=!1}=t,i=j("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=rt(e?i:null,ct,{fallback:l});return r||dt}const ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),pt=x((e=>{const t=((e="reklamnaya-plitka")=>{const t=ht(e),l=r((()=>ut(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(nt,{...t,...e})}):null}));const xt=e=>e,gt=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=xt,format:i=xt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},ft=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],bt=e=>!e?.length,yt=e=>t=>l=>e(l)?[]:[t],vt=[];function Nt(){const{data:e}=rt("/api/v1/regions",ct);return e||vt}const wt=x((({text:e,link:t})=>p(M,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Te,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(Q,{href:t.href,ariaLabel:"условия передачи данных",target:t.target,className:"text-primary-main",children:u(Te,{children:t.text})}):null]}))),kt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Ct=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1})=>{const N=s(null),w=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&N.current?.focus()}),[v,N]);const k=x?"pr-3xl":"",S=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:C("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:N,className:C("w-full h-14 border rounded-md text-primary-text outline-none p-m",k,S,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:w,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),St=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Ct,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),It=e=>"_"===e,Tt=e=>/\d/.test(e),Bt=e=>It(e)||Tt(e),Mt=[..."+7 (___) ___-__-__"],Pt=Mt.findIndex(It),Rt=Mt.map(((e,t)=>Bt(e)?Mt.slice(0,t).filter(Bt).length:-1));const zt=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Mt.map(((e,l)=>Tt(e)?e:t.charAt(Rt[l])||e)),n=Rt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Pt,n)):l).join("")}(e))),[t]);return u(Ct,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Vt=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(zt,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),At="Некорректно заполненное поле",Dt=yt((e=>null!=e&&""!==e))(At),jt=yt((e=>"string"==typeof e&&e.length>1))(At),_t=yt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(At),Lt=($t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,yt((e=>"string"==typeof e&&$t.test(e))))(At);var $t;const Ot=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Наименование организации",...kt(e("fullName"),Dt)}),u(St,{className:"shrink-0 w-full",label:"Контактное лицо",...kt(e("name"),jt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"ИНН",...kt(e("inn"),_t)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...kt(e("phone"),Lt)})]})]}),Et=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Ft(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Ut=e=>e?.text||e?.key||"";function Ht(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Wt(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Ht(globalThis.document,"click",l),t}const Xt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Kt=x((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Xt(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Ut(e)}),u(ne,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:C("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Yt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>v.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>v.fire("popup",{type:"update",popup:e,...t}),close:()=>v.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),x=Wt(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Kt,{popupRef:x,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const Gt=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=Ft(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),v=Yt({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[qt(t),p("div",{className:C("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:C("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Zt(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Ut(a)||o}),Jt(h,d)]}),c&&h?u("div",{className:C("absolute top-0 w-full z-20"),children:u(Ct,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),qt=e=>e?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Jt=(e,t)=>u(ne,{className:C("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Zt=(e,t)=>C(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Qt=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Gt,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),el=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(Qt,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Et.map((({name:e=""})=>({key:e,text:e}))),...kt(t("acquiringType"),Dt)})}),u("div",{className:"@xl:w-1/2",children:u(Qt,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(t("region"),Dt)})})]}),tl=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:C("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:C("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),ll=e=>p("div",{children:[u(tl,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(tl,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),nl=(e,t)=>{const l=Z({className:"text-white",version:e?.version});return u("button",{type:"submit",className:C("p-m w-full @xl:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},al={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},il=ft({acquiringType:Dt,region:Dt,fullName:Dt,inn:_t,name:jt,phone:Lt}),rl=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;bt(il(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=gt(al,a),o=Nt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(B,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),el({regions:o,field:r}),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Ot(r),ll(r),nl(t),u(wt,{link:l})]})})),sl=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Контактное лицо",...kt(e("name"),jt)}),u(St,{className:"shrink-0 w-full",label:"ИНН",...kt(e("inn"),_t)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Vt,{className:"shrink-0 w-full",label:"Телефон",...kt(e("phone"),Lt)}),u(St,{className:"shrink-0 w-full",label:"Электронная почта",...kt(e("mail"),Dt)})]})]}),ol=({regions:e,field:t})=>u(Qt,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(t("region"),Dt)}),cl={name:"",phone:"",inn:"",mail:""},dl=ft({region:Dt,name:jt,phone:Lt,inn:_t,mail:Dt}),ml=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;bt(dl(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=gt(cl,a),o=Nt();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[ol({regions:o,field:r}),sl(r),nl(t),u(wt,{link:l})]})})),hl=[];const ul=async e=>await ot(e,{method:"GET"})||hl,pl=["От 1 000 ₽","До 1 000 000 000 ₽"],xl=["От 1 мес","До 15 лет"],gl=e=>p("div",{className:"pb-2xs border-b border-b-main-divider @xl:flex @xl:justify-between @xl:gap-lg @xl:border-none @xl:pb-0",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Наименование организации",...kt(e("fullName"),Dt)}),u(St,{className:"shrink-0 w-full",label:"ИНН",...kt(e("inn"),_t)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...kt(e("phone"),Lt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...kt(e("annualRevenue"),Dt)}),u(St,{className:"shrink-0 w-full",label:"Контактное лицо",...kt(e("name"),jt)}),u(St,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),fl=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},bl=(e,t,l)=>Math.max(t,Math.min(e,l));function yl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function vl({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:C("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=yl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Nl=1,wl=100,kl=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Nl),max:s=(a.length?a.length-1:wl),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=fl(e,{normalize:(e=0)=>a.length?Cl(a)(e):bl(e,r,s),format:Ye()}),x=i((e=>{m&&m(yl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Te,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:C("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),vl({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),Sl(n)]})})),Cl=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Sl=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Il=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Te,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(kl,{items:pl,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Te,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(kl,{items:xl,min:1,max:180,...e("term")})]})]}),Tl=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(Qt,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(l("region"),Dt)})}),u("div",{className:"@xl:w-1/2",children:u(Qt,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...kt(l("department"),Dt)})})]}),Bl={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Ml=ft({fullName:Dt,annualRevenue:Dt,inn:_t,name:jt,phone:Lt,region:Dt,department:Dt}),Pl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;bt(Ml(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=gt(Bl,n),o=Nt(),c=function(e){const{data:t}=rt(e?`/api/v1/branches?regionCode=${e}`:null,ul);return t||hl}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(B,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),Il(r),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),gl(r),u(B,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),Tl({regions:o,branches:c,field:r}),nl(e),u(wt,{link:t})]})})),Rl={name:"",phone:""},zl=ft({name:jt,phone:Lt}),Vl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;bt(zl(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=gt(Rl,n);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(B,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Имя",...kt(a("name"),jt)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...kt(a("phone"),Lt)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(wt,{link:t})}),nl(e)]})]})})),Al=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=ht(l||"regions-grant-support"),[i,r]=n({key:""}),s=Z({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(Qt,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(Q,{href:o,target:"_blank",className:C("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Dl=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),jl=[{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"}],_l=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Dl,{paths:jl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:C("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ll(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Te,{size:"text-l",font:"font-light",children:l})}):null]})})})),Ll=e=>C("rounded border",e?"bg-primary-main":""),$l=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Ol=()=>{},El=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=Fl(t,e),o=Ul(t,i,r);m.push(u("td",{children:u("div",{className:Hl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},Fl=(e,t)=>t&&e.toDateString()===t.toDateString(),Ul=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Hl=(e,t)=>C("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Wl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Xl=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Ol})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Wl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:El({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Kl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Yl=Kl.map((e=>({key:e}))),Gl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),ql={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Jl={className:"min-w-32",iconVersion:"black",isBorder:!1},Zl=x((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=Ft(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[x,g]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:N,yearsOptions:w,handleChangeVisibleCalendar:k,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Wt(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Kl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Yl,yearsOptions:Gl,ref:s}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:d,selectedYear:x,selectedMonth:m,showCalendar:c});return p("div",{className:C(e,"relative"),ref:S,children:[u(Te,{size:"text-m","font-weight":"font-light",children:t}),Ql(k,l,a),c?p("div",{className:"absolute bg-white z-10 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(ne,{...ql,className:"-rotate-90 cursor-pointer"})}),u(Gt,{onChange:y,value:{key:Kl[m]},options:N,...Jl}),u(Gt,{onChange:v,value:{key:String(x)},options:w,...Jl}),u("div",{className:"my-auto",onClick:b,children:u(ne,{...ql,className:"rotate-90 cursor-pointer"})})]}),u(Xl,{today:l,currentMonth:m,currentYear:x,onDateSelect:o,min:r,max:s})]}):null]})})),Ql=(e,t,l)=>p("div",{onClick:e,className:C("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(M,{children:t&&$l(t)}),u(ne,{...ql,name:"CalendarIcon"})]}),en=x((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:e,children:[t?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:t})}):null,u(Zl,{value:l,onChange:a,valid:Boolean(!n)}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),tn=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Фамилия",...kt(e("surname"),jt)}),u(St,{className:"shrink-0 w-full",label:"Отчество",...kt(e("middleName"),jt)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...kt(e("phone"),Lt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Имя",...kt(e("name"),jt)}),u(en,{className:"shrink-0 w-full",label:"Дата рождения",...kt(e("date"),Dt)}),u(St,{className:"shrink-0 w-full",label:"Электронная почта",...kt(e("mail"),Dt)})]})]}),ln={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},nn=ft({surname:jt,name:jt,middleName:jt,phone:Lt,mail:Dt,date:Dt}),an=x((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;bt(nn(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=gt(ln,r);return p("form",{className:"container space-y-s",onSubmit:o.onSubmit,children:[tn(s),p("div",{className:"@xl:flex justify-between items-center",children:[p("div",{className:"@xl:mb-0 mb-2 flex items-center gap-3",children:[u(_l,{...kt(s("consentDataProcessing"),Dt)}),u(wt,{text:"Согласен с ",link:l})]}),nl(t)]})]})})),rn=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Te,{color:"text-primary-text",children:t}):null]})}))),sn=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(rn,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(rn,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(rn,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(rn,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},on=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(Qt,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...kt(e("region"),Dt)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(St,{className:"w-full mb-s",label:"ИНН",...kt(e("inn"),_t)}):null,u(St,{className:"w-full mb-s",label:"Наименование организации",...kt(e("fullName"),Dt)}),u(St,{className:"w-full mb-s",label:"ФИО",...kt(e("name"),jt)}),u(Vt,{className:"w-full mb-s",label:"Телефон",...kt(e("phone"),Lt)}),l?null:u(St,{className:"w-full mb-s",label:"Электронная почта",...kt(e("mail"),Dt)})]})]})},cn=e=>{const t=e("text");return p("label",{htmlFor:"textarea",children:[u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{id:"textarea",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:C("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},dn={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},mn={fullName:Dt,name:jt,phone:Lt},hn=ft({...mn,mail:Dt}),un=ft({...mn,inn:_t,region:Dt}),pn=e=>"currencyControl"===e,xn=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),gn={ApplicationFormBusinessCard:ml,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:xn(o),PartnerComments:c,...pn(o)?{inn:r,region:s?.text||""}:{mail:i}};bt((e=>pn(e)?un:hn)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=gt(dn,a),o=Nt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[sn(r),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),on(r,o),cn(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[nl(t),u(wt,{link:l})]}),u(B,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(he,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(he,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Vl,ApplicationFormCredit:Pl,ApplicationFormAcquiring:rl,ApplicationFormGrantSupport:Al,ApplicationFormIndividuals:an},fn=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(he,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(B,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),bn={send:async function(e,t){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},yn=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await bn.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(I,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(B,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?vn(l,o):null,r?u(fn,{responseType:r}):null]})})})),vn=(e,t)=>{const l=e?.formType;if(!l||!(l in gn))return null;return u(gn[l],{...e,onSubmit:t})},Nn="text-center",wn={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},kn=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:C("rounded-icon object-fit flex justify-center items-center",wn[l],e),children:u(ne,{...i,width:"54%",height:"54%",name:a})}):null})),Cn=x((({className:e="",title:t,benefitList:l,...n})=>p(I,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(B,{headingType:"h3",as:"h2",className:Nn,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Sn)}):null]}))),Sn=(e,t)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(kn,{className:"shrink-0",defaultIconSize:44,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(he,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"@sm:h-full",children:[u(B,{headingType:"h6",children:e.label}),In(e.description)]}):null]},String(t)),In=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Bn(e):Tn(e)}):null},Tn=e=>e?.name?u(Te,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e.name}):null,Bn=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:C(t,e.listItemSize?We[e.listItemSize]:""),children:e.items.map(((e,t)=>u("li",{children:u(Te,{color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e})},`benefitListItem-${t}`)))}):null},Mn=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a=Nn,...i})=>u(I,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(R,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(R,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:$e(e?.buttons)}),e.bonusItemContent?.bonusType?Pn(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Pn=e=>"count"===e.bonusType?Rn(e):zn(e),Rn=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(Te,{size:"text-h2",children:e.bonusName})}):null]}),zn=e=>e.image?u(he,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Vn=e=>({icon:t,title:l,description:n},a)=>p("div",{className:C("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?u(Te,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?u(he,{image:t,height:"180",className:"w-auto"}):null,n?u(Te,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),An=(e,t,l)=>u("div",{className:`grid gap-2xs ${Dn(t)}`,children:e.map(Vn(l))}),Dn=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},jn=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(I,{className:l,defaultPadding:"p-6xl",...r,children:[u(R,{title:i,description:a,headlineVersion:"M"}),e?.length?An(e,n,t):null]}))),_n={start:"justify-start",center:"justify-center",end:"justify-end"},Ln=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?C("flex",_n[l]):"";return u(I,{className:C("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:$e(e)})})),$n=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},On=x((({className:e,disabled:t,...l})=>u(Q,{rounded:!0,className:C("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(he,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),En=x((e=>u(On,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Fn=x((e=>u(On,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function Un({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(On,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(On,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Hn=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:C("flex justify-between @xl:flex-col",a),children:[e?u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(Te,{size:"text-h3",children:[n," ",Ye(2)(Math.round(t))," ",l]})}:{children:u(Te,{size:"text-h3",children:"-"})})]}))),Wn=1e4,Xn=5e6,Kn=Math.round(23.5),Yn={minSum:Wn,maxSum:Xn,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Gn={minSum:Wn,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},qn={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Jn={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Zn={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Qn=e=>e?u(M,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,ea=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),ta=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(ne,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(M,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(M,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),la=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(ea,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),na=({rate:e,title:t,unit:l})=>u(Hn,{title:t,value:e,postfix:l}),aa=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(ta,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:la({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:na({title:l,unit:n,rate:a,...i})})]});function ia({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Ye(2)(l.min||0)} ₽`,`До ${Ye(2)(l.max||0)} ₽`];return u(kl,{items:e?n:[],step:t,...l})}function ra(e){const{data:t}=rt(`/wcms-resources/${e}.json`,ct);return t}const sa=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=ra(t||"bonus-calculator-data")||qn,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},oa=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=gt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=sa(a,t);return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[ia({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),ia({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?aa({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u(Hn,{title:"Баллов за год",value:m}):null,$e(l,{isVertical:!0}),Qn(n)]})]})})),ca=(e,t=0)=>e?.sum&&e.sum>=Wn&&e.sum<=Xn?e.sum:t,da=(e,t=0)=>e?.period&&e.period>=13&&e.period<=60?e.period:t,ma=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ha={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ua=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:C(`flex ${ha[a]}`,l),children:e?.map((({id:e,text:l})=>u(_l,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),pa=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Te,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Te,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(ua,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:C("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),xa=e=>pa({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ga=e=>e,fa=(e=ga)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ba=fa(),ya=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},va=(e=ga)=>fa((t=>-e(t))),Na=va(),wa=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:ka([e,t],n),ka=([e,t],l=[])=>({[e]:l.length?Na(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?ba(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Ca=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Sa=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ia=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Ta=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=gt({moneyValue:ca(r,1e5),daysValue:da(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=ra(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Zn,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Sa(o,e)&&Ca(n,["minSum","maxSum"],e)&&Ca(l,["minDays","maxDays"],e)))||Zn,{rate:m}=d,h=Ia(m,e),u=n+h,p=s?.rateRows||[Zn];return{...d,...ka(["minSum","maxSum"],p),...ka(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:x,depositeName:g}=c;return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ia({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(kl,{items:[`От ${ma(f.min||0)}`,`До ${ma(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Ba(c,o),xa({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),aa({rate:h,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[Ma(m,d),$e(l,{isVertical:!0}),Qn(n),Qn(a)]})]});var f})),Ba=(e,t)=>p("div",{className:"space-y-s",children:[u(Te,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(_l,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(_l,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ma=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Hn,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Hn,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Pa=({min:e=0,max:t=0,availableMonths:l,...n})=>u(kl,{items:[`От ${Ra(e)}`,`До ${Ra(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ra=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,za=e=>pa({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Va=e=>Aa({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Aa({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Aa({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Aa({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Aa=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Da=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},ja=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ra(t||"credit-calculator-data"),s=i?.rateRows||[Yn],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Va({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=wa(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=wa(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Va({row:e,userInputParams:t,paramsViewSettings:l})&&Ca(n,["minSum","maxSum"],e)&&Ca(a,["minMonths","maxMonths"],e)))||Yn)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Da(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},_a=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=gt({moneyValue:ca(i,2e5),monthsValue:da(i,Kn),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=ja(r,t,a),c=za({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ia({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Pa({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),La({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),aa({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Hn,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),$e(l,{isVertical:!0}),Qn(n)]})]})})),La=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(_l,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(_l,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(_l,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(_l,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),$a=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ra(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Fa(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Ea({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Ea({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Ca(n,["minSum","maxSum"],t)&&Ca(a||r,["minMonths","maxMonths"],t)))||Jn,{rate:d}=c,m=Oa(d,e),h=n+m,u=i?.rateRows||[Jn];return{...c,...ka(["minSum","maxSum"],u),...ka(["minMonths","maxMonths"],u),availableMonths:ya(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Oa=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Ea=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Fa=(e,t)=>e+Math.round((t-e)/2),Ua=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=gt({moneyValue:ca(r,2e4),monthsValue:da(r,0),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=$a(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:x}=c,{onChange:g}=o("monthsValue");return a((()=>{g&&g(d)}),[d]),p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ia({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),Pa({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),Ha({...c,...i},o)]}),u("div",{className:"border-b border-main-divider md:hidden"}),aa({rate:m}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Hn,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(Hn,{title:"Сумма в конце срока",value:x,postfix:"₽"}),$e(l,{isVertical:!0}),Qn(n)]})]})})),Ha=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?xa({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},pa({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Wa=e=>Xa({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Xa({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Xa=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ka=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=ra(t||"refinancing-calculator-data"),c=o?.rateRows||[Gn],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Wa({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=wa(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=wa(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Wa({row:e,userInputParams:t,paramsViewSettings:l})&&Ca(n+r,["minSum","maxSum"],e)&&Ca(i,["minSumOld","maxSumOld"],e)&&Ca(r,["minSumExtra","maxSumExtra"],e)&&Ca(a,["minMonths","maxMonths"],e)))||Gn)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Da(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Ya=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=gt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Ka(i,t,a),o=za({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ia({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),ia({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Pa({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Ga({...s,...a},r),s.isExtraMoney?ia({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),aa({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0",children:[u(Hn,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Hn,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block",children:o}),$e(l,{isVertical:!0}),Qn(n)]})]})})),Ga=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(_l,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(_l,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(_l,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),qa={CreditCalculatorForm:_a,DepositCalculatorForm:Ua,BusinessDepositCalculatorForm:Ta,BonusCalculatorForm:oa,RefinancingCalculatorForm:Ya},Ja=(e,t)=>{const l=e?.calcType;if(!l||!(l in qa))return null;const n=qa[l];return u("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:p("div",{className:"box-border p-4xl w-full space-y-xl",children:[e?.title?u(B,{className:"text-center",title:e.title}):null,u(n,{...e})]})},String(t))},Za=x((({className:e="",tabAlign:t,calculatorTabs:l=[],...a})=>{const r=l.map((e=>e.nav||{})),s=l.map((({calculatorBlock:e})=>e||{})),[o,c]=n(0),d=i((e=>c(e)),[]),[m,h]=$n({itemCount:l?.length,visibleItemCount:3});return p(I,{className:C("box-border overflow-hidden relative",e),defaultPadding:"p-0",...a,children:[p("div",{className:"bg-white",children:[r.length>1?Qa({activeIndex:m,tabsNav:r,tabAlign:t,slideIndexShift:o,onClick:d}):null,Un({...h,btnClass:["left-3","right-3"],className:"top-10"})]}),u("div",{className:"flex",style:{transform:`translateX(-${o}00%)`},role:"list",children:s?.length?s.map(Ja):null})]})}));function Qa({activeIndex:e,tabsNav:t,tabAlign:l,slideIndexShift:n,onClick:a}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-32 pt-4xl box-border duration-1000",children:u("div",{className:C("w-full flex flex-nowrap items-end gap-xs",l?_n[l]:""),children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"w-96 p-m border-none bg-primary-main text-white":"w-96 p-s ease-in duration-300 bg-white text-primary-text",i=l?"text-xl mb-xs":"text-l mb-2xs",r=l?"text-l font-light text-white":"text-m font-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:n,"aria-label":e?.title,className:C("box-border relative border border-gray cursor-pointer text-left border-b-0 flex space-x-m min-h-20",a),children:[u(he,{className:C("h-6 w-6 min-w-6 min-h-6",s),image:{...e?.icon,iconVersion:o??c},width:"24",height:"24"}),p("div",{className:"border-0",children:[u("div",{className:i,children:e?.title}),u("div",{className:r,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const ei=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=fl(e,{normalize:(e=a)=>l&&n?String(bl(Number(ti(e)),l,n)):ti(e),format:Ye(r)}),c=i((e=>t&&t(ti(e))),[t]);return u(Ct,{onChange:c,...s,...o})})),ti=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),li=x((e=>u(ei,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Te,{size:"text-xl",font:"font-light",children:"₽"})})}))),ni={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},ai={amount:1500},ii=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=gt(ai),[m,h]=n(!1);a((()=>{h(c<=0)}),[c]);const x=m?J({version:r?.version}):Z({className:"text-white",version:r?.version}),g=F(),{onClick:f}=g(r||{});return p(I,{className:C("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(B,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:ni[s],children:[u(li,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u("button",{type:"submit",className:C("w-full p-m mt-lg",x),disabled:m,onClick:f,children:r.text}):null]})]})})),ri=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),si=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=N(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),oi=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ci=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(mi(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?di(r,b):{},...y?ri(d):{},gap:`${a}px`};return u("div",{className:C("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(w=(e,t)=>u(si,{className:C(c,n?oi[n-1]:"",y?"h-full":""),style:v?di(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(w):w(e,0))(m)});var w})),di=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),mi=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),hi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ui={"horizontal-list":"w-6","vertical-list":"h-6"},pi=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:C("flex gap-xs",hi[a],i?"group":"",e),"data-ver":i,children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?ui[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),xi=e=>t=>e.scrollWidth/t,gi=e=>(t,l)=>{e.scrollBy({left:l*xi(e)(t),behavior:"smooth"})},fi=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[va()(a),fa()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?gi(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?gi(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},bi="absolute top-[calc(50%-24px)] z-40",yi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",vi=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Ni(e),h?u(En,{className:C(bi,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(Fn,{className:C(bi,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Ni=e=>p("div",{children:[e.canScrollLeft?u("div",{className:C(yi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:C(yi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),wi=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),ki=[];function Ci(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=wi,blocksRegistry:r={},ancestors:s=ki}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:C(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Si=[],Ii=(e,{key:t,ancestors:l=Si,slotName:n=null,extraProps:a,renderProps:i=Ci,...r})=>{const s=a?(e,t)=>Ci(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Si,[r.parent,n]]:l},a)))};function Ti({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Ii(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Bi=({className:e,text:t="ХИТ"}={})=>p("div",{className:C("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(ne,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(M,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Mi="relative h-full",Pi={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Ri=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Ai);return Ti({...n,renderProps:(n,a,r)=>p("div",{className:zi(n,{someCardsHighlighted:i}),children:[Ci(n,a,{className:Vi(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Ai(n)?Bi({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},zi=(e,{someCardsHighlighted:t})=>C(Mi,t&&(Ai(e)?"pt-3xl":"pt-3xl sm:pt-16")),Vi=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>C(Mi,"min-w-80",Pi[n],t&&(Ai(e)?"pt-3xl sm:pt-16":"pt-3xl"),lt(l),l&&"h-full"),Ai=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Di=x((({className:e,itemCount:t,visibleItemCount:l=1,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=$n({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=fi({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(I,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:C(a?"flex justify-center":"","relative max-w-full"),children:[u(ci,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Ri({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(vi,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(pi,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Di.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard","RichTextBlock","ProductBlock"],Di.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const ji=x((({className:e,title:t,description:l,blockIndex:n=0,isActive:a,...i})=>u(I,{className:C("relative flex h-[485px]",a?"w-[440px] z-10":"w-[340px]",e),defaultPadding:"p-0",...i,children:u("div",{className:C("basis-full self-center",_i(n)),children:a?u(R,{headlineVersion:"M",title:t,description:l,padding:"p-3xl",align:"text-left",className:"h-96 text-white shadow-dark-blue"}):u("div",{className:"h-[300px] flex justify-center items-center font-mohave text-title-large",children:u("span",{className:Li(n),children:t})})})}))),_i=e=>["bg-primary-main","bg-green-light","bg-yellow-light"][e%3],Li=e=>["gradient-color-text-on-green","gradient-color-text-on-yellow","gradient-color-text-on-yellow"][e%3],$i="z-10 border border-solid w-full h-full",Oi=C($i,"absolute hidden @xl:block border-transparent"),Ei=x((({className:e,title:t,description:l,button:n,...a})=>u(I,{className:C("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:C(Oi,"top-9 right-12 bg-green-dark")}),u("div",{className:C(Oi,"top-6 right-8 bg-green")}),u("div",{className:C(Oi,"top-3 right-4 bg-green-light")}),p("div",{className:C($i,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(R,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Fi={black:"bg-black",white:"bg-white"},Ui=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(I,{className:C("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(xe,{className:"h-full",padding:o,title:u(R,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(he,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:$e([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Te,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Hi)]}):null,a?p(Te,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Hi=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Fi[e]}`},String(t)),Wi={1:"grid-cols-1",2:"grid-cols-2"},Xi=x((({className:e,padding:t,additionalDescription:l,cardsList:n=[],columnsMode:a=1,description:i,image:r,title:s,...o})=>u(I,{className:C("text-left",e),padding:"p-0",...o,children:p(xe,{className:"h-full",defaultPadding:"p-xl",padding:t,title:s?u(B,{headingType:"h4",as:"h3",className:"mb-m z-10",title:s}):null,rightImage:r?.src?u(he,{image:r}):null,children:[p("div",{className:"flex justify-between mb-m",children:[i?u("div",{className:"w-1/3",children:u(Te,{size:"text-h6",children:i})}):null,l?u(Te,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:l}):null]}),n.length?u("ul",{className:C("list-none m-0 p-0 grid gap-xs",Wi[a]),children:Ki(n)}):null]})}))),Ki=e=>e.map(((e,t)=>p("li",{children:[e?.parameter?u("div",{className:"inline pr-xs",children:u(Te,{size:"text-h6",children:e.parameter})}):null,e?.parameterDescription?u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(t)))),Yi="hidden xl:block absolute w-full h-full border border-white",Gi=x((({className:e="",...t})=>{const l=F(),{text:n,href:a,target:i,onClick:r}=l(t);return n?u("div",{className:C("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",e),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:C("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),u(he,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:C(Yi,"-bottom-1.5 -left-1.5")}),u("div",{className:C(Yi,"-bottom-3 -left-3")})]})}):null})),qi=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(I,{className:C("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(R,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(R,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Ji(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Ji=(e,t="")=>{const l=Math.ceil(e.length/10);return u(Di,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:C("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(Gi,{...e},String(t))))},String(l))))})},Zi=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=F({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:C("block",e),...t?i:{},children:a})})),Qi=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],er=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Qi.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),c=Le(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=C("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:C("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:$e(c,{className:C(a||s?"basis-full":""),buttonClassName:d})}),r?u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),tr=x((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,listItemSize:o="S",socialMedia:c=[],target:d,title:m,align:h="text-left",benefits:x,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:f=true,isImageSecondary:b=!1}={},...y})=>u(I,{className:C("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...y,children:u(Zi,{href:a,target:d,className:"h-full",children:p(xe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(R,{title:m,description:l,headlineVersion:"XS",isEmbedded:!0,align:h}),...et(Le(i)?u(he,{image:i}):null,g),buttons:c.length?u(er,{media:c,showButtonText:!0,version:y?.version}):null,isImageAlwaysOnRight:f,isImageSecondary:b,imageAlign:"center",children:[u(_e,{benefits:x}),u(Ke,{items:r,listItemSize:o,isDotted:s}),lr(n,h)]})})}))),lr=(e,t)=>e?u(M,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,nr=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const ar=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),ir=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Te,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Te,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:$e(a)}):null]},String(t))},rr=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(ir),o=s.slice(0,1),c=s.slice(1);return p(I,{className:C("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[Le(n)?u("div",{className:"self-center",children:u(he,{image:n})}):null,t?u(B,{className:C("pt-xs",l),headingType:"h5",title:t}):null,a?u(Q,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(nr,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(ar,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?sr:null}):null]})})),sr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(ne,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),or="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",cr="border-gray border-solid border",dr="border-main-divider border-b",mr="w-52",hr=x((({icon:e,image:t,title:l,link:n})=>p("div",{className:C("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",cr,or),role:"columnheader",children:[e&&!t?.src&&u(he,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&u(he,{image:t}),l?u(B,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&u("div",{className:"mt-auto w-full",children:u(Q,{href:n.href,target:n.target,className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs font-light font-medium py-s",children:n.text})})})]}))),ur={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},pr=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:ur[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),xr=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex gap-xl",children:e})}))),gr=x((({colHeaders:e,activeIndex:t})=>p(xr,{children:[u("div",{className:mr,role:"columnheader"}),u(pr,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(hr,{...e},String(t))))})]}))),fr=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=C("w-80 box-border flex flex-col",cr,l?"border-t-0 rounded-b-md":"border-y-0",n?or:""),i=C("mx-2xl h-full",dr,n&&t?"border-t":"",l?"border-b-0":"border-solid");return u("div",{className:a,role:"cell",children:u("div",{className:i,children:e?e.map(((e,t)=>vr(e,t,n))):null})})})),br=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),yr=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),vr=({label:e,description:t},l,n)=>p("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?u("h4",{className:br(n),children:e}):null,t?u("div",{className:yr(n),children:t}):null]},String(l)),Nr=(e=!1)=>C("text-s py-2xl",dr,mr,e?"border-b-0":"border-solid"),wr=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:i})=>p(xr,{children:[e?.title?u("div",{className:Nr(i),children:e.title}):null,t?.length?u(pr,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(fr,{cell:e,isFirstRow:a,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),kr=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return p("div",{className:"relative",children:[e.map(((e,n,{length:a})=>u(wr,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?Un({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),Cr=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const i=e?.map((({header:e})=>e||{})),r=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:r.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=$n({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[i?.length?u(gr,{colHeaders:i,activeIndex:o}):null,s?.length?u(kr,{rowData:s,isColoredFirstColumn:a,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Sr=x((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:r=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!r),m=i((()=>d((e=>!e))),[]);return p(I,{className:C("overflow-hidden relative",e),defaultPadding:"p-6xl",...o,children:[u(B,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),u(Cr,{columns:a,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:r}),r?Ir({isShowAllRow:c,onClick:m}):null]})})),Ir=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-6xl",children:p("div",{className:"flex gap-m w-full",children:[u("div",{className:mr}),u("button",{onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u(Te,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),Tr=x((({className:e,contacts:t,info:l,version:n="secondary",...a})=>p(I,{className:C("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?Br(l):null,t?.length?Br(t):null]}))),Br=e=>u("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Mr({column:e,index:t})))}),Mr=({column:e,index:t})=>e?u("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>p("div",{children:[u(R,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?u("div",{className:"mt-xs opacity-80",children:u(M,{size:"text-m",font:"font-light",children:l})}):null,n?.href?u(Q,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,Pr=e=>e%2!=0,Rr=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:C("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),zr=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(Rr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:C("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(he,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Vr=({isUnfolded:e,onToggle:t})=>u(zr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Ar=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(he,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(R,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:Nn})]}))),Dr=["ArrowDownIcon","ArrowUpIcon"],jr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",_r=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:C(t.length?"hidden":"block"),children:a?u(Ar,{...a}):null}),p("div",{className:C("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:C(jr),children:[Ii(r,{...i.options,parent:n}),Pr(r.length)?u(pt,{className:"col-span-6"}):null]}),u(nr,{renderFoldableSection:({isUnfolded:e})=>p(ar,{className:C(jr),isUnfolded:e,children:[Ii(s,{...i.options,parent:n}),Pr(s.length)?u(pt,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(zr,{className:C(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Dr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Lr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,$r=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>Lr(t[e])||Lr(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>Lr(t[e])||Lr(l[e])||Or(t[e])<=Or(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>Lr(t[e])||Lr(l[e])||Or(t[e]?.min)>=Or(l[e]?.min)&&Or(t[e]?.min)<=Or(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>Lr(t[e])||Lr(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>Lr(t[e])||Lr(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),Or=e=>Number(e||0),Er=(e,t)=>(l=xt)=>e&&e.filter((e=>$r(t,l(e.content||{})))),Fr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(tl,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),Ur=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Hr(e))]}),n?u("div",{children:u(Q,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),Hr=e=>([t,l])=>{const n=l?.type;return"array"===n?Wr(t,e)(l):null},Wr=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Fr,{items:n,multiple:!0,...t(e)})]},e)},Xr=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function Kr(...e){const t=e.map((e=>ot(e)));return Promise.all(t)}function Yr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Gr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function qr(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Gr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=rt(t,Kr);return{source:Object.fromEntries(Yr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const Jr=1e9,Zr={sum:{min:1e4,max:Jr},period:3},Qr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=qr(i.block?.blocks),[o,{field:c,reset:d}]=gt(Zr),m=Er(i.block?.blocks,o)((e=>({...e,period:Xr(r,e||{})||[]}))),h=p("div",{children:[u(li,{label:n?.title,min:500,max:Jr,...c("sum",{parse:e=>({min:Number(e),max:Jr}),format:({min:e})=>String(e)})}),u(kl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(I,{className:C("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Ur({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(_r,{blocksToRender:m,...i})]})})),es={type:"string",title:"Адрес справочника"};Qr.childrenTypes=["ProductTile"],Qr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:es});const ts=[{key:"10"},{key:"50"},{key:"100"}],ls=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return p("div",{className:"flex items-center gap-s",children:[u("span",{children:"Показать по"}),u(Gt,{className:"min-w-20",onChange:l,value:{key:String(e)},options:ts,iconVersion:"black"})]})},ns="py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white",as=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?u("div",{"aria-current":"true",className:"py-m px-lg bg-green-light text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-2||e<=t+2&&e>t||((e,t,l)=>t<=3&&e<=t+3||t>=l-1&&e>=l-4)(e,t,l))(i,l,a)?u("div",{onClick:()=>n(i),className:ns,"aria-label":`Страница ${i}`,children:i},String(t)):null},is={width:"24",height:"24"},rs=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>new Array(l).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l-1&&t(e+1)}),[e,l]),o=i((()=>t(1)),[]),c=i((()=>t(l)),[l]);return p("div",{className:"flex gap-m items-center",children:[u("div",{onClick:a,children:u(ne,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ss(1===e),...is})}),p("div",{className:"flex gap-xs",children:[e>1?u("div",{onClick:o,className:ns,"aria-label":"Страница 1",children:"1"}):null,e>4?u("div",{className:"py-m px-s",children:"..."}):null,n.map(as),e<l-3?u("div",{className:"py-m px-s",children:"..."}):null,e<l?u("div",{onClick:c,className:ns,"aria-label":`Страница ${l}}`,children:l}):null]}),u("div",{onClick:s,children:u(ne,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ss(e===l),...is})})]})},ss=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",os=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>p("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[u(rs,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?u(ls,{itemCount:n,onItemCountChange:a}):null]}),cs=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:C("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(he,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:C("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),ds=x((({field:e,onClearFilter:t,filtrationState:l})=>p("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[u(cs,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),u(Zl,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),u(Zl,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),u("div",{className:"col-span-2 mt-auto",children:u("button",{className:"px-m py-s rounded-md bg-main-gray text-green hover:text-white hover:bg-primary-hover active:bg-primary-active cursor-pointer w-full",onClick:t,children:"Очистить фильтр"})})]}))),ms=({title:e,timestamp:t,publicId:l})=>{const n=F({basePath:"/"}),{href:a}=n({href:`/api/v1/depository/${l}/file`});return p("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:t?u(Te,{size:"text-m","font-weight":"font-light",children:$l(t)}):null}),u("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:u("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},hs="/api/v1/depository",us={startDate:void 0,endDate:void 0,query:""},ps=x((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[o,{field:c,reset:d}]=gt(us),{totalPages:m=0,items:h=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?$l(n,!0):"",r=a?$l(a,!0):"",s=new URLSearchParams(hs);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=rt(hs+o,ct);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...o}),x=i((e=>a(e-1)),[]),g=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return p(I,{className:C(e,"container p-6xl"),...t,children:[u(ds,{filtrationState:o,field:c,onClearFilter:d}),p("div",{className:"flex flex-col",children:[p("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:u(Te,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),u("span",{className:"col-span-10",children:u(Te,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),h.length?h.map((e=>u(ms,{...e},String(e.publicId)))):u(Ar,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),u(os,{currentPage:l+1,onPageChange:x,totalPages:m,itemCount:r,onItemCountChange:g})]})]})})),xs=e=>"Image"===e?.contentType&&e?.image?u(he,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,gs=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(I,{className:C("flex flex-col justify-center items-center",e),defaultPadding:C("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:xs(n)}),u(R,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(Q,{version:a?.version,text:a?.text,...a}):null]}))),fs="location";function bs(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(v,"location",vs()??{name:e}),r=i((e=>{Ns(e),l(e)}),[]),{data:s}=rt("/api/v1/region",ct);return a((()=>{s&&!ys()&&l(s)}),[s]),[t??{name:e},r]}const ys=()=>Boolean(globalThis.localStorage?.getItem(fs)),vs=()=>{try{const e=globalThis.localStorage?.getItem(fs);return e&&JSON.parse(e)}catch(e){return null}},Ns=e=>{try{globalThis.localStorage?.setItem(fs,JSON.stringify(e))}catch(e){}};var ws;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(ws||(ws={}));const ks=new Intl.NumberFormat("ru",{style:"currency",currency:ws.RUB}),Cs=e=>e?ks.format(e):"",Ss="text-left text-m font-light text-secondary-text",Is=`${Ss} pl-5xl`,Ts={USD:"DollarIcon",EUR:"EuroIcon"},Bs=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ss,children:u(Te,{size:"text-m",children:"Валюта"})}),u("th",{className:Is,children:u(Te,{size:"text-m",children:"Купить"})}),u("th",{className:Is,children:u(Te,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Ms)})]}))),Ms=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(he,{image:{icon:Ts[t]},width:"24",height:"24"}):null,u(Te,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:Cs(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:Cs(e?.buyExchangeRate)})})]},t)},Ps={icon:"GpsIcon"},Rs=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(kn,{...Ps,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),zs=(e,t,l)=>{const n=Number(Vs(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)},Vs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),As=e=>{return(t=[[e=>e.value!==ws.RUB&&e.oppositeValue!==ws.RUB,()=>e.handleConvert(e.value,ws.RUB)],[e=>e.value===ws.RUB&&e.oppositeValue===ws.RUB,()=>e.handleConvert(e.value,ws.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Ds(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(Ct,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Gt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const js=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||ws.RUB,selectBuy:l?.[0]?.currency?.currency||ws.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Ds({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:_s(r,o,l),value:r.inputSell,setValue:e=>$s(o,l)(e,r.selectSell,r.selectBuy)}),Ds({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ls(r,o,t),value:r.inputBuy,setValue:e=>Os(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(Q,{text:a.text,version:a?.version,...a}):null]})})),_s=(e,t,l)=>n=>{t({selectSell:n}),As({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{$s(t,l)(e.inputSell,n,a)}})},Ls=(e,t,l)=>n=>{t({selectBuy:n}),As({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Os(t,l)(e.inputBuy,n,a)})},$s=(e,t)=>(l,n,a)=>{e({inputSell:Vs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(zs(l,i,n===ws.RUB)||"")})},Os=(e,t)=>(l,n,a)=>{e({inputBuy:Vs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(zs(l,i,n===ws.RUB)||"")})};const Es=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=bs(),i=function(e){const t=e?.code||"000",{data:l}=rt(`/api/v1/exchangerates?regionCode=${t}`,ct);return l||{}}(a),r=Fs(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:ws.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:ws.RUB}}),u(I,{className:C("box-border min-h-80",e),...n,children:u(xe,{className:"h-full",title:u(B,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Bs,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(Rs,{address:i?.address})]}),r.length&&s.length&&o.length?u(js,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Fs=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Us=e=>ht(d.SITEMAP||"sitemap",{fallback:e}),Hs={width:"40",height:"45"},Ws={"bg-white":"color",transparent:"white"},Xs={"bg-white":"text-primary-main",transparent:"text-white"},Ks=(e,t,l)=>u(he,t?.src?{image:t,className:Xs[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Ws[e]},className:Xs[e],width:l?.width,height:l?.height}),Ys={"bg-white":"text-primary-text",transparent:"text-white"},Gs=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:C("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Ks(i,l?.image,Hs),r?n??u("div",{className:"ml-s",children:u(Te,{font:"font-medium",color:Ys[i],size:"",children:l?.title||"Россельхозбанк"})}):null]}))),qs=x((({className:e,onClose:t})=>u("button",{className:C("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(he,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function Js(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Zs=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Qs=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},eo=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),to=e=>t=>e.map((([e,l])=>[Zs(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>no(t,e))).reduce(Qs(Math.max,0),new Map),lo=e=>t=>{return Yr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=eo(t||"");return l.length?we(e.map((e=>ba(l.map(Zs(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},no=(e,t)=>new Map(e.map((e=>[e,t]))),ao=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=rt(e?.length?e:null,io),[s,o]=n(null);return Js((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=eo(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(to(i)).reduce(Qs(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return lo(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},io=async(...e)=>(await Promise.allSettled(e.map((e=>ot(j(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),ro=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=z(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:C("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(qs,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),so=x((({className:e,topItems:t})=>{const l=F({isRemote:!0});return u("div",{className:C("flex items-start justify-between",e),children:t?.map(l).map(co)})})),oo=["all","footer"],co=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||oo.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(mo,{...e,basePath:o(a),index:t},String(t))))]},String(t))},mo=x((({text:e,index:t,basePath:l,...n})=>{const a=F({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:C("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),ho=x((({initialQuery:e})=>{const{topItems:t}=Us(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=ao({basePathList:l,initialQuery:e}),s=r((()=>uo(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(ro,{head:u(cs,{autoFocus:!0,...i}),children:u(so,{topItems:s})})})),uo=e=>t=>e?.length&&t?.length?Yr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:j("/",t)})))}))):[];const po=()=>{const{open:e,close:t}=z();return{open:(t={},l={})=>e(u(ho,{...t}),l),close:t}},xo=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=po(),s=i((e=>{l(e),go(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:C("relative",e),children:[u(cs,{value:t,onChange:s}),u(qs,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),go=e=>e&&e.length>=3,fo=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},bo=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(yo):null,u(Q,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),yo=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(Te,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(vo)})]},String(t)),vo=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:No(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),No=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${wo(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},wo=e=>e.replaceAll(/\D/g,""),ko=x((({className:e="",index:t,text:l,...n})=>{const a=F(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:C("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Co=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(ko,{index:t,className:"text-l font-light max-w-[292px]",...e},String(t))))}):null}))),So=x((({className:e="",index:t,...l})=>{const n=F({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Io=x((({className:e="",links:t})=>p("div",{className:C("@container",e),children:[u("div",{className:"pt-lg",children:u(Te,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(So,{index:t,...e},String(t))))}):null]}))),To="w-52",Bo=x((({className:e,...t})=>{const{topItems:l,logo:n}=Us(t.options?.page?.fallback),{documents:a,relatedEnterprises:i,contacts:r,socialMedia:s,mobileApps:o}=ht(d.FOOTER||"footer",{fallback:t.options?.page?.fallback});return p(I,{tag:"footer",className:e,...t,children:[p("div",{className:"flex items-stretch gap-3xl pb-3xl ",children:[u(Gs,{className:To,logo:n}),u(xo,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-6xl",children:[p("div",{className:C(To,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[u(bo,{items:r}),u(er,{media:s,children:"Соцсети"}),u(er,{media:o,showButtonText:!1,children:"Мобильное приложение"}),u(Q,{version:"link",href:"https://old.rshb.ru",className:"!text-left text-s font-light",onClick:fo,children:"Вернуться на прежнюю версию сайта"})]}),u(so,{className:"flex-grow",topItems:l})]}),u(Co,{className:"mt-xl",links:i}),u(Io,{links:a})]})})),Mo=x((({className:e="",title:t,description:l,calendar:n,...a})=>p(I,{className:C("space-y-m",e),defaultPadding:"p-6xl",...a,children:[u(R,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?Po(n):null]}))),Po=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return p("div",{className:"w-full flex flex-col justify-center gap-s",children:[u("div",{className:"flex w-full text-h6 text-center",children:l.map((e=>Ro(e,t)))}),u("div",{className:"flex gap-s w-full",children:l.map(((e,t)=>p("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex gap-s",children:zo(e)}),p("div",{className:"text-s",children:[u(Te,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",u(Te,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Ro=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),zo=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:u(he,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Vo=e=>({href:t})=>!!t&&D(V(t)?e.href:e.pathname).startsWith(D(t));function Ao(e=[]){const t=E(),l=e.findIndex((e=>Vo(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const Do=x((({className:e="",active:t,flat:l,children:n,...a})=>{const i=F({isRemote:!0}),{href:r,target:s,text:o,onClick:c}=i(a);return u("a",{className:C(jo(t,l),e),href:r,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:_o(t,l),children:o||n})})})),jo=(e=!1,t=!1)=>C("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),_o=(e=!1,t=!1)=>C("font-sans text-s font-light",e?"text-primary-main":C(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover");const Lo=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u($o,{...e},String(t))))})]}):null,$o=x((({icon:e,...t})=>{const l=F(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(he,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Oo=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Te,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Eo=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Fo=x((()=>{const{defaultLocation:e,foreignOffices:t}=Us(),[l,a]=bs(e),[r,s]=n(""),o=Ho(function(){const{data:e}=rt("/api/v1/regions",ct);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,Uo),{close:d}=z(),m=i((e=>{a(e),d()}),[]);return p(ro,{className:"pb-20",head:p("div",{children:[u(Te,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Te,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Te,{color:"text-primary-main",children:l.name})})]}):null,u(Eo,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&Zs(e.toLowerCase())(r.toLowerCase())>=.8)).map(Oo(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Te,{size:"text-h6",children:e})}),t.map(Oo(h))]},e)))}),Lo(t)]});var h})),Uo=e=>e.name?.charAt(0)||"",Ho=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Wo={default:"w-6 h-6",large:"w-12 h-12"},Xo=x((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:i,image:r,onClick:s})=>u("button",{className:C("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Wo[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:s,children:u(he,{image:r,className:C("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Ko=x((({className:e,version:t,officesLink:l,defaultLocation:n})=>{const a="transparent"===t?"white":"black",[r]=bs(n),s=po(),o=i((()=>s.open()),[]),c=(()=>{const{open:e,close:t}=z();return{open:(t={})=>e(u(Fo,{}),t),close:t}})(),d=i((()=>c.open()),[]);return p("div",{className:C("flex items-center gap-lg",e),children:[u(Do,{flat:!0,href:"#",text:r?.name,onClick:d}),l?u(Do,{flat:!0,href:l,text:"Офисы и банкоматы"}):null,u(Xo,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:"Поиск",onClick:o})]})})),Yo=x((({className:e="",items:t,activeItem:l})=>{const a=F(),[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),c=Wt(i((()=>s(!1)),[]));return p("div",{className:C(r?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(r?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:C("absolute flex flex-col rounded-md bg-white p-xl pb-xs",r?"":"hidden"),"aria-hidden":!r,children:t?.map(((e,t)=>{const{text:n,...i}=e,{href:r,target:s,onClick:o}=a(i);return u("a",{className:C("text-l font-light pb-m hover:text-primary-main",e===l?"text-primary-main":""),href:r,target:s,onClick:o,children:n},r||String(t))}))})]})})),Go=e=>globalThis[e];function qo(e,t){const[l,r]=n(),s=i((()=>r(Go(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Go(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Jo={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Zo=x((e=>{const[t,{setTrue:l}]=Ft();return t?u(Qo,{...e}):ec({...e,onClick:l})})),Qo=x((({chat:e="personal",...t})=>((e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),qo("chatbot",Jo[e])})(e),ec(t)))),ec=({className:e,iconVersion:t,onClick:l})=>u(Xo,{className:C("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),tc=x((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const i=F(),{href:r,target:s,text:o,onClick:c}=i(a);return p("a",{className:C("relative inline-block bg-transparent text-center no-underline",e),href:r,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:lc(t),children:o||n}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),lc=(e=!1)=>C("font-sans text-l font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),nc=x((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const r=N(i((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:r,className:n,children:u(tc,{...a,children:l})})})),ac={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},ic=x((({version:e,internetBankUrl:t})=>t?u(Q,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:C("py-s ml-s text-l font-light whitespace-nowrap hover:text-primary-main",ac["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),rc=["all","header"],sc=x((({subItems:e=[],version:t,internetBankUrl:l})=>{const a="transparent"===t?"white":"black",i=E(),o=r((()=>e.filter((e=>!e.displayArea||rc.includes(e.displayArea.toLowerCase())))),[e]),c=(e=>(t=[])=>{const l=t?.filter(Vo(e));return l?.length?fa((e=>e.href?.length||0))(l):void 0})(i)(e),[m,h]=n(o.length),x=o.slice(m),g=s(null),f={rootRef:g},b=r((()=>o.map(((e,t)=>e=>{h(e?oc(t):cc(t))}))),[o]);return p("nav",{className:"relative mt-s flex items-center justify-between",children:[u("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl",children:o.map(((e,t)=>u(nc,{className:m-1<t?"invisible":"",active:e===c,observerOptions:f,onVisibilityChange:b[t],...e},String(t))))}),x.length?u(Yo,{className:"relative w-auto z-40",items:x,activeItem:c}):null,p("div",{className:"flex",children:[d.CHAT_BOT?u(Zo,{className:"ml-4xl",iconVersion:a,chat:d.CHAT_BOT}):null,u(ic,{version:t,internetBankUrl:l})]})]})})),oc=e=>t=>Math.max(t,e+1),cc=e=>t=>Math.min(t,e),dc={"bg-white":"primary",transparent:"transparent"},mc=x((({className:e,bgColor:t="bg-white",version:l=dc[t],...n})=>{const{topItems:a,logo:i,officesLink:r,defaultLocation:s}=Us(n.options?.page?.fallback),[,o]=Ao(a),{internetBankUrl:c}=ht(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(I,{tag:"header",className:C("pt-3xl px-20",o?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...n,children:p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(Gs,{className:"mr-3xl",bgColor:t,logo:i}),a?.map(((e,t)=>u(Do,{active:e===o,...e},String(t)))),u(Ko,{version:l,className:"ml-auto",officesLink:r,defaultLocation:s})]}),u("div",{className:C("mt-xl h-px bg-main-divider","transparent"===l?"opacity-30":"")}),o?.items?.length?u(sc,{subItems:o.items,version:l,internetBankUrl:c}):null]})})})),hc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},uc=x((({className:e="",gap:t="XS",isPadding:l=!1,version:n="transparent",isTheme:a=!1,isCardBorder:i,...r})=>u(I,{className:C("relative","grid grid-cols-12",hc[t],e),defaultPadding:l?"p-6xl":"",version:n,isTheme:a,...r,children:Ti({...r,extraProps:{className:lt(i)}})})));uc.childrenTypes={exclude:["HorizontalLayout"]};const pc=x((e=>{const{className:t,image:l,...n}=e;return u(I,{className:t,defaultPadding:"p-0",...n,children:u(he,{image:l})})})),xc=x((({className:e="",cards:t=[],button:l})=>{const[a,r]=n(0),s=i((e=>r(e)),[]),o=t.length,[c,d]=$n({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:h}=d,x=t[c]?.href;return p("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[p("div",{className:"relative overflow-hidden",children:[o?gc({activeIndex:c,cards:t,selectedCardIndex:a,onClick:s}):null,Un({...d,btnClass:["left-12","right-12"],className:"top-16"}),m?u("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),u(Q,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function gc({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:u("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return p("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(he,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-s",children:[e?.sum?fc("страховая сумма",e.sum):null,e?.fee?fc("страховой взнос",e.fee):null]}),bc(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function fc(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p(Te,{size:"text-h6",children:[Ye(2)(t)," ₽"]}),u("div",{className:"mt-2xs",children:u(Te,{size:"text-l",color:"text-secondary-text",children:e})})]})}function bc(e){return e?u(he,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const yc=x((({className:e="",title:t,insuranceTabs:l=[],button:a,...r})=>{const[s,o]=n(0),c=i((e=>o(e)),[]);return p(I,{className:C("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?u(B,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return u("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:vc({insuranceTabs:l,button:a})})]})})),vc=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(xc,{button:t,cards:e},String(l)))):null};const Nc=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),wc={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},kc={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Cc=x((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),u(I,{className:t,defaultPadding:"p-4xl",...r,children:p("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Nc(u("div",{className:"w-px h-4 bg-gray"}))(s.map(Sc)),u("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-xs mx-3xl"}),u("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Bc)})]}):null,l?.length?u(Ke,{className:"max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),Sc=(e,t,l)=>{const n=1===t,a=t===l.length-1;return u("div",{className:`${Ic(n,a,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-2xs min-w-72":""),children:e.cells.reverse().map(Tc)}):null},`column_${t}`)},Ic=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Tc=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-xs ${kc[l]} ${wc[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:u("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Bc=(e,t)=>u("div",{className:"flex-1 max-w-[180px] text-center px-xs last:pr-3xl",children:e.title},`title_${t}`),Mc=["байт","Кб","Мб","Гб","Тб","Пб"],Pc=x((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=a||i?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Te,{size:"text-l",font:"font-light",children:[t,u(Te,{color:"text-secondary-text",children:l&&`${s} ${r} ${o}`})]}):null]})})),Rc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},zc=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=E();return p(I,{className:C("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(R,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:C("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Rc[r]),role:"list",children:a.map(Vc(o,i))}):null]})})),Vc=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?L(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Mc[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"!==l?.docType?l?.fileFormat:"";return u("div",{role:"listitem",children:u(Pc,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(he,{className:"min-w-6 min-h-6",image:t,width:"24",height:"24"}):null})},String(n))},Ac=(e,t,l)=>e?.length?u(Ke,{items:e,listItemSize:t,className:"text-l font-light"}):u(Te,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:l}),Dc=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,listItemSize:o,qr:c,additionalDescription:d="",title:m="Мобильное приложение",version:h="primary",...x})=>{const g="secondary"===h?"p-m min-w-32":"min-w-24",f=r?.src?u(he,{className:"hidden lg:block",image:r}):null;return u(I,{className:C("min-h-80",e),padding:"p-0",version:h,...x,children:p(xe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:m?u(B,{headingType:i,title:m,className:C("whitespace-pre-wrap",l)}):null,rightImage:f,buttons:$e(n,{className:"flex-wrap"}),children:[a?u(Te,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:C("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[Ac(s,o,d),c?.src?u("div",{className:C("flex justify-center bg-white rounded-md @xl:-order-1",g),children:u(he,{className:"w-fit",image:c})}):null,r?.src?u(he,{className:"lg:hidden",image:r}):null]})]})})})),jc={primary:"bg-white/30",secondary:"bg-main-divider"},_c={primary:"text-white",secondary:"text-secondary-text"},Lc=x((({count:e,version:t="secondary"})=>u("div",{className:C("w-6 h-6 rounded-full flex items-center justify-center",jc[t]),children:u(Te,{size:"text-xs",color:_c[t],children:e})}))),$c=(e=[],t={})=>e.filter((({content:e={}})=>$r(t,e))).length,Oc=(e,t)=>e===t;const Ec=(Fc=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Oc,((e=Oc)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Fc(l,t[e])))));var Fc;const Uc=[],Hc={},Wc={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Xc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Kc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Yc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Gc=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:C("h-12","block flex-1","cursor-pointer",Wc[n],l?Yc[n]:Kc[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:C("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Xc[n]:"text-secondary-text hover:text-primary-main"),children:[u(Te,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),qc=x((e=>u(e?.item?.href?Jc:Zc,{...e}))),Jc=x((e=>{const t=F(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Gc,{...e,tag:"a",item:a,onClick:n})})),Zc=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Gc,{item:e,onClick:n,...l})})),Qc=(e,t,l)=>(n,a)=>u(qc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),ed=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:C("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Qc(n,a,t))}))),td={categories:[],extraOptions:[],propertyType:[],stage:[]},ld=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=gt(td),m=Er(a.block?.blocks,s)(),h=i(((e=td)=>d(e)),[]),x=(({hotFilters:e=Uc,filtrationState:t=Hc,blocks:l=Uc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Ec(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Lc,{version:t===e[a]?"primary":"secondary",count:$c(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(I,{className:C("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(ed,{...x}),Ur({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(_r,{blocksToRender:m,...a})]})}));function nd(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}ld.childrenTypes=["ProductTile"],ld.childSchema=e=>e?.filtrationSchema||{};const ad={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},id=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(ad).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),rd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},sd=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(rd).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(ne,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),od={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},cd=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(od).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(ne,{name:l,width:"20",height:"16"})})})),dd={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},md=[55.753995,37.614069],hd=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=qo("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[o,c]=n(),m=e?ud(e):md;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:m,zoom:l,controls:[],suppressMapOpenBlock:!0}),nd(r,i.current,e))})),i.current&&r&&(nd(r,i.current,e),e?.length||i.current.setCenter(md))}),[r,i,e,m,l]),!r)return null;const h=o?"z-[100000]":"z-10";return p("div",{id:"map",className:C(!o&&"relative","w-full",t),children:[u("div",{className:C("absolute flex left-2 top-4 w-1/2",h),children:id(m)}),u("div",{className:C(Object.values(dd),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(ne,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:C("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[u(cd,{yandexMaps:i}),u(cd,{yandexMaps:i,direction:"out"})]}),sd(i.current,r,C("right-2 top-80",h))]})})),ud=e=>[xd(pd(e,0)),xd(pd(e,1))],pd=(e,t)=>e.map((e=>e[t])),xd=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,gd={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},fd=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(_l,{text:gd[e],...t(e)},e)))}):null,u(Q,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(ne,{name:"CloseIcon",width:"16",height:"16"})})]}),bd=()=>null,yd=()=>[],vd=x((({className:e,data:t=[],renderCard:l=bd,filterItems:n=yd,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=gt(a),d=n(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:C("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(B,{headingType:"h2",children:r}),h?u(Te,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?Nd(i):null,fd(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(hd,{points:m,className:"h-full"})})})]}),d.map(l)]})})),Nd=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border border-gray rounded-md",children:[e?u(M,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex gap-2xl flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(he,{image:e.image}):null,e?.text?u(Te,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,wd={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},kd=x((({className:e,children:t,color:l="gray"})=>u("div",{className:C("p-s border border-gray rounded-md flex items-center",wd[l].border,e),children:u(Te,{size:"text-m",color:wd[l].text,children:t})}))),Cd=x((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Sd({textItems:a,subText:t,children:l,...n})})),Sd=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:C("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Te,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Te,{size:"text-l",children:e.trim()},String(t)))),a?u(Te,{color:n,size:"text-m",children:a}):null]}),Id=x((({className:e,children:t})=>u("div",{className:C("flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Td=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Md(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Te,{size:"text-h4",children:Md(e)}),u(kd,{color:"green",children:Md(s)})]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ne,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null,u(Id,{className:"flex-wrap",children:c?.map(Bd)})]},String(o))},Bd=(e,t)=>u(Cd,{...e},String(t)),Md=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Pd=[];const Rd=async e=>await ot(e,{method:"GET"})||Pd,zd={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Vd={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Ad=x((({data:e,className:t})=>{const[l]=bs(),n=function(e){const{data:t=Pd}=rt(`/api/v1/atms?regionCode=${e}`,Rd);return t}(l?.code??"000");return u(vd,{className:t,filterItems:Dd,data:n,initFilterState:zd,renderCard:Td,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Dd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Vd[t](e))),l=!n.length||n.some((t=>Vd[t](e)));return t&&l}))},jd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[_d({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),_d({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(Cd,{label:"Режим работы",value:a,className:"max-w-none"})},_d=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Ld=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],$d=e=>Ld.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Od=e=>{if(!e)return null;const t=Ed(e);return p(Id,{className:"border-none",children:[u(Cd,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(Fd)})}),u(Cd,{label:"Режим работы",className:"max-w-none",children:u(Te,{children:e})})]})},Ed=e=>{const t=Ld.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Fd=({short:e,status:t},l)=>u("div",{className:C("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:u(Te,{size:"text-xs",children:e})},String(l)),Ud=(new Date).getDay(),Hd=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=$d(o),h=o?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Te,{size:"text-h4",children:e}),Xd(m)]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ne,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null,p(Id,{className:"flex-wrap",children:[u(Cd,{label:"Факс",value:n}),u(Cd,{label:"Телефон филиала",value:l}),u(Cd,{label:"Для обращений юридических лиц",value:a}),u(Cd,{label:"Обслуживание физических лиц",value:i}),u(Cd,{label:"Для консультаций по валютному контролю",value:s}),u(Cd,{label:"Контакт-центр",value:r})]}),o.isMatchesPattern?u(Id,{children:u(Cd,{label:h,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:m?.map(Kd)})})}):p(Id,{children:[u(Cd,{label:h,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:m?.map(Fd)})}),jd(m)]}),o?.businessScheduleVisibleTag?Od(o?.businessScheduleDescription):null,c?.currencies?.length?u(Id,{className:"flex-wrap",children:c?.currencies?.map(Wd)}):null]},String(d))},Wd=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(Cd,{label:"Валюта",value:e.currency}):null,t?u(Cd,{label:"Купить",value:String(t)}):null,l?u(Cd,{label:"Продать",value:String(l)}):null]},String(n)),Xd=e=>{const[t]=e?.slice(Ud-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(kd,{color:"green",children:a}):null,l&&i?u(kd,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(kd,{color:"red",children:"Выходной"})},Kd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(Cd,{label:e,value:t&&l?l:"",subText:Yd(n,a,t),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Yd=(e,t=!1,l=!1)=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Gd=[];const qd=async e=>await ot(e,{method:"GET"})||Gd,Jd={workingSaturday:!1},Zd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},Qd=x((({className:e})=>{const[t]=bs(),l=function(e){const{data:t=Gd}=rt(`/api/v1/branches?regionCode=${e}`,qd);return t}(t?.code??"000");return u(vd,{className:e,filterItems:em,data:l,initFilterState:Jd,renderCard:Hd,title:`Офисы филиала ${t?.name}`})})),em=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Zd[t](e)))))},tm=x((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(I,{version:"transparent",className:C(t),defaultPadding:"p-0",...l,children:"offices"===n?u(Qd,{}):u(Ad,{data:e})})})),lm=x((({text:e,size:t,align:l,font:n,children:a,...i})=>u(I,{defaultPadding:"p-0",...i,children:u(M,{size:t,align:l,font:n,children:e||a})}))),nm=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(I,{className:C("box-border",e),...n,children:[u(R,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:am()})]}))),am=(e=3)=>rm(100,e).map((e=>Math.floor(e))).map(im),im=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),rm=(e,t)=>[e].concat(t>0?rm(e/1.618,t-1):[]),sm=x((({className:e="",padding:t,slides:l=[],...a})=>{const[i,r]=n(0);return p(I,{className:C("box-border overflow-hidden",e),defaultPadding:"py-6xl",padding:t,...a,children:[u("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:l.map((({productBlock:e},t)=>u("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:u(Qe,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),u("div",{className:"h-28 px-xs mt-m -mb-m flex gap-xs box-border",children:l.map(om({activeSlideIndex:i,onClick:r}))})]})})),om=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:py-xl backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return p("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:C("relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",i),children:[u("div",{className:r,children:l?.title}),u("div",{className:s,children:l?.description})]},String(n))},cm=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(I,{className:C("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Le(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(he,{image:r})}):null,s?u(B,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?dm(i):null,mm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),mm({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),mm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?$e([n]):null]})]}))),dm=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Se,{__html:e})}),mm=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(ne,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Te,{size:"text-xl",color:n,children:t})]})]}):null,hm=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(I,{defaultPadding:"p-0",...n,children:u(Se,{__html:t,richVersion:l})})})),um=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(Rr,{tag:"button",className:C("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?u(Te,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(ne,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),pm=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(I,{className:C("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(nr,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(ar,{className:C("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:Ti({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>xm({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));pm.childrenTypes={exclude:["RollupItem"]};const xm=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?u(um,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(zr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},gm=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:C("order-4",e),children:[u(rn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(rn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),fm=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Gt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),bm=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(fm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(fm,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ym=["От 1 дня","До 365 дней"],vm=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Te,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(kl,{min:1,max:365,value:e,items:ym,onChange:t})]}))),Nm=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(fm,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(fm,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),wm=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(bm,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:km(c)}),u(vm,{days:a,setDays:e=>c({days:e})}),u(Nm,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Cm(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(gm,{}),u(Q,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),km=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Cm=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Sm=x((({days:e,tariffs:t=[]})=>{const l=Tm(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Im("Аренда за",e),Im("Цена",l+" ₽")]}),u("span",{className:"@xl:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(he,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("span",{className:"hidden @xl:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),Im=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Tm=(e,t)=>{const l=Bm(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Bm=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},Mm=(e,t)=>e.find((e=>e.branchCode===t)),Pm=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Mm(n,l.selectedBranch),o=Rm(s?.safeBoxCaseVolumes),c=zm(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Vm(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(wm,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Sm,{days:l.days,tariffs:d})]})})),Rm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],zm=(e,t)=>e?.find((e=>e.volume===t)),Vm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Am=[];const Dm=async e=>await ot(e,{method:"GET"})||Am,jm=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=Nt(),h=_m(c.selectedRegion,m),x=function(e){const{data:t}=rt(e?`/api/v1/safeboxes?regionCode=${e}`:null,Dm);return t||Am}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Mm(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(I,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(B,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Pm,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(M,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(hd,{points:f,className:"h-[640px]"}):null]})})),_m=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Lm=({styleMap:e,isMainButton:t,version:l})=>(n,a,i)=>{const{label:r,description:s,button:o,items:c,isDotted:d}=n;return p("div",{className:C("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",$m(i.length)),children:[p("div",{className:"text-center space-y-xs",children:[r?u("div",{children:u(Te,{size:"text-h6",children:r})}):null,p("div",{className:"flex flex-col items-center gap-3xs",children:[s?u("div",{className:e.description,children:s}):null,u(Ke,{className:e.description,items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(Q,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...o,children:o?.text}):null]},String(a))},$m=e=>e<5?"w-72":"w-52",Om={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Em=x((({align:e=Nn,buttons:t,className:l="",description:n,showLines:a=!0,size:i="normal",steps:r=[],stepVersion:s="gray",title:o,version:c="primary",...d})=>{const m=r.length>3,h=Om,x=(e=>e?"":"opacity-0")(a),g=(e=>e<5?"px-24":"px-16")(r.length),f=Boolean(t?.every((e=>e?.text)));return p(I,{className:C("box-border flex flex-col items-center overflow-hidden gap-y-3xl",l),defaultPadding:"p-6xl",version:c,...d,children:[u(R,{headlineVersion:"S",title:o,description:n,isEmbedded:!0,className:"w-full",align:e}),r?.length?p("div",{className:"box-border space-y-lg",children:[u("div",{className:C("flex items-center",g),children:Nc(u("div",{className:C("h-0.5 w-full bg-secondary-light flex-1",x)}))(r.map(Fm(h,i,s)))}),u("div",{className:C("flex justify-between",m?"gap-x-s":"gap-x-20"),children:r.map((b={styleMap:h,isMainButton:f,version:c},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return Lm(b)(e,t,l);case"rte":return u("div",{className:C("text-center",$m(l.length)),children:u(Se,{__html:e.__html})},String(t));default:return null}}))})]}):null,$e(t)]});var b})),Fm=(e,t,l)=>({icon:n},a)=>{const i="secondary"===l?"white":"color";return u(I,{defaultPadding:"",className:`${Um(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Le(n)?u(he,{image:{...n,iconVersion:n?.iconVersion||i},width:"48",height:"48"}):u("span",{className:C("text-h4","transparent"===l?e.iconText:Hm(l)),children:a+1})},String(a))},Um=e=>"normal"===e?"h-24 w-24":"h-16 w-16",Hm=e=>"secondary"===e?"group-data-primary:text-white":"text-secondary-text",Wm=x((()=>u("div",{}))),Xm=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=false,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=fi({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:C(e,"vertical-list"===o?"relative h-full":""),children:[u(ci,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(pi,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Km=x((({listType:e,showDots:t,options:l,version:n,...a})=>u(I,{version:n,defaultPadding:"p-0",...a,children:u(Xm,{listType:e,showDots:t,version:n,children:Ti({...a,options:l})})})));Km.childrenTypes={exclude:["SwipeListControlBlock"]};const Ym="hidden sm:flex absolute z-40 top-0",Gm=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=fi({itemCount:t?.length||0});return p("div",{className:C("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(ci,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Qc(l,n,a))}),r.canScrollLeft?u(En,{className:C("left-6",Ym),onClick:r.scrollLeft}):null,r.canScrollRight?u(Fn,{className:C("right-6",Ym),onClick:r.scrollRight}):null]})})),qm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(ed,{...t});case"centered":return u("div",{className:"flex",children:u(ed,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Gm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Jm="tab",Zm=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=E(),{isReady:d}=c,m=r((()=>l.map(eh)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Qm(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&v.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Qm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Jm,e.name):t.delete(Jm),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(I,{className:C(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:qm({items:m,value:m[h],tabsMode:s,onChange:x})})})),Qm=e=>{"group"===e.type&&v.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&v.fire("tab",{type:e.type,label:e.href})},eh=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,th=x((({className:e="",isOpen:t,onClick:l})=>u(Q,{className:e,appendRight:u(he,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),lh={Buttons:({buttons:e})=>$e(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(he,{image:e}):null,List:({isDotted:e,...t})=>u(Ke,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(Te,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(th,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},nh=x((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return ah({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),ah=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in lh))return null;return u(lh[l],{...t,...n})},ih=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(nh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),rh=(e,t)=>140*we(e.slice(0,t).map((e=>e?.cols?.length??1))),sh=(e,t)=>e?.length>0?u("div",{className:C("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,oh=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=$n({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,i=C("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:l.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${rh(n,a)}px)`},children:n?.map(((e,t)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?sh(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Un({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),ch=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(Te,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(oh,{rows:t.rowsData})})})]},n)}))}))),dh=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(Q,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:u(ne,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function mh(e){const t=await fetch(e);return await t.json()}const hh=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=rt(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),mh);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(dh,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(ch,{activeTabIndex:r,items:c}),u(th,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(th,{onClick:l,isOpen:!0})]})})),uh=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:C("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(hh,{...t,onClick:l})}):null]}))),ph=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(uh,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:C("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(he,{className:"hidden @4xl:block max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m font-light",children:e?.title}):null]})}),t?.length?u(pr,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(ih,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})})),xh=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Un({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),gh=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=$n({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(ph,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(I,{className:C("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(R,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(nr,{renderFoldableSection:({isUnfolded:e})=>p(xh,{controls:m,children:[x,u(ar,{isUnfolded:e,children:g})]}),renderFoldButton:Vr}):u(xh,{controls:m,children:h})})]})})),fh=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(I,{className:C("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?bh():null,"big"===n?yh(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Te,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?vh(l):null,r?.length?Nh(r,!0):null,i?u(Se,{__html:i}):null]})]}))),bh=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),yh=e=>e?.src?u(he,{className:"h-fit flex-shrink-0",image:e}):null,vh=e=>u(M,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Nh=(e,t)=>u("ul",{className:C("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(Te,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),wh=x((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isInnerBorder:r=!1,...s})=>u(I,{className:C("relative flex flex-col",hc[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...s,children:Ti({...s,extraProps:{className:C("w-full",lt(r)),padding:n?"":"p-0"}})})));wh.childrenTypes=[];const kh=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Ch=x((({className:e,title:t,url:l,previewImg:n,...a})=>{const i=E();return p(I,{className:e,defaultPadding:kh(e),...a,children:[u(R,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:L(i)(n?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:L(i)(l)})}):null]})})),Sh={AdTile:pt,ApplicationForm:yn,BenefitsBlock:Cn,Bonus:Mn,BonusBenefitsBlock:jn,ButtonsBlock:Ln,Calculator:Za,CardTransfer:ii,Carousel:Di,CarouselBankHistoryCard:ji,CarouselCard:Ei,CarouselCatalogCard:Ui,CarouselInvestmentCard:Xi,CarouselLinks:qi,CarouselRecommendationCard:tr,CarouselTariffsCard:rr,ComparisonTable:Sr,ContactsBlock:Tr,DepositFiltration:Qr,Depository:ps,ErrorBlock:gs,ExchangeRateTile:Es,Footer:Bo,GracePeriod:Mo,Header:mc,Headline:R,HorizontalLayout:uc,ImgBlock:pc,InsuranceAmountBlock:yc,InvestmentInfo:Cc,LinkDocs:zc,MobileAppTile:Dc,MortgageFiltration:ld,OfficesAtmsMap:tm,ParagraphBlock:lm,Placeholder:nm,ProductBlock:nt,ProductGallery:sm,RepresentativeOfficeInfo:cm,RichTextBlock:hm,RollupItem:pm,SafeDepositRental:jm,StepsBlock:Em,StickyBottomMenu:Wm,SwipeListControlBlock:Km,Tabs:Zm,TariffsTable:gh,TextBlock:fh,VerticalLayout:wh,Video:Ch};const Ih=["Header","Footer"],Th=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Bh(e=globalThis){const t=s(new Map);a((()=>k.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Ih.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?va(Th)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Mh="cookie",Ph=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Ft();Js((()=>{globalThis.localStorage?.getItem(Mh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Mh,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(M,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Zi,{isRemote:!0,className:Rh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Zi,{isRemote:!0,className:Rh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(qs,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Rh=e=>C("inline mx-2xs",e?"text-green-dark":"");function zh(e){throw new Error(e)}const Vh=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>v.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:zh(e)}}))),[c,d]),l},Ah=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Vh({onCloseAll:e,onClose:t}),{close:n}=z(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Ht(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:C("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Dh=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>v.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:zh(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Ht(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),jh=h();const _h=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Lh()}))),Lh=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[$h("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),$h("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")]}),$h=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),Oh=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await jh.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await jh.like(e))}),[e]),dislike:i((async()=>{l(await jh.dislike(e))}),[e])}}(E().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(_h,{onClick:O(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(_h,{onClick:O(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Eh=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Bh(),p("div",{"data-theme":s,children:[p("section",{className:C("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Ii(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Ti({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Ii(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Oh,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Wm,{}),u(Ah,{}),u(Dh,{}),u(Ph,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Eh.childrenTypes=[],Eh.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=Sh,e.ContentPage=Eh,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=O,e.joinList=Nc,e.packageVersion="0.14.62",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=_,e.useRouter=E,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=x((({children:e})=>f?e:null));class y{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const v=new y;function N(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:w(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function w(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 k=new y;const C=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},I=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return N(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];k.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[x,g]=n(!1);a((()=>v.subscribe("tab",(e=>{g(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:C("@container font-sans",f?"group":"",S[t],x?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),T={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},B=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>u(l,{className:C("font-sans m-0",T[t],e),children:n||a}))),M=x((({children:e,...t})=>u("p",{className:C("font-sans",Object.values(t)),children:e}))),P={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},R=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=P[l],m={marginTop:d.descriptionStyle};return p(I,{className:C(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(B,{className:C("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(M,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),z=()=>({open:(e,t={})=>v.fire("dialog",{type:"open",dialog:e,...t}),close:()=>v.fire("dialog",{type:"close"}),closeAll:()=>v.fire("dialog",{type:"close",all:!0})}),V=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!V(e)&&(!t||"_self"===t)),D=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),j=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var _=Object.freeze({__proto__:null,isURL:V,isLocalURL:A,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:D,joinPath:j});const L=e=>(t,l=d.BASE_PATH)=>{if(!t||V(t)||$(t,d.CDN))return t;const n=t.startsWith("/");return j($(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},$=(e,t)=>t&&e&&e.startsWith(t),O=(e,t)=>O._impl(e,t);function E(){return E._impl()}function F(e={}){const{isRemote:t,basePath:l}=e,n=E(),{closeAll:a}=z();return e=>({...e,href:t&&!l?e.href:L(n)(e.href,l),"aria-label":e.text,onClick:O(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&A(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}O._impl=e=>e,O.setup=e=>{O._impl=e},E._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),E.setup=e=>{E._impl=e};const U={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},H="bg-main-divider text-main-disabled",W={primary:H,secondary:H,white:H,link:"",transparent:"",gray:H,"":""},X="text-center font-sans select-none",K={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},Y=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=q(e)?"hidden lg:block":"";return p("div",{className:C(G(e),"flex gap-xs"),children:[n?u("div",{className:C(r,K[i]),children:n}):null,q(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:C(r,K[i]),children:a}):null]})})),G=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return C("group/btn items-center justify-center",q(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},q=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),J=({className:e,rounded:t,version:l})=>["inline-block",X,l?W[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Z=({className:e,rounded:t,version:l})=>[X,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?U[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Q=x((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=F()({onClick:r,href:n,...a}),o=t??u(Y,{...s});return u(e?te:ee,{...s,children:o})})),ee=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:Z({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),te=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:J({className:e,rounded:n,version:l}),children:a}))),le={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},ne=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=E(),c=L(o)(j(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(re,{className:e,children:p("svg",{className:C(ie(r),le[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):u("img",{className:e,src:c,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:ae(e,s)})})),ae=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},ie=e=>e?"":"w-full h-full",re=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),se=(e,t)=>e?.media&&t?.media?e.media-t.media:0,oe=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=E();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(se).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:de(a,n)(e),type:me(l),media:i?`(max-width: ${i}px)`:"",width:t.size?.width,height:t.size?.height},`${r}_${e}`))):null,t?.src?ce({...t,src:de(a,n)(t.src)},l):null]})})),ce=(e,t="")=>u("img",{src:e.src,className:C("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},width:e.size?.width,height:e.size?.height}),de=(e,t)=>l=>l&&!V(l)?L(e)(j(t,l)):l,me=e=>e?`image/${String(e)}`:void 0,he=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(ne,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(oe,{className:e,imageClassName:l,image:t,pathPrefix:n}):null));function ue(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:Z({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(he,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(Q,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const pe={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},xe=x((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:x,children:g})=>{const f=E(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:ge(n,l,e),children:[x?ue(t,b):null,a?u("div",{className:"relative",children:a}):null,p("div",{className:C("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[ve(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:C("grid gap-3xl h-full",c?"@xl:grid-cols-2":"",o?"":"grow"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,g]}),ve(c,{className:C("@xl:justify-self-end @xl:col-start-2",s?fe(m):"",be(m),Ne(h)),imageAlign:d}),ye(s)]})]})]})})),ge=(e="",t="",l="")=>C("relative flex flex-col gap-3xl overflow-hidden",e||t,l),fe=e=>e?"row-span-2":"@xl:row-span-2",be=e=>e?"col-start-2 self-center":"",ye=e=>e?u("div",{className:"self-end",children:e}):null,ve=(e,{className:t,imageAlign:l})=>e?u("div",{className:C("shrink-1/2 justify-self-center",l&&pe[l],t),children:e}):null,Ne=e=>e?"hidden @xl:block":"",we=(e=[])=>e.reduce(((e,t)=>e+t),0),ke=(e=[])=>e?.length?we(e)/e.length:0,Ce=(e,t="normal")=>e?u("div",{className:C("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(he,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Se=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:C(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ie=(e,t)=>e?u(M,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Te=x((({children:e,...t})=>u("span",{className:C("font-sans",Object.values(t)),children:e}))),Be=(e,t)=>e?u(Te,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Me=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Se,{...e},`rte-${t}`):["label"in e?Be(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ie(e.description,t)},String(t)):null],Pe=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:C("flex gap-m min-w-56 items-center",e),children:["icon"in l?Ce(l.icon,t):null,u("div",{children:Me(l)})]}))),Re=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),ze=e=>{return((t=e.map(Re))?.length?Math.sqrt(Math.abs(ke(t.map((e=>e**2)))-ke(t)**2)):0)>16;var t},Ve=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ae=e=>!e.some(Ve),De=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:C("flex gap-x-m gap-y-s",ze(l)||Ae(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Pe,{benefitsVersion:t,...e},String(l))))}):null)),je=x((({className:e,benefits:t})=>t?.length?u("div",{className:C("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Me)}):null)),_e=x((({isTabularBenefits:e,...t})=>u(e?je:De,{...t}))),Le=e=>Boolean(e?.src||e?.icon),$e=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:C("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Oe(l))}):null,Oe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Ee(a,r),c=Ee(i,r);return n||a?.icon?u(Q,{className:C("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:o}),appendRight:Fe({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Ee=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Fe=e=>Le(e)?u(he,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ue=x((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:C("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:C("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),He={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},We=x((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M"})=>{const a=He[n];return l?.length?u("section",{className:C("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",a.textSize,e),role:"list",children:l.map(((e,l)=>u(Ue,{isDotted:t,dotClassName:a.dotStyle,children:e},String(l))))}):null})),Xe=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0),Ke=x((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(Ye)}):null)),Ye=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(Te,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Xe(2)(t)," ₽"]}):null]}),Ge=x((({className:e,tags:t})=>t?.length?u("div",{className:C("flex flex-wrap gap-xs",e),role:"list",children:t.map(qe)}):null)),qe=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Te,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},Ze=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,priceList:g=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...I})=>{const T=y?.src?u(he,{image:y}):null,B=u(R,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(xe,{className:e,padding:t,defaultPadding:l,...m?{title:B}:{insetTitle:B},...Qe(T,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:$e(b),backwardButton:C,...I,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?u(_e,{benefitsVersion:s,isTabularBenefits:o,benefits:M}):null,d?u(Se,{__html:d}):null,h?.length?u(We,{items:h,isDotted:x,listItemSize:Je[i]}):null,S,g?.length?u(Ke,{priceList:g}):null,et(f)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?u(Ge,{tags:e}):null,tt=e=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",lt=x((({className:e,padding:t,showBorder:l,...n})=>u(I,{className:C("overflow-hidden flex flex-col gap-3xl box-border",tt(l),e),padding:"p-0",...n,children:u(Ze,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...n})}))),nt=e=>null!=e,at=new Map;function it(e,t,{fallback:l,cache:i}={}){const s=r((()=>rt(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(nt))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=at)=>l=>{const n=t.get(l);if(nt(n))return n;const a=e(l);return nt(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function rt(e){return Array.isArray(e)?e:e instanceof Function?rt(e()):[e]}async function st(e,t){try{return e?await ot(e,t):null}catch(e){console.error(e)}return null}async function ot(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const ct={},dt="wcms-resources";function mt(e,t={}){const{fallback:l=ct,folderName:n=dt,setBasePath:a=!1}=t,i=j("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=it(e?i:null,ot,{fallback:l});return r||ct}const ht=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ut=x((e=>{const t=((e="reklamnaya-plitka")=>{const t=mt(e),l=r((()=>ht(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(lt,{...t,...e})}):null}));const pt=e=>e,xt=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=pt,format:i=pt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},gt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],ft=e=>!e?.length,bt=e=>t=>l=>e(l)?[]:[t],yt=[];function vt(){const{data:e}=it("/api/v1/regions",ot);return e||yt}const Nt=x((({text:e,link:t})=>p(M,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Te,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(Q,{href:t.href,ariaLabel:"условия передачи данных",target:t.target,className:"text-primary-main",children:u(Te,{children:t.text})}):null]}))),wt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},kt=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1})=>{const N=s(null),w=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&N.current?.focus()}),[v,N]);const k=x?"pr-3xl":"",S=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:C("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:N,className:C("w-full h-14 border rounded-md text-primary-text outline-none p-m",k,S,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:w,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),Ct=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(kt,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),St=e=>"_"===e,It=e=>/\d/.test(e),Tt=e=>St(e)||It(e),Bt=[..."+7 (___) ___-__-__"],Mt=Bt.findIndex(St),Pt=Bt.map(((e,t)=>Tt(e)?Bt.slice(0,t).filter(Tt).length:-1));const Rt=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Bt.map(((e,l)=>It(e)?e:t.charAt(Pt[l])||e)),n=Pt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Mt,n)):l).join("")}(e))),[t]);return u(kt,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),zt=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Rt,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Vt="Некорректно заполненное поле",At=bt((e=>null!=e&&""!==e))(Vt),Dt=bt((e=>"string"==typeof e&&e.length>1))(Vt),jt=bt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Vt),_t=(Lt=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,bt((e=>"string"==typeof e&&Lt.test(e))))(Vt);var Lt;const $t=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"Наименование организации",...wt(e("fullName"),At)}),u(Ct,{className:"shrink-0 w-full",label:"Контактное лицо",...wt(e("name"),Dt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"ИНН",...wt(e("inn"),jt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),_t)})]})]}),Ot=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Et(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Ft=e=>e?.text||e?.key||"";function Ut(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Ht(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Ut(globalThis.document,"click",l),t}const Wt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Xt=x((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Wt(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Ft(e)}),u(ne,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:C("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Kt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>v.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>v.fire("popup",{type:"update",popup:e,...t}),close:()=>v.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),x=Ht(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Xt,{popupRef:x,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const Yt=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=Et(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),v=Kt({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[Gt(t),p("div",{className:C("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:C("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Jt(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Ft(a)||o}),qt(h,d)]}),c&&h?u("div",{className:C("absolute top-0 w-full z-20"),children:u(kt,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),Gt=e=>e?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,qt=(e,t)=>u(ne,{className:C("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Jt=(e,t)=>C(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Zt=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Yt,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Qt=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ot.map((({name:e=""})=>({key:e,text:e}))),...wt(t("acquiringType"),At)})}),u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(t("region"),At)})})]}),el=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:C("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:C("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),tl=e=>p("div",{children:[u(el,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(el,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),ll=(e,t)=>{const l=Z({className:"text-white",version:e?.version});return u("button",{type:"submit",className:C("p-m w-full @xl:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},nl={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},al=gt({acquiringType:At,region:At,fullName:At,inn:jt,name:Dt,phone:_t}),il=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;ft(al(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=xt(nl,a),o=vt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(B,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),Qt({regions:o,field:r}),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),$t(r),tl(r),ll(t),u(Nt,{link:l})]})})),rl=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"Контактное лицо",...wt(e("name"),Dt)}),u(Ct,{className:"shrink-0 w-full",label:"ИНН",...wt(e("inn"),jt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(zt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),_t)}),u(Ct,{className:"shrink-0 w-full",label:"Электронная почта",...wt(e("mail"),At)})]})]}),sl=({regions:e,field:t})=>u(Zt,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(t("region"),At)}),ol={name:"",phone:"",inn:"",mail:""},cl=gt({region:At,name:Dt,phone:_t,inn:jt,mail:At}),dl=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;ft(cl(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=xt(ol,a),o=vt();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[sl({regions:o,field:r}),rl(r),ll(t),u(Nt,{link:l})]})})),ml=[];const hl=async e=>await st(e,{method:"GET"})||ml,ul=["От 1 000 ₽","До 1 000 000 000 ₽"],pl=["От 1 мес","До 15 лет"],xl=e=>p("div",{className:"pb-2xs border-b border-b-main-divider @xl:flex @xl:justify-between @xl:gap-lg @xl:border-none @xl:pb-0",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"Наименование организации",...wt(e("fullName"),At)}),u(Ct,{className:"shrink-0 w-full",label:"ИНН",...wt(e("inn"),jt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),_t)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...wt(e("annualRevenue"),At)}),u(Ct,{className:"shrink-0 w-full",label:"Контактное лицо",...wt(e("name"),Dt)}),u(Ct,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),gl=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},fl=(e,t,l)=>Math.max(t,Math.min(e,l));function bl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function yl({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:C("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=bl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const vl=1,Nl=100,wl=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:vl),max:s=(a.length?a.length-1:Nl),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=gl(e,{normalize:(e=0)=>a.length?kl(a)(e):fl(e,r,s),format:Xe()}),x=i((e=>{m&&m(bl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Te,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:C("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),yl({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),Cl(n)]})})),kl=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Cl=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Sl=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Te,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(wl,{items:ul,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Te,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(wl,{items:pl,min:1,max:180,...e("term")})]})]}),Il=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(l("region"),At)})}),u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...wt(l("department"),At)})})]}),Tl={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Bl=gt({fullName:At,annualRevenue:At,inn:jt,name:Dt,phone:_t,region:At,department:At}),Ml=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;ft(Bl(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=xt(Tl,n),o=vt(),c=function(e){const{data:t}=it(e?`/api/v1/branches?regionCode=${e}`:null,hl);return t||ml}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(B,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),Sl(r),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),xl(r),u(B,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),Il({regions:o,branches:c,field:r}),ll(e),u(Nt,{link:t})]})})),Pl={name:"",phone:""},Rl=gt({name:Dt,phone:_t}),zl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;ft(Rl(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=xt(Pl,n);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(B,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"Имя",...wt(a("name"),Dt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...wt(a("phone"),_t)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(Nt,{link:t})}),ll(e)]})]})})),Vl=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=mt(l||"regions-grant-support"),[i,r]=n({key:""}),s=Z({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(Zt,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(Q,{href:o,target:"_blank",className:C("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Al=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Dl=[{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"}],jl=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Al,{paths:Dl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:C("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":_l(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Te,{size:"text-l",font:"font-light",children:l})}):null]})})})),_l=e=>C("rounded border",e?"bg-primary-main":""),Ll=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},$l=()=>{},Ol=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=El(t,e),o=Fl(t,i,r);m.push(u("td",{children:u("div",{className:Ul(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},El=(e,t)=>t&&e.toDateString()===t.toDateString(),Fl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Ul=(e,t)=>C("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Hl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Wl=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=$l})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Hl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Ol({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Xl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Kl=Xl.map((e=>({key:e}))),Yl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Gl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},ql={className:"min-w-32",iconVersion:"black",isBorder:!1},Jl=x((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=Et(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[x,g]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:N,yearsOptions:w,handleChangeVisibleCalendar:k,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Ht(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Xl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Kl,yearsOptions:Yl,ref:s}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:d,selectedYear:x,selectedMonth:m,showCalendar:c});return p("div",{className:C(e,"relative"),ref:S,children:[u(Te,{size:"text-m","font-weight":"font-light",children:t}),Zl(k,l,a),c?p("div",{className:"absolute bg-white z-10 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(ne,{...Gl,className:"-rotate-90 cursor-pointer"})}),u(Yt,{onChange:y,value:{key:Xl[m]},options:N,...ql}),u(Yt,{onChange:v,value:{key:String(x)},options:w,...ql}),u("div",{className:"my-auto",onClick:b,children:u(ne,{...Gl,className:"rotate-90 cursor-pointer"})})]}),u(Wl,{today:l,currentMonth:m,currentYear:x,onDateSelect:o,min:r,max:s})]}):null]})})),Zl=(e,t,l)=>p("div",{onClick:e,className:C("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(M,{children:t&&Ll(t)}),u(ne,{...Gl,name:"CalendarIcon"})]}),Ql=x((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:e,children:[t?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:t})}):null,u(Jl,{value:l,onChange:a,valid:Boolean(!n)}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),en=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"Фамилия",...wt(e("surname"),Dt)}),u(Ct,{className:"shrink-0 w-full",label:"Отчество",...wt(e("middleName"),Dt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),_t)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Ct,{className:"shrink-0 w-full",label:"Имя",...wt(e("name"),Dt)}),u(Ql,{className:"shrink-0 w-full",label:"Дата рождения",...wt(e("date"),At)}),u(Ct,{className:"shrink-0 w-full",label:"Электронная почта",...wt(e("mail"),At)})]})]}),tn={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},ln=gt({surname:Dt,name:Dt,middleName:Dt,phone:_t,mail:At,date:At}),nn=x((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;ft(ln(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=xt(tn,r);return p("form",{className:"container space-y-s",onSubmit:o.onSubmit,children:[en(s),p("div",{className:"@xl:flex justify-between items-center",children:[p("div",{className:"@xl:mb-0 mb-2 flex items-center gap-3",children:[u(jl,{...wt(s("consentDataProcessing"),At)}),u(Nt,{text:"Согласен с ",link:l})]}),ll(t)]})]})})),an=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Te,{color:"text-primary-text",children:t}):null]})}))),rn=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(an,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(an,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(an,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(an,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},sn=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(Zt,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(e("region"),At)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(Ct,{className:"w-full mb-s",label:"ИНН",...wt(e("inn"),jt)}):null,u(Ct,{className:"w-full mb-s",label:"Наименование организации",...wt(e("fullName"),At)}),u(Ct,{className:"w-full mb-s",label:"ФИО",...wt(e("name"),Dt)}),u(zt,{className:"w-full mb-s",label:"Телефон",...wt(e("phone"),_t)}),l?null:u(Ct,{className:"w-full mb-s",label:"Электронная почта",...wt(e("mail"),At)})]})]})},on=e=>{const t=e("text");return p("label",{htmlFor:"textarea",children:[u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{id:"textarea",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:C("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},cn={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},dn={fullName:At,name:Dt,phone:_t},mn=gt({...dn,mail:At}),hn=gt({...dn,inn:jt,region:At}),un=e=>"currencyControl"===e,pn=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),xn={ApplicationFormBusinessCard:dl,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:pn(o),PartnerComments:c,...un(o)?{inn:r,region:s?.text||""}:{mail:i}};ft((e=>un(e)?hn:mn)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=xt(cn,a),o=vt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[rn(r),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),sn(r,o),on(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[ll(t),u(Nt,{link:l})]}),u(B,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(he,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(he,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:zl,ApplicationFormCredit:Ml,ApplicationFormAcquiring:il,ApplicationFormGrantSupport:Vl,ApplicationFormIndividuals:nn},gn=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(he,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(B,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),fn={send:async function(e,t){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},bn=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await fn.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(I,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(B,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?yn(l,o):null,r?u(gn,{responseType:r}):null]})})})),yn=(e,t)=>{const l=e?.formType;if(!l||!(l in xn))return null;return u(xn[l],{...e,onSubmit:t})},vn="text-center",Nn={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},wn=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:C("rounded-icon object-fit flex justify-center items-center",Nn[l],e),children:u(ne,{...i,width:"54%",height:"54%",name:a})}):null})),kn=x((({className:e="",title:t,benefitList:l,...n})=>p(I,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(B,{headingType:"h3",as:"h2",className:vn,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Cn)}):null]}))),Cn=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(wn,{className:"shrink-0",defaultIconSize:44,iconBgVersion:a||"",...n}):null,n?.src?u(he,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(B,{headingType:"h6",children:e}),u(Te,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(We,{className:"text-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Sn=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a=vn,...i})=>u(I,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(R,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(R,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:$e(e?.buttons)}),e.bonusItemContent?.bonusType?In(e.bonusItemContent):null]})]},String(t)))):null})]})}))),In=e=>"count"===e.bonusType?Tn(e):Bn(e),Tn=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(Te,{size:"text-h2",children:e.bonusName})}):null]}),Bn=e=>e.image?u(he,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Mn=e=>({icon:t,title:l,description:n},a)=>p("div",{className:C("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?u(Te,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?u(he,{image:t,height:"180",className:"w-auto"}):null,n?u(Te,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),Pn=(e,t,l)=>u("div",{className:`grid gap-2xs ${Rn(t)}`,children:e.map(Mn(l))}),Rn=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},zn=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(I,{className:l,defaultPadding:"p-6xl",...r,children:[u(R,{title:i,description:a,headlineVersion:"M"}),e?.length?Pn(e,n,t):null]}))),Vn={start:"justify-start",center:"justify-center",end:"justify-end"},An=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?C("flex",Vn[l]):"";return u(I,{className:C("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:$e(e)})})),Dn=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},jn=x((({className:e,disabled:t,...l})=>u(Q,{rounded:!0,className:C("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(he,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),_n=x((e=>u(jn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Ln=x((e=>u(jn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function $n({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(jn,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(jn,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const On=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:C("flex justify-between @xl:flex-col",a),children:[e?u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(Te,{size:"text-h3",children:[n," ",Xe(2)(Math.round(t))," ",l]})}:{children:u(Te,{size:"text-h3",children:"-"})})]}))),En=1e4,Fn=5e6,Un=Math.round(23.5),Hn={minSum:En,maxSum:Fn,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Wn={minSum:En,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Xn={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Kn={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Yn={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Gn=e=>e?u(M,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,qn=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),Jn=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(ne,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(M,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(M,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Zn=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(qn,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),Qn=({rate:e,title:t,unit:l})=>u(On,{title:t,value:e,postfix:l}),ea=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(Jn,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:Zn({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:Qn({title:l,unit:n,rate:a,...i})})]});function ta({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Xe(2)(l.min||0)} ₽`,`До ${Xe(2)(l.max||0)} ₽`];return u(wl,{items:e?n:[],step:t,...l})}function la(e){const{data:t}=it(`/wcms-resources/${e}.json`,ot);return t}const na=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=la(t||"bonus-calculator-data")||Xn,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},aa=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=xt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=na(a,t);return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[ta({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),ta({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?ea({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u(On,{title:"Баллов за год",value:m}):null,$e(l,{isVertical:!0}),Gn(n)]})]})})),ia=(e,t=0)=>e?.sum&&e.sum>=En&&e.sum<=Fn?e.sum:t,ra=(e,t=0)=>e?.period&&e.period>=13&&e.period<=60?e.period:t,sa=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,oa={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ca=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:C(`flex ${oa[a]}`,l),children:e?.map((({id:e,text:l})=>u(jl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),da=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Te,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Te,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(ca,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:C("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),ma=e=>da({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ha=e=>e,ua=(e=ha)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),pa=ua(),xa=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},ga=(e=ha)=>ua((t=>-e(t))),fa=ga(),ba=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:ya([e,t],n),ya=([e,t],l=[])=>({[e]:l.length?fa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?pa(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),va=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Na=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,wa=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},ka=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=xt({moneyValue:ia(r,1e5),daysValue:ra(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=la(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Yn,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Na(o,e)&&va(n,["minSum","maxSum"],e)&&va(l,["minDays","maxDays"],e)))||Yn,{rate:m}=d,h=wa(m,e),u=n+h,p=s?.rateRows||[Yn];return{...d,...ya(["minSum","maxSum"],p),...ya(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:x,depositeName:g}=c;return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ta({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(wl,{items:[`От ${sa(f.min||0)}`,`До ${sa(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Ca(c,o),ma({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),ea({rate:h,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[Sa(m,d),$e(l,{isVertical:!0}),Gn(n),Gn(a)]})]});var f})),Ca=(e,t)=>p("div",{className:"space-y-s",children:[u(Te,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(jl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(jl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Sa=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(On,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(On,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Ia=({min:e=0,max:t=0,availableMonths:l,...n})=>u(wl,{items:[`От ${Ta(e)}`,`До ${Ta(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ta=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ba=e=>da({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Ma=e=>Pa({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Pa({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Pa({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Pa({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Pa=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ra=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},za=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=la(t||"credit-calculator-data"),s=i?.rateRows||[Hn],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ma({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=ba(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=ba(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Ma({row:e,userInputParams:t,paramsViewSettings:l})&&va(n,["minSum","maxSum"],e)&&va(a,["minMonths","maxMonths"],e)))||Hn)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Ra(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},Va=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=xt({moneyValue:ia(i,2e5),monthsValue:ra(i,Un),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=za(r,t,a),c=Ba({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ta({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Ia({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Aa({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),ea({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(On,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),$e(l,{isVertical:!0}),Gn(n)]})]})})),Aa=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(jl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(jl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(jl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(jl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Da=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=la(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?La(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>_a({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&_a({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&va(n,["minSum","maxSum"],t)&&va(a||r,["minMonths","maxMonths"],t)))||Kn,{rate:d}=c,m=ja(d,e),h=n+m,u=i?.rateRows||[Kn];return{...c,...ya(["minSum","maxSum"],u),...ya(["minMonths","maxMonths"],u),availableMonths:xa(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},ja=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},_a=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],La=(e,t)=>e+Math.round((t-e)/2),$a=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=xt({moneyValue:ia(r,2e4),monthsValue:ra(r,0),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=Da(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:x}=c,{onChange:g}=o("monthsValue");return a((()=>{g&&g(d)}),[d]),p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ta({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),Ia({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),Oa({...c,...i},o)]}),u("div",{className:"border-b border-main-divider md:hidden"}),ea({rate:m}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(On,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(On,{title:"Сумма в конце срока",value:x,postfix:"₽"}),$e(l,{isVertical:!0}),Gn(n)]})]})})),Oa=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?ma({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},da({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Ea=e=>Fa({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Fa({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Fa=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ua=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=la(t||"refinancing-calculator-data"),c=o?.rateRows||[Wn],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ea({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=ba(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=ba(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ea({row:e,userInputParams:t,paramsViewSettings:l})&&va(n+r,["minSum","maxSum"],e)&&va(i,["minSumOld","maxSumOld"],e)&&va(r,["minSumExtra","maxSumExtra"],e)&&va(a,["minMonths","maxMonths"],e)))||Wn)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Ra(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Ha=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=xt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Ua(i,t,a),o=Ba({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ta({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),ta({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Ia({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Wa({...s,...a},r),s.isExtraMoney?ta({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),ea({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0",children:[u(On,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(On,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block",children:o}),$e(l,{isVertical:!0}),Gn(n)]})]})})),Wa=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(jl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(jl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(jl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Xa={CreditCalculatorForm:Va,DepositCalculatorForm:$a,BusinessDepositCalculatorForm:ka,BonusCalculatorForm:aa,RefinancingCalculatorForm:Ha},Ka=(e,t)=>{const l=e?.calcType;if(!l||!(l in Xa))return null;const n=Xa[l];return u("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:p("div",{className:"box-border p-4xl w-full space-y-xl",children:[e?.title?u(B,{className:"text-center",title:e.title}):null,u(n,{...e})]})},String(t))},Ya=x((({className:e="",tabAlign:t,calculatorTabs:l=[],...a})=>{const r=l.map((e=>e.nav||{})),s=l.map((({calculatorBlock:e})=>e||{})),[o,c]=n(0),d=i((e=>c(e)),[]),[m,h]=Dn({itemCount:l?.length,visibleItemCount:3});return p(I,{className:C("box-border overflow-hidden relative",e),defaultPadding:"p-0",...a,children:[p("div",{className:"bg-white",children:[r.length>1?Ga({activeIndex:m,tabsNav:r,tabAlign:t,slideIndexShift:o,onClick:d}):null,$n({...h,btnClass:["left-3","right-3"],className:"top-10"})]}),u("div",{className:"flex",style:{transform:`translateX(-${o}00%)`},role:"list",children:s?.length?s.map(Ka):null})]})}));function Ga({activeIndex:e,tabsNav:t,tabAlign:l,slideIndexShift:n,onClick:a}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-32 pt-4xl box-border duration-1000",children:u("div",{className:C("w-full flex flex-nowrap items-end gap-xs",l?Vn[l]:""),children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"w-96 p-m border-none bg-primary-main text-white":"w-96 p-s ease-in duration-300 bg-white text-primary-text",i=l?"text-xl mb-xs":"text-l mb-2xs",r=l?"text-l font-light text-white":"text-m font-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:n,"aria-label":e?.title,className:C("box-border relative border border-gray cursor-pointer text-left border-b-0 flex space-x-m min-h-20",a),children:[u(he,{className:C("h-6 w-6 min-w-6 min-h-6",s),image:{...e?.icon,iconVersion:o??c},width:"24",height:"24"}),p("div",{className:"border-0",children:[u("div",{className:i,children:e?.title}),u("div",{className:r,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const qa=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=gl(e,{normalize:(e=a)=>l&&n?String(fl(Number(Ja(e)),l,n)):Ja(e),format:Xe(r)}),c=i((e=>t&&t(Ja(e))),[t]);return u(kt,{onChange:c,...s,...o})})),Ja=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Za=x((e=>u(qa,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Te,{size:"text-xl",font:"font-light",children:"₽"})})}))),Qa={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},ei={amount:1500},ti=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=xt(ei),[m,h]=n(!1);a((()=>{h(c<=0)}),[c]);const x=m?J({version:r?.version}):Z({className:"text-white",version:r?.version}),g=F(),{onClick:f}=g(r||{});return p(I,{className:C("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(B,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Qa[s],children:[u(Za,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u("button",{type:"submit",className:C("w-full p-m mt-lg",x),disabled:m,onClick:f,children:r.text}):null]})]})})),li=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),ni=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=N(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),ai=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ii=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(si(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?ri(r,b):{},...y?li(d):{},gap:`${a}px`};return u("div",{className:C("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(w=(e,t)=>u(ni,{className:C(c,n?ai[n-1]:"",y?"h-full":""),style:v?ri(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(w):w(e,0))(m)});var w})),ri=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),si=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),oi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ci={"horizontal-list":"w-6","vertical-list":"h-6"},di=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:C("flex gap-xs",oi[a],i?"group":"",e),"data-ver":i,children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?ci[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),mi=e=>t=>e.scrollWidth/t,hi=e=>(t,l)=>{e.scrollBy({left:l*mi(e)(t),behavior:"smooth"})},ui=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[ga()(a),ua()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?hi(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?hi(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},pi="absolute top-[calc(50%-24px)] z-40",xi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",gi=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[fi(e),h?u(_n,{className:C(pi,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(Ln,{className:C(pi,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),fi=e=>p("div",{children:[e.canScrollLeft?u("div",{className:C(xi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:C(xi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),bi=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),yi=[];function vi(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=bi,blocksRegistry:r={},ancestors:s=yi}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:C(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Ni=[],wi=(e,{key:t,ancestors:l=Ni,slotName:n=null,extraProps:a,renderProps:i=vi,...r})=>{const s=a?(e,t)=>vi(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Ni,[r.parent,n]]:l},a)))};function ki({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?wi(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Ci=({className:e,text:t="ХИТ"}={})=>p("div",{className:C("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(ne,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(M,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Si="relative h-full",Ii={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Ti=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Pi);return ki({...n,renderProps:(n,a,r)=>p("div",{className:Bi(n,{someCardsHighlighted:i}),children:[vi(n,a,{className:Mi(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Pi(n)?Ci({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Bi=(e,{someCardsHighlighted:t})=>C(Si,t&&(Pi(e)?"pt-3xl":"pt-3xl sm:pt-16")),Mi=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>C(Si,"min-w-80",Ii[n],t&&(Pi(e)?"pt-3xl sm:pt-16":"pt-3xl"),tt(l),l&&"h-full"),Pi=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ri=x((({className:e,itemCount:t,visibleItemCount:l=1,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=Dn({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=ui({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(I,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:C(a?"flex justify-center":"","relative max-w-full"),children:[u(ii,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Ti({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(gi,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(di,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Ri.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard","RichTextBlock","ProductBlock"],Ri.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const zi=x((({className:e,title:t,description:l,blockIndex:n=0,isActive:a,...i})=>u(I,{className:C("relative flex h-[485px]",a?"w-[440px] z-10":"w-[340px]",e),defaultPadding:"p-0",...i,children:u("div",{className:C("basis-full self-center",Vi(n)),children:a?u(R,{headlineVersion:"M",title:t,description:l,padding:"p-3xl",align:"text-left",className:"h-96 text-white shadow-dark-blue"}):u("div",{className:"h-[300px] flex justify-center items-center font-mohave text-title-large",children:u("span",{className:Ai(n),children:t})})})}))),Vi=e=>["bg-primary-main","bg-green-light","bg-yellow-light"][e%3],Ai=e=>["gradient-color-text-on-green","gradient-color-text-on-yellow","gradient-color-text-on-yellow"][e%3],Di="z-10 border border-solid w-full h-full",ji=C(Di,"absolute hidden @xl:block border-transparent"),_i=x((({className:e,title:t,description:l,button:n,...a})=>u(I,{className:C("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:C(ji,"top-9 right-12 bg-green-dark")}),u("div",{className:C(ji,"top-6 right-8 bg-green")}),u("div",{className:C(ji,"top-3 right-4 bg-green-light")}),p("div",{className:C(Di,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(R,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Li={black:"bg-black",white:"bg-white"},$i=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(I,{className:C("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(xe,{className:"h-full",padding:o,title:u(R,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(he,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:$e([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Te,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Oi)]}):null,a?p(Te,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Oi=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Li[e]}`},String(t)),Ei={1:"grid-cols-1",2:"grid-cols-2"},Fi=x((({className:e,padding:t,additionalDescription:l,cardsList:n=[],columnsMode:a=1,description:i,image:r,title:s,...o})=>u(I,{className:C("text-left",e),padding:"p-0",...o,children:p(xe,{className:"h-full",defaultPadding:"p-xl",padding:t,title:s?u(B,{headingType:"h4",as:"h3",className:"mb-m z-10",title:s}):null,rightImage:r?.src?u(he,{image:r}):null,children:[p("div",{className:"flex justify-between mb-m",children:[i?u("div",{className:"w-1/3",children:u(Te,{size:"text-h6",children:i})}):null,l?u(Te,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:l}):null]}),n.length?u("ul",{className:C("list-none m-0 p-0 grid gap-xs",Ei[a]),children:Ui(n)}):null]})}))),Ui=e=>e.map(((e,t)=>p("li",{children:[e?.parameter?u("div",{className:"inline pr-xs",children:u(Te,{size:"text-h6",children:e.parameter})}):null,e?.parameterDescription?u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(t)))),Hi="hidden xl:block absolute w-full h-full border border-white",Wi=x((({className:e="",...t})=>{const l=F(),{text:n,href:a,target:i,onClick:r}=l(t);return n?u("div",{className:C("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",e),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:C("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),u(he,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:C(Hi,"-bottom-1.5 -left-1.5")}),u("div",{className:C(Hi,"-bottom-3 -left-3")})]})}):null})),Xi=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(I,{className:C("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(R,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(R,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Ki(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Ki=(e,t="")=>{const l=Math.ceil(e.length/10);return u(Ri,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:C("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(Wi,{...e},String(t))))},String(l))))})},Yi=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=F({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:C("block",e),...t?i:{},children:a})})),Gi=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],qi=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Gi.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),c=Le(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=C("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:C("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:$e(c,{className:C(a||s?"basis-full":""),buttonClassName:d})}),r?u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Ji=x((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:g=true,isImageSecondary:f=!1}={},...b})=>u(I,{className:C("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(Yi,{href:a,target:c,className:"h-full",children:p(xe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(R,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...Qe(Le(i)?u(he,{image:i}):null,x),buttons:o.length?u(qi,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:g,isImageSecondary:f,imageAlign:"center",children:[u(_e,{benefits:h}),u(We,{items:r,isDotted:s,listItemSize:"S"}),Zi(n,m)]})})}))),Zi=(e,t)=>e?u(M,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Qi=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const er=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),tr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Te,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Te,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:$e(a)}):null]},String(t))},lr=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(tr),o=s.slice(0,1),c=s.slice(1);return p(I,{className:C("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[Le(n)?u("div",{className:"self-center",children:u(he,{image:n})}):null,t?u(B,{className:C("pt-xs",l),headingType:"h5",title:t}):null,a?u(Q,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(Qi,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(er,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?nr:null}):null]})})),nr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(ne,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ar="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",ir="border-gray border-solid border",rr="border-main-divider border-b",sr="w-52",or=x((({icon:e,image:t,title:l,link:n})=>p("div",{className:C("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",ir,ar),role:"columnheader",children:[e&&!t?.src&&u(he,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&u(he,{image:t}),l?u(B,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&u("div",{className:"mt-auto w-full",children:u(Q,{href:n.href,target:n.target,className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs font-light font-medium py-s",children:n.text})})})]}))),cr={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},dr=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:cr[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),mr=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex gap-xl",children:e})}))),hr=x((({colHeaders:e,activeIndex:t})=>p(mr,{children:[u("div",{className:sr,role:"columnheader"}),u(dr,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(or,{...e},String(t))))})]}))),ur=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=C("w-80 box-border flex flex-col",ir,l?"border-t-0 rounded-b-md":"border-y-0",n?ar:""),i=C("mx-2xl h-full",rr,n&&t?"border-t":"",l?"border-b-0":"border-solid");return u("div",{className:a,role:"cell",children:u("div",{className:i,children:e?e.map(((e,t)=>gr(e,t,n))):null})})})),pr=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),xr=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),gr=({label:e,description:t},l,n)=>p("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?u("h4",{className:pr(n),children:e}):null,t?u("div",{className:xr(n),children:t}):null]},String(l)),fr=(e=!1)=>C("text-s py-2xl",rr,sr,e?"border-b-0":"border-solid"),br=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:i})=>p(mr,{children:[e?.title?u("div",{className:fr(i),children:e.title}):null,t?.length?u(dr,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(ur,{cell:e,isFirstRow:a,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),yr=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return p("div",{className:"relative",children:[e.map(((e,n,{length:a})=>u(br,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?$n({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),vr=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const i=e?.map((({header:e})=>e||{})),r=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:r.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=Dn({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[i?.length?u(hr,{colHeaders:i,activeIndex:o}):null,s?.length?u(yr,{rowData:s,isColoredFirstColumn:a,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Nr=x((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:r=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!r),m=i((()=>d((e=>!e))),[]);return p(I,{className:C("overflow-hidden relative",e),defaultPadding:"p-6xl",...o,children:[u(B,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),u(vr,{columns:a,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:r}),r?wr({isShowAllRow:c,onClick:m}):null]})})),wr=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-6xl",children:p("div",{className:"flex gap-m w-full",children:[u("div",{className:sr}),u("button",{onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u(Te,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),kr=x((({className:e,contacts:t,info:l,version:n="secondary",...a})=>p(I,{className:C("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?Cr(l):null,t?.length?Cr(t):null]}))),Cr=e=>u("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Sr({column:e,index:t})))}),Sr=({column:e,index:t})=>e?u("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>p("div",{children:[u(R,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?u("div",{className:"mt-xs opacity-80",children:u(M,{size:"text-m",font:"font-light",children:l})}):null,n?.href?u(Q,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,Ir=e=>e%2!=0,Tr=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:C("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),Br=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(Tr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:C("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(he,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Mr=({isUnfolded:e,onToggle:t})=>u(Br,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Pr=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(he,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(R,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:vn})]}))),Rr=["ArrowDownIcon","ArrowUpIcon"],zr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Vr=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:C(t.length?"hidden":"block"),children:a?u(Pr,{...a}):null}),p("div",{className:C("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:C(zr),children:[wi(r,{...i.options,parent:n}),Ir(r.length)?u(ut,{className:"col-span-6"}):null]}),u(Qi,{renderFoldableSection:({isUnfolded:e})=>p(er,{className:C(zr),isUnfolded:e,children:[wi(s,{...i.options,parent:n}),Ir(s.length)?u(ut,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(Br,{className:C(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Rr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Ar=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Dr=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>Ar(t[e])||Ar(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>Ar(t[e])||Ar(l[e])||jr(t[e])<=jr(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>Ar(t[e])||Ar(l[e])||jr(t[e]?.min)>=jr(l[e]?.min)&&jr(t[e]?.min)<=jr(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>Ar(t[e])||Ar(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>Ar(t[e])||Ar(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),jr=e=>Number(e||0),_r=(e,t)=>(l=pt)=>e&&e.filter((e=>Dr(t,l(e.content||{})))),Lr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(el,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),$r=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Or(e))]}),n?u("div",{children:u(Q,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),Or=e=>([t,l])=>{const n=l?.type;return"array"===n?Er(t,e)(l):null},Er=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Lr,{items:n,multiple:!0,...t(e)})]},e)},Fr=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function Ur(...e){const t=e.map((e=>st(e)));return Promise.all(t)}function Hr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Wr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Xr(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Wr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=it(t,Ur);return{source:Object.fromEntries(Hr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const Kr=1e9,Yr={sum:{min:1e4,max:Kr},period:3},Gr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Xr(i.block?.blocks),[o,{field:c,reset:d}]=xt(Yr),m=_r(i.block?.blocks,o)((e=>({...e,period:Fr(r,e||{})||[]}))),h=p("div",{children:[u(Za,{label:n?.title,min:500,max:Kr,...c("sum",{parse:e=>({min:Number(e),max:Kr}),format:({min:e})=>String(e)})}),u(wl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(I,{className:C("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[$r({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(Vr,{blocksToRender:m,...i})]})})),qr={type:"string",title:"Адрес справочника"};Gr.childrenTypes=["ProductTile"],Gr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:qr});const Jr=[{key:"10"},{key:"50"},{key:"100"}],Zr=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return p("div",{className:"flex items-center gap-s",children:[u("span",{children:"Показать по"}),u(Yt,{className:"min-w-20",onChange:l,value:{key:String(e)},options:Jr,iconVersion:"black"})]})},Qr="py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white",es=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?u("div",{"aria-current":"true",className:"py-m px-lg bg-green-light text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-2||e<=t+2&&e>t||((e,t,l)=>t<=3&&e<=t+3||t>=l-1&&e>=l-4)(e,t,l))(i,l,a)?u("div",{onClick:()=>n(i),className:Qr,"aria-label":`Страница ${i}`,children:i},String(t)):null},ts={width:"24",height:"24"},ls=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>new Array(l).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l-1&&t(e+1)}),[e,l]),o=i((()=>t(1)),[]),c=i((()=>t(l)),[l]);return p("div",{className:"flex gap-m items-center",children:[u("div",{onClick:a,children:u(ne,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ns(1===e),...ts})}),p("div",{className:"flex gap-xs",children:[e>1?u("div",{onClick:o,className:Qr,"aria-label":"Страница 1",children:"1"}):null,e>4?u("div",{className:"py-m px-s",children:"..."}):null,n.map(es),e<l-3?u("div",{className:"py-m px-s",children:"..."}):null,e<l?u("div",{onClick:c,className:Qr,"aria-label":`Страница ${l}}`,children:l}):null]}),u("div",{onClick:s,children:u(ne,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ns(e===l),...ts})})]})},ns=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",as=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>p("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[u(ls,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?u(Zr,{itemCount:n,onItemCountChange:a}):null]}),is=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:C("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(he,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:C("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),rs=x((({field:e,onClearFilter:t,filtrationState:l})=>p("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[u(is,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),u(Jl,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),u(Jl,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),u("div",{className:"col-span-2 mt-auto",children:u("button",{className:"px-m py-s rounded-md bg-main-gray text-green hover:text-white hover:bg-primary-hover active:bg-primary-active cursor-pointer w-full",onClick:t,children:"Очистить фильтр"})})]}))),ss=({title:e,timestamp:t,publicId:l})=>{const n=F({basePath:"/"}),{href:a}=n({href:`/api/v1/depository/${l}/file`});return p("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:t?u(Te,{size:"text-m","font-weight":"font-light",children:Ll(t)}):null}),u("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:u("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},os="/api/v1/depository",cs={startDate:void 0,endDate:void 0,query:""},ds=x((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[o,{field:c,reset:d}]=xt(cs),{totalPages:m=0,items:h=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?Ll(n,!0):"",r=a?Ll(a,!0):"",s=new URLSearchParams(os);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=it(os+o,ot);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...o}),x=i((e=>a(e-1)),[]),g=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return p(I,{className:C(e,"container p-6xl"),...t,children:[u(rs,{filtrationState:o,field:c,onClearFilter:d}),p("div",{className:"flex flex-col",children:[p("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:u(Te,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),u("span",{className:"col-span-10",children:u(Te,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),h.length?h.map((e=>u(ss,{...e},String(e.publicId)))):u(Pr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),u(as,{currentPage:l+1,onPageChange:x,totalPages:m,itemCount:r,onItemCountChange:g})]})]})})),ms=e=>"Image"===e?.contentType&&e?.image?u(he,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,hs=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(I,{className:C("flex flex-col justify-center items-center",e),defaultPadding:C("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:ms(n)}),u(R,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(Q,{version:a?.version,text:a?.text,...a}):null]}))),us="location";function ps(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(v,"location",gs()??{name:e}),r=i((e=>{fs(e),l(e)}),[]),{data:s}=it("/api/v1/region",ot);return a((()=>{s&&!xs()&&l(s)}),[s]),[t??{name:e},r]}const xs=()=>Boolean(globalThis.localStorage?.getItem(us)),gs=()=>{try{const e=globalThis.localStorage?.getItem(us);return e&&JSON.parse(e)}catch(e){return null}},fs=e=>{try{globalThis.localStorage?.setItem(us,JSON.stringify(e))}catch(e){}};var bs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(bs||(bs={}));const ys=new Intl.NumberFormat("ru",{style:"currency",currency:bs.RUB}),vs=e=>e?ys.format(e):"",Ns="text-left text-m font-light text-secondary-text",ws=`${Ns} pl-5xl`,ks={USD:"DollarIcon",EUR:"EuroIcon"},Cs=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ns,children:u(Te,{size:"text-m",children:"Валюта"})}),u("th",{className:ws,children:u(Te,{size:"text-m",children:"Купить"})}),u("th",{className:ws,children:u(Te,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Ss)})]}))),Ss=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(he,{image:{icon:ks[t]},width:"24",height:"24"}):null,u(Te,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:vs(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:vs(e?.buyExchangeRate)})})]},t)},Is={icon:"GpsIcon"},Ts=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(wn,{...Is,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Bs=(e,t,l)=>{const n=Number(Ms(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)},Ms=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ps=e=>{return(t=[[e=>e.value!==bs.RUB&&e.oppositeValue!==bs.RUB,()=>e.handleConvert(e.value,bs.RUB)],[e=>e.value===bs.RUB&&e.oppositeValue===bs.RUB,()=>e.handleConvert(e.value,bs.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Rs(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(kt,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Yt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const zs=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||bs.RUB,selectBuy:l?.[0]?.currency?.currency||bs.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Rs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Vs(r,o,l),value:r.inputSell,setValue:e=>Ds(o,l)(e,r.selectSell,r.selectBuy)}),Rs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:As(r,o,t),value:r.inputBuy,setValue:e=>js(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(Q,{text:a.text,version:a?.version,...a}):null]})})),Vs=(e,t,l)=>n=>{t({selectSell:n}),Ps({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Ds(t,l)(e.inputSell,n,a)}})},As=(e,t,l)=>n=>{t({selectBuy:n}),Ps({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>js(t,l)(e.inputBuy,n,a)})},Ds=(e,t)=>(l,n,a)=>{e({inputSell:Ms(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Bs(l,i,n===bs.RUB)||"")})},js=(e,t)=>(l,n,a)=>{e({inputBuy:Ms(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Bs(l,i,n===bs.RUB)||"")})};const _s=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=ps(),i=function(e){const t=e?.code||"000",{data:l}=it(`/api/v1/exchangerates?regionCode=${t}`,ot);return l||{}}(a),r=Ls(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:bs.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:bs.RUB}}),u(I,{className:C("box-border min-h-80",e),...n,children:u(xe,{className:"h-full",title:u(B,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Cs,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(Ts,{address:i?.address})]}),r.length&&s.length&&o.length?u(zs,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Ls=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],$s=e=>mt(d.SITEMAP||"sitemap",{fallback:e}),Os={width:"40",height:"45"},Es={"bg-white":"color",transparent:"white"},Fs={"bg-white":"text-primary-main",transparent:"text-white"},Us=(e,t,l)=>u(he,t?.src?{image:t,className:Fs[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Es[e]},className:Fs[e],width:l?.width,height:l?.height}),Hs={"bg-white":"text-primary-text",transparent:"text-white"},Ws=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:C("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Us(i,l?.image,Os),r?n??u("div",{className:"ml-s",children:u(Te,{font:"font-medium",color:Hs[i],size:"",children:l?.title||"Россельхозбанк"})}):null]}))),Xs=x((({className:e,onClose:t})=>u("button",{className:C("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(he,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function Ks(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Ys=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Gs=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},qs=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Js=e=>t=>e.map((([e,l])=>[Ys(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Qs(t,e))).reduce(Gs(Math.max,0),new Map),Zs=e=>t=>{return Hr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=qs(t||"");return l.length?we(e.map((e=>pa(l.map(Ys(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},Qs=(e,t)=>new Map(e.map((e=>[e,t]))),eo=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=it(e?.length?e:null,to),[s,o]=n(null);return Ks((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=qs(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Js(i)).reduce(Gs(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Zs(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},to=async(...e)=>(await Promise.allSettled(e.map((e=>st(j(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),lo=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=z(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:C("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(Xs,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),no=x((({className:e,topItems:t})=>{const l=F({isRemote:!0});return u("div",{className:C("flex items-start justify-between",e),children:t?.map(l).map(io)})})),ao=["all","footer"],io=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||ao.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(ro,{...e,basePath:o(a),index:t},String(t))))]},String(t))},ro=x((({text:e,index:t,basePath:l,...n})=>{const a=F({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:C("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),so=x((({initialQuery:e})=>{const{topItems:t}=$s(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=eo({basePathList:l,initialQuery:e}),s=r((()=>oo(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(lo,{head:u(is,{autoFocus:!0,...i}),children:u(no,{topItems:s})})})),oo=e=>t=>e?.length&&t?.length?Hr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:j("/",t)})))}))):[];const co=()=>{const{open:e,close:t}=z();return{open:(t={},l={})=>e(u(so,{...t}),l),close:t}},mo=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=co(),s=i((e=>{l(e),ho(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:C("relative",e),children:[u(is,{value:t,onChange:s}),u(Xs,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),ho=e=>e&&e.length>=3,uo=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},po=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(xo):null,u(Q,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),xo=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(Te,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(go)})]},String(t)),go=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:fo(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),fo=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${bo(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},bo=e=>e.replaceAll(/\D/g,""),yo=x((({className:e="",index:t,text:l,...n})=>{const a=F(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:C("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),vo=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(yo,{index:t,className:"text-l font-light max-w-[292px]",...e},String(t))))}):null}))),No=x((({className:e="",index:t,...l})=>{const n=F({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),wo=x((({className:e="",links:t})=>p("div",{className:C("@container",e),children:[u("div",{className:"pt-lg",children:u(Te,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(No,{index:t,...e},String(t))))}):null]}))),ko="w-52",Co=x((({className:e,...t})=>{const{topItems:l,logo:n}=$s(t.options?.page?.fallback),{documents:a,relatedEnterprises:i,contacts:r,socialMedia:s,mobileApps:o}=mt(d.FOOTER||"footer",{fallback:t.options?.page?.fallback});return p(I,{tag:"footer",className:e,...t,children:[p("div",{className:"flex items-stretch gap-3xl pb-3xl ",children:[u(Ws,{className:ko,logo:n}),u(mo,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-6xl",children:[p("div",{className:C(ko,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[u(po,{items:r}),u(qi,{media:s,children:"Соцсети"}),u(qi,{media:o,showButtonText:!1,children:"Мобильное приложение"}),u(Q,{version:"link",href:"https://old.rshb.ru",className:"!text-left text-s font-light",onClick:uo,children:"Вернуться на прежнюю версию сайта"})]}),u(no,{className:"flex-grow",topItems:l})]}),u(vo,{className:"mt-xl",links:i}),u(wo,{links:a})]})})),So=x((({className:e="",title:t,description:l,calendar:n,...a})=>p(I,{className:C("space-y-m",e),defaultPadding:"p-6xl",...a,children:[u(R,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?Io(n):null]}))),Io=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return p("div",{className:"w-full flex flex-col justify-center gap-s",children:[u("div",{className:"flex w-full text-h6 text-center",children:l.map((e=>To(e,t)))}),u("div",{className:"flex gap-s w-full",children:l.map(((e,t)=>p("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex gap-s",children:Bo(e)}),p("div",{className:"text-s",children:[u(Te,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",u(Te,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},To=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Bo=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:u(he,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Mo=e=>({href:t})=>!!t&&D(V(t)?e.href:e.pathname).startsWith(D(t));function Po(e=[]){const t=E(),l=e.findIndex((e=>Mo(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const Ro=x((({className:e="",active:t,flat:l,children:n,...a})=>{const i=F({isRemote:!0}),{href:r,target:s,text:o,onClick:c}=i(a);return u("a",{className:C(zo(t,l),e),href:r,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:Vo(t,l),children:o||n})})})),zo=(e=!1,t=!1)=>C("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),Vo=(e=!1,t=!1)=>C("font-sans text-s font-light",e?"text-primary-main":C(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover");const Ao=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(Do,{...e},String(t))))})]}):null,Do=x((({icon:e,...t})=>{const l=F(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(he,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),jo=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Te,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),_o=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Lo=x((()=>{const{defaultLocation:e,foreignOffices:t}=$s(),[l,a]=ps(e),[r,s]=n(""),o=Oo(function(){const{data:e}=it("/api/v1/regions",ot);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,$o),{close:d}=z(),m=i((e=>{a(e),d()}),[]);return p(lo,{className:"pb-20",head:p("div",{children:[u(Te,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Te,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Te,{color:"text-primary-main",children:l.name})})]}):null,u(_o,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&Ys(e.toLowerCase())(r.toLowerCase())>=.8)).map(jo(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Te,{size:"text-h6",children:e})}),t.map(jo(h))]},e)))}),Ao(t)]});var h})),$o=e=>e.name?.charAt(0)||"",Oo=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Eo={default:"w-6 h-6",large:"w-12 h-12"},Fo=x((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:i,image:r,onClick:s})=>u("button",{className:C("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Eo[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:s,children:u(he,{image:r,className:C("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Uo=x((({className:e,version:t,officesLink:l,defaultLocation:n})=>{const a="transparent"===t?"white":"black",[r]=ps(n),s=co(),o=i((()=>s.open()),[]),c=(()=>{const{open:e,close:t}=z();return{open:(t={})=>e(u(Lo,{}),t),close:t}})(),d=i((()=>c.open()),[]);return p("div",{className:C("flex items-center gap-lg",e),children:[u(Ro,{flat:!0,href:"#",text:r?.name,onClick:d}),l?u(Ro,{flat:!0,href:l,text:"Офисы и банкоматы"}):null,u(Fo,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:"Поиск",onClick:o})]})})),Ho=x((({className:e="",items:t,activeItem:l})=>{const a=F(),[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),c=Ht(i((()=>s(!1)),[]));return p("div",{className:C(r?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(r?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:C("absolute flex flex-col rounded-md bg-white p-xl pb-xs",r?"":"hidden"),"aria-hidden":!r,children:t?.map(((e,t)=>{const{text:n,...i}=e,{href:r,target:s,onClick:o}=a(i);return u("a",{className:C("text-l font-light pb-m hover:text-primary-main",e===l?"text-primary-main":""),href:r,target:s,onClick:o,children:n},r||String(t))}))})]})})),Wo=e=>globalThis[e];function Xo(e,t){const[l,r]=n(),s=i((()=>r(Wo(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Wo(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Ko={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Yo=x((e=>{const[t,{setTrue:l}]=Et();return t?u(Go,{...e}):qo({...e,onClick:l})})),Go=x((({chat:e="personal",...t})=>((e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Xo("chatbot",Ko[e])})(e),qo(t)))),qo=({className:e,iconVersion:t,onClick:l})=>u(Fo,{className:C("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),Jo=x((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const i=F(),{href:r,target:s,text:o,onClick:c}=i(a);return p("a",{className:C("relative inline-block bg-transparent text-center no-underline",e),href:r,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:Zo(t),children:o||n}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Zo=(e=!1)=>C("font-sans text-l font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Qo=x((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const r=N(i((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:r,className:n,children:u(Jo,{...a,children:l})})})),ec={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},tc=x((({version:e,internetBankUrl:t})=>t?u(Q,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:C("py-s ml-s text-l font-light whitespace-nowrap hover:text-primary-main",ec["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),lc=["all","header"],nc=x((({subItems:e=[],version:t,internetBankUrl:l})=>{const a="transparent"===t?"white":"black",i=E(),o=r((()=>e.filter((e=>!e.displayArea||lc.includes(e.displayArea.toLowerCase())))),[e]),c=(e=>(t=[])=>{const l=t?.filter(Mo(e));return l?.length?ua((e=>e.href?.length||0))(l):void 0})(i)(e),[m,h]=n(o.length),x=o.slice(m),g=s(null),f={rootRef:g},b=r((()=>o.map(((e,t)=>e=>{h(e?ac(t):ic(t))}))),[o]);return p("nav",{className:"relative mt-s flex items-center justify-between",children:[u("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl",children:o.map(((e,t)=>u(Qo,{className:m-1<t?"invisible":"",active:e===c,observerOptions:f,onVisibilityChange:b[t],...e},String(t))))}),x.length?u(Ho,{className:"relative w-auto z-40",items:x,activeItem:c}):null,p("div",{className:"flex",children:[d.CHAT_BOT?u(Yo,{className:"ml-4xl",iconVersion:a,chat:d.CHAT_BOT}):null,u(tc,{version:t,internetBankUrl:l})]})]})})),ac=e=>t=>Math.max(t,e+1),ic=e=>t=>Math.min(t,e),rc={"bg-white":"primary",transparent:"transparent"},sc=x((({className:e,bgColor:t="bg-white",version:l=rc[t],...n})=>{const{topItems:a,logo:i,officesLink:r,defaultLocation:s}=$s(n.options?.page?.fallback),[,o]=Po(a),{internetBankUrl:c}=mt(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(I,{tag:"header",className:C("pt-3xl px-20",o?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...n,children:p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(Ws,{className:"mr-3xl",bgColor:t,logo:i}),a?.map(((e,t)=>u(Ro,{active:e===o,...e},String(t)))),u(Uo,{version:l,className:"ml-auto",officesLink:r,defaultLocation:s})]}),u("div",{className:C("mt-xl h-px bg-main-divider","transparent"===l?"opacity-30":"")}),o?.items?.length?u(nc,{subItems:o.items,version:l,internetBankUrl:c}):null]})})})),oc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},cc=x((({className:e="",gap:t="XS",isPadding:l=!1,version:n="transparent",isTheme:a=!1,isCardBorder:i,...r})=>u(I,{className:C("relative","grid grid-cols-12",oc[t],e),defaultPadding:l?"p-6xl":"",version:n,isTheme:a,...r,children:ki({...r,extraProps:{className:tt(i)}})})));cc.childrenTypes={exclude:["HorizontalLayout"]};const dc=x((e=>{const{className:t,image:l,...n}=e;return u(I,{className:t,defaultPadding:"p-0",...n,children:u(he,{image:l})})})),mc=x((({className:e="",cards:t=[],button:l})=>{const[a,r]=n(0),s=i((e=>r(e)),[]),o=t.length,[c,d]=Dn({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:h}=d,x=t[c]?.href;return p("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[p("div",{className:"relative overflow-hidden",children:[o?hc({activeIndex:c,cards:t,selectedCardIndex:a,onClick:s}):null,$n({...d,btnClass:["left-12","right-12"],className:"top-16"}),m?u("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),u(Q,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function hc({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:u("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return p("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(he,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-s",children:[e?.sum?uc("страховая сумма",e.sum):null,e?.fee?uc("страховой взнос",e.fee):null]}),pc(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function uc(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p(Te,{size:"text-h6",children:[Xe(2)(t)," ₽"]}),u("div",{className:"mt-2xs",children:u(Te,{size:"text-l",color:"text-secondary-text",children:e})})]})}function pc(e){return e?u(he,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const xc=x((({className:e="",title:t,insuranceTabs:l=[],button:a,...r})=>{const[s,o]=n(0),c=i((e=>o(e)),[]);return p(I,{className:C("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?u(B,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return u("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:gc({insuranceTabs:l,button:a})})]})})),gc=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(mc,{button:t,cards:e},String(l)))):null};const fc=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),bc={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},yc={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},vc=x((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),u(I,{className:t,defaultPadding:"p-4xl",...r,children:p("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[fc(u("div",{className:"w-px h-4 bg-gray"}))(s.map(Nc)),u("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-xs mx-3xl"}),u("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Cc)})]}):null,l?.length?u(We,{className:"max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),Nc=(e,t,l)=>{const n=1===t,a=t===l.length-1;return u("div",{className:`${wc(n,a,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-2xs min-w-72":""),children:e.cells.reverse().map(kc)}):null},`column_${t}`)},wc=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),kc=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-xs ${yc[l]} ${bc[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:u("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Cc=(e,t)=>u("div",{className:"flex-1 max-w-[180px] text-center px-xs last:pr-3xl",children:e.title},`title_${t}`),Sc=["байт","Кб","Мб","Гб","Тб","Пб"],Ic=x((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=a||i?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Te,{size:"text-l",font:"font-light",children:[t,u(Te,{color:"text-secondary-text",children:l&&`${s} ${r} ${o}`})]}):null]})})),Tc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Bc=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=E();return p(I,{className:C("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(R,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:C("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Tc[r]),role:"list",children:a.map(Mc(o,i))}):null]})})),Mc=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?L(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Sc[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"!==l?.docType?l?.fileFormat:"";return u("div",{role:"listitem",children:u(Ic,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(he,{className:"min-w-6 min-h-6",image:t,width:"24",height:"24"}):null})},String(n))},Pc=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",x=i?.src?u(he,{className:"hidden lg:block",image:i}):null;return u(I,{className:C("min-h-80",e),padding:"p-0",version:d,...m,children:p(xe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(B,{headingType:"h3",title:c,className:C("whitespace-pre-wrap",l)}),rightImage:x,buttons:$e(n,{className:"flex-wrap"}),children:[a?u(Te,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:C("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(We,{items:r,listItemSize:"M"}),u(Te,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:C("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(he,{className:"w-fit",image:s})}):null,i?.src?u(he,{className:"lg:hidden",image:i}):null]})]})})})),Rc={primary:"bg-white/30",secondary:"bg-main-divider"},zc={primary:"text-white",secondary:"text-secondary-text"},Vc=x((({count:e,version:t="secondary"})=>u("div",{className:C("w-6 h-6 rounded-full flex items-center justify-center",Rc[t]),children:u(Te,{size:"text-xs",color:zc[t],children:e})}))),Ac=(e=[],t={})=>e.filter((({content:e={}})=>Dr(t,e))).length,Dc=(e,t)=>e===t;const jc=(_c=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Dc,((e=Dc)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>_c(l,t[e])))));var _c;const Lc=[],$c={},Oc={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Ec={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Fc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Uc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Hc=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:C("h-12","block flex-1","cursor-pointer",Oc[n],l?Uc[n]:Fc[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:C("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Ec[n]:"text-secondary-text hover:text-primary-main"),children:[u(Te,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Wc=x((e=>u(e?.item?.href?Xc:Kc,{...e}))),Xc=x((e=>{const t=F(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Hc,{...e,tag:"a",item:a,onClick:n})})),Kc=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Hc,{item:e,onClick:n,...l})})),Yc=(e,t,l)=>(n,a)=>u(Wc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Gc=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:C("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Yc(n,a,t))}))),qc={categories:[],extraOptions:[],propertyType:[],stage:[]},Jc=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=xt(qc),m=_r(a.block?.blocks,s)(),h=i(((e=qc)=>d(e)),[]),x=(({hotFilters:e=Lc,filtrationState:t=$c,blocks:l=Lc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>jc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Vc,{version:t===e[a]?"primary":"secondary",count:Ac(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(I,{className:C("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(Gc,{...x}),$r({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(Vr,{blocksToRender:m,...a})]})}));function Zc(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}Jc.childrenTypes=["ProductTile"],Jc.childSchema=e=>e?.filtrationSchema||{};const Qc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},ed=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(Qc).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),td={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},ld=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(td).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(ne,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),nd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},ad=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(nd).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(ne,{name:l,width:"20",height:"16"})})})),id={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},rd=[55.753995,37.614069],sd=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=Xo("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[o,c]=n(),m=e?od(e):rd;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:m,zoom:l,controls:[],suppressMapOpenBlock:!0}),Zc(r,i.current,e))})),i.current&&r&&(Zc(r,i.current,e),e?.length||i.current.setCenter(rd))}),[r,i,e,m,l]),!r)return null;const h=o?"z-[100000]":"z-10";return p("div",{id:"map",className:C(!o&&"relative","w-full",t),children:[u("div",{className:C("absolute flex left-2 top-4 w-1/2",h),children:ed(m)}),u("div",{className:C(Object.values(id),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(ne,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:C("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[u(ad,{yandexMaps:i}),u(ad,{yandexMaps:i,direction:"out"})]}),ld(i.current,r,C("right-2 top-80",h))]})})),od=e=>[dd(cd(e,0)),dd(cd(e,1))],cd=(e,t)=>e.map((e=>e[t])),dd=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,md={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},hd=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(jl,{text:md[e],...t(e)},e)))}):null,u(Q,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(ne,{name:"CloseIcon",width:"16",height:"16"})})]}),ud=()=>null,pd=()=>[],xd=x((({className:e,data:t=[],renderCard:l=ud,filterItems:n=pd,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=xt(a),d=n(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:C("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(B,{headingType:"h2",children:r}),h?u(Te,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?gd(i):null,hd(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(sd,{points:m,className:"h-full"})})})]}),d.map(l)]})})),gd=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border border-gray rounded-md",children:[e?u(M,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex gap-2xl flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(he,{image:e.image}):null,e?.text?u(Te,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,fd={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},bd=x((({className:e,children:t,color:l="gray"})=>u("div",{className:C("p-s border border-gray rounded-md flex items-center",fd[l].border,e),children:u(Te,{size:"text-m",color:fd[l].text,children:t})}))),yd=x((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:vd({textItems:a,subText:t,children:l,...n})})),vd=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:C("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Te,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Te,{size:"text-l",children:e.trim()},String(t)))),a?u(Te,{color:n,size:"text-m",children:a}):null]}),Nd=x((({className:e,children:t})=>u("div",{className:C("flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),wd=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Cd(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Te,{size:"text-h4",children:Cd(e)}),u(bd,{color:"green",children:Cd(s)})]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ne,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null,u(Nd,{className:"flex-wrap",children:c?.map(kd)})]},String(o))},kd=(e,t)=>u(yd,{...e},String(t)),Cd=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Sd=[];const Id=async e=>await st(e,{method:"GET"})||Sd,Td={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Bd={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Md=x((({data:e,className:t})=>{const[l]=ps(),n=function(e){const{data:t=Sd}=it(`/api/v1/atms?regionCode=${e}`,Id);return t}(l?.code??"000");return u(xd,{className:t,filterItems:Pd,data:n,initFilterState:Td,renderCard:wd,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Pd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Bd[t](e))),l=!n.length||n.some((t=>Bd[t](e)));return t&&l}))},Rd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[zd({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),zd({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(yd,{label:"Режим работы",value:a,className:"max-w-none"})},zd=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Vd=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ad=e=>Vd.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Dd=e=>{if(!e)return null;const t=jd(e);return p(Nd,{className:"border-none",children:[u(yd,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(_d)})}),u(yd,{label:"Режим работы",className:"max-w-none",children:u(Te,{children:e})})]})},jd=e=>{const t=Vd.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},_d=({short:e,status:t},l)=>u("div",{className:C("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:u(Te,{size:"text-xs",children:e})},String(l)),Ld=(new Date).getDay(),$d=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=Ad(o),h=o?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Te,{size:"text-h4",children:e}),Ed(m)]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ne,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null,p(Nd,{className:"flex-wrap",children:[u(yd,{label:"Факс",value:n}),u(yd,{label:"Телефон филиала",value:l}),u(yd,{label:"Для обращений юридических лиц",value:a}),u(yd,{label:"Обслуживание физических лиц",value:i}),u(yd,{label:"Для консультаций по валютному контролю",value:s}),u(yd,{label:"Контакт-центр",value:r})]}),o.isMatchesPattern?u(Nd,{children:u(yd,{label:h,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:m?.map(Fd)})})}):p(Nd,{children:[u(yd,{label:h,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:m?.map(_d)})}),Rd(m)]}),o?.businessScheduleVisibleTag?Dd(o?.businessScheduleDescription):null,c?.currencies?.length?u(Nd,{className:"flex-wrap",children:c?.currencies?.map(Od)}):null]},String(d))},Od=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(yd,{label:"Валюта",value:e.currency}):null,t?u(yd,{label:"Купить",value:String(t)}):null,l?u(yd,{label:"Продать",value:String(l)}):null]},String(n)),Ed=e=>{const[t]=e?.slice(Ld-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(bd,{color:"green",children:a}):null,l&&i?u(bd,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(bd,{color:"red",children:"Выходной"})},Fd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(yd,{label:e,value:t&&l?l:"",subText:Ud(n,a,t),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Ud=(e,t=!1,l=!1)=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Hd=[];const Wd=async e=>await st(e,{method:"GET"})||Hd,Xd={workingSaturday:!1},Kd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},Yd=x((({className:e})=>{const[t]=ps(),l=function(e){const{data:t=Hd}=it(`/api/v1/branches?regionCode=${e}`,Wd);return t}(t?.code??"000");return u(xd,{className:e,filterItems:Gd,data:l,initFilterState:Xd,renderCard:$d,title:`Офисы филиала ${t?.name}`})})),Gd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Kd[t](e)))))},qd=x((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(I,{version:"transparent",className:C(t),defaultPadding:"p-0",...l,children:"offices"===n?u(Yd,{}):u(Md,{data:e})})})),Jd=x((({text:e,size:t,align:l,font:n,children:a,...i})=>u(I,{defaultPadding:"p-0",...i,children:u(M,{size:t,align:l,font:n,children:e||a})}))),Zd=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(I,{className:C("box-border",e),...n,children:[u(R,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Qd()})]}))),Qd=(e=3)=>tm(100,e).map((e=>Math.floor(e))).map(em),em=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),tm=(e,t)=>[e].concat(t>0?tm(e/1.618,t-1):[]),lm=x((({className:e="",padding:t,slides:l=[],...a})=>{const[i,r]=n(0);return p(I,{className:C("box-border overflow-hidden",e),defaultPadding:"py-6xl",padding:t,...a,children:[u("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:l.map((({productBlock:e},t)=>u("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:u(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),u("div",{className:"h-28 px-xs mt-m -mb-m flex gap-xs box-border",children:l.map(nm({activeSlideIndex:i,onClick:r}))})]})})),nm=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:py-xl backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return p("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:C("relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",i),children:[u("div",{className:r,children:l?.title}),u("div",{className:s,children:l?.description})]},String(n))},am=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(I,{className:C("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Le(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(he,{image:r})}):null,s?u(B,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?im(i):null,rm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),rm({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),rm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?$e([n]):null]})]}))),im=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Se,{__html:e})}),rm=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(ne,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Te,{size:"text-xl",color:n,children:t})]})]}):null,sm=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(I,{defaultPadding:"p-0",...n,children:u(Se,{__html:t,richVersion:l})})})),om=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(Tr,{tag:"button",className:C("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?u(Te,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(ne,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),cm=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(I,{className:C("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(Qi,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(er,{className:C("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:ki({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>dm({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));cm.childrenTypes={exclude:["RollupItem"]};const dm=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?u(om,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(Br,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},mm=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:C("order-4",e),children:[u(an,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(an,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),hm=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Yt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),um=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(hm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(hm,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),pm=["От 1 дня","До 365 дней"],xm=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Te,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(wl,{min:1,max:365,value:e,items:pm,onChange:t})]}))),gm=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(hm,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(hm,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),fm=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(um,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:bm(c)}),u(xm,{days:a,setDays:e=>c({days:e})}),u(gm,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:ym(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(mm,{}),u(Q,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),bm=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},ym=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},vm=x((({days:e,tariffs:t=[]})=>{const l=wm(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Nm("Аренда за",e),Nm("Цена",l+" ₽")]}),u("span",{className:"@xl:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(he,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("span",{className:"hidden @xl:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),Nm=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),wm=(e,t)=>{const l=km(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},km=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},Cm=(e,t)=>e.find((e=>e.branchCode===t)),Sm=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Cm(n,l.selectedBranch),o=Im(s?.safeBoxCaseVolumes),c=Tm(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Bm(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(fm,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(vm,{days:l.days,tariffs:d})]})})),Im=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Tm=(e,t)=>e?.find((e=>e.volume===t)),Bm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Mm=[];const Pm=async e=>await st(e,{method:"GET"})||Mm,Rm=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=vt(),h=zm(c.selectedRegion,m),x=function(e){const{data:t}=it(e?`/api/v1/safeboxes?regionCode=${e}`:null,Pm);return t||Mm}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Cm(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(I,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(B,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Sm,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(M,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(sd,{points:f,className:"h-[640px]"}):null]})})),zm=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Vm=({styleMap:e,isMainButton:t,version:l})=>(n,a,i)=>{const{label:r,description:s,button:o,items:c,isDotted:d}=n;return p("div",{className:C("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Am(i.length)),children:[p("div",{className:"text-center space-y-xs",children:[r?u("div",{children:u(Te,{size:"text-h6",children:r})}):null,p("div",{className:"flex flex-col items-center gap-3xs",children:[s?u("div",{className:e.description,children:s}):null,u(We,{className:e.description,items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(Q,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...o,children:o?.text}):null]},String(a))},Am=e=>e<5?"w-72":"w-52",Dm={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},jm=x((({align:e=vn,buttons:t,className:l="",description:n,showLines:a=!0,size:i="normal",steps:r=[],stepVersion:s="gray",title:o,version:c="primary",...d})=>{const m=r.length>3,h=Dm,x=(e=>e?"":"opacity-0")(a),g=(e=>e<5?"px-24":"px-16")(r.length),f=Boolean(t?.every((e=>e?.text)));return p(I,{className:C("box-border flex flex-col items-center overflow-hidden gap-y-3xl",l),defaultPadding:"p-6xl",version:c,...d,children:[u(R,{headlineVersion:"S",title:o,description:n,isEmbedded:!0,className:"w-full",align:e}),r?.length?p("div",{className:"box-border space-y-lg",children:[u("div",{className:C("flex items-center",g),children:fc(u("div",{className:C("h-0.5 w-full bg-secondary-light flex-1",x)}))(r.map(_m(h,i,s)))}),u("div",{className:C("flex justify-between",m?"gap-x-s":"gap-x-20"),children:r.map((b={styleMap:h,isMainButton:f,version:c},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return Vm(b)(e,t,l);case"rte":return u("div",{className:C("text-center",Am(l.length)),children:u(Se,{__html:e.__html})},String(t));default:return null}}))})]}):null,$e(t)]});var b})),_m=(e,t,l)=>({icon:n},a)=>{const i="secondary"===l?"white":"color";return u(I,{defaultPadding:"",className:`${Lm(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Le(n)?u(he,{image:{...n,iconVersion:n?.iconVersion||i},width:"48",height:"48"}):u("span",{className:C("text-h4","transparent"===l?e.iconText:$m(l)),children:a+1})},String(a))},Lm=e=>"normal"===e?"h-24 w-24":"h-16 w-16",$m=e=>"secondary"===e?"group-data-primary:text-white":"text-secondary-text",Om=x((()=>u("div",{}))),Em=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=false,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=ui({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:C(e,"vertical-list"===o?"relative h-full":""),children:[u(ii,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(di,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Fm=x((({listType:e,showDots:t,options:l,version:n,...a})=>u(I,{version:n,defaultPadding:"p-0",...a,children:u(Em,{listType:e,showDots:t,version:n,children:ki({...a,options:l})})})));Fm.childrenTypes={exclude:["SwipeListControlBlock"]};const Um="hidden sm:flex absolute z-40 top-0",Hm=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=ui({itemCount:t?.length||0});return p("div",{className:C("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(ii,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Yc(l,n,a))}),r.canScrollLeft?u(_n,{className:C("left-6",Um),onClick:r.scrollLeft}):null,r.canScrollRight?u(Ln,{className:C("right-6",Um),onClick:r.scrollRight}):null]})})),Wm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Gc,{...t});case"centered":return u("div",{className:"flex",children:u(Gc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Hm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Xm="tab",Km=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=E(),{isReady:d}=c,m=r((()=>l.map(Gm)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Ym(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&v.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Ym(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Xm,e.name):t.delete(Xm),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(I,{className:C(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Wm({items:m,value:m[h],tabsMode:s,onChange:x})})})),Ym=e=>{"group"===e.type&&v.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&v.fire("tab",{type:e.type,label:e.href})},Gm=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,qm=x((({className:e="",isOpen:t,onClick:l})=>u(Q,{className:e,appendRight:u(he,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Jm={Buttons:({buttons:e})=>$e(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(he,{image:e}):null,List:({isDotted:e,...t})=>u(We,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(Te,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(qm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Zm=x((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Qm({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Qm=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Jm))return null;return u(Jm[l],{...t,...n})},eh=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(Zm,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),th=(e,t)=>140*we(e.slice(0,t).map((e=>e?.cols?.length??1))),lh=(e,t)=>e?.length>0?u("div",{className:C("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,nh=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=Dn({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,i=C("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:l.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${th(n,a)}px)`},children:n?.map(((e,t)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?lh(e.cols,a):null]},`row${t}`)))})})]},String(t))})),$n({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),ah=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(Te,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(nh,{rows:t.rowsData})})})]},n)}))}))),ih=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(Q,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:u(ne,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function rh(e){const t=await fetch(e);return await t.json()}const sh=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=it(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),rh);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(ih,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(ah,{activeTabIndex:r,items:c}),u(qm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(qm,{onClick:l,isOpen:!0})]})})),oh=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:C("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(sh,{...t,onClick:l})}):null]}))),ch=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(oh,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:C("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(he,{className:"hidden @4xl:block max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m font-light",children:e?.title}):null]})}),t?.length?u(dr,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(eh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})})),dh=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,$n({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),mh=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Dn({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(ch,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(I,{className:C("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(R,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(Qi,{renderFoldableSection:({isUnfolded:e})=>p(dh,{controls:m,children:[x,u(er,{isUnfolded:e,children:g})]}),renderFoldButton:Mr}):u(dh,{controls:m,children:h})})]})})),hh=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(I,{className:C("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?uh():null,"big"===n?ph(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Te,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?xh(l):null,r?.length?gh(r,!0):null,i?u(Se,{__html:i}):null]})]}))),uh=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),ph=e=>e?.src?u(he,{className:"h-fit flex-shrink-0",image:e}):null,xh=e=>u(M,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),gh=(e,t)=>u("ul",{className:C("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(Te,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),fh=x((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isInnerBorder:r=!1,...s})=>u(I,{className:C("relative flex flex-col",oc[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...s,children:ki({...s,extraProps:{className:C("w-full",tt(r)),padding:n?"":"p-0"}})})));fh.childrenTypes=[];const bh=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",yh=x((({className:e,title:t,url:l,previewImg:n,...a})=>{const i=E();return p(I,{className:e,defaultPadding:bh(e),...a,children:[u(R,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:L(i)(n?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:L(i)(l)})}):null]})})),vh={AdTile:ut,ApplicationForm:bn,BenefitsBlock:kn,Bonus:Sn,BonusBenefitsBlock:zn,ButtonsBlock:An,Calculator:Ya,CardTransfer:ti,Carousel:Ri,CarouselBankHistoryCard:zi,CarouselCard:_i,CarouselCatalogCard:$i,CarouselInvestmentCard:Fi,CarouselLinks:Xi,CarouselRecommendationCard:Ji,CarouselTariffsCard:lr,ComparisonTable:Nr,ContactsBlock:kr,DepositFiltration:Gr,Depository:ds,ErrorBlock:hs,ExchangeRateTile:_s,Footer:Co,GracePeriod:So,Header:sc,Headline:R,HorizontalLayout:cc,ImgBlock:dc,InsuranceAmountBlock:xc,InvestmentInfo:vc,LinkDocs:Bc,MobileAppTile:Pc,MortgageFiltration:Jc,OfficesAtmsMap:qd,ParagraphBlock:Jd,Placeholder:Zd,ProductBlock:lt,ProductGallery:lm,RepresentativeOfficeInfo:am,RichTextBlock:sm,RollupItem:cm,SafeDepositRental:Rm,StepsBlock:jm,StickyBottomMenu:Om,SwipeListControlBlock:Fm,Tabs:Km,TariffsTable:mh,TextBlock:hh,VerticalLayout:fh,Video:yh};const Nh=["Header","Footer"],wh=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function kh(e=globalThis){const t=s(new Map);a((()=>k.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Nh.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?ga(wh)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Ch="cookie",Sh=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Et();Ks((()=>{globalThis.localStorage?.getItem(Ch)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Ch,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(M,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Yi,{isRemote:!0,className:Ih(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Yi,{isRemote:!0,className:Ih(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Xs,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Ih=e=>C("inline mx-2xs",e?"text-green-dark":"");function Th(e){throw new Error(e)}const Bh=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>v.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Th(e)}}))),[c,d]),l},Mh=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Bh({onCloseAll:e,onClose:t}),{close:n}=z(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Ut(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:C("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Ph=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>v.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Th(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Ut(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Rh=h();const zh=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Vh()}))),Vh=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ah("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"),Ah("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")]}),Ah=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),Dh=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Rh.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Rh.like(e))}),[e]),dislike:i((async()=>{l(await Rh.dislike(e))}),[e])}}(E().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(zh,{onClick:O(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(zh,{onClick:O(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),jh=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return kh(),p("div",{"data-theme":s,children:[p("section",{className:C("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:wi(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[ki({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),wi(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Dh,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Om,{}),u(Mh,{}),u(Ph,{}),u(Sh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));jh.childrenTypes=[],jh.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=vh,e.ContentPage=jh,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=O,e.joinList=fc,e.packageVersion="0.14.63",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=_,e.useRouter=E,Object.defineProperty(e,"__esModule",{value:!0})}));