@redneckz/wildless-cms-uni-blocks 0.14.605 → 0.14.606

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 (604) hide show
  1. package/bundle/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  2. package/bundle/api/RetailAPI/StatusType.d.ts +1 -0
  3. package/bundle/api/RetailAPI/checkCaptcha.d.ts +4 -0
  4. package/bundle/api/RetailAPI/checkCode.d.ts +12 -0
  5. package/bundle/api/RetailAPI/createCaptcha.d.ts +1 -0
  6. package/bundle/api/RetailAPI/createDraftTask.d.ts +9 -0
  7. package/bundle/api/RetailAPI/createUserProfile.d.ts +9 -0
  8. package/bundle/api/RetailAPI/doRequest.d.ts +1 -0
  9. package/bundle/api/RetailAPI/feedbackById.d.ts +1 -0
  10. package/bundle/api/RetailAPI/sendCode.d.ts +10 -0
  11. package/bundle/api/RetailAPI/updateUserProfile.d.ts +20 -0
  12. package/bundle/api/RetailAPI/updateUserTask.d.ts +36 -0
  13. package/{dist/api/RetailApi → bundle/api/RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  14. package/bundle/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  15. package/bundle/api/apiBaseUrl.d.ts +1 -0
  16. package/bundle/bundle.umd.js +105 -94
  17. package/bundle/bundle.umd.min.js +1 -1
  18. package/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  19. package/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  20. package/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  21. package/bundle/ui-kit/FormField/constants.d.ts +0 -1
  22. package/dist/api/FileStorage.js +3 -3
  23. package/dist/api/FileStorage.js.map +1 -1
  24. package/dist/api/LeadServiceAPI.js +2 -1
  25. package/dist/api/LeadServiceAPI.js.map +1 -1
  26. package/dist/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  27. package/dist/api/OutServiceAPI/OutServiceAPI.js +12 -0
  28. package/dist/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  29. package/dist/api/RetailAPI/StatusType.d.ts +1 -0
  30. package/dist/api/{RetailApi/RetailApiTypes.js → RetailAPI/StatusType.js} +1 -1
  31. package/dist/api/RetailAPI/StatusType.js.map +1 -0
  32. package/dist/api/RetailAPI/checkCaptcha.d.ts +4 -0
  33. package/dist/api/RetailAPI/checkCaptcha.js +6 -0
  34. package/dist/api/RetailAPI/checkCaptcha.js.map +1 -0
  35. package/dist/api/RetailAPI/checkCode.d.ts +12 -0
  36. package/dist/api/RetailAPI/checkCode.js +10 -0
  37. package/dist/api/RetailAPI/checkCode.js.map +1 -0
  38. package/dist/api/RetailAPI/createCaptcha.d.ts +1 -0
  39. package/dist/api/RetailAPI/createCaptcha.js +6 -0
  40. package/dist/api/RetailAPI/createCaptcha.js.map +1 -0
  41. package/dist/api/RetailAPI/createDraftTask.d.ts +9 -0
  42. package/dist/api/RetailAPI/createDraftTask.js +6 -0
  43. package/dist/api/RetailAPI/createDraftTask.js.map +1 -0
  44. package/dist/api/RetailAPI/createUserProfile.d.ts +9 -0
  45. package/dist/api/RetailAPI/createUserProfile.js +6 -0
  46. package/dist/api/RetailAPI/createUserProfile.js.map +1 -0
  47. package/dist/api/RetailAPI/doRequest.d.ts +1 -0
  48. package/dist/api/RetailAPI/doRequest.js +23 -0
  49. package/dist/api/RetailAPI/doRequest.js.map +1 -0
  50. package/dist/api/RetailAPI/feedbackById.d.ts +1 -0
  51. package/dist/api/RetailAPI/feedbackById.js +9 -0
  52. package/dist/api/RetailAPI/feedbackById.js.map +1 -0
  53. package/dist/api/RetailAPI/sendCode.d.ts +10 -0
  54. package/dist/api/RetailAPI/sendCode.js +6 -0
  55. package/dist/api/RetailAPI/sendCode.js.map +1 -0
  56. package/dist/api/RetailAPI/updateUserProfile.d.ts +20 -0
  57. package/dist/api/RetailAPI/updateUserProfile.js +6 -0
  58. package/dist/api/RetailAPI/updateUserProfile.js.map +1 -0
  59. package/dist/api/RetailAPI/updateUserTask.d.ts +36 -0
  60. package/dist/api/RetailAPI/updateUserTask.js +6 -0
  61. package/dist/api/RetailAPI/updateUserTask.js.map +1 -0
  62. package/{lib/api/RetailApi → dist/api/RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  63. package/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  64. package/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  65. package/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  66. package/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  67. package/dist/api/apiBaseUrl.d.ts +1 -0
  68. package/dist/api/apiBaseUrl.js +4 -0
  69. package/dist/api/apiBaseUrl.js.map +1 -0
  70. package/dist/api/dadataHints/dadataHints.js +2 -1
  71. package/dist/api/dadataHints/dadataHints.js.map +1 -1
  72. package/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  73. package/dist/components/ApplicationForm/getRegionUrl.js +3 -2
  74. package/dist/components/ApplicationForm/getRegionUrl.js.map +1 -1
  75. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  76. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  77. package/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  78. package/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  79. package/dist/components/Depository/DepositoryItem.js +2 -1
  80. package/dist/components/Depository/DepositoryItem.js.map +1 -1
  81. package/dist/components/Depository/useDepository.js +2 -1
  82. package/dist/components/Depository/useDepository.js.map +1 -1
  83. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  84. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  85. package/dist/components/OfficesAtmsMap/useAtms.js +2 -1
  86. package/dist/components/OfficesAtmsMap/useAtms.js.map +1 -1
  87. package/dist/components/OfficesAtmsMap/useOffices.js +3 -2
  88. package/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
  89. package/dist/components/SafeDepositRental/useGetRegions.js +2 -1
  90. package/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
  91. package/dist/components/SafeDepositRental/useSafeBoxes.js +2 -1
  92. package/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  93. package/dist/hooks/useBranches.js +2 -1
  94. package/dist/hooks/useBranches.js.map +1 -1
  95. package/dist/hooks/useBranchesByRegions.js +4 -3
  96. package/dist/hooks/useBranchesByRegions.js.map +1 -1
  97. package/dist/hooks/useLeadFormData.js +1 -1
  98. package/dist/hooks/useLeadFormData.js.map +1 -1
  99. package/dist/hooks/useLocation.js +2 -1
  100. package/dist/hooks/useLocation.js.map +1 -1
  101. package/dist/hooks/useRegions.js +2 -1
  102. package/dist/hooks/useRegions.js.map +1 -1
  103. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  104. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  105. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  106. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +16 -0
  107. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  108. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  109. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +9 -0
  110. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  111. package/dist/ui-kit/Checkbox/getDocument.js +3 -3
  112. package/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  113. package/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  114. package/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  115. package/dist/ui-kit/FormField/constants.d.ts +0 -1
  116. package/dist/ui-kit/FormField/constants.js +1 -2
  117. package/dist/ui-kit/FormField/constants.js.map +1 -1
  118. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  119. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  120. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  121. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  122. package/lib/api/FileStorage.js +1 -1
  123. package/lib/api/FileStorage.js.map +1 -1
  124. package/lib/api/LeadServiceAPI.js +2 -1
  125. package/lib/api/LeadServiceAPI.js.map +1 -1
  126. package/lib/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  127. package/lib/api/OutServiceAPI/OutServiceAPI.js +9 -0
  128. package/lib/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  129. package/lib/api/RetailAPI/StatusType.d.ts +1 -0
  130. package/lib/api/RetailAPI/StatusType.js +2 -0
  131. package/lib/api/RetailAPI/StatusType.js.map +1 -0
  132. package/lib/api/RetailAPI/checkCaptcha.d.ts +4 -0
  133. package/lib/api/RetailAPI/checkCaptcha.js +3 -0
  134. package/lib/api/RetailAPI/checkCaptcha.js.map +1 -0
  135. package/lib/api/RetailAPI/checkCode.d.ts +12 -0
  136. package/lib/api/RetailAPI/checkCode.js +7 -0
  137. package/lib/api/RetailAPI/checkCode.js.map +1 -0
  138. package/lib/api/RetailAPI/createCaptcha.d.ts +1 -0
  139. package/lib/api/RetailAPI/createCaptcha.js +3 -0
  140. package/lib/api/RetailAPI/createCaptcha.js.map +1 -0
  141. package/lib/api/RetailAPI/createDraftTask.d.ts +9 -0
  142. package/lib/api/RetailAPI/createDraftTask.js +3 -0
  143. package/lib/api/RetailAPI/createDraftTask.js.map +1 -0
  144. package/lib/api/RetailAPI/createUserProfile.d.ts +9 -0
  145. package/lib/api/RetailAPI/createUserProfile.js +3 -0
  146. package/lib/api/RetailAPI/createUserProfile.js.map +1 -0
  147. package/lib/api/RetailAPI/doRequest.d.ts +1 -0
  148. package/lib/api/RetailAPI/doRequest.js +20 -0
  149. package/lib/api/RetailAPI/doRequest.js.map +1 -0
  150. package/lib/api/RetailAPI/feedbackById.d.ts +1 -0
  151. package/lib/api/RetailAPI/feedbackById.js +6 -0
  152. package/lib/api/RetailAPI/feedbackById.js.map +1 -0
  153. package/lib/api/RetailAPI/sendCode.d.ts +10 -0
  154. package/lib/api/RetailAPI/sendCode.js +3 -0
  155. package/lib/api/RetailAPI/sendCode.js.map +1 -0
  156. package/lib/api/RetailAPI/updateUserProfile.d.ts +20 -0
  157. package/lib/api/RetailAPI/updateUserProfile.js +3 -0
  158. package/lib/api/RetailAPI/updateUserProfile.js.map +1 -0
  159. package/lib/api/RetailAPI/updateUserTask.d.ts +36 -0
  160. package/lib/api/RetailAPI/updateUserTask.js +3 -0
  161. package/lib/api/RetailAPI/updateUserTask.js.map +1 -0
  162. package/{bundle/api/RetailApi → lib/api/RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  163. package/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  164. package/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  165. package/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  166. package/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  167. package/lib/api/apiBaseUrl.d.ts +1 -0
  168. package/lib/api/apiBaseUrl.js +2 -0
  169. package/lib/api/apiBaseUrl.js.map +1 -0
  170. package/lib/api/dadataHints/dadataHints.js +2 -1
  171. package/lib/api/dadataHints/dadataHints.js.map +1 -1
  172. package/lib/common.css +1 -1
  173. package/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  174. package/lib/components/ApplicationForm/getRegionUrl.js +2 -1
  175. package/lib/components/ApplicationForm/getRegionUrl.js.map +1 -1
  176. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  177. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  178. package/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  179. package/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  180. package/lib/components/Depository/DepositoryItem.js +2 -1
  181. package/lib/components/Depository/DepositoryItem.js.map +1 -1
  182. package/lib/components/Depository/useDepository.js +2 -1
  183. package/lib/components/Depository/useDepository.js.map +1 -1
  184. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  185. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  186. package/lib/components/OfficesAtmsMap/useAtms.js +2 -1
  187. package/lib/components/OfficesAtmsMap/useAtms.js.map +1 -1
  188. package/lib/components/OfficesAtmsMap/useOffices.js +3 -2
  189. package/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
  190. package/lib/components/SafeDepositRental/useGetRegions.js +2 -1
  191. package/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
  192. package/lib/components/SafeDepositRental/useSafeBoxes.js +2 -1
  193. package/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  194. package/lib/hooks/useBranches.js +2 -1
  195. package/lib/hooks/useBranches.js.map +1 -1
  196. package/lib/hooks/useBranchesByRegions.js +4 -3
  197. package/lib/hooks/useBranchesByRegions.js.map +1 -1
  198. package/lib/hooks/useLeadFormData.js +1 -1
  199. package/lib/hooks/useLeadFormData.js.map +1 -1
  200. package/lib/hooks/useLocation.js +2 -1
  201. package/lib/hooks/useLocation.js.map +1 -1
  202. package/lib/hooks/useRegions.js +2 -1
  203. package/lib/hooks/useRegions.js.map +1 -1
  204. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  205. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  206. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  207. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +13 -0
  208. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  209. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  210. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +6 -0
  211. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  212. package/lib/ui-kit/Checkbox/getDocument.js +3 -3
  213. package/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  214. package/lib/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  215. package/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  216. package/lib/ui-kit/FormField/constants.d.ts +0 -1
  217. package/lib/ui-kit/FormField/constants.js +0 -1
  218. package/lib/ui-kit/FormField/constants.js.map +1 -1
  219. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  220. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  221. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  222. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  223. package/mobile/bundle/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  224. package/mobile/bundle/api/RetailAPI/StatusType.d.ts +1 -0
  225. package/mobile/bundle/api/RetailAPI/checkCaptcha.d.ts +4 -0
  226. package/mobile/bundle/api/RetailAPI/checkCode.d.ts +12 -0
  227. package/mobile/bundle/api/RetailAPI/createCaptcha.d.ts +1 -0
  228. package/mobile/bundle/api/RetailAPI/createDraftTask.d.ts +9 -0
  229. package/mobile/bundle/api/RetailAPI/createUserProfile.d.ts +9 -0
  230. package/mobile/bundle/api/RetailAPI/doRequest.d.ts +1 -0
  231. package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -0
  232. package/mobile/bundle/api/RetailAPI/sendCode.d.ts +10 -0
  233. package/mobile/bundle/api/RetailAPI/updateUserProfile.d.ts +20 -0
  234. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +36 -0
  235. package/mobile/bundle/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  236. package/mobile/bundle/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  237. package/mobile/bundle/api/apiBaseUrl.d.ts +1 -0
  238. package/mobile/bundle/bundle.umd.js +105 -94
  239. package/mobile/bundle/bundle.umd.min.js +1 -1
  240. package/mobile/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  241. package/mobile/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  242. package/mobile/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  243. package/mobile/bundle/ui-kit/FormField/constants.d.ts +0 -1
  244. package/mobile/dist/api/FileStorage.js +3 -3
  245. package/mobile/dist/api/FileStorage.js.map +1 -1
  246. package/mobile/dist/api/LeadServiceAPI.js +2 -1
  247. package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
  248. package/mobile/dist/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  249. package/mobile/dist/api/OutServiceAPI/OutServiceAPI.js +12 -0
  250. package/mobile/dist/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  251. package/mobile/dist/api/RetailAPI/StatusType.d.ts +1 -0
  252. package/mobile/dist/api/{RetailApi/RetailApiTypes.js → RetailAPI/StatusType.js} +1 -1
  253. package/mobile/dist/api/RetailAPI/StatusType.js.map +1 -0
  254. package/mobile/dist/api/RetailAPI/checkCaptcha.d.ts +4 -0
  255. package/mobile/dist/api/RetailAPI/checkCaptcha.js +6 -0
  256. package/mobile/dist/api/RetailAPI/checkCaptcha.js.map +1 -0
  257. package/mobile/dist/api/RetailAPI/checkCode.d.ts +12 -0
  258. package/mobile/dist/api/RetailAPI/checkCode.js +10 -0
  259. package/mobile/dist/api/RetailAPI/checkCode.js.map +1 -0
  260. package/mobile/dist/api/RetailAPI/createCaptcha.d.ts +1 -0
  261. package/mobile/dist/api/RetailAPI/createCaptcha.js +6 -0
  262. package/mobile/dist/api/RetailAPI/createCaptcha.js.map +1 -0
  263. package/mobile/dist/api/RetailAPI/createDraftTask.d.ts +9 -0
  264. package/mobile/dist/api/RetailAPI/createDraftTask.js +6 -0
  265. package/mobile/dist/api/RetailAPI/createDraftTask.js.map +1 -0
  266. package/mobile/dist/api/RetailAPI/createUserProfile.d.ts +9 -0
  267. package/mobile/dist/api/RetailAPI/createUserProfile.js +6 -0
  268. package/mobile/dist/api/RetailAPI/createUserProfile.js.map +1 -0
  269. package/mobile/dist/api/RetailAPI/doRequest.d.ts +1 -0
  270. package/mobile/dist/api/RetailAPI/doRequest.js +23 -0
  271. package/mobile/dist/api/RetailAPI/doRequest.js.map +1 -0
  272. package/mobile/dist/api/RetailAPI/feedbackById.d.ts +1 -0
  273. package/mobile/dist/api/RetailAPI/feedbackById.js +9 -0
  274. package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -0
  275. package/mobile/dist/api/RetailAPI/sendCode.d.ts +10 -0
  276. package/mobile/dist/api/RetailAPI/sendCode.js +6 -0
  277. package/mobile/dist/api/RetailAPI/sendCode.js.map +1 -0
  278. package/mobile/dist/api/RetailAPI/updateUserProfile.d.ts +20 -0
  279. package/mobile/dist/api/RetailAPI/updateUserProfile.js +6 -0
  280. package/mobile/dist/api/RetailAPI/updateUserProfile.js.map +1 -0
  281. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +36 -0
  282. package/mobile/dist/api/RetailAPI/updateUserTask.js +6 -0
  283. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -0
  284. package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +3 -0
  285. package/mobile/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  286. package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  287. package/mobile/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  288. package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  289. package/mobile/dist/api/apiBaseUrl.d.ts +1 -0
  290. package/mobile/dist/api/apiBaseUrl.js +4 -0
  291. package/mobile/dist/api/apiBaseUrl.js.map +1 -0
  292. package/mobile/dist/api/dadataHints/dadataHints.js +2 -1
  293. package/mobile/dist/api/dadataHints/dadataHints.js.map +1 -1
  294. package/mobile/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  295. package/mobile/dist/components/ApplicationForm/getRegionUrl.js +3 -2
  296. package/mobile/dist/components/ApplicationForm/getRegionUrl.js.map +1 -1
  297. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  298. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  299. package/mobile/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  300. package/mobile/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  301. package/mobile/dist/components/Depository/DepositoryItem.js +2 -1
  302. package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
  303. package/mobile/dist/components/Depository/useDepository.js +2 -1
  304. package/mobile/dist/components/Depository/useDepository.js.map +1 -1
  305. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  306. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  307. package/mobile/dist/components/OfficesAtmsMap/useAtms.js +2 -1
  308. package/mobile/dist/components/OfficesAtmsMap/useAtms.js.map +1 -1
  309. package/mobile/dist/components/OfficesAtmsMap/useOffices.js +3 -2
  310. package/mobile/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
  311. package/mobile/dist/components/SafeDepositRental/useGetRegions.js +2 -1
  312. package/mobile/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
  313. package/mobile/dist/components/SafeDepositRental/useSafeBoxes.js +2 -1
  314. package/mobile/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  315. package/mobile/dist/hooks/useBranches.js +2 -1
  316. package/mobile/dist/hooks/useBranches.js.map +1 -1
  317. package/mobile/dist/hooks/useBranchesByRegions.js +4 -3
  318. package/mobile/dist/hooks/useBranchesByRegions.js.map +1 -1
  319. package/mobile/dist/hooks/useLeadFormData.js +1 -1
  320. package/mobile/dist/hooks/useLeadFormData.js.map +1 -1
  321. package/mobile/dist/hooks/useLocation.js +2 -1
  322. package/mobile/dist/hooks/useLocation.js.map +1 -1
  323. package/mobile/dist/hooks/useRegions.js +2 -1
  324. package/mobile/dist/hooks/useRegions.js.map +1 -1
  325. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  326. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  327. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  328. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +16 -0
  329. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  330. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  331. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +9 -0
  332. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  333. package/mobile/dist/ui-kit/Checkbox/getDocument.js +3 -3
  334. package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  335. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  336. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  337. package/mobile/dist/ui-kit/FormField/constants.d.ts +0 -1
  338. package/mobile/dist/ui-kit/FormField/constants.js +1 -2
  339. package/mobile/dist/ui-kit/FormField/constants.js.map +1 -1
  340. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  341. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  342. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  343. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  344. package/mobile/lib/api/FileStorage.js +1 -1
  345. package/mobile/lib/api/FileStorage.js.map +1 -1
  346. package/mobile/lib/api/LeadServiceAPI.js +2 -1
  347. package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
  348. package/mobile/lib/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  349. package/mobile/lib/api/OutServiceAPI/OutServiceAPI.js +9 -0
  350. package/mobile/lib/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  351. package/mobile/lib/api/RetailAPI/StatusType.d.ts +1 -0
  352. package/mobile/lib/api/RetailAPI/StatusType.js +2 -0
  353. package/mobile/lib/api/RetailAPI/StatusType.js.map +1 -0
  354. package/mobile/lib/api/RetailAPI/checkCaptcha.d.ts +4 -0
  355. package/mobile/lib/api/RetailAPI/checkCaptcha.js +3 -0
  356. package/mobile/lib/api/RetailAPI/checkCaptcha.js.map +1 -0
  357. package/mobile/lib/api/RetailAPI/checkCode.d.ts +12 -0
  358. package/mobile/lib/api/RetailAPI/checkCode.js +7 -0
  359. package/mobile/lib/api/RetailAPI/checkCode.js.map +1 -0
  360. package/mobile/lib/api/RetailAPI/createCaptcha.d.ts +1 -0
  361. package/mobile/lib/api/RetailAPI/createCaptcha.js +3 -0
  362. package/mobile/lib/api/RetailAPI/createCaptcha.js.map +1 -0
  363. package/mobile/lib/api/RetailAPI/createDraftTask.d.ts +9 -0
  364. package/mobile/lib/api/RetailAPI/createDraftTask.js +3 -0
  365. package/mobile/lib/api/RetailAPI/createDraftTask.js.map +1 -0
  366. package/mobile/lib/api/RetailAPI/createUserProfile.d.ts +9 -0
  367. package/mobile/lib/api/RetailAPI/createUserProfile.js +3 -0
  368. package/mobile/lib/api/RetailAPI/createUserProfile.js.map +1 -0
  369. package/mobile/lib/api/RetailAPI/doRequest.d.ts +1 -0
  370. package/mobile/lib/api/RetailAPI/doRequest.js +20 -0
  371. package/mobile/lib/api/RetailAPI/doRequest.js.map +1 -0
  372. package/mobile/lib/api/RetailAPI/feedbackById.d.ts +1 -0
  373. package/mobile/lib/api/RetailAPI/feedbackById.js +6 -0
  374. package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -0
  375. package/mobile/lib/api/RetailAPI/sendCode.d.ts +10 -0
  376. package/mobile/lib/api/RetailAPI/sendCode.js +3 -0
  377. package/mobile/lib/api/RetailAPI/sendCode.js.map +1 -0
  378. package/mobile/lib/api/RetailAPI/updateUserProfile.d.ts +20 -0
  379. package/mobile/lib/api/RetailAPI/updateUserProfile.js +3 -0
  380. package/mobile/lib/api/RetailAPI/updateUserProfile.js.map +1 -0
  381. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +36 -0
  382. package/mobile/lib/api/RetailAPI/updateUserTask.js +3 -0
  383. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -0
  384. package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +3 -0
  385. package/mobile/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  386. package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  387. package/mobile/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  388. package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  389. package/mobile/lib/api/apiBaseUrl.d.ts +1 -0
  390. package/mobile/lib/api/apiBaseUrl.js +2 -0
  391. package/mobile/lib/api/apiBaseUrl.js.map +1 -0
  392. package/mobile/lib/api/dadataHints/dadataHints.js +2 -1
  393. package/mobile/lib/api/dadataHints/dadataHints.js.map +1 -1
  394. package/mobile/lib/common.css +1 -1
  395. package/mobile/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  396. package/mobile/lib/components/ApplicationForm/getRegionUrl.js +2 -1
  397. package/mobile/lib/components/ApplicationForm/getRegionUrl.js.map +1 -1
  398. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  399. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  400. package/mobile/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  401. package/mobile/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  402. package/mobile/lib/components/Depository/DepositoryItem.js +2 -1
  403. package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
  404. package/mobile/lib/components/Depository/useDepository.js +2 -1
  405. package/mobile/lib/components/Depository/useDepository.js.map +1 -1
  406. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  407. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  408. package/mobile/lib/components/OfficesAtmsMap/useAtms.js +2 -1
  409. package/mobile/lib/components/OfficesAtmsMap/useAtms.js.map +1 -1
  410. package/mobile/lib/components/OfficesAtmsMap/useOffices.js +3 -2
  411. package/mobile/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
  412. package/mobile/lib/components/SafeDepositRental/useGetRegions.js +2 -1
  413. package/mobile/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
  414. package/mobile/lib/components/SafeDepositRental/useSafeBoxes.js +2 -1
  415. package/mobile/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  416. package/mobile/lib/hooks/useBranches.js +2 -1
  417. package/mobile/lib/hooks/useBranches.js.map +1 -1
  418. package/mobile/lib/hooks/useBranchesByRegions.js +4 -3
  419. package/mobile/lib/hooks/useBranchesByRegions.js.map +1 -1
  420. package/mobile/lib/hooks/useLeadFormData.js +1 -1
  421. package/mobile/lib/hooks/useLeadFormData.js.map +1 -1
  422. package/mobile/lib/hooks/useLocation.js +2 -1
  423. package/mobile/lib/hooks/useLocation.js.map +1 -1
  424. package/mobile/lib/hooks/useRegions.js +2 -1
  425. package/mobile/lib/hooks/useRegions.js.map +1 -1
  426. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  427. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  428. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  429. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +13 -0
  430. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  431. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  432. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +6 -0
  433. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  434. package/mobile/lib/ui-kit/Checkbox/getDocument.js +3 -3
  435. package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  436. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  437. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  438. package/mobile/lib/ui-kit/FormField/constants.d.ts +0 -1
  439. package/mobile/lib/ui-kit/FormField/constants.js +0 -1
  440. package/mobile/lib/ui-kit/FormField/constants.js.map +1 -1
  441. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  442. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  443. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  444. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  445. package/mobile/src/api/FileStorage.ts +2 -1
  446. package/mobile/src/api/LeadServiceAPI.ts +2 -1
  447. package/mobile/src/api/OutServiceAPI/OutServiceAPI.ts +20 -0
  448. package/mobile/src/api/RetailAPI/StatusType.ts +1 -0
  449. package/mobile/src/api/RetailAPI/checkCaptcha.ts +8 -0
  450. package/mobile/src/api/RetailAPI/checkCode.ts +22 -0
  451. package/mobile/src/api/RetailAPI/createCaptcha.ts +4 -0
  452. package/mobile/src/api/RetailAPI/createDraftTask.ts +14 -0
  453. package/mobile/src/api/RetailAPI/createUserProfile.ts +13 -0
  454. package/mobile/src/api/RetailAPI/doRequest.ts +31 -0
  455. package/mobile/src/api/RetailAPI/feedbackById.ts +10 -0
  456. package/mobile/src/api/RetailAPI/sendCode.ts +12 -0
  457. package/mobile/src/api/RetailAPI/updateUserProfile.ts +24 -0
  458. package/mobile/src/api/RetailAPI/updateUserTask.ts +41 -0
  459. package/mobile/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.ts +1 -1
  460. package/mobile/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.ts +20 -14
  461. package/mobile/src/api/apiBaseUrl.ts +1 -0
  462. package/mobile/src/api/dadataHints/dadataHints.ts +2 -1
  463. package/mobile/src/components/ApplicationForm/getRegionUrl.tsx +2 -1
  464. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -8
  465. package/mobile/src/components/CalculatorBusinessDeposit/useBusinessDepositRates.ts +2 -1
  466. package/mobile/src/components/Depository/DepositoryItem.tsx +2 -1
  467. package/mobile/src/components/Depository/useDepository.ts +3 -1
  468. package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -1
  469. package/mobile/src/components/OfficesAtmsMap/useAtms.ts +2 -1
  470. package/mobile/src/components/OfficesAtmsMap/useOffices.ts +3 -2
  471. package/mobile/src/components/SafeDepositRental/useGetRegions.ts +2 -1
  472. package/mobile/src/components/SafeDepositRental/useSafeBoxes.ts +2 -1
  473. package/mobile/src/hooks/useBranches.ts +2 -1
  474. package/mobile/src/hooks/useBranchesByRegions.ts +4 -3
  475. package/mobile/src/hooks/useLeadFormData.ts +3 -1
  476. package/mobile/src/hooks/useLocation.ts +2 -1
  477. package/mobile/src/hooks/useRegions.ts +2 -1
  478. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -6
  479. package/mobile/src/ui-kit/CaptchaDialog/{checkCaptcha.ts → handleCheckCaptcha.ts} +5 -5
  480. package/mobile/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +9 -0
  481. package/mobile/src/ui-kit/Checkbox/getDocument.ts +3 -3
  482. package/mobile/src/ui-kit/FormField/Fields/LocalitiesField.tsx +6 -3
  483. package/mobile/src/ui-kit/FormField/constants.tsx +0 -2
  484. package/mobile/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +2 -2
  485. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +2 -2
  486. package/package.json +1 -1
  487. package/src/api/FileStorage.ts +2 -1
  488. package/src/api/LeadServiceAPI.ts +2 -1
  489. package/src/api/OutServiceAPI/OutServiceAPI.ts +20 -0
  490. package/src/api/RetailAPI/StatusType.ts +1 -0
  491. package/src/api/RetailAPI/checkCaptcha.ts +8 -0
  492. package/src/api/RetailAPI/checkCode.ts +22 -0
  493. package/src/api/RetailAPI/createCaptcha.ts +4 -0
  494. package/src/api/RetailAPI/createDraftTask.ts +14 -0
  495. package/src/api/RetailAPI/createUserProfile.ts +13 -0
  496. package/src/api/RetailAPI/doRequest.ts +31 -0
  497. package/src/api/RetailAPI/feedbackById.ts +10 -0
  498. package/src/api/RetailAPI/sendCode.ts +12 -0
  499. package/src/api/RetailAPI/updateUserProfile.ts +24 -0
  500. package/src/api/RetailAPI/updateUserTask.ts +41 -0
  501. package/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.ts +1 -1
  502. package/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.ts +20 -14
  503. package/src/api/apiBaseUrl.ts +1 -0
  504. package/src/api/dadataHints/dadataHints.ts +2 -1
  505. package/src/components/ApplicationForm/getRegionUrl.tsx +2 -1
  506. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -8
  507. package/src/components/CalculatorBusinessDeposit/useBusinessDepositRates.ts +2 -1
  508. package/src/components/Depository/DepositoryItem.tsx +2 -1
  509. package/src/components/Depository/useDepository.ts +3 -1
  510. package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -1
  511. package/src/components/OfficesAtmsMap/useAtms.ts +2 -1
  512. package/src/components/OfficesAtmsMap/useOffices.ts +3 -2
  513. package/src/components/SafeDepositRental/useGetRegions.ts +2 -1
  514. package/src/components/SafeDepositRental/useSafeBoxes.ts +2 -1
  515. package/src/hooks/useBranches.ts +2 -1
  516. package/src/hooks/useBranchesByRegions.ts +4 -3
  517. package/src/hooks/useLeadFormData.ts +3 -1
  518. package/src/hooks/useLocation.ts +2 -1
  519. package/src/hooks/useRegions.ts +2 -1
  520. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -6
  521. package/src/ui-kit/CaptchaDialog/{checkCaptcha.ts → handleCheckCaptcha.ts} +5 -5
  522. package/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +9 -0
  523. package/src/ui-kit/Checkbox/getDocument.ts +3 -3
  524. package/src/ui-kit/FormField/Fields/LocalitiesField.tsx +6 -3
  525. package/src/ui-kit/FormField/constants.tsx +0 -2
  526. package/src/ui-kit/InfoCard/InfoCard.fixture.tsx +2 -2
  527. package/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +2 -2
  528. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +2 -2
  529. package/bundle/api/RetailApi/RetailApi.d.ts +0 -12
  530. package/bundle/api/RetailApi/RetailApiTypes.d.ts +0 -86
  531. package/bundle/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  532. package/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  533. package/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  534. package/dist/api/RetailApi/RetailApi.d.ts +0 -12
  535. package/dist/api/RetailApi/RetailApi.js +0 -44
  536. package/dist/api/RetailApi/RetailApi.js.map +0 -1
  537. package/dist/api/RetailApi/RetailApiTypes.d.ts +0 -86
  538. package/dist/api/RetailApi/RetailApiTypes.js.map +0 -1
  539. package/dist/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  540. package/dist/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  541. package/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  542. package/dist/ui-kit/CaptchaDialog/checkCaptcha.js +0 -16
  543. package/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  544. package/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  545. package/dist/ui-kit/CaptchaDialog/createCaptcha.js +0 -9
  546. package/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  547. package/lib/api/RetailApi/RetailApi.d.ts +0 -12
  548. package/lib/api/RetailApi/RetailApi.js +0 -42
  549. package/lib/api/RetailApi/RetailApi.js.map +0 -1
  550. package/lib/api/RetailApi/RetailApiTypes.d.ts +0 -86
  551. package/lib/api/RetailApi/RetailApiTypes.js +0 -2
  552. package/lib/api/RetailApi/RetailApiTypes.js.map +0 -1
  553. package/lib/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  554. package/lib/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  555. package/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  556. package/lib/ui-kit/CaptchaDialog/checkCaptcha.js +0 -13
  557. package/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  558. package/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  559. package/lib/ui-kit/CaptchaDialog/createCaptcha.js +0 -6
  560. package/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  561. package/mobile/bundle/api/RetailApi/RetailApi.d.ts +0 -12
  562. package/mobile/bundle/api/RetailApi/RetailApiTypes.d.ts +0 -86
  563. package/mobile/bundle/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  564. package/mobile/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  565. package/mobile/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  566. package/mobile/dist/api/RetailApi/RetailApi.d.ts +0 -12
  567. package/mobile/dist/api/RetailApi/RetailApi.js +0 -44
  568. package/mobile/dist/api/RetailApi/RetailApi.js.map +0 -1
  569. package/mobile/dist/api/RetailApi/RetailApiTypes.d.ts +0 -86
  570. package/mobile/dist/api/RetailApi/RetailApiTypes.js.map +0 -1
  571. package/mobile/dist/api/RetailApi/utils/getUpdateUserProfile.d.ts +0 -3
  572. package/mobile/dist/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  573. package/mobile/dist/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  574. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  575. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js +0 -16
  576. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  577. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  578. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js +0 -9
  579. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  580. package/mobile/lib/api/RetailApi/RetailApi.d.ts +0 -12
  581. package/mobile/lib/api/RetailApi/RetailApi.js +0 -42
  582. package/mobile/lib/api/RetailApi/RetailApi.js.map +0 -1
  583. package/mobile/lib/api/RetailApi/RetailApiTypes.d.ts +0 -86
  584. package/mobile/lib/api/RetailApi/RetailApiTypes.js +0 -2
  585. package/mobile/lib/api/RetailApi/RetailApiTypes.js.map +0 -1
  586. package/mobile/lib/api/RetailApi/utils/getUpdateUserProfile.d.ts +0 -3
  587. package/mobile/lib/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  588. package/mobile/lib/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  589. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  590. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js +0 -13
  591. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  592. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  593. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js +0 -6
  594. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  595. package/mobile/src/api/RetailApi/RetailApi.ts +0 -69
  596. package/mobile/src/api/RetailApi/RetailApiTypes.ts +0 -95
  597. package/mobile/src/ui-kit/CaptchaDialog/createCaptcha.ts +0 -6
  598. package/src/api/RetailApi/RetailApi.ts +0 -69
  599. package/src/api/RetailApi/RetailApiTypes.ts +0 -95
  600. package/src/ui-kit/CaptchaDialog/createCaptcha.ts +0 -6
  601. /package/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
  602. /package/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
  603. /package/mobile/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
  604. /package/mobile/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={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","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),k={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"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=k[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function I(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=S,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const B=[],P=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:i=I,...r})=>{const s=a?(e,t)=>I(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||B,[r.parent,l]]:n},a)))};function M({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const D=["CDN","BASE_PATH"],V=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),z=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!z(e)&&(!t||"_self"===t)),A=e=>Boolean(e?.startsWith("#")),O=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),j=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var $=Object.freeze({__proto__:null,isURL:z,isLocalURL:_,isHash:A,withoutQuery:O,joinPath:F,hasPrefix:j});const E="/api/",L=`${E}v1/storage`,U=e=>(t,n)=>{if([!t,z(t),A(t),[V.CDN,E].some((e=>j(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${L}/${t}/attachment`;const l=t?.startsWith("/");return F(j(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=R(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(F(V.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!z(t)?U(e)(t,n):t},Q=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Z=d((({className:e="",image:t,imageClassName:n=""})=>{const l=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Q).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Z,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{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}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function ue(){const e=G(X.SITE_URL),t=R(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!j(l,e||"/");l&&!s&&_(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=fe(e)&&"hidden lg:block";return c("div",{className:u(ge(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,fe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:u(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},fe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),xe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=ue()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Se=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=we(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Ce(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Ie(M({...b,extraProps:{className:"@container-normal"}})),Ce(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>u(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),De=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ve=(e,t)=>["label"in e?De(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:Ve(n)})]}))),_e=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Ae=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ve)}):null)),Oe=d((({isTabularBenefits:e,...t})=>o(e?Ae:_e,{...t}))),Fe=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map($e(n))}):null,$e=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Ee(a,r),d=Ee(i,r);return l||a?.icon?o(be,{className:u("basis-full @lg:basis-auto",e),appendLeft:Le({...a,iconVersion:c}),appendRight:Le({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Ee=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Le=e=>Fe(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(We)}):null)),We=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ye)}):null)),Ye=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Se,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(Oe,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ke[i]}):null,T,f?.length?o(qe,{priceList:f}):null,Je(x)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Qe=e=>Boolean(e&&Array.isArray(e)),Ze=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Ze(n)&&"string"==typeof n.$ref)?t.ref(e):Ze(e)?t.record(e):Qe(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Ze(e)?e[t]:Qe(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ut(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ht=ut((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ht,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ft=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},xt=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:xt(e)}:{},yt=(e,t="birthday")=>e?{[t]:ft(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:xt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},Ct="rshb-query-params";function St(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ct)||"";return e&&globalThis.sessionStorage?.setItem(Ct,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,n]=Tt(e.find((([e])=>e(t))));return n(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Mt(this),[()=>!0,e]])}}const Mt=e=>[...e?.parent?Mt(e.parent):[],e.entry],Rt=e=>{const t=e.target?.closest("a");if(z(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=St();if(!z(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Dt(t?.target)?.(n)}}},Dt=Bt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Vt(){return Vt._impl()}Vt._impl=()=>({forwardQuery:Rt}),Vt.setup=e=>{Vt._impl=e};const zt=e=>e,_t=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return At(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=zt,format:l=zt}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},At=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ot=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Ft=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],jt=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],$t=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Et="/api/v1/outservice/outserviceregions",Lt=e=>"OUTSERVICE"===e?Et:void 0;function Ut(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function qt(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function Wt(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return qt(globalThis.document,"click",n),t}const Ht=({label:e,errors:t})=>e&&t?`${e}*`:e,Yt=()=>{},Kt="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",Xt=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Gt=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const k=s(null),C=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);a((()=>{v&&k.current?.focus()}),[v,k]);const S=g?"pr-3xl":"",T=Jt(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[Xt(d),N?o("textarea",{className:u("block resize-y min-h-24",Qt,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:C,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Qt,S,T),ref:k,id:n,name:l||n,placeholder:m,value:h,onChange:C,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Jt=e=>e?Kt:"border-error",Qt="w-full border rounded-md text-primary-text outline-none p-m",Zt=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),en=e=>e?.value||"",tn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},participantAddress:{url:"suggest/address"}},nn=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),ln=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function an({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=l([]),f=nn(),x=tn[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:l,requestData:a={},responseItemHandler:i=en}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${l?`${l}, `:""}${n}`;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...a,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(N,300)),[N]);return a((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(ln,{options:p,value:t,onChange:y}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,p,t,y]),v}const rn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=Yt,onDaDataChange:s,onBlur:d,isTextarea:m,type:h,name:p="",daDataQueryPrefix:g,dadata:f=!1})=>{const[x,{setFalse:b,setTrue:y}]=Ut(),v=Wt(b),N=an({isOpen:x&&f,name:p,value:n,daDataQueryPrefix:g,onChange:r,onDaDataChange:s});return c("div",{className:u("shrink-0 w-full",e),ref:v,onBlur:b,onFocus:y,children:[o("div",{ref:N,children:o(Gt,{type:h||"text","aria-label":t,label:Ht({label:t,errors:i}),valid:Boolean(!a),value:n,onChange:r,onBlur:d,isTextarea:m,placeholder:sn(l,i,t)})}),Zt(a)]})})),sn=(e,t,n)=>t&&!n?`${e}*`:e,on=e=>e?.text||e?.key||"",cn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,dn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:cn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:on(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const mn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=Ut(),[N,w]=l(""),k=pn(x,n.length),C=b&&!k,S=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=nn(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=Wt(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(dn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:S,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[Xt(t),c("div",{className:u("relative",C?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",hn(m,d,k)),onClick:C?S:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:on(r)||h}),un(C,g)]}),p&&C?o("div",{className:u("absolute top-0 w-full z-20"),children:o(Gt,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),un=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),hn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),pn=(e,t)=>e||0===t,gn=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(mn,{...a,valid:!n,label:Ht({label:t,errors:l})}),Zt(n)]}))),fn=e=>!e?.length,xn=e=>t=>n=>e(n)?[]:[t],bn=xn((e=>null!=e&&""!==e)),yn="Некорректно заполненное поле",vn=e=>bn(e||yn),Nn=xn((e=>e?.key&&""!==e?.key))(yn),wn=e=>xn((e=>"string"==typeof e&&e.length>1))(e||yn),kn=(e,t)=>xn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t||yn),Cn=e=>xn((e=>"string"==typeof e&&6===e.length))(e),Sn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,xn((e=>"string"==typeof e&&t.test(e))))(e);var t},Tn=xn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),In=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},Bn={typeForm:vn(),surname:wn("Укажите свою фамилию"),name:wn("Укажите своё имя"),middleName:wn("Укажите своё отчество"),region:Nn,addressBranch:Nn,phone:Sn("Укажите номер телефона"),secondaryPhone:Sn("Укажите номер телефона"),birthday:vn("Укажите дату рождения"),birthPlace:vn("Укажите место рождения"),education:vn("Выберите ваше образование"),housing:vn("Выберите тип жилья"),employment:vn("Выберите информацию о трудоустройстве"),organization:vn("Выберите тип организации"),amountWorkers:vn("Выберите информацию о количестве сотрудников"),employerActivities:vn("Выберите вид деятельности организации"),employerOrganization:vn("Выберите вид организации"),positionOrganization:vn("Выберите вашу должность"),dulSerie:(Pn="Укажите серию паспорта",xn((e=>"string"==typeof e&&4===e.length))(Pn)),dulNumber:Cn("Укажите номер паспорта"),dulIssueDateField:vn("Укажите дату выдачи паспорта"),dulSubdivisionCode:Cn("Укажите код подразделения"),dulIssuedBy:vn("Укажите организацию, выдавшую паспорт"),email:(e=>xn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:wn(),inn:(e=>xn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:vn("Укажите ОПФ"),organizationName:vn("Укажите наименование организации"),generalSeniority:vn(),lastJobExperience:vn("Укажите стаж на последнем месте работы"),experience5Years:vn("Укажите общий стаж за последние 5 лет"),jobsNumber:vn("Укажите количество лет стажа"),beginDate:vn("Укажите дату заключения трудового договора"),fullAddress:vn(),partnerComments:vn(),collectionCount:vn(),comment:vn(),acquiringType:Nn,feedbackMethod:Nn,serviceType:Nn,serviceDirection:Nn,meetingDay:vn(),product:vn(),localities:vn(),consentDataProcessing:Tn,annualRevenue:vn(),consentToReceiveMaterials:Tn,processPersonalDataLeadFlg:Tn,consentProviderFlg:Tn,consentPhotoFlg:Tn,consentPfrFlg:Tn,consentAssignmentClaimsFlg:Tn,consentCollectionFlg:Tn,consentInformFlg:Tn,familyStatus:vn("Выберите семейное положение"),children:kn(2,"Укажите количество детей"),familyMembers:kn(2,"Укажите количество членов семьи"),dependents:kn(2,"Укажите количество иждивенцев"),totalIncome:kn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:kn(10,"Укажите сумму обязательных выплат"),snils:(e=>xn(In)(e))("Некорректный номер СНИЛС"),conscription:vn(),armyIdFlg:Tn,sex:vn("Укажите свой пол"),participantAddress:vn("Необходимо выбрать адрес"),participantDateRegistration:vn("Укажите дату регистрации"),retirementIncome:vn(),otherIncome:vn(),mandatoryIncome:vn(),otherPayments:vn(),disablePeopleFlg:vn(),bankruptcyFlg:vn(),shareholderFlg:vn(),legalEntityName:vn(),bankEmployeeCode:vn()};var Pn;const Mn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Bn?.[e]])))},Rn=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Dn=(e,t,n=!1)=>n?Rn(e,t):e,Vn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],zn=d((({field:e,input:t})=>o(gn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Vn,...Dn(e("acquiringType"),Bn.acquiringType,t?.required)}))),_n=(e="")=>Boolean("trade"===e||"all"===e),An=e=>null!=e,On=new Map,Fn=e=>Boolean(e?.every((e=>Array.isArray(e)?Fn(e):!e||"string"==typeof e))),jn=e=>Fn(e)?e.toString():"";function $n(e,t,{fallback:n,cache:i}={}){const s=r((()=>En(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(An))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=On)=>n=>{const l=jn(n),a=t.get(l);if(l&&An(a))return a;const i=e(...n);return l&&An(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function En(e){return Array.isArray(e)?e:e instanceof Function?En(e()):[e]}const Ln=[];const Un=async e=>await it(e,{method:"GET"})||Ln;function qn(e=!1){const{data:t}=$n(e?"/api/v1/premiumBranchesByRegions":"/api/v1/branchesByRegions",rt);return Array.isArray(t)?t:[]}const Wn=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?qn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=$n(e?`/api/v1/branches?regionCode=${e}`:null,Un);return t||Ln}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(gn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Dn(e("addressBranch"),Bn.addressBranch,t?.required),isSearch:!0})})),Hn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},Yn=(e,t,n)=>Math.max(t,Math.min(e,n));function Kn(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Xn({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=Kn(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const Gn=1,Jn=100,Qn=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:Gn),max:s=(a.length?a.length-1:Jn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=Hn(e,{normalize:(e=0)=>a.length?Zn(a)(e):Yn(e,r,s),format:Ue()}),f=i((e=>{p&&p(Kn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",Kt,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Xn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),el(l)]})})),Zn=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),el=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),tl=["От 1 000 ₽","До 1 000 000 000 ₽"],nl=d((({field:e})=>o(Qn,{title:"Сумма, ₽",items:tl,min:1e3,max:1e9,...e("amount")}))),ll=e=>{const{data:t,error:n}=$n(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,al);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},al=async e=>await it(e,{method:"POST"})||[],il=ut((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(gn,{placeholder:"Выберите из списка",label:n,options:rl(i),...Dn(e(l),Bn[l],a?.required)})})),rl=e=>(e??[]).map((e=>({key:e,value:e}))),sl=d((({field:e,input:t})=>{const{data:n}=ll("EMPLOYEES_NUMBER");return o(il,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),ol=d((({field:e,input:t})=>o(rn,{label:"Годовая выручка, ₽",...Dn(e("annualRevenue"),Bn.annualRevenue,t?.required)}))),cl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),dl="appearance-none w-5 h-5 border-solid flex-none",ml=[{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"}],ul=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(cl,{paths:ml,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:u("flex items-center relative group/box",pl(l)),onClick:s,children:[o("div",{className:u(dl,"m-0",a?"rounded-full border-2":fl(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:gl(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,hl(n)]})})})),hl=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,pl=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",gl=(e=!1)=>e?"radio":"checkbox",fl=(e=!1)=>u("rounded border",{"bg-primary-main":e}),xl=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(ul,{text:t,value:n,disabled:a,onChange:r},l),Zt(i)]}))),bl=d((({field:e})=>o(xl,{text:"Наличие военного билета",...Dn(e("armyIdFlg"),Bn.armyIdFlg)}))),yl=d((({field:e,input:t})=>o(rn,{label:"Код представителя Банка",placeholder:"Введите код",type:"number",...Dn(e("bankEmployeeCode"),Bn.bankEmployeeCode,t?.required),...t}))),vl=d((({field:e})=>o(rn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),Nl=d((({field:e})=>o(xl,{text:"В отношении меня ведётся производство по делу о банкротстве",...Dn(e("bankruptcyFlg"),Bn.bankruptcyFlg)}))),wl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=kl(t,e),c=Cl(t,i,r);u.push(o("td",{children:o("div",{className:Sl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},kl=(e,t)=>t&&e.toDateString()===t.toDateString(),Cl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Sl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Tl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Il=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=Yt,setValue:d=Yt})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Tl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:wl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Bl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Pl=Bl.map((e=>({key:e}))),Ml=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Rl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Dl={className:"min-w-32",iconVersion:"black",isBorder:!1},Vl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,onChange:m})=>{const[h,{setValue:p}]=Ut(!1),[g,f]=l(n?.getMonth()||(new Date).getMonth()),[x,b]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:y,handleNextMonth:v,handleSelectMonth:N,handleSelectYear:w,monthsOptions:k,yearsOptions:C,handleChangeVisibleCalendar:S,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=Wt(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Bl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Pl,yearsOptions:Ml,ref:s}})({onYearSelect:b,onMonthSelect:f,onShowCalendar:p,selectedYear:x,selectedMonth:g,showCalendar:h}),I=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[Xt(t),c("div",{className:"relative",children:[zl(S,n,r),h?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":I}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:y,children:o(W,{...Rl,className:"-rotate-90 cursor-pointer"})}),o(mn,{onChange:N,value:{key:Bl[g]},options:k,...Dl}),o(mn,{onChange:w,value:{key:String(x)},options:C,...Dl}),o("div",{className:"my-auto",onClick:v,children:o(W,{...Rl,className:"rotate-90 cursor-pointer"})})]}),o(Il,{today:n,currentMonth:g,currentYear:x,onDateSelect:m,min:s,max:d,setValue:p})]}):null]})]})})),zl=(e,t,n)=>c("div",{onClick:e,className:u("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(w,{children:t&&ft(t)}),o(W,{...Rl,name:"CalendarIcon"})]}),_l=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Vl,{label:Ht({label:t,errors:l}),valid:Boolean(!n),...a}),Zt(n)]}))),Al=d((({field:e,input:t})=>o(_l,{label:"Дата начала работы на текущем месте",...Dn(e("beginDate"),Bn.beginDate,t?.required),...t}))),Ol=d((({field:e,input:t})=>o(_l,{label:"Дата рождения",...Dn(e("birthday"),Bn.birthday,t?.required)}))),Fl=d((({field:e,input:t})=>o(rn,{label:"Место рождения",...Dn(e("birthPlace"),Bn.birthPlace,t?.required),...t}))),jl=d((({field:e,input:t})=>o(rn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...Dn(e("children"),Bn.children,t?.required),...t}))),$l=d((({field:e,input:t})=>o(rn,{label:"Количество объектов инкассации",type:"number",...Dn(e("collectionCount"),Bn.collectionCount,t?.required)}))),El=d((({field:e,input:t})=>o(rn,{className:"col-span-2",...Dn(e("comment"),Bn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Ll=d((({field:e,input:t})=>{const{data:n}=ll("MILITARY_STATUS");return o(il,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Ul={processPersonalDataLeadFlg:{text:"Согласие на обработку персональных данных",docId:4},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentPhotoFlg:{text:"Прочие согласия (согласие на фотографирование)",docId:1},consentAssignmentClaimsFlg:{text:"Прочие согласия (согласие на уступку прав требований)",docId:1},consentCollectionFlg:{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",docId:1},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}},ql=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Wl=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(ql,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Hl=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Yl=e=>"application/json"===e.headers.get("Content-Type"),Kl=async(e,t,n)=>await fetch("https://retail-light-api.cprb.dev.rshbdev.ru/api/v1"+e,{method:t,headers:{"Content-Type":"application/json",...Hl()},credentials:"include",body:n?JSON.stringify(n):null}).then((e=>{if(e.ok)return(e=>Yl(e)?e.json():e)(e);throw e})).catch((e=>{throw e})),Xl=e=>{sessionStorage.setItem("accessToken",e.access_token),sessionStorage.setItem("refreshToken",e.refresh_token)},Gl=async e=>await Kl("/public-data/createUserProfile","POST",e),Jl=async e=>await Kl("/user-data/updateUserProfile","PUT",e),Ql=async e=>await Kl("/user-data/createDraftTask","POST",e),Zl=async e=>await Kl("/user-data/updateUserTask","PUT",e),ea=async e=>await Kl("/sms/sendCode","POST",e),ta=async e=>await Kl("/sms/checkCode","POST",e).then(Xl),na=async e=>await Kl(`/sms/createCaptcha?phoneNumber=${e}`,"GET"),la=async e=>await Kl("/sms/checkCaptcha","POST",e),aa=async e=>await Kl(`/feedback/file?id=${e}`,"GET"),ia=d((({className:e,error:t,docId:n,...l})=>{const{open:a}=de();return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(ul,{...l}),n?o(be,{className:"text-primary-main",onClick:()=>ra(n,a),children:o(Re,{children:"Ознакомиться"})}):null]}),Zt(t)]})})),ra=async(e,t)=>{const n=await(async e=>{const t=await aa(e);return URL.createObjectURL(await t.blob())})(e);t(o(Wl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",children:o("iframe",{src:`${n}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"})}))},sa=d((({field:e,input:t})=>t&&t.name?o(ia,{text:Ul[t.name]?.text,docId:Ul[t.name]?.docId,...Dn(e(t.name),Bn[t.name],t?.required)}):null)),oa=d((({field:e,input:t})=>{const{data:n}=ll("creditInRshbCd");return o(il,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала руководителем, которого Вы являетесь, кредит в АО «Россельзбанк»",fieldName:"creditInRshbCd",input:t})})),ca=d((({field:e,input:t})=>o(rn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...Dn(e("dependents"),Bn.dependents,t?.required),...t}))),da=d((({field:e,input:t})=>o(_l,{label:"Желаемая дата встречи",...Dn(e("desiredMeetingDate"),Bn.meetingDay,t?.required)}))),ma=d((({field:e})=>o(xl,{text:"Являюсь инвалидом",...Dn(e("disablePeopleFlg"),Bn.disablePeopleFlg)}))),ua=d((({field:e,input:t})=>o(_l,{label:"Дата выдачи",...Dn(e("dulIssueDateField"),Bn.dulIssueDateField,t?.required)}))),ha=d((({field:e,input:t})=>{const{value:n,onChange:l}=e("dulSubdivisionCode"),a=i((e=>{l?.(e?.data?.code?.replace("-",""))}),[]);return o(rn,{label:"Кем выдан",...t,...Dn(e("dulIssuedBy"),Bn.dulIssuedBy,t?.required),onDaDataChange:a,daDataQueryPrefix:n})})),pa=d((({field:e,input:t})=>o(rn,{label:"Номер документа",type:"number",...Dn(e("dulNumber"),Bn.dulNumber,t?.required)}))),ga=d((({field:e,input:t})=>o(rn,{label:"Серия документа",type:"number",...Dn(e("dulSerie"),Bn.dulSerie,t?.required)}))),fa=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(rn,{label:"Код подразделения",type:"number",...t,...Dn(e("dulSubdivisionCode"),Bn.dulSubdivisionCode,t?.required),onDaDataChange:n})})),xa=d((({field:e,input:t})=>{const{data:n}=ll("EDUCATION_LEVEL");return o(il,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),ba=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(rn,{label:"Электронная почта",...Dn(e("email"),Bn.email,n),...l})})),ya=d((({field:e,input:t})=>{const{data:n}=ll("ORGANIZATION_ACTIVITY_TYPE");return o(il,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),va=d((({field:e,input:t})=>{const{data:n}=ll("ORGANIZATION_KIND");return o(il,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Na=d((({field:e,input:t})=>{const{data:n}=ll("EMPLOYMENT_TYPE");return o(il,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),wa=d((({field:e,input:t})=>o(rn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...Dn(e("expenses"),Bn.expenses,t?.required),...t}))),ka=d((({field:e,input:t})=>o(rn,{label:"Стаж",placeholder:"За последние 5 лет",...Dn(e("experience5Years"),Bn.experience5Years,t?.required),...t}))),Ca=d((({field:e,input:t})=>o(rn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...Dn(e("familyMembers"),Bn.familyMembers,t?.required),...t}))),Sa=d((({field:e,input:t})=>{const{data:n}=ll("MARITAL_STATUS");return o(il,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Ta=d((({field:e,input:t})=>o(gn,{label:"Способ получения ответа",options:$t,...Dn(e("feedbackMethod"),Bn.feedbackMethod,t?.required)}))),Ia=d((({field:e,input:t})=>o(rn,{label:"Адрес",...Dn(e("fullAddress"),Bn.fullAddress,t?.required),...t}))),Ba=d((({field:e,input:t})=>o(rn,{label:"ФИО",...Dn(e("fullName"),Bn.fullName,t?.required),...t}))),Pa=d((({field:e,input:t})=>o(rn,{label:"Общий стаж",placeholder:"Количество лет",...Dn(e("generalSeniority"),Bn.generalSeniority,t?.required),...t}))),Ma=d((({field:e,input:t})=>{const{data:n}=ll("HOUSE_TYPE");return o(il,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Ra=d((({field:e,input:t})=>{const n=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(rn,{label:"ИНН",type:"number",...t,...Dn(e("inn"),Bn.inn,t?.required),onDaDataChange:n})})),Da=d((({field:e})=>o(xl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Va=d((({field:e,input:t})=>o(rn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...Dn(e("jobsNumber"),Bn.jobsNumber,t?.required),...t}))),za=d((({field:e,input:t})=>o(rn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...Dn(e("lastJobExperience"),Bn.lastJobExperience,t?.required),...t}))),_a=d((({field:e,input:t})=>o(rn,{label:"Наименование юридического лица",...t,...Dn(e("legalEntityName"),Bn.legalEntityName,t?.required)}))),Aa=d((({field:e,input:t})=>o(rn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...Dn(e("legalForm"),Bn.legalForm,t?.required),...t})));function Oa(e="/api/v1/regions"){const{data:t}=$n(e,rt);return Array.isArray(t)?t:[]}const Fa=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=Oa(Et)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(gn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...Dn(e("localities"),Bn.localities,t?.required),isSearch:!0})})),ja=d((({field:e,input:t})=>o(rn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Dn(e("mandatoryIncome"),Bn.mandatoryIncome,t?.required),...t}))),$a=d((({field:e,input:t})=>o(rn,{label:"Отчество (Обязательно, при наличии)",...Dn(e("middleName"),Bn.middleName),...t}))),Ea=d((({field:e,input:t})=>o(rn,{label:"Имя",...Dn(e("name"),Bn.name,t?.required),...t}))),La=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:u("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Ua=d((({field:e})=>_n(e("acquiringType")?.value?.key)?o(La,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),qa=d((({field:e,input:t})=>{const{data:n}=ll("ORGANIZATION_TYPE");return o(il,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Wa=d((({field:e,input:t})=>{const n=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(rn,{label:"Наименование организации",...t,...Dn(e("organizationName"),Bn.organizationName,t?.required),onDaDataChange:n})})),Ha=d((({field:e,input:t})=>o(rn,{label:"Иные доходы",placeholder:"Введите значение",type:"number",...Dn(e("otherIncome"),Bn.otherIncome,t?.required),...t}))),Ya=d((({field:e,input:t})=>o(rn,{label:"Обязательные выплаты",placeholder:"Введите значение",type:"number",...Dn(e("otherPayments"),Bn.otherPayments,t?.required),...t}))),Ka=d((({field:e,input:t})=>o(rn,{label:"Адрес",...Dn(e("participantAddress"),Bn.participantAddress,t?.required),...t}))),Xa=d((({field:e,input:t})=>o(_l,{label:"Дата регистрации по месту жительства",...Dn(e("participantDateRegistration"),Bn.participantDateRegistration,t?.required)}))),Ga=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(rn,{...Dn(e("partnerComments"),Bn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Ja=e=>"_"===e,Qa=e=>/\d/.test(e),Za=e=>Ja(e)||Qa(e),ei=[..."+7 (___) ___-__-__"],ti=ei.findIndex(Ja),ni=ei.map(((e,t)=>Za(e)?ei.slice(0,t).filter(Za).length:-1));const li=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ei.map(((e,n)=>Qa(e)?e:t.charAt(ni[n])||e)),l=ni.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ti,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Gt,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),ai=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(li,{"aria-label":t,label:Ht({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),Zt(n)]}))),ii=d((({field:e,input:t})=>o(ai,{label:"Телефон",...Dn(e("phone"),Bn.phone,t?.required),...t}))),ri=d((({field:e,input:t})=>{const{data:n}=ll("POSITION");return o(il,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),si=d((({field:e})=>_n(e("acquiringType")?.value?.key)?o(La,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),oi=ut((({field:e,source:t})=>o(gn,{placeholder:"Выберите продукт",label:"Продукт",options:ci(t?.productList),...Rn(e("product"),Bn.product)}))),ci=e=>(e??[]).map((e=>({key:e,value:e}))),di=d((({field:e,input:t,url:n})=>{const l=Oa(n);return o(gn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Dn(e("region"),Bn.region,t?.required)})})),mi=d((({field:e,input:t})=>{const n=qn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(gn,{label:"Регион",placeholder:"Выберите регион",options:l,...Dn(e("region"),Bn.region,t?.required)})})),ui=d((({field:e,input:t})=>o(rn,{label:"Пенсионные доходы",placeholder:"Введите значение",type:"number",...Dn(e("retirementIncome"),Bn.retirementIncome,t?.required),...t}))),hi=d((({field:e})=>{const t=e("secondaryPhone");return o(ai,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Rn(t,Bn.secondaryPhone):t})})),pi=d((({field:e,input:t})=>o(gn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:jt,...Dn(e("serviceDirection"),Bn.serviceDirection,t?.required)}))),gi={horizontal:"@lg:flex-row",vertical:""},fi=d((({label:e,items:t,value:n,className:l,onChange:a,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Re,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",gi[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(ul,{isRadio:!0,text:t,value:n===e,onChange:()=>a&&a(e),disabled:i},String(e))))})]}))),xi=d((({className:e,label:t,onChange:n,error:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(fi,{label:Ht({label:t,errors:a?.errors}),onChange:e=>n&&n(e),...a}),Zt(l)]}))),bi=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],yi=d((({field:e,input:t})=>o(xi,{label:"Пол",orientation:"horizontal",items:bi,...Dn(e("sex"),Bn.sex,t?.required)}))),vi=d((({field:e})=>o(xl,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...Dn(e("shareholderFlg"),Bn.shareholderFlg)}))),Ni=e=>"_"===e,wi=e=>/\d/.test(e),ki=e=>Ni(e)||wi(e),Ci=[..."___-___-___ __"],Si=Ci.findIndex(Ni),Ti=Ci.map(((e,t)=>ki(e)?Ci.slice(0,t).filter(ki).length:-1));const Ii=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Ci.map(((e,n)=>wi(e)?e:t.charAt(Ti[n])||e)),l=Ti.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(Si,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(Gt,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Bi=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ii,{"aria-label":t,label:Ht({label:t,errors:r?.errors}),valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),Zt(l)]}))),Pi=d((({field:e,input:t})=>o(Bi,{label:"СНИЛС",...Dn(e("snils"),Bn.snils,t?.required),...t}))),Mi=d((({field:e,input:t})=>o(rn,{label:"Фамилия",...Dn(e("surname"),Bn.surname,t?.required),...t}))),Ri=["От 1 мес","До 15 лет"],Di=d((({field:e})=>o(Qn,{title:"Срок, месяцев",items:Ri,min:1,max:180,...e("term")}))),Vi=d((({field:e,input:t})=>o(rn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Dn(e("totalIncome"),Bn.totalIncome,t?.required),...t}))),zi=d((({field:e,input:t})=>o(gn,{label:"Тип обслуживания",options:Ft,...Dn(e("serviceType"),Bn.serviceType,t?.required)}))),_i=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Ai=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(fi,{className:"whitespace-normal",orientation:"horizontal",items:_i,value:t,onChange:e=>n&&n(e)})})}));const Oi={$ref:"/wcms-resources/outservice-productlist.json"},Fi=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(Mi,{field:e,input:n}),name:o(Ea,{field:e,input:n}),middleName:o($a,{field:e,input:n}),phone:o(ii,{field:e,input:n}),email:o(ba,{field:e,input:n}),fullName:o(Ba,{field:e,input:n}),inn:o(Ra,{field:e,input:n}),legalForm:o(Aa,{field:e,input:n}),organizationName:o(Wa,{field:e,input:n}),generalSeniority:o(Pa,{field:e,input:n}),lastJobExperience:o(za,{field:e,input:n}),experience5Years:o(ka,{field:e,input:n}),jobsNumber:o(Va,{field:e,input:n}),beginDate:o(Al,{field:e,input:n}),fullAddress:o(Ia,{field:e,input:n}),comment:o(El,{field:e,input:n}),addressBranch:o(Wn,{field:e,input:n,isPremium:a}),sex:o(yi,{field:e,input:n}),birthday:o(Ol,{field:e,input:n}),birthPlace:o(Fl,{field:e,input:n}),desiredMeetingDate:o(da,{field:e,input:n}),product:o(oi,{field:e,source:Oi}),localities:o(Fa,{field:e,input:n}),isClient:o(Da,{field:e}),partnerComments:o(Ga,{field:e,input:n}),collectionCount:o($l,{field:e,input:n}),acquiringType:o(zn,{field:e,input:n}),onlineCheckout:o(Ua,{field:e}),posTerminal:o(si,{field:e}),serviceType:o(zi,{field:e,input:n}),term:o(Di,{field:e}),amount:o(nl,{field:e}),annualRevenue:o(ol,{field:e,input:n}),vedTypes:o(Ai,{field:e}),feedbackMethod:o(Ta,{field:e,input:n}),serviceDirection:o(pi,{field:e,input:n}),bankEmpolee:o(vl,{field:e}),secondaryPhone:o(hi,{field:e}),consentToReceiveMaterials:o(sa,{field:e,input:n}),processPersonalDataLeadFlg:o(sa,{field:e,input:n}),consentProviderFlg:o(sa,{field:e,input:n}),consentPhotoFlg:o(sa,{field:e,input:n}),consentAssignmentClaimsFlg:o(sa,{field:e,input:n}),consentCollectionFlg:o(sa,{field:e,input:n}),consentInformFlg:o(sa,{field:e,input:n}),consentPfrFlg:o(sa,{field:e,input:n}),applicationDate:o(rn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:a?o(mi,{field:e}):o(di,{field:e,input:n,url:Lt(t)}),education:o(xa,{field:e,input:n}),housing:o(Ma,{field:e,input:n}),employment:o(Na,{field:e,input:n}),organization:o(qa,{field:e,input:n}),amountWorkers:o(sl,{field:e,input:n}),employerActivities:o(ya,{field:e,input:n}),employerOrganization:o(va,{field:e,input:n}),positionOrganization:o(ri,{field:e,input:n}),familyStatus:o(Sa,{field:e,input:n}),children:o(jl,{field:e,input:n}),familyMembers:o(Ca,{field:e,input:n}),dependents:o(ca,{field:e,input:n}),totalIncome:o(Vi,{field:e,input:n}),expenses:o(wa,{field:e,input:n}),snils:o(Pi,{field:e,input:n}),conscription:o(Ll,{field:e,input:n}),armyIdFlg:o(bl,{field:e,input:n}),dulSerie:o(ga,{field:e,input:n}),dulNumber:o(pa,{field:e,input:n}),dulIssueDateField:o(ua,{field:e,input:n}),dulSubdivisionCode:o(fa,{field:e,input:n}),dulIssuedBy:o(ha,{field:e,input:n}),participantAddress:o(Ka,{field:e,input:n}),participantDateRegistration:o(Xa,{field:e,input:n}),retirementIncome:o(ui,{field:e,input:n}),otherIncome:o(Ha,{field:e,input:n}),mandatoryIncome:o(ja,{field:e,input:n}),otherPayments:o(Ya,{field:e,input:n}),disablePeopleFlg:o(ma,{field:e,input:n}),bankruptcyFlg:o(Nl,{field:e,input:n}),shareholderFlg:o(vi,{field:e,input:n}),legalEntityName:o(_a,{field:e,input:n}),creditInRshbCd:o(oa,{field:e,input:n}),bankEmployeeCode:o(yl,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},ji=e=>2===e?"@xl:grid-cols-2":"",$i=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function Ei({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Li={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"},Ui={primary:u("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},qi=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Ei(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(Li[a],Ui[a]),l),type:s,role:d,onClick:m,children:e})})),Wi=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Wl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(qi,{type:"button",onClick:r,children:"Хорошо"})]})})})),Hi=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Wi,{...e}),n),close:n}},Yi=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Ki=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${_n(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...Gi(o),...Xi(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Xi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Gi=e=>e?{vedTypes:Object.fromEntries(_i.map((({id:t})=>[t,t===e])))}:{},Ji={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Vn[0],serviceType:Ft[0],feedbackMethod:$t[0],serviceDirection:jt[0],vedTypes:_i[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Qi=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),Zi=(e,t)=>o(qi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),er=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(ul,{...e}),o(Qi,{link:t})]}),Zt(Rn(e,Tn).error)]}):o(Qi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Zi(n)]}),tr={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=g?"/api/v1/lead":"/api/v1/sendcorporatelead",x={typeForm:n,...vt(l,g),...Nt(i,g),...bt(a),...yt(s,"desiredMeetingDate"),...g?yt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...wt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},nr=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ji[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Ft[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),w=i((async(e,t)=>{const l=lr(x,e),a=Yi(Mn(l));if(!fn(a(e)))return"Fail";const i=Ki({...e,...h}),r=await tr.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Hi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Vt();kt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:C,reset:S}]=_t(b,{onSubmit:w}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),S())}),[y]),c(Ot,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:C,children:[r.map(((e,t)=>c("div",{className:u(ji(e.columns),"grid gap-x-m"),children:[$i(e.title),(e?.inputs||[])?.map(Fi(k,n))]},`section-${t}`))),er(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("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:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),lr=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)}))));function ar(e){const[t,n]=l(JSON.parse(globalThis.localStorage?.getItem(e)||"null"));return[t,i((t=>{globalThis.localStorage?.setItem(e,JSON.stringify(t)),n(t)}),[e,globalThis.localStorage])]}const ir=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const rr=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),sr=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(Rn(n(e?.name),Bn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(ir,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:l})=>o(rr,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(Fi(n,t))}),renderFoldButton:or(c("div",{children:[o(ul,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Zt(i?"Отметьте все обязательные соглашения":"")]}))})})})),or=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),cr=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=dr(n||[]);return l.length>2?c("div",{children:[a.map(Fi(e,t)),o(sr,{inputs:l,field:e})]}):(n||[])?.map(Fi(e,t))},dr=e=>({consentInputs:e?.filter((e=>Object.keys(Ul).includes(e.name)))||[],restInputs:e?.filter((e=>!Object.keys(Ul).includes(e.name)))||[]}),mr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Vn[0],serviceType:Ft[0],feedbackMethod:$t[0],serviceDirection:jt[0],vedTypes:_i[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1,participantAddress:"",participantDateRegistration:void 0},ur=(e,t,n="")=>{if(t){const e=JSON.parse(t);return e.birthday=new Date(e?.birthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||mr[e.name]]))),typeForm:{key:n,text:""}}},hr=(e,t)=>o(qi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),pr={width:"118",height:"24"},gr={"bg-white":"color",transparent:"white"},fr={"bg-white":"text-primary-main",transparent:"text-white"},xr=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:gr[e]},className:fr[e],width:n?.width,height:n?.height}),br={"bg-white":"text-primary-text",transparent:"text-white"},yr=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...he(s),children:[xr(i,n?.image,pr),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:br[i],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),vr=async(e,t)=>{const n=await na(t);e(URL.createObjectURL(await n.blob()))},Nr=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=l(""),[d,m]=l(""),[u,h]=l(!1);return a((()=>{vr(s,e)}),[]),o(Wl,{head:o(yr,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-[140px] w-[300px]",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>vr(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(Gt,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(qi,{onClick:t,version:"secondary",children:"Вернуться"}),o(qi,{type:"submit",disabled:!d,onClick:()=>(async({code:e,setHasError:t,close:n,sendCode:l=Yt})=>{const a=await la({captchaText:e});"ERROR"===await a.text()?t(!0):(l(),n?.())})({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),wr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),kr=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:Cr(e)})))),Cr=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Sr=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=l(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=a.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),m(l)}}),[e]),g=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),m(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:p(l),className:Tr(l,e,n)},l)))}),n?o("div",{className:"text-error",children:r}):null]})})),Tr=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},Ir=d((({isDisabled:e,onClick:t,text:n})=>o(qi,{type:"button",onClick:t,disabled:e,children:o(Re,{font:"font-medium",children:n})}))),Br=d((({close:e=Yt,onClose:t=Yt,title:n,description:s,__html:d,code:m=!0,codeLength:u=4,textButton:h="",phoneNumber:p="+79999999999"})=>{const[g,f]=l(Array(u).fill("")),{handleSubmit:x,hasError:b,errorText:y,isLoading:v,timeNextReq:N,isSubmitButtonDisabled:w,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T}=(({close:e,values:t})=>{const[n,s]=l(!1),[o,c]=l(""),[d,m]=l(!1),[u,h]=l(0),[p,g]=l(!1),[f,x]=l(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await ta({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e()}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return a((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}})({values:g,close:e}),I=i((()=>{(async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:l,setAttemps:a})=>{try{await ea({phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}}),a(0),n(180),l(!0)}catch(e){429===e?.status&&t.open()}})({phoneNumber:p,captchaDialog:B,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T})}),[]),B=((e,t)=>{const{open:n,close:l,closeAll:a}=de();return{open:()=>n(o(Nr,{close:l,onClose:t,...e})),close:l,closeAll:a}})({phoneNumber:p,sendCode:I},t);return a((()=>{I()}),[]),o(Wl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:n,description:s,headlineVersion:"S",isEmbedded:!0}),m?o(Sr,{values:g,setValues:f,errorText:y,hasError:b}):null,Mr(N,k,I),o(Pe,{itemSize:"list-s",__html:d}),Pr(h,w,x),v?o(wr,{blur:!1}):null]})})})),Pr=(e,t,n)=>e?o(Ir,{isDisabled:t,onClick:n,text:e}):null,Mr=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(kr,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(be,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Rr=({inputs:e,programId:t,saveForm:n})=>{const[a,r]=l(""),[,s]=ar("taskId"),[,c]=ar("profileId"),[,d]=ar("participantId"),m=i(((e,t,n)=>{d(e),s(t),c(n)}),[]);return{handleSubmit:i((async l=>{const a=Yi(Mn(e));if(!fn(a(l)))return"Fail";try{const{profile:e}=await Gl({profile:{phone:xt(l.phone)}}),a=e?.id;if(a&&l?.phone){const e=async()=>{try{await Jl(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&ft(i,!0),email:s,phone:xt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(a,l));const{taskId:e,participantId:i}=await Ql({profileId:a,programId:t});await Zl(((e,t,n,l)=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))(i,e,a,l)),m(i,e,a),n(JSON.stringify(l)),globalThis.location.href="/credit-lead"}catch{r("Fail")}},i=Object.keys(Ul).filter((e=>l[e])).map((e=>Ul[e]?.text));(e=>{const{open:t,close:n}=de();return{open:(l={})=>t(o(Br,{onClose:n,...e}),l),close:n}})({close:e,...Dr(l?.phone,i)}).open()}}catch{r("Fail")}}),[]),responseStatus:a}},Dr=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:xt(e),textButton:"Оформить",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${Vr(t)}`}),Vr=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,zr=d((({className:e,title:t,programId:n="",typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],[h,p]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const[g,f]=ar("leadForm"),x=ur(m,g,i),{handleSubmit:b,responseStatus:y}=Rr({inputs:m,programId:n,saveForm:f});if(y){Hi({responseType:y,typeForm:i}).open()}const[,{field:v,onSubmit:N,reset:w}]=_t(x,{onSubmit:b});return a((()=>{"OK"===h&&(p(""),w())}),[h]),o(Ot,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:N,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(ji(e.columns),"grid gap-x-m"),children:[$i(e.title),cr({field:v,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),hr(s)]})})})),_r=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Ar=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Or=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Fr(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:jr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}function jr(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const $r=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:a,children:r,onIntersection:s})=>{const c=Fr(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:r})})),Er=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Lr=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(qr(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Ur(c,v):{},...N?Or(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(C=(e,n)=>o($r,{className:u(m,a?Er[a-1]:"",{"h-full":N},t),style:w?Ur(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(p)});var C})),Ur=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),qr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Wr={"horizontal-list":"w-6","vertical-list":"h-6"},Hr=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Wr[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Yr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},Kr=e=>e,Xr=(e=Kr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Gr=Xr(),Jr=(e=Kr)=>Xr((t=>-e(t))),Qr=Jr(),Zr=e=>t=>e.scrollWidth/t,es=e=>(t,n)=>{e.scrollBy({left:n*Zr(e)(t),behavior:"smooth"})},ts=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Jr()(a),Xr()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?es(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?es(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},ns={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ls=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[h,p]=ts({itemCount:s.length}),g=as(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Lr,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Yr({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",ns[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Hr({activeIndex:t,onClick:f,listType:l}))}):null})),as=(e=!1)=>({behavior:e?"auto":"smooth"}),is=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:u("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{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"})}))),rs=d((e=>o(is,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ss=d((e=>o(is,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),os="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",cs=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?ds(t):null,i?o(rs,{className:u(ms(a),m?"left-1":"left-0"),onClick:s}):null,r?o(ss,{className:u(ms(a),m?"right-1":"right-0"),onClick:d}):null]})})),ds=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(os,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(os,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ms=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),us=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=ts({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Lr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(cs,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(ls,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),hs=({blocksToRender:e,...t})=>o(us,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Ar(!0)),children:I(e,t)},String(n))})}),ps=e=>e%2!=0,gs=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),fs=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(gs,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),xs=({isUnfolded:e,onToggle:t})=>o(fs,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),bs=["ArrowDownIcon","ArrowUpIcon"],ys="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",vs=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(ys),children:[P(i,{...a.options,parent:n}),ps(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(ir,{renderFoldableSection:({isUnfolded:e})=>c(rr,{className:u(ys),isUnfolded:e,children:[P(r,{...a.options,parent:n}),ps(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(fs,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:bs[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},Ns=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[ws(n,t),vs({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[ws(n,t),hs({...l,blocksToRender:t})]});default:return null}})),ws=(e,t)=>e&&!t.length?o(_r,{...e}):null,ks=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Cs=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(La,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ss=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,ks(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Ts(l)).filter(Boolean))]}),n?o("div",{children:o(qi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Ts=e=>([t,n])=>{const l=n?.type;return"array"===l?Is(t,e)(n):null},Is=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Cs,{items:l,multiple:!n?.single,...t(e)})]},e)};function Bs(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ps=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Ms=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Ps(t[e])||Ps(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ps(t[e])||Ps(n[e])||Rs(t[e])<=Rs(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Ps(t[e])||Ps(n[e])||Rs(t[e]?.min)>=Rs(n[e]?.min)&&Rs(t[e]?.min)<=Rs(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Ps(t[e])||Ps(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ps(t[e])||Ps(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Rs=e=>Number(e||0),Ds=(e,{block:t,page:n,normalize:l=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=_t(e),d=r((()=>Bs(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=zt)=>e?.filter((([,e])=>Ms(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Vs={},zs={},_s=ut((({className:e,filtrationSchema:t=Vs,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Ds(zs,{block:a.block,page:a.options?.page}),d=o(mn,{className:"w-64",label:n?.title,options:As(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>As(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ss,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(qi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(Ns,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),As=e=>Bs(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Os=(e=!1)=>e?"text-left":"text-center",Fs={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},js=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Fs[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),$s=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Os(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Es)}):null]})})),Es=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(js,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Ls=e=>({icon:t,title:n,description:l},a)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o(Re,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o(Re,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),Us=(e,t,n)=>o("div",{className:`grid gap-2xs ${qs(t)}`,children:e.map(Ls(n))}),qs=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ws=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Us(e,l,t):null]}))),Hs={start:"justify-start",center:"justify-center",end:"justify-end"},Ys=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",Hs[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:je(e)})})),Ks=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Xs="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Gs="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Js="flex flex-col gap-y-xl min-w-52",Qs=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Zs=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Qs,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),eo=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,to=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),no=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),lo=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(no,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(to,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Zs,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),ao=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(Qn,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),io={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ro={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},so=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=io.prefMonthsNum,prefTravelBonusRate:i=io.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||ro,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},oo=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=_t({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=so(r,n);return o(Ks,{className:e,title:t,...i,children:c("section",{className:u(Xs,e),children:[c("div",{className:Gs,children:[ao({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),ao({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?lo({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Js,children:[f>=0?o(Zs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(l,{isVertical:!0}),eo(a)]})]})})})),co=Math.round(29.5),mo=(e,t=0)=>e?.sum?e.sum:t,uo=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ho=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,po=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(fi,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),go=e=>po({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),fo=" (c капитализацией)",xo=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Js,children:[o(Zs,{title:`Доход в конце срока${i?fo:""}`,value:e,postfix:n,prefix:"+"}),o(Zs,{title:`Сумма в конце срока${i?fo:""}`,value:t,postfix:n}),je(l,{isVertical:!0}),a?.map(eo)]}),bo=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:yo([e,t],l),yo=([e,t],n=[])=>({[e]:n.length?Qr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Gr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),vo=(e,[t,n],l)=>e>=l[t]&&e<=l[n],No={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const wo={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ko=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?No[e?.rateType]:"",{data:n}=$n(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...wo,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&Co(s,e)&&vo(l,["minSum","maxSum"],e)&&vo(n,["minDays","maxDays"],e)))||wo,{rate:m}=d,u=So(m,e),h=l+u,p=c||[wo];return{...d,...yo(["minSum","maxSum"],p),...yo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Co=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,So=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},To=ut((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=_t({moneyValue:mo(r,1e5),daysValue:uo(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=ko(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(Ks,{className:e,title:t,...d,children:c("section",{className:u(Xs,e),children:[c("div",{className:Gs,children:[ao({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Qn,{items:[`От ${ho(v.min||0)}`,`До ${ho(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Io(p,h),go({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),lo({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),xo({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),Io=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(ul,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(ul,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Bo=(e=[],t=!1)=>Po([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Po=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Mo=({min:e=0,max:t=0,availableMonths:n,...l})=>o(Qn,{items:[`От ${Ro(e)}`,`До ${Ro(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Ro=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Do=e=>po({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Vo=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(Yn(t?.[a],n.minMonths,n.maxMonths))},zo=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},_o={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ao=e=>Oo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Oo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Oo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Oo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Oo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Fo=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[_o],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ao({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=bo(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=bo(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Ao({row:e,userInputParams:t,paramsViewSettings:n})&&vo(l,["minSum","maxSum"],e)&&vo(a,["minMonths","maxMonths"],e)))||_o)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=zo(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},jo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),$o={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Eo=ut((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,Po([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=_t({moneyValue:mo(s,2e5),monthsValue:uo(s,co),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=Fo(p,n,r),x=Do({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Yn(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(Yn(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!jo(s)&&m&&Vo({field:g,defParams:m,calcParams:f,map:$o,monthsValue:"minMonths"})}),[n,s]),o(Ks,{className:e,title:t,...d,children:c("section",{className:u(Xs,e),children:[c("div",{className:Gs,children:[ao({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),Mo({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Lo({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u(Js,"@4xl:w-1/2"),children:[o(Zs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Zs,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(Zs,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),je(l,{isVertical:!0}),eo(i)]})]})})})),Lo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(ul,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(ul,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(ul,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(ul,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Uo=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},qo={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Wo=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Ko(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Yo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Yo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Yo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Yo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,vo(l,["minSum","maxSum"],t),vo(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||qo,{rate:u}=m,h=Ho(u,e),p=l+h,g=t||[qo];return{...m,...yo(["minSum","maxSum"],g),...yo(["minMonths","maxMonths"],g),availableMonths:Uo(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},Ho=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Yo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Ko=(e,t)=>e+Math.round((t-e)/2),Xo=(e="rub")=>"rub"===e,Go=(e,t)=>{const{minMonths:n,maxMonths:l}=yo(["minMonths","maxMonths"],ec(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Yn(a,n,l)}},Jo=(e,t)=>{const{minSum:n,maxSum:l}=yo(["minSum","maxSum"],ec(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Yn(a,n,l)}},Qo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Zo=e=>{const t=Xo(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},ec=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},tc=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?po({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?po({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),nc(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?go({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},po({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),nc(e.isShowNewClient),e.isShowNewClient?o(ul,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},nc=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,lc={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},ac={text:"₽",key:"rub"},ic=ut((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[ac],g=i((e=>t=>e?{...t,...Zo(t),...Jo(t,e),...Go(t,e),...Qo(t,e)}:t)(h),[h]),[f,{field:x}]=_t({moneyValue:mo(d,2e4),monthsValue:uo(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:ac},{normalize:g}),b=x?.("currency")?.value??ac,y=x?.("isNewClient")?.value,v=ec(h,b),N=Wo(f,v,s),{rate:w,income:k,finalSum:C,type:S=""}=N,T=i((()=>{Vo({field:x,defParams:Bo(v,y),calcParams:N,monthsValue:"minMonths",map:lc})}),[x,h]);a((()=>{!jo(d)&&v&&T()}),[d,h]);const I=w===Bo(v,y)?.rate;return o(Ks,{className:e,title:t,...m,children:c("section",{className:u(Xs,e),children:[c("div",{className:Gs,children:[c("div",{className:"flex gap-m",children:[ao({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:rc(b?.key)}),h&&h?.length>1?o(gn,{label:"Валюта",options:p,...x("currency")}):null]}),Mo({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),tc({...N,...s},x)]}),lo({rate:w,children:oc(T,I)}),xo({income:k,finalSum:C,buttons:[...l,sc(n?.buttons,S)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),rc=(e="")=>Xo(e)?1e3:100,sc=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},oc=(e,t=!1)=>t?null:o(qi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),cc=e=>dc({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&dc({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),dc=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],mc={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},uc=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[mc],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>cc({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=bo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=bo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>cc({row:e,userInputParams:t,paramsViewSettings:n})&&vo(l+r,["minSum","maxSum"],e)&&vo(i,["minSumOld","maxSumOld"],e)&&vo(r,["minSumExtra","maxSumExtra"],e)&&vo(a,["minMonths","maxMonths"],e)))||mc)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=zo(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},hc=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=_t({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=uc(s,n,i),h=Do({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ks,{className:e,title:t,...r,children:c("section",{className:u(Xs,e),children:[c("div",{className:Gs,children:[ao({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),ao({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Mo({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),pc({...m,...i},d),m.isExtraMoney?ao({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),c("div",{className:u(Js,"@4xl:w-1/2"),children:[o(Zs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Zs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Zs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Zs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(l,{isVertical:!0}),eo(a)]})]})})})),pc=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(ul,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(ul,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(ul,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),gc=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Hn(e,{normalize:(e=a)=>n&&l?String(Yn(Number(fc(e)),n,l)):fc(e),format:Ue(r)}),d=i((e=>t&&t(fc(e))),[t]);return o(Gt,{onChange:d,...s,...c})})),fc=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),xc=d((e=>o(gc,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),bc={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},yc={amount:1500},vc=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=_t(yc),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:bc[r],children:[o(xc,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(qi,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),Nc=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),wc="relative h-full",kc={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Cc=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Ic),r=n?{defaultPadding:"p-6xl pb-m"}:{};return M({...l,renderProps:(n,l,a)=>c("div",{className:Sc(n,{someCardsHighlighted:i}),children:[I(n,l,{className:Tc(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Ic(n)?Nc({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Sc=(e,{someCardsHighlighted:t})=>u(wc,t&&(Ic(e)?"pt-3xl":"pt-3xl sm:pt-16")),Tc=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(wc,"min-w-80",kc[l],t&&(Ic(e)?"pt-3xl sm:pt-16":"pt-3xl"),Ar(n),n&&"h-full"),Ic=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Bc=ut((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(us,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Pc(s?.block?.blocks):[],hasBlur:!0,children:Cc({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Pc=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Mc="z-10 border border-solid w-full h-full",Rc=u(Mc,"absolute hidden @xl:block border-transparent"),Dc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Rc,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Rc,"top-6 right-8 bg-green")}),o("div",{className:u(Rc,"top-3 right-4 bg-green-light")}),c("div",{className:u(Mc,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Vc={black:"bg-black",white:"bg-white"},zc=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Se,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:je([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(_c)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),_c=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Vc[e]}`},String(t)),Ac=d((({icon:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Oc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Fc(l):null]})}))),Fc=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Ac,{...e},String(t))))}),jc=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),$c=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=ue()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),Ec=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Lc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Ec.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Fe(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},Uc(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:qc(s??!1,a??!1,n),buttonClassName:h})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Uc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",qc=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Wc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o($c,{href:a,target:m,className:"h-full",data:jc(v),children:c(Se,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Fe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Lc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Oe,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Hc(l,p)]})})}))),Hc=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Yc=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:je(a)}):null]},String(t))},Kc=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(Yc),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Fe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(ir,{renderFoldableSection:()=>c("div",{children:[x,o(rr,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Xc(m?.parent,h,y):null}):o("div",{children:x})]})})),Xc=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?he(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Gc=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?Jc(n):null,t?.length?Jc(t):null]}))),Jc=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Qc({column:e,i:t})))}),Qc=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(C,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(l?.text)}),children:je([l])})]},String(a))))},`col-${String(t)}`):null,Zc=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black"})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(W,{name:t,width:"24",height:"24",iconVersion:n})}),o(Pe,{__html:e})]}))),ed=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),td=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const l=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold",children:["Шаг ",e," из ",t,"."]})," ",n[e-1]||null,o(ed,{step:l,showPercentage:!1})]})})})),nd={1:[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0},{fieldType:"common",name:"name",required:!0,dadata:!0},{fieldType:"common",name:"middleName",dadata:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0},{fieldType:"common",name:"dulNumber",required:!0},{fieldType:"common",name:"dulIssueDateField",required:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:2,inputs:[{fieldType:"common",name:"participantAddress",required:!0},{fieldType:"common",name:"participantAddress",required:!0,dadata:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",columns:2,inputs:[{fieldType:"common",name:"fullAddress",required:!0,dadata:!0},{fieldType:"common",name:"housing",required:!0}]}],2:[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment",required:!0},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!0},{fieldType:"common",name:"amountWorkers",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!0},{fieldType:"common",name:"employerOrganization",required:!0},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"phone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0},{fieldType:"common",name:"positionOrganization",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"fullAddress",required:!0}]}],3:[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus"}]},{columns:1,inputs:[{fieldType:"common",name:"dependents"}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"retirementIncome"},{fieldType:"common",name:"otherIncome"}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome"}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments"}]},{columns:1,inputs:[{fieldType:"common",name:"snils"}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],4:[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],5:[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"region"}]},{inputs:[{fieldType:"common",name:"addressBranch"}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]},ld=d((({step:e,setStep:t,totalSteps:n})=>c("div",{className:"flex justify-between",children:[o(qi,{onClick:()=>{e>1&&t(e-1)},className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:1===e,children:"Назад"}),o(qi,{onClick:()=>{e<n&&t(e+1)},className:u("w-full @xl:w-auto"),type:"button",disabled:e===n,children:"Далее"})]}))),ad=["Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Отделение Банка"],id=d((({className:e,typeForm:t="",sections:n=[],...a})=>{const[i,r]=l(1),s=n?.flatMap((e=>e?.inputs))||[],d=ur(s,t),[,{field:m,onSubmit:h}]=_t(d,{onSubmit:()=>!1});return o(g,{className:u("bg-transparent",e),defaultPadding:"p-6xl",...a,children:c("div",{className:"container grid grid-cols-12",children:[o(td,{stepsTitles:ad,step:i,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:c("form",{onSubmit:h,className:"space-y-m",children:[rd({sections:nd[i],typeForm:t,field:m}),o(ld,{step:i,setStep:r,totalSteps:5})]})})]})})})),rd=({sections:e,field:t,typeForm:n})=>e.map(((e,l)=>c("div",{className:u(ji(e.columns),"grid gap-x-m"),children:[sd(e?.inputs),$i(e?.title),cr({field:t,typeForm:n,inputs:e?.inputs})]},`section-${l}`))),sd=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e})=>o(Zc,{__html:e}))):null},od=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,cd=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),dd=1e9,md={sum:{min:1e4,max:dd},period:3},ud=ut((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Ds(md,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:hd(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=pd(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ss,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(xc,{label:l?.title,min:500,max:dd,...d("sum",{parse:e=>({min:Number(e),max:dd}),format:({min:e})=>String(e)})}),o(Qn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Ns,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),hd=e=>st((e?.paramsSource?.rateRows||[]).filter(od).flatMap((e=>cd(e.minMonths,e.maxMonths)))),pd=e=>st(e.flatMap((e=>e||[])).filter(od).flatMap((e=>cd(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],gd=[{key:"10"},{key:"50"},{key:"100"}],fd=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(mn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:gd,iconVersion:"black"})]})},xd="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",bd=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:xd,"aria-label":`Страница ${i}`,children:i},String(t)):null},yd={width:"24",height:"24"},vd=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Nd(1===e),...yd})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:xd,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(bd),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:xd,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Nd(e===n),...yd})})]})},Nd=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",wd=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(vd,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(fd,{itemCount:l,onItemCountChange:a}):null]}),kd=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",Kt),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),Cd=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(kd,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Vl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Vl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(qi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Sd=({title:e,timestamp:t,publicId:n})=>{const l=ue(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:ft(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},Td="/api/v1/depository",Id={startDate:void 0,endDate:void 0,query:""},Bd=ut((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=_t(Id),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?ft(l,!0):"",r=a?ft(a,!0):"",s=new URLSearchParams(Td);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=$n(Td+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Cd,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Sd,{...e},String(e.publicId)))):o(_r,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(wd,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Pd=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Md=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Pd(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Rd="location";function Dd(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",zd()??{name:e}),r=i((e=>{_d(e),n(e)}),[]),{data:s}=$n(Vd()?null:"/api/v1/region",rt);return a((()=>{s&&!Vd()&&n(s)}),[s]),[t??{name:e},r]}const Vd=()=>Boolean(globalThis.localStorage?.getItem(Rd)),zd=()=>{try{const e=globalThis.localStorage?.getItem(Rd);return e&&JSON.parse(e)}catch(e){return null}},_d=e=>{try{globalThis.localStorage?.setItem(Rd,JSON.stringify(e))}catch(e){}};var Ad;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Ad||(Ad={}));const Od=new Intl.NumberFormat("ru",{style:"currency",currency:Ad.RUB}),Fd=e=>e?Od.format(e):"",jd="text-m font-light text-secondary-text ",$d=`${jd} text-left`,Ed=`${jd} pl-5xl text-center`,Ld=`${jd} pl-5xl text-right`,Ud={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},qd=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:$d,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:Ed,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:Ld,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Wd)})]}))),Wd=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:Ud[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:Fd(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:Fd(e?.buyExchangeRate)})})]},t)},Hd={icon:"GpsIcon"},Yd=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(js,{...Hd,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Kd=(e,t,n)=>{const l=Number(Xd(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Xd=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Gd=e=>Bt([[e=>e.value!==Ad.RUB&&e.oppositeValue!==Ad.RUB,()=>e.handleConvert(e.value,Ad.RUB)],[e=>e.value===Ad.RUB&&e.oppositeValue===Ad.RUB,()=>e.handleConvert(e.value,Ad.USD)],[e=>e.value===Ad.RUB&&e.oppositeValue===Ad.RUB,()=>e.handleConvert(e.value,Ad.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Jd(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Gt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(mn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Qd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ad.RUB,selectBuy:n?.[0]?.currency?.currency||Ad.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[Jd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Zd(r,d,n),value:r.inputSell,setValue:e=>tm(d,n)(e,r.selectSell,r.selectBuy)}),Jd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:em(r,d,t),value:r.inputBuy,setValue:e=>nm(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Zd=(e,t,n)=>l=>{t({selectSell:l}),Gd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{tm(t,n)(e.inputSell,l,a)}})},em=(e,t,n)=>l=>{t({selectBuy:l}),Gd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>nm(t,n)(e.inputBuy,l,a)})},tm=(e,t)=>(n,l,a)=>{e({inputSell:Xd(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Kd(n,i,l===Ad.RUB)||"")})},nm=(e,t)=>(n,l,a)=>{e({inputBuy:Xd(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Kd(n,i,l===Ad.RUB)||"")})};const lm=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=Dd(),i=function(e){const t=e?.code||"000",{data:n}=$n(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=am(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ad.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Ad.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Se,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(qd,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Yd,{address:i?.address})]}),o(Qd,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),am=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],im=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(rm(n))})})),rm=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...he(t),children:a||null})},String(l)):null},sm=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),om=["all","footer"],cm=d((({className:e,navigationItems:t})=>{const n=ue();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(sm(om)).map(n).map(dm)})})),dm=(e,t)=>{const{text:n,items:l=[],href:a,target:i="_self",onClick:r,dataFooter:s}=e,d=l.filter(sm(om));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i,onClick:r,...he(s),children:n}),d?o(im,{items:d}):null]},String(t))},mm=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(um)}):null)),um=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(hm)})]},String(t)),hm=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:pm(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),pm=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${gm(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},gm=e=>e.replaceAll(/\D/g,""),fm=d((({className:e="",index:t,text:n,...l})=>{const a=ue(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),xm=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(fm,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),bm="w-full lg:w-52";function ym(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const vm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Nm=(e,t)=>(n,l)=>{for(const[a,i]of l)n.set(a,e(n.get(a)||t,i));return n},wm=(e=[])=>e.reduce(((e,t)=>e+t),0),km=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Cm=e=>t=>e.map((([e,n])=>[vm(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Tm(t,e))).reduce(Nm(Math.max,0),new Map),Sm=e=>t=>{return Bs(t,t.map((({title:e})=>e)).map((e=>t=>{const n=km(t||"");return n.length?wm(e.map((e=>Gr(n.map(vm(e)))))):0})(e))).sort((l=([,e])=>e,n=(e,t)=>l(e)-l(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,l},Tm=(e,t)=>new Map(e.map((e=>[e,t]))),Im=({basePathList:e,initialQuery:t=""})=>{const[n,i]=l(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=$n(e?.length?e:null,Bm),[s,o]=l(null);return ym((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=km(e);if(!a.length)return[];const i=Object.entries(l),r=[...a.map(Cm(i)).reduce(Nm(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Sm(a)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},Bm=async(...e)=>(await Promise.allSettled(e.map((e=>it(F(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Pm=d((({initialQuery:e,navigationItems:t})=>{const n=r((()=>t?.map((e=>e.href||"/"))),[t]),[l,a]=Im({basePathList:n,initialQuery:e}),i=r((()=>Mm(t)(l)),[t,l]);return o(Wl,{head:o(kd,{autoFocus:!0,...a}),children:o(cm,{navigationItems:i})})})),Mm=e=>t=>e?.length&&t?.length?Bs(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:F("/",t)})))}))):[],Rm=(e={})=>{const{open:t,close:n}=de();return{open:(n={},l={})=>t(o(Pm,{...e,...n}),l),close:n}},Dm=d((({className:e,search:t,...n})=>{const[a,r]=l(""),s=i((()=>r("")),[]),d=Rm(n),m=i((e=>{r(e),Vm(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(kd,{value:a,placeholder:t?.placeholder,onChange:m}),o(ql,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Vm=e=>e&&e.length>=3,zm=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(yr,{className:bm,logo:i,data:a,showTitle:!1}),o(Dm,{className:"grow",navigationItems:t,...e})]})},_m=d((({className:e="",index:t,...n})=>{const l=ue(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("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}`})})),Am=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(_m,{index:t,...e},String(t))))}):null]}))),Om=ut((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[zm(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(cm,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(bm,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(mm,{items:s}),h?o(be,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(Lc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(xm,{title:m,links:r}),o(Am,{links:i,license:p})]})})),Fm=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?jm(l):null]}))),jm=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>$m(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Em(e)}),c("div",{className:"text-s",children:[o(Re,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Re,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},$m=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Em=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Lm=ut((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(gn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:jc(i,s?.key),children:f})}):null]})})}));function Um(e=[]){const t=R(),n=Array.from(e.entries()).filter((([,e])=>qm(t)(e)));return n.find((([,e])=>qm(t,!0)(e)))??n[n.length-1]??[]}const qm=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=O(Wm(e)(n));return t?l===O(n):l.startsWith(O(n))},Wm=e=>t=>{const n=G(X.SITE_URL);return z(t)?e.href:F(n,e.pathname)},Hm=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[r,{setFalse:d,toggle:m}]=Ut(!1),h=Wt(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[r]);return qt(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),a((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Km(t,n)})]})})),Ym=d((({isActive:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:i,onClick:r,role:"link",...he(t?.data),children:l})})),Km=(e,t)=>e?.map(((e,n)=>o(Ym,{isActive:e===t,...e},e?.text??String(n)))),Xm={default:"w-6 h-6",large:"w-12 h-12"},Gm=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Xm[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:c,...he(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Jm=e=>globalThis[e],Qm=(e,t)=>{const n=document.getElementById(t);if(n){const t=Jm(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Jm(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Jm(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))};const Zm="chatbot",eu="text-page__btn-chat",tu={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},nu=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:l="Чат",version:i})=>{const r=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=tu[e??""];return n=>{if(t)if("personal"!==e)Qm(Zm,t);else{const e=n.target;e?.classList.contains(eu)||e?.classList.add(eu),document.getElementById("webchat-js-container:webchat_rshb")||Qm(Zm,t)}}})(e);return o(Gm,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:l,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),lu=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...i})=>{const r=ue(),{href:s,target:d,text:m,onClick:h}=r(i);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...he(a),children:[o("span",{className:au(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),au=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),iu=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=Fr(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(lu,{...a,children:n})})})),ru={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},su=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:u("py-s px-lg font-light whitespace-nowrap",ru["transparent"===e?"transparent":"default"]),...l,children:a}):null})),ou=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=Um(e),[u,h]=l(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?cu(t):du(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(iu,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Hm,{items:p,activeItem:m,ariaLabel:a}):null,V.CHAT_BOT?o(nu,{version:t,iconVersion:d,chat:V.CHAT_BOT,ariaLabel:i}):null,o(su,{version:t,...n})]})})),cu=e=>t=>Math.max(t,e+1),du=e=>t=>Math.min(t,e),mu=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(uu,{...e},String(t))))})]}):null,uu=d((({icon:e,...t})=>{const n=ue(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),hu=(e,t)=>n=>n.name?o($c,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:jc(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,pu=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(Kt,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),gu=d((({foreignOffices:e,branches:t})=>{const[n,a]=Dd(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),u=xu(Oa()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(u,fu),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(Wl,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o($c,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(pu,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&vm(e.toLowerCase())(d.toLowerCase())>=.8)).map(hu(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(hu(x,f))]},e)))}),mu(e)]});var f,x})),fu=e=>e.name?.charAt(0)||"",xu=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),bu=d((({className:e="",active:t,flat:n,children:l,data:a,...i})=>{const r=ue(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:u(yu(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...he(a),children:o("span",{suppressHydrationWarning:!0,className:vu(t,n),children:d||l})})})),yu=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),vu=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Nu=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",[a]=Dd(n?.branches?.default),r=Rm(n),s=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(gu,{...e}),n),close:n}})(n),d=i((()=>r.open()),[r]),m=i((()=>s.open()),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(bu,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:jc(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(bu,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Gm,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),wu=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=Fr(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(bu,{...a,children:n})})})),ku=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:i,search:d,bgColor:m,logo:u})=>{const[h,p]=l(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?Cu(t):Su(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(yr,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(wu,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Hm,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Nu,{version:a,className:"ml-auto",search:d,navigationItems:e,...i})]})})),Cu=e=>t=>Math.max(t,e+1),Su=e=>t=>Math.min(t,e),Tu={"bg-white":"primary",transparent:"transparent"},Iu=["all","header"],Bu=ut((({className:e,bgColor:t="bg-white",logo:n={},version:l=Tu[t],portal:a,header:i={},...r})=>{const{common:s,navigation:d}=Mu(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Um(m),{internetBankButton:f}=a||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(ku,{activeTopItem:p,navigationItems:m?.filter(sm(Iu)),version:l,headerData:{...i,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",Pu(l))}),p?.items?.length&&o(ou,{subItems:p?.items?.filter(sm(Iu)),version:l,internetBankButton:f})]})})})),Pu=e=>"transparent"===e?"opacity-30":"",Mu=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Ru=(e=!1)=>e?{}:{padding:"p-0"},Du={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Vu=ut((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",Du[n],e),padding:t,version:a,isTheme:i,...s,children:M({...s,extraProps:{...Ru(l),className:Ar(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),zu=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",Hs[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),_u=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function Au({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(is,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(is,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const Ou=d((({className:e="",cards:t=[],button:n})=>{const[a,r]=l(0),s=i((e=>r(e)),[]),d=t.length,[m,u]=_u({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?Fu({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,Au({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(be,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function Fu({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?ju("страховая сумма",e.sum):null,e?.fee?ju("страховой взнос",e.fee):null]}),$u(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function ju(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Re,{size:"text-h6",children:[Ue(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Re,{size:"text-l",color:"text-secondary-text",children:e})})]})}function $u(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Eu=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...r})=>{const[s,d]=l(0),m=i((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Lu({insuranceTabs:n,button:a})})]})})),Lu=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(Ou,{button:t,cards:e},String(n)))):null};const Uu={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},qu={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Wu=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[ks(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Hu)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Xu)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Pe,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),Hu=(e,t,n)=>{const l=1===t,a=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${Yu(l,a,e.cells)}`,children:i.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(Ku)}):null},`column_${t}`)},Yu=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Ku=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${qu[n]} ${Uu[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Re,{align:"text-center",children:e.text})},`cell_${t}`):null},Xu=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Gu=["байт","Кб","Мб","Гб","Тб","Пб"],Ju=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...he(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",Qu(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Qu=(e,t)=>e||t?o("span",{children:", "}):"",Zu=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Gu[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?th(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Ju,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:eh(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},eh=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,th=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},nh=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=R(),r=U(a)(e),s=i((()=>{l()}),[]);return c(Wl,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(qi,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),lh=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(nh,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[eh(a),o(Re,{font:"font-light",children:e})]})})),ah={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},ih=ut((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",ah[r]),role:"list",children:a.map(rh(d,i))}):null]})})),rh=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?sh(t)(n,l):Zu(e,t)(n,l)},sh=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(lh,{...l,icon:e,href:oh(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},oh=e=>"href"in e,ch=ut((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Se,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),dh=(e,t)=>e&&"underlined"!==t?"primary":"secondary",mh=(e=[],t={})=>e.filter((({content:e={}})=>Ms(t,e))).length,uh=(e,t)=>e===t;const hh=(ph=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(uh,((e=uh)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>ph(n,t[e])))));var ph;const gh=[],fh={},xh={primary:"bg-white/30",secondary:"bg-main-divider"},bh={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},yh=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":xh[t],a=bh[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),vh=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Nh={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},wh={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},kh={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Ch={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Sh=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",Nh[l],n?Ch[l]:kh[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?wh[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[vh({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(yh,{count:m,version:dh(n,l)})}):null]})})})),Th=d((e=>o(e?.item?.href?Ih:Bh,{...e}))),Ih=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Sh,{...e,tag:"a",item:a,onClick:l})})),Bh=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Sh,{item:e,onClick:l,...n})})),Ph=(e,t,n)=>(l,a)=>o(Th,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Mh=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Ph(l,a,t))}))),Rh={categories:[],extraOptions:[],propertyType:[],stage:[]},Dh=ut((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Ds(Rh,{block:a.block,page:a.options?.page}),f=i(((e=Rh)=>p(e)),[]),x=(({hotFilters:e=gh,filtrationState:t=fh,blocks:n=gh,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>hh(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:mh(n,t.filter),version:dh(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Mh,{...x}),o(Ss,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(Ns,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Vh=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),zh=d((({children:e})=>Vh?e:null)),_h="/icons/MapMarkerClusterIcon.svg",Ah="/icons/MapMarkerClusterYellowIcon.svg";function Oh({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=Fh("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=Fh("workplaces",e,a),r=jh(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=jh(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=jh(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Fh=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?_h:Ah,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),jh=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?_h:Ah,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),$h={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Eh={...$h,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Lh=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Eh).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Uh=()=>function(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return Qm(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${V.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),qh={...$h,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Wh=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(qh).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Hh=[55.753995,37.614069],Yh=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=Uh();if(a((()=>{i.current?Oh({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:Kh(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Oh({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[l?o(wr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Wh,{yandexMaps:i}),o(Wh,{yandexMaps:i,direction:"out"})]}),Lh(i,r,u("right-2 top-80",d))]})})),Kh=e=>{const t=[Gh(Xh(e,0)),Gh(Xh(e,1))];return t.every((e=>e))?t:Hh},Xh=(e,t)=>e.map((e=>e.coords?.[t])),Gh=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Jh={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Qh={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Zh={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},ep=(e,t,n)=>{const l=dh("all"===t),a=dh("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(qi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(qi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},tp=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,np="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",lp=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(ul,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(ir,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:np,children:s}),o(rr,{className:np,isUnfolded:e,children:d})]}),renderFoldButton:ap(n,l)})}):null})},ap=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:ip()})]}),ip=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),rp=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),sp=()=>{},op=e=>"all"===e?"block":"hidden",cp=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=sp,renderRemoteWorkplaceCard:s=sp,getBalloon:d=sp,getBalloonRemoteWorkplaces:m=sp,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=_t(Jh),[y,v,N,w]=r((()=>{const e=dp(t,f),n=dp(a,f),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,f]),[k,C]=l("all"),S={filters:mp([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:Qh};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[rp(p,w),h?tp(h):null,g&&ep(t,k,C),o("div",{className:u("pb-3xl",op(k)),children:lp(S)})]}),o("div",{className:"h-[600px]",children:o(zh,{children:o(Yh,{points:v,isLoad:n,className:"h-full"})})})]}),c(zh,{children:[y.map(i),N.map(s)]})]})})),dp=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Zh[t](e)))))},mp=e=>Object.keys(Jh).filter((t=>e.filter((e=>Zh[t](e))).length)),up={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},hp=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",up[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:up[n].text,children:t})]}))),pp=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:gp({textItems:i,subText:t,children:n,isPhone:l,...a})})),gp=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||fp(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),fp=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${xp(e)}`,children:e.trim()}):e.trim()},String(n)))),xp=e=>e.replace(/\D/g,""),bp=d((({className:e,children:t})=>o("div",{className:u("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),yp=["ArrowDownIcon","ArrowUpIcon"],vp=["Подробнее","Скрыть"],Np=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:vp[Number(e)]}),o(W,{className:"text-primary-text",name:yp[Number(e)],width:"16",height:"16"})]}),wp=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Sp(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:Sp(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(hp,{color:"green",children:Sp(s)})})]}),o("div",{className:"hidden sm:block",children:o(bp,{className:"flex-wrap",children:m?.map(Cp)})}),o(ir,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(rr,{isUnfolded:e,children:o(bp,{className:"flex-wrap",children:m?.map(Cp)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Np({isUnfolded:e,onToggle:t})})]},String(d))},kp=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Sp(t)} №${n}`,body:e.toUpperCase()}),Cp=(e,t)=>o(pp,{...e},String(t)),Sp=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Tp=[];const Ip=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:Tp},Bp={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Pp={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Mp=d((({descriptionData:e,className:t})=>{const[n]=Dd(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=$n(`/api/v1/atms?regionCode=${e}`,Ip);return{data:t||Tp,isLoad:!t&&!n}}(l);return o(cp,{className:t,filterItems:Rp,data:a,isLoad:i,initFilterState:Bp,renderCard:wp,getBalloon:kp,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Rp=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Pp[t](e))),n=!l.length||l.some((t=>Pp[t](e)));return t&&n}))},Dp=e=>{const t=zp(e);return o(pp,{label:"Режим работы",value:t,className:"max-w-none"})},Vp=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",zp=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Vp({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Vp({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},_p=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ap=e=>_p.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Op=e=>{if(!e)return null;const t=Fp(e);return c(bp,{className:"border-none",children:[o(pp,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(jp)})}),o(pp,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},Fp=e=>{const t=_p.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},jp=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),$p=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(pp,{label:"Валюта",value:e.currency}):null,t?o(pp,{label:"Купить",value:String(t)}):null,n?o(pp,{label:"Продать",value:String(n)}):null]},String(l)),Ep=(new Date).getDay(),Lp=e=>{const[t]=e?.slice(Ep-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(hp,{color:"green",children:a}):null,n&&i?o(hp,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(hp,{color:"red",children:"Выходной"})},Up=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",qp=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(pp,{label:e,value:t&&n?n:"",subText:Up({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Wp=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Hp=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Yp=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Kp=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=Ap(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),Lp(h)]}),o("div",{className:"hidden sm:block",children:Xp({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ir,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(rr,{isUnfolded:e,children:Xp({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Np({isUnfolded:e,onToggle:t})})]},String(u))},Xp=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Ap(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(bp,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(pp,{label:"Факс",value:t,isPhone:!0}),o(pp,{label:"Телефон филиала",value:e,isPhone:!0}),o(pp,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(pp,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(pp,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(pp,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(bp,{children:o(pp,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(qp)})})}):c(bp,{children:[o(pp,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(jp)})}),Dp(d)]}),r?.businessScheduleVisibleTag?Op(r?.businessScheduleDescription):null,s?.currencies?.length?o(bp,{className:"flex-wrap",children:s?.currencies?.map($p)}):null]})},Gp=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Ap(e),n=e?zp(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Wp(n):Yp(n,l):Hp(n):null})(n)}`;return{header:l,body:i}},Jp=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Qp({workScheduleDescription:t})}),o(ir,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(rr,{isUnfolded:e,children:Qp({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Np({isUnfolded:e,onToggle:t})})]},String(n)):null,Qp=({workScheduleDescription:e})=>c("div",{children:[c(bp,{className:"flex",children:[o(pp,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(pp,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(pp,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(pp,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(pp,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),Zp=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),eg={branches:[],remoteWorkplaces:[]};const tg=async e=>await it(e,{method:"GET"})||eg,ng=d((({className:e})=>{const[t]=Dd(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=$n(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,tg);return{data:t||eg,isLoad:!t&&!n}}(n);return o(cp,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:Kp,renderRemoteWorkplaceCard:Jp,getBalloon:Gp,getBalloonRemoteWorkplaces:Zp,title:`Офисы филиала ${t?.name}`})})),lg=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(ng,{}):o(Mp,{descriptionData:e})})})),ag=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),ig="hidden sm:flex absolute z-40 top-10",rg=ut((({className:e="",padding:t,slides:n=[],...a})=>{const[i,r]=l(0),[s,d]=ts({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Xe,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Lr,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(sg({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(rs,{className:u("left-6",ig),onClick:d.scrollLeft}):null,d.canScrollRight?o(ss,{className:u("right-6",ig),onClick:d.scrollRight}):null]})]})})),sg=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,i=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},og=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Fe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?cg({__html:i,richVersion:r}):null,dg({label:"Адрес",data:e,iconName:"GeolocationIcon"}),dg({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),dg({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?je([l]):null]})]}))),cg=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),dg=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,mg=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),ug=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(gs,{tag:"button",className:u("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),hg=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",pg=(e=!1)=>e?"MinusIcon":"PlusIcon",gg=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",fg=ut((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(ir,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(rr,{className:u("gap-lg",hg(m)),isUnfolded:e,children:M({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>xg({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),xg=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?gg(e):pg(e))(a,r);return"accordion"===e?o(ug,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(fs,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},bg=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(Kt.split(" ").filter((e=>"rounded"!==e)),dl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),yg=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(bg,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(bg,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),vg=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(mn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Ng=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(vg,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(vg,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),wg=["От 1 дня","До 365 дней"],kg=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Qn,{min:1,max:365,value:e,items:wg,onChange:t})]}))),Cg=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(vg,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(vg,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Sg=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Ng,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Tg(m)}),o(kg,{days:a,setDays:e=>m({days:e})}),o(Cg,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Ig(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(yg,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Tg=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ig=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Bg=d((({days:e,tariffs:t=[]})=>{const n=Mg(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Pg("Аренда за",e),Pg("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Pg=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Mg=(e,t)=>{const n=Rg(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Rg=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},Dg=(e,t)=>e.find((e=>e.branchCode===t)),Vg=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Dg(l,n.selectedBranch),d=zg(s?.safeBoxCaseVolumes),m=_g(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Ag(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Sg,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Bg,{days:n.days,tariffs:u})]})})),zg=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],_g=(e,t)=>e?.find((e=>e.volume===t)),Ag=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Og=[];const Fg=async e=>await it(e,{method:"GET"})||Og,jg=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Oa(),p=$g(m.selectedRegion,h),f=function(e){const{data:t}=$n(e?`/api/v1/safeboxes?regionCode=${e}`:null,Fg);return t||Og}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=Dg(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Vg,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Yh,{points:b,className:"h-[640px]"}):null]})})),$g=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Eg=e=>e<4?"w-72":"w-52",Lg={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"},Ug=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=a.length>3,h=Lg,p=(e=>e?"":"opacity-0")(l),f=we();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(C,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Os(f)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:ks(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(qg(h,m,i)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:l,version:a}=x,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Eg(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Re,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:l.description,children:r}):null,o(Pe,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var x})),qg=(e,t,n)=>({icon:l},a)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Wg(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Fe(l)?o(ne,{image:{...l,iconVersion:l?.iconVersion||i},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},Wg=e=>e?"h-16 w-16":"h-24 w-24",Hg=d((()=>o("div",{className:"hidden",role:"none"}))),Yg="hidden sm:flex absolute z-40",Kg={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Xg=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=ts({itemCount:t?.length||0});return a((()=>Gg(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Lr,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Kg[i].item,gap:Kg[i].gap,children:t.map(Ph(n,l,i))}),s.canScrollLeft?o(rs,{className:u("left-6",Yg,Kg[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(ss,{className:u("right-6",Yg,Kg[i].buttonTop),onClick:s.scrollRight}):null]})})),Gg=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Jg={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Qg=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Jg[t].wrapper,e),children:o(Xg,{className:Jg[t].component,tabsType:t,...n})}):null,Zg=ut((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=ef(n??{}),p=R(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(lf(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=nf(x[y],y),C=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Qg({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:tf(t,x),activeItem:N,tabsType:r,onChange:C}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(nf)?.filter(Boolean)||[]}),ef=({__id:e,anchor:t})=>t??e??"tabs",tf=(e,t)=>t?.length?t:e,nf=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",lf=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),af={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},rf=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:af[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),sf=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),of={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(sf,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},cf=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return df({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),df=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in of))return null;return o(of[n],{...t,...l})},mf=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(cf,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),uf=(e,t)=>140*wm(e.slice(0,t).map((e=>e?.cols?.length??1))),hf=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,pf=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=_u({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,i=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${uf(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?hf(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Au({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),gf=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(pf,{rows:t.rowsData})})})]},l)}))}))),ff=(e=!1)=>""+(e?"text-white":"text-secondary-text"),xf=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:ff(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),bf=ut((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(xf,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(gf,{activeTabIndex:r,items:m}),o(sf,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(sf,{onClick:n,isOpen:!0})]})})),yf=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(bf,{...t,onClick:n})}):null]}))),vf=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(yf,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(rf,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(mf,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Nf=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Au({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),wf=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=_u({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(vf,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=i>0?[f.slice(0,-i),f.slice(-i)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?o(ir,{renderFoldableSection:({isUnfolded:e})=>c(Nf,{controls:p,children:[x,o(rr,{isUnfolded:e,children:b})]}),renderFoldButton:xs}):o(Nf,{controls:p,children:f})})]})})),kf=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Cf():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Sf(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),Cf=()=>o("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"}),Sf=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Tf=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),If=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Tf,{prefix:t,unit:n,suffix:l})})})),Bf=ut((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:u("relative flex flex-col",Du[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:M({...c,extraProps:{className:u("w-full",Ar(r)),...Ru(l)}})})}),{childrenTypes:[]}),Pf=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Mf=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const i=R();return c(g,{className:e,defaultPadding:Pf(e),...a,children:[o(C,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(i)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(i)(n)})}):null]})})),Rf={AdTile:pt,ApplicationForm:nr,ApplicationLeadForm:zr,BankAccountFiltration:_s,BenefitsBlock:$s,BonusBenefitsBlock:Ws,ButtonsBlock:Ys,CalculatorBonus:oo,CalculatorBusinessDeposit:To,CalculatorCredit:Eo,CalculatorDeposit:ic,CalculatorRefinancing:hc,CardTransfer:vc,Carousel:Bc,CarouselCard:Dc,CarouselCatalogCard:zc,CarouselLinks:Oc,CarouselRecommendationCard:Wc,CarouselTariffsCard:Kc,ContactsBlock:Gc,CreditForm:id,DepositFiltration:ud,Depository:Bd,ErrorBlock:Md,ExchangeRateTile:lm,Footer:Om,GracePeriod:Fm,GrantSupport:Lm,Header:Bu,Headline:C,HorizontalLayout:Vu,ImgBlock:zu,InsuranceAmountBlock:Eu,InvestmentInfo:Wu,LinkDocs:ih,MobileAppTile:ch,MortgageFiltration:Dh,OfficesAtmsMap:lg,Placeholder:ag,ProductBlock:ht,ProductGallery:rg,RepresentativeOfficeInfo:og,RichTextBlock:mg,RollupItem:fg,SafeDepositRental:jg,StepsBlock:Ug,StickyBottomMenu:Hg,TabsLayout:Zg,TariffsTable:wf,TextBlock:kf,UnitBlock:If,VerticalLayout:Bf,Video:Mf},Df=me((()=>{a((()=>{St()}),[]);const e=Vt();qt(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),Vf="cookie",zf=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=Ut();ym((()=>{globalThis.localStorage?.getItem(Vf)||n()}),[],3e3);const a=i((()=>{globalThis.localStorage?.setItem(Vf,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(ql,{className:"bg-main-gray rounded-md w-11 h-11",onClose:a})})]})}):null}));function _f(e){throw new Error(e)}const Af=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:_f(e)}}))),[c,d]),n},Of=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=Af({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return qt(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),Ff=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:_f(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return qt(globalThis.document,"keydown",r),e?o("div",{className:u("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),jf="header",$f="footer",Ef="sticky-footer",Lf={},Uf=d((({className:e,data:t=Lf,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);Df();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.header,{...m,slotName:jf})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[M({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.footer,{...m,slotName:$f})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.["sticky-footer"],{...m,slotName:Ef})}):null,o(Of,{}),o(Ff,{}),o(zf,{__html:d?.cookieContent?.__html})]})}));Object.assign(Uf,{childrenTypes:[],slots:()=>[jf,$f,Ef]});e.Blocks=Rf,e.ContentPage=Uf,e.handlerDecorator=me,e.joinList=ks,e.packageVersion="0.14.604",e.projectSettings=V,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=$,e.useRouter=R,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={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","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),k={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"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=k[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function I(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=S,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const B=[],P=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:i=I,...r})=>{const s=a?(e,t)=>I(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||B,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function M(){return M._impl()}M._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),M.setup=e=>{M._impl=e};const D=["CDN","BASE_PATH"],V=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),z=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!z(e)&&(!t||"_self"===t)),A=e=>Boolean(e?.startsWith("#")),O=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),$=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:z,isLocalURL:_,isHash:A,withoutQuery:O,joinPath:F,hasPrefix:$});const E="/api/",L=`${E}v1/storage`,U=e=>(t,n)=>{if([!t,z(t),A(t),[V.CDN,E].some((e=>$(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${L}/${t}/attachment`;const l=t?.startsWith("/");return F($(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=M(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(F(V.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!z(t)?U(e)(t,n):t},Q=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Z=d((({className:e="",image:t,imageClassName:n=""})=>{const l=M();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Q).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Z,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{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}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function ue(){const e=G(X.SITE_URL),t=M(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!$(l,e||"/");l&&!s&&_(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=fe(e)&&"hidden lg:block";return c("div",{className:u(ge(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,fe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:u(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},fe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),xe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=ue()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Se=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=we(),v=M(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Ce(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Ce(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>u(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Re=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Me=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),De=(e,t)=>e?o(Me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ve=(e,t)=>["label"in e?De(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Re(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:Ve(n)})]}))),_e=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Ae=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ve)}):null)),Oe=d((({isTabularBenefits:e,...t})=>o(e?Ae:_e,{...t}))),Fe=e=>Boolean(e?.src||e?.icon),$e=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(je(n))}):null,je=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Ee(a,r),d=Ee(i,r);return l||a?.icon?o(be,{className:u("basis-full @lg:basis-auto",e),appendLeft:Le({...a,iconVersion:c}),appendRight:Le({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Ee=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Le=e=>Fe(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(We)}):null)),We=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Me,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ye)}):null)),Ye=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Me,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Se,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:$e(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Oe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ke[i]}):null,T,f?.length?o(qe,{priceList:f}):null,Je(x)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Qe=e=>Boolean(e&&Array.isArray(e)),Ze=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Ze(n)&&"string"==typeof n.$ref)?t.ref(e):Ze(e)?t.record(e):Qe(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Ze(e)?e[t]:Qe(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ut(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ht=ut((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ht,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ft=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},xt=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:xt(e)}:{},yt=(e,t="birthday")=>e?{[t]:ft(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:xt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},Ct="rshb-query-params";function St(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ct)||"";return e&&globalThis.sessionStorage?.setItem(Ct,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,n]=Tt(e.find((([e])=>e(t))));return n(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Mt=e=>{const t=e.target?.closest("a");if(z(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=St();if(!z(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Dt(t?.target)?.(n)}}},Dt=Bt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Vt(){return Vt._impl()}Vt._impl=()=>({forwardQuery:Mt}),Vt.setup=e=>{Vt._impl=e};const zt=e=>e,_t=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return At(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=zt,format:l=zt}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},At=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ot=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Ft=e=>"OUTSERVICE"===e?"/api/v1/outservice/outserviceregions":void 0;function $t(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function jt(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function Et(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return jt(globalThis.document,"click",n),t}const Lt=({label:e,errors:t})=>e&&t?`${e}*`:e,Ut=()=>{},qt="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",Wt=e=>e?o(Me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Ht=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const k=s(null),C=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);a((()=>{v&&k.current?.focus()}),[v,k]);const S=g?"pr-3xl":"",T=Yt(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[Wt(d),N?o("textarea",{className:u("block resize-y min-h-24",Kt,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:C,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Kt,S,T),ref:k,id:n,name:l||n,placeholder:m,value:h,onChange:C,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Yt=e=>e?qt:"border-error",Kt="w-full border rounded-md text-primary-text outline-none p-m",Xt=e=>o("div",{className:"h-6",children:e?o(Me,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Gt=e=>e?.value||"",Jt={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},participantAddress:{url:"suggest/address"}},Qt=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),Zt=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function en({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=l([]),f=Qt(),x=Jt[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:l,requestData:a={},responseItemHandler:i=Gt}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${l?`${l}, `:""}${n}`;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...a,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(N,300)),[N]);return a((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(Zt,{options:p,value:t,onChange:y}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,p,t,y]),v}const tn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=Ut,onDaDataChange:s,onBlur:d,isTextarea:m,type:h,name:p="",daDataQueryPrefix:g,dadata:f=!1})=>{const[x,{setFalse:b,setTrue:y}]=$t(),v=Et(b),N=en({isOpen:x&&f,name:p,value:n,daDataQueryPrefix:g,onChange:r,onDaDataChange:s});return c("div",{className:u("shrink-0 w-full",e),ref:v,onBlur:b,onFocus:y,children:[o("div",{ref:N,children:o(Ht,{type:h||"text","aria-label":t,label:Lt({label:t,errors:i}),valid:Boolean(!a),value:n,onChange:r,onBlur:d,isTextarea:m,placeholder:nn(l,i,t)})}),Xt(a)]})})),nn=(e,t,n)=>t&&!n?`${e}*`:e,ln=e=>e?.text||e?.key||"",an=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,rn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:an(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:ln(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const sn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=$t(),[N,w]=l(""),k=dn(x,n.length),C=b&&!k,S=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=Qt(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=Et(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(rn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:S,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[Wt(t),c("div",{className:u("relative",C?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",cn(m,d,k)),onClick:C?S:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:ln(r)||h}),on(C,g)]}),p&&C?o("div",{className:u("absolute top-0 w-full z-20"),children:o(Ht,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),on=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),cn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),dn=(e,t)=>e||0===t,mn=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(sn,{...a,valid:!n,label:Lt({label:t,errors:l})}),Xt(n)]}))),un=e=>!e?.length,hn=e=>t=>n=>e(n)?[]:[t],pn=hn((e=>null!=e&&""!==e)),gn="Некорректно заполненное поле",fn=e=>pn(e||gn),xn=hn((e=>e?.key&&""!==e?.key))(gn),bn=e=>hn((e=>"string"==typeof e&&e.length>1))(e||gn),yn=(e,t)=>hn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t||gn),vn=e=>hn((e=>"string"==typeof e&&6===e.length))(e),Nn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,hn((e=>"string"==typeof e&&t.test(e))))(e);var t},wn=hn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),kn=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},Cn={typeForm:fn(),surname:bn("Укажите свою фамилию"),name:bn("Укажите своё имя"),middleName:bn("Укажите своё отчество"),region:xn,addressBranch:xn,phone:Nn("Укажите номер телефона"),secondaryPhone:Nn("Укажите номер телефона"),birthday:fn("Укажите дату рождения"),birthPlace:fn("Укажите место рождения"),education:fn("Выберите ваше образование"),housing:fn("Выберите тип жилья"),employment:fn("Выберите информацию о трудоустройстве"),organization:fn("Выберите тип организации"),amountWorkers:fn("Выберите информацию о количестве сотрудников"),employerActivities:fn("Выберите вид деятельности организации"),employerOrganization:fn("Выберите вид организации"),positionOrganization:fn("Выберите вашу должность"),dulSerie:(Sn="Укажите серию паспорта",hn((e=>"string"==typeof e&&4===e.length))(Sn)),dulNumber:vn("Укажите номер паспорта"),dulIssueDateField:fn("Укажите дату выдачи паспорта"),dulSubdivisionCode:vn("Укажите код подразделения"),dulIssuedBy:fn("Укажите организацию, выдавшую паспорт"),email:(e=>hn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:bn(),inn:(e=>hn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:fn("Укажите ОПФ"),organizationName:fn("Укажите наименование организации"),generalSeniority:fn(),lastJobExperience:fn("Укажите стаж на последнем месте работы"),experience5Years:fn("Укажите общий стаж за последние 5 лет"),jobsNumber:fn("Укажите количество лет стажа"),beginDate:fn("Укажите дату заключения трудового договора"),fullAddress:fn(),partnerComments:fn(),collectionCount:fn(),comment:fn(),acquiringType:xn,feedbackMethod:xn,serviceType:xn,serviceDirection:xn,meetingDay:fn(),product:fn(),localities:fn(),consentDataProcessing:wn,annualRevenue:fn(),consentToReceiveMaterials:wn,processPersonalDataLeadFlg:wn,consentProviderFlg:wn,consentPhotoFlg:wn,consentPfrFlg:wn,consentAssignmentClaimsFlg:wn,consentCollectionFlg:wn,consentInformFlg:wn,familyStatus:fn("Выберите семейное положение"),children:yn(2,"Укажите количество детей"),familyMembers:yn(2,"Укажите количество членов семьи"),dependents:yn(2,"Укажите количество иждивенцев"),totalIncome:yn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:yn(10,"Укажите сумму обязательных выплат"),snils:(e=>hn(kn)(e))("Некорректный номер СНИЛС"),conscription:fn(),armyIdFlg:wn,sex:fn("Укажите свой пол"),participantAddress:fn("Необходимо выбрать адрес"),participantDateRegistration:fn("Укажите дату регистрации"),retirementIncome:fn(),otherIncome:fn(),mandatoryIncome:fn(),otherPayments:fn(),disablePeopleFlg:fn(),bankruptcyFlg:fn(),shareholderFlg:fn(),legalEntityName:fn(),bankEmployeeCode:fn()};var Sn;const Tn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Cn?.[e]])))},In=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Bn=(e,t,n=!1)=>n?In(e,t):e,Pn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Rn=d((({field:e,input:t})=>o(mn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Pn,...Bn(e("acquiringType"),Cn.acquiringType,t?.required)}))),Mn=(e="")=>Boolean("trade"===e||"all"===e),Dn=e=>null!=e,Vn=new Map,zn=e=>Boolean(e?.every((e=>Array.isArray(e)?zn(e):!e||"string"==typeof e))),_n=e=>zn(e)?e.toString():"";function An(e,t,{fallback:n,cache:i}={}){const s=r((()=>On(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Dn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Vn)=>n=>{const l=_n(n),a=t.get(l);if(l&&Dn(a))return a;const i=e(...n);return l&&Dn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function On(e){return Array.isArray(e)?e:e instanceof Function?On(e()):[e]}const Fn=[];const $n=async e=>await it(e,{method:"GET"})||Fn;function jn(e=!1){const{data:t}=An("/api/v1"+(e?"/premiumBranchesByRegions":"/branchesByRegions"),rt);return Array.isArray(t)?t:[]}const En=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?jn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=An(e?`/api/v1/branches?regionCode=${e}`:null,$n);return t||Fn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(mn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Bn(e("addressBranch"),Cn.addressBranch,t?.required),isSearch:!0})})),Ln=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},Un=(e,t,n)=>Math.max(t,Math.min(e,n));function qn(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Wn({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=qn(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const Hn=1,Yn=100,Kn=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:Hn),max:s=(a.length?a.length-1:Yn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=Ln(e,{normalize:(e=0)=>a.length?Xn(a)(e):Un(e,r,s),format:Ue()}),f=i((e=>{p&&p(qn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",qt,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Wn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),Gn(l)]})})),Xn=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),Gn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Jn=["От 1 000 ₽","До 1 000 000 000 ₽"],Qn=d((({field:e})=>o(Kn,{title:"Сумма, ₽",items:Jn,min:1e3,max:1e9,...e("amount")}))),Zn=e=>{const{data:t,error:n}=An(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,el);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},el=async e=>await it(e,{method:"POST"})||[],tl=ut((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(mn,{placeholder:"Выберите из списка",label:n,options:nl(i),...Bn(e(l),Cn[l],a?.required)})})),nl=e=>(e??[]).map((e=>({key:e,value:e}))),ll=d((({field:e,input:t})=>{const{data:n}=Zn("EMPLOYEES_NUMBER");return o(tl,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),al=d((({field:e,input:t})=>o(tn,{label:"Годовая выручка, ₽",...Bn(e("annualRevenue"),Cn.annualRevenue,t?.required)}))),il=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),rl="appearance-none w-5 h-5 border-solid flex-none",sl=[{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"}],ol=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(il,{paths:sl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:u("flex items-center relative group/box",dl(l)),onClick:s,children:[o("div",{className:u(rl,"m-0",a?"rounded-full border-2":ul(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ml(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,cl(n)]})})})),cl=e=>e?o("div",{className:"ml-s",children:o(Me,{size:"text-l",font:"font-light",children:e})}):null,dl=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",ml=(e=!1)=>e?"radio":"checkbox",ul=(e=!1)=>u("rounded border",{"bg-primary-main":e}),hl=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(ol,{text:t,value:n,disabled:a,onChange:r},l),Xt(i)]}))),pl=d((({field:e})=>o(hl,{text:"Наличие военного билета",...Bn(e("armyIdFlg"),Cn.armyIdFlg)}))),gl=d((({field:e,input:t})=>o(tn,{label:"Код представителя Банка",placeholder:"Введите код",type:"number",...Bn(e("bankEmployeeCode"),Cn.bankEmployeeCode,t?.required),...t}))),fl=d((({field:e})=>o(tn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),xl=d((({field:e})=>o(hl,{text:"В отношении меня ведётся производство по делу о банкротстве",...Bn(e("bankruptcyFlg"),Cn.bankruptcyFlg)}))),bl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=yl(t,e),c=vl(t,i,r);u.push(o("td",{children:o("div",{className:Nl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},yl=(e,t)=>t&&e.toDateString()===t.toDateString(),vl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Nl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),wl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],kl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=Ut,setValue:d=Ut})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:wl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:bl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Cl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Sl=Cl.map((e=>({key:e}))),Tl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Il={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Bl={className:"min-w-32",iconVersion:"black",isBorder:!1},Pl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,onChange:m})=>{const[h,{setValue:p}]=$t(!1),[g,f]=l(n?.getMonth()||(new Date).getMonth()),[x,b]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:y,handleNextMonth:v,handleSelectMonth:N,handleSelectYear:w,monthsOptions:k,yearsOptions:C,handleChangeVisibleCalendar:S,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=Et(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Cl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Sl,yearsOptions:Tl,ref:s}})({onYearSelect:b,onMonthSelect:f,onShowCalendar:p,selectedYear:x,selectedMonth:g,showCalendar:h}),I=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[Wt(t),c("div",{className:"relative",children:[Rl(S,n,r),h?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":I}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:y,children:o(W,{...Il,className:"-rotate-90 cursor-pointer"})}),o(sn,{onChange:N,value:{key:Cl[g]},options:k,...Bl}),o(sn,{onChange:w,value:{key:String(x)},options:C,...Bl}),o("div",{className:"my-auto",onClick:v,children:o(W,{...Il,className:"rotate-90 cursor-pointer"})})]}),o(kl,{today:n,currentMonth:g,currentYear:x,onDateSelect:m,min:s,max:d,setValue:p})]}):null]})]})})),Rl=(e,t,n)=>c("div",{onClick:e,className:u("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(w,{children:t&&ft(t)}),o(W,{...Il,name:"CalendarIcon"})]}),Ml=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Pl,{label:Lt({label:t,errors:l}),valid:Boolean(!n),...a}),Xt(n)]}))),Dl=d((({field:e,input:t})=>o(Ml,{label:"Дата начала работы на текущем месте",...Bn(e("beginDate"),Cn.beginDate,t?.required),...t}))),Vl=d((({field:e,input:t})=>o(Ml,{label:"Дата рождения",...Bn(e("birthday"),Cn.birthday,t?.required)}))),zl=d((({field:e,input:t})=>o(tn,{label:"Место рождения",...Bn(e("birthPlace"),Cn.birthPlace,t?.required),...t}))),_l=d((({field:e,input:t})=>o(tn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...Bn(e("children"),Cn.children,t?.required),...t}))),Al=d((({field:e,input:t})=>o(tn,{label:"Количество объектов инкассации",type:"number",...Bn(e("collectionCount"),Cn.collectionCount,t?.required)}))),Ol=d((({field:e,input:t})=>o(tn,{className:"col-span-2",...Bn(e("comment"),Cn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Fl=d((({field:e,input:t})=>{const{data:n}=Zn("MILITARY_STATUS");return o(tl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),$l={processPersonalDataLeadFlg:{text:"Согласие на обработку персональных данных",docId:4},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentPhotoFlg:{text:"Прочие согласия (согласие на фотографирование)",docId:1},consentAssignmentClaimsFlg:{text:"Прочие согласия (согласие на уступку прав требований)",docId:1},consentCollectionFlg:{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",docId:1},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}},jl=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),El=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(jl,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})}));async function Ll(e,t,n){const l=await fetch(`https://retail-light-api.cprb.dev.rshbdev.ru//api/v1${e}`,{method:t,headers:{"Content-Type":"application/json",...ql()},credentials:"include",body:n?JSON.stringify(n):null});return Ul(l)?l.json():l.text()}const Ul=e=>"application/json"===e.headers.get("Content-Type"),ql=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Wl=async e=>{const t=await(async e=>await Ll(`/feedback/file?id=${encodeURIComponent(e)}`,"GET"))(e);return URL.createObjectURL(t)},Hl=d((({className:e,error:t,docId:n,...l})=>{const{open:a}=de();return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(ol,{...l}),n?o(be,{className:"text-primary-main",onClick:()=>Yl(n,a),children:o(Me,{children:"Ознакомиться"})}):null]}),Xt(t)]})})),Yl=async(e,t)=>{const n=await Wl(e);t(o(El,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",children:o("iframe",{src:`${n}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"})}))},Kl=d((({field:e,input:t})=>t&&t.name?o(Hl,{text:$l[t.name]?.text,docId:$l[t.name]?.docId,...Bn(e(t.name),Cn[t.name],t?.required)}):null)),Xl=d((({field:e,input:t})=>{const{data:n}=Zn("creditInRshbCd");return o(tl,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала руководителем, которого Вы являетесь, кредит в АО «Россельзбанк»",fieldName:"creditInRshbCd",input:t})})),Gl=d((({field:e,input:t})=>o(tn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...Bn(e("dependents"),Cn.dependents,t?.required),...t}))),Jl=d((({field:e,input:t})=>o(Ml,{label:"Желаемая дата встречи",...Bn(e("desiredMeetingDate"),Cn.meetingDay,t?.required)}))),Ql=d((({field:e})=>o(hl,{text:"Являюсь инвалидом",...Bn(e("disablePeopleFlg"),Cn.disablePeopleFlg)}))),Zl=d((({field:e,input:t})=>o(Ml,{label:"Дата выдачи",...Bn(e("dulIssueDateField"),Cn.dulIssueDateField,t?.required)}))),ea=d((({field:e,input:t})=>{const{value:n,onChange:l}=e("dulSubdivisionCode"),a=i((e=>{l?.(e?.data?.code?.replace("-",""))}),[]);return o(tn,{label:"Кем выдан",...t,...Bn(e("dulIssuedBy"),Cn.dulIssuedBy,t?.required),onDaDataChange:a,daDataQueryPrefix:n})})),ta=d((({field:e,input:t})=>o(tn,{label:"Номер документа",type:"number",...Bn(e("dulNumber"),Cn.dulNumber,t?.required)}))),na=d((({field:e,input:t})=>o(tn,{label:"Серия документа",type:"number",...Bn(e("dulSerie"),Cn.dulSerie,t?.required)}))),la=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(tn,{label:"Код подразделения",type:"number",...t,...Bn(e("dulSubdivisionCode"),Cn.dulSubdivisionCode,t?.required),onDaDataChange:n})})),aa=d((({field:e,input:t})=>{const{data:n}=Zn("EDUCATION_LEVEL");return o(tl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),ia=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(tn,{label:"Электронная почта",...Bn(e("email"),Cn.email,n),...l})})),ra=d((({field:e,input:t})=>{const{data:n}=Zn("ORGANIZATION_ACTIVITY_TYPE");return o(tl,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),sa=d((({field:e,input:t})=>{const{data:n}=Zn("ORGANIZATION_KIND");return o(tl,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),oa=d((({field:e,input:t})=>{const{data:n}=Zn("EMPLOYMENT_TYPE");return o(tl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ca=d((({field:e,input:t})=>o(tn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...Bn(e("expenses"),Cn.expenses,t?.required),...t}))),da=d((({field:e,input:t})=>o(tn,{label:"Стаж",placeholder:"За последние 5 лет",...Bn(e("experience5Years"),Cn.experience5Years,t?.required),...t}))),ma=d((({field:e,input:t})=>o(tn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...Bn(e("familyMembers"),Cn.familyMembers,t?.required),...t}))),ua=d((({field:e,input:t})=>{const{data:n}=Zn("MARITAL_STATUS");return o(tl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),ha=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],pa=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ga=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],fa=d((({field:e,input:t})=>o(mn,{label:"Способ получения ответа",options:ga,...Bn(e("feedbackMethod"),Cn.feedbackMethod,t?.required)}))),xa=d((({field:e,input:t})=>o(tn,{label:"Адрес",...Bn(e("fullAddress"),Cn.fullAddress,t?.required),...t}))),ba=d((({field:e,input:t})=>o(tn,{label:"ФИО",...Bn(e("fullName"),Cn.fullName,t?.required),...t}))),ya=d((({field:e,input:t})=>o(tn,{label:"Общий стаж",placeholder:"Количество лет",...Bn(e("generalSeniority"),Cn.generalSeniority,t?.required),...t}))),va=d((({field:e,input:t})=>{const{data:n}=Zn("HOUSE_TYPE");return o(tl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Na=d((({field:e,input:t})=>{const n=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(tn,{label:"ИНН",type:"number",...t,...Bn(e("inn"),Cn.inn,t?.required),onDaDataChange:n})})),wa=d((({field:e})=>o(hl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ka=d((({field:e,input:t})=>o(tn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...Bn(e("jobsNumber"),Cn.jobsNumber,t?.required),...t}))),Ca=d((({field:e,input:t})=>o(tn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...Bn(e("lastJobExperience"),Cn.lastJobExperience,t?.required),...t}))),Sa=d((({field:e,input:t})=>o(tn,{label:"Наименование юридического лица",...t,...Bn(e("legalEntityName"),Cn.legalEntityName,t?.required)}))),Ta=d((({field:e,input:t})=>o(tn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...Bn(e("legalForm"),Cn.legalForm,t?.required),...t}))),Ia=[];async function Ba(){const e=await it("/api/v1/outservice/outserviceregions");return e&&Array.isArray(e)?e:Ia}const Pa=d((({field:e,input:t})=>{const n=e("region")?.value?.key,{data:l}=An("outServiceRegions",Ba),i=l?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(mn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:i,...Bn(e("localities"),Cn.localities,t?.required),isSearch:!0})})),Ra=d((({field:e,input:t})=>o(tn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Bn(e("mandatoryIncome"),Cn.mandatoryIncome,t?.required),...t}))),Ma=d((({field:e,input:t})=>o(tn,{label:"Отчество (Обязательно, при наличии)",...Bn(e("middleName"),Cn.middleName),...t}))),Da=d((({field:e,input:t})=>o(tn,{label:"Имя",...Bn(e("name"),Cn.name,t?.required),...t}))),Va=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:u("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),za=d((({field:e})=>Mn(e("acquiringType")?.value?.key)?o(Va,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),_a=d((({field:e,input:t})=>{const{data:n}=Zn("ORGANIZATION_TYPE");return o(tl,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Aa=d((({field:e,input:t})=>{const n=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(tn,{label:"Наименование организации",...t,...Bn(e("organizationName"),Cn.organizationName,t?.required),onDaDataChange:n})})),Oa=d((({field:e,input:t})=>o(tn,{label:"Иные доходы",placeholder:"Введите значение",type:"number",...Bn(e("otherIncome"),Cn.otherIncome,t?.required),...t}))),Fa=d((({field:e,input:t})=>o(tn,{label:"Обязательные выплаты",placeholder:"Введите значение",type:"number",...Bn(e("otherPayments"),Cn.otherPayments,t?.required),...t}))),$a=d((({field:e,input:t})=>o(tn,{label:"Адрес",...Bn(e("participantAddress"),Cn.participantAddress,t?.required),...t}))),ja=d((({field:e,input:t})=>o(Ml,{label:"Дата регистрации по месту жительства",...Bn(e("participantDateRegistration"),Cn.participantDateRegistration,t?.required)}))),Ea=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(tn,{...Bn(e("partnerComments"),Cn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),La=e=>"_"===e,Ua=e=>/\d/.test(e),qa=e=>La(e)||Ua(e),Wa=[..."+7 (___) ___-__-__"],Ha=Wa.findIndex(La),Ya=Wa.map(((e,t)=>qa(e)?Wa.slice(0,t).filter(qa).length:-1));const Ka=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Wa.map(((e,n)=>Ua(e)?e:t.charAt(Ya[n])||e)),l=Ya.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(Ha,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Ht,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Xa=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ka,{"aria-label":t,label:Lt({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),Xt(n)]}))),Ga=d((({field:e,input:t})=>o(Xa,{label:"Телефон",...Bn(e("phone"),Cn.phone,t?.required),...t}))),Ja=d((({field:e,input:t})=>{const{data:n}=Zn("POSITION");return o(tl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Qa=d((({field:e})=>Mn(e("acquiringType")?.value?.key)?o(Va,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Za=ut((({field:e,source:t})=>o(mn,{placeholder:"Выберите продукт",label:"Продукт",options:ei(t?.productList),...In(e("product"),Cn.product)}))),ei=e=>(e??[]).map((e=>({key:e,value:e})));function ti(e="/api/v1/regions"){const{data:t}=An(e,rt);return Array.isArray(t)?t:[]}const ni=d((({field:e,input:t,url:n})=>{const l=ti(n);return o(mn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Bn(e("region"),Cn.region,t?.required)})})),li=d((({field:e,input:t})=>{const n=jn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(mn,{label:"Регион",placeholder:"Выберите регион",options:l,...Bn(e("region"),Cn.region,t?.required)})})),ai=d((({field:e,input:t})=>o(tn,{label:"Пенсионные доходы",placeholder:"Введите значение",type:"number",...Bn(e("retirementIncome"),Cn.retirementIncome,t?.required),...t}))),ii=d((({field:e})=>{const t=e("secondaryPhone");return o(Xa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?In(t,Cn.secondaryPhone):t})})),ri=d((({field:e,input:t})=>o(mn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:pa,...Bn(e("serviceDirection"),Cn.serviceDirection,t?.required)}))),si={horizontal:"@lg:flex-row",vertical:""},oi=d((({label:e,items:t,value:n,className:l,onChange:a,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Me,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",si[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(ol,{isRadio:!0,text:t,value:n===e,onChange:()=>a&&a(e),disabled:i},String(e))))})]}))),ci=d((({className:e,label:t,onChange:n,error:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(oi,{label:Lt({label:t,errors:a?.errors}),onChange:e=>n&&n(e),...a}),Xt(l)]}))),di=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],mi=d((({field:e,input:t})=>o(ci,{label:"Пол",orientation:"horizontal",items:di,...Bn(e("sex"),Cn.sex,t?.required)}))),ui=d((({field:e})=>o(hl,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...Bn(e("shareholderFlg"),Cn.shareholderFlg)}))),hi=e=>"_"===e,pi=e=>/\d/.test(e),gi=e=>hi(e)||pi(e),fi=[..."___-___-___ __"],xi=fi.findIndex(hi),bi=fi.map(((e,t)=>gi(e)?fi.slice(0,t).filter(gi).length:-1));const yi=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=fi.map(((e,n)=>pi(e)?e:t.charAt(bi[n])||e)),l=bi.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(xi,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(Ht,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),vi=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(yi,{"aria-label":t,label:Lt({label:t,errors:r?.errors}),valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),Xt(l)]}))),Ni=d((({field:e,input:t})=>o(vi,{label:"СНИЛС",...Bn(e("snils"),Cn.snils,t?.required),...t}))),wi=d((({field:e,input:t})=>o(tn,{label:"Фамилия",...Bn(e("surname"),Cn.surname,t?.required),...t}))),ki=["От 1 мес","До 15 лет"],Ci=d((({field:e})=>o(Kn,{title:"Срок, месяцев",items:ki,min:1,max:180,...e("term")}))),Si=d((({field:e,input:t})=>o(tn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Bn(e("totalIncome"),Cn.totalIncome,t?.required),...t}))),Ti=d((({field:e,input:t})=>o(mn,{label:"Тип обслуживания",options:ha,...Bn(e("serviceType"),Cn.serviceType,t?.required)}))),Ii=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Bi=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(oi,{className:"whitespace-normal",orientation:"horizontal",items:Ii,value:t,onChange:e=>n&&n(e)})})}));const Pi={$ref:"/wcms-resources/outservice-productlist.json"},Ri=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(wi,{field:e,input:n}),name:o(Da,{field:e,input:n}),middleName:o(Ma,{field:e,input:n}),phone:o(Ga,{field:e,input:n}),email:o(ia,{field:e,input:n}),fullName:o(ba,{field:e,input:n}),inn:o(Na,{field:e,input:n}),legalForm:o(Ta,{field:e,input:n}),organizationName:o(Aa,{field:e,input:n}),generalSeniority:o(ya,{field:e,input:n}),lastJobExperience:o(Ca,{field:e,input:n}),experience5Years:o(da,{field:e,input:n}),jobsNumber:o(ka,{field:e,input:n}),beginDate:o(Dl,{field:e,input:n}),fullAddress:o(xa,{field:e,input:n}),comment:o(Ol,{field:e,input:n}),addressBranch:o(En,{field:e,input:n,isPremium:a}),sex:o(mi,{field:e,input:n}),birthday:o(Vl,{field:e,input:n}),birthPlace:o(zl,{field:e,input:n}),desiredMeetingDate:o(Jl,{field:e,input:n}),product:o(Za,{field:e,source:Pi}),localities:o(Pa,{field:e,input:n}),isClient:o(wa,{field:e}),partnerComments:o(Ea,{field:e,input:n}),collectionCount:o(Al,{field:e,input:n}),acquiringType:o(Rn,{field:e,input:n}),onlineCheckout:o(za,{field:e}),posTerminal:o(Qa,{field:e}),serviceType:o(Ti,{field:e,input:n}),term:o(Ci,{field:e}),amount:o(Qn,{field:e}),annualRevenue:o(al,{field:e,input:n}),vedTypes:o(Bi,{field:e}),feedbackMethod:o(fa,{field:e,input:n}),serviceDirection:o(ri,{field:e,input:n}),bankEmpolee:o(fl,{field:e}),secondaryPhone:o(ii,{field:e}),consentToReceiveMaterials:o(Kl,{field:e,input:n}),processPersonalDataLeadFlg:o(Kl,{field:e,input:n}),consentProviderFlg:o(Kl,{field:e,input:n}),consentPhotoFlg:o(Kl,{field:e,input:n}),consentAssignmentClaimsFlg:o(Kl,{field:e,input:n}),consentCollectionFlg:o(Kl,{field:e,input:n}),consentInformFlg:o(Kl,{field:e,input:n}),consentPfrFlg:o(Kl,{field:e,input:n}),applicationDate:o(tn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:a?o(li,{field:e}):o(ni,{field:e,input:n,url:Ft(t)}),education:o(aa,{field:e,input:n}),housing:o(va,{field:e,input:n}),employment:o(oa,{field:e,input:n}),organization:o(_a,{field:e,input:n}),amountWorkers:o(ll,{field:e,input:n}),employerActivities:o(ra,{field:e,input:n}),employerOrganization:o(sa,{field:e,input:n}),positionOrganization:o(Ja,{field:e,input:n}),familyStatus:o(ua,{field:e,input:n}),children:o(_l,{field:e,input:n}),familyMembers:o(ma,{field:e,input:n}),dependents:o(Gl,{field:e,input:n}),totalIncome:o(Si,{field:e,input:n}),expenses:o(ca,{field:e,input:n}),snils:o(Ni,{field:e,input:n}),conscription:o(Fl,{field:e,input:n}),armyIdFlg:o(pl,{field:e,input:n}),dulSerie:o(na,{field:e,input:n}),dulNumber:o(ta,{field:e,input:n}),dulIssueDateField:o(Zl,{field:e,input:n}),dulSubdivisionCode:o(la,{field:e,input:n}),dulIssuedBy:o(ea,{field:e,input:n}),participantAddress:o($a,{field:e,input:n}),participantDateRegistration:o(ja,{field:e,input:n}),retirementIncome:o(ai,{field:e,input:n}),otherIncome:o(Oa,{field:e,input:n}),mandatoryIncome:o(Ra,{field:e,input:n}),otherPayments:o(Fa,{field:e,input:n}),disablePeopleFlg:o(Ql,{field:e,input:n}),bankruptcyFlg:o(xl,{field:e,input:n}),shareholderFlg:o(ui,{field:e,input:n}),legalEntityName:o(Sa,{field:e,input:n}),creditInRshbCd:o(Xl,{field:e,input:n}),bankEmployeeCode:o(gl,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},Mi=e=>2===e?"@xl:grid-cols-2":"",Di=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Me,{size:"text-h6",children:e})}):null;function Vi({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const zi={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"},_i={primary:u("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Ai=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Vi(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(zi[a],_i[a]),l),type:s,role:d,onClick:m,children:e})})),Oi=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(El,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Ai,{type:"button",onClick:r,children:"Хорошо"})]})})})),Fi=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Oi,{...e}),n),close:n}},$i=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],ji=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Mn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...Li(o),...Ei(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Ei=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Li=e=>e?{vedTypes:Object.fromEntries(Ii.map((({id:t})=>[t,t===e])))}:{},Ui={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Pn[0],serviceType:ha[0],feedbackMethod:ga[0],serviceDirection:pa[0],vedTypes:Ii[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},qi=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Me,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Me,{children:t.text})}):null]}))),Wi=(e,t)=>o(Ai,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Hi=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(ol,{...e}),o(qi,{link:t})]}),Xt(In(e,wn).error)]}):o(qi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Wi(n)]}),Yi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f="/api/v1"+(g?"/lead":"/sendcorporatelead"),x={typeForm:n,...vt(l,g),...Nt(i,g),...bt(a),...yt(s,"desiredMeetingDate"),...g?yt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...wt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Ki=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ui[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=ha[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),w=i((async(e,t)=>{const l=Xi(x,e),a=$i(Tn(l));if(!un(a(e)))return"Fail";const i=ji({...e,...h}),r=await Yi.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Fi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Vt();kt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:C,reset:S}]=_t(b,{onSubmit:w}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),S())}),[y]),c(Ot,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:C,children:[r.map(((e,t)=>c("div",{className:u(Mi(e.columns),"grid gap-x-m"),children:[Di(e.title),(e?.inputs||[])?.map(Ri(k,n))]},`section-${t}`))),Hi(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("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:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Xi=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)}))));function Gi(e){const[t,n]=l(JSON.parse(globalThis.localStorage?.getItem(e)||"null"));return[t,i((t=>{globalThis.localStorage?.setItem(e,JSON.stringify(t)),n(t)}),[e,globalThis.localStorage])]}const Ji=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const Qi=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Zi=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(In(n(e?.name),Cn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(Ji,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:l})=>o(Qi,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(Ri(n,t))}),renderFoldButton:er(c("div",{children:[o(ol,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Xt(i?"Отметьте все обязательные соглашения":"")]}))})})})),er=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),tr=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=nr(n||[]);return l.length>2?c("div",{children:[a.map(Ri(e,t)),o(Zi,{inputs:l,field:e})]}):(n||[])?.map(Ri(e,t))},nr=e=>({consentInputs:e?.filter((e=>Object.keys($l).includes(e.name)))||[],restInputs:e?.filter((e=>!Object.keys($l).includes(e.name)))||[]}),lr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Pn[0],serviceType:ha[0],feedbackMethod:ga[0],serviceDirection:pa[0],vedTypes:Ii[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1,participantAddress:"",participantDateRegistration:void 0},ar=(e,t,n="")=>{if(t){const e=JSON.parse(t);return e.birthday=new Date(e?.birthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||lr[e.name]]))),typeForm:{key:n,text:""}}},ir=(e,t)=>o(Ai,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),rr={width:"118",height:"24"},sr={"bg-white":"color",transparent:"white"},or={"bg-white":"text-primary-main",transparent:"text-white"},cr=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:sr[e]},className:or[e],width:n?.width,height:n?.height}),dr={"bg-white":"text-primary-text",transparent:"text-white"},mr=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...he(s),children:[cr(i,n?.image,rr),r?l??o("div",{className:"ml-s",children:o(Me,{font:"font-medium",color:dr[i],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),ur=async({code:e,setHasError:t,close:n,sendCode:l=Ut})=>{const a=await(i={captchaText:e},Ll("/sms/checkCaptcha","POST",i));var i;"ERROR"===await a.text()?t(!0):(l(),n?.())},hr=async(e,t)=>{const n=await(e=>Ll(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET"))(t);e(URL.createObjectURL(await n.blob()))},pr=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=l(""),[d,m]=l(""),[u,h]=l(!1);return a((()=>{hr(s,e)}),[]),o(El,{head:o(mr,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-36 w-72",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>hr(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(Ht,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(Ai,{onClick:t,version:"secondary",children:"Вернуться"}),o(Ai,{type:"submit",disabled:!d,onClick:()=>ur({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),gr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),fr=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:xr(e)})))),xr=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,br=async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:l,setAttemps:a})=>{try{await(i={phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}},Ll("/sms/sendCode","POST",i)),a(0),n(180),l(!0)}catch(e){429===e?.status&&t.open()}var i},yr=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=l(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=a.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),m(l)}}),[e]),g=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),m(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:p(l),className:vr(l,e,n)},l)))}),n?o("div",{className:"text-error",children:r}):null]})})),vr=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},Nr=d((({isDisabled:e,onClick:t,text:n})=>o(Ai,{type:"button",onClick:t,disabled:e,children:o(Me,{font:"font-medium",children:n})}))),wr=e=>{globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token)},kr=({close:e,values:t})=>{const[n,s]=l(!1),[o,c]=l(""),[d,m]=l(!1),[u,h]=l(0),[p,g]=l(!1),[f,x]=l(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await(async e=>Ll("/sms/checkCode","POST",e).then(wr))({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e()}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return a((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}},Cr=d((({close:e=Ut,onClose:t=Ut,title:n,description:r,__html:s,code:d=!0,codeLength:m=4,textButton:u="",phoneNumber:h="+79999999999"})=>{const[p,g]=l(Array(m).fill("")),{handleSubmit:f,hasError:x,errorText:b,isLoading:y,timeNextReq:v,isSubmitButtonDisabled:N,setTimeNextReq:w,setIsTimerStarted:k,setAttemps:S}=kr({values:p,close:e}),T=i((()=>{br({phoneNumber:h,captchaDialog:I,setTimeNextReq:w,setIsTimerStarted:k,setAttemps:S})}),[]),I=((e,t)=>{const{open:n,close:l,closeAll:a}=de();return{open:()=>n(o(pr,{close:l,onClose:t,...e})),close:l,closeAll:a}})({phoneNumber:h,sendCode:T},t);return a((()=>{T()}),[]),o(El,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:n,description:r,headlineVersion:"S",isEmbedded:!0}),d?o(yr,{values:p,setValues:g,errorText:b,hasError:x}):null,Tr(v,w,T),o(Pe,{itemSize:"list-s",__html:s}),Sr(u,N,f),y?o(gr,{blur:!1}):null]})})})),Sr=(e,t,n)=>e?o(Nr,{isDisabled:t,onClick:n,text:e}):null,Tr=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(fr,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(be,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Ir=({inputs:e,programId:t,saveForm:n})=>{const[a,r]=l(""),[,s]=Gi("taskId"),[,c]=Gi("profileId"),[,d]=Gi("participantId"),m=i(((e,t,n)=>{d(e),s(t),c(n)}),[]);return{handleSubmit:i((async l=>{const a=$i(Tn(e));if(!un(a(l)))return"Fail";try{const{profile:e}=await(i={profile:{phone:xt(l.phone)}},Ll("/public-data/createUserProfile","POST",i)),a=e?.id;if(a&&l?.phone){const e=async()=>{try{await(e=>Ll("/user-data/updateUserProfile","POST",e))(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&ft(i,!0),email:s,phone:xt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(a,l));const{taskId:e,participantId:i}=await(e=>Ll("/user-data/createDraftTask","POST",e))({profileId:a,programId:t});await(e=>Ll("/user-data/updateUserTask","PUT",e))((({participantId:e,taskId:t,profileId:n,formData:l})=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))({participantId:i,taskId:e,profileId:a,formData:l})),m(i,e,a),n(JSON.stringify(l)),globalThis.location.href="/credit-lead"}catch{r("Fail")}},i=Object.keys($l).filter((e=>l[e])).map((e=>$l[e]?.text));(e=>{const{open:t,close:n}=de();return{open:(l={})=>t(o(Cr,{onClose:n,...e}),l),close:n}})({close:e,...Br(l?.phone,i)}).open()}}catch{r("Fail")}var i}),[]),responseStatus:a}},Br=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:xt(e),textButton:"Оформить",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${Pr(t)}`}),Pr=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,Rr=d((({className:e,title:t,programId:n="",typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],[h,p]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const[g,f]=Gi("leadForm"),x=ar(m,g,i),{handleSubmit:b,responseStatus:y}=Ir({inputs:m,programId:n,saveForm:f});if(y){Fi({responseType:y,typeForm:i}).open()}const[,{field:v,onSubmit:N,reset:w}]=_t(x,{onSubmit:b});return a((()=>{"OK"===h&&(p(""),w())}),[h]),o(Ot,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:N,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(Mi(e.columns),"grid gap-x-m"),children:[Di(e.title),tr({field:v,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),ir(s)]})})})),Mr=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Dr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Vr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function zr(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:_r(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}function _r(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Ar=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:a,children:r,onIntersection:s})=>{const c=zr(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:r})})),Or=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Fr=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(jr(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?$r(c,v):{},...N?Vr(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(C=(e,n)=>o(Ar,{className:u(m,a?Or[a-1]:"",{"h-full":N},t),style:w?$r(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(p)});var C})),$r=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),jr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Er={"horizontal-list":"w-6","vertical-list":"h-6"},Lr=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Er[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Ur=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},qr=e=>e,Wr=(e=qr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Hr=Wr(),Yr=(e=qr)=>Wr((t=>-e(t))),Kr=Yr(),Xr=e=>t=>e.scrollWidth/t,Gr=e=>(t,n)=>{e.scrollBy({left:n*Xr(e)(t),behavior:"smooth"})},Jr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Yr()(a),Wr()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Gr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Gr(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Qr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Zr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[h,p]=Jr({itemCount:s.length}),g=es(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Fr,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Ur({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Qr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Lr({activeIndex:t,onClick:f,listType:l}))}):null})),es=(e=!1)=>({behavior:e?"auto":"smooth"}),ts=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:u("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{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"})}))),ns=d((e=>o(ts,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ls=d((e=>o(ts,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),as="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",is=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?rs(t):null,i?o(ns,{className:u(ss(a),m?"left-1":"left-0"),onClick:s}):null,r?o(ls,{className:u(ss(a),m?"right-1":"right-0"),onClick:d}):null]})})),rs=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(as,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(as,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ss=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),os=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Jr({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Fr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(is,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Zr,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),cs=({blocksToRender:e,...t})=>o(os,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Dr(!0)),children:I(e,t)},String(n))})}),ds=e=>e%2!=0,ms=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),us=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(ms,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Me,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),hs=({isUnfolded:e,onToggle:t})=>o(us,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ps=["ArrowDownIcon","ArrowUpIcon"],gs="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",fs=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(gs),children:[P(i,{...a.options,parent:n}),ds(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(Ji,{renderFoldableSection:({isUnfolded:e})=>c(Qi,{className:u(gs),isUnfolded:e,children:[P(r,{...a.options,parent:n}),ds(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(us,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:ps[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},xs=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[bs(n,t),fs({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[bs(n,t),cs({...l,blocksToRender:t})]});default:return null}})),bs=(e,t)=>e&&!t.length?o(Mr,{...e}):null,ys=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),vs=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(Va,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ns=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,ys(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(ws(l)).filter(Boolean))]}),n?o("div",{children:o(Ai,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),ws=e=>([t,n])=>{const l=n?.type;return"array"===l?ks(t,e)(n):null},ks=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Me,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(vs,{items:l,multiple:!n?.single,...t(e)})]},e)};function Cs(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ss=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Ts=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Ss(t[e])||Ss(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ss(t[e])||Ss(n[e])||Is(t[e])<=Is(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Ss(t[e])||Ss(n[e])||Is(t[e]?.min)>=Is(n[e]?.min)&&Is(t[e]?.min)<=Is(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Ss(t[e])||Ss(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ss(t[e])||Ss(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Is=e=>Number(e||0),Bs=(e,{block:t,page:n,normalize:l=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=_t(e),d=r((()=>Cs(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=zt)=>e?.filter((([,e])=>Ts(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ps={},Rs={},Ms=ut((({className:e,filtrationSchema:t=Ps,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Bs(Rs,{block:a.block,page:a.options?.page}),d=o(sn,{className:"w-64",label:n?.title,options:Ds(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ds(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ns,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Ai,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(xs,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ds=e=>Cs(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Vs=(e=!1)=>e?"text-left":"text-center",zs={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},_s=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",zs[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),As=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Vs(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Os)}):null]})})),Os=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(_s,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Me,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Fs=e=>({icon:t,title:n,description:l},a)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o(Me,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o(Me,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),$s=(e,t,n)=>o("div",{className:`grid gap-2xs ${js(t)}`,children:e.map(Fs(n))}),js=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Es=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?$s(e,l,t):null]}))),Ls={start:"justify-start",center:"justify-center",end:"justify-end"},Us=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",Ls[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:$e(e)})})),qs=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Ws="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Hs="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Ys="flex flex-col gap-y-xl min-w-52",Ks=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Me,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Xs=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Me,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Ks,{value:n,...a}):o(Me,{size:"text-h3",children:"-"})]}))),Gs=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Js=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Me,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Qs=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Zs=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Qs,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Js,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Xs,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),eo=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(Kn,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),to={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},no={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},lo=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=to.prefMonthsNum,prefTravelBonusRate:i=to.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||no,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},ao=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=_t({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=lo(r,n);return o(qs,{className:e,title:t,...i,children:c("section",{className:u(Ws,e),children:[c("div",{className:Hs,children:[eo({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),eo({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Zs({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Ys,children:[f>=0?o(Xs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,$e(l,{isVertical:!0}),Gs(a)]})]})})})),io=Math.round(29.5),ro=(e,t=0)=>e?.sum?e.sum:t,so=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,oo=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,co=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Me,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Me,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(oi,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),mo=e=>co({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),uo=" (c капитализацией)",ho=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Ys,children:[o(Xs,{title:`Доход в конце срока${i?uo:""}`,value:e,postfix:n,prefix:"+"}),o(Xs,{title:`Сумма в конце срока${i?uo:""}`,value:t,postfix:n}),$e(l,{isVertical:!0}),a?.map(Gs)]}),po=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:go([e,t],l),go=([e,t],n=[])=>({[e]:n.length?Kr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Hr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),fo=(e,[t,n],l)=>e>=l[t]&&e<=l[n],xo={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const bo={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},yo=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?xo[e?.rateType]:"",{data:n}=An(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...bo,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&vo(s,e)&&fo(l,["minSum","maxSum"],e)&&fo(n,["minDays","maxDays"],e)))||bo,{rate:m}=d,u=No(m,e),h=l+u,p=c||[bo];return{...d,...go(["minSum","maxSum"],p),...go(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},vo=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,No=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},wo=ut((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=_t({moneyValue:ro(r,1e5),daysValue:so(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=yo(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(qs,{className:e,title:t,...d,children:c("section",{className:u(Ws,e),children:[c("div",{className:Hs,children:[eo({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Kn,{items:[`От ${oo(v.min||0)}`,`До ${oo(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[ko(p,h),mo({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Zs({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),ho({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),ko=(e,t)=>c("div",{className:"space-y-s",children:[o(Me,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(ol,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(ol,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Co=(e=[],t=!1)=>So([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),So=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},To=({min:e=0,max:t=0,availableMonths:n,...l})=>o(Kn,{items:[`От ${Io(e)}`,`До ${Io(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Io=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Bo=e=>co({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Po=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(Un(t?.[a],n.minMonths,n.maxMonths))},Ro=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},Mo={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Do=e=>Vo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Vo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Vo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Vo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Vo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],zo=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[Mo],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Do({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=po(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=po(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Do({row:e,userInputParams:t,paramsViewSettings:n})&&fo(l,["minSum","maxSum"],e)&&fo(a,["minMonths","maxMonths"],e)))||Mo)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=Ro(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},_o=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Ao={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Oo=ut((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,So([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=_t({moneyValue:ro(s,2e5),monthsValue:so(s,io),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=zo(p,n,r),x=Bo({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Un(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(Un(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!_o(s)&&m&&Po({field:g,defParams:m,calcParams:f,map:Ao,monthsValue:"minMonths"})}),[n,s]),o(qs,{className:e,title:t,...d,children:c("section",{className:u(Ws,e),children:[c("div",{className:Hs,children:[eo({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),To({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Fo({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u(Ys,"@4xl:w-1/2"),children:[o(Xs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Xs,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(Xs,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),$e(l,{isVertical:!0}),Gs(i)]})]})})})),Fo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(ol,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(ol,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(ol,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(ol,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),$o=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},jo={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Eo=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?qo(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Uo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Uo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Uo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Uo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,fo(l,["minSum","maxSum"],t),fo(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||jo,{rate:u}=m,h=Lo(u,e),p=l+h,g=t||[jo];return{...m,...go(["minSum","maxSum"],g),...go(["minMonths","maxMonths"],g),availableMonths:$o(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},Lo=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Uo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],qo=(e,t)=>e+Math.round((t-e)/2),Wo=(e="rub")=>"rub"===e,Ho=(e,t)=>{const{minMonths:n,maxMonths:l}=go(["minMonths","maxMonths"],Go(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Un(a,n,l)}},Yo=(e,t)=>{const{minSum:n,maxSum:l}=go(["minSum","maxSum"],Go(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Un(a,n,l)}},Ko=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Xo=e=>{const t=Wo(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Go=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Jo=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?co({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?co({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Qo(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?mo({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},co({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Qo(e.isShowNewClient),e.isShowNewClient?o(ol,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Qo=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Zo={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},ec={text:"₽",key:"rub"},tc=ut((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[ec],g=i((e=>t=>e?{...t,...Xo(t),...Yo(t,e),...Ho(t,e),...Ko(t,e)}:t)(h),[h]),[f,{field:x}]=_t({moneyValue:ro(d,2e4),monthsValue:so(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:ec},{normalize:g}),b=x?.("currency")?.value??ec,y=x?.("isNewClient")?.value,v=Go(h,b),N=Eo(f,v,s),{rate:w,income:k,finalSum:C,type:S=""}=N,T=i((()=>{Po({field:x,defParams:Co(v,y),calcParams:N,monthsValue:"minMonths",map:Zo})}),[x,h]);a((()=>{!_o(d)&&v&&T()}),[d,h]);const I=w===Co(v,y)?.rate;return o(qs,{className:e,title:t,...m,children:c("section",{className:u(Ws,e),children:[c("div",{className:Hs,children:[c("div",{className:"flex gap-m",children:[eo({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:nc(b?.key)}),h&&h?.length>1?o(mn,{label:"Валюта",options:p,...x("currency")}):null]}),To({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Jo({...N,...s},x)]}),Zs({rate:w,children:ac(T,I)}),ho({income:k,finalSum:C,buttons:[...l,lc(n?.buttons,S)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),nc=(e="")=>Wo(e)?1e3:100,lc=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},ac=(e,t=!1)=>t?null:o(Ai,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ic=e=>rc({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&rc({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),rc=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],sc={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},oc=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[sc],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ic({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=po(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=po(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>ic({row:e,userInputParams:t,paramsViewSettings:n})&&fo(l+r,["minSum","maxSum"],e)&&fo(i,["minSumOld","maxSumOld"],e)&&fo(r,["minSumExtra","maxSumExtra"],e)&&fo(a,["minMonths","maxMonths"],e)))||sc)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=Ro(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},cc=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=_t({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=oc(s,n,i),h=Bo({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(qs,{className:e,title:t,...r,children:c("section",{className:u(Ws,e),children:[c("div",{className:Hs,children:[eo({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),eo({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),To({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),dc({...m,...i},d),m.isExtraMoney?eo({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),c("div",{className:u(Ys,"@4xl:w-1/2"),children:[o(Xs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Xs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Xs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Xs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),$e(l,{isVertical:!0}),Gs(a)]})]})})})),dc=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(ol,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(ol,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(ol,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),mc=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Ln(e,{normalize:(e=a)=>n&&l?String(Un(Number(uc(e)),n,l)):uc(e),format:Ue(r)}),d=i((e=>t&&t(uc(e))),[t]);return o(Ht,{onChange:d,...s,...c})})),uc=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),hc=d((e=>o(mc,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Me,{size:"text-xl",font:"font-light",children:"₽"})})}))),pc={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},gc={amount:1500},fc=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=_t(gc),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:pc[r],children:[o(hc,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Ai,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),xc=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),bc="relative h-full",yc={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},vc=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(kc),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:Nc(n,{someCardsHighlighted:i}),children:[I(n,l,{className:wc(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),kc(n)?xc({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Nc=(e,{someCardsHighlighted:t})=>u(bc,t&&(kc(e)?"pt-3xl":"pt-3xl sm:pt-16")),wc=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(bc,"min-w-80",yc[l],t&&(kc(e)?"pt-3xl sm:pt-16":"pt-3xl"),Dr(n),n&&"h-full"),kc=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Cc=ut((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(os,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Sc(s?.block?.blocks):[],hasBlur:!0,children:vc({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Sc=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Tc="z-10 border border-solid w-full h-full",Ic=u(Tc,"absolute hidden @xl:block border-transparent"),Bc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Ic,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Ic,"top-6 right-8 bg-green")}),o("div",{className:u(Ic,"top-3 right-4 bg-green-light")}),c("div",{className:u(Tc,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Pc={black:"bg-black",white:"bg-white"},Rc=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Se,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:$e([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Mc)]}):null,a?c(Me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Mc=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Pc[e]}`},String(t)),Dc=d((({icon:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Vc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?zc(l):null]})}))),zc=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Dc,{...e},String(t))))}),_c=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Ac=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=ue()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),Oc=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Fc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Oc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Fe(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},$c(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:$e(m,{className:jc(s??!1,a??!1,n),buttonClassName:h})}),r?o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),$c=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",jc=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Ec=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Ac,{href:a,target:m,className:"h-full",data:_c(v),children:c(Se,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Fe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Fc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Oe,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Lc(l,p)]})})}))),Lc=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Uc=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Me,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Me,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:$e(a)}):null]},String(t))},qc=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(Uc),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Fe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Ji,{renderFoldableSection:()=>c("div",{children:[x,o(Qi,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Wc(m?.parent,h,y):null}):o("div",{children:x})]})})),Wc=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?he(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Hc=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?Yc(n):null,t?.length?Yc(t):null]}))),Yc=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Kc({column:e,i:t})))}),Kc=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(C,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(l?.text)}),children:$e([l])})]},String(a))))},`col-${String(t)}`):null,Xc=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black"})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(W,{name:t,width:"24",height:"24",iconVersion:n})}),o(Pe,{__html:e})]}))),Gc=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),Jc=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const l=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold",children:["Шаг ",e," из ",t,"."]})," ",n[e-1]||null,o(Gc,{step:l,showPercentage:!1})]})})})),Qc={1:[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0},{fieldType:"common",name:"name",required:!0,dadata:!0},{fieldType:"common",name:"middleName",dadata:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0},{fieldType:"common",name:"dulNumber",required:!0},{fieldType:"common",name:"dulIssueDateField",required:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:2,inputs:[{fieldType:"common",name:"participantAddress",required:!0},{fieldType:"common",name:"participantAddress",required:!0,dadata:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",columns:2,inputs:[{fieldType:"common",name:"fullAddress",required:!0,dadata:!0},{fieldType:"common",name:"housing",required:!0}]}],2:[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment",required:!0},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!0},{fieldType:"common",name:"amountWorkers",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!0},{fieldType:"common",name:"employerOrganization",required:!0},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"phone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0},{fieldType:"common",name:"positionOrganization",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"fullAddress",required:!0}]}],3:[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus"}]},{columns:1,inputs:[{fieldType:"common",name:"dependents"}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"retirementIncome"},{fieldType:"common",name:"otherIncome"}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome"}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments"}]},{columns:1,inputs:[{fieldType:"common",name:"snils"}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],4:[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],5:[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"region"}]},{inputs:[{fieldType:"common",name:"addressBranch"}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]},Zc=d((({step:e,setStep:t,totalSteps:n})=>c("div",{className:"flex justify-between",children:[o(Ai,{onClick:()=>{e>1&&t(e-1)},className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:1===e,children:"Назад"}),o(Ai,{onClick:()=>{e<n&&t(e+1)},className:u("w-full @xl:w-auto"),type:"button",disabled:e===n,children:"Далее"})]}))),ed=["Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Отделение Банка"],td=d((({className:e,typeForm:t="",sections:n=[],...a})=>{const[i,r]=l(1),s=n?.flatMap((e=>e?.inputs))||[],d=ar(s,t),[,{field:m,onSubmit:h}]=_t(d,{onSubmit:()=>!1});return o(g,{className:u("bg-transparent",e),defaultPadding:"p-6xl",...a,children:c("div",{className:"container grid grid-cols-12",children:[o(Jc,{stepsTitles:ed,step:i,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:c("form",{onSubmit:h,className:"space-y-m",children:[nd({sections:Qc[i],typeForm:t,field:m}),o(Zc,{step:i,setStep:r,totalSteps:5})]})})]})})})),nd=({sections:e,field:t,typeForm:n})=>e.map(((e,l)=>c("div",{className:u(Mi(e.columns),"grid gap-x-m"),children:[ld(e?.inputs),Di(e?.title),tr({field:t,typeForm:n,inputs:e?.inputs})]},`section-${l}`))),ld=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e})=>o(Xc,{__html:e}))):null},ad=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,id=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),rd=1e9,sd={sum:{min:1e4,max:rd},period:3},od=ut((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Bs(sd,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:cd(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=dd(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ns,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(hc,{label:l?.title,min:500,max:rd,...d("sum",{parse:e=>({min:Number(e),max:rd}),format:({min:e})=>String(e)})}),o(Kn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(xs,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),cd=e=>st((e?.paramsSource?.rateRows||[]).filter(ad).flatMap((e=>id(e.minMonths,e.maxMonths)))),dd=e=>st(e.flatMap((e=>e||[])).filter(ad).flatMap((e=>id(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],md=[{key:"10"},{key:"50"},{key:"100"}],ud=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(sn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:md,iconVersion:"black"})]})},hd="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",pd=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:hd,"aria-label":`Страница ${i}`,children:i},String(t)):null},gd={width:"24",height:"24"},fd=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:xd(1===e),...gd})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:hd,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(pd),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:hd,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:xd(e===n),...gd})})]})},xd=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",bd=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(fd,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(ud,{itemCount:l,onItemCountChange:a}):null]}),yd=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",qt),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),vd=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(yd,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Pl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Pl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Ai,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Nd=({title:e,timestamp:t,publicId:n})=>{const l=ue(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Me,{size:"text-m","font-weight":"font-light",children:ft(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},wd="/api/v1/depository",kd={startDate:void 0,endDate:void 0,query:""},Cd=ut((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=_t(kd),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?ft(l,!0):"",r=a?ft(a,!0):"",s=new URLSearchParams(wd);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=An(wd+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(vd,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Nd,{...e},String(e.publicId)))):o(Mr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(bd,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Sd=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Td=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Sd(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Id="location";function Bd(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",Rd()??{name:e}),r=i((e=>{Md(e),n(e)}),[]),{data:s}=An(Pd()?null:"/api/v1/region",rt);return a((()=>{s&&!Pd()&&n(s)}),[s]),[t??{name:e},r]}const Pd=()=>Boolean(globalThis.localStorage?.getItem(Id)),Rd=()=>{try{const e=globalThis.localStorage?.getItem(Id);return e&&JSON.parse(e)}catch(e){return null}},Md=e=>{try{globalThis.localStorage?.setItem(Id,JSON.stringify(e))}catch(e){}};var Dd;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Dd||(Dd={}));const Vd=new Intl.NumberFormat("ru",{style:"currency",currency:Dd.RUB}),zd=e=>e?Vd.format(e):"",_d="text-m font-light text-secondary-text ",Ad=`${_d} text-left`,Od=`${_d} pl-5xl text-center`,Fd=`${_d} pl-5xl text-right`,$d={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},jd=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Ad,children:o(Me,{size:"text-m",children:"Валюта"})}),o("th",{className:Od,children:o(Me,{size:"text-m",children:"Купить"})}),o("th",{className:Fd,children:o(Me,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Ed)})]}))),Ed=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:$d[t]},width:"24",height:"24"}):null,o(Me,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Me,{size:"text-h6",children:zd(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Me,{size:"text-h6",children:zd(e?.buyExchangeRate)})})]},t)},Ld={icon:"GpsIcon"},Ud=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(_s,{...Ld,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),qd=(e,t,n)=>{const l=Number(Wd(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Wd=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Hd=e=>Bt([[e=>e.value!==Dd.RUB&&e.oppositeValue!==Dd.RUB,()=>e.handleConvert(e.value,Dd.RUB)],[e=>e.value===Dd.RUB&&e.oppositeValue===Dd.RUB,()=>e.handleConvert(e.value,Dd.USD)],[e=>e.value===Dd.RUB&&e.oppositeValue===Dd.RUB,()=>e.handleConvert(e.value,Dd.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Yd(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Ht,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(sn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Kd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Dd.RUB,selectBuy:n?.[0]?.currency?.currency||Dd.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[Yd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Xd(r,d,n),value:r.inputSell,setValue:e=>Jd(d,n)(e,r.selectSell,r.selectBuy)}),Yd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Gd(r,d,t),value:r.inputBuy,setValue:e=>Qd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Xd=(e,t,n)=>l=>{t({selectSell:l}),Hd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Jd(t,n)(e.inputSell,l,a)}})},Gd=(e,t,n)=>l=>{t({selectBuy:l}),Hd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Qd(t,n)(e.inputBuy,l,a)})},Jd=(e,t)=>(n,l,a)=>{e({inputSell:Wd(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(qd(n,i,l===Dd.RUB)||"")})},Qd=(e,t)=>(n,l,a)=>{e({inputBuy:Wd(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(qd(n,i,l===Dd.RUB)||"")})};const Zd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=Bd(),i=function(e){const t=e?.code||"000",{data:n}=An(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=em(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Dd.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Dd.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Se,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(jd,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Ud,{address:i?.address})]}),o(Kd,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),em=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],tm=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(nm(n))})})),nm=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...he(t),children:a||null})},String(l)):null},lm=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),am=["all","footer"],im=d((({className:e,navigationItems:t})=>{const n=ue();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(lm(am)).map(n).map(rm)})})),rm=(e,t)=>{const{text:n,items:l=[],href:a,target:i="_self",onClick:r,dataFooter:s}=e,d=l.filter(lm(am));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i,onClick:r,...he(s),children:n}),d?o(tm,{items:d}):null]},String(t))},sm=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(om)}):null)),om=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Me,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(cm)})]},String(t)),cm=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:dm(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),dm=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${mm(t)}`,children:o(Me,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},mm=e=>e.replaceAll(/\D/g,""),um=d((({className:e="",index:t,text:n,...l})=>{const a=ue(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),hm=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Me,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(um,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),pm="w-full lg:w-52";function gm(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const fm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const xm=(e,t)=>(n,l)=>{for(const[a,i]of l)n.set(a,e(n.get(a)||t,i));return n},bm=(e=[])=>e.reduce(((e,t)=>e+t),0),ym=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),vm=e=>t=>e.map((([e,n])=>[fm(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>wm(t,e))).reduce(xm(Math.max,0),new Map),Nm=e=>t=>{return Cs(t,t.map((({title:e})=>e)).map((e=>t=>{const n=ym(t||"");return n.length?bm(e.map((e=>Hr(n.map(fm(e)))))):0})(e))).sort((l=([,e])=>e,n=(e,t)=>l(e)-l(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,l},wm=(e,t)=>new Map(e.map((e=>[e,t]))),km=({basePathList:e,initialQuery:t=""})=>{const[n,i]=l(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=An(e?.length?e:null,Cm),[s,o]=l(null);return gm((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=ym(e);if(!a.length)return[];const i=Object.entries(l),r=[...a.map(vm(i)).reduce(xm(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Nm(a)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},Cm=async(...e)=>(await Promise.allSettled(e.map((e=>it(F(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Sm=d((({initialQuery:e,navigationItems:t})=>{const n=r((()=>t?.map((e=>e.href||"/"))),[t]),[l,a]=km({basePathList:n,initialQuery:e}),i=r((()=>Tm(t)(l)),[t,l]);return o(El,{head:o(yd,{autoFocus:!0,...a}),children:o(im,{navigationItems:i})})})),Tm=e=>t=>e?.length&&t?.length?Cs(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:F("/",t)})))}))):[],Im=(e={})=>{const{open:t,close:n}=de();return{open:(n={},l={})=>t(o(Sm,{...e,...n}),l),close:n}},Bm=d((({className:e,search:t,...n})=>{const[a,r]=l(""),s=i((()=>r("")),[]),d=Im(n),m=i((e=>{r(e),Pm(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(yd,{value:a,placeholder:t?.placeholder,onChange:m}),o(jl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Pm=e=>e&&e.length>=3,Rm=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(mr,{className:pm,logo:i,data:a,showTitle:!1}),o(Bm,{className:"grow",navigationItems:t,...e})]})},Mm=d((({className:e="",index:t,...n})=>{const l=ue(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("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}`})})),Dm=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Me,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Mm,{index:t,...e},String(t))))}):null]}))),Vm=ut((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[Rm(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(im,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(pm,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(sm,{items:s}),h?o(be,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(Fc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(hm,{title:m,links:r}),o(Dm,{links:i,license:p})]})})),zm=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?_m(l):null]}))),_m=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>Am(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Om(e)}),c("div",{className:"text-s",children:[o(Me,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Me,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Am=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Om=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Fm=ut((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(mn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:_c(i,s?.key),children:f})}):null]})})}));function $m(e=[]){const t=M(),n=Array.from(e.entries()).filter((([,e])=>jm(t)(e)));return n.find((([,e])=>jm(t,!0)(e)))??n[n.length-1]??[]}const jm=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=O(Em(e)(n));return t?l===O(n):l.startsWith(O(n))},Em=e=>t=>{const n=G(X.SITE_URL);return z(t)?e.href:F(n,e.pathname)},Lm=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[r,{setFalse:d,toggle:m}]=$t(!1),h=Et(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[r]);return jt(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),a((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:qm(t,n)})]})})),Um=d((({isActive:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:i,onClick:r,role:"link",...he(t?.data),children:l})})),qm=(e,t)=>e?.map(((e,n)=>o(Um,{isActive:e===t,...e},e?.text??String(n)))),Wm={default:"w-6 h-6",large:"w-12 h-12"},Hm=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Wm[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:c,...he(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Ym=e=>globalThis[e],Km=(e,t)=>{const n=document.getElementById(t);if(n){const t=Ym(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Ym(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Ym(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))};const Xm="chatbot",Gm="text-page__btn-chat",Jm={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Qm=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:l="Чат",version:i})=>{const r=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Jm[e??""];return n=>{if(t)if("personal"!==e)Km(Xm,t);else{const e=n.target;e?.classList.contains(Gm)||e?.classList.add(Gm),document.getElementById("webchat-js-container:webchat_rshb")||Km(Xm,t)}}})(e);return o(Hm,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:l,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),Zm=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...i})=>{const r=ue(),{href:s,target:d,text:m,onClick:h}=r(i);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...he(a),children:[o("span",{className:eu(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),eu=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),tu=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=zr(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(Zm,{...a,children:n})})})),nu={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},lu=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:u("py-s px-lg font-light whitespace-nowrap",nu["transparent"===e?"transparent":"default"]),...l,children:a}):null})),au=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=$m(e),[u,h]=l(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?iu(t):ru(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(tu,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Lm,{items:p,activeItem:m,ariaLabel:a}):null,V.CHAT_BOT?o(Qm,{version:t,iconVersion:d,chat:V.CHAT_BOT,ariaLabel:i}):null,o(lu,{version:t,...n})]})})),iu=e=>t=>Math.max(t,e+1),ru=e=>t=>Math.min(t,e),su=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(ou,{...e},String(t))))})]}):null,ou=d((({icon:e,...t})=>{const n=ue(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),cu=(e,t)=>n=>n.name?o(Ac,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:_c(e,n.name),children:o(Me,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,du=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(qt,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),mu=d((({foreignOffices:e,branches:t})=>{const[n,a]=Bd(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),u=hu(ti()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(u,uu),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(El,{className:"pb-20",head:c("div",{children:[o(Me,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Ac,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(du,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&fm(e.toLowerCase())(d.toLowerCase())>=.8)).map(cu(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Me,{size:"text-h6",children:e})}),t.map(cu(x,f))]},e)))}),su(e)]});var f,x})),uu=e=>e.name?.charAt(0)||"",hu=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),pu=d((({className:e="",active:t,flat:n,children:l,data:a,...i})=>{const r=ue(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:u(gu(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...he(a),children:o("span",{suppressHydrationWarning:!0,className:fu(t,n),children:d||l})})})),gu=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),fu=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),xu=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",[a]=Bd(n?.branches?.default),r=Im(n),s=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(mu,{...e}),n),close:n}})(n),d=i((()=>r.open()),[r]),m=i((()=>s.open()),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(pu,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:_c(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(pu,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Hm,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),bu=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=zr(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(pu,{...a,children:n})})})),yu=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:i,search:d,bgColor:m,logo:u})=>{const[h,p]=l(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?vu(t):Nu(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(mr,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(bu,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Lm,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(xu,{version:a,className:"ml-auto",search:d,navigationItems:e,...i})]})})),vu=e=>t=>Math.max(t,e+1),Nu=e=>t=>Math.min(t,e),wu={"bg-white":"primary",transparent:"transparent"},ku=["all","header"],Cu=ut((({className:e,bgColor:t="bg-white",logo:n={},version:l=wu[t],portal:a,header:i={},...r})=>{const{common:s,navigation:d}=Tu(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=$m(m),{internetBankButton:f}=a||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(yu,{activeTopItem:p,navigationItems:m?.filter(lm(ku)),version:l,headerData:{...i,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",Su(l))}),p?.items?.length&&o(au,{subItems:p?.items?.filter(lm(ku)),version:l,internetBankButton:f})]})})})),Su=e=>"transparent"===e?"opacity-30":"",Tu=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Iu=(e=!1)=>e?{}:{padding:"p-0"},Bu={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Pu=ut((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",Bu[n],e),padding:t,version:a,isTheme:i,...s,children:R({...s,extraProps:{...Iu(l),className:Dr(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Ru=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",Ls[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),Mu=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function Du({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(ts,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(ts,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const Vu=d((({className:e="",cards:t=[],button:n})=>{const[a,r]=l(0),s=i((e=>r(e)),[]),d=t.length,[m,u]=Mu({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?zu({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,Du({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(be,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function zu({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?_u("страховая сумма",e.sum):null,e?.fee?_u("страховой взнос",e.fee):null]}),Au(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function _u(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Me,{size:"text-h6",children:[Ue(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Me,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Au(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Ou=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...r})=>{const[s,d]=l(0),m=i((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Fu({insuranceTabs:n,button:a})})]})})),Fu=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(Vu,{button:t,cards:e},String(n)))):null};const $u={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},ju={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Eu=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[ys(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Lu)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Wu)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Pe,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),Lu=(e,t,n)=>{const l=1===t,a=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${Uu(l,a,e.cells)}`,children:i.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(qu)}):null},`column_${t}`)},Uu=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),qu=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${ju[n]} ${$u[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Me,{align:"text-center",children:e.text})},`cell_${t}`):null},Wu=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Hu=["байт","Кб","Мб","Гб","Тб","Пб"],Yu=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...he(i),children:[e,t?c(Me,{size:"text-l",font:"font-light",children:[t," ",Ku(d,m),o(Me,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Ku=(e,t)=>e||t?o("span",{children:", "}):"",Xu=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Hu[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Ju(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Yu,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Gu(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},Gu=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Ju=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Qu=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=M(),r=U(a)(e),s=i((()=>{l()}),[]);return c(El,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(Ai,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Zu=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Qu,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Gu(a),o(Me,{font:"font-light",children:e})]})})),eh={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},th=ut((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=M();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",eh[r]),role:"list",children:a.map(nh(d,i))}):null]})})),nh=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?lh(t)(n,l):Xu(e,t)(n,l)},lh=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Zu,{...l,icon:e,href:ah(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},ah=e=>"href"in e,ih=ut((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Se,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:$e(l,{className:"flex-wrap"}),children:[a?o(Me,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Me,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),rh=(e,t)=>e&&"underlined"!==t?"primary":"secondary",sh=(e=[],t={})=>e.filter((({content:e={}})=>Ts(t,e))).length,oh=(e,t)=>e===t;const ch=(dh=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(oh,((e=oh)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>dh(n,t[e])))));var dh;const mh=[],uh={},hh={primary:"bg-white/30",secondary:"bg-main-divider"},ph={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},gh=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":hh[t],a=ph[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Me,{size:"text-xs",color:a,children:e})})})),fh=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},xh={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},bh={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},yh={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},vh={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Nh=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",xh[l],n?vh[l]:yh[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?bh[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[fh({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(gh,{count:m,version:rh(n,l)})}):null]})})})),wh=d((e=>o(e?.item?.href?kh:Ch,{...e}))),kh=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Nh,{...e,tag:"a",item:a,onClick:l})})),Ch=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Nh,{item:e,onClick:l,...n})})),Sh=(e,t,n)=>(l,a)=>o(wh,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Th=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Sh(l,a,t))}))),Ih={categories:[],extraOptions:[],propertyType:[],stage:[]},Bh=ut((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Bs(Ih,{block:a.block,page:a.options?.page}),f=i(((e=Ih)=>p(e)),[]),x=(({hotFilters:e=mh,filtrationState:t=uh,blocks:n=mh,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>ch(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:sh(n,t.filter),version:rh(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Th,{...x}),o(Ns,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(xs,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Ph=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Rh=d((({children:e})=>Ph?e:null)),Mh="/icons/MapMarkerClusterIcon.svg",Dh="/icons/MapMarkerClusterYellowIcon.svg";function Vh({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=zh("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=zh("workplaces",e,a),r=_h(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=_h(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=_h(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const zh=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Mh:Dh,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),_h=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Mh:Dh,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Ah={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Oh={...Ah,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Fh=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Oh).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),$h=()=>function(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return Km(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${V.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),jh={...Ah,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Eh=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(jh).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Lh=[55.753995,37.614069],Uh=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=$h();if(a((()=>{i.current?Vh({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:qh(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Vh({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[l?o(gr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Eh,{yandexMaps:i}),o(Eh,{yandexMaps:i,direction:"out"})]}),Fh(i,r,u("right-2 top-80",d))]})})),qh=e=>{const t=[Hh(Wh(e,0)),Hh(Wh(e,1))];return t.every((e=>e))?t:Lh},Wh=(e,t)=>e.map((e=>e.coords?.[t])),Hh=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Yh={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Kh={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Xh={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Gh=(e,t,n)=>{const l=rh("all"===t),a=rh("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Ai,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(Ai,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Jh=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Me,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Qh="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Zh=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(ol,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(Ji,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Qh,children:s}),o(Qi,{className:Qh,isUnfolded:e,children:d})]}),renderFoldButton:ep(n,l)})}):null})},ep=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:tp()})]}),tp=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),np=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Me,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),lp=()=>{},ap=e=>"all"===e?"block":"hidden",ip=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=lp,renderRemoteWorkplaceCard:s=lp,getBalloon:d=lp,getBalloonRemoteWorkplaces:m=lp,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=_t(Yh),[y,v,N,w]=r((()=>{const e=rp(t,f),n=rp(a,f),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,f]),[k,C]=l("all"),S={filters:sp([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:Kh};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[np(p,w),h?Jh(h):null,g&&Gh(t,k,C),o("div",{className:u("pb-3xl",ap(k)),children:Zh(S)})]}),o("div",{className:"h-[600px]",children:o(Rh,{children:o(Uh,{points:v,isLoad:n,className:"h-full"})})})]}),c(Rh,{children:[y.map(i),N.map(s)]})]})})),rp=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Xh[t](e)))))},sp=e=>Object.keys(Yh).filter((t=>e.filter((e=>Xh[t](e))).length)),op={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},cp=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",op[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Me,{size:"text-m",color:op[n].text,children:t})]}))),dp=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:mp({textItems:i,subText:t,children:n,isPhone:l,...a})})),mp=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Me,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||up(n,s),a?o(Me,{color:l,size:"text-m",children:a}):null]}),up=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Me,{size:"text-l",children:t?o("a",{href:`tel:${hp(e)}`,children:e.trim()}):e.trim()},String(n)))),hp=e=>e.replace(/\D/g,""),pp=d((({className:e,children:t})=>o("div",{className:u("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),gp=["ArrowDownIcon","ArrowUpIcon"],fp=["Подробнее","Скрыть"],xp=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:fp[Number(e)]}),o(W,{className:"text-primary-text",name:gp[Number(e)],width:"16",height:"16"})]}),bp=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Np(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Me,{size:"text-h4",children:Np(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(cp,{color:"green",children:Np(s)})})]}),o("div",{className:"hidden sm:block",children:o(pp,{className:"flex-wrap",children:m?.map(vp)})}),o(Ji,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Qi,{isUnfolded:e,children:o(pp,{className:"flex-wrap",children:m?.map(vp)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>xp({isUnfolded:e,onToggle:t})})]},String(d))},yp=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Np(t)} №${n}`,body:e.toUpperCase()}),vp=(e,t)=>o(dp,{...e},String(t)),Np=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",wp=[];const kp=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:wp},Cp={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Sp={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Tp=d((({descriptionData:e,className:t})=>{const[n]=Bd(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=An(`/api/v1/atms?regionCode=${e}`,kp);return{data:t||wp,isLoad:!t&&!n}}(l);return o(ip,{className:t,filterItems:Ip,data:a,isLoad:i,initFilterState:Cp,renderCard:bp,getBalloon:yp,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Ip=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Sp[t](e))),n=!l.length||l.some((t=>Sp[t](e)));return t&&n}))},Bp=e=>{const t=Rp(e);return o(dp,{label:"Режим работы",value:t,className:"max-w-none"})},Pp=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Rp=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Pp({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Pp({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Mp=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Dp=e=>Mp.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Vp=e=>{if(!e)return null;const t=zp(e);return c(pp,{className:"border-none",children:[o(dp,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(_p)})}),o(dp,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]})},zp=e=>{const t=Mp.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},_p=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Me,{size:"text-xs",children:e})},String(n)),Ap=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(dp,{label:"Валюта",value:e.currency}):null,t?o(dp,{label:"Купить",value:String(t)}):null,n?o(dp,{label:"Продать",value:String(n)}):null]},String(l)),Op=(new Date).getDay(),Fp=e=>{const[t]=e?.slice(Op-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(cp,{color:"green",children:a}):null,n&&i?o(cp,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(cp,{color:"red",children:"Выходной"})},$p=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",jp=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(dp,{label:e,value:t&&n?n:"",subText:$p({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Ep=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Lp=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Up=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,qp=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=Dp(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Me,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),Fp(h)]}),o("div",{className:"hidden sm:block",children:Wp({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Ji,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Qi,{isUnfolded:e,children:Wp({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>xp({isUnfolded:e,onToggle:t})})]},String(u))},Wp=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Dp(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(pp,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(dp,{label:"Факс",value:t,isPhone:!0}),o(dp,{label:"Телефон филиала",value:e,isPhone:!0}),o(dp,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(dp,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(dp,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(dp,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(pp,{children:o(dp,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(jp)})})}):c(pp,{children:[o(dp,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(_p)})}),Bp(d)]}),r?.businessScheduleVisibleTag?Vp(r?.businessScheduleDescription):null,s?.currencies?.length?o(pp,{className:"flex-wrap",children:s?.currencies?.map(Ap)}):null]})},Hp=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Dp(e),n=e?Rp(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Ep(n):Up(n,l):Lp(n):null})(n)}`;return{header:l,body:i}},Yp=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Me,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Kp({workScheduleDescription:t})}),o(Ji,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Qi,{isUnfolded:e,children:Kp({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>xp({isUnfolded:e,onToggle:t})})]},String(n)):null,Kp=({workScheduleDescription:e})=>c("div",{children:[c(pp,{className:"flex",children:[o(dp,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(dp,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание банковских карт"})}),o(dp,{label:"Операции для физических лиц",children:o(Me,{children:"Инвестиционное и накопительное страхование"})}),o(dp,{label:"Операции для физических лиц",children:o(Me,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(dp,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]}),Xp=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Gp={branches:[],remoteWorkplaces:[]};const Jp=async e=>await it(e,{method:"GET"})||Gp,Qp=d((({className:e})=>{const[t]=Bd(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=An(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Jp);return{data:t||Gp,isLoad:!t&&!n}}(n);return o(ip,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:qp,renderRemoteWorkplaceCard:Yp,getBalloon:Hp,getBalloonRemoteWorkplaces:Xp,title:`Офисы филиала ${t?.name}`})})),Zp=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Qp,{}):o(Tp,{descriptionData:e})})})),eg=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),tg="hidden sm:flex absolute z-40 top-10",ng=ut((({className:e="",padding:t,slides:n=[],...a})=>{const[i,r]=l(0),[s,d]=Jr({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Xe,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Fr,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(lg({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(ns,{className:u("left-6",tg),onClick:d.scrollLeft}):null,d.canScrollRight?o(ls,{className:u("right-6",tg),onClick:d.scrollRight}):null]})]})})),lg=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,i=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},ag=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Fe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?ig({__html:i,richVersion:r}):null,rg({label:"Адрес",data:e,iconName:"GeolocationIcon"}),rg({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),rg({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?$e([l]):null]})]}))),ig=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),rg=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Me,{size:"text-xl",color:l,children:t})]})]}):null,sg=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),og=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(ms,{tag:"button",className:u("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Me,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),cg=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",dg=(e=!1)=>e?"MinusIcon":"PlusIcon",mg=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",ug=ut((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Ji,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Qi,{className:u("gap-lg",cg(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>hg({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),hg=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?mg(e):dg(e))(a,r);return"accordion"===e?o(og,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(us,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},pg=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(qt.split(" ").filter((e=>"rounded"!==e)),rl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Me,{color:"text-primary-text",children:t}):null]})}))),gg=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(pg,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(pg,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),fg=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(sn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),xg=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(fg,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(fg,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),bg=["От 1 дня","До 365 дней"],yg=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Me,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Kn,{min:1,max:365,value:e,items:bg,onChange:t})]}))),vg=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(fg,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(fg,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ng=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(xg,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:wg(m)}),o(yg,{days:a,setDays:e=>m({days:e})}),o(vg,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:kg(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(gg,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),wg=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},kg=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Cg=d((({days:e,tariffs:t=[]})=>{const n=Tg(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Sg("Аренда за",e),Sg("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Sg=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Tg=(e,t)=>{const n=Ig(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Ig=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},Bg=(e,t)=>e.find((e=>e.branchCode===t)),Pg=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Bg(l,n.selectedBranch),d=Rg(s?.safeBoxCaseVolumes),m=Mg(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Dg(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Ng,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Cg,{days:n.days,tariffs:u})]})})),Rg=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Mg=(e,t)=>e?.find((e=>e.volume===t)),Dg=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Vg=[];const zg=async e=>await it(e,{method:"GET"})||Vg,_g=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=ti(),p=Ag(m.selectedRegion,h),f=function(e){const{data:t}=An(e?`/api/v1/safeboxes?regionCode=${e}`:null,zg);return t||Vg}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=Bg(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Pg,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Uh,{points:b,className:"h-[640px]"}):null]})})),Ag=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Og=e=>e<4?"w-72":"w-52",Fg={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"},$g=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=a.length>3,h=Fg,p=(e=>e?"":"opacity-0")(l),f=we();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(C,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Vs(f)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:ys(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(jg(h,m,i)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:l,version:a}=x,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Og(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Me,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:l.description,children:r}):null,o(Pe,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,$e(e)]});var x})),jg=(e,t,n)=>({icon:l},a)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Eg(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Fe(l)?o(ne,{image:{...l,iconVersion:l?.iconVersion||i},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},Eg=e=>e?"h-16 w-16":"h-24 w-24",Lg=d((()=>o("div",{className:"hidden",role:"none"}))),Ug="hidden sm:flex absolute z-40",qg={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Wg=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Jr({itemCount:t?.length||0});return a((()=>Hg(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Fr,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:qg[i].item,gap:qg[i].gap,children:t.map(Sh(n,l,i))}),s.canScrollLeft?o(ns,{className:u("left-6",Ug,qg[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(ls,{className:u("right-6",Ug,qg[i].buttonTop),onClick:s.scrollRight}):null]})})),Hg=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Yg={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Kg=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Yg[t].wrapper,e),children:o(Wg,{className:Yg[t].component,tabsType:t,...n})}):null,Xg=ut((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Gg(n??{}),p=M(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Zg(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=Qg(x[y],y),C=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Kg({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Jg(t,x),activeItem:N,tabsType:r,onChange:C}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Qg)?.filter(Boolean)||[]}),Gg=({__id:e,anchor:t})=>t??e??"tabs",Jg=(e,t)=>t?.length?t:e,Qg=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Zg=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),ef={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},tf=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:ef[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),nf=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),lf={Buttons:({buttons:e})=>$e(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Me,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Me,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(nf,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},af=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return rf({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),rf=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in lf))return null;return o(lf[n],{...t,...l})},sf=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(af,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),of=(e,t)=>140*bm(e.slice(0,t).map((e=>e?.cols?.length??1))),cf=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Me,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,df=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=Mu({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,i=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Me,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${of(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Me,{size:"text-xl",children:e.data}):null,e?.cols?cf(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Du({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),mf=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Me,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(df,{rows:t.rowsData})})})]},l)}))}))),uf=(e=!1)=>""+(e?"text-white":"text-secondary-text"),hf=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Me,{size:"text-xl",font:"font-light",color:uf(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),pf=ut((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(hf,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(mf,{activeTabIndex:r,items:m}),o(nf,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Me,{size:"text-h6",children:"Данных нет"}),o(nf,{onClick:n,isOpen:!0})]})})),gf=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(pf,{...t,onClick:n})}):null]}))),ff=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(gf,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(tf,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(sf,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),xf=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Du({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),bf=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=Mu({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(ff,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=i>0?[f.slice(0,-i),f.slice(-i)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?o(Ji,{renderFoldableSection:({isUnfolded:e})=>c(xf,{controls:p,children:[x,o(Qi,{isUnfolded:e,children:b})]}),renderFoldButton:hs}):o(xf,{controls:p,children:f})})]})})),yf=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?vf():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Nf(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),vf=()=>o("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"}),Nf=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),wf=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Me,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Me,{size:"text-h2",children:n})}):null]}))),kf=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(wf,{prefix:t,unit:n,suffix:l})})})),Cf=ut((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=M();return o(g,{className:u("relative flex flex-col",Bu[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:u("w-full",Dr(r)),...Iu(l)}})})}),{childrenTypes:[]}),Sf=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Tf=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const i=M();return c(g,{className:e,defaultPadding:Sf(e),...a,children:[o(C,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(i)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(i)(n)})}):null]})})),If={AdTile:pt,ApplicationForm:Ki,ApplicationLeadForm:Rr,BankAccountFiltration:Ms,BenefitsBlock:As,BonusBenefitsBlock:Es,ButtonsBlock:Us,CalculatorBonus:ao,CalculatorBusinessDeposit:wo,CalculatorCredit:Oo,CalculatorDeposit:tc,CalculatorRefinancing:cc,CardTransfer:fc,Carousel:Cc,CarouselCard:Bc,CarouselCatalogCard:Rc,CarouselLinks:Vc,CarouselRecommendationCard:Ec,CarouselTariffsCard:qc,ContactsBlock:Hc,CreditForm:td,DepositFiltration:od,Depository:Cd,ErrorBlock:Td,ExchangeRateTile:Zd,Footer:Vm,GracePeriod:zm,GrantSupport:Fm,Header:Cu,Headline:C,HorizontalLayout:Pu,ImgBlock:Ru,InsuranceAmountBlock:Ou,InvestmentInfo:Eu,LinkDocs:th,MobileAppTile:ih,MortgageFiltration:Bh,OfficesAtmsMap:Zp,Placeholder:eg,ProductBlock:ht,ProductGallery:ng,RepresentativeOfficeInfo:ag,RichTextBlock:sg,RollupItem:ug,SafeDepositRental:_g,StepsBlock:$g,StickyBottomMenu:Lg,TabsLayout:Xg,TariffsTable:bf,TextBlock:yf,UnitBlock:kf,VerticalLayout:Cf,Video:Tf},Bf=me((()=>{a((()=>{St()}),[]);const e=Vt();jt(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),Pf="cookie",Rf=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=$t();gm((()=>{globalThis.localStorage?.getItem(Pf)||n()}),[],3e3);const a=i((()=>{globalThis.localStorage?.setItem(Pf,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(jl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:a})})]})}):null}));function Mf(e){throw new Error(e)}const Df=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Mf(e)}}))),[c,d]),n},Vf=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=Df({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return jt(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),zf=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:Mf(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return jt(globalThis.document,"keydown",r),e?o("div",{className:u("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),_f="header",Af="footer",Of="sticky-footer",Ff={},$f=d((({className:e,data:t=Ff,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);Bf();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.header,{...m,slotName:_f})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.footer,{...m,slotName:Af})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.["sticky-footer"],{...m,slotName:Of})}):null,o(Vf,{}),o(zf,{}),o(Rf,{__html:d?.cookieContent?.__html})]})}));Object.assign($f,{childrenTypes:[],slots:()=>[_f,Af,Of]});e.Blocks=If,e.ContentPage=$f,e.handlerDecorator=me,e.joinList=ys,e.packageVersion="0.14.605",e.projectSettings=V,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=M,Object.defineProperty(e,"__esModule",{value:!0})}));