@redneckz/wildless-cms-uni-blocks 0.13.6 → 0.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/bin/migration-scripts/0.13.6.js +33 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +75 -45
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
  6. package/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  7. package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  8. package/bundle/ui-kit/Badge/Badge.d.ts +6 -0
  9. package/bundle/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  10. package/bundle/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  11. package/bundle/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  12. package/bundle/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  13. package/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -2
  14. package/dist/components/Blocks.mobile.js +6 -0
  15. package/dist/components/Blocks.mobile.js.map +1 -1
  16. package/dist/components/Bonus/Bonus.js +1 -2
  17. package/dist/components/Bonus/Bonus.js.map +1 -1
  18. package/dist/components/CarouselEventCard/CarouselEventCard.js +2 -3
  19. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  20. package/dist/components/ErrorBlock/ErrorBlock.js +2 -3
  21. package/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
  22. package/dist/components/Footer/TextInformation.js +2 -1
  23. package/dist/components/Footer/TextInformation.js.map +1 -1
  24. package/dist/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
  25. package/dist/components/HorizontalLayout/HorizontalLayout.js +8 -1
  26. package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  27. package/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  28. package/dist/components/InvestmentInfo/InvestmentInfo.js +1 -1
  29. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  30. package/dist/components/MortgageFiltration/MortgageFiltration.js +10 -15
  31. package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  32. package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  33. package/dist/ui-kit/Badge/Badge.d.ts +6 -0
  34. package/dist/ui-kit/Badge/Badge.js +18 -0
  35. package/dist/ui-kit/Badge/Badge.js.map +1 -0
  36. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  37. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  38. package/dist/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  39. package/dist/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  40. package/dist/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  41. package/dist/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  42. package/dist/ui-kit/BaseFiltration/getBadgeCount.js +6 -0
  43. package/dist/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  44. package/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  45. package/{mobile/dist/components/MortgageFiltration/HotFilterRecord.js → dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  46. package/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  47. package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  48. package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  49. package/dist/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  50. package/dist/ui-kit/BaseFiltration/useHotFilters.js +26 -0
  51. package/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  52. package/dist/ui-kit/BaseTile/BaseTile.js +1 -5
  53. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  54. package/dist/ui-kit/TabsControl/TabItem.d.ts +5 -2
  55. package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  56. package/dist/ui-kit/TabsControl/TabItemInner.js +2 -2
  57. package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  58. package/lib/common.css +1 -1
  59. package/lib/components/Blocks.mobile.js +6 -0
  60. package/lib/components/Blocks.mobile.js.map +1 -1
  61. package/lib/components/Bonus/Bonus.js +1 -2
  62. package/lib/components/Bonus/Bonus.js.map +1 -1
  63. package/lib/components/CarouselEventCard/CarouselEventCard.js +2 -3
  64. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  65. package/lib/components/ErrorBlock/ErrorBlock.js +2 -3
  66. package/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
  67. package/lib/components/Footer/TextInformation.js +2 -1
  68. package/lib/components/Footer/TextInformation.js.map +1 -1
  69. package/lib/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
  70. package/lib/components/HorizontalLayout/HorizontalLayout.fixture.d.ts +1 -0
  71. package/lib/components/HorizontalLayout/HorizontalLayout.js +8 -1
  72. package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  73. package/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  74. package/lib/components/InvestmentInfo/InvestmentInfo.js +1 -1
  75. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  76. package/lib/components/MortgageFiltration/MortgageFiltration.js +11 -16
  77. package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  78. package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  79. package/lib/ui-kit/Badge/Badge.d.ts +6 -0
  80. package/lib/ui-kit/Badge/Badge.fixture.d.ts +6 -0
  81. package/lib/ui-kit/Badge/Badge.js +16 -0
  82. package/lib/ui-kit/Badge/Badge.js.map +1 -0
  83. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  84. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  85. package/lib/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  86. package/lib/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  87. package/lib/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  88. package/lib/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  89. package/lib/ui-kit/BaseFiltration/getBadgeCount.js +3 -0
  90. package/lib/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  91. package/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  92. package/lib/{components/MortgageFiltration/HotFilterRecord.js → ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  93. package/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  94. package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  95. package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  96. package/lib/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  97. package/lib/ui-kit/BaseFiltration/useHotFilters.js +23 -0
  98. package/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  99. package/lib/ui-kit/BaseTile/BaseTile.js +1 -5
  100. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  101. package/lib/ui-kit/TabsControl/TabItem.d.ts +5 -2
  102. package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  103. package/lib/ui-kit/TabsControl/TabItemInner.js +3 -3
  104. package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  105. package/mobile/bundle/bundle.umd.js +60 -25
  106. package/mobile/bundle/bundle.umd.min.js +1 -1
  107. package/mobile/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  108. package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  109. package/mobile/bundle/ui-kit/Badge/Badge.d.ts +6 -0
  110. package/mobile/bundle/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  111. package/mobile/bundle/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  112. package/mobile/bundle/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  113. package/mobile/bundle/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  114. package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -2
  115. package/mobile/dist/components/Blocks.js +6 -0
  116. package/mobile/dist/components/Blocks.js.map +1 -1
  117. package/mobile/dist/components/Bonus/Bonus.js +1 -2
  118. package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
  119. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +2 -3
  120. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  121. package/mobile/dist/components/ErrorBlock/ErrorBlock.js +2 -3
  122. package/mobile/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
  123. package/mobile/dist/components/Footer/TextInformation.js +2 -1
  124. package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
  125. package/mobile/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  126. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +1 -1
  127. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  128. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +10 -15
  129. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  130. package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  131. package/mobile/dist/ui-kit/Badge/Badge.d.ts +6 -0
  132. package/mobile/dist/ui-kit/Badge/Badge.js +18 -0
  133. package/mobile/dist/ui-kit/Badge/Badge.js.map +1 -0
  134. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  135. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  136. package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  137. package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  138. package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  139. package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  140. package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.js +6 -0
  141. package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  142. package/mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  143. package/{dist/components/MortgageFiltration/HotFilterRecord.js → mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  144. package/mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  145. package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  146. package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  147. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  148. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js +26 -0
  149. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  150. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -5
  151. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  152. package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +5 -2
  153. package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  154. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +2 -2
  155. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  156. package/mobile/lib/common.css +1 -1
  157. package/mobile/lib/components/Blocks.js +6 -0
  158. package/mobile/lib/components/Blocks.js.map +1 -1
  159. package/mobile/lib/components/Bonus/Bonus.js +1 -2
  160. package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
  161. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +2 -3
  162. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  163. package/mobile/lib/components/ErrorBlock/ErrorBlock.js +2 -3
  164. package/mobile/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
  165. package/mobile/lib/components/Footer/TextInformation.js +2 -1
  166. package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
  167. package/mobile/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  168. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +1 -1
  169. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  170. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +11 -16
  171. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  172. package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  173. package/mobile/lib/ui-kit/Badge/Badge.d.ts +6 -0
  174. package/mobile/lib/ui-kit/Badge/Badge.js +16 -0
  175. package/mobile/lib/ui-kit/Badge/Badge.js.map +1 -0
  176. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  177. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  178. package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  179. package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  180. package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  181. package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  182. package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.js +3 -0
  183. package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  184. package/mobile/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  185. package/mobile/lib/{components/MortgageFiltration/HotFilterRecord.js → ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  186. package/mobile/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  187. package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  188. package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  189. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  190. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js +23 -0
  191. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  192. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -5
  193. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  194. package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +5 -2
  195. package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  196. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +3 -3
  197. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  198. package/mobile/src/components/Blocks.ts +6 -0
  199. package/mobile/src/components/Bonus/Bonus.tsx +7 -13
  200. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +10 -12
  201. package/mobile/src/components/ErrorBlock/ErrorBlock.tsx +2 -10
  202. package/mobile/src/components/Footer/TextInformation.tsx +3 -2
  203. package/mobile/src/components/HorizontalLayout/HorizontalLayoutContent.ts +2 -0
  204. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +1 -1
  205. package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +17 -37
  206. package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -9
  207. package/mobile/src/ui-kit/Badge/Badge.tsx +34 -0
  208. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +5 -20
  209. package/mobile/src/ui-kit/BaseFiltration/HotFilterBase.ts +7 -0
  210. package/mobile/src/ui-kit/BaseFiltration/getBadgeCount.ts +6 -0
  211. package/mobile/src/ui-kit/BaseFiltration/hotFilterRecordCmp.ts +3 -0
  212. package/mobile/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +1 -1
  213. package/mobile/src/ui-kit/BaseFiltration/useHotFilters.tsx +65 -0
  214. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +3 -12
  215. package/mobile/src/ui-kit/TabsControl/TabItem.tsx +5 -3
  216. package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +2 -1
  217. package/package.json +1 -1
  218. package/src/components/Blocks.mobile.ts +6 -0
  219. package/src/components/Bonus/Bonus.tsx +7 -13
  220. package/src/components/CarouselEventCard/CarouselEventCard.tsx +10 -12
  221. package/src/components/ErrorBlock/ErrorBlock.tsx +2 -10
  222. package/src/components/Footer/TextInformation.tsx +3 -2
  223. package/src/components/HorizontalLayout/HorizontalLayout.fixture.tsx +21 -0
  224. package/src/components/HorizontalLayout/HorizontalLayout.tsx +10 -2
  225. package/src/components/HorizontalLayout/HorizontalLayoutContent.ts +2 -0
  226. package/src/components/InvestmentInfo/InvestmentInfo.tsx +1 -1
  227. package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +5 -2
  228. package/src/components/MortgageFiltration/MortgageFiltration.tsx +17 -37
  229. package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -9
  230. package/src/ui-kit/Badge/Badge.fixture.tsx +24 -0
  231. package/src/ui-kit/Badge/Badge.tsx +34 -0
  232. package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +5 -20
  233. package/src/ui-kit/BaseFiltration/HotFilterBase.ts +7 -0
  234. package/src/ui-kit/BaseFiltration/getBadgeCount.ts +6 -0
  235. package/src/ui-kit/BaseFiltration/hotFilterRecordCmp.ts +3 -0
  236. package/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +1 -1
  237. package/src/ui-kit/BaseFiltration/useHotFilters.tsx +65 -0
  238. package/src/ui-kit/BaseTile/BaseTile.tsx +3 -12
  239. package/src/ui-kit/TabsControl/TabItem.tsx +5 -3
  240. package/src/ui-kit/TabsControl/TabItemInner.tsx +2 -1
  241. package/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  242. package/dist/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  243. package/dist/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  244. package/lib/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  245. package/lib/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  246. package/mobile/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  247. package/mobile/dist/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  248. package/mobile/dist/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  249. package/mobile/lib/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  250. package/mobile/lib/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  251. package/mobile/src/components/MortgageFiltration/HotFilterRecord.ts +0 -14
  252. package/src/components/MortgageFiltration/HotFilterRecord.ts +0 -14
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{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 b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(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 v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...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","":""},k=g((({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 y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},M=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],V=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],P=e=>null!=e,z=new Map;function j(e,t,{fallback:l,cache:i}={}){const s=r((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(P)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(P(n))return n;const a=e(l);return P(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function E(e,t){try{return e?await D(e,t):null}catch(e){console.error(e)}return null}async function D(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const $=[];function L(){const{data:e}=j("/api/v1/regions",D);return e||$}const O=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:H});const W=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||X(t,d.CDN))return t;const n=t.startsWith("/");return H(X(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},X=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function J(){return J._impl()}function Y(e={}){const{isRemote:t,basePath:l}=e,n=J(),{closeAll:a}=O();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&U(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},J._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),J.setup=e=>{J._impl=e};const q={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",Q={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},ee="text-center font-sans select-none",te={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},le=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ne(e),"flex gap-xs"),children:[n?u("div",{className:te[i],children:n}):null,ae(e)?p("div",{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:te[i],children:a}):null]})})),ne=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["group/btn items-center justify-center",ae(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ae=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ie=({className:e,rounded:t,version:l})=>["inline-block",ee,l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=({className:e,rounded:t,version:l})=>[ee,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=g((({disabled:e,children:t,...l})=>{const n=Y()(l),a=t??u(le,{...n});return u(e?ce:oe,{...n,children:a})})),oe=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:re({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),ce=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ie({className:e,rounded:n,version:l}),children:a}))),de=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),he=g((({link:e})=>p(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(me,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(se,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(me,{children:e.text})}):null]}))),ue=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},pe=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(me,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),ge=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(pe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),xe=e=>"_"===e,fe=e=>/\d/.test(e),be=e=>xe(e)||fe(e),ye=[..."+7 (___) ___-__-__"],ve=ye.findIndex(xe),Ne=ye.map(((e,t)=>be(e)?ye.slice(0,t).filter(be).length:-1));const we=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ye.map(((e,l)=>fe(e)?e:t.charAt(Ne[l])||e)),n=Ne.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(ve,n)):l).join("")}(e))),[t]);return u(pe,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Se=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(we,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ke="Некорректно заполненное поле",Ce=_((e=>null!=e&&""!==e))(ke),Ie=_((e=>"string"==typeof e&&e.length>1))(ke),Te=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(ke),Be=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&Re.test(e))))(ke);var Re;const Me=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function _e(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 Pe=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 ze={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},je=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...r})=>{const s=J(),o=W(s)(H(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Ee,{className:e,children:p("svg",{className:w(Ae(r.width),ze[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...r}))})),Ae=e=>e?"":"w-full h-full",Ee=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),De=g((({className:e="",label:t,options:l=[],value:r,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=_e(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[$e(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",He(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ue(r)||d}),u(je,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Oe(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:Le(l,b).map(Fe(S,g,(e=>e.key===r?.key)))})}):null]})]})})),$e=e=>e?u("div",{className:"mb-xs",children:u(me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Le=(e,t)=>t?e.filter((e=>Pe(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Oe=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(pe,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,Fe=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:Ue(n)}),u(je,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),Ue=e=>e?.text||e?.key||"",He=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ke=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(De,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),We=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...ue(t("acquiringType"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)})})]}),Xe=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("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:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ge=e=>p("div",{children:[u(Xe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Xe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Je=(e,t)=>{const l=re({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Ye={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},qe=M({acquiringType:Ce,region:Ce,fullName:Ce,inn:Te,name:Ie,phone:Be}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;V(qe(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=R(Ye,a),o=L();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),We({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Me(r),Ge(r),Je(t),u(he,{link:l})]})})),Qe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...ue(e("mail"),Ce)})]})]}),et=({regions:e,field:t})=>u(Ke,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)}),tt={name:"",phone:"",inn:"",mail:""},lt=M({region:Ce,name:Ie,phone:Be,inn:Te,mail:Ce}),nt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;V(lt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=R(tt,a),o=L();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[et({regions:o,field:r}),Qe(r),Je(t),u(he,{link:l})]})})),at=[];const it=async e=>await E(e,{method:"GET"})||at,rt=["От 1 000 ₽","До 1 000 000 000 ₽"],st=["От 1 мес","До 15 лет"],ot=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...ue(e("annualRevenue"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),ct=(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}},dt=(e,t,l)=>Math.max(t,Math.min(e,l)),mt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function ht(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ut({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)/(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:"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=ht(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const pt=1,gt=100,xt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:pt),max:s=(a.length?a.length-1:gt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=ct(e,{normalize:(e=0)=>a.length?ft(a)(e):dt(e,r,s),format:mt()}),g=i((e=>{m&&m(ht(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(me,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ut({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),bt(n)]})})),ft=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),bt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),yt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(xt,{items:rt,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(xt,{items:st,min:1,max:180,...e("term")})]})]}),vt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(l("region"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...ue(l("department"),Ce)})})]}),Nt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},wt=M({fullName:Ce,annualRevenue:Ce,inn:Te,name:Ie,phone:Be,region:Ce,department:Ce}),St=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;V(wt(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=R(Nt,n),o=L(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,it);return t||at}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),yt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),ot(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),vt({regions:o,branches:c,field:r}),Je(e),u(he,{link:t})]})})),kt={name:"",phone:""},Ct=M({name:Ie,phone:Be}),It=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;V(Ct(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=R(kt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Имя",...ue(r("name"),Ie)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(r("phone"),Be)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(he,{link:l})}),Je(t)]})]})})),Tt={};function Bt(e,t=Tt){const{data:l}=j(e?`/wcms-resources/${e}.json`:null,D,{fallback:t});return l||Tt}const Rt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Bt(l||"regions-grant-support"),[i,r]=n({key:""}),s=re({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Ke,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(se,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Mt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Vt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=J();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Mt).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:Pt(a,n)(e),type:zt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?_t({...t,src:Pt(a,n)(t.src)},l):null]})})),_t=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),Pt=(e,t)=>l=>l&&!F(l)?W(e)(H(t,l)):l,zt=e=>e?`image/${String(e)}`:void 0,jt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(je,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(Vt,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),At=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Et=[{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"}],Dt=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(At,{paths:Et,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":$t(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(me,{size:"text-l",font:"font-light",children:l})}):null]})})})),$t=e=>w("rounded border",e?"bg-primary-main":""),Lt=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(Dt,{text:"Валютный контроль",...e("currencyControl")}),u(Dt,{text:"Документарные операции",...e("documentaryOperations")}),u(Dt,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ot=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...ue(e("fullName"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"ФИО",...ue(e("name"),Ie)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(Se,{className:"shrink-0 w-full mb-s",label:"Телефон",...ue(e("phone"),Be)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...ue(e("mail"),Ce)})})]})]}),Ft={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Ut=M({fullName:Ce,name:Ie,phone:Be,mail:Ce}),Ht={ApplicationFormBusinessCard:nt,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;V(Ut(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=R(Ft,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ot(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),Lt(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[Je(t),u(he,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm: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(jt,{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(jt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:It,ApplicationFormCredit:St,ApplicationFormAcquiring:Ze,ApplicationFormGrantSupport:Rt},Kt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(jt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Wt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Xt=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Wt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Gt(l,o):null,r?u(Kt,{responseType:r}):null]})})})),Gt=(e,t)=>{const l=e?.formType;if(!l||!(l in Ht))return null;return u(Ht[l],{...e,onSubmit:t})},Jt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Yt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Jt[l],e),children:u(je,{...i,width:"54%",height:"54%",name:a})}):null})),qt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(Zt)}):null]}))),Zt=(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(Yt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(jt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Qt(e.description)]}):null]},String(t)),Qt=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?tl(e):el(e)}):null},el=e=>e?.name||null,tl=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},ll={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"}},nl={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},al=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=ll[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(de,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),il=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),rl=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(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})})),sl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ol=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(dl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?cl(r,b):{},...y?il(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(rl,{className:w(c,n?sl[n-1]:"",y?"h-full":""),style:v?cl(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),cl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),dl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ml={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},hl={"horizontal-list":"w-6","vertical-list":"h-6"},ul=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",ml[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?hl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),pl=e=>e,gl=(e=pl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),xl=gl(),fl=(e=pl)=>gl((t=>-e(t))),bl=fl(),yl=e=>t=>e.scrollWidth/t,vl=e=>(t,l)=>{e.scrollBy({left:l*yl(e)(t),behavior:"smooth"})},Nl=({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?[fl()(a),gl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?vl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?vl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[l,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},wl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Nl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(ol,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(ul,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Sl="text-left",kl=(e,t,l)=>u(wl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(me,{size:"text-h6",font:"font-normal",align:Sl,children:t}):null,e?u(jt,{image:e,height:"180",className:"w-auto"}):null,l?u(me,{size:"text-h6",font:"font-normal",align:Sl,children:l}):null]},String(n)))({...e},t)))}),Cl=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(al,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?kl(e):null]}))),Il=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(Tl(l))}):null,Tl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(se,{className:w("basis-full sm:basis-auto",e),appendLeft:Bl({...a,iconVersion:c}),appendRight:Bl({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Bl=e=>e?.icon||e?.src?u(jt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Rl={start:"justify-start",center:"justify-center",end:"justify-end"},Ml=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",Rl[l]):"";return u(k,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Il(e)})})),Vl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),_l=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Pl=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(me,{size:"text-h3",children:[n," ",mt(2)(Math.round(t))," ",l]})}:{children:u(me,{size:"text-h3",children:"-"})})]}))),zl=Math.round(23.5),jl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Al={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},El={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Dl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},$l={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Ll=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(me,{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:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Ol=e=>e?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Fl({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${mt(2)(l.min||0)} ₽`,`До ${mt(2)(l.max||0)} ₽`];return u(xt,{items:e?n:[],step:t,...l})}function Ul(e){const{data:t}=j(`/wcms-resources/${e}.json`,D);return t}const Hl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Ul(t||"bonus-calculator-data")||El,[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}},Kl=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Hl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Fl({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Ll,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Pl,{title:"Баллов за год",value:m}):null,Il(l,{isVertical:!0}),Ol(n)]})]})})),Wl=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},Xl=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Gl([e,t],n),Gl=([e,t],l=[])=>({[e]:l.length?bl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?xl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Jl=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Yl=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,ql=(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)},Zl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ql={horizontal:"gap-5xl",vertical:"flex-col gap-s"},en=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Ql[a]}`,l),children:e?.map((({id:e,text:l})=>u(Dt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),tn=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(me,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(en,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),ln=e=>tn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),nn=g((({title:e="Ставка"})=>p("div",{children:[u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(je,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(de,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),an=({rate:e,depositeName:t,isShowDepositeName:l})=>u(Ll,{rate:e,depositeName:t,isShowDepositeName:l,rateBlockClassName:"tracking-[-25px]",unit:"%"}),rn=({rate:e})=>u(Pl,{title:"Ставка",value:e,postfix:"%"}),sn=e=>e.isShowUnknownRate?u(nn,{}):p("div",{children:[u("div",{className:"hidden md:block",children:an(e)}),u("div",{className:"md:hidden",children:rn(e)})]}),on=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=Ul(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...$l,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&Yl(c,e)&&Jl(n,["minSum","maxSum"],e)&&Jl(l,["minDays","maxDays"],e)))||$l,{rate:h}=m,u=ql(h,e),p=n+u,g=o?.rateRows||[$l];return{...m,...Gl(["minSum","maxSum"],g),...Gl(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(xt,{items:[`От ${Zl(x.min||0)}`,`До ${Zl(x.max||0)}`],step:1,...x})),cn(o,s),ln({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[dn(d,c),Il(l,{isVertical:!0}),Ol(n),Ol(a)]})]});var x})),cn=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Dt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Dt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(Dt,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),dn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Pl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Pl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),mn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(xt,{items:[`От ${hn(e)}`,`До ${hn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),hn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,un=e=>pn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&pn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&pn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&pn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),pn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],gn=(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)},xn=(e,t,l)=>{let{moneyValue:n,monthsValue:a}=e;const i=Ul(t||"credit-calculator-data"),s=i?.rateRows||[jl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>un({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Xl(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Xl(["minMonths","maxMonths"],o,s);n=dt(n,c,d),a=dt(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>un({row:e,userInputParams:t,paramsViewSettings:l})&&Jl(n,["minSum","maxSum"],e)&&Jl(a,["minMonths","maxMonths"],e)))||jl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=gn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},fn=e=>tn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),bn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:zl}),o=xn(r,t,a),c=fn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),mn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),yn({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Pl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Il(l,{isVertical:!0}),Ol(n)]})]})})),yn=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Dt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Dt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),vn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Ul(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Sn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>wn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&wn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Jl(n,["minSum","maxSum"],t)&&Jl(a||r,["minMonths","maxMonths"],t)))||Dl,{rate:d}=c,m=Nn(d,e),h=n+m,u=i?.rateRows||[Dl];return{...c,...Gl(["minSum","maxSum"],u),...Gl(["minMonths","maxMonths"],u),availableMonths:Wl(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}},Nn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},wn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Sn=(e,t)=>e+Math.round((t-e)/2),kn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=vn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),mn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Cn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Pl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Pl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),Il(l,{isVertical:!0}),Ol(n)]})]})})),Cn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?ln({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},tn({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},In=e=>Tn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Tn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Tn({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Tn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Bn=(e,t,l)=>{let{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e;const o=Ul(t||"refinancing-calculator-data"),c=o?.rateRows||[Al],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>In({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Xl(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=Xl(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=Xl(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=Xl(["minMonths","maxMonths"],d,c);n=dt(n,m,h),i=dt(i,u,p),s=dt(s,g,x),a=dt(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>In({row:e,userInputParams:t,paramsViewSettings:l})&&Jl(n,["minSum","maxSum"],e)&&Jl(i,["minSumOld","maxSumOld"],e)&&Jl(r,["minSumExtra","maxSumExtra"],e)&&Jl(a,["minMonths","maxMonths"],e)))||Al)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:v}=y,N=gn(v,e),w=e.oldMonthlyPayment-N;return r((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:N,benefit:w})),[e,o])},Rn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Bn(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Fl({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),mn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Mn({...s,...a},r),s.isExtraMoney?Fl({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),u(Ll,{title:"Ставка",rate:s.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Pl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Pl,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,fn({orientation:"vertical",...r("isAnnuity")}),Il(l,{isVertical:!0}),Ol(n)]})]})})),Mn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(Dt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),Vn={CreditCalculatorForm:bn,DepositCalculatorForm:kn,BusinessDepositCalculatorForm:on,BonusCalculatorForm:Kl,RefinancingCalculatorForm:Rn},_n=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:zn(t)}))),Pn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Vn))return null;return u(Vn[t],{...e.calculatorBlock,isMobile:!0})},zn=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Pn(e[0])}):e.map(((e,t)=>u(Vl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(_l,{isUnfolded:t,children:u(k,{children:Pn(e)})}),renderFoldButton:jn(e)},t.toString())))},jn=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(je,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(me,{align:"text-left",color:"text-white",children:e.nav?.title}),u(me,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(je,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),An=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=ct(e,{normalize:(e=a)=>l&&n?String(dt(Number(En(e)),l,n)):En(e),format:mt(r)}),c=i((e=>t&&t(En(e))),[t]);return u(pe,{onChange:c,...s,...o})})),En=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Dn=g((e=>u(An,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(me,{size:"text-xl",font:"font-light",children:"₽"})})}))),$n={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ln={amount:1500,_amount:1500},On=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=R(Ln),d=s<=0,m=d?ie({version:a?.version}):re({className:"text-white",version:a?.version}),h=Y();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:$n[i],children:[u(Dn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Fn=g((({className:e,disabled:t,...l})=>u(se,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(jt,{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"})}))),Un=g((e=>u(Fn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Hn=g((e=>u(Fn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Kn="absolute top-[calc(50%-24px)] z-40",Wn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Xn=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Gn(e),h?u(Un,{className:w(Kn,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Hn,{className:w(Kn,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Gn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Wn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Wn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Jn=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Yn=[];function qn(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Jn,blocksRegistry:r={},ancestors:s=Yn}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(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 Zn=[],Qn=(e,{key:t,ancestors:l=Zn,slotName:n=null,extraProps:a,renderProps:i=qn,...r})=>{const s=a?(e,t)=>qn(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Zn,[r.parent,n]]:l},a)))};function ea({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Qn(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const ta=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(je,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(de,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),la="relative h-full",na={normal:"sm:min-w-96",big:"sm:min-w-[515px]"},aa=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(sa);return ea({...n,renderProps:(n,a,r)=>p("div",{className:ia(n,{someCardsHighlighted:i}),children:[qn(n,a,{className:ra(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),sa(n)?ta({className:"absolute top-0 -right-4 z-40"}):null]})})},ia=(e,{someCardsHighlighted:t})=>w(la,t&&(sa(e)?"pt-3xl":"pt-3xl sm:pt-16")),ra=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(la,"min-w-80",na[n],t&&(sa(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),sa=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,oa=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},g=t||h?.length,[x,{inc:f,dec:b}]=((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}]})({itemCount:g,visibleItemCount:l},Math.floor(l/2)),[y,v]=Nl({itemCount:g}),[N]=v.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...m,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(ol,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:aa({noCardBorder:a,activeIndex:x,cardSize:d,...m})}),u(Xn,{scroll:v,arrowsPadded:o,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:S,activeIndex:x,itemCount:g}),s?u(ul,{containerRef:y,activeIndex:N,dotCount:g,listType:"horizontal-list"}):null]})})}));oa.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],oa.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const ca=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(al,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),da="z-10 border border-solid w-full h-full",ma=w(da,"absolute hidden sm:block border-transparent"),ha=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(ma,"top-9 right-12 bg-green-dark")}),u("div",{className:w(ma,"top-6 right-8 bg-green")}),u("div",{className:w(ma,"top-3 right-4 bg-green-light")}),p("div",{className:w(da,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(al,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Il([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ua={black:"bg-black",white:"bg-white"},pa=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(jt,{className:"flex justify-center mb-xl",image:n}):null,u(al,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(ga)]}):null,a?p(me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,Il([i],{buttonClassName:"w-full mt-lg"})]}))),ga=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ua[e]}`},String(t)),xa=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=Y({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),fa={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"},ba=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",fa[n])})}):null,u("span",{children:l})]}))),ya={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},va={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Na=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",ya[a],t?va[a]:"",e),role:"list",children:n.map(((e,t)=>u(ba,{isDotted:l,size:a,children:e},String(t))))}):null)),wa=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(xa,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[ka(i,g),Ca(a),Ta(h,o,x),Ia(e),Sa(s,d,m)]}),Il([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),Sa=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(jt,{className:"shrink-0",image:e}):null,e?.icon?u(jt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),ka=(e,t)=>t?u(me,{size:nl[e],children:t}):null,Ca=e=>e?u(de,{size:"text-l",children:e}):null,Ia=e=>e?u(me,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,Ta=(e,t,l="primary")=>e?.length?u(Na,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Ba={start:"self-start",center:"self-center",end:"self-end"},Ra=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Ma(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Ma(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Ma=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("flex-shrink-0",e?.props?.image?.size?.width>400?"w-full @xl:w-auto":"",l&&Ba[l],t),children:e}):null,Va=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,_a=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 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(jt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pa=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),za=(e,t)=>e?u(de,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,ja=(e,t)=>e?u(me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Aa=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Pa,{...e},`rte-${t}`):["label"in e?ja(e.label,t):null,"description"in e?za(e.description,t):null],Ea=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?_a(l.icon,t):null,u("div",{children:Aa(l)})]}))),Da=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),$a=e=>{return((t=e.map(Da))?.length?Math.sqrt(Math.abs(Va(t.map((e=>e**2)))-Va(t)**2)):0)>16;var t},La=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Oa=e=>!e.some(La),Fa=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",$a(l)||Oa(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ea,{benefitsVersion:t,...e},String(l))))}):null)),Ua=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Aa)}):null)),Ha=g((({isTabularBenefits:e,...t})=>u(e?Ua:Fa,{...t}))),Ka=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(Wa)}):null)),Wa=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(me,{size:"text-m",font:"font-light",children:e})},String(t)),Xa=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",isInsetTitle:s=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(jt,{image:y}):null,C=u(al,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0});return u(Ra,{className:e,padding:t,defaultPadding:l,...s?{insetTitle:C}:{title:C},...w?{backImage:k}:Ga(k,N),imageAlign:v,buttons:Il(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Ha,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(Pa,{__html:m}):null,h?.length?u(Na,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Ka,{tags:f}):null]})})})),Ga=(e,t)=>t?{rightImage:e}:{leftImage:e},Ja=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(xa,{className:"flex items-center h-full",href:a,target:i,children:u(Xa,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),Ya={default:"w-14 h-14",stretched:"flex-1 h-14"},qa=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",Ya[t]),Za=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Qa=e=>Za.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},ei=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=Qa(a),c=ti(l)??s;return u(se,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",qa(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(jt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),ti=e=>e?.src||e?.icon?e:void 0,li=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(ei,{buttonSize:n,...e},String(t))))})]}))),ni=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(xa,{href:l,target:r,className:"space-y-lg",children:[u(al,{title:s,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(Na,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,ai(n),i.length?u(li,{media:i}):null]})}))),ai=e=>e?.src||e?.icon?u("div",{children:u(jt,{image:e})}):null,ii=(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(me,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(me,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Il(a)}):null]},String(t))},ri=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(ii),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[si(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(se,{className:"w-full mt-m",...a}):null,i.length?u(Vl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(_l,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?oi:null}):null]})})),si=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(jt,{image:e}):null}),oi=({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(je,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ci=(e=!1)=>e?"text-white":"",di=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),mi=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(jt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(jt,{image:t})}),l?u(T,{headingType:"h4",className:ci(a),title:l}):null,n?u("div",{className:di(a),children:n}):null]}))),hi=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(ui(l,t))})}))),ui=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),pi=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(mi,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(hi,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(se,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,gi({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),gi=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),xi=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(fi,{...e})})]})})),fi=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(pi,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(wl,{onVisibleIndicesChange:m,children:h}):h}));var bi;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(bi||(bi={}));const yi=new Intl.NumberFormat("ru",{style:"currency",currency:bi.RUB}),vi=e=>e?yi.format(e):"",Ni="text-left text-m font-light text-secondary-text",wi=`${Ni} pl-5xl`,Si={USD:"DollarIcon",EUR:"EuroIcon"},ki=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ni,children:u(me,{size:"text-m",children:"Валюта"})}),u("th",{className:wi,children:u(me,{size:"text-m",children:"Купить"})}),u("th",{className:wi,children:u(me,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Ci)})]}))),Ci=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(jt,{image:{icon:Si[t]},width:"24",height:"24"}):null,u(me,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:vi(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:vi(e?.buyExchangeRate)})})]},t)},Ii={icon:"GpsIcon"},Ti=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Yt,{...Ii,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:"Курс указан для заданного офиса"})]})]}))),Bi=(e,t,l)=>{const n=Number(Ri(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)},Ri=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Mi=e=>{return(t=[[e=>e.value!==bi.RUB&&e.oppositeValue!==bi.RUB,()=>e.handleConvert(e.value,bi.RUB)],[e=>e.value===bi.RUB&&e.oppositeValue===bi.RUB,()=>e.handleConvert(e.value,bi.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Vi(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(pe,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(De,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const _i=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||bi.RUB,selectBuy:l?.[0]?.currency?.currency||bi.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Vi({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Pi(r,o,l),value:r.inputSell,setValue:e=>ji(o,l)(e,r.selectSell,r.selectBuy)}),Vi({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:zi(r,o,t),value:r.inputBuy,setValue:e=>Ai(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(se,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Pi=(e,t,l)=>n=>{t({selectSell:n}),Mi({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{ji(t,l)(e.inputSell,n,a)}})},zi=(e,t,l)=>n=>{t({selectBuy:n}),Mi({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ai(t,l)(e.inputBuy,n,a)})},ji=(e,t)=>(l,n,a)=>{e({inputSell:Ri(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(Bi(l,i,n===bi.RUB)||"")})},Ai=(e,t)=>(l,n,a)=>{e({inputBuy:Ri(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(Bi(l,i,n===bi.RUB)||"")})};const Ei=async e=>{const t=await Di(),l=t?.code||"000";return{region:t,exchangeRates:await $i(e,l)}},Di=async()=>{try{return await D("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},$i=async(e,t)=>{try{return await D(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Li=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Ei);return e||{}}(),i=Oi(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:bi.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:bi.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(Ra,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(ki,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(Ti,{address:a?.address})]}),i.length&&r.length&&s.length?u(_i,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),Oi=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Fi=e=>Bt(d.SITEMAP||"sitemap",e),Ui=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(Hi)}):null)),Hi=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},Ki=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(jt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),Wi=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Xi=(e,t)=>u(Yt,{...e,iconBgVersion:t,className:"shrink-0"}),Gi=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(Vl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(_l,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:ea({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ji({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Gi.childrenTypes={exclude:["RollupItem"]};const Ji=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?Yi({label:r,labelIcon:l,labelIconBgVersion:n,icon:Wi(a),onToggle:i}):u(Ki,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Yi=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Xi(a,t),e?u(me,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(je,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),qi=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Zi):null,u(se,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Zi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(me,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(Qi)})]},String(t)),Qi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:er(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),er=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${tr(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})}},tr=e=>e.replaceAll(/\D/g,""),lr=g((({className:e="",index:t,text:l,...n})=>{const a=Y(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),nr=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(me,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(lr,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),ar=g((({className:e="",index:t,...l})=>{const n=Y({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}`})})),ir=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-lg",children:u(me,{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 sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(ar,{index:t,...e},String(t))))}):null]}))),rr=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Fi(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=Bt(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Gi,{label:e?.text,labelIcon:e?.icon,children:u(Ui,{items:e.items})},String(t))))}),u(qi,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(li,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(sr)})]}),u(nr,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(ir,{links:c})]})})),sr=({href:e="/"},t)=>{const{label:l}=Qa(e);return u(se,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},or={"bg-white":"color",transparent:"white"},cr={"bg-white":"text-primary-main",transparent:"text-white"},dr=(e,t,l)=>u(jt,t?.src?{image:t,className:cr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:or[e]},className:cr[e],width:l?.width,height:l?.height}),mr={"bg-white":"text-primary-text",transparent:"text-white"},hr=(e,t,l)=>u("span",{className:`${mr[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),ur=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[dr(e,a?.image,{width:"34",height:"34"}),i?hr(t||a?.title,e,"text-s"):null]}))),pr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},gr=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=J(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u(ur,{className:"mt-2xs",bgColor:e,logo:t}):xr(s),l?u(se,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",pr["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),xr=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(jt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),fr={"bg-white":"primary",transparent:"transparent"},br=g((({bgColor:e="bg-white",version:t=fr[e],...l})=>{const{logo:n,internetBankUrl:a}=Fi(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(gr,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),yr={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},vr=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",yr[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:ea({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));vr.childrenTypes=[];const Nr=g((e=>u(vr,{...e})));Nr.childrenTypes=[];const wr=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(jt,{image:l})})})),Sr=["байт","Кб","Мб","Гб","Тб","Пб"],kr=g((({icon:e,text:t,fileSize:l,...n})=>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",...n,children:[e,t?p(me,{size:"text-l",font:"font-light",children:[t,u(me,{color:"text-secondary-text",children:n?.href&&Cr(Ir(n.href),l)})]}):null]}))),Cr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Ir=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Tr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Br=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=J();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(al,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Tr[r]),role:"list",children:a.map(Rr(o,r,i))}):null]})})),Rr=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?W(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.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))} ${Sr[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(kr,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(jt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Mr={left:"text-left",center:"text-center",right:"text-right"},Vr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(me,{size:"text-xl","font-weight":"light",children:e})}):null,_r=e=>e?.length?u(Na,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Pr=e=>{const t=e.length>2;return Il(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},zr=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(Ra,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Mr[l])}):null,rightImage:r?.src?u(jt,{className:"hidden lg:block",image:r}):null,buttons:Pr(n),children:[Vr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(jt,{className:"w-fit",image:o})}):null,_r(s),r?.src?u(jt,{className:"lg:hidden",image:r}):null]})]})})})),jr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Ar("Страховая сумма:",e):null,Number(t)>0?Ar("Ежемесячный лимит:",t):null]}):null,Ar=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(me,{font:"font-light",size:"text-l",children:e}),p(me,{size:"text-h6",color:"text-primary-text",children:[mt(2)(t)," ₽"]})]}),Er=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(Xa,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:jr(Number(a),Number(i))})}))),Dr=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(al,{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:$r()})]}))),$r=(e=3)=>Or(100,e).map((e=>Math.floor(e))).map(Lr),Lr=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Or=(e,t)=>[e].concat(t>0?Or(e/1.618,t-1):[]);function Fr({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(se,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(jt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(se,{version:"link",...r})]})}const Ur=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?Fr(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(Xa,{className:"grow h-full",...n})]}))),Hr=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(wl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(Xa,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Kr=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(Xa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(de,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),Wr=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Pa,{__html:t,richVersion:l})})})),Xr=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function Gr(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)}))}const Jr={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"},Yr=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(Jr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),qr={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Zr=(e,t,l)=>p("div",{className:`${Object.values(qr).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(je,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Qr={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"},es=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Qr).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(je,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ts=e=>globalThis[e];const ls=()=>function(e,t){const[l,r]=n(),s=i((()=>r(ts(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(!ts(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),ns={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"},as=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(ns).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(je,{name:l,width:"20",height:"16"})})})),is={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"},rs=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=ls(),[c,d]=n(),[m,h]=n(ds(Xr)),g=ss(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),Gr(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?ds(Xr):m;Gr(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?Zr(Xr,0,(e=>{if(e){const t=ds(e);h(t)}})):Yr(g)}),u("div",{className:`${Object.values(is).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(je,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(as,{yandexMaps:r}),u(as,{yandexMaps:r,direction:"out"})]}),es(r.current,o,`right-2 top-80 ${x}`)]})})),ss=e=>[cs(os(e,0)),cs(os(e,1))],os=(e,t)=>e.map((e=>e[t])),cs=e=>e.reduce(((e,t)=>e+t))/e.length,ds=e=>e?e.map((e=>e.coords)):null,ms=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(De,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),hs=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(ms,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(ms,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),us=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),ps=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(us,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(us,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),gs=["От 1 дня","До 365 дней"],xs=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(me,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(xt,{min:1,max:365,value:e,items:gs,onChange:t})]}))),fs=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(ms,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(ms,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),bs=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(hs,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:ys(c)}),u(xs,{days:a,setDays:e=>c({days:e})}),u(fs,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:vs(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(ps,{}),u(se,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),ys=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},vs=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ns=g((({days:e,tariffs:t=[]})=>{const l=Ss(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[ws("Аренда за",e),ws("Цена",l+" ₽")]}),u("span",{className:"sm: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 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(jt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),ws=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),Ss=(e,t)=>{const l=ks(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},ks=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},Cs=(e,t)=>e.find((e=>e.branchCode===t)),Is=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Cs(n,l.selectedBranch),o=Ts(s?.safeBoxCaseVolumes),c=Bs(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Rs(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(bs,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Ns,{days:l.days,tariffs:d})]})})),Ts=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Bs=(e,t)=>e?.find((e=>e.volume===t)),Rs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Ms=[];const Vs=async e=>await E(e,{method:"GET"})||Ms,_s=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=L(),h=Ps(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,Vs);return t||Ms}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Cs(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Is,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(de,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(rs,{points:f,className:"h-[640px]"}):null]})})),Ps=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function zs(e){throw new Error(e)}const js=e=>Boolean(e?.icon||e?.src),As={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Es={normal:"",small:"min-h-6xl"},Ds={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"},$s=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(al,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Ls(i,r))})}):null,Il(a,{isVertical:!0})]}))),Ls=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Os(e,t)(l,n);case"rte":return u(Pa,{__html:l.__html});default:zs(l)}},Os=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Fs(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Es[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Ds.description),children:l.description}):null]})]})},String(n)),Fs=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=As[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Ds.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:js(l?.icon)?u(jt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},Us={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Hs={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Ks={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Ws={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Xs=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,...s}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",Us[n],l?Ws[n]:Ks[n]),role:"tab","aria-selected":l,onClick:a,...s,children:u("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Hs[n]:"text-secondary-text hover:text-primary-main"),children:u(me,{size:"text-m",children:r})})})})),Gs=g((e=>u(e?.item?.href?Js:Ys,{...e}))),Js=g((e=>{const t=Y(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Xs,{...e,tag:"a",item:a,onClick:n})})),Ys=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Xs,{item:e,onClick:n,...l})})),qs=(e,t,l)=>(n,a)=>u(Gs,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Zs="hidden sm:flex absolute z-40 top-0",Qs=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Nl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(ol,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(qs(l,n,a))}),r.canScrollLeft?u(Un,{className:w("left-6",Zs),onClick:r.scrollLeft}):null,r.canScrollRight?u(Hn,{className:w("right-6",Zs),onClick:r.scrollRight}):null]})})),eo=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(qs(n,a,t))}))),to=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(eo,{...t});case"centered":return u("div",{className:"flex",children:u(eo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Qs,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},lo=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(ao)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&no(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),no(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:to({items:c,value:c[d],tabsMode:s,onChange:h})})})),no=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},ao=e=>"group"===e?.type?{text:e.title}:e,io={Buttons:({buttons:e})=>Il(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(jt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(Na,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},ro=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(me,{size:"text-l",font:"font-light",children:e}):null,t?u(jt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),so=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(ro,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:oo(e,t)},String(l)))):null]})));function oo(e,t){if(!e||!e.tableCellType||!(e.tableCellType in io))return null;const l=io[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const co=g((({tiles:e,...t})=>e?.length?u(wl,{...t,padding:void 0,children:e.map(((e,l)=>u(so,{tile:e,...t},String(l))))}):null)),mo=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(so,{tile:e,...t},String(l))))}):null)),ho=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=uo(n),o=po(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(al,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?mo:co,{tiles:o,...r})]})})),uo=e=>e?.[0]?.data?e[0].data:[],po=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),go=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?xo():null,"big"===n?fo(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?bo(l):null,r?.length?yo(r,!0):null,i?u(Pa,{__html:i}):null]})]}))),xo=()=>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"}),fo=e=>e?.src?u(jt,{className:"h-fit flex-shrink-0",image:e}):null,bo=e=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),yo=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(me,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),vo=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(Xa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),No={ApplicationForm:Xt,BenefitsBlock:qt,BonusBenefitsBlock:Cl,ButtonsBlock:Ml,Calculator:_n,CardTransfer:On,Carousel:oa,CarouselBankHistoryCard:ca,CarouselCard:ha,CarouselCatalogCard:pa,CarouselProductCard:wa,CarouselProgramsCard:Ja,CarouselRecommendationCard:ni,CarouselTariffsCard:ri,ComparisonTable:xi,ExchangeRateTile:Li,Footer:rr,Header:br,Headline:al,HorizontalLayout:Nr,ImgBlock:wr,LinkDocs:Br,MobileAppTile:zr,PictureText:Er,Placeholder:Dr,ProductBlock:Ur,ProductGallery:Hr,ProductTile:Kr,RichTextBlock:Wr,RollupItem:Gi,SafeDepositRental:_s,StepsBlock:$s,Tabs:lo,TariffsTable:ho,TextBlock:go,Tile:vo,VerticalLayout:vr};const wo=["Header","Footer"],So=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function ko(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!wo.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?fl(So)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Co=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(jt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Io="cookie",To=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:r}]=_e();((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(Io)||n()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(Io,"true"),r()}),[]);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-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(de,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(xa,{isRemote:!0,className:Bo(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(xa,{isRemote:!0,className:Bo(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Co,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),Bo=e=>w("inline mx-2xs",e?"text-green-dark":"");const Ro=({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((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:zs(e)}}))),[c,d]),l},Mo=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Ro({onCloseAll:e,onClose:t}),{close:n}=O();return a((()=>{const e=({key:e})=>{"Escape"===e&&n()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[n]),a((()=>{l.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Vo=h();const _o=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Po()}))),Po=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},zo=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Vo.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Vo.like(e))}),[e]),dislike:i((async()=>{l(await Vo.dislike(e))}),[e])}}(J().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(_o,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(_o,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),jo=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return ko(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Qn(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[ea({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Qn(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(zo,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Mo,{}),u(To,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));jo.childrenTypes=[],jo.slots=()=>["header","footer"];e.Blocks=No,e.ContentPage=jo,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=G,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.6",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=J,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),s=l("useMemo"),r=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,s=n||i&&i();return e(Object.assign(a,s&&{children:s}),l)}return t.inheritAttrs=!1,t};class f{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 b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=r(null),i=s((()=>({threshold:v(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 v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...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","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:s="p-xl",padding:r,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",r||s,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[s,o]=n(!1),[c,d]=n({}),m=r({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=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:s||c[e],onChange:m.current[e]}}),[l,s,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:s||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},M=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],V=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],P=e=>null!=e,z=new Map;function j(e,t,{fallback:l,cache:i}={}){const r=s((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(r)?r:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!r.some(P)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(P(n))return n;const a=e(l);return P(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...r));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,r]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function E(e,t){try{return e?await D(e,t):null}catch(e){console.error(e)}return null}async function D(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const L=[];function $(){const{data:e}=j("/api/v1/regions",D);return e||L}const O=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:H});const W=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||X(t,d.CDN))return t;const n=t.startsWith("/");return H(X(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},X=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function J(){return J._impl()}function Y(e={}){const{isRemote:t,basePath:l}=e,n=J(),{closeAll:a}=O();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:l,onClick:i}){return s=>{i&&i(s),e&&!t&&U(e,l)&&(a(),s?.preventDefault(),n.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},J._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),J.setup=e=>{J._impl=e};const q={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",Q={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},ee="text-center font-sans select-none",te={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},le=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ne(e),"flex gap-xs"),children:[n?u("div",{className:te[i],children:n}):null,ae(e)?p("div",{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:te[i],children:a}):null]})})),ne=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["group/btn items-center justify-center",ae(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ae=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ie=({className:e,rounded:t,version:l})=>["inline-block",ee,l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[ee,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=g((({disabled:e,children:t,...l})=>{const n=Y()(l),a=t??u(le,{...n});return u(e?ce:oe,{...n,children:a})})),oe=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:s,onClick:r,children:o})=>u("a",{className:se({className:e,version:i,rounded:s}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:r,children:o}))),ce=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ie({className:e,rounded:n,version:l}),children:a}))),de=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),he=g((({link:e})=>p(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(me,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(re,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(me,{children:e.text})}):null]}))),ue=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},pe=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:s="text",label:r,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[r?u("div",{className:"mb-xs",children:u(me,{size:"text-m",font:"font-light",children:r})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:s,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),ge=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(pe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),xe=e=>"_"===e,fe=e=>/\d/.test(e),be=e=>xe(e)||fe(e),ye=[..."+7 (___) ___-__-__"],ve=ye.findIndex(xe),Ne=ye.map(((e,t)=>be(e)?ye.slice(0,t).filter(be).length:-1));const we=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ye.map(((e,l)=>fe(e)?e:t.charAt(Ne[l])||e)),n=Ne.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(ve,n)):l).join("")}(e))),[t]);return u(pe,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Se=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(we,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ke="Некорректно заполненное поле",Ce=_((e=>null!=e&&""!==e))(ke),Ie=_((e=>"string"==typeof e&&e.length>1))(ke),Te=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(ke),Be=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&Re.test(e))))(ke);var Re;const Me=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function _e(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),s=i((()=>l(!1)),[]),r=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:s,toggle:r}]}const Pe=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 s=0;s<e.length;s++){const r=Math.max(0,s-l),o=Math.min(s+l,t.length-1);for(let l=r;l<=o;l++)n[s]||a[l]||e[s]!==t[l]||(i++,n[s]=!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,s=0;i<e.length;i++){if(!l[i])continue;let r=s;for(;r<t.length;r++)if(n[r]){s=r+1;break}e[i]!==t[r]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),s=(l/e.length+l/t.length+(l-i/2)/l)/3,r=s>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return s+r*(1-s)};const ze={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},je=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...s})=>{const r=J(),o=W(r)(H(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Ee,{className:e,children:p("svg",{className:w(Ae(s.width),ze[i],"white"===i?"invert":"",t),...s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(s.style={height:`${s.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...s}))})),Ae=e=>e?"":"w-full h-full",Ee=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),De=g((({className:e="",label:t,options:l=[],value:s,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=_e(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=r(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[Le(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",He(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ue(s)||d}),u(je,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Oe(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:$e(l,b).map(Fe(S,g,(e=>e.key===s?.key)))})}):null]})]})})),Le=e=>e?u("div",{className:"mb-xs",children:u(me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,$e=(e,t)=>t?e.filter((e=>Pe(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Oe=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(pe,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,Fe=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:Ue(n)}),u(je,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),Ue=e=>e?.text||e?.key||"",He=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ke=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(De,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),We=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...ue(t("acquiringType"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)})})]}),Xe=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("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:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ge=e=>p("div",{children:[u(Xe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Xe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Je=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Ye={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},qe=M({acquiringType:Ce,region:Ce,fullName:Ce,inn:Te,name:Ie,phone:Be}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:s,phone:r,onlineCheckout:o,posTerminal:c}=e;V(qe(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:s,phone:r})}),[n]),[,{field:s,...r}]=R(Ye,a),o=$();return p("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),We({regions:o,field:s}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Me(s),Ge(s),Je(t),u(he,{link:l})]})})),Qe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...ue(e("mail"),Ce)})]})]}),et=({regions:e,field:t})=>u(Ke,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)}),tt={name:"",phone:"",inn:"",mail:""},lt=M({region:Ce,name:Ie,phone:Be,inn:Te,mail:Ce}),nt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:s}=e;V(lt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:s})}),[n]),[,{field:s,...r}]=R(tt,a),o=$();return p("form",{className:"container space-y-s",onSubmit:r.onSubmit,children:[et({regions:o,field:s}),Qe(s),Je(t),u(he,{link:l})]})})),at=[];const it=async e=>await E(e,{method:"GET"})||at,st=["От 1 000 ₽","До 1 000 000 000 ₽"],rt=["От 1 мес","До 15 лет"],ot=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...ue(e("annualRevenue"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),ct=(e,{normalize:t,format:l})=>{const{value:a,onFocus:s,onBlur:r,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),s&&s(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),r&&r()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},dt=(e,t,l)=>Math.max(t,Math.min(e,l)),mt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function ht(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ut({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:s}){const r=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(r-t)/(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:"w-2 h-2 rounded-full "+(r<=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:r,disabled:i,onInput:t=>{const l=ht(t.target?.value),n=e.length?e[l]:l;s&&s(n||0)}})})]})}const pt=1,gt=100,xt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:s=(a.length?0:pt),max:r=(a.length?a.length-1:gt),step:o=1,value:c=a[0]||s,disabled:d=!1,onChange:m}=e,h=ct(e,{normalize:(e=0)=>a.length?ft(a)(e):dt(e,s,r),format:mt()}),g=i((e=>{m&&m(ht(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(me,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ut({list:a,min:s,max:r,step:o,disabled:d,value:c,onChange:m})]}),bt(n)]})})),ft=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),bt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),yt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(xt,{items:st,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(xt,{items:rt,min:1,max:180,...e("term")})]})]}),vt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(l("region"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...ue(l("department"),Ce)})})]}),Nt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},wt=M({fullName:Ce,annualRevenue:Ce,inn:Te,name:Ie,phone:Be,region:Ce,department:Ce}),St=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:s,phone:r,mail:o,region:c,department:d,annualRevenue:m}=e;V(wt(e))&&l({typeForm:"cred",fullName:a,inn:i,name:s,phone:r,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:s,...r}]=R(Nt,n),o=$(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,it);return t||at}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),yt(s),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),ot(s),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),vt({regions:o,branches:c,field:s}),Je(e),u(he,{link:t})]})})),kt={name:"",phone:""},Ct=M({name:Ie,phone:Be}),It=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;V(Ct(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:s,...r}]=R(kt,a);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Имя",...ue(s("name"),Ie)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(s("phone"),Be)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(he,{link:l})}),Je(t)]})]})})),Tt={};function Bt(e,t=Tt){const{data:l}=j(e?`/wcms-resources/${e}.json`:null,D,{fallback:t});return l||Tt}const Rt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Bt(l||"regions-grant-support"),[i,s]=n({key:""}),r=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Ke,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:s}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",r),children:t?.text?t.text:"Перейти"})}):null]})})),Mt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Vt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=J();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Mt).map((({src:e,format:l,media:i},s)=>u("source",{srcSet:Pt(a,n)(e),type:zt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${s}_${e}`))):null,t?.src?_t({...t,src:Pt(a,n)(t.src)},l):null]})})),_t=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),Pt=(e,t)=>l=>l&&!F(l)?W(e)(H(t,l)):l,zt=e=>e?`image/${String(e)}`:void 0,jt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(je,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(Vt,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),At=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...s})=>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)=>u("path",{d:e,fill:t||"currentColor",...s,...l},n)))}))),Et=[{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"}],Dt=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:s})=>{const r=i((e=>{n||(e.preventDefault(),s&&s(!t))}),[s,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(At,{paths:Et,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:r,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Lt(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(me,{size:"text-l",font:"font-light",children:l})}):null]})})})),Lt=e=>w("rounded border",e?"bg-primary-main":""),$t=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(Dt,{text:"Валютный контроль",...e("currencyControl")}),u(Dt,{text:"Документарные операции",...e("documentaryOperations")}),u(Dt,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ot=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...ue(e("fullName"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"ФИО",...ue(e("name"),Ie)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(Se,{className:"shrink-0 w-full mb-s",label:"Телефон",...ue(e("phone"),Be)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...ue(e("mail"),Ce)})})]})]}),Ft={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Ut=M({fullName:Ce,name:Ie,phone:Be,mail:Ce}),Ht={ApplicationFormBusinessCard:nt,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:s,documentaryOperations:r,conversionOperations:o,text:c}=e;V(Ut(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${s}/Документарные операции=${r}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:s,...r}]=R(Ft,a);return p("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ot(s),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),$t(s),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[Je(t),u(he,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm: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(jt,{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(jt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:It,ApplicationFormCredit:St,ApplicationFormAcquiring:Ze,ApplicationFormGrantSupport:Rt},Kt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(jt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Wt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Xt=g((e=>{const{className:t,formBlock:l,...a}=e,[s,r]=n(""),o=i((async e=>{const t=await Wt.send(e)?"OK":"Fail";return r(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Gt(l,o):null,s?u(Kt,{responseType:s}):null]})})})),Gt=(e,t)=>{const l=e?.formType;if(!l||!(l in Ht))return null;return u(Ht[l],{...e,onSubmit:t})},Jt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Yt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const s=String(n?.width||t);return a?u("div",{style:{width:`${s}px`,height:`${s}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Jt[l],e),children:u(je,{...i,width:"54%",height:"54%",name:a})}):null})),qt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(Zt)}):null]}))),Zt=(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(Yt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(jt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Qt(e.description)]}):null]},String(t)),Qt=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?tl(e):el(e)}):null},el=e=>e?.name||null,tl=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},ll=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(nl(l))}):null,nl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:s,...r}=t||{},o="secondary"===s?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(re,{className:w("basis-full sm:basis-auto",e),appendLeft:al({...a,iconVersion:c}),appendRight:al({...i,iconVersion:c}),version:s,text:n,...r},l?String(l):""):null},al=e=>e?.icon||e?.src?u(jt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,il={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"}},sl={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},rl=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:s,isEmbedded:r=!1,isTheme:o=!1,...c})=>{const d=il[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(r?"@container-normal":"",e),defaultPadding:r?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:s||d?.title.as,title:n}):null,a?u(de,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),ol=g((({className:e="",title:t,description:l,bonusItems:n=[],...a})=>u(k,{className:e,defaultPadding:"p-6xl",...a,children:p("div",{className:"container",children:[u(rl,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"space-y-xs flex flex-col grow w-full sm:w-[49%] border border-gray p-m",children:[u("div",{className:"grow",children:u(rl,{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:ll(e?.buttons)}),e.bonusItemContent?.bonusType?cl(e.bonusItemContent):null]})]},String(t)))):null})]})}))),cl=e=>"count"===e.bonusType?dl(e):ml(e),dl=e=>p("div",{className:"w-full pt-default mt-s flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-10",children:u("span",{className:"font-mohave text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(me,{size:"text-h2",children:e.bonusName})}):null]}),ml=e=>e.image?u(jt,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,hl=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),ul=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:s,onIntersection:r})=>{const o=y(i((e=>{e.length&&r&&r(l||0,e[e.length-1])}),[r,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:s})})),pl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],gl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:s=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=r([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(fl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?xl(s,b):{},...y?hl(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(ul,{className:w(c,n?pl[n-1]:"",y?"h-full":""),style:v?xl(s/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),xl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),fl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),bl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},yl={"horizontal-list":"w-6","vertical-list":"h-6"},vl=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",bl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?yl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),Nl=e=>e,wl=(e=Nl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Sl=wl(),kl=(e=Nl)=>wl((t=>-e(t))),Cl=kl(),Il=e=>t=>e.scrollWidth/t,Tl=e=>(t,l)=>{e.scrollBy({left:l*Il(e)(t),behavior:"smooth"})},Bl=({itemCount:e,onVisibleIndicesChange:t})=>{const l=r(null),[a,s]=n([]),o=i((e=>{s((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?[kl()(a),wl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Tl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Tl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[l,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Rl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:s,onVisibleIndicesChange:r,listType:o="horizontal-list"})=>{const c=Array.isArray(s)?s.length:0,[d,m]=Bl({itemCount:c,onVisibleIndicesChange:r}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(gl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:s}),a?u(vl,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Ml="text-left",Vl=(e,t,l)=>u(Rl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(me,{size:"text-h6",font:"font-normal",align:Ml,children:t}):null,e?u(jt,{image:e,height:"180",className:"w-auto"}):null,l?u(me,{size:"text-h6",font:"font-normal",align:Ml,children:l}):null]},String(n)))({...e},t)))}),_l=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...s})=>p(k,{className:l,defaultPadding:"p-6xl",...s,children:[u(rl,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?Vl(e):null]}))),Pl={start:"justify-start",center:"justify-center",end:"justify-end"},zl=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",Pl[l]):"";return u(k,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:ll(e)})})),jl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:s})=>{const[r,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:r,onToggle:c}),m=s?s({isUnfolded:r,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Al=g((({className:e="",isUnfolded:t,children:l})=>{const n=r(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),El=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(me,{size:"text-h3",children:[n," ",mt(2)(Math.round(t))," ",l]})}:{children:u(me,{size:"text-h3",children:"-"})})]}))),Dl=Math.round(23.5),Ll={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},$l={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ol={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Fl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ul={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Hl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:s=2})=>p("div",{children:[u(me,{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:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(s)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Kl=e=>e?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Wl({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${mt(2)(l.min||0)} ₽`,`До ${mt(2)(l.max||0)} ₽`];return u(xt,{items:e?n:[],step:t,...l})}function Xl(e){const{data:t}=j(`/wcms-resources/${e}.json`,D);return t}const Gl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Xl(t||"bonus-calculator-data")||Ol,[i,s]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:s,prefTravelBonusRate:r,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(r*t)+Math.round(o*l),i);return[m,m*s+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-s)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:s}},Jl=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:s,maxSumTravel:r,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Gl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма покупок в категории путешествия, ₽",min:s,max:r,step:500,isShowItems:!1,...i("travelExpenseValue")}),Wl({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Hl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(El,{title:"Баллов за год",value:m}):null,ll(l,{isVertical:!0}),Kl(n)]})]})})),Yl=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},ql=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Zl([e,t],n),Zl=([e,t],l=[])=>({[e]:l.length?Cl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Sl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Ql=(e,[t,l],n)=>e>=n[t]&&e<=n[l],en=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,tn=(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)},ln=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,nn={horizontal:"gap-5xl",vertical:"flex-col gap-s"},an=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${nn[a]}`,l),children:e?.map((({id:e,text:l})=>u(Dt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),sn=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(me,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(an,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),rn=e=>sn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),on=g((({title:e="Ставка"})=>p("div",{children:[u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(je,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(de,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),cn=({rate:e,depositeName:t,isShowDepositeName:l})=>u(Hl,{rate:e,depositeName:t,isShowDepositeName:l,rateBlockClassName:"tracking-[-25px]",unit:"%"}),dn=({rate:e})=>u(El,{title:"Ставка",value:e,postfix:"%"}),mn=e=>e.isShowUnknownRate?u(on,{}):p("div",{children:[u("div",{className:"hidden md:block",children:cn(e)}),u("div",{className:"md:hidden",children:dn(e)})]}),hn=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[s,{field:r}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:s,isMonthlyInterestPayment:r}=e,o=Xl(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...Ul,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&s===e.isSmallBusiness&&en(c,e)&&Ql(n,["minSum","maxSum"],e)&&Ql(l,["minDays","maxDays"],e)))||Ul,{rate:h}=m,u=tn(h,e),p=n+u,g=o?.rateRows||[Ul];return{...m,...Zl(["minSum","maxSum"],g),...Zl(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(s,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...r("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...r("daysValue"),value:o.daysValue},u(xt,{items:[`От ${ln(x.min||0)}`,`До ${ln(x.max||0)}`],step:1,...x})),un(o,r),rn({title:"Выплата процентов",orientation:"vertical",...r("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),mn({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[pn(d,c),ll(l,{isVertical:!0}),Kl(n),Kl(a)]})]});var x})),un=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Dt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Dt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(Dt,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),pn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(El,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(El,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),gn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(xt,{items:[`От ${xn(e)}`,`До ${xn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),xn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,fn=e=>bn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&bn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&bn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&bn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),bn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],yn=(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)},vn=(e,t,l)=>{let{moneyValue:n,monthsValue:a}=e;const i=Xl(t||"credit-calculator-data"),r=i?.rateRows||[Ll],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>fn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=ql(["minSum","maxSum"],o,r),{minMonths:m,maxMonths:h}=ql(["minMonths","maxMonths"],o,r);n=dt(n,c,d),a=dt(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>fn({row:e,userInputParams:t,paramsViewSettings:l})&&Ql(n,["minSum","maxSum"],e)&&Ql(a,["minMonths","maxMonths"],e)))||Ll)({rateRows:r,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=yn(p,e);return s((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},Nn=e=>sn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),wn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[s,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Dl}),o=vn(s,t,a),c=Nn({title:i?"Тип платежа":"",orientation:"vertical",...r("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...r("moneyValue"),value:o.moneyValue}),gn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...r("monthsValue"),value:o.monthsValue}),Sn({...o,...a},r),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),mn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(El,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),ll(l,{isVertical:!0}),Kl(n)]})]})})),Sn=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Dt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Dt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),kn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Xl(t||"deposit-calculator-data"),s=i?.rateRows?.[0]?Tn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,r=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>In({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&In({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Ql(n,["minSum","maxSum"],t)&&Ql(a||s,["minMonths","maxMonths"],t)))||Fl,{rate:d}=c,m=Cn(d,e),h=n+m,u=i?.rateRows||[Fl];return{...c,...Zl(["minSum","maxSum"],u),...Zl(["minMonths","maxMonths"],u),availableMonths:Yl(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:s,income:m,finalSum:h}},Cn=(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)},In=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Tn=(e,t)=>e+Math.round((t-e)/2),Bn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[s,{field:r}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=kn(s,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=r("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...r("moneyValue"),value:o.moneyValue}),gn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...r("monthsValue"),value:o.monthsValue}),Rn({...o,...i},r)]}),u("div",{className:"border-b border-main-divider md:hidden"}),mn({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(El,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(El,{title:"Сумма в конце срока",value:h,postfix:"₽"}),ll(l,{isVertical:!0}),Kl(n)]})]})})),Rn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?rn({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},sn({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Mn=e=>Vn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Vn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Vn({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Vn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],_n=(e,t,l)=>{let{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e;const o=Xl(t||"refinancing-calculator-data"),c=o?.rateRows||[$l],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Mn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=ql(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=ql(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=ql(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=ql(["minMonths","maxMonths"],d,c);n=dt(n,m,h),i=dt(i,u,p),r=dt(r,g,x),a=dt(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s})=>e?.find((e=>Mn({row:e,userInputParams:t,paramsViewSettings:l})&&Ql(n,["minSum","maxSum"],e)&&Ql(i,["minSumOld","maxSumOld"],e)&&Ql(s,["minSumExtra","maxSumExtra"],e)&&Ql(a,["minMonths","maxMonths"],e)))||$l)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:v}=y,N=yn(v,e),w=e.oldMonthlyPayment-N;return s((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:N,benefit:w})),[e,o])},Pn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),r=_n(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Остаток долга в других банках, ₽ ",step:500,min:r.minSum,max:r.maxSum,...s("moneyValue"),value:r.moneyValue}),Wl({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:r.minSumOld,max:r.maxSumOld,...s("oldMonthlyPayment"),value:r.oldMonthlyPayment}),gn({title:"Новый срок кредита, месяцев",min:r.minMonths,max:r.maxMonths,...s("monthsValue"),value:r.monthsValue}),zn({...r,...a},s),r.isExtraMoney?Wl({title:"Дополнительная сумма, ₽ ",step:500,min:r.minSumExtra,max:r.maxSumExtra,...s("moneyExtra"),value:r.moneyExtra}):null]}),u(Hl,{title:"Ставка",rate:r.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(El,{title:"Ежемесячный платеж",value:r.monthlyPayment,postfix:"₽"}),r.benefit>0?u(El,{title:"Выгода в месяц",value:r.benefit,postfix:"₽"}):null,Nn({orientation:"vertical",...s("isAnnuity")}),ll(l,{isVertical:!0}),Kl(n)]})]})})),zn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(Dt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),jn={CreditCalculatorForm:wn,DepositCalculatorForm:Bn,BusinessDepositCalculatorForm:hn,BonusCalculatorForm:Jl,RefinancingCalculatorForm:Pn},An=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:Dn(t)}))),En=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in jn))return null;return u(jn[t],{...e.calculatorBlock,isMobile:!0})},Dn=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:En(e[0])}):e.map(((e,t)=>u(jl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Al,{isUnfolded:t,children:u(k,{children:En(e)})}),renderFoldButton:Ln(e)},t.toString())))},Ln=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(je,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(me,{align:"text-left",color:"text-white",children:e.nav?.title}),u(me,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(je,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),$n=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:s=0,...r}=e,o=ct(e,{normalize:(e=a)=>l&&n?String(dt(Number(On(e)),l,n)):On(e),format:mt(s)}),c=i((e=>t&&t(On(e))),[t]);return u(pe,{onChange:c,...r,...o})})),On=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Fn=g((e=>u($n,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(me,{size:"text-xl",font:"font-light",children:"₽"})})}))),Un={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Hn={amount:1500,_amount:1500},Kn=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...s})=>{const[{amount:r,_amount:o},{field:c}]=R(Hn),d=r<=0,m=d?ie({version:a?.version}):se({className:"text-white",version:a?.version}),h=Y();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Un[i],children:[u(Fn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Wn=g((({className:e,disabled:t,...l})=>u(re,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(jt,{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"})}))),Xn=g((e=>u(Wn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Gn=g((e=>u(Wn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Jn="absolute top-[calc(50%-24px)] z-40",Yn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",qn=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:s,onScrollRight:r})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),s()):d()}),[d,s,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),r()):m()}),[m,r,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Zn(e),h?u(Xn,{className:w(Jn,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Gn,{className:w(Jn,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Zn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Yn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Yn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Qn=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),ea=[];function ta(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Qn,blocksRegistry:s={},ancestors:r=ea}=t,{type:o}=e;o&&o in s||console.warn(`No block with "${o}" is registered`);const c=o&&s[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:r,render:({block:l,blockClassName:i})=>{const{content:s}=l;return c?u(c,{className:i,block:e,options:t,...s,...n},a):null}},a)}const la=[],na=(e,{key:t,ancestors:l=la,slotName:n=null,extraProps:a,renderProps:i=ta,...s})=>{const r=a?(e,t)=>ta(e,t,a):i;return(e||[]).map(((e,a)=>r(e,{...s,key:`${t||e.type}-${a}`,ancestors:s.parent?[...l||la,[s.parent,n]]:l},a)))};function aa({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?na(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const ia=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(je,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(de,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),sa="relative h-full",ra={normal:"sm:min-w-96",big:"sm:min-w-[515px]"},oa=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ma);return aa({...n,renderProps:(n,a,s)=>p("div",{className:ca(n,{someCardsHighlighted:i}),children:[ta(n,a,{className:da(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:s,isActive:s===t}),ma(n)?ia({className:"absolute top-0 -right-4 z-40"}):null]})})},ca=(e,{someCardsHighlighted:t})=>w(sa,t&&(ma(e)?"pt-3xl":"pt-3xl sm:pt-16")),da=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(sa,"min-w-80",ra[n],t&&(ma(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),ma=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ha=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:s,showDots:r,arrowsPadded:o=!0,isGap:c=!0,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},g=t||h?.length,[x,{inc:f,dec:b}]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[s,r]=n(t),o=i((()=>r((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>r((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&s<l-a:s<l-1,m=s>0;return[s,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:g,visibleItemCount:l},Math.floor(l/2)),[y,v]=Bl({itemCount:g}),[N]=v.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...m,children:p("div",{className:w(s?"flex justify-center":"","relative max-w-full"),children:[u(gl,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:oa({noCardBorder:a,activeIndex:x,cardSize:d,...m})}),u(qn,{scroll:v,arrowsPadded:o,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:S,activeIndex:x,itemCount:g}),r?u(vl,{containerRef:y,activeIndex:N,dotCount:g,listType:"horizontal-list"}):null]})})}));ha.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],ha.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const ua=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(rl,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),pa="z-10 border border-solid w-full h-full",ga=w(pa,"absolute hidden sm:block border-transparent"),xa=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(ga,"top-9 right-12 bg-green-dark")}),u("div",{className:w(ga,"top-6 right-8 bg-green")}),u("div",{className:w(ga,"top-3 right-4 bg-green-light")}),p("div",{className:w(pa,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(rl,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),ll([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),fa={black:"bg-black",white:"bg-white"},ba=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:s,...r})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...r,children:[n?.src?u(jt,{className:"flex justify-center mb-xl",image:n}):null,u(rl,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),s?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),s.map(ya)]}):null,a?p(me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,ll([i],{buttonClassName:"w-full mt-lg"})]}))),ya=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${fa[e]}`},String(t)),va="bg-transparent border-white border h-[70px] absolute w-80 top-0",Na=g((({text:e,href:t="",target:l="",className:n=""})=>{const a=Y()({href:t,target:l});return e?p("div",{className:w("flex max-w-sm relative group/link cursor-pointer w-64 h-16 sm:w-[47%] sm:h-20 sm:mr-m",n),children:[p("a",{className:w("absolute border border-primary-main px-xl py-lg\n text-l font-light bg-white text-primary-text flex\n justify-between items-center group-hover/link:text-primary-main z-10","rounded-md sm:rounded-none w-full h-12 sm:ml-s sm:w-full sm:h-auto"),role:"link",...a,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6 hidden sm:block",children:u(jt,{className:"w-4 h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24"})})]}),u("div",{className:va+" hidden sm:block mx-1.5 mt-1.5"}),u("div",{className:va+" hidden sm:block mt-3 mr-3"})]}):null})),wa=g((({className:e,additionalDescription:t,description:l,links:n,title:a,maxLinksCount:i=10,...s})=>p(k,{className:w("flex flex-col sm:flex-row w-full overflow-hidden",e),...s,children:[p("div",{className:"mr-xl flex-auto",children:[u(rl,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),t?u(rl,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0}):null]}),n?.length?Sa(n,i):null]}))),Sa=(e,t)=>{const l=Math.ceil(e.length/t);return u(ha,{className:"@container-normal sm:w-2/3 w-full p-0 sm:p-xs",version:"secondary",itemCount:l,arrowsPadded:!1,showDots:!1,children:new Array(l).fill(null).map(((l,n)=>u("div",{className:w("flex flex-wrap self-start w-full sm:w-[672px]"),children:e.slice(n*t,(n+1)*t).map(((e,t)=>u(Na,{className:"sm:m-2xs",...e},String(t))))},String(n))))})},ka=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=Y({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),Ca={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"},Ia=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",Ca[n])})}):null,u("span",{children:l})]}))),Ta={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Ba={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Ra=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",Ta[a],t?Ba[a]:"",e),role:"list",children:n.map(((e,t)=>u(Ia,{isDotted:l,size:a,children:e},String(t))))}):null)),Ma=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:s,icon:r,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(ka,{className:"p-m flex flex-col gap-xs",href:s,target:u,children:[_a(i,g),Pa(a),ja(h,o,x),za(e),Va(r,d,m)]}),ll([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),Va=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(jt,{className:"shrink-0",image:e}):null,e?.icon?u(jt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),_a=(e,t)=>t?u(me,{size:sl[e],children:t}):null,Pa=e=>e?u(de,{size:"text-l",children:e}):null,za=e=>e?u(me,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,ja=(e,t,l="primary")=>e?.length?u(Ra,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Aa={start:"self-start",center:"self-center",end:"self-end"},Ea=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:s,rightImage:r,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Da(s,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",s?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Da(r,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Da=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("md:flex-shrink-0",l&&Aa[l],t),children:e}):null,La=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,$a=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 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(jt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Oa=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Fa=(e,t)=>e?u(de,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ua=(e,t)=>e?u(me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ha=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Oa,{...e},`rte-${t}`):["label"in e?Ua(e.label,t):null,"description"in e?Fa(e.description,t):null],Ka=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?$a(l.icon,t):null,u("div",{children:Ha(l)})]}))),Wa=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Xa=e=>{return((t=e.map(Wa))?.length?Math.sqrt(Math.abs(La(t.map((e=>e**2)))-La(t)**2)):0)>16;var t},Ga=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ja=e=>!e.some(Ga),Ya=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Xa(l)||Ja(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ka,{benefitsVersion:t,...e},String(l))))}):null)),qa=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Ha)}):null)),Za=g((({isTabularBenefits:e,...t})=>u(e?qa:Ya,{...t}))),Qa=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(ei)}):null)),ei=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(me,{size:"text-m",font:"font-light",children:e})},String(t)),ti=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:s="text-left",isInsetTitle:r=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(jt,{image:y}):null,C=u(rl,{title:n,description:a,headlineVersion:i,align:s,isEmbedded:!0});return u(Ea,{className:e,padding:t,defaultPadding:l,...r?{insetTitle:C}:{title:C},...w?{backImage:k}:li(k,N),imageAlign:v,buttons:ll(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Za,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(Oa,{__html:m}):null,h?.length?u(Ra,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Qa,{tags:f}):null]})})})),li=(e,t)=>t?{rightImage:e}:{leftImage:e},ni=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...s})=>u(k,{className:e,defaultPadding:"p-3xl",...s,children:u(ka,{className:"flex items-center h-full",href:a,target:i,children:u(ti,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),ai={default:"w-14 h-14",stretched:"flex-1 h-14"},ii=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",ai[t]),si=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],ri=e=>si.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},oi=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:s=""}=n,{iconMapped:r,label:o}=ri(a),c=ci(l)??r;return u(re,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",ii(s,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:s,version:i,...n,children:c&&!s?u(jt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),ci=e=>e?.src||e?.icon?e:void 0,di=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(oi,{buttonSize:n,...e},String(t))))})]}))),mi=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:s,title:r,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(ka,{href:l,target:s,className:"space-y-lg",children:[u(rl,{title:r,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(Ra,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,hi(n),i.length?u(di,{media:i}):null]})}))),hi=e=>e?.src||e?.icon?u("div",{children:u(jt,{image:e})}):null,ui=(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(me,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(me,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:ll(a)}):null]},String(t))},pi=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...s})=>{const r=i.map(ui),o=r.slice(0,1),c=r.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...s,children:[gi(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(re,{className:"w-full mt-m",...a}):null,i.length?u(jl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Al,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?xi:null}):null]})})),gi=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(jt,{image:e}):null}),xi=({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(je,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),fi=(e=!1)=>e?"text-white":"",bi=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),yi=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(jt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(jt,{image:t})}),l?u(T,{headingType:"h4",className:fi(a),title:l}):null,n?u("div",{className:bi(a),children:n}):null]}))),vi=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Ni(l,t))})}))),Ni=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),wi=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const s=t?.slice(0,a?t.length:l),r=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(yi,{...e,isFillGradient:n}),s?.length?s.map((({rowHeader:e,cell:t},l)=>u(vi,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(re,{href:e.link.href,target:e.link.target,version:r,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Si({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Si=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),ki=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Ci,{...e})})]})})),Ci=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:s,...r})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(wi,{visibleRowLength:a,showRow:o[i],header:n,columnData:(s=e,s?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...r},String(i));var s}));return"horizontal"===s?u(Rl,{onVisibleIndicesChange:m,children:h}):h}));var Ii;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Ii||(Ii={}));const Ti=new Intl.NumberFormat("ru",{style:"currency",currency:Ii.RUB}),Bi=e=>e?Ti.format(e):"",Ri="text-left text-m font-light text-secondary-text",Mi=`${Ri} pl-5xl`,Vi={USD:"DollarIcon",EUR:"EuroIcon"},_i=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ri,children:u(me,{size:"text-m",children:"Валюта"})}),u("th",{className:Mi,children:u(me,{size:"text-m",children:"Купить"})}),u("th",{className:Mi,children:u(me,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Pi)})]}))),Pi=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(jt,{image:{icon:Vi[t]},width:"24",height:"24"}):null,u(me,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:Bi(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:Bi(e?.buyExchangeRate)})})]},t)},zi={icon:"GpsIcon"},ji=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Yt,{...zi,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:"Курс указан для заданного офиса"})]})]}))),Ai=(e,t,l)=>{const n=Number(Ei(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)},Ei=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Di=e=>{return(t=[[e=>e.value!==Ii.RUB&&e.oppositeValue!==Ii.RUB,()=>e.handleConvert(e.value,Ii.RUB)],[e=>e.value===Ii.RUB&&e.oppositeValue===Ii.RUB,()=>e.handleConvert(e.value,Ii.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Li(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:s}=e,r=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(pe,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),r.length?u(De,{isBorder:!1,onChange:e=>s(e.key),options:r,value:o}):null]})}const $i=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[s,r]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ii.RUB,selectBuy:l?.[0]?.currency?.currency||Ii.USD}),o=i((e=>r((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Li({placeholder:"Хочу продать",rates:l,selected:s.selectSell,setSelected:Oi(s,o,l),value:s.inputSell,setValue:e=>Ui(o,l)(e,s.selectSell,s.selectBuy)}),Li({placeholder:"Получу",rates:t,selected:s.selectBuy,setSelected:Fi(s,o,t),value:s.inputBuy,setValue:e=>Hi(o,t)(e,s.selectBuy,s.selectSell)}),a?.text?u(re,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Oi=(e,t,l)=>n=>{t({selectSell:n}),Di({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Ui(t,l)(e.inputSell,n,a)}})},Fi=(e,t,l)=>n=>{t({selectBuy:n}),Di({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Hi(t,l)(e.inputBuy,n,a)})},Ui=(e,t)=>(l,n,a)=>{e({inputSell:Ei(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(Ai(l,i,n===Ii.RUB)||"")})},Hi=(e,t)=>(l,n,a)=>{e({inputBuy:Ei(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(Ai(l,i,n===Ii.RUB)||"")})};const Ki=async e=>{const t=await Wi(),l=t?.code||"000";return{region:t,exchangeRates:await Xi(e,l)}},Wi=async()=>{try{return await D("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Xi=async(e,t)=>{try{return await D(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Gi=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Ki);return e||{}}(),i=Ji(a?.exchangeRate?.currencies),s=i.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ii.RUB}});const r=i.filter((e=>e.saleExchangeRate));return r.push({currency:{currency:Ii.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(Ea,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(_i,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(ji,{address:a?.address})]}),i.length&&s.length&&r.length?u($i,{className:"grow",currencyRatesBuy:s,currencyRatesSell:r,button:l}):null]})})})})),Ji=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Yi=e=>Bt(d.SITEMAP||"sitemap",e),qi=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(Zi)}):null)),Zi=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},Qi=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(jt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),es=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",ts=(e,t)=>u(Yt,{...e,iconBgVersion:t,className:"shrink-0"}),ls=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:s="primary",...r})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...r,children:u(jl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Al,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:aa({...r,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ns({version:s,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));ls.childrenTypes={exclude:["RollupItem"]};const ns=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const s=t||(a?"Скрыть":"Развернуть");return"primary"===e?as({label:s,labelIcon:l,labelIconBgVersion:n,icon:es(a),onToggle:i}):u(Qi,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},as=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[ts(a,t),e?u(me,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(je,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),is=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(ss):null,u(re,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),ss=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(me,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(rs)})]},String(t)),rs=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:os(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),os=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${cs(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})}},cs=e=>e.replaceAll(/\D/g,""),ds=g((({className:e="",index:t,text:l,...n})=>{const a=Y(),{href:i,target:s,onClick:r}=a(n);return u("a",{className:w("",e),href:i,target:s,onClick:r,children:l||`Документ ${t}`})})),ms=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(me,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(ds,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),hs=g((({className:e="",index:t,...l})=>{const n=Y({isRemote:!0}),{href:a,target:i,text:s,onClick:r}=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:r,children:s||`Документ ${t}`})})),us=g((({className:e="",links:t})=>p("div",{className:w("@container",e),children:[u("div",{className:"pt-lg",children:u(me,{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 @lg:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(hs,{index:t,...e},String(t))))}):null]}))),ps=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Yi(l),{relatedEnterprises:a,contacts:i,socialMedia:s,mobileApps:r,horizontalNavigationTitle:o,documents:c}=Bt(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(ls,{label:e?.text,labelIcon:e?.icon,children:u(qi,{items:e.items})},String(t))))}),u(is,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(di,{className:"mb-xl",media:s,buttonSize:"stretched",children:"Соцсети"}),u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:r?.map(gs)})]}),u(ms,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(us,{links:c})]})})),gs=({href:e="/"},t)=>{const{label:l}=ri(e);return u(re,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},xs={"bg-white":"color",transparent:"white"},fs={"bg-white":"text-primary-main",transparent:"text-white"},bs=(e,t,l)=>u(jt,t?.src?{image:t,className:fs[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:xs[e]},className:fs[e],width:l?.width,height:l?.height}),ys={"bg-white":"text-primary-text",transparent:"text-white"},vs=(e,t,l)=>u("span",{className:`${ys[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),Ns=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:s})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:s?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[bs(e,a?.image,{width:"34",height:"34"}),i?vs(t||a?.title,e,"text-s"):null]}))),ws={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Ss=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=J(),s=d.BASE_PATH?.startsWith(a.pathname),r=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[s?u(Ns,{className:"mt-2xs",bgColor:e,logo:t}):ks(r),l?u(re,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",ws["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),ks=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(jt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),Cs={"bg-white":"primary",transparent:"transparent"},Is=g((({bgColor:e="bg-white",version:t=Cs[e],...l})=>{const{logo:n,internetBankUrl:a}=Yi(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Ss,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Ts={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Bs=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...s})=>u(k,{className:w("relative flex flex-col",Ts[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...s,children:aa({...s,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));Bs.childrenTypes=[];const Rs=g((e=>u(Bs,{...e})));Rs.childrenTypes=[];const Ms=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(jt,{image:l})})})),Vs=["байт","Кб","Мб","Гб","Тб","Пб"],_s=g((({icon:e,text:t,fileSize:l,...n})=>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",...n,children:[e,t?p(me,{size:"text-l",font:"font-light",children:[t,u(me,{color:"text-secondary-text",children:n?.href&&Ps(zs(n.href),l)})]}):null]}))),Ps=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),zs=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},js={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},As=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:s="double",...r})=>{const o=J();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...r,children:[u(rl,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===s?"@md:grid-cols-2":"grid-cols-1",js[s]),role:"list",children:a.map(Es(o,s,i))}):null]})})),Es=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?W(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.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))} ${Vs[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(_s,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(jt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Ds={left:"text-left",center:"text-center",right:"text-right"},Ls=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(me,{size:"text-xl","font-weight":"light",children:e})}):null,$s=e=>e?.length?u(Ra,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Os=e=>{const t=e.length>2;return ll(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},Fs=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:s,items:r,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(Ea,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Ds[l])}):null,rightImage:s?.src?u(jt,{className:"hidden lg:block",image:s}):null,buttons:Os(n),children:[Ls(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(jt,{className:"w-fit",image:o})}):null,$s(r),s?.src?u(jt,{className:"lg:hidden",image:s}):null]})]})})})),Us=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Hs("Страховая сумма:",e):null,Number(t)>0?Hs("Ежемесячный лимит:",t):null]}):null,Hs=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(me,{font:"font-light",size:"text-l",children:e}),p(me,{size:"text-h6",color:"text-primary-text",children:[mt(2)(t)," ₽"]})]}),Ks=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:s,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(ti,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...s},...r,children:Us(Number(a),Number(i))})}))),Ws=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(rl,{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:Xs()})]}))),Xs=(e=3)=>Js(100,e).map((e=>Math.floor(e))).map(Gs),Gs=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Js=(e,t)=>[e].concat(t>0?Js(e/1.618,t-1):[]);function Ys({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",s={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(re,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...s,children:u(jt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(re,{version:"link",...s})]})}const qs=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?Ys(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(ti,{className:"grow h-full",...n})]}))),Zs=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(Rl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(ti,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Qs=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(ti,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...s,children:a?u(de,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),er=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:s,title:r,version:o="primary",...c})=>p(k,{className:w("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[tr(s),r?u(T,{headingType:"h4",as:"h3",title:r}):null]}),p("div",{className:"w-full space-y-m",children:[i?lr(i):null,nr("Адрес",e,"GeolocationIcon"),nr("Телефон",l,"PhoneIcon"),nr("E-mail",t,"MailIcon"),n?.text?ll([n]):null]})]}))),tr=e=>u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:e?.src||e?.icon?u(jt,{image:e}):null}),lr=e=>u("div",{className:"border-b border-main-divider",children:u(Oa,{__html:e})}),nr=(e,t,l)=>p("div",{className:"flex gap-m",children:[u(je,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col",children:[u(me,{size:"text-m",font:"font-light",children:e}),t?u(me,{size:"text-h6",color:"text-green",children:t}):null]})]}),ar=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Oa,{__html:t,richVersion:l})})})),ir=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function sr(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)}))}const rr={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"},or=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(rr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),cr={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},dr=(e,t,l)=>p("div",{className:`${Object.values(cr).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(je,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),mr={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"},hr=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(mr).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(je,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ur=e=>globalThis[e];const pr=()=>function(e,t){const[l,s]=n(),r=i((()=>s(ur(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",r),document.head.appendChild(e),()=>{document.head.removeChild(e),s(void 0)}}if(!ur(e))return l.addEventListener("load",r),()=>{l.removeEventListener("load",r)};r()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),gr={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"},xr=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(gr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(je,{name:l,width:"20",height:"16"})})})),fr={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"},br=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const s=r(null),o=pr(),[c,d]=n(),[m,h]=n(wr(ir)),g=yr(e);if(a((()=>{s?.current||o?.ready((()=>{s.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),sr(o,s.current,m)}))}),[o,s,m]),a((()=>{if(s.current&&m&&o){const e=m.length<1?wr(ir):m;sr(o,s.current,e)}}),[s,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?dr(ir,0,(e=>{if(e){const t=wr(e);h(t)}})):or(g)}),u("div",{className:`${Object.values(fr).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=s.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(je,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(xr,{yandexMaps:s}),u(xr,{yandexMaps:s,direction:"out"})]}),hr(s.current,o,`right-2 top-80 ${x}`)]})})),yr=e=>[Nr(vr(e,0)),Nr(vr(e,1))],vr=(e,t)=>e.map((e=>e[t])),Nr=e=>e.reduce(((e,t)=>e+t))/e.length,wr=e=>e?e.map((e=>e.coords)):null,Sr=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:s})=>{const r=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=r.find((e=>e.key===n));return u(De,{options:r,label:s,placeholder:a||n,onChange:e=>i(e.key),value:o})})),kr=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Cr=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),Ir=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(Cr,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(Cr,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Tr=["От 1 дня","До 365 дней"],Br=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(me,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(xt,{min:1,max:365,value:e,items:Tr,onChange:t})]}))),Rr=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Mr=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:s,safeBoxCases:r,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(kr,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Vr(c)}),u(Br,{days:a,setDays:e=>c({days:e})}),u(Rr,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:_r(c),safeBoxCases:r,selectedBoxSize:s,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(Ir,{}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Vr=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},_r=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Pr=g((({days:e,tariffs:t=[]})=>{const l=jr(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[zr("Аренда за",e),zr("Цена",l+" ₽")]}),u("span",{className:"sm: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 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(jt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),zr=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),jr=(e,t)=>{const l=Ar(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Ar=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},Er=(e,t)=>e.find((e=>e.branchCode===t)),Dr=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:s}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const r=Er(n,l.selectedBranch),o=Lr(r?.safeBoxCaseVolumes),c=$r(r?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Or(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(Mr,{...l,regions:t,onClick:s,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Pr,{days:l.days,tariffs:d})]})})),Lr=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],$r=(e,t)=>e?.find((e=>e.volume===t)),Or=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Fr=[];const Ur=async e=>await E(e,{method:"GET"})||Fr,Hr=g((({title:e,footnote:t,className:l="",...a})=>{const[s,r]=n(!1),o=i((()=>r((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=$(),h=Kr(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ur);return t||Fr}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Er(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Dr,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(de,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&s?u(br,{points:f,className:"h-[640px]"}):null]})})),Kr=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Wr(e){throw new Error(e)}const Xr=e=>Boolean(e?.icon||e?.src),Gr={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Jr={normal:"",small:"min-h-6xl"},Yr={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"},qr=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:s="primary",...r})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...r,children:[u(rl,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Zr(i,s))})}):null,ll(a,{isVertical:!0})]}))),Zr=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Qr(e,t)(l,n);case"rte":return u(Oa,{__html:l.__html});default:Wr(l)}},Qr=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:eo(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Jr[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Yr.description),children:l.description}):null]})]})},String(n)),eo=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",s=Boolean(l?.icon?.src),r=Gr[e][s?"image":"icon"];return u("div",{className:w(r,s?"":`rounded-md ${Yr.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Xr(l?.icon)?u(jt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},to={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},lo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},no={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},ao={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},io=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:s,appendRight:r,...o}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",to[n],l?ao[n]:no[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?lo[n]:"text-secondary-text hover:text-primary-main"),children:[u(me,{size:"text-m",children:s}),r?u("div",{className:"ml-xs",children:r}):null]})})})),so=g((e=>u(e?.item?.href?ro:oo,{...e}))),ro=g((e=>{const t=Y(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(io,{...e,tag:"a",item:a,onClick:n})})),oo=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(io,{item:e,onClick:n,...l})})),co=(e,t,l)=>(n,a)=>u(so,{isActive:n===e,onClick:t,type:l,item:n},String(a)),mo="hidden sm:flex absolute z-40 top-0",ho=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,s]=Bl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(gl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,children:t.map(co(l,n,a))}),s.canScrollLeft?u(Xn,{className:w("left-6",mo),onClick:s.scrollLeft}):null,s.canScrollRight?u(Gn,{className:w("right-6",mo),onClick:s.scrollRight}):null]})})),uo=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(co(n,a,t))}))),po=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(uo,{...t});case"centered":return u("div",{className:"flex",children:u(uo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(ho,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},go=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:r,...o})=>{const c=s((()=>l.map(fo)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&xo(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),xo(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:po({items:c,value:c[d],tabsMode:r,onChange:h})})})),xo=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},fo=e=>"group"===e?.type?{text:e.title}:e,bo={Buttons:({buttons:e})=>ll(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(jt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(Ra,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},yo=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(me,{size:"text-l",font:"font-light",children:e}):null,t?u(jt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),vo=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(yo,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:No(e,t)},String(l)))):null]})));function No(e,t){if(!e||!e.tableCellType||!(e.tableCellType in bo))return null;const l=bo[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const wo=g((({tiles:e,...t})=>e?.length?u(Rl,{...t,padding:void 0,children:e.map(((e,l)=>u(vo,{tile:e,...t},String(l))))}):null)),So=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(vo,{tile:e,...t},String(l))))}):null)),ko=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...s})=>{const r=Co(n),o=Io(a,r);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(rl,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?So:wo,{tiles:o,...s})]})})),Co=e=>e?.[0]?.data?e[0].data:[],Io=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),To=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:s=[],...r})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===n?Bo():null,"big"===n?Ro(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Mo(l):null,s?.length?Vo(s,!0):null,i?u(Oa,{__html:i}):null]})]}))),Bo=()=>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"}),Ro=e=>e?.src?u(jt,{className:"h-fit flex-shrink-0",image:e}):null,Mo=e=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Vo=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(me,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),_o=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(ti,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),Po={ApplicationForm:Xt,BenefitsBlock:qt,Bonus:ol,BonusBenefitsBlock:_l,ButtonsBlock:zl,Calculator:An,CardTransfer:Kn,Carousel:ha,CarouselBankHistoryCard:ua,CarouselCard:xa,CarouselCatalogCard:ba,CarouselLinks:wa,CarouselProductCard:Ma,CarouselProgramsCard:ni,CarouselRecommendationCard:mi,CarouselTariffsCard:pi,ComparisonTable:ki,ExchangeRateTile:Gi,Footer:ps,Header:Is,Headline:rl,HorizontalLayout:Rs,ImgBlock:Ms,LinkDocs:As,MobileAppTile:Fs,PictureText:Ks,Placeholder:Ws,ProductBlock:qs,ProductGallery:Zs,ProductTile:Qs,RepresentativeOfficeInfo:er,RichTextBlock:ar,RollupItem:ls,SafeDepositRental:Hr,StepsBlock:qr,Tabs:go,TariffsTable:ko,TextBlock:To,Tile:_o,VerticalLayout:Bs};const zo=["Header","Footer"],jo=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Ao(e=globalThis){const t=r(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!zo.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?kl(jo)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Eo=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(jt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Do="cookie",Lo=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:s}]=_e();((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(Do)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Do,"true"),s()}),[]);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-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(de,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(ka,{isRemote:!0,className:$o(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(ka,{isRemote:!0,className:$o(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Eo,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),$o=e=>w("inline mx-2xs",e?"text-green-dark":"");const Oo=({onCloseAll:e,onClose:t}={})=>{const[l,{push:s,pop:r,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),s=i((()=>l((e=>e.slice(0,-1)))),[]),r=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:s,remove:r,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),r()}),[l,t]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":s(e);break;case"close":e.all?c():d();break;default:Wr(e)}}))),[c,d]),l},Fo=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Oo({onCloseAll:e,onClose:t}),{close:n}=O();return a((()=>{const e=({key:e})=>{"Escape"===e&&n()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[n]),a((()=>{l.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Uo=h();const Ho=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Ko()}))),Ko=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Wo=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Uo.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Uo.like(e))}),[e]),dislike:i((async()=>{l(await Uo.dislike(e))}),[e])}}(J().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(Ho,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Ho,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Xo=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:s,colorPalette:r="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Ao(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":r,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:na(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[aa({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),na(i?.footer,{...o,slotName:"footer"})]}),s?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Wo,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Fo,{}),u(Lo,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Xo.childrenTypes=[],Xo.slots=()=>["header","footer"];e.Blocks=Po,e.ContentPage=Xo,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=G,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.7",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=J,Object.defineProperty(e,"__esModule",{value:!0})}));